From de7661dc25d029a8bf4c3d1bff2000dd6e14b8a9 Mon Sep 17 00:00:00 2001 From: hmartinez85 <34453480+hmartinez85@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:17:43 +0200 Subject: [PATCH] cambiar rup base --- x21aStatics/WebContent/rup/js/rup.js | 2 +- x21aStatics/WebContent/rup/js/rup.min.js | 2 +- x21aStatics/WebContent/rup/js/src/rup.base.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x21aStatics/WebContent/rup/js/rup.js b/x21aStatics/WebContent/rup/js/rup.js index cd9739bbb..e94f2e579 100644 --- a/x21aStatics/WebContent/rup/js/rup.js +++ b/x21aStatics/WebContent/rup/js/rup.js @@ -8392,7 +8392,7 @@ eval("/* WEBPACK VAR INJECTION */(function($) {var __WEBPACK_AMD_DEFINE_FACTORY_ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("/* WEBPACK VAR INJECTION */(function(jQuery, global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/* jshint -W054 */\n\n/* eslint-disable no-useless-escape */\n\n/*!\r\n * Copyright 2013 E.J.I.E., S.A.\r\n *\r\n * Licencia con arreglo a la EUPL, Versión 1.1 exclusivamente (la «Licencia»);\r\n * Solo podrá usarse esta obra si se respeta la Licencia.\r\n * Puede obtenerse una copia de la Licencia en\r\n *\r\n * http://ec.europa.eu/idabc/eupl.html\r\n *\r\n * Salvo cuando lo exija la legislación aplicable o se acuerde por escrito,\r\n * el programa distribuido con arreglo a la Licencia se distribuye «TAL CUAL»,\r\n * SIN GARANT�?AS NI CONDICIONES DE NINGÚN TIPO, ni expresas ni implícitas.\r\n * Véase la Licencia en el idioma concreto que rige los permisos y limitaciones\r\n * que establece la Licencia.\r\n */\n\n/*global define */\n\n/*global jQuery */\n(function (factory) {\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./rup.utils */ \"./src/rup.utils.js\"), __webpack_require__(/*! ./adapter/rup.adapter */ \"./src/adapter/rup.adapter.js\"), __webpack_require__(/*! ./external/modernizr */ \"./src/external/modernizr.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {}\n})(function ($) {\n // NO MODIFICAR: (AUTOGENERADO)\n var rup_version = '4.4.0';\n jQuery.migrateMute = true;\n global.initRupI18nPromise = jQuery.Deferred();\n /**\r\n * jQuery definition to anchor JsDoc comments.\r\n *\r\n * @see http://jquery.com/\r\n * @name jQuery\r\n * @namespace jQuery\r\n */\n\n /**\r\n * jQuery object type\r\n * @namespace jQuery.rup\r\n * @memberOf jQuery\r\n */\n\n /**\r\n * The built in string object.\r\n * @external String\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String|String}\r\n */\n\n /**\r\n * The File interface provides information about files and allows to access their content.\r\n * @typedef File\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File|File}\r\n */\n\n /**\r\n * A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.\r\n * @typedef Blob\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob|Blob}\r\n */\n\n /**\r\n * jQuery object type.\r\n * @typedef {object} jQuery\r\n */\n\n /**\r\n * Selector de jQuery para referenciar elementos del DOM.\r\n * @typedef {object} Selector\r\n * @see {@link http://api.jquery.com/Types/#Selector|Selector}\r\n */\n\n /**\r\n * jQuery Event type object.\r\n * @typedef {object} Event\r\n */\n\n /**\r\n * Elemento del Document Object Model (DOM).\r\n * @typedef {object} Element\r\n */\n\n /**\r\n * Tipo de dato entero.\r\n * @typedef {number} Integer\r\n */\n // [Ajuste para IE] función asociada a deficiencias de IE(msie). Cuando se deje de soportar este navegador, hay que eliminar este polyfill\n\n if (!String.prototype.includes) {\n //To check browser supports or not\n String.prototype.includes = function (str) {\n //Add method includes to String type\n var returnValue = false;\n\n if (this.indexOf(str) !== -1) {\n returnValue = true;\n }\n\n return returnValue;\n };\n }\n\n String.prototype.capitalize = function () {\n return this.charAt(0).toUpperCase() + this.slice(1);\n };\n\n $.extend({\n set_uda_ajax_mode_on: function set_uda_ajax_mode_on() {\n // En caso de que la función $.ajax no haya sido sustituida aún.\n if ($.ajax !== $.rup_ajax) {\n // Almacenamos la función original $.ajax en $.ajaxUDA para poder restablecerla posteriormente.\n $.ajaxUDA = $.ajax; // Sustituimos la función $.ajax por la función $.rup_ajax.\n\n $.ajax = $.rup_ajax;\n }\n },\n // Llamada ajax utilizada por los componentes RUP\n rup_ajax: function rup_ajax(options) {\n // Configuracion por defecto\n var defaults = {\n cache: false,\n error: null\n },\n rup_ajax_settings = $.extend({}, defaults, options),\n error_default,\n error_user,\n complete_user,\n complete_default; // Callback de error especificado en la llamada a rup_ajax\n\n error_user = rup_ajax_settings.error; // Funcion error generica\n\n error_default = function error_default(xhr, textStatus, errorThrown) {\n var errorText = $.rup.rupAjaxDefaultError(xhr, textStatus, errorThrown); // Si se ha producido un error de los tratados lo mostramos\n\n if (error_user != null) {\n $(error_user(xhr, textStatus, errorThrown));\n } else {\n if (errorText) {\n $.rup.showErrorToUser(errorText);\n }\n }\n }; // Callback de error especificado en la llamada a rup_ajax\n\n\n complete_user = rup_ajax_settings.complete; // Function complete generica\n\n complete_default = function complete_default(xhr, textStatus) {\n // Restablecemos la función $.ajax original.\n if ($.ajax === $.rup_ajax && $.ajaxUDA !== $.rup_ajax) {\n $.ajax = $.ajaxUDA;\n } // Se ejecuta el callback complete especificado por el usuario.\n\n\n if (complete_user != null) {\n complete_user(xhr, textStatus);\n }\n }; // Asociamos las funciones a las propiedades que van a utilizarse en la peticion AJAX\n\n\n rup_ajax_settings.complete = complete_default;\n rup_ajax_settings.error = error_default; //Se valida la presencia de portal y, llegados al caso, se adecuan las llamadas ajax para trabajar con portales\n\n rup_ajax_settings.url = $.rup_utils.setNoPortalParam(rup_ajax_settings.url); // Se realiza la llamada ajax\n\n if (typeof $.ajaxUDA === 'function') {\n return $.ajaxUDA(rup_ajax_settings);\n } else {\n return $.ajax(rup_ajax_settings);\n }\n }\n }); //Se crea el objeto base, que alberga toda la metódica y gestión de los componentes RUP, dentro de la jerarquía de JQuery\n\n $.rup = $.rup || {};\n $.extend($.rup, {\n _uaMatch: function _uaMatch(ua) {\n ua = ua.toLowerCase();\n var match = /(chrome)[ \\/]([\\w.]+)/.exec(ua) || /(webkit)[ \\/]([\\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) || [];\n return {\n browser: match[1] || '',\n version: match[2] || '0'\n };\n }\n });\n\n var matched = $.rup._uaMatch(navigator.userAgent);\n\n var browser = {};\n\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = matched.version;\n } // Chrome is Webkit, but Webkit is also Safari.\n\n\n if (browser.chrome) {\n browser.webkit = true;\n } else if (browser.webkit) {\n browser.safari = true;\n }\n\n $.rup._browser = browser;\n $.browser = browser;\n $.extend($.rup, {\n i18n: {},\n appResources: {},\n //fichero de recursos de la aplicacion\n lang: null,\n version: rup_version,\n //Funcion que rupera el idioma del navegador por defecto\n getBrowserLenguage: function getBrowserLenguage() {\n return (navigator.language || navigator.userLanguage).split('-')[0].toLowerCase();\n },\n browser: {\n version: $.rup._browser.version,\n versionNumber: $.rup_utils.isNumeric($.rup._browser.version) ? parseInt($.rup._browser.version) : undefined,\n isIE: /Trident\\//.test(navigator.userAgent),\n isSafari: $.rup._browser.safari && $.rup._browser.webkit ? true : false,\n isChrome: $.rup._browser.safari && $.rup._browser.webkit ? true : false,\n isFF: $.rup._browser.mozilla ? true : false,\n isOpera: $.rup._browser.opera ? true : false,\n xhrFileUploadSupport: new XMLHttpRequest().upload !== undefined ? true : false\n },\n\n /**********/\n\n /** i18n **/\n\n /**********/\n //Funcion encargada de recargar, segun idioma definido en rup.lang, los literales a presentar en la pagina\n setLiterals: function setLiterals(lang) {\n if (lang !== undefined && lang !== null && lang !== '') {\n $.rup.lang = lang;\n } //Peticion ajax destinada a cargar el fichero JSon de literales\n\n\n return $.rup_ajax({\n url: $.rup.RUP + '/resources/rup.i18n_' + $.rup.lang + '.json',\n dataType: 'json',\n type: 'GET',\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //Se cargan los literales generales de la aplicacion en RUP\n $.rup.i18n.base = data; //Se cargan los literales de la tabla por separado (consecuencia de la naturalza de JqGrid)\n\n $.jgrid = {};\n $.extend($.jgrid, data.rup_jqtable);\n $.jgrid.formatter.date.S = new Function('j', data.rup_jqtable.formatter.date.S);\n },\n error: function error(XMLHttpRequest, textStatus) {\n //tratamiento de error\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.i18nRupJsonParseError', textStatus, textStatus, XMLHttpRequest.status, XMLHttpRequest.statusText));\n }\n });\n },\n //Funcion encargada de cargar el fichero i18n de la aplicación (síncrono)\n getFile_i18n: function getFile_i18n() {\n //Peticion ajax destinada a devolver el fichero JSON indicado\n return $.rup_ajax({\n url: $.rup.APP_STATICS + '/resources/' + $.rup.WAR_NAME + '.i18n_' + $.rup.lang + '.json',\n dataType: 'json',\n type: 'GET',\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //se carga la respuesta del servidor en la estructura I18n de RUP\n $.rup.i18n.app = data;\n },\n error: function error(XMLHttpRequest, textStatus) {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.i18nAppJsonParseError', textStatus, textStatus, XMLHttpRequest.status, XMLHttpRequest.statusText));\n }\n });\n },\n //Funcion encargada de cargar el fichero de la aplicación especificado (síncrono)\n getFile: function getFile(file) {\n if (file === undefined && file === null && file === '') {\n $.rup.errorGestor('No se ha definido el fichero a cargar');\n } else {\n if (!$.rup.i18n[file]) {\n //Peticion ajax destinada a devolver el fichero JSON indicado\n $.rup_ajax({\n url: $.rup.APP_STATICS + '/resources/' + file + '.json',\n dataType: 'json',\n type: 'GET',\n async: false,\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //se carga la respuesta del servidor en la estructura I18n de RUP\n $.rup.i18n[file] = data;\n },\n error: function error(XMLHttpRequest, textStatus, errorThrown) {\n $.rup.errorGestor('Se ha producido un error en el parseo del fichero JSON de la aplicación => ' + textStatus + '.
' + 'Error devuelto:
' + errorThrown);\n }\n });\n }\n }\n },\n\n /**\r\n * Método encargado de devolver el literal obtenido de estructura JSON (en caso de error devuelve el recurso establecido por defecto).\r\n *\r\n * @method i18nParse\r\n * @param {Object.} properties - Objeto que contiene el recurso idiomático a obtener.\r\n * @param {string} i18nCaption - Clave del recurso a obtener.\r\n * @param {string} defaultValue - Valor por defecto a usar cuando no se pueda devolver el recurso solicitado.\r\n * @return {string} Recurso idiomático.\r\n */\n i18nParse: function i18nParse(properties, i18nCaption) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Error';\n\n if (i18nCaption !== undefined && i18nCaption !== null && i18nCaption !== '') {\n var i18nCaptionArr = i18nCaption.split('.'),\n i18nValue = properties;\n\n for (var i = 0; i < i18nCaptionArr.length; i++) {\n //Navegar por las ramas JSON\n if (!$.isEmptyObject(i18nValue)) {\n i18nValue = i18nValue[i18nCaptionArr[i]]; //Existe objeto -> navegar\n } else {\n if (defaultValue === undefined || defaultValue === null || defaultValue === '') {\n i18nValue = i18nCaption; //No existe objeto -> devolver clave\n } else {\n i18nValue = defaultValue; //No existe objeto -> devolver valor recibido por parametro\n }\n\n break;\n }\n }\n\n return i18nValue == undefined ? i18nCaption : i18nValue;\n } else {\n return 'null_i18nCaption'; //retorno si no se recibe clave a buscar\n }\n },\n\n /**\r\n * Método encargado de devolver el literal obtenido de estructura JSON (en caso de error devuelve el recurso establecido por defecto).\r\n *\r\n * @method i18nTemplate\r\n * @param {Object.} properties - Objeto que contiene el recurso idiomático a procesar.\r\n * @param {string} i18nCaption - Clave del recurso a procesar.\r\n * @return {string} Recurso idiomático.\r\n */\n i18nTemplate: function i18nTemplate(properties, i18nCaption) {\n var template = jQuery.rup.i18nParse(properties, i18nCaption),\n args = $.makeArray(arguments).slice(2);\n\n if (template === undefined) {\n template = '';\n }\n\n return template.replace(/\\{(\\d+)\\}/g, function (m, i) {\n return args[i];\n });\n },\n\n /**********/\n //Funcion encargada de presentar los errores\n errorGestor: function errorGestor(message) {\n var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $.rup.i18nParse($.rup.i18n.base, 'rup_global.developerError');\n $.rup_messages('msgError', {\n title: title,\n message: '

' + message + '

'\n });\n throw message;\n },\n //Funcion encargada de hacer las inicializaciones basicas de RUP\n iniRup: function iniRup() {\n //Inicializar variables de ficheros de recuros (rup y app)\n $.rup.i18n.app = {};\n $.rup.i18n.base = {}; //retrocompatibilidad\n\n if (!window.LOCALE_COOKIE_NAME) {\n window.LOCALE_COOKIE_NAME = 'language';\n }\n\n if (!window.LOCALE_PARAM_NAME) {\n window.LOCALE_PARAM_NAME = 'locale';\n } //Se cargan las variables generales del servidor (convertir variables js a variables internas de rup)\n\n\n $.rup.APP_RESOURCES = window.APP_RESOURCES;\n $.rup.APP_STATICS = window.STATICS + '/' + window.APP_RESOURCES;\n $.rup.CTX_PATH = window.CTX_PATH;\n $.rup.RUP = window.RUP;\n $.rup.STATICS = window.STATICS;\n $.rup.WAR_NAME = window.WAR_NAME; //model\n\n $.rup.AVAILABLE_LANGS = window.AVAILABLE_LANGS;\n $.rup.AVAILABLE_LANGS_ARRAY = $.map($.rup.AVAILABLE_LANGS.split(','), function (elem) {\n return elem.replace(/^\\s*|\\s*$/g, '');\n });\n $.rup.DEFAULT_LANG = window.DEFAULT_LANG;\n $.rup.LAYOUT = window.LAYOUT; //mvc-config.xml\n\n $.rup.LOCALE_COOKIE_NAME = window.LOCALE_COOKIE_NAME;\n $.rup.LOCALE_PARAM_NAME = window.LOCALE_PARAM_NAME; //metodos http permitidos en la emulacion xhr para el uso con iframes\n\n $.rup.IFRAME_ONLY_SUPPORTED_METHODS = ['GET', 'POST']; //Auditoria\n\n if (window.AUDIT_PATH) {\n $.rup.AUDIT_PATH = window.AUDIT_PATH;\n } else {\n if ($.rup.CTX_PATH[$.rup.CTX_PATH.length - 1] === '/') {\n $.rup.AUDIT_PATH = $.rup.CTX_PATH + 'audit';\n } else {\n $.rup.AUDIT_PATH = $.rup.CTX_PATH + '/audit';\n }\n }\n\n if (window.IS_EJIE) {\n $.rup.IS_EJIE = window.IS_EJIE;\n } else {\n $.rup.IS_EJIE = false;\n } //Borrar las variables javascript externas\n // delete APP_RESOURCES;\n // delete CTX_PATH;\n // delete RUP;\n // delete STATICS;\n // delete WAR_NAME;\n //model\n // delete AVAILABLE_LANGS;\n // delete LAYOUT;\n //mvc-config.xml\n // delete LOCALE_COOKIE_NAME;\n // delete LOCALE_PARAM_NAME;\n // Obtención de la cookie de idioma.\n\n\n var cookie = $.rup_utils.get($.rup.LOCALE_COOKIE_NAME);\n var validCookieValue = $.inArray(cookie, $.rup.AVAILABLE_LANGS_ARRAY) !== -1 ? true : false;\n this.lang = validCookieValue ? cookie : $.rup.DEFAULT_LANG; // Carga de los literales por defecto.\n\n $.rup.setLiterals().then(function () {\n // Carga de ficheros de literales de la aplicación.\n if (jQuery.rup.WAR_NAME !== '') {\n $.rup.getFile_i18n().then(function () {\n global.initRupI18nPromise.resolve();\n });\n } else {\n global.initRupI18nPromise.resolve();\n }\n }); // Esperar a que los recursos idiomáticos estén disponibles.\n\n global.initRupI18nPromise.then(function () {\n // Si la cookie no es válida o no existe, se lanzarán los mensajes de error correspondientes.\n if (!validCookieValue) {\n if (cookie) {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.cookieLanguageNotSupportedError', $.rup.LOCALE_COOKIE_NAME), $.rup.i18nParse($.rup.i18n.base, 'rup_base.cookieLanguageNotSupportedErrorTitle'));\n\n $.rup._avoidRUPFails();\n\n return false;\n } else {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.cookieLanguageNotFoundError', $.rup.LOCALE_COOKIE_NAME), $.rup.i18nParse($.rup.i18n.base, 'rup_base.cookieLanguageNotFoundErrorTitle'));\n\n $.rup._avoidRUPFails();\n\n return false;\n }\n }\n });\n },\n //Función encargada de cargar variables por defecto si no se han cargado los literales (ej. cookies deshabilitadas)\n //NOTA: El que se entre en la función indica mala configuración/error en la aplicación\n _avoidRUPFails: function _avoidRUPFails() {\n //Forzar carga formato fecha si no se ha cargado (evitar fallos)\n var dateFormat = $.rup.i18nParse($.rup.i18n.base, 'rup_date.dateFormat');\n\n if (dateFormat === 'rup_date.dateFormat') {\n $.rup.i18n.base.rup_date = {\n dateFormat: 'dd/mm/yy'\n };\n }\n\n $.jgrid = {\n formatter: {\n integer: {}\n }\n };\n },\n //Método gestor de invocación de un método expuesto por un componente o la creación del mismo (asociada a la metódica de invocación y gestión de los métodos públicos de un componente)\n getAccessor: function getAccessor(obj, objName, expr) {\n if (typeof expr === 'string') {\n var fn = obj[expr];\n\n if (fn === undefined) {\n $.rup.errorGestor(objName + ' - No Existe el método \"' + expr + '\" en el patrón.');\n } else {\n return fn;\n }\n } else {\n if (typeof expr === 'function') {\n $.rup.errorGestor(objName + ' - No es posible pasar funciones al patrón.');\n }\n }\n\n return undefined;\n },\n rupAjaxDefaultError: function rupAjaxDefaultError(xhr) {\n // Evaluamos el error que se ha producido\n var errorText = null;\n\n if (xhr.status == 0) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus0');\n } else if (xhr.status == 401) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus401');\n } else if (xhr.status == 404) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus404');\n } else if (xhr.status == 500) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus500');\n } else if (xhr.status == 503) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus503');\n } //Excepción\n else if (xhr.status == 406) {\n //Código de error de UDA\n var obj = '';\n\n try {\n obj = JSON.parse(xhr.responseText);\n errorText = obj;\n } catch (error) {\n errorText = xhr.responseText;\n }\n } else if (xhr.status == 413) {\n // Error de Too Large Entity\n var _obj = '';\n\n try {\n _obj = JSON.parse(xhr.responseText);\n errorText = _obj.rupFeedback.message.label;\n } catch (error) {\n errorText = xhr.responseText;\n }\n }\n\n return errorText;\n },\n //Función encargada de crear los patrones de RUP que se alberguen en el componente de JQuery directamente\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n rupObjectConstructor: function rupObjectConstructor(name, object) {\n //Se crea el nuevo gestor del Pótron\n if ($[name] === undefined) {\n $[name] = function (opts) {\n var options = opts,\n isMethodCall = typeof options === 'string',\n args = $.makeArray(arguments).slice(1),\n returnValue = this; // prevent calls to internal methods\n\n if (isMethodCall && options.charAt(0) === '_') {\n return returnValue;\n }\n\n if (isMethodCall) {\n if (options !== 'extend') {\n var instance = $.isEmptyObject($.data(object)) ? $.data(object, object) : $.data(object),\n methodValue = instance && typeof instance[options] === \"function\" ? instance[options].apply(instance, args) : 'no-function';\n\n if (methodValue === 'no-function') {\n return false;\n } else {\n returnValue = methodValue;\n }\n } else {\n object = $.extend.apply(null, [true, object].concat(args[0]));\n }\n } else {\n var _instance = $.isEmptyObject($.data(object)) ? $.data(object, object) : $.data(object);\n\n if (_instance && object._init !== undefined && object._init !== null) {\n _instance._init($.makeArray(arguments));\n }\n }\n\n return returnValue;\n };\n }\n },\n //Funcion encargada de crear los patrones de RUP que usen el selector de JQuery.\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n rupSelectorObjectConstructor: function rupSelectorObjectConstructor(name, object) {\n //Se crea el nuevo gestor del Patrón\n if ($.fn[name] === undefined) {\n $.fn[name] = function (opts) {\n var options = opts,\n isMethodCall = typeof options === 'string',\n args = $.makeArray(arguments).slice(1),\n returnValue = this; // prevent calls to internal methods\n\n if (isMethodCall && options.charAt(0) === '_') {\n return returnValue;\n }\n\n if (isMethodCall) {\n if (options !== 'extend') {\n var instance = $.extend(this, object),\n methodValue = instance && typeof instance[options] === \"function\" ? instance[options].apply(instance, args) : 'no-function';\n\n if (methodValue === 'no-function') {\n return false;\n } else {\n returnValue = methodValue;\n }\n } else {\n object = $.fn.extend.apply(null, [true, object].concat(args[0]));\n }\n } else {\n var _instance2 = $.extend(this, object);\n\n if (_instance2 && object._init !== undefined && object._init !== null) {\n _instance2._init($.makeArray(arguments));\n }\n }\n\n return returnValue;\n };\n }\n },\n //Funcion encargada de mostrar mediante el correspondiente canal el mensaje de error.\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n showErrorToUser: function showErrorToUser(errorText) {\n if (errorText != null && errorText !== '') {\n // Se comprueba si existe un dialog visible con una region de rup_feedbak\n var dialog_feedbacks = $('.ui-dialog:visible .rup-feedback'),\n feedbacks = dialog_feedbacks.length !== 0 ? dialog_feedbacks : $('.rup-feedback'); // Se comprueba si existe un rup_feedback en la pagina\n\n if (feedbacks.length != 0) {\n var feedback_props = {\n delay: null\n },\n //Si existen rup_feedbacks cogemos el último, será el que se está mostrando.\n feedback_principal = $('#' + feedbacks[feedbacks.length - 1].id); // Mostramos el error en el feedback\n\n feedback_principal.rup_feedback('option', feedback_props);\n feedback_principal.rup_feedback('set', errorText, 'error');\n feedback_principal.rup_feedback('show');\n } else {\n // Si no hay feedback definido mostramos un mensaje\n $.rup_messages('msgError', {\n title: $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.errorTitle'),\n message: errorText\n });\n }\n }\n }\n }); //Almacenar y restaurar eventos\n\n $.fn.extend({\n storeEvents: function storeEvents() {\n this.each(function () {\n $(this).data('storedEvents', $.extend(true, {}, $._data($(this)[0], 'events')));\n });\n $(this).off();\n return this;\n },\n restoreEvents: function restoreEvents() {\n this.each(function () {\n var events = $.data(this, 'storedEvents');\n\n if (events) {\n $(this).off();\n\n for (var type in events) {\n for (var handler in events[type]) {\n if (_typeof(events[type][handler]) === 'object') {\n $.event.add(this, type, events[type][handler], events[type][handler].data);\n }\n }\n }\n }\n });\n return this;\n }\n });\n /*\r\n * EVENTOS PROPIOS\r\n * mousestop: Detecta cuando el ratón para su desplazamiento\r\n */\n\n $.fn.mousestop = {};\n $.fn.mousestop.defaults = {\n delay: 300\n };\n $.event.special.mousestop = {\n setup: function setup(data) {\n var $self = $(this);\n $self.data('mousestop', $.extend(true, {}, $.fn.mousestop.defaults, data));\n $self.on({\n 'mouseenter.rup_mousestop': mouseenterHandler,\n 'mouseleave.rup_mousestop': mouseleaveHandler,\n 'mousemove.rup_mousestop': mousemoveHandler\n });\n },\n teardown: function teardown() {\n $(this).removeData('mousestop').off('.rup_mousestop');\n }\n };\n\n function mouseenterHandler() {\n var self = this;\n clearTimeout(self.timeout);\n }\n\n function mouseleaveHandler() {\n var self = this;\n clearTimeout(self.timeout);\n }\n\n function mousemoveHandler(event) {\n var self = this,\n $self = $(this);\n clearTimeout(self.timeout);\n self.timeout = setTimeout(function () {\n $self.trigger('mousestop', event);\n }, $self.data('mousestop').delay);\n } // Control de teclas especiales Ctrl y Shift\n\n\n jQuery('body').on({\n 'keydown.rup': function keydownRup(event) {\n var $body = jQuery('body'),\n ret;\n\n switch (event.which) {\n case 16:\n if ($body.data('tmp.multiselect.shiftPressed') !== true) {\n $body.data('tmp.multiselect.shiftPressed', true);\n ret = $body.triggerHandler('rup_shiftKeyDown');\n\n if (ret === false) {\n event.preventDefault();\n return false;\n }\n }\n\n break;\n\n case 17:\n if ($body.data('tmp.multiselect.ctrlPressed') !== true) {\n $body.data('tmp.multiselect.ctrlPressed', true);\n ret = $body.triggerHandler('rup_ctrlKeyDown');\n\n if (ret === false) {\n event.preventDefault();\n return false;\n }\n }\n\n break;\n }\n },\n 'keyup.rup': function keyupRup(event) {\n var $body = jQuery('body'),\n ret;\n\n switch (event.which) {\n case 16:\n if ($body.data('tmp.multiselect.shiftPressed') !== false) {\n $body.data('tmp.multiselect.shiftPressed', false);\n ret = $body.triggerHandler('rup_shiftKeyUp');\n\n if (ret === false) {\n return false;\n }\n }\n\n break;\n\n case 17:\n if ($body.data('tmp.multiselect.ctrlPressed') !== false) {\n $body.data('tmp.multiselect.ctrlPressed', false);\n ret = $body.triggerHandler('rup_ctrlKeyUp');\n\n if (ret === false) {\n return false;\n }\n }\n\n break;\n\n case 32:\n /* Se aplicara a todos los navegadores que no sean Firefox.\r\n Este evento permite que los checkboxes puedan ser seleccionados/deseleccionados con el teclado. */\n if (typeof InstallTrigger == 'undefined' && $(event.target).is(':checkbox')) {\n event.preventDefault();\n $(event.target).prop('checked', function () {\n return !this.checked;\n });\n }\n\n break;\n }\n }\n });\n jQuery.extend($.rup, {\n isCtrlPressed: function isCtrlPressed() {\n return jQuery('body').data('tmp.multiselect.ctrlPressed') === true;\n },\n isShiftPressed: function isShiftPressed() {\n return jQuery('body').data('tmp.multiselect.shiftPressed') === true;\n }\n });\n /**\r\n * Creamos la funcion que audita el componente\r\n */\n\n function prepareAuditData(compName, auditing) {\n return {\n 'url': window.location.href,\n 'versionRup': $.rup.version,\n 'nombreComponente': compName,\n 'codApp': $.rup.APP_RESOURCES,\n 'timeStamp': Date.now(),\n 'auditing': auditing\n };\n }\n\n function ajaxAudit(jsonPost) {\n $.ajax($.rup.AUDIT_PATH, {\n method: 'POST',\n contentType: 'application/json',\n data: JSON.stringify(jsonPost)\n });\n }\n\n jQuery.extend($.rup, {\n auditComponent: function auditComponent(compName, auditing) {\n if ($.rup.IS_EJIE) {\n ajaxAudit(prepareAuditData(compName, auditing));\n }\n }\n }); //Ejemplo de extension de la funcion de inicio\n //$.extend($.rup.iniRup, console.log(\"mundo\")) ;\n //Inicializacion de las funciones de gestion de RUP en general\n\n $.rup.iniRup();\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://rup/./src/rup.base.js?"); +eval("/* WEBPACK VAR INJECTION */(function(jQuery, global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n/* jshint -W054 */\n\n/* eslint-disable no-useless-escape */\n\n/*!\r\n * Copyright 2013 E.J.I.E., S.A.\r\n *\r\n * Licencia con arreglo a la EUPL, Versión 1.1 exclusivamente (la «Licencia»);\r\n * Solo podrá usarse esta obra si se respeta la Licencia.\r\n * Puede obtenerse una copia de la Licencia en\r\n *\r\n * http://ec.europa.eu/idabc/eupl.html\r\n *\r\n * Salvo cuando lo exija la legislación aplicable o se acuerde por escrito,\r\n * el programa distribuido con arreglo a la Licencia se distribuye «TAL CUAL»,\r\n * SIN GARANT�?AS NI CONDICIONES DE NINGÚN TIPO, ni expresas ni implícitas.\r\n * Véase la Licencia en el idioma concreto que rige los permisos y limitaciones\r\n * que establece la Licencia.\r\n */\n\n/*global define */\n\n/*global jQuery */\n(function (factory) {\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./rup.utils */ \"./src/rup.utils.js\"), __webpack_require__(/*! ./adapter/rup.adapter */ \"./src/adapter/rup.adapter.js\"), __webpack_require__(/*! ./external/modernizr */ \"./src/external/modernizr.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {}\n})(function ($) {\n // NO MODIFICAR: (AUTOGENERADO)\n var rup_version = '4.5.0';\n jQuery.migrateMute = true;\n global.initRupI18nPromise = jQuery.Deferred();\n /**\r\n * jQuery definition to anchor JsDoc comments.\r\n *\r\n * @see http://jquery.com/\r\n * @name jQuery\r\n * @namespace jQuery\r\n */\n\n /**\r\n * jQuery object type\r\n * @namespace jQuery.rup\r\n * @memberOf jQuery\r\n */\n\n /**\r\n * The built in string object.\r\n * @external String\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String|String}\r\n */\n\n /**\r\n * The File interface provides information about files and allows to access their content.\r\n * @typedef File\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/File|File}\r\n */\n\n /**\r\n * A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.\r\n * @typedef Blob\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Blob|Blob}\r\n */\n\n /**\r\n * jQuery object type.\r\n * @typedef {object} jQuery\r\n */\n\n /**\r\n * Selector de jQuery para referenciar elementos del DOM.\r\n * @typedef {object} Selector\r\n * @see {@link http://api.jquery.com/Types/#Selector|Selector}\r\n */\n\n /**\r\n * jQuery Event type object.\r\n * @typedef {object} Event\r\n */\n\n /**\r\n * Elemento del Document Object Model (DOM).\r\n * @typedef {object} Element\r\n */\n\n /**\r\n * Tipo de dato entero.\r\n * @typedef {number} Integer\r\n */\n // [Ajuste para IE] función asociada a deficiencias de IE(msie). Cuando se deje de soportar este navegador, hay que eliminar este polyfill\n\n if (!String.prototype.includes) {\n //To check browser supports or not\n String.prototype.includes = function (str) {\n //Add method includes to String type\n var returnValue = false;\n\n if (this.indexOf(str) !== -1) {\n returnValue = true;\n }\n\n return returnValue;\n };\n }\n\n String.prototype.capitalize = function () {\n return this.charAt(0).toUpperCase() + this.slice(1);\n };\n\n $.extend({\n set_uda_ajax_mode_on: function set_uda_ajax_mode_on() {\n // En caso de que la función $.ajax no haya sido sustituida aún.\n if ($.ajax !== $.rup_ajax) {\n // Almacenamos la función original $.ajax en $.ajaxUDA para poder restablecerla posteriormente.\n $.ajaxUDA = $.ajax; // Sustituimos la función $.ajax por la función $.rup_ajax.\n\n $.ajax = $.rup_ajax;\n }\n },\n // Llamada ajax utilizada por los componentes RUP\n rup_ajax: function rup_ajax(options) {\n // Configuracion por defecto\n var defaults = {\n cache: false,\n error: null\n },\n rup_ajax_settings = $.extend({}, defaults, options),\n error_default,\n error_user,\n complete_user,\n complete_default; // Callback de error especificado en la llamada a rup_ajax\n\n error_user = rup_ajax_settings.error; // Funcion error generica\n\n error_default = function error_default(xhr, textStatus, errorThrown) {\n var errorText = $.rup.rupAjaxDefaultError(xhr, textStatus, errorThrown); // Si se ha producido un error de los tratados lo mostramos\n\n if (error_user != null) {\n $(error_user(xhr, textStatus, errorThrown));\n } else {\n if (errorText) {\n $.rup.showErrorToUser(errorText);\n }\n }\n }; // Callback de error especificado en la llamada a rup_ajax\n\n\n complete_user = rup_ajax_settings.complete; // Function complete generica\n\n complete_default = function complete_default(xhr, textStatus) {\n // Restablecemos la función $.ajax original.\n if ($.ajax === $.rup_ajax && $.ajaxUDA !== $.rup_ajax) {\n $.ajax = $.ajaxUDA;\n } // Se ejecuta el callback complete especificado por el usuario.\n\n\n if (complete_user != null) {\n complete_user(xhr, textStatus);\n }\n }; // Asociamos las funciones a las propiedades que van a utilizarse en la peticion AJAX\n\n\n rup_ajax_settings.complete = complete_default;\n rup_ajax_settings.error = error_default; //Se valida la presencia de portal y, llegados al caso, se adecuan las llamadas ajax para trabajar con portales\n\n rup_ajax_settings.url = $.rup_utils.setNoPortalParam(rup_ajax_settings.url); // Se realiza la llamada ajax\n\n if (typeof $.ajaxUDA === 'function') {\n return $.ajaxUDA(rup_ajax_settings);\n } else {\n return $.ajax(rup_ajax_settings);\n }\n }\n }); //Se crea el objeto base, que alberga toda la metódica y gestión de los componentes RUP, dentro de la jerarquía de JQuery\n\n $.rup = $.rup || {};\n $.extend($.rup, {\n _uaMatch: function _uaMatch(ua) {\n ua = ua.toLowerCase();\n var match = /(chrome)[ \\/]([\\w.]+)/.exec(ua) || /(webkit)[ \\/]([\\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) || [];\n return {\n browser: match[1] || '',\n version: match[2] || '0'\n };\n }\n });\n\n var matched = $.rup._uaMatch(navigator.userAgent);\n\n var browser = {};\n\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = matched.version;\n } // Chrome is Webkit, but Webkit is also Safari.\n\n\n if (browser.chrome) {\n browser.webkit = true;\n } else if (browser.webkit) {\n browser.safari = true;\n }\n\n $.rup._browser = browser;\n $.browser = browser;\n $.extend($.rup, {\n i18n: {},\n appResources: {},\n //fichero de recursos de la aplicacion\n lang: null,\n version: rup_version,\n //Funcion que rupera el idioma del navegador por defecto\n getBrowserLenguage: function getBrowserLenguage() {\n return (navigator.language || navigator.userLanguage).split('-')[0].toLowerCase();\n },\n browser: {\n version: $.rup._browser.version,\n versionNumber: $.rup_utils.isNumeric($.rup._browser.version) ? parseInt($.rup._browser.version) : undefined,\n isIE: /Trident\\//.test(navigator.userAgent),\n isSafari: $.rup._browser.safari && $.rup._browser.webkit ? true : false,\n isChrome: $.rup._browser.safari && $.rup._browser.webkit ? true : false,\n isFF: $.rup._browser.mozilla ? true : false,\n isOpera: $.rup._browser.opera ? true : false,\n xhrFileUploadSupport: new XMLHttpRequest().upload !== undefined ? true : false\n },\n\n /**********/\n\n /** i18n **/\n\n /**********/\n //Funcion encargada de recargar, segun idioma definido en rup.lang, los literales a presentar en la pagina\n setLiterals: function setLiterals(lang) {\n if (lang !== undefined && lang !== null && lang !== '') {\n $.rup.lang = lang;\n } //Peticion ajax destinada a cargar el fichero JSon de literales\n\n\n return $.rup_ajax({\n url: $.rup.RUP + '/resources/rup.i18n_' + $.rup.lang + '.json',\n dataType: 'json',\n type: 'GET',\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //Se cargan los literales generales de la aplicacion en RUP\n $.rup.i18n.base = data; //Se cargan los literales de la tabla por separado (consecuencia de la naturalza de JqGrid)\n\n $.jgrid = {};\n $.extend($.jgrid, data.rup_jqtable);\n $.jgrid.formatter.date.S = new Function('j', data.rup_jqtable.formatter.date.S);\n },\n error: function error(XMLHttpRequest, textStatus) {\n //tratamiento de error\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.i18nRupJsonParseError', textStatus, textStatus, XMLHttpRequest.status, XMLHttpRequest.statusText));\n }\n });\n },\n //Funcion encargada de cargar el fichero i18n de la aplicación (síncrono)\n getFile_i18n: function getFile_i18n() {\n //Peticion ajax destinada a devolver el fichero JSON indicado\n return $.rup_ajax({\n url: $.rup.APP_STATICS + '/resources/' + $.rup.WAR_NAME + '.i18n_' + $.rup.lang + '.json',\n dataType: 'json',\n type: 'GET',\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //se carga la respuesta del servidor en la estructura I18n de RUP\n $.rup.i18n.app = data;\n },\n error: function error(XMLHttpRequest, textStatus) {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.i18nAppJsonParseError', textStatus, textStatus, XMLHttpRequest.status, XMLHttpRequest.statusText));\n }\n });\n },\n //Funcion encargada de cargar el fichero de la aplicación especificado (síncrono)\n getFile: function getFile(file) {\n if (file === undefined && file === null && file === '') {\n $.rup.errorGestor('No se ha definido el fichero a cargar');\n } else {\n if (!$.rup.i18n[file]) {\n //Peticion ajax destinada a devolver el fichero JSON indicado\n $.rup_ajax({\n url: $.rup.APP_STATICS + '/resources/' + file + '.json',\n dataType: 'json',\n type: 'GET',\n async: false,\n contentType: 'application/x-www-form-urlencoded; charset=UTF-8',\n success: function success(data) {\n //se carga la respuesta del servidor en la estructura I18n de RUP\n $.rup.i18n[file] = data;\n },\n error: function error(XMLHttpRequest, textStatus, errorThrown) {\n $.rup.errorGestor('Se ha producido un error en el parseo del fichero JSON de la aplicación => ' + textStatus + '.
' + 'Error devuelto:
' + errorThrown);\n }\n });\n }\n }\n },\n\n /**\r\n * Método encargado de devolver el literal obtenido de estructura JSON (en caso de error devuelve el recurso establecido por defecto).\r\n *\r\n * @method i18nParse\r\n * @param {Object.} properties - Objeto que contiene el recurso idiomático a obtener.\r\n * @param {string} i18nCaption - Clave del recurso a obtener.\r\n * @param {string} defaultValue - Valor por defecto a usar cuando no se pueda devolver el recurso solicitado.\r\n * @return {string} Recurso idiomático.\r\n */\n i18nParse: function i18nParse(properties, i18nCaption) {\n var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Error';\n\n if (i18nCaption !== undefined && i18nCaption !== null && i18nCaption !== '') {\n var i18nCaptionArr = i18nCaption.split('.'),\n i18nValue = properties;\n\n for (var i = 0; i < i18nCaptionArr.length; i++) {\n //Navegar por las ramas JSON\n if (!$.isEmptyObject(i18nValue)) {\n i18nValue = i18nValue[i18nCaptionArr[i]]; //Existe objeto -> navegar\n } else {\n if (defaultValue === undefined || defaultValue === null || defaultValue === '') {\n i18nValue = i18nCaption; //No existe objeto -> devolver clave\n } else {\n i18nValue = defaultValue; //No existe objeto -> devolver valor recibido por parametro\n }\n\n break;\n }\n }\n\n return i18nValue == undefined ? i18nCaption : i18nValue;\n } else {\n return 'null_i18nCaption'; //retorno si no se recibe clave a buscar\n }\n },\n\n /**\r\n * Método encargado de devolver el literal obtenido de estructura JSON (en caso de error devuelve el recurso establecido por defecto).\r\n *\r\n * @method i18nTemplate\r\n * @param {Object.} properties - Objeto que contiene el recurso idiomático a procesar.\r\n * @param {string} i18nCaption - Clave del recurso a procesar.\r\n * @return {string} Recurso idiomático.\r\n */\n i18nTemplate: function i18nTemplate(properties, i18nCaption) {\n var template = jQuery.rup.i18nParse(properties, i18nCaption),\n args = $.makeArray(arguments).slice(2);\n\n if (template === undefined) {\n template = '';\n }\n\n return template.replace(/\\{(\\d+)\\}/g, function (m, i) {\n return args[i];\n });\n },\n\n /**********/\n //Funcion encargada de presentar los errores\n errorGestor: function errorGestor(message) {\n var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $.rup.i18nParse($.rup.i18n.base, 'rup_global.developerError');\n $.rup_messages('msgError', {\n title: title,\n message: '

' + message + '

'\n });\n throw message;\n },\n //Funcion encargada de hacer las inicializaciones basicas de RUP\n iniRup: function iniRup() {\n //Inicializar variables de ficheros de recuros (rup y app)\n $.rup.i18n.app = {};\n $.rup.i18n.base = {}; //retrocompatibilidad\n\n if (!window.LOCALE_COOKIE_NAME) {\n window.LOCALE_COOKIE_NAME = 'language';\n }\n\n if (!window.LOCALE_PARAM_NAME) {\n window.LOCALE_PARAM_NAME = 'locale';\n } //Se cargan las variables generales del servidor (convertir variables js a variables internas de rup)\n\n\n $.rup.APP_RESOURCES = window.APP_RESOURCES;\n $.rup.APP_STATICS = window.STATICS + '/' + window.APP_RESOURCES;\n $.rup.CTX_PATH = window.CTX_PATH;\n $.rup.RUP = window.RUP;\n $.rup.STATICS = window.STATICS;\n $.rup.WAR_NAME = window.WAR_NAME; //model\n\n $.rup.AVAILABLE_LANGS = window.AVAILABLE_LANGS;\n $.rup.AVAILABLE_LANGS_ARRAY = $.map($.rup.AVAILABLE_LANGS.split(','), function (elem) {\n return elem.replace(/^\\s*|\\s*$/g, '');\n });\n $.rup.DEFAULT_LANG = window.DEFAULT_LANG;\n $.rup.LAYOUT = window.LAYOUT; //mvc-config.xml\n\n $.rup.LOCALE_COOKIE_NAME = window.LOCALE_COOKIE_NAME;\n $.rup.LOCALE_PARAM_NAME = window.LOCALE_PARAM_NAME; //metodos http permitidos en la emulacion xhr para el uso con iframes\n\n $.rup.IFRAME_ONLY_SUPPORTED_METHODS = ['GET', 'POST']; //Auditoria\n\n if (window.AUDIT_PATH) {\n $.rup.AUDIT_PATH = window.AUDIT_PATH;\n } else {\n if ($.rup.CTX_PATH[$.rup.CTX_PATH.length - 1] === '/') {\n $.rup.AUDIT_PATH = $.rup.CTX_PATH + 'audit';\n } else {\n $.rup.AUDIT_PATH = $.rup.CTX_PATH + '/audit';\n }\n }\n\n if (window.IS_EJIE) {\n $.rup.IS_EJIE = window.IS_EJIE;\n } else {\n $.rup.IS_EJIE = false;\n } //Borrar las variables javascript externas\n // delete APP_RESOURCES;\n // delete CTX_PATH;\n // delete RUP;\n // delete STATICS;\n // delete WAR_NAME;\n //model\n // delete AVAILABLE_LANGS;\n // delete LAYOUT;\n //mvc-config.xml\n // delete LOCALE_COOKIE_NAME;\n // delete LOCALE_PARAM_NAME;\n // Obtención de la cookie de idioma.\n\n\n var cookie = $.rup_utils.get($.rup.LOCALE_COOKIE_NAME);\n var validCookieValue = $.inArray(cookie, $.rup.AVAILABLE_LANGS_ARRAY) !== -1 ? true : false;\n this.lang = validCookieValue ? cookie : $.rup.DEFAULT_LANG; // Carga de los literales por defecto.\n\n $.rup.setLiterals().then(function () {\n // Carga de ficheros de literales de la aplicación.\n if (jQuery.rup.WAR_NAME !== '') {\n $.rup.getFile_i18n().then(function () {\n global.initRupI18nPromise.resolve();\n });\n } else {\n global.initRupI18nPromise.resolve();\n }\n }); // Esperar a que los recursos idiomáticos estén disponibles.\n\n global.initRupI18nPromise.then(function () {\n // Si la cookie no es válida o no existe, se lanzarán los mensajes de error correspondientes.\n if (!validCookieValue) {\n if (cookie) {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.cookieLanguageNotSupportedError', $.rup.LOCALE_COOKIE_NAME), $.rup.i18nParse($.rup.i18n.base, 'rup_base.cookieLanguageNotSupportedErrorTitle'));\n\n $.rup._avoidRUPFails();\n\n return false;\n } else {\n $.rup.errorGestor($.rup.i18nTemplate($.rup.i18n.base, 'rup_base.cookieLanguageNotFoundError', $.rup.LOCALE_COOKIE_NAME), $.rup.i18nParse($.rup.i18n.base, 'rup_base.cookieLanguageNotFoundErrorTitle'));\n\n $.rup._avoidRUPFails();\n\n return false;\n }\n }\n });\n },\n //Función encargada de cargar variables por defecto si no se han cargado los literales (ej. cookies deshabilitadas)\n //NOTA: El que se entre en la función indica mala configuración/error en la aplicación\n _avoidRUPFails: function _avoidRUPFails() {\n //Forzar carga formato fecha si no se ha cargado (evitar fallos)\n var dateFormat = $.rup.i18nParse($.rup.i18n.base, 'rup_date.dateFormat');\n\n if (dateFormat === 'rup_date.dateFormat') {\n $.rup.i18n.base.rup_date = {\n dateFormat: 'dd/mm/yy'\n };\n }\n\n $.jgrid = {\n formatter: {\n integer: {}\n }\n };\n },\n //Método gestor de invocación de un método expuesto por un componente o la creación del mismo (asociada a la metódica de invocación y gestión de los métodos públicos de un componente)\n getAccessor: function getAccessor(obj, objName, expr) {\n if (typeof expr === 'string') {\n var fn = obj[expr];\n\n if (fn === undefined) {\n $.rup.errorGestor(objName + ' - No Existe el método \"' + expr + '\" en el patrón.');\n } else {\n return fn;\n }\n } else {\n if (typeof expr === 'function') {\n $.rup.errorGestor(objName + ' - No es posible pasar funciones al patrón.');\n }\n }\n\n return undefined;\n },\n rupAjaxDefaultError: function rupAjaxDefaultError(xhr) {\n // Evaluamos el error que se ha producido\n var errorText = null;\n\n if (xhr.status == 0) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus0');\n } else if (xhr.status == 401) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus401');\n } else if (xhr.status == 404) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus404');\n } else if (xhr.status == 500) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus500');\n } else if (xhr.status == 503) {\n errorText = $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.httpStatus503');\n } //Excepción\n else if (xhr.status == 406) {\n //Código de error de UDA\n var obj = '';\n\n try {\n obj = JSON.parse(xhr.responseText);\n errorText = obj;\n } catch (error) {\n errorText = xhr.responseText;\n }\n } else if (xhr.status == 413) {\n // Error de Too Large Entity\n var _obj = '';\n\n try {\n _obj = JSON.parse(xhr.responseText);\n errorText = _obj.rupFeedback.message.label;\n } catch (error) {\n errorText = xhr.responseText;\n }\n }\n\n return errorText;\n },\n //Función encargada de crear los patrones de RUP que se alberguen en el componente de JQuery directamente\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n rupObjectConstructor: function rupObjectConstructor(name, object) {\n //Se crea el nuevo gestor del Pótron\n if ($[name] === undefined) {\n $[name] = function (opts) {\n var options = opts,\n isMethodCall = typeof options === 'string',\n args = $.makeArray(arguments).slice(1),\n returnValue = this; // prevent calls to internal methods\n\n if (isMethodCall && options.charAt(0) === '_') {\n return returnValue;\n }\n\n if (isMethodCall) {\n if (options !== 'extend') {\n var instance = $.isEmptyObject($.data(object)) ? $.data(object, object) : $.data(object),\n methodValue = instance && typeof instance[options] === \"function\" ? instance[options].apply(instance, args) : 'no-function';\n\n if (methodValue === 'no-function') {\n return false;\n } else {\n returnValue = methodValue;\n }\n } else {\n object = $.extend.apply(null, [true, object].concat(args[0]));\n }\n } else {\n var _instance = $.isEmptyObject($.data(object)) ? $.data(object, object) : $.data(object);\n\n if (_instance && object._init !== undefined && object._init !== null) {\n _instance._init($.makeArray(arguments));\n }\n }\n\n return returnValue;\n };\n }\n },\n //Funcion encargada de crear los patrones de RUP que usen el selector de JQuery.\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n rupSelectorObjectConstructor: function rupSelectorObjectConstructor(name, object) {\n //Se crea el nuevo gestor del Patrón\n if ($.fn[name] === undefined) {\n $.fn[name] = function (opts) {\n var options = opts,\n isMethodCall = typeof options === 'string',\n args = $.makeArray(arguments).slice(1),\n returnValue = this; // prevent calls to internal methods\n\n if (isMethodCall && options.charAt(0) === '_') {\n return returnValue;\n }\n\n if (isMethodCall) {\n if (options !== 'extend') {\n var instance = $.extend(this, object),\n methodValue = instance && typeof instance[options] === \"function\" ? instance[options].apply(instance, args) : 'no-function';\n\n if (methodValue === 'no-function') {\n return false;\n } else {\n returnValue = methodValue;\n }\n } else {\n object = $.fn.extend.apply(null, [true, object].concat(args[0]));\n }\n } else {\n var _instance2 = $.extend(this, object);\n\n if (_instance2 && object._init !== undefined && object._init !== null) {\n _instance2._init($.makeArray(arguments));\n }\n }\n\n return returnValue;\n };\n }\n },\n //Funcion encargada de mostrar mediante el correspondiente canal el mensaje de error.\n //La estructura creada, proporciona proteccion a los metodos publicos y privados\n showErrorToUser: function showErrorToUser(errorText) {\n if (errorText != null && errorText !== '') {\n // Se comprueba si existe un dialog visible con una region de rup_feedbak\n var dialog_feedbacks = $('.ui-dialog:visible .rup-feedback'),\n feedbacks = dialog_feedbacks.length !== 0 ? dialog_feedbacks : $('.rup-feedback'); // Se comprueba si existe un rup_feedback en la pagina\n\n if (feedbacks.length != 0) {\n var feedback_props = {\n delay: null\n },\n //Si existen rup_feedbacks cogemos el último, será el que se está mostrando.\n feedback_principal = $('#' + feedbacks[feedbacks.length - 1].id); // Mostramos el error en el feedback\n\n feedback_principal.rup_feedback('option', feedback_props);\n feedback_principal.rup_feedback('set', errorText, 'error');\n feedback_principal.rup_feedback('show');\n } else {\n // Si no hay feedback definido mostramos un mensaje\n $.rup_messages('msgError', {\n title: $.rup.i18nParse($.rup.i18n.base, 'rup_ajax.errorTitle'),\n message: errorText\n });\n }\n }\n }\n }); //Almacenar y restaurar eventos\n\n $.fn.extend({\n storeEvents: function storeEvents() {\n this.each(function () {\n $(this).data('storedEvents', $.extend(true, {}, $._data($(this)[0], 'events')));\n });\n $(this).off();\n return this;\n },\n restoreEvents: function restoreEvents() {\n this.each(function () {\n var events = $.data(this, 'storedEvents');\n\n if (events) {\n $(this).off();\n\n for (var type in events) {\n for (var handler in events[type]) {\n if (_typeof(events[type][handler]) === 'object') {\n $.event.add(this, type, events[type][handler], events[type][handler].data);\n }\n }\n }\n }\n });\n return this;\n }\n });\n /*\r\n * EVENTOS PROPIOS\r\n * mousestop: Detecta cuando el ratón para su desplazamiento\r\n */\n\n $.fn.mousestop = {};\n $.fn.mousestop.defaults = {\n delay: 300\n };\n $.event.special.mousestop = {\n setup: function setup(data) {\n var $self = $(this);\n $self.data('mousestop', $.extend(true, {}, $.fn.mousestop.defaults, data));\n $self.on({\n 'mouseenter.rup_mousestop': mouseenterHandler,\n 'mouseleave.rup_mousestop': mouseleaveHandler,\n 'mousemove.rup_mousestop': mousemoveHandler\n });\n },\n teardown: function teardown() {\n $(this).removeData('mousestop').off('.rup_mousestop');\n }\n };\n\n function mouseenterHandler() {\n var self = this;\n clearTimeout(self.timeout);\n }\n\n function mouseleaveHandler() {\n var self = this;\n clearTimeout(self.timeout);\n }\n\n function mousemoveHandler(event) {\n var self = this,\n $self = $(this);\n clearTimeout(self.timeout);\n self.timeout = setTimeout(function () {\n $self.trigger('mousestop', event);\n }, $self.data('mousestop').delay);\n } // Control de teclas especiales Ctrl y Shift\n\n\n jQuery('body').on({\n 'keydown.rup': function keydownRup(event) {\n var $body = jQuery('body'),\n ret;\n\n switch (event.which) {\n case 16:\n if ($body.data('tmp.multiselect.shiftPressed') !== true) {\n $body.data('tmp.multiselect.shiftPressed', true);\n ret = $body.triggerHandler('rup_shiftKeyDown');\n\n if (ret === false) {\n event.preventDefault();\n return false;\n }\n }\n\n break;\n\n case 17:\n if ($body.data('tmp.multiselect.ctrlPressed') !== true) {\n $body.data('tmp.multiselect.ctrlPressed', true);\n ret = $body.triggerHandler('rup_ctrlKeyDown');\n\n if (ret === false) {\n event.preventDefault();\n return false;\n }\n }\n\n break;\n }\n },\n 'keyup.rup': function keyupRup(event) {\n var $body = jQuery('body'),\n ret;\n\n switch (event.which) {\n case 16:\n if ($body.data('tmp.multiselect.shiftPressed') !== false) {\n $body.data('tmp.multiselect.shiftPressed', false);\n ret = $body.triggerHandler('rup_shiftKeyUp');\n\n if (ret === false) {\n return false;\n }\n }\n\n break;\n\n case 17:\n if ($body.data('tmp.multiselect.ctrlPressed') !== false) {\n $body.data('tmp.multiselect.ctrlPressed', false);\n ret = $body.triggerHandler('rup_ctrlKeyUp');\n\n if (ret === false) {\n return false;\n }\n }\n\n break;\n\n case 32:\n /* Se aplicara a todos los navegadores que no sean Firefox.\r\n Este evento permite que los checkboxes puedan ser seleccionados/deseleccionados con el teclado. */\n if (typeof InstallTrigger == 'undefined' && $(event.target).is(':checkbox')) {\n event.preventDefault();\n $(event.target).prop('checked', function () {\n return !this.checked;\n });\n }\n\n break;\n }\n }\n });\n jQuery.extend($.rup, {\n isCtrlPressed: function isCtrlPressed() {\n return jQuery('body').data('tmp.multiselect.ctrlPressed') === true;\n },\n isShiftPressed: function isShiftPressed() {\n return jQuery('body').data('tmp.multiselect.shiftPressed') === true;\n }\n });\n /**\r\n * Creamos la funcion que audita el componente\r\n */\n\n function prepareAuditData(compName, auditing) {\n return {\n 'url': window.location.href,\n 'versionRup': $.rup.version,\n 'nombreComponente': compName,\n 'codApp': $.rup.APP_RESOURCES,\n 'timeStamp': Date.now(),\n 'auditing': auditing\n };\n }\n\n function ajaxAudit(jsonPost) {\n $.ajax($.rup.AUDIT_PATH, {\n method: 'POST',\n contentType: 'application/json',\n data: JSON.stringify(jsonPost)\n });\n }\n\n jQuery.extend($.rup, {\n auditComponent: function auditComponent(compName, auditing) {\n if ($.rup.IS_EJIE) {\n ajaxAudit(prepareAuditData(compName, auditing));\n }\n }\n }); //Ejemplo de extension de la funcion de inicio\n //$.extend($.rup.iniRup, console.log(\"mundo\")) ;\n //Inicializacion de las funciones de gestion de RUP en general\n\n $.rup.iniRup();\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack://rup/./src/rup.base.js?"); /***/ }), diff --git a/x21aStatics/WebContent/rup/js/rup.min.js b/x21aStatics/WebContent/rup/js/rup.min.js index 3708ec71f..3d0648fe1 100644 --- a/x21aStatics/WebContent/rup/js/rup.min.js +++ b/x21aStatics/WebContent/rup/js/rup.min.js @@ -1 +1 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.rup=n():e.rup=n()}(window,(function(){return function(e){var n={};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(a,r,function(n){return e[n]}.bind(null,r));return a},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=306)}([function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n;\n\n(function (global, factory) {\n ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :\n\t\t\t\t__WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;\n})(this, function () {\n 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n } // This is done to register the method called with moment()\n // without creating circular dependencies.\n\n\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return input != null && Object.prototype.toString.call(input) === '[object Object]';\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';\n }\n\n function isDate(input) {\n return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n\n return m._pf;\n }\n\n var some;\n\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function some(fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);\n\n if (m._strict) {\n isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n } // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n\n\n var momentProperties = hooks.momentProperties = [],\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n } // Moment prototype object\n\n\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n\n if (!this.isValid()) {\n this._d = new Date(NaN);\n } // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n\n\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return obj instanceof Moment || obj != null && obj._isAMomentObject != null;\n }\n\n function warn(msg) {\n if (hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n\n for (i = 0; i < argLen; i++) {\n arg = '';\n\n if (_typeof(arguments[i]) === 'object') {\n arg += '\\n[' + i + '] ';\n\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n\n args.push(arg);\n }\n\n warn(msg + '\\nArguments: ' + Array.prototype.slice.call(args).join('') + '\\n' + new Error().stack);\n firstTime = false;\n }\n\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n function set(config) {\n var prop, i;\n\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n\n this._config = config; // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n\n this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\\d{1,2}/.source);\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n\n for (prop in parentConfig) {\n if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function keys(obj) {\n var i,\n res = [];\n\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n }\n\n var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {}; // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n\n if (typeof callback === 'string') {\n func = function func() {\n return this[callback]();\n };\n }\n\n if (token) {\n formatTokenFunctions[token] = func;\n }\n\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(func.apply(this, arguments), token);\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n\n for (i = 0; i < length; i++) {\n output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];\n }\n\n return output;\n };\n } // format date using native date object\n\n\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function (tok) {\n if (tok === 'MMMM' || tok === 'MM' || tok === 'DD' || tok === 'dddd') {\n return tok.slice(1);\n }\n\n return tok;\n }).join('');\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({\n unit: u,\n priority: priorities[u]\n });\n }\n }\n\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {\n value = toInt(value);\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n } // MOMENTS\n\n\n function stringGet(units) {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units]();\n }\n\n return this;\n }\n\n function stringSet(units, value) {\n if (_typeof(units) === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n\n return this;\n }\n\n var match1 = /\\d/,\n // 0 - 9\n match2 = /\\d\\d/,\n // 00 - 99\n match3 = /\\d{3}/,\n // 000 - 999\n match4 = /\\d{4}/,\n // 0000 - 9999\n match6 = /[+-]?\\d{6}/,\n // -999999 - 999999\n match1to2 = /\\d\\d?/,\n // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/,\n // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/,\n // 99999 - 999999\n match1to3 = /\\d{1,3}/,\n // 0 - 999\n match1to4 = /\\d{1,4}/,\n // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/,\n // -999999 - 999999\n matchUnsigned = /\\d+/,\n // 0 - inf\n matchSigned = /[+-]?\\d+/,\n // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi,\n // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi,\n // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/,\n // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord = /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n\n\n function unescapeFormat(s) {\n return regexEscape(s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }));\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n\n if (typeof token === 'string') {\n token = [token];\n }\n\n if (isNumber(callback)) {\n func = function func(input, array) {\n array[callback] = toInt(input);\n };\n }\n\n tokenLen = token.length;\n\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return (n % x + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function indexOf(o) {\n // I know\n var i;\n\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2;\n } // FORMATTING\n\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n }); // ALIASES\n\n addUnitAlias('month', 'M'); // PRIORITY\n\n addUnitPriority('month', 8); // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid.\n\n\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n }); // LOCALES\n\n var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months) ? this._months : this._months['standalone'];\n }\n\n return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone'];\n }\n\n return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n } // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n }\n\n if (!strict && !this._monthsParse[i]) {\n regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n return i;\n } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value); // TODO: Another silent failure?\n\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n\n return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n\n return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n } // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES\n\n addUnitAlias('year', 'y'); // PRIORITIES\n\n addUnitPriority('year', 1); // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n }); // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n } // HOOKS\n\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n }; // MOMENTS\n\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date; // the date constructor remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args; // the Date.UTC function remaps years 0-99 to 1900-1999\n\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset\n\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n } // start-of-first-week - start-of-year\n\n\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n\n\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n } // FORMATTING\n\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W'); // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5); // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }); // HELPERS\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n } // MOMENTS\n\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n } // FORMATTING\n\n\n addFormatToken('d', 0, 'do', 'day');\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E'); // PRIORITY\n\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11); // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid\n\n\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n }); // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n\n return isNaN(input) ? null : input;\n } // LOCALES\n\n\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format) ? 'format' : 'standalone'];\n return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._weekdaysParse, llc);\n\n if (ii !== -1) {\n return ii;\n }\n\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$', 'i');\n this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$', 'i');\n }\n\n if (!this._weekdaysParse[i]) {\n regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n } // test the regex\n\n\n if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n } // MOMENTS\n\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n } // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n\n return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n\n return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n\n return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n } // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n\n\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');\n this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');\n this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n addFormatToken('hmmss', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n addFormatToken('Hmmss', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n });\n }\n\n meridiem('a', true);\n meridiem('A', false); // ALIASES\n\n addUnitAlias('hour', 'h'); // PRIORITY\n\n addUnitPriority('hour', 13); // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n }); // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n week: defaultLocaleWeek,\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n meridiemParse: defaultLocaleMeridiemParse\n }; // internal storage for locale config files\n\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n } // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n\n\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n\n if (locale) {\n return locale;\n }\n\n if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n\n j--;\n }\n\n i++;\n }\n\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire; // TODO: Find a better way to register and load all the locales in Node\n\n if (locales[name] === undefined && typeof module !== 'undefined' && module && module.exports && isLocaleNameSane(name)) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n __webpack_require__(557)(\"./\" + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n\n return locales[name];\n } // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n\n\n function getSetGlobalLocale(key, values) {\n var data;\n\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn('Locale ' + key + ' not found. Did you forget to load it?');\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n\n if (locales[name] != null) {\n deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config\n });\n return null;\n }\n }\n }\n\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n } // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n\n\n getSetGlobalLocale(name);\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n\n config = mergeConfigs(parentConfig, config);\n\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n } // backwards compat for now: also set the locale\n\n\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n\n return locales[name];\n } // returns locale data\n\n\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n\n if (locale) {\n return locale;\n }\n\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;\n\n if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n overflow = DATE;\n }\n\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n } // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n\n\n var extendedIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/], ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/], ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/], ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false], ['YYYY-DDD', /\\d{4}-\\d{3}/], ['YYYY-MM', /\\d{4}-\\d\\d/, false], ['YYYYYYMMDD', /[+-]\\d{10}/], ['YYYYMMDD', /\\d{8}/], ['GGGG[W]WWE', /\\d{4}W\\d{3}/], ['GGGG[W]WW', /\\d{4}W\\d{2}/, false], ['YYYYDDD', /\\d{7}/], ['YYYYMM', /\\d{6}/, false], ['YYYY', /\\d{4}/, false]],\n // iso time formats and regexes\n isoTimes = [['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/], ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/], ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/], ['HH:mm', /\\d\\d:\\d\\d/], ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/], ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/], ['HHmmss', /\\d\\d\\d\\d\\d\\d/], ['HHmm', /\\d\\d\\d\\d/], ['HH', /\\d\\d/]],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n }; // date from iso format\n\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n var result = [untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10)];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s.replace(/\\([^()]*\\)|[\\n\\t]/g, ' ').replace(/(\\s\\s+)/g, ' ').replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();\n\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n } // date and time from ref 2822 format\n\n\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n\n if (match) {\n parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);\n\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n config._d = createUTCDate.apply(null, config._a);\n\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n } // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n\n\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate('value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }); // Pick the first defined of two or three arguments.\n\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n\n if (b != null) {\n return b;\n }\n\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n\n if (config._useUTC) {\n return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];\n }\n\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n } // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n\n\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays\n\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n } //if the day of the year is set, figure out what it is\n\n\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n } // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n\n\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n } // Zero out whatever was not defaulted, including time\n\n\n for (; i < 7; i++) {\n config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];\n } // Check for 24:00:00.000\n\n\n if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n } // check for mismatching day of week\n\n\n if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n w = config._w;\n\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n\n weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n curWeek = weekOfYear(createLocal(), dow, doy);\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week.\n\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n } // constant that refers to the ISO standard\n\n\n hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form\n\n\n hooks.RFC_2822 = function () {}; // date from string and format string\n\n\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n\n config._a = [];\n getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n } // don't parse if it's not a known token\n\n\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n } // add remaining unparsed input length to the string\n\n\n getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n } // clear _12h flag if hour is <= 12\n\n\n if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem; // handle meridiem\n\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); // handle era\n\n era = getParsingFlags(config).era;\n\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n\n if (isPm && hour < 12) {\n hour += 12;\n }\n\n if (!isPm && hour === 12) {\n hour = 0;\n }\n\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n } // date from string and array of format strings\n\n\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens\n\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map([i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], function (obj) {\n return obj && parseInt(obj, 10);\n });\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || format === undefined && input === '') {\n return createInvalid({\n nullInput: true\n });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {\n input = undefined;\n } // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n\n\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }),\n prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () {\n var other = createLocal.apply(null, arguments);\n\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }); // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n\n function pickBy(fn, moments) {\n var res, i;\n\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n\n if (!moments.length) {\n return createLocal();\n }\n\n res = moments[0];\n\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n\n return res;\n } // TODO: Use [].sort instead?\n\n\n function min() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n return pickBy('isAfter', args);\n }\n\n var now = function now() {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n\n for (key in m) {\n if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove\n\n this._milliseconds = +milliseconds + seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n\n this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n\n this._months = +months + quarters * 3 + years * 12;\n this._data = {};\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n } // compare two arrays, return the number of differences\n\n\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {\n diffs++;\n }\n }\n\n return diffs + lengthDiff;\n } // FORMATTING\n\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n\n return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2);\n });\n }\n\n offset('Z', ':');\n offset('ZZ', ''); // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n }); // HELPERS\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n } // Return a moment from input, that is local/utc/zone equivalent to model.\n\n\n function cloneWithOffset(input, model) {\n var res, diff;\n\n if (model._isUTC) {\n res = model.clone();\n diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api.\n\n res._d.setTime(res._d.valueOf() + diff);\n\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n } // HOOKS\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n\n\n hooks.updateOffset = function () {}; // MOMENTS\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--\x3e\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n\n\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n\n this._offset = input;\n this._isUTC = true;\n\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(this, createDuration(input - offset, 'm'), 1, false);\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n\n input = input ? createLocal(input).utcOffset() : 0;\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n } // ASP.NET json date format regex\n\n\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if (match = aspNetRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match\n\n };\n } else if (match = isoRegex.exec(input)) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign)\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (_typeof(duration) === 'object' && ('from' in duration || 'to' in duration)) {\n diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it\n\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n res.months = other.month() - base.month() + (other.year() - base.year()) * 12;\n\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n\n if (!(base.isValid() && other.isValid())) {\n return {\n milliseconds: 0,\n months: 0\n };\n }\n\n other = cloneWithOffset(other, base);\n\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n } // TODO: remove 'name' arg after deprecation is removed\n\n\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp; //invert the arguments, but complain about it\n\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n } // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n\n\n function isMomentInput(input) {\n return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === undefined;\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n\n if (arrayTest) {\n dataTypeTest = input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = ['sameDay', 'nextDay', 'lastDay', 'nextWeek', 'lastWeek', 'sameElse'],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n } // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n\n\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);\n return this.format(output || this.localeData().calendar(format, this, createLocal(now)));\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n\n inclusivity = inclusivity || '()';\n return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n\n units = normalizeUnits(units) || 'millisecond';\n\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n\n case 'month':\n output = monthDiff(this, that);\n break;\n\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n\n case 'second':\n output = (this - that) / 1e3;\n break;\n // 1000\n\n case 'minute':\n output = (this - that) / 6e4;\n break;\n // 1000 * 60\n\n case 'hour':\n output = (this - that) / 36e5;\n break;\n // 1000 * 60 * 60\n\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break;\n // 1000 * 60 * 60 * 24, negate dst\n\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break;\n // 1000 * 60 * 60 * 24 * 7, negate dst\n\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n } // difference in months\n\n\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month\n\n adjust = (b - anchor) / (anchor2 - anchor);\n } //check for negative zero, return zero if negative zero\n\n\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));\n }\n }\n\n return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');\n }\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n\n\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;\n }\n\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n to: this,\n from: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {\n return createDuration({\n from: this,\n to: time\n }).locale(this.locale()).humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n } // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n\n\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n\n return this;\n }\n }\n\n var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n });\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970):\n\n function mod$1(dividend, divisor) {\n return (dividend % divisor + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3, 1);\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday());\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1));\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n\n case 'quarter':\n time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1;\n break;\n\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n\n case 'week':\n time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1;\n break;\n\n case 'isoWeek':\n time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1;\n break;\n\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n\n case 'hour':\n time = this._d.valueOf();\n time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;\n break;\n\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds()\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n });\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (_typeof(eras[i].since)) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (_typeof(eras[i].until)) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time\n\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {\n return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset;\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp('^(' + narrowPieces.join('|') + ')', 'i');\n } // FORMATTING\n\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG'); // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1); // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n });\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n }); // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n } // FORMATTING\n\n\n addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES\n\n addUnitAlias('quarter', 'Q'); // PRIORITY\n\n addUnitPriority('quarter', 7); // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n }); // MOMENTS\n\n function getSetQuarter(input) {\n return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n } // FORMATTING\n\n\n addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES\n\n addUnitAlias('date', 'D'); // PRIORITY\n\n addUnitPriority('date', 9); // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict ? locale._dayOfMonthOrdinalParse || locale._ordinalParse : locale._dayOfMonthOrdinalParseLenient;\n });\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n }); // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD'); // PRIORITY\n\n addUnitPriority('dayOfYear', 4); // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n }); // HELPERS\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n } // FORMATTING\n\n\n addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES\n\n addUnitAlias('minute', 'm'); // PRIORITY\n\n addUnitPriority('minute', 14); // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE); // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false); // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES\n\n addUnitAlias('second', 's'); // PRIORITY\n\n addUnitPriority('second', 15); // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND); // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false); // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n }); // ALIASES\n\n addUnitAlias('millisecond', 'ms'); // PRIORITY\n\n addUnitPriority('millisecond', 16); // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n var token, getSetMillisecond;\n\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n\n if (typeof Symbol !== 'undefined' && Symbol[\"for\"] != null) {\n proto[Symbol[\"for\"]('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);\n proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n\n return out;\n } // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n\n\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [{\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD'\n }, {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC'\n }],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n }); // Side effect imports\n\n hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);\n hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n return duration._bubble();\n } // supports only 2.0-style add(1, 's') or add(duration)\n\n\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n } // supports only 2.0-style subtract(1, 's') or subtract(duration)\n\n\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays; // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n\n if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n } // The following code bubbles up values, see the tests for\n // examples of what that means.\n\n\n data.milliseconds = milliseconds % 1000;\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n days += absFloor(hours / 24); // convert days to months\n\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12;\n data.days = days;\n data.months = months;\n data.years = years;\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return days * 4800 / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return months * 146097 / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n\n var days,\n months,\n milliseconds = this._milliseconds;\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n\n switch (units) {\n case 'month':\n return months;\n\n case 'quarter':\n return months / 3;\n\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n\n case 'day':\n return days + milliseconds / 864e5;\n\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n } // TODO: Use this.as('ms')?\n\n\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n\n return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44,\n // a few seconds to seconds\n s: 45,\n // seconds to minute\n m: 45,\n // minutes to hour\n h: 22,\n // hours to day\n d: 26,\n // days to month/week\n w: null,\n // weeks to month\n M: 11 // months to year\n\n }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days];\n\n if (thresholds.w != null) {\n a = a || weeks <= 1 && ['w'] || weeks < thresholds.w && ['ww', weeks];\n }\n\n a = a || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years];\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n } // This function allows you to set the rounding function for relative time strings\n\n\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n\n return false;\n } // This function allows you to set a threshold for relative time strings\n\n\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n\n if (limit === undefined) {\n return thresholds[threshold];\n }\n\n thresholds[threshold] = limit;\n\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (_typeof(argWithSuffix) === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n\n if (_typeof(argThresholds) === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n } // 3600 seconds -> 60 minutes -> 1 hour\n\n\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60; // 12 months -> 1 year\n\n years = absFloor(months / 12);\n months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n return totalSign + 'P' + (years ? ymSign + years + 'Y' : '') + (months ? ymSign + months + 'M' : '') + (days ? daysSign + days + 'D' : '') + (hours || minutes || seconds ? 'T' : '') + (hours ? hmsSign + hours + 'H' : '') + (minutes ? hmsSign + minutes + 'M' : '') + (seconds ? hmsSign + s + 'S' : '');\n }\n\n var proto$2 = Duration.prototype;\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);\n proto$2.lang = lang; // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf'); // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n }); //! moment.js\n\n hooks.version = '2.29.4';\n setHookCallback(createLocal);\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats\n\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm',\n // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss',\n // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS',\n // \n DATE: 'YYYY-MM-DD',\n // \n TIME: 'HH:mm',\n // \n TIME_SECONDS: 'HH:mm:ss',\n // \n TIME_MS: 'HH:mm:ss.SSS',\n // \n WEEK: 'GGGG-[W]WW',\n // \n MONTH: 'YYYY-MM' // \n\n };\n return hooks;\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(59)(module)))\n\n//# sourceURL=webpack://rup/./node_modules/moment/moment.js?")},function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }\n\n/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n(function (global, factory) {\n "use strict";\n\n if (( false ? undefined : _typeof(module)) === "object" && _typeof(module.exports) === "object") {\n // For CommonJS and CommonJS-like environments where a proper `window`\n // is present, execute the factory and get jQuery.\n // For environments that do not have a `window` with a `document`\n // (such as Node.js), expose a factory as module.exports.\n // This accentuates the need for the creation of a real `window`.\n // e.g. var jQuery = require("jquery")(window);\n // See ticket trac-14549 for more info.\n module.exports = global.document ? factory(global, true) : function (w) {\n if (!w.document) {\n throw new Error("jQuery requires a window with a document");\n }\n\n return factory(w);\n };\n } else {\n factory(global);\n } // Pass this if window is not defined yet\n\n})(typeof window !== "undefined" ? window : this, function (window, noGlobal) {\n // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n // enough that all such attempts are guarded in a try block.\n "use strict";\n\n var arr = [];\n var getProto = Object.getPrototypeOf;\n var _slice = arr.slice;\n var flat = arr.flat ? function (array) {\n return arr.flat.call(array);\n } : function (array) {\n return arr.concat.apply([], array);\n };\n var push = arr.push;\n var indexOf = arr.indexOf;\n var class2type = {};\n var toString = class2type.toString;\n var hasOwn = class2type.hasOwnProperty;\n var fnToString = hasOwn.toString;\n var ObjectFunctionString = fnToString.call(Object);\n var support = {};\n\n var isFunction = function isFunction(obj) {\n // Support: Chrome <=57, Firefox <=52\n // In some browsers, typeof returns "function" for HTML elements\n // (i.e., `typeof document.createElement( "object" ) === "function"`).\n // We don\'t want to classify *any* DOM node as a function.\n // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n // Plus for old WebKit, typeof returns "function" for HTML collections\n // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)\n return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";\n };\n\n var isWindow = function isWindow(obj) {\n return obj != null && obj === obj.window;\n };\n\n var document = window.document;\n var preservedScriptAttributes = {\n type: true,\n src: true,\n nonce: true,\n noModule: true\n };\n\n function DOMEval(code, node, doc) {\n doc = doc || document;\n var i,\n val,\n script = doc.createElement("script");\n script.text = code;\n\n if (node) {\n for (i in preservedScriptAttributes) {\n // Support: Firefox 64+, Edge 18+\n // Some browsers don\'t support the "nonce" property on scripts.\n // On the other hand, just using `getAttribute` is not enough as\n // the `nonce` attribute is reset to an empty string whenever it\n // becomes browsing-context connected.\n // See https://github.com/whatwg/html/issues/2369\n // See https://html.spec.whatwg.org/#nonce-attributes\n // The `node.getAttribute` check was added for the sake of\n // `jQuery.globalEval` so that it can fake a nonce-containing node\n // via an object.\n val = node[i] || node.getAttribute && node.getAttribute(i);\n\n if (val) {\n script.setAttribute(i, val);\n }\n }\n }\n\n doc.head.appendChild(script).parentNode.removeChild(script);\n }\n\n function toType(obj) {\n if (obj == null) {\n return obj + "";\n } // Support: Android <=2.3 only (functionish RegExp)\n\n\n return _typeof(obj) === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : _typeof(obj);\n }\n /* global Symbol */\n // Defining this global in .eslintrc.json would create a danger of using the global\n // unguarded in another place, it seems safer to define global only for this module\n\n\n var version = "3.7.1",\n rhtmlSuffix = /HTML$/i,\n // Define a local copy of jQuery\n jQuery = function jQuery(selector, context) {\n // The jQuery object is actually just the init constructor \'enhanced\'\n // Need init if jQuery is called (just allow error to be thrown if not included)\n return new jQuery.fn.init(selector, context);\n };\n\n jQuery.fn = jQuery.prototype = {\n // The current version of jQuery being used\n jquery: version,\n constructor: jQuery,\n // The default length of a jQuery object is 0\n length: 0,\n toArray: function toArray() {\n return _slice.call(this);\n },\n // Get the Nth element in the matched element set OR\n // Get the whole matched element set as a clean array\n get: function get(num) {\n // Return all the elements in a clean array\n if (num == null) {\n return _slice.call(this);\n } // Return just the one element from the set\n\n\n return num < 0 ? this[num + this.length] : this[num];\n },\n // Take an array of elements and push it onto the stack\n // (returning the new matched element set)\n pushStack: function pushStack(elems) {\n // Build a new jQuery matched element set\n var ret = jQuery.merge(this.constructor(), elems); // Add the old object onto the stack (as a reference)\n\n ret.prevObject = this; // Return the newly-formed element set\n\n return ret;\n },\n // Execute a callback for every element in the matched set.\n each: function each(callback) {\n return jQuery.each(this, callback);\n },\n map: function map(callback) {\n return this.pushStack(jQuery.map(this, function (elem, i) {\n return callback.call(elem, i, elem);\n }));\n },\n slice: function slice() {\n return this.pushStack(_slice.apply(this, arguments));\n },\n first: function first() {\n return this.eq(0);\n },\n last: function last() {\n return this.eq(-1);\n },\n even: function even() {\n return this.pushStack(jQuery.grep(this, function (_elem, i) {\n return (i + 1) % 2;\n }));\n },\n odd: function odd() {\n return this.pushStack(jQuery.grep(this, function (_elem, i) {\n return i % 2;\n }));\n },\n eq: function eq(i) {\n var len = this.length,\n j = +i + (i < 0 ? len : 0);\n return this.pushStack(j >= 0 && j < len ? [this[j]] : []);\n },\n end: function end() {\n return this.prevObject || this.constructor();\n },\n // For internal use only.\n // Behaves like an Array\'s method, not like a jQuery method.\n push: push,\n sort: arr.sort,\n splice: arr.splice\n };\n\n jQuery.extend = jQuery.fn.extend = function () {\n var options,\n name,\n src,\n copy,\n copyIsArray,\n clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false; // Handle a deep copy situation\n\n if (typeof target === "boolean") {\n deep = target; // Skip the boolean and the target\n\n target = arguments[i] || {};\n i++;\n } // Handle case when target is a string or something (possible in deep copy)\n\n\n if (_typeof(target) !== "object" && !isFunction(target)) {\n target = {};\n } // Extend jQuery itself if only one argument is passed\n\n\n if (i === length) {\n target = this;\n i--;\n }\n\n for (; i < length; i++) {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null) {\n // Extend the base object\n for (name in options) {\n copy = options[name]; // Prevent Object.prototype pollution\n // Prevent never-ending loop\n\n if (name === "__proto__" || target === copy) {\n continue;\n } // Recurse if we\'re merging plain objects or arrays\n\n\n if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {\n src = target[name]; // Ensure proper type for the source value\n\n if (copyIsArray && !Array.isArray(src)) {\n clone = [];\n } else if (!copyIsArray && !jQuery.isPlainObject(src)) {\n clone = {};\n } else {\n clone = src;\n }\n\n copyIsArray = false; // Never move original objects, clone them\n\n target[name] = jQuery.extend(deep, clone, copy); // Don\'t bring in undefined values\n } else if (copy !== undefined) {\n target[name] = copy;\n }\n }\n }\n } // Return the modified object\n\n\n return target;\n };\n\n jQuery.extend({\n // Unique for each copy of jQuery on the page\n expando: "jQuery" + (version + Math.random()).replace(/\\D/g, ""),\n // Assume jQuery is ready without the ready module\n isReady: true,\n error: function error(msg) {\n throw new Error(msg);\n },\n noop: function noop() {},\n isPlainObject: function isPlainObject(obj) {\n var proto, Ctor; // Detect obvious negatives\n // Use toString instead of jQuery.type to catch host objects\n\n if (!obj || toString.call(obj) !== "[object Object]") {\n return false;\n }\n\n proto = getProto(obj); // Objects with no prototype (e.g., `Object.create( null )`) are plain\n\n if (!proto) {\n return true;\n } // Objects with prototype are plain iff they were constructed by a global Object function\n\n\n Ctor = hasOwn.call(proto, "constructor") && proto.constructor;\n return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;\n },\n isEmptyObject: function isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n\n return true;\n },\n // Evaluates a script in a provided context; falls back to the global one\n // if not specified.\n globalEval: function globalEval(code, options, doc) {\n DOMEval(code, {\n nonce: options && options.nonce\n }, doc);\n },\n each: function each(obj, callback) {\n var length,\n i = 0;\n\n if (isArrayLike(obj)) {\n length = obj.length;\n\n for (; i < length; i++) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n } else {\n for (i in obj) {\n if (callback.call(obj[i], i, obj[i]) === false) {\n break;\n }\n }\n }\n\n return obj;\n },\n // Retrieve the text value of an array of DOM nodes\n text: function text(elem) {\n var node,\n ret = "",\n i = 0,\n nodeType = elem.nodeType;\n\n if (!nodeType) {\n // If no nodeType, this is expected to be an array\n while (node = elem[i++]) {\n // Do not traverse comment nodes\n ret += jQuery.text(node);\n }\n }\n\n if (nodeType === 1 || nodeType === 11) {\n return elem.textContent;\n }\n\n if (nodeType === 9) {\n return elem.documentElement.textContent;\n }\n\n if (nodeType === 3 || nodeType === 4) {\n return elem.nodeValue;\n } // Do not include comment or processing instruction nodes\n\n\n return ret;\n },\n // results is for internal usage only\n makeArray: function makeArray(arr, results) {\n var ret = results || [];\n\n if (arr != null) {\n if (isArrayLike(Object(arr))) {\n jQuery.merge(ret, typeof arr === "string" ? [arr] : arr);\n } else {\n push.call(ret, arr);\n }\n }\n\n return ret;\n },\n inArray: function inArray(elem, arr, i) {\n return arr == null ? -1 : indexOf.call(arr, elem, i);\n },\n isXMLDoc: function isXMLDoc(elem) {\n var namespace = elem && elem.namespaceURI,\n docElem = elem && (elem.ownerDocument || elem).documentElement; // Assume HTML when documentElement doesn\'t yet exist, such as inside\n // document fragments.\n\n return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");\n },\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n merge: function merge(first, second) {\n var len = +second.length,\n j = 0,\n i = first.length;\n\n for (; j < len; j++) {\n first[i++] = second[j];\n }\n\n first.length = i;\n return first;\n },\n grep: function grep(elems, callback, invert) {\n var callbackInverse,\n matches = [],\n i = 0,\n length = elems.length,\n callbackExpect = !invert; // Go through the array, only saving the items\n // that pass the validator function\n\n for (; i < length; i++) {\n callbackInverse = !callback(elems[i], i);\n\n if (callbackInverse !== callbackExpect) {\n matches.push(elems[i]);\n }\n }\n\n return matches;\n },\n // arg is for internal usage only\n map: function map(elems, callback, arg) {\n var length,\n value,\n i = 0,\n ret = []; // Go through the array, translating each of the items to their new values\n\n if (isArrayLike(elems)) {\n length = elems.length;\n\n for (; i < length; i++) {\n value = callback(elems[i], i, arg);\n\n if (value != null) {\n ret.push(value);\n }\n } // Go through every key on the object,\n\n } else {\n for (i in elems) {\n value = callback(elems[i], i, arg);\n\n if (value != null) {\n ret.push(value);\n }\n }\n } // Flatten any nested arrays\n\n\n return flat(ret);\n },\n // A global GUID counter for objects\n guid: 1,\n // jQuery.support is not used in Core but other projects attach their\n // properties to it so it needs to exist.\n support: support\n });\n\n if (typeof Symbol === "function") {\n jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];\n } // Populate the class2type map\n\n\n jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (_i, name) {\n class2type["[object " + name + "]"] = name.toLowerCase();\n });\n\n function isArrayLike(obj) {\n // Support: real iOS 8.2 only (not reproducible in simulator)\n // `in` check used to prevent JIT error (gh-2145)\n // hasOwn isn\'t used here due to false negatives\n // regarding Nodelist length in IE\n var length = !!obj && "length" in obj && obj.length,\n type = toType(obj);\n\n if (isFunction(obj) || isWindow(obj)) {\n return false;\n }\n\n return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;\n }\n\n function nodeName(elem, name) {\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n }\n\n var pop = arr.pop;\n var sort = arr.sort;\n var splice = arr.splice;\n var whitespace = "[\\\\x20\\\\t\\\\r\\\\n\\\\f]";\n var rtrimCSS = new RegExp("^" + whitespace + "+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)" + whitespace + "+$", "g"); // Note: an element does not contain itself\n\n jQuery.contains = function (a, b) {\n var bup = b && b.parentNode;\n return a === bup || !!(bup && bup.nodeType === 1 && ( // Support: IE 9 - 11+\n // IE doesn\'t have `contains` on SVG.\n a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));\n }; // CSS string/identifier serialization\n // https://drafts.csswg.org/cssom/#common-serializing-idioms\n\n\n var rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\n function fcssescape(ch, asCodePoint) {\n if (asCodePoint) {\n // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n if (ch === "\\0") {\n return "\\uFFFD";\n } // Control characters and (dependent upon position) numbers get escaped as code points\n\n\n return ch.slice(0, -1) + "\\\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";\n } // Other potentially-special ASCII characters get backslash-escaped\n\n\n return "\\\\" + ch;\n }\n\n jQuery.escapeSelector = function (sel) {\n return (sel + "").replace(rcssescape, fcssescape);\n };\n\n var preferredDoc = document,\n pushNative = push;\n\n (function () {\n var i,\n Expr,\n outermostContext,\n sortInput,\n hasDuplicate,\n push = pushNative,\n // Local document vars\n document,\n documentElement,\n documentIsHTML,\n rbuggyQSA,\n matches,\n // Instance-specific data\n expando = jQuery.expando,\n dirruns = 0,\n done = 0,\n classCache = createCache(),\n tokenCache = createCache(),\n compilerCache = createCache(),\n nonnativeSelectorCache = createCache(),\n sortOrder = function sortOrder(a, b) {\n if (a === b) {\n hasDuplicate = true;\n }\n\n return 0;\n },\n booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" + "loop|multiple|open|readonly|required|scoped",\n // Regular expressions\n // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n identifier = "(?:\\\\\\\\[\\\\da-fA-F]{1,6}" + whitespace + "?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+",\n // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n attributes = "\\\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)\n "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"\n "*(?:\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\"|(" + identifier + "))|)" + whitespace + "*\\\\]",\n pseudos = ":(" + identifier + ")(?:\\\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n // 1. quoted (capture 3; capture 4 or capture 5)\n "(\'((?:\\\\\\\\.|[^\\\\\\\\\'])*)\'|\\"((?:\\\\\\\\.|[^\\\\\\\\\\"])*)\\")|" + // 2. simple (capture 6)\n "((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2)\n ".*" + ")\\\\)|)",\n // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n rwhitespace = new RegExp(whitespace + "+", "g"),\n rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"),\n rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"),\n rdescend = new RegExp(whitespace + "|>"),\n rpseudo = new RegExp(pseudos),\n ridentifier = new RegExp("^" + identifier + "$"),\n matchExpr = {\n ID: new RegExp("^#(" + identifier + ")"),\n CLASS: new RegExp("^\\\\.(" + identifier + ")"),\n TAG: new RegExp("^(" + identifier + "|[*])"),\n ATTR: new RegExp("^" + attributes),\n PSEUDO: new RegExp("^" + pseudos),\n CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(" + whitespace + "*(even|odd|(([+-]|)(\\\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\\\d+)|))" + whitespace + "*\\\\)|)", "i"),\n bool: new RegExp("^(?:" + booleans + ")$", "i"),\n // For use in libraries implementing .is()\n // We use this for POS matching in `select`\n needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(" + whitespace + "*((?:-\\\\d)?\\\\d*)" + whitespace + "*\\\\)|)(?=[^-]|$)", "i")\n },\n rinputs = /^(?:input|select|textarea|button)$/i,\n rheader = /^h\\d$/i,\n // Easily-parseable/retrievable ID or TAG or CLASS selectors\n rquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n rsibling = /[+~]/,\n // CSS escapes\n // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n runescape = new RegExp("\\\\\\\\[\\\\da-fA-F]{1,6}" + whitespace + "?|\\\\\\\\([^\\\\r\\\\n\\\\f])", "g"),\n funescape = function funescape(escape, nonHex) {\n var high = "0x" + escape.slice(1) - 0x10000;\n\n if (nonHex) {\n // Strip the backslash prefix from a non-hex escape sequence\n return nonHex;\n } // Replace a hexadecimal escape sequence with the encoded Unicode code point\n // Support: IE <=11+\n // For values outside the Basic Multilingual Plane (BMP), manually construct a\n // surrogate pair\n\n\n return high < 0 ? String.fromCharCode(high + 0x10000) : String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);\n },\n // Used for iframes; see `setDocument`.\n // Support: IE 9 - 11+, Edge 12 - 18+\n // Removing the function wrapper causes a "Permission Denied"\n // error in IE/Edge.\n unloadHandler = function unloadHandler() {\n setDocument();\n },\n inDisabledFieldset = addCombinator(function (elem) {\n return elem.disabled === true && nodeName(elem, "fieldset");\n }, {\n dir: "parentNode",\n next: "legend"\n }); // Support: IE <=9 only\n // Accessing document.activeElement can throw unexpectedly\n // https://bugs.jquery.com/ticket/13393\n\n\n function safeActiveElement() {\n try {\n return document.activeElement;\n } catch (err) {}\n } // Optimize for push.apply( _, NodeList )\n\n\n try {\n push.apply(arr = _slice.call(preferredDoc.childNodes), preferredDoc.childNodes); // Support: Android <=4.0\n // Detect silently failing push.apply\n // eslint-disable-next-line no-unused-expressions\n\n arr[preferredDoc.childNodes.length].nodeType;\n } catch (e) {\n push = {\n apply: function apply(target, els) {\n pushNative.apply(target, _slice.call(els));\n },\n call: function call(target) {\n pushNative.apply(target, _slice.call(arguments, 1));\n }\n };\n }\n\n function find(selector, context, results, seed) {\n var m,\n i,\n elem,\n nid,\n match,\n groups,\n newSelector,\n newContext = context && context.ownerDocument,\n // nodeType defaults to 9, since context defaults to document\n nodeType = context ? context.nodeType : 9;\n results = results || []; // Return early from calls with invalid selector or context\n\n if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {\n return results;\n } // Try to shortcut find operations (as opposed to filters) in HTML documents\n\n\n if (!seed) {\n setDocument(context);\n context = context || document;\n\n if (documentIsHTML) {\n // If the selector is sufficiently simple, try using a "get*By*" DOM method\n // (excepting DocumentFragment context, where the methods don\'t exist)\n if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {\n // ID selector\n if (m = match[1]) {\n // Document context\n if (nodeType === 9) {\n if (elem = context.getElementById(m)) {\n // Support: IE 9 only\n // getElementById can match elements by name instead of ID\n if (elem.id === m) {\n push.call(results, elem);\n return results;\n }\n } else {\n return results;\n } // Element context\n\n } else {\n // Support: IE 9 only\n // getElementById can match elements by name instead of ID\n if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) {\n push.call(results, elem);\n return results;\n }\n } // Type selector\n\n } else if (match[2]) {\n push.apply(results, context.getElementsByTagName(selector));\n return results; // Class selector\n } else if ((m = match[3]) && context.getElementsByClassName) {\n push.apply(results, context.getElementsByClassName(m));\n return results;\n }\n } // Take advantage of querySelectorAll\n\n\n if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {\n newSelector = selector;\n newContext = context; // qSA considers elements outside a scoping root when evaluating child or\n // descendant combinators, which is not what we want.\n // In such cases, we work around the behavior by prefixing every selector in the\n // list with an ID selector referencing the scope context.\n // The technique has to be used as well when a leading combinator is used\n // as such selectors are not recognized by querySelectorAll.\n // Thanks to Andrew Dupont for this technique.\n\n if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {\n // Expand context for sibling selectors\n newContext = rsibling.test(selector) && testContext(context.parentNode) || context; // We can use :scope instead of the ID hack if the browser\n // supports it & if we\'re not changing the context.\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when\n // strict-comparing two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n\n if (newContext != context || !support.scope) {\n // Capture the context ID, setting it first if necessary\n if (nid = context.getAttribute("id")) {\n nid = jQuery.escapeSelector(nid);\n } else {\n context.setAttribute("id", nid = expando);\n }\n } // Prefix every selector in the list\n\n\n groups = tokenize(selector);\n i = groups.length;\n\n while (i--) {\n groups[i] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i]);\n }\n\n newSelector = groups.join(",");\n }\n\n try {\n push.apply(results, newContext.querySelectorAll(newSelector));\n return results;\n } catch (qsaError) {\n nonnativeSelectorCache(selector, true);\n } finally {\n if (nid === expando) {\n context.removeAttribute("id");\n }\n }\n }\n }\n } // All others\n\n\n return select(selector.replace(rtrimCSS, "$1"), context, results, seed);\n }\n /**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\n\n\n function createCache() {\n var keys = [];\n\n function cache(key, value) {\n // Use (key + " ") to avoid collision with native prototype properties\n // (see https://github.com/jquery/sizzle/issues/157)\n if (keys.push(key + " ") > Expr.cacheLength) {\n // Only keep the most recent entries\n delete cache[keys.shift()];\n }\n\n return cache[key + " "] = value;\n }\n\n return cache;\n }\n /**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\n\n\n function markFunction(fn) {\n fn[expando] = true;\n return fn;\n }\n /**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\n\n\n function assert(fn) {\n var el = document.createElement("fieldset");\n\n try {\n return !!fn(el);\n } catch (e) {\n return false;\n } finally {\n // Remove from its parent by default\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n } // release memory in IE\n\n\n el = null;\n }\n }\n /**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\n\n\n function createInputPseudo(type) {\n return function (elem) {\n return nodeName(elem, "input") && elem.type === type;\n };\n }\n /**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\n\n\n function createButtonPseudo(type) {\n return function (elem) {\n return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;\n };\n }\n /**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\n\n\n function createDisabledPseudo(disabled) {\n // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n return function (elem) {\n // Only certain elements can match :enabled or :disabled\n // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n if ("form" in elem) {\n // Check for inherited disabledness on relevant non-disabled elements:\n // * listed form-associated elements in a disabled fieldset\n // https://html.spec.whatwg.org/multipage/forms.html#category-listed\n // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n // * option elements in a disabled optgroup\n // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n // All such elements have a "form" property.\n if (elem.parentNode && elem.disabled === false) {\n // Option elements defer to a parent optgroup if present\n if ("label" in elem) {\n if ("label" in elem.parentNode) {\n return elem.parentNode.disabled === disabled;\n } else {\n return elem.disabled === disabled;\n }\n } // Support: IE 6 - 11+\n // Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\n\n return elem.isDisabled === disabled || // Where there is no isDisabled, check manually\n elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;\n }\n\n return elem.disabled === disabled; // Try to winnow out elements that can\'t be disabled before trusting the disabled property.\n // Some victims get caught in our net (label, legend, menu, track), but it shouldn\'t\n // even exist on them, let alone have a boolean value.\n } else if ("label" in elem) {\n return elem.disabled === disabled;\n } // Remaining elements are neither :enabled nor :disabled\n\n\n return false;\n };\n }\n /**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\n\n\n function createPositionalPseudo(fn) {\n return markFunction(function (argument) {\n argument = +argument;\n return markFunction(function (seed, matches) {\n var j,\n matchIndexes = fn([], seed.length, argument),\n i = matchIndexes.length; // Match elements found at the specified indexes\n\n while (i--) {\n if (seed[j = matchIndexes[i]]) {\n seed[j] = !(matches[j] = seed[j]);\n }\n }\n });\n });\n }\n /**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\n\n\n function testContext(context) {\n return context && typeof context.getElementsByTagName !== "undefined" && context;\n }\n /**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\n\n\n function setDocument(node) {\n var subWindow,\n doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n\n if (doc == document || doc.nodeType !== 9 || !doc.documentElement) {\n return document;\n } // Update global variables\n\n\n document = doc;\n documentElement = document.documentElement;\n documentIsHTML = !jQuery.isXMLDoc(document); // Support: iOS 7 only, IE 9 - 11+\n // Older browsers didn\'t support unprefixed `matches`.\n\n matches = documentElement.matches || documentElement.webkitMatchesSelector || documentElement.msMatchesSelector; // Support: IE 9 - 11+, Edge 12 - 18+\n // Accessing iframe documents after unload throws "permission denied" errors\n // (see trac-13936).\n // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\n if (documentElement.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n preferredDoc != document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {\n // Support: IE 9 - 11+, Edge 12 - 18+\n subWindow.addEventListener("unload", unloadHandler);\n } // Support: IE <10\n // Check if getElementById returns elements by name\n // The broken getElementById methods don\'t pick up programmatically-set names,\n // so use a roundabout getElementsByName test\n\n\n support.getById = assert(function (el) {\n documentElement.appendChild(el).id = jQuery.expando;\n return !document.getElementsByName || !document.getElementsByName(jQuery.expando).length;\n }); // Support: IE 9 only\n // Check to see if it\'s possible to do matchesSelector\n // on a disconnected node.\n\n support.disconnectedMatch = assert(function (el) {\n return matches.call(el, "*");\n }); // Support: IE 9 - 11+, Edge 12 - 18+\n // IE/Edge don\'t support the :scope pseudo-class.\n\n support.scope = assert(function () {\n return document.querySelectorAll(":scope");\n }); // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n // Make sure the `:has()` argument is parsed unforgivingly.\n // We include `*` in the test to detect buggy implementations that are\n // _selectively_ forgiving (specifically when the list includes at least\n // one valid selector).\n // Note that we treat complete lack of support for `:has()` as if it were\n // spec-compliant support, which is fine because use of `:has()` in such\n // environments will fail in the qSA path and fall back to jQuery traversal\n // anyway.\n\n support.cssHas = assert(function () {\n try {\n document.querySelector(":has(*,:jqfake)");\n return false;\n } catch (e) {\n return true;\n }\n }); // ID filter and find\n\n if (support.getById) {\n Expr.filter.ID = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n return elem.getAttribute("id") === attrId;\n };\n };\n\n Expr.find.ID = function (id, context) {\n if (typeof context.getElementById !== "undefined" && documentIsHTML) {\n var elem = context.getElementById(id);\n return elem ? [elem] : [];\n }\n };\n } else {\n Expr.filter.ID = function (id) {\n var attrId = id.replace(runescape, funescape);\n return function (elem) {\n var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");\n return node && node.value === attrId;\n };\n }; // Support: IE 6 - 7 only\n // getElementById is not reliable as a find shortcut\n\n\n Expr.find.ID = function (id, context) {\n if (typeof context.getElementById !== "undefined" && documentIsHTML) {\n var node,\n i,\n elems,\n elem = context.getElementById(id);\n\n if (elem) {\n // Verify the id attribute\n node = elem.getAttributeNode("id");\n\n if (node && node.value === id) {\n return [elem];\n } // Fall back on getElementsByName\n\n\n elems = context.getElementsByName(id);\n i = 0;\n\n while (elem = elems[i++]) {\n node = elem.getAttributeNode("id");\n\n if (node && node.value === id) {\n return [elem];\n }\n }\n }\n\n return [];\n }\n };\n } // Tag\n\n\n Expr.find.TAG = function (tag, context) {\n if (typeof context.getElementsByTagName !== "undefined") {\n return context.getElementsByTagName(tag); // DocumentFragment nodes don\'t have gEBTN\n } else {\n return context.querySelectorAll(tag);\n }\n }; // Class\n\n\n Expr.find.CLASS = function (className, context) {\n if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {\n return context.getElementsByClassName(className);\n }\n };\n /* QSA/matchesSelector\n ---------------------------------------------------------------------- */\n // QSA and matchesSelector support\n\n\n rbuggyQSA = []; // Build QSA regex\n // Regex strategy adopted from Diego Perini\n\n assert(function (el) {\n var input;\n documentElement.appendChild(el).innerHTML = "" + ""; // Support: iOS <=7 - 8 only\n // Boolean attributes and "value" are not treated correctly in some XML documents\n\n if (!el.querySelectorAll("[selected]").length) {\n rbuggyQSA.push("\\\\[" + whitespace + "*(?:value|" + booleans + ")");\n } // Support: iOS <=7 - 8 only\n\n\n if (!el.querySelectorAll("[id~=" + expando + "-]").length) {\n rbuggyQSA.push("~=");\n } // Support: iOS 8 only\n // https://bugs.webkit.org/show_bug.cgi?id=136851\n // In-page `selector#id sibling-combinator selector` fails\n\n\n if (!el.querySelectorAll("a#" + expando + "+*").length) {\n rbuggyQSA.push(".#.+[+~]");\n } // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n // In some of the document kinds, these selectors wouldn\'t work natively.\n // This is probably OK but for backwards compatibility we want to maintain\n // handling them through jQuery traversal in jQuery 3.x.\n\n\n if (!el.querySelectorAll(":checked").length) {\n rbuggyQSA.push(":checked");\n } // Support: Windows 8 Native Apps\n // The type and name attributes are restricted during .innerHTML assignment\n\n\n input = document.createElement("input");\n input.setAttribute("type", "hidden");\n el.appendChild(input).setAttribute("name", "D"); // Support: IE 9 - 11+\n // IE\'s :disabled selector does not pick up the children of disabled fieldsets\n // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n // In some of the document kinds, these selectors wouldn\'t work natively.\n // This is probably OK but for backwards compatibility we want to maintain\n // handling them through jQuery traversal in jQuery 3.x.\n\n documentElement.appendChild(el).disabled = true;\n\n if (el.querySelectorAll(":disabled").length !== 2) {\n rbuggyQSA.push(":enabled", ":disabled");\n } // Support: IE 11+, Edge 15 - 18+\n // IE 11/Edge don\'t find elements on a `[name=\'\']` query in some cases.\n // Adding a temporary attribute to the document before the selection works\n // around the issue.\n // Interestingly, IE 10 & older don\'t seem to have the issue.\n\n\n input = document.createElement("input");\n input.setAttribute("name", "");\n el.appendChild(input);\n\n if (!el.querySelectorAll("[name=\'\']").length) {\n rbuggyQSA.push("\\\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + "*(?:\'\'|\\"\\")");\n }\n });\n\n if (!support.cssHas) {\n // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n // Our regular `try-catch` mechanism fails to detect natively-unsupported\n // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)\n // in browsers that parse the `:has()` argument as a forgiving selector list.\n // https://drafts.csswg.org/selectors/#relational now requires the argument\n // to be parsed unforgivingly, but browsers have not yet fully adjusted.\n rbuggyQSA.push(":has");\n }\n\n rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));\n /* Sorting\n ---------------------------------------------------------------------- */\n // Document order sorting\n\n sortOrder = function sortOrder(a, b) {\n // Flag for duplicate removal\n if (a === b) {\n hasDuplicate = true;\n return 0;\n } // Sort on method existence if only one input has compareDocumentPosition\n\n\n var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\n if (compare) {\n return compare;\n } // Calculate position if both inputs belong to the same document\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n\n\n compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : // Otherwise we know they are disconnected\n 1; // Disconnected nodes\n\n if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {\n // Choose the first element that is related to our preferred document\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if (a === document || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) {\n return -1;\n } // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n\n\n if (b === document || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) {\n return 1;\n } // Maintain original order\n\n\n return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;\n }\n\n return compare & 4 ? -1 : 1;\n };\n\n return document;\n }\n\n find.matches = function (expr, elements) {\n return find(expr, null, null, elements);\n };\n\n find.matchesSelector = function (elem, expr) {\n setDocument(elem);\n\n if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {\n try {\n var ret = matches.call(elem, expr); // IE 9\'s matchesSelector returns false on disconnected nodes\n\n if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document\n // fragment in IE 9\n elem.document && elem.document.nodeType !== 11) {\n return ret;\n }\n } catch (e) {\n nonnativeSelectorCache(expr, true);\n }\n }\n\n return find(expr, document, null, [elem]).length > 0;\n };\n\n find.contains = function (context, elem) {\n // Set document vars if needed\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if ((context.ownerDocument || context) != document) {\n setDocument(context);\n }\n\n return jQuery.contains(context, elem);\n };\n\n find.attr = function (elem, name) {\n // Set document vars if needed\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n if ((elem.ownerDocument || elem) != document) {\n setDocument(elem);\n }\n\n var fn = Expr.attrHandle[name.toLowerCase()],\n // Don\'t get fooled by Object.prototype properties (see trac-13807)\n val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;\n\n if (val !== undefined) {\n return val;\n }\n\n return elem.getAttribute(name);\n };\n\n find.error = function (msg) {\n throw new Error("Syntax error, unrecognized expression: " + msg);\n };\n /**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\n\n\n jQuery.uniqueSort = function (results) {\n var elem,\n duplicates = [],\n j = 0,\n i = 0; // Unless we *know* we can detect duplicates, assume their presence\n //\n // Support: Android <=4.0+\n // Testing for detecting duplicates is unpredictable so instead assume we can\'t\n // depend on duplicate detection in all browsers without a stable sort.\n\n hasDuplicate = !support.sortStable;\n sortInput = !support.sortStable && _slice.call(results, 0);\n sort.call(results, sortOrder);\n\n if (hasDuplicate) {\n while (elem = results[i++]) {\n if (elem === results[i]) {\n j = duplicates.push(i);\n }\n }\n\n while (j--) {\n splice.call(results, duplicates[j], 1);\n }\n } // Clear input after sorting to release objects\n // See https://github.com/jquery/sizzle/pull/225\n\n\n sortInput = null;\n return results;\n };\n\n jQuery.fn.uniqueSort = function () {\n return this.pushStack(jQuery.uniqueSort(_slice.apply(this)));\n };\n\n Expr = jQuery.expr = {\n // Can be adjusted by the user\n cacheLength: 50,\n createPseudo: markFunction,\n match: matchExpr,\n attrHandle: {},\n find: {},\n relative: {\n ">": {\n dir: "parentNode",\n first: true\n },\n " ": {\n dir: "parentNode"\n },\n "+": {\n dir: "previousSibling",\n first: true\n },\n "~": {\n dir: "previousSibling"\n }\n },\n preFilter: {\n ATTR: function ATTR(match) {\n match[1] = match[1].replace(runescape, funescape); // Move the given value to match[3] whether quoted or unquoted\n\n match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape);\n\n if (match[2] === "~=") {\n match[3] = " " + match[3] + " ";\n }\n\n return match.slice(0, 4);\n },\n CHILD: function CHILD(match) {\n /* matches from matchExpr["CHILD"]\n \t1 type (only|nth|...)\n \t2 what (child|of-type)\n \t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n \t4 xn-component of xn+y argument ([+-]?\\d*n|)\n \t5 sign of xn-component\n \t6 x of xn-component\n \t7 sign of y-component\n \t8 y of y-component\n */\n match[1] = match[1].toLowerCase();\n\n if (match[1].slice(0, 3) === "nth") {\n // nth-* requires argument\n if (!match[3]) {\n find.error(match[0]);\n } // numeric x and y parameters for Expr.filter.CHILD\n // remember that false/true cast respectively to 0/1\n\n\n match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd"));\n match[5] = +(match[7] + match[8] || match[3] === "odd"); // other types prohibit arguments\n } else if (match[3]) {\n find.error(match[0]);\n }\n\n return match;\n },\n PSEUDO: function PSEUDO(match) {\n var excess,\n unquoted = !match[6] && match[2];\n\n if (matchExpr.CHILD.test(match[0])) {\n return null;\n } // Accept quoted arguments as-is\n\n\n if (match[3]) {\n match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments\n } else if (unquoted && rpseudo.test(unquoted) && ( // Get excess from tokenize (recursively)\n excess = tokenize(unquoted, true)) && ( // advance to the next closing parenthesis\n excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {\n // excess is a negative index\n match[0] = match[0].slice(0, excess);\n match[2] = unquoted.slice(0, excess);\n } // Return only captures needed by the pseudo filter method (type and argument)\n\n\n return match.slice(0, 3);\n }\n },\n filter: {\n TAG: function TAG(nodeNameSelector) {\n var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();\n return nodeNameSelector === "*" ? function () {\n return true;\n } : function (elem) {\n return nodeName(elem, expectedNodeName);\n };\n },\n CLASS: function CLASS(className) {\n var pattern = classCache[className + " "];\n return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function (elem) {\n return pattern.test(typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "");\n });\n },\n ATTR: function ATTR(name, operator, check) {\n return function (elem) {\n var result = find.attr(elem, name);\n\n if (result == null) {\n return operator === "!=";\n }\n\n if (!operator) {\n return true;\n }\n\n result += "";\n\n if (operator === "=") {\n return result === check;\n }\n\n if (operator === "!=") {\n return result !== check;\n }\n\n if (operator === "^=") {\n return check && result.indexOf(check) === 0;\n }\n\n if (operator === "*=") {\n return check && result.indexOf(check) > -1;\n }\n\n if (operator === "$=") {\n return check && result.slice(-check.length) === check;\n }\n\n if (operator === "~=") {\n return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;\n }\n\n if (operator === "|=") {\n return result === check || result.slice(0, check.length + 1) === check + "-";\n }\n\n return false;\n };\n },\n CHILD: function CHILD(type, what, _argument, first, last) {\n var simple = type.slice(0, 3) !== "nth",\n forward = type.slice(-4) !== "last",\n ofType = what === "of-type";\n return first === 1 && last === 0 ? // Shortcut for :nth-*(n)\n function (elem) {\n return !!elem.parentNode;\n } : function (elem, _context, xml) {\n var cache,\n outerCache,\n node,\n nodeIndex,\n start,\n dir = simple !== forward ? "nextSibling" : "previousSibling",\n parent = elem.parentNode,\n name = ofType && elem.nodeName.toLowerCase(),\n useCache = !xml && !ofType,\n diff = false;\n\n if (parent) {\n // :(first|last|only)-(child|of-type)\n if (simple) {\n while (dir) {\n node = elem;\n\n while (node = node[dir]) {\n if (ofType ? nodeName(node, name) : node.nodeType === 1) {\n return false;\n }\n } // Reverse direction for :only-* (if we haven\'t yet done so)\n\n\n start = dir = type === "only" && !start && "nextSibling";\n }\n\n return true;\n }\n\n start = [forward ? parent.firstChild : parent.lastChild]; // non-xml :nth-child(...) stores cache data on `parent`\n\n if (forward && useCache) {\n // Seek `elem` from a previously-cached index\n outerCache = parent[expando] || (parent[expando] = {});\n cache = outerCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex && cache[2];\n node = nodeIndex && parent.childNodes[nodeIndex];\n\n while (node = ++nodeIndex && node && node[dir] || ( // Fallback to seeking `elem` from the start\n diff = nodeIndex = 0) || start.pop()) {\n // When found, cache indexes on `parent` and break\n if (node.nodeType === 1 && ++diff && node === elem) {\n outerCache[type] = [dirruns, nodeIndex, diff];\n break;\n }\n }\n } else {\n // Use previously-cached element index if available\n if (useCache) {\n outerCache = elem[expando] || (elem[expando] = {});\n cache = outerCache[type] || [];\n nodeIndex = cache[0] === dirruns && cache[1];\n diff = nodeIndex;\n } // xml :nth-child(...)\n // or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\n\n if (diff === false) {\n // Use the same loop as above to seek `elem` from the start\n while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {\n if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {\n // Cache the index of each encountered element\n if (useCache) {\n outerCache = node[expando] || (node[expando] = {});\n outerCache[type] = [dirruns, diff];\n }\n\n if (node === elem) {\n break;\n }\n }\n }\n }\n } // Incorporate the offset, then check against cycle size\n\n\n diff -= last;\n return diff === first || diff % first === 0 && diff / first >= 0;\n }\n };\n },\n PSEUDO: function PSEUDO(pseudo, argument) {\n // pseudo-class names are case-insensitive\n // https://www.w3.org/TR/selectors/#pseudo-classes\n // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n // Remember that setFilters inherits from pseudos\n var args,\n fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo); // The user may use createPseudo to indicate that\n // arguments are needed to create the filter function\n // just as jQuery does\n\n if (fn[expando]) {\n return fn(argument);\n } // But maintain support for old signatures\n\n\n if (fn.length > 1) {\n args = [pseudo, pseudo, "", argument];\n return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {\n var idx,\n matched = fn(seed, argument),\n i = matched.length;\n\n while (i--) {\n idx = indexOf.call(seed, matched[i]);\n seed[idx] = !(matches[idx] = matched[i]);\n }\n }) : function (elem) {\n return fn(elem, 0, args);\n };\n }\n\n return fn;\n }\n },\n pseudos: {\n // Potentially complex pseudos\n not: markFunction(function (selector) {\n // Trim the selector passed to compile\n // to avoid treating leading and trailing\n // spaces as combinators\n var input = [],\n results = [],\n matcher = compile(selector.replace(rtrimCSS, "$1"));\n return matcher[expando] ? markFunction(function (seed, matches, _context, xml) {\n var elem,\n unmatched = matcher(seed, null, xml, []),\n i = seed.length; // Match elements unmatched by `matcher`\n\n while (i--) {\n if (elem = unmatched[i]) {\n seed[i] = !(matches[i] = elem);\n }\n }\n }) : function (elem, _context, xml) {\n input[0] = elem;\n matcher(input, null, xml, results); // Don\'t keep the element\n // (see https://github.com/jquery/sizzle/issues/299)\n\n input[0] = null;\n return !results.pop();\n };\n }),\n has: markFunction(function (selector) {\n return function (elem) {\n return find(selector, elem).length > 0;\n };\n }),\n contains: markFunction(function (text) {\n text = text.replace(runescape, funescape);\n return function (elem) {\n return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1;\n };\n }),\n // "Whether an element is represented by a :lang() selector\n // is based solely on the element\'s language value\n // being equal to the identifier C,\n // or beginning with the identifier C immediately followed by "-".\n // The matching of C against the element\'s language value is performed case-insensitively.\n // The identifier C does not have to be a valid language name."\n // https://www.w3.org/TR/selectors/#lang-pseudo\n lang: markFunction(function (lang) {\n // lang value must be a valid identifier\n if (!ridentifier.test(lang || "")) {\n find.error("unsupported lang: " + lang);\n }\n\n lang = lang.replace(runescape, funescape).toLowerCase();\n return function (elem) {\n var elemLang;\n\n do {\n if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {\n elemLang = elemLang.toLowerCase();\n return elemLang === lang || elemLang.indexOf(lang + "-") === 0;\n }\n } while ((elem = elem.parentNode) && elem.nodeType === 1);\n\n return false;\n };\n }),\n // Miscellaneous\n target: function target(elem) {\n var hash = window.location && window.location.hash;\n return hash && hash.slice(1) === elem.id;\n },\n root: function root(elem) {\n return elem === documentElement;\n },\n focus: function focus(elem) {\n return elem === safeActiveElement() && document.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);\n },\n // Boolean properties\n enabled: createDisabledPseudo(false),\n disabled: createDisabledPseudo(true),\n checked: function checked(elem) {\n // In CSS3, :checked should return both checked and selected elements\n // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;\n },\n selected: function selected(elem) {\n // Support: IE <=11+\n // Accessing the selectedIndex property\n // forces the browser to treat the default option as\n // selected when in an optgroup.\n if (elem.parentNode) {\n // eslint-disable-next-line no-unused-expressions\n elem.parentNode.selectedIndex;\n }\n\n return elem.selected === true;\n },\n // Contents\n empty: function empty(elem) {\n // https://www.w3.org/TR/selectors/#empty-pseudo\n // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n // but not by others (comment: 8; processing instruction: 7; etc.)\n // nodeType < 6 works because attributes (2) do not appear as children\n for (elem = elem.firstChild; elem; elem = elem.nextSibling) {\n if (elem.nodeType < 6) {\n return false;\n }\n }\n\n return true;\n },\n parent: function parent(elem) {\n return !Expr.pseudos.empty(elem);\n },\n // Element/input types\n header: function header(elem) {\n return rheader.test(elem.nodeName);\n },\n input: function input(elem) {\n return rinputs.test(elem.nodeName);\n },\n button: function button(elem) {\n return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");\n },\n text: function text(elem) {\n var attr;\n return nodeName(elem, "input") && elem.type === "text" && ( // Support: IE <10 only\n // New HTML5 attribute values (e.g., "search") appear\n // with elem.type === "text"\n (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");\n },\n // Position-in-collection\n first: createPositionalPseudo(function () {\n return [0];\n }),\n last: createPositionalPseudo(function (_matchIndexes, length) {\n return [length - 1];\n }),\n eq: createPositionalPseudo(function (_matchIndexes, length, argument) {\n return [argument < 0 ? argument + length : argument];\n }),\n even: createPositionalPseudo(function (matchIndexes, length) {\n var i = 0;\n\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n odd: createPositionalPseudo(function (matchIndexes, length) {\n var i = 1;\n\n for (; i < length; i += 2) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n lt: createPositionalPseudo(function (matchIndexes, length, argument) {\n var i;\n\n if (argument < 0) {\n i = argument + length;\n } else if (argument > length) {\n i = length;\n } else {\n i = argument;\n }\n\n for (; --i >= 0;) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n }),\n gt: createPositionalPseudo(function (matchIndexes, length, argument) {\n var i = argument < 0 ? argument + length : argument;\n\n for (; ++i < length;) {\n matchIndexes.push(i);\n }\n\n return matchIndexes;\n })\n }\n };\n Expr.pseudos.nth = Expr.pseudos.eq; // Add button/input type pseudos\n\n for (i in {\n radio: true,\n checkbox: true,\n file: true,\n password: true,\n image: true\n }) {\n Expr.pseudos[i] = createInputPseudo(i);\n }\n\n for (i in {\n submit: true,\n reset: true\n }) {\n Expr.pseudos[i] = createButtonPseudo(i);\n } // Easy API for creating new setFilters\n\n\n function setFilters() {}\n\n setFilters.prototype = Expr.filters = Expr.pseudos;\n Expr.setFilters = new setFilters();\n\n function tokenize(selector, parseOnly) {\n var matched,\n match,\n tokens,\n type,\n soFar,\n groups,\n preFilters,\n cached = tokenCache[selector + " "];\n\n if (cached) {\n return parseOnly ? 0 : cached.slice(0);\n }\n\n soFar = selector;\n groups = [];\n preFilters = Expr.preFilter;\n\n while (soFar) {\n // Comma and first run\n if (!matched || (match = rcomma.exec(soFar))) {\n if (match) {\n // Don\'t consume trailing commas as valid\n soFar = soFar.slice(match[0].length) || soFar;\n }\n\n groups.push(tokens = []);\n }\n\n matched = false; // Combinators\n\n if (match = rleadingCombinator.exec(soFar)) {\n matched = match.shift();\n tokens.push({\n value: matched,\n // Cast descendant combinators to space\n type: match[0].replace(rtrimCSS, " ")\n });\n soFar = soFar.slice(matched.length);\n } // Filters\n\n\n for (type in Expr.filter) {\n if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {\n matched = match.shift();\n tokens.push({\n value: matched,\n type: type,\n matches: match\n });\n soFar = soFar.slice(matched.length);\n }\n }\n\n if (!matched) {\n break;\n }\n } // Return the length of the invalid excess\n // if we\'re just parsing\n // Otherwise, throw an error or return tokens\n\n\n if (parseOnly) {\n return soFar.length;\n }\n\n return soFar ? find.error(selector) : // Cache the tokens\n tokenCache(selector, groups).slice(0);\n }\n\n function toSelector(tokens) {\n var i = 0,\n len = tokens.length,\n selector = "";\n\n for (; i < len; i++) {\n selector += tokens[i].value;\n }\n\n return selector;\n }\n\n function addCombinator(matcher, combinator, base) {\n var dir = combinator.dir,\n skip = combinator.next,\n key = skip || dir,\n checkNonElements = base && key === "parentNode",\n doneName = done++;\n return combinator.first ? // Check against closest ancestor/preceding element\n function (elem, context, xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n return matcher(elem, context, xml);\n }\n }\n\n return false;\n } : // Check against all ancestor/preceding elements\n function (elem, context, xml) {\n var oldCache,\n outerCache,\n newCache = [dirruns, doneName]; // We can\'t set arbitrary data on XML nodes, so they don\'t benefit from combinator caching\n\n if (xml) {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n if (matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n } else {\n while (elem = elem[dir]) {\n if (elem.nodeType === 1 || checkNonElements) {\n outerCache = elem[expando] || (elem[expando] = {});\n\n if (skip && nodeName(elem, skip)) {\n elem = elem[dir] || elem;\n } else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {\n // Assign to newCache so results back-propagate to previous elements\n return newCache[2] = oldCache[2];\n } else {\n // Reuse newcache so results back-propagate to previous elements\n outerCache[key] = newCache; // A match means we\'re done; a fail means we have to keep checking\n\n if (newCache[2] = matcher(elem, context, xml)) {\n return true;\n }\n }\n }\n }\n }\n\n return false;\n };\n }\n\n function elementMatcher(matchers) {\n return matchers.length > 1 ? function (elem, context, xml) {\n var i = matchers.length;\n\n while (i--) {\n if (!matchers[i](elem, context, xml)) {\n return false;\n }\n }\n\n return true;\n } : matchers[0];\n }\n\n function multipleContexts(selector, contexts, results) {\n var i = 0,\n len = contexts.length;\n\n for (; i < len; i++) {\n find(selector, contexts[i], results);\n }\n\n return results;\n }\n\n function condense(unmatched, map, filter, context, xml) {\n var elem,\n newUnmatched = [],\n i = 0,\n len = unmatched.length,\n mapped = map != null;\n\n for (; i < len; i++) {\n if (elem = unmatched[i]) {\n if (!filter || filter(elem, context, xml)) {\n newUnmatched.push(elem);\n\n if (mapped) {\n map.push(i);\n }\n }\n }\n }\n\n return newUnmatched;\n }\n\n function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {\n if (postFilter && !postFilter[expando]) {\n postFilter = setMatcher(postFilter);\n }\n\n if (postFinder && !postFinder[expando]) {\n postFinder = setMatcher(postFinder, postSelector);\n }\n\n return markFunction(function (seed, results, context, xml) {\n var temp,\n i,\n elem,\n matcherOut,\n preMap = [],\n postMap = [],\n preexisting = results.length,\n // Get initial elements from seed or context\n elems = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []),\n // Prefilter to get matcher input, preserving a map for seed-results synchronization\n matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;\n\n if (matcher) {\n // If we have a postFinder, or filtered seed, or non-seed postFilter\n // or preexisting results,\n matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? // ...intermediate processing is necessary\n [] : // ...otherwise use results directly\n results; // Find primary matches\n\n matcher(matcherIn, matcherOut, context, xml);\n } else {\n matcherOut = matcherIn;\n } // Apply postFilter\n\n\n if (postFilter) {\n temp = condense(matcherOut, postMap);\n postFilter(temp, [], context, xml); // Un-match failing elements by moving them back to matcherIn\n\n i = temp.length;\n\n while (i--) {\n if (elem = temp[i]) {\n matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);\n }\n }\n }\n\n if (seed) {\n if (postFinder || preFilter) {\n if (postFinder) {\n // Get the final matcherOut by condensing this intermediate into postFinder contexts\n temp = [];\n i = matcherOut.length;\n\n while (i--) {\n if (elem = matcherOut[i]) {\n // Restore matcherIn since elem is not yet a final match\n temp.push(matcherIn[i] = elem);\n }\n }\n\n postFinder(null, matcherOut = [], temp, xml);\n } // Move matched elements from seed to results to keep them synchronized\n\n\n i = matcherOut.length;\n\n while (i--) {\n if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1) {\n seed[temp] = !(results[temp] = elem);\n }\n }\n } // Add elements to results, through postFinder if defined\n\n } else {\n matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);\n\n if (postFinder) {\n postFinder(null, results, matcherOut, xml);\n } else {\n push.apply(results, matcherOut);\n }\n }\n });\n }\n\n function matcherFromTokens(tokens) {\n var checkContext,\n matcher,\n j,\n len = tokens.length,\n leadingRelative = Expr.relative[tokens[0].type],\n implicitRelative = leadingRelative || Expr.relative[" "],\n i = leadingRelative ? 1 : 0,\n // The foundational matcher ensures that elements are reachable from top-level context(s)\n matchContext = addCombinator(function (elem) {\n return elem === checkContext;\n }, implicitRelative, true),\n matchAnyContext = addCombinator(function (elem) {\n return indexOf.call(checkContext, elem) > -1;\n }, implicitRelative, true),\n matchers = [function (elem, context, xml) {\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); // Avoid hanging onto element\n // (see https://github.com/jquery/sizzle/issues/299)\n\n checkContext = null;\n return ret;\n }];\n\n for (; i < len; i++) {\n if (matcher = Expr.relative[tokens[i].type]) {\n matchers = [addCombinator(elementMatcher(matchers), matcher)];\n } else {\n matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); // Return special upon seeing a positional matcher\n\n if (matcher[expando]) {\n // Find the next relative operator (if any) for proper handling\n j = ++i;\n\n for (; j < len; j++) {\n if (Expr.relative[tokens[j].type]) {\n break;\n }\n }\n\n return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*`\n tokens.slice(0, i - 1).concat({\n value: tokens[i - 2].type === " " ? "*" : ""\n })).replace(rtrimCSS, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));\n }\n\n matchers.push(matcher);\n }\n }\n\n return elementMatcher(matchers);\n }\n\n function matcherFromGroupMatchers(elementMatchers, setMatchers) {\n var bySet = setMatchers.length > 0,\n byElement = elementMatchers.length > 0,\n superMatcher = function superMatcher(seed, context, xml, results, outermost) {\n var elem,\n j,\n matcher,\n matchedCount = 0,\n i = "0",\n unmatched = seed && [],\n setMatched = [],\n contextBackup = outermostContext,\n // We must always have either seed elements or outermost context\n elems = seed || byElement && Expr.find.TAG("*", outermost),\n // Use integer dirruns iff this is the outermost matcher\n dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1,\n len = elems.length;\n\n if (outermost) {\n // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n outermostContext = context == document || context || outermost;\n } // Add elements passing elementMatchers directly to results\n // Support: iOS <=7 - 9 only\n // Tolerate NodeList properties (IE: "length"; Safari: ) matching\n // elements by id. (see trac-14142)\n\n\n for (; i !== len && (elem = elems[i]) != null; i++) {\n if (byElement && elem) {\n j = 0; // Support: IE 11+, Edge 17 - 18+\n // IE/Edge sometimes throw a "Permission denied" error when strict-comparing\n // two documents; shallow comparisons work.\n // eslint-disable-next-line eqeqeq\n\n if (!context && elem.ownerDocument != document) {\n setDocument(elem);\n xml = !documentIsHTML;\n }\n\n while (matcher = elementMatchers[j++]) {\n if (matcher(elem, context || document, xml)) {\n push.call(results, elem);\n break;\n }\n }\n\n if (outermost) {\n dirruns = dirrunsUnique;\n }\n } // Track unmatched elements for set filters\n\n\n if (bySet) {\n // They will have gone through all possible matchers\n if (elem = !matcher && elem) {\n matchedCount--;\n } // Lengthen the array for every element, matched or not\n\n\n if (seed) {\n unmatched.push(elem);\n }\n }\n } // `i` is now the count of elements visited above, and adding it to `matchedCount`\n // makes the latter nonnegative.\n\n\n matchedCount += i; // Apply set filters to unmatched elements\n // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n // equals `i`), unless we didn\'t visit _any_ elements in the above loop because we have\n // no element matchers and no seed.\n // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that\n // case, which will result in a "00" `matchedCount` that differs from `i` but is also\n // numerically zero.\n\n if (bySet && i !== matchedCount) {\n j = 0;\n\n while (matcher = setMatchers[j++]) {\n matcher(unmatched, setMatched, context, xml);\n }\n\n if (seed) {\n // Reintegrate element matches to eliminate the need for sorting\n if (matchedCount > 0) {\n while (i--) {\n if (!(unmatched[i] || setMatched[i])) {\n setMatched[i] = pop.call(results);\n }\n }\n } // Discard index placeholder values to get only actual matches\n\n\n setMatched = condense(setMatched);\n } // Add matches to results\n\n\n push.apply(results, setMatched); // Seedless set matches succeeding multiple successful matchers stipulate sorting\n\n if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {\n jQuery.uniqueSort(results);\n }\n } // Override manipulation of globals by nested matchers\n\n\n if (outermost) {\n dirruns = dirrunsUnique;\n outermostContext = contextBackup;\n }\n\n return unmatched;\n };\n\n return bySet ? markFunction(superMatcher) : superMatcher;\n }\n\n function compile(selector, match\n /* Internal Use Only */\n ) {\n var i,\n setMatchers = [],\n elementMatchers = [],\n cached = compilerCache[selector + " "];\n\n if (!cached) {\n // Generate a function of recursive functions that can be used to check each element\n if (!match) {\n match = tokenize(selector);\n }\n\n i = match.length;\n\n while (i--) {\n cached = matcherFromTokens(match[i]);\n\n if (cached[expando]) {\n setMatchers.push(cached);\n } else {\n elementMatchers.push(cached);\n }\n } // Cache the compiled function\n\n\n cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers)); // Save selector and tokenization\n\n cached.selector = selector;\n }\n\n return cached;\n }\n /**\n * A low-level selection function that works with jQuery\'s compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\n\n\n function select(selector, context, results, seed) {\n var i,\n tokens,\n token,\n type,\n find,\n compiled = typeof selector === "function" && selector,\n match = !seed && tokenize(selector = compiled.selector || selector);\n results = results || []; // Try to minimize operations if there is only one selector in the list and no seed\n // (the latter of which guarantees us context)\n\n if (match.length === 1) {\n // Reduce context if the leading compound selector is an ID\n tokens = match[0] = match[0].slice(0);\n\n if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {\n context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0];\n\n if (!context) {\n return results; // Precompiled matchers will still verify ancestry, so step up a level\n } else if (compiled) {\n context = context.parentNode;\n }\n\n selector = selector.slice(tokens.shift().value.length);\n } // Fetch a seed set for right-to-left matching\n\n\n i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;\n\n while (i--) {\n token = tokens[i]; // Abort if we hit a combinator\n\n if (Expr.relative[type = token.type]) {\n break;\n }\n\n if (find = Expr.find[type]) {\n // Search, expanding context for leading sibling combinators\n if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {\n // If seed is empty or no tokens remain, we can return early\n tokens.splice(i, 1);\n selector = seed.length && toSelector(tokens);\n\n if (!selector) {\n push.apply(results, seed);\n return results;\n }\n\n break;\n }\n }\n }\n } // Compile and execute a filtering function if one is not provided\n // Provide `match` to avoid retokenization if we modified the selector above\n\n\n (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);\n return results;\n } // One-time assignments\n // Support: Android <=4.0 - 4.1+\n // Sort stability\n\n\n support.sortStable = expando.split("").sort(sortOrder).join("") === expando; // Initialize against the default document\n\n setDocument(); // Support: Android <=4.0 - 4.1+\n // Detached nodes confoundingly follow *each other*\n\n support.sortDetached = assert(function (el) {\n // Should return 1, but returns 4 (following)\n return el.compareDocumentPosition(document.createElement("fieldset")) & 1;\n });\n jQuery.find = find; // Deprecated\n\n jQuery.expr[":"] = jQuery.expr.pseudos;\n jQuery.unique = jQuery.uniqueSort; // These have always been private, but they used to be documented as part of\n // Sizzle so let\'s maintain them for now for backwards compatibility purposes.\n\n find.compile = compile;\n find.select = select;\n find.setDocument = setDocument;\n find.tokenize = tokenize;\n find.escape = jQuery.escapeSelector;\n find.getText = jQuery.text;\n find.isXML = jQuery.isXMLDoc;\n find.selectors = jQuery.expr;\n find.support = jQuery.support;\n find.uniqueSort = jQuery.uniqueSort;\n /* eslint-enable */\n })();\n\n var dir = function dir(elem, _dir, until) {\n var matched = [],\n truncate = until !== undefined;\n\n while ((elem = elem[_dir]) && elem.nodeType !== 9) {\n if (elem.nodeType === 1) {\n if (truncate && jQuery(elem).is(until)) {\n break;\n }\n\n matched.push(elem);\n }\n }\n\n return matched;\n };\n\n var _siblings = function siblings(n, elem) {\n var matched = [];\n\n for (; n; n = n.nextSibling) {\n if (n.nodeType === 1 && n !== elem) {\n matched.push(n);\n }\n }\n\n return matched;\n };\n\n var rneedsContext = jQuery.expr.match.needsContext;\n var rsingleTag = /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i; // Implement the identical functionality for filter and not\n\n function winnow(elements, qualifier, not) {\n if (isFunction(qualifier)) {\n return jQuery.grep(elements, function (elem, i) {\n return !!qualifier.call(elem, i, elem) !== not;\n });\n } // Single element\n\n\n if (qualifier.nodeType) {\n return jQuery.grep(elements, function (elem) {\n return elem === qualifier !== not;\n });\n } // Arraylike of elements (jQuery, arguments, Array)\n\n\n if (typeof qualifier !== "string") {\n return jQuery.grep(elements, function (elem) {\n return indexOf.call(qualifier, elem) > -1 !== not;\n });\n } // Filtered directly for both simple and complex selectors\n\n\n return jQuery.filter(qualifier, elements, not);\n }\n\n jQuery.filter = function (expr, elems, not) {\n var elem = elems[0];\n\n if (not) {\n expr = ":not(" + expr + ")";\n }\n\n if (elems.length === 1 && elem.nodeType === 1) {\n return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];\n }\n\n return jQuery.find.matches(expr, jQuery.grep(elems, function (elem) {\n return elem.nodeType === 1;\n }));\n };\n\n jQuery.fn.extend({\n find: function find(selector) {\n var i,\n ret,\n len = this.length,\n self = this;\n\n if (typeof selector !== "string") {\n return this.pushStack(jQuery(selector).filter(function () {\n for (i = 0; i < len; i++) {\n if (jQuery.contains(self[i], this)) {\n return true;\n }\n }\n }));\n }\n\n ret = this.pushStack([]);\n\n for (i = 0; i < len; i++) {\n jQuery.find(selector, self[i], ret);\n }\n\n return len > 1 ? jQuery.uniqueSort(ret) : ret;\n },\n filter: function filter(selector) {\n return this.pushStack(winnow(this, selector || [], false));\n },\n not: function not(selector) {\n return this.pushStack(winnow(this, selector || [], true));\n },\n is: function is(selector) {\n return !!winnow(this, // If this is a positional/relative selector, check membership in the returned set\n // so $("p:first").is("p:last") won\'t return true for a doc with two "p".\n typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;\n }\n }); // Initialize a jQuery object\n // A central reference to the root jQuery(document)\n\n var rootjQuery,\n // A simple way to check for HTML strings\n // Prioritize #id over to avoid XSS via location.hash (trac-9521)\n // Strict HTML recognition (trac-11290: must start with <)\n // Shortcut simple #id case for speed\n rquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n init = jQuery.fn.init = function (selector, context, root) {\n var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false)\n\n if (!selector) {\n return this;\n } // Method init() accepts an alternate rootjQuery\n // so migrate can support jQuery.sub (gh-2101)\n\n\n root = root || rootjQuery; // Handle HTML strings\n\n if (typeof selector === "string") {\n if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {\n // Assume that strings that start and end with <> are HTML and skip the regex check\n match = [null, selector, null];\n } else {\n match = rquickExpr.exec(selector);\n } // Match html or make sure no context is specified for #id\n\n\n if (match && (match[1] || !context)) {\n // HANDLE: $(html) -> $(array)\n if (match[1]) {\n context = context instanceof jQuery ? context[0] : context; // Option to run scripts is true for back-compat\n // Intentionally let the error be thrown if parseHTML is not present\n\n jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)); // HANDLE: $(html, props)\n\n if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {\n for (match in context) {\n // Properties of context are called as methods if possible\n if (isFunction(this[match])) {\n this[match](context[match]); // ...and otherwise set as attributes\n } else {\n this.attr(match, context[match]);\n }\n }\n }\n\n return this; // HANDLE: $(#id)\n } else {\n elem = document.getElementById(match[2]);\n\n if (elem) {\n // Inject the element directly into the jQuery object\n this[0] = elem;\n this.length = 1;\n }\n\n return this;\n } // HANDLE: $(expr, $(...))\n\n } else if (!context || context.jquery) {\n return (context || root).find(selector); // HANDLE: $(expr, context)\n // (which is just equivalent to: $(context).find(expr)\n } else {\n return this.constructor(context).find(selector);\n } // HANDLE: $(DOMElement)\n\n } else if (selector.nodeType) {\n this[0] = selector;\n this.length = 1;\n return this; // HANDLE: $(function)\n // Shortcut for document ready\n } else if (isFunction(selector)) {\n return root.ready !== undefined ? root.ready(selector) : // Execute immediately if ready is not present\n selector(jQuery);\n }\n\n return jQuery.makeArray(selector, this);\n }; // Give the init function the jQuery prototype for later instantiation\n\n\n init.prototype = jQuery.fn; // Initialize central reference\n\n rootjQuery = jQuery(document);\n var rparentsprev = /^(?:parents|prev(?:Until|All))/,\n // Methods guaranteed to produce a unique set when starting from a unique set\n guaranteedUnique = {\n children: true,\n contents: true,\n next: true,\n prev: true\n };\n jQuery.fn.extend({\n has: function has(target) {\n var targets = jQuery(target, this),\n l = targets.length;\n return this.filter(function () {\n var i = 0;\n\n for (; i < l; i++) {\n if (jQuery.contains(this, targets[i])) {\n return true;\n }\n }\n });\n },\n closest: function closest(selectors, context) {\n var cur,\n i = 0,\n l = this.length,\n matched = [],\n targets = typeof selectors !== "string" && jQuery(selectors); // Positional selectors never match, since there\'s no _selection_ context\n\n if (!rneedsContext.test(selectors)) {\n for (; i < l; i++) {\n for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {\n // Always skip document fragments\n if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : // Don\'t pass non-elements to jQuery#find\n cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors))) {\n matched.push(cur);\n break;\n }\n }\n }\n }\n\n return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);\n },\n // Determine the position of an element within the set\n index: function index(elem) {\n // No argument, return index in parent\n if (!elem) {\n return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;\n } // Index in selector\n\n\n if (typeof elem === "string") {\n return indexOf.call(jQuery(elem), this[0]);\n } // Locate the position of the desired element\n\n\n return indexOf.call(this, // If it receives a jQuery object, the first element is used\n elem.jquery ? elem[0] : elem);\n },\n add: function add(selector, context) {\n return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));\n },\n addBack: function addBack(selector) {\n return this.add(selector == null ? this.prevObject : this.prevObject.filter(selector));\n }\n });\n\n function sibling(cur, dir) {\n while ((cur = cur[dir]) && cur.nodeType !== 1) {}\n\n return cur;\n }\n\n jQuery.each({\n parent: function parent(elem) {\n var parent = elem.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n parents: function parents(elem) {\n return dir(elem, "parentNode");\n },\n parentsUntil: function parentsUntil(elem, _i, until) {\n return dir(elem, "parentNode", until);\n },\n next: function next(elem) {\n return sibling(elem, "nextSibling");\n },\n prev: function prev(elem) {\n return sibling(elem, "previousSibling");\n },\n nextAll: function nextAll(elem) {\n return dir(elem, "nextSibling");\n },\n prevAll: function prevAll(elem) {\n return dir(elem, "previousSibling");\n },\n nextUntil: function nextUntil(elem, _i, until) {\n return dir(elem, "nextSibling", until);\n },\n prevUntil: function prevUntil(elem, _i, until) {\n return dir(elem, "previousSibling", until);\n },\n siblings: function siblings(elem) {\n return _siblings((elem.parentNode || {}).firstChild, elem);\n },\n children: function children(elem) {\n return _siblings(elem.firstChild);\n },\n contents: function contents(elem) {\n if (elem.contentDocument != null && // Support: IE 11+\n // elements with no `data` attribute has an object\n // `contentDocument` with a `null` prototype.\n getProto(elem.contentDocument)) {\n return elem.contentDocument;\n } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n // Treat the template element as a regular one in browsers that\n // don\'t support it.\n\n\n if (nodeName(elem, "template")) {\n elem = elem.content || elem;\n }\n\n return jQuery.merge([], elem.childNodes);\n }\n }, function (name, fn) {\n jQuery.fn[name] = function (until, selector) {\n var matched = jQuery.map(this, fn, until);\n\n if (name.slice(-5) !== "Until") {\n selector = until;\n }\n\n if (selector && typeof selector === "string") {\n matched = jQuery.filter(selector, matched);\n }\n\n if (this.length > 1) {\n // Remove duplicates\n if (!guaranteedUnique[name]) {\n jQuery.uniqueSort(matched);\n } // Reverse order for parents* and prev-derivatives\n\n\n if (rparentsprev.test(name)) {\n matched.reverse();\n }\n }\n\n return this.pushStack(matched);\n };\n });\n var rnothtmlwhite = /[^\\x20\\t\\r\\n\\f]+/g; // Convert String-formatted options into Object-formatted ones\n\n function createOptions(options) {\n var object = {};\n jQuery.each(options.match(rnothtmlwhite) || [], function (_, flag) {\n object[flag] = true;\n });\n return object;\n }\n /*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * "fired" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest "memorized"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\n\n\n jQuery.Callbacks = function (options) {\n // Convert options from String-formatted to Object-formatted if needed\n // (we check in cache first)\n options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);\n\n var // Flag to know if list is currently firing\n firing,\n // Last fire value for non-forgettable lists\n memory,\n // Flag to know if list was already fired\n _fired,\n // Flag to prevent firing\n _locked,\n // Actual callback list\n list = [],\n // Queue of execution data for repeatable lists\n queue = [],\n // Index of currently firing callback (modified by add/remove as needed)\n firingIndex = -1,\n // Fire callbacks\n fire = function fire() {\n // Enforce single-firing\n _locked = _locked || options.once; // Execute callbacks for all pending executions,\n // respecting firingIndex overrides and runtime changes\n\n _fired = firing = true;\n\n for (; queue.length; firingIndex = -1) {\n memory = queue.shift();\n\n while (++firingIndex < list.length) {\n // Run callback and check for early termination\n if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {\n // Jump to end and forget the data so .add doesn\'t re-fire\n firingIndex = list.length;\n memory = false;\n }\n }\n } // Forget the data if we\'re done with it\n\n\n if (!options.memory) {\n memory = false;\n }\n\n firing = false; // Clean up if we\'re done firing for good\n\n if (_locked) {\n // Keep an empty list if we have data for future add calls\n if (memory) {\n list = []; // Otherwise, this object is spent\n } else {\n list = "";\n }\n }\n },\n // Actual Callbacks object\n self = {\n // Add a callback or a collection of callbacks to the list\n add: function add() {\n if (list) {\n // If we have memory from a past run, we should fire after adding\n if (memory && !firing) {\n firingIndex = list.length - 1;\n queue.push(memory);\n }\n\n (function add(args) {\n jQuery.each(args, function (_, arg) {\n if (isFunction(arg)) {\n if (!options.unique || !self.has(arg)) {\n list.push(arg);\n }\n } else if (arg && arg.length && toType(arg) !== "string") {\n // Inspect recursively\n add(arg);\n }\n });\n })(arguments);\n\n if (memory && !firing) {\n fire();\n }\n }\n\n return this;\n },\n // Remove a callback from the list\n remove: function remove() {\n jQuery.each(arguments, function (_, arg) {\n var index;\n\n while ((index = jQuery.inArray(arg, list, index)) > -1) {\n list.splice(index, 1); // Handle firing indexes\n\n if (index <= firingIndex) {\n firingIndex--;\n }\n }\n });\n return this;\n },\n // Check if a given callback is in the list.\n // If no argument is given, return whether or not list has callbacks attached.\n has: function has(fn) {\n return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;\n },\n // Remove all callbacks from the list\n empty: function empty() {\n if (list) {\n list = [];\n }\n\n return this;\n },\n // Disable .fire and .add\n // Abort any current/pending executions\n // Clear all callbacks and values\n disable: function disable() {\n _locked = queue = [];\n list = memory = "";\n return this;\n },\n disabled: function disabled() {\n return !list;\n },\n // Disable .fire\n // Also disable .add unless we have memory (since it would have no effect)\n // Abort any pending executions\n lock: function lock() {\n _locked = queue = [];\n\n if (!memory && !firing) {\n list = memory = "";\n }\n\n return this;\n },\n locked: function locked() {\n return !!_locked;\n },\n // Call all callbacks with the given context and arguments\n fireWith: function fireWith(context, args) {\n if (!_locked) {\n args = args || [];\n args = [context, args.slice ? args.slice() : args];\n queue.push(args);\n\n if (!firing) {\n fire();\n }\n }\n\n return this;\n },\n // Call all the callbacks with the given arguments\n fire: function fire() {\n self.fireWith(this, arguments);\n return this;\n },\n // To know if the callbacks have already been called at least once\n fired: function fired() {\n return !!_fired;\n }\n };\n\n return self;\n };\n\n function Identity(v) {\n return v;\n }\n\n function Thrower(ex) {\n throw ex;\n }\n\n function adoptValue(value, resolve, reject, noValue) {\n var method;\n\n try {\n // Check for promise aspect first to privilege synchronous behavior\n if (value && isFunction(method = value.promise)) {\n method.call(value).done(resolve).fail(reject); // Other thenables\n } else if (value && isFunction(method = value.then)) {\n method.call(value, resolve, reject); // Other non-thenables\n } else {\n // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n // * false: [ value ].slice( 0 ) => resolve( value )\n // * true: [ value ].slice( 1 ) => resolve()\n resolve.apply(undefined, [value].slice(noValue));\n } // For Promises/A+, convert exceptions into rejections\n // Since jQuery.when doesn\'t unwrap thenables, we can skip the extra checks appearing in\n // Deferred#then to conditionally suppress rejection.\n\n } catch (value) {\n // Support: Android 4.0 only\n // Strict mode functions invoked without .call/.apply get global-object context\n reject.apply(undefined, [value]);\n }\n }\n\n jQuery.extend({\n Deferred: function Deferred(func) {\n var tuples = [// action, add listener, callbacks,\n // ... .then handlers, argument index, [final state]\n ["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"]],\n _state = "pending",\n _promise = {\n state: function state() {\n return _state;\n },\n always: function always() {\n deferred.done(arguments).fail(arguments);\n return this;\n },\n "catch": function _catch(fn) {\n return _promise.then(null, fn);\n },\n // Keep pipe for back-compat\n pipe: function\n /* fnDone, fnFail, fnProgress */\n pipe() {\n var fns = arguments;\n return jQuery.Deferred(function (newDefer) {\n jQuery.each(tuples, function (_i, tuple) {\n // Map tuples (progress, done, fail) to arguments (done, fail, progress)\n var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]]; // deferred.progress(function() { bind to newDefer or newDefer.notify })\n // deferred.done(function() { bind to newDefer or newDefer.resolve })\n // deferred.fail(function() { bind to newDefer or newDefer.reject })\n\n deferred[tuple[1]](function () {\n var returned = fn && fn.apply(this, arguments);\n\n if (returned && isFunction(returned.promise)) {\n returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);\n } else {\n newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments);\n }\n });\n });\n fns = null;\n }).promise();\n },\n then: function then(onFulfilled, onRejected, onProgress) {\n var maxDepth = 0;\n\n function resolve(depth, deferred, handler, special) {\n return function () {\n var that = this,\n args = arguments,\n mightThrow = function mightThrow() {\n var returned, then; // Support: Promises/A+ section 2.3.3.3.3\n // https://promisesaplus.com/#point-59\n // Ignore double-resolution attempts\n\n if (depth < maxDepth) {\n return;\n }\n\n returned = handler.apply(that, args); // Support: Promises/A+ section 2.3.1\n // https://promisesaplus.com/#point-48\n\n if (returned === deferred.promise()) {\n throw new TypeError("Thenable self-resolution");\n } // Support: Promises/A+ sections 2.3.3.1, 3.5\n // https://promisesaplus.com/#point-54\n // https://promisesaplus.com/#point-75\n // Retrieve `then` only once\n\n\n then = returned && ( // Support: Promises/A+ section 2.3.4\n // https://promisesaplus.com/#point-64\n // Only check objects and functions for thenability\n _typeof(returned) === "object" || typeof returned === "function") && returned.then; // Handle a returned thenable\n\n if (isFunction(then)) {\n // Special processors (notify) just wait for resolution\n if (special) {\n then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special)); // Normal processors (resolve) also hook into progress\n } else {\n // ...and disregard older resolution values\n maxDepth++;\n then.call(returned, resolve(maxDepth, deferred, Identity, special), resolve(maxDepth, deferred, Thrower, special), resolve(maxDepth, deferred, Identity, deferred.notifyWith));\n } // Handle all other returned values\n\n } else {\n // Only substitute handlers pass on context\n // and multiple values (non-spec behavior)\n if (handler !== Identity) {\n that = undefined;\n args = [returned];\n } // Process the value(s)\n // Default process is resolve\n\n\n (special || deferred.resolveWith)(that, args);\n }\n },\n // Only normal processors (resolve) catch and reject exceptions\n process = special ? mightThrow : function () {\n try {\n mightThrow();\n } catch (e) {\n if (jQuery.Deferred.exceptionHook) {\n jQuery.Deferred.exceptionHook(e, process.error);\n } // Support: Promises/A+ section 2.3.3.3.4.1\n // https://promisesaplus.com/#point-61\n // Ignore post-resolution exceptions\n\n\n if (depth + 1 >= maxDepth) {\n // Only substitute handlers pass on context\n // and multiple values (non-spec behavior)\n if (handler !== Thrower) {\n that = undefined;\n args = [e];\n }\n\n deferred.rejectWith(that, args);\n }\n }\n }; // Support: Promises/A+ section 2.3.3.3.1\n // https://promisesaplus.com/#point-57\n // Re-resolve promises immediately to dodge false rejection from\n // subsequent errors\n\n\n if (depth) {\n process();\n } else {\n // Call an optional hook to record the error, in case of exception\n // since it\'s otherwise lost when execution goes async\n if (jQuery.Deferred.getErrorHook) {\n process.error = jQuery.Deferred.getErrorHook(); // The deprecated alias of the above. While the name suggests\n // returning the stack, not an error instance, jQuery just passes\n // it directly to `console.warn` so both will work; an instance\n // just better cooperates with source maps.\n } else if (jQuery.Deferred.getStackHook) {\n process.error = jQuery.Deferred.getStackHook();\n }\n\n window.setTimeout(process);\n }\n };\n }\n\n return jQuery.Deferred(function (newDefer) {\n // progress_handlers.add( ... )\n tuples[0][3].add(resolve(0, newDefer, isFunction(onProgress) ? onProgress : Identity, newDefer.notifyWith)); // fulfilled_handlers.add( ... )\n\n tuples[1][3].add(resolve(0, newDefer, isFunction(onFulfilled) ? onFulfilled : Identity)); // rejected_handlers.add( ... )\n\n tuples[2][3].add(resolve(0, newDefer, isFunction(onRejected) ? onRejected : Thrower));\n }).promise();\n },\n // Get a promise for this deferred\n // If obj is provided, the promise aspect is added to the object\n promise: function promise(obj) {\n return obj != null ? jQuery.extend(obj, _promise) : _promise;\n }\n },\n deferred = {}; // Add list-specific methods\n\n jQuery.each(tuples, function (i, tuple) {\n var list = tuple[2],\n stateString = tuple[5]; // promise.progress = list.add\n // promise.done = list.add\n // promise.fail = list.add\n\n _promise[tuple[1]] = list.add; // Handle state\n\n if (stateString) {\n list.add(function () {\n // state = "resolved" (i.e., fulfilled)\n // state = "rejected"\n _state = stateString;\n }, // rejected_callbacks.disable\n // fulfilled_callbacks.disable\n tuples[3 - i][2].disable, // rejected_handlers.disable\n // fulfilled_handlers.disable\n tuples[3 - i][3].disable, // progress_callbacks.lock\n tuples[0][2].lock, // progress_handlers.lock\n tuples[0][3].lock);\n } // progress_handlers.fire\n // fulfilled_handlers.fire\n // rejected_handlers.fire\n\n\n list.add(tuple[3].fire); // deferred.notify = function() { deferred.notifyWith(...) }\n // deferred.resolve = function() { deferred.resolveWith(...) }\n // deferred.reject = function() { deferred.rejectWith(...) }\n\n deferred[tuple[0]] = function () {\n deferred[tuple[0] + "With"](this === deferred ? undefined : this, arguments);\n return this;\n }; // deferred.notifyWith = list.fireWith\n // deferred.resolveWith = list.fireWith\n // deferred.rejectWith = list.fireWith\n\n\n deferred[tuple[0] + "With"] = list.fireWith;\n }); // Make the deferred a promise\n\n _promise.promise(deferred); // Call given func if any\n\n\n if (func) {\n func.call(deferred, deferred);\n } // All done!\n\n\n return deferred;\n },\n // Deferred helper\n when: function when(singleValue) {\n var // count of uncompleted subordinates\n remaining = arguments.length,\n // count of unprocessed arguments\n i = remaining,\n // subordinate fulfillment data\n resolveContexts = Array(i),\n resolveValues = _slice.call(arguments),\n // the primary Deferred\n primary = jQuery.Deferred(),\n // subordinate callback factory\n updateFunc = function updateFunc(i) {\n return function (value) {\n resolveContexts[i] = this;\n resolveValues[i] = arguments.length > 1 ? _slice.call(arguments) : value;\n\n if (! --remaining) {\n primary.resolveWith(resolveContexts, resolveValues);\n }\n };\n }; // Single- and empty arguments are adopted like Promise.resolve\n\n\n if (remaining <= 1) {\n adoptValue(singleValue, primary.done(updateFunc(i)).resolve, primary.reject, !remaining); // Use .then() to unwrap secondary thenables (cf. gh-3000)\n\n if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {\n return primary.then();\n }\n } // Multiple arguments are aggregated like Promise.all array elements\n\n\n while (i--) {\n adoptValue(resolveValues[i], updateFunc(i), primary.reject);\n }\n\n return primary.promise();\n }\n }); // These usually indicate a programmer mistake during development,\n // warn about them ASAP rather than swallowing them by default.\n\n var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; // If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n // captured before the async barrier to get the original error cause\n // which may otherwise be hidden.\n\n jQuery.Deferred.exceptionHook = function (error, asyncError) {\n // Support: IE 8 - 9 only\n // Console exists when dev tools are open, which can happen at any time\n if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {\n window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, asyncError);\n }\n };\n\n jQuery.readyException = function (error) {\n window.setTimeout(function () {\n throw error;\n });\n }; // The deferred used on DOM ready\n\n\n var readyList = jQuery.Deferred();\n\n jQuery.fn.ready = function (fn) {\n readyList.then(fn) // Wrap jQuery.readyException in a function so that the lookup\n // happens at the time of error handling instead of callback\n // registration.\n ["catch"](function (error) {\n jQuery.readyException(error);\n });\n return this;\n };\n\n jQuery.extend({\n // Is the DOM ready to be used? Set to true once it occurs.\n isReady: false,\n // A counter to track how many items to wait for before\n // the ready event fires. See trac-6781\n readyWait: 1,\n // Handle when the DOM is ready\n ready: function ready(wait) {\n // Abort if there are pending holds or we\'re already ready\n if (wait === true ? --jQuery.readyWait : jQuery.isReady) {\n return;\n } // Remember that the DOM is ready\n\n\n jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be\n\n if (wait !== true && --jQuery.readyWait > 0) {\n return;\n } // If there are functions bound, to execute\n\n\n readyList.resolveWith(document, [jQuery]);\n }\n });\n jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method\n\n function completed() {\n document.removeEventListener("DOMContentLoaded", completed);\n window.removeEventListener("load", completed);\n jQuery.ready();\n } // Catch cases where $(document).ready() is called\n // after the browser event has already occurred.\n // Support: IE <=9 - 10 only\n // Older IE sometimes signals "interactive" too soon\n\n\n if (document.readyState === "complete" || document.readyState !== "loading" && !document.documentElement.doScroll) {\n // Handle it asynchronously to allow scripts the opportunity to delay ready\n window.setTimeout(jQuery.ready);\n } else {\n // Use the handy event callback\n document.addEventListener("DOMContentLoaded", completed); // A fallback to window.onload, that will always work\n\n window.addEventListener("load", completed);\n } // Multifunctional method to get and set values of a collection\n // The value/s can optionally be executed if it\'s a function\n\n\n var access = function access(elems, fn, key, value, chainable, emptyGet, raw) {\n var i = 0,\n len = elems.length,\n bulk = key == null; // Sets many values\n\n if (toType(key) === "object") {\n chainable = true;\n\n for (i in key) {\n access(elems, fn, i, key[i], true, emptyGet, raw);\n } // Sets one value\n\n } else if (value !== undefined) {\n chainable = true;\n\n if (!isFunction(value)) {\n raw = true;\n }\n\n if (bulk) {\n // Bulk operations run against the entire set\n if (raw) {\n fn.call(elems, value);\n fn = null; // ...except when executing function values\n } else {\n bulk = fn;\n\n fn = function fn(elem, _key, value) {\n return bulk.call(jQuery(elem), value);\n };\n }\n }\n\n if (fn) {\n for (; i < len; i++) {\n fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));\n }\n }\n }\n\n if (chainable) {\n return elems;\n } // Gets\n\n\n if (bulk) {\n return fn.call(elems);\n }\n\n return len ? fn(elems[0], key) : emptyGet;\n }; // Matches dashed string for camelizing\n\n\n var rmsPrefix = /^-ms-/,\n rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace()\n\n function fcamelCase(_all, letter) {\n return letter.toUpperCase();\n } // Convert dashed to camelCase; used by the css and data modules\n // Support: IE <=9 - 11, Edge 12 - 15\n // Microsoft forgot to hump their vendor prefix (trac-9572)\n\n\n function camelCase(string) {\n return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);\n }\n\n var acceptData = function acceptData(owner) {\n // Accepts only:\n // - Node\n // - Node.ELEMENT_NODE\n // - Node.DOCUMENT_NODE\n // - Object\n // - Any\n return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;\n };\n\n function Data() {\n this.expando = jQuery.expando + Data.uid++;\n }\n\n Data.uid = 1;\n Data.prototype = {\n cache: function cache(owner) {\n // Check if the owner object already has a cache\n var value = owner[this.expando]; // If not, create one\n\n if (!value) {\n value = {}; // We can accept data for non-element nodes in modern browsers,\n // but we should not, see trac-8335.\n // Always return an empty object.\n\n if (acceptData(owner)) {\n // If it is a node unlikely to be stringify-ed or looped over\n // use plain assignment\n if (owner.nodeType) {\n owner[this.expando] = value; // Otherwise secure it in a non-enumerable property\n // configurable must be true to allow the property to be\n // deleted when data is removed\n } else {\n Object.defineProperty(owner, this.expando, {\n value: value,\n configurable: true\n });\n }\n }\n }\n\n return value;\n },\n set: function set(owner, data, value) {\n var prop,\n cache = this.cache(owner); // Handle: [ owner, key, value ] args\n // Always use camelCase key (gh-2257)\n\n if (typeof data === "string") {\n cache[camelCase(data)] = value; // Handle: [ owner, { properties } ] args\n } else {\n // Copy the properties one-by-one to the cache object\n for (prop in data) {\n cache[camelCase(prop)] = data[prop];\n }\n }\n\n return cache;\n },\n get: function get(owner, key) {\n return key === undefined ? this.cache(owner) : // Always use camelCase key (gh-2257)\n owner[this.expando] && owner[this.expando][camelCase(key)];\n },\n access: function access(owner, key, value) {\n // In cases where either:\n //\n // 1. No key was specified\n // 2. A string key was specified, but no value provided\n //\n // Take the "read" path and allow the get method to determine\n // which value to return, respectively either:\n //\n // 1. The entire cache object\n // 2. The data stored at the key\n //\n if (key === undefined || key && typeof key === "string" && value === undefined) {\n return this.get(owner, key);\n } // When the key is not a string, or both a key and value\n // are specified, set or extend (existing objects) with either:\n //\n // 1. An object of properties\n // 2. A key and value\n //\n\n\n this.set(owner, key, value); // Since the "set" path can have two possible entry points\n // return the expected data based on which path was taken[*]\n\n return value !== undefined ? value : key;\n },\n remove: function remove(owner, key) {\n var i,\n cache = owner[this.expando];\n\n if (cache === undefined) {\n return;\n }\n\n if (key !== undefined) {\n // Support array or space separated string of keys\n if (Array.isArray(key)) {\n // If key is an array of keys...\n // We always set camelCase keys, so remove that.\n key = key.map(camelCase);\n } else {\n key = camelCase(key); // If a key with the spaces exists, use it.\n // Otherwise, create an array by matching non-whitespace\n\n key = key in cache ? [key] : key.match(rnothtmlwhite) || [];\n }\n\n i = key.length;\n\n while (i--) {\n delete cache[key[i]];\n }\n } // Remove the expando if there\'s no more data\n\n\n if (key === undefined || jQuery.isEmptyObject(cache)) {\n // Support: Chrome <=35 - 45\n // Webkit & Blink performance suffers when deleting properties\n // from DOM nodes, so set to undefined instead\n // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n if (owner.nodeType) {\n owner[this.expando] = undefined;\n } else {\n delete owner[this.expando];\n }\n }\n },\n hasData: function hasData(owner) {\n var cache = owner[this.expando];\n return cache !== undefined && !jQuery.isEmptyObject(cache);\n }\n };\n var dataPriv = new Data();\n var dataUser = new Data(); //\tImplementation Summary\n //\n //\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n //\t2. Improve the module\'s maintainability by reducing the storage\n //\t\tpaths to a single mechanism.\n //\t3. Use the same single mechanism to support "private" and "user" data.\n //\t4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)\n //\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n //\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\n var rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n rmultiDash = /[A-Z]/g;\n\n function getData(data) {\n if (data === "true") {\n return true;\n }\n\n if (data === "false") {\n return false;\n }\n\n if (data === "null") {\n return null;\n } // Only convert to a number if it doesn\'t change the string\n\n\n if (data === +data + "") {\n return +data;\n }\n\n if (rbrace.test(data)) {\n return JSON.parse(data);\n }\n\n return data;\n }\n\n function dataAttr(elem, key, data) {\n var name; // If nothing was found internally, try to fetch any\n // data from the HTML5 data-* attribute\n\n if (data === undefined && elem.nodeType === 1) {\n name = "data-" + key.replace(rmultiDash, "-$&").toLowerCase();\n data = elem.getAttribute(name);\n\n if (typeof data === "string") {\n try {\n data = getData(data);\n } catch (e) {} // Make sure we set the data so it isn\'t changed later\n\n\n dataUser.set(elem, key, data);\n } else {\n data = undefined;\n }\n }\n\n return data;\n }\n\n jQuery.extend({\n hasData: function hasData(elem) {\n return dataUser.hasData(elem) || dataPriv.hasData(elem);\n },\n data: function data(elem, name, _data) {\n return dataUser.access(elem, name, _data);\n },\n removeData: function removeData(elem, name) {\n dataUser.remove(elem, name);\n },\n // TODO: Now that all calls to _data and _removeData have been replaced\n // with direct calls to dataPriv methods, these can be deprecated.\n _data: function _data(elem, name, data) {\n return dataPriv.access(elem, name, data);\n },\n _removeData: function _removeData(elem, name) {\n dataPriv.remove(elem, name);\n }\n });\n jQuery.fn.extend({\n data: function data(key, value) {\n var i,\n name,\n data,\n elem = this[0],\n attrs = elem && elem.attributes; // Gets all values\n\n if (key === undefined) {\n if (this.length) {\n data = dataUser.get(elem);\n\n if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {\n i = attrs.length;\n\n while (i--) {\n // Support: IE 11 only\n // The attrs elements can be null (trac-14894)\n if (attrs[i]) {\n name = attrs[i].name;\n\n if (name.indexOf("data-") === 0) {\n name = camelCase(name.slice(5));\n dataAttr(elem, name, data[name]);\n }\n }\n }\n\n dataPriv.set(elem, "hasDataAttrs", true);\n }\n }\n\n return data;\n } // Sets multiple values\n\n\n if (_typeof(key) === "object") {\n return this.each(function () {\n dataUser.set(this, key);\n });\n }\n\n return access(this, function (value) {\n var data; // The calling jQuery object (element matches) is not empty\n // (and therefore has an element appears at this[ 0 ]) and the\n // `value` parameter was not undefined. An empty jQuery object\n // will result in `undefined` for elem = this[ 0 ] which will\n // throw an exception if an attempt to read a data cache is made.\n\n if (elem && value === undefined) {\n // Attempt to get data from the cache\n // The key will always be camelCased in Data\n data = dataUser.get(elem, key);\n\n if (data !== undefined) {\n return data;\n } // Attempt to "discover" the data in\n // HTML5 custom data-* attrs\n\n\n data = dataAttr(elem, key);\n\n if (data !== undefined) {\n return data;\n } // We tried really hard, but the data doesn\'t exist.\n\n\n return;\n } // Set the data...\n\n\n this.each(function () {\n // We always store the camelCased key\n dataUser.set(this, key, value);\n });\n }, null, value, arguments.length > 1, null, true);\n },\n removeData: function removeData(key) {\n return this.each(function () {\n dataUser.remove(this, key);\n });\n }\n });\n jQuery.extend({\n queue: function queue(elem, type, data) {\n var queue;\n\n if (elem) {\n type = (type || "fx") + "queue";\n queue = dataPriv.get(elem, type); // Speed up dequeue by getting out quickly if this is just a lookup\n\n if (data) {\n if (!queue || Array.isArray(data)) {\n queue = dataPriv.access(elem, type, jQuery.makeArray(data));\n } else {\n queue.push(data);\n }\n }\n\n return queue || [];\n }\n },\n dequeue: function dequeue(elem, type) {\n type = type || "fx";\n\n var queue = jQuery.queue(elem, type),\n startLength = queue.length,\n fn = queue.shift(),\n hooks = jQuery._queueHooks(elem, type),\n next = function next() {\n jQuery.dequeue(elem, type);\n }; // If the fx queue is dequeued, always remove the progress sentinel\n\n\n if (fn === "inprogress") {\n fn = queue.shift();\n startLength--;\n }\n\n if (fn) {\n // Add a progress sentinel to prevent the fx queue from being\n // automatically dequeued\n if (type === "fx") {\n queue.unshift("inprogress");\n } // Clear up the last queue stop function\n\n\n delete hooks.stop;\n fn.call(elem, next, hooks);\n }\n\n if (!startLength && hooks) {\n hooks.empty.fire();\n }\n },\n // Not public - generate a queueHooks object, or return the current one\n _queueHooks: function _queueHooks(elem, type) {\n var key = type + "queueHooks";\n return dataPriv.get(elem, key) || dataPriv.access(elem, key, {\n empty: jQuery.Callbacks("once memory").add(function () {\n dataPriv.remove(elem, [type + "queue", key]);\n })\n });\n }\n });\n jQuery.fn.extend({\n queue: function queue(type, data) {\n var setter = 2;\n\n if (typeof type !== "string") {\n data = type;\n type = "fx";\n setter--;\n }\n\n if (arguments.length < setter) {\n return jQuery.queue(this[0], type);\n }\n\n return data === undefined ? this : this.each(function () {\n var queue = jQuery.queue(this, type, data); // Ensure a hooks for this queue\n\n jQuery._queueHooks(this, type);\n\n if (type === "fx" && queue[0] !== "inprogress") {\n jQuery.dequeue(this, type);\n }\n });\n },\n dequeue: function dequeue(type) {\n return this.each(function () {\n jQuery.dequeue(this, type);\n });\n },\n clearQueue: function clearQueue(type) {\n return this.queue(type || "fx", []);\n },\n // Get a promise resolved when queues of a certain type\n // are emptied (fx is the type by default)\n promise: function promise(type, obj) {\n var tmp,\n count = 1,\n defer = jQuery.Deferred(),\n elements = this,\n i = this.length,\n resolve = function resolve() {\n if (! --count) {\n defer.resolveWith(elements, [elements]);\n }\n };\n\n if (typeof type !== "string") {\n obj = type;\n type = undefined;\n }\n\n type = type || "fx";\n\n while (i--) {\n tmp = dataPriv.get(elements[i], type + "queueHooks");\n\n if (tmp && tmp.empty) {\n count++;\n tmp.empty.add(resolve);\n }\n }\n\n resolve();\n return defer.promise(obj);\n }\n });\n var pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;\n var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");\n var cssExpand = ["Top", "Right", "Bottom", "Left"];\n var documentElement = document.documentElement;\n\n var isAttached = function isAttached(elem) {\n return jQuery.contains(elem.ownerDocument, elem);\n },\n composed = {\n composed: true\n }; // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n // Check attachment across shadow DOM boundaries when possible (gh-3504)\n // Support: iOS 10.0-10.2 only\n // Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n // leading to errors. We need to check for `getRootNode`.\n\n\n if (documentElement.getRootNode) {\n isAttached = function isAttached(elem) {\n return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;\n };\n }\n\n var isHiddenWithinTree = function isHiddenWithinTree(elem, el) {\n // isHiddenWithinTree might be called from jQuery#filter function;\n // in that case, element will be second argument\n elem = el || elem; // Inline style trumps all\n\n return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style\n // Support: Firefox <=43 - 45\n // Disconnected elements can have computed display: none, so first confirm that elem is\n // in the document.\n isAttached(elem) && jQuery.css(elem, "display") === "none";\n };\n\n function adjustCSS(elem, prop, valueParts, tween) {\n var adjusted,\n scale,\n maxIterations = 20,\n currentValue = tween ? function () {\n return tween.cur();\n } : function () {\n return jQuery.css(elem, prop, "");\n },\n initial = currentValue(),\n unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"),\n // Starting value computation is required for potential unit mismatches\n initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));\n\n if (initialInUnit && initialInUnit[3] !== unit) {\n // Support: Firefox <=54\n // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n initial = initial / 2; // Trust units reported by jQuery.css\n\n unit = unit || initialInUnit[3]; // Iteratively approximate from a nonzero starting point\n\n initialInUnit = +initial || 1;\n\n while (maxIterations--) {\n // Evaluate and update our best guess (doubling guesses that zero out).\n // Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n jQuery.style(elem, prop, initialInUnit + unit);\n\n if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {\n maxIterations = 0;\n }\n\n initialInUnit = initialInUnit / scale;\n }\n\n initialInUnit = initialInUnit * 2;\n jQuery.style(elem, prop, initialInUnit + unit); // Make sure we update the tween properties later on\n\n valueParts = valueParts || [];\n }\n\n if (valueParts) {\n initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified\n\n adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];\n\n if (tween) {\n tween.unit = unit;\n tween.start = initialInUnit;\n tween.end = adjusted;\n }\n }\n\n return adjusted;\n }\n\n var defaultDisplayMap = {};\n\n function getDefaultDisplay(elem) {\n var temp,\n doc = elem.ownerDocument,\n nodeName = elem.nodeName,\n display = defaultDisplayMap[nodeName];\n\n if (display) {\n return display;\n }\n\n temp = doc.body.appendChild(doc.createElement(nodeName));\n display = jQuery.css(temp, "display");\n temp.parentNode.removeChild(temp);\n\n if (display === "none") {\n display = "block";\n }\n\n defaultDisplayMap[nodeName] = display;\n return display;\n }\n\n function showHide(elements, show) {\n var display,\n elem,\n values = [],\n index = 0,\n length = elements.length; // Determine new display value for elements that need to change\n\n for (; index < length; index++) {\n elem = elements[index];\n\n if (!elem.style) {\n continue;\n }\n\n display = elem.style.display;\n\n if (show) {\n // Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n // check is required in this first loop unless we have a nonempty display value (either\n // inline or about-to-be-restored)\n if (display === "none") {\n values[index] = dataPriv.get(elem, "display") || null;\n\n if (!values[index]) {\n elem.style.display = "";\n }\n }\n\n if (elem.style.display === "" && isHiddenWithinTree(elem)) {\n values[index] = getDefaultDisplay(elem);\n }\n } else {\n if (display !== "none") {\n values[index] = "none"; // Remember what we\'re overwriting\n\n dataPriv.set(elem, "display", display);\n }\n }\n } // Set the display of the elements in a second loop to avoid constant reflow\n\n\n for (index = 0; index < length; index++) {\n if (values[index] != null) {\n elements[index].style.display = values[index];\n }\n }\n\n return elements;\n }\n\n jQuery.fn.extend({\n show: function show() {\n return showHide(this, true);\n },\n hide: function hide() {\n return showHide(this);\n },\n toggle: function toggle(state) {\n if (typeof state === "boolean") {\n return state ? this.show() : this.hide();\n }\n\n return this.each(function () {\n if (isHiddenWithinTree(this)) {\n jQuery(this).show();\n } else {\n jQuery(this).hide();\n }\n });\n }\n });\n var rcheckableType = /^(?:checkbox|radio)$/i;\n var rtagName = /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i;\n var rscriptType = /^$|^module$|\\/(?:java|ecma)script/i;\n\n (function () {\n var fragment = document.createDocumentFragment(),\n div = fragment.appendChild(document.createElement("div")),\n input = document.createElement("input"); // Support: Android 4.0 - 4.3 only\n // Check state lost if the name is set (trac-11217)\n // Support: Windows Web Apps (WWA)\n // `name` and `type` must use .setAttribute for WWA (trac-14901)\n\n input.setAttribute("type", "radio");\n input.setAttribute("checked", "checked");\n input.setAttribute("name", "t");\n div.appendChild(input); // Support: Android <=4.1 only\n // Older WebKit doesn\'t clone checked state correctly in fragments\n\n support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; // Support: IE <=11 only\n // Make sure textarea (and checkbox) defaultValue is properly cloned\n\n div.innerHTML = "";\n support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; // Support: IE <=9 only\n // IE <=9 replaces ";\n support.option = !!div.lastChild;\n })(); // We have to close these tags to support XHTML (trac-13200)\n\n\n var wrapMap = {\n // XHTML parsers do not magically insert elements in the\n // same way that tag soup parsers do. So we cannot shorten\n // this by omitting or other required elements.\n thead: [1, "", "
"],\n col: [2, "", "
"],\n tr: [2, "", "
"],\n td: [3, "", "
"],\n _default: [0, "", ""]\n };\n wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\n wrapMap.th = wrapMap.td; // Support: IE <=9 only\n\n if (!support.option) {\n wrapMap.optgroup = wrapMap.option = [1, ""];\n }\n\n function getAll(context, tag) {\n // Support: IE <=9 - 11 only\n // Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n var ret;\n\n if (typeof context.getElementsByTagName !== "undefined") {\n ret = context.getElementsByTagName(tag || "*");\n } else if (typeof context.querySelectorAll !== "undefined") {\n ret = context.querySelectorAll(tag || "*");\n } else {\n ret = [];\n }\n\n if (tag === undefined || tag && nodeName(context, tag)) {\n return jQuery.merge([context], ret);\n }\n\n return ret;\n } // Mark scripts as having already been evaluated\n\n\n function setGlobalEval(elems, refElements) {\n var i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval"));\n }\n }\n\n var rhtml = /<|&#?\\w+;/;\n\n function buildFragment(elems, context, scripts, selection, ignored) {\n var elem,\n tmp,\n tag,\n wrap,\n attached,\n j,\n fragment = context.createDocumentFragment(),\n nodes = [],\n i = 0,\n l = elems.length;\n\n for (; i < l; i++) {\n elem = elems[i];\n\n if (elem || elem === 0) {\n // Add nodes directly\n if (toType(elem) === "object") {\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge(nodes, elem.nodeType ? [elem] : elem); // Convert non-html into a text node\n } else if (!rhtml.test(elem)) {\n nodes.push(context.createTextNode(elem)); // Convert html into DOM nodes\n } else {\n tmp = tmp || fragment.appendChild(context.createElement("div")); // Deserialize a standard representation\n\n tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2]; // Descend through wrappers to the right content\n\n j = wrap[0];\n\n while (j--) {\n tmp = tmp.lastChild;\n } // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n\n\n jQuery.merge(nodes, tmp.childNodes); // Remember the top-level container\n\n tmp = fragment.firstChild; // Ensure the created nodes are orphaned (trac-12392)\n\n tmp.textContent = "";\n }\n }\n } // Remove wrapper from fragment\n\n\n fragment.textContent = "";\n i = 0;\n\n while (elem = nodes[i++]) {\n // Skip elements already in the context collection (trac-4087)\n if (selection && jQuery.inArray(elem, selection) > -1) {\n if (ignored) {\n ignored.push(elem);\n }\n\n continue;\n }\n\n attached = isAttached(elem); // Append to fragment\n\n tmp = getAll(fragment.appendChild(elem), "script"); // Preserve script evaluation history\n\n if (attached) {\n setGlobalEval(tmp);\n } // Capture executables\n\n\n if (scripts) {\n j = 0;\n\n while (elem = tmp[j++]) {\n if (rscriptType.test(elem.type || "")) {\n scripts.push(elem);\n }\n }\n }\n }\n\n return fragment;\n }\n\n var rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\n function returnTrue() {\n return true;\n }\n\n function returnFalse() {\n return false;\n }\n\n function _on(elem, types, selector, data, fn, one) {\n var origFn, type; // Types can be a map of types/handlers\n\n if (_typeof(types) === "object") {\n // ( types-Object, selector, data )\n if (typeof selector !== "string") {\n // ( types-Object, data )\n data = data || selector;\n selector = undefined;\n }\n\n for (type in types) {\n _on(elem, type, selector, data, types[type], one);\n }\n\n return elem;\n }\n\n if (data == null && fn == null) {\n // ( types, fn )\n fn = selector;\n data = selector = undefined;\n } else if (fn == null) {\n if (typeof selector === "string") {\n // ( types, selector, fn )\n fn = data;\n data = undefined;\n } else {\n // ( types, data, fn )\n fn = data;\n data = selector;\n selector = undefined;\n }\n }\n\n if (fn === false) {\n fn = returnFalse;\n } else if (!fn) {\n return elem;\n }\n\n if (one === 1) {\n origFn = fn;\n\n fn = function fn(event) {\n // Can use an empty set, since event contains the info\n jQuery().off(event);\n return origFn.apply(this, arguments);\n }; // Use same guid so caller can remove using origFn\n\n\n fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);\n }\n\n return elem.each(function () {\n jQuery.event.add(this, types, fn, data, selector);\n });\n }\n /*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards\' addEvent library for many of the ideas.\n */\n\n\n jQuery.event = {\n global: {},\n add: function add(elem, types, handler, data, selector) {\n var handleObjIn,\n eventHandle,\n tmp,\n events,\n t,\n handleObj,\n special,\n handlers,\n type,\n namespaces,\n origType,\n elemData = dataPriv.get(elem); // Only attach events to objects that accept data\n\n if (!acceptData(elem)) {\n return;\n } // Caller can pass in an object of custom data in lieu of the handler\n\n\n if (handler.handler) {\n handleObjIn = handler;\n handler = handleObjIn.handler;\n selector = handleObjIn.selector;\n } // Ensure that invalid selectors throw exceptions at attach time\n // Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\n\n if (selector) {\n jQuery.find.matchesSelector(documentElement, selector);\n } // Make sure that the handler has a unique ID, used to find/remove it later\n\n\n if (!handler.guid) {\n handler.guid = jQuery.guid++;\n } // Init the element\'s event structure and main handler, if this is the first\n\n\n if (!(events = elemData.events)) {\n events = elemData.events = Object.create(null);\n }\n\n if (!(eventHandle = elemData.handle)) {\n eventHandle = elemData.handle = function (e) {\n // Discard the second event of a jQuery.event.trigger() and\n // when an event is called after a page has unloaded\n return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : undefined;\n };\n } // Handle multiple events separated by a space\n\n\n types = (types || "").match(rnothtmlwhite) || [""];\n t = types.length;\n\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || "").split(".").sort(); // There *must* be a type, no attaching namespace-only handlers\n\n if (!type) {\n continue;\n } // If event changes its type, use the special event handlers for the changed type\n\n\n special = jQuery.event.special[type] || {}; // If selector defined, determine special event api type, otherwise given type\n\n type = (selector ? special.delegateType : special.bindType) || type; // Update special based on newly reset type\n\n special = jQuery.event.special[type] || {}; // handleObj is passed to all event handlers\n\n handleObj = jQuery.extend({\n type: type,\n origType: origType,\n data: data,\n handler: handler,\n guid: handler.guid,\n selector: selector,\n needsContext: selector && jQuery.expr.match.needsContext.test(selector),\n namespace: namespaces.join(".")\n }, handleObjIn); // Init the event handler queue if we\'re the first\n\n if (!(handlers = events[type])) {\n handlers = events[type] = [];\n handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false\n\n if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {\n if (elem.addEventListener) {\n elem.addEventListener(type, eventHandle);\n }\n }\n }\n\n if (special.add) {\n special.add.call(elem, handleObj);\n\n if (!handleObj.handler.guid) {\n handleObj.handler.guid = handler.guid;\n }\n } // Add to the element\'s handler list, delegates in front\n\n\n if (selector) {\n handlers.splice(handlers.delegateCount++, 0, handleObj);\n } else {\n handlers.push(handleObj);\n } // Keep track of which events have ever been used, for event optimization\n\n\n jQuery.event.global[type] = true;\n }\n },\n // Detach an event or set of events from an element\n remove: function remove(elem, types, handler, selector, mappedTypes) {\n var j,\n origCount,\n tmp,\n events,\n t,\n handleObj,\n special,\n handlers,\n type,\n namespaces,\n origType,\n elemData = dataPriv.hasData(elem) && dataPriv.get(elem);\n\n if (!elemData || !(events = elemData.events)) {\n return;\n } // Once for each type.namespace in types; type may be omitted\n\n\n types = (types || "").match(rnothtmlwhite) || [""];\n t = types.length;\n\n while (t--) {\n tmp = rtypenamespace.exec(types[t]) || [];\n type = origType = tmp[1];\n namespaces = (tmp[2] || "").split(".").sort(); // Unbind all events (on this namespace, if provided) for the element\n\n if (!type) {\n for (type in events) {\n jQuery.event.remove(elem, type + types[t], handler, selector, true);\n }\n\n continue;\n }\n\n special = jQuery.event.special[type] || {};\n type = (selector ? special.delegateType : special.bindType) || type;\n handlers = events[type] || [];\n tmp = tmp[2] && new RegExp("(^|\\\\.)" + namespaces.join("\\\\.(?:.*\\\\.|)") + "(\\\\.|$)"); // Remove matching events\n\n origCount = j = handlers.length;\n\n while (j--) {\n handleObj = handlers[j];\n\n if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {\n handlers.splice(j, 1);\n\n if (handleObj.selector) {\n handlers.delegateCount--;\n }\n\n if (special.remove) {\n special.remove.call(elem, handleObj);\n }\n }\n } // Remove generic event handler if we removed something and no more handlers exist\n // (avoids potential for endless recursion during removal of special event handlers)\n\n\n if (origCount && !handlers.length) {\n if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {\n jQuery.removeEvent(elem, type, elemData.handle);\n }\n\n delete events[type];\n }\n } // Remove data and the expando if it\'s no longer used\n\n\n if (jQuery.isEmptyObject(events)) {\n dataPriv.remove(elem, "handle events");\n }\n },\n dispatch: function dispatch(nativeEvent) {\n var i,\n j,\n ret,\n matched,\n handleObj,\n handlerQueue,\n args = new Array(arguments.length),\n // Make a writable jQuery.Event from the native event object\n event = jQuery.event.fix(nativeEvent),\n handlers = (dataPriv.get(this, "events") || Object.create(null))[event.type] || [],\n special = jQuery.event.special[event.type] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event\n\n args[0] = event;\n\n for (i = 1; i < arguments.length; i++) {\n args[i] = arguments[i];\n }\n\n event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired\n\n if (special.preDispatch && special.preDispatch.call(this, event) === false) {\n return;\n } // Determine handlers\n\n\n handlerQueue = jQuery.event.handlers.call(this, event, handlers); // Run delegates first; they may want to stop propagation beneath us\n\n i = 0;\n\n while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {\n event.currentTarget = matched.elem;\n j = 0;\n\n while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {\n // If the event is namespaced, then each handler is only invoked if it is\n // specially universal or its namespaces are a superset of the event\'s.\n if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {\n event.handleObj = handleObj;\n event.data = handleObj.data;\n ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);\n\n if (ret !== undefined) {\n if ((event.result = ret) === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n }\n } // Call the postDispatch hook for the mapped type\n\n\n if (special.postDispatch) {\n special.postDispatch.call(this, event);\n }\n\n return event.result;\n },\n handlers: function handlers(event, _handlers) {\n var i,\n handleObj,\n sel,\n matchedHandlers,\n matchedSelectors,\n handlerQueue = [],\n delegateCount = _handlers.delegateCount,\n cur = event.target; // Find delegate handlers\n\n if (delegateCount && // Support: IE <=9\n // Black-hole SVG instance trees (trac-13180)\n cur.nodeType && // Support: Firefox <=42\n // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n // Support: IE 11 only\n // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)\n !(event.type === "click" && event.button >= 1)) {\n for (; cur !== this; cur = cur.parentNode || this) {\n // Don\'t check non-elements (trac-13208)\n // Don\'t process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {\n matchedHandlers = [];\n matchedSelectors = {};\n\n for (i = 0; i < delegateCount; i++) {\n handleObj = _handlers[i]; // Don\'t conflict with Object.prototype properties (trac-13203)\n\n sel = handleObj.selector + " ";\n\n if (matchedSelectors[sel] === undefined) {\n matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;\n }\n\n if (matchedSelectors[sel]) {\n matchedHandlers.push(handleObj);\n }\n }\n\n if (matchedHandlers.length) {\n handlerQueue.push({\n elem: cur,\n handlers: matchedHandlers\n });\n }\n }\n }\n } // Add the remaining (directly-bound) handlers\n\n\n cur = this;\n\n if (delegateCount < _handlers.length) {\n handlerQueue.push({\n elem: cur,\n handlers: _handlers.slice(delegateCount)\n });\n }\n\n return handlerQueue;\n },\n addProp: function addProp(name, hook) {\n Object.defineProperty(jQuery.Event.prototype, name, {\n enumerable: true,\n configurable: true,\n get: isFunction(hook) ? function () {\n if (this.originalEvent) {\n return hook(this.originalEvent);\n }\n } : function () {\n if (this.originalEvent) {\n return this.originalEvent[name];\n }\n },\n set: function set(value) {\n Object.defineProperty(this, name, {\n enumerable: true,\n configurable: true,\n writable: true,\n value: value\n });\n }\n });\n },\n fix: function fix(originalEvent) {\n return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);\n },\n special: {\n load: {\n // Prevent triggered image.load events from bubbling to window.load\n noBubble: true\n },\n click: {\n // Utilize native event to ensure correct state for checkable inputs\n setup: function setup(data) {\n // For mutual compressibility with _default, replace `this` access with a local var.\n // `|| data` is dead code meant only to preserve the variable through minification.\n var el = this || data; // Claim the first handler\n\n if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {\n // dataPriv.set( el, "click", ... )\n leverageNative(el, "click", true);\n } // Return false to allow normal processing in the caller\n\n\n return false;\n },\n trigger: function trigger(data) {\n // For mutual compressibility with _default, replace `this` access with a local var.\n // `|| data` is dead code meant only to preserve the variable through minification.\n var el = this || data; // Force setup before triggering a click\n\n if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {\n leverageNative(el, "click");\n } // Return non-false to allow normal event-path propagation\n\n\n return true;\n },\n // For cross-browser consistency, suppress native .click() on links\n // Also prevent it if we\'re currently inside a leveraged native-event stack\n _default: function _default(event) {\n var target = event.target;\n return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");\n }\n },\n beforeunload: {\n postDispatch: function postDispatch(event) {\n // Support: Firefox 20+\n // Firefox doesn\'t alert if the returnValue field is not set.\n if (event.result !== undefined && event.originalEvent) {\n event.originalEvent.returnValue = event.result;\n }\n }\n }\n }\n }; // Ensure the presence of an event listener that handles manually-triggered\n // synthetic events by interrupting progress until reinvoked in response to\n // *native* events that it fires directly, ensuring that state changes have\n // already occurred before other listeners are invoked.\n\n function leverageNative(el, type, isSetup) {\n // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n if (!isSetup) {\n if (dataPriv.get(el, type) === undefined) {\n jQuery.event.add(el, type, returnTrue);\n }\n\n return;\n } // Register the controller as a special universal handler for all event namespaces\n\n\n dataPriv.set(el, type, false);\n jQuery.event.add(el, type, {\n namespace: false,\n handler: function handler(event) {\n var result,\n saved = dataPriv.get(this, type);\n\n if (event.isTrigger & 1 && this[type]) {\n // Interrupt processing of the outer synthetic .trigger()ed event\n if (!saved) {\n // Store arguments for use when handling the inner native event\n // There will always be at least one argument (an event object), so this array\n // will not be confused with a leftover capture object.\n saved = _slice.call(arguments);\n dataPriv.set(this, type, saved); // Trigger the native event and capture its result\n\n this[type]();\n result = dataPriv.get(this, type);\n dataPriv.set(this, type, false);\n\n if (saved !== result) {\n // Cancel the outer synthetic event\n event.stopImmediatePropagation();\n event.preventDefault();\n return result;\n } // If this is an inner synthetic event for an event with a bubbling surrogate\n // (focus or blur), assume that the surrogate already propagated from triggering\n // the native event and prevent that from happening again here.\n // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n // bubbling surrogate propagates *after* the non-bubbling base), but that seems\n // less bad than duplication.\n\n } else if ((jQuery.event.special[type] || {}).delegateType) {\n event.stopPropagation();\n } // If this is a native event triggered above, everything is now in order\n // Fire an inner synthetic event with the original arguments\n\n } else if (saved) {\n // ...and capture the result\n dataPriv.set(this, type, jQuery.event.trigger(saved[0], saved.slice(1), this)); // Abort handling of the native event by all jQuery handlers while allowing\n // native handlers on the same element to run. On target, this is achieved\n // by stopping immediate propagation just on the jQuery event. However,\n // the native event is re-wrapped by a jQuery one on each level of the\n // propagation so the only way to stop it for jQuery is to stop it for\n // everyone via native `stopPropagation()`. This is not a problem for\n // focus/blur which don\'t bubble, but it does also stop click on checkboxes\n // and radios. We accept this limitation.\n\n event.stopPropagation();\n event.isImmediatePropagationStopped = returnTrue;\n }\n }\n });\n }\n\n jQuery.removeEvent = function (elem, type, handle) {\n // This "if" is needed for plain objects\n if (elem.removeEventListener) {\n elem.removeEventListener(type, handle);\n }\n };\n\n jQuery.Event = function (src, props) {\n // Allow instantiation without the \'new\' keyword\n if (!(this instanceof jQuery.Event)) {\n return new jQuery.Event(src, props);\n } // Event object\n\n\n if (src && src.type) {\n this.originalEvent = src;\n this.type = src.type; // Events bubbling up the document may have been marked as prevented\n // by a handler lower down the tree; reflect the correct value.\n\n this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only\n src.returnValue === false ? returnTrue : returnFalse; // Create target properties\n // Support: Safari <=6 - 7 only\n // Target should not be a text node (trac-504, trac-13143)\n\n this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;\n this.currentTarget = src.currentTarget;\n this.relatedTarget = src.relatedTarget; // Event type\n } else {\n this.type = src;\n } // Put explicitly provided properties onto the event object\n\n\n if (props) {\n jQuery.extend(this, props);\n } // Create a timestamp if incoming event doesn\'t have one\n\n\n this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed\n\n this[jQuery.expando] = true;\n }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\n\n\n jQuery.Event.prototype = {\n constructor: jQuery.Event,\n isDefaultPrevented: returnFalse,\n isPropagationStopped: returnFalse,\n isImmediatePropagationStopped: returnFalse,\n isSimulated: false,\n preventDefault: function preventDefault() {\n var e = this.originalEvent;\n this.isDefaultPrevented = returnTrue;\n\n if (e && !this.isSimulated) {\n e.preventDefault();\n }\n },\n stopPropagation: function stopPropagation() {\n var e = this.originalEvent;\n this.isPropagationStopped = returnTrue;\n\n if (e && !this.isSimulated) {\n e.stopPropagation();\n }\n },\n stopImmediatePropagation: function stopImmediatePropagation() {\n var e = this.originalEvent;\n this.isImmediatePropagationStopped = returnTrue;\n\n if (e && !this.isSimulated) {\n e.stopImmediatePropagation();\n }\n\n this.stopPropagation();\n }\n }; // Includes all common event props including KeyEvent and MouseEvent specific props\n\n jQuery.each({\n altKey: true,\n bubbles: true,\n cancelable: true,\n changedTouches: true,\n ctrlKey: true,\n detail: true,\n eventPhase: true,\n metaKey: true,\n pageX: true,\n pageY: true,\n shiftKey: true,\n view: true,\n "char": true,\n code: true,\n charCode: true,\n key: true,\n keyCode: true,\n button: true,\n buttons: true,\n clientX: true,\n clientY: true,\n offsetX: true,\n offsetY: true,\n pointerId: true,\n pointerType: true,\n screenX: true,\n screenY: true,\n targetTouches: true,\n toElement: true,\n touches: true,\n which: true\n }, jQuery.event.addProp);\n jQuery.each({\n focus: "focusin",\n blur: "focusout"\n }, function (type, delegateType) {\n function focusMappedHandler(nativeEvent) {\n if (document.documentMode) {\n // Support: IE 11+\n // Attach a single focusin/focusout handler on the document while someone wants\n // focus/blur. This is because the former are synchronous in IE while the latter\n // are async. In other browsers, all those handlers are invoked synchronously.\n // `handle` from private data would already wrap the event, but we need\n // to change the `type` here.\n var handle = dataPriv.get(this, "handle"),\n event = jQuery.event.fix(nativeEvent);\n event.type = nativeEvent.type === "focusin" ? "focus" : "blur";\n event.isSimulated = true; // First, handle focusin/focusout\n\n handle(nativeEvent); // ...then, handle focus/blur\n //\n // focus/blur don\'t bubble while focusin/focusout do; simulate the former by only\n // invoking the handler at the lower level.\n\n if (event.target === event.currentTarget) {\n // The setup part calls `leverageNative`, which, in turn, calls\n // `jQuery.event.add`, so event handle will already have been set\n // by this point.\n handle(event);\n }\n } else {\n // For non-IE browsers, attach a single capturing handler on the document\n // while someone wants focusin/focusout.\n jQuery.event.simulate(delegateType, nativeEvent.target, jQuery.event.fix(nativeEvent));\n }\n }\n\n jQuery.event.special[type] = {\n // Utilize native event if possible so blur/focus sequence is correct\n setup: function setup() {\n var attaches; // Claim the first handler\n // dataPriv.set( this, "focus", ... )\n // dataPriv.set( this, "blur", ... )\n\n leverageNative(this, type, true);\n\n if (document.documentMode) {\n // Support: IE 9 - 11+\n // We use the same native handler for focusin & focus (and focusout & blur)\n // so we need to coordinate setup & teardown parts between those events.\n // Use `delegateType` as the key as `type` is already used by `leverageNative`.\n attaches = dataPriv.get(this, delegateType);\n\n if (!attaches) {\n this.addEventListener(delegateType, focusMappedHandler);\n }\n\n dataPriv.set(this, delegateType, (attaches || 0) + 1);\n } else {\n // Return false to allow normal processing in the caller\n return false;\n }\n },\n trigger: function trigger() {\n // Force setup before trigger\n leverageNative(this, type); // Return non-false to allow normal event-path propagation\n\n return true;\n },\n teardown: function teardown() {\n var attaches;\n\n if (document.documentMode) {\n attaches = dataPriv.get(this, delegateType) - 1;\n\n if (!attaches) {\n this.removeEventListener(delegateType, focusMappedHandler);\n dataPriv.remove(this, delegateType);\n } else {\n dataPriv.set(this, delegateType, attaches);\n }\n } else {\n // Return false to indicate standard teardown should be applied\n return false;\n }\n },\n // Suppress native focus or blur if we\'re currently inside\n // a leveraged native-event stack\n _default: function _default(event) {\n return dataPriv.get(event.target, type);\n },\n delegateType: delegateType\n }; // Support: Firefox <=44\n // Firefox doesn\'t have focus(in | out) events\n // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n //\n // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n // focus(in | out) events fire after focus & blur events,\n // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n //\n // Support: IE 9 - 11+\n // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n // attach a single handler for both events in IE.\n\n jQuery.event.special[delegateType] = {\n setup: function setup() {\n // Handle: regular nodes (via `this.ownerDocument`), window\n // (via `this.document`) & document (via `this`).\n var doc = this.ownerDocument || this.document || this,\n dataHolder = document.documentMode ? this : doc,\n attaches = dataPriv.get(dataHolder, delegateType); // Support: IE 9 - 11+\n // We use the same native handler for focusin & focus (and focusout & blur)\n // so we need to coordinate setup & teardown parts between those events.\n // Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\n if (!attaches) {\n if (document.documentMode) {\n this.addEventListener(delegateType, focusMappedHandler);\n } else {\n doc.addEventListener(type, focusMappedHandler, true);\n }\n }\n\n dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1);\n },\n teardown: function teardown() {\n var doc = this.ownerDocument || this.document || this,\n dataHolder = document.documentMode ? this : doc,\n attaches = dataPriv.get(dataHolder, delegateType) - 1;\n\n if (!attaches) {\n if (document.documentMode) {\n this.removeEventListener(delegateType, focusMappedHandler);\n } else {\n doc.removeEventListener(type, focusMappedHandler, true);\n }\n\n dataPriv.remove(dataHolder, delegateType);\n } else {\n dataPriv.set(dataHolder, delegateType, attaches);\n }\n }\n };\n }); // Create mouseenter/leave events using mouseover/out and event-time checks\n // so that event delegation works in jQuery.\n // Do the same for pointerenter/pointerleave and pointerover/pointerout\n //\n // Support: Safari 7 only\n // Safari sends mouseenter too often; see:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n // for the description of the bug (it existed in older Chrome versions as well).\n\n jQuery.each({\n mouseenter: "mouseover",\n mouseleave: "mouseout",\n pointerenter: "pointerover",\n pointerleave: "pointerout"\n }, function (orig, fix) {\n jQuery.event.special[orig] = {\n delegateType: fix,\n bindType: fix,\n handle: function handle(event) {\n var ret,\n target = this,\n related = event.relatedTarget,\n handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n\n if (!related || related !== target && !jQuery.contains(target, related)) {\n event.type = handleObj.origType;\n ret = handleObj.handler.apply(this, arguments);\n event.type = fix;\n }\n\n return ret;\n }\n };\n });\n jQuery.fn.extend({\n on: function on(types, selector, data, fn) {\n return _on(this, types, selector, data, fn);\n },\n one: function one(types, selector, data, fn) {\n return _on(this, types, selector, data, fn, 1);\n },\n off: function off(types, selector, fn) {\n var handleObj, type;\n\n if (types && types.preventDefault && types.handleObj) {\n // ( event ) dispatched jQuery.Event\n handleObj = types.handleObj;\n jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler);\n return this;\n }\n\n if (_typeof(types) === "object") {\n // ( types-object [, selector] )\n for (type in types) {\n this.off(type, selector, types[type]);\n }\n\n return this;\n }\n\n if (selector === false || typeof selector === "function") {\n // ( types [, fn] )\n fn = selector;\n selector = undefined;\n }\n\n if (fn === false) {\n fn = returnFalse;\n }\n\n return this.each(function () {\n jQuery.event.remove(this, types, fn, selector);\n });\n }\n });\n var // Support: IE <=10 - 11, Edge 12 - 13 only\n // In IE/Edge using regex groups here causes severe slowdowns.\n // See https://connect.microsoft.com/IE/feedback/details/1736512/\n rnoInnerhtml = /\\s*$/g; // Prefer a tbody over its parent table for containing new rows\n\n function manipulationTarget(elem, content) {\n if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {\n return jQuery(elem).children("tbody")[0] || elem;\n }\n\n return elem;\n } // Replace/restore the type attribute of script elements for safe DOM manipulation\n\n\n function disableScript(elem) {\n elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;\n return elem;\n }\n\n function restoreScript(elem) {\n if ((elem.type || "").slice(0, 5) === "true/") {\n elem.type = elem.type.slice(5);\n } else {\n elem.removeAttribute("type");\n }\n\n return elem;\n }\n\n function cloneCopyEvent(src, dest) {\n var i, l, type, pdataOld, udataOld, udataCur, events;\n\n if (dest.nodeType !== 1) {\n return;\n } // 1. Copy private data: events, handlers, etc.\n\n\n if (dataPriv.hasData(src)) {\n pdataOld = dataPriv.get(src);\n events = pdataOld.events;\n\n if (events) {\n dataPriv.remove(dest, "handle events");\n\n for (type in events) {\n for (i = 0, l = events[type].length; i < l; i++) {\n jQuery.event.add(dest, type, events[type][i]);\n }\n }\n }\n } // 2. Copy user data\n\n\n if (dataUser.hasData(src)) {\n udataOld = dataUser.access(src);\n udataCur = jQuery.extend({}, udataOld);\n dataUser.set(dest, udataCur);\n }\n } // Fix IE bugs, see support tests\n\n\n function fixInput(src, dest) {\n var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button.\n\n if (nodeName === "input" && rcheckableType.test(src.type)) {\n dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options\n } else if (nodeName === "input" || nodeName === "textarea") {\n dest.defaultValue = src.defaultValue;\n }\n }\n\n function domManip(collection, args, callback, ignored) {\n // Flatten any nested arrays\n args = flat(args);\n var fragment,\n first,\n scripts,\n hasScripts,\n node,\n doc,\n i = 0,\n l = collection.length,\n iNoClone = l - 1,\n value = args[0],\n valueIsFunction = isFunction(value); // We can\'t cloneNode fragments that contain checked, in WebKit\n\n if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {\n return collection.each(function (index) {\n var self = collection.eq(index);\n\n if (valueIsFunction) {\n args[0] = value.call(this, index, self.html());\n }\n\n domManip(self, args, callback, ignored);\n });\n }\n\n if (l) {\n fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);\n first = fragment.firstChild;\n\n if (fragment.childNodes.length === 1) {\n fragment = first;\n } // Require either new content or an interest in ignored elements to invoke the callback\n\n\n if (first || ignored) {\n scripts = jQuery.map(getAll(fragment, "script"), disableScript);\n hasScripts = scripts.length; // Use the original fragment for the last item\n // instead of the first because it can end up\n // being emptied incorrectly in certain situations (trac-8070).\n\n for (; i < l; i++) {\n node = fragment;\n\n if (i !== iNoClone) {\n node = jQuery.clone(node, true, true); // Keep references to cloned scripts for later restoration\n\n if (hasScripts) {\n // Support: Android <=4.0 only, PhantomJS 1 only\n // push.apply(_, arraylike) throws on ancient WebKit\n jQuery.merge(scripts, getAll(node, "script"));\n }\n }\n\n callback.call(collection[i], node, i);\n }\n\n if (hasScripts) {\n doc = scripts[scripts.length - 1].ownerDocument; // Re-enable scripts\n\n jQuery.map(scripts, restoreScript); // Evaluate executable scripts on first document insertion\n\n for (i = 0; i < hasScripts; i++) {\n node = scripts[i];\n\n if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {\n if (node.src && (node.type || "").toLowerCase() !== "module") {\n // Optional AJAX dependency, but won\'t run scripts if not present\n if (jQuery._evalUrl && !node.noModule) {\n jQuery._evalUrl(node.src, {\n nonce: node.nonce || node.getAttribute("nonce")\n }, doc);\n }\n } else {\n // Unwrap a CDATA section containing script contents. This shouldn\'t be\n // needed as in XML documents they\'re already not visible when\n // inspecting element contents and in HTML documents they have no\n // meaning but we\'re preserving that logic for backwards compatibility.\n // This will be removed completely in 4.0. See gh-4904.\n DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);\n }\n }\n }\n }\n }\n }\n\n return collection;\n }\n\n function _remove(elem, selector, keepData) {\n var node,\n nodes = selector ? jQuery.filter(selector, elem) : elem,\n i = 0;\n\n for (; (node = nodes[i]) != null; i++) {\n if (!keepData && node.nodeType === 1) {\n jQuery.cleanData(getAll(node));\n }\n\n if (node.parentNode) {\n if (keepData && isAttached(node)) {\n setGlobalEval(getAll(node, "script"));\n }\n\n node.parentNode.removeChild(node);\n }\n }\n\n return elem;\n }\n\n jQuery.extend({\n htmlPrefilter: function htmlPrefilter(html) {\n return html;\n },\n clone: function clone(elem, dataAndEvents, deepDataAndEvents) {\n var i,\n l,\n srcElements,\n destElements,\n clone = elem.cloneNode(true),\n inPage = isAttached(elem); // Fix IE cloning issues\n\n if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {\n // We eschew jQuery#find here for performance reasons:\n // https://jsperf.com/getall-vs-sizzle/2\n destElements = getAll(clone);\n srcElements = getAll(elem);\n\n for (i = 0, l = srcElements.length; i < l; i++) {\n fixInput(srcElements[i], destElements[i]);\n }\n } // Copy the events from the original to the clone\n\n\n if (dataAndEvents) {\n if (deepDataAndEvents) {\n srcElements = srcElements || getAll(elem);\n destElements = destElements || getAll(clone);\n\n for (i = 0, l = srcElements.length; i < l; i++) {\n cloneCopyEvent(srcElements[i], destElements[i]);\n }\n } else {\n cloneCopyEvent(elem, clone);\n }\n } // Preserve script evaluation history\n\n\n destElements = getAll(clone, "script");\n\n if (destElements.length > 0) {\n setGlobalEval(destElements, !inPage && getAll(elem, "script"));\n } // Return the cloned set\n\n\n return clone;\n },\n cleanData: function cleanData(elems) {\n var data,\n elem,\n type,\n special = jQuery.event.special,\n i = 0;\n\n for (; (elem = elems[i]) !== undefined; i++) {\n if (acceptData(elem)) {\n if (data = elem[dataPriv.expando]) {\n if (data.events) {\n for (type in data.events) {\n if (special[type]) {\n jQuery.event.remove(elem, type); // This is a shortcut to avoid jQuery.event.remove\'s overhead\n } else {\n jQuery.removeEvent(elem, type, data.handle);\n }\n }\n } // Support: Chrome <=35 - 45+\n // Assign undefined instead of using delete, see Data#remove\n\n\n elem[dataPriv.expando] = undefined;\n }\n\n if (elem[dataUser.expando]) {\n // Support: Chrome <=35 - 45+\n // Assign undefined instead of using delete, see Data#remove\n elem[dataUser.expando] = undefined;\n }\n }\n }\n }\n });\n jQuery.fn.extend({\n detach: function detach(selector) {\n return _remove(this, selector, true);\n },\n remove: function remove(selector) {\n return _remove(this, selector);\n },\n text: function text(value) {\n return access(this, function (value) {\n return value === undefined ? jQuery.text(this) : this.empty().each(function () {\n if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {\n this.textContent = value;\n }\n });\n }, null, value, arguments.length);\n },\n append: function append() {\n return domManip(this, arguments, function (elem) {\n if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {\n var target = manipulationTarget(this, elem);\n target.appendChild(elem);\n }\n });\n },\n prepend: function prepend() {\n return domManip(this, arguments, function (elem) {\n if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {\n var target = manipulationTarget(this, elem);\n target.insertBefore(elem, target.firstChild);\n }\n });\n },\n before: function before() {\n return domManip(this, arguments, function (elem) {\n if (this.parentNode) {\n this.parentNode.insertBefore(elem, this);\n }\n });\n },\n after: function after() {\n return domManip(this, arguments, function (elem) {\n if (this.parentNode) {\n this.parentNode.insertBefore(elem, this.nextSibling);\n }\n });\n },\n empty: function empty() {\n var elem,\n i = 0;\n\n for (; (elem = this[i]) != null; i++) {\n if (elem.nodeType === 1) {\n // Prevent memory leaks\n jQuery.cleanData(getAll(elem, false)); // Remove any remaining nodes\n\n elem.textContent = "";\n }\n }\n\n return this;\n },\n clone: function clone(dataAndEvents, deepDataAndEvents) {\n dataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n return this.map(function () {\n return jQuery.clone(this, dataAndEvents, deepDataAndEvents);\n });\n },\n html: function html(value) {\n return access(this, function (value) {\n var elem = this[0] || {},\n i = 0,\n l = this.length;\n\n if (value === undefined && elem.nodeType === 1) {\n return elem.innerHTML;\n } // See if we can take a shortcut and just use innerHTML\n\n\n if (typeof value === "string" && !rnoInnerhtml.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {\n value = jQuery.htmlPrefilter(value);\n\n try {\n for (; i < l; i++) {\n elem = this[i] || {}; // Remove element nodes and prevent memory leaks\n\n if (elem.nodeType === 1) {\n jQuery.cleanData(getAll(elem, false));\n elem.innerHTML = value;\n }\n }\n\n elem = 0; // If using innerHTML throws an exception, use the fallback method\n } catch (e) {}\n }\n\n if (elem) {\n this.empty().append(value);\n }\n }, null, value, arguments.length);\n },\n replaceWith: function replaceWith() {\n var ignored = []; // Make the changes, replacing each non-ignored context element with the new content\n\n return domManip(this, arguments, function (elem) {\n var parent = this.parentNode;\n\n if (jQuery.inArray(this, ignored) < 0) {\n jQuery.cleanData(getAll(this));\n\n if (parent) {\n parent.replaceChild(elem, this);\n }\n } // Force callback invocation\n\n }, ignored);\n }\n });\n jQuery.each({\n appendTo: "append",\n prependTo: "prepend",\n insertBefore: "before",\n insertAfter: "after",\n replaceAll: "replaceWith"\n }, function (name, original) {\n jQuery.fn[name] = function (selector) {\n var elems,\n ret = [],\n insert = jQuery(selector),\n last = insert.length - 1,\n i = 0;\n\n for (; i <= last; i++) {\n elems = i === last ? this : this.clone(true);\n jQuery(insert[i])[original](elems); // Support: Android <=4.0 only, PhantomJS 1 only\n // .get() because push.apply(_, arraylike) throws on ancient WebKit\n\n push.apply(ret, elems.get());\n }\n\n return this.pushStack(ret);\n };\n });\n var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");\n var rcustomProp = /^--/;\n\n var getStyles = function getStyles(elem) {\n // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n // IE throws on elements created in popups\n // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"\n var view = elem.ownerDocument.defaultView;\n\n if (!view || !view.opener) {\n view = window;\n }\n\n return view.getComputedStyle(elem);\n };\n\n var swap = function swap(elem, options, callback) {\n var ret,\n name,\n old = {}; // Remember the old values, and insert the new ones\n\n for (name in options) {\n old[name] = elem.style[name];\n elem.style[name] = options[name];\n }\n\n ret = callback.call(elem); // Revert the old values\n\n for (name in options) {\n elem.style[name] = old[name];\n }\n\n return ret;\n };\n\n var rboxStyle = new RegExp(cssExpand.join("|"), "i");\n\n (function () {\n // Executing both pixelPosition & boxSizingReliable tests require only one layout\n // so they\'re executed at the same time to save the second computation.\n function computeStyleTests() {\n // This is a singleton, we need to execute it only once\n if (!div) {\n return;\n }\n\n container.style.cssText = "position:absolute;left:-11111px;width:60px;" + "margin-top:1px;padding:0;border:0";\n div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + "width:60%;top:1%";\n documentElement.appendChild(container).appendChild(div);\n var divStyle = window.getComputedStyle(div);\n pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\n reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n // Some styles come back with percentage values, even though they shouldn\'t\n\n div.style.right = "60%";\n pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; // Support: IE 9 - 11 only\n // Detect misreporting of content dimensions for box-sizing:border-box elements\n\n boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; // Support: IE 9 only\n // Detect overflow:scroll screwiness (gh-3699)\n // Support: Chrome <=64\n // Don\'t get tricked when zoom affects offsetWidth (gh-4029)\n\n div.style.position = "absolute";\n scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;\n documentElement.removeChild(container); // Nullify the div so it wouldn\'t be stored in the memory and\n // it will also be a sign that checks already performed\n\n div = null;\n }\n\n function roundPixelMeasures(measure) {\n return Math.round(parseFloat(measure));\n }\n\n var pixelPositionVal,\n boxSizingReliableVal,\n scrollboxSizeVal,\n pixelBoxStylesVal,\n reliableTrDimensionsVal,\n reliableMarginLeftVal,\n container = document.createElement("div"),\n div = document.createElement("div"); // Finish early in limited (non-browser) environments\n\n if (!div.style) {\n return;\n } // Support: IE <=9 - 11 only\n // Style of cloned element affects source element cloned (trac-8908)\n\n\n div.style.backgroundClip = "content-box";\n div.cloneNode(true).style.backgroundClip = "";\n support.clearCloneStyle = div.style.backgroundClip === "content-box";\n jQuery.extend(support, {\n boxSizingReliable: function boxSizingReliable() {\n computeStyleTests();\n return boxSizingReliableVal;\n },\n pixelBoxStyles: function pixelBoxStyles() {\n computeStyleTests();\n return pixelBoxStylesVal;\n },\n pixelPosition: function pixelPosition() {\n computeStyleTests();\n return pixelPositionVal;\n },\n reliableMarginLeft: function reliableMarginLeft() {\n computeStyleTests();\n return reliableMarginLeftVal;\n },\n scrollboxSize: function scrollboxSize() {\n computeStyleTests();\n return scrollboxSizeVal;\n },\n // Support: IE 9 - 11+, Edge 15 - 18+\n // IE/Edge misreport `getComputedStyle` of table rows with width/height\n // set in CSS while `offset*` properties report correct values.\n // Behavior in IE 9 is more subtle than in newer versions & it passes\n // some versions of this test; make sure not to make it pass there!\n //\n // Support: Firefox 70+\n // Only Firefox includes border widths\n // in computed dimensions. (gh-4529)\n reliableTrDimensions: function reliableTrDimensions() {\n var table, tr, trChild, trStyle;\n\n if (reliableTrDimensionsVal == null) {\n table = document.createElement("table");\n tr = document.createElement("tr");\n trChild = document.createElement("div");\n table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";\n tr.style.cssText = "box-sizing:content-box;border:1px solid"; // Support: Chrome 86+\n // Height set through cssText does not get applied.\n // Computed height then comes back as 0.\n\n tr.style.height = "1px";\n trChild.style.height = "9px"; // Support: Android 8 Chrome 86+\n // In our bodyBackground.html iframe,\n // display for all div elements is set to "inline",\n // which causes a problem only in Android 8 Chrome 86.\n // Ensuring the div is `display: block`\n // gets around this issue.\n\n trChild.style.display = "block";\n documentElement.appendChild(table).appendChild(tr).appendChild(trChild);\n trStyle = window.getComputedStyle(tr);\n reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;\n documentElement.removeChild(table);\n }\n\n return reliableTrDimensionsVal;\n }\n });\n })();\n\n function curCSS(elem, name, computed) {\n var width,\n minWidth,\n maxWidth,\n ret,\n isCustomProp = rcustomProp.test(name),\n // Support: Firefox 51+\n // Retrieving style before computed somehow\n // fixes an issue with getting wrong values\n // on detached elements\n style = elem.style;\n computed = computed || getStyles(elem); // getPropertyValue is needed for:\n // .css(\'filter\') (IE 9 only, trac-12537)\n // .css(\'--customProperty) (gh-3144)\n\n if (computed) {\n // Support: IE <=9 - 11+\n // IE only supports `"float"` in `getPropertyValue`; in computed styles\n // it\'s only available as `"cssFloat"`. We no longer modify properties\n // sent to `.css()` apart from camelCasing, so we need to check both.\n // Normally, this would create difference in behavior: if\n // `getPropertyValue` returns an empty string, the value returned\n // by `.css()` would be `undefined`. This is usually the case for\n // disconnected elements. However, in IE even disconnected elements\n // with no styles return `"none"` for `getPropertyValue( "float" )`\n ret = computed.getPropertyValue(name) || computed[name];\n\n if (isCustomProp && ret) {\n // Support: Firefox 105+, Chrome <=105+\n // Spec requires trimming whitespace for custom properties (gh-4926).\n // Firefox only trims leading whitespace. Chrome just collapses\n // both leading & trailing whitespace to a single space.\n //\n // Fall back to `undefined` if empty string returned.\n // This collapses a missing definition with property defined\n // and set to an empty string but there\'s no standard API\n // allowing us to differentiate them without a performance penalty\n // and returning `undefined` aligns with older jQuery.\n //\n // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n // as whitespace while CSS does not, but this is not a problem\n // because CSS preprocessing replaces them with U+000A LINE FEED\n // (which *is* CSS whitespace)\n // https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n ret = ret.replace(rtrimCSS, "$1") || undefined;\n }\n\n if (ret === "" && !isAttached(elem)) {\n ret = jQuery.style(elem, name);\n } // A tribute to the "awesome hack by Dean Edwards"\n // Android Browser returns percentage for some values,\n // but width seems to be reliably pixels.\n // This is against the CSSOM draft spec:\n // https://drafts.csswg.org/cssom/#resolved-values\n\n\n if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {\n // Remember the original values\n width = style.width;\n minWidth = style.minWidth;\n maxWidth = style.maxWidth; // Put in the new values to get a computed value out\n\n style.minWidth = style.maxWidth = style.width = ret;\n ret = computed.width; // Revert the changed values\n\n style.width = width;\n style.minWidth = minWidth;\n style.maxWidth = maxWidth;\n }\n }\n\n return ret !== undefined ? // Support: IE <=9 - 11 only\n // IE returns zIndex value as an integer.\n ret + "" : ret;\n }\n\n function addGetHookIf(conditionFn, hookFn) {\n // Define the hook, we\'ll check on the first run if it\'s really needed.\n return {\n get: function get() {\n if (conditionFn()) {\n // Hook not needed (or it\'s not possible to use it due\n // to missing dependency), remove it.\n delete this.get;\n return;\n } // Hook needed; redefine it so that the support test is not executed again.\n\n\n return (this.get = hookFn).apply(this, arguments);\n }\n };\n }\n\n var cssPrefixes = ["Webkit", "Moz", "ms"],\n emptyStyle = document.createElement("div").style,\n vendorProps = {}; // Return a vendor-prefixed property or undefined\n\n function vendorPropName(name) {\n // Check for vendor prefixed names\n var capName = name[0].toUpperCase() + name.slice(1),\n i = cssPrefixes.length;\n\n while (i--) {\n name = cssPrefixes[i] + capName;\n\n if (name in emptyStyle) {\n return name;\n }\n }\n } // Return a potentially-mapped jQuery.cssProps or vendor prefixed property\n\n\n function finalPropName(name) {\n var _final = jQuery.cssProps[name] || vendorProps[name];\n\n if (_final) {\n return _final;\n }\n\n if (name in emptyStyle) {\n return name;\n }\n\n return vendorProps[name] = vendorPropName(name) || name;\n }\n\n var // Swappable if display is none or starts with table\n // except "table", "table-cell", or "table-caption"\n // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n rdisplayswap = /^(none|table(?!-c[ea]).+)/,\n cssShow = {\n position: "absolute",\n visibility: "hidden",\n display: "block"\n },\n cssNormalTransform = {\n letterSpacing: "0",\n fontWeight: "400"\n };\n\n function setPositiveNumber(_elem, value, subtract) {\n // Any relative (+/-) values have already been\n // normalized at this point\n var matches = rcssNum.exec(value);\n return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks\n Math.max(0, matches[2] - (subtract || 0)) + (matches[3] || "px") : value;\n }\n\n function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {\n var i = dimension === "width" ? 1 : 0,\n extra = 0,\n delta = 0,\n marginDelta = 0; // Adjustment may not be necessary\n\n if (box === (isBorderBox ? "border" : "content")) {\n return 0;\n }\n\n for (; i < 4; i += 2) {\n // Both box models exclude margin\n // Count margin delta separately to only add it after scroll gutter adjustment.\n // This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n if (box === "margin") {\n marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles);\n } // If we get here with a content-box, we\'re seeking "padding" or "border" or "margin"\n\n\n if (!isBorderBox) {\n // Add padding\n delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles); // For "border" or "margin", add border\n\n if (box !== "padding") {\n delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles); // But still keep track of it otherwise\n } else {\n extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);\n } // If we get here with a border-box (content + padding + border), we\'re seeking "content" or\n // "padding" or "margin"\n\n } else {\n // For "content", subtract padding\n if (box === "content") {\n delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);\n } // For "content" or "padding", subtract border\n\n\n if (box !== "margin") {\n delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);\n }\n }\n } // Account for positive content-box scroll gutter when requested by providing computedVal\n\n\n if (!isBorderBox && computedVal >= 0) {\n // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n // Assuming integer scroll gutter, subtract the rest and round down\n 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\n // Use an explicit zero to avoid NaN (gh-3964)\n )) || 0;\n }\n\n return delta + marginDelta;\n }\n\n function getWidthOrHeight(elem, dimension, extra) {\n // Start with computed style\n var styles = getStyles(elem),\n // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n // Fake content-box until we know it\'s needed to know the true value.\n boxSizingNeeded = !support.boxSizingReliable() || extra,\n isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",\n valueIsBorderBox = isBorderBox,\n val = curCSS(elem, dimension, styles),\n offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); // Support: Firefox <=54\n // Return a confounding non-pixel value or feign ignorance, as appropriate.\n\n if (rnumnonpx.test(val)) {\n if (!extra) {\n return val;\n }\n\n val = "auto";\n } // Support: IE 9 - 11 only\n // Use offsetWidth/offsetHeight for when box sizing is unreliable.\n // In those cases, the computed value can be trusted to be border-box.\n\n\n if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+\n // IE/Edge misreport `getComputedStyle` of table rows with width/height\n // set in CSS while `offset*` properties report correct values.\n // Interestingly, in some cases IE 9 doesn\'t suffer from this issue.\n !support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"\n // This happens for inline elements with no explicit setting (gh-3571)\n val === "auto" || // Support: Android <=4.1 - 4.3 only\n // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n !parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected\n elem.getClientRects().length) {\n isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box"; // Where available, offsetWidth/offsetHeight approximate border box dimensions.\n // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n // retrieved value as a content box dimension.\n\n valueIsBorderBox = offsetProp in elem;\n\n if (valueIsBorderBox) {\n val = elem[offsetProp];\n }\n } // Normalize "" and auto\n\n\n val = parseFloat(val) || 0; // Adjust for the element\'s box model\n\n return val + boxModelAdjustment(elem, dimension, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles, // Provide the current computed size to request scroll gutter calculation (gh-3589)\n val) + "px";\n }\n\n jQuery.extend({\n // Add in style property hooks for overriding the default\n // behavior of getting and setting a style property\n cssHooks: {\n opacity: {\n get: function get(elem, computed) {\n if (computed) {\n // We should always get a number back from opacity\n var ret = curCSS(elem, "opacity");\n return ret === "" ? "1" : ret;\n }\n }\n }\n },\n // Don\'t automatically add "px" to these possibly-unitless properties\n cssNumber: {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageSlice: true,\n columnCount: true,\n flexGrow: true,\n flexShrink: true,\n fontWeight: true,\n gridArea: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnStart: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowStart: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n scale: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeMiterlimit: true,\n strokeOpacity: true\n },\n // Add in properties whose names you wish to fix before\n // setting or getting the value\n cssProps: {},\n // Get and set the style property on a DOM Node\n style: function style(elem, name, value, extra) {\n // Don\'t set styles on text and comment nodes\n if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {\n return;\n } // Make sure that we\'re working with the right name\n\n\n var ret,\n type,\n hooks,\n origName = camelCase(name),\n isCustomProp = rcustomProp.test(name),\n style = elem.style; // Make sure that we\'re working with the right name. We don\'t\n // want to query the value if it is a CSS custom property\n // since they are user-defined.\n\n if (!isCustomProp) {\n name = finalPropName(origName);\n } // Gets hook for the prefixed version, then unprefixed version\n\n\n hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // Check if we\'re setting a value\n\n if (value !== undefined) {\n type = _typeof(value); // Convert "+=" or "-=" to relative numbers (trac-7345)\n\n if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {\n value = adjustCSS(elem, name, ret); // Fixes bug trac-9237\n\n type = "number";\n } // Make sure that null and NaN values aren\'t set (trac-7116)\n\n\n if (value == null || value !== value) {\n return;\n } // If a number was passed in, add the unit (except for certain CSS properties)\n // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n // "px" to a few hardcoded values.\n\n\n if (type === "number" && !isCustomProp) {\n value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");\n } // background-* props affect original clone\'s values\n\n\n if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {\n style[name] = "inherit";\n } // If a hook was provided, use that value, otherwise just set the specified value\n\n\n if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== undefined) {\n if (isCustomProp) {\n style.setProperty(name, value);\n } else {\n style[name] = value;\n }\n }\n } else {\n // If a hook was provided get the non-computed value from there\n if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== undefined) {\n return ret;\n } // Otherwise just get the value from the style object\n\n\n return style[name];\n }\n },\n css: function css(elem, name, extra, styles) {\n var val,\n num,\n hooks,\n origName = camelCase(name),\n isCustomProp = rcustomProp.test(name); // Make sure that we\'re working with the right name. We don\'t\n // want to modify the value if it is a CSS custom property\n // since they are user-defined.\n\n if (!isCustomProp) {\n name = finalPropName(origName);\n } // Try prefixed name followed by the unprefixed name\n\n\n hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; // If a hook was provided get the computed value from there\n\n if (hooks && "get" in hooks) {\n val = hooks.get(elem, true, extra);\n } // Otherwise, if a way to get the computed value exists, use that\n\n\n if (val === undefined) {\n val = curCSS(elem, name, styles);\n } // Convert "normal" to computed value\n\n\n if (val === "normal" && name in cssNormalTransform) {\n val = cssNormalTransform[name];\n } // Make numeric if forced or a qualifier was provided and val looks numeric\n\n\n if (extra === "" || extra) {\n num = parseFloat(val);\n return extra === true || isFinite(num) ? num || 0 : val;\n }\n\n return val;\n }\n });\n jQuery.each(["height", "width"], function (_i, dimension) {\n jQuery.cssHooks[dimension] = {\n get: function get(elem, computed, extra) {\n if (computed) {\n // Certain elements can have dimension info if we invisibly show them\n // but it must have a current display style that would benefit\n return rdisplayswap.test(jQuery.css(elem, "display")) && ( // Support: Safari 8+\n // Table columns in Safari have non-zero offsetWidth & zero\n // getBoundingClientRect().width unless display is changed.\n // Support: IE <=11 only\n // Running getBoundingClientRect on a disconnected node\n // in IE throws an error.\n !elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function () {\n return getWidthOrHeight(elem, dimension, extra);\n }) : getWidthOrHeight(elem, dimension, extra);\n }\n },\n set: function set(elem, value, extra) {\n var matches,\n styles = getStyles(elem),\n // Only read styles.position if the test has a chance to fail\n // to avoid forcing a reflow.\n scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute",\n // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n boxSizingNeeded = scrollboxSizeBuggy || extra,\n isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box",\n subtract = extra ? boxModelAdjustment(elem, dimension, extra, isBorderBox, styles) : 0; // Account for unreliable border-box dimensions by comparing offset* to computed and\n // faking a content-box to get border and padding (gh-3699)\n\n if (isBorderBox && scrollboxSizeBuggy) {\n subtract -= Math.ceil(elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5);\n } // Convert to pixels if value adjustment is needed\n\n\n if (subtract && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {\n elem.style[dimension] = value;\n value = jQuery.css(elem, dimension);\n }\n\n return setPositiveNumber(elem, value, subtract);\n }\n };\n });\n jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function (elem, computed) {\n if (computed) {\n return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, {\n marginLeft: 0\n }, function () {\n return elem.getBoundingClientRect().left;\n })) + "px";\n }\n }); // These hooks are used by animate to expand properties\n\n jQuery.each({\n margin: "",\n padding: "",\n border: "Width"\n }, function (prefix, suffix) {\n jQuery.cssHooks[prefix + suffix] = {\n expand: function expand(value) {\n var i = 0,\n expanded = {},\n // Assumes a single number if not a string\n parts = typeof value === "string" ? value.split(" ") : [value];\n\n for (; i < 4; i++) {\n expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];\n }\n\n return expanded;\n }\n };\n\n if (prefix !== "margin") {\n jQuery.cssHooks[prefix + suffix].set = setPositiveNumber;\n }\n });\n jQuery.fn.extend({\n css: function css(name, value) {\n return access(this, function (elem, name, value) {\n var styles,\n len,\n map = {},\n i = 0;\n\n if (Array.isArray(name)) {\n styles = getStyles(elem);\n len = name.length;\n\n for (; i < len; i++) {\n map[name[i]] = jQuery.css(elem, name[i], false, styles);\n }\n\n return map;\n }\n\n return value !== undefined ? jQuery.style(elem, name, value) : jQuery.css(elem, name);\n }, name, value, arguments.length > 1);\n }\n });\n\n function Tween(elem, options, prop, end, easing) {\n return new Tween.prototype.init(elem, options, prop, end, easing);\n }\n\n jQuery.Tween = Tween;\n Tween.prototype = {\n constructor: Tween,\n init: function init(elem, options, prop, end, easing, unit) {\n this.elem = elem;\n this.prop = prop;\n this.easing = easing || jQuery.easing._default;\n this.options = options;\n this.start = this.now = this.cur();\n this.end = end;\n this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");\n },\n cur: function cur() {\n var hooks = Tween.propHooks[this.prop];\n return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);\n },\n run: function run(percent) {\n var eased,\n hooks = Tween.propHooks[this.prop];\n\n if (this.options.duration) {\n this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration);\n } else {\n this.pos = eased = percent;\n }\n\n this.now = (this.end - this.start) * eased + this.start;\n\n if (this.options.step) {\n this.options.step.call(this.elem, this.now, this);\n }\n\n if (hooks && hooks.set) {\n hooks.set(this);\n } else {\n Tween.propHooks._default.set(this);\n }\n\n return this;\n }\n };\n Tween.prototype.init.prototype = Tween.prototype;\n Tween.propHooks = {\n _default: {\n get: function get(tween) {\n var result; // Use a property on the element directly when it is not a DOM element,\n // or when there is no matching style property that exists.\n\n if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {\n return tween.elem[tween.prop];\n } // Passing an empty string as a 3rd parameter to .css will automatically\n // attempt a parseFloat and fallback to a string if the parse fails.\n // Simple values such as "10px" are parsed to Float;\n // complex values such as "rotate(1rad)" are returned as-is.\n\n\n result = jQuery.css(tween.elem, tween.prop, ""); // Empty strings, null, undefined and "auto" are converted to 0.\n\n return !result || result === "auto" ? 0 : result;\n },\n set: function set(tween) {\n // Use step hook for back compat.\n // Use cssHook if its there.\n // Use .style if available and use plain properties where available.\n if (jQuery.fx.step[tween.prop]) {\n jQuery.fx.step[tween.prop](tween);\n } else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {\n jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);\n } else {\n tween.elem[tween.prop] = tween.now;\n }\n }\n }\n }; // Support: IE <=9 only\n // Panic based approach to setting things on disconnected nodes\n\n Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n set: function set(tween) {\n if (tween.elem.nodeType && tween.elem.parentNode) {\n tween.elem[tween.prop] = tween.now;\n }\n }\n };\n jQuery.easing = {\n linear: function linear(p) {\n return p;\n },\n swing: function swing(p) {\n return 0.5 - Math.cos(p * Math.PI) / 2;\n },\n _default: "swing"\n };\n jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point\n\n jQuery.fx.step = {};\n var fxNow,\n inProgress,\n rfxtypes = /^(?:toggle|show|hide)$/,\n rrun = /queueHooks$/;\n\n function schedule() {\n if (inProgress) {\n if (document.hidden === false && window.requestAnimationFrame) {\n window.requestAnimationFrame(schedule);\n } else {\n window.setTimeout(schedule, jQuery.fx.interval);\n }\n\n jQuery.fx.tick();\n }\n } // Animations created synchronously will run synchronously\n\n\n function createFxNow() {\n window.setTimeout(function () {\n fxNow = undefined;\n });\n return fxNow = Date.now();\n } // Generate parameters to create a standard animation\n\n\n function genFx(type, includeWidth) {\n var which,\n i = 0,\n attrs = {\n height: type\n }; // If we include width, step value is 1 to do all cssExpand values,\n // otherwise step value is 2 to skip over Left and Right\n\n includeWidth = includeWidth ? 1 : 0;\n\n for (; i < 4; i += 2 - includeWidth) {\n which = cssExpand[i];\n attrs["margin" + which] = attrs["padding" + which] = type;\n }\n\n if (includeWidth) {\n attrs.opacity = attrs.width = type;\n }\n\n return attrs;\n }\n\n function createTween(value, prop, animation) {\n var tween,\n collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]),\n index = 0,\n length = collection.length;\n\n for (; index < length; index++) {\n if (tween = collection[index].call(animation, prop, value)) {\n // We\'re done with this property\n return tween;\n }\n }\n }\n\n function defaultPrefilter(elem, props, opts) {\n var prop,\n value,\n toggle,\n hooks,\n oldfire,\n propTween,\n restoreDisplay,\n display,\n isBox = "width" in props || "height" in props,\n anim = this,\n orig = {},\n style = elem.style,\n hidden = elem.nodeType && isHiddenWithinTree(elem),\n dataShow = dataPriv.get(elem, "fxshow"); // Queue-skipping animations hijack the fx hooks\n\n if (!opts.queue) {\n hooks = jQuery._queueHooks(elem, "fx");\n\n if (hooks.unqueued == null) {\n hooks.unqueued = 0;\n oldfire = hooks.empty.fire;\n\n hooks.empty.fire = function () {\n if (!hooks.unqueued) {\n oldfire();\n }\n };\n }\n\n hooks.unqueued++;\n anim.always(function () {\n // Ensure the complete handler is called before this completes\n anim.always(function () {\n hooks.unqueued--;\n\n if (!jQuery.queue(elem, "fx").length) {\n hooks.empty.fire();\n }\n });\n });\n } // Detect show/hide animations\n\n\n for (prop in props) {\n value = props[prop];\n\n if (rfxtypes.test(value)) {\n delete props[prop];\n toggle = toggle || value === "toggle";\n\n if (value === (hidden ? "hide" : "show")) {\n // Pretend to be hidden if this is a "show" and\n // there is still data from a stopped show/hide\n if (value === "show" && dataShow && dataShow[prop] !== undefined) {\n hidden = true; // Ignore all other no-op show/hide data\n } else {\n continue;\n }\n }\n\n orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);\n }\n } // Bail out if this is a no-op like .hide().hide()\n\n\n propTween = !jQuery.isEmptyObject(props);\n\n if (!propTween && jQuery.isEmptyObject(orig)) {\n return;\n } // Restrict "overflow" and "display" styles during box animations\n\n\n if (isBox && elem.nodeType === 1) {\n // Support: IE <=9 - 11, Edge 12 - 15\n // Record all 3 overflow attributes because IE does not infer the shorthand\n // from identically-valued overflowX and overflowY and Edge just mirrors\n // the overflowX value there.\n opts.overflow = [style.overflow, style.overflowX, style.overflowY]; // Identify a display type, preferring old show/hide data over the CSS cascade\n\n restoreDisplay = dataShow && dataShow.display;\n\n if (restoreDisplay == null) {\n restoreDisplay = dataPriv.get(elem, "display");\n }\n\n display = jQuery.css(elem, "display");\n\n if (display === "none") {\n if (restoreDisplay) {\n display = restoreDisplay;\n } else {\n // Get nonempty value(s) by temporarily forcing visibility\n showHide([elem], true);\n restoreDisplay = elem.style.display || restoreDisplay;\n display = jQuery.css(elem, "display");\n showHide([elem]);\n }\n } // Animate inline elements as inline-block\n\n\n if (display === "inline" || display === "inline-block" && restoreDisplay != null) {\n if (jQuery.css(elem, "float") === "none") {\n // Restore the original display value at the end of pure show/hide animations\n if (!propTween) {\n anim.done(function () {\n style.display = restoreDisplay;\n });\n\n if (restoreDisplay == null) {\n display = style.display;\n restoreDisplay = display === "none" ? "" : display;\n }\n }\n\n style.display = "inline-block";\n }\n }\n }\n\n if (opts.overflow) {\n style.overflow = "hidden";\n anim.always(function () {\n style.overflow = opts.overflow[0];\n style.overflowX = opts.overflow[1];\n style.overflowY = opts.overflow[2];\n });\n } // Implement show/hide animations\n\n\n propTween = false;\n\n for (prop in orig) {\n // General show/hide setup for this element animation\n if (!propTween) {\n if (dataShow) {\n if ("hidden" in dataShow) {\n hidden = dataShow.hidden;\n }\n } else {\n dataShow = dataPriv.access(elem, "fxshow", {\n display: restoreDisplay\n });\n } // Store hidden/visible for toggle so `.stop().toggle()` "reverses"\n\n\n if (toggle) {\n dataShow.hidden = !hidden;\n } // Show elements before animating them\n\n\n if (hidden) {\n showHide([elem], true);\n }\n /* eslint-disable no-loop-func */\n\n\n anim.done(function () {\n /* eslint-enable no-loop-func */\n // The final step of a "hide" animation is actually hiding the element\n if (!hidden) {\n showHide([elem]);\n }\n\n dataPriv.remove(elem, "fxshow");\n\n for (prop in orig) {\n jQuery.style(elem, prop, orig[prop]);\n }\n });\n } // Per-property setup\n\n\n propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);\n\n if (!(prop in dataShow)) {\n dataShow[prop] = propTween.start;\n\n if (hidden) {\n propTween.end = propTween.start;\n propTween.start = 0;\n }\n }\n }\n }\n\n function propFilter(props, specialEasing) {\n var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass\n\n for (index in props) {\n name = camelCase(index);\n easing = specialEasing[name];\n value = props[index];\n\n if (Array.isArray(value)) {\n easing = value[1];\n value = props[index] = value[0];\n }\n\n if (index !== name) {\n props[name] = value;\n delete props[index];\n }\n\n hooks = jQuery.cssHooks[name];\n\n if (hooks && "expand" in hooks) {\n value = hooks.expand(value);\n delete props[name]; // Not quite $.extend, this won\'t overwrite existing keys.\n // Reusing \'index\' because we have the correct "name"\n\n for (index in value) {\n if (!(index in props)) {\n props[index] = value[index];\n specialEasing[index] = easing;\n }\n }\n } else {\n specialEasing[name] = easing;\n }\n }\n }\n\n function Animation(elem, properties, options) {\n var result,\n stopped,\n index = 0,\n length = Animation.prefilters.length,\n deferred = jQuery.Deferred().always(function () {\n // Don\'t match elem in the :animated selector\n delete tick.elem;\n }),\n tick = function tick() {\n if (stopped) {\n return false;\n }\n\n var currentTime = fxNow || createFxNow(),\n remaining = Math.max(0, animation.startTime + animation.duration - currentTime),\n // Support: Android 2.3 only\n // Archaic crash bug won\'t allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n temp = remaining / animation.duration || 0,\n percent = 1 - temp,\n index = 0,\n length = animation.tweens.length;\n\n for (; index < length; index++) {\n animation.tweens[index].run(percent);\n }\n\n deferred.notifyWith(elem, [animation, percent, remaining]); // If there\'s more to do, yield\n\n if (percent < 1 && length) {\n return remaining;\n } // If this was an empty animation, synthesize a final progress notification\n\n\n if (!length) {\n deferred.notifyWith(elem, [animation, 1, 0]);\n } // Resolve the animation and report its conclusion\n\n\n deferred.resolveWith(elem, [animation]);\n return false;\n },\n animation = deferred.promise({\n elem: elem,\n props: jQuery.extend({}, properties),\n opts: jQuery.extend(true, {\n specialEasing: {},\n easing: jQuery.easing._default\n }, options),\n originalProperties: properties,\n originalOptions: options,\n startTime: fxNow || createFxNow(),\n duration: options.duration,\n tweens: [],\n createTween: function createTween(prop, end) {\n var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);\n animation.tweens.push(tween);\n return tween;\n },\n stop: function stop(gotoEnd) {\n var index = 0,\n // If we are going to the end, we want to run all the tweens\n // otherwise we skip this part\n length = gotoEnd ? animation.tweens.length : 0;\n\n if (stopped) {\n return this;\n }\n\n stopped = true;\n\n for (; index < length; index++) {\n animation.tweens[index].run(1);\n } // Resolve when we played the last frame; otherwise, reject\n\n\n if (gotoEnd) {\n deferred.notifyWith(elem, [animation, 1, 0]);\n deferred.resolveWith(elem, [animation, gotoEnd]);\n } else {\n deferred.rejectWith(elem, [animation, gotoEnd]);\n }\n\n return this;\n }\n }),\n props = animation.props;\n\n propFilter(props, animation.opts.specialEasing);\n\n for (; index < length; index++) {\n result = Animation.prefilters[index].call(animation, elem, props, animation.opts);\n\n if (result) {\n if (isFunction(result.stop)) {\n jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);\n }\n\n return result;\n }\n }\n\n jQuery.map(props, createTween, animation);\n\n if (isFunction(animation.opts.start)) {\n animation.opts.start.call(elem, animation);\n } // Attach callbacks from options\n\n\n animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);\n jQuery.fx.timer(jQuery.extend(tick, {\n elem: elem,\n anim: animation,\n queue: animation.opts.queue\n }));\n return animation;\n }\n\n jQuery.Animation = jQuery.extend(Animation, {\n tweeners: {\n "*": [function (prop, value) {\n var tween = this.createTween(prop, value);\n adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);\n return tween;\n }]\n },\n tweener: function tweener(props, callback) {\n if (isFunction(props)) {\n callback = props;\n props = ["*"];\n } else {\n props = props.match(rnothtmlwhite);\n }\n\n var prop,\n index = 0,\n length = props.length;\n\n for (; index < length; index++) {\n prop = props[index];\n Animation.tweeners[prop] = Animation.tweeners[prop] || [];\n Animation.tweeners[prop].unshift(callback);\n }\n },\n prefilters: [defaultPrefilter],\n prefilter: function prefilter(callback, prepend) {\n if (prepend) {\n Animation.prefilters.unshift(callback);\n } else {\n Animation.prefilters.push(callback);\n }\n }\n });\n\n jQuery.speed = function (speed, easing, fn) {\n var opt = speed && _typeof(speed) === "object" ? jQuery.extend({}, speed) : {\n complete: fn || !fn && easing || isFunction(speed) && speed,\n duration: speed,\n easing: fn && easing || easing && !isFunction(easing) && easing\n }; // Go to the end state if fx are off\n\n if (jQuery.fx.off) {\n opt.duration = 0;\n } else {\n if (typeof opt.duration !== "number") {\n if (opt.duration in jQuery.fx.speeds) {\n opt.duration = jQuery.fx.speeds[opt.duration];\n } else {\n opt.duration = jQuery.fx.speeds._default;\n }\n }\n } // Normalize opt.queue - true/undefined/null -> "fx"\n\n\n if (opt.queue == null || opt.queue === true) {\n opt.queue = "fx";\n } // Queueing\n\n\n opt.old = opt.complete;\n\n opt.complete = function () {\n if (isFunction(opt.old)) {\n opt.old.call(this);\n }\n\n if (opt.queue) {\n jQuery.dequeue(this, opt.queue);\n }\n };\n\n return opt;\n };\n\n jQuery.fn.extend({\n fadeTo: function fadeTo(speed, to, easing, callback) {\n // Show any hidden elements after setting opacity to 0\n return this.filter(isHiddenWithinTree).css("opacity", 0).show() // Animate to the value specified\n .end().animate({\n opacity: to\n }, speed, easing, callback);\n },\n animate: function animate(prop, speed, easing, callback) {\n var empty = jQuery.isEmptyObject(prop),\n optall = jQuery.speed(speed, easing, callback),\n doAnimation = function doAnimation() {\n // Operate on a copy of prop so per-property easing won\'t be lost\n var anim = Animation(this, jQuery.extend({}, prop), optall); // Empty animations, or finishing resolves immediately\n\n if (empty || dataPriv.get(this, "finish")) {\n anim.stop(true);\n }\n };\n\n doAnimation.finish = doAnimation;\n return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);\n },\n stop: function stop(type, clearQueue, gotoEnd) {\n var stopQueue = function stopQueue(hooks) {\n var stop = hooks.stop;\n delete hooks.stop;\n stop(gotoEnd);\n };\n\n if (typeof type !== "string") {\n gotoEnd = clearQueue;\n clearQueue = type;\n type = undefined;\n }\n\n if (clearQueue) {\n this.queue(type || "fx", []);\n }\n\n return this.each(function () {\n var dequeue = true,\n index = type != null && type + "queueHooks",\n timers = jQuery.timers,\n data = dataPriv.get(this);\n\n if (index) {\n if (data[index] && data[index].stop) {\n stopQueue(data[index]);\n }\n } else {\n for (index in data) {\n if (data[index] && data[index].stop && rrun.test(index)) {\n stopQueue(data[index]);\n }\n }\n }\n\n for (index = timers.length; index--;) {\n if (timers[index].elem === this && (type == null || timers[index].queue === type)) {\n timers[index].anim.stop(gotoEnd);\n dequeue = false;\n timers.splice(index, 1);\n }\n } // Start the next in the queue if the last step wasn\'t forced.\n // Timers currently will call their complete callbacks, which\n // will dequeue but only if they were gotoEnd.\n\n\n if (dequeue || !gotoEnd) {\n jQuery.dequeue(this, type);\n }\n });\n },\n finish: function finish(type) {\n if (type !== false) {\n type = type || "fx";\n }\n\n return this.each(function () {\n var index,\n data = dataPriv.get(this),\n queue = data[type + "queue"],\n hooks = data[type + "queueHooks"],\n timers = jQuery.timers,\n length = queue ? queue.length : 0; // Enable finishing flag on private data\n\n data.finish = true; // Empty the queue first\n\n jQuery.queue(this, type, []);\n\n if (hooks && hooks.stop) {\n hooks.stop.call(this, true);\n } // Look for any active animations, and finish them\n\n\n for (index = timers.length; index--;) {\n if (timers[index].elem === this && timers[index].queue === type) {\n timers[index].anim.stop(true);\n timers.splice(index, 1);\n }\n } // Look for any animations in the old queue and finish them\n\n\n for (index = 0; index < length; index++) {\n if (queue[index] && queue[index].finish) {\n queue[index].finish.call(this);\n }\n } // Turn off finishing flag\n\n\n delete data.finish;\n });\n }\n });\n jQuery.each(["toggle", "show", "hide"], function (_i, name) {\n var cssFn = jQuery.fn[name];\n\n jQuery.fn[name] = function (speed, easing, callback) {\n return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);\n };\n }); // Generate shortcuts for custom animations\n\n jQuery.each({\n slideDown: genFx("show"),\n slideUp: genFx("hide"),\n slideToggle: genFx("toggle"),\n fadeIn: {\n opacity: "show"\n },\n fadeOut: {\n opacity: "hide"\n },\n fadeToggle: {\n opacity: "toggle"\n }\n }, function (name, props) {\n jQuery.fn[name] = function (speed, easing, callback) {\n return this.animate(props, speed, easing, callback);\n };\n });\n jQuery.timers = [];\n\n jQuery.fx.tick = function () {\n var timer,\n i = 0,\n timers = jQuery.timers;\n fxNow = Date.now();\n\n for (; i < timers.length; i++) {\n timer = timers[i]; // Run the timer and safely remove it when done (allowing for external removal)\n\n if (!timer() && timers[i] === timer) {\n timers.splice(i--, 1);\n }\n }\n\n if (!timers.length) {\n jQuery.fx.stop();\n }\n\n fxNow = undefined;\n };\n\n jQuery.fx.timer = function (timer) {\n jQuery.timers.push(timer);\n jQuery.fx.start();\n };\n\n jQuery.fx.interval = 13;\n\n jQuery.fx.start = function () {\n if (inProgress) {\n return;\n }\n\n inProgress = true;\n schedule();\n };\n\n jQuery.fx.stop = function () {\n inProgress = null;\n };\n\n jQuery.fx.speeds = {\n slow: 600,\n fast: 200,\n // Default speed\n _default: 400\n }; // Based off of the plugin by Clint Helfers, with permission.\n\n jQuery.fn.delay = function (time, type) {\n time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;\n type = type || "fx";\n return this.queue(type, function (next, hooks) {\n var timeout = window.setTimeout(next, time);\n\n hooks.stop = function () {\n window.clearTimeout(timeout);\n };\n });\n };\n\n (function () {\n var input = document.createElement("input"),\n select = document.createElement("select"),\n opt = select.appendChild(document.createElement("option"));\n input.type = "checkbox"; // Support: Android <=4.3 only\n // Default value for a checkbox should be "on"\n\n support.checkOn = input.value !== ""; // Support: IE <=11 only\n // Must access selectedIndex to make default options select\n\n support.optSelected = opt.selected; // Support: IE <=11 only\n // An input loses its value after becoming a radio\n\n input = document.createElement("input");\n input.value = "t";\n input.type = "radio";\n support.radioValue = input.value === "t";\n })();\n\n var boolHook,\n attrHandle = jQuery.expr.attrHandle;\n jQuery.fn.extend({\n attr: function attr(name, value) {\n return access(this, jQuery.attr, name, value, arguments.length > 1);\n },\n removeAttr: function removeAttr(name) {\n return this.each(function () {\n jQuery.removeAttr(this, name);\n });\n }\n });\n jQuery.extend({\n attr: function attr(elem, name, value) {\n var ret,\n hooks,\n nType = elem.nodeType; // Don\'t get/set attributes on text, comment and attribute nodes\n\n if (nType === 3 || nType === 8 || nType === 2) {\n return;\n } // Fallback to prop when attributes are not supported\n\n\n if (typeof elem.getAttribute === "undefined") {\n return jQuery.prop(elem, name, value);\n } // Attribute hooks are determined by the lowercase version\n // Grab necessary hook if one is defined\n\n\n if (nType !== 1 || !jQuery.isXMLDoc(elem)) {\n hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : undefined);\n }\n\n if (value !== undefined) {\n if (value === null) {\n jQuery.removeAttr(elem, name);\n return;\n }\n\n if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {\n return ret;\n }\n\n elem.setAttribute(name, value + "");\n return value;\n }\n\n if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {\n return ret;\n }\n\n ret = jQuery.find.attr(elem, name); // Non-existent attributes return null, we normalize to undefined\n\n return ret == null ? undefined : ret;\n },\n attrHooks: {\n type: {\n set: function set(elem, value) {\n if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {\n var val = elem.value;\n elem.setAttribute("type", value);\n\n if (val) {\n elem.value = val;\n }\n\n return value;\n }\n }\n }\n },\n removeAttr: function removeAttr(elem, value) {\n var name,\n i = 0,\n // Attribute names can contain non-HTML whitespace characters\n // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n attrNames = value && value.match(rnothtmlwhite);\n\n if (attrNames && elem.nodeType === 1) {\n while (name = attrNames[i++]) {\n elem.removeAttribute(name);\n }\n }\n }\n }); // Hooks for boolean attributes\n\n boolHook = {\n set: function set(elem, value, name) {\n if (value === false) {\n // Remove boolean attributes when set to false\n jQuery.removeAttr(elem, name);\n } else {\n elem.setAttribute(name, name);\n }\n\n return name;\n }\n };\n jQuery.each(jQuery.expr.match.bool.source.match(/\\w+/g), function (_i, name) {\n var getter = attrHandle[name] || jQuery.find.attr;\n\n attrHandle[name] = function (elem, name, isXML) {\n var ret,\n handle,\n lowercaseName = name.toLowerCase();\n\n if (!isXML) {\n // Avoid an infinite loop by temporarily removing this function from the getter\n handle = attrHandle[lowercaseName];\n attrHandle[lowercaseName] = ret;\n ret = getter(elem, name, isXML) != null ? lowercaseName : null;\n attrHandle[lowercaseName] = handle;\n }\n\n return ret;\n };\n });\n var rfocusable = /^(?:input|select|textarea|button)$/i,\n rclickable = /^(?:a|area)$/i;\n jQuery.fn.extend({\n prop: function prop(name, value) {\n return access(this, jQuery.prop, name, value, arguments.length > 1);\n },\n removeProp: function removeProp(name) {\n return this.each(function () {\n delete this[jQuery.propFix[name] || name];\n });\n }\n });\n jQuery.extend({\n prop: function prop(elem, name, value) {\n var ret,\n hooks,\n nType = elem.nodeType; // Don\'t get/set properties on text, comment and attribute nodes\n\n if (nType === 3 || nType === 8 || nType === 2) {\n return;\n }\n\n if (nType !== 1 || !jQuery.isXMLDoc(elem)) {\n // Fix name and attach hooks\n name = jQuery.propFix[name] || name;\n hooks = jQuery.propHooks[name];\n }\n\n if (value !== undefined) {\n if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== undefined) {\n return ret;\n }\n\n return elem[name] = value;\n }\n\n if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {\n return ret;\n }\n\n return elem[name];\n },\n propHooks: {\n tabIndex: {\n get: function get(elem) {\n // Support: IE <=9 - 11 only\n // elem.tabIndex doesn\'t always return the\n // correct value when it hasn\'t been explicitly set\n // Use proper attribute retrieval (trac-12072)\n var tabindex = jQuery.find.attr(elem, "tabindex");\n\n if (tabindex) {\n return parseInt(tabindex, 10);\n }\n\n if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {\n return 0;\n }\n\n return -1;\n }\n }\n },\n propFix: {\n "for": "htmlFor",\n "class": "className"\n }\n }); // Support: IE <=11 only\n // Accessing the selectedIndex property\n // forces the browser to respect setting selected\n // on the option\n // The getter ensures a default option is selected\n // when in an optgroup\n // eslint rule "no-unused-expressions" is disabled for this code\n // since it considers such accessions noop\n\n if (!support.optSelected) {\n jQuery.propHooks.selected = {\n get: function get(elem) {\n /* eslint no-unused-expressions: "off" */\n var parent = elem.parentNode;\n\n if (parent && parent.parentNode) {\n parent.parentNode.selectedIndex;\n }\n\n return null;\n },\n set: function set(elem) {\n /* eslint no-unused-expressions: "off" */\n var parent = elem.parentNode;\n\n if (parent) {\n parent.selectedIndex;\n\n if (parent.parentNode) {\n parent.parentNode.selectedIndex;\n }\n }\n }\n };\n }\n\n jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {\n jQuery.propFix[this.toLowerCase()] = this;\n }); // Strip and collapse whitespace according to HTML spec\n // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\n function stripAndCollapse(value) {\n var tokens = value.match(rnothtmlwhite) || [];\n return tokens.join(" ");\n }\n\n function getClass(elem) {\n return elem.getAttribute && elem.getAttribute("class") || "";\n }\n\n function classesToArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n\n if (typeof value === "string") {\n return value.match(rnothtmlwhite) || [];\n }\n\n return [];\n }\n\n jQuery.fn.extend({\n addClass: function addClass(value) {\n var classNames, cur, curValue, className, i, finalValue;\n\n if (isFunction(value)) {\n return this.each(function (j) {\n jQuery(this).addClass(value.call(this, j, getClass(this)));\n });\n }\n\n classNames = classesToArray(value);\n\n if (classNames.length) {\n return this.each(function () {\n curValue = getClass(this);\n cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";\n\n if (cur) {\n for (i = 0; i < classNames.length; i++) {\n className = classNames[i];\n\n if (cur.indexOf(" " + className + " ") < 0) {\n cur += className + " ";\n }\n } // Only assign if different to avoid unneeded rendering.\n\n\n finalValue = stripAndCollapse(cur);\n\n if (curValue !== finalValue) {\n this.setAttribute("class", finalValue);\n }\n }\n });\n }\n\n return this;\n },\n removeClass: function removeClass(value) {\n var classNames, cur, curValue, className, i, finalValue;\n\n if (isFunction(value)) {\n return this.each(function (j) {\n jQuery(this).removeClass(value.call(this, j, getClass(this)));\n });\n }\n\n if (!arguments.length) {\n return this.attr("class", "");\n }\n\n classNames = classesToArray(value);\n\n if (classNames.length) {\n return this.each(function () {\n curValue = getClass(this); // This expression is here for better compressibility (see addClass)\n\n cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";\n\n if (cur) {\n for (i = 0; i < classNames.length; i++) {\n className = classNames[i]; // Remove *all* instances\n\n while (cur.indexOf(" " + className + " ") > -1) {\n cur = cur.replace(" " + className + " ", " ");\n }\n } // Only assign if different to avoid unneeded rendering.\n\n\n finalValue = stripAndCollapse(cur);\n\n if (curValue !== finalValue) {\n this.setAttribute("class", finalValue);\n }\n }\n });\n }\n\n return this;\n },\n toggleClass: function toggleClass(value, stateVal) {\n var classNames,\n className,\n i,\n self,\n type = _typeof(value),\n isValidValue = type === "string" || Array.isArray(value);\n\n if (isFunction(value)) {\n return this.each(function (i) {\n jQuery(this).toggleClass(value.call(this, i, getClass(this), stateVal), stateVal);\n });\n }\n\n if (typeof stateVal === "boolean" && isValidValue) {\n return stateVal ? this.addClass(value) : this.removeClass(value);\n }\n\n classNames = classesToArray(value);\n return this.each(function () {\n if (isValidValue) {\n // Toggle individual class names\n self = jQuery(this);\n\n for (i = 0; i < classNames.length; i++) {\n className = classNames[i]; // Check each className given, space separated list\n\n if (self.hasClass(className)) {\n self.removeClass(className);\n } else {\n self.addClass(className);\n }\n } // Toggle whole class name\n\n } else if (value === undefined || type === "boolean") {\n className = getClass(this);\n\n if (className) {\n // Store className if set\n dataPriv.set(this, "__className__", className);\n } // If the element has a class name or if we\'re passed `false`,\n // then remove the whole classname (if there was one, the above saved it).\n // Otherwise bring back whatever was previously saved (if anything),\n // falling back to the empty string if nothing was stored.\n\n\n if (this.setAttribute) {\n this.setAttribute("class", className || value === false ? "" : dataPriv.get(this, "__className__") || "");\n }\n }\n });\n },\n hasClass: function hasClass(selector) {\n var className,\n elem,\n i = 0;\n className = " " + selector + " ";\n\n while (elem = this[i++]) {\n if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {\n return true;\n }\n }\n\n return false;\n }\n });\n var rreturn = /\\r/g;\n jQuery.fn.extend({\n val: function val(value) {\n var hooks,\n ret,\n valueIsFunction,\n elem = this[0];\n\n if (!arguments.length) {\n if (elem) {\n hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];\n\n if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {\n return ret;\n }\n\n ret = elem.value; // Handle most common string cases\n\n if (typeof ret === "string") {\n return ret.replace(rreturn, "");\n } // Handle cases where value is null/undef or number\n\n\n return ret == null ? "" : ret;\n }\n\n return;\n }\n\n valueIsFunction = isFunction(value);\n return this.each(function (i) {\n var val;\n\n if (this.nodeType !== 1) {\n return;\n }\n\n if (valueIsFunction) {\n val = value.call(this, i, jQuery(this).val());\n } else {\n val = value;\n } // Treat null/undefined as ""; convert numbers to string\n\n\n if (val == null) {\n val = "";\n } else if (typeof val === "number") {\n val += "";\n } else if (Array.isArray(val)) {\n val = jQuery.map(val, function (value) {\n return value == null ? "" : value + "";\n });\n }\n\n hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]; // If set returns undefined, fall back to normal setting\n\n if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {\n this.value = val;\n }\n });\n }\n });\n jQuery.extend({\n valHooks: {\n option: {\n get: function get(elem) {\n var val = jQuery.find.attr(elem, "value");\n return val != null ? val : // Support: IE <=10 - 11 only\n // option.text throws exceptions (trac-14686, trac-14858)\n // Strip and collapse whitespace\n // https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n stripAndCollapse(jQuery.text(elem));\n }\n },\n select: {\n get: function get(elem) {\n var value,\n option,\n i,\n options = elem.options,\n index = elem.selectedIndex,\n one = elem.type === "select-one",\n values = one ? null : [],\n max = one ? index + 1 : options.length;\n\n if (index < 0) {\n i = max;\n } else {\n i = one ? index : 0;\n } // Loop through all the selected options\n\n\n for (; i < max; i++) {\n option = options[i]; // Support: IE <=9 only\n // IE8-9 doesn\'t update selected after form reset (trac-2551)\n\n if ((option.selected || i === index) && // Don\'t return options that are disabled or in a disabled optgroup\n !option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {\n // Get the specific value for the option\n value = jQuery(option).val(); // We don\'t need an array for one selects\n\n if (one) {\n return value;\n } // Multi-Selects return an array\n\n\n values.push(value);\n }\n }\n\n return values;\n },\n set: function set(elem, value) {\n var optionSet,\n option,\n options = elem.options,\n values = jQuery.makeArray(value),\n i = options.length;\n\n while (i--) {\n option = options[i];\n /* eslint-disable no-cond-assign */\n\n if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {\n optionSet = true;\n }\n /* eslint-enable no-cond-assign */\n\n } // Force browsers to behave consistently when non-matching value is set\n\n\n if (!optionSet) {\n elem.selectedIndex = -1;\n }\n\n return values;\n }\n }\n }\n }); // Radios and checkboxes getter/setter\n\n jQuery.each(["radio", "checkbox"], function () {\n jQuery.valHooks[this] = {\n set: function set(elem, value) {\n if (Array.isArray(value)) {\n return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;\n }\n }\n };\n\n if (!support.checkOn) {\n jQuery.valHooks[this].get = function (elem) {\n return elem.getAttribute("value") === null ? "on" : elem.value;\n };\n }\n }); // Return jQuery for attributes-only inclusion\n\n var location = window.location;\n var nonce = {\n guid: Date.now()\n };\n var rquery = /\\?/; // Cross-browser xml parsing\n\n jQuery.parseXML = function (data) {\n var xml, parserErrorElem;\n\n if (!data || typeof data !== "string") {\n return null;\n } // Support: IE 9 - 11 only\n // IE throws on parseFromString with invalid input.\n\n\n try {\n xml = new window.DOMParser().parseFromString(data, "text/xml");\n } catch (e) {}\n\n parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];\n\n if (!xml || parserErrorElem) {\n jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function (el) {\n return el.textContent;\n }).join("\\n") : data));\n }\n\n return xml;\n };\n\n var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n stopPropagationCallback = function stopPropagationCallback(e) {\n e.stopPropagation();\n };\n\n jQuery.extend(jQuery.event, {\n trigger: function trigger(event, data, elem, onlyHandlers) {\n var i,\n cur,\n tmp,\n bubbleType,\n ontype,\n handle,\n special,\n lastElement,\n eventPath = [elem || document],\n type = hasOwn.call(event, "type") ? event.type : event,\n namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];\n cur = lastElement = tmp = elem = elem || document; // Don\'t do events on text and comment nodes\n\n if (elem.nodeType === 3 || elem.nodeType === 8) {\n return;\n } // focus/blur morphs to focusin/out; ensure we\'re not firing them right now\n\n\n if (rfocusMorph.test(type + jQuery.event.triggered)) {\n return;\n }\n\n if (type.indexOf(".") > -1) {\n // Namespaced trigger; create a regexp to match event type in handle()\n namespaces = type.split(".");\n type = namespaces.shift();\n namespaces.sort();\n }\n\n ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string\n\n event = event[jQuery.expando] ? event : new jQuery.Event(type, _typeof(event) === "object" && event); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\n event.isTrigger = onlyHandlers ? 2 : 3;\n event.namespace = namespaces.join(".");\n event.rnamespace = event.namespace ? new RegExp("(^|\\\\.)" + namespaces.join("\\\\.(?:.*\\\\.|)") + "(\\\\.|$)") : null; // Clean up the event in case it is being reused\n\n event.result = undefined;\n\n if (!event.target) {\n event.target = elem;\n } // Clone any incoming data and prepend the event, creating the handler arg list\n\n\n data = data == null ? [event] : jQuery.makeArray(data, [event]); // Allow special events to draw outside the lines\n\n special = jQuery.event.special[type] || {};\n\n if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {\n return;\n } // Determine event propagation path in advance, per W3C events spec (trac-9951)\n // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\n\n if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {\n bubbleType = special.delegateType || type;\n\n if (!rfocusMorph.test(bubbleType + type)) {\n cur = cur.parentNode;\n }\n\n for (; cur; cur = cur.parentNode) {\n eventPath.push(cur);\n tmp = cur;\n } // Only add window if we got to document (e.g., not plain obj or detached DOM)\n\n\n if (tmp === (elem.ownerDocument || document)) {\n eventPath.push(tmp.defaultView || tmp.parentWindow || window);\n }\n } // Fire handlers on the event path\n\n\n i = 0;\n\n while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {\n lastElement = cur;\n event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler\n\n handle = (dataPriv.get(cur, "events") || Object.create(null))[event.type] && dataPriv.get(cur, "handle");\n\n if (handle) {\n handle.apply(cur, data);\n } // Native handler\n\n\n handle = ontype && cur[ontype];\n\n if (handle && handle.apply && acceptData(cur)) {\n event.result = handle.apply(cur, data);\n\n if (event.result === false) {\n event.preventDefault();\n }\n }\n }\n\n event.type = type; // If nobody prevented the default action, do it now\n\n if (!onlyHandlers && !event.isDefaultPrevented()) {\n if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {\n // Call a native DOM method on the target with the same name as the event.\n // Don\'t do default actions on window, that\'s where global variables be (trac-6170)\n if (ontype && isFunction(elem[type]) && !isWindow(elem)) {\n // Don\'t re-trigger an onFOO event when we call its FOO() method\n tmp = elem[ontype];\n\n if (tmp) {\n elem[ontype] = null;\n } // Prevent re-triggering of the same event, since we already bubbled it above\n\n\n jQuery.event.triggered = type;\n\n if (event.isPropagationStopped()) {\n lastElement.addEventListener(type, stopPropagationCallback);\n }\n\n elem[type]();\n\n if (event.isPropagationStopped()) {\n lastElement.removeEventListener(type, stopPropagationCallback);\n }\n\n jQuery.event.triggered = undefined;\n\n if (tmp) {\n elem[ontype] = tmp;\n }\n }\n }\n }\n\n return event.result;\n },\n // Piggyback on a donor event to simulate a different one\n // Used only for `focus(in | out)` events\n simulate: function simulate(type, elem, event) {\n var e = jQuery.extend(new jQuery.Event(), event, {\n type: type,\n isSimulated: true\n });\n jQuery.event.trigger(e, null, elem);\n }\n });\n jQuery.fn.extend({\n trigger: function trigger(type, data) {\n return this.each(function () {\n jQuery.event.trigger(type, data, this);\n });\n },\n triggerHandler: function triggerHandler(type, data) {\n var elem = this[0];\n\n if (elem) {\n return jQuery.event.trigger(type, data, elem, true);\n }\n }\n });\n var rbracket = /\\[\\]$/,\n rCRLF = /\\r?\\n/g,\n rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n rsubmittable = /^(?:input|select|textarea|keygen)/i;\n\n function buildParams(prefix, obj, traditional, add) {\n var name;\n\n if (Array.isArray(obj)) {\n // Serialize array item.\n jQuery.each(obj, function (i, v) {\n if (traditional || rbracket.test(prefix)) {\n // Treat each array item as a scalar.\n add(prefix, v);\n } else {\n // Item is non-scalar (array or object), encode its numeric index.\n buildParams(prefix + "[" + (_typeof(v) === "object" && v != null ? i : "") + "]", v, traditional, add);\n }\n });\n } else if (!traditional && toType(obj) === "object") {\n // Serialize object item.\n for (name in obj) {\n buildParams(prefix + "[" + name + "]", obj[name], traditional, add);\n }\n } else {\n // Serialize scalar item.\n add(prefix, obj);\n }\n } // Serialize an array of form elements or a set of\n // key/values into a query string\n\n\n jQuery.param = function (a, traditional) {\n var prefix,\n s = [],\n add = function add(key, valueOrFunction) {\n // If value is a function, invoke it and use its return value\n var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;\n s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value);\n };\n\n if (a == null) {\n return "";\n } // If an array was passed in, assume that it is an array of form elements.\n\n\n if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {\n // Serialize the form elements\n jQuery.each(a, function () {\n add(this.name, this.value);\n });\n } else {\n // If traditional, encode the "old" way (the way 1.3.2 or older\n // did it), otherwise encode params recursively.\n for (prefix in a) {\n buildParams(prefix, a[prefix], traditional, add);\n }\n } // Return the resulting serialization\n\n\n return s.join("&");\n };\n\n jQuery.fn.extend({\n serialize: function serialize() {\n return jQuery.param(this.serializeArray());\n },\n serializeArray: function serializeArray() {\n return this.map(function () {\n // Can add propHook for "elements" to filter or add form elements\n var elements = jQuery.prop(this, "elements");\n return elements ? jQuery.makeArray(elements) : this;\n }).filter(function () {\n var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works\n\n return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));\n }).map(function (_i, elem) {\n var val = jQuery(this).val();\n\n if (val == null) {\n return null;\n }\n\n if (Array.isArray(val)) {\n return jQuery.map(val, function (val) {\n return {\n name: elem.name,\n value: val.replace(rCRLF, "\\r\\n")\n };\n });\n }\n\n return {\n name: elem.name,\n value: val.replace(rCRLF, "\\r\\n")\n };\n }).get();\n }\n });\n var r20 = /%20/g,\n rhash = /#.*$/,\n rantiCache = /([?&])_=[^&]*/,\n rheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n // trac-7653, trac-8125, trac-8152: local protocol detection\n rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n rnoContent = /^(?:GET|HEAD)$/,\n rprotocol = /^\\/\\//,\n\n /* Prefilters\n * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n * 2) These are called:\n * - BEFORE asking for a transport\n * - AFTER param serialization (s.data is a string if s.processData is true)\n * 3) key is the dataType\n * 4) the catchall symbol "*" can be used\n * 5) execution will start with transport dataType and THEN continue down to "*" if needed\n */\n prefilters = {},\n\n /* Transports bindings\n * 1) key is the dataType\n * 2) the catchall symbol "*" can be used\n * 3) selection will start with transport dataType and THEN go to "*" if needed\n */\n transports = {},\n // Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n allTypes = "*/".concat("*"),\n // Anchor tag for parsing the document origin\n originAnchor = document.createElement("a");\n originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\n\n function addToPrefiltersOrTransports(structure) {\n // dataTypeExpression is optional and defaults to "*"\n return function (dataTypeExpression, func) {\n if (typeof dataTypeExpression !== "string") {\n func = dataTypeExpression;\n dataTypeExpression = "*";\n }\n\n var dataType,\n i = 0,\n dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];\n\n if (isFunction(func)) {\n // For each dataType in the dataTypeExpression\n while (dataType = dataTypes[i++]) {\n // Prepend if requested\n if (dataType[0] === "+") {\n dataType = dataType.slice(1) || "*";\n (structure[dataType] = structure[dataType] || []).unshift(func); // Otherwise append\n } else {\n (structure[dataType] = structure[dataType] || []).push(func);\n }\n }\n }\n };\n } // Base inspection function for prefilters and transports\n\n\n function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {\n var inspected = {},\n seekingTransport = structure === transports;\n\n function inspect(dataType) {\n var selected;\n inspected[dataType] = true;\n jQuery.each(structure[dataType] || [], function (_, prefilterOrFactory) {\n var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);\n\n if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {\n options.dataTypes.unshift(dataTypeOrTransport);\n inspect(dataTypeOrTransport);\n return false;\n } else if (seekingTransport) {\n return !(selected = dataTypeOrTransport);\n }\n });\n return selected;\n }\n\n return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");\n } // A special extend for ajax options\n // that takes "flat" options (not to be deep extended)\n // Fixes trac-9887\n\n\n function ajaxExtend(target, src) {\n var key,\n deep,\n flatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n for (key in src) {\n if (src[key] !== undefined) {\n (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];\n }\n }\n\n if (deep) {\n jQuery.extend(true, target, deep);\n }\n\n return target;\n }\n /* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\n\n\n function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === "*") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");\n }\n } // Check if we\'re dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }\n /* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\n\n\n function ajaxConvert(s, response, jqXHR, isSuccess) {\n var conv2,\n current,\n conv,\n tmp,\n prev,\n converters = {},\n // Work with a copy of dataTypes in case we need to modify it for conversion\n dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys\n\n if (dataTypes[1]) {\n for (conv in s.converters) {\n converters[conv.toLowerCase()] = s.converters[conv];\n }\n }\n\n current = dataTypes.shift(); // Convert to each sequential dataType\n\n while (current) {\n if (s.responseFields[current]) {\n jqXHR[s.responseFields[current]] = response;\n } // Apply the dataFilter if provided\n\n\n if (!prev && isSuccess && s.dataFilter) {\n response = s.dataFilter(response, s.dataType);\n }\n\n prev = current;\n current = dataTypes.shift();\n\n if (current) {\n // There\'s only work to do if current dataType is non-auto\n if (current === "*") {\n current = prev; // Convert response if prev dataType is non-auto and differs from current\n } else if (prev !== "*" && prev !== current) {\n // Seek a direct converter\n conv = converters[prev + " " + current] || converters["* " + current]; // If none found, seek a pair\n\n if (!conv) {\n for (conv2 in converters) {\n // If conv2 outputs current\n tmp = conv2.split(" ");\n\n if (tmp[1] === current) {\n // If prev can be converted to accepted input\n conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];\n\n if (conv) {\n // Condense equivalence converters\n if (conv === true) {\n conv = converters[conv2]; // Otherwise, insert the intermediate dataType\n } else if (converters[conv2] !== true) {\n current = tmp[0];\n dataTypes.unshift(tmp[1]);\n }\n\n break;\n }\n }\n }\n } // Apply converter (if not an equivalence)\n\n\n if (conv !== true) {\n // Unless errors are allowed to bubble, catch and return them\n if (conv && s["throws"]) {\n response = conv(response);\n } else {\n try {\n response = conv(response);\n } catch (e) {\n return {\n state: "parsererror",\n error: conv ? e : "No conversion from " + prev + " to " + current\n };\n }\n }\n }\n }\n }\n }\n\n return {\n state: "success",\n data: response\n };\n }\n\n jQuery.extend({\n // Counter for holding the number of active queries\n active: 0,\n // Last-Modified header cache for next request\n lastModified: {},\n etag: {},\n ajaxSettings: {\n url: location.href,\n type: "GET",\n isLocal: rlocalProtocol.test(location.protocol),\n global: true,\n processData: true,\n async: true,\n contentType: "application/x-www-form-urlencoded; charset=UTF-8",\n\n /*\n timeout: 0,\n data: null,\n dataType: null,\n username: null,\n password: null,\n cache: null,\n throws: false,\n traditional: false,\n headers: {},\n */\n accepts: {\n "*": allTypes,\n text: "text/plain",\n html: "text/html",\n xml: "application/xml, text/xml",\n json: "application/json, text/javascript"\n },\n contents: {\n xml: /\\bxml\\b/,\n html: /\\bhtml/,\n json: /\\bjson\\b/\n },\n responseFields: {\n xml: "responseXML",\n text: "responseText",\n json: "responseJSON"\n },\n // Data converters\n // Keys separate source (or catchall "*") and destination types with a single space\n converters: {\n // Convert anything to text\n "* text": String,\n // Text to html (true = no transformation)\n "text html": true,\n // Evaluate text as a json expression\n "text json": JSON.parse,\n // Parse text as xml\n "text xml": jQuery.parseXML\n },\n // For options that shouldn\'t be deep extended:\n // you can add your own custom options here if\n // and when you create one that shouldn\'t be\n // deep extended (see ajaxExtend)\n flatOptions: {\n url: true,\n context: true\n }\n },\n // Creates a full fledged settings object into target\n // with both ajaxSettings and settings fields.\n // If target is omitted, writes into ajaxSettings.\n ajaxSetup: function ajaxSetup(target, settings) {\n return settings ? // Building a settings object\n ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : // Extending ajaxSettings\n ajaxExtend(jQuery.ajaxSettings, target);\n },\n ajaxPrefilter: addToPrefiltersOrTransports(prefilters),\n ajaxTransport: addToPrefiltersOrTransports(transports),\n // Main method\n ajax: function ajax(url, options) {\n // If url is an object, simulate pre-1.5 signature\n if (_typeof(url) === "object") {\n options = url;\n url = undefined;\n } // Force options to be an object\n\n\n options = options || {};\n\n var transport,\n // URL without anti-cache param\n cacheURL,\n // Response headers\n responseHeadersString,\n responseHeaders,\n // timeout handle\n timeoutTimer,\n // Url cleanup var\n urlAnchor,\n // Request state (becomes false upon send and true upon completion)\n completed,\n // To know if global events are to be dispatched\n fireGlobals,\n // Loop variable\n i,\n // uncached part of the url\n uncached,\n // Create the final options object\n s = jQuery.ajaxSetup({}, options),\n // Callbacks context\n callbackContext = s.context || s,\n // Context for global events is callbackContext if it is a DOM node or jQuery collection\n globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event,\n // Deferreds\n deferred = jQuery.Deferred(),\n completeDeferred = jQuery.Callbacks("once memory"),\n // Status-dependent callbacks\n _statusCode = s.statusCode || {},\n // Headers (they are sent all at once)\n requestHeaders = {},\n requestHeadersNames = {},\n // Default abort message\n strAbort = "canceled",\n // Fake xhr\n jqXHR = {\n readyState: 0,\n // Builds headers hashtable if needed\n getResponseHeader: function getResponseHeader(key) {\n var match;\n\n if (completed) {\n if (!responseHeaders) {\n responseHeaders = {};\n\n while (match = rheaders.exec(responseHeadersString)) {\n responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]);\n }\n }\n\n match = responseHeaders[key.toLowerCase() + " "];\n }\n\n return match == null ? null : match.join(", ");\n },\n // Raw string\n getAllResponseHeaders: function getAllResponseHeaders() {\n return completed ? responseHeadersString : null;\n },\n // Caches the header\n setRequestHeader: function setRequestHeader(name, value) {\n if (completed == null) {\n name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;\n requestHeaders[name] = value;\n }\n\n return this;\n },\n // Overrides response content-type header\n overrideMimeType: function overrideMimeType(type) {\n if (completed == null) {\n s.mimeType = type;\n }\n\n return this;\n },\n // Status-dependent callbacks\n statusCode: function statusCode(map) {\n var code;\n\n if (map) {\n if (completed) {\n // Execute the appropriate callbacks\n jqXHR.always(map[jqXHR.status]);\n } else {\n // Lazy-add the new callbacks in a way that preserves old ones\n for (code in map) {\n _statusCode[code] = [_statusCode[code], map[code]];\n }\n }\n }\n\n return this;\n },\n // Cancel the request\n abort: function abort(statusText) {\n var finalText = statusText || strAbort;\n\n if (transport) {\n transport.abort(finalText);\n }\n\n done(0, finalText);\n return this;\n }\n }; // Attach deferreds\n\n\n deferred.promise(jqXHR); // Add protocol if not provided (prefilters might expect it)\n // Handle falsy url in the settings object (trac-10093: consistency with old signature)\n // We also use the url parameter if available\n\n s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//"); // Alias method option to type as per ticket trac-12004\n\n s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list\n\n s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; // A cross-domain request is in order when the origin doesn\'t match the current origin.\n\n if (s.crossDomain == null) {\n urlAnchor = document.createElement("a"); // Support: IE <=8 - 11, Edge 12 - 15\n // IE throws exception on accessing the href property if url is malformed,\n // e.g. http://example.com:80x/\n\n try {\n urlAnchor.href = s.url; // Support: IE <=8 - 11 only\n // Anchor\'s host property isn\'t correctly set when s.url is relative\n\n urlAnchor.href = urlAnchor.href;\n s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;\n } catch (e) {\n // If there is an error parsing the URL, assume it is crossDomain,\n // it can be rejected by the transport if it is invalid\n s.crossDomain = true;\n }\n } // Convert data if not already a string\n\n\n if (s.data && s.processData && typeof s.data !== "string") {\n s.data = jQuery.param(s.data, s.traditional);\n } // Apply prefilters\n\n\n inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); // If request was aborted inside a prefilter, stop there\n\n if (completed) {\n return jqXHR;\n } // We can fire global events as of now if asked to\n // Don\'t fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\n\n fireGlobals = jQuery.event && s.global; // Watch for a new set of requests\n\n if (fireGlobals && jQuery.active++ === 0) {\n jQuery.event.trigger("ajaxStart");\n } // Uppercase the type\n\n\n s.type = s.type.toUpperCase(); // Determine if request has content\n\n s.hasContent = !rnoContent.test(s.type); // Save the URL in case we\'re toying with the If-Modified-Since\n // and/or If-None-Match header later on\n // Remove hash to simplify url manipulation\n\n cacheURL = s.url.replace(rhash, ""); // More options handling for requests with no content\n\n if (!s.hasContent) {\n // Remember the hash so we can put it back\n uncached = s.url.slice(cacheURL.length); // If data is available and should be processed, append data to url\n\n if (s.data && (s.processData || typeof s.data === "string")) {\n cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; // trac-9682: remove data so that it\'s not used in an eventual retry\n\n delete s.data;\n } // Add or update anti-cache param if needed\n\n\n if (s.cache === false) {\n cacheURL = cacheURL.replace(rantiCache, "$1");\n uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;\n } // Put hash and anti-cache on the URL that will be requested (gh-1732)\n\n\n s.url = cacheURL + uncached; // Change \'%20\' to \'+\' if this is encoded form body content (gh-2658)\n } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {\n s.data = s.data.replace(r20, "+");\n } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\n\n if (s.ifModified) {\n if (jQuery.lastModified[cacheURL]) {\n jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);\n }\n\n if (jQuery.etag[cacheURL]) {\n jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);\n }\n } // Set the correct header, if data is being sent\n\n\n if (s.data && s.hasContent && s.contentType !== false || options.contentType) {\n jqXHR.setRequestHeader("Content-Type", s.contentType);\n } // Set the Accepts header for the server, depending on the dataType\n\n\n jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"]); // Check for headers option\n\n for (i in s.headers) {\n jqXHR.setRequestHeader(i, s.headers[i]);\n } // Allow custom headers/mimetypes and early abort\n\n\n if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed)) {\n // Abort if not done already and return\n return jqXHR.abort();\n } // Aborting is no longer a cancellation\n\n\n strAbort = "abort"; // Install callbacks on deferreds\n\n completeDeferred.add(s.complete);\n jqXHR.done(s.success);\n jqXHR.fail(s.error); // Get transport\n\n transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); // If no transport, we auto-abort\n\n if (!transport) {\n done(-1, "No Transport");\n } else {\n jqXHR.readyState = 1; // Send global event\n\n if (fireGlobals) {\n globalEventContext.trigger("ajaxSend", [jqXHR, s]);\n } // If request was aborted inside ajaxSend, stop there\n\n\n if (completed) {\n return jqXHR;\n } // Timeout\n\n\n if (s.async && s.timeout > 0) {\n timeoutTimer = window.setTimeout(function () {\n jqXHR.abort("timeout");\n }, s.timeout);\n }\n\n try {\n completed = false;\n transport.send(requestHeaders, done);\n } catch (e) {\n // Rethrow post-completion exceptions\n if (completed) {\n throw e;\n } // Propagate others as results\n\n\n done(-1, e);\n }\n } // Callback for when everything is done\n\n\n function done(status, nativeStatusText, responses, headers) {\n var isSuccess,\n success,\n error,\n response,\n modified,\n statusText = nativeStatusText; // Ignore repeat invocations\n\n if (completed) {\n return;\n }\n\n completed = true; // Clear timeout if it exists\n\n if (timeoutTimer) {\n window.clearTimeout(timeoutTimer);\n } // Dereference transport for early garbage collection\n // (no matter how long the jqXHR object will be used)\n\n\n transport = undefined; // Cache response headers\n\n responseHeadersString = headers || ""; // Set readyState\n\n jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful\n\n isSuccess = status >= 200 && status < 300 || status === 304; // Get response data\n\n if (responses) {\n response = ajaxHandleResponses(s, jqXHR, responses);\n } // Use a noop converter for missing script but not if jsonp\n\n\n if (!isSuccess && jQuery.inArray("script", s.dataTypes) > -1 && jQuery.inArray("json", s.dataTypes) < 0) {\n s.converters["text script"] = function () {};\n } // Convert no matter what (that way responseXXX fields are always set)\n\n\n response = ajaxConvert(s, response, jqXHR, isSuccess); // If successful, handle type chaining\n\n if (isSuccess) {\n // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n if (s.ifModified) {\n modified = jqXHR.getResponseHeader("Last-Modified");\n\n if (modified) {\n jQuery.lastModified[cacheURL] = modified;\n }\n\n modified = jqXHR.getResponseHeader("etag");\n\n if (modified) {\n jQuery.etag[cacheURL] = modified;\n }\n } // if no content\n\n\n if (status === 204 || s.type === "HEAD") {\n statusText = "nocontent"; // if not modified\n } else if (status === 304) {\n statusText = "notmodified"; // If we have data, let\'s convert it\n } else {\n statusText = response.state;\n success = response.data;\n error = response.error;\n isSuccess = !error;\n }\n } else {\n // Extract error from statusText and normalize for non-aborts\n error = statusText;\n\n if (status || !statusText) {\n statusText = "error";\n\n if (status < 0) {\n status = 0;\n }\n }\n } // Set data for the fake xhr object\n\n\n jqXHR.status = status;\n jqXHR.statusText = (nativeStatusText || statusText) + ""; // Success/Error\n\n if (isSuccess) {\n deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);\n } else {\n deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);\n } // Status-dependent callbacks\n\n\n jqXHR.statusCode(_statusCode);\n _statusCode = undefined;\n\n if (fireGlobals) {\n globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);\n } // Complete\n\n\n completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);\n\n if (fireGlobals) {\n globalEventContext.trigger("ajaxComplete", [jqXHR, s]); // Handle the global AJAX counter\n\n if (! --jQuery.active) {\n jQuery.event.trigger("ajaxStop");\n }\n }\n }\n\n return jqXHR;\n },\n getJSON: function getJSON(url, data, callback) {\n return jQuery.get(url, data, callback, "json");\n },\n getScript: function getScript(url, callback) {\n return jQuery.get(url, undefined, callback, "script");\n }\n });\n jQuery.each(["get", "post"], function (_i, method) {\n jQuery[method] = function (url, data, callback, type) {\n // Shift arguments if data argument was omitted\n if (isFunction(data)) {\n type = type || callback;\n callback = data;\n data = undefined;\n } // The url can be an options object (which then must have .url)\n\n\n return jQuery.ajax(jQuery.extend({\n url: url,\n type: method,\n dataType: type,\n data: data,\n success: callback\n }, jQuery.isPlainObject(url) && url));\n };\n });\n jQuery.ajaxPrefilter(function (s) {\n var i;\n\n for (i in s.headers) {\n if (i.toLowerCase() === "content-type") {\n s.contentType = s.headers[i] || "";\n }\n }\n });\n\n jQuery._evalUrl = function (url, options, doc) {\n return jQuery.ajax({\n url: url,\n // Make this explicit, since user can override this through ajaxSetup (trac-11264)\n type: "GET",\n dataType: "script",\n cache: true,\n async: false,\n global: false,\n // Only evaluate the response if it is successful (gh-4126)\n // dataFilter is not invoked for failure responses, so using it instead\n // of the default converter is kludgy but it works.\n converters: {\n "text script": function textScript() {}\n },\n dataFilter: function dataFilter(response) {\n jQuery.globalEval(response, options, doc);\n }\n });\n };\n\n jQuery.fn.extend({\n wrapAll: function wrapAll(html) {\n var wrap;\n\n if (this[0]) {\n if (isFunction(html)) {\n html = html.call(this[0]);\n } // The elements to wrap the target around\n\n\n wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);\n\n if (this[0].parentNode) {\n wrap.insertBefore(this[0]);\n }\n\n wrap.map(function () {\n var elem = this;\n\n while (elem.firstElementChild) {\n elem = elem.firstElementChild;\n }\n\n return elem;\n }).append(this);\n }\n\n return this;\n },\n wrapInner: function wrapInner(html) {\n if (isFunction(html)) {\n return this.each(function (i) {\n jQuery(this).wrapInner(html.call(this, i));\n });\n }\n\n return this.each(function () {\n var self = jQuery(this),\n contents = self.contents();\n\n if (contents.length) {\n contents.wrapAll(html);\n } else {\n self.append(html);\n }\n });\n },\n wrap: function wrap(html) {\n var htmlIsFunction = isFunction(html);\n return this.each(function (i) {\n jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);\n });\n },\n unwrap: function unwrap(selector) {\n this.parent(selector).not("body").each(function () {\n jQuery(this).replaceWith(this.childNodes);\n });\n return this;\n }\n });\n\n jQuery.expr.pseudos.hidden = function (elem) {\n return !jQuery.expr.pseudos.visible(elem);\n };\n\n jQuery.expr.pseudos.visible = function (elem) {\n return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);\n };\n\n jQuery.ajaxSettings.xhr = function () {\n try {\n return new window.XMLHttpRequest();\n } catch (e) {}\n };\n\n var xhrSuccessStatus = {\n // File protocol always yields status code 0, assume 200\n 0: 200,\n // Support: IE <=9 only\n // trac-1450: sometimes IE returns 1223 when it should be 204\n 1223: 204\n },\n xhrSupported = jQuery.ajaxSettings.xhr();\n support.cors = !!xhrSupported && "withCredentials" in xhrSupported;\n support.ajax = xhrSupported = !!xhrSupported;\n jQuery.ajaxTransport(function (options) {\n var _callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest\n\n\n if (support.cors || xhrSupported && !options.crossDomain) {\n return {\n send: function send(headers, complete) {\n var i,\n xhr = options.xhr();\n xhr.open(options.type, options.url, options.async, options.username, options.password); // Apply custom fields if provided\n\n if (options.xhrFields) {\n for (i in options.xhrFields) {\n xhr[i] = options.xhrFields[i];\n }\n } // Override mime type if needed\n\n\n if (options.mimeType && xhr.overrideMimeType) {\n xhr.overrideMimeType(options.mimeType);\n } // X-Requested-With header\n // For cross-domain requests, seeing as conditions for a preflight are\n // akin to a jigsaw puzzle, we simply never set it to be sure.\n // (it can always be set on a per-request basis or even using ajaxSetup)\n // For same-domain requests, won\'t change header if already provided.\n\n\n if (!options.crossDomain && !headers["X-Requested-With"]) {\n headers["X-Requested-With"] = "XMLHttpRequest";\n } // Set headers\n\n\n for (i in headers) {\n xhr.setRequestHeader(i, headers[i]);\n } // Callback\n\n\n _callback = function callback(type) {\n return function () {\n if (_callback) {\n _callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;\n\n if (type === "abort") {\n xhr.abort();\n } else if (type === "error") {\n // Support: IE <=9 only\n // On a manual native abort, IE9 throws\n // errors on any property access that is not readyState\n if (typeof xhr.status !== "number") {\n complete(0, "error");\n } else {\n complete( // File: protocol always yields status 0; see trac-8605, trac-14207\n xhr.status, xhr.statusText);\n }\n } else {\n complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, // Support: IE <=9 only\n // IE9 has no XHR2 but throws on binary (trac-11426)\n // For XHR2 non-text, let the caller handle it (gh-2498)\n (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? {\n binary: xhr.response\n } : {\n text: xhr.responseText\n }, xhr.getAllResponseHeaders());\n }\n }\n };\n }; // Listen to events\n\n\n xhr.onload = _callback();\n errorCallback = xhr.onerror = xhr.ontimeout = _callback("error"); // Support: IE 9 only\n // Use onreadystatechange to replace onabort\n // to handle uncaught aborts\n\n if (xhr.onabort !== undefined) {\n xhr.onabort = errorCallback;\n } else {\n xhr.onreadystatechange = function () {\n // Check readyState before timeout as it changes\n if (xhr.readyState === 4) {\n // Allow onerror to be called first,\n // but that will not handle a native abort\n // Also, save errorCallback to a variable\n // as xhr.onerror cannot be accessed\n window.setTimeout(function () {\n if (_callback) {\n errorCallback();\n }\n });\n }\n };\n } // Create the abort callback\n\n\n _callback = _callback("abort");\n\n try {\n // Do send the request (this may raise an exception)\n xhr.send(options.hasContent && options.data || null);\n } catch (e) {\n // trac-14683: Only rethrow if this hasn\'t been notified as an error yet\n if (_callback) {\n throw e;\n }\n }\n },\n abort: function abort() {\n if (_callback) {\n _callback();\n }\n }\n };\n }\n }); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\n\n jQuery.ajaxPrefilter(function (s) {\n if (s.crossDomain) {\n s.contents.script = false;\n }\n }); // Install script dataType\n\n jQuery.ajaxSetup({\n accepts: {\n script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript"\n },\n contents: {\n script: /\\b(?:java|ecma)script\\b/\n },\n converters: {\n "text script": function textScript(text) {\n jQuery.globalEval(text);\n return text;\n }\n }\n }); // Handle cache\'s special case and crossDomain\n\n jQuery.ajaxPrefilter("script", function (s) {\n if (s.cache === undefined) {\n s.cache = false;\n }\n\n if (s.crossDomain) {\n s.type = "GET";\n }\n }); // Bind script tag hack transport\n\n jQuery.ajaxTransport("script", function (s) {\n // This transport only deals with cross domain or forced-by-attrs requests\n if (s.crossDomain || s.scriptAttrs) {\n var script, _callback2;\n\n return {\n send: function send(_, complete) {\n script = jQuery("