From 17fd6f70b80d194c41da60c26c71210be33cf9d6 Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 18:34:29 +0200 Subject: [PATCH 01/10] Add .drone.yml for continuous integration on Drone CI. --- .drone.yml | 14 ++++++++++++++ .editorconfig | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e3b8ad5 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +kind: pipeline +name: default + +steps: + - name: prepare + image: node:12 + commands: + - npm install + - name: build + image: node:12 + environment: + NPMPATH: "node_modules/.bin" + commands: + - $NPMPATH/grunt diff --git a/.editorconfig b/.editorconfig index c308ed0..87a3009 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,5 +9,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +[*.yml] +indent_size = 2 [*.md] trim_trailing_whitespace = false -- 2.49.0 From 82f867a8ecacabd0ef0179cfbe28bd32ee9ac710 Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 19:01:49 +0200 Subject: [PATCH 02/10] Update all dependencies to their latest versions --- package.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 078cbb4..1d7c7f8 100644 --- a/package.json +++ b/package.json @@ -23,28 +23,28 @@ ], "license": "GPL-3.0", "dependencies": { - "jquery": "~2.1.3", - "jquery-ui": "github:jquery/jquery-ui#1.11.4", - "jquery.cookie": "~1.4.1" + "jquery": "3.4.1", + "jquery-ui": "1.12.1", + "jquery.cookie": "1.4.1" }, "devDependencies": { - "grunt": "~0.4.5", - "grunt-cli": "^0.1.13", - "grunt-contrib-clean": "~0.6.0", - "grunt-contrib-concat": "~0.5.0", - "grunt-contrib-connect": "~0.11.0", - "grunt-contrib-cssmin": "^0.14.0", - "grunt-contrib-jshint": "~0.11.0", - "grunt-contrib-qunit": "~0.7.0", - "grunt-contrib-uglify": "~0.9.2", - "grunt-contrib-watch": "~0.6.1", - "grunt-mocha-phantomjs": "^2.0.0", - "grunt-version": "^1.0.0", - "jshint-stylish": "~2.0.1", - "load-grunt-tasks": "~3.3.0", - "phantomjs": "^1.9.18", - "time-grunt": "~1.2.1", - "mocha": "~2.3.3", - "chai": "~3.3.0" + "grunt": "1.0.4", + "grunt-cli": "1.3.2", + "grunt-contrib-clean": "2.0.0", + "grunt-contrib-concat": "1.0.1", + "grunt-contrib-connect": "2.0.0", + "grunt-contrib-cssmin": "3.0.0", + "grunt-contrib-jshint": "2.1.0", + "grunt-contrib-qunit": "3.1.0", + "grunt-contrib-uglify": "4.0.1", + "grunt-contrib-watch": "1.1.0", + "grunt-mocha-phantomjs": "4.0.0", + "grunt-version": "1.3.0", + "jshint-stylish": "2.2.1", + "load-grunt-tasks": "4.0.0", + "phantomjs-prebuilt": "2.1.16", + "time-grunt": "2.0.0", + "mocha": "6.1.4", + "chai": "4.2.0" } } -- 2.49.0 From 5a3e672b9cb01b478d6440319cb8f9026acaeaae Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 22:27:16 +0200 Subject: [PATCH 03/10] Fix various linting errors --- dist/jquery.uhr.base.js | 945 ++-- dist/jquery.uhr.base.min.js | 4 - dist/jquery.uhr.baselangs.js | 188 +- dist/jquery.uhr.baselangs.min.js | 4 - dist/jquery.uhr.complete.js | 1129 ++-- dist/jquery.uhr.complete.min.js | 4 - dist/jquery.uhr.langs.js | 188 +- dist/jquery.uhr.langs.min.js | 4 - dist/jquery.uhr.main.js | 945 ++-- dist/jquery.uhr.main.min.js | 4 - dist/libs.js | 8284 +++++++++++++++++------------- dist/libs.min.js | 6 - dist/uhr-black.min.css | 1 - dist/uhr-blue.min.css | 1 - dist/uhr-green.min.css | 1 - dist/uhr-pink.min.css | 1 - dist/uhr-red.min.css | 1 - dist/uhr-white.min.css | 1 - dist/uhr-yellow.min.css | 1 - dist/uhr.min.css | 1 - package-lock.json | 5271 +++++++++++++++++++ src/uhr.js | 941 ++-- test/test.js | 14 +- 23 files changed, 12266 insertions(+), 5673 deletions(-) delete mode 100644 dist/jquery.uhr.base.min.js delete mode 100644 dist/jquery.uhr.baselangs.min.js delete mode 100644 dist/jquery.uhr.complete.min.js delete mode 100644 dist/jquery.uhr.langs.min.js delete mode 100644 dist/jquery.uhr.main.min.js delete mode 100644 dist/libs.min.js delete mode 100644 dist/uhr-black.min.css delete mode 100644 dist/uhr-blue.min.css delete mode 100644 dist/uhr-green.min.css delete mode 100644 dist/uhr-pink.min.css delete mode 100644 dist/uhr-red.min.css delete mode 100644 dist/uhr-white.min.css delete mode 100644 dist/uhr-yellow.min.css delete mode 100644 dist/uhr.min.css create mode 100644 package-lock.json diff --git a/dist/jquery.uhr.base.js b/dist/jquery.uhr.base.js index bbd5b72..246d96c 100644 --- a/dist/jquery.uhr.base.js +++ b/dist/jquery.uhr.base.js @@ -1,17 +1,17 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -(function($) { +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ +(function ($) { 'use strict'; var uhrGlobals = { "id": 0, "languages": [], "themes": [], registerLanguage: function registerLanguage(code, language) { - var alreadyExists = uhrGlobals.languages.some(function(element) { + var alreadyExists = uhrGlobals.languages.some(function (element) { if (code === element.code) { console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language + - "' because it is already registered for language '" + element.language + "'!"); + "' because it is already registered for language '" + element.language + "'!"); return true; } return false; @@ -24,7 +24,7 @@ }; // auto-detect themes - $('link[rel=stylesheet]').each(function(index, item) { + $('link[rel=stylesheet]').each(function (index, item) { var styleSheet = $(item); var styleClass = styleSheet.attr('data-class'); if (styleClass !== undefined) { @@ -41,9 +41,12 @@ } // public interface methods (exported later) + var setCookie; + var isOn; + var update; var start = function start() { if (!isOn.bind(this)()) { - this.timer = window.setInterval(function() { + this.timer = window.setInterval(function () { this.options.time = new Date(); update.bind(this)(); }.bind(this), 1000); @@ -66,436 +69,25 @@ this.start(); } }; - var setLanguage = function setLanguage(languageKey) { - if (languageKey !== this.options.language) { - this.options.language = languageKey; - var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); - renderer.render.bind(this)(function() { - this.currentMinute = -1; - update.bind(this)(); - }.bind(this)); - setCookie.bind(this)('uhr-language', languageKey); - update.bind(this)(); - } - }; - var setTheme = function setTheme(theme) { - if (theme !== this.options.theme) { - this.element.removeClass(this.options.theme).addClass(theme); - $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); - this.options.theme = theme; - setCookie.bind(this)('uhr-theme', theme); - } - }; - var setTime = function setTime(time) { - this.currentMinute = -1; - if (time === null) { - this.options.time = new Date(); - } else { - if (this.timer !== null) { - window.clearInterval(this.timer); - } - this.options.time = time; - } - update.bind(this)(); - }; - var setMode = function(mode) { - this.options.mode = mode; - this.currentMinute = -1; - update.bind(this)(); - setCookie.bind(this)('uhr-mode', mode); - }; - var setWidth = function setWidth(width) { - var e = this.element; - e.css('width', width); - var realWidth = e.width(); - e.width(realWidth); - e.height(realWidth); - e.css('font-size', (realWidth / 40) + 'px'); - }; + var language; - // private interface methods - var create = function create() { - this.id = uhrGlobals.id++; - this.timer = null; - this.currentMinute = -1; - var userTime = this.options.time; - var hash, params; - if (this.options.time === undefined) { - this.options.time = new Date(); - } - // parse the URL params - hash = window.location.hash; - if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { - hash = hash.substring(1); - hash = decodeURIComponent(hash); - params = hash.split('&'); - params.forEach(function (element) { - var pair = element.split('='); - var key = pair[0]; - var value = pair[1]; - switch (key) { - case 'l': - case 'language': - this.options.language = value; - this.options.force = true; - break; - case 't': - case 'theme': - this.options.theme = value; - this.options.force = true; - break; - case 'm': - case 'mode': - this.options.mode = value; - this.options.force = true; - break; - case 's': - case 'status': - this.options.status = value; - this.options.force = true; - break; - } - }.bind(this)); - } - // end parse the URL params - setupHTML.bind(this)(); - wireFunctionality.bind(this)(); - if (userTime !== undefined) { - this.time(userTime); - } - }; - // private helper methods (not exported) - var toggleConfigScreen = function toggleConfigScreen() { - $('#uhr-controlpanel' + this.id).toggle('fast'); - }; - // set up - var setupHTML = function setupHTML() { - var e = this.element; - // Base clock area - e.addClass('uhr'); - e.empty(); - e.append('<span class="item dot dot1"></span>'); - e.append('<span class="item dot dot2"></span>'); - e.append('<span class="item dot dot3"></span>'); - e.append('<span class="item dot dot4"></span>'); - e.append('<div class="letterarea"></div>'); - e.append('<div class="reflection"></div>'); - setWidth.bind(this)(this.options.width); - - if (this.options.controls) { - var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); - var content = $('<div class="content"></div>'); - controlpanel.append(content); - // on/off switch - var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); - toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + - '" checked="checked" />'); - toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + - '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); - content.append(toggleSwitch); - - // time mode switch - var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); - modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + - '" checked="checked" />'); - modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + - '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + - '</label>'); - content.append(modeSwitch); - // language chooser - if (uhrGlobals.languages.length > 1) { - var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); - uhrGlobals.languages.forEach(function(item) { - languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); - }); - content.append(languageChooser); - } - - // theme chooser - if (uhrGlobals.themes.length > 1) { - var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); - uhrGlobals.themes.forEach(function(item) { - themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); - }); - content.append(themeChooser); - } - var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); - closebutton.on('click', function() { - $('#uhr-controlpanel' + this.id).hide('fast'); - }.bind(this)); - content.append(closebutton); - e.after(controlpanel); - controlpanel.hide(); - var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); - configlink.on('click', function() { - toggleConfigScreen.bind(this)(); - }.bind(this)); - e.after(configlink); - } - }; - var wireFunctionality = function wireFunctionality() { - // on/off switch - var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); - toggleSwitch.on('click', function() { - this.toggle(); - }.bind(this)); - var status = $.cookie('uhr-status' + this.id); - if (status === undefined || this.options.force) { - status = this.options.status; - } - toggleSwitch.prop('checked', status === 'on'); - if (status === 'on') { - this.start(); - } else { - this.stop(); - } - - // time mode switch - var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); - modeSwitch.on('click', function() { - if (this.options.mode === 'seconds') { - setMode.bind(this)('normal'); - } else { - setMode.bind(this)('seconds'); - } - }.bind(this)); - - var mode = $.cookie('uhr-mode' + this.id); - if (mode === undefined || this.options.force) { - mode = this.options.mode; - } - modeSwitch.prop('checked', mode !== 'seconds'); - if (mode === 'seconds') { - setMode.bind(this)('seconds'); - } else { - setMode.bind(this)('normal'); - } - - // language chooser - var languageChooser = $('#uhr-languagechooser' + this.id); - languageChooser.on('change', function() { - var languageKey = $('#uhr-languagechooser' + this.id).val(); - this.language(languageKey); - }.bind(this)); - var selectedLanguage = $.cookie('uhr-language' + this.id); - if (selectedLanguage === undefined || this.options.force) { - selectedLanguage = this.options.language; - } - var found = uhrGlobals.languages.some(function(item) { - return selectedLanguage === item.code; - }); - if (!found) { - var fallbackLanguage; - if (uhrGlobals.languages.length > 0) { - fallbackLanguage = uhrGlobals.languages[0].code; - } else { - fallbackLanguage = ''; - } - console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); - selectedLanguage = fallbackLanguage; - } - languageChooser.val(selectedLanguage); - this.options.language = ""; - this.language(selectedLanguage); - - // theme chooser - var themeChooser = $('#uhr-themechooser' + this.id); - themeChooser.on('change', function() { - var themeKey = $('#uhr-themechooser' + this.id).val(); - this.theme(themeKey); - }.bind(this)); - var selectedTheme = $.cookie('uhr-theme' + this.id); - if (selectedTheme === undefined || this.options.force) { - selectedTheme = this.options.theme; - } - found = uhrGlobals.themes.some(function(item) { - return selectedTheme === item.styleClass; - }); - if (!found) { - var fallbackTheme = uhrGlobals.themes[0].styleClass; - console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); - selectedTheme = fallbackTheme; - } - themeChooser.val(selectedTheme); - this.options.theme = ""; - this.theme(selectedTheme); - if (this.options.autoresize) { - $(window).on('resize', function() { - var $e = this.element; - var $parent = $e.parent(); - var $window = $(window); - var parentWidth = $parent.width(); - var parentHeight = $parent.height(); - var windowWidth = $window.width(); - var windowHeight = $window.height(); - var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; - setWidth.bind(this)(size); - }.bind(this)); - } - }; - var destroy = function destroy() { - this.timer = null; - $(this.element) - .removeAttr('style') - .removeAttr('class') - .empty(); - $('#uhr-configlink' + this.id).remove(); - $('#uhr-controlpanel' + this.id).remove(); - - }; - var setCookie = function setCookie(cookieName, cookieValue) { - var options = {}; - if (this.options.cookiePath !== undefined) { - options = {expires: 365, path: this.options.cookiePath}; - } else { - options = {expires: 365}; - } - $.cookie(cookieName + this.id, cookieValue, options); - }; - - // business logic - var isOn = function isOn() { - return this.timer !== null; - }; - var update = function update() { - if (isOn.bind(this)()) { - var time = this.options.time; - if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { - if (time.getMinutes() === this.currentMinute) { - return; - } - this.currentMinute = time.getMinutes(); - } - show.bind(this)(time); - } else { - clear.bind(this)(); - this.currentMinute = -1; - } - }; - var show = function show(time) { - var second = getSecond.bind(this)(time); - var dotMinute = getDotMinute.bind(this)(time); - var hour = getHour.bind(this)(time); - var coarseMinute = getCoarseMinute.bind(this)(time); - clear.bind(this)(); - if (this.options.mode === 'seconds') { - highlight.bind(this)('second' + second); - } else { - highlight.bind(this)('on'); - for (var i = 1; i <= dotMinute; i++) { - highlight.bind(this)('dot' + i); - } - highlight.bind(this)('minute' + coarseMinute); - highlight.bind(this)('hour' + hour); - } - }; - var highlight = function highlight(itemClass) { - this.element.find('.item.' + itemClass).addClass('active'); - }; - var clear = function clear() { - this.element.find('.item').removeClass('active'); - }; - var getSecond = function getSecond(date) { - if (typeof language.bind(this)().getSeconds === 'function') { - return language.bind(this)().getSeconds(date); - } - return date.getSeconds(); - }; - var getDotMinute = function getDotMinute(date) { - if (typeof language.bind(this)().getDotMinute === 'function') { - return language.bind(this)().getDotMinute(date); - } - var minutes = date.getMinutes(); - return minutes % 5; - }; - var getCoarseMinute = function getCoarseMinute(date) { - if (typeof language.bind(this)().getCoarseMinute === 'function') { - return language.bind(this)().getCoarseMinute(date); - } - return date.getMinutes(); - }; - var getHour = function getHour(date) { - if (typeof language.bind(this)().getHour === 'function') { - return language.bind(this)().getHour(date); - } - var hour = date.getHours(); - if (date.getMinutes() >= 25) { - return (hour + 1) % 24; - } - return hour; - }; - var language = function language() { - var matchingLanguages = uhrGlobals.languages.filter(function(element) { - return (element.code === this.options.language); - }, this); - if (matchingLanguages.length > 0) { - return matchingLanguages[0]; - } - // fallback: return empty object - return {}; - }; - - $.widget("fritteli.uhr", { - "options": { - width: '100%', - status: 'on', - language: 'de_CH', - theme: uhrGlobals.themes[0].styleClass, - force: false, - controls: true, - cookiePath: undefined, - autoresize: true, - mode: 'normal' - }, - "start": start, - "stop": stop, - "toggle": toggle, - "language": setLanguage, - "theme": setTheme, - "time": setTime, - "mode": setMode, - "width": setWidth, - // constructor method - "_create": create, - // destructor method - "_destroy": destroy - }); - $.fritteli.uhr.register = uhrGlobals.registerLanguage; /** - * Hilfsklasse zum Rendern der Uhr. - * @param layout Layout-Objekt, das gerendert werden soll. - * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. + * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. + * @param value Der Buchstabe, der Dargestellt werden soll. + * @param style Die CSS-Styleklassen des Buchstabens. */ - function UhrRenderer(layout, renderarea) { - this.render = function render(beforeshow) { - if (layout.parsed === undefined) { - switch (layout.version) { - case 2: - var delegate = new UhrRendererV2Delegate(layout); - var parsedLayout = delegate.parse(); - Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false}); - break; - default: - console.warn("Unknown layout version: '" + layout.version + "'"); - return; - } + function Letter(value, style) { + var myValue = value; + var myStyle = style || ''; + this.addStyle = function (style) { + if (myStyle === '') { + myStyle = style; + } else { + myStyle += ' ' + style; } - var letters = layout.parsed; - renderarea.fadeOut('fast', function() { - renderarea.empty(); - letters.forEach(function(line, index, array) { - line.forEach(function(letter) { - renderarea.append(letter.toString()); - }); - if (index < array.length - 1) { - renderarea.append('<br/>'); - } - }); - if (typeof beforeshow === 'function') { - beforeshow(); - } - renderarea.fadeIn('fast'); - }); + }; + this.toString = function () { + return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; }; } @@ -644,7 +236,7 @@ 8: [10], 9: [8, 9] }; - var seconds= { + var seconds = { "0": [vorne0, hinten0], "1": [vorne0, hinten1], "2": [vorne0, hinten2], @@ -707,10 +299,21 @@ "59": [vorne5, hinten9] }; + function parseObject(letters, styleClass, object) { + if (typeof object !== 'undefined' && object !== null) { + Object.keys(object).forEach(function (y) { + var highlightLetters = object[y]; + highlightLetters.forEach(function (x) { + letters[y - 1][x - 1].addStyle(styleClass); + }); + }); + } + } + function parseArrayOrObject(letters, styleClass, input) { if (typeof input !== 'undefined' && input !== null) { if (Array.isArray(input)) { - input.forEach(function(item) { + input.forEach(function (item) { parseObject(letters, styleClass, item); }); } else { @@ -719,23 +322,12 @@ } } - function parseObject(letters, styleClass, object) { - if (typeof object !== 'undefined' && object !== null) { - Object.keys(object).forEach(function(y) { - var highlightLetters = object[y]; - highlightLetters.forEach(function(x) { - letters[y - 1][x - 1].addStyle(styleClass); - }); - }); - } - } - function parseTimeDefinition(letters, styleClass, definition) { if (typeof definition !== 'undefined' && definition !== null) { - Object.keys(definition).forEach(function(listString) { + Object.keys(definition).forEach(function (listString) { var array = listString.split(','); var highlightLetters = definition[listString]; - array.forEach(function(item) { + array.forEach(function (item) { parseArrayOrObject(letters, styleClass + item, highlightLetters); }); }); @@ -744,7 +336,7 @@ this.parse = function parse() { var letters = []; - layout.letters.forEach(function(string) { + layout.letters.forEach(function (string) { var line = []; for (var c = 0; c < string.length; c++) { var character = new Letter(string[c]); @@ -765,24 +357,451 @@ } /** - * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. - * @param value Der Buchstabe, der Dargestellt werden soll. - * @param style Die CSS-Styleklassen des Buchstabens. + * Hilfsklasse zum Rendern der Uhr. + * @param layout Layout-Objekt, das gerendert werden soll. + * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. */ - function Letter(value, style) { - var myValue = value; - var myStyle = style || ''; - this.addStyle = function(style) { - if (myStyle === '') { - myStyle = style; - } else { - myStyle += ' ' + style; + function UhrRenderer(layout, renderarea) { + this.render = function render(beforeshow) { + if (layout.parsed === undefined) { + switch (layout.version) { + case 2: + var delegate = new UhrRendererV2Delegate(layout); + var parsedLayout = delegate.parse(); + Object.defineProperty(layout, "parsed", { + "value": parsedLayout, + "writable": false, + "configurable": false + }); + break; + default: + console.warn("Unknown layout version: '" + layout.version + "'"); + return; + } } - }; - this.toString = function() { - return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; + var letters = layout.parsed; + renderarea.fadeOut('fast', function () { + renderarea.empty(); + letters.forEach(function (line, index, array) { + line.forEach(function (letter) { + renderarea.append(letter.toString()); + }); + if (index < array.length - 1) { + renderarea.append('<br/>'); + } + }); + if (typeof beforeshow === 'function') { + beforeshow(); + } + renderarea.fadeIn('fast'); + }); }; } + + var setLanguage = function setLanguage(languageKey) { + if (languageKey !== this.options.language) { + this.options.language = languageKey; + var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); + renderer.render.bind(this)(function () { + this.currentMinute = -1; + update.bind(this)(); + }.bind(this)); + setCookie.bind(this)('uhr-language', languageKey); + update.bind(this)(); + } + }; + var setTheme = function setTheme(theme) { + if (theme !== this.options.theme) { + this.element.removeClass(this.options.theme).addClass(theme); + $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); + this.options.theme = theme; + setCookie.bind(this)('uhr-theme', theme); + } + }; + var setTime = function setTime(time) { + this.currentMinute = -1; + if (time === null) { + this.options.time = new Date(); + } else { + if (this.timer !== null) { + window.clearInterval(this.timer); + } + this.options.time = time; + } + update.bind(this)(); + }; + var setMode = function (mode) { + this.options.mode = mode; + this.currentMinute = -1; + update.bind(this)(); + setCookie.bind(this)('uhr-mode', mode); + }; + var setWidth = function setWidth(width) { + var e = this.element; + e.css('width', width); + var realWidth = e.width(); + e.width(realWidth); + e.height(realWidth); + e.css('font-size', (realWidth / 40) + 'px'); + }; + + // private interface methods + var setupHTML; + var wireFunctionality; + var create = function create() { + this.id = uhrGlobals.id++; + this.timer = null; + this.currentMinute = -1; + var userTime = this.options.time; + var hash, params; + if (this.options.time === undefined) { + this.options.time = new Date(); + } + // parse the URL params + hash = window.location.hash; + if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { + hash = hash.substring(1); + hash = decodeURIComponent(hash); + params = hash.split('&'); + params.forEach(function (element) { + var pair = element.split('='); + var key = pair[0]; + var value = pair[1]; + switch (key) { + case 'l': + case 'language': + this.options.language = value; + this.options.force = true; + break; + case 't': + case 'theme': + this.options.theme = value; + this.options.force = true; + break; + case 'm': + case 'mode': + this.options.mode = value; + this.options.force = true; + break; + case 's': + case 'status': + this.options.status = value; + this.options.force = true; + break; + } + }.bind(this)); + } + // end parse the URL params + setupHTML.bind(this)(); + wireFunctionality.bind(this)(); + if (userTime !== undefined) { + this.time(userTime); + } + }; + // private helper methods (not exported) + var toggleConfigScreen = function toggleConfigScreen() { + $('#uhr-controlpanel' + this.id).toggle('fast'); + }; + // set up + setupHTML = function setupHTML() { + var e = this.element; + // Base clock area + e.addClass('uhr'); + e.empty(); + e.append('<span class="item dot dot1"></span>'); + e.append('<span class="item dot dot2"></span>'); + e.append('<span class="item dot dot3"></span>'); + e.append('<span class="item dot dot4"></span>'); + e.append('<div class="letterarea"></div>'); + e.append('<div class="reflection"></div>'); + setWidth.bind(this)(this.options.width); + + if (this.options.controls) { + var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); + var content = $('<div class="content"></div>'); + controlpanel.append(content); + // on/off switch + var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); + toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + + '" checked="checked" />'); + toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + + '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); + content.append(toggleSwitch); + + // time mode switch + var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); + modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + + '" checked="checked" />'); + modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + + '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + + '</label>'); + content.append(modeSwitch); + // language chooser + if (uhrGlobals.languages.length > 1) { + var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); + uhrGlobals.languages.forEach(function (item) { + languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); + }); + content.append(languageChooser); + } + + // theme chooser + if (uhrGlobals.themes.length > 1) { + var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); + uhrGlobals.themes.forEach(function (item) { + themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); + }); + content.append(themeChooser); + } + var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); + closebutton.on('click', function () { + $('#uhr-controlpanel' + this.id).hide('fast'); + }.bind(this)); + content.append(closebutton); + e.after(controlpanel); + controlpanel.hide(); + var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); + configlink.on('click', function () { + toggleConfigScreen.bind(this)(); + }.bind(this)); + e.after(configlink); + } + }; + wireFunctionality = function wireFunctionality() { + // on/off switch + var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); + toggleSwitch.on('click', function () { + this.toggle(); + }.bind(this)); + var status = $.cookie('uhr-status' + this.id); + if (status === undefined || this.options.force) { + status = this.options.status; + } + toggleSwitch.prop('checked', status === 'on'); + if (status === 'on') { + this.start(); + } else { + this.stop(); + } + + // time mode switch + var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); + modeSwitch.on('click', function () { + if (this.options.mode === 'seconds') { + setMode.bind(this)('normal'); + } else { + setMode.bind(this)('seconds'); + } + }.bind(this)); + + var mode = $.cookie('uhr-mode' + this.id); + if (mode === undefined || this.options.force) { + mode = this.options.mode; + } + modeSwitch.prop('checked', mode !== 'seconds'); + if (mode === 'seconds') { + setMode.bind(this)('seconds'); + } else { + setMode.bind(this)('normal'); + } + + // language chooser + var languageChooser = $('#uhr-languagechooser' + this.id); + languageChooser.on('change', function () { + var languageKey = $('#uhr-languagechooser' + this.id).val(); + this.language(languageKey); + }.bind(this)); + var selectedLanguage = $.cookie('uhr-language' + this.id); + if (selectedLanguage === undefined || this.options.force) { + selectedLanguage = this.options.language; + } + var found = uhrGlobals.languages.some(function (item) { + return selectedLanguage === item.code; + }); + if (!found) { + var fallbackLanguage; + if (uhrGlobals.languages.length > 0) { + fallbackLanguage = uhrGlobals.languages[0].code; + } else { + fallbackLanguage = ''; + } + console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); + selectedLanguage = fallbackLanguage; + } + languageChooser.val(selectedLanguage); + this.options.language = ""; + this.language(selectedLanguage); + + // theme chooser + var themeChooser = $('#uhr-themechooser' + this.id); + themeChooser.on('change', function () { + var themeKey = $('#uhr-themechooser' + this.id).val(); + this.theme(themeKey); + }.bind(this)); + var selectedTheme = $.cookie('uhr-theme' + this.id); + if (selectedTheme === undefined || this.options.force) { + selectedTheme = this.options.theme; + } + found = uhrGlobals.themes.some(function (item) { + return selectedTheme === item.styleClass; + }); + if (!found) { + var fallbackTheme = uhrGlobals.themes[0].styleClass; + console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); + selectedTheme = fallbackTheme; + } + themeChooser.val(selectedTheme); + this.options.theme = ""; + this.theme(selectedTheme); + if (this.options.autoresize) { + $(window).on('resize', function () { + var $e = this.element; + var $parent = $e.parent(); + var $window = $(window); + var parentWidth = $parent.width(); + var parentHeight = $parent.height(); + var windowWidth = $window.width(); + var windowHeight = $window.height(); + var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; + setWidth.bind(this)(size); + }.bind(this)); + } + }; + var destroy = function destroy() { + this.timer = null; + $(this.element) + .removeAttr('style') + .removeAttr('class') + .empty(); + $('#uhr-configlink' + this.id).remove(); + $('#uhr-controlpanel' + this.id).remove(); + + }; + setCookie = function setCookie(cookieName, cookieValue) { + var options = {}; + if (this.options.cookiePath !== undefined) { + options = {expires: 365, path: this.options.cookiePath}; + } else { + options = {expires: 365}; + } + $.cookie(cookieName + this.id, cookieValue, options); + }; + + // business logic + isOn = function isOn() { + return this.timer !== null; + }; + var show; + var clear; + update = function update() { + if (isOn.bind(this)()) { + var time = this.options.time; + if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { + if (time.getMinutes() === this.currentMinute) { + return; + } + this.currentMinute = time.getMinutes(); + } + show.bind(this)(time); + } else { + clear.bind(this)(); + this.currentMinute = -1; + } + }; + var highlight; + var getSecond; + var getDotMinute; + var getCoarseMinute; + var getHour; + show = function show(time) { + var second = getSecond.bind(this)(time); + var dotMinute = getDotMinute.bind(this)(time); + var hour = getHour.bind(this)(time); + var coarseMinute = getCoarseMinute.bind(this)(time); + clear.bind(this)(); + if (this.options.mode === 'seconds') { + highlight.bind(this)('second' + second); + } else { + highlight.bind(this)('on'); + for (var i = 1; i <= dotMinute; i++) { + highlight.bind(this)('dot' + i); + } + highlight.bind(this)('minute' + coarseMinute); + highlight.bind(this)('hour' + hour); + } + }; + highlight = function highlight(itemClass) { + this.element.find('.item.' + itemClass).addClass('active'); + }; + clear = function clear() { + this.element.find('.item').removeClass('active'); + }; + getSecond = function getSecond(date) { + if (typeof language.bind(this)().getSeconds === 'function') { + return language.bind(this)().getSeconds(date); + } + return date.getSeconds(); + }; + getDotMinute = function getDotMinute(date) { + if (typeof language.bind(this)().getDotMinute === 'function') { + return language.bind(this)().getDotMinute(date); + } + var minutes = date.getMinutes(); + return minutes % 5; + }; + getCoarseMinute = function getCoarseMinute(date) { + if (typeof language.bind(this)().getCoarseMinute === 'function') { + return language.bind(this)().getCoarseMinute(date); + } + return date.getMinutes(); + }; + getHour = function getHour(date) { + if (typeof language.bind(this)().getHour === 'function') { + return language.bind(this)().getHour(date); + } + var hour = date.getHours(); + if (date.getMinutes() >= 25) { + return (hour + 1) % 24; + } + return hour; + }; + language = function language() { + var matchingLanguages = uhrGlobals.languages.filter(function (element) { + return (element.code === this.options.language); + }, this); + if (matchingLanguages.length > 0) { + return matchingLanguages[0]; + } + // fallback: return empty object + return {}; + }; + + $.widget("fritteli.uhr", { + "options": { + width: '100%', + status: 'on', + language: 'de_CH', + theme: uhrGlobals.themes[0].styleClass, + force: false, + controls: true, + cookiePath: undefined, + autoresize: true, + mode: 'normal' + }, + "start": start, + "stop": stop, + "toggle": toggle, + "language": setLanguage, + "theme": setTheme, + "time": setTime, + "mode": setMode, + "width": setWidth, + // constructor method + "_create": create, + // destructor method + "_destroy": destroy + }); + $.fritteli.uhr.register = uhrGlobals.registerLanguage; })(jQuery); (function($) { diff --git a/dist/jquery.uhr.base.min.js b/dist/jquery.uhr.base.min.js deleted file mode 100644 index 3d91901..0000000 --- a/dist/jquery.uhr.base.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a){"use strict";function b(a,b){this.render=function(d){if(void 0===a.parsed)switch(a.version){case 2:var e=new c(a),f=e.parse();Object.defineProperty(a,"parsed",{value:f,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+a.version+"'")}var g=a.parsed;b.fadeOut("fast",function(){b.empty(),g.forEach(function(a,c,d){a.forEach(function(a){b.append(a.toString())}),c<d.length-1&&b.append("<br/>")}),"function"==typeof d&&d(),b.fadeIn("fast")})}}function c(a){function b(a,b,d){"undefined"!=typeof d&&null!==d&&(Array.isArray(d)?d.forEach(function(d){c(a,b,d)}):c(a,b,d))}function c(a,b,c){"undefined"!=typeof c&&null!==c&&Object.keys(c).forEach(function(d){var e=c[d];e.forEach(function(c){a[d-1][c-1].addStyle(b)})})}function e(a,c,d){"undefined"!=typeof d&&null!==d&&Object.keys(d).forEach(function(e){var f=e.split(","),g=d[e];f.forEach(function(d){b(a,c+d,g)})})}var f={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},g={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},h={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},i={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},j={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},k={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},l={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},m={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},n={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},o={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},p={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},q={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},r={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},s={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},t={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},u={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[f,g],1:[f,i],2:[f,k],3:[f,m],4:[f,o],5:[f,q],6:[f,r],7:[f,s],8:[f,t],9:[f,u],10:[h,g],11:[h,i],12:[h,k],13:[h,m],14:[h,o],15:[h,q],16:[h,r],17:[h,s],18:[h,t],19:[h,u],20:[j,g],21:[j,i],22:[j,k],23:[j,m],24:[j,o],25:[j,q],26:[j,r],27:[j,s],28:[j,t],29:[j,u],30:[l,g],31:[l,i],32:[l,k],33:[l,m],34:[l,o],35:[l,q],36:[l,r],37:[l,s],38:[l,t],39:[l,u],40:[n,g],41:[n,i],42:[n,k],43:[n,m],44:[n,o],45:[n,q],46:[n,r],47:[n,s],48:[n,t],49:[n,u],50:[p,g],51:[p,i],52:[p,k],53:[p,m],54:[p,o],55:[p,q],56:[p,r],57:[p,s],58:[p,t],59:[p,u]};this.parse=function(){var c=[];return a.letters.forEach(function(a){for(var b=[],e=0;e<a.length;e++){var f=new d(a[e]);b.push(f)}c.push(b)}),b(c,"on",a.permanent),"undefined"!=typeof a.seconds&&null!==a.seconds?e(c,"second",a.seconds):e(c,"second",v),e(c,"minute",a.minutes),e(c,"hour",a.hours),c}}function d(a,b){var c=a,d=b||"";this.addStyle=function(a){""===d?d=a:d+=" "+a},this.toString=function(){return'<span class="item letter '+d+'">'+c+"</span>"}}var e={id:0,languages:[],themes:[],registerLanguage:function(a,b){var c=e.languages.some(function(c){return a===c.code&&(console.error("Error: Language code '"+a+"' cannot be registered for language '"+b.language+"' because it is already registered for language '"+c.language+"'!"),!0)});c||(b.code=a,e.languages.push(b))}};a("link[rel=stylesheet]").each(function(b,c){var d=a(c),f=d.attr("data-class");if(void 0!==f){var g=d.attr("data-name");void 0===g&&(g=f),e.themes.push({styleClass:f,name:g})}}),0===e.themes.length&&e.themes.push({});var f=function(){t.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,u.bind(this)()}.bind(this),1e3),u.bind(this)(),s.bind(this)("uhr-status","on"))},g=function(){t.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,u.bind(this)(),s.bind(this)("uhr-status","off"))},h=function(){t.bind(this)()?this.stop():this.start()},i=function(a){if(a!==this.options.language){this.options.language=a;var c=new b(C.bind(this)(),this.element.find(".letterarea"));c.render.bind(this)(function(){this.currentMinute=-1,u.bind(this)()}.bind(this)),s.bind(this)("uhr-language",a),u.bind(this)()}},j=function(b){b!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(b),a("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(b),this.options.theme=b,s.bind(this)("uhr-theme",b))},k=function(a){this.currentMinute=-1,null===a?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=a),u.bind(this)()},l=function(a){this.options.mode=a,this.currentMinute=-1,u.bind(this)(),s.bind(this)("uhr-mode",a)},m=function(a){var b=this.element;b.css("width",a);var c=b.width();b.width(c),b.height(c),b.css("font-size",c/40+"px")},n=function(){this.id=e.id++,this.timer=null,this.currentMinute=-1;var a,b,c=this.options.time;void 0===this.options.time&&(this.options.time=new Date),a=window.location.hash,void 0!==a&&"string"==typeof a&&"#"===a.charAt(0)&&(a=a.substring(1),a=decodeURIComponent(a),b=a.split("&"),b.forEach(function(a){var b=a.split("="),c=b[0],d=b[1];switch(c){case"l":case"language":this.options.language=d,this.options.force=!0;break;case"t":case"theme":this.options.theme=d,this.options.force=!0;break;case"m":case"mode":this.options.mode=d,this.options.force=!0;break;case"s":case"status":this.options.status=d,this.options.force=!0}}.bind(this))),p.bind(this)(),q.bind(this)(),void 0!==c&&this.time(c)},o=function(){a("#uhr-controlpanel"+this.id).toggle("fast")},p=function(){var b=this.element;if(b.addClass("uhr"),b.empty(),b.append('<span class="item dot dot1"></span>'),b.append('<span class="item dot dot2"></span>'),b.append('<span class="item dot dot3"></span>'),b.append('<span class="item dot dot4"></span>'),b.append('<div class="letterarea"></div>'),b.append('<div class="reflection"></div>'),m.bind(this)(this.options.width),this.options.controls){var c=a('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),d=a('<div class="content"></div>');c.append(d);var f=a('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');f.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),f.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(f);var g=a('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(g.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),g.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(g),e.languages.length>1){var h=a('<select id="uhr-languagechooser'+this.id+'"></select>');e.languages.forEach(function(a){h.append('<option value="'+a.code+'">'+a.language+"</option>")}),d.append(h)}if(e.themes.length>1){var i=a('<select id="uhr-themechooser'+this.id+'"></select>');e.themes.forEach(function(a){i.append('<option value="'+a.styleClass+'">'+a.name+"</option>")}),d.append(i)}var j=a('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');j.on("click",function(){a("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),d.append(j),b.after(c),c.hide();var k=a('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');k.on("click",function(){o.bind(this)()}.bind(this)),b.after(k)}},q=function(){var b=a("#uhr-onoffswitch-checkbox"+this.id);b.on("click",function(){this.toggle()}.bind(this));var c=a.cookie("uhr-status"+this.id);(void 0===c||this.options.force)&&(c=this.options.status),b.prop("checked","on"===c),"on"===c?this.start():this.stop();var d=a("#uhr-modeswitch-checkbox"+this.id);d.on("click",function(){"seconds"===this.options.mode?l.bind(this)("normal"):l.bind(this)("seconds")}.bind(this));var f=a.cookie("uhr-mode"+this.id);(void 0===f||this.options.force)&&(f=this.options.mode),d.prop("checked","seconds"!==f),"seconds"===f?l.bind(this)("seconds"):l.bind(this)("normal");var g=a("#uhr-languagechooser"+this.id);g.on("change",function(){var b=a("#uhr-languagechooser"+this.id).val();this.language(b)}.bind(this));var h=a.cookie("uhr-language"+this.id);(void 0===h||this.options.force)&&(h=this.options.language);var i=e.languages.some(function(a){return h===a.code});if(!i){var j;j=e.languages.length>0?e.languages[0].code:"",console.warn("Language '"+h+"' not found! Using fallback '"+j+"'"),h=j}g.val(h),this.options.language="",this.language(h);var k=a("#uhr-themechooser"+this.id);k.on("change",function(){var b=a("#uhr-themechooser"+this.id).val();this.theme(b)}.bind(this));var n=a.cookie("uhr-theme"+this.id);if((void 0===n||this.options.force)&&(n=this.options.theme),i=e.themes.some(function(a){return n===a.styleClass}),!i){var o=e.themes[0].styleClass;console.warn("Theme '"+n+"' not found! Using fallback '"+o+"'"),n=o}k.val(n),this.options.theme="",this.theme(n),this.options.autoresize&&a(window).on("resize",function(){var b=this.element,c=b.parent(),d=a(window),e=c.width(),f=c.height(),g=d.width(),h=d.height(),i=Math.min(e,f,g,h)+"px";m.bind(this)(i)}.bind(this))},r=function(){this.timer=null,a(this.element).removeAttr("style").removeAttr("class").empty(),a("#uhr-configlink"+this.id).remove(),a("#uhr-controlpanel"+this.id).remove()},s=function(b,c){var d={};d=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},a.cookie(b+this.id,c,d)},t=function(){return null!==this.timer},u=function(){if(t.bind(this)()){var a=this.options.time;if(!C.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(a.getMinutes()===this.currentMinute)return;this.currentMinute=a.getMinutes()}v.bind(this)(a)}else x.bind(this)(),this.currentMinute=-1},v=function(a){var b=y.bind(this)(a),c=z.bind(this)(a),d=B.bind(this)(a),e=A.bind(this)(a);if(x.bind(this)(),"seconds"===this.options.mode)w.bind(this)("second"+b);else{w.bind(this)("on");for(var f=1;f<=c;f++)w.bind(this)("dot"+f);w.bind(this)("minute"+e),w.bind(this)("hour"+d)}},w=function(a){this.element.find(".item."+a).addClass("active")},x=function(){this.element.find(".item").removeClass("active")},y=function(a){return"function"==typeof C.bind(this)().getSeconds?C.bind(this)().getSeconds(a):a.getSeconds()},z=function(a){if("function"==typeof C.bind(this)().getDotMinute)return C.bind(this)().getDotMinute(a);var b=a.getMinutes();return b%5},A=function(a){return"function"==typeof C.bind(this)().getCoarseMinute?C.bind(this)().getCoarseMinute(a):a.getMinutes()},B=function(a){if("function"==typeof C.bind(this)().getHour)return C.bind(this)().getHour(a);var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b},C=function(){var a=e.languages.filter(function(a){return a.code===this.options.language},this);return a.length>0?a[0]:{}};a.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:e.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:f,stop:g,toggle:h,language:i,theme:j,time:k,mode:l,width:m,_create:n,_destroy:r}),a.fritteli.uhr.register=e.registerLanguage}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={4:[1,2]},d={3:[9,10,11]},e={4:[4,5,6,7,8]},f={1:[9,10,11]},g={2:[9,10,11]},h={2:[1,2,3,4,5,6]},i={3:[1,2,3,4,5,6]},j={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{"5,6,7,8,9":[f,c],"10,11,12,13,14":[g,c],"15,16,17,18,19":[h,c],"20,21,22,23,24":[i,c],"25,26,27,28,29":[f,d,e],"30,31,32,33,34":e,"35,36,37,38,39":[f,c,e],"40,41,42,43,44":[i,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,d],"55,56,57,58,59":[f,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH",j)}(jQuery); \ No newline at end of file diff --git a/dist/jquery.uhr.baselangs.js b/dist/jquery.uhr.baselangs.js index a8ab4c2..cd791da 100644 --- a/dist/jquery.uhr.baselangs.js +++ b/dist/jquery.uhr.baselangs.js @@ -1,65 +1,63 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); (function($) { 'use strict'; @@ -146,61 +144,63 @@ }(jQuery)); (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.baselangs.min.js b/dist/jquery.uhr.baselangs.min.js deleted file mode 100644 index cad339c..0000000 --- a/dist/jquery.uhr.baselangs.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a){"use strict";var b={1:[1,2,4,5,6]},c={10:[9,10,11]},d={4:[8,9,10,11]},e={4:[1,2,3]},f={5:[1,2,3,4]},g={1:[8,9,10,11]},h={2:[1,2,3,4]},i={3:[5,6,7,8,9,10,11]},j={2:[5,6,7,8,9,10,11]},k={3:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:b,minutes:{"0,1,2,3,4":c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":k,"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};a.fritteli.uhr.register("de",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={4:[1,2]},d={3:[9,10,11]},e={4:[4,5,6,7,8]},f={1:[9,10,11]},g={2:[9,10,11]},h={2:[1,2,3,4,5,6]},i={3:[1,2,3,4,5,6]},j={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{"5,6,7,8,9":[f,c],"10,11,12,13,14":[g,c],"15,16,17,18,19":[h,c],"20,21,22,23,24":[i,c],"25,26,27,28,29":[f,d,e],"30,31,32,33,34":e,"35,36,37,38,39":[f,c,e],"40,41,42,43,44":[i,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,d],"55,56,57,58,59":[f,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH",j)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={3:[7,8,9,10,11]},d={4:[4,5]},e={4:[1,2,3]},f={4:[7,8,9,10,11]},g={1:[9,10,11]},h={2:[9,10,11]},i={2:[1,2,3,4,5,6]},j={3:[1,2,3,4,5,6]},k={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{0:c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":[i,e],"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH_genau",k)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,5,6,7,9,10]},c={4:[4,5,6,7,8,9,10,11]},d={5:[8]},e={5:[4,5,6,7]},f={2:[1,2,3]},g={4:[1,2]},h={3:[4,5,6,7,8]},i={2:[4,5,6,7]},j={6:[8,9,10,11]},k={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:b,minutes:{"5,6,7,8,9":[f,c,e],"10,11,12,13,14":[g,c,e],"15,16,17,18,19":[h,e],"20,21,22,23,24":[i,c,e],"25,26,27,28,29":[f,c,d,j],"30,31,32,33,34":[j],"35,36,37,38,39":[f,c,e,j],"40,41,42,43,44":[i,c,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,c,d],"55,56,57,58,59":[f,c,d]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b}};a.fritteli.uhr.register("dk",k)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5]},c={4:[1,2,3,4]},d={4:[10,11]},e={5:[1,2,3,4]},f={10:[5,6,7,8,9,10,11]},g={3:[7,8,9,10]},h={4:[6,7,8]},i={2:[1,3,4,5,6,7,8,9]},j={3:[1,2,3,4,5,6]},k={3:[1,2,3,4,5,6,7,8,9,10]},l={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:b,minutes:{"0,1,2,3,4":f,"5,6,7,8,9":[g,e],"10,11,12,13,14":[h,e],"15,16,17,18,19":[i,e],"20,21,22,23,24":[j,e],"25,26,27,28,29":[k,e],"30,31,32,33,34":[c,e],"35,36,37,38,39":[k,d],"40,41,42,43,44":[j,d],"45,46,47,48,49":[i,d],"50,51,52,53,54":[h,d],"55,56,57,58,59":[g,d]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("en",l)}(jQuery),function(a){"use strict";var b={1:[1,2,6,7]},c={1:[2,3,4,6,7,8]},d={7:[6]},e={7:[7,8,9,10,11]},f={10:[1,2,3,4,5]},g={9:[7,8,9,10,11]},h={8:[8,9,10,11]},i={10:[6,7,8,9,10,11]},j={8:[2,3,4,5,6,7]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[c,{7:[1,2,3,4]}],"1,13":[b,{1:[9,10,11]}],"2,14":[c,{2:[1,2,3]}],"3,15":[c,{2:[5,6,7,8]}],"4,16":[c,{3:[1,2,3,4,5,6]}],"5,17":[c,{3:[7,8,9,10,11]}],"6,18":[c,{4:[1,2,3,4]}],"7,19":[c,{4:[6,7,8,9,10]}],"8,20":[c,{5:[1,2,3,4]}],"9,21":[c,{5:[5,6,7,8,9]}],"10,22":[c,{6:[3,4,5,6]}],"11,23":[c,{6:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("es",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6]},c={8:[1,2]},d={7:[1,2,3,4,5]},e={10:[4,5,6,7,8]},f={6:[6,7,8,9,10,11]},g={7:[7,8]},h={9:[7,8,9,10]},i={7:[9,10,11]},j={8:[4,5,6,7,8]},k={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},m={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:b,minutes:{"5,6,7,8,9":h,"10,11,12,13,14":i,"15,16,17,18,19":[c,j],"20,21,22,23,24":k,"25,26,27,28,29":l,"30,31,32,33,34":[c,e],"35,36,37,38,39":[d,l],"40,41,42,43,44":[d,k],"45,46,47,48,49":[d,g,j],"50,51,52,53,54":[d,i],"55,56,57,58,59":[d,h]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},f],"2,14":[{1:[8,9,10,11]},f],"3,15":[{2:[7,8,9,10,11]},f],"4,16":[{2:[1,2,3,4,5,6]},f],"5,17":[{4:[8,9,10,11]},f],"6,18":[{4:[5,6,7]},f],"7,19":[{3:[8,9,10,11]},f],"8,20":[{4:[1,2,3,4]},f],"9,21":[{3:[1,2,3,4]},f],"10,22":[{5:[3,4,5]},f],"11,23":[{6:[1,2,3,4]},f],12:{5:[1,2,3,4]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("fr",m)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,6,7]},c={2:[1,3,4]},d={8:[1]},e={7:[8,9,10,11]},f={10:[7,8,9,10,11]},g={9:[6,7,8,9,10,11]},h={10:[1,2,3,4,5]},i={8:[3,4,6,7,8,9,10,11]},j={9:[1,2,3,4,5]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[b,{5:[1,2,3,4,5,6]}],"1,13":[c,{2:[5,6,7]}],"2,14":[b,{2:[9,10,11]}],"3,15":[b,{3:[1,2,3]}],"4,16":[b,{6:[1,2,3,4,5,6,7]}],"5,17":[b,{7:[1,2,3,4,5,6]}],"6,18":[b,{6:[9,10,11]}],"7,19":[b,{5:[7,8,9,10,11]}],"8,20":[b,{3:[4,5,6,7]}],"9,21":[b,{3:[8,9,10,11]}],"10,22":[b,{4:[1,2,3,4,5]}],"11,23":[b,{4:[6,7,8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("it",l)}(jQuery),function(a){"use strict";var b={1:[1,2,3,5,6]},c={3:[1,2,3,4]},d={2:[8,9,10,11]},e={4:[8,9,10,11]},f={5:[1,2,3,4]},g={4:[1,2,3,4]},h={1:[8,9,10,11]},i={2:[1,2,3,4]},j={3:[7,8,9,10,11]},k={10:[9,10,11]},l={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:b,minutes:{"0,1,2,3,4":k,"5,6,7,8,9":[h,c],"10,11,12,13,14":[i,c],"15,16,17,18,19":[j,e],"20,21,22,23,24":[i,d,g],"25,26,27,28,29":[h,d,g],"30,31,32,33,34":g,"35,36,37,38,39":[h,c,g],"40,41,42,43,44":[i,c,g],"45,46,47,48,49":[j,f],"50,51,52,53,54":[i,d],"55,56,57,58,59":[h,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=20?(b+1)%24:b}};a.fritteli.uhr.register("nl",l)}(jQuery),function(a){"use strict";var b={1:[1]},c={1:[2,3,4]},d={7:[8]},e={10:[5]},f={7:[7,8,9,10,11]},g={8:[8,9,10,11]},h={10:[7,8,9,10,11]},i={10:[1,2,3]},j={9:[1,2,4,5,6,7,8,9]},k={8:[1,2,3,4,5]},l={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[d,h],"10,11,12,13,14":[d,i],"15,16,17,18,19":[d,j],"20,21,22,23,24":[d,k],"25,26,27,28,29":[d,k,e,h],"30,31,32,33,34":[d,g],"35,36,37,38,39":[f,k,e,h],"40,41,42,43,44":[f,k],"45,46,47,48,49":[f,j],"50,51,52,53,54":[f,i],"55,56,57,58,59":[f,h]},hours:{0:[b,{6:[2,3,4,5,7,8,9,10,11]}],12:[b,{2:[1,2,3,4,6,7,8]}],"1,13":[b,{1:[5,6,7]}],"2,14":[c,{3:[1,2,3,4]}],"3,15":[c,{1:[8,9,10,11]}],"4,16":[c,{4:[1,2,3,4,5,6]}],"5,17":[c,{5:[1,2,3,4,5]}],"6,18":[c,{3:[4,5,6,7]}],"7,19":[c,{3:[7,8,9,10]}],"8,20":[c,{5:[5,6,7,8]}],"9,21":[c,{4:[8,9,10,11]}],"10,22":[c,{2:[9,10,11]}],"11,23":[c,{5:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("pt",l)}(jQuery); \ No newline at end of file diff --git a/dist/jquery.uhr.complete.js b/dist/jquery.uhr.complete.js index a5796c3..ab43c0a 100644 --- a/dist/jquery.uhr.complete.js +++ b/dist/jquery.uhr.complete.js @@ -1,17 +1,17 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -(function($) { +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ +(function ($) { 'use strict'; var uhrGlobals = { "id": 0, "languages": [], "themes": [], registerLanguage: function registerLanguage(code, language) { - var alreadyExists = uhrGlobals.languages.some(function(element) { + var alreadyExists = uhrGlobals.languages.some(function (element) { if (code === element.code) { console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language + - "' because it is already registered for language '" + element.language + "'!"); + "' because it is already registered for language '" + element.language + "'!"); return true; } return false; @@ -24,7 +24,7 @@ }; // auto-detect themes - $('link[rel=stylesheet]').each(function(index, item) { + $('link[rel=stylesheet]').each(function (index, item) { var styleSheet = $(item); var styleClass = styleSheet.attr('data-class'); if (styleClass !== undefined) { @@ -41,9 +41,12 @@ } // public interface methods (exported later) + var setCookie; + var isOn; + var update; var start = function start() { if (!isOn.bind(this)()) { - this.timer = window.setInterval(function() { + this.timer = window.setInterval(function () { this.options.time = new Date(); update.bind(this)(); }.bind(this), 1000); @@ -66,436 +69,25 @@ this.start(); } }; - var setLanguage = function setLanguage(languageKey) { - if (languageKey !== this.options.language) { - this.options.language = languageKey; - var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); - renderer.render.bind(this)(function() { - this.currentMinute = -1; - update.bind(this)(); - }.bind(this)); - setCookie.bind(this)('uhr-language', languageKey); - update.bind(this)(); - } - }; - var setTheme = function setTheme(theme) { - if (theme !== this.options.theme) { - this.element.removeClass(this.options.theme).addClass(theme); - $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); - this.options.theme = theme; - setCookie.bind(this)('uhr-theme', theme); - } - }; - var setTime = function setTime(time) { - this.currentMinute = -1; - if (time === null) { - this.options.time = new Date(); - } else { - if (this.timer !== null) { - window.clearInterval(this.timer); - } - this.options.time = time; - } - update.bind(this)(); - }; - var setMode = function(mode) { - this.options.mode = mode; - this.currentMinute = -1; - update.bind(this)(); - setCookie.bind(this)('uhr-mode', mode); - }; - var setWidth = function setWidth(width) { - var e = this.element; - e.css('width', width); - var realWidth = e.width(); - e.width(realWidth); - e.height(realWidth); - e.css('font-size', (realWidth / 40) + 'px'); - }; + var language; - // private interface methods - var create = function create() { - this.id = uhrGlobals.id++; - this.timer = null; - this.currentMinute = -1; - var userTime = this.options.time; - var hash, params; - if (this.options.time === undefined) { - this.options.time = new Date(); - } - // parse the URL params - hash = window.location.hash; - if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { - hash = hash.substring(1); - hash = decodeURIComponent(hash); - params = hash.split('&'); - params.forEach(function (element) { - var pair = element.split('='); - var key = pair[0]; - var value = pair[1]; - switch (key) { - case 'l': - case 'language': - this.options.language = value; - this.options.force = true; - break; - case 't': - case 'theme': - this.options.theme = value; - this.options.force = true; - break; - case 'm': - case 'mode': - this.options.mode = value; - this.options.force = true; - break; - case 's': - case 'status': - this.options.status = value; - this.options.force = true; - break; - } - }.bind(this)); - } - // end parse the URL params - setupHTML.bind(this)(); - wireFunctionality.bind(this)(); - if (userTime !== undefined) { - this.time(userTime); - } - }; - // private helper methods (not exported) - var toggleConfigScreen = function toggleConfigScreen() { - $('#uhr-controlpanel' + this.id).toggle('fast'); - }; - // set up - var setupHTML = function setupHTML() { - var e = this.element; - // Base clock area - e.addClass('uhr'); - e.empty(); - e.append('<span class="item dot dot1"></span>'); - e.append('<span class="item dot dot2"></span>'); - e.append('<span class="item dot dot3"></span>'); - e.append('<span class="item dot dot4"></span>'); - e.append('<div class="letterarea"></div>'); - e.append('<div class="reflection"></div>'); - setWidth.bind(this)(this.options.width); - - if (this.options.controls) { - var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); - var content = $('<div class="content"></div>'); - controlpanel.append(content); - // on/off switch - var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); - toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + - '" checked="checked" />'); - toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + - '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); - content.append(toggleSwitch); - - // time mode switch - var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); - modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + - '" checked="checked" />'); - modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + - '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + - '</label>'); - content.append(modeSwitch); - // language chooser - if (uhrGlobals.languages.length > 1) { - var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); - uhrGlobals.languages.forEach(function(item) { - languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); - }); - content.append(languageChooser); - } - - // theme chooser - if (uhrGlobals.themes.length > 1) { - var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); - uhrGlobals.themes.forEach(function(item) { - themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); - }); - content.append(themeChooser); - } - var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); - closebutton.on('click', function() { - $('#uhr-controlpanel' + this.id).hide('fast'); - }.bind(this)); - content.append(closebutton); - e.after(controlpanel); - controlpanel.hide(); - var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); - configlink.on('click', function() { - toggleConfigScreen.bind(this)(); - }.bind(this)); - e.after(configlink); - } - }; - var wireFunctionality = function wireFunctionality() { - // on/off switch - var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); - toggleSwitch.on('click', function() { - this.toggle(); - }.bind(this)); - var status = $.cookie('uhr-status' + this.id); - if (status === undefined || this.options.force) { - status = this.options.status; - } - toggleSwitch.prop('checked', status === 'on'); - if (status === 'on') { - this.start(); - } else { - this.stop(); - } - - // time mode switch - var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); - modeSwitch.on('click', function() { - if (this.options.mode === 'seconds') { - setMode.bind(this)('normal'); - } else { - setMode.bind(this)('seconds'); - } - }.bind(this)); - - var mode = $.cookie('uhr-mode' + this.id); - if (mode === undefined || this.options.force) { - mode = this.options.mode; - } - modeSwitch.prop('checked', mode !== 'seconds'); - if (mode === 'seconds') { - setMode.bind(this)('seconds'); - } else { - setMode.bind(this)('normal'); - } - - // language chooser - var languageChooser = $('#uhr-languagechooser' + this.id); - languageChooser.on('change', function() { - var languageKey = $('#uhr-languagechooser' + this.id).val(); - this.language(languageKey); - }.bind(this)); - var selectedLanguage = $.cookie('uhr-language' + this.id); - if (selectedLanguage === undefined || this.options.force) { - selectedLanguage = this.options.language; - } - var found = uhrGlobals.languages.some(function(item) { - return selectedLanguage === item.code; - }); - if (!found) { - var fallbackLanguage; - if (uhrGlobals.languages.length > 0) { - fallbackLanguage = uhrGlobals.languages[0].code; - } else { - fallbackLanguage = ''; - } - console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); - selectedLanguage = fallbackLanguage; - } - languageChooser.val(selectedLanguage); - this.options.language = ""; - this.language(selectedLanguage); - - // theme chooser - var themeChooser = $('#uhr-themechooser' + this.id); - themeChooser.on('change', function() { - var themeKey = $('#uhr-themechooser' + this.id).val(); - this.theme(themeKey); - }.bind(this)); - var selectedTheme = $.cookie('uhr-theme' + this.id); - if (selectedTheme === undefined || this.options.force) { - selectedTheme = this.options.theme; - } - found = uhrGlobals.themes.some(function(item) { - return selectedTheme === item.styleClass; - }); - if (!found) { - var fallbackTheme = uhrGlobals.themes[0].styleClass; - console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); - selectedTheme = fallbackTheme; - } - themeChooser.val(selectedTheme); - this.options.theme = ""; - this.theme(selectedTheme); - if (this.options.autoresize) { - $(window).on('resize', function() { - var $e = this.element; - var $parent = $e.parent(); - var $window = $(window); - var parentWidth = $parent.width(); - var parentHeight = $parent.height(); - var windowWidth = $window.width(); - var windowHeight = $window.height(); - var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; - setWidth.bind(this)(size); - }.bind(this)); - } - }; - var destroy = function destroy() { - this.timer = null; - $(this.element) - .removeAttr('style') - .removeAttr('class') - .empty(); - $('#uhr-configlink' + this.id).remove(); - $('#uhr-controlpanel' + this.id).remove(); - - }; - var setCookie = function setCookie(cookieName, cookieValue) { - var options = {}; - if (this.options.cookiePath !== undefined) { - options = {expires: 365, path: this.options.cookiePath}; - } else { - options = {expires: 365}; - } - $.cookie(cookieName + this.id, cookieValue, options); - }; - - // business logic - var isOn = function isOn() { - return this.timer !== null; - }; - var update = function update() { - if (isOn.bind(this)()) { - var time = this.options.time; - if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { - if (time.getMinutes() === this.currentMinute) { - return; - } - this.currentMinute = time.getMinutes(); - } - show.bind(this)(time); - } else { - clear.bind(this)(); - this.currentMinute = -1; - } - }; - var show = function show(time) { - var second = getSecond.bind(this)(time); - var dotMinute = getDotMinute.bind(this)(time); - var hour = getHour.bind(this)(time); - var coarseMinute = getCoarseMinute.bind(this)(time); - clear.bind(this)(); - if (this.options.mode === 'seconds') { - highlight.bind(this)('second' + second); - } else { - highlight.bind(this)('on'); - for (var i = 1; i <= dotMinute; i++) { - highlight.bind(this)('dot' + i); - } - highlight.bind(this)('minute' + coarseMinute); - highlight.bind(this)('hour' + hour); - } - }; - var highlight = function highlight(itemClass) { - this.element.find('.item.' + itemClass).addClass('active'); - }; - var clear = function clear() { - this.element.find('.item').removeClass('active'); - }; - var getSecond = function getSecond(date) { - if (typeof language.bind(this)().getSeconds === 'function') { - return language.bind(this)().getSeconds(date); - } - return date.getSeconds(); - }; - var getDotMinute = function getDotMinute(date) { - if (typeof language.bind(this)().getDotMinute === 'function') { - return language.bind(this)().getDotMinute(date); - } - var minutes = date.getMinutes(); - return minutes % 5; - }; - var getCoarseMinute = function getCoarseMinute(date) { - if (typeof language.bind(this)().getCoarseMinute === 'function') { - return language.bind(this)().getCoarseMinute(date); - } - return date.getMinutes(); - }; - var getHour = function getHour(date) { - if (typeof language.bind(this)().getHour === 'function') { - return language.bind(this)().getHour(date); - } - var hour = date.getHours(); - if (date.getMinutes() >= 25) { - return (hour + 1) % 24; - } - return hour; - }; - var language = function language() { - var matchingLanguages = uhrGlobals.languages.filter(function(element) { - return (element.code === this.options.language); - }, this); - if (matchingLanguages.length > 0) { - return matchingLanguages[0]; - } - // fallback: return empty object - return {}; - }; - - $.widget("fritteli.uhr", { - "options": { - width: '100%', - status: 'on', - language: 'de_CH', - theme: uhrGlobals.themes[0].styleClass, - force: false, - controls: true, - cookiePath: undefined, - autoresize: true, - mode: 'normal' - }, - "start": start, - "stop": stop, - "toggle": toggle, - "language": setLanguage, - "theme": setTheme, - "time": setTime, - "mode": setMode, - "width": setWidth, - // constructor method - "_create": create, - // destructor method - "_destroy": destroy - }); - $.fritteli.uhr.register = uhrGlobals.registerLanguage; /** - * Hilfsklasse zum Rendern der Uhr. - * @param layout Layout-Objekt, das gerendert werden soll. - * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. + * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. + * @param value Der Buchstabe, der Dargestellt werden soll. + * @param style Die CSS-Styleklassen des Buchstabens. */ - function UhrRenderer(layout, renderarea) { - this.render = function render(beforeshow) { - if (layout.parsed === undefined) { - switch (layout.version) { - case 2: - var delegate = new UhrRendererV2Delegate(layout); - var parsedLayout = delegate.parse(); - Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false}); - break; - default: - console.warn("Unknown layout version: '" + layout.version + "'"); - return; - } + function Letter(value, style) { + var myValue = value; + var myStyle = style || ''; + this.addStyle = function (style) { + if (myStyle === '') { + myStyle = style; + } else { + myStyle += ' ' + style; } - var letters = layout.parsed; - renderarea.fadeOut('fast', function() { - renderarea.empty(); - letters.forEach(function(line, index, array) { - line.forEach(function(letter) { - renderarea.append(letter.toString()); - }); - if (index < array.length - 1) { - renderarea.append('<br/>'); - } - }); - if (typeof beforeshow === 'function') { - beforeshow(); - } - renderarea.fadeIn('fast'); - }); + }; + this.toString = function () { + return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; }; } @@ -644,7 +236,7 @@ 8: [10], 9: [8, 9] }; - var seconds= { + var seconds = { "0": [vorne0, hinten0], "1": [vorne0, hinten1], "2": [vorne0, hinten2], @@ -707,10 +299,21 @@ "59": [vorne5, hinten9] }; + function parseObject(letters, styleClass, object) { + if (typeof object !== 'undefined' && object !== null) { + Object.keys(object).forEach(function (y) { + var highlightLetters = object[y]; + highlightLetters.forEach(function (x) { + letters[y - 1][x - 1].addStyle(styleClass); + }); + }); + } + } + function parseArrayOrObject(letters, styleClass, input) { if (typeof input !== 'undefined' && input !== null) { if (Array.isArray(input)) { - input.forEach(function(item) { + input.forEach(function (item) { parseObject(letters, styleClass, item); }); } else { @@ -719,23 +322,12 @@ } } - function parseObject(letters, styleClass, object) { - if (typeof object !== 'undefined' && object !== null) { - Object.keys(object).forEach(function(y) { - var highlightLetters = object[y]; - highlightLetters.forEach(function(x) { - letters[y - 1][x - 1].addStyle(styleClass); - }); - }); - } - } - function parseTimeDefinition(letters, styleClass, definition) { if (typeof definition !== 'undefined' && definition !== null) { - Object.keys(definition).forEach(function(listString) { + Object.keys(definition).forEach(function (listString) { var array = listString.split(','); var highlightLetters = definition[listString]; - array.forEach(function(item) { + array.forEach(function (item) { parseArrayOrObject(letters, styleClass + item, highlightLetters); }); }); @@ -744,7 +336,7 @@ this.parse = function parse() { var letters = []; - layout.letters.forEach(function(string) { + layout.letters.forEach(function (string) { var line = []; for (var c = 0; c < string.length; c++) { var character = new Letter(string[c]); @@ -765,85 +357,510 @@ } /** - * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. - * @param value Der Buchstabe, der Dargestellt werden soll. - * @param style Die CSS-Styleklassen des Buchstabens. + * Hilfsklasse zum Rendern der Uhr. + * @param layout Layout-Objekt, das gerendert werden soll. + * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. */ - function Letter(value, style) { - var myValue = value; - var myStyle = style || ''; - this.addStyle = function(style) { - if (myStyle === '') { - myStyle = style; - } else { - myStyle += ' ' + style; + function UhrRenderer(layout, renderarea) { + this.render = function render(beforeshow) { + if (layout.parsed === undefined) { + switch (layout.version) { + case 2: + var delegate = new UhrRendererV2Delegate(layout); + var parsedLayout = delegate.parse(); + Object.defineProperty(layout, "parsed", { + "value": parsedLayout, + "writable": false, + "configurable": false + }); + break; + default: + console.warn("Unknown layout version: '" + layout.version + "'"); + return; + } } - }; - this.toString = function() { - return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; + var letters = layout.parsed; + renderarea.fadeOut('fast', function () { + renderarea.empty(); + letters.forEach(function (line, index, array) { + line.forEach(function (letter) { + renderarea.append(letter.toString()); + }); + if (index < array.length - 1) { + renderarea.append('<br/>'); + } + }); + if (typeof beforeshow === 'function') { + beforeshow(); + } + renderarea.fadeIn('fast'); + }); }; } + + var setLanguage = function setLanguage(languageKey) { + if (languageKey !== this.options.language) { + this.options.language = languageKey; + var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); + renderer.render.bind(this)(function () { + this.currentMinute = -1; + update.bind(this)(); + }.bind(this)); + setCookie.bind(this)('uhr-language', languageKey); + update.bind(this)(); + } + }; + var setTheme = function setTheme(theme) { + if (theme !== this.options.theme) { + this.element.removeClass(this.options.theme).addClass(theme); + $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); + this.options.theme = theme; + setCookie.bind(this)('uhr-theme', theme); + } + }; + var setTime = function setTime(time) { + this.currentMinute = -1; + if (time === null) { + this.options.time = new Date(); + } else { + if (this.timer !== null) { + window.clearInterval(this.timer); + } + this.options.time = time; + } + update.bind(this)(); + }; + var setMode = function (mode) { + this.options.mode = mode; + this.currentMinute = -1; + update.bind(this)(); + setCookie.bind(this)('uhr-mode', mode); + }; + var setWidth = function setWidth(width) { + var e = this.element; + e.css('width', width); + var realWidth = e.width(); + e.width(realWidth); + e.height(realWidth); + e.css('font-size', (realWidth / 40) + 'px'); + }; + + // private interface methods + var setupHTML; + var wireFunctionality; + var create = function create() { + this.id = uhrGlobals.id++; + this.timer = null; + this.currentMinute = -1; + var userTime = this.options.time; + var hash, params; + if (this.options.time === undefined) { + this.options.time = new Date(); + } + // parse the URL params + hash = window.location.hash; + if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { + hash = hash.substring(1); + hash = decodeURIComponent(hash); + params = hash.split('&'); + params.forEach(function (element) { + var pair = element.split('='); + var key = pair[0]; + var value = pair[1]; + switch (key) { + case 'l': + case 'language': + this.options.language = value; + this.options.force = true; + break; + case 't': + case 'theme': + this.options.theme = value; + this.options.force = true; + break; + case 'm': + case 'mode': + this.options.mode = value; + this.options.force = true; + break; + case 's': + case 'status': + this.options.status = value; + this.options.force = true; + break; + } + }.bind(this)); + } + // end parse the URL params + setupHTML.bind(this)(); + wireFunctionality.bind(this)(); + if (userTime !== undefined) { + this.time(userTime); + } + }; + // private helper methods (not exported) + var toggleConfigScreen = function toggleConfigScreen() { + $('#uhr-controlpanel' + this.id).toggle('fast'); + }; + // set up + setupHTML = function setupHTML() { + var e = this.element; + // Base clock area + e.addClass('uhr'); + e.empty(); + e.append('<span class="item dot dot1"></span>'); + e.append('<span class="item dot dot2"></span>'); + e.append('<span class="item dot dot3"></span>'); + e.append('<span class="item dot dot4"></span>'); + e.append('<div class="letterarea"></div>'); + e.append('<div class="reflection"></div>'); + setWidth.bind(this)(this.options.width); + + if (this.options.controls) { + var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); + var content = $('<div class="content"></div>'); + controlpanel.append(content); + // on/off switch + var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); + toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + + '" checked="checked" />'); + toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + + '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); + content.append(toggleSwitch); + + // time mode switch + var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); + modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + + '" checked="checked" />'); + modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + + '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + + '</label>'); + content.append(modeSwitch); + // language chooser + if (uhrGlobals.languages.length > 1) { + var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); + uhrGlobals.languages.forEach(function (item) { + languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); + }); + content.append(languageChooser); + } + + // theme chooser + if (uhrGlobals.themes.length > 1) { + var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); + uhrGlobals.themes.forEach(function (item) { + themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); + }); + content.append(themeChooser); + } + var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); + closebutton.on('click', function () { + $('#uhr-controlpanel' + this.id).hide('fast'); + }.bind(this)); + content.append(closebutton); + e.after(controlpanel); + controlpanel.hide(); + var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); + configlink.on('click', function () { + toggleConfigScreen.bind(this)(); + }.bind(this)); + e.after(configlink); + } + }; + wireFunctionality = function wireFunctionality() { + // on/off switch + var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); + toggleSwitch.on('click', function () { + this.toggle(); + }.bind(this)); + var status = $.cookie('uhr-status' + this.id); + if (status === undefined || this.options.force) { + status = this.options.status; + } + toggleSwitch.prop('checked', status === 'on'); + if (status === 'on') { + this.start(); + } else { + this.stop(); + } + + // time mode switch + var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); + modeSwitch.on('click', function () { + if (this.options.mode === 'seconds') { + setMode.bind(this)('normal'); + } else { + setMode.bind(this)('seconds'); + } + }.bind(this)); + + var mode = $.cookie('uhr-mode' + this.id); + if (mode === undefined || this.options.force) { + mode = this.options.mode; + } + modeSwitch.prop('checked', mode !== 'seconds'); + if (mode === 'seconds') { + setMode.bind(this)('seconds'); + } else { + setMode.bind(this)('normal'); + } + + // language chooser + var languageChooser = $('#uhr-languagechooser' + this.id); + languageChooser.on('change', function () { + var languageKey = $('#uhr-languagechooser' + this.id).val(); + this.language(languageKey); + }.bind(this)); + var selectedLanguage = $.cookie('uhr-language' + this.id); + if (selectedLanguage === undefined || this.options.force) { + selectedLanguage = this.options.language; + } + var found = uhrGlobals.languages.some(function (item) { + return selectedLanguage === item.code; + }); + if (!found) { + var fallbackLanguage; + if (uhrGlobals.languages.length > 0) { + fallbackLanguage = uhrGlobals.languages[0].code; + } else { + fallbackLanguage = ''; + } + console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); + selectedLanguage = fallbackLanguage; + } + languageChooser.val(selectedLanguage); + this.options.language = ""; + this.language(selectedLanguage); + + // theme chooser + var themeChooser = $('#uhr-themechooser' + this.id); + themeChooser.on('change', function () { + var themeKey = $('#uhr-themechooser' + this.id).val(); + this.theme(themeKey); + }.bind(this)); + var selectedTheme = $.cookie('uhr-theme' + this.id); + if (selectedTheme === undefined || this.options.force) { + selectedTheme = this.options.theme; + } + found = uhrGlobals.themes.some(function (item) { + return selectedTheme === item.styleClass; + }); + if (!found) { + var fallbackTheme = uhrGlobals.themes[0].styleClass; + console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); + selectedTheme = fallbackTheme; + } + themeChooser.val(selectedTheme); + this.options.theme = ""; + this.theme(selectedTheme); + if (this.options.autoresize) { + $(window).on('resize', function () { + var $e = this.element; + var $parent = $e.parent(); + var $window = $(window); + var parentWidth = $parent.width(); + var parentHeight = $parent.height(); + var windowWidth = $window.width(); + var windowHeight = $window.height(); + var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; + setWidth.bind(this)(size); + }.bind(this)); + } + }; + var destroy = function destroy() { + this.timer = null; + $(this.element) + .removeAttr('style') + .removeAttr('class') + .empty(); + $('#uhr-configlink' + this.id).remove(); + $('#uhr-controlpanel' + this.id).remove(); + + }; + setCookie = function setCookie(cookieName, cookieValue) { + var options = {}; + if (this.options.cookiePath !== undefined) { + options = {expires: 365, path: this.options.cookiePath}; + } else { + options = {expires: 365}; + } + $.cookie(cookieName + this.id, cookieValue, options); + }; + + // business logic + isOn = function isOn() { + return this.timer !== null; + }; + var show; + var clear; + update = function update() { + if (isOn.bind(this)()) { + var time = this.options.time; + if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { + if (time.getMinutes() === this.currentMinute) { + return; + } + this.currentMinute = time.getMinutes(); + } + show.bind(this)(time); + } else { + clear.bind(this)(); + this.currentMinute = -1; + } + }; + var highlight; + var getSecond; + var getDotMinute; + var getCoarseMinute; + var getHour; + show = function show(time) { + var second = getSecond.bind(this)(time); + var dotMinute = getDotMinute.bind(this)(time); + var hour = getHour.bind(this)(time); + var coarseMinute = getCoarseMinute.bind(this)(time); + clear.bind(this)(); + if (this.options.mode === 'seconds') { + highlight.bind(this)('second' + second); + } else { + highlight.bind(this)('on'); + for (var i = 1; i <= dotMinute; i++) { + highlight.bind(this)('dot' + i); + } + highlight.bind(this)('minute' + coarseMinute); + highlight.bind(this)('hour' + hour); + } + }; + highlight = function highlight(itemClass) { + this.element.find('.item.' + itemClass).addClass('active'); + }; + clear = function clear() { + this.element.find('.item').removeClass('active'); + }; + getSecond = function getSecond(date) { + if (typeof language.bind(this)().getSeconds === 'function') { + return language.bind(this)().getSeconds(date); + } + return date.getSeconds(); + }; + getDotMinute = function getDotMinute(date) { + if (typeof language.bind(this)().getDotMinute === 'function') { + return language.bind(this)().getDotMinute(date); + } + var minutes = date.getMinutes(); + return minutes % 5; + }; + getCoarseMinute = function getCoarseMinute(date) { + if (typeof language.bind(this)().getCoarseMinute === 'function') { + return language.bind(this)().getCoarseMinute(date); + } + return date.getMinutes(); + }; + getHour = function getHour(date) { + if (typeof language.bind(this)().getHour === 'function') { + return language.bind(this)().getHour(date); + } + var hour = date.getHours(); + if (date.getMinutes() >= 25) { + return (hour + 1) % 24; + } + return hour; + }; + language = function language() { + var matchingLanguages = uhrGlobals.languages.filter(function (element) { + return (element.code === this.options.language); + }, this); + if (matchingLanguages.length > 0) { + return matchingLanguages[0]; + } + // fallback: return empty object + return {}; + }; + + $.widget("fritteli.uhr", { + "options": { + width: '100%', + status: 'on', + language: 'de_CH', + theme: uhrGlobals.themes[0].styleClass, + force: false, + controls: true, + cookiePath: undefined, + autoresize: true, + mode: 'normal' + }, + "start": start, + "stop": stop, + "toggle": toggle, + "language": setLanguage, + "theme": setTheme, + "time": setTime, + "mode": setMode, + "width": setWidth, + // constructor method + "_create": create, + // destructor method + "_destroy": destroy + }); + $.fritteli.uhr.register = uhrGlobals.registerLanguage; })(jQuery); (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); (function($) { 'use strict'; @@ -930,61 +947,63 @@ }(jQuery)); (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.complete.min.js b/dist/jquery.uhr.complete.min.js deleted file mode 100644 index e8b059f..0000000 --- a/dist/jquery.uhr.complete.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a){"use strict";function b(a,b){this.render=function(d){if(void 0===a.parsed)switch(a.version){case 2:var e=new c(a),f=e.parse();Object.defineProperty(a,"parsed",{value:f,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+a.version+"'")}var g=a.parsed;b.fadeOut("fast",function(){b.empty(),g.forEach(function(a,c,d){a.forEach(function(a){b.append(a.toString())}),c<d.length-1&&b.append("<br/>")}),"function"==typeof d&&d(),b.fadeIn("fast")})}}function c(a){function b(a,b,d){"undefined"!=typeof d&&null!==d&&(Array.isArray(d)?d.forEach(function(d){c(a,b,d)}):c(a,b,d))}function c(a,b,c){"undefined"!=typeof c&&null!==c&&Object.keys(c).forEach(function(d){var e=c[d];e.forEach(function(c){a[d-1][c-1].addStyle(b)})})}function e(a,c,d){"undefined"!=typeof d&&null!==d&&Object.keys(d).forEach(function(e){var f=e.split(","),g=d[e];f.forEach(function(d){b(a,c+d,g)})})}var f={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},g={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},h={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},i={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},j={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},k={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},l={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},m={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},n={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},o={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},p={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},q={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},r={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},s={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},t={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},u={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[f,g],1:[f,i],2:[f,k],3:[f,m],4:[f,o],5:[f,q],6:[f,r],7:[f,s],8:[f,t],9:[f,u],10:[h,g],11:[h,i],12:[h,k],13:[h,m],14:[h,o],15:[h,q],16:[h,r],17:[h,s],18:[h,t],19:[h,u],20:[j,g],21:[j,i],22:[j,k],23:[j,m],24:[j,o],25:[j,q],26:[j,r],27:[j,s],28:[j,t],29:[j,u],30:[l,g],31:[l,i],32:[l,k],33:[l,m],34:[l,o],35:[l,q],36:[l,r],37:[l,s],38:[l,t],39:[l,u],40:[n,g],41:[n,i],42:[n,k],43:[n,m],44:[n,o],45:[n,q],46:[n,r],47:[n,s],48:[n,t],49:[n,u],50:[p,g],51:[p,i],52:[p,k],53:[p,m],54:[p,o],55:[p,q],56:[p,r],57:[p,s],58:[p,t],59:[p,u]};this.parse=function(){var c=[];return a.letters.forEach(function(a){for(var b=[],e=0;e<a.length;e++){var f=new d(a[e]);b.push(f)}c.push(b)}),b(c,"on",a.permanent),"undefined"!=typeof a.seconds&&null!==a.seconds?e(c,"second",a.seconds):e(c,"second",v),e(c,"minute",a.minutes),e(c,"hour",a.hours),c}}function d(a,b){var c=a,d=b||"";this.addStyle=function(a){""===d?d=a:d+=" "+a},this.toString=function(){return'<span class="item letter '+d+'">'+c+"</span>"}}var e={id:0,languages:[],themes:[],registerLanguage:function(a,b){var c=e.languages.some(function(c){return a===c.code&&(console.error("Error: Language code '"+a+"' cannot be registered for language '"+b.language+"' because it is already registered for language '"+c.language+"'!"),!0)});c||(b.code=a,e.languages.push(b))}};a("link[rel=stylesheet]").each(function(b,c){var d=a(c),f=d.attr("data-class");if(void 0!==f){var g=d.attr("data-name");void 0===g&&(g=f),e.themes.push({styleClass:f,name:g})}}),0===e.themes.length&&e.themes.push({});var f=function(){t.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,u.bind(this)()}.bind(this),1e3),u.bind(this)(),s.bind(this)("uhr-status","on"))},g=function(){t.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,u.bind(this)(),s.bind(this)("uhr-status","off"))},h=function(){t.bind(this)()?this.stop():this.start()},i=function(a){if(a!==this.options.language){this.options.language=a;var c=new b(C.bind(this)(),this.element.find(".letterarea"));c.render.bind(this)(function(){this.currentMinute=-1,u.bind(this)()}.bind(this)),s.bind(this)("uhr-language",a),u.bind(this)()}},j=function(b){b!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(b),a("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(b),this.options.theme=b,s.bind(this)("uhr-theme",b))},k=function(a){this.currentMinute=-1,null===a?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=a),u.bind(this)()},l=function(a){this.options.mode=a,this.currentMinute=-1,u.bind(this)(),s.bind(this)("uhr-mode",a)},m=function(a){var b=this.element;b.css("width",a);var c=b.width();b.width(c),b.height(c),b.css("font-size",c/40+"px")},n=function(){this.id=e.id++,this.timer=null,this.currentMinute=-1;var a,b,c=this.options.time;void 0===this.options.time&&(this.options.time=new Date),a=window.location.hash,void 0!==a&&"string"==typeof a&&"#"===a.charAt(0)&&(a=a.substring(1),a=decodeURIComponent(a),b=a.split("&"),b.forEach(function(a){var b=a.split("="),c=b[0],d=b[1];switch(c){case"l":case"language":this.options.language=d,this.options.force=!0;break;case"t":case"theme":this.options.theme=d,this.options.force=!0;break;case"m":case"mode":this.options.mode=d,this.options.force=!0;break;case"s":case"status":this.options.status=d,this.options.force=!0}}.bind(this))),p.bind(this)(),q.bind(this)(),void 0!==c&&this.time(c)},o=function(){a("#uhr-controlpanel"+this.id).toggle("fast")},p=function(){var b=this.element;if(b.addClass("uhr"),b.empty(),b.append('<span class="item dot dot1"></span>'),b.append('<span class="item dot dot2"></span>'),b.append('<span class="item dot dot3"></span>'),b.append('<span class="item dot dot4"></span>'),b.append('<div class="letterarea"></div>'),b.append('<div class="reflection"></div>'),m.bind(this)(this.options.width),this.options.controls){var c=a('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),d=a('<div class="content"></div>');c.append(d);var f=a('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');f.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),f.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(f);var g=a('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(g.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),g.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(g),e.languages.length>1){var h=a('<select id="uhr-languagechooser'+this.id+'"></select>');e.languages.forEach(function(a){h.append('<option value="'+a.code+'">'+a.language+"</option>")}),d.append(h)}if(e.themes.length>1){var i=a('<select id="uhr-themechooser'+this.id+'"></select>');e.themes.forEach(function(a){i.append('<option value="'+a.styleClass+'">'+a.name+"</option>")}),d.append(i)}var j=a('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');j.on("click",function(){a("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),d.append(j),b.after(c),c.hide();var k=a('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');k.on("click",function(){o.bind(this)()}.bind(this)),b.after(k)}},q=function(){var b=a("#uhr-onoffswitch-checkbox"+this.id);b.on("click",function(){this.toggle()}.bind(this));var c=a.cookie("uhr-status"+this.id);(void 0===c||this.options.force)&&(c=this.options.status),b.prop("checked","on"===c),"on"===c?this.start():this.stop();var d=a("#uhr-modeswitch-checkbox"+this.id);d.on("click",function(){"seconds"===this.options.mode?l.bind(this)("normal"):l.bind(this)("seconds")}.bind(this));var f=a.cookie("uhr-mode"+this.id);(void 0===f||this.options.force)&&(f=this.options.mode),d.prop("checked","seconds"!==f),"seconds"===f?l.bind(this)("seconds"):l.bind(this)("normal");var g=a("#uhr-languagechooser"+this.id);g.on("change",function(){var b=a("#uhr-languagechooser"+this.id).val();this.language(b)}.bind(this));var h=a.cookie("uhr-language"+this.id);(void 0===h||this.options.force)&&(h=this.options.language);var i=e.languages.some(function(a){return h===a.code});if(!i){var j;j=e.languages.length>0?e.languages[0].code:"",console.warn("Language '"+h+"' not found! Using fallback '"+j+"'"),h=j}g.val(h),this.options.language="",this.language(h);var k=a("#uhr-themechooser"+this.id);k.on("change",function(){var b=a("#uhr-themechooser"+this.id).val();this.theme(b)}.bind(this));var n=a.cookie("uhr-theme"+this.id);if((void 0===n||this.options.force)&&(n=this.options.theme),i=e.themes.some(function(a){return n===a.styleClass}),!i){var o=e.themes[0].styleClass;console.warn("Theme '"+n+"' not found! Using fallback '"+o+"'"),n=o}k.val(n),this.options.theme="",this.theme(n),this.options.autoresize&&a(window).on("resize",function(){var b=this.element,c=b.parent(),d=a(window),e=c.width(),f=c.height(),g=d.width(),h=d.height(),i=Math.min(e,f,g,h)+"px";m.bind(this)(i)}.bind(this))},r=function(){this.timer=null,a(this.element).removeAttr("style").removeAttr("class").empty(),a("#uhr-configlink"+this.id).remove(),a("#uhr-controlpanel"+this.id).remove()},s=function(b,c){var d={};d=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},a.cookie(b+this.id,c,d)},t=function(){return null!==this.timer},u=function(){if(t.bind(this)()){var a=this.options.time;if(!C.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(a.getMinutes()===this.currentMinute)return;this.currentMinute=a.getMinutes()}v.bind(this)(a)}else x.bind(this)(),this.currentMinute=-1},v=function(a){var b=y.bind(this)(a),c=z.bind(this)(a),d=B.bind(this)(a),e=A.bind(this)(a);if(x.bind(this)(),"seconds"===this.options.mode)w.bind(this)("second"+b);else{w.bind(this)("on");for(var f=1;f<=c;f++)w.bind(this)("dot"+f);w.bind(this)("minute"+e),w.bind(this)("hour"+d)}},w=function(a){this.element.find(".item."+a).addClass("active")},x=function(){this.element.find(".item").removeClass("active")},y=function(a){return"function"==typeof C.bind(this)().getSeconds?C.bind(this)().getSeconds(a):a.getSeconds()},z=function(a){if("function"==typeof C.bind(this)().getDotMinute)return C.bind(this)().getDotMinute(a);var b=a.getMinutes();return b%5},A=function(a){return"function"==typeof C.bind(this)().getCoarseMinute?C.bind(this)().getCoarseMinute(a):a.getMinutes()},B=function(a){if("function"==typeof C.bind(this)().getHour)return C.bind(this)().getHour(a);var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b},C=function(){var a=e.languages.filter(function(a){return a.code===this.options.language},this);return a.length>0?a[0]:{}};a.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:e.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:f,stop:g,toggle:h,language:i,theme:j,time:k,mode:l,width:m,_create:n,_destroy:r}),a.fritteli.uhr.register=e.registerLanguage}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6]},c={10:[9,10,11]},d={4:[8,9,10,11]},e={4:[1,2,3]},f={5:[1,2,3,4]},g={1:[8,9,10,11]},h={2:[1,2,3,4]},i={3:[5,6,7,8,9,10,11]},j={2:[5,6,7,8,9,10,11]},k={3:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:b,minutes:{"0,1,2,3,4":c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":k,"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};a.fritteli.uhr.register("de",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={4:[1,2]},d={3:[9,10,11]},e={4:[4,5,6,7,8]},f={1:[9,10,11]},g={2:[9,10,11]},h={2:[1,2,3,4,5,6]},i={3:[1,2,3,4,5,6]},j={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{"5,6,7,8,9":[f,c],"10,11,12,13,14":[g,c],"15,16,17,18,19":[h,c],"20,21,22,23,24":[i,c],"25,26,27,28,29":[f,d,e],"30,31,32,33,34":e,"35,36,37,38,39":[f,c,e],"40,41,42,43,44":[i,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,d],"55,56,57,58,59":[f,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH",j)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={3:[7,8,9,10,11]},d={4:[4,5]},e={4:[1,2,3]},f={4:[7,8,9,10,11]},g={1:[9,10,11]},h={2:[9,10,11]},i={2:[1,2,3,4,5,6]},j={3:[1,2,3,4,5,6]},k={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{0:c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":[i,e],"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH_genau",k)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,5,6,7,9,10]},c={4:[4,5,6,7,8,9,10,11]},d={5:[8]},e={5:[4,5,6,7]},f={2:[1,2,3]},g={4:[1,2]},h={3:[4,5,6,7,8]},i={2:[4,5,6,7]},j={6:[8,9,10,11]},k={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:b,minutes:{"5,6,7,8,9":[f,c,e],"10,11,12,13,14":[g,c,e],"15,16,17,18,19":[h,e],"20,21,22,23,24":[i,c,e],"25,26,27,28,29":[f,c,d,j],"30,31,32,33,34":[j],"35,36,37,38,39":[f,c,e,j],"40,41,42,43,44":[i,c,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,c,d],"55,56,57,58,59":[f,c,d]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b}};a.fritteli.uhr.register("dk",k)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5]},c={4:[1,2,3,4]},d={4:[10,11]},e={5:[1,2,3,4]},f={10:[5,6,7,8,9,10,11]},g={3:[7,8,9,10]},h={4:[6,7,8]},i={2:[1,3,4,5,6,7,8,9]},j={3:[1,2,3,4,5,6]},k={3:[1,2,3,4,5,6,7,8,9,10]},l={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:b,minutes:{"0,1,2,3,4":f,"5,6,7,8,9":[g,e],"10,11,12,13,14":[h,e],"15,16,17,18,19":[i,e],"20,21,22,23,24":[j,e],"25,26,27,28,29":[k,e],"30,31,32,33,34":[c,e],"35,36,37,38,39":[k,d],"40,41,42,43,44":[j,d],"45,46,47,48,49":[i,d],"50,51,52,53,54":[h,d],"55,56,57,58,59":[g,d]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("en",l)}(jQuery),function(a){"use strict";var b={1:[1,2,6,7]},c={1:[2,3,4,6,7,8]},d={7:[6]},e={7:[7,8,9,10,11]},f={10:[1,2,3,4,5]},g={9:[7,8,9,10,11]},h={8:[8,9,10,11]},i={10:[6,7,8,9,10,11]},j={8:[2,3,4,5,6,7]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[c,{7:[1,2,3,4]}],"1,13":[b,{1:[9,10,11]}],"2,14":[c,{2:[1,2,3]}],"3,15":[c,{2:[5,6,7,8]}],"4,16":[c,{3:[1,2,3,4,5,6]}],"5,17":[c,{3:[7,8,9,10,11]}],"6,18":[c,{4:[1,2,3,4]}],"7,19":[c,{4:[6,7,8,9,10]}],"8,20":[c,{5:[1,2,3,4]}],"9,21":[c,{5:[5,6,7,8,9]}],"10,22":[c,{6:[3,4,5,6]}],"11,23":[c,{6:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("es",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6]},c={8:[1,2]},d={7:[1,2,3,4,5]},e={10:[4,5,6,7,8]},f={6:[6,7,8,9,10,11]},g={7:[7,8]},h={9:[7,8,9,10]},i={7:[9,10,11]},j={8:[4,5,6,7,8]},k={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},m={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:b,minutes:{"5,6,7,8,9":h,"10,11,12,13,14":i,"15,16,17,18,19":[c,j],"20,21,22,23,24":k,"25,26,27,28,29":l,"30,31,32,33,34":[c,e],"35,36,37,38,39":[d,l],"40,41,42,43,44":[d,k],"45,46,47,48,49":[d,g,j],"50,51,52,53,54":[d,i],"55,56,57,58,59":[d,h]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},f],"2,14":[{1:[8,9,10,11]},f],"3,15":[{2:[7,8,9,10,11]},f],"4,16":[{2:[1,2,3,4,5,6]},f],"5,17":[{4:[8,9,10,11]},f],"6,18":[{4:[5,6,7]},f],"7,19":[{3:[8,9,10,11]},f],"8,20":[{4:[1,2,3,4]},f],"9,21":[{3:[1,2,3,4]},f],"10,22":[{5:[3,4,5]},f],"11,23":[{6:[1,2,3,4]},f],12:{5:[1,2,3,4]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("fr",m)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,6,7]},c={2:[1,3,4]},d={8:[1]},e={7:[8,9,10,11]},f={10:[7,8,9,10,11]},g={9:[6,7,8,9,10,11]},h={10:[1,2,3,4,5]},i={8:[3,4,6,7,8,9,10,11]},j={9:[1,2,3,4,5]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[b,{5:[1,2,3,4,5,6]}],"1,13":[c,{2:[5,6,7]}],"2,14":[b,{2:[9,10,11]}],"3,15":[b,{3:[1,2,3]}],"4,16":[b,{6:[1,2,3,4,5,6,7]}],"5,17":[b,{7:[1,2,3,4,5,6]}],"6,18":[b,{6:[9,10,11]}],"7,19":[b,{5:[7,8,9,10,11]}],"8,20":[b,{3:[4,5,6,7]}],"9,21":[b,{3:[8,9,10,11]}],"10,22":[b,{4:[1,2,3,4,5]}],"11,23":[b,{4:[6,7,8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("it",l)}(jQuery),function(a){"use strict";var b={1:[1,2,3,5,6]},c={3:[1,2,3,4]},d={2:[8,9,10,11]},e={4:[8,9,10,11]},f={5:[1,2,3,4]},g={4:[1,2,3,4]},h={1:[8,9,10,11]},i={2:[1,2,3,4]},j={3:[7,8,9,10,11]},k={10:[9,10,11]},l={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:b,minutes:{"0,1,2,3,4":k,"5,6,7,8,9":[h,c],"10,11,12,13,14":[i,c],"15,16,17,18,19":[j,e],"20,21,22,23,24":[i,d,g],"25,26,27,28,29":[h,d,g],"30,31,32,33,34":g,"35,36,37,38,39":[h,c,g],"40,41,42,43,44":[i,c,g],"45,46,47,48,49":[j,f],"50,51,52,53,54":[i,d],"55,56,57,58,59":[h,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=20?(b+1)%24:b}};a.fritteli.uhr.register("nl",l)}(jQuery),function(a){"use strict";var b={1:[1]},c={1:[2,3,4]},d={7:[8]},e={10:[5]},f={7:[7,8,9,10,11]},g={8:[8,9,10,11]},h={10:[7,8,9,10,11]},i={10:[1,2,3]},j={9:[1,2,4,5,6,7,8,9]},k={8:[1,2,3,4,5]},l={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[d,h],"10,11,12,13,14":[d,i],"15,16,17,18,19":[d,j],"20,21,22,23,24":[d,k],"25,26,27,28,29":[d,k,e,h],"30,31,32,33,34":[d,g],"35,36,37,38,39":[f,k,e,h],"40,41,42,43,44":[f,k],"45,46,47,48,49":[f,j],"50,51,52,53,54":[f,i],"55,56,57,58,59":[f,h]},hours:{0:[b,{6:[2,3,4,5,7,8,9,10,11]}],12:[b,{2:[1,2,3,4,6,7,8]}],"1,13":[b,{1:[5,6,7]}],"2,14":[c,{3:[1,2,3,4]}],"3,15":[c,{1:[8,9,10,11]}],"4,16":[c,{4:[1,2,3,4,5,6]}],"5,17":[c,{5:[1,2,3,4,5]}],"6,18":[c,{3:[4,5,6,7]}],"7,19":[c,{3:[7,8,9,10]}],"8,20":[c,{5:[5,6,7,8]}],"9,21":[c,{4:[8,9,10,11]}],"10,22":[c,{2:[9,10,11]}],"11,23":[c,{5:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("pt",l)}(jQuery); \ No newline at end of file diff --git a/dist/jquery.uhr.langs.js b/dist/jquery.uhr.langs.js index a8ab4c2..cd791da 100644 --- a/dist/jquery.uhr.langs.js +++ b/dist/jquery.uhr.langs.js @@ -1,65 +1,63 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); (function($) { 'use strict'; @@ -146,61 +144,63 @@ }(jQuery)); (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.langs.min.js b/dist/jquery.uhr.langs.min.js deleted file mode 100644 index cad339c..0000000 --- a/dist/jquery.uhr.langs.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a){"use strict";var b={1:[1,2,4,5,6]},c={10:[9,10,11]},d={4:[8,9,10,11]},e={4:[1,2,3]},f={5:[1,2,3,4]},g={1:[8,9,10,11]},h={2:[1,2,3,4]},i={3:[5,6,7,8,9,10,11]},j={2:[5,6,7,8,9,10,11]},k={3:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:b,minutes:{"0,1,2,3,4":c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":k,"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};a.fritteli.uhr.register("de",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={4:[1,2]},d={3:[9,10,11]},e={4:[4,5,6,7,8]},f={1:[9,10,11]},g={2:[9,10,11]},h={2:[1,2,3,4,5,6]},i={3:[1,2,3,4,5,6]},j={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{"5,6,7,8,9":[f,c],"10,11,12,13,14":[g,c],"15,16,17,18,19":[h,c],"20,21,22,23,24":[i,c],"25,26,27,28,29":[f,d,e],"30,31,32,33,34":e,"35,36,37,38,39":[f,c,e],"40,41,42,43,44":[i,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,d],"55,56,57,58,59":[f,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH",j)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6,7]},c={3:[7,8,9,10,11]},d={4:[4,5]},e={4:[1,2,3]},f={4:[7,8,9,10,11]},g={1:[9,10,11]},h={2:[9,10,11]},i={2:[1,2,3,4,5,6]},j={3:[1,2,3,4,5,6]},k={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:b,minutes:{0:c,"5,6,7,8,9":[g,d],"10,11,12,13,14":[h,d],"15,16,17,18,19":[i,d],"20,21,22,23,24":[j,d],"25,26,27,28,29":[g,e,f],"30,31,32,33,34":f,"35,36,37,38,39":[g,d,f],"40,41,42,43,44":[j,e],"45,46,47,48,49":[i,e],"50,51,52,53,54":[h,e],"55,56,57,58,59":[g,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};a.fritteli.uhr.register("de_CH_genau",k)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,5,6,7,9,10]},c={4:[4,5,6,7,8,9,10,11]},d={5:[8]},e={5:[4,5,6,7]},f={2:[1,2,3]},g={4:[1,2]},h={3:[4,5,6,7,8]},i={2:[4,5,6,7]},j={6:[8,9,10,11]},k={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:b,minutes:{"5,6,7,8,9":[f,c,e],"10,11,12,13,14":[g,c,e],"15,16,17,18,19":[h,e],"20,21,22,23,24":[i,c,e],"25,26,27,28,29":[f,c,d,j],"30,31,32,33,34":[j],"35,36,37,38,39":[f,c,e,j],"40,41,42,43,44":[i,c,d],"45,46,47,48,49":[h,d],"50,51,52,53,54":[g,c,d],"55,56,57,58,59":[f,c,d]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b}};a.fritteli.uhr.register("dk",k)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5]},c={4:[1,2,3,4]},d={4:[10,11]},e={5:[1,2,3,4]},f={10:[5,6,7,8,9,10,11]},g={3:[7,8,9,10]},h={4:[6,7,8]},i={2:[1,3,4,5,6,7,8,9]},j={3:[1,2,3,4,5,6]},k={3:[1,2,3,4,5,6,7,8,9,10]},l={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:b,minutes:{"0,1,2,3,4":f,"5,6,7,8,9":[g,e],"10,11,12,13,14":[h,e],"15,16,17,18,19":[i,e],"20,21,22,23,24":[j,e],"25,26,27,28,29":[k,e],"30,31,32,33,34":[c,e],"35,36,37,38,39":[k,d],"40,41,42,43,44":[j,d],"45,46,47,48,49":[i,d],"50,51,52,53,54":[h,d],"55,56,57,58,59":[g,d]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("en",l)}(jQuery),function(a){"use strict";var b={1:[1,2,6,7]},c={1:[2,3,4,6,7,8]},d={7:[6]},e={7:[7,8,9,10,11]},f={10:[1,2,3,4,5]},g={9:[7,8,9,10,11]},h={8:[8,9,10,11]},i={10:[6,7,8,9,10,11]},j={8:[2,3,4,5,6,7]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[c,{7:[1,2,3,4]}],"1,13":[b,{1:[9,10,11]}],"2,14":[c,{2:[1,2,3]}],"3,15":[c,{2:[5,6,7,8]}],"4,16":[c,{3:[1,2,3,4,5,6]}],"5,17":[c,{3:[7,8,9,10,11]}],"6,18":[c,{4:[1,2,3,4]}],"7,19":[c,{4:[6,7,8,9,10]}],"8,20":[c,{5:[1,2,3,4]}],"9,21":[c,{5:[5,6,7,8,9]}],"10,22":[c,{6:[3,4,5,6]}],"11,23":[c,{6:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("es",l)}(jQuery),function(a){"use strict";var b={1:[1,2,4,5,6]},c={8:[1,2]},d={7:[1,2,3,4,5]},e={10:[4,5,6,7,8]},f={6:[6,7,8,9,10,11]},g={7:[7,8]},h={9:[7,8,9,10]},i={7:[9,10,11]},j={8:[4,5,6,7,8]},k={9:[1,2,3,4,5]},l={9:[1,2,3,4,5,6,7,8,9,10]},m={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:b,minutes:{"5,6,7,8,9":h,"10,11,12,13,14":i,"15,16,17,18,19":[c,j],"20,21,22,23,24":k,"25,26,27,28,29":l,"30,31,32,33,34":[c,e],"35,36,37,38,39":[d,l],"40,41,42,43,44":[d,k],"45,46,47,48,49":[d,g,j],"50,51,52,53,54":[d,i],"55,56,57,58,59":[d,h]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},f],"2,14":[{1:[8,9,10,11]},f],"3,15":[{2:[7,8,9,10,11]},f],"4,16":[{2:[1,2,3,4,5,6]},f],"5,17":[{4:[8,9,10,11]},f],"6,18":[{4:[5,6,7]},f],"7,19":[{3:[8,9,10,11]},f],"8,20":[{4:[1,2,3,4]},f],"9,21":[{3:[1,2,3,4]},f],"10,22":[{5:[3,4,5]},f],"11,23":[{6:[1,2,3,4]},f],12:{5:[1,2,3,4]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("fr",m)}(jQuery),function(a){"use strict";var b={1:[1,2,3,4,6,7]},c={2:[1,3,4]},d={8:[1]},e={7:[8,9,10,11]},f={10:[7,8,9,10,11]},g={9:[6,7,8,9,10,11]},h={10:[1,2,3,4,5]},i={8:[3,4,6,7,8,9,10,11]},j={9:[1,2,3,4,5]},k={9:[1,2,3,4,5,6,7,8,9,10,11]},l={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[d,g],"10,11,12,13,14":[d,h],"15,16,17,18,19":[d,i],"20,21,22,23,24":[d,j],"25,26,27,28,29":[d,k],"30,31,32,33,34":[d,f],"35,36,37,38,39":[e,k],"40,41,42,43,44":[e,j],"45,46,47,48,49":[e,i],"50,51,52,53,54":[e,h],"55,56,57,58,59":[e,g]},hours:{"0,12":[b,{5:[1,2,3,4,5,6]}],"1,13":[c,{2:[5,6,7]}],"2,14":[b,{2:[9,10,11]}],"3,15":[b,{3:[1,2,3]}],"4,16":[b,{6:[1,2,3,4,5,6,7]}],"5,17":[b,{7:[1,2,3,4,5,6]}],"6,18":[b,{6:[9,10,11]}],"7,19":[b,{5:[7,8,9,10,11]}],"8,20":[b,{3:[4,5,6,7]}],"9,21":[b,{3:[8,9,10,11]}],"10,22":[b,{4:[1,2,3,4,5]}],"11,23":[b,{4:[6,7,8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("it",l)}(jQuery),function(a){"use strict";var b={1:[1,2,3,5,6]},c={3:[1,2,3,4]},d={2:[8,9,10,11]},e={4:[8,9,10,11]},f={5:[1,2,3,4]},g={4:[1,2,3,4]},h={1:[8,9,10,11]},i={2:[1,2,3,4]},j={3:[7,8,9,10,11]},k={10:[9,10,11]},l={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:b,minutes:{"0,1,2,3,4":k,"5,6,7,8,9":[h,c],"10,11,12,13,14":[i,c],"15,16,17,18,19":[j,e],"20,21,22,23,24":[i,d,g],"25,26,27,28,29":[h,d,g],"30,31,32,33,34":g,"35,36,37,38,39":[h,c,g],"40,41,42,43,44":[i,c,g],"45,46,47,48,49":[j,f],"50,51,52,53,54":[i,d],"55,56,57,58,59":[h,d]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(a){var b=a.getHours();return a.getMinutes()>=20?(b+1)%24:b}};a.fritteli.uhr.register("nl",l)}(jQuery),function(a){"use strict";var b={1:[1]},c={1:[2,3,4]},d={7:[8]},e={10:[5]},f={7:[7,8,9,10,11]},g={8:[8,9,10,11]},h={10:[7,8,9,10,11]},i={10:[1,2,3]},j={9:[1,2,4,5,6,7,8,9]},k={8:[1,2,3,4,5]},l={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[d,h],"10,11,12,13,14":[d,i],"15,16,17,18,19":[d,j],"20,21,22,23,24":[d,k],"25,26,27,28,29":[d,k,e,h],"30,31,32,33,34":[d,g],"35,36,37,38,39":[f,k,e,h],"40,41,42,43,44":[f,k],"45,46,47,48,49":[f,j],"50,51,52,53,54":[f,i],"55,56,57,58,59":[f,h]},hours:{0:[b,{6:[2,3,4,5,7,8,9,10,11]}],12:[b,{2:[1,2,3,4,6,7,8]}],"1,13":[b,{1:[5,6,7]}],"2,14":[c,{3:[1,2,3,4]}],"3,15":[c,{1:[8,9,10,11]}],"4,16":[c,{4:[1,2,3,4,5,6]}],"5,17":[c,{5:[1,2,3,4,5]}],"6,18":[c,{3:[4,5,6,7]}],"7,19":[c,{3:[7,8,9,10]}],"8,20":[c,{5:[5,6,7,8]}],"9,21":[c,{4:[8,9,10,11]}],"10,22":[c,{2:[9,10,11]}],"11,23":[c,{5:[8,9,10,11]}]},getHour:function(a){var b=a.getHours();return a.getMinutes()>=35?(b+1)%24:b}};a.fritteli.uhr.register("pt",l)}(jQuery); \ No newline at end of file diff --git a/dist/jquery.uhr.main.js b/dist/jquery.uhr.main.js index 5b3bb5a..fd94574 100644 --- a/dist/jquery.uhr.main.js +++ b/dist/jquery.uhr.main.js @@ -1,17 +1,17 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -(function($) { +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ +(function ($) { 'use strict'; var uhrGlobals = { "id": 0, "languages": [], "themes": [], registerLanguage: function registerLanguage(code, language) { - var alreadyExists = uhrGlobals.languages.some(function(element) { + var alreadyExists = uhrGlobals.languages.some(function (element) { if (code === element.code) { console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language + - "' because it is already registered for language '" + element.language + "'!"); + "' because it is already registered for language '" + element.language + "'!"); return true; } return false; @@ -24,7 +24,7 @@ }; // auto-detect themes - $('link[rel=stylesheet]').each(function(index, item) { + $('link[rel=stylesheet]').each(function (index, item) { var styleSheet = $(item); var styleClass = styleSheet.attr('data-class'); if (styleClass !== undefined) { @@ -41,9 +41,12 @@ } // public interface methods (exported later) + var setCookie; + var isOn; + var update; var start = function start() { if (!isOn.bind(this)()) { - this.timer = window.setInterval(function() { + this.timer = window.setInterval(function () { this.options.time = new Date(); update.bind(this)(); }.bind(this), 1000); @@ -66,436 +69,25 @@ this.start(); } }; - var setLanguage = function setLanguage(languageKey) { - if (languageKey !== this.options.language) { - this.options.language = languageKey; - var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); - renderer.render.bind(this)(function() { - this.currentMinute = -1; - update.bind(this)(); - }.bind(this)); - setCookie.bind(this)('uhr-language', languageKey); - update.bind(this)(); - } - }; - var setTheme = function setTheme(theme) { - if (theme !== this.options.theme) { - this.element.removeClass(this.options.theme).addClass(theme); - $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); - this.options.theme = theme; - setCookie.bind(this)('uhr-theme', theme); - } - }; - var setTime = function setTime(time) { - this.currentMinute = -1; - if (time === null) { - this.options.time = new Date(); - } else { - if (this.timer !== null) { - window.clearInterval(this.timer); - } - this.options.time = time; - } - update.bind(this)(); - }; - var setMode = function(mode) { - this.options.mode = mode; - this.currentMinute = -1; - update.bind(this)(); - setCookie.bind(this)('uhr-mode', mode); - }; - var setWidth = function setWidth(width) { - var e = this.element; - e.css('width', width); - var realWidth = e.width(); - e.width(realWidth); - e.height(realWidth); - e.css('font-size', (realWidth / 40) + 'px'); - }; + var language; - // private interface methods - var create = function create() { - this.id = uhrGlobals.id++; - this.timer = null; - this.currentMinute = -1; - var userTime = this.options.time; - var hash, params; - if (this.options.time === undefined) { - this.options.time = new Date(); - } - // parse the URL params - hash = window.location.hash; - if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { - hash = hash.substring(1); - hash = decodeURIComponent(hash); - params = hash.split('&'); - params.forEach(function (element) { - var pair = element.split('='); - var key = pair[0]; - var value = pair[1]; - switch (key) { - case 'l': - case 'language': - this.options.language = value; - this.options.force = true; - break; - case 't': - case 'theme': - this.options.theme = value; - this.options.force = true; - break; - case 'm': - case 'mode': - this.options.mode = value; - this.options.force = true; - break; - case 's': - case 'status': - this.options.status = value; - this.options.force = true; - break; - } - }.bind(this)); - } - // end parse the URL params - setupHTML.bind(this)(); - wireFunctionality.bind(this)(); - if (userTime !== undefined) { - this.time(userTime); - } - }; - // private helper methods (not exported) - var toggleConfigScreen = function toggleConfigScreen() { - $('#uhr-controlpanel' + this.id).toggle('fast'); - }; - // set up - var setupHTML = function setupHTML() { - var e = this.element; - // Base clock area - e.addClass('uhr'); - e.empty(); - e.append('<span class="item dot dot1"></span>'); - e.append('<span class="item dot dot2"></span>'); - e.append('<span class="item dot dot3"></span>'); - e.append('<span class="item dot dot4"></span>'); - e.append('<div class="letterarea"></div>'); - e.append('<div class="reflection"></div>'); - setWidth.bind(this)(this.options.width); - - if (this.options.controls) { - var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); - var content = $('<div class="content"></div>'); - controlpanel.append(content); - // on/off switch - var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); - toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + - '" checked="checked" />'); - toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + - '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); - content.append(toggleSwitch); - - // time mode switch - var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); - modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + - '" checked="checked" />'); - modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + - '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + - '</label>'); - content.append(modeSwitch); - // language chooser - if (uhrGlobals.languages.length > 1) { - var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); - uhrGlobals.languages.forEach(function(item) { - languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); - }); - content.append(languageChooser); - } - - // theme chooser - if (uhrGlobals.themes.length > 1) { - var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); - uhrGlobals.themes.forEach(function(item) { - themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); - }); - content.append(themeChooser); - } - var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); - closebutton.on('click', function() { - $('#uhr-controlpanel' + this.id).hide('fast'); - }.bind(this)); - content.append(closebutton); - e.after(controlpanel); - controlpanel.hide(); - var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); - configlink.on('click', function() { - toggleConfigScreen.bind(this)(); - }.bind(this)); - e.after(configlink); - } - }; - var wireFunctionality = function wireFunctionality() { - // on/off switch - var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); - toggleSwitch.on('click', function() { - this.toggle(); - }.bind(this)); - var status = $.cookie('uhr-status' + this.id); - if (status === undefined || this.options.force) { - status = this.options.status; - } - toggleSwitch.prop('checked', status === 'on'); - if (status === 'on') { - this.start(); - } else { - this.stop(); - } - - // time mode switch - var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); - modeSwitch.on('click', function() { - if (this.options.mode === 'seconds') { - setMode.bind(this)('normal'); - } else { - setMode.bind(this)('seconds'); - } - }.bind(this)); - - var mode = $.cookie('uhr-mode' + this.id); - if (mode === undefined || this.options.force) { - mode = this.options.mode; - } - modeSwitch.prop('checked', mode !== 'seconds'); - if (mode === 'seconds') { - setMode.bind(this)('seconds'); - } else { - setMode.bind(this)('normal'); - } - - // language chooser - var languageChooser = $('#uhr-languagechooser' + this.id); - languageChooser.on('change', function() { - var languageKey = $('#uhr-languagechooser' + this.id).val(); - this.language(languageKey); - }.bind(this)); - var selectedLanguage = $.cookie('uhr-language' + this.id); - if (selectedLanguage === undefined || this.options.force) { - selectedLanguage = this.options.language; - } - var found = uhrGlobals.languages.some(function(item) { - return selectedLanguage === item.code; - }); - if (!found) { - var fallbackLanguage; - if (uhrGlobals.languages.length > 0) { - fallbackLanguage = uhrGlobals.languages[0].code; - } else { - fallbackLanguage = ''; - } - console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); - selectedLanguage = fallbackLanguage; - } - languageChooser.val(selectedLanguage); - this.options.language = ""; - this.language(selectedLanguage); - - // theme chooser - var themeChooser = $('#uhr-themechooser' + this.id); - themeChooser.on('change', function() { - var themeKey = $('#uhr-themechooser' + this.id).val(); - this.theme(themeKey); - }.bind(this)); - var selectedTheme = $.cookie('uhr-theme' + this.id); - if (selectedTheme === undefined || this.options.force) { - selectedTheme = this.options.theme; - } - found = uhrGlobals.themes.some(function(item) { - return selectedTheme === item.styleClass; - }); - if (!found) { - var fallbackTheme = uhrGlobals.themes[0].styleClass; - console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); - selectedTheme = fallbackTheme; - } - themeChooser.val(selectedTheme); - this.options.theme = ""; - this.theme(selectedTheme); - if (this.options.autoresize) { - $(window).on('resize', function() { - var $e = this.element; - var $parent = $e.parent(); - var $window = $(window); - var parentWidth = $parent.width(); - var parentHeight = $parent.height(); - var windowWidth = $window.width(); - var windowHeight = $window.height(); - var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; - setWidth.bind(this)(size); - }.bind(this)); - } - }; - var destroy = function destroy() { - this.timer = null; - $(this.element) - .removeAttr('style') - .removeAttr('class') - .empty(); - $('#uhr-configlink' + this.id).remove(); - $('#uhr-controlpanel' + this.id).remove(); - - }; - var setCookie = function setCookie(cookieName, cookieValue) { - var options = {}; - if (this.options.cookiePath !== undefined) { - options = {expires: 365, path: this.options.cookiePath}; - } else { - options = {expires: 365}; - } - $.cookie(cookieName + this.id, cookieValue, options); - }; - - // business logic - var isOn = function isOn() { - return this.timer !== null; - }; - var update = function update() { - if (isOn.bind(this)()) { - var time = this.options.time; - if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { - if (time.getMinutes() === this.currentMinute) { - return; - } - this.currentMinute = time.getMinutes(); - } - show.bind(this)(time); - } else { - clear.bind(this)(); - this.currentMinute = -1; - } - }; - var show = function show(time) { - var second = getSecond.bind(this)(time); - var dotMinute = getDotMinute.bind(this)(time); - var hour = getHour.bind(this)(time); - var coarseMinute = getCoarseMinute.bind(this)(time); - clear.bind(this)(); - if (this.options.mode === 'seconds') { - highlight.bind(this)('second' + second); - } else { - highlight.bind(this)('on'); - for (var i = 1; i <= dotMinute; i++) { - highlight.bind(this)('dot' + i); - } - highlight.bind(this)('minute' + coarseMinute); - highlight.bind(this)('hour' + hour); - } - }; - var highlight = function highlight(itemClass) { - this.element.find('.item.' + itemClass).addClass('active'); - }; - var clear = function clear() { - this.element.find('.item').removeClass('active'); - }; - var getSecond = function getSecond(date) { - if (typeof language.bind(this)().getSeconds === 'function') { - return language.bind(this)().getSeconds(date); - } - return date.getSeconds(); - }; - var getDotMinute = function getDotMinute(date) { - if (typeof language.bind(this)().getDotMinute === 'function') { - return language.bind(this)().getDotMinute(date); - } - var minutes = date.getMinutes(); - return minutes % 5; - }; - var getCoarseMinute = function getCoarseMinute(date) { - if (typeof language.bind(this)().getCoarseMinute === 'function') { - return language.bind(this)().getCoarseMinute(date); - } - return date.getMinutes(); - }; - var getHour = function getHour(date) { - if (typeof language.bind(this)().getHour === 'function') { - return language.bind(this)().getHour(date); - } - var hour = date.getHours(); - if (date.getMinutes() >= 25) { - return (hour + 1) % 24; - } - return hour; - }; - var language = function language() { - var matchingLanguages = uhrGlobals.languages.filter(function(element) { - return (element.code === this.options.language); - }, this); - if (matchingLanguages.length > 0) { - return matchingLanguages[0]; - } - // fallback: return empty object - return {}; - }; - - $.widget("fritteli.uhr", { - "options": { - width: '100%', - status: 'on', - language: 'de_CH', - theme: uhrGlobals.themes[0].styleClass, - force: false, - controls: true, - cookiePath: undefined, - autoresize: true, - mode: 'normal' - }, - "start": start, - "stop": stop, - "toggle": toggle, - "language": setLanguage, - "theme": setTheme, - "time": setTime, - "mode": setMode, - "width": setWidth, - // constructor method - "_create": create, - // destructor method - "_destroy": destroy - }); - $.fritteli.uhr.register = uhrGlobals.registerLanguage; /** - * Hilfsklasse zum Rendern der Uhr. - * @param layout Layout-Objekt, das gerendert werden soll. - * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. + * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. + * @param value Der Buchstabe, der Dargestellt werden soll. + * @param style Die CSS-Styleklassen des Buchstabens. */ - function UhrRenderer(layout, renderarea) { - this.render = function render(beforeshow) { - if (layout.parsed === undefined) { - switch (layout.version) { - case 2: - var delegate = new UhrRendererV2Delegate(layout); - var parsedLayout = delegate.parse(); - Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false}); - break; - default: - console.warn("Unknown layout version: '" + layout.version + "'"); - return; - } + function Letter(value, style) { + var myValue = value; + var myStyle = style || ''; + this.addStyle = function (style) { + if (myStyle === '') { + myStyle = style; + } else { + myStyle += ' ' + style; } - var letters = layout.parsed; - renderarea.fadeOut('fast', function() { - renderarea.empty(); - letters.forEach(function(line, index, array) { - line.forEach(function(letter) { - renderarea.append(letter.toString()); - }); - if (index < array.length - 1) { - renderarea.append('<br/>'); - } - }); - if (typeof beforeshow === 'function') { - beforeshow(); - } - renderarea.fadeIn('fast'); - }); + }; + this.toString = function () { + return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; }; } @@ -644,7 +236,7 @@ 8: [10], 9: [8, 9] }; - var seconds= { + var seconds = { "0": [vorne0, hinten0], "1": [vorne0, hinten1], "2": [vorne0, hinten2], @@ -707,10 +299,21 @@ "59": [vorne5, hinten9] }; + function parseObject(letters, styleClass, object) { + if (typeof object !== 'undefined' && object !== null) { + Object.keys(object).forEach(function (y) { + var highlightLetters = object[y]; + highlightLetters.forEach(function (x) { + letters[y - 1][x - 1].addStyle(styleClass); + }); + }); + } + } + function parseArrayOrObject(letters, styleClass, input) { if (typeof input !== 'undefined' && input !== null) { if (Array.isArray(input)) { - input.forEach(function(item) { + input.forEach(function (item) { parseObject(letters, styleClass, item); }); } else { @@ -719,23 +322,12 @@ } } - function parseObject(letters, styleClass, object) { - if (typeof object !== 'undefined' && object !== null) { - Object.keys(object).forEach(function(y) { - var highlightLetters = object[y]; - highlightLetters.forEach(function(x) { - letters[y - 1][x - 1].addStyle(styleClass); - }); - }); - } - } - function parseTimeDefinition(letters, styleClass, definition) { if (typeof definition !== 'undefined' && definition !== null) { - Object.keys(definition).forEach(function(listString) { + Object.keys(definition).forEach(function (listString) { var array = listString.split(','); var highlightLetters = definition[listString]; - array.forEach(function(item) { + array.forEach(function (item) { parseArrayOrObject(letters, styleClass + item, highlightLetters); }); }); @@ -744,7 +336,7 @@ this.parse = function parse() { var letters = []; - layout.letters.forEach(function(string) { + layout.letters.forEach(function (string) { var line = []; for (var c = 0; c < string.length; c++) { var character = new Letter(string[c]); @@ -765,22 +357,449 @@ } /** - * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. - * @param value Der Buchstabe, der Dargestellt werden soll. - * @param style Die CSS-Styleklassen des Buchstabens. + * Hilfsklasse zum Rendern der Uhr. + * @param layout Layout-Objekt, das gerendert werden soll. + * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. */ - function Letter(value, style) { - var myValue = value; - var myStyle = style || ''; - this.addStyle = function(style) { - if (myStyle === '') { - myStyle = style; - } else { - myStyle += ' ' + style; + function UhrRenderer(layout, renderarea) { + this.render = function render(beforeshow) { + if (layout.parsed === undefined) { + switch (layout.version) { + case 2: + var delegate = new UhrRendererV2Delegate(layout); + var parsedLayout = delegate.parse(); + Object.defineProperty(layout, "parsed", { + "value": parsedLayout, + "writable": false, + "configurable": false + }); + break; + default: + console.warn("Unknown layout version: '" + layout.version + "'"); + return; + } } - }; - this.toString = function() { - return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; + var letters = layout.parsed; + renderarea.fadeOut('fast', function () { + renderarea.empty(); + letters.forEach(function (line, index, array) { + line.forEach(function (letter) { + renderarea.append(letter.toString()); + }); + if (index < array.length - 1) { + renderarea.append('<br/>'); + } + }); + if (typeof beforeshow === 'function') { + beforeshow(); + } + renderarea.fadeIn('fast'); + }); }; } + + var setLanguage = function setLanguage(languageKey) { + if (languageKey !== this.options.language) { + this.options.language = languageKey; + var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); + renderer.render.bind(this)(function () { + this.currentMinute = -1; + update.bind(this)(); + }.bind(this)); + setCookie.bind(this)('uhr-language', languageKey); + update.bind(this)(); + } + }; + var setTheme = function setTheme(theme) { + if (theme !== this.options.theme) { + this.element.removeClass(this.options.theme).addClass(theme); + $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); + this.options.theme = theme; + setCookie.bind(this)('uhr-theme', theme); + } + }; + var setTime = function setTime(time) { + this.currentMinute = -1; + if (time === null) { + this.options.time = new Date(); + } else { + if (this.timer !== null) { + window.clearInterval(this.timer); + } + this.options.time = time; + } + update.bind(this)(); + }; + var setMode = function (mode) { + this.options.mode = mode; + this.currentMinute = -1; + update.bind(this)(); + setCookie.bind(this)('uhr-mode', mode); + }; + var setWidth = function setWidth(width) { + var e = this.element; + e.css('width', width); + var realWidth = e.width(); + e.width(realWidth); + e.height(realWidth); + e.css('font-size', (realWidth / 40) + 'px'); + }; + + // private interface methods + var setupHTML; + var wireFunctionality; + var create = function create() { + this.id = uhrGlobals.id++; + this.timer = null; + this.currentMinute = -1; + var userTime = this.options.time; + var hash, params; + if (this.options.time === undefined) { + this.options.time = new Date(); + } + // parse the URL params + hash = window.location.hash; + if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { + hash = hash.substring(1); + hash = decodeURIComponent(hash); + params = hash.split('&'); + params.forEach(function (element) { + var pair = element.split('='); + var key = pair[0]; + var value = pair[1]; + switch (key) { + case 'l': + case 'language': + this.options.language = value; + this.options.force = true; + break; + case 't': + case 'theme': + this.options.theme = value; + this.options.force = true; + break; + case 'm': + case 'mode': + this.options.mode = value; + this.options.force = true; + break; + case 's': + case 'status': + this.options.status = value; + this.options.force = true; + break; + } + }.bind(this)); + } + // end parse the URL params + setupHTML.bind(this)(); + wireFunctionality.bind(this)(); + if (userTime !== undefined) { + this.time(userTime); + } + }; + // private helper methods (not exported) + var toggleConfigScreen = function toggleConfigScreen() { + $('#uhr-controlpanel' + this.id).toggle('fast'); + }; + // set up + setupHTML = function setupHTML() { + var e = this.element; + // Base clock area + e.addClass('uhr'); + e.empty(); + e.append('<span class="item dot dot1"></span>'); + e.append('<span class="item dot dot2"></span>'); + e.append('<span class="item dot dot3"></span>'); + e.append('<span class="item dot dot4"></span>'); + e.append('<div class="letterarea"></div>'); + e.append('<div class="reflection"></div>'); + setWidth.bind(this)(this.options.width); + + if (this.options.controls) { + var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); + var content = $('<div class="content"></div>'); + controlpanel.append(content); + // on/off switch + var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); + toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + + '" checked="checked" />'); + toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + + '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); + content.append(toggleSwitch); + + // time mode switch + var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); + modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + + '" checked="checked" />'); + modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + + '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + + '</label>'); + content.append(modeSwitch); + // language chooser + if (uhrGlobals.languages.length > 1) { + var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); + uhrGlobals.languages.forEach(function (item) { + languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); + }); + content.append(languageChooser); + } + + // theme chooser + if (uhrGlobals.themes.length > 1) { + var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); + uhrGlobals.themes.forEach(function (item) { + themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); + }); + content.append(themeChooser); + } + var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); + closebutton.on('click', function () { + $('#uhr-controlpanel' + this.id).hide('fast'); + }.bind(this)); + content.append(closebutton); + e.after(controlpanel); + controlpanel.hide(); + var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); + configlink.on('click', function () { + toggleConfigScreen.bind(this)(); + }.bind(this)); + e.after(configlink); + } + }; + wireFunctionality = function wireFunctionality() { + // on/off switch + var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); + toggleSwitch.on('click', function () { + this.toggle(); + }.bind(this)); + var status = $.cookie('uhr-status' + this.id); + if (status === undefined || this.options.force) { + status = this.options.status; + } + toggleSwitch.prop('checked', status === 'on'); + if (status === 'on') { + this.start(); + } else { + this.stop(); + } + + // time mode switch + var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); + modeSwitch.on('click', function () { + if (this.options.mode === 'seconds') { + setMode.bind(this)('normal'); + } else { + setMode.bind(this)('seconds'); + } + }.bind(this)); + + var mode = $.cookie('uhr-mode' + this.id); + if (mode === undefined || this.options.force) { + mode = this.options.mode; + } + modeSwitch.prop('checked', mode !== 'seconds'); + if (mode === 'seconds') { + setMode.bind(this)('seconds'); + } else { + setMode.bind(this)('normal'); + } + + // language chooser + var languageChooser = $('#uhr-languagechooser' + this.id); + languageChooser.on('change', function () { + var languageKey = $('#uhr-languagechooser' + this.id).val(); + this.language(languageKey); + }.bind(this)); + var selectedLanguage = $.cookie('uhr-language' + this.id); + if (selectedLanguage === undefined || this.options.force) { + selectedLanguage = this.options.language; + } + var found = uhrGlobals.languages.some(function (item) { + return selectedLanguage === item.code; + }); + if (!found) { + var fallbackLanguage; + if (uhrGlobals.languages.length > 0) { + fallbackLanguage = uhrGlobals.languages[0].code; + } else { + fallbackLanguage = ''; + } + console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); + selectedLanguage = fallbackLanguage; + } + languageChooser.val(selectedLanguage); + this.options.language = ""; + this.language(selectedLanguage); + + // theme chooser + var themeChooser = $('#uhr-themechooser' + this.id); + themeChooser.on('change', function () { + var themeKey = $('#uhr-themechooser' + this.id).val(); + this.theme(themeKey); + }.bind(this)); + var selectedTheme = $.cookie('uhr-theme' + this.id); + if (selectedTheme === undefined || this.options.force) { + selectedTheme = this.options.theme; + } + found = uhrGlobals.themes.some(function (item) { + return selectedTheme === item.styleClass; + }); + if (!found) { + var fallbackTheme = uhrGlobals.themes[0].styleClass; + console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); + selectedTheme = fallbackTheme; + } + themeChooser.val(selectedTheme); + this.options.theme = ""; + this.theme(selectedTheme); + if (this.options.autoresize) { + $(window).on('resize', function () { + var $e = this.element; + var $parent = $e.parent(); + var $window = $(window); + var parentWidth = $parent.width(); + var parentHeight = $parent.height(); + var windowWidth = $window.width(); + var windowHeight = $window.height(); + var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; + setWidth.bind(this)(size); + }.bind(this)); + } + }; + var destroy = function destroy() { + this.timer = null; + $(this.element) + .removeAttr('style') + .removeAttr('class') + .empty(); + $('#uhr-configlink' + this.id).remove(); + $('#uhr-controlpanel' + this.id).remove(); + + }; + setCookie = function setCookie(cookieName, cookieValue) { + var options = {}; + if (this.options.cookiePath !== undefined) { + options = {expires: 365, path: this.options.cookiePath}; + } else { + options = {expires: 365}; + } + $.cookie(cookieName + this.id, cookieValue, options); + }; + + // business logic + isOn = function isOn() { + return this.timer !== null; + }; + var show; + var clear; + update = function update() { + if (isOn.bind(this)()) { + var time = this.options.time; + if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { + if (time.getMinutes() === this.currentMinute) { + return; + } + this.currentMinute = time.getMinutes(); + } + show.bind(this)(time); + } else { + clear.bind(this)(); + this.currentMinute = -1; + } + }; + var highlight; + var getSecond; + var getDotMinute; + var getCoarseMinute; + var getHour; + show = function show(time) { + var second = getSecond.bind(this)(time); + var dotMinute = getDotMinute.bind(this)(time); + var hour = getHour.bind(this)(time); + var coarseMinute = getCoarseMinute.bind(this)(time); + clear.bind(this)(); + if (this.options.mode === 'seconds') { + highlight.bind(this)('second' + second); + } else { + highlight.bind(this)('on'); + for (var i = 1; i <= dotMinute; i++) { + highlight.bind(this)('dot' + i); + } + highlight.bind(this)('minute' + coarseMinute); + highlight.bind(this)('hour' + hour); + } + }; + highlight = function highlight(itemClass) { + this.element.find('.item.' + itemClass).addClass('active'); + }; + clear = function clear() { + this.element.find('.item').removeClass('active'); + }; + getSecond = function getSecond(date) { + if (typeof language.bind(this)().getSeconds === 'function') { + return language.bind(this)().getSeconds(date); + } + return date.getSeconds(); + }; + getDotMinute = function getDotMinute(date) { + if (typeof language.bind(this)().getDotMinute === 'function') { + return language.bind(this)().getDotMinute(date); + } + var minutes = date.getMinutes(); + return minutes % 5; + }; + getCoarseMinute = function getCoarseMinute(date) { + if (typeof language.bind(this)().getCoarseMinute === 'function') { + return language.bind(this)().getCoarseMinute(date); + } + return date.getMinutes(); + }; + getHour = function getHour(date) { + if (typeof language.bind(this)().getHour === 'function') { + return language.bind(this)().getHour(date); + } + var hour = date.getHours(); + if (date.getMinutes() >= 25) { + return (hour + 1) % 24; + } + return hour; + }; + language = function language() { + var matchingLanguages = uhrGlobals.languages.filter(function (element) { + return (element.code === this.options.language); + }, this); + if (matchingLanguages.length > 0) { + return matchingLanguages[0]; + } + // fallback: return empty object + return {}; + }; + + $.widget("fritteli.uhr", { + "options": { + width: '100%', + status: 'on', + language: 'de_CH', + theme: uhrGlobals.themes[0].styleClass, + force: false, + controls: true, + cookiePath: undefined, + autoresize: true, + mode: 'normal' + }, + "start": start, + "stop": stop, + "toggle": toggle, + "language": setLanguage, + "theme": setTheme, + "time": setTime, + "mode": setMode, + "width": setWidth, + // constructor method + "_create": create, + // destructor method + "_destroy": destroy + }); + $.fritteli.uhr.register = uhrGlobals.registerLanguage; })(jQuery); diff --git a/dist/jquery.uhr.main.min.js b/dist/jquery.uhr.main.min.js deleted file mode 100644 index 0ac22a6..0000000 --- a/dist/jquery.uhr.main.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a){"use strict";function b(a,b){this.render=function(d){if(void 0===a.parsed)switch(a.version){case 2:var e=new c(a),f=e.parse();Object.defineProperty(a,"parsed",{value:f,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+a.version+"'")}var g=a.parsed;b.fadeOut("fast",function(){b.empty(),g.forEach(function(a,c,d){a.forEach(function(a){b.append(a.toString())}),c<d.length-1&&b.append("<br/>")}),"function"==typeof d&&d(),b.fadeIn("fast")})}}function c(a){function b(a,b,d){"undefined"!=typeof d&&null!==d&&(Array.isArray(d)?d.forEach(function(d){c(a,b,d)}):c(a,b,d))}function c(a,b,c){"undefined"!=typeof c&&null!==c&&Object.keys(c).forEach(function(d){var e=c[d];e.forEach(function(c){a[d-1][c-1].addStyle(b)})})}function e(a,c,d){"undefined"!=typeof d&&null!==d&&Object.keys(d).forEach(function(e){var f=e.split(","),g=d[e];f.forEach(function(d){b(a,c+d,g)})})}var f={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},g={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},h={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},i={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},j={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},k={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},l={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},m={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},n={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},o={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},p={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},q={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},r={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},s={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},t={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},u={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[f,g],1:[f,i],2:[f,k],3:[f,m],4:[f,o],5:[f,q],6:[f,r],7:[f,s],8:[f,t],9:[f,u],10:[h,g],11:[h,i],12:[h,k],13:[h,m],14:[h,o],15:[h,q],16:[h,r],17:[h,s],18:[h,t],19:[h,u],20:[j,g],21:[j,i],22:[j,k],23:[j,m],24:[j,o],25:[j,q],26:[j,r],27:[j,s],28:[j,t],29:[j,u],30:[l,g],31:[l,i],32:[l,k],33:[l,m],34:[l,o],35:[l,q],36:[l,r],37:[l,s],38:[l,t],39:[l,u],40:[n,g],41:[n,i],42:[n,k],43:[n,m],44:[n,o],45:[n,q],46:[n,r],47:[n,s],48:[n,t],49:[n,u],50:[p,g],51:[p,i],52:[p,k],53:[p,m],54:[p,o],55:[p,q],56:[p,r],57:[p,s],58:[p,t],59:[p,u]};this.parse=function(){var c=[];return a.letters.forEach(function(a){for(var b=[],e=0;e<a.length;e++){var f=new d(a[e]);b.push(f)}c.push(b)}),b(c,"on",a.permanent),"undefined"!=typeof a.seconds&&null!==a.seconds?e(c,"second",a.seconds):e(c,"second",v),e(c,"minute",a.minutes),e(c,"hour",a.hours),c}}function d(a,b){var c=a,d=b||"";this.addStyle=function(a){""===d?d=a:d+=" "+a},this.toString=function(){return'<span class="item letter '+d+'">'+c+"</span>"}}var e={id:0,languages:[],themes:[],registerLanguage:function(a,b){var c=e.languages.some(function(c){return a===c.code&&(console.error("Error: Language code '"+a+"' cannot be registered for language '"+b.language+"' because it is already registered for language '"+c.language+"'!"),!0)});c||(b.code=a,e.languages.push(b))}};a("link[rel=stylesheet]").each(function(b,c){var d=a(c),f=d.attr("data-class");if(void 0!==f){var g=d.attr("data-name");void 0===g&&(g=f),e.themes.push({styleClass:f,name:g})}}),0===e.themes.length&&e.themes.push({});var f=function(){t.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,u.bind(this)()}.bind(this),1e3),u.bind(this)(),s.bind(this)("uhr-status","on"))},g=function(){t.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,u.bind(this)(),s.bind(this)("uhr-status","off"))},h=function(){t.bind(this)()?this.stop():this.start()},i=function(a){if(a!==this.options.language){this.options.language=a;var c=new b(C.bind(this)(),this.element.find(".letterarea"));c.render.bind(this)(function(){this.currentMinute=-1,u.bind(this)()}.bind(this)),s.bind(this)("uhr-language",a),u.bind(this)()}},j=function(b){b!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(b),a("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(b),this.options.theme=b,s.bind(this)("uhr-theme",b))},k=function(a){this.currentMinute=-1,null===a?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=a),u.bind(this)()},l=function(a){this.options.mode=a,this.currentMinute=-1,u.bind(this)(),s.bind(this)("uhr-mode",a)},m=function(a){var b=this.element;b.css("width",a);var c=b.width();b.width(c),b.height(c),b.css("font-size",c/40+"px")},n=function(){this.id=e.id++,this.timer=null,this.currentMinute=-1;var a,b,c=this.options.time;void 0===this.options.time&&(this.options.time=new Date),a=window.location.hash,void 0!==a&&"string"==typeof a&&"#"===a.charAt(0)&&(a=a.substring(1),a=decodeURIComponent(a),b=a.split("&"),b.forEach(function(a){var b=a.split("="),c=b[0],d=b[1];switch(c){case"l":case"language":this.options.language=d,this.options.force=!0;break;case"t":case"theme":this.options.theme=d,this.options.force=!0;break;case"m":case"mode":this.options.mode=d,this.options.force=!0;break;case"s":case"status":this.options.status=d,this.options.force=!0}}.bind(this))),p.bind(this)(),q.bind(this)(),void 0!==c&&this.time(c)},o=function(){a("#uhr-controlpanel"+this.id).toggle("fast")},p=function(){var b=this.element;if(b.addClass("uhr"),b.empty(),b.append('<span class="item dot dot1"></span>'),b.append('<span class="item dot dot2"></span>'),b.append('<span class="item dot dot3"></span>'),b.append('<span class="item dot dot4"></span>'),b.append('<div class="letterarea"></div>'),b.append('<div class="reflection"></div>'),m.bind(this)(this.options.width),this.options.controls){var c=a('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),d=a('<div class="content"></div>');c.append(d);var f=a('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');f.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),f.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(f);var g=a('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(g.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),g.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),d.append(g),e.languages.length>1){var h=a('<select id="uhr-languagechooser'+this.id+'"></select>');e.languages.forEach(function(a){h.append('<option value="'+a.code+'">'+a.language+"</option>")}),d.append(h)}if(e.themes.length>1){var i=a('<select id="uhr-themechooser'+this.id+'"></select>');e.themes.forEach(function(a){i.append('<option value="'+a.styleClass+'">'+a.name+"</option>")}),d.append(i)}var j=a('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');j.on("click",function(){a("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),d.append(j),b.after(c),c.hide();var k=a('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');k.on("click",function(){o.bind(this)()}.bind(this)),b.after(k)}},q=function(){var b=a("#uhr-onoffswitch-checkbox"+this.id);b.on("click",function(){this.toggle()}.bind(this));var c=a.cookie("uhr-status"+this.id);(void 0===c||this.options.force)&&(c=this.options.status),b.prop("checked","on"===c),"on"===c?this.start():this.stop();var d=a("#uhr-modeswitch-checkbox"+this.id);d.on("click",function(){"seconds"===this.options.mode?l.bind(this)("normal"):l.bind(this)("seconds")}.bind(this));var f=a.cookie("uhr-mode"+this.id);(void 0===f||this.options.force)&&(f=this.options.mode),d.prop("checked","seconds"!==f),"seconds"===f?l.bind(this)("seconds"):l.bind(this)("normal");var g=a("#uhr-languagechooser"+this.id);g.on("change",function(){var b=a("#uhr-languagechooser"+this.id).val();this.language(b)}.bind(this));var h=a.cookie("uhr-language"+this.id);(void 0===h||this.options.force)&&(h=this.options.language);var i=e.languages.some(function(a){return h===a.code});if(!i){var j;j=e.languages.length>0?e.languages[0].code:"",console.warn("Language '"+h+"' not found! Using fallback '"+j+"'"),h=j}g.val(h),this.options.language="",this.language(h);var k=a("#uhr-themechooser"+this.id);k.on("change",function(){var b=a("#uhr-themechooser"+this.id).val();this.theme(b)}.bind(this));var n=a.cookie("uhr-theme"+this.id);if((void 0===n||this.options.force)&&(n=this.options.theme),i=e.themes.some(function(a){return n===a.styleClass}),!i){var o=e.themes[0].styleClass;console.warn("Theme '"+n+"' not found! Using fallback '"+o+"'"),n=o}k.val(n),this.options.theme="",this.theme(n),this.options.autoresize&&a(window).on("resize",function(){var b=this.element,c=b.parent(),d=a(window),e=c.width(),f=c.height(),g=d.width(),h=d.height(),i=Math.min(e,f,g,h)+"px";m.bind(this)(i)}.bind(this))},r=function(){this.timer=null,a(this.element).removeAttr("style").removeAttr("class").empty(),a("#uhr-configlink"+this.id).remove(),a("#uhr-controlpanel"+this.id).remove()},s=function(b,c){var d={};d=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},a.cookie(b+this.id,c,d)},t=function(){return null!==this.timer},u=function(){if(t.bind(this)()){var a=this.options.time;if(!C.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(a.getMinutes()===this.currentMinute)return;this.currentMinute=a.getMinutes()}v.bind(this)(a)}else x.bind(this)(),this.currentMinute=-1},v=function(a){var b=y.bind(this)(a),c=z.bind(this)(a),d=B.bind(this)(a),e=A.bind(this)(a);if(x.bind(this)(),"seconds"===this.options.mode)w.bind(this)("second"+b);else{w.bind(this)("on");for(var f=1;f<=c;f++)w.bind(this)("dot"+f);w.bind(this)("minute"+e),w.bind(this)("hour"+d)}},w=function(a){this.element.find(".item."+a).addClass("active")},x=function(){this.element.find(".item").removeClass("active")},y=function(a){return"function"==typeof C.bind(this)().getSeconds?C.bind(this)().getSeconds(a):a.getSeconds()},z=function(a){if("function"==typeof C.bind(this)().getDotMinute)return C.bind(this)().getDotMinute(a);var b=a.getMinutes();return b%5},A=function(a){return"function"==typeof C.bind(this)().getCoarseMinute?C.bind(this)().getCoarseMinute(a):a.getMinutes()},B=function(a){if("function"==typeof C.bind(this)().getHour)return C.bind(this)().getHour(a);var b=a.getHours();return a.getMinutes()>=25?(b+1)%24:b},C=function(){var a=e.languages.filter(function(a){return a.code===this.options.language},this);return a.length>0?a[0]:{}};a.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:e.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:f,stop:g,toggle:h,language:i,theme:j,time:k,mode:l,width:m,_create:n,_destroy:r}),a.fritteli.uhr.register=e.registerLanguage}(jQuery); \ No newline at end of file diff --git a/dist/libs.js b/dist/libs.js index eb28d8c..95f0d05 100644 --- a/dist/libs.js +++ b/dist/libs.js @@ -1,23 +1,25 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 +/*! uhr - v8.0.4-dev.0 - 2019-05-03 * http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ /*! - * jQuery JavaScript Library v2.1.4 - * http://jquery.com/ + * jQuery JavaScript Library v3.4.1 + * https://jquery.com/ * * Includes Sizzle.js - * http://sizzlejs.com/ + * https://sizzlejs.com/ * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Copyright JS Foundation and other contributors * Released under the MIT license - * http://jquery.org/license + * https://jquery.org/license * - * Date: 2015-04-28T16:01Z + * Date: 2019-05-01T21:04Z */ +( function( global, factory ) { -(function( global, factory ) { + "use strict"; if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` @@ -38,16 +40,20 @@ } // Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; var arr = []; +var document = window.document; + +var getProto = Object.getPrototypeOf; + var slice = arr.slice; var concat = arr.concat; @@ -62,45 +68,104 @@ var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + var support = {}; +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML <object> elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.4", + version = "3.4.1", // Define a local copy of jQuery jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, - // Support: Android<4.1 + // Support: Android <=4.0 only // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used jquery: version, constructor: jQuery, - // Start with an empty selector - selector: "", - // The default length of a jQuery object is 0 length: 0, @@ -111,13 +176,14 @@ jQuery.fn = jQuery.prototype = { // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { - return num != null ? - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } - // Return all the elements in a clean array - slice.call( this ); + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack @@ -129,23 +195,20 @@ jQuery.fn = jQuery.prototype = { // Add the old object onto the stack (as a reference) ret.prevObject = this; - ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); + each: function( callback ) { + return jQuery.each( this, callback ); }, map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); - })); + } ) ); }, slice: function() { @@ -163,11 +226,11 @@ jQuery.fn = jQuery.prototype = { eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { - return this.prevObject || this.constructor(null); + return this.prevObject || this.constructor(); }, // For internal use only. @@ -179,7 +242,7 @@ jQuery.fn = jQuery.prototype = { jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, + target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; @@ -194,7 +257,7 @@ jQuery.extend = jQuery.fn.extend = function() { } // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } @@ -205,27 +268,34 @@ jQuery.extend = jQuery.fn.extend = function() { } for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { + if ( ( options = arguments[ i ] ) != null ) { + // Extend the base object for ( name in options ) { - src = target[ name ]; copy = options[ name ]; + // Prevent Object.prototype pollution // Prevent never-ending loop - if ( target === copy ) { + if ( name === "__proto__" || target === copy ) { continue; } // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; + clone = src; } + copyIsArray = false; // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); @@ -242,7 +312,8 @@ jQuery.extend = jQuery.fn.extend = function() { return target; }; -jQuery.extend({ +jQuery.extend( { + // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), @@ -255,138 +326,55 @@ jQuery.extend({ noop: function() {}, - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; - }, - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; } - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { var name; + for ( name in obj ) { return false; } return true; }, - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } + globalEval: function( code, options ) { + DOMEval( code, { nonce: options && options.nonce } ); }, - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, + each: function( obj, callback ) { + var length, i = 0; - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; } } - - // A special, fast, case for the most common use of each } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; } } } @@ -394,7 +382,7 @@ jQuery.extend({ return obj; }, - // Support: Android<4.1 + // Support: Android <=4.0 only trim: function( text ) { return text == null ? "" : @@ -406,7 +394,7 @@ jQuery.extend({ var ret = results || []; if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { + if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr @@ -423,6 +411,8 @@ jQuery.extend({ return arr == null ? -1 : indexOf.call( arr, elem, i ); }, + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, @@ -458,14 +448,13 @@ jQuery.extend({ // arg is for internal usage only map: function( elems, callback, arg ) { - var value, + var length, value, i = 0, - length = elems.length, - isArray = isArraylike( elems ), ret = []; // Go through the array, translating each of the items to their new values - if ( isArray ) { + if ( isArrayLike( elems ) ) { + length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); @@ -492,77 +481,47 @@ jQuery.extend({ // A global GUID counter for objects guid: 1, - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support -}); +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} // Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); +} ); -function isArraylike( obj ) { +function isArrayLike( obj ) { - // Support: iOS 8.2 (not reproducible in simulator) + // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE - var length = "length" in obj && obj.length, - type = jQuery.type( obj ); + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); - if ( type === "function" || jQuery.isWindow( obj ) ) { + if ( isFunction( obj ) || isWindow( obj ) ) { return false; } - if ( obj.nodeType === 1 && length ) { - return true; - } - return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! - * Sizzle CSS Selector Engine v2.2.0-pre - * http://sizzlejs.com/ + * Sizzle CSS Selector Engine v2.3.4 + * https://sizzlejs.com/ * - * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors + * Copyright JS Foundation and other contributors * Released under the MIT license - * http://jquery.org/license + * https://js.foundation/ * - * Date: 2014-12-16 + * Date: 2019-04-08 */ (function( window ) { @@ -596,6 +555,7 @@ var i, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), + nonnativeSelectorCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; @@ -603,9 +563,6 @@ var i, return 0; }, - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], @@ -614,7 +571,7 @@ var i, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 + // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; @@ -630,25 +587,21 @@ var i, // Regular expressions - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), + // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", - pseudos = ":(" + characterEncoding + ")(?:\\((" + + pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + @@ -664,16 +617,15 @@ var i, rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + rdescend = new RegExp( whitespace + "|>" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + @@ -686,6 +638,7 @@ var i, whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, + rhtml = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, @@ -695,9 +648,9 @@ var i, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, - rescape = /'|\\/g, - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; @@ -713,13 +666,39 @@ var i, String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); - }; + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); // Optimize for push.apply( _, NodeList ) try { @@ -751,103 +730,131 @@ try { } function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; - context = context || document; results = results || []; - nodeType = context.nodeType; + // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } - if ( !seed && documentIsHTML ) { + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + + // ID selector + if ( (m = match[1]) ) { + + // Document context + if ( nodeType === 9 ) { + if ( (elem = context.getElementById( m )) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && (elem = newContext.getElementById( m )) && + contains( context, elem ) && + elem.id === m ) { - // Try to shortcut find operations when possible (e.g., not under DocumentFragment) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { results.push( elem ); return results; } + } + + // Type selector + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( (m = match[3]) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) && + + // Support: IE 8 only + // Exclude object elements + (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && rdescend.test( selector ) ) { + + // Capture the context ID, setting it first if necessary + if ( (nid = context.getAttribute( "id" )) ) { + nid = nid.replace( rcssescape, fcssescape ); } else { - return results; + context.setAttribute( "id", (nid = expando) ); } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[i] = "#" + nid + " " + toSelector( groups[i] ); } + newSelector = groups.join( "," ); + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; } - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType !== 1 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; - } catch(qsaError) { + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); } finally { - if ( !old ) { - context.removeAttribute("id"); + if ( nid === expando ) { + context.removeAttribute( "id" ); } } } @@ -860,7 +867,7 @@ function Sizzle( selector, context, results, seed ) { /** * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ @@ -889,22 +896,22 @@ function markFunction( fn ) { /** * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result + * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { - var div = document.createElement("div"); + var el = document.createElement("fieldset"); try { - return !!fn( div ); + return !!fn( el ); } catch (e) { return false; } finally { // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); + if ( el.parentNode ) { + el.parentNode.removeChild( el ); } // release memory in IE - div = null; + el = null; } } @@ -915,7 +922,7 @@ function assert( fn ) { */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), - i = attrs.length; + i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; @@ -931,8 +938,7 @@ function addHandle( attrs, handler ) { function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); + a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { @@ -973,6 +979,62 @@ function createButtonPseudo( type ) { }; } +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + /** * Returns a function to use in pseudos for positionals * @param {Function} fn @@ -1013,10 +1075,13 @@ support = Sizzle.support = {}; * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; + var namespace = elem.namespaceURI, + docElem = (elem.ownerDocument || elem).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); }; /** @@ -1025,96 +1090,119 @@ isXML = Sizzle.isXML = function( elem ) { * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, + var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; - // If no document and documentElement is available, return + // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } - // Set our document + // Update global variables document = doc; - docElem = doc.documentElement; - parent = doc.defaultView; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); + // Support: IE 9-11, Edge + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + if ( preferredDoc !== document && + (subWindow = document.defaultView) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); } } - /* Support tests - ---------------------------------------------------------------------- */ - documentIsHTML = !isXML( doc ); - /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); + support.attributes = assert(function( el ) { + el.className = "i"; + return !el.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; + support.getElementsByTagName = assert(function( el ) { + el.appendChild( document.createComment("") ); + return !el.getElementsByTagName("*").length; }); // Support: IE<9 - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, + // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + support.getById = assert(function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; }); - // ID find and filter + // ID filter and find if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode("id"); return node && node.value === attrId; }; }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( (elem = elems[i++]) ) { + node = elem.getAttributeNode("id"); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; } // Tag @@ -1151,7 +1239,7 @@ setDocument = Sizzle.setDocument = function( node ) { // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( documentIsHTML ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; @@ -1168,77 +1256,87 @@ setDocument = Sizzle.setDocument = function( node ) { // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 + // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini - assert(function( div ) { + assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + - "<select id='" + expando + "-\f]' msallowcapture=''>" + + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + + "<select id='" + expando + "-\r\\' msallowcapture=''>" + "<option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { + if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } - // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { + if ( !el.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); - assert(function( div ) { + assert(function( el ) { + el.innerHTML = "<a href='' disabled='disabled'></a>" + + "<select disabled='disabled'><option/></select>"; + // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); + var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); + el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { + if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { + if ( el.querySelectorAll(":enabled").length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); + el.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } @@ -1249,14 +1347,14 @@ setDocument = Sizzle.setDocument = function( node ) { docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { - assert(function( div ) { + assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); + support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); + matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } @@ -1269,7 +1367,7 @@ setDocument = Sizzle.setDocument = function( node ) { hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another - // Purposefully does not implement inclusive descendent + // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { @@ -1323,10 +1421,10 @@ setDocument = Sizzle.setDocument = function( node ) { (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } @@ -1354,8 +1452,8 @@ setDocument = Sizzle.setDocument = function( node ) { // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : + return a === document ? -1 : + b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? @@ -1392,7 +1490,7 @@ setDocument = Sizzle.setDocument = function( node ) { 0; }; - return doc; + return document; }; Sizzle.matches = function( expr, elements ) { @@ -1405,10 +1503,8 @@ Sizzle.matchesSelector = function( elem, expr ) { setDocument( elem ); } - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { @@ -1422,7 +1518,9 @@ Sizzle.matchesSelector = function( elem, expr ) { elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch (e) {} + } catch (e) { + nonnativeSelectorCache( expr, true ); + } } return Sizzle( expr, document, null, [ elem ] ).length > 0; @@ -1457,6 +1555,10 @@ Sizzle.attr = function( elem, name ) { null; }; +Sizzle.escape = function( sel ) { + return (sel + "").replace( rcssescape, fcssescape ); +}; + Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; @@ -1682,11 +1784,12 @@ Expr = Sizzle.selectors = { } : function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, + var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; + useCache = !xml && !ofType, + diff = false; if ( parent ) { @@ -1695,7 +1798,10 @@ Expr = Sizzle.selectors = { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + return false; } } @@ -1709,11 +1815,21 @@ Expr = Sizzle.selectors = { // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { + // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || @@ -1723,29 +1839,55 @@ Expr = Sizzle.selectors = { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { + // Use previously-cached element index if available + if ( useCache ) { + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || (node[ expando ] = {}); - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); - if ( node === elem ) { - break; + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || (node[ expando ] = {}); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + (outerCache[ node.uniqueID ] = {}); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } } } } @@ -1837,7 +1979,7 @@ Expr = Sizzle.selectors = { "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; }; }), @@ -1884,13 +2026,8 @@ Expr = Sizzle.selectors = { }, // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements @@ -1981,7 +2118,11 @@ Expr = Sizzle.selectors = { }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } @@ -2092,7 +2233,9 @@ function toSelector( tokens ) { function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? @@ -2103,14 +2246,15 @@ function addCombinator( matcher, combinator, base ) { return matcher( elem, context, xml ); } } + return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { - var oldCache, outerCache, + var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { @@ -2123,14 +2267,21 @@ function addCombinator( matcher, combinator, base ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; + uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { @@ -2140,6 +2291,7 @@ function addCombinator( matcher, combinator, base ) { } } } + return false; }; } @@ -2355,18 +2507,21 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { len = elems.length; if ( outermost ) { - outermostContext = context !== document && context; + outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; + if ( !context && elem.ownerDocument !== document ) { + setDocument( elem ); + xml = !documentIsHTML; + } while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { + if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } @@ -2390,8 +2545,17 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { } } - // Apply set filters to unmatched elements + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { @@ -2483,14 +2647,14 @@ select = Sizzle.select = function( selector, context, results, seed ) { results = results || []; - // Try to minimize operations if there is no seed and only one group + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) if ( match.length === 1 ) { - // Take a shortcut and set the context if the root selector is an ID + // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { @@ -2541,7 +2705,7 @@ select = Sizzle.select = function( selector, context, results, seed ) { context, !documentIsHTML, results, - rsibling.test( selector ) && testContext( context.parentNode ) || context + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; @@ -2560,17 +2724,17 @@ setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { +support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; + return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = "<a href='#'></a>"; - return div.firstChild.getAttribute("href") === "#" ; +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( el ) { + el.innerHTML = "<a href='#'></a>"; + return el.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { @@ -2581,10 +2745,10 @@ if ( !assert(function( div ) { // Support: IE<9 // Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = "<input/>"; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; +if ( !support.attributes || !assert(function( el ) { + el.innerHTML = "<input/>"; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { @@ -2595,8 +2759,8 @@ if ( !support.attributes || !assert(function( div ) { // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; +if ( !assert(function( el ) { + return el.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; @@ -2617,50 +2781,84 @@ return Sizzle; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + var rneedsContext = jQuery.expr.match.needsContext; -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + -var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { + if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; - }); - + } ); } + // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; - }); - + } ); } - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); } - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); } jQuery.filter = function( expr, elems, not ) { @@ -2670,44 +2868,44 @@ jQuery.filter = function( expr, elems, not ) { expr = ":not(" + expr + ")"; } - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); }; -jQuery.fn.extend({ +jQuery.fn.extend( { find: function( selector ) { - var i, + var i, ret, len = this.length, - ret = [], self = this; if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { + return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } - }) ); + } ) ); } + ret = this.pushStack( [] ); + for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; + return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); + return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); + return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( @@ -2721,7 +2919,7 @@ jQuery.fn.extend({ false ).length; } -}); +} ); // Initialize a jQuery object @@ -2733,9 +2931,10 @@ var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - init = jQuery.fn.init = function( selector, context ) { + init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) @@ -2743,9 +2942,16 @@ var rootjQuery, return this; } + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + // Handle HTML strings if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; @@ -2754,25 +2960,26 @@ var rootjQuery, } // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { + if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( - match[1], + match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { + // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { + if ( isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes @@ -2786,24 +2993,20 @@ var rootjQuery, // HANDLE: $(#id) } else { - elem = document.getElementById( match[2] ); + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { // Inject the element directly into the jQuery object + this[ 0 ] = elem; this.length = 1; - this[0] = elem; } - - this.context = document; - this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); + return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) @@ -2813,24 +3016,20 @@ var rootjQuery, // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { - this.context = this[0] = selector; + this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + // Execute immediately if ready is not present selector( jQuery ); } - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - return jQuery.makeArray( selector, this ); }; @@ -2842,6 +3041,7 @@ rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, @@ -2850,48 +3050,19 @@ var rparentsprev = /^(?:parents|prev(?:Until|All))/, prev: true }; -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ +jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; - return this.filter(function() { + return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { + if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } - }); + } ); }, closest: function( selectors, context ) { @@ -2899,27 +3070,29 @@ jQuery.fn.extend({ i = 0, l = this.length, matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; + targets = typeof selectors !== "string" && jQuery( selectors ); - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : - matched.push( cur ); - break; + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } } } } - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set @@ -2945,7 +3118,7 @@ jQuery.fn.extend({ add: function( selector, context ) { return this.pushStack( - jQuery.unique( + jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); @@ -2953,26 +3126,26 @@ jQuery.fn.extend({ addBack: function( selector ) { return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) + this.prevObject : this.prevObject.filter( selector ) ); } -}); +} ); function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } -jQuery.each({ +jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); + return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); + return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); @@ -2981,25 +3154,36 @@ jQuery.each({ return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); + return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); + return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); + return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); + return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { - return jQuery.sibling( elem.firstChild ); + return siblings( elem.firstChild ); }, contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + if ( typeof elem.contentDocument !== "undefined" ) { + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { @@ -3014,9 +3198,10 @@ jQuery.each({ } if ( this.length > 1 ) { + // Remove duplicates if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); + jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives @@ -3027,20 +3212,17 @@ jQuery.each({ return this.pushStack( matched ); }; -}); -var rnotwhite = (/\S+/g); +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache +// Convert String-formatted options into Object-formatted ones function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; - }); + } ); return object; } @@ -3071,156 +3253,186 @@ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : + createOptions( options ) : jQuery.extend( {}, options ); - var // Last fire value (for non-forgettable lists) + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists memory, + // Flag to know if list was already fired fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, + + // Flag to prevent firing + locked, + // Actual callback list list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } } } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { list = []; + + // Otherwise, this object is spent } else { - self.disable(); + list = ""; } } }, + // Actual Callbacks object self = { + // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { + if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } - } else if ( arg && arg.length && type !== "string" ) { + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + // Inspect recursively add( arg ); } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); } } return this; }, + // Remove a callback from the list remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; } - }); - } + } + } ); return this; }, + // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; }, + // Remove all callbacks from the list empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); + if ( list ) { + list = []; } return this; }, - // Is it locked? - locked: function() { - return !stack; + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + // Call all callbacks with the given context and arguments fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { + if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); + queue.push( args ); + if ( !firing ) { + fire(); } } return this; }, + // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, + // To know if the callbacks have already been called at least once fired: function() { return !!fired; @@ -3231,14 +3443,59 @@ jQuery.Callbacks = function( options ) { }; -jQuery.extend({ +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { Deferred: function( func ) { var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { @@ -3249,27 +3506,206 @@ jQuery.extend({ deferred.done( arguments ).fail( arguments ); return this; }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); + "catch": function( fn ) { + return promise.then( null, fn ); }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { @@ -3278,34 +3714,60 @@ jQuery.extend({ }, deferred = {}; - // Keep pipe for back-compat - promise.pipe = promise.then; - // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], - stateString = tuple[ 3 ]; + stateString = tuple[ 5 ]; - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; + list.add( + function() { - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); } - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); // Make the deferred a promise promise.promise( deferred ); @@ -3320,70 +3782,101 @@ jQuery.extend({ }, // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), resolveValues = slice.call( arguments ), - length = resolveValues.length, - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + // the master Deferred + master = jQuery.Deferred(), - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { + // subordinate callback factory + updateFunc = function( i ) { return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); } }; - }, + }; - progressValues, progressContexts, resolveContexts; + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); } } - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); } - return deferred.promise(); + return master.promise(); } -}); +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + // The deferred used on DOM ready -var readyList; +var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); return this; }; -jQuery.extend({ +jQuery.extend( { + // Is the DOM ready to be used? Set to true once it occurs. isReady: false, @@ -3391,15 +3884,6 @@ jQuery.extend({ // the ready event fires. See #6781 readyWait: 1, - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - // Handle when the DOM is ready ready: function( wait ) { @@ -3418,77 +3902,64 @@ jQuery.extend({ // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } } -}); +} ); -/** - * The ready event handler and self cleanup method - */ +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); jQuery.ready(); } -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - readyList = jQuery.Deferred(); + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // We once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); +} else { - } else { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values - if ( jQuery.type( key ) === "object" ) { + if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; - if ( !jQuery.isFunction( value ) ) { + if ( !isFunction( value ) ) { raw = true; } if ( bulk ) { + // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); @@ -3505,127 +3976,126 @@ var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGe if ( fn ) { for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); } } } - return chainable ? - elems : + if ( chainable ) { + return elems; + } - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; }; -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any - /* jshint -W018 */ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; -function Data() { - // Support: Android<4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); + +function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; -Data.accepts = jQuery.acceptData; Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; // If not, create one - if ( !unlock ) { - unlock = Data.uid++; + if ( !value ) { + value = {}; - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { - // Support: Android<4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } } } - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; + return value; }, set: function( owner, data, value ) { var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; + cache = this.cache( owner ); // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { - cache[ data ] = value; + cache[ camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - return key === undefined ? - cache : cache[ key ]; + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; }, access: function( owner, key, value ) { - var stored; + // In cases where either: // // 1. No key was specified @@ -3638,15 +4108,12 @@ Data.prototype = { // 2. The data stored at the key // if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { + ( ( key && typeof key === "string" ) && value === undefined ) ) { - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); + return this.get( owner, key ); } - // [*]When the key is not a string, or both a key and value + // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties @@ -3659,57 +4126,60 @@ Data.prototype = { return value !== undefined ? value : key; }, remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; + var i, + cache = owner[ this.expando ]; - if ( key === undefined ) { - this.cache[ unlock ] = {}; + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { - } else { // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); } - i = name.length; + i = key.length; + while ( i-- ) { - delete cache[ name[ i ] ]; + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; } } }, hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; -var data_priv = new Data(); +var dataPriv = new Data(); -var data_user = new Data(); +var dataUser = new Data(); @@ -3724,7 +4194,32 @@ var data_user = new Data(); // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} function dataAttr( elem, key, data ) { var name; @@ -3732,22 +4227,16 @@ function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} + data = getData( data ); + } catch ( e ) {} // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); + dataUser.set( elem, key, data ); } else { data = undefined; } @@ -3755,31 +4244,31 @@ function dataAttr( elem, key, data ) { return data; } -jQuery.extend({ +jQuery.extend( { hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { - return data_user.access( elem, name, data ); + return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { - data_user.remove( elem, name ); + dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. + // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); + return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { - data_priv.remove( elem, name ); + dataPriv.remove( elem, name ); } -}); +} ); -jQuery.fn.extend({ +jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], @@ -3788,23 +4277,23 @@ jQuery.fn.extend({ // Gets all values if ( key === undefined ) { if ( this.length ) { - data = data_user.get( elem ); + data = dataUser.get( elem ); - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { - // Support: IE11+ + // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); + name = camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } - data_priv.set( elem, "hasDataAttrs", true ); + dataPriv.set( elem, "hasDataAttrs", true ); } } @@ -3813,14 +4302,13 @@ jQuery.fn.extend({ // Sets multiple values if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); + return this.each( function() { + dataUser.set( this, key ); + } ); } return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); + var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the @@ -3828,23 +4316,17 @@ jQuery.fn.extend({ // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); + data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } @@ -3854,46 +4336,34 @@ jQuery.fn.extend({ } // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); + this.each( function() { - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); + return this.each( function() { + dataUser.remove( this, key ); + } ); } -}); +} ); -jQuery.extend({ +jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); + queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } @@ -3940,15 +4410,15 @@ jQuery.extend({ // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); } -}); +} ); -jQuery.fn.extend({ +jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; @@ -3959,30 +4429,31 @@ jQuery.fn.extend({ } if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); + return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : - this.each(function() { + this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); - if ( type === "fx" && queue[0] !== "inprogress" ) { + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } - }); + } ); }, dequeue: function( type ) { - return this.each(function() { + return this.each( function() { jQuery.dequeue( this, type ); - }); + } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, + // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { @@ -4004,7 +4475,7 @@ jQuery.fn.extend({ type = type || "fx"; while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); @@ -4013,28 +4484,405 @@ jQuery.fn.extend({ resolve(); return defer.promise( obj ); } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; }; -var rcheckableType = (/^(?:checkbox|radio)$/i); +var swap = function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; -(function() { + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // Support: IE <=9 only + option: [ 1, "<select multiple='multiple'>", "</select>" ], + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting <tbody> or other required elements. + thead: [ 1, "<table>", "</table>" ], + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + _default: [ 0, "", "" ] +}; + +// Support: IE <=9 only +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); - // Support: Safari<=5.1 + // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) @@ -4044,27 +4892,21 @@ var rcheckableType = (/^(?:checkbox|radio)$/i); div.appendChild( input ); - // Support: Safari<=5.1, Android<4.2 + // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - // Support: IE<=11+ + // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; +} )(); var rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; @@ -4074,12 +4916,86 @@ function returnFalse() { return false; } +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. @@ -4093,7 +5009,7 @@ jQuery.event = { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); + elemData = dataPriv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { @@ -4107,31 +5023,38 @@ jQuery.event = { selector = handleObjIn.selector; } + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { + if ( !( events = elemData.events ) ) { events = elemData.events = {}; } - if ( !(eventHandle = elemData.handle) ) { + if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { @@ -4148,7 +5071,7 @@ jQuery.event = { special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers - handleObj = jQuery.extend({ + handleObj = jQuery.extend( { type: type, origType: origType, data: data, @@ -4156,18 +5079,20 @@ jQuery.event = { guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") + namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { + if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); + elem.addEventListener( type, eventHandle ); } } } @@ -4199,19 +5124,19 @@ jQuery.event = { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - if ( !elemData || !(events = elemData.events) ) { + if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { @@ -4224,7 +5149,8 @@ jQuery.event = { special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; @@ -4234,7 +5160,8 @@ jQuery.event = { if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { @@ -4249,7 +5176,9 @@ jQuery.event = { // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); } @@ -4257,158 +5186,29 @@ jQuery.event = { } } - // Remove the expando if it's no longer used + // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); + dataPriv.remove( elem, "handle events" ); } }, - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { + dispatch: function( nativeEvent ) { // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); + var event = jQuery.event.fix( nativeEvent ); - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired @@ -4421,24 +5221,26 @@ jQuery.event = { // Run delegates first; they may want to stop propagation beneath us i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { + if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } @@ -4456,173 +5258,148 @@ jQuery.event = { }, handlers: function( event, handlers ) { - var i, matches, sel, handleObj, + var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers - // Black-hole SVG <use> instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG <use> instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { + // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } - if ( matches[ sel ] ) { - matches.push( handleObj ); + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); } } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers + cur = this; if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, - fixHooks: {}, + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); } - - return event; - } + } ); }, - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); }, special: { load: { + // Prevent triggered image.load events from bubbling to window.load noBubble: true }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; }, - // For cross-browser consistency, don't fire native .click() on links + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); } }, @@ -4636,41 +5413,108 @@ jQuery.event = { } } } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } } }; +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + return result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); + elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { + if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } @@ -4683,11 +5527,22 @@ jQuery.Event = function( src, props ) { // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && - // Support: Android<4.0 + + // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + // Event type } else { this.type = src; @@ -4699,25 +5554,27 @@ jQuery.Event = function( src, props ) { } // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); + this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { + constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, + isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; - if ( e && e.preventDefault ) { + if ( e && !this.isSimulated ) { e.preventDefault(); } }, @@ -4726,7 +5583,7 @@ jQuery.Event.prototype = { this.isPropagationStopped = returnTrue; - if ( e && e.stopPropagation ) { + if ( e && !this.isSimulated ) { e.stopPropagation(); } }, @@ -4735,7 +5592,7 @@ jQuery.Event.prototype = { this.isImmediatePropagationStopped = returnTrue; - if ( e && e.stopImmediatePropagation ) { + if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } @@ -4743,9 +5600,104 @@ jQuery.Event.prototype = { } }; +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + delegateType: delegateType + }; +} ); + // Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", @@ -4761,9 +5713,9 @@ jQuery.each({ related = event.relatedTarget, handleObj = event.handleObj; - // For mousenter/leave call the handler if related is outside the target. + // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; @@ -4771,115 +5723,33 @@ jQuery.each({ return ret; } }; -}); +} ); -// Support: Firefox, Chrome, Safari -// Create "bubbling" focus and blur events -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { +jQuery.fn.extend( { - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); + return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { + // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); @@ -4887,6 +5757,7 @@ jQuery.fn.extend({ return this; } if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) fn = selector; selector = undefined; @@ -4894,96 +5765,57 @@ jQuery.fn.extend({ if ( fn === false ) { fn = returnFalse; } - return this.each(function() { + return this.each( function() { jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } + } ); } -}); +} ); var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, + + /* eslint-disable max-len */ + + // See https://github.com/eslint/eslint/issues/3229 + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, + + /* eslint-enable */ + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /<script|<style|<link/i, + // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE9 - option: [ 1, "<select multiple='multiple'>", "</select>" ], - - thead: [ 1, "<table>", "</table>" ], - col: [ 2, "<table><colgroup>", "</colgroup></table>" ], - tr: [ 2, "<table><tbody>", "</tbody></table>" ], - td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - - _default: [ 0, "", "" ] - }; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody +// Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); } else { - elem.removeAttribute("type"); + elem.removeAttribute( "type" ); } return elem; } -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; @@ -4992,9 +5824,9 @@ function cloneCopyEvent( src, dest ) { } // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.access( src ); + pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { @@ -5010,24 +5842,14 @@ function cloneCopyEvent( src, dest ) { } // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); - data_user.set( dest, udataCur ); + dataUser.set( dest, udataCur ); } } -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); @@ -5042,17 +5864,134 @@ function fixInput( src, dest ) { } } -jQuery.extend({ +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + } ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html.replace( rxhtmlTag, "<$1></$2>" ); + }, + clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); + inPage = isAttached( elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); @@ -5085,102 +6024,14 @@ jQuery.extend({ return clone; }, - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - cleanData: function( elems ) { - var data, elem, type, key, + var data, elem, type, special = jQuery.event.special, i = 0; - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { @@ -5192,91 +6043,82 @@ jQuery.extend({ } } } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; } } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; } } -}); +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, -jQuery.fn.extend({ text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : - this.empty().each(function() { + this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } - }); + } ); }, null, value, arguments.length ); }, append: function() { - return this.domManip( arguments, function( elem ) { + return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } - }); + } ); }, prepend: function() { - return this.domManip( arguments, function( elem ) { + return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } - }); + } ); }, before: function() { - return this.domManip( arguments, function( elem ) { + return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } - }); + } ); }, after: function() { - return this.domManip( arguments, function( elem ) { + return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; + } ); }, empty: function() { var elem, i = 0; - for ( ; (elem = this[i]) != null; i++ ) { + for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks @@ -5294,9 +6136,9 @@ jQuery.fn.extend({ dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - return this.map(function() { + return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); + } ); }, html: function( value ) { @@ -5313,7 +6155,7 @@ jQuery.fn.extend({ if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - value = value.replace( rxhtmlTag, "<$1></$2>" ); + value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { @@ -5329,7 +6171,7 @@ jQuery.fn.extend({ elem = 0; // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} + } catch ( e ) {} } if ( elem ) { @@ -5339,115 +6181,25 @@ jQuery.fn.extend({ }, replaceWith: function() { - var arg = arguments[ 0 ]; + var ignored = []; - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); } } - } - return this; + // Force callback invocation + }, ignored ); } -}); +} ); -jQuery.each({ +jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", @@ -5465,117 +6217,154 @@ jQuery.each({ elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); - - // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse - doc = iframe[ 0 ].contentDocument; - - // Support: IE - doc.write(); - doc.close(); - - display = actualDisplay( nodeName, doc ); - iframe.detach(); - } - - // Store the correct default display - elemdisplay[ nodeName ] = display; - } - - return display; -} -var rmargin = (/^margin/); - +} ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { - // Support: IE<=11+, Firefox<=30+ (#15098, #14150) + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - if ( elem.ownerDocument.defaultView.opener ) { - return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; } - return window.getComputedStyle( elem, null ); + return view.getComputedStyle( elem ); }; +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + } + } ); +} )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements style = elem.style; computed = computed || getStyles( elem ); - // Support: IE9 - // getPropertyValue is only needed for .css('filter') (#12537) + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; - } - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + if ( ret === "" && !isAttached( elem ) ) { ret = jQuery.style( elem, name ); } - // Support: iOS < 6 // A tribute to the "awesome hack by Dean Edwards" - // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { // Remember the original values width = style.width; @@ -5594,7 +6383,8 @@ function curCSS( elem, name, computed ) { } return ret !== undefined ? - // Support: IE + + // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; @@ -5602,10 +6392,12 @@ function curCSS( elem, name, computed ) { function addGetHookIf( conditionFn, hookFn ) { + // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { + // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; @@ -5613,304 +6405,206 @@ function addGetHookIf( conditionFn, hookFn ) { } // Hook needed; redefine it so that the support test is not executed again. - return (this.get = hookFn).apply( this, arguments ); + return ( this.get = hookFn ).apply( this, arguments ); } }; } -(function() { - var pixelPositionVal, boxSizingReliableVal, - docElem = document.documentElement, - container = document.createElement( "div" ), - div = document.createElement( "div" ); +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; - if ( !div.style ) { - return; - } - - // Support: IE9-11+ - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" + - "position:absolute"; - container.appendChild( div ); - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computePixelPositionAndBoxSizingReliable() { - div.style.cssText = - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + - "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + - "border:1px;padding:1px;width:4px;position:absolute"; - div.innerHTML = ""; - docElem.appendChild( container ); - - var divStyle = window.getComputedStyle( div, null ); - pixelPositionVal = divStyle.top !== "1%"; - boxSizingReliableVal = divStyle.width === "4px"; - - docElem.removeChild( container ); - } - - // Support: node.js jsdom - // Don't assume that getComputedStyle is a property of the global object - if ( window.getComputedStyle ) { - jQuery.extend( support, { - pixelPosition: function() { - - // This test is executed only once but we still do memoizing - // since we can use the boxSizingReliable pre-computing. - // No need to check if the test was already performed, though. - computePixelPositionAndBoxSizingReliable(); - return pixelPositionVal; - }, - boxSizingReliable: function() { - if ( boxSizingReliableVal == null ) { - computePixelPositionAndBoxSizingReliable(); - } - return boxSizingReliableVal; - }, - reliableMarginRight: function() { - - // Support: Android 2.3 - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - // This support function is only executed once so no memoizing is needed. - var ret, - marginDiv = div.appendChild( document.createElement( "div" ) ); - - // Reset CSS: box-sizing; display; margin; border; padding - marginDiv.style.cssText = div.style.cssText = - // Support: Firefox<29, Android 2.3 - // Vendor-prefix box-sizing - "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + - "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - docElem.appendChild( container ); - - ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight ); - - docElem.removeChild( container ); - div.removeChild( marginDiv ); - - return ret; - } - }); - } -})(); - - -// A method for quickly swapping in/out CSS properties to get correct calculations. -jQuery.swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var - // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }, - - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// Return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // Shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { // Check for vendor prefixed names - var capName = name[0].toUpperCase() + name.slice(1), - origName = name, + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; - if ( name in style ) { + if ( name in emptyStyle ) { return name; } } - - return origName; } +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; - val = 0; + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } for ( ; i < 4; i += 2 ) { - // Both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } - // At this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" } else { - // At this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - // At this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } - return val; + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; } -function getWidthOrHeight( elem, name, extra ) { +function getWidthOrHeight( elem, dimension, extra ) { - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + // Start with computed style + var styles = getStyles( elem ), - // Some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { return val; } - - // Check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && - ( support.boxSizingReliable() || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; + val = "auto"; } - // Use the active box-sizing model to add/subtract irrelevant styles + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + // Support: IE 9-11 only + // Also use offsetWidth/offsetHeight for when box sizing is unreliable + // We use getClientRects() to check for hidden/disconnected. + // In those cases, the computed value can be trusted to be border-box + if ( ( !support.boxSizingReliable() && isBorderBox || + val === "auto" || + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model return ( val + - augmentWidthOrHeight( + boxModelAdjustment( elem, - name, + dimension, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, - styles + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val ) ) + "px"; } -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = data_priv.get( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) ); - } - } else { - hidden = isHidden( elem ); - - if ( display !== "none" || !hidden ) { - data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.extend({ +jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property @@ -5929,11 +6623,19 @@ jQuery.extend({ // Don't automatically add "px" to these possibly-unitless properties cssNumber: { + "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, "lineHeight": true, "opacity": true, "order": true, @@ -5945,9 +6647,7 @@ jQuery.extend({ // Add in properties whose names you wish to fix before // setting or getting the value - cssProps: { - "float": "cssFloat" - }, + cssProps: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { @@ -5959,10 +6659,16 @@ jQuery.extend({ // Make sure that we're working with the right name var ret, type, hooks, - origName = jQuery.camelCase( name ), + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), style = elem.style; - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; @@ -5972,8 +6678,9 @@ jQuery.extend({ type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + // Fixes bug #9237 type = "number"; } @@ -5983,25 +6690,35 @@ jQuery.extend({ return; } - // If a number, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } - // Support: IE9-11+ // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - style[ name ] = value; + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } } } else { + // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + return ret; } @@ -6012,10 +6729,15 @@ jQuery.extend({ css: function( elem, name, extra, styles ) { var val, num, hooks, - origName = jQuery.camelCase( name ); + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; @@ -6038,54 +6760,98 @@ jQuery.extend({ // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + return extra === true || isFinite( num ) ? num || 0 : val; } + return val; } -}); +} ); -jQuery.each([ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { +jQuery.each( [ "height", "width" ], function( i, dimension ) { + jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? - jQuery.swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); - }) : - getWidthOrHeight( elem, name, extra ); + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); } }, set: function( elem, value, extra ) { - var styles = extra && getStyles( elem ); - return setPositiveNumber( elem, value, extra ? - augmentWidthOrHeight( - elem, - name, - extra, + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles - ) : 0 - ); + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); } }; -}); +} ); -// Support: Android 2.3 -jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { - return jQuery.swap( elem, { "display": "inline-block" }, - curCSS, [ elem, "marginRight" ] ); + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; } } ); // These hooks are used by animate to expand properties -jQuery.each({ +jQuery.each( { margin: "", padding: "", border: "Width" @@ -6096,7 +6862,7 @@ jQuery.each({ expanded = {}, // Assumes a single number if not a string - parts = typeof value === "string" ? value.split(" ") : [ value ]; + parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = @@ -6107,19 +6873,19 @@ jQuery.each({ } }; - if ( !rmargin.test( prefix ) ) { + if ( prefix !== "margin" ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } -}); +} ); -jQuery.fn.extend({ +jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; - if ( jQuery.isArray( name ) ) { + if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; @@ -6134,27 +6900,8 @@ jQuery.fn.extend({ jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); } -}); +} ); function Tween( elem, options, prop, end, easing ) { @@ -6167,7 +6914,7 @@ Tween.prototype = { init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; - this.easing = easing || "swing"; + this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; @@ -6213,8 +6960,10 @@ Tween.propHooks = { get: function( tween ) { var result; - if ( tween.elem[ tween.prop ] != null && - (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } @@ -6223,16 +6972,20 @@ Tween.propHooks = { // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { + // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; @@ -6241,7 +6994,7 @@ Tween.propHooks = { } }; -// Support: IE9 +// Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { @@ -6257,80 +7010,41 @@ jQuery.easing = { }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; - } + }, + _default: "swing" }; jQuery.fx = Tween.prototype.init; -// Back Compat <1.8 extension point +// Back compat <1.8 extension point jQuery.fx.step = {}; var - fxNow, timerId, + fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, - rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ), - rrun = /queueHooks$/, - animationPrefilters = [ defaultPrefilter ], - tweeners = { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ), - target = tween.cur(), - parts = rfxnum.exec( value ), - unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + rrun = /queueHooks$/; - // Starting value computation is required for potential unit mismatches - start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && - rfxnum.exec( jQuery.css( tween.elem, prop ) ), - scale = 1, - maxIterations = 20; +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } - if ( start && start[ 3 ] !== unit ) { - // Trust units reported by jQuery.css - unit = unit || start[ 3 ]; - - // Make sure we update the tween properties later on - parts = parts || []; - - // Iteratively approximate from a nonzero starting point - start = +target || 1; - - do { - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - start = start / scale; - jQuery.style( tween.elem, prop, start + unit ); - - // Update scale, tolerating zero or NaN from tween.cur(), - // break the loop if scale is unchanged or perfect, or if we've just had enough - } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); - } - - // Update tween properties - if ( parts ) { - start = tween.start = +start || +target || 0; - tween.unit = unit; - // If a +=/-= token was provided, we're doing a relative animation - tween.end = parts[ 1 ] ? - start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : - +parts[ 2 ]; - } - - return tween; - } ] - }; + jQuery.fx.tick(); + } +} // Animations created synchronously will run synchronously function createFxNow() { - setTimeout(function() { + window.setTimeout( function() { fxNow = undefined; - }); - return ( fxNow = jQuery.now() ); + } ); + return ( fxNow = Date.now() ); } // Generate parameters to create a standard animation @@ -6342,7 +7056,7 @@ function genFx( type, includeWidth ) { // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4 ; i += 2 - includeWidth ) { + for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } @@ -6356,11 +7070,11 @@ function genFx( type, includeWidth ) { function createTween( value, prop, animation ) { var tween, - collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { - if ( (tween = collection[ index ].call( animation, prop, value )) ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; @@ -6369,15 +7083,15 @@ function createTween( value, prop, animation ) { } function defaultPrefilter( elem, props, opts ) { - /* jshint validthis: true */ - var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, - hidden = elem.nodeType && isHidden( elem ), - dataShow = data_priv.get( elem, "fxshow" ); + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); - // Handle queue: false promises + // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { @@ -6391,113 +7105,152 @@ function defaultPrefilter( elem, props, opts ) { } hooks.unqueued++; - anim.always(function() { + anim.always( function() { + // Ensure the complete handler is called before this completes - anim.always(function() { + anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } - }); - }); + } ); + } ); } - // Height/width overflow pass - if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { - // Make sure that nothing sneaks out - // Record all 3 overflow attributes because IE9-10 do not - // change the overflow attribute when overflowX and - // overflowY are set to the same value - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Set display property to inline-block for height/width - // animations on inline elements that are having width/height animated - display = jQuery.css( elem, "display" ); - - // Test default display if display is currently "none" - checkDisplay = display === "none" ? - data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; - - if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { - style.display = "inline-block"; - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always(function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - }); - } - - // show/hide pass + // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; - if ( rfxtypes.exec( value ) ) { + if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { - // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; + + // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - - // Any non-fx value stops us from restoring the original display value - } else { - display = undefined; } } - if ( !jQuery.isEmptyObject( orig ) ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); } - } else { - dataShow = data_priv.access( elem, "fxshow", {} ); } - // Store state if its toggle - enables .stop().toggle() to "reverse" - if ( toggle ) { - dataShow.hidden = !hidden; - } - if ( hidden ) { - jQuery( elem ).show(); - } else { - anim.done(function() { - jQuery( elem ).hide(); - }); - } - anim.done(function() { - var prop; + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { - data_priv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - }); - for ( prop in orig ) { - tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = tween.start; - if ( hidden ) { - tween.end = tween.start; - tween.start = prop === "width" || prop === "height" ? 1 : 0; + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } } + style.display = "inline-block"; } } + } - // If this is a noop like .hide().hide(), restore an overwritten display value - } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) { - style.display = display; + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } } } @@ -6506,10 +7259,10 @@ function propFilter( props, specialEasing ) { // camelCase, specialEasing and expand cssHook pass for ( index in props ) { - name = jQuery.camelCase( index ); + name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; - if ( jQuery.isArray( value ) ) { + if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } @@ -6542,41 +7295,53 @@ function Animation( elem, properties, options ) { var result, stopped, index = 0, - length = animationPrefilters.length, + length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { + // Don't match elem in the :animated selector delete tick.elem; - }), + } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - // Support: Android 2.3 + + // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } - deferred.notifyWith( elem, [ animation, percent, remaining ]); + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + // If there's more to do, yield if ( percent < 1 && length ) { return remaining; - } else { - deferred.resolveWith( elem, [ animation ] ); - return false; } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; }, - animation = deferred.promise({ + animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { specialEasing: {} }, options ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), @@ -6590,6 +7355,7 @@ function Animation( elem, properties, options ) { }, stop: function( gotoEnd ) { var index = 0, + // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; @@ -6597,91 +7363,121 @@ function Animation( elem, properties, options ) { return this; } stopped = true; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } - }), + } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); - for ( ; index < length ; index++ ) { - result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } return result; } } jQuery.map( props, createTween, animation ); - if ( jQuery.isFunction( animation.opts.start ) ) { + if ( isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue - }) + } ) ); - // attach callbacks from options - return animation.progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); + return animation; } jQuery.Animation = jQuery.extend( Animation, { + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { + if ( isFunction( props ) ) { callback = props; props = [ "*" ]; } else { - props = props.split(" "); + props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; - for ( ; index < length ; index++ ) { + for ( ; index < length; index++ ) { prop = props[ index ]; - tweeners[ prop ] = tweeners[ prop ] || []; - tweeners[ prop ].unshift( callback ); + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); } }, + prefilters: [ defaultPrefilter ], + prefilter: function( callback, prepend ) { if ( prepend ) { - animationPrefilters.unshift( callback ); + Animation.prefilters.unshift( callback ); } else { - animationPrefilters.push( callback ); + Animation.prefilters.push( callback ); } } -}); +} ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, + isFunction( speed ) && speed, duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + easing: fn && easing || easing && !isFunction( easing ) && easing }; - opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : - opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { @@ -6692,7 +7488,7 @@ jQuery.speed = function( speed, easing, fn ) { opt.old = opt.complete; opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { + if ( isFunction( opt.old ) ) { opt.old.call( this ); } @@ -6704,24 +7500,25 @@ jQuery.speed = function( speed, easing, fn ) { return opt; }; -jQuery.fn.extend({ +jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 - return this.filter( isHidden ).css( "opacity", 0 ).show() + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified - .end().animate({ opacity: to }, speed, easing, callback ); + .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately - if ( empty || data_priv.get( this, "finish" ) ) { + if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; @@ -6747,11 +7544,11 @@ jQuery.fn.extend({ this.queue( type || "fx", [] ); } - return this.each(function() { + return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, - data = data_priv.get( this ); + data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { @@ -6766,7 +7563,9 @@ jQuery.fn.extend({ } for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); @@ -6779,15 +7578,15 @@ jQuery.fn.extend({ if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } - }); + } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } - return this.each(function() { + return this.each( function() { var index, - data = data_priv.get( this ), + data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, @@ -6820,24 +7619,24 @@ jQuery.fn.extend({ // Turn off finishing flag delete data.finish; - }); + } ); } -}); +} ); -jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { +jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; -}); +} ); // Generate shortcuts for custom animations -jQuery.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } @@ -6845,7 +7644,7 @@ jQuery.each({ jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; -}); +} ); jQuery.timers = []; jQuery.fx.tick = function() { @@ -6853,11 +7652,12 @@ jQuery.fx.tick = function() { i = 0, timers = jQuery.timers; - fxNow = jQuery.now(); + fxNow = Date.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; - // Checks the timer has not already been removed + + // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } @@ -6871,167 +7671,138 @@ jQuery.fx.tick = function() { jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); - if ( timer() ) { - jQuery.fx.start(); - } else { - jQuery.timers.pop(); - } + jQuery.fx.start(); }; jQuery.fx.interval = 13; - jQuery.fx.start = function() { - if ( !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + if ( inProgress ) { + return; } + + inProgress = true; + schedule(); }; jQuery.fx.stop = function() { - clearInterval( timerId ); - timerId = null; + inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, + // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. -// http://blindsignals.com/index.php/2009/07/jquery-delay/ +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); + var timeout = window.setTimeout( next, time ); hooks.stop = function() { - clearTimeout( timeout ); + window.clearTimeout( timeout ); }; - }); + } ); }; -(function() { +( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; - // Support: iOS<=5.1, Android<=4.2+ + // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; - // Support: IE<=11+ + // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; - // Support: Android<=2.3 - // Options inside disabled selects are incorrectly marked as disabled - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<=11+ + // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; -})(); +} )(); -var nodeHook, boolHook, +var boolHook, attrHandle = jQuery.expr.attrHandle; -jQuery.fn.extend({ +jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { - return this.each(function() { + return this.each( function() { jQuery.removeAttr( this, name ); - }); + } ); } -}); +} ); -jQuery.extend({ +jQuery.extend( { attr: function( elem, name, value ) { - var hooks, ret, + var ret, hooks, nType = elem.nodeType; - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === strundefined ) { + if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } - // All attributes are lowercase + // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { - if ( value === null ) { jQuery.removeAttr( elem, name ); + return; + } - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; } - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; } - }, - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( rnotwhite ); + ret = jQuery.find.attr( elem, name ); - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - elem[ propName ] = false; - } - - elem.removeAttribute( name ); - } - } + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && - jQuery.nodeName( elem, "input" ) ) { + nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { @@ -7041,13 +7812,29 @@ jQuery.extend({ } } } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } } -}); +} ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { + // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { @@ -7056,100 +7843,150 @@ boolHook = { return name; } }; + jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle; + var ret, handle, + lowercaseName = name.toLowerCase(); + if ( !isXML ) { + // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ name ]; - attrHandle[ name ] = ret; + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? - name.toLowerCase() : + lowercaseName : null; - attrHandle[ name ] = handle; + attrHandle[ lowercaseName ] = handle; } return ret; }; -}); +} ); -var rfocusable = /^(?:input|select|textarea|button)$/i; +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; -jQuery.fn.extend({ +jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { - return this.each(function() { + return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; - }); + } ); } -}); - -jQuery.extend({ - propFix: { - "for": "htmlFor", - "class": "className" - }, +} ); +jQuery.extend( { prop: function( elem, name, value ) { - var ret, hooks, notxml, + var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + if ( nType === 3 || nType === 8 || nType === 2 ) { return; } - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; + return ( elem[ name ] = value ); } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { - return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ? - elem.tabIndex : - -1; + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; } } - } -}); + }, + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } } }; } -jQuery.each([ +jQuery.each( [ "tabIndex", "readOnly", "maxLength", @@ -7162,49 +7999,63 @@ jQuery.each([ "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; -}); +} ); -var rclass = /[\t\r\n\f]/g; + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } -jQuery.fn.extend({ + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { addClass: function( value ) { - var classes, elem, cur, clazz, j, finalValue, - proceed = typeof value === "string" && value, - i = 0, - len = this.length; + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); } - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( rnotwhite ) || []; + classes = classesToArray( value ); - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; - while ( (clazz = classes[j++]) ) { + while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } - // only assign if different to avoid unneeded rendering. - finalValue = jQuery.trim( cur ); - if ( elem.className !== finalValue ) { - elem.className = finalValue; + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); } } } @@ -7214,40 +8065,42 @@ jQuery.fn.extend({ }, removeClass: function( value ) { - var classes, elem, cur, clazz, j, finalValue, - proceed = arguments.length === 0 || typeof value === "string" && value, - i = 0, - len = this.length; + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); } - if ( proceed ) { - classes = ( value || "" ).match( rnotwhite ) || []; - for ( ; i < len; i++ ) { - elem = this[ i ]; + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; - while ( (clazz = classes[j++]) ) { + while ( ( clazz = classes[ j++ ] ) ) { + // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. - finalValue = value ? jQuery.trim( cur ) : ""; - if ( elem.className !== finalValue ) { - elem.className = finalValue; + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); } } } @@ -7257,27 +8110,34 @@ jQuery.fn.extend({ }, toggleClass: function( value, stateVal ) { - var type = typeof value; + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); - if ( typeof stateVal === "boolean" && type === "string" ) { + if ( typeof stateVal === "boolean" && isValidValue ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); } - return this.each(function() { - if ( type === "string" ) { - // Toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( rnotwhite ) || []; + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { - while ( (className = classNames[ i++ ]) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); @@ -7287,75 +8147,91 @@ jQuery.fn.extend({ } // Toggle whole class name - } else if ( type === strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - data_priv.set( this, "__className__", this.className ); + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || ""; + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } } - }); + } ); }, hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; } } return false; } -}); +} ); var rreturn = /\r/g; -jQuery.fn.extend({ +jQuery.fn.extend( { val: function( value ) { - var hooks, ret, isFunction, - elem = this[0]; + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { return ret; } ret = elem.value; - return typeof ret === "string" ? - // Handle most common string cases - ret.replace(rreturn, "") : - // Handle cases where value is null/undef or number - ret == null ? "" : ret; + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; } return; } - isFunction = jQuery.isFunction( value ); + valueIsFunction = isFunction( value ); - return this.each(function( i ) { + return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } - if ( isFunction ) { + if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; @@ -7368,55 +8244,66 @@ jQuery.fn.extend({ } else if ( typeof val === "number" ) { val += ""; - } else if ( jQuery.isArray( val ) ) { + } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; - }); + } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } - }); + } ); } -}); +} ); -jQuery.extend({ +jQuery.extend( { valHooks: { option: { get: function( elem ) { + var val = jQuery.find.attr( elem, "value" ); return val != null ? val : - // Support: IE10-11+ + + // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) - jQuery.trim( jQuery.text( elem ) ); + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { - var value, option, + var value, option, i, options = elem.options, index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, + one = elem.type === "select-one", values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; - // IE6-9 doesn't update selected after form reset (#2551) + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup - ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); @@ -7442,9 +8329,16 @@ jQuery.extend({ while ( i-- ) { option = options[ i ]; - if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) { + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { optionSet = true; } + + /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set @@ -7455,23 +8349,23 @@ jQuery.extend({ } } } -}); +} ); // Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { +jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute("value") === null ? "on" : elem.value; + return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } -}); +} ); @@ -7479,64 +8373,254 @@ jQuery.each([ "radio", "checkbox" ], function() { // Return jQuery for attributes-only inclusion -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { +support.focusin = "onfocusin" in window; - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); }; -}); -jQuery.fn.extend({ - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; }, - bind: function( types, data, fn ) { - return this.on( types, null, data, fn ); - }, - unbind: function( types, fn ) { - return this.off( types, null, fn ); - }, + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); - delegate: function( selector, types, data, fn ) { - return this.on( types, selector, data, fn ); - }, - undelegate: function( selector, types, fn ) { - // ( namespace ) or ( selector, types [, fn] ) - return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + jQuery.event.trigger( e, null, elem ); } -}); + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); -var nonce = jQuery.now(); +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { -var rquery = (/\?/); + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ); + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = Date.now(); + +var rquery = ( /\?/ ); -// Support: Android 2.3 -// Workaround failure to string-cast null input -jQuery.parseJSON = function( data ) { - return JSON.parse( data + "" ); -}; // Cross-browser xml parsing jQuery.parseXML = function( data ) { - var xml, tmp; + var xml; if ( !data || typeof data !== "string" ) { return null; } - // Support: IE9 + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. try { - tmp = new DOMParser(); - xml = tmp.parseFromString( data, "text/xml" ); + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) { xml = undefined; } @@ -7549,14 +8633,138 @@ jQuery.parseXML = function( data ) { var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, rhash = /#.*$/, - rts = /([?&])_=[^&]*/, + rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, - rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) @@ -7579,11 +8787,9 @@ var // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), - // Document location - ajaxLocation = window.location.href, - - // Segment location into parts - ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -7598,19 +8804,21 @@ function addToPrefiltersOrTransports( structure ) { var dataType, i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { - if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression - while ( (dataType = dataTypes[i++]) ) { + while ( ( dataType = dataTypes[ i++ ] ) ) { + // Prepend if requested - if ( dataType[0] === "+" ) { + if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; - (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { - (structure[ dataType ] = structure[ dataType ] || []).push( func ); + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } @@ -7628,14 +8836,16 @@ function inspectPrefiltersOrTransports( structure, options, originalOptions, jqX inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } - }); + } ); return selected; } @@ -7651,7 +8861,7 @@ function ajaxExtend( target, src ) { for ( key in src ) { if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { @@ -7675,7 +8885,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) { while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } @@ -7693,9 +8903,10 @@ function ajaxHandleResponses( s, jqXHR, responses ) { if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { + // Try convertible dataTypes for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } @@ -7703,6 +8914,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) { firstDataType = type; } } + // Or just use first one finalDataType = finalDataType || firstDataType; } @@ -7724,6 +8936,7 @@ function ajaxHandleResponses( s, jqXHR, responses ) { function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, + // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); @@ -7753,7 +8966,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { if ( current ) { - // There's only work to do if current dataType is non-auto + // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; @@ -7776,6 +8989,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { + // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; @@ -7795,13 +9009,16 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them - if ( conv && s[ "throws" ] ) { + if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { - return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; } } } @@ -7812,7 +9029,7 @@ function ajaxConvert( s, response, jqXHR, isSuccess ) { return { state: "success", data: response }; } -jQuery.extend({ +jQuery.extend( { // Counter for holding the number of active queries active: 0, @@ -7822,13 +9039,14 @@ jQuery.extend({ etag: {}, ajaxSettings: { - url: ajaxLocation, + url: location.href, type: "GET", - isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* timeout: 0, data: null, @@ -7850,9 +9068,9 @@ jQuery.extend({ }, contents: { - xml: /xml/, - html: /html/, - json: /json/ + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ }, responseFields: { @@ -7872,7 +9090,7 @@ jQuery.extend({ "text html": true, // Evaluate text as a json expression - "text json": jQuery.parseJSON, + "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML @@ -7917,39 +9135,58 @@ jQuery.extend({ options = options || {}; var transport, + // URL without anti-cache param cacheURL, + // Response headers responseHeadersString, responseHeaders, + // timeout handle timeoutTimer, - // Cross-domain detection vars - parts, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + // To know if global events are to be dispatched fireGlobals, + // Loop variable i, + + // uncached part of the url + uncached, + // Create the final options object s = jQuery.ajaxSetup( {}, options ), + // Callbacks context callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks("once memory"), + completeDeferred = jQuery.Callbacks( "once memory" ), + // Status-dependent callbacks statusCode = s.statusCode || {}, + // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, - // The jqXHR state - state = 0, + // Default abort message strAbort = "canceled", + // Fake xhr jqXHR = { readyState: 0, @@ -7957,28 +9194,30 @@ jQuery.extend({ // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; - if ( state === 2 ) { + if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; - while ( (match = rheaders.exec( responseHeadersString )) ) { - responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); } } - match = responseHeaders[ key.toLowerCase() ]; + match = responseHeaders[ key.toLowerCase() + " " ]; } - return match == null ? null : match; + return match == null ? null : match.join( ", " ); }, // Raw string getAllResponseHeaders: function() { - return state === 2 ? responseHeadersString : null; + return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { - var lname = name.toLowerCase(); - if ( !state ) { - name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; @@ -7986,7 +9225,7 @@ jQuery.extend({ // Overrides response content-type header overrideMimeType: function( type ) { - if ( !state ) { + if ( completed == null ) { s.mimeType = type; } return this; @@ -7996,14 +9235,16 @@ jQuery.extend({ statusCode: function( map ) { var code; if ( map ) { - if ( state < 2 ) { - for ( code in map ) { - // Lazy-add the new callback in a way that preserves old ones - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } else { + if ( completed ) { + // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } } } return this; @@ -8021,31 +9262,41 @@ jQuery.extend({ }; // Attach deferreds - deferred.promise( jqXHR ).complete = completeDeferred.add; - jqXHR.success = jqXHR.done; - jqXHR.error = jqXHR.fail; + deferred.promise( jqXHR ); - // Remove hash character (#7531: and string promotion) // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available - s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ) - .replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list - s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - // A cross-domain request is in order when we have a protocol:host:port mismatch + // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { - parts = rurl.exec( s.url.toLowerCase() ); - s.crossDomain = !!( parts && - ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || - ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== - ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) - ); + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } } // Convert data if not already a string @@ -8057,7 +9308,7 @@ jQuery.extend({ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there - if ( state === 2 ) { + if ( completed ) { return jqXHR; } @@ -8067,7 +9318,7 @@ jQuery.extend({ // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger("ajaxStart"); + jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type @@ -8078,28 +9329,36 @@ jQuery.extend({ // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on - cacheURL = s.url; + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { - // If data is available, append data to url - if ( s.data ) { - cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + // #9682: remove data so that it's not used in an eventual retry delete s.data; } - // Add anti-cache in url if needed + // Add or update anti-cache param if needed if ( s.cache === false ) { - s.url = rts.test( cacheURL ) ? - - // If there is already a '_' parameter, set its value - cacheURL.replace( rts, "$1_=" + nonce++ ) : - - // Otherwise add one to the end - cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. @@ -8120,8 +9379,9 @@ jQuery.extend({ // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? - s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); @@ -8131,7 +9391,9 @@ jQuery.extend({ } // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + // Abort if not done already and return return jqXHR.abort(); } @@ -8140,9 +9402,9 @@ jQuery.extend({ strAbort = "abort"; // Install callbacks on deferreds - for ( i in { success: 1, error: 1, complete: 1 } ) { - jqXHR[ i ]( s[ i ] ); - } + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); @@ -8157,24 +9419,31 @@ jQuery.extend({ if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + // Timeout if ( s.async && s.timeout > 0 ) { - timeoutTimer = setTimeout(function() { - jqXHR.abort("timeout"); + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); }, s.timeout ); } try { - state = 1; + completed = false; transport.send( requestHeaders, done ); } catch ( e ) { - // Propagate exception as error if not done - if ( state < 2 ) { - done( -1, e ); - // Simply rethrow otherwise - } else { + + // Rethrow post-completion exceptions + if ( completed ) { throw e; } + + // Propagate others as results + done( -1, e ); } } @@ -8183,17 +9452,16 @@ jQuery.extend({ var isSuccess, success, error, response, modified, statusText = nativeStatusText; - // Called once - if ( state === 2 ) { + // Ignore repeat invocations + if ( completed ) { return; } - // State is "done" now - state = 2; + completed = true; // Clear timeout if it exists if ( timeoutTimer ) { - clearTimeout( timeoutTimer ); + window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection @@ -8222,11 +9490,11 @@ jQuery.extend({ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { - modified = jqXHR.getResponseHeader("Last-Modified"); + modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } - modified = jqXHR.getResponseHeader("etag"); + modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } @@ -8248,6 +9516,7 @@ jQuery.extend({ isSuccess = !error; } } else { + // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { @@ -8283,9 +9552,10 @@ jQuery.extend({ if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter if ( !( --jQuery.active ) ) { - jQuery.event.trigger("ajaxStop"); + jQuery.event.trigger( "ajaxStop" ); } } } @@ -8300,51 +9570,62 @@ jQuery.extend({ getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } -}); +} ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { + // Shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { + if ( isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } - return jQuery.ajax({ + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback - }); + }, jQuery.isPlainObject( url ) && url ) ); }; -}); +} ); -jQuery._evalUrl = function( url ) { - return jQuery.ajax({ +jQuery._evalUrl = function( url, options ) { + return jQuery.ajax( { url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", + cache: true, async: false, global: false, - "throws": true - }); + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options ); + } + } ); }; -jQuery.fn.extend({ +jQuery.fn.extend( { wrapAll: function( html ) { var wrap; - if ( jQuery.isFunction( html ) ) { - return this.each(function( i ) { - jQuery( this ).wrapAll( html.call(this, i) ); - }); - } - if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); @@ -8353,7 +9634,7 @@ jQuery.fn.extend({ wrap.insertBefore( this[ 0 ] ); } - wrap.map(function() { + wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { @@ -8361,20 +9642,20 @@ jQuery.fn.extend({ } return elem; - }).append( this ); + } ).append( this ); } return this; }, wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function( i ) { - jQuery( this ).wrapInner( html.call(this, i) ); - }); + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); } - return this.each(function() { + return this.each( function() { var self = jQuery( this ), contents = self.contents(); @@ -8384,184 +9665,73 @@ jQuery.fn.extend({ } else { self.append( html ); } - }); + } ); }, wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); + var htmlIsFunction = isFunction( html ); - return this.each(function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); }, - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; } -}); +} ); -jQuery.expr.filters.hidden = function( elem ) { - // Support: Opera <= 12.12 - // Opera reports offsetWidths and offsetHeights less than zero on some elements - return elem.offsetWidth <= 0 && elem.offsetHeight <= 0; +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); }; -jQuery.expr.filters.visible = function( elem ) { - return !jQuery.expr.filters.hidden( elem ); +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; -var r20 = /%20/g, - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( jQuery.isArray( obj ) ) { - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - // Item is non-scalar (array or object), encode its numeric index. - buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); - } - }); - - } else if ( !traditional && jQuery.type( obj ) === "object" ) { - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, value ) { - // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); - s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); - }; - - // Set traditional to true for jQuery <= 1.3.2 behavior. - if ( traditional === undefined ) { - traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - }); - - } else { - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ).replace( r20, "+" ); -}; - -jQuery.fn.extend({ - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map(function() { - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - }) - .filter(function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - }) - .map(function( i, elem ) { - var val = jQuery( this ).val(); - - return val == null ? - null : - jQuery.isArray( val ) ? - jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }) : - { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - }).get(); - } -}); - - jQuery.ajaxSettings.xhr = function() { try { - return new XMLHttpRequest(); - } catch( e ) {} + return new window.XMLHttpRequest(); + } catch ( e ) {} }; -var xhrId = 0, - xhrCallbacks = {}, - xhrSuccessStatus = { - // file protocol always yields status code 0, assume 200 +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 0: 200, - // Support: IE9 + + // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); -// Support: IE9 -// Open requests must be manually aborted on unload (#5280) -// See https://support.microsoft.com/kb/2856746 for more info -if ( window.attachEvent ) { - window.attachEvent( "onunload", function() { - for ( var key in xhrCallbacks ) { - xhrCallbacks[ key ](); - } - }); -} - support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; -jQuery.ajaxTransport(function( options ) { - var callback; +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, - xhr = options.xhr(), - id = ++xhrId; + xhr = options.xhr(); - xhr.open( options.type, options.url, options.async, options.username, options.password ); + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); // Apply custom fields if provided if ( options.xhrFields ) { @@ -8580,8 +9750,8 @@ jQuery.ajaxTransport(function( options ) { // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers["X-Requested-With"] ) { - headers["X-Requested-With"] = "XMLHttpRequest"; + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers @@ -8593,27 +9763,39 @@ jQuery.ajaxTransport(function( options ) { callback = function( type ) { return function() { if ( callback ) { - delete xhrCallbacks[ id ]; - callback = xhr.onload = xhr.onerror = null; + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { - complete( - // file: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, - // Support: IE9 - // Accessing binary-data responseText throws an exception - // (#11426) - typeof xhr.responseText === "string" ? { - text: xhr.responseText - } : undefined, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } @@ -8623,15 +9805,41 @@ jQuery.ajaxTransport(function( options ) { // Listen to events xhr.onload = callback(); - xhr.onerror = callback("error"); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } // Create the abort callback - callback = xhrCallbacks[ id ] = callback("abort"); + callback = callback( "abort" ); try { + // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { + // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; @@ -8646,18 +9854,26 @@ jQuery.ajaxTransport(function( options ) { } }; } -}); +} ); +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + // Install script dataType -jQuery.ajaxSetup({ +jQuery.ajaxSetup( { accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" }, contents: { - script: /(?:java|ecma)script/ + script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { @@ -8665,7 +9881,7 @@ jQuery.ajaxSetup({ return text; } } -}); +} ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { @@ -8675,29 +9891,28 @@ jQuery.ajaxPrefilter( "script", function( s ) { if ( s.crossDomain ) { s.type = "GET"; } -}); +} ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { - // This transport only deals with cross domain requests - if ( s.crossDomain ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { var script, callback; return { send: function( _, complete ) { - script = jQuery("<script>").prop({ - async: true, - charset: s.scriptCharset, - src: s.url - }).on( - "load error", - callback = function( evt ) { + script = jQuery( "<script>" ) + .attr( s.scriptAttrs || {} ) + .prop( { charset: s.scriptCharset, src: s.url } ) + .on( "load error", callback = function( evt ) { script.remove(); callback = null; if ( evt ) { complete( evt.type === "error" ? 404 : 200, evt.type ); } - } - ); + } ); + + // Use native DOM manipulation to avoid our domManip AJAX trickery document.head.appendChild( script[ 0 ] ); }, abort: function() { @@ -8707,7 +9922,7 @@ jQuery.ajaxTransport( "script", function( s ) { } }; } -}); +} ); @@ -8716,14 +9931,14 @@ var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings -jQuery.ajaxSetup({ +jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); this[ callback ] = true; return callback; } -}); +} ); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { @@ -8731,14 +9946,17 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : - typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + typeof s.data === "string" && + ( s.contentType || "" ) + .indexOf( "application/x-www-form-urlencoded" ) === 0 && + rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it - callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; @@ -8750,14 +9968,14 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { } // Use data converter to retrieve json after script execution - s.converters["script json"] = function() { + s.converters[ "script json" ] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; - // force json dataType + // Force json dataType s.dataTypes[ 0 ] = "json"; // Install callback @@ -8767,57 +9985,97 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { }; // Clean-up function (fires after converters) - jqXHR.always(function() { - // Restore preexisting value - window[ callbackName ] = overwritten; + jqXHR.always( function() { + + // If previous value didn't exist - remove it + if ( overwritten === undefined ) { + jQuery( window ).removeProp( callbackName ); + + // Otherwise restore preexisting value + } else { + window[ callbackName ] = overwritten; + } // Save back as free if ( s[ callbackName ] ) { - // make sure that re-using the options doesn't screw things around + + // Make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; - // save the callback name for future use + // Save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response - if ( responseContainer && jQuery.isFunction( overwritten ) ) { + if ( responseContainer && isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; - }); + } ); // Delegate to script return "script"; } -}); +} ); -// data: string of html -// context (optional): If specified, the fragment will be created in this context, defaults to document +// Support: Safari 8 only +// In Safari 8 documents created via document.implementation.createHTMLDocument +// collapse sibling forms: the second one becomes a child of the first one. +// Because of that, this security measure has to be disabled in Safari 8. +// https://bugs.webkit.org/show_bug.cgi?id=137337 +support.createHTMLDocument = ( function() { + var body = document.implementation.createHTMLDocument( "" ).body; + body.innerHTML = "<form></form><form></form>"; + return body.childNodes.length === 2; +} )(); + + +// Argument "data" should be string of html +// context (optional): If specified, the fragment will be created in this context, +// defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; + if ( typeof data !== "string" ) { + return []; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } - context = context || document; - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; + var base, parsed, scripts; + + if ( !context ) { + + // Stop scripts or inline event handlers from being executed immediately + // by using document.implementation + if ( support.createHTMLDocument ) { + context = document.implementation.createHTMLDocument( "" ); + + // Set the base href for the created document + // so any parsed elements with URLs + // are based on the document's URL (gh-2965) + base = context.createElement( "base" ); + base.href = document.location.href; + context.head.appendChild( base ); + } else { + context = document; + } + } + + parsed = rsingleTag.exec( data ); + scripts = !keepScripts && []; // Single tag if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; + return [ context.createElement( parsed[ 1 ] ) ]; } - parsed = jQuery.buildFragment( [ data ], context, scripts ); + parsed = buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); @@ -8827,28 +10085,21 @@ jQuery.parseHTML = function( data, context, keepScripts ) { }; -// Keep a copy of the old load method -var _load = jQuery.fn.load; - /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { - if ( typeof url !== "string" && _load ) { - return _load.apply( this, arguments ); - } - var selector, type, response, self = this, - off = url.indexOf(" "); + off = url.indexOf( " " ); - if ( off >= 0 ) { - selector = jQuery.trim( url.slice( off ) ); + if ( off > -1 ) { + selector = stripAndCollapse( url.slice( off ) ); url = url.slice( 0, off ); } // If it's a function - if ( jQuery.isFunction( params ) ) { + if ( isFunction( params ) ) { // We assume that it's the callback callback = params; @@ -8861,14 +10112,16 @@ jQuery.fn.load = function( url, params, callback ) { // If we have elements to modify, make the request if ( self.length > 0 ) { - jQuery.ajax({ + jQuery.ajax( { url: url, - // if "type" variable is undefined, then "GET" method will be used - type: type, + // If "type" variable is undefined, then "GET" method will be used. + // Make value of this field explicit since + // user can override it through ajaxSetup method + type: type || "GET", dataType: "html", data: params - }).done(function( responseText ) { + } ).done( function( responseText ) { // Save response for use in complete callback response = arguments; @@ -8877,14 +10130,19 @@ jQuery.fn.load = function( url, params, callback ) { // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors - jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); - }).complete( callback && function( jqXHR, status ) { - self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); - }); + // If the request succeeds, this function gets "data", "status", "jqXHR" + // but they are ignored because response was set above. + // If it fails, this function gets "jqXHR", "status", "error" + } ).always( callback && function( jqXHR, status ) { + self.each( function() { + callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); + } ); + } ); } return this; @@ -8894,33 +10152,31 @@ jQuery.fn.load = function( url, params, callback ) { // Attach a bunch of functions for handling common AJAX events -jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { +jQuery.each( [ + "ajaxStart", + "ajaxStop", + "ajaxComplete", + "ajaxError", + "ajaxSuccess", + "ajaxSend" +], function( i, type ) { jQuery.fn[ type ] = function( fn ) { return this.on( type, fn ); }; -}); +} ); -jQuery.expr.filters.animated = function( elem ) { - return jQuery.grep(jQuery.timers, function( fn ) { +jQuery.expr.pseudos.animated = function( elem ) { + return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; - }).length; + } ).length; }; -var docElem = window.document.documentElement; - -/** - * Gets a window from an element - */ -function getWindow( elem ) { - return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; -} - jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, @@ -8937,7 +10193,7 @@ jQuery.offset = { curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && - ( curCSSTop + curCSSLeft ).indexOf("auto") > -1; + ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; // Need to be able to calculate position if either // top or left is auto and position is either absolute or fixed @@ -8951,8 +10207,10 @@ jQuery.offset = { curLeft = parseFloat( curCSSLeft ) || 0; } - if ( jQuery.isFunction( options ) ) { - options = options.call( elem, i, curOffset ); + if ( isFunction( options ) ) { + + // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) + options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); } if ( options.top != null ) { @@ -8971,71 +10229,81 @@ jQuery.offset = { } }; -jQuery.fn.extend({ +jQuery.fn.extend( { + + // offset() relates an element's border box to the document origin offset: function( options ) { + + // Preserve chaining for setter if ( arguments.length ) { return options === undefined ? this : - this.each(function( i ) { + this.each( function( i ) { jQuery.offset.setOffset( this, options, i ); - }); + } ); } - var docElem, win, - elem = this[ 0 ], - box = { top: 0, left: 0 }, - doc = elem && elem.ownerDocument; + var rect, win, + elem = this[ 0 ]; - if ( !doc ) { + if ( !elem ) { return; } - docElem = doc.documentElement; - - // Make sure it's not a disconnected DOM node - if ( !jQuery.contains( docElem, elem ) ) { - return box; + // Return zeros for disconnected and hidden (display: none) elements (gh-2310) + // Support: IE <=11 only + // Running getBoundingClientRect on a + // disconnected node in IE throws an error + if ( !elem.getClientRects().length ) { + return { top: 0, left: 0 }; } - // Support: BlackBerry 5, iOS 3 (original iPhone) - // If we don't have gBCR, just use 0,0 rather than error - if ( typeof elem.getBoundingClientRect !== strundefined ) { - box = elem.getBoundingClientRect(); - } - win = getWindow( doc ); + // Get document-relative position by adding viewport scroll to viewport-relative gBCR + rect = elem.getBoundingClientRect(); + win = elem.ownerDocument.defaultView; return { - top: box.top + win.pageYOffset - docElem.clientTop, - left: box.left + win.pageXOffset - docElem.clientLeft + top: rect.top + win.pageYOffset, + left: rect.left + win.pageXOffset }; }, + // position() relates an element's margin box to its offset parent's padding box + // This corresponds to the behavior of CSS absolute positioning position: function() { if ( !this[ 0 ] ) { return; } - var offsetParent, offset, + var offsetParent, offset, doc, elem = this[ 0 ], parentOffset = { top: 0, left: 0 }; - // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent + // position:fixed elements are offset from the viewport, which itself always has zero offset if ( jQuery.css( elem, "position" ) === "fixed" ) { - // Assume getBoundingClientRect is there when computed position is fixed + + // Assume position:fixed implies availability of getBoundingClientRect offset = elem.getBoundingClientRect(); } else { - // Get *real* offsetParent - offsetParent = this.offsetParent(); - - // Get correct offsets offset = this.offset(); - if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { - parentOffset = offsetParent.offset(); - } - // Add offsetParent borders - parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); - parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + // Account for the *real* offset parent, which can be the document or its root element + // when a statically positioned element is identified + doc = elem.ownerDocument; + offsetParent = elem.offsetParent || doc.documentElement; + while ( offsetParent && + ( offsetParent === doc.body || offsetParent === doc.documentElement ) && + jQuery.css( offsetParent, "position" ) === "static" ) { + + offsetParent = offsetParent.parentNode; + } + if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { + + // Incorporate borders into its offset, since they are outside its content origin + parentOffset = jQuery( offsetParent ).offset(); + parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); + } } // Subtract parent offsets and element margins @@ -9045,18 +10313,28 @@ jQuery.fn.extend({ }; }, + // This method will return documentElement in the following cases: + // 1) For the element inside the iframe without offsetParent, this method will return + // documentElement of the parent window + // 2) For the hidden or detached element + // 3) For body or html element, i.e. in case of the html node - it will return itself + // + // but those exceptions were never presented as a real life use-cases + // and might be considered as more preferable results. + // + // This logic, however, is not guaranteed and can change at any point in the future offsetParent: function() { - return this.map(function() { - var offsetParent = this.offsetParent || docElem; + return this.map( function() { + var offsetParent = this.offsetParent; - while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) { + while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { offsetParent = offsetParent.offsetParent; } - return offsetParent || docElem; - }); + return offsetParent || documentElement; + } ); } -}); +} ); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { @@ -9064,7 +10342,14 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { - var win = getWindow( elem ); + + // Coalesce documents and windows + var win; + if ( isWindow( elem ) ) { + win = elem; + } else if ( elem.nodeType === 9 ) { + win = elem.defaultView; + } if ( val === undefined ) { return win ? win[ prop ] : elem[ method ]; @@ -9072,21 +10357,21 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( if ( win ) { win.scrollTo( - !top ? val : window.pageXOffset, - top ? val : window.pageYOffset + !top ? val : win.pageXOffset, + top ? val : win.pageYOffset ); } else { elem[ method ] = val; } - }, method, val, arguments.length, null ); + }, method, val, arguments.length ); }; -}); +} ); -// Support: Safari<7+, Chrome<37+ +// Support: Safari <=7 - 9.1, Chrome <=37 - 49 // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 -// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280 +// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 // getComputedStyle returns percent when specified for top/left/bottom/right; // rather than make the css module depend on the offset module, just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { @@ -9094,6 +10379,7 @@ jQuery.each( [ "top", "left" ], function( i, prop ) { function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); + // If curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : @@ -9101,12 +10387,14 @@ jQuery.each( [ "top", "left" ], function( i, prop ) { } } ); -}); +} ); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, + function( defaultExtra, funcName ) { + // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), @@ -9115,11 +10403,12 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { return access( this, function( elem, type, value ) { var doc; - if ( jQuery.isWindow( elem ) ) { - // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there - // isn't a whole lot we can do. See pull request at this URL for discussion: - // https://github.com/jquery/jquery/pull/764 - return elem.document.documentElement[ "client" + name ]; + if ( isWindow( elem ) ) { + + // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) + return funcName.indexOf( "outer" ) === 0 ? + elem[ "inner" + name ] : + elem.document.documentElement[ "client" + name ]; } // Get document width or height @@ -9136,23 +10425,122 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { } return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); - }, type, chainable ? margin : undefined, chainable, null ); + }, type, chainable ? margin : undefined, chainable ); }; - }); -}); + } ); +} ); -// The number of elements contained in the matched element set -jQuery.fn.size = function() { - return this.length; +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +} ); + +jQuery.fn.extend( { + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +} ); + + + + +jQuery.fn.extend( { + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? + this.off( selector, "**" ) : + this.off( types, selector || "**", fn ); + } +} ); + +// Bind a function to a context, optionally partially applying any +// arguments. +// jQuery.proxy is deprecated to promote standards (specifically Function#bind) +// However, it is not slated for removal any time soon +jQuery.proxy = function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; }; -jQuery.fn.andSelf = jQuery.fn.addBack; +jQuery.holdReady = function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } +}; +jQuery.isArray = Array.isArray; +jQuery.parseJSON = JSON.parse; +jQuery.nodeName = nodeName; +jQuery.isFunction = isFunction; +jQuery.isWindow = isWindow; +jQuery.camelCase = camelCase; +jQuery.type = toType; + +jQuery.now = Date.now; + +jQuery.isNumeric = function( obj ) { + + // As of jQuery 3.0, isNumeric is limited to + // strings and numbers (primitives or objects) + // that can be coerced to finite numbers (gh-2662) + var type = jQuery.type( obj ); + return ( type === "number" || type === "string" ) && + + // parseFloat NaNs numeric-cast false positives ("") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + !isNaN( obj - parseFloat( obj ) ); +}; @@ -9173,13 +10561,14 @@ jQuery.fn.andSelf = jQuery.fn.addBack; if ( typeof define === "function" && define.amd ) { define( "jquery", [], function() { return jQuery; - }); + } ); } var + // Map over jQuery in case of overwrite _jQuery = window.jQuery, @@ -9201,7 +10590,7 @@ jQuery.noConflict = function( deep ) { // Expose jQuery and $ identifiers, even in AMD // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) -if ( typeof noGlobal === strundefined ) { +if ( !noGlobal ) { window.jQuery = window.$ = jQuery; } @@ -9209,343 +10598,64 @@ if ( typeof noGlobal === strundefined ) { return jQuery; +} ); -})); +// This file is deprecated in 1.12.0 to be removed in 1.13 +( function() { +define( [ + "jquery", + "./data", + "./disable-selection", + "./focusable", + "./form", + "./ie", + "./keycode", + "./labels", + "./jquery-1-7", + "./plugin", + "./safe-active-element", + "./safe-blur", + "./scroll-parent", + "./tabbable", + "./unique-id", + "./version" +] ); +} )(); /*! - * jQuery UI Core 1.11.4 + * jQuery UI Widget 1.12.1 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license - * - * http://api.jqueryui.com/category/ui-core/ */ -(function( factory ) { + +//>>label: Widget +//>>group: Core +//>>description: Provides a factory for creating stateful widgets with a common API. +//>>docs: http://api.jqueryui.com/jQuery.widget/ +//>>demos: http://jqueryui.com/widget/ + +( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); + define( [ "jquery", "./version" ], factory ); } else { // Browser globals factory( jQuery ); } -}(function( $ ) { +}( function( $ ) { -// $.ui might exist from components with no dependencies, e.g., $.ui.position -$.ui = $.ui || {}; +var widgetUuid = 0; +var widgetSlice = Array.prototype.slice; -$.extend( $.ui, { - version: "1.11.4", - - keyCode: { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - } -}); - -// plugins -$.fn.extend({ - scrollParent: function( includeHidden ) { - var position = this.css( "position" ), - excludeStaticParent = position === "absolute", - overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, - scrollParent = this.parents().filter( function() { - var parent = $( this ); - if ( excludeStaticParent && parent.css( "position" ) === "static" ) { - return false; - } - return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); - }).eq( 0 ); - - return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; - }, - - uniqueId: (function() { - var uuid = 0; - - return function() { - return this.each(function() { - if ( !this.id ) { - this.id = "ui-id-" + ( ++uuid ); - } - }); - }; - })(), - - removeUniqueId: function() { - return this.each(function() { - if ( /^ui-id-\d+$/.test( this.id ) ) { - $( this ).removeAttr( "id" ); - } - }); - } -}); - -// selectors -function focusable( element, isTabIndexNotNaN ) { - var map, mapName, img, - nodeName = element.nodeName.toLowerCase(); - if ( "area" === nodeName ) { - map = element.parentNode; - mapName = map.name; - if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { - return false; - } - img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; - return !!img && visible( img ); - } - return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? - !element.disabled : - "a" === nodeName ? - element.href || isTabIndexNotNaN : - isTabIndexNotNaN) && - // the element and all of its ancestors must be visible - visible( element ); -} - -function visible( element ) { - return $.expr.filters.visible( element ) && - !$( element ).parents().addBack().filter(function() { - return $.css( this, "visibility" ) === "hidden"; - }).length; -} - -$.extend( $.expr[ ":" ], { - data: $.expr.createPseudo ? - $.expr.createPseudo(function( dataName ) { - return function( elem ) { - return !!$.data( elem, dataName ); - }; - }) : - // support: jQuery <1.8 - function( elem, i, match ) { - return !!$.data( elem, match[ 3 ] ); - }, - - focusable: function( element ) { - return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); - }, - - tabbable: function( element ) { - var tabIndex = $.attr( element, "tabindex" ), - isTabIndexNaN = isNaN( tabIndex ); - return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); - } -}); - -// support: jQuery <1.8 -if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { - $.each( [ "Width", "Height" ], function( i, name ) { - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], - type = name.toLowerCase(), - orig = { - innerWidth: $.fn.innerWidth, - innerHeight: $.fn.innerHeight, - outerWidth: $.fn.outerWidth, - outerHeight: $.fn.outerHeight - }; - - function reduce( elem, size, border, margin ) { - $.each( side, function() { - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; - if ( border ) { - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; - } - if ( margin ) { - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; - } - }); - return size; - } - - $.fn[ "inner" + name ] = function( size ) { - if ( size === undefined ) { - return orig[ "inner" + name ].call( this ); - } - - return this.each(function() { - $( this ).css( type, reduce( this, size ) + "px" ); - }); - }; - - $.fn[ "outer" + name] = function( size, margin ) { - if ( typeof size !== "number" ) { - return orig[ "outer" + name ].call( this, size ); - } - - return this.each(function() { - $( this).css( type, reduce( this, size, true, margin ) + "px" ); - }); - }; - }); -} - -// support: jQuery <1.8 -if ( !$.fn.addBack ) { - $.fn.addBack = function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - }; -} - -// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) -if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { - $.fn.removeData = (function( removeData ) { - return function( key ) { - if ( arguments.length ) { - return removeData.call( this, $.camelCase( key ) ); - } else { - return removeData.call( this ); - } - }; - })( $.fn.removeData ); -} - -// deprecated -$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); - -$.fn.extend({ - focus: (function( orig ) { - return function( delay, fn ) { - return typeof delay === "number" ? - this.each(function() { - var elem = this; - setTimeout(function() { - $( elem ).focus(); - if ( fn ) { - fn.call( elem ); - } - }, delay ); - }) : - orig.apply( this, arguments ); - }; - })( $.fn.focus ), - - disableSelection: (function() { - var eventType = "onselectstart" in document.createElement( "div" ) ? - "selectstart" : - "mousedown"; - - return function() { - return this.bind( eventType + ".ui-disableSelection", function( event ) { - event.preventDefault(); - }); - }; - })(), - - enableSelection: function() { - return this.unbind( ".ui-disableSelection" ); - }, - - zIndex: function( zIndex ) { - if ( zIndex !== undefined ) { - return this.css( "zIndex", zIndex ); - } - - if ( this.length ) { - var elem = $( this[ 0 ] ), position, value; - while ( elem.length && elem[ 0 ] !== document ) { - // Ignore z-index if position is set to a value where z-index is ignored by the browser - // This makes behavior of this function consistent across browsers - // WebKit always returns auto if the element is positioned - position = elem.css( "position" ); - if ( position === "absolute" || position === "relative" || position === "fixed" ) { - // IE returns 0 when zIndex is not specified - // other browsers return a string - // we ignore the case of nested elements with an explicit value of 0 - // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> - value = parseInt( elem.css( "zIndex" ), 10 ); - if ( !isNaN( value ) && value !== 0 ) { - return value; - } - } - elem = elem.parent(); - } - } - - return 0; - } -}); - -// $.ui.plugin is deprecated. Use $.widget() extensions instead. -$.ui.plugin = { - add: function( module, option, set ) { - var i, - proto = $.ui[ module ].prototype; - for ( i in set ) { - proto.plugins[ i ] = proto.plugins[ i ] || []; - proto.plugins[ i ].push( [ option, set[ i ] ] ); - } - }, - call: function( instance, name, args, allowDisconnected ) { - var i, - set = instance.plugins[ name ]; - - if ( !set ) { - return; - } - - if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { - return; - } - - for ( i = 0; i < set.length; i++ ) { - if ( instance.options[ set[ i ][ 0 ] ] ) { - set[ i ][ 1 ].apply( instance.element, args ); - } - } - } -}; - -})); - -/*! - * jQuery UI Widget 1.11.4 - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/jQuery.widget/ - */ -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define( [ "jquery" ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -}(function( $ ) { - -var widget_uuid = 0, - widget_slice = Array.prototype.slice; - -$.cleanData = (function( orig ) { +$.cleanData = ( function( orig ) { return function( elems ) { var events, elem, i; - for ( i = 0; (elem = elems[i]) != null; i++ ) { + for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { try { // Only trigger remove when necessary to save time @@ -9554,29 +10664,34 @@ $.cleanData = (function( orig ) { $( elem ).triggerHandler( "remove" ); } - // http://bugs.jquery.com/ticket/8235 + // Http://bugs.jquery.com/ticket/8235 } catch ( e ) {} } orig( elems ); }; -})( $.cleanData ); +} )( $.cleanData ); $.widget = function( name, base, prototype ) { - var fullName, existingConstructor, constructor, basePrototype, - // proxiedPrototype allows the provided prototype to remain unmodified - // so that it can be used as a mixin for multiple widgets (#8876) - proxiedPrototype = {}, - namespace = name.split( "." )[ 0 ]; + var existingConstructor, constructor, basePrototype; + // ProxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + var proxiedPrototype = {}; + + var namespace = name.split( "." )[ 0 ]; name = name.split( "." )[ 1 ]; - fullName = namespace + "-" + name; + var fullName = namespace + "-" + name; if ( !prototype ) { prototype = base; base = $.Widget; } - // create selector for plugin + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + + // Create selector for plugin $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { return !!$.data( elem, fullName ); }; @@ -9584,30 +10699,35 @@ $.widget = function( name, base, prototype ) { $[ namespace ] = $[ namespace ] || {}; existingConstructor = $[ namespace ][ name ]; constructor = $[ namespace ][ name ] = function( options, element ) { - // allow instantiation without "new" keyword + + // Allow instantiation without "new" keyword if ( !this._createWidget ) { return new constructor( options, element ); } - // allow instantiation without initializing for simple inheritance + // Allow instantiation without initializing for simple inheritance // must use "new" keyword (the code above always passes args) if ( arguments.length ) { this._createWidget( options, element ); } }; - // extend with the existing constructor to carry over any static properties + + // Extend with the existing constructor to carry over any static properties $.extend( constructor, existingConstructor, { version: prototype.version, - // copy the object used to create the prototype in case we need to + + // Copy the object used to create the prototype in case we need to // redefine the widget later _proto: $.extend( {}, prototype ), - // track widgets that inherit from this widget in case this widget is + + // Track widgets that inherit from this widget in case this widget is // redefined after a widget inherits from it _childConstructors: [] - }); + } ); basePrototype = new base(); - // we need to make the options hash a property directly on the new instance + + // We need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from basePrototype.options = $.widget.extend( {}, basePrototype.options ); @@ -9616,17 +10736,19 @@ $.widget = function( name, base, prototype ) { proxiedPrototype[ prop ] = value; return; } - proxiedPrototype[ prop ] = (function() { - var _super = function() { - return base.prototype[ prop ].apply( this, arguments ); - }, - _superApply = function( args ) { - return base.prototype[ prop ].apply( this, args ); - }; + proxiedPrototype[ prop ] = ( function() { + function _super() { + return base.prototype[ prop ].apply( this, arguments ); + } + + function _superApply( args ) { + return base.prototype[ prop ].apply( this, args ); + } + return function() { - var __super = this._super, - __superApply = this._superApply, - returnValue; + var __super = this._super; + var __superApply = this._superApply; + var returnValue; this._super = _super; this._superApply = _superApply; @@ -9638,19 +10760,20 @@ $.widget = function( name, base, prototype ) { return returnValue; }; - })(); - }); + } )(); + } ); constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix // always use the name + a colon as the prefix, e.g., draggable:start // don't prefix for widgets that aren't DOM-based - widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name }, proxiedPrototype, { constructor: constructor, namespace: namespace, widgetName: name, widgetFullName: fullName - }); + } ); // If this widget is being redefined then we need to find all widgets that // are inheriting from it and redefine all of them so that they inherit from @@ -9660,11 +10783,13 @@ $.widget = function( name, base, prototype ) { $.each( existingConstructor._childConstructors, function( i, child ) { var childPrototype = child.prototype; - // redefine the child widget using the same prototype that was + // Redefine the child widget using the same prototype that was // originally used, but inherit from the new version of the base - $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); - }); - // remove the list of existing child constructors from the old constructor + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, + child._proto ); + } ); + + // Remove the list of existing child constructors from the old constructor // so the old child constructors can be garbage collected delete existingConstructor._childConstructors; } else { @@ -9677,21 +10802,25 @@ $.widget = function( name, base, prototype ) { }; $.widget.extend = function( target ) { - var input = widget_slice.call( arguments, 1 ), - inputIndex = 0, - inputLength = input.length, - key, - value; + var input = widgetSlice.call( arguments, 1 ); + var inputIndex = 0; + var inputLength = input.length; + var key; + var value; + for ( ; inputIndex < inputLength; inputIndex++ ) { for ( key in input[ inputIndex ] ) { value = input[ inputIndex ][ key ]; if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects if ( $.isPlainObject( value ) ) { target[ key ] = $.isPlainObject( target[ key ] ) ? $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects $.widget.extend( {}, value ); + // Copy everything else by reference } else { target[ key ] = value; @@ -9705,41 +10834,55 @@ $.widget.extend = function( target ) { $.widget.bridge = function( name, object ) { var fullName = object.prototype.widgetFullName || name; $.fn[ name ] = function( options ) { - var isMethodCall = typeof options === "string", - args = widget_slice.call( arguments, 1 ), - returnValue = this; + var isMethodCall = typeof options === "string"; + var args = widgetSlice.call( arguments, 1 ); + var returnValue = this; if ( isMethodCall ) { - this.each(function() { - var methodValue, - instance = $.data( this, fullName ); - if ( options === "instance" ) { - returnValue = instance; - return false; - } - if ( !instance ) { - return $.error( "cannot call methods on " + name + " prior to initialization; " + - "attempted to call method '" + options + "'" ); - } - if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { - return $.error( "no such method '" + options + "' for " + name + " widget instance" ); - } - methodValue = instance[ options ].apply( instance, args ); - if ( methodValue !== instance && methodValue !== undefined ) { - returnValue = methodValue && methodValue.jquery ? - returnValue.pushStack( methodValue.get() ) : - methodValue; - return false; - } - }); + + // If this is an empty collection, we need to have the instance method + // return undefined instead of the jQuery instance + if ( !this.length && options === "instance" ) { + returnValue = undefined; + } else { + this.each( function() { + var methodValue; + var instance = $.data( this, fullName ); + + if ( options === "instance" ) { + returnValue = instance; + return false; + } + + if ( !instance ) { + return $.error( "cannot call methods on " + name + + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + + if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + + " widget instance" ); + } + + methodValue = instance[ options ].apply( instance, args ); + + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + } ); + } } else { // Allow multiple hashes to be passed on init if ( args.length ) { - options = $.widget.extend.apply( null, [ options ].concat(args) ); + options = $.widget.extend.apply( null, [ options ].concat( args ) ); } - this.each(function() { + this.each( function() { var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} ); @@ -9749,7 +10892,7 @@ $.widget.bridge = function( name, object ) { } else { $.data( this, fullName, new object( options, this ) ); } - }); + } ); } return returnValue; @@ -9763,21 +10906,25 @@ $.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", + options: { + classes: {}, disabled: false, - // callbacks + // Callbacks create: null }, + _createWidget: function( options, element ) { element = $( element || this.defaultElement || this )[ 0 ]; this.element = $( element ); - this.uuid = widget_uuid++; + this.uuid = widgetUuid++; this.eventNamespace = "." + this.widgetName + this.uuid; this.bindings = $(); this.hoverable = $(); this.focusable = $(); + this.classesElementLookup = {}; if ( element !== this ) { $.data( element, this.widgetFullName, this ); @@ -9787,13 +10934,15 @@ $.Widget.prototype = { this.destroy(); } } - }); + } ); this.document = $( element.style ? - // element within the document + + // Element within the document element.ownerDocument : - // element is window or document + + // Element is window or document element.document || element ); - this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); } this.options = $.widget.extend( {}, @@ -9802,36 +10951,46 @@ $.Widget.prototype = { options ); this._create(); + + if ( this.options.disabled ) { + this._setOptionDisabled( this.options.disabled ); + } + this._trigger( "create", null, this._getCreateEventData() ); this._init(); }, - _getCreateOptions: $.noop, + + _getCreateOptions: function() { + return {}; + }, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, destroy: function() { + var that = this; + this._destroy(); - // we can probably remove the unbind calls in 2.0 + $.each( this.classesElementLookup, function( key, value ) { + that._removeClass( value, key ); + } ); + + // We can probably remove the unbind calls in 2.0 // all event bindings should go through this._on() this.element - .unbind( this.eventNamespace ) - .removeData( this.widgetFullName ) - // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 - .removeData( $.camelCase( this.widgetFullName ) ); + .off( this.eventNamespace ) + .removeData( this.widgetFullName ); this.widget() - .unbind( this.eventNamespace ) - .removeAttr( "aria-disabled" ) - .removeClass( - this.widgetFullName + "-disabled " + - "ui-state-disabled" ); + .off( this.eventNamespace ) + .removeAttr( "aria-disabled" ); - // clean up events and states - this.bindings.unbind( this.eventNamespace ); - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); + // Clean up events and states + this.bindings.off( this.eventNamespace ); }, + _destroy: $.noop, widget: function() { @@ -9839,18 +10998,20 @@ $.Widget.prototype = { }, option: function( key, value ) { - var options = key, - parts, - curOption, - i; + var options = key; + var parts; + var curOption; + var i; if ( arguments.length === 0 ) { - // don't return a reference to the internal hash + + // Don't return a reference to the internal hash return $.widget.extend( {}, this.options ); } if ( typeof key === "string" ) { - // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + + // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } options = {}; parts = key.split( "." ); key = parts.shift(); @@ -9877,6 +11038,7 @@ $.Widget.prototype = { return this; }, + _setOptions: function( options ) { var key; @@ -9886,42 +11048,152 @@ $.Widget.prototype = { return this; }, + _setOption: function( key, value ) { + if ( key === "classes" ) { + this._setOptionClasses( value ); + } + this.options[ key ] = value; if ( key === "disabled" ) { - this.widget() - .toggleClass( this.widgetFullName + "-disabled", !!value ); - - // If the widget is becoming disabled, then nothing is interactive - if ( value ) { - this.hoverable.removeClass( "ui-state-hover" ); - this.focusable.removeClass( "ui-state-focus" ); - } + this._setOptionDisabled( value ); } return this; }, - enable: function() { - return this._setOptions({ disabled: false }); + _setOptionClasses: function( value ) { + var classKey, elements, currentElements; + + for ( classKey in value ) { + currentElements = this.classesElementLookup[ classKey ]; + if ( value[ classKey ] === this.options.classes[ classKey ] || + !currentElements || + !currentElements.length ) { + continue; + } + + // We are doing this to create a new jQuery object because the _removeClass() call + // on the next line is going to destroy the reference to the current elements being + // tracked. We need to save a copy of this collection so that we can add the new classes + // below. + elements = $( currentElements.get() ); + this._removeClass( currentElements, classKey ); + + // We don't use _addClass() here, because that uses this.options.classes + // for generating the string of classes. We want to use the value passed in from + // _setOption(), this is the new value of the classes option which was passed to + // _setOption(). We pass this value directly to _classes(). + elements.addClass( this._classes( { + element: elements, + keys: classKey, + classes: value, + add: true + } ) ); + } }, + + _setOptionDisabled: function( value ) { + this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this._removeClass( this.hoverable, null, "ui-state-hover" ); + this._removeClass( this.focusable, null, "ui-state-focus" ); + } + }, + + enable: function() { + return this._setOptions( { disabled: false } ); + }, + disable: function() { - return this._setOptions({ disabled: true }); + return this._setOptions( { disabled: true } ); + }, + + _classes: function( options ) { + var full = []; + var that = this; + + options = $.extend( { + element: this.element, + classes: this.options.classes || {} + }, options ); + + function processClassString( classes, checkOption ) { + var current, i; + for ( i = 0; i < classes.length; i++ ) { + current = that.classesElementLookup[ classes[ i ] ] || $(); + if ( options.add ) { + current = $( $.unique( current.get().concat( options.element.get() ) ) ); + } else { + current = $( current.not( options.element ).get() ); + } + that.classesElementLookup[ classes[ i ] ] = current; + full.push( classes[ i ] ); + if ( checkOption && options.classes[ classes[ i ] ] ) { + full.push( options.classes[ classes[ i ] ] ); + } + } + } + + this._on( options.element, { + "remove": "_untrackClassesElement" + } ); + + if ( options.keys ) { + processClassString( options.keys.match( /\S+/g ) || [], true ); + } + if ( options.extra ) { + processClassString( options.extra.match( /\S+/g ) || [] ); + } + + return full.join( " " ); + }, + + _untrackClassesElement: function( event ) { + var that = this; + $.each( that.classesElementLookup, function( key, value ) { + if ( $.inArray( event.target, value ) !== -1 ) { + that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); + } + } ); + }, + + _removeClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, false ); + }, + + _addClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, true ); + }, + + _toggleClass: function( element, keys, extra, add ) { + add = ( typeof add === "boolean" ) ? add : extra; + var shift = ( typeof element === "string" || element === null ), + options = { + extra: shift ? keys : extra, + keys: shift ? element : keys, + element: shift ? this.element : element, + add: add + }; + options.element.toggleClass( this._classes( options ), add ); + return this; }, _on: function( suppressDisabledCheck, element, handlers ) { - var delegateElement, - instance = this; + var delegateElement; + var instance = this; - // no suppressDisabledCheck flag, shuffle arguments + // No suppressDisabledCheck flag, shuffle arguments if ( typeof suppressDisabledCheck !== "boolean" ) { handlers = element; element = suppressDisabledCheck; suppressDisabledCheck = false; } - // no element argument, shuffle and use this.element + // No element argument, shuffle and use this.element if ( !handlers ) { handlers = element; element = this.element; @@ -9933,39 +11205,41 @@ $.Widget.prototype = { $.each( handlers, function( event, handler ) { function handlerProxy() { - // allow widgets to customize the disabled handling + + // Allow widgets to customize the disabled handling // - disabled as an array instead of boolean // - disabled class as method for disabling individual parts if ( !suppressDisabledCheck && ( instance.options.disabled === true || - $( this ).hasClass( "ui-state-disabled" ) ) ) { + $( this ).hasClass( "ui-state-disabled" ) ) ) { return; } return ( typeof handler === "string" ? instance[ handler ] : handler ) .apply( instance, arguments ); } - // copy the guid so direct unbinding works + // Copy the guid so direct unbinding works if ( typeof handler !== "string" ) { handlerProxy.guid = handler.guid = handler.guid || handlerProxy.guid || $.guid++; } - var match = event.match( /^([\w:-]*)\s*(.*)$/ ), - eventName = match[1] + instance.eventNamespace, - selector = match[2]; + var match = event.match( /^([\w:-]*)\s*(.*)$/ ); + var eventName = match[ 1 ] + instance.eventNamespace; + var selector = match[ 2 ]; + if ( selector ) { - delegateElement.delegate( selector, eventName, handlerProxy ); + delegateElement.on( eventName, selector, handlerProxy ); } else { - element.bind( eventName, handlerProxy ); + element.on( eventName, handlerProxy ); } - }); + } ); }, _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; - element.unbind( eventName ).undelegate( eventName ); + element.off( eventName ).off( eventName ); // Clear the stack to avoid memory leaks (#10056) this.bindings = $( this.bindings.not( element ).get() ); @@ -9986,40 +11260,41 @@ $.Widget.prototype = { this.hoverable = this.hoverable.add( element ); this._on( element, { mouseenter: function( event ) { - $( event.currentTarget ).addClass( "ui-state-hover" ); + this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); }, mouseleave: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-hover" ); + this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); } - }); + } ); }, _focusable: function( element ) { this.focusable = this.focusable.add( element ); this._on( element, { focusin: function( event ) { - $( event.currentTarget ).addClass( "ui-state-focus" ); + this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); }, focusout: function( event ) { - $( event.currentTarget ).removeClass( "ui-state-focus" ); + this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); } - }); + } ); }, _trigger: function( type, event, data ) { - var prop, orig, - callback = this.options[ type ]; + var prop, orig; + var callback = this.options[ type ]; data = data || {}; event = $.Event( event ); event.type = ( type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type ).toLowerCase(); - // the original event may come from any element + + // The original event may come from any element // so we need to reset the target on the new event event.target = this.element[ 0 ]; - // copy original event properties over to the new event + // Copy original event properties over to the new event orig = event.originalEvent; if ( orig ) { for ( prop in orig ) { @@ -10031,7 +11306,7 @@ $.Widget.prototype = { this.element.trigger( event, data ); return !( $.isFunction( callback ) && - callback.apply( this.element[0], [ event ].concat( data ) ) === false || + callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || event.isDefaultPrevented() ); } }; @@ -10041,40 +11316,45 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { if ( typeof options === "string" ) { options = { effect: options }; } - var hasOptions, - effectName = !options ? - method : - options === true || typeof options === "number" ? - defaultEffect : - options.effect || defaultEffect; + + var hasOptions; + var effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; if ( typeof options === "number" ) { options = { duration: options }; } + hasOptions = !$.isEmptyObject( options ); options.complete = callback; + if ( options.delay ) { element.delay( options.delay ); } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { element[ method ]( options ); } else if ( effectName !== method && element[ effectName ] ) { element[ effectName ]( options.duration, options.easing, callback ); } else { - element.queue(function( next ) { + element.queue( function( next ) { $( this )[ method ](); if ( callback ) { callback.call( element[ 0 ] ); } next(); - }); + } ); } }; -}); +} ); return $.widget; -})); +} ) ); /*! * jQuery Cookie Plugin v1.4.1 diff --git a/dist/libs.min.js b/dist/libs.min.js deleted file mode 100644 index d2243ec..0000000 --- a/dist/libs.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/*! uhr - v8.0.4-dev.0 - 2016-06-27 -* http://bärneruhr.ch/ -* Copyright (c) 2016 Manuel Friedli; Licensed GPL-3.0 */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c)}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;c<d;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Na[0].contentDocument,b.write(),b.close(),c=t(a,b),Na.detach()),Oa[a]=c),c}function v(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||_.contains(a.ownerDocument,a)||(g=_.style(a,b)),Qa.test(g)&&Pa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function w(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function x(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Xa.length;e--;)if(b=Xa[e]+c,b in a)return b;return d}function y(a,b,c){var d=Ta.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function z(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=_.css(a,c+wa[f],!0,e)),d?("content"===c&&(g-=_.css(a,"padding"+wa[f],!0,e)),"margin"!==c&&(g-=_.css(a,"border"+wa[f]+"Width",!0,e))):(g+=_.css(a,"padding"+wa[f],!0,e),"padding"!==c&&(g+=_.css(a,"border"+wa[f]+"Width",!0,e)));return g}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g="border-box"===_.css(a,"boxSizing",!1,f);if(e<=0||null==e){if(e=v(a,b,f),(e<0||null==e)&&(e=a.style[b]),Qa.test(e))return e;d=g&&(Y.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+z(a,b,c||(g?"border":"content"),d,f)+"px"}function B(a,b){for(var c,d,e,f=[],g=0,h=a.length;g<h;g++)d=a[g],d.style&&(f[g]=ra.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&xa(d)&&(f[g]=ra.access(d,"olddisplay",u(d.nodeName)))):(e=xa(d),"none"===c&&e||ra.set(d,"olddisplay",e?c:_.css(d,"display"))));for(g=0;g<h;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function C(a,b,c,d,e){return new C.prototype.init(a,b,c,d,e)}function D(){return setTimeout(function(){Ya=void 0}),Ya=_.now()}function E(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=wa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function F(a,b,c){for(var d,e=(cb[b]||[]).concat(cb["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function G(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},n=a.style,o=a.nodeType&&xa(a),p=ra.get(a,"fxshow");c.queue||(h=_._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,_.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[n.overflow,n.overflowX,n.overflowY],j=_.css(a,"display"),k="none"===j?ra.get(a,"olddisplay")||u(a.nodeName):j,"inline"===k&&"none"===_.css(a,"float")&&(n.display="inline-block")),c.overflow&&(n.overflow="hidden",l.always(function(){n.overflow=c.overflow[0],n.overflowX=c.overflow[1],n.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],$a.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(o?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;o=!0}m[d]=p&&p[d]||_.style(a,d)}else j=void 0;if(_.isEmptyObject(m))"inline"===("none"===j?u(a.nodeName):j)&&(n.display=j);else{p?"hidden"in p&&(o=p.hidden):p=ra.access(a,"fxshow",{}),f&&(p.hidden=!o),o?_(a).show():l.done(function(){_(a).hide()}),l.done(function(){var b;ra.remove(a,"fxshow");for(b in m)_.style(a,b,m[b])});for(d in m)g=F(o?p[d]:0,d,l),d in p||(p[d]=g.start,o&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function H(a,b){var c,d,e,f,g;for(c in a)if(d=_.camelCase(c),e=b[d],f=a[c],_.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=_.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function I(a,b,c){var d,e,f=0,g=bb.length,h=_.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||D(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:_.extend({},b),opts:_.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Ya||D(),duration:c.duration,tweens:[],createTween:function(b,c){var d=_.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(H(k,j.opts.specialEasing);f<g;f++)if(d=bb[f].call(j,a,k,j.opts))return d;return _.map(k,F,j),_.isFunction(j.opts.start)&&j.opts.start.call(a,j),_.fx.timer(_.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function J(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(na)||[];if(_.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function K(a,b,c,d){function e(h){var i;return f[h]=!0,_.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||g||f[j]?g?!(i=j):void 0:(b.dataTypes.unshift(j),e(j),!1)}),i}var f={},g=a===tb;return e(b.dataTypes[0])||!f["*"]&&e("*")}function L(a,b){var c,d,e=_.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&_.extend(!0,a,d),a}function M(a,b,c){for(var d,e,f,g,h=a.contents,i=a.dataTypes;"*"===i[0];)i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function N(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function O(a,b,c,d){var e;if(_.isArray(b))_.each(b,function(b,e){c||yb.test(a)?d(a,e):O(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==_.type(b))d(a,b);else for(e in b)O(a+"["+e+"]",b[e],c,d)}function P(a){return _.isWindow(a)?a:9===a.nodeType&&a.defaultView}var Q=[],R=Q.slice,S=Q.concat,T=Q.push,U=Q.indexOf,V={},W=V.toString,X=V.hasOwnProperty,Y={},Z=a.document,$="2.1.4",_=function(a,b){return new _.fn.init(a,b)},aa=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ba=/^-ms-/,ca=/-([\da-z])/gi,da=function(a,b){return b.toUpperCase()};_.fn=_.prototype={jquery:$,constructor:_,selector:"",length:0,toArray:function(){return R.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:R.call(this)},pushStack:function(a){var b=_.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return _.each(this,a,b)},map:function(a){return this.pushStack(_.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(R.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:T,sort:Q.sort,splice:Q.splice},_.extend=_.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||_.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(_.isPlainObject(d)||(e=_.isArray(d)))?(e?(e=!1,f=c&&_.isArray(c)?c:[]):f=c&&_.isPlainObject(c)?c:{},g[b]=_.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},_.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===_.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!_.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"===_.type(a)&&!a.nodeType&&!_.isWindow(a)&&!(a.constructor&&!X.call(a.constructor.prototype,"isPrototypeOf"))},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?V[W.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=_.trim(a),a&&(1===a.indexOf("use strict")?(b=Z.createElement("script"),b.text=a,Z.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(ba,"ms-").replace(ca,da)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var e,f=0,g=a.length,h=c(a);if(d){if(h)for(;f<g&&(e=b.apply(a[f],d),e!==!1);f++);else for(f in a)if(e=b.apply(a[f],d),e===!1)break}else if(h)for(;f<g&&(e=b.call(a[f],f,a[f]),e!==!1);f++);else for(f in a)if(e=b.call(a[f],f,a[f]),e===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(aa,"")},makeArray:function(a,b){var d=b||[];return null!=a&&(c(Object(a))?_.merge(d,"string"==typeof a?[a]:a):T.call(d,a)),d},inArray:function(a,b,c){return null==b?-1:U.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;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;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,d){var e,f=0,g=a.length,h=c(a),i=[];if(h)for(;f<g;f++)e=b(a[f],f,d),null!=e&&i.push(e);else for(f in a)e=b(a[f],f,d),null!=e&&i.push(e);return S.apply([],i)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),_.isFunction(a))return d=R.call(arguments,2),e=function(){return a.apply(b||this,d.concat(R.call(arguments)))},e.guid=a.guid=a.guid||_.guid++,e},now:Date.now,support:Y}),_.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){V["[object "+b+"]"]=b.toLowerCase()});var ea=function(a){function b(a,b,c,d){var e,f,g,h,i,j,l,n,o,p;if((b?b.ownerDocument||b:O)!==G&&F(b),b=b||G,c=c||[],h=b.nodeType,"string"!=typeof a||!a||1!==h&&9!==h&&11!==h)return c;if(!d&&I){if(11!==h&&(e=sa.exec(a)))if(g=e[1]){if(9===h){if(f=b.getElementById(g),!f||!f.parentNode)return c;if(f.id===g)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(g))&&M(b,f)&&f.id===g)return c.push(f),c}else{if(e[2])return $.apply(c,b.getElementsByTagName(a)),c;if((g=e[3])&&v.getElementsByClassName)return $.apply(c,b.getElementsByClassName(g)),c}if(v.qsa&&(!J||!J.test(a))){if(n=l=N,o=b,p=1!==h&&a,1===h&&"object"!==b.nodeName.toLowerCase()){for(j=z(a),(l=b.getAttribute("id"))?n=l.replace(ua,"\\$&"):b.setAttribute("id",n),n="[id='"+n+"'] ",i=j.length;i--;)j[i]=n+m(j[i]);o=ta.test(a)&&k(b.parentNode)||b,p=j.join(",")}if(p)try{return $.apply(c,o.querySelectorAll(p)),c}catch(q){}finally{l||b.removeAttribute("id")}}}return B(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>w.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[N]=!0,a}function e(a){var b=G.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=a.length;d--;)w.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||V)-(~a.sourceIndex||V);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function k(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}function l(){}function m(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function n(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=Q++;return b.first?function(b,c,f){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[P,f];if(g){for(;b=b[d];)if((1===b.nodeType||e)&&a(b,c,g))return!0}else for(;b=b[d];)if(1===b.nodeType||e){if(i=b[N]||(b[N]={}),(h=i[d])&&h[0]===P&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function o(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function p(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function q(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function r(a,b,c,e,f,g){return e&&!e[N]&&(e=r(e)),f&&!f[N]&&(f=r(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,r=d||p(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?r:q(r,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=q(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?aa(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=q(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):$.apply(g,t)})}function s(a){for(var b,c,d,e=a.length,f=w.relative[a[0].type],g=f||w.relative[" "],h=f?1:0,i=n(function(a){return a===b},g,!0),j=n(function(a){return aa(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==C)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=w.relative[a[h].type])k=[n(o(k),c)];else{if(c=w.filter[a[h].type].apply(null,a[h].matches),c[N]){for(d=++h;d<e&&!w.relative[a[d].type];d++);return r(h>1&&o(k),h>1&&m(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h<d&&s(a.slice(h,d)),d<e&&s(a=a.slice(d)),d<e&&m(a))}k.push(c)}return o(k)}function t(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],r=[],s=C,t=d||f&&w.find.TAG("*",j),u=P+=null==s?1:Math.random()||.1,v=t.length;for(j&&(C=g!==G&&g);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0;m=a[l++];)if(m(k,g,h)){i.push(k);break}j&&(P=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,r,g,h);if(d){if(n>0)for(;o--;)p[o]||r[o]||(r[o]=Y.call(i));r=q(r)}$.apply(i,r),j&&!d&&r.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(P=u,C=s),p};return e?d(g):g}var u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N="sizzle"+1*new Date,O=a.document,P=0,Q=0,R=c(),S=c(),T=c(),U=function(a,b){return a===b&&(E=!0),0},V=1<<31,W={}.hasOwnProperty,X=[],Y=X.pop,Z=X.push,$=X.push,_=X.slice,aa=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},ba="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ca="[\\x20\\t\\r\\n\\f]",da="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ea=da.replace("w","w#"),fa="\\["+ca+"*("+da+")(?:"+ca+"*([*^$|!~]?=)"+ca+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ea+"))|)"+ca+"*\\]",ga=":("+da+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+fa+")*)|.*)\\)|)",ha=new RegExp(ca+"+","g"),ia=new RegExp("^"+ca+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ca+"+$","g"),ja=new RegExp("^"+ca+"*,"+ca+"*"),ka=new RegExp("^"+ca+"*([>+~]|"+ca+")"+ca+"*"),la=new RegExp("="+ca+"*([^\\]'\"]*?)"+ca+"*\\]","g"),ma=new RegExp(ga),na=new RegExp("^"+ea+"$"),oa={ID:new RegExp("^#("+da+")"),CLASS:new RegExp("^\\.("+da+")"),TAG:new RegExp("^("+da.replace("w","w*")+")"),ATTR:new RegExp("^"+fa),PSEUDO:new RegExp("^"+ga),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ca+"*(even|odd|(([+-]|)(\\d*)n|)"+ca+"*(?:([+-]|)"+ca+"*(\\d+)|))"+ca+"*\\)|)","i"),bool:new RegExp("^(?:"+ba+")$","i"),needsContext:new RegExp("^"+ca+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ca+"*((?:-\\d)?\\d*)"+ca+"*\\)|)(?=[^-]|$)","i")},pa=/^(?:input|select|textarea|button)$/i,qa=/^h\d$/i,ra=/^[^{]+\{\s*\[native \w/,sa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ta=/[+~]/,ua=/'|\\/g,va=new RegExp("\\\\([\\da-f]{1,6}"+ca+"?|("+ca+")|.)","ig"),wa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},xa=function(){F()};try{$.apply(X=_.call(O.childNodes),O.childNodes),X[O.childNodes.length].nodeType}catch(ya){$={apply:X.length?function(a,b){Z.apply(a,_.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}v=b.support={},y=b.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},F=b.setDocument=function(a){var b,c,d=a?a.ownerDocument||a:O;return d!==G&&9===d.nodeType&&d.documentElement?(G=d,H=d.documentElement,c=d.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",xa,!1):c.attachEvent&&c.attachEvent("onunload",xa)),I=!y(d),v.attributes=e(function(a){return a.className="i",!a.getAttribute("className")}),v.getElementsByTagName=e(function(a){return a.appendChild(d.createComment("")),!a.getElementsByTagName("*").length}),v.getElementsByClassName=ra.test(d.getElementsByClassName),v.getById=e(function(a){return H.appendChild(a).id=N,!d.getElementsByName||!d.getElementsByName(N).length}),v.getById?(w.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&I){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){return a.getAttribute("id")===b}}):(delete w.find.ID,w.filter.ID=function(a){var b=a.replace(va,wa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),w.find.TAG=v.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):v.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},w.find.CLASS=v.getElementsByClassName&&function(a,b){if(I)return b.getElementsByClassName(a)},K=[],J=[],(v.qsa=ra.test(d.querySelectorAll))&&(e(function(a){H.appendChild(a).innerHTML="<a id='"+N+"'></a><select id='"+N+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&J.push("[*^$]="+ca+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||J.push("\\["+ca+"*(?:value|"+ba+")"),a.querySelectorAll("[id~="+N+"-]").length||J.push("~="),a.querySelectorAll(":checked").length||J.push(":checked"),a.querySelectorAll("a#"+N+"+*").length||J.push(".#.+[+~]")}),e(function(a){var b=d.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&J.push("name"+ca+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||J.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),J.push(",.*:")})),(v.matchesSelector=ra.test(L=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&e(function(a){v.disconnectedMatch=L.call(a,"div"),L.call(a,"[s!='']:x"),K.push("!=",ga)}),J=J.length&&new RegExp(J.join("|")),K=K.length&&new RegExp(K.join("|")),b=ra.test(H.compareDocumentPosition),M=b||ra.test(H.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)for(;b=b.parentNode;)if(b===a)return!0;return!1},U=b?function(a,b){if(a===b)return E=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;return c?c:(c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&c||!v.sortDetached&&b.compareDocumentPosition(a)===c?a===d||a.ownerDocument===O&&M(O,a)?-1:b===d||b.ownerDocument===O&&M(O,b)?1:D?aa(D,a)-aa(D,b):0:4&c?-1:1)}:function(a,b){if(a===b)return E=!0,0;var c,e=0,f=a.parentNode,h=b.parentNode,i=[a],j=[b];if(!f||!h)return a===d?-1:b===d?1:f?-1:h?1:D?aa(D,a)-aa(D,b):0;if(f===h)return g(a,b);for(c=a;c=c.parentNode;)i.unshift(c);for(c=b;c=c.parentNode;)j.unshift(c);for(;i[e]===j[e];)e++;return e?g(i[e],j[e]):i[e]===O?-1:j[e]===O?1:0},d):G},b.matches=function(a,c){return b(a,null,null,c)},b.matchesSelector=function(a,c){if((a.ownerDocument||a)!==G&&F(a),c=c.replace(la,"='$1']"),v.matchesSelector&&I&&(!K||!K.test(c))&&(!J||!J.test(c)))try{var d=L.call(a,c);if(d||v.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return b(c,G,null,[a]).length>0},b.contains=function(a,b){return(a.ownerDocument||a)!==G&&F(a),M(a,b)},b.attr=function(a,b){(a.ownerDocument||a)!==G&&F(a);var c=w.attrHandle[b.toLowerCase()],d=c&&W.call(w.attrHandle,b.toLowerCase())?c(a,b,!I):void 0;return void 0!==d?d:v.attributes||!I?a.getAttribute(b):(d=a.getAttributeNode(b))&&d.specified?d.value:null},b.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},b.uniqueSort=function(a){var b,c=[],d=0,e=0;if(E=!v.detectDuplicates,D=!v.sortStable&&a.slice(0),a.sort(U),E){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}return D=null,a},x=b.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=x(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d++];)c+=x(b);return c},w=b.selectors={cacheLength:50,createPseudo:d,match:oa,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(va,wa),a[3]=(a[3]||a[4]||a[5]||"").replace(va,wa),"~="===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]||b.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]&&b.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return oa.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&ma.test(c)&&(b=z(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(va,wa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=R[a+" "];return b||(b=new RegExp("(^|"+ca+")"+a+"("+ca+"|$)"))&&R(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,c,d){return function(e){var f=b.attr(e,a);return null==f?"!="===c:!c||(f+="","="===c?f===d:"!="===c?f!==d:"^="===c?d&&0===f.indexOf(d):"*="===c?d&&f.indexOf(d)>-1:"$="===c?d&&f.slice(-d.length)===d:"~="===c?(" "+f.replace(ha," ")+" ").indexOf(d)>-1:"|="===c&&(f===d||f.slice(0,d.length+1)===d+"-"))}},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){for(;p;){for(l=b;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){for(k=q[N]||(q[N]={}),j=k[a]||[],n=j[0]===P&&j[1],m=j[0]===P&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[P,n,m];break}}else if(s&&(j=(b[N]||(b[N]={}))[a])&&j[0]===P)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[N]||(l[N]={}))[a]=[P,m]),l!==b)););return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,c){var e,f=w.pseudos[a]||w.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);return f[N]?f(c):f.length>1?(e=[a,a,"",c],w.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,e=f(a,c),g=e.length;g--;)d=aa(a,e[g]),a[d]=!(b[d]=e[g])}):function(a){return f(a,0,e)}):f}},pseudos:{not:d(function(a){var b=[],c=[],e=A(a.replace(ia,"$1"));return e[N]?d(function(a,b,c,d){for(var f,g=e(a,null,d,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,d,f){return b[0]=a,e(b,null,f,c),b[0]=null,!c.pop()}}),has:d(function(a){return function(c){return b(a,c).length>0}}),contains:d(function(a){return a=a.replace(va,wa),function(b){return(b.textContent||b.innerText||x(b)).indexOf(a)>-1}}),lang:d(function(a){return na.test(a||"")||b.error("unsupported lang: "+a),a=a.replace(va,wa).toLowerCase(),function(b){var c;do if(c=I?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===H},focus:function(a){return a===G.activeElement&&(!G.hasFocus||G.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!w.pseudos.empty(a)},header:function(a){return qa.test(a.nodeName)},input:function(a){return pa.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:j(function(){return[0]}),last:j(function(a,b){return[b-1]}),eq:j(function(a,b,c){return[c<0?c+b:c]}),even:j(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:j(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:j(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:j(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},w.pseudos.nth=w.pseudos.eq;for(u in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[u]=h(u);for(u in{submit:!0,reset:!0})w.pseudos[u]=i(u);return l.prototype=w.filters=w.pseudos,w.setFilters=new l,z=b.tokenize=function(a,c){var d,e,f,g,h,i,j,k=S[a+" "];if(k)return c?0:k.slice(0);for(h=a,i=[],j=w.preFilter;h;){d&&!(e=ja.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),d=!1,(e=ka.exec(h))&&(d=e.shift(),f.push({value:d,type:e[0].replace(ia," ")}),h=h.slice(d.length));for(g in w.filter)!(e=oa[g].exec(h))||j[g]&&!(e=j[g](e))||(d=e.shift(),f.push({value:d,type:g,matches:e}),h=h.slice(d.length));if(!d)break}return c?h.length:h?b.error(a):S(a,i).slice(0)},A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=z(a)),c=b.length;c--;)f=s(b[c]),f[N]?d.push(f):e.push(f);f=T(a,t(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&z(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&v.getById&&9===b.nodeType&&I&&w.relative[f[1].type]){if(b=(w.find.ID(g.matches[0].replace(va,wa),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=oa.needsContext.test(a)?0:f.length;e--&&(g=f[e],!w.relative[h=g.type]);)if((i=w.find[h])&&(d=i(g.matches[0].replace(va,wa),ta.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&m(f),!a)return $.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ta.test(a)&&k(b.parentNode)||b),c},v.sortStable=N.split("").sort(U).join("")===N,v.detectDuplicates=!!E,F(),v.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),v.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(ba,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),b}(a);_.find=ea,_.expr=ea.selectors,_.expr[":"]=_.expr.pseudos,_.unique=ea.uniqueSort,_.text=ea.getText,_.isXMLDoc=ea.isXML,_.contains=ea.contains;var fa=_.expr.match.needsContext,ga=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ha=/^.[^:#\[\.,]*$/;_.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?_.find.matchesSelector(d,a)?[d]:[]:_.find.matches(a,_.grep(b,function(a){return 1===a.nodeType}))},_.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(_(a).filter(function(){ -for(b=0;b<c;b++)if(_.contains(e[b],this))return!0}));for(b=0;b<c;b++)_.find(a,e[b],d);return d=this.pushStack(c>1?_.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&fa.test(a)?_(a):a||[],!1).length}});var ia,ja=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ka=_.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]:ja.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ia).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof _?b[0]:b,_.merge(this,_.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:Z,!0)),ga.test(c[1])&&_.isPlainObject(b))for(c in b)_.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=Z.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=Z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):_.isFunction(a)?"undefined"!=typeof ia.ready?ia.ready(a):a(_):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),_.makeArray(a,this))};ka.prototype=_.fn,ia=_(Z);var la=/^(?:parents|prev(?:Until|All))/,ma={children:!0,contents:!0,next:!0,prev:!0};_.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&_(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}}),_.fn.extend({has:function(a){var b=_(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(_.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fa.test(a)||"string"!=typeof a?_(a,b||this.context):0;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&_.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?_.unique(f):f)},index:function(a){return a?"string"==typeof a?U.call(_(a),this[0]):U.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(_.unique(_.merge(this.get(),_(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),_.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return _.dir(a,"parentNode")},parentsUntil:function(a,b,c){return _.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return _.dir(a,"nextSibling")},prevAll:function(a){return _.dir(a,"previousSibling")},nextUntil:function(a,b,c){return _.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return _.dir(a,"previousSibling",c)},siblings:function(a){return _.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return _.sibling(a.firstChild)},contents:function(a){return a.contentDocument||_.merge([],a.childNodes)}},function(a,b){_.fn[a]=function(c,d){var e=_.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=_.filter(d,e)),this.length>1&&(ma[a]||_.unique(e),la.test(a)&&e.reverse()),this.pushStack(e)}});var na=/\S+/g,oa={};_.Callbacks=function(a){a="string"==typeof a?oa[a]||f(a):_.extend({},a);var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(b=a.memory&&f,c=!0,h=e||0,e=0,g=i.length,d=!0;i&&h<g;h++)if(i[h].apply(f[0],f[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function f(b){_.each(b,function(b,c){var d=_.type(c);"function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),d?g=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&_.each(arguments,function(a,b){for(var c;(c=_.inArray(b,i,c))>-1;)i.splice(c,1),d&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return a?_.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||c&&!j||(b=b||[],b=[a,b.slice?b.slice():b],d?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!c}};return l},_.extend({Deferred:function(a){var b=[["resolve","done",_.Callbacks("once memory"),"resolved"],["reject","fail",_.Callbacks("once memory"),"rejected"],["notify","progress",_.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return _.Deferred(function(c){_.each(b,function(b,f){var g=_.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&_.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?_.extend(a,d):d}},e={};return d.pipe=d.then,_.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,c,d,e=0,f=R.call(arguments),g=f.length,h=1!==g||a&&_.isFunction(a.promise)?g:0,i=1===h?a:_.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?R.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);e<g;e++)f[e]&&_.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}});var pa;_.fn.ready=function(a){return _.ready.promise().done(a),this},_.extend({isReady:!1,readyWait:1,holdReady:function(a){a?_.readyWait++:_.ready(!0)},ready:function(a){(a===!0?--_.readyWait:_.isReady)||(_.isReady=!0,a!==!0&&--_.readyWait>0||(pa.resolveWith(Z,[_]),_.fn.triggerHandler&&(_(Z).triggerHandler("ready"),_(Z).off("ready"))))}}),_.ready.promise=function(b){return pa||(pa=_.Deferred(),"complete"===Z.readyState?setTimeout(_.ready):(Z.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1))),pa.promise(b)},_.ready.promise();var qa=_.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===_.type(c)){e=!0;for(h in c)_.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,_.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(_(a),c)})),b))for(;h<i;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};_.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType},h.uid=1,h.accepts=_.acceptData,h.prototype={key:function(a){if(!h.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=h.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,_.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(_.isEmptyObject(f))_.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,_.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{_.isArray(b)?d=b.concat(b.map(_.camelCase)):(e=_.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(na)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!_.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var ra=new h,sa=new h,ta=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ua=/([A-Z])/g;_.extend({hasData:function(a){return sa.hasData(a)||ra.hasData(a)},data:function(a,b,c){return sa.access(a,b,c)},removeData:function(a,b){sa.remove(a,b)},_data:function(a,b,c){return ra.access(a,b,c)},_removeData:function(a,b){ra.remove(a,b)}}),_.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=sa.get(f),1===f.nodeType&&!ra.get(f,"hasDataAttrs"))){for(c=g.length;c--;)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=_.camelCase(d.slice(5)),i(f,d,e[d])));ra.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){sa.set(this,a)}):qa(this,function(b){var c,d=_.camelCase(a);if(f&&void 0===b){if(c=sa.get(f,a),void 0!==c)return c;if(c=sa.get(f,d),void 0!==c)return c;if(c=i(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=sa.get(this,d);sa.set(this,d,b),a.indexOf("-")!==-1&&void 0!==c&&sa.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){sa.remove(this,a)})}}),_.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=ra.get(a,b),c&&(!d||_.isArray(c)?d=ra.access(a,b,_.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=_.queue(a,b),d=c.length,e=c.shift(),f=_._queueHooks(a,b),g=function(){_.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 ra.get(a,c)||ra.access(a,c,{empty:_.Callbacks("once memory").add(function(){ra.remove(a,[b+"queue",c])})})}}),_.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?_.queue(this[0],a):void 0===b?this:this.each(function(){var c=_.queue(this,a,b);_._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&_.dequeue(this,a)})},dequeue:function(a){return this.each(function(){_.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=_.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=ra.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var va=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,wa=["Top","Right","Bottom","Left"],xa=function(a,b){return a=b||a,"none"===_.css(a,"display")||!_.contains(a.ownerDocument,a)},ya=/^(?:checkbox|radio)$/i;!function(){var a=Z.createDocumentFragment(),b=a.appendChild(Z.createElement("div")),c=Z.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),Y.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",Y.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var za="undefined";Y.focusinBubbles="onfocusin"in a;var Aa=/^key/,Ba=/^(?:mouse|pointer|contextmenu)|click/,Ca=/^(?:focusinfocus|focusoutblur)$/,Da=/^([^.]*)(?:\.(.+)|)$/;_.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.get(a);if(q)for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=_.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return typeof _!==za&&_.event.triggered!==b.type?_.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(na)||[""],j=b.length;j--;)h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=_.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=_.event.special[n]||{},k=_.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&_.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,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),_.event.global[n]=!0)},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=ra.hasData(a)&&ra.get(a);if(q&&(i=q.events)){for(b=(b||"").match(na)||[""],j=b.length;j--;)if(h=Da.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=_.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==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,o,q.handle)!==!1||_.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)_.event.remove(a,n+b[j],c,d,!0);_.isEmptyObject(i)&&(delete q.handle,ra.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||Z],n=X.call(b,"type")?b.type:b,o=X.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||Z,3!==d.nodeType&&8!==d.nodeType&&!Ca.test(n+_.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[_.expando]?b:new _.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:_.makeArray(c,[b]),l=_.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!_.isWindow(d)){for(i=l.delegateType||n,Ca.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||Z)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=m[f++])&&!b.isPropagationStopped();)b.type=f>1?i:l.bindType||n,k=(ra.get(g,"events")||{})[b.type]&&ra.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&k.apply&&_.acceptData(g)&&(b.result=k.apply(g,c),b.result===!1&&b.preventDefault());return b.type=n,e||b.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!_.acceptData(d)||j&&_.isFunction(d[n])&&!_.isWindow(d)&&(h=d[j],h&&(d[j]=null),_.event.triggered=n,d[n](),_.event.triggered=void 0,h&&(d[j]=h)),b.result}},dispatch:function(a){a=_.event.fix(a);var b,c,d,e,f,g=[],h=R.call(arguments),i=(ra.get(this,"events")||{})[a.type]||[],j=_.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=_.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(f.namespace)||(a.handleObj=f,a.data=f.data,d=((_.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.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;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?_(e,this).index(i)>=0:_.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||Z,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[_.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=Ba.test(e)?this.mouseHooks:Aa.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new _.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=Z),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==l()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===l()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&_.nodeName(this,"input"))return this.click(),!1},_default:function(a){return _.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=_.extend(new _.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?_.event.trigger(e,null,b):_.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},_.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},_.Event=function(a,b){return this instanceof _.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?j:k):this.type=a,b&&_.extend(this,b),this.timeStamp=a&&a.timeStamp||_.now(),void(this[_.expando]=!0)):new _.Event(a,b)},_.Event.prototype={isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=j,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=j,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=j,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){_.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||_.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),Y.focusinBubbles||_.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){_.event.simulate(b,a.target,_.event.fix(a),!0)};_.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=ra.access(d,b);e||d.addEventListener(a,c,!0),ra.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=ra.access(d,b)-1;e?ra.access(d,b,e):(d.removeEventListener(a,c,!0),ra.remove(d,b))}}}),_.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=k;else if(!d)return this;return 1===e&&(f=d,d=function(a){return _().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=_.guid++)),this.each(function(){_.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,_(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=k),this.each(function(){_.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){_.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return _.event.trigger(a,b,c,!0)}});var Ea=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fa=/<([\w:]+)/,Ga=/<|&#?\w+;/,Ha=/<(?:script|style|link)/i,Ia=/checked\s*(?:[^=]|=\s*.checked.)/i,Ja=/^$|\/(?:java|ecma)script/i,Ka=/^true\/(.*)/,La=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ma.optgroup=Ma.option,Ma.tbody=Ma.tfoot=Ma.colgroup=Ma.caption=Ma.thead,Ma.th=Ma.td,_.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=_.contains(a.ownerDocument,a);if(!(Y.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||_.isXMLDoc(a)))for(g=r(h),f=r(a),d=0,e=f.length;d<e;d++)s(f[d],g[d]);if(b)if(c)for(f=f||r(a),g=g||r(h),d=0,e=f.length;d<e;d++)q(f[d],g[d]);else q(a,h);return g=r(h,"script"),g.length>0&&p(g,!i&&r(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;m<n;m++)if(e=a[m],e||0===e)if("object"===_.type(e))_.merge(l,e.nodeType?[e]:e);else if(Ga.test(e)){for(f=f||k.appendChild(b.createElement("div")),g=(Fa.exec(e)||["",""])[1].toLowerCase(),h=Ma[g]||Ma._default,f.innerHTML=h[1]+e.replace(Ea,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;_.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));for(k.textContent="",m=0;e=l[m++];)if((!d||_.inArray(e,d)===-1)&&(i=_.contains(e.ownerDocument,e),f=r(k.appendChild(e),"script"),i&&p(f),c))for(j=0;e=f[j++];)Ja.test(e.type||"")&&c.push(e);return k},cleanData:function(a){for(var b,c,d,e,f=_.event.special,g=0;void 0!==(c=a[g]);g++){if(_.acceptData(c)&&(e=c[ra.expando],e&&(b=ra.cache[e]))){if(b.events)for(d in b.events)f[d]?_.event.remove(c,d):_.removeEvent(c,d,b.handle);ra.cache[e]&&delete ra.cache[e]}delete sa.cache[c[sa.expando]]}}}),_.fn.extend({text:function(a){return qa(this,function(a){return void 0===a?_.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=m(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=m(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?_.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||_.cleanData(r(c)),c.parentNode&&(b&&_.contains(c.ownerDocument,c)&&p(r(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(_.cleanData(r(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return _.clone(this,a,b)})},html:function(a){return qa(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&&!Ha.test(a)&&!Ma[(Fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ea,"<$1></$2>");try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(_.cleanData(r(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,_.cleanData(r(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=S.apply([],a);var c,d,e,f,g,h,i=0,j=this.length,k=this,l=j-1,m=a[0],p=_.isFunction(m);if(p||j>1&&"string"==typeof m&&!Y.checkClone&&Ia.test(m))return this.each(function(c){var d=k.eq(c);p&&(a[0]=m.call(this,c,d.html())),d.domManip(a,b)});if(j&&(c=_.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(e=_.map(r(c,"script"),n),f=e.length;i<j;i++)g=c,i!==l&&(g=_.clone(g,!0,!0),f&&_.merge(e,r(g,"script"))),b.call(this[i],g,i);if(f)for(h=e[e.length-1].ownerDocument,_.map(e,o),i=0;i<f;i++)g=e[i],Ja.test(g.type||"")&&!ra.access(g,"globalEval")&&_.contains(h,g)&&(g.src?_._evalUrl&&_._evalUrl(g.src):_.globalEval(g.textContent.replace(La,"")))}return this}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){_.fn[a]=function(a){for(var c,d=[],e=_(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),_(e[g])[b](c),T.apply(d,c.get());return this.pushStack(d)}});var Na,Oa={},Pa=/^margin/,Qa=new RegExp("^("+va+")(?!px)[a-z%]+$","i"),Ra=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};!function(){function b(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",g.innerHTML="",e.appendChild(f);var b=a.getComputedStyle(g,null);c="1%"!==b.top,d="4px"===b.width,e.removeChild(f)}var c,d,e=Z.documentElement,f=Z.createElement("div"),g=Z.createElement("div");g.style&&(g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",Y.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",f.appendChild(g),a.getComputedStyle&&_.extend(Y,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return null==d&&b(),d},reliableMarginRight:function(){var b,c=g.appendChild(Z.createElement("div"));return c.style.cssText=g.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.removeChild(c),b}}))}(),_.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Sa=/^(none|table(?!-c[ea]).+)/,Ta=new RegExp("^("+va+")(.*)$","i"),Ua=new RegExp("^([+-])=("+va+")","i"),Va={position:"absolute",visibility:"hidden",display:"block"},Wa={letterSpacing:"0",fontWeight:"400"},Xa=["Webkit","O","Moz","ms"];_.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=v(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=_.camelCase(b),i=a.style;return b=_.cssProps[h]||(_.cssProps[h]=x(i,h)),g=_.cssHooks[b]||_.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ua.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(_.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||_.cssNumber[h]||(c+="px"),Y.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=_.camelCase(b);return b=_.cssProps[h]||(_.cssProps[h]=x(a.style,h)),g=_.cssHooks[b]||_.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=v(a,b,d)),"normal"===e&&b in Wa&&(e=Wa[b]),""===c||c?(f=parseFloat(e),c===!0||_.isNumeric(f)?f||0:e):e}}),_.each(["height","width"],function(a,b){_.cssHooks[b]={get:function(a,c,d){if(c)return Sa.test(_.css(a,"display"))&&0===a.offsetWidth?_.swap(a,Va,function(){return A(a,b,d)}):A(a,b,d)},set:function(a,c,d){var e=d&&Ra(a);return y(a,c,d?z(a,b,d,"border-box"===_.css(a,"boxSizing",!1,e),e):0)}}}),_.cssHooks.marginRight=w(Y.reliableMarginRight,function(a,b){if(b)return _.swap(a,{display:"inline-block"},v,[a,"marginRight"])}),_.each({margin:"",padding:"",border:"Width"},function(a,b){_.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+wa[d]+b]=f[d]||f[d-2]||f[0];return e}},Pa.test(a)||(_.cssHooks[a+b].set=y)}),_.fn.extend({css:function(a,b){return qa(this,function(a,b,c){var d,e,f={},g=0;if(_.isArray(b)){for(d=Ra(a),e=b.length;g<e;g++)f[b[g]]=_.css(a,b[g],!1,d);return f}return void 0!==c?_.style(a,b,c):_.css(a,b)},a,b,arguments.length>1)},show:function(){return B(this,!0)},hide:function(){return B(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){xa(this)?_(this).show():_(this).hide()})}}),_.Tween=C,C.prototype={constructor:C,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(_.cssNumber[c]?"":"px")},cur:function(){var a=C.propHooks[this.prop];return a&&a.get?a.get(this):C.propHooks._default.get(this)},run:function(a){var b,c=C.propHooks[this.prop];return this.options.duration?this.pos=b=_.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):C.propHooks._default.set(this),this}},C.prototype.init.prototype=C.prototype,C.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=_.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){_.fx.step[a.prop]?_.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[_.cssProps[a.prop]]||_.cssHooks[a.prop])?_.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},C.propHooks.scrollTop=C.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},_.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},_.fx=C.prototype.init,_.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=new RegExp("^(?:([+-])=|)("+va+")([a-z%]*)$","i"),ab=/queueHooks$/,bb=[G],cb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=_a.exec(b),f=e&&e[3]||(_.cssNumber[a]?"":"px"),g=(_.cssNumber[a]||"px"!==f&&+d)&&_a.exec(_.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,_.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};_.Animation=_.extend(I,{tweener:function(a,b){_.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;d<e;d++)c=a[d],cb[c]=cb[c]||[],cb[c].unshift(b)},prefilter:function(a,b){b?bb.unshift(a):bb.push(a)}}),_.speed=function(a,b,c){var d=a&&"object"==typeof a?_.extend({},a):{complete:c||!c&&b||_.isFunction(a)&&a,duration:a,easing:c&&b||b&&!_.isFunction(b)&&b};return d.duration=_.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in _.fx.speeds?_.fx.speeds[d.duration]:_.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){_.isFunction(d.old)&&d.old.call(this),d.queue&&_.dequeue(this,d.queue)},d},_.fn.extend({fadeTo:function(a,b,c,d){return this.filter(xa).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=_.isEmptyObject(a),f=_.speed(b,c,d),g=function(){var b=I(this,_.extend({},a),f);(e||ra.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=_.timers,g=ra.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||_.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=ra.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=_.timers,g=d?d.length:0;for(c.finish=!0,_.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1)); -for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),_.each(["toggle","show","hide"],function(a,b){var c=_.fn[b];_.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(E(b,!0),a,d,e)}}),_.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){_.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),_.timers=[],_.fx.tick=function(){var a,b=0,c=_.timers;for(Ya=_.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||_.fx.stop(),Ya=void 0},_.fx.timer=function(a){_.timers.push(a),a()?_.fx.start():_.timers.pop()},_.fx.interval=13,_.fx.start=function(){Za||(Za=setInterval(_.fx.tick,_.fx.interval))},_.fx.stop=function(){clearInterval(Za),Za=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(a,b){return a=_.fx?_.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=Z.createElement("input"),b=Z.createElement("select"),c=b.appendChild(Z.createElement("option"));a.type="checkbox",Y.checkOn=""!==a.value,Y.optSelected=c.selected,b.disabled=!0,Y.optDisabled=!c.disabled,a=Z.createElement("input"),a.value="t",a.type="radio",Y.radioValue="t"===a.value}();var db,eb,fb=_.expr.attrHandle;_.fn.extend({attr:function(a,b){return qa(this,_.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){_.removeAttr(this,a)})}}),_.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===za?_.prop(a,b,c):(1===f&&_.isXMLDoc(a)||(b=b.toLowerCase(),d=_.attrHooks[b]||(_.expr.match.bool.test(b)?eb:db)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=_.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void _.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(na);if(f&&1===a.nodeType)for(;c=f[e++];)d=_.propFix[c]||c,_.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Y.radioValue&&"radio"===b&&_.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),eb={set:function(a,b,c){return b===!1?_.removeAttr(a,c):a.setAttribute(c,c),c}},_.each(_.expr.match.bool.source.match(/\w+/g),function(a,b){var c=fb[b]||_.find.attr;fb[b]=function(a,b,d){var e,f;return d||(f=fb[b],fb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,fb[b]=f),e}});var gb=/^(?:input|select|textarea|button)$/i;_.fn.extend({prop:function(a,b){return qa(this,_.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[_.propFix[a]||a]})}}),_.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!_.isXMLDoc(a),f&&(b=_.propFix[b]||b,e=_.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||gb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Y.optSelected||(_.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this});var hb=/[\t\r\n\f]/g;_.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(na)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=_.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(na)||[];i<j;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");g=a?_.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):_.isFunction(a)?this.each(function(c){_(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,e=_(this),f=a.match(na)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else c!==za&&"boolean"!==c||(this.className&&ra.set(this,"__className__",this.className),this.className=this.className||a===!1?"":ra.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;c<d;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(hb," ").indexOf(b)>=0)return!0;return!1}});var ib=/\r/g;_.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=_.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,_(this).val()):a,null==e?e="":"number"==typeof e?e+="":_.isArray(e)&&(e=_.map(e,function(a){return null==a?"":a+""})),b=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=_.valHooks[e.type]||_.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ib,""):null==c?"":c)}}}),_.extend({valHooks:{option:{get:function(a){var b=_.find.attr(a,"value");return null!=b?b:_.trim(_.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&(Y.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!_.nodeName(c.parentNode,"optgroup"))){if(b=_(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=_.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=_.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(a,b){if(_.isArray(b))return a.checked=_.inArray(_(a).val(),b)>=0}},Y.checkOn||(_.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),_.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){_.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),_.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var jb=_.now(),kb=/\?/;_.parseJSON=function(a){return JSON.parse(a+"")},_.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return b&&!b.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+a),b};var lb=/#.*$/,mb=/([?&])_=[^&]*/,nb=/^(.*?):[ \t]*([^\r\n]*)$/gm,ob=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pb=/^(?:GET|HEAD)$/,qb=/^\/\//,rb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,sb={},tb={},ub="*/".concat("*"),vb=a.location.href,wb=rb.exec(vb.toLowerCase())||[];_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:vb,type:"GET",isLocal:ob.test(wb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":_.parseJSON,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?L(L(a,_.ajaxSettings),b):L(_.ajaxSettings,a)},ajaxPrefilter:J(sb),ajaxTransport:J(tb),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&a<300||304===a,c&&(s=M(l,v,c)),s=N(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(_.lastModified[e]=u),u=v.getResponseHeader("etag"),u&&(_.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,!a&&w||(w="error",a<0&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--_.active||_.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=_.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?_(m):_.event,o=_.Deferred(),p=_.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!g)for(g={};b=nb.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(t<2)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return d&&d.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||vb)+"").replace(lb,"").replace(qb,wb[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=_.trim(l.dataType||"*").toLowerCase().match(na)||[""],null==l.crossDomain&&(i=rb.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===wb[1]&&i[2]===wb[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(wb[3]||("http:"===wb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=_.param(l.data,l.traditional)),K(sb,l,b,v),2===t)return v;j=_.event&&l.global,j&&0===_.active++&&_.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!pb.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(kb.test(e)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=mb.test(e)?e.replace(mb,"$1_="+jb++):e+(kb.test(e)?"&":"?")+"_="+jb++)),l.ifModified&&(_.lastModified[e]&&v.setRequestHeader("If-Modified-Since",_.lastModified[e]),_.etag[e]&&v.setRequestHeader("If-None-Match",_.etag[e])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+ub+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)v.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(k in{success:1,error:1,complete:1})v[k](l[k]);if(d=K(tb,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,d.send(r,c)}catch(w){if(!(t<2))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return _.get(a,b,c,"json")},getScript:function(a,b){return _.get(a,void 0,b,"script")}}),_.each(["get","post"],function(a,b){_[b]=function(a,c,d,e){return _.isFunction(c)&&(e=e||d,d=c,c=void 0),_.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),_._evalUrl=function(a){return _.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},_.fn.extend({wrapAll:function(a){var b;return _.isFunction(a)?this.each(function(b){_(this).wrapAll(a.call(this,b))}):(this[0]&&(b=_(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return _.isFunction(a)?this.each(function(b){_(this).wrapInner(a.call(this,b))}):this.each(function(){var b=_(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=_.isFunction(a);return this.each(function(c){_(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){_.nodeName(this,"body")||_(this).replaceWith(this.childNodes)}).end()}}),_.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},_.expr.filters.visible=function(a){return!_.expr.filters.hidden(a)};var xb=/%20/g,yb=/\[\]$/,zb=/\r?\n/g,Ab=/^(?:submit|button|image|reset|file)$/i,Bb=/^(?:input|select|textarea|keygen)/i;_.param=function(a,b){var c,d=[],e=function(a,b){b=_.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=_.ajaxSettings&&_.ajaxSettings.traditional),_.isArray(a)||a.jquery&&!_.isPlainObject(a))_.each(a,function(){e(this.name,this.value)});else for(c in a)O(c,a[c],b,e);return d.join("&").replace(xb,"+")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=_.prop(this,"elements");return a?_.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!_(this).is(":disabled")&&Bb.test(this.nodeName)&&!Ab.test(a)&&(this.checked||!ya.test(a))}).map(function(a,b){var c=_(this).val();return null==c?null:_.isArray(c)?_.map(c,function(a){return{name:b.name,value:a.replace(zb,"\r\n")}}):{name:b.name,value:c.replace(zb,"\r\n")}}).get()}}),_.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cb=0,Db={},Eb={0:200,1223:204},Fb=_.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Db)Db[a]()}),Y.cors=!!Fb&&"withCredentials"in Fb,Y.ajax=Fb=!!Fb,_.ajaxTransport(function(a){var b;if(Y.cors||Fb&&!a.crossDomain)return{send:function(c,d){var e,f=a.xhr(),g=++Cb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Db[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Eb[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Db[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return _.globalEval(a),a}}}),_.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),_.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=_("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),Z.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gb=[],Hb=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gb.pop()||_.expando+"_"+jb++;return this[a]=!0,a}}),_.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=_.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hb,"$1"+e):b.jsonp!==!1&&(b.url+=(kb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||_.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gb.push(e)),g&&_.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),_.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||Z;var d=ga.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=_.buildFragment([a],b,e),e&&e.length&&_(e).remove(),_.merge([],d.childNodes))};var Ib=_.fn.load;_.fn.load=function(a,b,c){if("string"!=typeof a&&Ib)return Ib.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=_.trim(a.slice(h)),a=a.slice(0,h)),_.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&_.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?_("<div>").append(_.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){_.fn[b]=function(a){return this.on(b,a)}}),_.expr.filters.animated=function(a){return _.grep(_.timers,function(b){return a===b.elem}).length};var Jb=a.document.documentElement;_.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=_.css(a,"position"),l=_(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=_.css(a,"top"),i=_.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),_.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},_.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){_.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,_.contains(b,d)?(typeof d.getBoundingClientRect!==za&&(e=d.getBoundingClientRect()),c=P(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===_.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),_.nodeName(a[0],"html")||(d=a.offset()),d.top+=_.css(a[0],"borderTopWidth",!0),d.left+=_.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-_.css(c,"marginTop",!0),left:b.left-d.left-_.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Jb;a&&!_.nodeName(a,"html")&&"static"===_.css(a,"position");)a=a.offsetParent;return a||Jb})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;_.fn[b]=function(e){return qa(this,function(b,e,f){var g=P(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),_.each(["top","left"],function(a,b){_.cssHooks[b]=w(Y.pixelPosition,function(a,c){if(c)return c=v(a,b),Qa.test(c)?_(a).position()[b]+"px":c})}),_.each({Height:"height",Width:"width"},function(a,b){_.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){_.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return qa(this,function(b,c,d){var e;return _.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?_.css(b,c,g):_.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),_.fn.size=function(){return this.length},_.fn.andSelf=_.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return _});var Kb=a.jQuery,Lb=a.$;return _.noConflict=function(b){return a.$===_&&(a.$=Lb),b&&a.jQuery===_&&(a.jQuery=Kb),_},typeof b===za&&(a.jQuery=a.$=_),_}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();return"area"===h?(e=b.parentNode,f=e.name,!(!b.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']")[0],!!g&&c(g))):(/^(input|select|textarea|button|object)$/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}a.ui=a.ui||{},a.extend(a.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({scrollParent:function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)},uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;g<h;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;n<o;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)&&(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); \ No newline at end of file diff --git a/dist/uhr-black.min.css b/dist/uhr-black.min.css deleted file mode 100644 index 993833d..0000000 --- a/dist/uhr-black.min.css +++ /dev/null @@ -1 +0,0 @@ -.black .onoffswitch-inner:before,.uhr.black{background-color:#111}.uhr.black .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.black .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-blue.min.css b/dist/uhr-blue.min.css deleted file mode 100644 index d92af55..0000000 --- a/dist/uhr-blue.min.css +++ /dev/null @@ -1 +0,0 @@ -.blue .onoffswitch-inner:before,.uhr.blue{background-color:#00a}.uhr.blue .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.blue .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-green.min.css b/dist/uhr-green.min.css deleted file mode 100644 index 312e209..0000000 --- a/dist/uhr-green.min.css +++ /dev/null @@ -1 +0,0 @@ -.green .onoffswitch-inner:before,.uhr.green{background-color:#0c0}.uhr.green .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.green .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)} \ No newline at end of file diff --git a/dist/uhr-pink.min.css b/dist/uhr-pink.min.css deleted file mode 100644 index ff02987..0000000 --- a/dist/uhr-pink.min.css +++ /dev/null @@ -1 +0,0 @@ -.pink .onoffswitch-inner:before,.uhr.pink{background-color:#f0a}.uhr.pink .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.pink .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.uhr.pink .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.pink .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-red.min.css b/dist/uhr-red.min.css deleted file mode 100644 index 4fc1063..0000000 --- a/dist/uhr-red.min.css +++ /dev/null @@ -1 +0,0 @@ -.red .onoffswitch-inner:before,.uhr.red{background-color:#700}.uhr.red .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.red .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-white.min.css b/dist/uhr-white.min.css deleted file mode 100644 index 8c452f5..0000000 --- a/dist/uhr-white.min.css +++ /dev/null @@ -1 +0,0 @@ -.uhr.white,.white .onoffswitch-inner:before{background-color:#ccc}.uhr.white .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.white .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.uhr.white .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.white .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)} \ No newline at end of file diff --git a/dist/uhr-yellow.min.css b/dist/uhr-yellow.min.css deleted file mode 100644 index 7230848..0000000 --- a/dist/uhr-yellow.min.css +++ /dev/null @@ -1 +0,0 @@ -.uhr.yellow,.yellow .onoffswitch-inner:before{background-color:#fd0}.uhr.yellow .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.yellow .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.uhr.yellow .dot:not(.active){border-color:rgba(0,0,0,.05);box-shadow:0 0 .1em rgba(0,0,0,.05)}.uhr.yellow .letter:not(.active){color:rgba(0,0,0,.05);text-shadow:0 0 .1em rgba(0,0,0,.05)} \ No newline at end of file diff --git a/dist/uhr.min.css b/dist/uhr.min.css deleted file mode 100644 index 04e1d74..0000000 --- a/dist/uhr.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Uhrenfont;src:url(../resources/uhr.woff) format('woff')}body{font-family:Uhrenfont,sans-serif}.uhr{position:relative;margin:0;transition:background-color .5s}.dot,.uhr .letterarea,.uhr .reflection{position:absolute;display:block}.uhr .reflection{top:0;bottom:0;left:0;right:0;background:radial-gradient(225em 45em at 160% 0,rgba(255,255,255,.4) 0,rgba(255,255,255,.05) 40%,rgba(255,255,255,0) 40%) no-repeat;margin:.15em}.uhr .letterarea{top:12%;bottom:12%;left:12%;right:12%;overflow:hidden;font-size:200%}.dot1,.dot2{top:3.75%}.dot3,.dot4{bottom:3.75%}.dot2,.dot3{right:3.75%}.item{transition:box-shadow .5s,text-shadow .5s,border-color .5s,color .5s}.dot{height:0;width:0;border:.2em solid;border-radius:1em}.dot.active{border-color:#eee;box-shadow:0 0 .2em #eee}.dot1{left:3.75%}.dot4{left:3.75%}.letter{height:10%;width:9.0909%;padding:0;margin:0;display:inline-block;text-align:center;line-height:160%}.letter.active{color:#eee;text-shadow:0 0 .2em #eee}.onoffswitch{position:relative;width:86px;margin:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #999;border-radius:50px}.modeswitch-inner,.onoffswitch-inner{width:200%;margin-left:-100%;-moz-transition:margin .3s ease-in 0s;-webkit-transition:margin .3s ease-in 0s;-o-transition:margin .3s ease-in 0s;transition:margin .3s ease-in 0s}.modeswitch-inner:after,.modeswitch-inner:before,.onoffswitch-inner:after,.onoffswitch-inner:before{float:left;width:50%;height:24px;padding:0;line-height:24px;font-size:18px;font-weight:700;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.onoffswitch-inner:before{content:"EIN";padding-left:12px;color:#eee;transition:background-color .5s}.onoffswitch-inner:after{content:"AUS";padding-right:12px;background-color:#eee;color:#999;text-align:right}.onoffswitch-switch{width:30px;margin:-3px;background:#fff;border:2px solid #999;border-radius:50px;position:absolute;top:0;bottom:0;right:58px;-moz-transition:all .3s ease-in 0s;-webkit-transition:all .3s ease-in 0s;-o-transition:all .3s ease-in 0s;transition:all .3s ease-in 0s}a.uhr-closecontrolpanel,a.uhr-configlink{cursor:pointer;display:inline-block;width:24px;height:24px}.onoffswitch-checkbox:checked+.onoffswitch-label .modeswitch-inner,.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:0}.modeswitch-inner:before{content:"MIN";padding-left:12px;background-color:#fff;color:#000}.modeswitch-inner:after{content:"SEC";padding-right:12px;background-color:#fff;color:#000;text-align:right}a.uhr-configlink{background:url(../resources/settings.png) no-repeat;margin:2px;vertical-align:top}.uhr-controlpanel{border-radius:.5em;box-shadow:0 0 1em #000;background-color:#fff;display:inline-block;padding:.5em;position:sticky;bottom:0;margin-left:1em}.uhr-controlpanel .content{position:relative}a.uhr-closecontrolpanel{position:absolute;right:0;top:-1em;background:url(../resources/close.png) no-repeat}#disclaimer{font-size:.5em}#disclaimer a{color:#444;text-decoration:underline} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..52c4d33 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5271 @@ +{ + "name": "uhr", + "version": "8.0.4-dev.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", + "dev": true + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha1-UxvHJlF6OytB+FACHGzBXqq1B80=", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha1-2J5ZmfeXh1Z0wH2H8mD8Qeg+jKk=", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha1-kNDVRDnaWHzX6EO/twRfUL0ivfE=", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha1-V9NbhoboUeLMBMQD8cACA5dqGBM=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + } + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha1-42jqFfibxwaff/uJrsOmx9SsItQ=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true, + "requires": { + "util": "0.10.3" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha1-ePrtjD0HSrgfIrTphdeehzj3IPg=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/atob/-/atob-2.1.2.tgz", + "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/base/-/base-0.11.2.tgz", + "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha1-uZgnm/R844NEtPPPkW1Gebv1Hjo=", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "batch": { + "version": "0.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beeper": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/beeper/-/beeper-1.1.1.tgz", + "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", + "dev": true + }, + "body": { + "version": "5.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "dev": true, + "requires": { + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/braces/-/braces-2.3.2.tgz", + "integrity": "sha1-WXn9PxTNUxVl5fot8av/8d+u5yk=", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", + "dev": true + }, + "bytes": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chai": { + "version": "4.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chai/-/chai-4.2.0.tgz", + "integrity": "sha1-dgqnLPION5XoSxKHfODoNzeqKeU=", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/clean-css/-/clean-css-4.2.1.tgz", + "integrity": "sha1-LUEe92uFabbQyEBo2r6FsKpeXBc=", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "cli": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/cli/-/cli-1.0.1.tgz", + "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "^7.1.1" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-7.1.3.tgz", + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffeescript": { + "version": "1.10.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/coffeescript/-/coffeescript-1.10.0.tgz", + "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/commander/-/commander-2.20.0.tgz", + "integrity": "sha1-1YuytcHuj4ew00ACfp6U4iLFpCI=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "connect": { + "version": "3.6.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "~1.3.2", + "utils-merge": "1.0.1" + } + }, + "connect-livereload": { + "version": "0.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/connect-livereload/-/connect-livereload-0.6.1.tgz", + "integrity": "sha1-GsDIu52c/VsotimYelapI525uqo=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "continuable-cache": { + "version": "0.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "date-time": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/date-time/-/date-time-1.1.0.tgz", + "integrity": "sha1-GIdtC9pMGf5w3Tv0sDTygbEqQLY=", + "dev": true, + "requires": { + "time-zone": "^0.1.0" + } + }, + "dateformat": { + "version": "1.0.12", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/dateformat/-/dateformat-1.0.12.tgz", + "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1", + "meow": "^3.3.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha1-38lARACtHI/gI+faHfHBR8S0RN8=", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/diff/-/diff-3.5.0.tgz", + "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=", + "dev": true + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha1-HsQFnihLq+027sKUHUqXChic58A=", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + }, + "dependencies": { + "entities": { + "version": "1.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/entities/-/entities-1.1.2.tgz", + "integrity": "sha1-vfpzUplmTfr9NFKe1PhSKidf6lY=", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8=", + "dev": true + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha1-Kk31MX9sz9kfhtb9JdjYoQO4gwk=", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha1-7SljTRm6ukY7bOa4CjchPqtx7EM=", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "error": { + "version": "7.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/error/-/error-7.0.2.tgz", + "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=", + "dev": true, + "requires": { + "string-template": "~0.2.1", + "xtend": "~4.0.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.13.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/es-abstract/-/es-abstract-1.13.0.tgz", + "integrity": "sha1-rIYUX91QmdjdSVWMy6Lq+biOJOk=", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.0", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "is-callable": "^1.1.4", + "is-regex": "^1.0.4", + "object-keys": "^1.0.12" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha1-7fckeAM0VujdqO8J4ArZZQcH83c=", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/es6-promise/-/es6-promise-4.2.6.tgz", + "integrity": "sha1-toXt2CWIhjZepitX0w3ij63Nl08=", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/execa/-/execa-1.0.0.tgz", + "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend/-/extend-3.0.2.tgz", + "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extract-zip": { + "version": "1.6.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extract-zip/-/extract-zip-1.6.7.tgz", + "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "dev": true, + "requires": { + "concat-stream": "1.6.2", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "yauzl": "2.4.1" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.1", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.3.1", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fined/-/fined-1.2.0.tgz", + "integrity": "sha1-0AvszxqitHXRbUI7Aji3E6LEo3s=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha1-595vEnnd2cqarIpZcdYYYGs6q0E=", + "dev": true + }, + "flat": { + "version": "4.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/flat/-/flat-4.1.0.tgz", + "integrity": "sha1-CQvsiwXjnLowl0fx1YjwTbr5jbI=", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha1-Ts8/z3ScvR5HJonhCaxmJhol5yU=", + "dev": true + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-extra": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fs-extra/-/fs-extra-1.0.0.tgz", + "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "dev": true + }, + "gaze": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/gaze/-/gaze-1.1.3.tgz", + "integrity": "sha1-xEFzPhO5J6yMD/C0w7Az8ogSkko=", + "dev": true, + "requires": { + "globule": "^1.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getobject": { + "version": "0.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/getobject/-/getobject-0.1.0.tgz", + "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globule": { + "version": "1.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/globule/-/globule-1.2.1.tgz", + "integrity": "sha1-Xf+xsZHyLSB5epNptJ6rTpg5aW0=", + "dev": true, + "requires": { + "glob": "~7.1.1", + "lodash": "~4.17.10", + "minimatch": "~3.0.2" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-7.1.3.tgz", + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA=", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/growl/-/growl-1.10.5.tgz", + "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=", + "dev": true + }, + "grunt": { + "version": "1.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt/-/grunt-1.0.4.tgz", + "integrity": "sha1-x5mIOUWlOj0HYi4HN8j3C/4Z6zg=", + "dev": true, + "requires": { + "coffeescript": "~1.10.0", + "dateformat": "~1.0.12", + "eventemitter2": "~0.4.13", + "exit": "~0.1.1", + "findup-sync": "~0.3.0", + "glob": "~7.0.0", + "grunt-cli": "~1.2.0", + "grunt-known-options": "~1.1.0", + "grunt-legacy-log": "~2.0.0", + "grunt-legacy-util": "~1.1.1", + "iconv-lite": "~0.4.13", + "js-yaml": "~3.13.0", + "minimatch": "~3.0.2", + "mkdirp": "~0.5.1", + "nopt": "~3.0.6", + "path-is-absolute": "~1.0.0", + "rimraf": "~2.6.2" + }, + "dependencies": { + "grunt-cli": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-cli/-/grunt-cli-1.2.0.tgz", + "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "dev": true, + "requires": { + "findup-sync": "~0.3.0", + "grunt-known-options": "~1.1.0", + "nopt": "~3.0.6", + "resolve": "~1.1.0" + } + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "grunt-cli": { + "version": "1.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-cli/-/grunt-cli-1.3.2.tgz", + "integrity": "sha1-YPEtEsG1qulK40aca1/iTpYAFOg=", + "dev": true, + "requires": { + "grunt-known-options": "~1.1.0", + "interpret": "~1.1.0", + "liftoff": "~2.5.0", + "nopt": "~4.0.1", + "v8flags": "~3.1.1" + }, + "dependencies": { + "nopt": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + } + } + }, + "grunt-contrib-clean": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-clean/-/grunt-contrib-clean-2.0.0.tgz", + "integrity": "sha1-O+fKSA2kt0CqXp2GPi9+iyT4pos=", + "dev": true, + "requires": { + "async": "^2.6.1", + "rimraf": "^2.6.2" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async/-/async-2.6.2.tgz", + "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + } + } + }, + "grunt-contrib-concat": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz", + "integrity": "sha1-YVCYYwhOhx1+ht5IwBUlntl3Rb0=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "source-map": "^0.5.3" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "grunt-contrib-connect": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-connect/-/grunt-contrib-connect-2.0.0.tgz", + "integrity": "sha1-fuhoOPNR9ywSGGFD68YII9jVJN0=", + "dev": true, + "requires": { + "async": "^2.6.1", + "connect": "^3.6.6", + "connect-livereload": "^0.6.0", + "morgan": "^1.9.0", + "node-http2": "^4.0.1", + "opn": "^5.3.0", + "portscanner": "^2.2.0", + "serve-index": "^1.9.1", + "serve-static": "^1.13.2" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async/-/async-2.6.2.tgz", + "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + } + } + }, + "grunt-contrib-cssmin": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-cssmin/-/grunt-contrib-cssmin-3.0.0.tgz", + "integrity": "sha1-F2fAoGL0tzU8WtytxS3P9xl9TYk=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "clean-css": "~4.2.1", + "maxmin": "^2.1.0" + } + }, + "grunt-contrib-jshint": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", + "integrity": "sha1-PXiYB1eQNCmdobQcTXDhunIpc+0=", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "hooker": "^0.2.3", + "jshint": "~2.10.2" + } + }, + "grunt-contrib-qunit": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-qunit/-/grunt-contrib-qunit-3.1.0.tgz", + "integrity": "sha1-kVgqLVXduTqMTZ/tJsmyNnuxNFE=", + "dev": true, + "requires": { + "eventemitter2": "^5.0.1", + "p-each-series": "^1.0.0", + "puppeteer": "^1.11.0" + }, + "dependencies": { + "eventemitter2": { + "version": "5.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/eventemitter2/-/eventemitter2-5.0.1.tgz", + "integrity": "sha1-YZegldX7a1folC9v1+qtY6CclFI=", + "dev": true + } + } + }, + "grunt-contrib-uglify": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.1.tgz", + "integrity": "sha1-aKe2L6BFzo4sdXTRvc07lrimhrE=", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "maxmin": "^2.1.0", + "uglify-js": "^3.5.0", + "uri-path": "^1.0.0" + } + }, + "grunt-contrib-watch": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", + "integrity": "sha1-wUPKW4JLKIoCS4VmOaU0Wu23jtQ=", + "dev": true, + "requires": { + "async": "^2.6.0", + "gaze": "^1.1.0", + "lodash": "^4.17.10", + "tiny-lr": "^1.1.1" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async/-/async-2.6.2.tgz", + "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + } + } + }, + "grunt-known-options": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-known-options/-/grunt-known-options-1.1.1.tgz", + "integrity": "sha1-bMCIEHvQIZ3F0+V9kZI/RpBZgE0=", + "dev": true + }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha1-yM0sbIGkRlubvy2HTZY/73pZ/7k=", + "dev": true, + "requires": { + "colors": "~1.1.2", + "grunt-legacy-log-utils": "~2.0.0", + "hooker": "~0.2.3", + "lodash": "~4.17.5" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha1-0vRCx8AVAGXZAEsI/XQQ03UZGU4=", + "dev": true, + "requires": { + "chalk": "~2.4.1", + "lodash": "~4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha1-4QYk58hgNOW4cMioYWdD8KCEXkI=", + "dev": true, + "requires": { + "async": "~1.5.2", + "exit": "~0.1.1", + "getobject": "~0.1.0", + "hooker": "~0.2.3", + "lodash": "~4.17.10", + "underscore.string": "~3.3.4", + "which": "~1.3.0" + } + }, + "grunt-mocha-phantomjs": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-mocha-phantomjs/-/grunt-mocha-phantomjs-4.0.0.tgz", + "integrity": "sha1-Oqgq9vANd8JeatmBw4iYzik69so=", + "dev": true, + "requires": { + "async": "^1.5.2", + "mocha-phantomjs-core": "^1.3.0", + "object-assign": "^4.1.0", + "phantomjs-prebuilt": "^2.1.3" + } + }, + "grunt-version": { + "version": "1.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/grunt-version/-/grunt-version-1.3.0.tgz", + "integrity": "sha1-Pih+wXWweNB88XeuGWtVh9xOeDU=", + "dev": true, + "requires": { + "grunt": "0.4.5 - 1", + "semver": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "4.3.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", + "dev": true + } + } + }, + "gzip-size": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/gzip-size/-/gzip-size-3.0.0.tgz", + "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=", + "dev": true, + "requires": { + "duplexer": "^0.1.1" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has/-/has-1.0.3.tgz", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hasha": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/hasha/-/hasha-2.2.0.tgz", + "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=", + "dev": true, + "requires": { + "is-stream": "^1.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/he/-/he-1.2.0.tgz", + "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", + "dev": true + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha1-dDKYzvTlrz4ZQWH7rcwhUdOgWOg=", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hooker": { + "version": "0.2.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/hooker/-/hooker-0.2.3.tgz", + "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha1-l/I2l3vW4SVAiTD/bePuxigewEc=", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/http-parser-js/-/http-parser-js-0.5.0.tgz", + "integrity": "sha1-1l7b7ehDSdDcMDIIFaFdOcw8u9g=", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "0.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/https-browserify/-/https-browserify-0.0.1.tgz", + "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", + "dev": true + }, + "https-proxy-agent": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha1-UVUpcPoE1yPgTFbQQXjD+SWSu8A=", + "dev": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/debug/-/debug-3.2.6.tgz", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ms/-/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ini/-/ini-1.3.5.tgz", + "integrity": "sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc=", + "dev": true + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha1-c5P1r6Weyf9fZ6J2INEcIm4+7AI=", + "dev": true + }, + "irregular-plurals": { + "version": "1.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/irregular-plurals/-/irregular-plurals-1.4.0.tgz", + "integrity": "sha1-LKmwM2UREYVUEvFr5dd8YqRYp2Y=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha1-OV4a6EsR8mrReV5zwXN45IowFXY=", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", + "dev": true + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha1-HhrfIZ4e62hNaR+dagX/DTCiTXU=", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha1-Nm2CQN3kh8pRgjsaufB6EKeCUco=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0=", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-like": { + "version": "1.0.8", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-number-like/-/is-number-like-1.0.8.tgz", + "integrity": "sha1-LhKWILUIkQQuROm7uzBZPnXPu+M=", + "dev": true, + "requires": { + "lodash.isfinite": "^3.3.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha1-obtpNc6MXboei5dUubLcwCDiJg0=", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha1-oFX2rlcZLK7jKeeoYBGLSXqVDzg=", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha1-1zHoiY7QkKEsNSrS6u1Qla0yLJ0=", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "jquery": { + "version": "3.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jquery/-/jquery-3.4.1.tgz", + "integrity": "sha1-cU8fjZ3eS9+lV2S6N+8hRjDYDvI=" + }, + "jquery-ui": { + "version": "1.12.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jquery-ui/-/jquery-ui-1.12.1.tgz", + "integrity": "sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE=" + }, + "jquery.cookie": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jquery.cookie/-/jquery.cookie-1.4.1.tgz", + "integrity": "sha1-1j3OIJ6raR/mMxbbCMqeR+D5OFs=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha1-r/FRswv9+o5J4F2iLnQV6d+jeEc=", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jshint": { + "version": "2.10.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jshint/-/jshint-2.10.2.tgz", + "integrity": "sha1-7WYmxPgiPJjpSq6mJ2dDVCekmj0=", + "dev": true, + "requires": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.11", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" + } + }, + "jshint-stylish": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jshint-stylish/-/jshint-stylish-2.2.1.tgz", + "integrity": "sha1-JCCCosA1rgP9gQROBXDMQgjPbmE=", + "dev": true, + "requires": { + "beeper": "^1.1.0", + "chalk": "^1.0.0", + "log-symbols": "^1.0.0", + "plur": "^2.1.0", + "string-length": "^1.0.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kew": { + "version": "0.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha1-ARRrNqYhjmTljzqNZt5df8b20FE=", + "dev": true + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha1-bvXS32DlL4LrIopMNz6NHzlyU88=", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + } + } + }, + "livereload-js": { + "version": "2.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/livereload-js/-/livereload-js-2.4.0.tgz", + "integrity": "sha1-RHwxzx6pq1L8INthXF3fZ494AJw=", + "dev": true + }, + "load-grunt-tasks": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/load-grunt-tasks/-/load-grunt-tasks-4.0.0.tgz", + "integrity": "sha1-9JS8D6xJURW1yMbJV8Xx8P/X7s4=", + "dev": true, + "requires": { + "arrify": "^1.0.0", + "multimatch": "^2.0.0", + "pkg-up": "^2.0.0", + "resolve-pkg": "^1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha1-s56mIp72B+zYniyN8SU2iRysm40=", + "dev": true + }, + "lodash.isfinite": { + "version": "3.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz", + "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", + "dev": true + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha1-KbM/MSqo9UfEpeSQ9Wr87JkTOtY=", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha1-fVg6cwZDTAVf5HSw9FB45uG0uSo=", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "maxmin": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/maxmin/-/maxmin-2.1.0.tgz", + "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "figures": "^1.0.1", + "gzip-size": "^3.0.0", + "pretty-bytes": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mem/-/mem-4.3.0.tgz", + "integrity": "sha1-Rhr0l7xK4JYIzbLmDu+2m/90QXg=", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "meow": { + "version": "3.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha1-cIWbyVyYQJUvNZoGij/En57PrCM=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "mime": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mime/-/mime-1.4.1.tgz", + "integrity": "sha1-Eh+evEnjdm8xGnbh+hyAA8SwOqY=", + "dev": true + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mime-db/-/mime-db-1.40.0.tgz", + "integrity": "sha1-plBX6ZjbCQ9zKmj2wnbTh9QSbDI=", + "dev": true + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mime-types/-/mime-types-2.1.24.tgz", + "integrity": "sha1-tvjQs+lR77d97eyhlM/20W9nb4E=", + "dev": true, + "requires": { + "mime-db": "1.40.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha1-pJ5yaNzhoNlpjkUybFYm3zVD0P4=", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "mocha": { + "version": "6.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mocha/-/mocha-6.1.4.tgz", + "integrity": "sha1-41+tokLVQ0p+Fj1VXHBfaHWVFkA=", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "2.2.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "ms": "2.1.1", + "node-environment-flags": "1.0.5", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.2.2", + "yargs-parser": "13.0.0", + "yargs-unparser": "1.5.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/debug/-/debug-3.2.6.tgz", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-7.1.3.tgz", + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=", + "dev": true, + "requires": { + "chalk": "^2.0.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ms/-/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha1-QXyZQeYCepq8ulCS3SkE4lW1+8I=", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha1-ds/nQs8fQbubHCmtAwaMBbTA5Ao=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "mocha-phantomjs-core": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mocha-phantomjs-core/-/mocha-phantomjs-core-1.3.1.tgz", + "integrity": "sha1-WGU4yNcfqN6QxBpGrMBIHB+4Phg=", + "dev": true + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha1-Co0Wc0odmvvIJLmd+H5zjlji2lk=", + "dev": true, + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "multimatch": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/multimatch/-/multimatch-2.1.0.tgz", + "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=", + "dev": true, + "requires": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + } + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", + "dev": true + }, + "node-environment-flags": { + "version": "1.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha1-+pMCdfW/Xa4YjWGSsktMi7rD12o=", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node-http2": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/node-http2/-/node-http2-4.0.1.tgz", + "integrity": "sha1-Fk/1O13SLITwrxQrh3xerraAmVk=", + "dev": true, + "requires": { + "assert": "1.4.1", + "events": "1.1.1", + "https-browserify": "0.0.1", + "setimmediate": "^1.0.5", + "stream-browserify": "2.0.1", + "timers-browserify": "2.0.2", + "url": "^0.11.0", + "websocket-stream": "^5.0.1" + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha1-lovxEA15Vrs8oIbwBvhGs7xACNo=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "opn": { + "version": "5.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/opn/-/opn-5.5.0.tgz", + "integrity": "sha1-/HFk+rVtI1kExRw7J9pnWMo7m/w=", + "dev": true, + "requires": { + "is-wsl": "^1.1.0" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha1-qAKm7hfyTBBIOrmTVxnO9O0Wvxo=", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha1-hc36+uso6Gd/QW4odZK18/SepBA=", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha1-kYzrrqJIpiz3/6uOO8qMX4gvxC4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-reduce": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", + "dev": true + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-ms": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/parse-ms/-/parse-ms-1.0.1.tgz", + "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pend": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "phantomjs-prebuilt": { + "version": "2.1.16", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", + "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3", + "extract-zip": "^1.6.5", + "fs-extra": "^1.0.0", + "hasha": "^2.2.0", + "kew": "^0.7.0", + "progress": "^1.1.8", + "request": "^2.81.0", + "request-progress": "^2.0.1", + "which": "^1.2.10" + }, + "dependencies": { + "progress": { + "version": "1.1.8", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + } + } + }, + "plur": { + "version": "2.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/plur/-/plur-2.1.2.tgz", + "integrity": "sha1-dIJFLBoPUI4+NE6uwxLJHCncZVo=", + "dev": true, + "requires": { + "irregular-plurals": "^1.0.0" + } + }, + "portscanner": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/portscanner/-/portscanner-2.2.0.tgz", + "integrity": "sha1-YFkYmz76CWXJ2WpWuVjrlQhBHPE=", + "dev": true, + "requires": { + "async": "^2.6.0", + "is-number-like": "^1.0.3" + }, + "dependencies": { + "async": { + "version": "2.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/async/-/async-2.6.2.tgz", + "integrity": "sha1-GDMOp+bjE4h/XS8qkEusb+TdU4E=", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "pretty-bytes": { + "version": "3.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pretty-bytes/-/pretty-bytes-3.0.1.tgz", + "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "pretty-ms": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pretty-ms/-/pretty-ms-2.1.0.tgz", + "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=", + "dev": true, + "requires": { + "is-finite": "^1.0.1", + "parse-ms": "^1.0.0", + "plur": "^1.0.0" + }, + "dependencies": { + "plur": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/plur/-/plur-1.0.0.tgz", + "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=", + "dev": true + } + } + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha1-o31zL0JxtKsa0HDTVQjoKQeI/6o=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/progress/-/progress-2.0.3.tgz", + "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", + "dev": true + }, + "proxy-from-env": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4=", + "dev": true + }, + "psl": { + "version": "1.1.31", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/psl/-/psl-1.1.31.tgz", + "integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ=", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/pump/-/pump-3.0.0.tgz", + "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "puppeteer": { + "version": "1.15.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/puppeteer/-/puppeteer-1.15.0.tgz", + "integrity": "sha1-FoD6wT5R9gkUMUmlt/qZ7sOSs08=", + "dev": true, + "requires": { + "debug": "^4.1.0", + "extract-zip": "^1.6.6", + "https-proxy-agent": "^2.2.1", + "mime": "^2.0.3", + "progress": "^2.0.1", + "proxy-from-env": "^1.0.0", + "rimraf": "^2.6.1", + "ws": "^6.1.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/debug/-/debug-4.1.1.tgz", + "integrity": "sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "mime": { + "version": "2.4.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/mime/-/mime-2.4.2.tgz", + "integrity": "sha1-zlIppemf/DE6usgGtILBDnumrHg=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ms/-/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + }, + "ws": { + "version": "6.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ws/-/ws-6.2.1.tgz", + "integrity": "sha1-RC/fCkftZPWbal2P8TD0dI7VJPs=", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/qs/-/qs-6.7.0.tgz", + "integrity": "sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=", + "dev": true + }, + "raw-body": { + "version": "1.1.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/raw-body/-/raw-body-1.1.7.tgz", + "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=", + "dev": true, + "requires": { + "bytes": "1", + "string_decoder": "0.10" + }, + "dependencies": { + "string_decoder": { + "version": "0.10.31", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha1-sRwn2IuP8fvgcGQ8+UsMea4bCq8=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/request/-/request-2.88.0.tgz", + "integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/qs/-/qs-6.5.2.tgz", + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=", + "dev": true + } + } + }, + "request-progress": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/request-progress/-/request-progress-2.0.1.tgz", + "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=", + "dev": true, + "requires": { + "throttleit": "^1.0.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=", + "dev": true + }, + "resolve": { + "version": "1.10.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve/-/resolve-1.10.1.tgz", + "integrity": "sha1-ZkhCrJYHlbvnWCIc3M2mH7ZLXxg=", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", + "dev": true + }, + "resolve-pkg": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve-pkg/-/resolve-pkg-1.0.0.tgz", + "integrity": "sha1-4ZoV54rKLhJEYdySsuOUPvk0lNk=", + "dev": true, + "requires": { + "resolve-from": "^2.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ret/-/ret-0.1.15.tgz", + "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha1-stEE/g2Psnz54KHNqCYt04M8bKs=", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "glob": { + "version": "7.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/glob/-/glob-7.1.3.tgz", + "integrity": "sha1-OWCDLT8VdBCDQtr9OmezMsCWnfE=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", + "dev": true + }, + "safe-json-parse": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/safe-json-parse/-/safe-json-parse-1.0.1.tgz", + "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c=", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/semver/-/semver-5.7.0.tgz", + "integrity": "sha1-eQp89v6lRZuslhELKbYEEtyP+Ws=", + "dev": true + }, + "send": { + "version": "0.16.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/send/-/send-0.16.2.tgz", + "integrity": "sha1-bsyh4PjBVtFBWXVZhI32RzCmu8E=", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha1-u3PURtonlhBu/MG2AaJT1sRr0Ic=", + "dev": true + } + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha1-CV6Ecv1bRiN9tQzkhqQ/S4bGzsE=", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha1-ca5KiPD+77v1LR6mBPP7MV67YnQ=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha1-0L2FU2iHtv58DYGMuWLZ2RxU5lY=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha1-OxWXRqZmBLBPjIFSS6NlxfFNhuw=", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha1-cuLMNAlVQ+Q7LGKyxMENSpBU8lk=", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha1-+4PlBERSaPFUsHTiGMh8ADzTHfQ=", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha1-LqRQrudPKom/uUUZwH/Nb0EyKXc=", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", + "integrity": "sha1-dezRqI3owYTvAV6vtRtbSL/RG7E=", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha1-2hdlJiv4wPVxdJ8q1sJjACB65nM=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, + "string-length": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0" + } + }, + "string-template": { + "version": "0.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string-template/-/string-template-0.2.1.tgz", + "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "dev": true + }, + "time-grunt": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/time-grunt/-/time-grunt-2.0.0.tgz", + "integrity": "sha1-20GFP5K4ebL17DNzGviFtFGADsk=", + "dev": true, + "requires": { + "chalk": "^1.0.0", + "date-time": "^1.1.0", + "figures": "^1.0.0", + "hooker": "^0.2.3", + "number-is-nan": "^1.0.0", + "pretty-ms": "^2.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } + }, + "time-zone": { + "version": "0.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/time-zone/-/time-zone-0.1.0.tgz", + "integrity": "sha1-Sncotqwo2w4Aj1FAQ/1VW9VXO0Y=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/timers-browserify/-/timers-browserify-2.0.2.tgz", + "integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tiny-lr": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/tiny-lr/-/tiny-lr-1.1.1.tgz", + "integrity": "sha1-n6VHQS8jj+2waO4pWvi2gsmLKqs=", + "dev": true, + "requires": { + "body": "^5.1.0", + "debug": "^3.1.0", + "faye-websocket": "~0.10.0", + "livereload-js": "^2.3.0", + "object-assign": "^4.1.0", + "qs": "^6.4.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/debug/-/debug-3.2.6.tgz", + "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ms/-/ms-2.1.1.tgz", + "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=", + "dev": true + } + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha1-U/Nto/R3g7CSWvoG/587FlKA94E=", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.5.10", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/uglify-js/-/uglify-js-3.5.10.tgz", + "integrity": "sha1-ZSvvOfhtnb/WZ0QH7gWl4tNyzy0=", + "dev": true, + "requires": { + "commander": "~2.20.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", + "dev": true + } + } + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha1-n+FTahCmZKZSZqHjzPhf02MCvJw=", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "underscore.string": { + "version": "3.3.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/underscore.string/-/underscore.string-3.3.5.tgz", + "integrity": "sha1-/CrSVbi9MJ4jnLxYFv0jqbfqQCM=", + "dev": true, + "requires": { + "sprintf-js": "^1.0.3", + "util-deprecate": "^1.0.2" + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha1-lMVA4f93KVbiKZUHwBCupsiDjrA=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=", + "dev": true + } + } + }, + "uri-path": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/use/-/use-3.1.1.tgz", + "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE=", + "dev": true + }, + "v8flags": { + "version": "3.1.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/v8flags/-/v8flags-3.1.2.tgz", + "integrity": "sha1-/FzQwidCgYHmwpspkuT48dpeDJ8=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "websocket-driver": { + "version": "0.7.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/websocket-driver/-/websocket-driver-0.7.0.tgz", + "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=", + "dev": true, + "requires": { + "http-parser-js": ">=0.4.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk=", + "dev": true + }, + "websocket-stream": { + "version": "5.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/websocket-stream/-/websocket-stream-5.5.0.tgz", + "integrity": "sha1-mCfyhG/A0rTcp6q4+SmAslSLho4=", + "dev": true, + "requires": { + "duplexify": "^3.5.1", + "inherits": "^2.0.1", + "readable-stream": "^2.3.3", + "safe-buffer": "^5.1.2", + "ws": "^3.2.0", + "xtend": "^4.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/which/-/which-1.3.1.tgz", + "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "ws": { + "version": "3.3.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ws/-/ws-3.3.3.tgz", + "integrity": "sha1-8c+E/i1ekB686U767OeF8YeiKPI=", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=", + "dev": true + }, + "yargs": { + "version": "13.2.2", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha1-DBAfWArpXOp/Odkn53cOP9yX+ZM=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha1-QXyZQeYCepq8ulCS3SkE4lW1+8I=", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha1-P8RPPnaovbHMNgLoYBCGAuXM3os=", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.5.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yargs-unparser/-/yargs-unparser-1.5.0.tgz", + "integrity": "sha1-8rsqfoPLyHu5XI5XKCigbJrdbg0=", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.11", + "yargs": "^12.0.5" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha1-QXyZQeYCepq8ulCS3SkE4lW1+8I=", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha1-BfWZe2CWR7ZPZrgeO0sQo2jnrRM=", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha1-h5oIZZc7yp9rq1y987HGfsfTvPQ=", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "yauzl": { + "version": "2.4.1", + "resolved": "https://bin.sbb.ch/artifactory/api/npm/npm/yauzl/-/yauzl-2.4.1.tgz", + "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "dev": true, + "requires": { + "fd-slicer": "~1.0.1" + } + } + } +} diff --git a/src/uhr.js b/src/uhr.js index 48ac199..0e5ce65 100644 --- a/src/uhr.js +++ b/src/uhr.js @@ -12,17 +12,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -(function($) { +(function ($) { 'use strict'; var uhrGlobals = { "id": 0, "languages": [], "themes": [], registerLanguage: function registerLanguage(code, language) { - var alreadyExists = uhrGlobals.languages.some(function(element) { + var alreadyExists = uhrGlobals.languages.some(function (element) { if (code === element.code) { console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language + - "' because it is already registered for language '" + element.language + "'!"); + "' because it is already registered for language '" + element.language + "'!"); return true; } return false; @@ -35,7 +35,7 @@ }; // auto-detect themes - $('link[rel=stylesheet]').each(function(index, item) { + $('link[rel=stylesheet]').each(function (index, item) { var styleSheet = $(item); var styleClass = styleSheet.attr('data-class'); if (styleClass !== undefined) { @@ -52,9 +52,12 @@ } // public interface methods (exported later) + var setCookie; + var isOn; + var update; var start = function start() { if (!isOn.bind(this)()) { - this.timer = window.setInterval(function() { + this.timer = window.setInterval(function () { this.options.time = new Date(); update.bind(this)(); }.bind(this), 1000); @@ -77,436 +80,25 @@ this.start(); } }; - var setLanguage = function setLanguage(languageKey) { - if (languageKey !== this.options.language) { - this.options.language = languageKey; - var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); - renderer.render.bind(this)(function() { - this.currentMinute = -1; - update.bind(this)(); - }.bind(this)); - setCookie.bind(this)('uhr-language', languageKey); - update.bind(this)(); - } - }; - var setTheme = function setTheme(theme) { - if (theme !== this.options.theme) { - this.element.removeClass(this.options.theme).addClass(theme); - $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); - this.options.theme = theme; - setCookie.bind(this)('uhr-theme', theme); - } - }; - var setTime = function setTime(time) { - this.currentMinute = -1; - if (time === null) { - this.options.time = new Date(); - } else { - if (this.timer !== null) { - window.clearInterval(this.timer); - } - this.options.time = time; - } - update.bind(this)(); - }; - var setMode = function(mode) { - this.options.mode = mode; - this.currentMinute = -1; - update.bind(this)(); - setCookie.bind(this)('uhr-mode', mode); - }; - var setWidth = function setWidth(width) { - var e = this.element; - e.css('width', width); - var realWidth = e.width(); - e.width(realWidth); - e.height(realWidth); - e.css('font-size', (realWidth / 40) + 'px'); - }; + var language; - // private interface methods - var create = function create() { - this.id = uhrGlobals.id++; - this.timer = null; - this.currentMinute = -1; - var userTime = this.options.time; - var hash, params; - if (this.options.time === undefined) { - this.options.time = new Date(); - } - // parse the URL params - hash = window.location.hash; - if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { - hash = hash.substring(1); - hash = decodeURIComponent(hash); - params = hash.split('&'); - params.forEach(function (element) { - var pair = element.split('='); - var key = pair[0]; - var value = pair[1]; - switch (key) { - case 'l': - case 'language': - this.options.language = value; - this.options.force = true; - break; - case 't': - case 'theme': - this.options.theme = value; - this.options.force = true; - break; - case 'm': - case 'mode': - this.options.mode = value; - this.options.force = true; - break; - case 's': - case 'status': - this.options.status = value; - this.options.force = true; - break; - } - }.bind(this)); - } - // end parse the URL params - setupHTML.bind(this)(); - wireFunctionality.bind(this)(); - if (userTime !== undefined) { - this.time(userTime); - } - }; - // private helper methods (not exported) - var toggleConfigScreen = function toggleConfigScreen() { - $('#uhr-controlpanel' + this.id).toggle('fast'); - }; - // set up - var setupHTML = function setupHTML() { - var e = this.element; - // Base clock area - e.addClass('uhr'); - e.empty(); - e.append('<span class="item dot dot1"></span>'); - e.append('<span class="item dot dot2"></span>'); - e.append('<span class="item dot dot3"></span>'); - e.append('<span class="item dot dot4"></span>'); - e.append('<div class="letterarea"></div>'); - e.append('<div class="reflection"></div>'); - setWidth.bind(this)(this.options.width); - - if (this.options.controls) { - var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); - var content = $('<div class="content"></div>'); - controlpanel.append(content); - // on/off switch - var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); - toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + - '" checked="checked" />'); - toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + - '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); - content.append(toggleSwitch); - - // time mode switch - var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); - modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + - '" checked="checked" />'); - modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + - '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + - '</label>'); - content.append(modeSwitch); - // language chooser - if (uhrGlobals.languages.length > 1) { - var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); - uhrGlobals.languages.forEach(function(item) { - languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); - }); - content.append(languageChooser); - } - - // theme chooser - if (uhrGlobals.themes.length > 1) { - var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); - uhrGlobals.themes.forEach(function(item) { - themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); - }); - content.append(themeChooser); - } - var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); - closebutton.on('click', function() { - $('#uhr-controlpanel' + this.id).hide('fast'); - }.bind(this)); - content.append(closebutton); - e.after(controlpanel); - controlpanel.hide(); - var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); - configlink.on('click', function() { - toggleConfigScreen.bind(this)(); - }.bind(this)); - e.after(configlink); - } - }; - var wireFunctionality = function wireFunctionality() { - // on/off switch - var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); - toggleSwitch.on('click', function() { - this.toggle(); - }.bind(this)); - var status = $.cookie('uhr-status' + this.id); - if (status === undefined || this.options.force) { - status = this.options.status; - } - toggleSwitch.prop('checked', status === 'on'); - if (status === 'on') { - this.start(); - } else { - this.stop(); - } - - // time mode switch - var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); - modeSwitch.on('click', function() { - if (this.options.mode === 'seconds') { - setMode.bind(this)('normal'); - } else { - setMode.bind(this)('seconds'); - } - }.bind(this)); - - var mode = $.cookie('uhr-mode' + this.id); - if (mode === undefined || this.options.force) { - mode = this.options.mode; - } - modeSwitch.prop('checked', mode !== 'seconds'); - if (mode === 'seconds') { - setMode.bind(this)('seconds'); - } else { - setMode.bind(this)('normal'); - } - - // language chooser - var languageChooser = $('#uhr-languagechooser' + this.id); - languageChooser.on('change', function() { - var languageKey = $('#uhr-languagechooser' + this.id).val(); - this.language(languageKey); - }.bind(this)); - var selectedLanguage = $.cookie('uhr-language' + this.id); - if (selectedLanguage === undefined || this.options.force) { - selectedLanguage = this.options.language; - } - var found = uhrGlobals.languages.some(function(item) { - return selectedLanguage === item.code; - }); - if (!found) { - var fallbackLanguage; - if (uhrGlobals.languages.length > 0) { - fallbackLanguage = uhrGlobals.languages[0].code; - } else { - fallbackLanguage = ''; - } - console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); - selectedLanguage = fallbackLanguage; - } - languageChooser.val(selectedLanguage); - this.options.language = ""; - this.language(selectedLanguage); - - // theme chooser - var themeChooser = $('#uhr-themechooser' + this.id); - themeChooser.on('change', function() { - var themeKey = $('#uhr-themechooser' + this.id).val(); - this.theme(themeKey); - }.bind(this)); - var selectedTheme = $.cookie('uhr-theme' + this.id); - if (selectedTheme === undefined || this.options.force) { - selectedTheme = this.options.theme; - } - found = uhrGlobals.themes.some(function(item) { - return selectedTheme === item.styleClass; - }); - if (!found) { - var fallbackTheme = uhrGlobals.themes[0].styleClass; - console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); - selectedTheme = fallbackTheme; - } - themeChooser.val(selectedTheme); - this.options.theme = ""; - this.theme(selectedTheme); - if (this.options.autoresize) { - $(window).on('resize', function() { - var $e = this.element; - var $parent = $e.parent(); - var $window = $(window); - var parentWidth = $parent.width(); - var parentHeight = $parent.height(); - var windowWidth = $window.width(); - var windowHeight = $window.height(); - var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; - setWidth.bind(this)(size); - }.bind(this)); - } - }; - var destroy = function destroy() { - this.timer = null; - $(this.element) - .removeAttr('style') - .removeAttr('class') - .empty(); - $('#uhr-configlink' + this.id).remove(); - $('#uhr-controlpanel' + this.id).remove(); - - }; - var setCookie = function setCookie(cookieName, cookieValue) { - var options = {}; - if (this.options.cookiePath !== undefined) { - options = {expires: 365, path: this.options.cookiePath}; - } else { - options = {expires: 365}; - } - $.cookie(cookieName + this.id, cookieValue, options); - }; - - // business logic - var isOn = function isOn() { - return this.timer !== null; - }; - var update = function update() { - if (isOn.bind(this)()) { - var time = this.options.time; - if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { - if (time.getMinutes() === this.currentMinute) { - return; - } - this.currentMinute = time.getMinutes(); - } - show.bind(this)(time); - } else { - clear.bind(this)(); - this.currentMinute = -1; - } - }; - var show = function show(time) { - var second = getSecond.bind(this)(time); - var dotMinute = getDotMinute.bind(this)(time); - var hour = getHour.bind(this)(time); - var coarseMinute = getCoarseMinute.bind(this)(time); - clear.bind(this)(); - if (this.options.mode === 'seconds') { - highlight.bind(this)('second' + second); - } else { - highlight.bind(this)('on'); - for (var i = 1; i <= dotMinute; i++) { - highlight.bind(this)('dot' + i); - } - highlight.bind(this)('minute' + coarseMinute); - highlight.bind(this)('hour' + hour); - } - }; - var highlight = function highlight(itemClass) { - this.element.find('.item.' + itemClass).addClass('active'); - }; - var clear = function clear() { - this.element.find('.item').removeClass('active'); - }; - var getSecond = function getSecond(date) { - if (typeof language.bind(this)().getSeconds === 'function') { - return language.bind(this)().getSeconds(date); - } - return date.getSeconds(); - }; - var getDotMinute = function getDotMinute(date) { - if (typeof language.bind(this)().getDotMinute === 'function') { - return language.bind(this)().getDotMinute(date); - } - var minutes = date.getMinutes(); - return minutes % 5; - }; - var getCoarseMinute = function getCoarseMinute(date) { - if (typeof language.bind(this)().getCoarseMinute === 'function') { - return language.bind(this)().getCoarseMinute(date); - } - return date.getMinutes(); - }; - var getHour = function getHour(date) { - if (typeof language.bind(this)().getHour === 'function') { - return language.bind(this)().getHour(date); - } - var hour = date.getHours(); - if (date.getMinutes() >= 25) { - return (hour + 1) % 24; - } - return hour; - }; - var language = function language() { - var matchingLanguages = uhrGlobals.languages.filter(function(element) { - return (element.code === this.options.language); - }, this); - if (matchingLanguages.length > 0) { - return matchingLanguages[0]; - } - // fallback: return empty object - return {}; - }; - - $.widget("fritteli.uhr", { - "options": { - width: '100%', - status: 'on', - language: 'de_CH', - theme: uhrGlobals.themes[0].styleClass, - force: false, - controls: true, - cookiePath: undefined, - autoresize: true, - mode: 'normal' - }, - "start": start, - "stop": stop, - "toggle": toggle, - "language": setLanguage, - "theme": setTheme, - "time": setTime, - "mode": setMode, - "width": setWidth, - // constructor method - "_create": create, - // destructor method - "_destroy": destroy - }); - $.fritteli.uhr.register = uhrGlobals.registerLanguage; /** - * Hilfsklasse zum Rendern der Uhr. - * @param layout Layout-Objekt, das gerendert werden soll. - * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. + * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. + * @param value Der Buchstabe, der Dargestellt werden soll. + * @param style Die CSS-Styleklassen des Buchstabens. */ - function UhrRenderer(layout, renderarea) { - this.render = function render(beforeshow) { - if (layout.parsed === undefined) { - switch (layout.version) { - case 2: - var delegate = new UhrRendererV2Delegate(layout); - var parsedLayout = delegate.parse(); - Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false}); - break; - default: - console.warn("Unknown layout version: '" + layout.version + "'"); - return; - } + function Letter(value, style) { + var myValue = value; + var myStyle = style || ''; + this.addStyle = function (style) { + if (myStyle === '') { + myStyle = style; + } else { + myStyle += ' ' + style; } - var letters = layout.parsed; - renderarea.fadeOut('fast', function() { - renderarea.empty(); - letters.forEach(function(line, index, array) { - line.forEach(function(letter) { - renderarea.append(letter.toString()); - }); - if (index < array.length - 1) { - renderarea.append('<br/>'); - } - }); - if (typeof beforeshow === 'function') { - beforeshow(); - } - renderarea.fadeIn('fast'); - }); + }; + this.toString = function () { + return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; }; } @@ -655,7 +247,7 @@ 8: [10], 9: [8, 9] }; - var seconds= { + var seconds = { "0": [vorne0, hinten0], "1": [vorne0, hinten1], "2": [vorne0, hinten2], @@ -718,10 +310,21 @@ "59": [vorne5, hinten9] }; + function parseObject(letters, styleClass, object) { + if (typeof object !== 'undefined' && object !== null) { + Object.keys(object).forEach(function (y) { + var highlightLetters = object[y]; + highlightLetters.forEach(function (x) { + letters[y - 1][x - 1].addStyle(styleClass); + }); + }); + } + } + function parseArrayOrObject(letters, styleClass, input) { if (typeof input !== 'undefined' && input !== null) { if (Array.isArray(input)) { - input.forEach(function(item) { + input.forEach(function (item) { parseObject(letters, styleClass, item); }); } else { @@ -730,23 +333,12 @@ } } - function parseObject(letters, styleClass, object) { - if (typeof object !== 'undefined' && object !== null) { - Object.keys(object).forEach(function(y) { - var highlightLetters = object[y]; - highlightLetters.forEach(function(x) { - letters[y - 1][x - 1].addStyle(styleClass); - }); - }); - } - } - function parseTimeDefinition(letters, styleClass, definition) { if (typeof definition !== 'undefined' && definition !== null) { - Object.keys(definition).forEach(function(listString) { + Object.keys(definition).forEach(function (listString) { var array = listString.split(','); var highlightLetters = definition[listString]; - array.forEach(function(item) { + array.forEach(function (item) { parseArrayOrObject(letters, styleClass + item, highlightLetters); }); }); @@ -755,7 +347,7 @@ this.parse = function parse() { var letters = []; - layout.letters.forEach(function(string) { + layout.letters.forEach(function (string) { var line = []; for (var c = 0; c < string.length; c++) { var character = new Letter(string[c]); @@ -776,22 +368,449 @@ } /** - * Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays. - * @param value Der Buchstabe, der Dargestellt werden soll. - * @param style Die CSS-Styleklassen des Buchstabens. + * Hilfsklasse zum Rendern der Uhr. + * @param layout Layout-Objekt, das gerendert werden soll. + * @param renderarea Das jQuery-gewrappte HTML-Element, auf dem gerendert werden soll. */ - function Letter(value, style) { - var myValue = value; - var myStyle = style || ''; - this.addStyle = function(style) { - if (myStyle === '') { - myStyle = style; - } else { - myStyle += ' ' + style; + function UhrRenderer(layout, renderarea) { + this.render = function render(beforeshow) { + if (layout.parsed === undefined) { + switch (layout.version) { + case 2: + var delegate = new UhrRendererV2Delegate(layout); + var parsedLayout = delegate.parse(); + Object.defineProperty(layout, "parsed", { + "value": parsedLayout, + "writable": false, + "configurable": false + }); + break; + default: + console.warn("Unknown layout version: '" + layout.version + "'"); + return; + } } - }; - this.toString = function() { - return '<span class="item letter ' + myStyle + '">' + myValue + '</span>'; + var letters = layout.parsed; + renderarea.fadeOut('fast', function () { + renderarea.empty(); + letters.forEach(function (line, index, array) { + line.forEach(function (letter) { + renderarea.append(letter.toString()); + }); + if (index < array.length - 1) { + renderarea.append('<br/>'); + } + }); + if (typeof beforeshow === 'function') { + beforeshow(); + } + renderarea.fadeIn('fast'); + }); }; } + + var setLanguage = function setLanguage(languageKey) { + if (languageKey !== this.options.language) { + this.options.language = languageKey; + var renderer = new UhrRenderer(language.bind(this)(), this.element.find('.letterarea')); + renderer.render.bind(this)(function () { + this.currentMinute = -1; + update.bind(this)(); + }.bind(this)); + setCookie.bind(this)('uhr-language', languageKey); + update.bind(this)(); + } + }; + var setTheme = function setTheme(theme) { + if (theme !== this.options.theme) { + this.element.removeClass(this.options.theme).addClass(theme); + $('#uhr-onoffswitch' + this.id).removeClass(this.options.theme).addClass(theme); + this.options.theme = theme; + setCookie.bind(this)('uhr-theme', theme); + } + }; + var setTime = function setTime(time) { + this.currentMinute = -1; + if (time === null) { + this.options.time = new Date(); + } else { + if (this.timer !== null) { + window.clearInterval(this.timer); + } + this.options.time = time; + } + update.bind(this)(); + }; + var setMode = function (mode) { + this.options.mode = mode; + this.currentMinute = -1; + update.bind(this)(); + setCookie.bind(this)('uhr-mode', mode); + }; + var setWidth = function setWidth(width) { + var e = this.element; + e.css('width', width); + var realWidth = e.width(); + e.width(realWidth); + e.height(realWidth); + e.css('font-size', (realWidth / 40) + 'px'); + }; + + // private interface methods + var setupHTML; + var wireFunctionality; + var create = function create() { + this.id = uhrGlobals.id++; + this.timer = null; + this.currentMinute = -1; + var userTime = this.options.time; + var hash, params; + if (this.options.time === undefined) { + this.options.time = new Date(); + } + // parse the URL params + hash = window.location.hash; + if (hash !== undefined && typeof hash === 'string' && hash.charAt(0) === '#') { + hash = hash.substring(1); + hash = decodeURIComponent(hash); + params = hash.split('&'); + params.forEach(function (element) { + var pair = element.split('='); + var key = pair[0]; + var value = pair[1]; + switch (key) { + case 'l': + case 'language': + this.options.language = value; + this.options.force = true; + break; + case 't': + case 'theme': + this.options.theme = value; + this.options.force = true; + break; + case 'm': + case 'mode': + this.options.mode = value; + this.options.force = true; + break; + case 's': + case 'status': + this.options.status = value; + this.options.force = true; + break; + } + }.bind(this)); + } + // end parse the URL params + setupHTML.bind(this)(); + wireFunctionality.bind(this)(); + if (userTime !== undefined) { + this.time(userTime); + } + }; + // private helper methods (not exported) + var toggleConfigScreen = function toggleConfigScreen() { + $('#uhr-controlpanel' + this.id).toggle('fast'); + }; + // set up + setupHTML = function setupHTML() { + var e = this.element; + // Base clock area + e.addClass('uhr'); + e.empty(); + e.append('<span class="item dot dot1"></span>'); + e.append('<span class="item dot dot2"></span>'); + e.append('<span class="item dot dot3"></span>'); + e.append('<span class="item dot dot4"></span>'); + e.append('<div class="letterarea"></div>'); + e.append('<div class="reflection"></div>'); + setWidth.bind(this)(this.options.width); + + if (this.options.controls) { + var controlpanel = $('<div class="uhr-controlpanel" id="uhr-controlpanel' + this.id + '"></div>'); + var content = $('<div class="content"></div>'); + controlpanel.append(content); + // on/off switch + var toggleSwitch = $('<div class="onoffswitch" id="uhr-onoffswitch' + this.id + '"></div>'); + toggleSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox' + this.id + + '" checked="checked" />'); + toggleSwitch.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox' + this.id + '">' + + '<div class="onoffswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + '</label>'); + content.append(toggleSwitch); + + // time mode switch + var modeSwitch = $('<div class="onoffswitch" id="uhr-modeswitch' + this.id + '"></div>'); + modeSwitch.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox' + this.id + + '" checked="checked" />'); + modeSwitch.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox' + this.id + '">' + + '<div class="modeswitch-inner"></div>' + '<div class="onoffswitch-switch"></div>' + + '</label>'); + content.append(modeSwitch); + // language chooser + if (uhrGlobals.languages.length > 1) { + var languageChooser = $('<select id="uhr-languagechooser' + this.id + '"></select>'); + uhrGlobals.languages.forEach(function (item) { + languageChooser.append('<option value="' + item.code + '">' + item.language + '</option>'); + }); + content.append(languageChooser); + } + + // theme chooser + if (uhrGlobals.themes.length > 1) { + var themeChooser = $('<select id="uhr-themechooser' + this.id + '"></select>'); + uhrGlobals.themes.forEach(function (item) { + themeChooser.append('<option value="' + item.styleClass + '">' + item.name + '</option>'); + }); + content.append(themeChooser); + } + var closebutton = $('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel' + this.id + '"></a>'); + closebutton.on('click', function () { + $('#uhr-controlpanel' + this.id).hide('fast'); + }.bind(this)); + content.append(closebutton); + e.after(controlpanel); + controlpanel.hide(); + var configlink = $('<a class="uhr-configlink" id="uhr-configlink' + this.id + '"></a>'); + configlink.on('click', function () { + toggleConfigScreen.bind(this)(); + }.bind(this)); + e.after(configlink); + } + }; + wireFunctionality = function wireFunctionality() { + // on/off switch + var toggleSwitch = $('#uhr-onoffswitch-checkbox' + this.id); + toggleSwitch.on('click', function () { + this.toggle(); + }.bind(this)); + var status = $.cookie('uhr-status' + this.id); + if (status === undefined || this.options.force) { + status = this.options.status; + } + toggleSwitch.prop('checked', status === 'on'); + if (status === 'on') { + this.start(); + } else { + this.stop(); + } + + // time mode switch + var modeSwitch = $('#uhr-modeswitch-checkbox' + this.id); + modeSwitch.on('click', function () { + if (this.options.mode === 'seconds') { + setMode.bind(this)('normal'); + } else { + setMode.bind(this)('seconds'); + } + }.bind(this)); + + var mode = $.cookie('uhr-mode' + this.id); + if (mode === undefined || this.options.force) { + mode = this.options.mode; + } + modeSwitch.prop('checked', mode !== 'seconds'); + if (mode === 'seconds') { + setMode.bind(this)('seconds'); + } else { + setMode.bind(this)('normal'); + } + + // language chooser + var languageChooser = $('#uhr-languagechooser' + this.id); + languageChooser.on('change', function () { + var languageKey = $('#uhr-languagechooser' + this.id).val(); + this.language(languageKey); + }.bind(this)); + var selectedLanguage = $.cookie('uhr-language' + this.id); + if (selectedLanguage === undefined || this.options.force) { + selectedLanguage = this.options.language; + } + var found = uhrGlobals.languages.some(function (item) { + return selectedLanguage === item.code; + }); + if (!found) { + var fallbackLanguage; + if (uhrGlobals.languages.length > 0) { + fallbackLanguage = uhrGlobals.languages[0].code; + } else { + fallbackLanguage = ''; + } + console.warn("Language '" + selectedLanguage + "' not found! Using fallback '" + fallbackLanguage + "'"); + selectedLanguage = fallbackLanguage; + } + languageChooser.val(selectedLanguage); + this.options.language = ""; + this.language(selectedLanguage); + + // theme chooser + var themeChooser = $('#uhr-themechooser' + this.id); + themeChooser.on('change', function () { + var themeKey = $('#uhr-themechooser' + this.id).val(); + this.theme(themeKey); + }.bind(this)); + var selectedTheme = $.cookie('uhr-theme' + this.id); + if (selectedTheme === undefined || this.options.force) { + selectedTheme = this.options.theme; + } + found = uhrGlobals.themes.some(function (item) { + return selectedTheme === item.styleClass; + }); + if (!found) { + var fallbackTheme = uhrGlobals.themes[0].styleClass; + console.warn("Theme '" + selectedTheme + "' not found! Using fallback '" + fallbackTheme + "'"); + selectedTheme = fallbackTheme; + } + themeChooser.val(selectedTheme); + this.options.theme = ""; + this.theme(selectedTheme); + if (this.options.autoresize) { + $(window).on('resize', function () { + var $e = this.element; + var $parent = $e.parent(); + var $window = $(window); + var parentWidth = $parent.width(); + var parentHeight = $parent.height(); + var windowWidth = $window.width(); + var windowHeight = $window.height(); + var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px'; + setWidth.bind(this)(size); + }.bind(this)); + } + }; + var destroy = function destroy() { + this.timer = null; + $(this.element) + .removeAttr('style') + .removeAttr('class') + .empty(); + $('#uhr-configlink' + this.id).remove(); + $('#uhr-controlpanel' + this.id).remove(); + + }; + setCookie = function setCookie(cookieName, cookieValue) { + var options = {}; + if (this.options.cookiePath !== undefined) { + options = {expires: 365, path: this.options.cookiePath}; + } else { + options = {expires: 365}; + } + $.cookie(cookieName + this.id, cookieValue, options); + }; + + // business logic + isOn = function isOn() { + return this.timer !== null; + }; + var show; + var clear; + update = function update() { + if (isOn.bind(this)()) { + var time = this.options.time; + if (!language.bind(this)().hasOwnProperty('seconds') && this.options.mode !== 'seconds') { + if (time.getMinutes() === this.currentMinute) { + return; + } + this.currentMinute = time.getMinutes(); + } + show.bind(this)(time); + } else { + clear.bind(this)(); + this.currentMinute = -1; + } + }; + var highlight; + var getSecond; + var getDotMinute; + var getCoarseMinute; + var getHour; + show = function show(time) { + var second = getSecond.bind(this)(time); + var dotMinute = getDotMinute.bind(this)(time); + var hour = getHour.bind(this)(time); + var coarseMinute = getCoarseMinute.bind(this)(time); + clear.bind(this)(); + if (this.options.mode === 'seconds') { + highlight.bind(this)('second' + second); + } else { + highlight.bind(this)('on'); + for (var i = 1; i <= dotMinute; i++) { + highlight.bind(this)('dot' + i); + } + highlight.bind(this)('minute' + coarseMinute); + highlight.bind(this)('hour' + hour); + } + }; + highlight = function highlight(itemClass) { + this.element.find('.item.' + itemClass).addClass('active'); + }; + clear = function clear() { + this.element.find('.item').removeClass('active'); + }; + getSecond = function getSecond(date) { + if (typeof language.bind(this)().getSeconds === 'function') { + return language.bind(this)().getSeconds(date); + } + return date.getSeconds(); + }; + getDotMinute = function getDotMinute(date) { + if (typeof language.bind(this)().getDotMinute === 'function') { + return language.bind(this)().getDotMinute(date); + } + var minutes = date.getMinutes(); + return minutes % 5; + }; + getCoarseMinute = function getCoarseMinute(date) { + if (typeof language.bind(this)().getCoarseMinute === 'function') { + return language.bind(this)().getCoarseMinute(date); + } + return date.getMinutes(); + }; + getHour = function getHour(date) { + if (typeof language.bind(this)().getHour === 'function') { + return language.bind(this)().getHour(date); + } + var hour = date.getHours(); + if (date.getMinutes() >= 25) { + return (hour + 1) % 24; + } + return hour; + }; + language = function language() { + var matchingLanguages = uhrGlobals.languages.filter(function (element) { + return (element.code === this.options.language); + }, this); + if (matchingLanguages.length > 0) { + return matchingLanguages[0]; + } + // fallback: return empty object + return {}; + }; + + $.widget("fritteli.uhr", { + "options": { + width: '100%', + status: 'on', + language: 'de_CH', + theme: uhrGlobals.themes[0].styleClass, + force: false, + controls: true, + cookiePath: undefined, + autoresize: true, + mode: 'normal' + }, + "start": start, + "stop": stop, + "toggle": toggle, + "language": setLanguage, + "theme": setTheme, + "time": setTime, + "mode": setMode, + "width": setWidth, + // constructor method + "_create": create, + // destructor method + "_destroy": destroy + }); + $.fritteli.uhr.register = uhrGlobals.registerLanguage; })(jQuery); diff --git a/test/test.js b/test/test.js index 98b57b0..df22522 100644 --- a/test/test.js +++ b/test/test.js @@ -8,6 +8,13 @@ suite('Bärneruhr', function () { elem = $('#u'); }); + function cleanupCookies(id) { + $.removeCookie('uhr-language' + id); + $.removeCookie('uhr-mode' + id); + $.removeCookie('uhr-status' + id); + $.removeCookie('uhr-theme' + id); + } + teardown(function () { var uhr = elem.uhr('instance'); if (uhr !== undefined) { @@ -21,13 +28,6 @@ suite('Bärneruhr', function () { window.location.hash = ''; }); - function cleanupCookies(id) { - $.removeCookie('uhr-language' + id); - $.removeCookie('uhr-mode' + id); - $.removeCookie('uhr-status' + id); - $.removeCookie('uhr-theme' + id); - } - test('create and destroy widget', function () { var uhr = elem.uhr('instance'); var id; -- 2.49.0 From 1583f73220bd38e9a81a89fac47c3eb8d76df457 Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 23:43:10 +0200 Subject: [PATCH 04/10] Don't include deprecated jquery-ui.core.js, which breaks everything. --- Gruntfile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index f210bc3..ae194d4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,7 +26,6 @@ module.exports = function (grunt) { libs: { src: [ 'node_modules/jquery/dist/jquery.js', - 'node_modules/jquery-ui/ui/core.js', 'node_modules/jquery-ui/ui/widget.js', 'node_modules/jquery.cookie/jquery.cookie.js' ], -- 2.49.0 From 864f0052b4974181c743073c9c5fb84fe023d67d Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 23:43:51 +0200 Subject: [PATCH 05/10] Fix test --- test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index df22522..daf266c 100644 --- a/test/test.js +++ b/test/test.js @@ -96,7 +96,7 @@ suite('Bärneruhr', function () { }); uhr = elem.uhr('instance'); // NB: 'de' is just the first language that is included in the page. that may change! - assert.equal(uhr.options.language, 'de'); + assert.equal(uhr.options.language, 'de_CH_genau'); }); test('unknown theme', function () { -- 2.49.0 From 40d762f90a8c01694c38f05b2f47c41feaf06d0c Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 23:44:03 +0200 Subject: [PATCH 06/10] Add rebuilt file --- dist/libs.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/dist/libs.js b/dist/libs.js index 95f0d05..7707ab1 100644 --- a/dist/libs.js +++ b/dist/libs.js @@ -10600,28 +10600,6 @@ if ( !noGlobal ) { return jQuery; } ); -// This file is deprecated in 1.12.0 to be removed in 1.13 -( function() { -define( [ - "jquery", - "./data", - "./disable-selection", - "./focusable", - "./form", - "./ie", - "./keycode", - "./labels", - "./jquery-1-7", - "./plugin", - "./safe-active-element", - "./safe-blur", - "./scroll-parent", - "./tabbable", - "./unique-id", - "./version" -] ); -} )(); - /*! * jQuery UI Widget 1.12.1 * http://jqueryui.com -- 2.49.0 From 3355ee5cf5945e5767f56d0ee49a3cc3357ee5a2 Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 23:52:23 +0200 Subject: [PATCH 07/10] Various clean ups --- .gitlab-ci.yml | 75 -------------------------------------------------- README.md | 10 +++---- deploy.sh | 23 ---------------- 3 files changed, 5 insertions(+), 103 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 deploy.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 549dc2e..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,75 +0,0 @@ -variables: - NPMPATH: "node_modules/.bin" - -stages: - - build - - cleanup_build - - deploy - - cleanup - -.run_deploy: &run_deploy - script: - - chmod +x ./deploy.sh - - ./deploy.sh - -build_job: - stage: build - script: - - npm install - - $NPMPATH/grunt - tags: - - javascript - except: - - tags - artifacts: - paths: - - dist/*.min.* - - info/ - - resources/ - - index.html - - manifest.appcache - -cleanup_build_job: - stage: cleanup_build - script: - - rm -rf node_modules - - rm -rf dist - when: on_failure - -develop: - stage: deploy - <<: *run_deploy - environment: develop - except: - - tags - - master - - develop - variables: - ENVIRON: develop - TARGET: $WWW_DEPLOY_ROOT_DEVELOP - -staging: - stage: deploy - <<: *run_deploy - environment: staging - only: - - develop - variables: - ENVIRON: staging - TARGET: $WWW_DEPLOY_ROOT_STAGING - -production: - stage: deploy - <<: *run_deploy - environment: production - only: - - master - variables: - ENVIRON: production - TARGET: $WWW_DEPLOY_ROOT_PRODUCTION - -cleanup_job: - stage: cleanup - script: - - rm -rf node_modules - when: always diff --git a/README.md b/README.md index 9772066..22eb1a9 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,10 @@ Beim Einbinden muss das attribut `data-class` angegeben werden, welches die CSS- * Binde nach den CSS-Dateien (wichtig!) folgende Javascript-Dateien im HTML-Dokument ein: * dist/libs.min.js: Dies enthält die minifizierten Versionen von jQuery, jQuery-UI (mit den Komponenten `code` und `widget`) und jQuery-Cookie. Alternativ kannst Du auch direkt die benötigten Bibliotheken einbinden: - * jquery (getestet mit Version 2.1.0) - * jquery-ui (getestet mit Version 1.10.4) - * Von jquery-ui werden die Komponenten 'core' und 'widget' benötigt. - * jquery-cookie (getestet mit Version 1.4.0) + * jquery (getestet mit Version 3.4.1) + * jquery-ui (getestet mit Version 1.12.1) + * Von jquery-ui wird die Komponente 'widget' benötigt. + * jquery-cookie (getestet mit Version 1.4.1) Je nach dem, in welchen Sprachen du die Uhr verwenden willst, noch eine der folgenden Dateien: * dist/jquery.uhr.complete.min.js: Enthält die Hauptdatei sowie alle unterstützten Sprachdateien * dist/jquery.uhr.base.min.js: Enthält die Hauptdatei sowie Bärndütsch (de_CH) @@ -149,7 +149,7 @@ Es ist möglich, die Uhr durch den Aufruf mit URL-Parameters zu konfigurieren. D * on: Die Uhr ist eingeschaltet * off: Die Uhr ist ausgeschaltet -Eine URL kann also beispielweise so aussehen: +Eine URL kann also beispielsweise so aussehen: http://example.com/uhr.html#l=fr&t=red&m=seconds&s=on diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index b5515ed..0000000 --- a/deploy.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -declare destination -case "${TARGET}" in - "${WWW_DEPLOY_ROOT_DEVELOP}") - destination="${TARGET}/${CI_BUILD_REF_NAME}" - ;; - "${WWW_DEPLOY_ROOT_STAGING}"|"${WWW_DEPLOY_ROOT_PRODUCTION}") - destination="${TARGET}" - ;; - *) - echo "Invalid TARGET specified. Aborting deployment." - exit 1 - ;; -esac - -rm -rf "${destination}/*" -rm -rf "${destination}/.??*" -mkdir -p "${destination}/dist" -cp -a index.html manifest.appcache info resources "${destination}" -cp -a dist/*.min.* "${destination}/dist" - -echo "Deployment successful." -- 2.49.0 From 1655a24aa4760964d2995cff918067cb593c3820 Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Fri, 3 May 2019 23:54:30 +0200 Subject: [PATCH 08/10] Fix test again (to run on Linux, screw Windows) and re-add all files in dist/. --- dist/jquery.uhr.base.min.js | 5 + dist/jquery.uhr.baselangs.js | 184 +++++++++++++++---------------- dist/jquery.uhr.baselangs.min.js | 5 + dist/jquery.uhr.complete.js | 184 +++++++++++++++---------------- dist/jquery.uhr.complete.min.js | 5 + dist/jquery.uhr.langs.js | 184 +++++++++++++++---------------- dist/jquery.uhr.langs.min.js | 5 + dist/jquery.uhr.main.min.js | 5 + dist/libs.min.js | 5 + dist/uhr-black.min.css | 1 + dist/uhr-blue.min.css | 1 + dist/uhr-green.min.css | 1 + dist/uhr-pink.min.css | 1 + dist/uhr-red.min.css | 1 + dist/uhr-white.min.css | 1 + dist/uhr-yellow.min.css | 1 + dist/uhr.min.css | 1 + test/test.js | 2 +- 18 files changed, 315 insertions(+), 277 deletions(-) create mode 100644 dist/jquery.uhr.base.min.js create mode 100644 dist/jquery.uhr.baselangs.min.js create mode 100644 dist/jquery.uhr.complete.min.js create mode 100644 dist/jquery.uhr.langs.min.js create mode 100644 dist/jquery.uhr.main.min.js create mode 100644 dist/libs.min.js create mode 100644 dist/uhr-black.min.css create mode 100644 dist/uhr-blue.min.css create mode 100644 dist/uhr-green.min.css create mode 100644 dist/uhr-pink.min.css create mode 100644 dist/uhr-red.min.css create mode 100644 dist/uhr-white.min.css create mode 100644 dist/uhr-yellow.min.css create mode 100644 dist/uhr.min.css diff --git a/dist/jquery.uhr.base.min.js b/dist/jquery.uhr.base.min.js new file mode 100644 index 0000000..b23f608 --- /dev/null +++ b/dist/jquery.uhr.base.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var i={4:[1,2]},e={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},h={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},r={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,i],"10,11,12,13,14":[o,i],"15,16,17,18,19":[h,i],"20,21,22,23,24":[a,i],"25,26,27,28,29":[s,e,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,i,n],"40,41,42,43,44":[a,e],"45,46,47,48,49":[h,e],"50,51,52,53,54":[o,e],"55,56,57,58,59":[s,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",r)}(); \ No newline at end of file diff --git a/dist/jquery.uhr.baselangs.js b/dist/jquery.uhr.baselangs.js index cd791da..6668032 100644 --- a/dist/jquery.uhr.baselangs.js +++ b/dist/jquery.uhr.baselangs.js @@ -3,61 +3,63 @@ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); (function($) { 'use strict'; @@ -144,63 +146,61 @@ }(jQuery)); (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.baselangs.min.js b/dist/jquery.uhr.baselangs.min.js new file mode 100644 index 0000000..d04715b --- /dev/null +++ b/dist/jquery.uhr.baselangs.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); \ No newline at end of file diff --git a/dist/jquery.uhr.complete.js b/dist/jquery.uhr.complete.js index ab43c0a..0c620f0 100644 --- a/dist/jquery.uhr.complete.js +++ b/dist/jquery.uhr.complete.js @@ -806,61 +806,63 @@ (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); (function($) { 'use strict'; @@ -947,63 +949,61 @@ }(jQuery)); (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.complete.min.js b/dist/jquery.uhr.complete.min.js new file mode 100644 index 0000000..1b02faa --- /dev/null +++ b/dist/jquery.uhr.complete.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(d){"use strict";var e,i,n,l={id:0,languages:[],themes:[],registerLanguage:function(e,i){l.languages.some(function(t){return e===t.code&&(console.error("Error: Language code '"+e+"' cannot be registered for language '"+i.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(i.code=e,l.languages.push(i))}};d("link[rel=stylesheet]").each(function(t,e){var i=d(e),n=i.attr("data-class");if(void 0!==n){var s=i.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function N(t,e){var i=t,n=e||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+i+"</span>"}}function o(t){var e={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},i={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},r={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},h={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},u={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},c={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},d={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},g={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},E={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[e,i],1:[e,s],2:[e,r],3:[e,h],4:[e,c],5:[e,l],6:[e,f],7:[e,g],8:[e,E],9:[e,p],10:[n,i],11:[n,s],12:[n,r],13:[n,h],14:[n,c],15:[n,l],16:[n,f],17:[n,g],18:[n,E],19:[n,p],20:[o,i],21:[o,s],22:[o,r],23:[o,h],24:[o,c],25:[o,l],26:[o,f],27:[o,g],28:[o,E],29:[o,p],30:[a,i],31:[a,s],32:[a,r],33:[a,h],34:[a,c],35:[a,l],36:[a,f],37:[a,g],38:[a,E],39:[a,p],40:[u,i],41:[u,s],42:[u,r],43:[u,h],44:[u,c],45:[u,l],46:[u,f],47:[u,g],48:[u,E],49:[u,p],50:[d,i],51:[d,s],52:[d,r],53:[d,h],54:[d,c],55:[d,l],56:[d,f],57:[d,g],58:[d,E],59:[d,p]};function m(i,n,t){null!=t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){i[e-1][t-1].addStyle(n)})})}function I(e,i,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){m(e,i,t)}):m(e,i,t))}function b(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var e=t.split(","),i=o[t];e.forEach(function(t){I(n,s+t,i)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var e=[],i=0;i<t.length;i++){var n=new N(t[i]);e.push(n)}s.push(e)}),I(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?b(s,"second",t.seconds):b(s,"second",v),b(s,"minute",t.minutes),b(s,"hour",t.hours),s}}function r(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var e=new o(n).parse();Object.defineProperty(n,"parsed",{value:e,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var i=n.parsed;s.fadeOut("fast",function(){s.empty(),i.forEach(function(t,e,i){t.forEach(function(t){s.append(t.toString())}),e<i.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),e.bind(this)("uhr-mode",t)}function g(t){var e=this.element;e.css("width",t);var i=e.width();e.width(i),e.height(i),e.css("font-size",i/40+"px")}var a,h;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),g.bind(this)(this.options.width),this.options.controls){var e=d('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),i=d('<div class="content"></div>');e.append(i);var n=d('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(n);var s=d('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(s),1<l.languages.length){var o=d('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),i.append(o)}if(1<l.themes.length){var r=d('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){r.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),i.append(r)}var a=d('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){d("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),i.append(a),t.after(e),e.hide();var h=d('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');h.on("click",function(){(function(){d("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(h)}},h=function(){var t=d("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var e=d.cookie("uhr-status"+this.id);void 0!==e&&!this.options.force||(e=this.options.status),t.prop("checked","on"===e),"on"===e?this.start():this.stop();var i=d("#uhr-modeswitch-checkbox"+this.id);i.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=d.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),i.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=d("#uhr-languagechooser"+this.id);s.on("change",function(){var t=d("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=d.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var r,a=l.languages.some(function(t){return o===t.code});a||(r=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+r+"'"),o=r);s.val(o),this.options.language="",this.language(o);var h=d("#uhr-themechooser"+this.id);h.on("change",function(){var t=d("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var u=d.cookie("uhr-theme"+this.id);if(void 0!==u&&!this.options.force||(u=this.options.theme),!(a=l.themes.some(function(t){return u===t.styleClass}))){var c=l.themes[0].styleClass;console.warn("Theme '"+u+"' not found! Using fallback '"+c+"'"),u=c}h.val(u),this.options.theme="",this.theme(u),this.options.autoresize&&d(window).on("resize",function(){var t=this.element.parent(),e=d(window),i=t.width(),n=t.height(),s=e.width(),o=e.height(),r=Math.min(i,n,s,o)+"px";g.bind(this)(r)}.bind(this))};var u,c,E,p,v,m,I;e=function(t,e){var i={};i=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},d.cookie(t+this.id,e,i)},i=function(){return null!==this.timer},n=function(){if(i.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}u.bind(this)(t)}else c.bind(this)(),this.currentMinute=-1},u=function(t){var e=p.bind(this)(t),i=v.bind(this)(t),n=I.bind(this)(t),s=m.bind(this)(t);if(c.bind(this)(),"seconds"===this.options.mode)E.bind(this)("second"+e);else{E.bind(this)("on");for(var o=1;o<=i;o++)E.bind(this)("dot"+o);E.bind(this)("minute"+s),E.bind(this)("hour"+n)}},E=function(t){this.element.find(".item."+t).addClass("active")},c=function(){this.element.find(".item").removeClass("active")},p=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},m=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},I=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},d.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){i.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),e.bind(this)("uhr-status","on"))},stop:function(){i.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),e.bind(this)("uhr-status","off"))},toggle:function(){i.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new r(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),e.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),d("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,e.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:g,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,e=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var e=t.split("="),i=e[0],n=e[1];switch(i){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),h.bind(this)(),void 0!==e&&this.time(e)},_destroy:function(){this.timer=null,d(this.element).removeAttr("style").removeAttr("class").empty(),d("#uhr-configlink"+this.id).remove(),d("#uhr-controlpanel"+this.id).remove()}}),d.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var e={4:[8,9,10,11]},i={4:[1,2,3]},n={5:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={2:[5,6,7,8,9,10,11]},a={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},e],"20,21,22,23,24":[r,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[r,i],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",a)}(),function(t){"use strict";var e={4:[1,2]},i={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",h)}(),function(t){"use strict";var e={4:[4,5]},i={4:[1,2,3]},n={4:[7,8,9,10,11]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",h)}(),function(t){"use strict";var e={4:[4,5,6,7,8,9,10,11]},i={5:[8]},n={5:[4,5,6,7]},s={2:[1,2,3]},o={4:[1,2]},r={3:[4,5,6,7,8]},a={2:[4,5,6,7]},h={6:[8,9,10,11]},u={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[s,e,n],"10,11,12,13,14":[o,e,n],"15,16,17,18,19":[r,n],"20,21,22,23,24":[a,e,n],"25,26,27,28,29":[s,e,i,h],"30,31,32,33,34":[h],"35,36,37,38,39":[s,e,n,h],"40,41,42,43,44":[a,e,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,e,i],"55,56,57,58,59":[s,e,i]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(t){var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("dk",u)}(),function(t){"use strict";var e={4:[10,11]},i={5:[1,2,3,4]},n={3:[7,8,9,10]},s={4:[6,7,8]},o={2:[1,3,4,5,6,7,8,9]},r={3:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6,7,8,9,10]},h={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[n,i],"10,11,12,13,14":[s,i],"15,16,17,18,19":[o,i],"20,21,22,23,24":[r,i],"25,26,27,28,29":[a,i],"30,31,32,33,34":[{4:[1,2,3,4]},i],"35,36,37,38,39":[a,e],"40,41,42,43,44":[r,e],"45,46,47,48,49":[o,e],"50,51,52,53,54":[s,e],"55,56,57,58,59":[n,e]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("en",h)}(),function(t){"use strict";var e={1:[2,3,4,6,7,8]},i={7:[6]},n={7:[7,8,9,10,11]},s={9:[7,8,9,10,11]},o={8:[8,9,10,11]},r={10:[6,7,8,9,10,11]},a={8:[2,3,4,5,6,7]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[1,2,3,4,5]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[e,{2:[1,2,3]}],"3,15":[e,{2:[5,6,7,8]}],"4,16":[e,{3:[1,2,3,4,5,6]}],"5,17":[e,{3:[7,8,9,10,11]}],"6,18":[e,{4:[1,2,3,4]}],"7,19":[e,{4:[6,7,8,9,10]}],"8,20":[e,{5:[1,2,3,4]}],"9,21":[e,{5:[5,6,7,8,9]}],"10,22":[e,{6:[3,4,5,6]}],"11,23":[e,{6:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("es",u)}(),function(t){"use strict";var e={8:[1,2]},i={7:[1,2,3,4,5]},n={6:[6,7,8,9,10,11]},s={9:[7,8,9,10]},o={7:[9,10,11]},r={8:[4,5,6,7,8]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10]},u={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":s,"10,11,12,13,14":o,"15,16,17,18,19":[e,r],"20,21,22,23,24":a,"25,26,27,28,29":h,"30,31,32,33,34":[e,{10:[4,5,6,7,8]}],"35,36,37,38,39":[i,h],"40,41,42,43,44":[i,a],"45,46,47,48,49":[i,{7:[7,8]},r],"50,51,52,53,54":[i,o],"55,56,57,58,59":[i,s]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},n],"2,14":[{1:[8,9,10,11]},n],"3,15":[{2:[7,8,9,10,11]},n],"4,16":[{2:[1,2,3,4,5,6]},n],"5,17":[{4:[8,9,10,11]},n],"6,18":[{4:[5,6,7]},n],"7,19":[{3:[8,9,10,11]},n],"8,20":[{4:[1,2,3,4]},n],"9,21":[{3:[1,2,3,4]},n],"10,22":[{5:[3,4,5]},n],"11,23":[{6:[1,2,3,4]},n],12:{5:[1,2,3,4]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("fr",u)}(),function(t){"use strict";var e={1:[1,2,3,4,6,7]},i={8:[1]},n={7:[8,9,10,11]},s={9:[6,7,8,9,10,11]},o={10:[1,2,3,4,5]},r={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[7,8,9,10,11]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[e,{2:[9,10,11]}],"3,15":[e,{3:[1,2,3]}],"4,16":[e,{6:[1,2,3,4,5,6,7]}],"5,17":[e,{7:[1,2,3,4,5,6]}],"6,18":[e,{6:[9,10,11]}],"7,19":[e,{5:[7,8,9,10,11]}],"8,20":[e,{3:[4,5,6,7]}],"9,21":[e,{3:[8,9,10,11]}],"10,22":[e,{4:[1,2,3,4,5]}],"11,23":[e,{4:[6,7,8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("it",u)}(),function(t){"use strict";var e={3:[1,2,3,4]},i={2:[8,9,10,11]},n={4:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={3:[7,8,9,10,11]},a={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,{4:[8,9,10,11]}],"20,21,22,23,24":[o,i,n],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[o,e,n],"45,46,47,48,49":[r,{5:[1,2,3,4]}],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(t){var e=t.getHours();return 20<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("nl",a)}(),function(t){"use strict";var e={1:[1]},i={1:[2,3,4]},n={7:[8]},s={10:[5]},o={7:[7,8,9,10,11]},r={10:[7,8,9,10,11]},a={10:[1,2,3]},h={9:[1,2,4,5,6,7,8,9]},u={8:[1,2,3,4,5]},c={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[n,r],"10,11,12,13,14":[n,a],"15,16,17,18,19":[n,h],"20,21,22,23,24":[n,u],"25,26,27,28,29":[n,u,s,r],"30,31,32,33,34":[n,{8:[8,9,10,11]}],"35,36,37,38,39":[o,u,s,r],"40,41,42,43,44":[o,u],"45,46,47,48,49":[o,h],"50,51,52,53,54":[o,a],"55,56,57,58,59":[o,r]},hours:{0:[e,{6:[2,3,4,5,7,8,9,10,11]}],12:[e,{2:[1,2,3,4,6,7,8]}],"1,13":[e,{1:[5,6,7]}],"2,14":[i,{3:[1,2,3,4]}],"3,15":[i,{1:[8,9,10,11]}],"4,16":[i,{4:[1,2,3,4,5,6]}],"5,17":[i,{5:[1,2,3,4,5]}],"6,18":[i,{3:[4,5,6,7]}],"7,19":[i,{3:[7,8,9,10]}],"8,20":[i,{5:[5,6,7,8]}],"9,21":[i,{4:[8,9,10,11]}],"10,22":[i,{2:[9,10,11]}],"11,23":[i,{5:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("pt",c)}(); \ No newline at end of file diff --git a/dist/jquery.uhr.langs.js b/dist/jquery.uhr.langs.js index cd791da..6668032 100644 --- a/dist/jquery.uhr.langs.js +++ b/dist/jquery.uhr.langs.js @@ -3,61 +3,63 @@ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { 'use strict'; - var es_isch = {1: [1, 2, 4, 5, 6, 7]}; - var genau = {3: [7, 8, 9, 10, 11]}; - var ab = {4: [4, 5]}; + var es_ist = {1: [1, 2, 4, 5, 6]}; + var uhr = {10: [9, 10, 11]}; + var nach = {4: [8, 9, 10, 11]}; var vor = {4: [1, 2, 3]}; - var haubi = {4: [7, 8, 9, 10, 11]}; - var fuef = {1: [9, 10, 11]}; - var zae = {2: [9, 10, 11]}; - var viertu = {2: [1, 2, 3, 4, 5, 6]}; - var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; + var halb = {5: [1, 2, 3, 4]}; + var fuenf = {1: [8, 9, 10, 11]}; + var zehn = {2: [1, 2, 3, 4]}; + var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; + var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; + var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; + var layout = { "version": 2, - "language": 'Bärndütsch (genau)', + "language": 'Deutsch', "letters": [ - 'ESKISCHAFÜF', - 'VIERTUBFZÄÄ', - 'ZWÄNZGGENAU', - 'VORABOHAUBI', - 'EISZWÖISDRÜ', - 'VIERIFÜFIQT', - 'SÄCHSISIBNI', - 'ACHTINÜNIEL', - 'ZÄNIERBEUFI', - 'ZWÖUFINAUHR' + 'ESKISTAFÜNF', + 'ZEHNZWANZIG', + 'DREIVIERTEL', + 'VORFUNKNACH', + 'HALBAELFÜNF', + 'EINSXAMZWEI', + 'DREIPMJVIER', + 'SECHSNLACHT', + 'SIEBENZWÖLF', + 'ZEHNEUNKUHR' ], - "permanent": es_isch, + "permanent": es_ist, "minutes": { - "0": genau, - "5,6,7,8,9": [fuef, ab], - "10,11,12,13,14": [zae, ab], - "15,16,17,18,19": [viertu, ab], - "20,21,22,23,24": [zwaenzg, ab], - "25,26,27,28,29": [fuef, vor, haubi], - "30,31,32,33,34": haubi, - "35,36,37,38,39": [fuef, ab, haubi], - "40,41,42,43,44": [zwaenzg, vor], - "45,46,47,48,49": [viertu, vor], - "50,51,52,53,54": [zae, vor], - "55,56,57,58,59": [fuef, vor] + "0,1,2,3,4": uhr, + "5,6,7,8,9": [fuenf, nach], + "10,11,12,13,14": [zehn, nach], + "15,16,17,18,19": [viertel, nach], + "20,21,22,23,24": [zwanzig, nach], + "25,26,27,28,29": [fuenf, vor, halb], + "30,31,32,33,34": halb, + "35,36,37,38,39": [fuenf, nach, halb], + "40,41,42,43,44": [zwanzig, vor], + "45,46,47,48,49": dreiviertel, + "50,51,52,53,54": [zehn, vor], + "55,56,57,58,59": [fuenf, vor] }, "hours": { - "0,12": {10: [1, 2, 3, 4, 5, 6]}, - "1,13": {5: [1, 2, 3]}, - "2,14": {5: [4, 5, 6, 7]}, - "3,15": {5: [9, 10, 11]}, - "4,16": {6: [1, 2, 3, 4, 5]}, - "5,17": {6: [6, 7, 8, 9]}, - "6,18": {7: [1, 2, 3, 4, 5, 6]}, - "7,19": {7: [7, 8, 9, 10, 11]}, - "8,20": {8: [1, 2, 3, 4, 5]}, - "9,21": {8: [6, 7, 8, 9]}, - "10,22": {9: [1, 2, 3, 4]}, - "11,23": {9: [8, 9, 10, 11]} + "0,12": {9: [7, 8, 9, 10, 11]}, + "1,13": {6: [1, 2, 3, 4]}, + "2,14": {6: [8, 9, 10, 11]}, + "3,15": {7: [1, 2, 3, 4]}, + "4,16": {7: [8, 9, 10, 11]}, + "5,17": {5: [8, 9, 10, 11]}, + "6,18": {8: [1, 2, 3, 4, 5]}, + "7,19": {9: [1, 2, 3, 4, 5, 6]}, + "8,20": {8: [8, 9, 10, 11]}, + "9,21": {10: [4, 5, 6, 7]}, + "10,22": {10: [1, 2, 3, 4]}, + "11,23": {5: [6, 7, 8]} } }; - $.fritteli.uhr.register('de_CH_genau', layout); + $.fritteli.uhr.register('de', layout); }(jQuery)); (function($) { 'use strict'; @@ -144,63 +146,61 @@ }(jQuery)); (function($) { 'use strict'; - var es_ist = {1: [1, 2, 4, 5, 6]}; - var uhr = {10: [9, 10, 11]}; - var nach = {4: [8, 9, 10, 11]}; + var es_isch = {1: [1, 2, 4, 5, 6, 7]}; + var genau = {3: [7, 8, 9, 10, 11]}; + var ab = {4: [4, 5]}; var vor = {4: [1, 2, 3]}; - var halb = {5: [1, 2, 3, 4]}; - var fuenf = {1: [8, 9, 10, 11]}; - var zehn = {2: [1, 2, 3, 4]}; - var viertel = {3: [5, 6, 7, 8, 9, 10, 11]}; - var zwanzig = {2: [5, 6, 7, 8, 9, 10, 11]}; - var dreiviertel = {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}; - + var haubi = {4: [7, 8, 9, 10, 11]}; + var fuef = {1: [9, 10, 11]}; + var zae = {2: [9, 10, 11]}; + var viertu = {2: [1, 2, 3, 4, 5, 6]}; + var zwaenzg = {3: [1, 2, 3, 4, 5, 6]}; var layout = { "version": 2, - "language": 'Deutsch', + "language": 'Bärndütsch (genau)', "letters": [ - 'ESKISTAFÜNF', - 'ZEHNZWANZIG', - 'DREIVIERTEL', - 'VORFUNKNACH', - 'HALBAELFÜNF', - 'EINSXAMZWEI', - 'DREIPMJVIER', - 'SECHSNLACHT', - 'SIEBENZWÖLF', - 'ZEHNEUNKUHR' + 'ESKISCHAFÜF', + 'VIERTUBFZÄÄ', + 'ZWÄNZGGENAU', + 'VORABOHAUBI', + 'EISZWÖISDRÜ', + 'VIERIFÜFIQT', + 'SÄCHSISIBNI', + 'ACHTINÜNIEL', + 'ZÄNIERBEUFI', + 'ZWÖUFINAUHR' ], - "permanent": es_ist, + "permanent": es_isch, "minutes": { - "0,1,2,3,4": uhr, - "5,6,7,8,9": [fuenf, nach], - "10,11,12,13,14": [zehn, nach], - "15,16,17,18,19": [viertel, nach], - "20,21,22,23,24": [zwanzig, nach], - "25,26,27,28,29": [fuenf, vor, halb], - "30,31,32,33,34": halb, - "35,36,37,38,39": [fuenf, nach, halb], - "40,41,42,43,44": [zwanzig, vor], - "45,46,47,48,49": dreiviertel, - "50,51,52,53,54": [zehn, vor], - "55,56,57,58,59": [fuenf, vor] + "0": genau, + "5,6,7,8,9": [fuef, ab], + "10,11,12,13,14": [zae, ab], + "15,16,17,18,19": [viertu, ab], + "20,21,22,23,24": [zwaenzg, ab], + "25,26,27,28,29": [fuef, vor, haubi], + "30,31,32,33,34": haubi, + "35,36,37,38,39": [fuef, ab, haubi], + "40,41,42,43,44": [zwaenzg, vor], + "45,46,47,48,49": [viertu, vor], + "50,51,52,53,54": [zae, vor], + "55,56,57,58,59": [fuef, vor] }, "hours": { - "0,12": {9: [7, 8, 9, 10, 11]}, - "1,13": {6: [1, 2, 3, 4]}, - "2,14": {6: [8, 9, 10, 11]}, - "3,15": {7: [1, 2, 3, 4]}, - "4,16": {7: [8, 9, 10, 11]}, - "5,17": {5: [8, 9, 10, 11]}, - "6,18": {8: [1, 2, 3, 4, 5]}, - "7,19": {9: [1, 2, 3, 4, 5, 6]}, - "8,20": {8: [8, 9, 10, 11]}, - "9,21": {10: [4, 5, 6, 7]}, - "10,22": {10: [1, 2, 3, 4]}, - "11,23": {5: [6, 7, 8]} + "0,12": {10: [1, 2, 3, 4, 5, 6]}, + "1,13": {5: [1, 2, 3]}, + "2,14": {5: [4, 5, 6, 7]}, + "3,15": {5: [9, 10, 11]}, + "4,16": {6: [1, 2, 3, 4, 5]}, + "5,17": {6: [6, 7, 8, 9]}, + "6,18": {7: [1, 2, 3, 4, 5, 6]}, + "7,19": {7: [7, 8, 9, 10, 11]}, + "8,20": {8: [1, 2, 3, 4, 5]}, + "9,21": {8: [6, 7, 8, 9]}, + "10,22": {9: [1, 2, 3, 4]}, + "11,23": {9: [8, 9, 10, 11]} } }; - $.fritteli.uhr.register('de', layout); + $.fritteli.uhr.register('de_CH_genau', layout); }(jQuery)); /* This program is free software: you can redistribute it and/or modify diff --git a/dist/jquery.uhr.langs.min.js b/dist/jquery.uhr.langs.min.js new file mode 100644 index 0000000..d04715b --- /dev/null +++ b/dist/jquery.uhr.langs.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); \ No newline at end of file diff --git a/dist/jquery.uhr.main.min.js b/dist/jquery.uhr.main.min.js new file mode 100644 index 0000000..083d28b --- /dev/null +++ b/dist/jquery.uhr.main.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery); \ No newline at end of file diff --git a/dist/libs.min.js b/dist/libs.min.js new file mode 100644 index 0000000..4cacfc9 --- /dev/null +++ b/dist/libs.min.js @@ -0,0 +1,5 @@ +/*! uhr - v8.0.4-dev.0 - 2019-05-03 +* http://bärneruhr.ch/ +* Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ + +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(T,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=T.document,r=Object.getPrototypeOf,a=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,m=n.hasOwnProperty,s=m.toString,l=s.call(Object),y={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||x(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,s[t]=k.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=m.call(t,"constructor")&&t.constructor)&&s.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!=s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return v.apply([],s)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){C()}var e,d,b,o,s,h,p,g,w,u,l,C,T,a,E,v,c,m,y,k="sizzle"+1*new Date,x=n.document,N=0,r=0,S=ue(),j=ue(),D=ue(),A=ue(),L=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],_=t.pop,O=t.push,H=t.push,P=t.slice,R=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",F="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",$=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",B=new RegExp(I+"+","g"),z=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),U=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),V=new RegExp(I+"|>"),G=new RegExp($),Q=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,re=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){O.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(t,e,n,r){var i,o,s,a,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:x)!==T&&C(e),e=e||T,E)){if(11!==p&&(u=te.exec(t)))if(i=u[1]){if(9===p){if(!(s=e.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(f&&(s=f.getElementById(i))&&y(e,s)&&s.id===i)return n.push(s),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&V.test(t)){for((a=e.getAttribute("id"))?a=a.replace(ie,oe):e.setAttribute("id",a=k),o=(l=h(t)).length;o--;)l[o]="#"+a+" "+xe(l[o]);c=l.join(","),f=ne.test(t)&&me(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{a===k&&e.removeAttribute("id")}}}return g(t.replace(z,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&se(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(s){return le(function(o){return o=+o,le(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=ae.support={},s=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},C=ae.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!s(T),x!==T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=ee.test(T.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!T.getElementsByName||!T.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(re,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(re,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=ee.test(T.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=ee.test(m=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),c.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=ee.test(a.compareDocumentPosition),y=t||ee.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===x&&y(x,e)?-1:t===T||t.ownerDocument===x&&y(x,t)?1:u?R(u,e)-R(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===T?-1:t===T?1:i?-1:o?1:u?R(u,e)-R(u,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?pe(s[r],a[r]):s[r]===x?-1:a[r]===x?1:0}),T},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&C(e),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=m.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<ae(t,T,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!==T&&C(e),y(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==T&&C(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(ie,oe)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(L),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=ae.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=ae.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(re,f),e[3]=(e[3]||e[4]||e[5]||"").replace(re,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(re,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=ae.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,s,a,u,l=m!=y?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(m){for(;l;){for(s=e;s=s[l];)if(x?s.nodeName.toLowerCase()===f:1===s.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&p){for(d=(a=(r=(i=(o=(s=c)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1])&&r[2],s=a&&c.childNodes[a];s=++a&&s&&s[l]||(d=a=0)||u.pop();)if(1===s.nodeType&&++d&&s===e){i[h]=[N,a,d];break}}else if(p&&(d=a=(r=(i=(o=(s=e)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1]),!1===d)for(;(s=++a&&s&&s[l]||(d=a=0)||u.pop())&&((x?s.nodeName.toLowerCase()!==f:1!==s.nodeType)||!++d||(p&&((i=(o=s[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]=[N,d]),s!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,s=b.pseudos[e]||b.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return s[k]?s(o):1<s.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){for(var n,r=s(e,o),i=r.length;i--;)e[n=R(e,r[i])]=!(t[n]=r[i])}):function(e){return s(e,0,t)}):s}},pseudos:{not:le(function(e){var r=[],i=[],a=p(e.replace(z,"$1"));return a[k]?le(function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))}):function(e,t,n){return r[0]=e,a(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<ae(t,e).length}}),contains:le(function(t){return t=t.replace(re,f),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return Q.test(n||"")||ae.error("unsupported lang: "+n),n=n.replace(re,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function ye(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(a,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return a(e,t,n);return!1}:function(e,t,n){var r,i,o,s=[N,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===N&&r[1]===p)return s[2]=r[2];if((i[c]=s)[2]=a(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Ce(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function Te(d,h,g,v,m,e){return v&&!v[k]&&(v=Te(v)),m&&!m[k]&&(m=Te(m,e)),le(function(e,t,n,r){var i,o,s,a=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ae(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Ce(c,a,d,n,r),p=g?m||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=Ce(p,u),v(i,[],n,r),o=i.length;o--;)(s=i[o])&&(p[u[o]]=!(f[u[o]]=s));if(e){if(m||d){if(m){for(i=[],o=p.length;o--;)(s=p[o])&&i.push(f[o]=s);m(null,p=[],i,r)}for(o=p.length;o--;)(s=p[o])&&-1<(i=m?R(e,s):a[o])&&(e[i]=!(t[i]=s))}}else p=Ce(p===t?p.splice(l,p.length):p),m?m(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],s=o||b.relative[" "],a=o?1:0,u=be(function(e){return e===i},s,!0),l=be(function(e){return-1<R(i,e)},s,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];a<r;a++)if(t=b.relative[e[a].type])c=[be(we(c),t)];else{if((t=b.filter[e[a].type].apply(null,e[a].matches))[k]){for(n=++a;n<r&&!b.relative[e[n].type];n++);return Te(1<a&&we(c),1<a&&xe(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),t,a<n&&Ee(e.slice(a,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return ye.prototype=b.filters=b.pseudos,b.setFilters=new ye,h=ae.tokenize=function(e,t){var n,r,i,o,s,a,u,l=j[e+" "];if(l)return t?0:l.slice(0);for(s=e,a=[],u=b.preFilter;s;){for(o in n&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),a.push(i=[])),n=!1,(r=X.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length)),b.filter)!(r=Y[o].exec(s))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?ae.error(e):j(e,a).slice(0)},p=ae.compile=function(e,t){var n,r=[],i=[],o=D[e+" "];if(!o){for(t||(t=h(e)),n=t.length;n--;)(o=Ee(t[n]))[k]?r.push(o):i.push(o);(o=D(e,function(v,m){function e(e,t,n,r,i){var o,s,a,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=N+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(s=0,t||o.ownerDocument===T||(C(o),n=!E);a=v[s++];)if(a(o,t||T,n)){r.push(o);break}i&&(N=h)}y&&((o=!a&&o)&&u--,e&&c.push(o))}if(u+=l,y&&l!==u){for(s=0;a=m[s++];)a(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=_.call(r));f=Ce(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+m.length&&ae.uniqueSort(r)}return i&&(N=h,w=p),c}var y=0<m.length,x=0<v.length;return y?le(e):e}(i,r))).selector=e}return o},g=ae.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(s=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(s.matches[0].replace(re,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(s=o[i],!b.relative[a=s.type]);)if((u=b.find[a])&&(r=u(s.matches[0].replace(re,f),ne.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ne.test(e)&&me(t.parentNode)||t),n},d.sortStable=k.split("").sort(L).join("")===k,d.detectDuplicates=!!l,C(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(M,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ae}(T);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function C(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function N(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var S=k.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&S.test(e)?k(e):e||[],!1).length}});var L,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,L=k(E);var _=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&k(e);if(!S.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(j(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),_.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){r="string"==typeof r?function(e){var n={};return k.each(e.match(P)||[],function(e,t){n[t]=!0}),n}(r):k.extend({},r);function n(){for(o=o||r.once,t=i=!0;a.length;u=-1)for(e=a.shift();++u<s.length;)!1===s[u].apply(e[0],e[1])&&r.stopOnFalse&&(u=s.length,e=!1);r.memory||(e=!1),i=!1,o&&(s=e?[]:"")}var i,e,t,o,s=[],a=[],u=-1,l={add:function(){return s&&(e&&!i&&(u=s.length-1,a.push(e)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&l.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),e&&!i&&n()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,s,n));)s.splice(n,1),n<=u&&u--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=e="",this},disabled:function(){return!s},lock:function(){return o=a=[],e||i||(s=e=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],a.push(t),i||n()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!t}};return l},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",s={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];a[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,s,a){return function(){function e(){var e,t;if(!(i<u)){if((e=s.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?a?t.call(e,l(u,o,R,a),l(u,o,M,a)):(u++,t.call(e,l(u,o,R,a),l(u,o,M,a),l(u,o,R,o.notifyWith))):(s!==R&&(n=void 0,r=[e]),(a||o.resolveWith)(n,r))}}var n=this,r=arguments,t=a?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(s!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),T.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:M))}).promise()},promise:function(e){return null!=e?k.extend(e,s):s}},a={};return k.each(o,function(e,t){var n=t[2],r=t[5];s[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=n.fireWith}),s.promise(a),e&&e.call(a,a),a},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?a.call(arguments):e,--n||s.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=a.call(arguments),s=k.Deferred();if(n<=1&&(I(e,s.done(t(r)).resolve,s.reject,!n),"pending"===s.state()||x(o[r]&&o[r].then)))return s.then();for(;r--;)I(o[r],t(r),s.reject);return s.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&W.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){T.setTimeout(function(){throw e})};var F=k.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),T.removeEventListener("load",$),k.ready()}k.fn.ready=function(e){return F.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?T.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",$),T.addEventListener("load",$));var B=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===w(n))for(a in i=!0,n)B(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,x(r)||(s=!0),l&&(t=s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Q(){this.expando=k.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(P)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Y=new Q,J=new Q,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Y.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],s=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){for(t=s.length;t--;)s[t]&&0===(r=s[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:k.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(s,[s])}var r,i=1,o=k.Deferred(),s=this,a=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(r=Y.get(s[a],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},se={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});function ae(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i}var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function le(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)k.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,s,a,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ue(r)&&(l[c]=(u=s=o=void 0,s=(i=r).ownerDocument,a=i.nodeName,(u=ce[a])||(o=s.body.appendChild(s.createElement(a)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[a]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ue(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?k.merge([e],n):n}function me(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var ye,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){for(s=s||f.appendChild(t.createElement("div")),a=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[a]||ge._default,s.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;k.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),s=ve(f.appendChild(o),"script"),l&&me(s),n)for(c=0;o=s[c++];)he.test(o.type||"")&&n.push(o);return f}ye=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),ye.appendChild(xe),y.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ne(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function je(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)je(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Y.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;l--;)d=g=(a=Ee.exec(e[l])||[])[1],h=(a[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,s)||t.addEventListener&&t.addEventListener(d,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(P)||[""]).length;l--;)if(d=g=(a=Ee.exec(t[l])||[])[1],h=(a[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=k.event.fix(e),u=new Array(arguments.length),l=(Y.get(this,"events")||{})[a.type]||[],c=k.event.special[a.type]||{};for(u[0]=a,t=1;t<arguments.length;t++)u[t]=arguments[t];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(s=k.event.handlers.call(this,a,l),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(a.result=r)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&j(t,"input")&&Y.get(t,"click")||j(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Ne,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Se),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return je(this,e,t,n,r)},one:function(e,t,n,r){return je(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Y.hasData(e)&&(o=Y.access(e),s=Y.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(a=J.access(e),u=k.extend({},a),J.set(t,u))}}function Me(n,r,i,o){r=v.apply([],r);var e,t,s,a,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&qe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Me(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(s=k.map(ve(e,"script"),He)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),a&&k.merge(s,ve(u,"script"))),i.call(n[c],u,c);if(a)for(l=s[s.length-1].ownerDocument,k.map(s,Pe),c=0;c<a;c++)u=s[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(_e,""),u,l))}return n}function Ie(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&me(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(Ae,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)a=o[r],u=s[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(a.type)?u.checked=a.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=a.defaultValue);if(t)if(n)for(o=o||ve(e),s=s||ve(c),r=0,i=o.length;r<i;r++)Re(o[r],s[r]);else Re(e,c);return 0<(s=ve(c,"script")).length&&me(s,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return B(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Me(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Me(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Me(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,s){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[s](t),u.apply(n,t.get());return this.pushStack(n)}});var We,Fe,$e,Be,ze,Ue,Xe,Ve=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Ge=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=T),t.getComputedStyle(e)},Qe=new RegExp(re.join("|"),"i");function Ye(){if(Xe){Ue.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Xe.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(Ue).appendChild(Xe);var e=T.getComputedStyle(Xe);We="1%"!==e.top,ze=12===Je(e.marginLeft),Xe.style.right="60%",Be=36===Je(e.right),Fe=36===Je(e.width),Xe.style.position="absolute",$e=12===Je(Xe.offsetWidth/3),ie.removeChild(Ue),Xe=null}}function Je(e){return Math.round(parseFloat(e))}function Ke(e,t,n){var r,i,o,s,a=e.style;return(n=n||Ge(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||oe(e)||(s=k.style(e,t)),!y.pixelBoxStyles()&&Ve.test(s)&&Qe.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Ue=E.createElement("div"),(Xe=E.createElement("div")).style&&(Xe.style.backgroundClip="content-box",Xe.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===Xe.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return Ye(),Fe},pixelBoxStyles:function(){return Ye(),Be},pixelPosition:function(){return Ye(),We},reliableMarginLeft:function(){return Ye(),ze},scrollboxSize:function(){return Ye(),$e}}));var et=["Webkit","Moz","ms"],tt=E.createElement("div").style,nt={};function rt(e){var t=k.cssProps[e]||nt[e];return t||(e in tt?e:nt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=et.length;n--;)if((e=et[n]+t)in tt)return e}(e)||e)}var it=/^(none|table(?!-c[ea]).+)/,ot=/^--/,st={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function lt(e,t,n,r,i,o){var s="width"===t?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=k.css(e,n+re[s],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[s],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[s]+"Width",!0,i))):(u+=k.css(e,"padding"+re[s],!0,i),"padding"!==n?u+=k.css(e,"border"+re[s]+"Width",!0,i):a+=k.css(e,"border"+re[s]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function ct(e,t,n){var r=Ge(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,s=Ke(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(s)){if(!n)return s;s="auto"}return(!y.boxSizingReliable()&&i||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+lt(e,t,n||(i?"border":"content"),o,r,s)+"px"}function ft(e,t,n,r,i){return new ft.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ke(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=V(t),u=ot.test(t),l=e.style;if(u||(t=rt(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=V(t);return ot.test(t)||(t=rt(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ke(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!it.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,u,n):ae(e,st,function(){return ct(e,u,n)})},set:function(e,t,n){var r,i=Ge(e),o=!y.scrollboxSize()&&"absolute"===i.position,s=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),a=n?lt(e,u,n,s,i):0;return s&&o&&(a-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-lt(e,u,"border",!1,i)-.5)),a&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),ut(0,t,a)}}}),k.cssHooks.marginLeft=Ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ke(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=ut)}),k.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Ge(e),i=t.length;s<i;s++)o[t[s]]=k.css(e,t[s],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=ft).prototype={constructor:ft,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ft.propHooks._default.set(this),this}}).init.prototype=ft.prototype,(ft.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ft.prototype.init,k.fx.step={};var pt,dt,ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function yt(){dt&&(!1===E.hidden&&T.requestAnimationFrame?T.requestAnimationFrame(yt):T.setTimeout(yt,k.fx.interval),k.fx.tick())}function xt(){return T.setTimeout(function(){pt=void 0}),pt=Date.now()}function bt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function wt(e,t,n){for(var r,i=(Ct.tweeners[t]||[]).concat(Ct.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function Ct(o,e,t){var n,s,r=0,i=Ct.prefilters.length,a=k.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var e=pt||xt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return a.notifyWith(o,[l,n,t]),n<1&&i?t:(i||a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l]),!1)},l=a.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:pt||xt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(s)return this;for(s=!0;t<n;t++)l.tweens[t].run(1);return e?(a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l,e])):a.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=k.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=Ct.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,wt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(Ct,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(P)).length;r<i;r++)n=e[r],Ct.tweeners[n]=Ct.tweeners[n]||[],Ct.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ue(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()})})),t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Y.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=wt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?Ct.prefilters.unshift(e):Ct.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=Ct(this,k.extend({},t),s);(o||Y.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),s=k.speed(e,n,r);return i.finish=i,o||!1===s.queue?this.each(i):this.queue(s.queue,i)},stop:function(i,e,o){function s(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&s(r[t]);else for(t in r)r[t]&&r[t].stop&&mt.test(t)&&s(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var e,t=Y.get(this),n=t[s+"queue"],r=t[s+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,s,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===s&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(bt(r,!0),e,t,n)}}),k.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(pt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),pt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){dt||(dt=!0,yt())},k.fx.stop=function(){dt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=T.setTimeout(e,r);t.stop=function(){T.clearTimeout(n)}})},ht=E.createElement("input"),gt=E.createElement("select").appendChild(E.createElement("option")),ht.type="checkbox",y.checkOn=""!==ht.value,y.optSelected=gt.selected,(ht=E.createElement("input")).value="t",ht.type="radio",y.radioValue="t"===ht.value;var Tt,Et=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return B(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var s=Et[t]||k.find.attr;Et[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=Et[o],Et[o]=r,r=null!=s(e,t,n)?o:null,Et[o]=i),r}});var kt=/^(?:input|select|textarea|button)$/i,Nt=/^(?:a|area)$/i;function St(e){return(e.match(P)||[]).join(" ")}function jt(e){return e.getAttribute&&e.getAttribute("class")||""}function Dt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}k.fn.extend({prop:function(e,t){return B(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,jt(this)))});if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,jt(this)))});if(!arguments.length)return this.attr("class","");if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},toggleClass:function(i,t){var o=typeof i,s="string"==o||Array.isArray(i);return"boolean"==typeof t&&s?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,jt(this),t),t)}):this.each(function(){var e,t,n,r;if(s)for(t=0,n=k(this),r=Dt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=jt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+St(jt(n))+" ").indexOf(t))return!0;return!1}});var At=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(At,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:St(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),s=i.length;s--;)((r=i[s]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in T;function Lt(e){e.stopPropagation()}var qt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,s,a,u,l,c,f,p=[n||E],d=m.call(e,"type")?e.type:e,h=m.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!qt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!g(n)){for(a=c.delegateType||d,qt.test(a+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(n.ownerDocument||E)&&p.push(s.defaultView||s.parentWindow||T)}for(i=0;(o=p[i++])&&!e.isPropagationStopped();)f=o,e.type=1<i?a:c.bindType||d,(l=(Y.get(o,"events")||{})[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&x(n[d])&&!g(n)&&((s=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Lt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Lt),k.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var _t=T.location,Ot=Date.now(),Ht=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Pt=/\[\]$/,Rt=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Wt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Pt.test(n)?i(n,t):Wt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Wt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)Wt(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&It.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ft=/%20/g,$t=/#.*$/,Bt=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ut=/^(?:GET|HEAD)$/,Xt=/^\/\//,Vt={},Gt={},Qt="*/".concat("*"),Yt=E.createElement("a");function Jt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Kt(t,i,o,s){var a={},u=t===Gt;function l(e){var r;return a[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,s);return"string"!=typeof n||u||a[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!a["*"]&&l("*")}function Zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Yt.href=_t.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,k.ajaxSettings),t):Zt(k.ajaxSettings,e)},ajaxPrefilter:Jt(Vt),ajaxTransport:Jt(Gt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),m=v.context||v,y=v.context&&(m.nodeType||m.jquery)?k(m):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},s={},a={},u="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=zt.exec(p);)n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=a[e.toLowerCase()]=a[e.toLowerCase()]||e,s[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)C.always(e[C.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(C),v.url=((e||v.url||_t.href)+"").replace(Xt,_t.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Yt.protocol+"//"+Yt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Kt(Vt,v,t,C),h)return C;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ut.test(v.type),f=v.url.replace($t,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Ft,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Ht.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Bt,"$1"),o=(Ht.test(f)?"&":"?")+"_="+Ot+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&C.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&C.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&C.setRequestHeader("Content-Type",v.contentType),C.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Qt+"; q=0.01":""):v.accepts["*"]),v.headers)C.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(m,C,v)||h))return C.abort();if(u="abort",b.add(v.complete),C.done(v.success),C.fail(v.error),c=Kt(Gt,v,t,C)){if(C.readyState=1,g&&y.trigger("ajaxSend",[C,v]),h)return C;v.async&&0<v.timeout&&(d=T.setTimeout(function(){C.abort("timeout")},v.timeout));try{h=!1,c.send(s,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,s,a,u,l=t;h||(h=!0,d&&T.clearTimeout(d),c=void 0,p=r||"",C.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,C,n)),a=function(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,a,C,i),i?(v.ifModified&&((u=C.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=C.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=a.state,o=a.data,i=!(s=a.error))):(s=l,!e&&l||(l="error",e<0&&(e=0))),C.status=e,C.statusText=(t||l)+"",i?x.resolveWith(m,[o,l,C]):x.rejectWith(m,[C,l,s]),C.statusCode(w),w=void 0,g&&y.trigger(i?"ajaxSuccess":"ajaxError",[C,v,i?o:s]),b.fireWith(m,[C,l]),g&&(y.trigger("ajaxComplete",[C,v]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var en={0:200,1223:204},tn=k.ajaxSettings.xhr();y.cors=!!tn&&"withCredentials"in tn,y.ajax=tn=!!tn,k.ajaxTransport(function(i){var o,s;if(y.cors||tn&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=s=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(en[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),s=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=s:r.onreadystatechange=function(){4===r.readyState&&T.setTimeout(function(){o&&s()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var nn,rn=[],on=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rn.pop()||k.expando+"_"+Ot++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(on.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&on.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(on,"$1"+r):!1!==e.jsonp&&(e.url+=(Ht.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){void 0===i?k(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,rn.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((nn=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===nn.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1<a&&(r=St(e.slice(a)),e=e.slice(0,a)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(s=(r=c.position()).top,r.left):(s=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return B(this,function(e,t,n){var r;if(g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Ze(y.pixelPosition,function(e,t){if(t)return t=Ke(e,n),Ve.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(s,a){k.each({padding:"inner"+s,content:a,"":"outer"+s},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+s],r["scroll"+s],e.body["offset"+s],r["offset"+s],r["client"+s])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},a,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=j,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var sn=T.jQuery,an=T.$;return k.noConflict=function(e){return T.$===k&&(T.$=an),e&&T.jQuery===k&&(T.jQuery=sn),k},e||(T.jQuery=T.$=k),k}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(c){var i,n=0,a=Array.prototype.slice;return c.cleanData=(i=c.cleanData,function(e){var t,n,r;for(r=0;null!=(n=e[r]);r++)try{(t=c._data(n,"events"))&&t.remove&&c(n).triggerHandler("remove")}catch(e){}i(e)}),c.widget=function(e,n,t){var r,i,o,s={},a=e.split(".")[0],u=a+"-"+(e=e.split(".")[1]);return t||(t=n,n=c.Widget),c.isArray(t)&&(t=c.extend.apply(null,[{}].concat(t))),c.expr[":"][u.toLowerCase()]=function(e){return!!c.data(e,u)},c[a]=c[a]||{},r=c[a][e],i=c[a][e]=function(e,t){if(!this._createWidget)return new i(e,t);arguments.length&&this._createWidget(e,t)},c.extend(i,r,{version:t.version,_proto:c.extend({},t),_childConstructors:[]}),(o=new n).options=c.widget.extend({},o.options),c.each(t,function(t,r){function i(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}c.isFunction(r)?s[t]=function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}:s[t]=r}),i.prototype=c.widget.extend(o,{widgetEventPrefix:r&&o.widgetEventPrefix||e},s,{constructor:i,namespace:a,widgetName:e,widgetFullName:u}),r?(c.each(r._childConstructors,function(e,t){var n=t.prototype;c.widget(n.namespace+"."+n.widgetName,i,t._proto)}),delete r._childConstructors):n._childConstructors.push(i),c.widget.bridge(e,i),i},c.widget.extend=function(e){for(var t,n,r=a.call(arguments,1),i=0,o=r.length;i<o;i++)for(t in r[i])n=r[i][t],r[i].hasOwnProperty(t)&&void 0!==n&&(c.isPlainObject(n)?e[t]=c.isPlainObject(e[t])?c.widget.extend({},e[t],n):c.widget.extend({},n):e[t]=n);return e},c.widget.bridge=function(o,t){var s=t.prototype.widgetFullName||o;c.fn[o]=function(n){var e="string"==typeof n,r=a.call(arguments,1),i=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=c.data(this,s);return"instance"===n?(i=t,!1):t?c.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,r))!==t&&void 0!==e?(i=e&&e.jquery?i.pushStack(e.get()):e,!1):void 0:c.error("no such method '"+n+"' for "+o+" widget instance"):c.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):i=void 0:(r.length&&(n=c.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=c.data(this,s);e?(e.option(n||{}),e._init&&e._init()):c.data(this,s,new t(n,this))})),i}},c.Widget=function(){},c.Widget._childConstructors=[],c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=c(t||this.defaultElement||this)[0],this.element=c(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=c(),this.hoverable=c(),this.focusable=c(),this.classesElementLookup={},t!==this&&(c.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=c(t.style?t.ownerDocument:t.document||t),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this.options=c.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){var n=this;this._destroy(),c.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:c.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,o=e;if(0===arguments.length)return c.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(r=o[e]=c.widget.extend({},this.options[e]),i=0;i<n.length-1;i++)r[n[i]]=r[n[i]]||{},r=r[n[i]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];o[e]=t}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,r;for(t in e)r=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&r&&r.length&&(n=c(r.get()),this._removeClass(r,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(i){var o=[],s=this;function e(e,t){var n,r;for(r=0;r<e.length;r++)n=s.classesElementLookup[e[r]]||c(),n=i.add?c(c.unique(n.get().concat(i.element.get()))):c(n.not(i.element).get()),s.classesElementLookup[e[r]]=n,o.push(e[r]),t&&i.classes[e[r]]&&o.push(i.classes[e[r]])}return i=c.extend({element:this.element,classes:this.options.classes||{}},i),this._on(i.element,{remove:"_untrackClassesElement"}),i.keys&&e(i.keys.match(/\S+/g)||[],!0),i.extra&&e(i.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(n){var r=this;c.each(r.classesElementLookup,function(e,t){-1!==c.inArray(n.target,t)&&(r.classesElementLookup[e]=c(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,o={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(s,a,e){var u,l=this;"boolean"!=typeof s&&(e=a,a=s,s=!1),e?(a=u=c(a),this.bindings=this.bindings.add(a)):(e=a,a=this.element,u=this.widget()),c.each(e,function(e,t){function n(){if(s||!0!==l.options.disabled&&!c(this).hasClass("ui-state-disabled"))return("string"==typeof t?l[t]:t).apply(l,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||c.guid++);var r=e.match(/^([\w:-]*)\s*(.*)$/),i=r[1]+l.eventNamespace,o=r[2];o?u.on(i,o,n):a.on(i,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=c(this.bindings.not(e).get()),this.focusable=c(this.focusable.not(e).get()),this.hoverable=c(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(c(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(c(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var r,i,o=this.options[e];if(n=n||{},(t=c.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],i=t.originalEvent)for(r in i)r in t||(t[r]=i[r]);return this.element.trigger(t,n),!(c.isFunction(o)&&!1===o.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},c.each({show:"fadeIn",hide:"fadeOut"},function(o,s){c.Widget.prototype["_"+o]=function(t,e,n){var r;"string"==typeof e&&(e={effect:e});var i=e?!0===e||"number"==typeof e?s:e.effect||s:o;"number"==typeof(e=e||{})&&(e={duration:e}),r=!c.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),r&&c.effects&&c.effects.effect[i]?t[o](e):i!==o&&t[i]?t[i](e.duration,e.easing,n):t.queue(function(e){c(this)[o](),n&&n.call(t[0]),e()})}}),c.widget}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(d){var r=/\+/g;function h(e){return v.raw?e:encodeURIComponent(e)}function g(e,t){var n=v.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(r," ")),v.json?JSON.parse(e):e}catch(e){}}(e);return d.isFunction(t)?t(n):n}var v=d.cookie=function(e,t,n){if(void 0!==t&&!d.isFunction(t)){if("number"==typeof(n=d.extend({},v.defaults,n)).expires){var r=n.expires,i=n.expires=new Date;i.setTime(+i+864e5*r)}return document.cookie=[h(e),"=",function(e){return h(v.json?JSON.stringify(e):String(e))}(t),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var o,s=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],u=0,l=a.length;u<l;u++){var c=a[u].split("="),f=(o=c.shift(),v.raw?o:decodeURIComponent(o)),p=c.join("=");if(e&&e===f){s=g(p,t);break}e||void 0===(p=g(p))||(s[f]=p)}return s};v.defaults={},d.removeCookie=function(e,t){return void 0!==d.cookie(e)&&(d.cookie(e,"",d.extend({},t,{expires:-1})),!d.cookie(e))}}); \ No newline at end of file diff --git a/dist/uhr-black.min.css b/dist/uhr-black.min.css new file mode 100644 index 0000000..afbad9e --- /dev/null +++ b/dist/uhr-black.min.css @@ -0,0 +1 @@ +.uhr.black{background-color:#111}.black .onoffswitch-inner:before{background-color:#111}.uhr.black .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.black .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-blue.min.css b/dist/uhr-blue.min.css new file mode 100644 index 0000000..347dffe --- /dev/null +++ b/dist/uhr-blue.min.css @@ -0,0 +1 @@ +.uhr.blue{background-color:#00a}.blue .onoffswitch-inner:before{background-color:#00a}.uhr.blue .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.blue .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-green.min.css b/dist/uhr-green.min.css new file mode 100644 index 0000000..a21d521 --- /dev/null +++ b/dist/uhr-green.min.css @@ -0,0 +1 @@ +.uhr.green{background-color:#0c0}.green .onoffswitch-inner:before{background-color:#0c0}.uhr.green .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.green .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)} \ No newline at end of file diff --git a/dist/uhr-pink.min.css b/dist/uhr-pink.min.css new file mode 100644 index 0000000..a417fd8 --- /dev/null +++ b/dist/uhr-pink.min.css @@ -0,0 +1 @@ +.uhr.pink{background-color:#f0a}.uhr.pink .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.pink .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.pink .onoffswitch-inner:before{background-color:#f0a}.uhr.pink .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.pink .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-red.min.css b/dist/uhr-red.min.css new file mode 100644 index 0000000..323f11e --- /dev/null +++ b/dist/uhr-red.min.css @@ -0,0 +1 @@ +.uhr.red{background-color:#700}.red .onoffswitch-inner:before{background-color:#700}.uhr.red .dot:not(.active){border-color:rgba(255,255,255,.1);box-shadow:0 0 .1em rgba(255,255,255,.1)}.uhr.red .letter:not(.active){color:rgba(255,255,255,.1);text-shadow:0 0 .1em rgba(255,255,255,.1)} \ No newline at end of file diff --git a/dist/uhr-white.min.css b/dist/uhr-white.min.css new file mode 100644 index 0000000..40814de --- /dev/null +++ b/dist/uhr-white.min.css @@ -0,0 +1 @@ +.uhr.white{background-color:#ccc}.uhr.white .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.white .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.white .onoffswitch-inner:before{background-color:#ccc}.uhr.white .dot:not(.active){border-color:rgba(0,0,0,.1);box-shadow:0 0 .1em rgba(0,0,0,.1)}.uhr.white .letter:not(.active){color:rgba(0,0,0,.1);text-shadow:0 0 .1em rgba(0,0,0,.1)} \ No newline at end of file diff --git a/dist/uhr-yellow.min.css b/dist/uhr-yellow.min.css new file mode 100644 index 0000000..a09e6ef --- /dev/null +++ b/dist/uhr-yellow.min.css @@ -0,0 +1 @@ +.uhr.yellow{background-color:#fd0}.uhr.yellow .dot.active{border-color:#fff;box-shadow:0 0 .1em #fff}.uhr.yellow .letter.active{color:#fff;text-shadow:0 0 .1em #fff}.yellow .onoffswitch-inner:before{background-color:#fd0}.uhr.yellow .dot:not(.active){border-color:rgba(0,0,0,.05);box-shadow:0 0 .1em rgba(0,0,0,.05)}.uhr.yellow .letter:not(.active){color:rgba(0,0,0,.05);text-shadow:0 0 .1em rgba(0,0,0,.05)} \ No newline at end of file diff --git a/dist/uhr.min.css b/dist/uhr.min.css new file mode 100644 index 0000000..7282a33 --- /dev/null +++ b/dist/uhr.min.css @@ -0,0 +1 @@ +@font-face{font-family:Uhrenfont;src:url(../resources/uhr.woff) format('woff')}body{font-family:Uhrenfont,sans-serif}.uhr{position:relative;margin:0;transition:background-color .5s}.uhr .reflection{position:absolute;top:0;bottom:0;left:0;right:0;background:radial-gradient(225em 45em at 160% 0,rgba(255,255,255,.4) 0,rgba(255,255,255,.05) 40%,rgba(255,255,255,0) 40%) no-repeat scroll;display:block;margin:.15em}.uhr .letterarea{display:block;position:absolute;top:12%;bottom:12%;left:12%;right:12%;overflow:hidden;font-size:200%}.item{transition:box-shadow .5s,text-shadow .5s,border-color .5s,color .5s}.dot{position:absolute;display:block;height:0;width:0;border:.2em solid;border-radius:1em}.dot.active{border-color:#eee;box-shadow:0 0 .2em #eee}.dot1{top:3.75%;left:3.75%}.dot2{top:3.75%;right:3.75%}.dot3{bottom:3.75%;right:3.75%}.dot4{bottom:3.75%;left:3.75%}.letter{height:10%;width:9.0909%;padding:0;margin:0;display:inline-block;text-align:center;line-height:160%}.letter.active{color:#eee;text-shadow:0 0 .2em #eee}.onoffswitch{position:relative;width:86px;margin:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #999;border-radius:50px}.modeswitch-inner,.onoffswitch-inner{width:200%;margin-left:-100%;-moz-transition:margin .3s ease-in 0s;-webkit-transition:margin .3s ease-in 0s;-o-transition:margin .3s ease-in 0s;transition:margin .3s ease-in 0s}.modeswitch-inner:after,.modeswitch-inner:before,.onoffswitch-inner:after,.onoffswitch-inner:before{float:left;width:50%;height:24px;padding:0;line-height:24px;font-size:18px;color:#fff;font-weight:700;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.onoffswitch-inner:before{content:"EIN";padding-left:12px;color:#eee;transition:background-color .5s}.onoffswitch-inner:after{content:"AUS";padding-right:12px;background-color:#eee;color:#999;text-align:right}.onoffswitch-switch{width:30px;margin:-3px;background:#fff;border:2px solid #999;border-radius:50px;position:absolute;top:0;bottom:0;right:58px;-moz-transition:all .3s ease-in 0s;-webkit-transition:all .3s ease-in 0s;-o-transition:all .3s ease-in 0s;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .modeswitch-inner,.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-left:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:0}.modeswitch-inner:before{content:"MIN";padding-left:12px;background-color:#fff;color:#000}.modeswitch-inner:after{content:"SEC";padding-right:12px;background-color:#fff;color:#000;text-align:right}a.uhr-configlink{cursor:pointer;background:url(../resources/settings.png) no-repeat;width:24px;height:24px;display:inline-block;margin:2px;vertical-align:top}.uhr-controlpanel{border-radius:.5em;box-shadow:0 0 1em #000;background-color:#fff;display:inline-block;padding:.5em;position:sticky;bottom:0;margin-left:1em}.uhr-controlpanel .content{position:relative}a.uhr-closecontrolpanel{cursor:pointer;display:inline-block;position:absolute;right:0;top:-1em;width:24px;height:24px;background:url(../resources/close.png) no-repeat}#disclaimer{font-size:.5em}#disclaimer a{color:#444;text-decoration:underline} \ No newline at end of file diff --git a/test/test.js b/test/test.js index daf266c..df22522 100644 --- a/test/test.js +++ b/test/test.js @@ -96,7 +96,7 @@ suite('Bärneruhr', function () { }); uhr = elem.uhr('instance'); // NB: 'de' is just the first language that is included in the page. that may change! - assert.equal(uhr.options.language, 'de_CH_genau'); + assert.equal(uhr.options.language, 'de'); }); test('unknown theme', function () { -- 2.49.0 From 92817becc848f915dd92694ffaae527ecc9c139f Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Sat, 4 May 2019 00:04:11 +0200 Subject: [PATCH 09/10] Lift version to 9.0.0-dev.0, since there were several large dependency upgrades --- VERSION | 2 +- dist/jquery.uhr.base.js | 4 ++-- dist/jquery.uhr.base.min.js | 4 ++-- dist/jquery.uhr.baselangs.js | 2 +- dist/jquery.uhr.baselangs.min.js | 4 ++-- dist/jquery.uhr.complete.js | 2 +- dist/jquery.uhr.complete.min.js | 4 ++-- dist/jquery.uhr.langs.js | 2 +- dist/jquery.uhr.langs.min.js | 4 ++-- dist/jquery.uhr.main.js | 2 +- dist/jquery.uhr.main.min.js | 4 ++-- dist/libs.js | 2 +- dist/libs.min.js | 4 ++-- manifest.appcache | 2 +- package-lock.json | 2 +- package.json | 2 +- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/VERSION b/VERSION index d3ae6cf..2b1a7b3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.4-dev.0 +9.0.0-dev.0 diff --git a/dist/jquery.uhr.base.js b/dist/jquery.uhr.base.js index 246d96c..12cba0e 100644 --- a/dist/jquery.uhr.base.js +++ b/dist/jquery.uhr.base.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function ($) { @@ -886,4 +886,4 @@ }; // Das Layout bei der Uhr unter dem Code "de_CH" registrieren. $.fritteli.uhr.register('de_CH', layout); -}(jQuery)); \ No newline at end of file +}(jQuery)); diff --git a/dist/jquery.uhr.base.min.js b/dist/jquery.uhr.base.min.js index b23f608..1515a36 100644 --- a/dist/jquery.uhr.base.min.js +++ b/dist/jquery.uhr.base.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var i={4:[1,2]},e={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},h={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},r={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,i],"10,11,12,13,14":[o,i],"15,16,17,18,19":[h,i],"20,21,22,23,24":[a,i],"25,26,27,28,29":[s,e,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,i,n],"40,41,42,43,44":[a,e],"45,46,47,48,49":[h,e],"50,51,52,53,54":[o,e],"55,56,57,58,59":[s,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",r)}(); \ No newline at end of file +!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var i={4:[1,2]},e={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},h={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},r={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,i],"10,11,12,13,14":[o,i],"15,16,17,18,19":[h,i],"20,21,22,23,24":[a,i],"25,26,27,28,29":[s,e,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,i,n],"40,41,42,43,44":[a,e],"45,46,47,48,49":[h,e],"50,51,52,53,54":[o,e],"55,56,57,58,59":[s,e]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",r)}(); diff --git a/dist/jquery.uhr.baselangs.js b/dist/jquery.uhr.baselangs.js index 6668032..dab317c 100644 --- a/dist/jquery.uhr.baselangs.js +++ b/dist/jquery.uhr.baselangs.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { diff --git a/dist/jquery.uhr.baselangs.min.js b/dist/jquery.uhr.baselangs.min.js index d04715b..8f4c177 100644 --- a/dist/jquery.uhr.baselangs.min.js +++ b/dist/jquery.uhr.baselangs.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); \ No newline at end of file +!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); diff --git a/dist/jquery.uhr.complete.js b/dist/jquery.uhr.complete.js index 0c620f0..138d05d 100644 --- a/dist/jquery.uhr.complete.js +++ b/dist/jquery.uhr.complete.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function ($) { diff --git a/dist/jquery.uhr.complete.min.js b/dist/jquery.uhr.complete.min.js index 1b02faa..6789c61 100644 --- a/dist/jquery.uhr.complete.min.js +++ b/dist/jquery.uhr.complete.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(d){"use strict";var e,i,n,l={id:0,languages:[],themes:[],registerLanguage:function(e,i){l.languages.some(function(t){return e===t.code&&(console.error("Error: Language code '"+e+"' cannot be registered for language '"+i.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(i.code=e,l.languages.push(i))}};d("link[rel=stylesheet]").each(function(t,e){var i=d(e),n=i.attr("data-class");if(void 0!==n){var s=i.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function N(t,e){var i=t,n=e||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+i+"</span>"}}function o(t){var e={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},i={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},r={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},h={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},u={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},c={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},d={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},g={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},E={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[e,i],1:[e,s],2:[e,r],3:[e,h],4:[e,c],5:[e,l],6:[e,f],7:[e,g],8:[e,E],9:[e,p],10:[n,i],11:[n,s],12:[n,r],13:[n,h],14:[n,c],15:[n,l],16:[n,f],17:[n,g],18:[n,E],19:[n,p],20:[o,i],21:[o,s],22:[o,r],23:[o,h],24:[o,c],25:[o,l],26:[o,f],27:[o,g],28:[o,E],29:[o,p],30:[a,i],31:[a,s],32:[a,r],33:[a,h],34:[a,c],35:[a,l],36:[a,f],37:[a,g],38:[a,E],39:[a,p],40:[u,i],41:[u,s],42:[u,r],43:[u,h],44:[u,c],45:[u,l],46:[u,f],47:[u,g],48:[u,E],49:[u,p],50:[d,i],51:[d,s],52:[d,r],53:[d,h],54:[d,c],55:[d,l],56:[d,f],57:[d,g],58:[d,E],59:[d,p]};function m(i,n,t){null!=t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){i[e-1][t-1].addStyle(n)})})}function I(e,i,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){m(e,i,t)}):m(e,i,t))}function b(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var e=t.split(","),i=o[t];e.forEach(function(t){I(n,s+t,i)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var e=[],i=0;i<t.length;i++){var n=new N(t[i]);e.push(n)}s.push(e)}),I(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?b(s,"second",t.seconds):b(s,"second",v),b(s,"minute",t.minutes),b(s,"hour",t.hours),s}}function r(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var e=new o(n).parse();Object.defineProperty(n,"parsed",{value:e,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var i=n.parsed;s.fadeOut("fast",function(){s.empty(),i.forEach(function(t,e,i){t.forEach(function(t){s.append(t.toString())}),e<i.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),e.bind(this)("uhr-mode",t)}function g(t){var e=this.element;e.css("width",t);var i=e.width();e.width(i),e.height(i),e.css("font-size",i/40+"px")}var a,h;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),g.bind(this)(this.options.width),this.options.controls){var e=d('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),i=d('<div class="content"></div>');e.append(i);var n=d('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(n);var s=d('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(s),1<l.languages.length){var o=d('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),i.append(o)}if(1<l.themes.length){var r=d('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){r.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),i.append(r)}var a=d('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){d("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),i.append(a),t.after(e),e.hide();var h=d('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');h.on("click",function(){(function(){d("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(h)}},h=function(){var t=d("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var e=d.cookie("uhr-status"+this.id);void 0!==e&&!this.options.force||(e=this.options.status),t.prop("checked","on"===e),"on"===e?this.start():this.stop();var i=d("#uhr-modeswitch-checkbox"+this.id);i.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=d.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),i.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=d("#uhr-languagechooser"+this.id);s.on("change",function(){var t=d("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=d.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var r,a=l.languages.some(function(t){return o===t.code});a||(r=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+r+"'"),o=r);s.val(o),this.options.language="",this.language(o);var h=d("#uhr-themechooser"+this.id);h.on("change",function(){var t=d("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var u=d.cookie("uhr-theme"+this.id);if(void 0!==u&&!this.options.force||(u=this.options.theme),!(a=l.themes.some(function(t){return u===t.styleClass}))){var c=l.themes[0].styleClass;console.warn("Theme '"+u+"' not found! Using fallback '"+c+"'"),u=c}h.val(u),this.options.theme="",this.theme(u),this.options.autoresize&&d(window).on("resize",function(){var t=this.element.parent(),e=d(window),i=t.width(),n=t.height(),s=e.width(),o=e.height(),r=Math.min(i,n,s,o)+"px";g.bind(this)(r)}.bind(this))};var u,c,E,p,v,m,I;e=function(t,e){var i={};i=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},d.cookie(t+this.id,e,i)},i=function(){return null!==this.timer},n=function(){if(i.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}u.bind(this)(t)}else c.bind(this)(),this.currentMinute=-1},u=function(t){var e=p.bind(this)(t),i=v.bind(this)(t),n=I.bind(this)(t),s=m.bind(this)(t);if(c.bind(this)(),"seconds"===this.options.mode)E.bind(this)("second"+e);else{E.bind(this)("on");for(var o=1;o<=i;o++)E.bind(this)("dot"+o);E.bind(this)("minute"+s),E.bind(this)("hour"+n)}},E=function(t){this.element.find(".item."+t).addClass("active")},c=function(){this.element.find(".item").removeClass("active")},p=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},m=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},I=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},d.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){i.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),e.bind(this)("uhr-status","on"))},stop:function(){i.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),e.bind(this)("uhr-status","off"))},toggle:function(){i.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new r(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),e.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),d("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,e.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:g,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,e=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var e=t.split("="),i=e[0],n=e[1];switch(i){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),h.bind(this)(),void 0!==e&&this.time(e)},_destroy:function(){this.timer=null,d(this.element).removeAttr("style").removeAttr("class").empty(),d("#uhr-configlink"+this.id).remove(),d("#uhr-controlpanel"+this.id).remove()}}),d.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var e={4:[8,9,10,11]},i={4:[1,2,3]},n={5:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={2:[5,6,7,8,9,10,11]},a={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},e],"20,21,22,23,24":[r,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[r,i],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",a)}(),function(t){"use strict";var e={4:[1,2]},i={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",h)}(),function(t){"use strict";var e={4:[4,5]},i={4:[1,2,3]},n={4:[7,8,9,10,11]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",h)}(),function(t){"use strict";var e={4:[4,5,6,7,8,9,10,11]},i={5:[8]},n={5:[4,5,6,7]},s={2:[1,2,3]},o={4:[1,2]},r={3:[4,5,6,7,8]},a={2:[4,5,6,7]},h={6:[8,9,10,11]},u={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[s,e,n],"10,11,12,13,14":[o,e,n],"15,16,17,18,19":[r,n],"20,21,22,23,24":[a,e,n],"25,26,27,28,29":[s,e,i,h],"30,31,32,33,34":[h],"35,36,37,38,39":[s,e,n,h],"40,41,42,43,44":[a,e,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,e,i],"55,56,57,58,59":[s,e,i]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(t){var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("dk",u)}(),function(t){"use strict";var e={4:[10,11]},i={5:[1,2,3,4]},n={3:[7,8,9,10]},s={4:[6,7,8]},o={2:[1,3,4,5,6,7,8,9]},r={3:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6,7,8,9,10]},h={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[n,i],"10,11,12,13,14":[s,i],"15,16,17,18,19":[o,i],"20,21,22,23,24":[r,i],"25,26,27,28,29":[a,i],"30,31,32,33,34":[{4:[1,2,3,4]},i],"35,36,37,38,39":[a,e],"40,41,42,43,44":[r,e],"45,46,47,48,49":[o,e],"50,51,52,53,54":[s,e],"55,56,57,58,59":[n,e]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("en",h)}(),function(t){"use strict";var e={1:[2,3,4,6,7,8]},i={7:[6]},n={7:[7,8,9,10,11]},s={9:[7,8,9,10,11]},o={8:[8,9,10,11]},r={10:[6,7,8,9,10,11]},a={8:[2,3,4,5,6,7]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[1,2,3,4,5]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[e,{2:[1,2,3]}],"3,15":[e,{2:[5,6,7,8]}],"4,16":[e,{3:[1,2,3,4,5,6]}],"5,17":[e,{3:[7,8,9,10,11]}],"6,18":[e,{4:[1,2,3,4]}],"7,19":[e,{4:[6,7,8,9,10]}],"8,20":[e,{5:[1,2,3,4]}],"9,21":[e,{5:[5,6,7,8,9]}],"10,22":[e,{6:[3,4,5,6]}],"11,23":[e,{6:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("es",u)}(),function(t){"use strict";var e={8:[1,2]},i={7:[1,2,3,4,5]},n={6:[6,7,8,9,10,11]},s={9:[7,8,9,10]},o={7:[9,10,11]},r={8:[4,5,6,7,8]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10]},u={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":s,"10,11,12,13,14":o,"15,16,17,18,19":[e,r],"20,21,22,23,24":a,"25,26,27,28,29":h,"30,31,32,33,34":[e,{10:[4,5,6,7,8]}],"35,36,37,38,39":[i,h],"40,41,42,43,44":[i,a],"45,46,47,48,49":[i,{7:[7,8]},r],"50,51,52,53,54":[i,o],"55,56,57,58,59":[i,s]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},n],"2,14":[{1:[8,9,10,11]},n],"3,15":[{2:[7,8,9,10,11]},n],"4,16":[{2:[1,2,3,4,5,6]},n],"5,17":[{4:[8,9,10,11]},n],"6,18":[{4:[5,6,7]},n],"7,19":[{3:[8,9,10,11]},n],"8,20":[{4:[1,2,3,4]},n],"9,21":[{3:[1,2,3,4]},n],"10,22":[{5:[3,4,5]},n],"11,23":[{6:[1,2,3,4]},n],12:{5:[1,2,3,4]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("fr",u)}(),function(t){"use strict";var e={1:[1,2,3,4,6,7]},i={8:[1]},n={7:[8,9,10,11]},s={9:[6,7,8,9,10,11]},o={10:[1,2,3,4,5]},r={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[7,8,9,10,11]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[e,{2:[9,10,11]}],"3,15":[e,{3:[1,2,3]}],"4,16":[e,{6:[1,2,3,4,5,6,7]}],"5,17":[e,{7:[1,2,3,4,5,6]}],"6,18":[e,{6:[9,10,11]}],"7,19":[e,{5:[7,8,9,10,11]}],"8,20":[e,{3:[4,5,6,7]}],"9,21":[e,{3:[8,9,10,11]}],"10,22":[e,{4:[1,2,3,4,5]}],"11,23":[e,{4:[6,7,8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("it",u)}(),function(t){"use strict";var e={3:[1,2,3,4]},i={2:[8,9,10,11]},n={4:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={3:[7,8,9,10,11]},a={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,{4:[8,9,10,11]}],"20,21,22,23,24":[o,i,n],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[o,e,n],"45,46,47,48,49":[r,{5:[1,2,3,4]}],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(t){var e=t.getHours();return 20<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("nl",a)}(),function(t){"use strict";var e={1:[1]},i={1:[2,3,4]},n={7:[8]},s={10:[5]},o={7:[7,8,9,10,11]},r={10:[7,8,9,10,11]},a={10:[1,2,3]},h={9:[1,2,4,5,6,7,8,9]},u={8:[1,2,3,4,5]},c={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[n,r],"10,11,12,13,14":[n,a],"15,16,17,18,19":[n,h],"20,21,22,23,24":[n,u],"25,26,27,28,29":[n,u,s,r],"30,31,32,33,34":[n,{8:[8,9,10,11]}],"35,36,37,38,39":[o,u,s,r],"40,41,42,43,44":[o,u],"45,46,47,48,49":[o,h],"50,51,52,53,54":[o,a],"55,56,57,58,59":[o,r]},hours:{0:[e,{6:[2,3,4,5,7,8,9,10,11]}],12:[e,{2:[1,2,3,4,6,7,8]}],"1,13":[e,{1:[5,6,7]}],"2,14":[i,{3:[1,2,3,4]}],"3,15":[i,{1:[8,9,10,11]}],"4,16":[i,{4:[1,2,3,4,5,6]}],"5,17":[i,{5:[1,2,3,4,5]}],"6,18":[i,{3:[4,5,6,7]}],"7,19":[i,{3:[7,8,9,10]}],"8,20":[i,{5:[5,6,7,8]}],"9,21":[i,{4:[8,9,10,11]}],"10,22":[i,{2:[9,10,11]}],"11,23":[i,{5:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("pt",c)}(); \ No newline at end of file +!function(d){"use strict";var e,i,n,l={id:0,languages:[],themes:[],registerLanguage:function(e,i){l.languages.some(function(t){return e===t.code&&(console.error("Error: Language code '"+e+"' cannot be registered for language '"+i.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(i.code=e,l.languages.push(i))}};d("link[rel=stylesheet]").each(function(t,e){var i=d(e),n=i.attr("data-class");if(void 0!==n){var s=i.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function N(t,e){var i=t,n=e||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+i+"</span>"}}function o(t){var e={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},i={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},r={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},h={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},u={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},c={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},d={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},g={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},E={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[e,i],1:[e,s],2:[e,r],3:[e,h],4:[e,c],5:[e,l],6:[e,f],7:[e,g],8:[e,E],9:[e,p],10:[n,i],11:[n,s],12:[n,r],13:[n,h],14:[n,c],15:[n,l],16:[n,f],17:[n,g],18:[n,E],19:[n,p],20:[o,i],21:[o,s],22:[o,r],23:[o,h],24:[o,c],25:[o,l],26:[o,f],27:[o,g],28:[o,E],29:[o,p],30:[a,i],31:[a,s],32:[a,r],33:[a,h],34:[a,c],35:[a,l],36:[a,f],37:[a,g],38:[a,E],39:[a,p],40:[u,i],41:[u,s],42:[u,r],43:[u,h],44:[u,c],45:[u,l],46:[u,f],47:[u,g],48:[u,E],49:[u,p],50:[d,i],51:[d,s],52:[d,r],53:[d,h],54:[d,c],55:[d,l],56:[d,f],57:[d,g],58:[d,E],59:[d,p]};function m(i,n,t){null!=t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){i[e-1][t-1].addStyle(n)})})}function I(e,i,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){m(e,i,t)}):m(e,i,t))}function b(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var e=t.split(","),i=o[t];e.forEach(function(t){I(n,s+t,i)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var e=[],i=0;i<t.length;i++){var n=new N(t[i]);e.push(n)}s.push(e)}),I(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?b(s,"second",t.seconds):b(s,"second",v),b(s,"minute",t.minutes),b(s,"hour",t.hours),s}}function r(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var e=new o(n).parse();Object.defineProperty(n,"parsed",{value:e,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var i=n.parsed;s.fadeOut("fast",function(){s.empty(),i.forEach(function(t,e,i){t.forEach(function(t){s.append(t.toString())}),e<i.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),e.bind(this)("uhr-mode",t)}function g(t){var e=this.element;e.css("width",t);var i=e.width();e.width(i),e.height(i),e.css("font-size",i/40+"px")}var a,h;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),g.bind(this)(this.options.width),this.options.controls){var e=d('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),i=d('<div class="content"></div>');e.append(i);var n=d('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(n);var s=d('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),i.append(s),1<l.languages.length){var o=d('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),i.append(o)}if(1<l.themes.length){var r=d('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){r.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),i.append(r)}var a=d('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){d("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),i.append(a),t.after(e),e.hide();var h=d('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');h.on("click",function(){(function(){d("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(h)}},h=function(){var t=d("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var e=d.cookie("uhr-status"+this.id);void 0!==e&&!this.options.force||(e=this.options.status),t.prop("checked","on"===e),"on"===e?this.start():this.stop();var i=d("#uhr-modeswitch-checkbox"+this.id);i.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=d.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),i.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=d("#uhr-languagechooser"+this.id);s.on("change",function(){var t=d("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=d.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var r,a=l.languages.some(function(t){return o===t.code});a||(r=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+r+"'"),o=r);s.val(o),this.options.language="",this.language(o);var h=d("#uhr-themechooser"+this.id);h.on("change",function(){var t=d("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var u=d.cookie("uhr-theme"+this.id);if(void 0!==u&&!this.options.force||(u=this.options.theme),!(a=l.themes.some(function(t){return u===t.styleClass}))){var c=l.themes[0].styleClass;console.warn("Theme '"+u+"' not found! Using fallback '"+c+"'"),u=c}h.val(u),this.options.theme="",this.theme(u),this.options.autoresize&&d(window).on("resize",function(){var t=this.element.parent(),e=d(window),i=t.width(),n=t.height(),s=e.width(),o=e.height(),r=Math.min(i,n,s,o)+"px";g.bind(this)(r)}.bind(this))};var u,c,E,p,v,m,I;e=function(t,e){var i={};i=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},d.cookie(t+this.id,e,i)},i=function(){return null!==this.timer},n=function(){if(i.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}u.bind(this)(t)}else c.bind(this)(),this.currentMinute=-1},u=function(t){var e=p.bind(this)(t),i=v.bind(this)(t),n=I.bind(this)(t),s=m.bind(this)(t);if(c.bind(this)(),"seconds"===this.options.mode)E.bind(this)("second"+e);else{E.bind(this)("on");for(var o=1;o<=i;o++)E.bind(this)("dot"+o);E.bind(this)("minute"+s),E.bind(this)("hour"+n)}},E=function(t){this.element.find(".item."+t).addClass("active")},c=function(){this.element.find(".item").removeClass("active")},p=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},m=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},I=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},d.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){i.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),e.bind(this)("uhr-status","on"))},stop:function(){i.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),e.bind(this)("uhr-status","off"))},toggle:function(){i.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new r(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),e.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),d("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,e.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:g,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,e=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var e=t.split("="),i=e[0],n=e[1];switch(i){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),h.bind(this)(),void 0!==e&&this.time(e)},_destroy:function(){this.timer=null,d(this.element).removeAttr("style").removeAttr("class").empty(),d("#uhr-configlink"+this.id).remove(),d("#uhr-controlpanel"+this.id).remove()}}),d.fritteli.uhr.register=l.registerLanguage}(jQuery),function(t){"use strict";var e={4:[8,9,10,11]},i={4:[1,2,3]},n={5:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={2:[5,6,7,8,9,10,11]},a={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},e],"20,21,22,23,24":[r,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[r,i],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",a)}(),function(t){"use strict";var e={4:[1,2]},i={3:[9,10,11]},n={4:[4,5,6,7,8]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",h)}(),function(t){"use strict";var e={4:[4,5]},i={4:[1,2,3]},n={4:[7,8,9,10,11]},s={1:[9,10,11]},o={2:[9,10,11]},r={2:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6]},h={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,e],"20,21,22,23,24":[a,e],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[a,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",h)}(),function(t){"use strict";var e={4:[4,5,6,7,8,9,10,11]},i={5:[8]},n={5:[4,5,6,7]},s={2:[1,2,3]},o={4:[1,2]},r={3:[4,5,6,7,8]},a={2:[4,5,6,7]},h={6:[8,9,10,11]},u={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[s,e,n],"10,11,12,13,14":[o,e,n],"15,16,17,18,19":[r,n],"20,21,22,23,24":[a,e,n],"25,26,27,28,29":[s,e,i,h],"30,31,32,33,34":[h],"35,36,37,38,39":[s,e,n,h],"40,41,42,43,44":[a,e,i],"45,46,47,48,49":[r,i],"50,51,52,53,54":[o,e,i],"55,56,57,58,59":[s,e,i]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(t){var e=t.getHours();return 25<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("dk",u)}(),function(t){"use strict";var e={4:[10,11]},i={5:[1,2,3,4]},n={3:[7,8,9,10]},s={4:[6,7,8]},o={2:[1,3,4,5,6,7,8,9]},r={3:[1,2,3,4,5,6]},a={3:[1,2,3,4,5,6,7,8,9,10]},h={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[n,i],"10,11,12,13,14":[s,i],"15,16,17,18,19":[o,i],"20,21,22,23,24":[r,i],"25,26,27,28,29":[a,i],"30,31,32,33,34":[{4:[1,2,3,4]},i],"35,36,37,38,39":[a,e],"40,41,42,43,44":[r,e],"45,46,47,48,49":[o,e],"50,51,52,53,54":[s,e],"55,56,57,58,59":[n,e]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("en",h)}(),function(t){"use strict";var e={1:[2,3,4,6,7,8]},i={7:[6]},n={7:[7,8,9,10,11]},s={9:[7,8,9,10,11]},o={8:[8,9,10,11]},r={10:[6,7,8,9,10,11]},a={8:[2,3,4,5,6,7]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[1,2,3,4,5]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[e,{2:[1,2,3]}],"3,15":[e,{2:[5,6,7,8]}],"4,16":[e,{3:[1,2,3,4,5,6]}],"5,17":[e,{3:[7,8,9,10,11]}],"6,18":[e,{4:[1,2,3,4]}],"7,19":[e,{4:[6,7,8,9,10]}],"8,20":[e,{5:[1,2,3,4]}],"9,21":[e,{5:[5,6,7,8,9]}],"10,22":[e,{6:[3,4,5,6]}],"11,23":[e,{6:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("es",u)}(),function(t){"use strict";var e={8:[1,2]},i={7:[1,2,3,4,5]},n={6:[6,7,8,9,10,11]},s={9:[7,8,9,10]},o={7:[9,10,11]},r={8:[4,5,6,7,8]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10]},u={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":s,"10,11,12,13,14":o,"15,16,17,18,19":[e,r],"20,21,22,23,24":a,"25,26,27,28,29":h,"30,31,32,33,34":[e,{10:[4,5,6,7,8]}],"35,36,37,38,39":[i,h],"40,41,42,43,44":[i,a],"45,46,47,48,49":[i,{7:[7,8]},r],"50,51,52,53,54":[i,o],"55,56,57,58,59":[i,s]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},n],"2,14":[{1:[8,9,10,11]},n],"3,15":[{2:[7,8,9,10,11]},n],"4,16":[{2:[1,2,3,4,5,6]},n],"5,17":[{4:[8,9,10,11]},n],"6,18":[{4:[5,6,7]},n],"7,19":[{3:[8,9,10,11]},n],"8,20":[{4:[1,2,3,4]},n],"9,21":[{3:[1,2,3,4]},n],"10,22":[{5:[3,4,5]},n],"11,23":[{6:[1,2,3,4]},n],12:{5:[1,2,3,4]}},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("fr",u)}(),function(t){"use strict";var e={1:[1,2,3,4,6,7]},i={8:[1]},n={7:[8,9,10,11]},s={9:[6,7,8,9,10,11]},o={10:[1,2,3,4,5]},r={8:[3,4,6,7,8,9,10,11]},a={9:[1,2,3,4,5]},h={9:[1,2,3,4,5,6,7,8,9,10,11]},u={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[i,s],"10,11,12,13,14":[i,o],"15,16,17,18,19":[i,r],"20,21,22,23,24":[i,a],"25,26,27,28,29":[i,h],"30,31,32,33,34":[i,{10:[7,8,9,10,11]}],"35,36,37,38,39":[n,h],"40,41,42,43,44":[n,a],"45,46,47,48,49":[n,r],"50,51,52,53,54":[n,o],"55,56,57,58,59":[n,s]},hours:{"0,12":[e,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[e,{2:[9,10,11]}],"3,15":[e,{3:[1,2,3]}],"4,16":[e,{6:[1,2,3,4,5,6,7]}],"5,17":[e,{7:[1,2,3,4,5,6]}],"6,18":[e,{6:[9,10,11]}],"7,19":[e,{5:[7,8,9,10,11]}],"8,20":[e,{3:[4,5,6,7]}],"9,21":[e,{3:[8,9,10,11]}],"10,22":[e,{4:[1,2,3,4,5]}],"11,23":[e,{4:[6,7,8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("it",u)}(),function(t){"use strict";var e={3:[1,2,3,4]},i={2:[8,9,10,11]},n={4:[1,2,3,4]},s={1:[8,9,10,11]},o={2:[1,2,3,4]},r={3:[7,8,9,10,11]},a={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[s,e],"10,11,12,13,14":[o,e],"15,16,17,18,19":[r,{4:[8,9,10,11]}],"20,21,22,23,24":[o,i,n],"25,26,27,28,29":[s,i,n],"30,31,32,33,34":n,"35,36,37,38,39":[s,e,n],"40,41,42,43,44":[o,e,n],"45,46,47,48,49":[r,{5:[1,2,3,4]}],"50,51,52,53,54":[o,i],"55,56,57,58,59":[s,i]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(t){var e=t.getHours();return 20<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("nl",a)}(),function(t){"use strict";var e={1:[1]},i={1:[2,3,4]},n={7:[8]},s={10:[5]},o={7:[7,8,9,10,11]},r={10:[7,8,9,10,11]},a={10:[1,2,3]},h={9:[1,2,4,5,6,7,8,9]},u={8:[1,2,3,4,5]},c={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[n,r],"10,11,12,13,14":[n,a],"15,16,17,18,19":[n,h],"20,21,22,23,24":[n,u],"25,26,27,28,29":[n,u,s,r],"30,31,32,33,34":[n,{8:[8,9,10,11]}],"35,36,37,38,39":[o,u,s,r],"40,41,42,43,44":[o,u],"45,46,47,48,49":[o,h],"50,51,52,53,54":[o,a],"55,56,57,58,59":[o,r]},hours:{0:[e,{6:[2,3,4,5,7,8,9,10,11]}],12:[e,{2:[1,2,3,4,6,7,8]}],"1,13":[e,{1:[5,6,7]}],"2,14":[i,{3:[1,2,3,4]}],"3,15":[i,{1:[8,9,10,11]}],"4,16":[i,{4:[1,2,3,4,5,6]}],"5,17":[i,{5:[1,2,3,4,5]}],"6,18":[i,{3:[4,5,6,7]}],"7,19":[i,{3:[7,8,9,10]}],"8,20":[i,{5:[5,6,7,8]}],"9,21":[i,{4:[8,9,10,11]}],"10,22":[i,{2:[9,10,11]}],"11,23":[i,{5:[8,9,10,11]}]},getHour:function(t){var e=t.getHours();return 35<=t.getMinutes()?(e+1)%24:e}};jQuery.fritteli.uhr.register("pt",c)}(); diff --git a/dist/jquery.uhr.langs.js b/dist/jquery.uhr.langs.js index 6668032..dab317c 100644 --- a/dist/jquery.uhr.langs.js +++ b/dist/jquery.uhr.langs.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function($) { diff --git a/dist/jquery.uhr.langs.min.js b/dist/jquery.uhr.langs.min.js index d04715b..8f4c177 100644 --- a/dist/jquery.uhr.langs.min.js +++ b/dist/jquery.uhr.langs.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); \ No newline at end of file +!function(e){"use strict";var E={4:[8,9,10,11]},r={4:[1,2,3]},t={5:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={2:[5,6,7,8,9,10,11]},s={version:2,language:"Deutsch",letters:["ESKISTAFÜNF","ZEHNZWANZIG","DREIVIERTEL","VORFUNKNACH","HALBAELFÜNF","EINSXAMZWEI","DREIPMJVIER","SECHSNLACHT","SIEBENZWÖLF","ZEHNEUNKUHR"],permanent:{1:[1,2,4,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[{3:[5,6,7,8,9,10,11]},E],"20,21,22,23,24":[n,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[n,r],"45,46,47,48,49":{3:[1,2,3,4,5,6,7,8,9,10,11]},"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{9:[7,8,9,10,11]},"1,13":{6:[1,2,3,4]},"2,14":{6:[8,9,10,11]},"3,15":{7:[1,2,3,4]},"4,16":{7:[8,9,10,11]},"5,17":{5:[8,9,10,11]},"6,18":{8:[1,2,3,4,5]},"7,19":{9:[1,2,3,4,5,6]},"8,20":{8:[8,9,10,11]},"9,21":{10:[4,5,6,7]},"10,22":{10:[1,2,3,4]},"11,23":{5:[6,7,8]}}};jQuery.fritteli.uhr.register("de",s)}(),function(e){"use strict";var E={4:[1,2]},r={3:[9,10,11]},t={4:[4,5,6,7,8]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGSIVOR","ABOHAUBIEGE","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH",i)}(),function(e){"use strict";var E={4:[4,5]},r={4:[1,2,3]},t={4:[7,8,9,10,11]},I={1:[9,10,11]},u={2:[9,10,11]},n={2:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6]},i={version:2,language:"Bärndütsch (genau)",letters:["ESKISCHAFÜF","VIERTUBFZÄÄ","ZWÄNZGGENAU","VORABOHAUBI","EISZWÖISDRÜ","VIERIFÜFIQT","SÄCHSISIBNI","ACHTINÜNIEL","ZÄNIERBEUFI","ZWÖUFINAUHR"],permanent:{1:[1,2,4,5,6,7]},minutes:{0:{3:[7,8,9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,E],"20,21,22,23,24":[s,E],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[s,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[1,2,3]},"2,14":{5:[4,5,6,7]},"3,15":{5:[9,10,11]},"4,16":{6:[1,2,3,4,5]},"5,17":{6:[6,7,8,9]},"6,18":{7:[1,2,3,4,5,6]},"7,19":{7:[7,8,9,10,11]},"8,20":{8:[1,2,3,4,5]},"9,21":{8:[6,7,8,9]},"10,22":{9:[1,2,3,4]},"11,23":{9:[8,9,10,11]}}};jQuery.fritteli.uhr.register("de_CH_genau",i)}(),function(e){"use strict";var E={4:[4,5,6,7,8,9,10,11]},r={5:[8]},t={5:[4,5,6,7]},I={2:[1,2,3]},u={4:[1,2]},n={3:[4,5,6,7,8]},s={2:[4,5,6,7]},i={6:[8,9,10,11]},N={version:2,language:"Dansk",letters:["KLOKKENVERO","FEMTYVESKLA","OJEKVARTVAT","TIAMINUTTER","VEMOVERILMF","MONALISHALV","ETTOTREFIRE","FEMSEKSRSYV","OTTERNIMETI","ELLEVEATOLV"],permanent:{1:[1,2,3,4,5,6,7,9,10]},minutes:{"5,6,7,8,9":[I,E,t],"10,11,12,13,14":[u,E,t],"15,16,17,18,19":[n,t],"20,21,22,23,24":[s,E,t],"25,26,27,28,29":[I,E,r,i],"30,31,32,33,34":[i],"35,36,37,38,39":[I,E,t,i],"40,41,42,43,44":[s,E,r],"45,46,47,48,49":[n,r],"50,51,52,53,54":[u,E,r],"55,56,57,58,59":[I,E,r]},hours:{"0,12":{10:[8,9,10,11]},"1,13":{7:[1,2]},"2,14":{7:[3,4]},"3,15":{7:[5,6,7]},"4,16":{7:[8,9,10,11]},"5,17":{8:[1,2,3]},"6,18":{8:[4,5,6,7]},"7,19":{8:[9,10,11]},"8,20":{9:[1,2,3,4]},"9,21":{9:[6,7]},"10,22":{9:[10,11]},"11,23":{10:[1,2,3,4,5,6]}},getHour:function(e){var E=e.getHours();return 25<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("dk",N)}(),function(e){"use strict";var E={4:[10,11]},r={5:[1,2,3,4]},t={3:[7,8,9,10]},I={4:[6,7,8]},u={2:[1,3,4,5,6,7,8,9]},n={3:[1,2,3,4,5,6]},s={3:[1,2,3,4,5,6,7,8,9,10]},i={version:2,language:"English",letters:["ITLISBFAMPM","ACQUARTERDC","TWENTYFIVEX","HALFBTENFTO","PASTERUNINE","ONESIXTHREE","FOURFIVETWO","EIGHTELEVEN","SEVENTWELVE","TENSO'CLOCK"],permanent:{1:[1,2,4,5]},minutes:{"0,1,2,3,4":{10:[5,6,7,8,9,10,11]},"5,6,7,8,9":[t,r],"10,11,12,13,14":[I,r],"15,16,17,18,19":[u,r],"20,21,22,23,24":[n,r],"25,26,27,28,29":[s,r],"30,31,32,33,34":[{4:[1,2,3,4]},r],"35,36,37,38,39":[s,E],"40,41,42,43,44":[n,E],"45,46,47,48,49":[u,E],"50,51,52,53,54":[I,E],"55,56,57,58,59":[t,E]},hours:{"0,12":{9:[6,7,8,9,10,11]},"1,13":{6:[1,2,3]},"2,14":{7:[9,10,11]},"3,15":{6:[7,8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{6:[4,5,6]},"7,19":{9:[1,2,3,4,5]},"8,20":{8:[1,2,3,4,5]},"9,21":{5:[8,9,10,11]},"10,22":{10:[1,2,3]},"11,23":{8:[6,7,8,9,10,11]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("en",i)}(),function(e){"use strict";var E={1:[2,3,4,6,7,8]},r={7:[6]},t={7:[7,8,9,10,11]},I={9:[7,8,9,10,11]},u={8:[8,9,10,11]},n={10:[6,7,8,9,10,11]},s={8:[2,3,4,5,6,7]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Español",letters:["ESONELASUNA","DOSITRESORE","CUATROCINCO","SEISASIETEN","OCHONUEVEYO","LADIEZSONCE","DOCELYMENOS","OVEINTEDIEZ","VEINTICINCO","MEDIACUARTO"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[1,2,3,4,5]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{7:[1,2,3,4]}],"1,13":[{1:[1,2,6,7]},{1:[9,10,11]}],"2,14":[E,{2:[1,2,3]}],"3,15":[E,{2:[5,6,7,8]}],"4,16":[E,{3:[1,2,3,4,5,6]}],"5,17":[E,{3:[7,8,9,10,11]}],"6,18":[E,{4:[1,2,3,4]}],"7,19":[E,{4:[6,7,8,9,10]}],"8,20":[E,{5:[1,2,3,4]}],"9,21":[E,{5:[5,6,7,8,9]}],"10,22":[E,{6:[3,4,5,6]}],"11,23":[E,{6:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("es",N)}(),function(e){"use strict";var E={8:[1,2]},r={7:[1,2,3,4,5]},t={6:[6,7,8,9,10,11]},I={9:[7,8,9,10]},u={7:[9,10,11]},n={8:[4,5,6,7,8]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10]},N={version:2,language:"Français",letters:["ILNESTODEUX","QUATRETROIS","NEUFUNESEPT","HUITSIXCINQ","MIDIXMINUIT","ONZERHEURES","MOINSOLEDIX","ETRQUARTPMD","VINGT-CINQU","ETSDEMIEPAM"],permanent:{1:[1,2,4,5,6]},minutes:{"5,6,7,8,9":I,"10,11,12,13,14":u,"15,16,17,18,19":[E,n],"20,21,22,23,24":s,"25,26,27,28,29":i,"30,31,32,33,34":[E,{10:[4,5,6,7,8]}],"35,36,37,38,39":[r,i],"40,41,42,43,44":[r,s],"45,46,47,48,49":[r,{7:[7,8]},n],"50,51,52,53,54":[r,u],"55,56,57,58,59":[r,I]},hours:{0:{5:[6,7,8,9,10,11]},"1,13":[{3:[5,6,7]},t],"2,14":[{1:[8,9,10,11]},t],"3,15":[{2:[7,8,9,10,11]},t],"4,16":[{2:[1,2,3,4,5,6]},t],"5,17":[{4:[8,9,10,11]},t],"6,18":[{4:[5,6,7]},t],"7,19":[{3:[8,9,10,11]},t],"8,20":[{4:[1,2,3,4]},t],"9,21":[{3:[1,2,3,4]},t],"10,22":[{5:[3,4,5]},t],"11,23":[{6:[1,2,3,4]},t],12:{5:[1,2,3,4]}},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("fr",N)}(),function(e){"use strict";var E={1:[1,2,3,4,6,7]},r={8:[1]},t={7:[8,9,10,11]},I={9:[6,7,8,9,10,11]},u={10:[1,2,3,4,5]},n={8:[3,4,6,7,8,9,10,11]},s={9:[1,2,3,4,5]},i={9:[1,2,3,4,5,6,7,8,9,10,11]},N={version:2,language:"Italiano",letters:["SONORLEBORE","ÈRL'UNASDUE","TREOTTONOVE","DIECIUNDICI","DODICISETTE","QUATTROCSEI","CINQUEAMENO","ECUNOQUARTO","VENTICINQUE","DIECIPMEZZA"],permanent:[],minutes:{"5,6,7,8,9":[r,I],"10,11,12,13,14":[r,u],"15,16,17,18,19":[r,n],"20,21,22,23,24":[r,s],"25,26,27,28,29":[r,i],"30,31,32,33,34":[r,{10:[7,8,9,10,11]}],"35,36,37,38,39":[t,i],"40,41,42,43,44":[t,s],"45,46,47,48,49":[t,n],"50,51,52,53,54":[t,u],"55,56,57,58,59":[t,I]},hours:{"0,12":[E,{5:[1,2,3,4,5,6]}],"1,13":[{2:[1,3,4]},{2:[5,6,7]}],"2,14":[E,{2:[9,10,11]}],"3,15":[E,{3:[1,2,3]}],"4,16":[E,{6:[1,2,3,4,5,6,7]}],"5,17":[E,{7:[1,2,3,4,5,6]}],"6,18":[E,{6:[9,10,11]}],"7,19":[E,{5:[7,8,9,10,11]}],"8,20":[E,{3:[4,5,6,7]}],"9,21":[E,{3:[8,9,10,11]}],"10,22":[E,{4:[1,2,3,4,5]}],"11,23":[E,{4:[6,7,8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("it",N)}(),function(e){"use strict";var E={3:[1,2,3,4]},r={2:[8,9,10,11]},t={4:[1,2,3,4]},I={1:[8,9,10,11]},u={2:[1,2,3,4]},n={3:[7,8,9,10,11]},s={version:2,language:"Nederlands",letters:["HETKISAVIJF","TIENBTZVOOR","OVERMEKWART","HALFSPWOVER","VOORTHGEENS","TWEEPVCDRIE","VIERVIJFZES","ZEVENONEGEN","ACHTTIENELF","TWAALFBFUUR"],permanent:{1:[1,2,3,5,6]},minutes:{"0,1,2,3,4":{10:[9,10,11]},"5,6,7,8,9":[I,E],"10,11,12,13,14":[u,E],"15,16,17,18,19":[n,{4:[8,9,10,11]}],"20,21,22,23,24":[u,r,t],"25,26,27,28,29":[I,r,t],"30,31,32,33,34":t,"35,36,37,38,39":[I,E,t],"40,41,42,43,44":[u,E,t],"45,46,47,48,49":[n,{5:[1,2,3,4]}],"50,51,52,53,54":[u,r],"55,56,57,58,59":[I,r]},hours:{"0,12":{10:[1,2,3,4,5,6]},"1,13":{5:[8,9,10]},"2,14":{6:[1,2,3,4]},"3,15":{6:[8,9,10,11]},"4,16":{7:[1,2,3,4]},"5,17":{7:[5,6,7,8]},"6,18":{7:[9,10,11]},"7,19":{8:[1,2,3,4,5]},"8,20":{9:[1,2,3,4]},"9,21":{8:[7,8,9,10,11]},"10,22":{9:[5,6,7,8]},"11,23":{9:[9,10,11]}},getHour:function(e){var E=e.getHours();return 20<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("nl",s)}(),function(e){"use strict";var E={1:[1]},r={1:[2,3,4]},t={7:[8]},I={10:[5]},u={7:[7,8,9,10,11]},n={10:[7,8,9,10,11]},s={10:[1,2,3]},i={9:[1,2,4,5,6,7,8,9]},N={8:[1,2,3,4,5]},T={version:2,language:"Português",letters:["ÉSÃOUMATRÊS","MEIOLDIADEZ","DUASEISETEY","QUATROHNOVE","CINCOITONZE","ZMEIALNOITE","HORASYMENOS","VINTECAMEIA","UMVQUARTOPM","DEZOEYCINCO"],minutes:{"5,6,7,8,9":[t,n],"10,11,12,13,14":[t,s],"15,16,17,18,19":[t,i],"20,21,22,23,24":[t,N],"25,26,27,28,29":[t,N,I,n],"30,31,32,33,34":[t,{8:[8,9,10,11]}],"35,36,37,38,39":[u,N,I,n],"40,41,42,43,44":[u,N],"45,46,47,48,49":[u,i],"50,51,52,53,54":[u,s],"55,56,57,58,59":[u,n]},hours:{0:[E,{6:[2,3,4,5,7,8,9,10,11]}],12:[E,{2:[1,2,3,4,6,7,8]}],"1,13":[E,{1:[5,6,7]}],"2,14":[r,{3:[1,2,3,4]}],"3,15":[r,{1:[8,9,10,11]}],"4,16":[r,{4:[1,2,3,4,5,6]}],"5,17":[r,{5:[1,2,3,4,5]}],"6,18":[r,{3:[4,5,6,7]}],"7,19":[r,{3:[7,8,9,10]}],"8,20":[r,{5:[5,6,7,8]}],"9,21":[r,{4:[8,9,10,11]}],"10,22":[r,{2:[9,10,11]}],"11,23":[r,{5:[8,9,10,11]}]},getHour:function(e){var E=e.getHours();return 35<=e.getMinutes()?(E+1)%24:E}};jQuery.fritteli.uhr.register("pt",T)}(); diff --git a/dist/jquery.uhr.main.js b/dist/jquery.uhr.main.js index fd94574..5fc0502 100644 --- a/dist/jquery.uhr.main.js +++ b/dist/jquery.uhr.main.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ (function ($) { diff --git a/dist/jquery.uhr.main.min.js b/dist/jquery.uhr.main.min.js index 083d28b..e15c1b2 100644 --- a/dist/jquery.uhr.main.min.js +++ b/dist/jquery.uhr.main.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery); \ No newline at end of file +!function(u){"use strict";var i,e,n,l={id:0,languages:[],themes:[],registerLanguage:function(i,e){l.languages.some(function(t){return i===t.code&&(console.error("Error: Language code '"+i+"' cannot be registered for language '"+e.language+"' because it is already registered for language '"+t.language+"'!"),!0)})||(e.code=i,l.languages.push(e))}};u("link[rel=stylesheet]").each(function(t,i){var e=u(i),n=e.attr("data-class");if(void 0!==n){var s=e.attr("data-name");void 0===s&&(s=n),l.themes.push({styleClass:n,name:s})}}),0===l.themes.length&&l.themes.push({});var s;function y(t,i){var e=t,n=i||"";this.addStyle=function(t){""===n?n=t:n+=" "+t},this.toString=function(){return'<span class="item letter '+n+'">'+e+"</span>"}}function o(t){var i={3:[2,3,4],4:[1,5],5:[1,4,5],6:[1,3,5],7:[1,2,5],8:[1,5],9:[2,3,4]},e={3:[8,9,10],4:[7,11],5:[7,10,11],6:[7,9,11],7:[7,8,11],8:[7,11],9:[8,9,10]},n={3:[3],4:[2,3],5:[3],6:[3],7:[3],8:[3],9:[2,3,4]},s={3:[9],4:[8,9],5:[9],6:[9],7:[9],8:[9],9:[8,9,10]},o={3:[2,3,4],4:[1,5],5:[5],6:[4],7:[3],8:[2],9:[1,2,3,4,5]},h={3:[8,9,10],4:[7,11],5:[11],6:[10],7:[9],8:[8],9:[7,8,9,10,11]},a={3:[1,2,3,4,5],4:[4],5:[3],6:[4],7:[5],8:[1,5],9:[2,3,4]},r={3:[7,8,9,10,11],4:[10],5:[9],6:[10],7:[11],8:[7,11],9:[8,9,10]},c={3:[4],4:[3,4],5:[2,4],6:[1,4],7:[1,2,3,4,5],8:[4],9:[4]},d={3:[10],4:[9,10],5:[8,10],6:[7,10],7:[7,8,9,10,11],8:[10],9:[10]},u={3:[1,2,3,4,5],4:[1],5:[1,2,3,4],6:[5],7:[5],8:[1,5],9:[2,3,4]},l={3:[7,8,9,10,11],4:[7],5:[7,8,9,10],6:[11],7:[11],8:[7,11],9:[8,9,10]},f={3:[9,10],4:[8],5:[7],6:[7,8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},p={3:[7,8,9,10,11],4:[11],5:[10],6:[9],7:[8],8:[8],9:[8]},g={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10],7:[7,11],8:[7,11],9:[8,9,10]},m={3:[8,9,10],4:[7,11],5:[7,11],6:[8,9,10,11],7:[11],8:[10],9:[8,9]},v={0:[i,e],1:[i,s],2:[i,h],3:[i,r],4:[i,d],5:[i,l],6:[i,f],7:[i,p],8:[i,g],9:[i,m],10:[n,e],11:[n,s],12:[n,h],13:[n,r],14:[n,d],15:[n,l],16:[n,f],17:[n,p],18:[n,g],19:[n,m],20:[o,e],21:[o,s],22:[o,h],23:[o,r],24:[o,d],25:[o,l],26:[o,f],27:[o,p],28:[o,g],29:[o,m],30:[a,e],31:[a,s],32:[a,h],33:[a,r],34:[a,d],35:[a,l],36:[a,f],37:[a,p],38:[a,g],39:[a,m],40:[c,e],41:[c,s],42:[c,h],43:[c,r],44:[c,d],45:[c,l],46:[c,f],47:[c,p],48:[c,g],49:[c,m],50:[u,e],51:[u,s],52:[u,h],53:[u,r],54:[u,d],55:[u,l],56:[u,f],57:[u,p],58:[u,g],59:[u,m]};function b(e,n,t){null!=t&&Object.keys(t).forEach(function(i){t[i].forEach(function(t){e[i-1][t-1].addStyle(n)})})}function w(i,e,t){null!=t&&(Array.isArray(t)?t.forEach(function(t){b(i,e,t)}):b(i,e,t))}function k(n,s,o){null!=o&&Object.keys(o).forEach(function(t){var i=t.split(","),e=o[t];i.forEach(function(t){w(n,s+t,e)})})}this.parse=function(){var s=[];return t.letters.forEach(function(t){for(var i=[],e=0;e<t.length;e++){var n=new y(t[e]);i.push(n)}s.push(i)}),w(s,"on",t.permanent),void 0!==t.seconds&&null!==t.seconds?k(s,"second",t.seconds):k(s,"second",v),k(s,"minute",t.minutes),k(s,"hour",t.hours),s}}function h(n,s){this.render=function(t){if(void 0===n.parsed)switch(n.version){case 2:var i=new o(n).parse();Object.defineProperty(n,"parsed",{value:i,writable:!1,configurable:!1});break;default:return void console.warn("Unknown layout version: '"+n.version+"'")}var e=n.parsed;s.fadeOut("fast",function(){s.empty(),e.forEach(function(t,i,e){t.forEach(function(t){s.append(t.toString())}),i<e.length-1&&s.append("<br/>")}),"function"==typeof t&&t(),s.fadeIn("fast")})}}function f(t){this.options.mode=t,this.currentMinute=-1,n.bind(this)(),i.bind(this)("uhr-mode",t)}function p(t){var i=this.element;i.css("width",t);var e=i.width();i.width(e),i.height(e),i.css("font-size",e/40+"px")}var a,r;a=function(){var t=this.element;if(t.addClass("uhr"),t.empty(),t.append('<span class="item dot dot1"></span>'),t.append('<span class="item dot dot2"></span>'),t.append('<span class="item dot dot3"></span>'),t.append('<span class="item dot dot4"></span>'),t.append('<div class="letterarea"></div>'),t.append('<div class="reflection"></div>'),p.bind(this)(this.options.width),this.options.controls){var i=u('<div class="uhr-controlpanel" id="uhr-controlpanel'+this.id+'"></div>'),e=u('<div class="content"></div>');i.append(e);var n=u('<div class="onoffswitch" id="uhr-onoffswitch'+this.id+'"></div>');n.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-onoffswitch-checkbox'+this.id+'" checked="checked" />'),n.append('<label class="onoffswitch-label" for="uhr-onoffswitch-checkbox'+this.id+'"><div class="onoffswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(n);var s=u('<div class="onoffswitch" id="uhr-modeswitch'+this.id+'"></div>');if(s.append('<input type="checkbox" class="onoffswitch-checkbox" id="uhr-modeswitch-checkbox'+this.id+'" checked="checked" />'),s.append('<label class="onoffswitch-label" for="uhr-modeswitch-checkbox'+this.id+'"><div class="modeswitch-inner"></div><div class="onoffswitch-switch"></div></label>'),e.append(s),1<l.languages.length){var o=u('<select id="uhr-languagechooser'+this.id+'"></select>');l.languages.forEach(function(t){o.append('<option value="'+t.code+'">'+t.language+"</option>")}),e.append(o)}if(1<l.themes.length){var h=u('<select id="uhr-themechooser'+this.id+'"></select>');l.themes.forEach(function(t){h.append('<option value="'+t.styleClass+'">'+t.name+"</option>")}),e.append(h)}var a=u('<a class="uhr-closecontrolpanel" id="uhr-closecontrolpanel'+this.id+'"></a>');a.on("click",function(){u("#uhr-controlpanel"+this.id).hide("fast")}.bind(this)),e.append(a),t.after(i),i.hide();var r=u('<a class="uhr-configlink" id="uhr-configlink'+this.id+'"></a>');r.on("click",function(){(function(){u("#uhr-controlpanel"+this.id).toggle("fast")}).bind(this)()}.bind(this)),t.after(r)}},r=function(){var t=u("#uhr-onoffswitch-checkbox"+this.id);t.on("click",function(){this.toggle()}.bind(this));var i=u.cookie("uhr-status"+this.id);void 0!==i&&!this.options.force||(i=this.options.status),t.prop("checked","on"===i),"on"===i?this.start():this.stop();var e=u("#uhr-modeswitch-checkbox"+this.id);e.on("click",function(){"seconds"===this.options.mode?f.bind(this)("normal"):f.bind(this)("seconds")}.bind(this));var n=u.cookie("uhr-mode"+this.id);void 0!==n&&!this.options.force||(n=this.options.mode),e.prop("checked","seconds"!==n),"seconds"===n?f.bind(this)("seconds"):f.bind(this)("normal");var s=u("#uhr-languagechooser"+this.id);s.on("change",function(){var t=u("#uhr-languagechooser"+this.id).val();this.language(t)}.bind(this));var o=u.cookie("uhr-language"+this.id);void 0!==o&&!this.options.force||(o=this.options.language);var h,a=l.languages.some(function(t){return o===t.code});a||(h=0<l.languages.length?l.languages[0].code:"",console.warn("Language '"+o+"' not found! Using fallback '"+h+"'"),o=h);s.val(o),this.options.language="",this.language(o);var r=u("#uhr-themechooser"+this.id);r.on("change",function(){var t=u("#uhr-themechooser"+this.id).val();this.theme(t)}.bind(this));var c=u.cookie("uhr-theme"+this.id);if(void 0!==c&&!this.options.force||(c=this.options.theme),!(a=l.themes.some(function(t){return c===t.styleClass}))){var d=l.themes[0].styleClass;console.warn("Theme '"+c+"' not found! Using fallback '"+d+"'"),c=d}r.val(c),this.options.theme="",this.theme(c),this.options.autoresize&&u(window).on("resize",function(){var t=this.element.parent(),i=u(window),e=t.width(),n=t.height(),s=i.width(),o=i.height(),h=Math.min(e,n,s,o)+"px";p.bind(this)(h)}.bind(this))};var c,d,g,m,v,b,w;i=function(t,i){var e={};e=void 0!==this.options.cookiePath?{expires:365,path:this.options.cookiePath}:{expires:365},u.cookie(t+this.id,i,e)},e=function(){return null!==this.timer},n=function(){if(e.bind(this)()){var t=this.options.time;if(!s.bind(this)().hasOwnProperty("seconds")&&"seconds"!==this.options.mode){if(t.getMinutes()===this.currentMinute)return;this.currentMinute=t.getMinutes()}c.bind(this)(t)}else d.bind(this)(),this.currentMinute=-1},c=function(t){var i=m.bind(this)(t),e=v.bind(this)(t),n=w.bind(this)(t),s=b.bind(this)(t);if(d.bind(this)(),"seconds"===this.options.mode)g.bind(this)("second"+i);else{g.bind(this)("on");for(var o=1;o<=e;o++)g.bind(this)("dot"+o);g.bind(this)("minute"+s),g.bind(this)("hour"+n)}},g=function(t){this.element.find(".item."+t).addClass("active")},d=function(){this.element.find(".item").removeClass("active")},m=function(t){return"function"==typeof s.bind(this)().getSeconds?s.bind(this)().getSeconds(t):t.getSeconds()},v=function(t){return"function"==typeof s.bind(this)().getDotMinute?s.bind(this)().getDotMinute(t):t.getMinutes()%5},b=function(t){return"function"==typeof s.bind(this)().getCoarseMinute?s.bind(this)().getCoarseMinute(t):t.getMinutes()},w=function(t){if("function"==typeof s.bind(this)().getHour)return s.bind(this)().getHour(t);var i=t.getHours();return 25<=t.getMinutes()?(i+1)%24:i},s=function(){var t=l.languages.filter(function(t){return t.code===this.options.language},this);return 0<t.length?t[0]:{}},u.widget("fritteli.uhr",{options:{width:"100%",status:"on",language:"de_CH",theme:l.themes[0].styleClass,force:!1,controls:!0,cookiePath:void 0,autoresize:!0,mode:"normal"},start:function(){e.bind(this)()||(this.timer=window.setInterval(function(){this.options.time=new Date,n.bind(this)()}.bind(this),1e3),n.bind(this)(),i.bind(this)("uhr-status","on"))},stop:function(){e.bind(this)()&&(window.clearInterval(this.timer),this.timer=null,n.bind(this)(),i.bind(this)("uhr-status","off"))},toggle:function(){e.bind(this)()?this.stop():this.start()},language:function(t){t!==this.options.language&&(this.options.language=t,new h(s.bind(this)(),this.element.find(".letterarea")).render.bind(this)(function(){this.currentMinute=-1,n.bind(this)()}.bind(this)),i.bind(this)("uhr-language",t),n.bind(this)())},theme:function(t){t!==this.options.theme&&(this.element.removeClass(this.options.theme).addClass(t),u("#uhr-onoffswitch"+this.id).removeClass(this.options.theme).addClass(t),this.options.theme=t,i.bind(this)("uhr-theme",t))},time:function(t){this.currentMinute=-1,null===t?this.options.time=new Date:(null!==this.timer&&window.clearInterval(this.timer),this.options.time=t),n.bind(this)()},mode:f,width:p,_create:function(){this.id=l.id++,this.timer=null,this.currentMinute=-1;var t,i=this.options.time;void 0===this.options.time&&(this.options.time=new Date),void 0!==(t=window.location.hash)&&"string"==typeof t&&"#"===t.charAt(0)&&(t=t.substring(1),(t=decodeURIComponent(t)).split("&").forEach(function(t){var i=t.split("="),e=i[0],n=i[1];switch(e){case"l":case"language":this.options.language=n,this.options.force=!0;break;case"t":case"theme":this.options.theme=n,this.options.force=!0;break;case"m":case"mode":this.options.mode=n,this.options.force=!0;break;case"s":case"status":this.options.status=n,this.options.force=!0}}.bind(this))),a.bind(this)(),r.bind(this)(),void 0!==i&&this.time(i)},_destroy:function(){this.timer=null,u(this.element).removeAttr("style").removeAttr("class").empty(),u("#uhr-configlink"+this.id).remove(),u("#uhr-controlpanel"+this.id).remove()}}),u.fritteli.uhr.register=l.registerLanguage}(jQuery); diff --git a/dist/libs.js b/dist/libs.js index 7707ab1..d89b48e 100644 --- a/dist/libs.js +++ b/dist/libs.js @@ -1,4 +1,4 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ /*! diff --git a/dist/libs.min.js b/dist/libs.min.js index 4cacfc9..a0a6f3e 100644 --- a/dist/libs.min.js +++ b/dist/libs.min.js @@ -1,5 +1,5 @@ -/*! uhr - v8.0.4-dev.0 - 2019-05-03 +/*! uhr - v9.0.0-dev.0 - 2019-05-03 * http://bärneruhr.ch/ * Copyright (c) 2019 Manuel Friedli; Licensed GPL-3.0 */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(T,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=T.document,r=Object.getPrototypeOf,a=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,m=n.hasOwnProperty,s=m.toString,l=s.call(Object),y={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||x(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,s[t]=k.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=m.call(t,"constructor")&&t.constructor)&&s.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!=s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return v.apply([],s)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){C()}var e,d,b,o,s,h,p,g,w,u,l,C,T,a,E,v,c,m,y,k="sizzle"+1*new Date,x=n.document,N=0,r=0,S=ue(),j=ue(),D=ue(),A=ue(),L=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],_=t.pop,O=t.push,H=t.push,P=t.slice,R=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",F="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",$=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",B=new RegExp(I+"+","g"),z=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),U=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),V=new RegExp(I+"|>"),G=new RegExp($),Q=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,re=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){O.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(t,e,n,r){var i,o,s,a,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:x)!==T&&C(e),e=e||T,E)){if(11!==p&&(u=te.exec(t)))if(i=u[1]){if(9===p){if(!(s=e.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(f&&(s=f.getElementById(i))&&y(e,s)&&s.id===i)return n.push(s),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&V.test(t)){for((a=e.getAttribute("id"))?a=a.replace(ie,oe):e.setAttribute("id",a=k),o=(l=h(t)).length;o--;)l[o]="#"+a+" "+xe(l[o]);c=l.join(","),f=ne.test(t)&&me(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{a===k&&e.removeAttribute("id")}}}return g(t.replace(z,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&se(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(s){return le(function(o){return o=+o,le(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=ae.support={},s=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},C=ae.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!s(T),x!==T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=ee.test(T.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!T.getElementsByName||!T.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(re,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(re,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=ee.test(T.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=ee.test(m=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),c.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=ee.test(a.compareDocumentPosition),y=t||ee.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===x&&y(x,e)?-1:t===T||t.ownerDocument===x&&y(x,t)?1:u?R(u,e)-R(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===T?-1:t===T?1:i?-1:o?1:u?R(u,e)-R(u,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?pe(s[r],a[r]):s[r]===x?-1:a[r]===x?1:0}),T},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&C(e),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=m.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<ae(t,T,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!==T&&C(e),y(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==T&&C(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(ie,oe)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(L),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=ae.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=ae.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(re,f),e[3]=(e[3]||e[4]||e[5]||"").replace(re,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(re,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=ae.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,s,a,u,l=m!=y?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(m){for(;l;){for(s=e;s=s[l];)if(x?s.nodeName.toLowerCase()===f:1===s.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&p){for(d=(a=(r=(i=(o=(s=c)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1])&&r[2],s=a&&c.childNodes[a];s=++a&&s&&s[l]||(d=a=0)||u.pop();)if(1===s.nodeType&&++d&&s===e){i[h]=[N,a,d];break}}else if(p&&(d=a=(r=(i=(o=(s=e)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1]),!1===d)for(;(s=++a&&s&&s[l]||(d=a=0)||u.pop())&&((x?s.nodeName.toLowerCase()!==f:1!==s.nodeType)||!++d||(p&&((i=(o=s[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]=[N,d]),s!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,s=b.pseudos[e]||b.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return s[k]?s(o):1<s.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){for(var n,r=s(e,o),i=r.length;i--;)e[n=R(e,r[i])]=!(t[n]=r[i])}):function(e){return s(e,0,t)}):s}},pseudos:{not:le(function(e){var r=[],i=[],a=p(e.replace(z,"$1"));return a[k]?le(function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))}):function(e,t,n){return r[0]=e,a(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<ae(t,e).length}}),contains:le(function(t){return t=t.replace(re,f),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return Q.test(n||"")||ae.error("unsupported lang: "+n),n=n.replace(re,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function ye(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(a,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return a(e,t,n);return!1}:function(e,t,n){var r,i,o,s=[N,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===N&&r[1]===p)return s[2]=r[2];if((i[c]=s)[2]=a(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Ce(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function Te(d,h,g,v,m,e){return v&&!v[k]&&(v=Te(v)),m&&!m[k]&&(m=Te(m,e)),le(function(e,t,n,r){var i,o,s,a=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ae(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Ce(c,a,d,n,r),p=g?m||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=Ce(p,u),v(i,[],n,r),o=i.length;o--;)(s=i[o])&&(p[u[o]]=!(f[u[o]]=s));if(e){if(m||d){if(m){for(i=[],o=p.length;o--;)(s=p[o])&&i.push(f[o]=s);m(null,p=[],i,r)}for(o=p.length;o--;)(s=p[o])&&-1<(i=m?R(e,s):a[o])&&(e[i]=!(t[i]=s))}}else p=Ce(p===t?p.splice(l,p.length):p),m?m(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],s=o||b.relative[" "],a=o?1:0,u=be(function(e){return e===i},s,!0),l=be(function(e){return-1<R(i,e)},s,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];a<r;a++)if(t=b.relative[e[a].type])c=[be(we(c),t)];else{if((t=b.filter[e[a].type].apply(null,e[a].matches))[k]){for(n=++a;n<r&&!b.relative[e[n].type];n++);return Te(1<a&&we(c),1<a&&xe(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),t,a<n&&Ee(e.slice(a,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return ye.prototype=b.filters=b.pseudos,b.setFilters=new ye,h=ae.tokenize=function(e,t){var n,r,i,o,s,a,u,l=j[e+" "];if(l)return t?0:l.slice(0);for(s=e,a=[],u=b.preFilter;s;){for(o in n&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),a.push(i=[])),n=!1,(r=X.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length)),b.filter)!(r=Y[o].exec(s))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?ae.error(e):j(e,a).slice(0)},p=ae.compile=function(e,t){var n,r=[],i=[],o=D[e+" "];if(!o){for(t||(t=h(e)),n=t.length;n--;)(o=Ee(t[n]))[k]?r.push(o):i.push(o);(o=D(e,function(v,m){function e(e,t,n,r,i){var o,s,a,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=N+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(s=0,t||o.ownerDocument===T||(C(o),n=!E);a=v[s++];)if(a(o,t||T,n)){r.push(o);break}i&&(N=h)}y&&((o=!a&&o)&&u--,e&&c.push(o))}if(u+=l,y&&l!==u){for(s=0;a=m[s++];)a(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=_.call(r));f=Ce(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+m.length&&ae.uniqueSort(r)}return i&&(N=h,w=p),c}var y=0<m.length,x=0<v.length;return y?le(e):e}(i,r))).selector=e}return o},g=ae.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(s=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(s.matches[0].replace(re,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(s=o[i],!b.relative[a=s.type]);)if((u=b.find[a])&&(r=u(s.matches[0].replace(re,f),ne.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ne.test(e)&&me(t.parentNode)||t),n},d.sortStable=k.split("").sort(L).join("")===k,d.detectDuplicates=!!l,C(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(M,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ae}(T);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function C(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function N(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var S=k.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&S.test(e)?k(e):e||[],!1).length}});var L,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,L=k(E);var _=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&k(e);if(!S.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(j(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),_.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){r="string"==typeof r?function(e){var n={};return k.each(e.match(P)||[],function(e,t){n[t]=!0}),n}(r):k.extend({},r);function n(){for(o=o||r.once,t=i=!0;a.length;u=-1)for(e=a.shift();++u<s.length;)!1===s[u].apply(e[0],e[1])&&r.stopOnFalse&&(u=s.length,e=!1);r.memory||(e=!1),i=!1,o&&(s=e?[]:"")}var i,e,t,o,s=[],a=[],u=-1,l={add:function(){return s&&(e&&!i&&(u=s.length-1,a.push(e)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&l.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),e&&!i&&n()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,s,n));)s.splice(n,1),n<=u&&u--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=e="",this},disabled:function(){return!s},lock:function(){return o=a=[],e||i||(s=e=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],a.push(t),i||n()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!t}};return l},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",s={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];a[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,s,a){return function(){function e(){var e,t;if(!(i<u)){if((e=s.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?a?t.call(e,l(u,o,R,a),l(u,o,M,a)):(u++,t.call(e,l(u,o,R,a),l(u,o,M,a),l(u,o,R,o.notifyWith))):(s!==R&&(n=void 0,r=[e]),(a||o.resolveWith)(n,r))}}var n=this,r=arguments,t=a?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(s!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),T.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:M))}).promise()},promise:function(e){return null!=e?k.extend(e,s):s}},a={};return k.each(o,function(e,t){var n=t[2],r=t[5];s[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=n.fireWith}),s.promise(a),e&&e.call(a,a),a},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?a.call(arguments):e,--n||s.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=a.call(arguments),s=k.Deferred();if(n<=1&&(I(e,s.done(t(r)).resolve,s.reject,!n),"pending"===s.state()||x(o[r]&&o[r].then)))return s.then();for(;r--;)I(o[r],t(r),s.reject);return s.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&W.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){T.setTimeout(function(){throw e})};var F=k.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),T.removeEventListener("load",$),k.ready()}k.fn.ready=function(e){return F.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?T.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",$),T.addEventListener("load",$));var B=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===w(n))for(a in i=!0,n)B(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,x(r)||(s=!0),l&&(t=s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Q(){this.expando=k.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(P)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Y=new Q,J=new Q,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Y.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],s=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){for(t=s.length;t--;)s[t]&&0===(r=s[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:k.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(s,[s])}var r,i=1,o=k.Deferred(),s=this,a=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(r=Y.get(s[a],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},se={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});function ae(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i}var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function le(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)k.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,s,a,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ue(r)&&(l[c]=(u=s=o=void 0,s=(i=r).ownerDocument,a=i.nodeName,(u=ce[a])||(o=s.body.appendChild(s.createElement(a)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[a]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ue(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?k.merge([e],n):n}function me(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var ye,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){for(s=s||f.appendChild(t.createElement("div")),a=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[a]||ge._default,s.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;k.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),s=ve(f.appendChild(o),"script"),l&&me(s),n)for(c=0;o=s[c++];)he.test(o.type||"")&&n.push(o);return f}ye=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),ye.appendChild(xe),y.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ne(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function je(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)je(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Y.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;l--;)d=g=(a=Ee.exec(e[l])||[])[1],h=(a[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,s)||t.addEventListener&&t.addEventListener(d,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(P)||[""]).length;l--;)if(d=g=(a=Ee.exec(t[l])||[])[1],h=(a[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=k.event.fix(e),u=new Array(arguments.length),l=(Y.get(this,"events")||{})[a.type]||[],c=k.event.special[a.type]||{};for(u[0]=a,t=1;t<arguments.length;t++)u[t]=arguments[t];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(s=k.event.handlers.call(this,a,l),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(a.result=r)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&j(t,"input")&&Y.get(t,"click")||j(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Ne,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Se),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return je(this,e,t,n,r)},one:function(e,t,n,r){return je(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Y.hasData(e)&&(o=Y.access(e),s=Y.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(a=J.access(e),u=k.extend({},a),J.set(t,u))}}function Me(n,r,i,o){r=v.apply([],r);var e,t,s,a,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&qe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Me(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(s=k.map(ve(e,"script"),He)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),a&&k.merge(s,ve(u,"script"))),i.call(n[c],u,c);if(a)for(l=s[s.length-1].ownerDocument,k.map(s,Pe),c=0;c<a;c++)u=s[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(_e,""),u,l))}return n}function Ie(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&me(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(Ae,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)a=o[r],u=s[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(a.type)?u.checked=a.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=a.defaultValue);if(t)if(n)for(o=o||ve(e),s=s||ve(c),r=0,i=o.length;r<i;r++)Re(o[r],s[r]);else Re(e,c);return 0<(s=ve(c,"script")).length&&me(s,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return B(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Me(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Me(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Me(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,s){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[s](t),u.apply(n,t.get());return this.pushStack(n)}});var We,Fe,$e,Be,ze,Ue,Xe,Ve=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Ge=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=T),t.getComputedStyle(e)},Qe=new RegExp(re.join("|"),"i");function Ye(){if(Xe){Ue.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Xe.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(Ue).appendChild(Xe);var e=T.getComputedStyle(Xe);We="1%"!==e.top,ze=12===Je(e.marginLeft),Xe.style.right="60%",Be=36===Je(e.right),Fe=36===Je(e.width),Xe.style.position="absolute",$e=12===Je(Xe.offsetWidth/3),ie.removeChild(Ue),Xe=null}}function Je(e){return Math.round(parseFloat(e))}function Ke(e,t,n){var r,i,o,s,a=e.style;return(n=n||Ge(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||oe(e)||(s=k.style(e,t)),!y.pixelBoxStyles()&&Ve.test(s)&&Qe.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Ue=E.createElement("div"),(Xe=E.createElement("div")).style&&(Xe.style.backgroundClip="content-box",Xe.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===Xe.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return Ye(),Fe},pixelBoxStyles:function(){return Ye(),Be},pixelPosition:function(){return Ye(),We},reliableMarginLeft:function(){return Ye(),ze},scrollboxSize:function(){return Ye(),$e}}));var et=["Webkit","Moz","ms"],tt=E.createElement("div").style,nt={};function rt(e){var t=k.cssProps[e]||nt[e];return t||(e in tt?e:nt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=et.length;n--;)if((e=et[n]+t)in tt)return e}(e)||e)}var it=/^(none|table(?!-c[ea]).+)/,ot=/^--/,st={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function lt(e,t,n,r,i,o){var s="width"===t?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=k.css(e,n+re[s],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[s],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[s]+"Width",!0,i))):(u+=k.css(e,"padding"+re[s],!0,i),"padding"!==n?u+=k.css(e,"border"+re[s]+"Width",!0,i):a+=k.css(e,"border"+re[s]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function ct(e,t,n){var r=Ge(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,s=Ke(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(s)){if(!n)return s;s="auto"}return(!y.boxSizingReliable()&&i||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+lt(e,t,n||(i?"border":"content"),o,r,s)+"px"}function ft(e,t,n,r,i){return new ft.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ke(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=V(t),u=ot.test(t),l=e.style;if(u||(t=rt(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=V(t);return ot.test(t)||(t=rt(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ke(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!it.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,u,n):ae(e,st,function(){return ct(e,u,n)})},set:function(e,t,n){var r,i=Ge(e),o=!y.scrollboxSize()&&"absolute"===i.position,s=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),a=n?lt(e,u,n,s,i):0;return s&&o&&(a-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-lt(e,u,"border",!1,i)-.5)),a&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),ut(0,t,a)}}}),k.cssHooks.marginLeft=Ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ke(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=ut)}),k.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Ge(e),i=t.length;s<i;s++)o[t[s]]=k.css(e,t[s],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=ft).prototype={constructor:ft,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ft.propHooks._default.set(this),this}}).init.prototype=ft.prototype,(ft.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ft.prototype.init,k.fx.step={};var pt,dt,ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function yt(){dt&&(!1===E.hidden&&T.requestAnimationFrame?T.requestAnimationFrame(yt):T.setTimeout(yt,k.fx.interval),k.fx.tick())}function xt(){return T.setTimeout(function(){pt=void 0}),pt=Date.now()}function bt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function wt(e,t,n){for(var r,i=(Ct.tweeners[t]||[]).concat(Ct.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function Ct(o,e,t){var n,s,r=0,i=Ct.prefilters.length,a=k.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var e=pt||xt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return a.notifyWith(o,[l,n,t]),n<1&&i?t:(i||a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l]),!1)},l=a.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:pt||xt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(s)return this;for(s=!0;t<n;t++)l.tweens[t].run(1);return e?(a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l,e])):a.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=k.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=Ct.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,wt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(Ct,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(P)).length;r<i;r++)n=e[r],Ct.tweeners[n]=Ct.tweeners[n]||[],Ct.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ue(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()})})),t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Y.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=wt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?Ct.prefilters.unshift(e):Ct.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=Ct(this,k.extend({},t),s);(o||Y.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),s=k.speed(e,n,r);return i.finish=i,o||!1===s.queue?this.each(i):this.queue(s.queue,i)},stop:function(i,e,o){function s(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&s(r[t]);else for(t in r)r[t]&&r[t].stop&&mt.test(t)&&s(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var e,t=Y.get(this),n=t[s+"queue"],r=t[s+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,s,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===s&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(bt(r,!0),e,t,n)}}),k.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(pt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),pt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){dt||(dt=!0,yt())},k.fx.stop=function(){dt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=T.setTimeout(e,r);t.stop=function(){T.clearTimeout(n)}})},ht=E.createElement("input"),gt=E.createElement("select").appendChild(E.createElement("option")),ht.type="checkbox",y.checkOn=""!==ht.value,y.optSelected=gt.selected,(ht=E.createElement("input")).value="t",ht.type="radio",y.radioValue="t"===ht.value;var Tt,Et=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return B(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var s=Et[t]||k.find.attr;Et[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=Et[o],Et[o]=r,r=null!=s(e,t,n)?o:null,Et[o]=i),r}});var kt=/^(?:input|select|textarea|button)$/i,Nt=/^(?:a|area)$/i;function St(e){return(e.match(P)||[]).join(" ")}function jt(e){return e.getAttribute&&e.getAttribute("class")||""}function Dt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}k.fn.extend({prop:function(e,t){return B(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,jt(this)))});if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,jt(this)))});if(!arguments.length)return this.attr("class","");if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},toggleClass:function(i,t){var o=typeof i,s="string"==o||Array.isArray(i);return"boolean"==typeof t&&s?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,jt(this),t),t)}):this.each(function(){var e,t,n,r;if(s)for(t=0,n=k(this),r=Dt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=jt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+St(jt(n))+" ").indexOf(t))return!0;return!1}});var At=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(At,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:St(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),s=i.length;s--;)((r=i[s]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in T;function Lt(e){e.stopPropagation()}var qt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,s,a,u,l,c,f,p=[n||E],d=m.call(e,"type")?e.type:e,h=m.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!qt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!g(n)){for(a=c.delegateType||d,qt.test(a+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(n.ownerDocument||E)&&p.push(s.defaultView||s.parentWindow||T)}for(i=0;(o=p[i++])&&!e.isPropagationStopped();)f=o,e.type=1<i?a:c.bindType||d,(l=(Y.get(o,"events")||{})[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&x(n[d])&&!g(n)&&((s=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Lt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Lt),k.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var _t=T.location,Ot=Date.now(),Ht=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Pt=/\[\]$/,Rt=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Wt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Pt.test(n)?i(n,t):Wt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Wt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)Wt(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&It.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ft=/%20/g,$t=/#.*$/,Bt=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ut=/^(?:GET|HEAD)$/,Xt=/^\/\//,Vt={},Gt={},Qt="*/".concat("*"),Yt=E.createElement("a");function Jt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Kt(t,i,o,s){var a={},u=t===Gt;function l(e){var r;return a[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,s);return"string"!=typeof n||u||a[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!a["*"]&&l("*")}function Zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Yt.href=_t.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,k.ajaxSettings),t):Zt(k.ajaxSettings,e)},ajaxPrefilter:Jt(Vt),ajaxTransport:Jt(Gt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),m=v.context||v,y=v.context&&(m.nodeType||m.jquery)?k(m):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},s={},a={},u="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=zt.exec(p);)n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=a[e.toLowerCase()]=a[e.toLowerCase()]||e,s[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)C.always(e[C.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(C),v.url=((e||v.url||_t.href)+"").replace(Xt,_t.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Yt.protocol+"//"+Yt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Kt(Vt,v,t,C),h)return C;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ut.test(v.type),f=v.url.replace($t,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Ft,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Ht.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Bt,"$1"),o=(Ht.test(f)?"&":"?")+"_="+Ot+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&C.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&C.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&C.setRequestHeader("Content-Type",v.contentType),C.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Qt+"; q=0.01":""):v.accepts["*"]),v.headers)C.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(m,C,v)||h))return C.abort();if(u="abort",b.add(v.complete),C.done(v.success),C.fail(v.error),c=Kt(Gt,v,t,C)){if(C.readyState=1,g&&y.trigger("ajaxSend",[C,v]),h)return C;v.async&&0<v.timeout&&(d=T.setTimeout(function(){C.abort("timeout")},v.timeout));try{h=!1,c.send(s,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,s,a,u,l=t;h||(h=!0,d&&T.clearTimeout(d),c=void 0,p=r||"",C.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,C,n)),a=function(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,a,C,i),i?(v.ifModified&&((u=C.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=C.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=a.state,o=a.data,i=!(s=a.error))):(s=l,!e&&l||(l="error",e<0&&(e=0))),C.status=e,C.statusText=(t||l)+"",i?x.resolveWith(m,[o,l,C]):x.rejectWith(m,[C,l,s]),C.statusCode(w),w=void 0,g&&y.trigger(i?"ajaxSuccess":"ajaxError",[C,v,i?o:s]),b.fireWith(m,[C,l]),g&&(y.trigger("ajaxComplete",[C,v]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var en={0:200,1223:204},tn=k.ajaxSettings.xhr();y.cors=!!tn&&"withCredentials"in tn,y.ajax=tn=!!tn,k.ajaxTransport(function(i){var o,s;if(y.cors||tn&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=s=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(en[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),s=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=s:r.onreadystatechange=function(){4===r.readyState&&T.setTimeout(function(){o&&s()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var nn,rn=[],on=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rn.pop()||k.expando+"_"+Ot++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(on.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&on.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(on,"$1"+r):!1!==e.jsonp&&(e.url+=(Ht.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){void 0===i?k(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,rn.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((nn=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===nn.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1<a&&(r=St(e.slice(a)),e=e.slice(0,a)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(s=(r=c.position()).top,r.left):(s=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return B(this,function(e,t,n){var r;if(g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Ze(y.pixelPosition,function(e,t){if(t)return t=Ke(e,n),Ve.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(s,a){k.each({padding:"inner"+s,content:a,"":"outer"+s},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+s],r["scroll"+s],e.body["offset"+s],r["offset"+s],r["client"+s])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},a,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=j,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var sn=T.jQuery,an=T.$;return k.noConflict=function(e){return T.$===k&&(T.$=an),e&&T.jQuery===k&&(T.jQuery=sn),k},e||(T.jQuery=T.$=k),k}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(c){var i,n=0,a=Array.prototype.slice;return c.cleanData=(i=c.cleanData,function(e){var t,n,r;for(r=0;null!=(n=e[r]);r++)try{(t=c._data(n,"events"))&&t.remove&&c(n).triggerHandler("remove")}catch(e){}i(e)}),c.widget=function(e,n,t){var r,i,o,s={},a=e.split(".")[0],u=a+"-"+(e=e.split(".")[1]);return t||(t=n,n=c.Widget),c.isArray(t)&&(t=c.extend.apply(null,[{}].concat(t))),c.expr[":"][u.toLowerCase()]=function(e){return!!c.data(e,u)},c[a]=c[a]||{},r=c[a][e],i=c[a][e]=function(e,t){if(!this._createWidget)return new i(e,t);arguments.length&&this._createWidget(e,t)},c.extend(i,r,{version:t.version,_proto:c.extend({},t),_childConstructors:[]}),(o=new n).options=c.widget.extend({},o.options),c.each(t,function(t,r){function i(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}c.isFunction(r)?s[t]=function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}:s[t]=r}),i.prototype=c.widget.extend(o,{widgetEventPrefix:r&&o.widgetEventPrefix||e},s,{constructor:i,namespace:a,widgetName:e,widgetFullName:u}),r?(c.each(r._childConstructors,function(e,t){var n=t.prototype;c.widget(n.namespace+"."+n.widgetName,i,t._proto)}),delete r._childConstructors):n._childConstructors.push(i),c.widget.bridge(e,i),i},c.widget.extend=function(e){for(var t,n,r=a.call(arguments,1),i=0,o=r.length;i<o;i++)for(t in r[i])n=r[i][t],r[i].hasOwnProperty(t)&&void 0!==n&&(c.isPlainObject(n)?e[t]=c.isPlainObject(e[t])?c.widget.extend({},e[t],n):c.widget.extend({},n):e[t]=n);return e},c.widget.bridge=function(o,t){var s=t.prototype.widgetFullName||o;c.fn[o]=function(n){var e="string"==typeof n,r=a.call(arguments,1),i=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=c.data(this,s);return"instance"===n?(i=t,!1):t?c.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,r))!==t&&void 0!==e?(i=e&&e.jquery?i.pushStack(e.get()):e,!1):void 0:c.error("no such method '"+n+"' for "+o+" widget instance"):c.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):i=void 0:(r.length&&(n=c.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=c.data(this,s);e?(e.option(n||{}),e._init&&e._init()):c.data(this,s,new t(n,this))})),i}},c.Widget=function(){},c.Widget._childConstructors=[],c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=c(t||this.defaultElement||this)[0],this.element=c(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=c(),this.hoverable=c(),this.focusable=c(),this.classesElementLookup={},t!==this&&(c.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=c(t.style?t.ownerDocument:t.document||t),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this.options=c.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){var n=this;this._destroy(),c.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:c.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,o=e;if(0===arguments.length)return c.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(r=o[e]=c.widget.extend({},this.options[e]),i=0;i<n.length-1;i++)r[n[i]]=r[n[i]]||{},r=r[n[i]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];o[e]=t}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,r;for(t in e)r=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&r&&r.length&&(n=c(r.get()),this._removeClass(r,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(i){var o=[],s=this;function e(e,t){var n,r;for(r=0;r<e.length;r++)n=s.classesElementLookup[e[r]]||c(),n=i.add?c(c.unique(n.get().concat(i.element.get()))):c(n.not(i.element).get()),s.classesElementLookup[e[r]]=n,o.push(e[r]),t&&i.classes[e[r]]&&o.push(i.classes[e[r]])}return i=c.extend({element:this.element,classes:this.options.classes||{}},i),this._on(i.element,{remove:"_untrackClassesElement"}),i.keys&&e(i.keys.match(/\S+/g)||[],!0),i.extra&&e(i.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(n){var r=this;c.each(r.classesElementLookup,function(e,t){-1!==c.inArray(n.target,t)&&(r.classesElementLookup[e]=c(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,o={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(s,a,e){var u,l=this;"boolean"!=typeof s&&(e=a,a=s,s=!1),e?(a=u=c(a),this.bindings=this.bindings.add(a)):(e=a,a=this.element,u=this.widget()),c.each(e,function(e,t){function n(){if(s||!0!==l.options.disabled&&!c(this).hasClass("ui-state-disabled"))return("string"==typeof t?l[t]:t).apply(l,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||c.guid++);var r=e.match(/^([\w:-]*)\s*(.*)$/),i=r[1]+l.eventNamespace,o=r[2];o?u.on(i,o,n):a.on(i,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=c(this.bindings.not(e).get()),this.focusable=c(this.focusable.not(e).get()),this.hoverable=c(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(c(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(c(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var r,i,o=this.options[e];if(n=n||{},(t=c.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],i=t.originalEvent)for(r in i)r in t||(t[r]=i[r]);return this.element.trigger(t,n),!(c.isFunction(o)&&!1===o.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},c.each({show:"fadeIn",hide:"fadeOut"},function(o,s){c.Widget.prototype["_"+o]=function(t,e,n){var r;"string"==typeof e&&(e={effect:e});var i=e?!0===e||"number"==typeof e?s:e.effect||s:o;"number"==typeof(e=e||{})&&(e={duration:e}),r=!c.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),r&&c.effects&&c.effects.effect[i]?t[o](e):i!==o&&t[i]?t[i](e.duration,e.easing,n):t.queue(function(e){c(this)[o](),n&&n.call(t[0]),e()})}}),c.widget}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(d){var r=/\+/g;function h(e){return v.raw?e:encodeURIComponent(e)}function g(e,t){var n=v.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(r," ")),v.json?JSON.parse(e):e}catch(e){}}(e);return d.isFunction(t)?t(n):n}var v=d.cookie=function(e,t,n){if(void 0!==t&&!d.isFunction(t)){if("number"==typeof(n=d.extend({},v.defaults,n)).expires){var r=n.expires,i=n.expires=new Date;i.setTime(+i+864e5*r)}return document.cookie=[h(e),"=",function(e){return h(v.json?JSON.stringify(e):String(e))}(t),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var o,s=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],u=0,l=a.length;u<l;u++){var c=a[u].split("="),f=(o=c.shift(),v.raw?o:decodeURIComponent(o)),p=c.join("=");if(e&&e===f){s=g(p,t);break}e||void 0===(p=g(p))||(s[f]=p)}return s};v.defaults={},d.removeCookie=function(e,t){return void 0!==d.cookie(e)&&(d.cookie(e,"",d.extend({},t,{expires:-1})),!d.cookie(e))}}); \ No newline at end of file +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(T,e){"use strict";function g(e){return null!=e&&e===e.window}var t=[],E=T.document,r=Object.getPrototypeOf,a=t.slice,v=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,m=n.hasOwnProperty,s=m.toString,l=s.call(Object),y={},x=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!x(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||x(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,s[t]=k.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=m.call(t,"constructor")&&t.constructor)&&s.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!=s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return v.apply([],s)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){function f(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}function i(){C()}var e,d,b,o,s,h,p,g,w,u,l,C,T,a,E,v,c,m,y,k="sizzle"+1*new Date,x=n.document,N=0,r=0,S=ue(),j=ue(),D=ue(),A=ue(),L=function(e,t){return e===t&&(l=!0),0},q={}.hasOwnProperty,t=[],_=t.pop,O=t.push,H=t.push,P=t.slice,R=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="[\\x20\\t\\r\\n\\f]",W="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",F="\\["+I+"*("+W+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+W+"))|)"+I+"*\\]",$=":("+W+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",B=new RegExp(I+"+","g"),z=new RegExp("^"+I+"+|((?:^|[^\\\\])(?:\\\\.)*)"+I+"+$","g"),U=new RegExp("^"+I+"*,"+I+"*"),X=new RegExp("^"+I+"*([>+~]|"+I+")"+I+"*"),V=new RegExp(I+"|>"),G=new RegExp($),Q=new RegExp("^"+W+"$"),Y={ID:new RegExp("^#("+W+")"),CLASS:new RegExp("^\\.("+W+")"),TAG:new RegExp("^("+W+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,re=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=P.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){O.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(t,e,n,r){var i,o,s,a,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:x)!==T&&C(e),e=e||T,E)){if(11!==p&&(u=te.exec(t)))if(i=u[1]){if(9===p){if(!(s=e.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(f&&(s=f.getElementById(i))&&y(e,s)&&s.id===i)return n.push(s),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&V.test(t)){for((a=e.getAttribute("id"))?a=a.replace(ie,oe):e.setAttribute("id",a=k),o=(l=h(t)).length;o--;)l[o]="#"+a+" "+xe(l[o]);c=l.join(","),f=ne.test(t)&&me(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{a===k&&e.removeAttribute("id")}}}return g(t.replace(z,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&se(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(s){return le(function(o){return o=+o,le(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=ae.support={},s=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},C=ae.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!s(T),x!==T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",i,!1):n.attachEvent&&n.attachEvent("onunload",i)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=ee.test(T.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!T.getElementsByName||!T.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(re,f);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(re,f);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},c=[],v=[],(d.qsa=ee.test(T.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=ee.test(m=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),c.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),c=c.length&&new RegExp(c.join("|")),t=ee.test(a.compareDocumentPosition),y=t||ee.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===x&&y(x,e)?-1:t===T||t.ownerDocument===x&&y(x,t)?1:u?R(u,e)-R(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===T?-1:t===T?1:i?-1:o?1:u?R(u,e)-R(u,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?pe(s[r],a[r]):s[r]===x?-1:a[r]===x?1:0}),T},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&C(e),d.matchesSelector&&E&&!A[t+" "]&&(!c||!c.test(t))&&(!v||!v.test(t)))try{var n=m.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<ae(t,T,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!==T&&C(e),y(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==T&&C(e);var n=b.attrHandle[t.toLowerCase()],r=n&&q.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},ae.escape=function(e){return(e+"").replace(ie,oe)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(L),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=ae.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=ae.selectors={cacheLength:50,createPseudo:le,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(re,f),e[3]=(e[3]||e[4]||e[5]||"").replace(re,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(re,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=ae.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,s,a,u,l=m!=y?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(m){for(;l;){for(s=e;s=s[l];)if(x?s.nodeName.toLowerCase()===f:1===s.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&p){for(d=(a=(r=(i=(o=(s=c)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1])&&r[2],s=a&&c.childNodes[a];s=++a&&s&&s[l]||(d=a=0)||u.pop();)if(1===s.nodeType&&++d&&s===e){i[h]=[N,a,d];break}}else if(p&&(d=a=(r=(i=(o=(s=e)[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1]),!1===d)for(;(s=++a&&s&&s[l]||(d=a=0)||u.pop())&&((x?s.nodeName.toLowerCase()!==f:1!==s.nodeType)||!++d||(p&&((i=(o=s[k]||(s[k]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]=[N,d]),s!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,s=b.pseudos[e]||b.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return s[k]?s(o):1<s.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){for(var n,r=s(e,o),i=r.length;i--;)e[n=R(e,r[i])]=!(t[n]=r[i])}):function(e){return s(e,0,t)}):s}},pseudos:{not:le(function(e){var r=[],i=[],a=p(e.replace(z,"$1"));return a[k]?le(function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))}):function(e,t,n){return r[0]=e,a(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<ae(t,e).length}}),contains:le(function(t){return t=t.replace(re,f),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return Q.test(n||"")||ae.error("unsupported lang: "+n),n=n.replace(re,f).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function ye(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(a,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||f)return a(e,t,n);return!1}:function(e,t,n){var r,i,o,s=[N,p];if(n){for(;e=e[u];)if((1===e.nodeType||f)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===N&&r[1]===p)return s[2]=r[2];if((i[c]=s)[2]=a(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Ce(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function Te(d,h,g,v,m,e){return v&&!v[k]&&(v=Te(v)),m&&!m[k]&&(m=Te(m,e)),le(function(e,t,n,r){var i,o,s,a=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ae(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Ce(c,a,d,n,r),p=g?m||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=Ce(p,u),v(i,[],n,r),o=i.length;o--;)(s=i[o])&&(p[u[o]]=!(f[u[o]]=s));if(e){if(m||d){if(m){for(i=[],o=p.length;o--;)(s=p[o])&&i.push(f[o]=s);m(null,p=[],i,r)}for(o=p.length;o--;)(s=p[o])&&-1<(i=m?R(e,s):a[o])&&(e[i]=!(t[i]=s))}}else p=Ce(p===t?p.splice(l,p.length):p),m?m(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],s=o||b.relative[" "],a=o?1:0,u=be(function(e){return e===i},s,!0),l=be(function(e){return-1<R(i,e)},s,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];a<r;a++)if(t=b.relative[e[a].type])c=[be(we(c),t)];else{if((t=b.filter[e[a].type].apply(null,e[a].matches))[k]){for(n=++a;n<r&&!b.relative[e[n].type];n++);return Te(1<a&&we(c),1<a&&xe(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(z,"$1"),t,a<n&&Ee(e.slice(a,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return ye.prototype=b.filters=b.pseudos,b.setFilters=new ye,h=ae.tokenize=function(e,t){var n,r,i,o,s,a,u,l=j[e+" "];if(l)return t?0:l.slice(0);for(s=e,a=[],u=b.preFilter;s;){for(o in n&&!(r=U.exec(s))||(r&&(s=s.slice(r[0].length)||s),a.push(i=[])),n=!1,(r=X.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length)),b.filter)!(r=Y[o].exec(s))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?ae.error(e):j(e,a).slice(0)},p=ae.compile=function(e,t){var n,r=[],i=[],o=D[e+" "];if(!o){for(t||(t=h(e)),n=t.length;n--;)(o=Ee(t[n]))[k]?r.push(o):i.push(o);(o=D(e,function(v,m){function e(e,t,n,r,i){var o,s,a,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=N+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(s=0,t||o.ownerDocument===T||(C(o),n=!E);a=v[s++];)if(a(o,t||T,n)){r.push(o);break}i&&(N=h)}y&&((o=!a&&o)&&u--,e&&c.push(o))}if(u+=l,y&&l!==u){for(s=0;a=m[s++];)a(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=_.call(r));f=Ce(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+m.length&&ae.uniqueSort(r)}return i&&(N=h,w=p),c}var y=0<m.length,x=0<v.length;return y?le(e):e}(i,r))).selector=e}return o},g=ae.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(s=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(s.matches[0].replace(re,f),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=Y.needsContext.test(e)?0:o.length;i--&&(s=o[i],!b.relative[a=s.type]);)if((u=b.find[a])&&(r=u(s.matches[0].replace(re,f),ne.test(o[0].type)&&me(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}return(l||p(e,c))(r,t,!E,n,!t||ne.test(e)&&me(t.parentNode)||t),n},d.sortStable=k.split("").sort(L).join("")===k,d.detectDuplicates=!!l,C(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(M,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ae}(T);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;function C(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function N(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}var S=k.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(e,n,r){return x(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(A(this,e||[],!1))},not:function(e){return this.pushStack(A(this,e||[],!0))},is:function(e){return!!A(this,"string"==typeof e&&S.test(e)?k(e):e||[],!1).length}});var L,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):x(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)x(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=k.fn,L=k(E);var _=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&k(e);if(!S.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return N((e.parentNode||{}).firstChild,e)},children:function(e){return N(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(j(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),_.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&x(i=e.promise)?i.call(e).done(t).fail(n):e&&x(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){r="string"==typeof r?function(e){var n={};return k.each(e.match(P)||[],function(e,t){n[t]=!0}),n}(r):k.extend({},r);function n(){for(o=o||r.once,t=i=!0;a.length;u=-1)for(e=a.shift();++u<s.length;)!1===s[u].apply(e[0],e[1])&&r.stopOnFalse&&(u=s.length,e=!1);r.memory||(e=!1),i=!1,o&&(s=e?[]:"")}var i,e,t,o,s=[],a=[],u=-1,l={add:function(){return s&&(e&&!i&&(u=s.length-1,a.push(e)),function n(e){k.each(e,function(e,t){x(t)?r.unique&&l.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),e&&!i&&n()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;-1<(n=k.inArray(t,s,n));)s.splice(n,1),n<=u&&u--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=e="",this},disabled:function(){return!s},lock:function(){return o=a=[],e||i||(s=e=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],a.push(t),i||n()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!t}};return l},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",s={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=x(i[t[4]])&&i[t[4]];a[t[1]](function(){var e=n&&n.apply(this,arguments);e&&x(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,s,a){return function(){function e(){var e,t;if(!(i<u)){if((e=s.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,x(t)?a?t.call(e,l(u,o,R,a),l(u,o,M,a)):(u++,t.call(e,l(u,o,R,a),l(u,o,M,a),l(u,o,R,o.notifyWith))):(s!==R&&(n=void 0,r=[e]),(a||o.resolveWith)(n,r))}}var n=this,r=arguments,t=a?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(s!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),T.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,x(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,x(t)?t:R)),o[2][3].add(l(0,e,x(n)?n:M))}).promise()},promise:function(e){return null!=e?k.extend(e,s):s}},a={};return k.each(o,function(e,t){var n=t[2],r=t[5];s[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=n.fireWith}),s.promise(a),e&&e.call(a,a),a},when:function(e){function t(t){return function(e){i[t]=this,o[t]=1<arguments.length?a.call(arguments):e,--n||s.resolveWith(i,o)}}var n=arguments.length,r=n,i=Array(r),o=a.call(arguments),s=k.Deferred();if(n<=1&&(I(e,s.done(t(r)).resolve,s.reject,!n),"pending"===s.state()||x(o[r]&&o[r].then)))return s.then();for(;r--;)I(o[r],t(r),s.reject);return s.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&W.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){T.setTimeout(function(){throw e})};var F=k.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),T.removeEventListener("load",$),k.ready()}k.fn.ready=function(e){return F.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?T.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",$),T.addEventListener("load",$));var B=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===w(n))for(a in i=!0,n)B(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,x(r)||(s=!0),l&&(t=s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}function G(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Q(){this.expando=k.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(P)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Y=new Q,J=new Q,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:K.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Y.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],s=o&&o.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){J.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){for(t=s.length;t--;)s[t]&&0===(r=s[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:k.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(s,[s])}var r,i=1,o=k.Deferred(),s=this,a=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(r=Y.get(s[a],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},se={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});function ae(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i}var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")};function le(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)k.style(e,t,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,s,a,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ue(r)&&(l[c]=(u=s=o=void 0,s=(i=r).ownerDocument,a=i.nodeName,(u=ce[a])||(o=s.body.appendChild(s.createElement(a)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[a]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ue(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?k.merge([e],n):n}function me(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var ye,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){for(s=s||f.appendChild(t.createElement("div")),a=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[a]||ge._default,s.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;k.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),s=ve(f.appendChild(o),"script"),l&&me(s),n)for(c=0;o=s[c++];)he.test(o.type||"")&&n.push(o);return f}ye=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),ye.appendChild(xe),y.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ne(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function je(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)je(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return k().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Y.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;l--;)d=g=(a=Ee.exec(e[l])||[])[1],h=(a[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,s)||t.addEventListener&&t.addEventListener(d,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(P)||[""]).length;l--;)if(d=g=(a=Ee.exec(t[l])||[])[1],h=(a[2]||"").split(".").sort(),d){for(f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=k.event.fix(e),u=new Array(arguments.length),l=(Y.get(this,"events")||{})[a.type]||[],c=k.event.special[a.type]||{};for(u[0]=a,t=1;t<arguments.length;t++)u[t]=arguments[t];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(s=k.event.handlers.call(this,a,l),t=0;(i=s[t++])&&!a.isPropagationStopped();)for(a.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(a.result=r)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,r,i,o,s,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],s={},n=0;n<u;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),s[i]&&o.push(r);o.length&&a.push({elem:l,handlers:o})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:x(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&j(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&j(t,"input")&&Y.get(t,"click")||j(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Ne,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Ce.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Se),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return je(this,e,t,n,r)},one:function(e,t,n,r){return je(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each(function(){k.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,qe=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(Y.hasData(e)&&(o=Y.access(e),s=Y.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(a=J.access(e),u=k.extend({},a),J.set(t,u))}}function Me(n,r,i,o){r=v.apply([],r);var e,t,s,a,u,l,c=0,f=n.length,p=f-1,d=r[0],h=x(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&qe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Me(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(s=k.map(ve(e,"script"),He)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),a&&k.merge(s,ve(u,"script"))),i.call(n[c],u,c);if(a)for(l=s[s.length-1].ownerDocument,k.map(s,Pe),c=0;c<a;c++)u=s[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(_e,""),u,l))}return n}function Ie(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&me(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(Ae,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(s=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)a=o[r],u=s[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(a.type)?u.checked=a.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=a.defaultValue);if(t)if(n)for(o=o||ve(e),s=s||ve(c),r=0,i=o.length;r<i;r++)Re(o[r],s[r]);else Re(e,c);return 0<(s=ve(c,"script")).length&&me(s,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return B(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Me(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Me(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Me(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Me(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,s){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[s](t),u.apply(n,t.get());return this.pushStack(n)}});var We,Fe,$e,Be,ze,Ue,Xe,Ve=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Ge=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=T),t.getComputedStyle(e)},Qe=new RegExp(re.join("|"),"i");function Ye(){if(Xe){Ue.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Xe.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(Ue).appendChild(Xe);var e=T.getComputedStyle(Xe);We="1%"!==e.top,ze=12===Je(e.marginLeft),Xe.style.right="60%",Be=36===Je(e.right),Fe=36===Je(e.width),Xe.style.position="absolute",$e=12===Je(Xe.offsetWidth/3),ie.removeChild(Ue),Xe=null}}function Je(e){return Math.round(parseFloat(e))}function Ke(e,t,n){var r,i,o,s,a=e.style;return(n=n||Ge(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||oe(e)||(s=k.style(e,t)),!y.pixelBoxStyles()&&Ve.test(s)&&Qe.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Ue=E.createElement("div"),(Xe=E.createElement("div")).style&&(Xe.style.backgroundClip="content-box",Xe.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===Xe.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return Ye(),Fe},pixelBoxStyles:function(){return Ye(),Be},pixelPosition:function(){return Ye(),We},reliableMarginLeft:function(){return Ye(),ze},scrollboxSize:function(){return Ye(),$e}}));var et=["Webkit","Moz","ms"],tt=E.createElement("div").style,nt={};function rt(e){var t=k.cssProps[e]||nt[e];return t||(e in tt?e:nt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=et.length;n--;)if((e=et[n]+t)in tt)return e}(e)||e)}var it=/^(none|table(?!-c[ea]).+)/,ot=/^--/,st={position:"absolute",visibility:"hidden",display:"block"},at={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function lt(e,t,n,r,i,o){var s="width"===t?1:0,a=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=k.css(e,n+re[s],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[s],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[s]+"Width",!0,i))):(u+=k.css(e,"padding"+re[s],!0,i),"padding"!==n?u+=k.css(e,"border"+re[s]+"Width",!0,i):a+=k.css(e,"border"+re[s]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u}function ct(e,t,n){var r=Ge(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,s=Ke(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(s)){if(!n)return s;s="auto"}return(!y.boxSizingReliable()&&i||"auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+lt(e,t,n||(i?"border":"content"),o,r,s)+"px"}function ft(e,t,n,r,i){return new ft.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ke(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=V(t),u=ot.test(t),l=e.style;if(u||(t=rt(a)),s=k.cssHooks[t]||k.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,s,a=V(t);return ot.test(t)||(t=rt(a)),(s=k.cssHooks[t]||k.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ke(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!it.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,u,n):ae(e,st,function(){return ct(e,u,n)})},set:function(e,t,n){var r,i=Ge(e),o=!y.scrollboxSize()&&"absolute"===i.position,s=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),a=n?lt(e,u,n,s,i):0;return s&&o&&(a-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-lt(e,u,"border",!1,i)-.5)),a&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),ut(0,t,a)}}}),k.cssHooks.marginLeft=Ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ke(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=ut)}),k.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Ge(e),i=t.length;s<i;s++)o[t[s]]=k.css(e,t[s],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=ft).prototype={constructor:ft,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ft.propHooks._default.set(this),this}}).init.prototype=ft.prototype,(ft.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[rt(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=ft.prototype.init,k.fx.step={};var pt,dt,ht,gt,vt=/^(?:toggle|show|hide)$/,mt=/queueHooks$/;function yt(){dt&&(!1===E.hidden&&T.requestAnimationFrame?T.requestAnimationFrame(yt):T.setTimeout(yt,k.fx.interval),k.fx.tick())}function xt(){return T.setTimeout(function(){pt=void 0}),pt=Date.now()}function bt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function wt(e,t,n){for(var r,i=(Ct.tweeners[t]||[]).concat(Ct.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function Ct(o,e,t){var n,s,r=0,i=Ct.prefilters.length,a=k.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var e=pt||xt(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return a.notifyWith(o,[l,n,t]),n<1&&i?t:(i||a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l]),!1)},l=a.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:pt||xt(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(s)return this;for(s=!0;t<n;t++)l.tweens[t].run(1);return e?(a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l,e])):a.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=k.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=Ct.prefilters[r].call(l,o,c,l.opts))return x(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,wt,l),x(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(Ct,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=x(e)?(t=e,["*"]):e.match(P)).length;r<i;r++)n=e[r],Ct.tweeners[n]=Ct.tweeners[n]||[],Ct.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ue(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(s=k._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,k.queue(e,"fx").length||s.empty.fire()})})),t)if(i=t[r],vt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Y.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=wt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?Ct.prefilters.unshift(e):Ct.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||x(e)&&e,duration:e,easing:n&&t||t&&!x(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){x(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){function i(){var e=Ct(this,k.extend({},t),s);(o||Y.get(this,"finish"))&&e.stop(!0)}var o=k.isEmptyObject(t),s=k.speed(e,n,r);return i.finish=i,o||!1===s.queue?this.each(i):this.queue(s.queue,i)},stop:function(i,e,o){function s(e){var t=e.stop;delete e.stop,t(o)}return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&s(r[t]);else for(t in r)r[t]&&r[t].stop&&mt.test(t)&&s(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var e,t=Y.get(this),n=t[s+"queue"],r=t[s+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,s,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===s&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(bt(r,!0),e,t,n)}}),k.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(pt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),pt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){dt||(dt=!0,yt())},k.fx.stop=function(){dt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=T.setTimeout(e,r);t.stop=function(){T.clearTimeout(n)}})},ht=E.createElement("input"),gt=E.createElement("select").appendChild(E.createElement("option")),ht.type="checkbox",y.checkOn=""!==ht.value,y.optSelected=gt.selected,(ht=E.createElement("input")).value="t",ht.type="radio",y.radioValue="t"===ht.value;var Tt,Et=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return B(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?Tt:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Tt={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var s=Et[t]||k.find.attr;Et[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=Et[o],Et[o]=r,r=null!=s(e,t,n)?o:null,Et[o]=i),r}});var kt=/^(?:input|select|textarea|button)$/i,Nt=/^(?:a|area)$/i;function St(e){return(e.match(P)||[]).join(" ")}function jt(e){return e.getAttribute&&e.getAttribute("class")||""}function Dt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}k.fn.extend({prop:function(e,t){return B(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).addClass(t.call(this,e,jt(this)))});if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,s,a,u=0;if(x(t))return this.each(function(e){k(this).removeClass(t.call(this,e,jt(this)))});if(!arguments.length)return this.attr("class","");if((e=Dt(t)).length)for(;n=this[u++];)if(i=jt(n),r=1===n.nodeType&&" "+St(i)+" "){for(s=0;o=e[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(a=St(r))&&n.setAttribute("class",a)}return this},toggleClass:function(i,t){var o=typeof i,s="string"==o||Array.isArray(i);return"boolean"==typeof t&&s?t?this.addClass(i):this.removeClass(i):x(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,jt(this),t),t)}):this.each(function(){var e,t,n,r;if(s)for(t=0,n=k(this),r=Dt(i);e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!=o||((e=jt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+St(jt(n))+" ").indexOf(t))return!0;return!1}});var At=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=x(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(At,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:St(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(t=k(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),s=i.length;s--;)((r=i[s]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in T;function Lt(e){e.stopPropagation()}var qt=/^(?:focusinfocus|focusoutblur)$/;k.extend(k.event,{trigger:function(e,t,n,r){var i,o,s,a,u,l,c,f,p=[n||E],d=m.call(e,"type")?e.type:e,h=m.call(e,"namespace")?e.namespace.split("."):[];if(o=f=s=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!qt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!g(n)){for(a=c.delegateType||d,qt.test(a+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(n.ownerDocument||E)&&p.push(s.defaultView||s.parentWindow||T)}for(i=0;(o=p[i++])&&!e.isPropagationStopped();)f=o,e.type=1<i?a:c.bindType||d,(l=(Y.get(o,"events")||{})[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&x(n[d])&&!g(n)&&((s=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Lt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Lt),k.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){function i(e){k.event.simulate(r,e.target,k.event.fix(e))}k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var _t=T.location,Ot=Date.now(),Ht=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Pt=/\[\]$/,Rt=/\r?\n/g,Mt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Wt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Pt.test(n)?i(n,t):Wt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Wt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){function n(e,t){var n=x(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)}var r,i=[];if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){n(this.name,this.value)});else for(r in e)Wt(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&It.test(this.nodeName)&&!Mt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}});var Ft=/%20/g,$t=/#.*$/,Bt=/([?&])_=[^&]*/,zt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ut=/^(?:GET|HEAD)$/,Xt=/^\/\//,Vt={},Gt={},Qt="*/".concat("*"),Yt=E.createElement("a");function Jt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(x(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Kt(t,i,o,s){var a={},u=t===Gt;function l(e){var r;return a[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,s);return"string"!=typeof n||u||a[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!a["*"]&&l("*")}function Zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Yt.href=_t.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Zt(Zt(e,k.ajaxSettings),t):Zt(k.ajaxSettings,e)},ajaxPrefilter:Jt(Vt),ajaxTransport:Jt(Gt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),m=v.context||v,y=v.context&&(m.nodeType||m.jquery)?k(m):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},s={},a={},u="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n)for(n={};t=zt.exec(p);)n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=a[e.toLowerCase()]=a[e.toLowerCase()]||e,s[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)C.always(e[C.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(C),v.url=((e||v.url||_t.href)+"").replace(Xt,_t.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Yt.protocol+"//"+Yt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),Kt(Vt,v,t,C),h)return C;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ut.test(v.type),f=v.url.replace($t,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Ft,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Ht.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Bt,"$1"),o=(Ht.test(f)?"&":"?")+"_="+Ot+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&C.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&C.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&C.setRequestHeader("Content-Type",v.contentType),C.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Qt+"; q=0.01":""):v.accepts["*"]),v.headers)C.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(m,C,v)||h))return C.abort();if(u="abort",b.add(v.complete),C.done(v.success),C.fail(v.error),c=Kt(Gt,v,t,C)){if(C.readyState=1,g&&y.trigger("ajaxSend",[C,v]),h)return C;v.async&&0<v.timeout&&(d=T.setTimeout(function(){C.abort("timeout")},v.timeout));try{h=!1,c.send(s,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,s,a,u,l=t;h||(h=!0,d&&T.clearTimeout(d),c=void 0,p=r||"",C.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,C,n)),a=function(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,a,C,i),i?(v.ifModified&&((u=C.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=C.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=a.state,o=a.data,i=!(s=a.error))):(s=l,!e&&l||(l="error",e<0&&(e=0))),C.status=e,C.statusText=(t||l)+"",i?x.resolveWith(m,[o,l,C]):x.rejectWith(m,[C,l,s]),C.statusCode(w),w=void 0,g&&y.trigger(i?"ajaxSuccess":"ajaxError",[C,v,i?o:s]),b.fireWith(m,[C,l]),g&&(y.trigger("ajaxComplete",[C,v]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return x(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(x(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return x(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=x(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var en={0:200,1223:204},tn=k.ajaxSettings.xhr();y.cors=!!tn&&"withCredentials"in tn,y.ajax=tn=!!tn,k.ajaxTransport(function(i){var o,s;if(y.cors||tn&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=s=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(en[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),s=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=s:r.onreadystatechange=function(){4===r.readyState&&T.setTimeout(function(){o&&s()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var nn,rn=[],on=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=rn.pop()||k.expando+"_"+Ot++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(on.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&on.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=x(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(on,"$1"+r):!1!==e.jsonp&&(e.url+=(Ht.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=T[r],T[r]=function(){o=arguments},n.always(function(){void 0===i?k(T).removeProp(r):T[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,rn.push(r)),o&&x(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((nn=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===nn.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1<a&&(r=St(e.slice(a)),e=e.slice(0,a)),x(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(s=(r=c.position()).top,r.left):(s=parseFloat(o)||0,parseFloat(u)||0),x(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return B(this,function(e,t,n){var r;if(g(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=Ze(y.pixelPosition,function(e,t){if(t)return t=Ke(e,n),Ve.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(s,a){k.each({padding:"inner"+s,content:a,"":"outer"+s},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return g(e)?0===o.indexOf("outer")?e["inner"+s]:e.document.documentElement["client"+s]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+s],r["scroll"+s],e.body["offset"+s],r["offset"+s],r["client"+s])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},a,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),x(e))return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=j,k.isFunction=x,k.isWindow=g,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var sn=T.jQuery,an=T.$;return k.noConflict=function(e){return T.$===k&&(T.$=an),e&&T.jQuery===k&&(T.jQuery=sn),k},e||(T.jQuery=T.$=k),k}),function(e){"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(c){var i,n=0,a=Array.prototype.slice;return c.cleanData=(i=c.cleanData,function(e){var t,n,r;for(r=0;null!=(n=e[r]);r++)try{(t=c._data(n,"events"))&&t.remove&&c(n).triggerHandler("remove")}catch(e){}i(e)}),c.widget=function(e,n,t){var r,i,o,s={},a=e.split(".")[0],u=a+"-"+(e=e.split(".")[1]);return t||(t=n,n=c.Widget),c.isArray(t)&&(t=c.extend.apply(null,[{}].concat(t))),c.expr[":"][u.toLowerCase()]=function(e){return!!c.data(e,u)},c[a]=c[a]||{},r=c[a][e],i=c[a][e]=function(e,t){if(!this._createWidget)return new i(e,t);arguments.length&&this._createWidget(e,t)},c.extend(i,r,{version:t.version,_proto:c.extend({},t),_childConstructors:[]}),(o=new n).options=c.widget.extend({},o.options),c.each(t,function(t,r){function i(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}c.isFunction(r)?s[t]=function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=o,e=r.apply(this,arguments),this._super=t,this._superApply=n,e}:s[t]=r}),i.prototype=c.widget.extend(o,{widgetEventPrefix:r&&o.widgetEventPrefix||e},s,{constructor:i,namespace:a,widgetName:e,widgetFullName:u}),r?(c.each(r._childConstructors,function(e,t){var n=t.prototype;c.widget(n.namespace+"."+n.widgetName,i,t._proto)}),delete r._childConstructors):n._childConstructors.push(i),c.widget.bridge(e,i),i},c.widget.extend=function(e){for(var t,n,r=a.call(arguments,1),i=0,o=r.length;i<o;i++)for(t in r[i])n=r[i][t],r[i].hasOwnProperty(t)&&void 0!==n&&(c.isPlainObject(n)?e[t]=c.isPlainObject(e[t])?c.widget.extend({},e[t],n):c.widget.extend({},n):e[t]=n);return e},c.widget.bridge=function(o,t){var s=t.prototype.widgetFullName||o;c.fn[o]=function(n){var e="string"==typeof n,r=a.call(arguments,1),i=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=c.data(this,s);return"instance"===n?(i=t,!1):t?c.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,r))!==t&&void 0!==e?(i=e&&e.jquery?i.pushStack(e.get()):e,!1):void 0:c.error("no such method '"+n+"' for "+o+" widget instance"):c.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):i=void 0:(r.length&&(n=c.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=c.data(this,s);e?(e.option(n||{}),e._init&&e._init()):c.data(this,s,new t(n,this))})),i}},c.Widget=function(){},c.Widget._childConstructors=[],c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=c(t||this.defaultElement||this)[0],this.element=c(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=c(),this.hoverable=c(),this.focusable=c(),this.classesElementLookup={},t!==this&&(c.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=c(t.style?t.ownerDocument:t.document||t),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this.options=c.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){var n=this;this._destroy(),c.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:c.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,o=e;if(0===arguments.length)return c.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(r=o[e]=c.widget.extend({},this.options[e]),i=0;i<n.length-1;i++)r[n[i]]=r[n[i]]||{},r=r[n[i]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];o[e]=t}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,r;for(t in e)r=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&r&&r.length&&(n=c(r.get()),this._removeClass(r,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(i){var o=[],s=this;function e(e,t){var n,r;for(r=0;r<e.length;r++)n=s.classesElementLookup[e[r]]||c(),n=i.add?c(c.unique(n.get().concat(i.element.get()))):c(n.not(i.element).get()),s.classesElementLookup[e[r]]=n,o.push(e[r]),t&&i.classes[e[r]]&&o.push(i.classes[e[r]])}return i=c.extend({element:this.element,classes:this.options.classes||{}},i),this._on(i.element,{remove:"_untrackClassesElement"}),i.keys&&e(i.keys.match(/\S+/g)||[],!0),i.extra&&e(i.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(n){var r=this;c.each(r.classesElementLookup,function(e,t){-1!==c.inArray(n.target,t)&&(r.classesElementLookup[e]=c(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,o={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return o.element.toggleClass(this._classes(o),r),this},_on:function(s,a,e){var u,l=this;"boolean"!=typeof s&&(e=a,a=s,s=!1),e?(a=u=c(a),this.bindings=this.bindings.add(a)):(e=a,a=this.element,u=this.widget()),c.each(e,function(e,t){function n(){if(s||!0!==l.options.disabled&&!c(this).hasClass("ui-state-disabled"))return("string"==typeof t?l[t]:t).apply(l,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||c.guid++);var r=e.match(/^([\w:-]*)\s*(.*)$/),i=r[1]+l.eventNamespace,o=r[2];o?u.on(i,o,n):a.on(i,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=c(this.bindings.not(e).get()),this.focusable=c(this.focusable.not(e).get()),this.hoverable=c(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(c(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(c(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(c(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var r,i,o=this.options[e];if(n=n||{},(t=c.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],i=t.originalEvent)for(r in i)r in t||(t[r]=i[r]);return this.element.trigger(t,n),!(c.isFunction(o)&&!1===o.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},c.each({show:"fadeIn",hide:"fadeOut"},function(o,s){c.Widget.prototype["_"+o]=function(t,e,n){var r;"string"==typeof e&&(e={effect:e});var i=e?!0===e||"number"==typeof e?s:e.effect||s:o;"number"==typeof(e=e||{})&&(e={duration:e}),r=!c.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),r&&c.effects&&c.effects.effect[i]?t[o](e):i!==o&&t[i]?t[i](e.duration,e.easing,n):t.queue(function(e){c(this)[o](),n&&n.call(t[0]),e()})}}),c.widget}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(d){var r=/\+/g;function h(e){return v.raw?e:encodeURIComponent(e)}function g(e,t){var n=v.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(r," ")),v.json?JSON.parse(e):e}catch(e){}}(e);return d.isFunction(t)?t(n):n}var v=d.cookie=function(e,t,n){if(void 0!==t&&!d.isFunction(t)){if("number"==typeof(n=d.extend({},v.defaults,n)).expires){var r=n.expires,i=n.expires=new Date;i.setTime(+i+864e5*r)}return document.cookie=[h(e),"=",function(e){return h(v.json?JSON.stringify(e):String(e))}(t),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var o,s=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],u=0,l=a.length;u<l;u++){var c=a[u].split("="),f=(o=c.shift(),v.raw?o:decodeURIComponent(o)),p=c.join("=");if(e&&e===f){s=g(p,t);break}e||void 0===(p=g(p))||(s[f]=p)}return s};v.defaults={},d.removeCookie=function(e,t){return void 0!==d.cookie(e)&&(d.cookie(e,"",d.extend({},t,{expires:-1})),!d.cookie(e))}}); diff --git a/manifest.appcache b/manifest.appcache index c3f731c..059e0c1 100644 --- a/manifest.appcache +++ b/manifest.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Version 8.0.4-dev.0 +# Version 9.0.0-dev.0 / dist/jquery.uhr.base.min.js diff --git a/package-lock.json b/package-lock.json index 52c4d33..7002adf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "uhr", - "version": "8.0.4-dev.0", + "version": "9.0.0-dev.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1d7c7f8..210103f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uhr", - "version": "8.0.4-dev.0", + "version": "9.0.0-dev.0", "description": "jQuery QLOCKTWO plugin", "keywords": [ "jquery-plugin", -- 2.49.0 From dd8356861fd38bd418baf9300879138d474bd89e Mon Sep 17 00:00:00 2001 From: Manuel Friedli <manuel@fritteli.ch> Date: Sat, 4 May 2019 00:21:38 +0200 Subject: [PATCH 10/10] Make the test less strict. --- test/test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index df22522..6fdb167 100644 --- a/test/test.js +++ b/test/test.js @@ -95,8 +95,10 @@ suite('Bärneruhr', function () { language: 'klingon' }); uhr = elem.uhr('instance'); - // NB: 'de' is just the first language that is included in the page. that may change! - assert.equal(uhr.options.language, 'de'); + // The 'uhr' element must be created, and a fall-back language must have been selected + assert.isTrue(!!uhr); + assert.isTrue(!!uhr.options.language); + assert.notEqual(uhr.options.language, 'klingon'); }); test('unknown theme', function () { -- 2.49.0