Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##view-source:https://logiem.com/aeefb6c.js
- 'use strict';
- !function(global, factory) {
- if ("object" == typeof module && "object" == typeof module.exports) {
- module.exports = global.document ? factory(global, true) : function(global) {
- if (!global.document) {
- throw new Error("jQuery requires a window with a document");
- }
- return factory(global);
- };
- } else {
- factory(global);
- }
- }("undefined" != typeof window ? window : this, function(window, start_column) {
- /**
- * @param {string} value
- * @param {!Object} context
- * @param {!Object} doc
- * @return {undefined}
- */
- function cb(value, context, doc) {
- var key;
- var imgSrcset;
- var element = (doc = doc || document).createElement("script");
- if (element.text = value, context) {
- for (key in obj) {
- if (imgSrcset = context[key] || context.getAttribute && context.getAttribute(key)) {
- element.setAttribute(key, imgSrcset);
- }
- }
- }
- doc.head.appendChild(element).parentNode.removeChild(element);
- }
- /**
- * @param {string} value
- * @return {?}
- */
- function type(value) {
- return null == value ? value + "" : "object" == typeof value || "function" == typeof value ? class2type[toString.call(value)] || "object" : typeof value;
- }
- /**
- * @param {!Object} obj
- * @return {?}
- */
- function isArrayLike(obj) {
- var length = !!obj && "length" in obj && obj.length;
- var ltype = type(obj);
- return !fn(obj) && !isWindow(obj) && ("array" === ltype || 0 === length || "number" == typeof length && 0 < length && length - 1 in obj);
- }
- /**
- * @param {!Object} name
- * @param {!Object} type
- * @return {?}
- */
- function callback(name, type) {
- return name.nodeName && name.nodeName.toLowerCase() === type.toLowerCase();
- }
- /**
- * @param {!Array} key
- * @param {!Object} value
- * @param {boolean} not
- * @return {?}
- */
- function filter(key, value, not) {
- return fn(value) ? jQuery.grep(key, function(context, i) {
- return !!value.call(context, i, context) !== not;
- }) : value.nodeType ? jQuery.grep(key, function(elem) {
- return elem === value !== not;
- }) : "string" != typeof value ? jQuery.grep(key, function(name) {
- return -1 < indexOf.call(value, name) !== not;
- }) : jQuery.filter(value, key, not);
- }
- /**
- * @param {(Array|Element)} cur
- * @param {number} dir
- * @return {?}
- */
- function sibling(cur, dir) {
- for (; (cur = cur[dir]) && 1 !== cur.nodeType;) {
- }
- return cur;
- }
- /**
- * @param {?} expPair
- * @return {?}
- */
- function failed(expPair) {
- return expPair;
- }
- /**
- * @param {?} name
- * @return {?}
- */
- function data(name) {
- throw name;
- }
- /**
- * @param {!Object} data
- * @param {!Function} path
- * @param {!Function} callback
- * @param {boolean} args
- * @return {undefined}
- */
- function resolve(data, path, callback, args) {
- var error;
- try {
- if (data && fn(error = data.promise)) {
- error.call(data).done(path).fail(callback);
- } else {
- if (data && fn(error = data.then)) {
- error.call(data, path, callback);
- } else {
- path.apply(void 0, [data].slice(args));
- }
- }
- } catch (success) {
- callback.apply(void 0, [success]);
- }
- }
- /**
- * @return {undefined}
- */
- function $__jsx_onload() {
- document.removeEventListener("DOMContentLoaded", $__jsx_onload);
- window.removeEventListener("load", $__jsx_onload);
- jQuery.ready();
- }
- /**
- * @param {?} context
- * @param {string} match
- * @return {?}
- */
- function dashToCapital(context, match) {
- return match.toUpperCase();
- }
- /**
- * @param {!Object} str
- * @return {?}
- */
- function camelCase(str) {
- return str.replace(_kerningNamesHash_escapeEscape, "ms-").replace(rcharset, dashToCapital);
- }
- /**
- * @return {undefined}
- */
- function Data() {
- this.expando = jQuery.expando + Data.uid++;
- }
- /**
- * @param {!Object} elem
- * @param {!Object} name
- * @param {?} json
- * @return {?}
- */
- function func(elem, name, json) {
- var key;
- var value;
- if (void 0 === json && 1 === elem.nodeType) {
- if (key = "data-" + name.replace(dashExpr, "-$&").toLowerCase(), "string" == typeof(json = elem.getAttribute(key))) {
- try {
- /** @type {*} */
- json = "true" === (value = json) || "false" !== value && ("null" === value ? null : value === +value + "" ? +value : contribRegex.test(value) ? JSON.parse(value) : value);
- } catch (e) {
- }
- self.set(elem, name, json);
- } else {
- json = void 0;
- }
- }
- return json;
- }
- /**
- * @param {string} elem
- * @param {string} prop
- * @param {string} valueParts
- * @param {!Object} tween
- * @return {?}
- */
- function adjustCSS(elem, prop, valueParts, tween) {
- var adjusted;
- var scale;
- /** @type {number} */
- var a = 20;
- /** @type {function(): ?} */
- var currentValue = tween ? function() {
- return tween.cur();
- } : function() {
- return jQuery.css(elem, prop, "");
- };
- var initial = currentValue();
- var unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px");
- var initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || "px" !== unit && +initial) && regex.exec(jQuery.css(elem, prop));
- if (initialInUnit && initialInUnit[3] !== unit) {
- /** @type {number} */
- initial = initial / 2;
- unit = unit || initialInUnit[3];
- /** @type {number} */
- initialInUnit = +initial || 1;
- for (; a--;) {
- jQuery.style(elem, prop, initialInUnit + unit);
- if ((1 - scale) * (1 - (scale = currentValue() / initial || .5)) <= 0) {
- /** @type {number} */
- a = 0;
- }
- /** @type {number} */
- initialInUnit = initialInUnit / scale;
- }
- /** @type {number} */
- initialInUnit = initialInUnit * 2;
- jQuery.style(elem, prop, initialInUnit + unit);
- valueParts = valueParts || [];
- }
- return valueParts && (initialInUnit = +initialInUnit || +initial || 0, adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2], tween && (tween.unit = unit, tween.start = initialInUnit, tween.end = adjusted)), adjusted;
- }
- /**
- * @param {!Array} result
- * @param {boolean} e
- * @return {?}
- */
- function show(result, e) {
- var size;
- var elem;
- var element;
- var node;
- var parent;
- var tagName;
- var display;
- /** @type {!Array} */
- var values = [];
- /** @type {number} */
- var i = 0;
- var inlineCount = result.length;
- for (; i < inlineCount; i++) {
- if ((elem = result[i]).style) {
- size = elem.style.display;
- if (e) {
- if ("none" === size) {
- values[i] = dataPriv.get(elem, "display") || null;
- if (!values[i]) {
- /** @type {string} */
- elem.style.display = "";
- }
- }
- if ("" === elem.style.display && isHidden(elem)) {
- values[i] = (display = parent = node = void 0, parent = (element = elem).ownerDocument, tagName = element.nodeName, (display = elemdisplay[tagName]) || (node = parent.body.appendChild(parent.createElement(tagName)), display = jQuery.css(node, "display"), node.parentNode.removeChild(node), "none" === display && (display = "block"), elemdisplay[tagName] = display));
- }
- } else {
- if ("none" !== size) {
- /** @type {string} */
- values[i] = "none";
- dataPriv.set(elem, "display", size);
- }
- }
- }
- }
- /** @type {number} */
- i = 0;
- for (; i < inlineCount; i++) {
- if (null != values[i]) {
- result[i].style.display = values[i];
- }
- }
- return result;
- }
- /**
- * @param {!Object} context
- * @param {number} tag
- * @return {?}
- */
- function getAll(context, tag) {
- var n;
- return n = "undefined" != typeof context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : "undefined" != typeof context.querySelectorAll ? context.querySelectorAll(tag || "*") : [], void 0 === tag || tag && callback(context, tag) ? jQuery.merge([context], n) : n;
- }
- /**
- * @param {number} elems
- * @param {!NodeList} refElements
- * @return {undefined}
- */
- function setGlobalEval(elems, refElements) {
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- for (; i < length; i++) {
- dataPriv.set(elems[i], "globalEval", !refElements || dataPriv.get(refElements[i], "globalEval"));
- }
- }
- /**
- * @param {!Array} elems
- * @param {!Object} context
- * @param {!Array} result
- * @param {!Object} element
- * @param {string} ignored
- * @return {?}
- */
- function buildFragment(elems, context, result, element, ignored) {
- var elem;
- var tmp;
- var tag;
- var wrap;
- var parent;
- var j;
- var fragment = context.createDocumentFragment();
- /** @type {!Array} */
- var results = [];
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- for (; i < length; i++) {
- if ((elem = elems[i]) || 0 === elem) {
- if ("object" === type(elem)) {
- jQuery.merge(results, elem.nodeType ? [elem] : elem);
- } else {
- if (re_commas.test(elem)) {
- tmp = tmp || fragment.appendChild(context.createElement("div"));
- tag = (me.exec(elem) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
- j = wrap[0];
- for (; j--;) {
- tmp = tmp.lastChild;
- }
- jQuery.merge(results, tmp.childNodes);
- /** @type {string} */
- (tmp = fragment.firstChild).textContent = "";
- } else {
- results.push(context.createTextNode(elem));
- }
- }
- }
- }
- /** @type {string} */
- fragment.textContent = "";
- /** @type {number} */
- i = 0;
- for (; elem = results[i++];) {
- if (element && -1 < jQuery.inArray(elem, element)) {
- if (ignored) {
- ignored.push(elem);
- }
- } else {
- if (parent = test(elem), tmp = getAll(fragment.appendChild(elem), "script"), parent && setGlobalEval(tmp), result) {
- /** @type {number} */
- j = 0;
- for (; elem = tmp[j++];) {
- if (opacityRe.test(elem.type || "")) {
- result.push(elem);
- }
- }
- }
- }
- }
- return fragment;
- }
- /**
- * @return {?}
- */
- function returnTrue() {
- return true;
- }
- /**
- * @return {?}
- */
- function returnFalse() {
- return false;
- }
- /**
- * @param {?} event
- * @param {string} data
- * @return {?}
- */
- function raw(event, data) {
- return event === function() {
- try {
- return document.activeElement;
- } catch (e) {
- }
- }() == ("focus" === data);
- }
- /**
- * @param {!Object} code
- * @param {!Object} obj
- * @param {!Object} callback
- * @param {!Object} type
- * @param {!Object} handler
- * @param {number} next
- * @return {?}
- */
- function get(code, obj, callback, type, handler, next) {
- var fn;
- var key;
- if ("object" == typeof obj) {
- for (key in "string" != typeof callback && (type = type || callback, callback = void 0), obj) {
- get(code, key, callback, type, obj[key], next);
- }
- return code;
- }
- if (null == type && null == handler ? (handler = callback, type = callback = void 0) : null == handler && ("string" == typeof callback ? (handler = type, type = void 0) : (handler = type, type = callback, callback = void 0)), false === handler) {
- /** @type {function(): ?} */
- handler = returnFalse;
- } else {
- if (!handler) {
- return code;
- }
- }
- return 1 === next && (fn = handler, (handler = function(type) {
- return jQuery().off(type), fn.apply(this, arguments);
- }).guid = fn.guid || (fn.guid = jQuery.guid++)), code.each(function() {
- jQuery.event.add(this, obj, handler, type, callback);
- });
- }
- /**
- * @param {undefined} elem
- * @param {string} type
- * @param {!Function} handler
- * @return {undefined}
- */
- function handler(elem, type, handler) {
- if (handler) {
- dataPriv.set(elem, type, false);
- jQuery.event.add(elem, type, {
- namespace : false,
- handler : function(event) {
- var promise;
- var attr;
- var data = dataPriv.get(this, type);
- if (1 & event.isTrigger && this[type]) {
- if (data.length) {
- if ((jQuery.event.special[type] || {}).delegateType) {
- event.stopPropagation();
- }
- } else {
- if (data = slice.call(arguments), dataPriv.set(this, type, data), promise = handler(this, type), this[type](), data !== (attr = dataPriv.get(this, type)) || promise ? dataPriv.set(this, type, false) : attr = {}, data !== attr) {
- return event.stopImmediatePropagation(), event.preventDefault(), attr.value;
- }
- }
- } else {
- if (data.length) {
- dataPriv.set(this, type, {
- value : jQuery.event.trigger(jQuery.extend(data[0], jQuery.Event.prototype), data.slice(1), this)
- });
- event.stopImmediatePropagation();
- }
- }
- }
- });
- } else {
- if (void 0 === dataPriv.get(elem, type)) {
- jQuery.event.add(elem, type, returnTrue);
- }
- }
- }
- /**
- * @param {undefined} elem
- * @param {!Object} content
- * @return {?}
- */
- function manipulationTarget(elem, content) {
- return callback(elem, "table") && callback(11 !== content.nodeType ? content : content.firstChild, "tr") && jQuery(elem).children("tbody")[0] || elem;
- }
- /**
- * @param {!Element} s
- * @return {?}
- */
- function v(s) {
- return s.type = (null !== s.getAttribute("type")) + "/" + s.type, s;
- }
- /**
- * @param {!Object} e
- * @return {?}
- */
- function createGeneNameGenomicState(e) {
- return "true/" === (e.type || "").slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute("type"), e;
- }
- /**
- * @param {string} node
- * @param {!Object} elem
- * @return {undefined}
- */
- function cloneCopyEvent(node, elem) {
- var i;
- var tableslen;
- var type;
- var b;
- var data;
- var events;
- if (1 === elem.nodeType) {
- if (dataPriv.hasData(node) && (events = dataPriv.get(node).events)) {
- for (type in dataPriv.remove(elem, "handle events"), events) {
- /** @type {number} */
- i = 0;
- tableslen = events[type].length;
- for (; i < tableslen; i++) {
- jQuery.event.add(elem, type, events[type][i]);
- }
- }
- }
- if (self.hasData(node)) {
- b = self.access(node);
- data = jQuery.extend({}, b);
- self.set(elem, data);
- }
- }
- }
- /**
- * @param {!Object} collection
- * @param {!Array} args
- * @param {!Function} callback
- * @param {string} ignored
- * @return {?}
- */
- function domManip(collection, args, callback, ignored) {
- args = map(args);
- var fragment;
- var first;
- var a;
- var tableslen;
- var node;
- var context;
- /** @type {number} */
- var i = 0;
- var totalItems = collection.length;
- /** @type {number} */
- var minimumIdx = totalItems - 1;
- var str = args[0];
- var ret = fn(str);
- if (ret || 1 < totalItems && "string" == typeof str && !support.checkClone && partten.test(str)) {
- return collection.each(function(index) {
- var self = collection.eq(index);
- if (ret) {
- args[0] = str.call(this, index, self.html());
- }
- domManip(self, args, callback, ignored);
- });
- }
- if (totalItems && (first = (fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored)).firstChild, 1 === fragment.childNodes.length && (fragment = first), first || ignored)) {
- tableslen = (a = jQuery.map(getAll(fragment, "script"), v)).length;
- for (; i < totalItems; i++) {
- node = fragment;
- if (i !== minimumIdx) {
- node = jQuery.clone(node, true, true);
- if (tableslen) {
- jQuery.merge(a, getAll(node, "script"));
- }
- }
- callback.call(collection[i], node, i);
- }
- if (tableslen) {
- context = a[a.length - 1].ownerDocument;
- jQuery.map(a, createGeneNameGenomicState);
- /** @type {number} */
- i = 0;
- for (; i < tableslen; i++) {
- node = a[i];
- if (opacityRe.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(context, node)) {
- if (node.src && "module" !== (node.type || "").toLowerCase()) {
- if (jQuery._evalUrl && !node.noModule) {
- jQuery._evalUrl(node.src, {
- nonce : node.nonce || node.getAttribute("nonce")
- }, context);
- }
- } else {
- cb(node.textContent.replace(query, ""), node, context);
- }
- }
- }
- }
- }
- return collection;
- }
- /**
- * @param {?} val
- * @param {boolean} fn
- * @param {string} table
- * @return {?}
- */
- function remove(val, fn, table) {
- var elem;
- var value = fn ? jQuery.filter(fn, val) : val;
- /** @type {number} */
- var name = 0;
- for (; null != (elem = value[name]); name++) {
- if (!(table || 1 !== elem.nodeType)) {
- jQuery.cleanData(getAll(elem));
- }
- if (elem.parentNode) {
- if (table && test(elem)) {
- setGlobalEval(getAll(elem, "script"));
- }
- elem.parentNode.removeChild(elem);
- }
- }
- return val;
- }
- /**
- * @param {!Object} elem
- * @param {string} name
- * @param {!Object} computed
- * @return {?}
- */
- function curCSS(elem, name, computed) {
- var minWidth;
- var width;
- var maxWidth;
- var ret;
- var style = elem.style;
- return (computed = computed || getStyles(elem)) && ("" !== (ret = computed.getPropertyValue(name) || computed[name]) || test(elem) || (ret = jQuery.style(elem, name)), !support.pixelBoxStyles() && rnumnonpx.test(ret) && inlineAttributeCommentRegex.test(name) && (minWidth = style.width, width = style.minWidth, maxWidth = style.maxWidth, style.minWidth = style.maxWidth = style.width = ret, ret = computed.width, style.width = minWidth, style.minWidth = width, style.maxWidth = maxWidth)), void 0 !==
- ret ? ret + "" : ret;
- }
- /**
- * @param {?} conditionFn
- * @param {!Function} hookFn
- * @return {?}
- */
- function addGetHookIf(conditionFn, hookFn) {
- return {
- get : function() {
- if (!conditionFn()) {
- return (this.get = hookFn).apply(this, arguments);
- }
- delete this.get;
- }
- };
- }
- /**
- * @param {string} name
- * @return {?}
- */
- function camelize(name) {
- var nameField = jQuery.cssProps[name] || aSupports[name];
- return nameField || (name in testStyle ? name : aSupports[name] = function(p) {
- var prop = p[0].toUpperCase() + p.slice(1);
- /** @type {number} */
- var i = prefixes.length;
- for (; i--;) {
- if ((p = prefixes[i] + prop) in testStyle) {
- return p;
- }
- }
- }(name) || name);
- }
- /**
- * @param {!Object} value
- * @param {!Object} key
- * @param {string} type
- * @return {?}
- */
- function _set(value, key, type) {
- /** @type {(Array<string>|null)} */
- var matches = regex.exec(key);
- return matches ? Math.max(0, matches[2] - (type || 0)) + (matches[3] || "px") : key;
- }
- /**
- * @param {!Object} elem
- * @param {string} name
- * @param {string} extra
- * @param {boolean} isBorderBox
- * @param {!Object} styles
- * @param {number} themeName
- * @return {?}
- */
- function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles, themeName) {
- /** @type {number} */
- var i = "width" === name ? 1 : 0;
- /** @type {number} */
- var value = 0;
- /** @type {number} */
- var val = 0;
- if (extra === (isBorderBox ? "border" : "content")) {
- return 0;
- }
- for (; i < 4; i = i + 2) {
- if ("margin" === extra) {
- val = val + jQuery.css(elem, extra + cssExpand[i], true, styles);
- }
- if (isBorderBox) {
- if ("content" === extra) {
- /** @type {number} */
- val = val - jQuery.css(elem, "padding" + cssExpand[i], true, styles);
- }
- if ("margin" !== extra) {
- /** @type {number} */
- val = val - jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
- }
- } else {
- val = val + jQuery.css(elem, "padding" + cssExpand[i], true, styles);
- if ("padding" !== extra) {
- val = val + jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
- } else {
- value = value + jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
- }
- }
- }
- return !isBorderBox && 0 <= themeName && (val = val + (Math.max(0, Math.ceil(elem["offset" + name[0].toUpperCase() + name.slice(1)] - themeName - val - value - .5)) || 0)), val;
- }
- /**
- * @param {!Element} elem
- * @param {string} name
- * @param {!Object} extra
- * @return {?}
- */
- function load(elem, name, extra) {
- var styles = getStyles(elem);
- var isBorderBox = (!support.boxSizingReliable() || extra) && "border-box" === jQuery.css(elem, "boxSizing", false, styles);
- var valueIsBorderBox = isBorderBox;
- var value = curCSS(elem, name, styles);
- var prop = "offset" + name[0].toUpperCase() + name.slice(1);
- if (rnumnonpx.test(value)) {
- if (!extra) {
- return value;
- }
- /** @type {string} */
- value = "auto";
- }
- return (!support.boxSizingReliable() && isBorderBox || !support.reliableTrDimensions() && callback(elem, "tr") || "auto" === value || !parseFloat(value) && "inline" === jQuery.css(elem, "display", false, styles)) && elem.getClientRects().length && (isBorderBox = "border-box" === jQuery.css(elem, "boxSizing", false, styles), (valueIsBorderBox = prop in elem) && (value = elem[prop])), (value = parseFloat(value) || 0) + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"),
- valueIsBorderBox, styles, value) + "px";
- }
- /**
- * @param {!Array} type
- * @param {!Function} context
- * @param {string} object
- * @param {string} end
- * @param {number} easing
- * @return {?}
- */
- function Tween(type, context, object, end, easing) {
- return new Tween.prototype.init(type, context, object, end, easing);
- }
- /**
- * @return {undefined}
- */
- function step() {
- if (nt) {
- if (false === document.hidden && window.requestAnimationFrame) {
- window.requestAnimationFrame(step);
- } else {
- window.setTimeout(step, jQuery.fx.interval);
- }
- jQuery.fx.tick();
- }
- }
- /**
- * @return {?}
- */
- function createFxNow() {
- return window.setTimeout(function() {
- fxNow = void 0;
- }), fxNow = Date.now();
- }
- /**
- * @param {string} type
- * @param {number} includeWidth
- * @return {?}
- */
- function genFx(type, includeWidth) {
- var which;
- /** @type {number} */
- var i = 0;
- var attrs = {
- height : type
- };
- /** @type {number} */
- includeWidth = includeWidth ? 1 : 0;
- for (; i < 4; i = i + (2 - includeWidth)) {
- attrs["margin" + (which = cssExpand[i])] = attrs["padding" + which] = type;
- }
- return includeWidth && (attrs.opacity = attrs.width = type), attrs;
- }
- /**
- * @param {?} value
- * @param {string} prop
- * @param {?} animation
- * @return {?}
- */
- function createTween(value, prop, animation) {
- var tween;
- var args = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]);
- /** @type {number} */
- var i = 0;
- var az = args.length;
- for (; i < az; i++) {
- if (tween = args[i].call(animation, prop, value)) {
- return tween;
- }
- }
- }
- /**
- * @param {!Object} elem
- * @param {?} properties
- * @param {!Object} options
- * @return {?}
- */
- function Animation(elem, properties, options) {
- var result;
- var a;
- /** @type {number} */
- var index = 0;
- var ncells = Animation.prefilters.length;
- var deferred = jQuery.Deferred().always(function() {
- delete tick.elem;
- });
- /**
- * @return {?}
- */
- var tick = function() {
- if (a) {
- return false;
- }
- var currentTime = fxNow || createFxNow();
- /** @type {number} */
- var remaining = Math.max(0, animation.startTime + animation.duration - currentTime);
- /** @type {number} */
- var percent = 1 - (remaining / animation.duration || 0);
- /** @type {number} */
- var i = 0;
- var length = animation.tweens.length;
- for (; i < length; i++) {
- animation.tweens[i].run(percent);
- }
- return deferred.notifyWith(elem, [animation, percent, remaining]), percent < 1 && length ? remaining : (length || deferred.notifyWith(elem, [animation, 1, 0]), deferred.resolveWith(elem, [animation]), false);
- };
- var animation = deferred.promise({
- elem : elem,
- props : jQuery.extend({}, properties),
- opts : jQuery.extend(true, {
- specialEasing : {},
- easing : jQuery.easing._default
- }, options),
- originalProperties : properties,
- originalOptions : options,
- startTime : fxNow || createFxNow(),
- duration : options.duration,
- tweens : [],
- createTween : function(prop, end) {
- var result = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
- return animation.tweens.push(result), result;
- },
- stop : function(value) {
- /** @type {number} */
- var i = 0;
- var mid = value ? animation.tweens.length : 0;
- if (a) {
- return this;
- }
- /** @type {boolean} */
- a = true;
- for (; i < mid; i++) {
- animation.tweens[i].run(1);
- }
- return value ? (deferred.notifyWith(elem, [animation, 1, 0]), deferred.resolveWith(elem, [animation, value])) : deferred.rejectWith(elem, [animation, value]), this;
- }
- });
- var props = animation.props;
- !function(res, object) {
- var key;
- var name;
- var value;
- var obj;
- var hooks;
- for (key in res) {
- if (value = object[name = camelCase(key)], obj = res[key], Array.isArray(obj) && (value = obj[1], obj = res[key] = obj[0]), key !== name && (res[name] = obj, delete res[key]), (hooks = jQuery.cssHooks[name]) && "expand" in hooks) {
- for (key in obj = hooks.expand(obj), delete res[name], obj) {
- if (!(key in res)) {
- res[key] = obj[key];
- object[key] = value;
- }
- }
- } else {
- object[name] = value;
- }
- }
- }(props, animation.opts.specialEasing);
- for (; index < ncells; index++) {
- if (result = Animation.prefilters[index].call(animation, elem, props, animation.opts)) {
- return fn(result.stop) && (jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result)), result;
- }
- }
- return jQuery.map(props, createTween, animation), fn(animation.opts.start) && animation.opts.start.call(elem, animation), animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always), jQuery.fx.timer(jQuery.extend(tick, {
- elem : elem,
- anim : animation,
- queue : animation.opts.queue
- })), animation;
- }
- /**
- * @param {string} b
- * @return {?}
- */
- function merge(b) {
- return (b.match(re) || []).join(" ");
- }
- /**
- * @param {!Node} el
- * @return {?}
- */
- function $(el) {
- return el.getAttribute && el.getAttribute("class") || "";
- }
- /**
- * @param {string} value
- * @return {?}
- */
- function clean(value) {
- return Array.isArray(value) ? value : "string" == typeof value && value.match(re) || [];
- }
- /**
- * @param {string} url
- * @param {!Array} a
- * @param {string} text
- * @param {!Function} f
- * @return {undefined}
- */
- function set(url, a, text, f) {
- var key;
- if (Array.isArray(a)) {
- jQuery.each(a, function(callback_key, response) {
- if (text || reIsFile.test(url)) {
- f(url, response);
- } else {
- set(url + "[" + ("object" == typeof response && null != response ? callback_key : "") + "]", response, text, f);
- }
- });
- } else {
- if (text || "object" !== type(a)) {
- f(url, a);
- } else {
- for (key in a) {
- set(url + "[" + key + "]", a[key], text, f);
- }
- }
- }
- }
- /**
- * @param {!Object} structure
- * @return {?}
- */
- function addToPrefiltersOrTransports(structure) {
- return function(val, t) {
- if ("string" != typeof val) {
- /** @type {string} */
- t = val;
- /** @type {string} */
- val = "*";
- }
- var type;
- /** @type {number} */
- var c = 0;
- var replies = val.toLowerCase().match(re) || [];
- if (fn(t)) {
- for (; type = replies[c++];) {
- if ("+" === type[0]) {
- type = type.slice(1) || "*";
- (structure[type] = structure[type] || []).unshift(t);
- } else {
- (structure[type] = structure[type] || []).push(t);
- }
- }
- }
- };
- }
- /**
- * @param {!Object} structure
- * @param {?} options
- * @param {!Object} originalOptions
- * @param {?} jqXHR
- * @return {?}
- */
- function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
- /**
- * @param {string} type
- * @return {?}
- */
- function inspect(type) {
- var selected;
- return nodedescriptions[type] = true, jQuery.each(structure[type] || [], function(canCreateDiscussions, prefilterOrFactory) {
- var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
- return "string" != typeof dataTypeOrTransport || seekingTransport || nodedescriptions[dataTypeOrTransport] ? seekingTransport ? !(selected = dataTypeOrTransport) : void 0 : (options.dataTypes.unshift(dataTypeOrTransport), inspect(dataTypeOrTransport), false);
- }), selected;
- }
- var nodedescriptions = {};
- /** @type {boolean} */
- var seekingTransport = structure === transports;
- return inspect(options.dataTypes[0]) || !nodedescriptions["*"] && inspect("*");
- }
- /**
- * @param {?} target
- * @param {?} opts
- * @return {?}
- */
- function ajaxExtend(target, opts) {
- var key;
- var deep;
- var flatOptions = jQuery.ajaxSettings.flatOptions || {};
- for (key in opts) {
- if (void 0 !== opts[key]) {
- (flatOptions[key] ? target : deep || (deep = {}))[key] = opts[key];
- }
- }
- return deep && jQuery.extend(true, target, deep), target;
- }
- /** @type {!Array} */
- var arr = [];
- /** @type {function(!Object): (Object|null)} */
- var getProto = Object.getPrototypeOf;
- /** @type {function(this:(IArrayLike<T>|string), *=, *=): !Array<T>} */
- var slice = arr.slice;
- /** @type {function(!Array): ?} */
- var map = arr.flat ? function(elems) {
- return arr.flat.call(elems);
- } : function(args) {
- return arr.concat.apply([], args);
- };
- /** @type {function(this:IArrayLike<T>, ...T): number} */
- var push = arr.push;
- /** @type {function(this:(IArrayLike<T>|string), T, number=): number} */
- var indexOf = arr.indexOf;
- var class2type = {};
- /** @type {function(this:*): string} */
- var toString = class2type.toString;
- /** @type {function(this:Object, *): boolean} */
- var hasOwn = class2type.hasOwnProperty;
- /** @type {function(this:!Function): string} */
- var fnToString = hasOwn.toString;
- /** @type {string} */
- var Mixin2 = fnToString.call(Object);
- var support = {};
- /**
- * @param {string} obj
- * @return {?}
- */
- var fn = function(obj) {
- return "function" == typeof obj && "number" != typeof obj.nodeType;
- };
- /**
- * @param {!Object} obj
- * @return {?}
- */
- var isWindow = function(obj) {
- return null != obj && obj === obj.window;
- };
- var document = window.document;
- var obj = {
- type : true,
- src : true,
- nonce : true,
- noModule : true
- };
- /** @type {string} */
- var core_version = "3.5.1";
- /**
- * @param {!Array} selector
- * @param {!Function} context
- * @return {?}
- */
- var jQuery = function(selector, context) {
- return new jQuery.fn.init(selector, context);
- };
- jQuery.fn = jQuery.prototype = {
- jquery : core_version,
- constructor : jQuery,
- length : 0,
- toArray : function() {
- return slice.call(this);
- },
- get : function(num) {
- return null == num ? slice.call(this) : num < 0 ? this[num + this.length] : this[num];
- },
- pushStack : function(a) {
- var elm = jQuery.merge(this.constructor(), a);
- return elm.prevObject = this, elm;
- },
- each : function(callback) {
- return jQuery.each(this, callback);
- },
- map : function(fn) {
- return this.pushStack(jQuery.map(this, function(elem, event) {
- return fn.call(elem, event, elem);
- }));
- },
- slice : function() {
- return this.pushStack(slice.apply(this, arguments));
- },
- first : function() {
- return this.eq(0);
- },
- last : function() {
- return this.eq(-1);
- },
- even : function() {
- return this.pushStack(jQuery.grep(this, function(canCreateDiscussions, isSlidingUp) {
- return (isSlidingUp + 1) % 2;
- }));
- },
- odd : function() {
- return this.pushStack(jQuery.grep(this, function(canCreateDiscussions, isSlidingUp) {
- return isSlidingUp % 2;
- }));
- },
- eq : function(i) {
- var len = this.length;
- var end = +i + (i < 0 ? len : 0);
- return this.pushStack(0 <= end && end < len ? [this[end]] : []);
- },
- end : function() {
- return this.prevObject || this.constructor();
- },
- push : push,
- sort : arr.sort,
- splice : arr.splice
- };
- /** @type {function(): ?} */
- jQuery.extend = jQuery.fn.extend = function() {
- var options;
- var name;
- var value;
- var copy;
- var copyIsArray;
- var clone;
- var target = arguments[0] || {};
- /** @type {number} */
- var i = 1;
- /** @type {number} */
- var length = arguments.length;
- /** @type {boolean} */
- var deep = false;
- if ("boolean" == typeof target) {
- /** @type {boolean} */
- deep = target;
- target = arguments[i] || {};
- i++;
- }
- if (!("object" == typeof target || fn(target))) {
- target = {};
- }
- if (i === length) {
- target = this;
- i--;
- }
- for (; i < length; i++) {
- if (null != (options = arguments[i])) {
- for (name in options) {
- copy = options[name];
- if ("__proto__" !== name && target !== copy) {
- if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
- value = target[name];
- clone = copyIsArray && !Array.isArray(value) ? [] : copyIsArray || jQuery.isPlainObject(value) ? value : {};
- /** @type {boolean} */
- copyIsArray = false;
- target[name] = jQuery.extend(deep, clone, copy);
- } else {
- if (void 0 !== copy) {
- target[name] = copy;
- }
- }
- }
- }
- }
- }
- return target;
- };
- jQuery.extend({
- expando : "jQuery" + (core_version + Math.random()).replace(/\D/g, ""),
- isReady : true,
- error : function(value) {
- throw new Error(value);
- },
- noop : function() {
- },
- isPlainObject : function(obj) {
- var proto;
- var hasOwnProperty;
- return !(!obj || "[object Object]" !== toString.call(obj)) && (!(proto = getProto(obj)) || "function" == typeof(hasOwnProperty = hasOwn.call(proto, "constructor") && proto.constructor) && fnToString.call(hasOwnProperty) === Mixin2);
- },
- isEmptyObject : function(obj) {
- var key;
- for (key in obj) {
- return false;
- }
- return true;
- },
- globalEval : function(url, data, x) {
- cb(url, {
- nonce : data && data.nonce
- }, x);
- },
- each : function(object, callback) {
- var aLength;
- /** @type {number} */
- var i = 0;
- if (isArrayLike(object)) {
- aLength = object.length;
- for (; i < aLength; i++) {
- if (false === callback.call(object[i], i, object[i])) {
- break;
- }
- }
- } else {
- for (i in object) {
- if (false === callback.call(object[i], i, object[i])) {
- break;
- }
- }
- }
- return object;
- },
- makeArray : function(arr, o) {
- var obj = o || [];
- return null != arr && (isArrayLike(Object(arr)) ? jQuery.merge(obj, "string" == typeof arr ? [arr] : arr) : push.call(obj, arr)), obj;
- },
- inArray : function(elem, arr, i) {
- return null == arr ? -1 : indexOf.call(arr, elem, i);
- },
- merge : function(a, b) {
- /** @type {number} */
- var _jlen = +b.length;
- /** @type {number} */
- var k = 0;
- var l = a.length;
- for (; k < _jlen; k++) {
- a[l++] = b[k];
- }
- return a.length = l, a;
- },
- grep : function(elements, callback, a) {
- /** @type {!Array} */
- var ret = [];
- /** @type {number} */
- var i = 0;
- var eL = elements.length;
- /** @type {boolean} */
- var booA = !a;
- for (; i < eL; i++) {
- if (!callback(elements[i], i) !== booA) {
- ret.push(elements[i]);
- }
- }
- return ret;
- },
- map : function(input, t, path) {
- var inpLen;
- var value;
- /** @type {number} */
- var i = 0;
- /** @type {!Array} */
- var args = [];
- if (isArrayLike(input)) {
- inpLen = input.length;
- for (; i < inpLen; i++) {
- if (null != (value = t(input[i], i, path))) {
- args.push(value);
- }
- }
- } else {
- for (i in input) {
- if (null != (value = t(input[i], i, path))) {
- args.push(value);
- }
- }
- }
- return map(args);
- },
- guid : 1,
- support : support
- });
- if ("function" == typeof Symbol) {
- jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
- }
- jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(canCreateDiscussions, p_Interval) {
- class2type["[object " + p_Interval + "]"] = p_Interval.toLowerCase();
- });
- var Sizzle = function(options) {
- /**
- * @param {string} selector
- * @param {!Object} context
- * @param {!Array} results
- * @param {!Array} seed
- * @return {?}
- */
- function Sizzle(selector, context, results, seed) {
- var m;
- var i;
- var elem;
- var nid;
- var match;
- var groups;
- var newSelector;
- var newContext = context && context.ownerDocument;
- var undefined = context ? context.nodeType : 9;
- if (results = results || [], "string" != typeof selector || !selector || 1 !== undefined && 9 !== undefined && 11 !== undefined) {
- return results;
- }
- if (!seed && (setDocument(context), context = context || document, documentIsHTML)) {
- if (11 !== undefined && (match = customSelectorReg.exec(selector))) {
- if (m = match[1]) {
- if (9 === undefined) {
- if (!(elem = context.getElementById(m))) {
- return results;
- }
- if (elem.id === m) {
- return results.push(elem), results;
- }
- } else {
- if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {
- return results.push(elem), results;
- }
- }
- } else {
- if (match[2]) {
- return push.apply(results, context.getElementsByTagName(selector)), results;
- }
- if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
- return push.apply(results, context.getElementsByClassName(m)), results;
- }
- }
- }
- if (support.qsa && !isUndefined[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)) && (1 !== undefined || "object" !== context.nodeName.toLowerCase())) {
- if (newSelector = selector, newContext = context, 1 === undefined && (RE_PSEUDOS.test(selector) || pattern.test(selector))) {
- if (!((newContext = IS_HTML_FRAGMENT.test(selector) && testContext(context.parentNode) || context) === context && support.scope)) {
- if (nid = context.getAttribute("id")) {
- nid = nid.replace(rcssescape, fcssescape);
- } else {
- context.setAttribute("id", nid = expando);
- }
- }
- i = (groups = tokenize(selector)).length;
- for (; i--;) {
- /** @type {string} */
- groups[i] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i]);
- }
- newSelector = groups.join(",");
- }
- try {
- return push.apply(results, newContext.querySelectorAll(newSelector)), results;
- } catch (e) {
- isUndefined(selector, true);
- } finally {
- if (nid === expando) {
- context.removeAttribute("id");
- }
- }
- }
- }
- return select(selector.replace(rtrim, "$1"), context, results, seed);
- }
- /**
- * @return {?}
- */
- function createCache() {
- /** @type {!Array} */
- var lengths = [];
- return function cache(duration, url) {
- return lengths.push(duration + " ") > Expr.cacheLength && delete cache[lengths.shift()], cache[duration + " "] = url;
- };
- }
- /**
- * @param {!Function} fn
- * @return {?}
- */
- function markFunction(fn) {
- return fn[expando] = true, fn;
- }
- /**
- * @param {!Function} expect
- * @return {?}
- */
- function assert(expect) {
- var wrap = document.createElement("fieldset");
- try {
- return !!expect(wrap);
- } catch (e) {
- return false;
- } finally {
- if (wrap.parentNode) {
- wrap.parentNode.removeChild(wrap);
- }
- /** @type {null} */
- wrap = null;
- }
- }
- /**
- * @param {string} handler
- * @param {!Function} index
- * @return {undefined}
- */
- function addHandle(handler, index) {
- var arr = handler.split("|");
- var i = arr.length;
- for (; i--;) {
- /** @type {!Function} */
- Expr.attrHandle[arr[i]] = index;
- }
- }
- /**
- * @param {!Object} a
- * @param {!Element} b
- * @return {?}
- */
- function siblingCheck(a, b) {
- var cur = b && a;
- var .num_const = cur && 1 === a.nodeType && 1 === b.nodeType && a.sourceIndex - b.sourceIndex;
- if (.num_const) {
- return .num_const;
- }
- if (cur) {
- for (; cur = cur.nextSibling;) {
- if (cur === b) {
- return -1;
- }
- }
- }
- return a ? 1 : -1;
- }
- /**
- * @param {!Object} selector
- * @return {?}
- */
- function jQuerify(selector) {
- return function(item) {
- return "input" === item.nodeName.toLowerCase() && item.type === selector;
- };
- }
- /**
- * @param {!Object} type
- * @return {?}
- */
- function createButtonPseudo(type) {
- return function(section) {
- var undefined = section.nodeName.toLowerCase();
- return ("input" === undefined || "button" === undefined) && section.type === type;
- };
- }
- /**
- * @param {boolean} disabled
- * @return {?}
- */
- function createDisabledPseudo(disabled) {
- return function(elem) {
- return "form" in elem ? elem.parentNode && false === elem.disabled ? "label" in elem ? "label" in elem.parentNode ? elem.parentNode.disabled === disabled : elem.disabled === disabled : elem.isDisabled === disabled || elem.isDisabled !== !disabled && disabledAncestor(elem) === disabled : elem.disabled === disabled : "label" in elem && elem.disabled === disabled;
- };
- }
- /**
- * @param {!Function} fn
- * @return {?}
- */
- function createPositionalPseudo(fn) {
- return markFunction(function(args) {
- return args = +args, markFunction(function(h, i) {
- var k;
- var x = fn([], h.length, args);
- var i = x.length;
- for (; i--;) {
- if (h[k = x[i]]) {
- /** @type {boolean} */
- h[k] = !(i[k] = h[k]);
- }
- }
- });
- });
- }
- /**
- * @param {!Node} context
- * @return {?}
- */
- function testContext(context) {
- return context && "undefined" != typeof context.getElementsByTagName && context;
- }
- /**
- * @return {undefined}
- */
- function setFilters() {
- }
- /**
- * @param {!Array} tokens
- * @return {?}
- */
- function toSelector(tokens) {
- /** @type {number} */
- var i = 0;
- var numTokens = tokens.length;
- /** @type {string} */
- var selector = "";
- for (; i < numTokens; i++) {
- /** @type {string} */
- selector = selector + tokens[i].value;
- }
- return selector;
- }
- /**
- * @param {!Function} matcher
- * @param {!Object} combinator
- * @param {string} base
- * @return {?}
- */
- function addCombinator(matcher, combinator, base) {
- var dir = combinator.dir;
- var skip = combinator.next;
- var key = skip || dir;
- var checkNonElements = base && "parentNode" === key;
- /** @type {number} */
- var doneName = done++;
- return combinator.first ? function(elem, stat, context) {
- for (; elem = elem[dir];) {
- if (1 === elem.nodeType || checkNonElements) {
- return matcher(elem, stat, context);
- }
- }
- return false;
- } : function(elem, stat, context) {
- var oldCache;
- var uniqueCache;
- var outerCache;
- /** @type {!Array} */
- var newCache = [dirruns, doneName];
- if (context) {
- for (; elem = elem[dir];) {
- if ((1 === elem.nodeType || checkNonElements) && matcher(elem, stat, context)) {
- return true;
- }
- }
- } else {
- for (; elem = elem[dir];) {
- if (1 === elem.nodeType || checkNonElements) {
- if (uniqueCache = (outerCache = elem[expando] || (elem[expando] = {}))[elem.uniqueID] || (outerCache[elem.uniqueID] = {}), skip && skip === elem.nodeName.toLowerCase()) {
- elem = elem[dir] || elem;
- } else {
- if ((oldCache = uniqueCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
- return newCache[2] = oldCache[2];
- }
- if ((uniqueCache[key] = newCache)[2] = matcher(elem, stat, context)) {
- return true;
- }
- }
- }
- }
- }
- return false;
- };
- }
- /**
- * @param {!Object} matchers
- * @return {?}
- */
- function elementMatcher(matchers) {
- return 1 < matchers.length ? function(elem, context, xml) {
- var i = matchers.length;
- for (; i--;) {
- if (!matchers[i](elem, context, xml)) {
- return false;
- }
- }
- return true;
- } : matchers[0];
- }
- /**
- * @param {!Array} t
- * @param {!Object} color
- * @param {!Object} n
- * @param {!Object} e
- * @param {?} comments
- * @return {?}
- */
- function parse(t, color, n, e, comments) {
- var c;
- /** @type {!Array} */
- var Cells = [];
- /** @type {number} */
- var i = 0;
- var pal = t.length;
- /** @type {boolean} */
- var colorChange = null != color;
- for (; i < pal; i++) {
- if (c = t[i]) {
- if (!(n && !n(c, e, comments))) {
- Cells.push(c);
- if (colorChange) {
- color.push(i);
- }
- }
- }
- }
- return Cells;
- }
- /**
- * @param {!Object} options
- * @param {string} fields
- * @param {string} callback
- * @param {!Object} element
- * @param {!Object} fn
- * @param {string} data
- * @return {?}
- */
- function render(options, fields, callback, element, fn, data) {
- return element && !element[expando] && (element = render(element)), fn && !fn[expando] && (fn = render(fn, data)), markFunction(function(data, i, context, extra) {
- var key;
- var j;
- var value;
- /** @type {!Array} */
- var obj = [];
- /** @type {!Array} */
- var c = [];
- var o = i.length;
- var result = data || function(selector, set, results) {
- /** @type {number} */
- var i = 0;
- var l = set.length;
- for (; i < l; i++) {
- Sizzle(selector, set[i], results);
- }
- return results;
- }(fields || "*", context.nodeType ? [context] : context, []);
- var ret = !options || !data && fields ? result : parse(result, obj, options, context, extra);
- var item = callback ? fn || (data ? options : o || element) ? [] : i : ret;
- if (callback && callback(ret, item, context, extra), element) {
- key = parse(item, c);
- element(key, [], context, extra);
- j = key.length;
- for (; j--;) {
- if (value = key[j]) {
- /** @type {boolean} */
- item[c[j]] = !(ret[c[j]] = value);
- }
- }
- }
- if (data) {
- if (fn || options) {
- if (fn) {
- /** @type {!Array} */
- key = [];
- j = item.length;
- for (; j--;) {
- if (value = item[j]) {
- key.push(ret[j] = value);
- }
- }
- fn(null, item = [], key, extra);
- }
- j = item.length;
- for (; j--;) {
- if ((value = item[j]) && -1 < (key = fn ? indexOf(data, value) : obj[j])) {
- /** @type {boolean} */
- data[key] = !(i[key] = value);
- }
- }
- }
- } else {
- item = parse(item === i ? item.splice(o, item.length) : item);
- if (fn) {
- fn(null, i, item, extra);
- } else {
- push.apply(i, item);
- }
- }
- });
- }
- /**
- * @param {!Array} tokens
- * @return {?}
- */
- function matcherFromTokens(tokens) {
- var checkContext;
- var matcher;
- var j;
- var len = tokens.length;
- var leadingRelative = Expr.relative[tokens[0].type];
- var implicitRelative = leadingRelative || Expr.relative[" "];
- /** @type {number} */
- var i = leadingRelative ? 1 : 0;
- var matchContext = addCombinator(function(elem) {
- return elem === checkContext;
- }, implicitRelative, true);
- var matchAnyContext = addCombinator(function(value) {
- return -1 < indexOf(checkContext, value);
- }, implicitRelative, true);
- /** @type {!Array} */
- var matchers = [function(elem, context, xml) {
- var r = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
- return checkContext = null, r;
- }];
- for (; i < len; i++) {
- if (matcher = Expr.relative[tokens[i].type]) {
- /** @type {!Array} */
- matchers = [addCombinator(elementMatcher(matchers), matcher)];
- } else {
- if ((matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches))[expando]) {
- /** @type {number} */
- j = ++i;
- for (; j < len; j++) {
- if (Expr.relative[tokens[j].type]) {
- break;
- }
- }
- return render(1 < i && elementMatcher(matchers), 1 < i && toSelector(tokens.slice(0, i - 1).concat({
- value : " " === tokens[i - 2].type ? "*" : ""
- })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
- }
- matchers.push(matcher);
- }
- }
- return elementMatcher(matchers);
- }
- var i;
- var support;
- var Expr;
- var $;
- var isXML;
- var tokenize;
- var compile;
- var select;
- var outermostContext;
- var sortInput;
- var ret;
- var setDocument;
- var document;
- var docElem;
- var documentIsHTML;
- var rbuggyQSA;
- var rbuggyMatches;
- var matches;
- var contains;
- /** @type {string} */
- var expando = "sizzle" + 1 * new Date;
- var el = options.document;
- /** @type {number} */
- var dirruns = 0;
- /** @type {number} */
- var done = 0;
- var classCache = createCache();
- var tokenCache = createCache();
- var compilerCache = createCache();
- var isUndefined = createCache();
- /**
- * @param {?} type
- * @param {?} string
- * @return {?}
- */
- var time = function(type, string) {
- return type === string && (ret = true), 0;
- };
- /** @type {function(this:Object, *): boolean} */
- var hasOwn = {}.hasOwnProperty;
- /** @type {!Array} */
- var arr = [];
- /** @type {function(this:IArrayLike<T>): T} */
- var pop = arr.pop;
- /** @type {function(this:IArrayLike<T>, ...T): number} */
- var push_native = arr.push;
- /** @type {function(this:IArrayLike<T>, ...T): number} */
- var push = arr.push;
- /** @type {function(this:(IArrayLike<T>|string), *=, *=): !Array<T>} */
- var slice = arr.slice;
- /**
- * @param {string} list
- * @param {!Object} value
- * @return {?}
- */
- var indexOf = function(list, value) {
- /** @type {number} */
- var i = 0;
- var listLength = list.length;
- for (; i < listLength; i++) {
- if (list[i] === value) {
- return i;
- }
- }
- return -1;
- };
- /** @type {string} */
- var value = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped";
- /** @type {string} */
- var _test = "[\\x20\\t\\r\\n\\f]";
- /** @type {string} */
- var escRightBracket = "(?:\\\\[\\da-fA-F]{1,6}" + _test + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\x00-\\x7f])+";
- /** @type {string} */
- var _end2 = "\\[" + _test + "*(" + escRightBracket + ")(?:" + _test + "*([*^$|!~]?=)" + _test + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + escRightBracket + "))|)" + _test + "*\\]";
- /** @type {string} */
- var pseudos = ":(" + escRightBracket + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + _end2 + ")*)|.*)\\)|)";
- /** @type {!RegExp} */
- var entityEscapeRegExp = new RegExp(_test + "+", "g");
- /** @type {!RegExp} */
- var rtrim = new RegExp("^" + _test + "+|((?:^|[^\\\\])(?:\\\\.)*)" + _test + "+$", "g");
- /** @type {!RegExp} */
- var chunker = new RegExp("^" + _test + "*," + _test + "*");
- /** @type {!RegExp} */
- var pattern = new RegExp("^" + _test + "*([>+~]|" + _test + ")" + _test + "*");
- /** @type {!RegExp} */
- var RE_PSEUDOS = new RegExp(_test + "|>");
- /** @type {!RegExp} */
- var rpseudo = new RegExp(pseudos);
- /** @type {!RegExp} */
- var ridentifier = new RegExp("^" + escRightBracket + "$");
- var matchExpr = {
- ID : new RegExp("^#(" + escRightBracket + ")"),
- CLASS : new RegExp("^\\.(" + escRightBracket + ")"),
- TAG : new RegExp("^(" + escRightBracket + "|[*])"),
- ATTR : new RegExp("^" + _end2),
- PSEUDO : new RegExp("^" + pseudos),
- CHILD : new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + _test + "*(even|odd|(([+-]|)(\\d*)n|)" + _test + "*(?:([+-]|)" + _test + "*(\\d+)|))" + _test + "*\\)|)", "i"),
- bool : new RegExp("^(?:" + value + ")$", "i"),
- needsContext : new RegExp("^" + _test + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + _test + "*((?:-\\d)?\\d*)" + _test + "*\\)|)(?=[^-]|$)", "i")
- };
- /** @type {!RegExp} */
- var reKeyword = /HTML$/i;
- /** @type {!RegExp} */
- var inputNodeNames = /^(?:input|select|textarea|button)$/i;
- /** @type {!RegExp} */
- var rnoType = /^h\d$/i;
- /** @type {!RegExp} */
- var rnative = /^[^{]+\{\s*\[native \w/;
- /** @type {!RegExp} */
- var customSelectorReg = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/;
- /** @type {!RegExp} */
- var IS_HTML_FRAGMENT = /[+~]/;
- /** @type {!RegExp} */
- var a = new RegExp("\\\\[\\da-fA-F]{1,6}" + _test + "?|\\\\([^\\r\\n\\f])", "g");
- /**
- * @param {string} i
- * @param {string} match
- * @return {?}
- */
- var data = function(i, match) {
- /** @type {number} */
- var charCodeUpperA = "0x" + i.slice(1) - 65536;
- return match || (charCodeUpperA < 0 ? String.fromCharCode(charCodeUpperA + 65536) : String.fromCharCode(charCodeUpperA >> 10 | 55296, 1023 & charCodeUpperA | 56320));
- };
- /** @type {!RegExp} */
- var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
- /**
- * @param {string} text
- * @param {string} ch
- * @return {?}
- */
- var fcssescape = function(text, ch) {
- return ch ? "\x00" === text ? "\ufffd" : text.slice(0, -1) + "\\" + text.charCodeAt(text.length - 1).toString(16) + " " : "\\" + text;
- };
- /**
- * @return {undefined}
- */
- var unloadHandler = function() {
- setDocument();
- };
- var disabledAncestor = addCombinator(function(e) {
- return true === e.disabled && "fieldset" === e.nodeName.toLowerCase();
- }, {
- dir : "parentNode",
- next : "legend"
- });
- try {
- push.apply(arr = slice.call(el.childNodes), el.childNodes);
- arr[el.childNodes.length].nodeType;
- } catch (e) {
- push = {
- apply : arr.length ? function(target, array) {
- push_native.apply(target, slice.call(array));
- } : function(array, obj) {
- var length = array.length;
- /** @type {number} */
- var objCursor = 0;
- for (; array[length++] = obj[objCursor++];) {
- }
- /** @type {number} */
- array.length = length - 1;
- }
- };
- }
- for (i in support = Sizzle.support = {}, isXML = Sizzle.isXML = function(elem) {
- var nodeName = elem.namespaceURI;
- var xmlNode = (elem.ownerDocument || elem).documentElement;
- return !reKeyword.test(nodeName || xmlNode && xmlNode.nodeName || "HTML");
- }, setDocument = Sizzle.setDocument = function(root) {
- var init;
- var subWindow;
- var doc = root ? root.ownerDocument || root : el;
- return doc != document && 9 === doc.nodeType && doc.documentElement && (docElem = (document = doc).documentElement, documentIsHTML = !isXML(document), el != document && (subWindow = document.defaultView) && subWindow.top !== subWindow && (subWindow.addEventListener ? subWindow.addEventListener("unload", unloadHandler, false) : subWindow.attachEvent && subWindow.attachEvent("onunload", unloadHandler)), support.scope = assert(function(elem) {
- return docElem.appendChild(elem).appendChild(document.createElement("div")), "undefined" != typeof elem.querySelectorAll && !elem.querySelectorAll(":scope fieldset div").length;
- }), support.attributes = assert(function(elm) {
- return elm.className = "i", !elm.getAttribute("className");
- }), support.getElementsByTagName = assert(function(testee) {
- return testee.appendChild(document.createComment("")), !testee.getElementsByTagName("*").length;
- }), support.getElementsByClassName = rnative.test(document.getElementsByClassName), support.getById = assert(function(body) {
- return docElem.appendChild(body).id = expando, !document.getElementsByName || !document.getElementsByName(expando).length;
- }), support.getById ? (Expr.filter.ID = function(elem) {
- var i = elem.replace(a, data);
- return function(e) {
- return e.getAttribute("id") === i;
- };
- }, Expr.find.ID = function(elem, context) {
- if ("undefined" != typeof context.getElementById && documentIsHTML) {
- var c_style = context.getElementById(elem);
- return c_style ? [c_style] : [];
- }
- }) : (Expr.filter.ID = function(elem) {
- var string = elem.replace(a, data);
- return function(elem) {
- var token = "undefined" != typeof elem.getAttributeNode && elem.getAttributeNode("id");
- return token && token.value === string;
- };
- }, Expr.find.ID = function(value, context) {
- if ("undefined" != typeof context.getElementById && documentIsHTML) {
- var attr;
- var r;
- var ret;
- var tmp = context.getElementById(value);
- if (tmp) {
- if ((attr = tmp.getAttributeNode("id")) && attr.value === value) {
- return [tmp];
- }
- ret = context.getElementsByName(value);
- /** @type {number} */
- r = 0;
- for (; tmp = ret[r++];) {
- if ((attr = tmp.getAttributeNode("id")) && attr.value === value) {
- return [tmp];
- }
- }
- }
- return [];
- }
- }), Expr.find.TAG = support.getElementsByTagName ? function(v, g) {
- return "undefined" != typeof g.getElementsByTagName ? g.getElementsByTagName(v) : support.qsa ? g.querySelectorAll(v) : void 0;
- } : function(selector, o) {
- var first;
- /** @type {!Array} */
- var tmp = [];
- /** @type {number} */
- var i = 0;
- var results = o.getElementsByTagName(selector);
- if ("*" === selector) {
- for (; first = results[i++];) {
- if (1 === first.nodeType) {
- tmp.push(first);
- }
- }
- return tmp;
- }
- return results;
- }, Expr.find.CLASS = support.getElementsByClassName && function(l, docDom) {
- if ("undefined" != typeof docDom.getElementsByClassName && documentIsHTML) {
- return docDom.getElementsByClassName(l);
- }
- }, rbuggyMatches = [], rbuggyQSA = [], (support.qsa = rnative.test(document.querySelectorAll)) && (assert(function(container) {
- var element;
- /** @type {string} */
- docElem.appendChild(container).innerHTML = "<a id='" + expando + "'></a><select id='" + expando + "-\r\\' msallowcapture=''><option selected=''></option></select>";
- if (container.querySelectorAll("[msallowcapture^='']").length) {
- rbuggyQSA.push("[*^$]=" + _test + "*(?:''|\"\")");
- }
- if (!container.querySelectorAll("[selected]").length) {
- rbuggyQSA.push("\\[" + _test + "*(?:value|" + value + ")");
- }
- if (!container.querySelectorAll("[id~=" + expando + "-]").length) {
- rbuggyQSA.push("~=");
- }
- (element = document.createElement("input")).setAttribute("name", "");
- container.appendChild(element);
- if (!container.querySelectorAll("[name='']").length) {
- rbuggyQSA.push("\\[" + _test + "*name" + _test + "*=" + _test + "*(?:''|\"\")");
- }
- if (!container.querySelectorAll(":checked").length) {
- rbuggyQSA.push(":checked");
- }
- if (!container.querySelectorAll("a#" + expando + "+*").length) {
- rbuggyQSA.push(".#.+[+~]");
- }
- container.querySelectorAll("\\\f");
- rbuggyQSA.push("[\\r\\n\\f]");
- }), assert(function(el) {
- /** @type {string} */
- el.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
- var input = document.createElement("input");
- input.setAttribute("type", "hidden");
- el.appendChild(input).setAttribute("name", "D");
- if (el.querySelectorAll("[name=d]").length) {
- rbuggyQSA.push("name" + _test + "*[*^$|!~]?=");
- }
- if (2 !== el.querySelectorAll(":enabled").length) {
- rbuggyQSA.push(":enabled", ":disabled");
- }
- /** @type {boolean} */
- docElem.appendChild(el).disabled = true;
- if (2 !== el.querySelectorAll(":disabled").length) {
- rbuggyQSA.push(":enabled", ":disabled");
- }
- el.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- })), (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) && assert(function(el) {
- support.disconnectedMatch = matches.call(el, "*");
- matches.call(el, "[s!='']:x");
- rbuggyMatches.push("!=", pseudos);
- }), rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")), rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")), init = rnative.test(docElem.compareDocumentPosition), contains = init || rnative.test(docElem.contains) ? function(a, n) {
- var name = 9 === a.nodeType ? a.documentElement : a;
- var b = n && n.parentNode;
- return a === b || !(!b || 1 !== b.nodeType || !(name.contains ? name.contains(b) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(b)));
- } : function(selector, elem) {
- if (elem) {
- for (; elem = elem.parentNode;) {
- if (elem === selector) {
- return true;
- }
- }
- }
- return false;
- }, time = init ? function(a, b) {
- if (a === b) {
- return ret = true, 0;
- }
- /** @type {number} */
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- return compare || (1 & (compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1) || !support.sortDetached && b.compareDocumentPosition(a) === compare ? a == document || a.ownerDocument == el && contains(el, a) ? -1 : b == document || b.ownerDocument == el && contains(el, b) ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0 : 4 & compare ? -1 : 1);
- } : function(a, b) {
- if (a === b) {
- return ret = true, 0;
- }
- var cur;
- /** @type {number} */
- var i = 0;
- var aup = a.parentNode;
- var bup = b.parentNode;
- /** @type {!Array} */
- var ap = [a];
- /** @type {!Array} */
- var bp = [b];
- if (!aup || !bup) {
- return a == document ? -1 : b == document ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
- }
- if (aup === bup) {
- return siblingCheck(a, b);
- }
- /** @type {!HTMLElement} */
- cur = a;
- for (; cur = cur.parentNode;) {
- ap.unshift(cur);
- }
- /** @type {!HTMLElement} */
- cur = b;
- for (; cur = cur.parentNode;) {
- bp.unshift(cur);
- }
- for (; ap[i] === bp[i];) {
- i++;
- }
- return i ? siblingCheck(ap[i], bp[i]) : ap[i] == el ? -1 : bp[i] == el ? 1 : 0;
- }), document;
- }, Sizzle.matches = function(expr, set) {
- return Sizzle(expr, null, null, set);
- }, Sizzle.matchesSelector = function(elem, expr) {
- if (setDocument(elem), support.matchesSelector && documentIsHTML && !isUndefined[expr + " "] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
- try {
- var ret = matches.call(elem, expr);
- if (ret || support.disconnectedMatch || elem.document && 11 !== elem.document.nodeType) {
- return ret;
- }
- } catch (e) {
- isUndefined(expr, true);
- }
- }
- return 0 < Sizzle(expr, document, null, [elem]).length;
- }, Sizzle.contains = function(context, value) {
- return (context.ownerDocument || context) != document && setDocument(context), contains(context, value);
- }, Sizzle.attr = function(elem, name) {
- if ((elem.ownerDocument || elem) != document) {
- setDocument(elem);
- }
- var fn = Expr.attrHandle[name.toLowerCase()];
- var val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
- return void 0 !== val ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
- }, Sizzle.escape = function(text) {
- return (text + "").replace(rcssescape, fcssescape);
- }, Sizzle.error = function(value) {
- throw new Error("Syntax error, unrecognized expression: " + value);
- }, Sizzle.uniqueSort = function(arr) {
- var x;
- /** @type {!Array} */
- var p = [];
- /** @type {number} */
- var j = 0;
- /** @type {number} */
- var i = 0;
- if (ret = !support.detectDuplicates, sortInput = !support.sortStable && arr.slice(0), arr.sort(time), ret) {
- for (; x = arr[i++];) {
- if (x === arr[i]) {
- /** @type {number} */
- j = p.push(i);
- }
- }
- for (; j--;) {
- arr.splice(p[j], 1);
- }
- }
- return sortInput = null, arr;
- }, $ = Sizzle.getText = function(d) {
- var b;
- /** @type {string} */
- var s = "";
- /** @type {number} */
- var e = 0;
- var type = d.nodeType;
- if (type) {
- if (1 === type || 9 === type || 11 === type) {
- if ("string" == typeof d.textContent) {
- return d.textContent;
- }
- d = d.firstChild;
- for (; d; d = d.nextSibling) {
- s = s + $(d);
- }
- } else {
- if (3 === type || 4 === type) {
- return d.nodeValue;
- }
- }
- } else {
- for (; b = d[e++];) {
- s = s + $(b);
- }
- }
- return s;
- }, (Expr = Sizzle.selectors = {
- cacheLength : 50,
- createPseudo : markFunction,
- match : matchExpr,
- attrHandle : {},
- find : {},
- relative : {
- ">" : {
- dir : "parentNode",
- first : true
- },
- " " : {
- dir : "parentNode"
- },
- "+" : {
- dir : "previousSibling",
- first : true
- },
- "~" : {
- dir : "previousSibling"
- }
- },
- preFilter : {
- ATTR : function(result) {
- return result[1] = result[1].replace(a, data), result[3] = (result[3] || result[4] || result[5] || "").replace(a, data), "~=" === result[2] && (result[3] = " " + result[3] + " "), result.slice(0, 4);
- },
- CHILD : function(match) {
- return match[1] = match[1].toLowerCase(), "nth" === match[1].slice(0, 3) ? (match[3] || Sizzle.error(match[0]), match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * ("even" === match[3] || "odd" === match[3])), match[5] = +(match[7] + match[8] || "odd" === match[3])) : match[3] && Sizzle.error(match[0]), match;
- },
- PSEUDO : function(match) {
- var excess;
- var unquoted = !match[6] && match[2];
- return matchExpr.CHILD.test(match[0]) ? null : (match[3] ? match[2] = match[4] || match[5] || "" : unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length) && (match[0] = match[0].slice(0, excess), match[2] = unquoted.slice(0, excess)), match.slice(0, 3));
- }
- },
- filter : {
- TAG : function(elem) {
- var nodeName = elem.replace(a, data).toLowerCase();
- return "*" === elem ? function() {
- return true;
- } : function(elem) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
- CLASS : function(className) {
- var pattern = classCache[className + " "];
- return pattern || (pattern = new RegExp("(^|" + _test + ")" + className + "(" + _test + "|$)")) && classCache(className, function(e) {
- return pattern.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "");
- });
- },
- ATTR : function(name, string, value) {
- return function(elem) {
- var key = Sizzle.attr(elem, name);
- return null == key ? "!=" === string : !string || (key = key + "", "=" === string ? key === value : "!=" === string ? key !== value : "^=" === string ? value && 0 === key.indexOf(value) : "*=" === string ? value && -1 < key.indexOf(value) : "$=" === string ? value && key.slice(-value.length) === value : "~=" === string ? -1 < (" " + key.replace(entityEscapeRegExp, " ") + " ").indexOf(value) : "|=" === string && (key === value || key.slice(0, value.length + 1) === value + "-"));
- };
- },
- CHILD : function(type, what, argument, first, last) {
- /** @type {boolean} */
- var simple = "nth" !== type.slice(0, 3);
- /** @type {boolean} */
- var forward = "last" !== type.slice(-4);
- /** @type {boolean} */
- var ofType = "of-type" === what;
- return 1 === first && 0 === last ? function(tplDiv) {
- return !!tplDiv.parentNode;
- } : function(elem, canCreateDiscussions, xml) {
- var cache;
- var uniqueCache;
- var outerCache;
- var node;
- var nodeIndex;
- var start;
- /** @type {string} */
- var dir = simple !== forward ? "nextSibling" : "previousSibling";
- var parent = elem.parentNode;
- var name = ofType && elem.nodeName.toLowerCase();
- /** @type {boolean} */
- var dependency = !xml && !ofType;
- /** @type {boolean} */
- var diff = false;
- if (parent) {
- if (simple) {
- for (; dir;) {
- /** @type {!Node} */
- node = elem;
- for (; node = node[dir];) {
- if (ofType ? node.nodeName.toLowerCase() === name : 1 === node.nodeType) {
- return false;
- }
- }
- /** @type {(boolean|string)} */
- start = dir = "only" === type && !start && "nextSibling";
- }
- return true;
- }
- if (start = [forward ? parent.firstChild : parent.lastChild], forward && dependency) {
- diff = (nodeIndex = (cache = (uniqueCache = (outerCache = (node = parent)[expando] || (node[expando] = {}))[node.uniqueID] || (outerCache[node.uniqueID] = {}))[type] || [])[0] === dirruns && cache[1]) && cache[2];
- node = nodeIndex && parent.childNodes[nodeIndex];
- for (; node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop();) {
- if (1 === node.nodeType && ++diff && node === elem) {
- /** @type {!Array} */
- uniqueCache[type] = [dirruns, nodeIndex, diff];
- break;
- }
- }
- } else {
- if (dependency && (diff = nodeIndex = (cache = (uniqueCache = (outerCache = (node = elem)[expando] || (node[expando] = {}))[node.uniqueID] || (outerCache[node.uniqueID] = {}))[type] || [])[0] === dirruns && cache[1]), false === diff) {
- for (; node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop();) {
- if ((ofType ? node.nodeName.toLowerCase() === name : 1 === node.nodeType) && ++diff && (dependency && ((uniqueCache = (outerCache = node[expando] || (node[expando] = {}))[node.uniqueID] || (outerCache[node.uniqueID] = {}))[type] = [dirruns, diff]), node === elem)) {
- break;
- }
- }
- }
- }
- return (diff = diff - last) === first || diff % first == 0 && 0 <= diff / first;
- }
- };
- },
- PSEUDO : function(pseudo, argument) {
- var args;
- var fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo);
- return fn[expando] ? fn(argument) : 1 < fn.length ? (args = [pseudo, pseudo, "", argument], Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, result) {
- var j;
- var matched = fn(seed, argument);
- var i = matched.length;
- for (; i--;) {
- /** @type {boolean} */
- seed[j = indexOf(seed, matched[i])] = !(result[j] = matched[i]);
- }
- }) : function(responce) {
- return fn(responce, 0, args);
- }) : fn;
- }
- },
- pseudos : {
- not : markFunction(function(selector) {
- /** @type {!Array} */
- var a = [];
- /** @type {!Array} */
- var results = [];
- var matcher = compile(selector.replace(rtrim, "$1"));
- return matcher[expando] ? markFunction(function(a, queue, n, context) {
- var bundle;
- var result = matcher(a, null, context, []);
- var i = a.length;
- for (; i--;) {
- if (bundle = result[i]) {
- /** @type {boolean} */
- a[i] = !(queue[i] = bundle);
- }
- }
- }) : function(sNewObjName, isSlidingUp, context) {
- return a[0] = sNewObjName, matcher(a, null, context, results), a[0] = null, !results.pop();
- };
- }),
- has : markFunction(function(selector) {
- return function(elem) {
- return 0 < Sizzle(selector, elem).length;
- };
- }),
- contains : markFunction(function(text) {
- return text = text.replace(a, data), function(element) {
- return -1 < (element.textContent || $(element)).indexOf(text);
- };
- }),
- lang : markFunction(function(lang) {
- return ridentifier.test(lang || "") || Sizzle.error("unsupported lang: " + lang), lang = lang.replace(a, data).toLowerCase(), function(elem) {
- var elemLang;
- do {
- if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
- return (elemLang = elemLang.toLowerCase()) === lang || 0 === elemLang.indexOf(lang + "-");
- }
- } while ((elem = elem.parentNode) && 1 === elem.nodeType);
- return false;
- };
- }),
- target : function(key) {
- var charListNotLatin = options.location && options.location.hash;
- return charListNotLatin && charListNotLatin.slice(1) === key.id;
- },
- root : function(elem) {
- return elem === docElem;
- },
- focus : function(elem) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
- enabled : createDisabledPseudo(false),
- disabled : createDisabledPseudo(true),
- checked : function(elem) {
- var custom = elem.nodeName.toLowerCase();
- return "input" === custom && !!elem.checked || "option" === custom && !!elem.selected;
- },
- selected : function(elem) {
- return elem.parentNode && elem.parentNode.selectedIndex, true === elem.selected;
- },
- empty : function(elem) {
- elem = elem.firstChild;
- for (; elem; elem = elem.nextSibling) {
- if (elem.nodeType < 6) {
- return false;
- }
- }
- return true;
- },
- parent : function(elem) {
- return !Expr.pseudos.empty(elem);
- },
- header : function(elem) {
- return rnoType.test(elem.nodeName);
- },
- input : function(target) {
- return inputNodeNames.test(target.nodeName);
- },
- button : function(elem) {
- var left = elem.nodeName.toLowerCase();
- return "input" === left && "button" === elem.type || "button" === left;
- },
- text : function(elem) {
- var EXT;
- return "input" === elem.nodeName.toLowerCase() && "text" === elem.type && (null == (EXT = elem.getAttribute("type")) || "text" === EXT.toLowerCase());
- },
- first : createPositionalPseudo(function() {
- return [0];
- }),
- last : createPositionalPseudo(function(canCreateDiscussions, isSlidingUp) {
- return [isSlidingUp - 1];
- }),
- eq : createPositionalPseudo(function(canCreateDiscussions, pageHeight, srcY) {
- return [srcY < 0 ? srcY + pageHeight : srcY];
- }),
- even : createPositionalPseudo(function(lastshuffle, inclusiveMin) {
- /** @type {number} */
- var value = 0;
- for (; value < inclusiveMin; value = value + 2) {
- lastshuffle.push(value);
- }
- return lastshuffle;
- }),
- odd : createPositionalPseudo(function(lastshuffle, inclusiveMin) {
- /** @type {number} */
- var value = 1;
- for (; value < inclusiveMin; value = value + 2) {
- lastshuffle.push(value);
- }
- return lastshuffle;
- }),
- lt : createPositionalPseudo(function(newNodeLists, total, n) {
- var itemNodeList = n < 0 ? n + total : total < n ? total : n;
- for (; 0 <= --itemNodeList;) {
- newNodeLists.push(itemNodeList);
- }
- return newNodeLists;
- }),
- gt : createPositionalPseudo(function(newNodeLists, pageHeight, srcY) {
- var itemNodeList = srcY < 0 ? srcY + pageHeight : srcY;
- for (; ++itemNodeList < pageHeight;) {
- newNodeLists.push(itemNodeList);
- }
- return newNodeLists;
- })
- }
- }).pseudos.nth = Expr.pseudos.eq, {
- radio : true,
- checkbox : true,
- file : true,
- password : true,
- image : true
- }) {
- Expr.pseudos[i] = jQuerify(i);
- }
- for (i in{
- submit : true,
- reset : true
- }) {
- Expr.pseudos[i] = createButtonPseudo(i);
- }
- return setFilters.prototype = Expr.filters = Expr.pseudos, Expr.setFilters = new setFilters, tokenize = Sizzle.tokenize = function(selector, parseOnly) {
- var matched;
- var match;
- var tokens;
- var type;
- var soFar;
- var groups;
- var preFilters;
- var cached = tokenCache[selector + " "];
- if (cached) {
- return parseOnly ? 0 : cached.slice(0);
- }
- /** @type {string} */
- soFar = selector;
- /** @type {!Array} */
- groups = [];
- preFilters = Expr.preFilter;
- for (; soFar;) {
- for (type in matched && !(match = chunker.exec(soFar)) || (match && (soFar = soFar.slice(match[0].length) || soFar), groups.push(tokens = [])), matched = false, (match = pattern.exec(soFar)) && (matched = match.shift(), tokens.push({
- value : matched,
- type : match[0].replace(rtrim, " ")
- }), soFar = soFar.slice(matched.length)), Expr.filter) {
- if (!(!(match = matchExpr[type].exec(soFar)) || preFilters[type] && !(match = preFilters[type](match)))) {
- matched = match.shift();
- tokens.push({
- value : matched,
- type : type,
- matches : match
- });
- soFar = soFar.slice(matched.length);
- }
- }
- if (!matched) {
- break;
- }
- }
- return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
- }, compile = Sizzle.compile = function(selector, group) {
- var i;
- var elementMatchers;
- var setMatchers;
- var bySet;
- var byElement;
- var superMatcher;
- /** @type {!Array} */
- var res = [];
- /** @type {!Array} */
- var cacheStore = [];
- var cached = compilerCache[selector + " "];
- if (!cached) {
- if (!group) {
- group = tokenize(selector);
- }
- i = group.length;
- for (; i--;) {
- if ((cached = matcherFromTokens(group[i]))[expando]) {
- res.push(cached);
- } else {
- cacheStore.push(cached);
- }
- }
- /** @type {string} */
- (cached = compilerCache(selector, (elementMatchers = cacheStore, bySet = 0 < (setMatchers = res).length, byElement = 0 < elementMatchers.length, superMatcher = function(seed, context, xml, results, outermost) {
- var elem;
- var j;
- var matcher;
- /** @type {number} */
- var matchedCount = 0;
- /** @type {string} */
- var i = "0";
- var unmatched = seed && [];
- /** @type {!Array} */
- var data = [];
- var contextBackup = outermostContext;
- var elems = seed || byElement && Expr.find.TAG("*", outermost);
- var dirrunsUnique = dirruns = dirruns + (null == contextBackup ? 1 : Math.random() || .1);
- var length = elems.length;
- if (outermost) {
- outermostContext = context == document || context || outermost;
- }
- for (; i !== length && null != (elem = elems[i]); i++) {
- if (byElement && elem) {
- /** @type {number} */
- j = 0;
- if (!(context || elem.ownerDocument == document)) {
- setDocument(elem);
- /** @type {boolean} */
- xml = !documentIsHTML;
- }
- for (; matcher = elementMatchers[j++];) {
- if (matcher(elem, context || document, xml)) {
- results.push(elem);
- break;
- }
- }
- if (outermost) {
- dirruns = dirrunsUnique;
- }
- }
- if (bySet) {
- if (elem = !matcher && elem) {
- matchedCount--;
- }
- if (seed) {
- unmatched.push(elem);
- }
- }
- }
- if (matchedCount = matchedCount + i, bySet && i !== matchedCount) {
- /** @type {number} */
- j = 0;
- for (; matcher = setMatchers[j++];) {
- matcher(unmatched, data, context, xml);
- }
- if (seed) {
- if (0 < matchedCount) {
- for (; i--;) {
- if (!(unmatched[i] || data[i])) {
- data[i] = pop.call(results);
- }
- }
- }
- data = parse(data);
- }
- push.apply(results, data);
- if (outermost && !seed && 0 < data.length && 1 < matchedCount + setMatchers.length) {
- Sizzle.uniqueSort(results);
- }
- }
- return outermost && (dirruns = dirrunsUnique, outermostContext = contextBackup), unmatched;
- }, bySet ? markFunction(superMatcher) : superMatcher))).selector = selector;
- }
- return cached;
- }, select = Sizzle.select = function(selector, context, results, seed) {
- var i;
- var tokens;
- var token;
- var type;
- var f;
- /** @type {(!Function|boolean)} */
- var compiled = "function" == typeof selector && selector;
- var match = !seed && tokenize(selector = compiled.selector || selector);
- if (results = results || [], 1 === match.length) {
- if (2 < (tokens = match[0] = match[0].slice(0)).length && "ID" === (token = tokens[0]).type && 9 === context.nodeType && documentIsHTML && Expr.relative[tokens[1].type]) {
- if (!(context = (Expr.find.ID(token.matches[0].replace(a, data), context) || [])[0])) {
- return results;
- }
- if (compiled) {
- context = context.parentNode;
- }
- selector = selector.slice(tokens.shift().value.length);
- }
- i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
- for (; i--;) {
- if (token = tokens[i], Expr.relative[type = token.type]) {
- break;
- }
- if ((f = Expr.find[type]) && (seed = f(token.matches[0].replace(a, data), IS_HTML_FRAGMENT.test(tokens[0].type) && testContext(context.parentNode) || context))) {
- if (tokens.splice(i, 1), !(selector = seed.length && toSelector(tokens))) {
- return push.apply(results, seed), results;
- }
- break;
- }
- }
- }
- return (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || IS_HTML_FRAGMENT.test(selector) && testContext(context.parentNode) || context), results;
- }, support.sortStable = expando.split("").sort(time).join("") === expando, support.detectDuplicates = !!ret, setDocument(), support.sortDetached = assert(function(html) {
- return 1 & html.compareDocumentPosition(document.createElement("fieldset"));
- }), assert(function(aItem) {
- return aItem.innerHTML = "<a href='#'></a>", "#" === aItem.firstChild.getAttribute("href");
- }) || addHandle("type|href|height|width", function(e, t, n) {
- if (!n) {
- return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2);
- }
- }), support.attributes && assert(function(aItem) {
- return aItem.innerHTML = "<input/>", aItem.firstChild.setAttribute("value", ""), "" === aItem.firstChild.getAttribute("value");
- }) || addHandle("value", function(src, canCreateDiscussions, n) {
- if (!n && "input" === src.nodeName.toLowerCase()) {
- return src.defaultValue;
- }
- }), assert(function(e) {
- return null == e.getAttribute("disabled");
- }) || addHandle(value, function(elem, name, n) {
- var val;
- if (!n) {
- return true === elem[name] ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
- }
- }), Sizzle;
- }(window);
- jQuery.find = Sizzle;
- jQuery.expr = Sizzle.selectors;
- jQuery.expr[":"] = jQuery.expr.pseudos;
- jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
- jQuery.text = Sizzle.getText;
- jQuery.isXMLDoc = Sizzle.isXML;
- jQuery.contains = Sizzle.contains;
- jQuery.escapeSelector = Sizzle.escape;
- /**
- * @param {?} elem
- * @param {string} dir
- * @param {?} until
- * @return {?}
- */
- var dir = function(elem, dir, until) {
- /** @type {!Array} */
- var matched = [];
- /** @type {boolean} */
- var truncate = void 0 !== until;
- for (; (elem = elem[dir]) && 9 !== elem.nodeType;) {
- if (1 === elem.nodeType) {
- if (truncate && jQuery(elem).is(until)) {
- break;
- }
- matched.push(elem);
- }
- }
- return matched;
- };
- /**
- * @param {!Object} node
- * @param {!Object} elem
- * @return {?}
- */
- var _sibling = function(node, elem) {
- /** @type {!Array} */
- var result = [];
- for (; node; node = node.nextSibling) {
- if (1 === node.nodeType && node !== elem) {
- result.push(node);
- }
- }
- return result;
- };
- var rneedsContext = jQuery.expr.match.needsContext;
- /** @type {!RegExp} */
- var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
- /**
- * @param {string} expr
- * @param {!Array} elems
- * @param {string} not
- * @return {?}
- */
- jQuery.filter = function(expr, elems, not) {
- var elem = elems[0];
- return not && (expr = ":not(" + expr + ")"), 1 === elems.length && 1 === elem.nodeType ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(nodeToInspect) {
- return 1 === nodeToInspect.nodeType;
- }));
- };
- jQuery.fn.extend({
- find : function(elem) {
- var i;
- var ret;
- var l = this.length;
- var self = this;
- if ("string" != typeof elem) {
- return this.pushStack(jQuery(elem).filter(function() {
- /** @type {number} */
- i = 0;
- for (; i < l; i++) {
- if (jQuery.contains(self[i], this)) {
- return true;
- }
- }
- }));
- }
- ret = this.pushStack([]);
- /** @type {number} */
- i = 0;
- for (; i < l; i++) {
- jQuery.find(elem, self[i], ret);
- }
- return 1 < l ? jQuery.uniqueSort(ret) : ret;
- },
- filter : function(val) {
- return this.pushStack(filter(this, val || [], false));
- },
- not : function(args) {
- return this.pushStack(filter(this, args || [], true));
- },
- is : function(arg) {
- return !!filter(this, "string" == typeof arg && rneedsContext.test(arg) ? jQuery(arg) : arg || [], false).length;
- }
- });
- var rootjQuery;
- /** @type {!RegExp} */
- var customSelectorReg = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
- (jQuery.fn.init = function(selector, context, root) {
- var match;
- var i;
- if (!selector) {
- return this;
- }
- if (root = root || rootjQuery, "string" == typeof selector) {
- if (!(match = "<" === selector[0] && ">" === selector[selector.length - 1] && 3 <= selector.length ? [null, selector, null] : customSelectorReg.exec(selector)) || !match[1] && context) {
- return !context || context.jquery ? (context || root).find(selector) : this.constructor(context).find(selector);
- }
- if (match[1]) {
- if (context = context instanceof jQuery ? context[0] : context, jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : document, true)), rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
- for (match in context) {
- if (fn(this[match])) {
- this[match](context[match]);
- } else {
- this.attr(match, context[match]);
- }
- }
- }
- return this;
- }
- return (i = document.getElementById(match[2])) && (this[0] = i, this.length = 1), this;
- }
- return selector.nodeType ? (this[0] = selector, this.length = 1, this) : fn(selector) ? void 0 !== root.ready ? root.ready(selector) : selector(jQuery) : jQuery.makeArray(selector, this);
- }).prototype = jQuery.fn;
- rootjQuery = jQuery(document);
- /** @type {!RegExp} */
- var testRxp = /^(?:parents|prev(?:Until|All))/;
- var guaranteedUnique = {
- children : true,
- contents : true,
- next : true,
- prev : true
- };
- jQuery.fn.extend({
- has : function(name) {
- var targets = jQuery(name, this);
- var l = targets.length;
- return this.filter(function() {
- /** @type {number} */
- var i = 0;
- for (; i < l; i++) {
- if (jQuery.contains(this, targets[i])) {
- return true;
- }
- }
- });
- },
- closest : function(selector, context) {
- var cur;
- /** @type {number} */
- var i = 0;
- var l = this.length;
- /** @type {!Array} */
- var ret = [];
- var pos = "string" != typeof selector && jQuery(selector);
- if (!rneedsContext.test(selector)) {
- for (; i < l; i++) {
- cur = this[i];
- for (; cur && cur !== context; cur = cur.parentNode) {
- if (cur.nodeType < 11 && (pos ? -1 < pos.index(cur) : 1 === cur.nodeType && jQuery.find.matchesSelector(cur, selector))) {
- ret.push(cur);
- break;
- }
- }
- }
- }
- return this.pushStack(1 < ret.length ? jQuery.uniqueSort(ret) : ret);
- },
- index : function(elem) {
- return elem ? "string" == typeof elem ? indexOf.call(jQuery(elem), this[0]) : indexOf.call(this, elem.jquery ? elem[0] : elem) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
- },
- add : function(elem, context) {
- return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(elem, context))));
- },
- addBack : function(selector) {
- return this.add(null == selector ? this.prevObject : this.prevObject.filter(selector));
- }
- });
- jQuery.each({
- parent : function(object) {
- var n = object.parentNode;
- return n && 11 !== n.nodeType ? n : null;
- },
- parents : function(elem) {
- return dir(elem, "parentNode");
- },
- parentsUntil : function(elem, i, until) {
- return dir(elem, "parentNode", until);
- },
- next : function(elem) {
- return sibling(elem, "nextSibling");
- },
- prev : function(elem) {
- return sibling(elem, "previousSibling");
- },
- nextAll : function(elem) {
- return dir(elem, "nextSibling");
- },
- prevAll : function(elem) {
- return dir(elem, "previousSibling");
- },
- nextUntil : function(elem, i, until) {
- return dir(elem, "nextSibling", until);
- },
- prevUntil : function(elem, i, until) {
- return dir(elem, "previousSibling", until);
- },
- siblings : function(elem) {
- return _sibling((elem.parentNode || {}).firstChild, elem);
- },
- children : function(elem) {
- return _sibling(elem.firstChild);
- },
- contents : function(elem) {
- return null != elem.contentDocument && getProto(elem.contentDocument) ? elem.contentDocument : (callback(elem, "template") && (elem = elem.content || elem), jQuery.merge([], elem.childNodes));
- }
- }, function(name, i) {
- /**
- * @param {boolean} index
- * @param {boolean} target
- * @return {?}
- */
- jQuery.fn[name] = function(index, target) {
- var ret = jQuery.map(this, i, index);
- return "Until" !== name.slice(-5) && (target = index), target && "string" == typeof target && (ret = jQuery.filter(target, ret)), 1 < this.length && (guaranteedUnique[name] || jQuery.uniqueSort(ret), testRxp.test(name) && ret.reverse()), this.pushStack(ret);
- };
- });
- /** @type {!RegExp} */
- var re = /[^\x20\t\r\n\f]+/g;
- /**
- * @param {string} options
- * @return {?}
- */
- jQuery.Callbacks = function(options) {
- var o;
- var s;
- options = "string" == typeof options ? (o = options, s = {}, jQuery.each(o.match(re) || [], function(canCreateDiscussions, $token) {
- /** @type {boolean} */
- s[$token] = true;
- }), s) : jQuery.extend({}, options);
- var callback;
- var c;
- var req;
- var data;
- /** @type {!Array} */
- var b = [];
- /** @type {!Array} */
- var d = [];
- /** @type {number} */
- var k = -1;
- /**
- * @return {undefined}
- */
- var fire = function() {
- data = data || options.once;
- /** @type {boolean} */
- req = callback = true;
- for (; d.length; k = -1) {
- c = d.shift();
- for (; ++k < b.length;) {
- if (false === b[k].apply(c[0], c[1]) && options.stopOnFalse) {
- k = b.length;
- /** @type {boolean} */
- c = false;
- }
- }
- }
- if (!options.memory) {
- /** @type {boolean} */
- c = false;
- }
- /** @type {boolean} */
- callback = false;
- if (data) {
- /** @type {(Array|string)} */
- b = c ? [] : "";
- }
- };
- var self = {
- add : function() {
- return b && (c && !callback && (k = b.length - 1, d.push(c)), function add(callback) {
- jQuery.each(callback, function(canCreateDiscussions, name) {
- if (fn(name)) {
- if (!(options.unique && self.has(name))) {
- b.push(name);
- }
- } else {
- if (name && name.length && "string" !== type(name)) {
- add(name);
- }
- }
- });
- }(arguments), c && !callback && fire()), this;
- },
- remove : function() {
- return jQuery.each(arguments, function(canCreateDiscussions, t) {
- var i;
- for (; -1 < (i = jQuery.inArray(t, b, i));) {
- b.splice(i, 1);
- if (i <= k) {
- k--;
- }
- }
- }), this;
- },
- has : function(className) {
- return className ? -1 < jQuery.inArray(className, b) : 0 < b.length;
- },
- empty : function() {
- return b && (b = []), this;
- },
- disable : function() {
- return data = d = [], b = c = "", this;
- },
- disabled : function() {
- return !b;
- },
- lock : function() {
- return data = d = [], c || callback || (b = c = ""), this;
- },
- locked : function() {
- return !!data;
- },
- fireWith : function(context, args) {
- return data || (args = [context, (args = args || []).slice ? args.slice() : args], d.push(args), callback || fire()), this;
- },
- fire : function() {
- return self.fireWith(this, arguments), this;
- },
- fired : function() {
- return !!req;
- }
- };
- return self;
- };
- jQuery.extend({
- Deferred : function(func) {
- /** @type {!Array} */
- var array = [["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"]];
- /** @type {string} */
- var state = "pending";
- var promise = {
- state : function() {
- return state;
- },
- always : function() {
- return deferred.done(arguments).fail(arguments), this;
- },
- "catch" : function(c) {
- return promise.then(null, c);
- },
- pipe : function() {
- /** @type {!Arguments} */
- var result = arguments;
- return jQuery.Deferred(function(newDefer) {
- jQuery.each(array, function(canCreateDiscussions, tuple) {
- var callback = fn(result[tuple[4]]) && result[tuple[4]];
- deferred[tuple[1]](function() {
- var promise = callback && callback.apply(this, arguments);
- if (promise && fn(promise.promise)) {
- promise.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
- } else {
- newDefer[tuple[0] + "With"](this, callback ? [promise] : arguments);
- }
- });
- });
- /** @type {null} */
- result = null;
- }).promise();
- },
- then : function(error, label, x) {
- /**
- * @param {number} index
- * @param {!Object} options
- * @param {!Function} callback
- * @param {boolean} args
- * @return {?}
- */
- function callback(index, options, callback, args) {
- return function() {
- var elem = this;
- /** @type {!Arguments} */
- var values = arguments;
- /**
- * @return {undefined}
- */
- var apply = function() {
- var value;
- var self;
- if (!(index < i)) {
- if ((value = callback.apply(elem, values)) === options.promise()) {
- throw new TypeError("Thenable self-resolution");
- }
- self = value && ("object" == typeof value || "function" == typeof value) && value.then;
- if (fn(self)) {
- if (args) {
- self.call(value, callback(i, options, failed, args), callback(i, options, data, args));
- } else {
- i++;
- self.call(value, callback(i, options, failed, args), callback(i, options, data, args), callback(i, options, failed, options.notifyWith));
- }
- } else {
- if (callback !== failed) {
- elem = void 0;
- /** @type {!Array} */
- values = [value];
- }
- (args || options.resolveWith)(elem, values);
- }
- }
- };
- /** @type {function(): undefined} */
- var method = args ? apply : function() {
- try {
- apply();
- } catch (scheduled) {
- if (jQuery.Deferred.exceptionHook) {
- jQuery.Deferred.exceptionHook(scheduled, method.stackTrace);
- }
- if (i <= index + 1) {
- if (callback !== data) {
- elem = void 0;
- /** @type {!Array} */
- values = [scheduled];
- }
- options.rejectWith(elem, values);
- }
- }
- };
- if (index) {
- method();
- } else {
- if (jQuery.Deferred.getStackHook) {
- method.stackTrace = jQuery.Deferred.getStackHook();
- }
- window.setTimeout(method);
- }
- };
- }
- /** @type {number} */
- var i = 0;
- return jQuery.Deferred(function(self) {
- array[0][3].add(callback(0, self, fn(x) ? x : failed, self.notifyWith));
- array[1][3].add(callback(0, self, fn(error) ? error : failed));
- array[2][3].add(callback(0, self, fn(label) ? label : data));
- }).promise();
- },
- promise : function(context) {
- return null != context ? jQuery.extend(context, promise) : promise;
- }
- };
- var deferred = {};
- return jQuery.each(array, function(numRemoved, tuple) {
- var list = tuple[2];
- var stateString = tuple[5];
- promise[tuple[1]] = list.add;
- if (stateString) {
- list.add(function() {
- state = stateString;
- }, array[3 - numRemoved][2].disable, array[3 - numRemoved][3].disable, array[0][2].lock, array[0][3].lock);
- }
- list.add(tuple[3].fire);
- /**
- * @return {?}
- */
- deferred[tuple[0]] = function() {
- return deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments), this;
- };
- deferred[tuple[0] + "With"] = list.fireWith;
- }), promise.promise(deferred), func && func.call(deferred, deferred), deferred;
- },
- when : function(data) {
- /** @type {number} */
- var sampleSize = arguments.length;
- var i = sampleSize;
- /** @type {!Array} */
- var elements = Array(i);
- /** @type {!Array<?>} */
- var args = slice.call(arguments);
- var d = jQuery.Deferred();
- /**
- * @param {undefined} i
- * @return {?}
- */
- var updateFn = function(i) {
- return function(value) {
- elements[i] = this;
- args[i] = 1 < arguments.length ? slice.call(arguments) : value;
- if (!--sampleSize) {
- d.resolveWith(elements, args);
- }
- };
- };
- if (sampleSize <= 1 && (resolve(data, d.done(updateFn(i)).resolve, d.reject, !sampleSize), "pending" === d.state() || fn(args[i] && args[i].then))) {
- return d.then();
- }
- for (; i--;) {
- resolve(args[i], updateFn(i), d.reject);
- }
- return d.promise();
- }
- });
- /** @type {!RegExp} */
- var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
- /**
- * @param {?} error
- * @param {?} stack
- * @return {undefined}
- */
- jQuery.Deferred.exceptionHook = function(error, stack) {
- if (window.console && window.console.warn && error && rerrorNames.test(error.name)) {
- window.console.warn("jQuery.Deferred exception: " + error.message, error.stack, stack);
- }
- };
- /**
- * @param {?} error
- * @return {undefined}
- */
- jQuery.readyException = function(error) {
- window.setTimeout(function() {
- throw error;
- });
- };
- var readyList = jQuery.Deferred();
- /**
- * @param {?} fn
- * @return {?}
- */
- jQuery.fn.ready = function(fn) {
- return readyList.then(fn)["catch"](function(e) {
- jQuery.readyException(e);
- }), this;
- };
- jQuery.extend({
- isReady : false,
- readyWait : 1,
- ready : function(user) {
- if (!((true === user ? --jQuery.readyWait : jQuery.isReady) || (jQuery.isReady = true) !== user && 0 < --jQuery.readyWait)) {
- readyList.resolveWith(document, [jQuery]);
- }
- }
- });
- jQuery.ready.then = readyList.then;
- if ("complete" === document.readyState || "loading" !== document.readyState && !document.documentElement.doScroll) {
- window.setTimeout(jQuery.ready);
- } else {
- document.addEventListener("DOMContentLoaded", $__jsx_onload);
- window.addEventListener("load", $__jsx_onload);
- }
- /**
- * @param {string} elems
- * @param {!Function} callback
- * @param {string} key
- * @param {?} value
- * @param {number} chainable
- * @param {string} emptyGet
- * @param {boolean} raw
- * @return {?}
- */
- var access = function(elems, callback, key, value, chainable, emptyGet, raw) {
- /** @type {number} */
- var i = 0;
- var length = elems.length;
- /** @type {boolean} */
- var bulk = null == key;
- if ("object" === type(key)) {
- for (i in chainable = true, key) {
- access(elems, callback, i, key[i], true, emptyGet, raw);
- }
- } else {
- if (void 0 !== value && (chainable = true, fn(value) || (raw = true), bulk && (raw ? (callback.call(elems, value), callback = null) : (bulk = callback, callback = function(elem, t, value) {
- return bulk.call(jQuery(elem), value);
- })), callback)) {
- for (; i < length; i++) {
- callback(elems[i], key, raw ? value : value.call(elems[i], i, callback(elems[i], key)));
- }
- }
- }
- return chainable ? elems : bulk ? callback.call(elems) : length ? callback(elems[0], key) : emptyGet;
- };
- /** @type {!RegExp} */
- var _kerningNamesHash_escapeEscape = /^-ms-/;
- /** @type {!RegExp} */
- var rcharset = /-([a-z])/g;
- /**
- * @param {!Object} elem
- * @return {?}
- */
- var acceptData = function(elem) {
- return 1 === elem.nodeType || 9 === elem.nodeType || !+elem.nodeType;
- };
- /** @type {number} */
- Data.uid = 1;
- Data.prototype = {
- cache : function(elem) {
- var value = elem[this.expando];
- return value || (value = {}, acceptData(elem) && (elem.nodeType ? elem[this.expando] = value : Object.defineProperty(elem, this.expando, {
- value : value,
- configurable : true
- }))), value;
- },
- set : function(key, data, type) {
- var prop;
- var cache = this.cache(key);
- if ("string" == typeof data) {
- /** @type {string} */
- cache[camelCase(data)] = type;
- } else {
- for (prop in data) {
- cache[camelCase(prop)] = data[prop];
- }
- }
- return cache;
- },
- get : function(owner, key) {
- return void 0 === key ? this.cache(owner) : owner[this.expando] && owner[this.expando][camelCase(key)];
- },
- access : function(value, fn, o) {
- return void 0 === fn || fn && "string" == typeof fn && void 0 === o ? this.get(value, fn) : (this.set(value, fn, o), void 0 !== o ? o : fn);
- },
- remove : function(owner, name) {
- var i;
- var cache = owner[this.expando];
- if (void 0 !== cache) {
- if (void 0 !== name) {
- i = (name = Array.isArray(name) ? name.map(camelCase) : (name = camelCase(name)) in cache ? [name] : name.match(re) || []).length;
- for (; i--;) {
- delete cache[name[i]];
- }
- }
- if (void 0 === name || jQuery.isEmptyObject(cache)) {
- if (owner.nodeType) {
- owner[this.expando] = void 0;
- } else {
- delete owner[this.expando];
- }
- }
- }
- },
- hasData : function(owner) {
- var cache = owner[this.expando];
- return void 0 !== cache && !jQuery.isEmptyObject(cache);
- }
- };
- var dataPriv = new Data;
- var self = new Data;
- /** @type {!RegExp} */
- var contribRegex = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
- /** @type {!RegExp} */
- var dashExpr = /[A-Z]/g;
- jQuery.extend({
- hasData : function(elem) {
- return self.hasData(elem) || dataPriv.hasData(elem);
- },
- data : function(elem, name, value) {
- return self.access(elem, name, value);
- },
- removeData : function(elem, name) {
- self.remove(elem, name);
- },
- _data : function(elem, name, data) {
- return dataPriv.access(elem, name, data);
- },
- _removeData : function(elem, name) {
- dataPriv.remove(elem, name);
- }
- });
- jQuery.fn.extend({
- data : function(value, args) {
- var i;
- var name;
- var data;
- var elem = this[0];
- var attrs = elem && elem.attributes;
- if (void 0 === value) {
- if (this.length && (data = self.get(elem), 1 === elem.nodeType && !dataPriv.get(elem, "hasDataAttrs"))) {
- i = attrs.length;
- for (; i--;) {
- if (attrs[i] && 0 === (name = attrs[i].name).indexOf("data-")) {
- name = camelCase(name.slice(5));
- func(elem, name, data[name]);
- }
- }
- dataPriv.set(elem, "hasDataAttrs", true);
- }
- return data;
- }
- return "object" == typeof value ? this.each(function() {
- self.set(this, value);
- }) : access(this, function(name) {
- var message;
- if (elem && void 0 === name) {
- return void 0 !== (message = self.get(elem, value)) ? message : void 0 !== (message = func(elem, value)) ? message : void 0;
- }
- this.each(function() {
- self.set(this, value, name);
- });
- }, null, args, 1 < arguments.length, null, true);
- },
- removeData : function(callback) {
- return this.each(function() {
- self.remove(this, callback);
- });
- }
- });
- jQuery.extend({
- queue : function(elem, type, data) {
- var q;
- if (elem) {
- return type = (type || "fx") + "queue", q = dataPriv.get(elem, type), data && (!q || Array.isArray(data) ? q = dataPriv.access(elem, type, jQuery.makeArray(data)) : q.push(data)), q || [];
- }
- },
- dequeue : function(elem, type) {
- type = type || "fx";
- var queue = jQuery.queue(elem, type);
- var i = queue.length;
- var _self = queue.shift();
- var node = jQuery._queueHooks(elem, type);
- if ("inprogress" === _self) {
- _self = queue.shift();
- i--;
- }
- if (_self) {
- if ("fx" === type) {
- queue.unshift("inprogress");
- }
- delete node.stop;
- _self.call(elem, function() {
- jQuery.dequeue(elem, type);
- }, node);
- }
- if (!i && node) {
- node.empty.fire();
- }
- },
- _queueHooks : function(elem, type) {
- /** @type {string} */
- var key = type + "queueHooks";
- return dataPriv.get(elem, key) || dataPriv.access(elem, key, {
- empty : jQuery.Callbacks("once memory").add(function() {
- dataPriv.remove(elem, [type + "queue", key]);
- })
- });
- }
- });
- jQuery.fn.extend({
- queue : function(type, data) {
- /** @type {number} */
- var setter = 2;
- return "string" != typeof type && (data = type, type = "fx", setter--), arguments.length < setter ? jQuery.queue(this[0], type) : void 0 === data ? this : this.each(function() {
- var queue = jQuery.queue(this, type, data);
- jQuery._queueHooks(this, type);
- if ("fx" === type && "inprogress" !== queue[0]) {
- jQuery.dequeue(this, type);
- }
- });
- },
- dequeue : function(type) {
- return this.each(function() {
- jQuery.dequeue(this, type);
- });
- },
- clearQueue : function(type) {
- return this.queue(type || "fx", []);
- },
- promise : function(type, result) {
- var sel;
- /** @type {number} */
- var r = 1;
- var defer = jQuery.Deferred();
- var elements = this;
- var i = this.length;
- /**
- * @return {undefined}
- */
- var resolve = function() {
- if (!--r) {
- defer.resolveWith(elements, [elements]);
- }
- };
- if ("string" != typeof type) {
- /** @type {!Object} */
- result = type;
- type = void 0;
- }
- type = type || "fx";
- for (; i--;) {
- if ((sel = dataPriv.get(elements[i], type + "queueHooks")) && sel.empty) {
- r++;
- sel.empty.add(resolve);
- }
- }
- return resolve(), defer.promise(result);
- }
- });
- /** @type {string} */
- var FSSource = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
- /** @type {!RegExp} */
- var regex = new RegExp("^(?:([+-])=|)(" + FSSource + ")([a-z%]*)$", "i");
- /** @type {!Array} */
- var cssExpand = ["Top", "Right", "Bottom", "Left"];
- var node = document.documentElement;
- /**
- * @param {!Object} elem
- * @return {?}
- */
- var test = function(elem) {
- return jQuery.contains(elem.ownerDocument, elem);
- };
- var _prefName = {
- composed : true
- };
- if (node.getRootNode) {
- /**
- * @param {!Object} p
- * @return {?}
- */
- test = function(p) {
- return jQuery.contains(p.ownerDocument, p) || p.getRootNode(_prefName) === p.ownerDocument;
- };
- }
- /**
- * @param {!Element} el
- * @param {!Element} root
- * @return {?}
- */
- var isHidden = function(el, root) {
- return "none" === (el = root || el).style.display || "" === el.style.display && test(el) && "none" === jQuery.css(el, "display");
- };
- var elemdisplay = {};
- jQuery.fn.extend({
- show : function() {
- return show(this, true);
- },
- hide : function() {
- return show(this);
- },
- toggle : function(state) {
- return "boolean" == typeof state ? state ? this.show() : this.hide() : this.each(function() {
- if (isHidden(this)) {
- jQuery(this).show();
- } else {
- jQuery(this).hide();
- }
- });
- }
- });
- var content_elem;
- var input;
- /** @type {!RegExp} */
- var app = /^(?:checkbox|radio)$/i;
- /** @type {!RegExp} */
- var me = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
- /** @type {!RegExp} */
- var opacityRe = /^$|^module$|\/(?:java|ecma)script/i;
- content_elem = document.createDocumentFragment().appendChild(document.createElement("div"));
- (input = document.createElement("input")).setAttribute("type", "radio");
- input.setAttribute("checked", "checked");
- input.setAttribute("name", "t");
- content_elem.appendChild(input);
- support.checkClone = content_elem.cloneNode(true).cloneNode(true).lastChild.checked;
- /** @type {string} */
- content_elem.innerHTML = "<textarea>x</textarea>";
- /** @type {boolean} */
- support.noCloneChecked = !!content_elem.cloneNode(true).lastChild.defaultValue;
- /** @type {string} */
- content_elem.innerHTML = "<option></option>";
- /** @type {boolean} */
- support.option = !!content_elem.lastChild;
- var wrapMap = {
- thead : [1, "<table>", "</table>"],
- col : [2, "<table><colgroup>", "</colgroup></table>"],
- tr : [2, "<table><tbody>", "</tbody></table>"],
- td : [3, "<table><tbody><tr>", "</tr></tbody></table>"],
- _default : [0, "", ""]
- };
- /** @type {!Array} */
- wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
- /** @type {!Array} */
- wrapMap.th = wrapMap.td;
- if (!support.option) {
- /** @type {!Array} */
- wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
- }
- /** @type {!RegExp} */
- var re_commas = /<|&#?\w+;/;
- /** @type {!RegExp} */
- var receivedErrorEvents = /^key/;
- /** @type {!RegExp} */
- var receivedOpenEvents = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
- /** @type {!RegExp} */
- var reg = /^([^.]*)(?:\.(.+)|)/;
- jQuery.event = {
- global : {},
- add : function(elem, item, handler, data, selector) {
- var handleObjIn;
- var eventHandle;
- var BROWSER_ENGINES;
- var events;
- var i;
- var handleObj;
- var special;
- var handlers;
- var type;
- var h;
- var origType;
- var elemData = dataPriv.get(elem);
- if (acceptData(elem)) {
- if (handler.handler) {
- handler = (handleObjIn = handler).handler;
- selector = handleObjIn.selector;
- }
- if (selector) {
- jQuery.find.matchesSelector(node, selector);
- }
- if (!handler.guid) {
- /** @type {number} */
- handler.guid = jQuery.guid++;
- }
- if (!(events = elemData.events)) {
- /** @type {!Object} */
- events = elemData.events = Object.create(null);
- }
- if (!(eventHandle = elemData.handle)) {
- /** @type {function(!Object): ?} */
- eventHandle = elemData.handle = function(e) {
- return "undefined" != typeof jQuery && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
- };
- }
- i = (item = (item || "").match(re) || [""]).length;
- for (; i--;) {
- type = origType = (BROWSER_ENGINES = reg.exec(item[i]) || [])[1];
- h = (BROWSER_ENGINES[2] || "").split(".").sort();
- if (type) {
- special = jQuery.event.special[type] || {};
- type = (selector ? special.delegateType : special.bindType) || type;
- special = jQuery.event.special[type] || {};
- handleObj = jQuery.extend({
- type : type,
- origType : origType,
- data : data,
- handler : handler,
- guid : handler.guid,
- selector : selector,
- needsContext : selector && jQuery.expr.match.needsContext.test(selector),
- namespace : h.join(".")
- }, handleObjIn);
- if (!(handlers = events[type])) {
- /** @type {number} */
- (handlers = events[type] = []).delegateCount = 0;
- if (!(special.setup && false !== special.setup.call(elem, data, h, eventHandle))) {
- if (elem.addEventListener) {
- elem.addEventListener(type, eventHandle);
- }
- }
- }
- if (special.add) {
- special.add.call(elem, handleObj);
- if (!handleObj.handler.guid) {
- handleObj.handler.guid = handler.guid;
- }
- }
- if (selector) {
- handlers.splice(handlers.delegateCount++, 0, handleObj);
- } else {
- handlers.push(handleObj);
- }
- /** @type {boolean} */
- jQuery.event.global[type] = true;
- }
- }
- }
- },
- remove : function(elem, data, fn, selector, i) {
- var j;
- var origCount;
- var tmp;
- var events;
- var i;
- var handleObj;
- var special;
- var handlers;
- var type;
- var h;
- var level;
- var elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
- if (elemData && (events = elemData.events)) {
- i = (data = (data || "").match(re) || [""]).length;
- for (; i--;) {
- if (type = level = (tmp = reg.exec(data[i]) || [])[1], h = (tmp[2] || "").split(".").sort(), type) {
- special = jQuery.event.special[type] || {};
- handlers = events[type = (selector ? special.delegateType : special.bindType) || type] || [];
- tmp = tmp[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)");
- origCount = j = handlers.length;
- for (; j--;) {
- handleObj = handlers[j];
- if (!(!i && level !== handleObj.origType || fn && fn.guid !== handleObj.guid || tmp && !tmp.test(handleObj.namespace) || selector && selector !== handleObj.selector && ("**" !== selector || !handleObj.selector))) {
- handlers.splice(j, 1);
- if (handleObj.selector) {
- handlers.delegateCount--;
- }
- if (special.remove) {
- special.remove.call(elem, handleObj);
- }
- }
- }
- if (origCount && !handlers.length) {
- if (!(special.teardown && false !== special.teardown.call(elem, h, elemData.handle))) {
- jQuery.removeEvent(elem, type, elemData.handle);
- }
- delete events[type];
- }
- } else {
- for (type in events) {
- jQuery.event.remove(elem, type + data[i], fn, selector, true);
- }
- }
- }
- if (jQuery.isEmptyObject(events)) {
- dataPriv.remove(elem, "handle events");
- }
- }
- },
- dispatch : function(e) {
- var i;
- var j;
- var ret;
- var matched;
- var handleObj;
- var handlerQueue;
- /** @type {!Array} */
- var args = new Array(arguments.length);
- var event = jQuery.event.fix(e);
- var handlers = (dataPriv.get(this, "events") || Object.create(null))[event.type] || [];
- var special = jQuery.event.special[event.type] || {};
- args[0] = event;
- /** @type {number} */
- i = 1;
- for (; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
- if (event.delegateTarget = this, !special.preDispatch || false !== special.preDispatch.call(this, event)) {
- handlerQueue = jQuery.event.handlers.call(this, event, handlers);
- /** @type {number} */
- i = 0;
- for (; (matched = handlerQueue[i++]) && !event.isPropagationStopped();) {
- event.currentTarget = matched.elem;
- /** @type {number} */
- j = 0;
- for (; (handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped();) {
- if (!(event.rnamespace && false !== handleObj.namespace && !event.rnamespace.test(handleObj.namespace))) {
- event.handleObj = handleObj;
- event.data = handleObj.data;
- if (void 0 !== (ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args)) && false === (event.result = ret)) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- return special.postDispatch && special.postDispatch.call(this, event), event.result;
- }
- },
- handlers : function(event, handlers) {
- var i;
- var handleObj;
- var name;
- var matches;
- var fieldOrdinals;
- /** @type {!Array} */
- var handlerQueue = [];
- var delegateCount = handlers.delegateCount;
- var cur = event.target;
- if (delegateCount && cur.nodeType && !("click" === event.type && 1 <= event.button)) {
- for (; cur !== this; cur = cur.parentNode || this) {
- if (1 === cur.nodeType && ("click" !== event.type || true !== cur.disabled)) {
- /** @type {!Array} */
- matches = [];
- fieldOrdinals = {};
- /** @type {number} */
- i = 0;
- for (; i < delegateCount; i++) {
- if (void 0 === fieldOrdinals[name = (handleObj = handlers[i]).selector + " "]) {
- fieldOrdinals[name] = handleObj.needsContext ? -1 < jQuery(name, this).index(cur) : jQuery.find(name, this, null, [cur]).length;
- }
- if (fieldOrdinals[name]) {
- matches.push(handleObj);
- }
- }
- if (matches.length) {
- handlerQueue.push({
- elem : cur,
- handlers : matches
- });
- }
- }
- }
- }
- return cur = this, delegateCount < handlers.length && handlerQueue.push({
- elem : cur,
- handlers : handlers.slice(delegateCount)
- }), handlerQueue;
- },
- addProp : function(name, hook) {
- Object.defineProperty(jQuery.Event.prototype, name, {
- enumerable : true,
- configurable : true,
- get : fn(hook) ? function() {
- if (this.originalEvent) {
- return hook(this.originalEvent);
- }
- } : function() {
- if (this.originalEvent) {
- return this.originalEvent[name];
- }
- },
- set : function(type) {
- Object.defineProperty(this, name, {
- enumerable : true,
- configurable : true,
- writable : true,
- value : type
- });
- }
- });
- },
- fix : function(originalEvent) {
- return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
- },
- special : {
- load : {
- noBubble : true
- },
- click : {
- setup : function(options) {
- var target = this || options;
- return app.test(target.type) && target.click && callback(target, "input") && handler(target, "click", returnTrue), false;
- },
- trigger : function(event) {
- var type = this || event;
- return app.test(type.type) && type.click && callback(type, "input") && handler(type, "click"), true;
- },
- _default : function(options) {
- var elem = options.target;
- return app.test(elem.type) && elem.click && callback(elem, "input") && dataPriv.get(elem, "click") || callback(elem, "a");
- }
- },
- beforeunload : {
- postDispatch : function(event) {
- if (void 0 !== event.result && event.originalEvent) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- }
- };
- /**
- * @param {!Object} elem
- * @param {!Object} type
- * @param {?} fn
- * @return {undefined}
- */
- jQuery.removeEvent = function(elem, type, fn) {
- if (elem.removeEventListener) {
- elem.removeEventListener(type, fn);
- }
- };
- /**
- * @param {!Object} src
- * @param {!Object} props
- * @return {?}
- */
- jQuery.Event = function(src, props) {
- if (!(this instanceof jQuery.Event)) {
- return new jQuery.Event(src, props);
- }
- if (src && src.type) {
- /** @type {!Object} */
- this.originalEvent = src;
- this.type = src.type;
- /** @type {function(): ?} */
- this.isDefaultPrevented = src.defaultPrevented || void 0 === src.defaultPrevented && false === src.returnValue ? returnTrue : returnFalse;
- this.target = src.target && 3 === src.target.nodeType ? src.target.parentNode : src.target;
- this.currentTarget = src.currentTarget;
- this.relatedTarget = src.relatedTarget;
- } else {
- /** @type {!Object} */
- this.type = src;
- }
- if (props) {
- jQuery.extend(this, props);
- }
- this.timeStamp = src && src.timeStamp || Date.now();
- /** @type {boolean} */
- this[jQuery.expando] = true;
- };
- jQuery.Event.prototype = {
- constructor : jQuery.Event,
- isDefaultPrevented : returnFalse,
- isPropagationStopped : returnFalse,
- isImmediatePropagationStopped : returnFalse,
- isSimulated : false,
- preventDefault : function() {
- var e = this.originalEvent;
- /** @type {function(): ?} */
- this.isDefaultPrevented = returnTrue;
- if (e && !this.isSimulated) {
- e.preventDefault();
- }
- },
- stopPropagation : function() {
- var e = this.originalEvent;
- /** @type {function(): ?} */
- this.isPropagationStopped = returnTrue;
- if (e && !this.isSimulated) {
- e.stopPropagation();
- }
- },
- stopImmediatePropagation : function() {
- var e = this.originalEvent;
- /** @type {function(): ?} */
- this.isImmediatePropagationStopped = returnTrue;
- if (e && !this.isSimulated) {
- e.stopImmediatePropagation();
- }
- this.stopPropagation();
- }
- };
- jQuery.each({
- altKey : true,
- bubbles : true,
- cancelable : true,
- changedTouches : true,
- ctrlKey : true,
- detail : true,
- eventPhase : true,
- metaKey : true,
- pageX : true,
- pageY : true,
- shiftKey : true,
- view : true,
- "char" : true,
- code : true,
- charCode : true,
- key : true,
- keyCode : true,
- button : true,
- buttons : true,
- clientX : true,
- clientY : true,
- offsetX : true,
- offsetY : true,
- pointerId : true,
- pointerType : true,
- screenX : true,
- screenY : true,
- targetTouches : true,
- toElement : true,
- touches : true,
- which : function(e) {
- var button = e.button;
- return null == e.which && receivedErrorEvents.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== button && receivedOpenEvents.test(e.type) ? 1 & button ? 1 : 2 & button ? 3 : 4 & button ? 2 : 0 : e.which;
- }
- }, jQuery.event.addProp);
- jQuery.each({
- focus : "focusin",
- blur : "focusout"
- }, function(name, fix) {
- jQuery.event.special[name] = {
- setup : function() {
- return handler(this, name, raw), false;
- },
- trigger : function() {
- return handler(this, name), true;
- },
- delegateType : fix
- };
- });
- jQuery.each({
- mouseenter : "mouseover",
- mouseleave : "mouseout",
- pointerenter : "pointerover",
- pointerleave : "pointerout"
- }, function(orig, fix) {
- jQuery.event.special[orig] = {
- delegateType : fix,
- bindType : fix,
- handle : function(event) {
- var _ref12;
- var target = event.relatedTarget;
- var handleObj = event.handleObj;
- return target && (target === this || jQuery.contains(this, target)) || (event.type = handleObj.origType, _ref12 = handleObj.handler.apply(this, arguments), event.type = fix), _ref12;
- }
- };
- });
- jQuery.fn.extend({
- on : function(type, name, callback, target) {
- return get(this, type, name, callback, target);
- },
- one : function(data, callback, type, res) {
- return get(this, data, callback, type, res, 1);
- },
- off : function(types, callback, fn) {
- var handleObj;
- var type;
- if (types && types.preventDefault && types.handleObj) {
- return handleObj = types.handleObj, jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler), this;
- }
- if ("object" == typeof types) {
- for (type in types) {
- this.off(type, callback, types[type]);
- }
- return this;
- }
- return false !== callback && "function" != typeof callback || (fn = callback, callback = void 0), false === fn && (fn = returnFalse), this.each(function() {
- jQuery.event.remove(this, types, fn, callback);
- });
- }
- });
- /** @type {!RegExp} */
- var _tacet = /<script|<style|<link/i;
- /** @type {!RegExp} */
- var partten = /checked\s*(?:[^=]|=\s*.checked.)/i;
- /** @type {!RegExp} */
- var query = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
- jQuery.extend({
- htmlPrefilter : function(html) {
- return html;
- },
- clone : function(elem, n, array) {
- var i;
- var l;
- var srcElements;
- var destElements;
- var o;
- var el;
- var undefined;
- var clone = elem.cloneNode(true);
- var inPage = test(elem);
- if (!(support.noCloneChecked || 1 !== elem.nodeType && 11 !== elem.nodeType || jQuery.isXMLDoc(elem))) {
- destElements = getAll(clone);
- /** @type {number} */
- i = 0;
- l = (srcElements = getAll(elem)).length;
- for (; i < l; i++) {
- o = srcElements[i];
- el = destElements[i];
- void 0;
- if ("input" === (undefined = el.nodeName.toLowerCase()) && app.test(o.type)) {
- el.checked = o.checked;
- } else {
- if (!("input" !== undefined && "textarea" !== undefined)) {
- el.defaultValue = o.defaultValue;
- }
- }
- }
- }
- if (n) {
- if (array) {
- srcElements = srcElements || getAll(elem);
- destElements = destElements || getAll(clone);
- /** @type {number} */
- i = 0;
- l = srcElements.length;
- for (; i < l; i++) {
- cloneCopyEvent(srcElements[i], destElements[i]);
- }
- } else {
- cloneCopyEvent(elem, clone);
- }
- }
- return 0 < (destElements = getAll(clone, "script")).length && setGlobalEval(destElements, !inPage && getAll(elem, "script")), clone;
- },
- cleanData : function(elems) {
- var data;
- var elem;
- var type;
- var special = jQuery.event.special;
- /** @type {number} */
- var i = 0;
- for (; void 0 !== (elem = elems[i]); i++) {
- if (acceptData(elem)) {
- if (data = elem[dataPriv.expando]) {
- if (data.events) {
- for (type in data.events) {
- if (special[type]) {
- jQuery.event.remove(elem, type);
- } else {
- jQuery.removeEvent(elem, type, data.handle);
- }
- }
- }
- elem[dataPriv.expando] = void 0;
- }
- if (elem[self.expando]) {
- elem[self.expando] = void 0;
- }
- }
- }
- }
- });
- jQuery.fn.extend({
- detach : function(selector) {
- return remove(this, selector, true);
- },
- remove : function(key) {
- return remove(this, key);
- },
- text : function(value) {
- return access(this, function(value) {
- return void 0 === value ? jQuery.text(this) : this.empty().each(function() {
- if (!(1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType)) {
- this.textContent = value;
- }
- });
- }, null, value, arguments.length);
- },
- append : function() {
- return domManip(this, arguments, function(elem) {
- if (!(1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType)) {
- manipulationTarget(this, elem).appendChild(elem);
- }
- });
- },
- prepend : function() {
- return domManip(this, arguments, function(elem) {
- if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
- var target = manipulationTarget(this, elem);
- target.insertBefore(elem, target.firstChild);
- }
- });
- },
- before : function() {
- return domManip(this, arguments, function(elem) {
- if (this.parentNode) {
- this.parentNode.insertBefore(elem, this);
- }
- });
- },
- after : function() {
- return domManip(this, arguments, function(elem) {
- if (this.parentNode) {
- this.parentNode.insertBefore(elem, this.nextSibling);
- }
- });
- },
- empty : function() {
- var elem;
- /** @type {number} */
- var i = 0;
- for (; null != (elem = this[i]); i++) {
- if (1 === elem.nodeType) {
- jQuery.cleanData(getAll(elem, false));
- /** @type {string} */
- elem.textContent = "";
- }
- }
- return this;
- },
- clone : function(c, i) {
- return c = null != c && c, i = null == i ? c : i, this.map(function() {
- return jQuery.clone(this, c, i);
- });
- },
- html : function(value) {
- return access(this, function(value) {
- var elem = this[0] || {};
- /** @type {number} */
- var thatpos = 0;
- var i = this.length;
- if (void 0 === value && 1 === elem.nodeType) {
- return elem.innerHTML;
- }
- if ("string" == typeof value && !_tacet.test(value) && !wrapMap[(me.exec(value) || ["", ""])[1].toLowerCase()]) {
- value = jQuery.htmlPrefilter(value);
- try {
- for (; thatpos < i; thatpos++) {
- if (1 === (elem = this[thatpos] || {}).nodeType) {
- jQuery.cleanData(getAll(elem, false));
- /** @type {number} */
- elem.innerHTML = value;
- }
- }
- /** @type {number} */
- elem = 0;
- } catch (e) {
- }
- }
- if (elem) {
- this.empty().append(value);
- }
- }, null, value, arguments.length);
- },
- replaceWith : function() {
- /** @type {!Array} */
- var ignored = [];
- return domManip(this, arguments, function(textualMod) {
- var thisParent = this.parentNode;
- if (jQuery.inArray(this, ignored) < 0) {
- jQuery.cleanData(getAll(this));
- if (thisParent) {
- thisParent.replaceChild(textualMod, this);
- }
- }
- }, ignored);
- }
- });
- jQuery.each({
- appendTo : "append",
- prependTo : "prepend",
- insertBefore : "before",
- insertAfter : "after",
- replaceAll : "replaceWith"
- }, function(original, name) {
- /**
- * @param {!Array} path
- * @return {?}
- */
- jQuery.fn[original] = function(path) {
- var param;
- /** @type {!Array} */
- var ret = [];
- var a = jQuery(path);
- /** @type {number} */
- var last = a.length - 1;
- /** @type {number} */
- var i = 0;
- for (; i <= last; i++) {
- param = i === last ? this : this.clone(true);
- jQuery(a[i])[name](param);
- push.apply(ret, param.get());
- }
- return this.pushStack(ret);
- };
- });
- /** @type {!RegExp} */
- var rnumnonpx = new RegExp("^(" + FSSource + ")(?!px)[a-z%]+$", "i");
- /**
- * @param {!Object} elem
- * @return {?}
- */
- var getStyles = function(elem) {
- var win = elem.ownerDocument.defaultView;
- return win && win.opener || (win = window), win.getComputedStyle(elem);
- };
- /**
- * @param {!Element} e
- * @param {!Array} obj
- * @param {!Function} f
- * @return {?}
- */
- var swap = function(e, obj, f) {
- var result;
- var key;
- var pyobj = {};
- for (key in obj) {
- pyobj[key] = e.style[key];
- e.style[key] = obj[key];
- }
- for (key in result = f.call(e), obj) {
- e.style[key] = pyobj[key];
- }
- return result;
- };
- /** @type {!RegExp} */
- var inlineAttributeCommentRegex = new RegExp(cssExpand.join("|"), "i");
- !function() {
- /**
- * @return {undefined}
- */
- function computeStyleTests() {
- if (div) {
- /** @type {string} */
- parent.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";
- /** @type {string} */
- div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";
- node.appendChild(parent).appendChild(div);
- var style = window.getComputedStyle(div);
- /** @type {boolean} */
- res = "1%" !== style.top;
- /** @type {boolean} */
- s = 12 === parseRound(style.marginLeft);
- /** @type {string} */
- div.style.right = "60%";
- /** @type {boolean} */
- o = 36 === parseRound(style.right);
- /** @type {boolean} */
- r = 36 === parseRound(style.width);
- /** @type {string} */
- div.style.position = "absolute";
- /** @type {boolean} */
- i = 12 === parseRound(div.offsetWidth / 3);
- node.removeChild(parent);
- /** @type {null} */
- div = null;
- }
- }
- /**
- * @param {number} fontSize
- * @return {?}
- */
- function parseRound(fontSize) {
- return Math.round(parseFloat(fontSize));
- }
- var res;
- var r;
- var i;
- var o;
- var a;
- var s;
- var parent = document.createElement("div");
- var div = document.createElement("div");
- if (div.style) {
- /** @type {string} */
- div.style.backgroundClip = "content-box";
- /** @type {string} */
- div.cloneNode(true).style.backgroundClip = "";
- /** @type {boolean} */
- support.clearCloneStyle = "content-box" === div.style.backgroundClip;
- jQuery.extend(support, {
- boxSizingReliable : function() {
- return computeStyleTests(), r;
- },
- pixelBoxStyles : function() {
- return computeStyleTests(), o;
- },
- pixelPosition : function() {
- return computeStyleTests(), res;
- },
- reliableMarginLeft : function() {
- return computeStyleTests(), s;
- },
- scrollboxSize : function() {
- return computeStyleTests(), i;
- },
- reliableTrDimensions : function() {
- var p;
- var c;
- var n;
- var s;
- return null == a && (p = document.createElement("table"), c = document.createElement("tr"), n = document.createElement("div"), p.style.cssText = "position:absolute;left:-11111px", c.style.height = "1px", n.style.height = "9px", node.appendChild(p).appendChild(c).appendChild(n), s = window.getComputedStyle(c), a = 3 < parseInt(s.height), node.removeChild(p)), a;
- }
- });
- }
- }();
- /** @type {!Array} */
- var prefixes = ["Webkit", "Moz", "ms"];
- var testStyle = document.createElement("div").style;
- var aSupports = {};
- /** @type {!RegExp} */
- var rdisplayswap = /^(none|table(?!-c[ea]).+)/;
- /** @type {!RegExp} */
- var ngTranslationProvider = /^--/;
- var cssShow = {
- position : "absolute",
- visibility : "hidden",
- display : "block"
- };
- var cssNormalTransform = {
- letterSpacing : "0",
- fontWeight : "400"
- };
- jQuery.extend({
- cssHooks : {
- opacity : {
- get : function(elem, data) {
- if (data) {
- var to = curCSS(elem, "opacity");
- return "" === to ? "1" : to;
- }
- }
- }
- },
- cssNumber : {
- animationIterationCount : true,
- columnCount : true,
- fillOpacity : true,
- flexGrow : true,
- flexShrink : true,
- fontWeight : true,
- gridArea : true,
- gridColumn : true,
- gridColumnEnd : true,
- gridColumnStart : true,
- gridRow : true,
- gridRowEnd : true,
- gridRowStart : true,
- lineHeight : true,
- opacity : true,
- order : true,
- orphans : true,
- widows : true,
- zIndex : true,
- zoom : true
- },
- cssProps : {},
- style : function(elem, name, value, extra) {
- if (elem && 3 !== elem.nodeType && 8 !== elem.nodeType && elem.style) {
- var ret;
- var type;
- var hooks;
- var prop = camelCase(name);
- /** @type {boolean} */
- var versionByName = ngTranslationProvider.test(name);
- var style = elem.style;
- if (versionByName || (name = camelize(prop)), hooks = jQuery.cssHooks[name] || jQuery.cssHooks[prop], void 0 === value) {
- return hooks && "get" in hooks && void 0 !== (ret = hooks.get(elem, false, extra)) ? ret : style[name];
- }
- if ("string" === (type = typeof value) && (ret = regex.exec(value)) && ret[1]) {
- value = adjustCSS(elem, name, ret);
- /** @type {string} */
- type = "number";
- }
- if (null != value && value == value) {
- if (!("number" !== type || versionByName)) {
- /** @type {string} */
- value = value + (ret && ret[3] || (jQuery.cssNumber[prop] ? "" : "px"));
- }
- if (!(support.clearCloneStyle || "" !== value || 0 !== name.indexOf("background"))) {
- /** @type {string} */
- style[name] = "inherit";
- }
- if (!(hooks && "set" in hooks && void 0 === (value = hooks.set(elem, value, extra)))) {
- if (versionByName) {
- style.setProperty(name, value);
- } else {
- /** @type {string} */
- style[name] = value;
- }
- }
- }
- }
- },
- css : function(elem, name, value, styles) {
- var val;
- var length;
- var hooks;
- var prop = camelCase(name);
- return ngTranslationProvider.test(name) || (name = camelize(prop)), (hooks = jQuery.cssHooks[name] || jQuery.cssHooks[prop]) && "get" in hooks && (val = hooks.get(elem, true, value)), void 0 === val && (val = curCSS(elem, name, styles)), "normal" === val && name in cssNormalTransform && (val = cssNormalTransform[name]), "" === value || value ? (length = parseFloat(val), true === value || isFinite(length) ? length || 0 : val) : val;
- }
- });
- jQuery.each(["height", "width"], function(canCreateDiscussions, name) {
- jQuery.cssHooks[name] = {
- get : function(elem, data, options) {
- if (data) {
- return !rdisplayswap.test(jQuery.css(elem, "display")) || elem.getClientRects().length && elem.getBoundingClientRect().width ? load(elem, name, options) : swap(elem, cssShow, function() {
- return load(elem, name, options);
- });
- }
- },
- set : function(elem, value, extra) {
- var match;
- var styles = getStyles(elem);
- /** @type {boolean} */
- var res = !support.scrollboxSize() && "absolute" === styles.position;
- var valueIsBorderBox = (res || extra) && "border-box" === jQuery.css(elem, "boxSizing", false, styles);
- var id = extra ? augmentWidthOrHeight(elem, name, extra, valueIsBorderBox, styles) : 0;
- return valueIsBorderBox && res && (id = id - Math.ceil(elem["offset" + name[0].toUpperCase() + name.slice(1)] - parseFloat(styles[name]) - augmentWidthOrHeight(elem, name, "border", false, styles) - .5)), id && (match = regex.exec(value)) && "px" !== (match[3] || "px") && (elem.style[name] = value, value = jQuery.css(elem, name)), _set(0, value, id);
- }
- };
- });
- jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function(elem, canCreateDiscussions) {
- if (canCreateDiscussions) {
- return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, {
- marginLeft : 0
- }, function() {
- return elem.getBoundingClientRect().left;
- })) + "px";
- }
- });
- jQuery.each({
- margin : "",
- padding : "",
- border : "Width"
- }, function(prefix, suffix) {
- jQuery.cssHooks[prefix + suffix] = {
- expand : function(expected) {
- /** @type {number} */
- var i = 0;
- var expanded = {};
- /** @type {!Array} */
- var stops = "string" == typeof expected ? expected.split(" ") : [expected];
- for (; i < 4; i++) {
- expanded[prefix + cssExpand[i] + suffix] = stops[i] || stops[i - 2] || stops[0];
- }
- return expanded;
- }
- };
- if ("margin" !== prefix) {
- /** @type {function(!Object, !Object, string): ?} */
- jQuery.cssHooks[prefix + suffix].set = _set;
- }
- });
- jQuery.fn.extend({
- css : function(name, value) {
- return access(this, function(elem, name, undefined) {
- var styles;
- var l;
- var map = {};
- /** @type {number} */
- var i = 0;
- if (Array.isArray(name)) {
- styles = getStyles(elem);
- l = name.length;
- for (; i < l; i++) {
- map[name[i]] = jQuery.css(elem, name[i], false, styles);
- }
- return map;
- }
- return void 0 !== undefined ? jQuery.style(elem, name, undefined) : jQuery.css(elem, name);
- }, name, value, 1 < arguments.length);
- }
- });
- ((jQuery.Tween = Tween).prototype = {
- constructor : Tween,
- init : function(domElem, options, prop, end, easing, unit) {
- /** @type {!Element} */
- this.elem = domElem;
- /** @type {!Object} */
- this.prop = prop;
- this.easing = easing || jQuery.easing._default;
- /** @type {!Object} */
- this.options = options;
- this.start = this.now = this.cur();
- /** @type {number} */
- this.end = end;
- this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
- },
- cur : function() {
- var hooks = Tween.propHooks[this.prop];
- return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
- },
- run : function(percent) {
- var eased;
- var hooks = Tween.propHooks[this.prop];
- return this.options.duration ? this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration) : this.pos = eased = percent, this.now = (this.end - this.start) * eased + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), hooks && hooks.set ? hooks.set(this) : Tween.propHooks._default.set(this), this;
- }
- }).init.prototype = Tween.prototype;
- (Tween.propHooks = {
- _default : {
- get : function(s) {
- var fitWidth;
- return 1 !== s.elem.nodeType || null != s.elem[s.prop] && null == s.elem.style[s.prop] ? s.elem[s.prop] : (fitWidth = jQuery.css(s.elem, s.prop, "")) && "auto" !== fitWidth ? fitWidth : 0;
- },
- set : function(tween) {
- if (jQuery.fx.step[tween.prop]) {
- jQuery.fx.step[tween.prop](tween);
- } else {
- if (1 !== tween.elem.nodeType || !jQuery.cssHooks[tween.prop] && null == tween.elem.style[camelize(tween.prop)]) {
- tween.elem[tween.prop] = tween.now;
- } else {
- jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
- }
- }
- }
- }
- }).scrollTop = Tween.propHooks.scrollLeft = {
- set : function(tween) {
- if (tween.elem.nodeType && tween.elem.parentNode) {
- tween.elem[tween.prop] = tween.now;
- }
- }
- };
- jQuery.easing = {
- linear : function(p) {
- return p;
- },
- swing : function(p) {
- return .5 - Math.cos(p * Math.PI) / 2;
- },
- _default : "swing"
- };
- /** @type {function(!Element, !Object, !Object, number, string, string): undefined} */
- jQuery.fx = Tween.prototype.init;
- jQuery.fx.step = {};
- var fxNow;
- var nt;
- var elem;
- var opt;
- /** @type {!RegExp} */
- var trueRE = /^(?:toggle|show|hide)$/;
- /** @type {!RegExp} */
- var rrun = /queueHooks$/;
- jQuery.Animation = jQuery.extend(Animation, {
- tweeners : {
- "*" : [function(prop, value) {
- var tween = this.createTween(prop, value);
- return adjustCSS(tween.elem, prop, regex.exec(value), tween), tween;
- }]
- },
- tweener : function(props, callback) {
- if (fn(props)) {
- /** @type {!Object} */
- callback = props;
- /** @type {!Array} */
- props = ["*"];
- } else {
- props = props.match(re);
- }
- var prop;
- /** @type {number} */
- var i = 0;
- var inputsSize = props.length;
- for (; i < inputsSize; i++) {
- prop = props[i];
- Animation.tweeners[prop] = Animation.tweeners[prop] || [];
- Animation.tweeners[prop].unshift(callback);
- }
- },
- prefilters : [function(elem, props, config) {
- var prop;
- var value;
- var matched;
- var hooks;
- var oldfire;
- var tween;
- var restoreDisplay;
- var display;
- /** @type {boolean} */
- var f = "width" in props || "height" in props;
- var anim = this;
- var orig = {};
- var style = elem.style;
- var hidden = elem.nodeType && isHidden(elem);
- var dataShow = dataPriv.get(elem, "fxshow");
- for (prop in config.queue || (null == (hooks = jQuery._queueHooks(elem, "fx")).unqueued && (hooks.unqueued = 0, oldfire = hooks.empty.fire, hooks.empty.fire = function() {
- if (!hooks.unqueued) {
- oldfire();
- }
- }), hooks.unqueued++, anim.always(function() {
- anim.always(function() {
- hooks.unqueued--;
- if (!jQuery.queue(elem, "fx").length) {
- hooks.empty.fire();
- }
- });
- })), props) {
- if (value = props[prop], trueRE.test(value)) {
- if (delete props[prop], matched = matched || "toggle" === value, value === (hidden ? "hide" : "show")) {
- if ("show" !== value || !dataShow || void 0 === dataShow[prop]) {
- continue;
- }
- /** @type {boolean} */
- hidden = true;
- }
- orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
- }
- }
- if ((tween = !jQuery.isEmptyObject(props)) || !jQuery.isEmptyObject(orig)) {
- for (prop in f && 1 === elem.nodeType && (config.overflow = [style.overflow, style.overflowX, style.overflowY], null == (restoreDisplay = dataShow && dataShow.display) && (restoreDisplay = dataPriv.get(elem, "display")), "none" === (display = jQuery.css(elem, "display")) && (restoreDisplay ? display = restoreDisplay : (show([elem], true), restoreDisplay = elem.style.display || restoreDisplay, display = jQuery.css(elem, "display"), show([elem]))), ("inline" === display || "inline-block" ===
- display && null != restoreDisplay) && "none" === jQuery.css(elem, "float") && (tween || (anim.done(function() {
- style.display = restoreDisplay;
- }), null == restoreDisplay && (display = style.display, restoreDisplay = "none" === display ? "" : display)), style.display = "inline-block")), config.overflow && (style.overflow = "hidden", anim.always(function() {
- style.overflow = config.overflow[0];
- style.overflowX = config.overflow[1];
- style.overflowY = config.overflow[2];
- })), tween = false, orig) {
- if (!tween) {
- if (dataShow) {
- if ("hidden" in dataShow) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = dataPriv.access(elem, "fxshow", {
- display : restoreDisplay
- });
- }
- if (matched) {
- /** @type {boolean} */
- dataShow.hidden = !hidden;
- }
- if (hidden) {
- show([elem], true);
- }
- anim.done(function() {
- for (prop in hidden || show([elem]), dataPriv.remove(elem, "fxshow"), orig) {
- jQuery.style(elem, prop, orig[prop]);
- }
- });
- }
- tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
- if (!(prop in dataShow)) {
- dataShow[prop] = tween.start;
- if (hidden) {
- tween.end = tween.start;
- /** @type {number} */
- tween.start = 0;
- }
- }
- }
- }
- }],
- prefilter : function(callback, options) {
- if (options) {
- Animation.prefilters.unshift(callback);
- } else {
- Animation.prefilters.push(callback);
- }
- }
- });
- /**
- * @param {string} speed
- * @param {boolean} easing
- * @param {string} callback
- * @return {?}
- */
- jQuery.speed = function(speed, easing, callback) {
- var opt = speed && "object" == typeof speed ? jQuery.extend({}, speed) : {
- complete : callback || !callback && easing || fn(speed) && speed,
- duration : speed,
- easing : callback && easing || easing && !fn(easing) && easing
- };
- return jQuery.fx.off ? opt.duration = 0 : "number" != typeof opt.duration && (opt.duration in jQuery.fx.speeds ? opt.duration = jQuery.fx.speeds[opt.duration] : opt.duration = jQuery.fx.speeds._default), null != opt.queue && true !== opt.queue || (opt.queue = "fx"), opt.old = opt.complete, opt.complete = function() {
- if (fn(opt.old)) {
- opt.old.call(this);
- }
- if (opt.queue) {
- jQuery.dequeue(this, opt.queue);
- }
- }, opt;
- };
- jQuery.fn.extend({
- fadeTo : function(speed, to, callback, context) {
- return this.filter(isHidden).css("opacity", 0).show().end().animate({
- opacity : to
- }, speed, callback, context);
- },
- animate : function(prop, speed, easing, callback) {
- var empty = jQuery.isEmptyObject(prop);
- var optall = jQuery.speed(speed, easing, callback);
- /**
- * @return {undefined}
- */
- var doAnimation = function() {
- var anim = Animation(this, jQuery.extend({}, prop), optall);
- if (empty || dataPriv.get(this, "finish")) {
- anim.stop(true);
- }
- };
- return doAnimation.finish = doAnimation, empty || false === optall.queue ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
- },
- stop : function(type, n, e) {
- /**
- * @param {!Object} hooks
- * @return {undefined}
- */
- var stopQueue = function(hooks) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop(e);
- };
- return "string" != typeof type && (e = n, n = type, type = void 0), n && this.queue(type || "fx", []), this.each(function() {
- /** @type {boolean} */
- var boolToParent = true;
- /** @type {(boolean|string)} */
- var index = null != type && type + "queueHooks";
- /** @type {!Array} */
- var timers = jQuery.timers;
- var data = dataPriv.get(this);
- if (index) {
- if (data[index] && data[index].stop) {
- stopQueue(data[index]);
- }
- } else {
- for (index in data) {
- if (data[index] && data[index].stop && rrun.test(index)) {
- stopQueue(data[index]);
- }
- }
- }
- /** @type {number} */
- index = timers.length;
- for (; index--;) {
- if (!(timers[index].elem !== this || null != type && timers[index].queue !== type)) {
- timers[index].anim.stop(e);
- /** @type {boolean} */
- boolToParent = false;
- timers.splice(index, 1);
- }
- }
- if (!(!boolToParent && e)) {
- jQuery.dequeue(this, type);
- }
- });
- },
- finish : function(type) {
- return false !== type && (type = type || "fx"), this.each(function() {
- var index;
- var data = dataPriv.get(this);
- var queue = data[type + "queue"];
- var hooks = data[type + "queueHooks"];
- /** @type {!Array} */
- var timers = jQuery.timers;
- var length = queue ? queue.length : 0;
- /** @type {boolean} */
- data.finish = true;
- jQuery.queue(this, type, []);
- if (hooks && hooks.stop) {
- hooks.stop.call(this, true);
- }
- /** @type {number} */
- index = timers.length;
- for (; index--;) {
- if (timers[index].elem === this && timers[index].queue === type) {
- timers[index].anim.stop(true);
- timers.splice(index, 1);
- }
- }
- /** @type {number} */
- index = 0;
- for (; index < length; index++) {
- if (queue[index] && queue[index].finish) {
- queue[index].finish.call(this);
- }
- }
- delete data.finish;
- });
- }
- });
- jQuery.each(["toggle", "show", "hide"], function(canCreateDiscussions, name) {
- var cssFn = jQuery.fn[name];
- /**
- * @param {string} x
- * @param {boolean} callback
- * @param {string} options
- * @return {?}
- */
- jQuery.fn[name] = function(x, callback, options) {
- return null == x || "boolean" == typeof x ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), x, callback, options);
- };
- });
- jQuery.each({
- slideDown : genFx("show"),
- slideUp : genFx("hide"),
- slideToggle : genFx("toggle"),
- fadeIn : {
- opacity : "show"
- },
- fadeOut : {
- opacity : "hide"
- },
- fadeToggle : {
- opacity : "toggle"
- }
- }, function(original, props) {
- /**
- * @param {string} speed
- * @param {boolean} callback
- * @param {string} options
- * @return {?}
- */
- jQuery.fn[original] = function(speed, callback, options) {
- return this.animate(props, speed, callback, options);
- };
- });
- /** @type {!Array} */
- jQuery.timers = [];
- /**
- * @return {undefined}
- */
- jQuery.fx.tick = function() {
- var maxBet;
- /** @type {number} */
- var i = 0;
- /** @type {!Array} */
- var timers = jQuery.timers;
- /** @type {number} */
- fxNow = Date.now();
- for (; i < timers.length; i++) {
- if (!((maxBet = timers[i])() || timers[i] !== maxBet)) {
- timers.splice(i--, 1);
- }
- }
- if (!timers.length) {
- jQuery.fx.stop();
- }
- fxNow = void 0;
- };
- /**
- * @param {?} url
- * @return {undefined}
- */
- jQuery.fx.timer = function(url) {
- jQuery.timers.push(url);
- jQuery.fx.start();
- };
- /** @type {number} */
- jQuery.fx.interval = 13;
- /**
- * @return {undefined}
- */
- jQuery.fx.start = function() {
- if (!nt) {
- /** @type {boolean} */
- nt = true;
- step();
- }
- };
- /**
- * @return {undefined}
- */
- jQuery.fx.stop = function() {
- /** @type {null} */
- nt = null;
- };
- jQuery.fx.speeds = {
- slow : 600,
- fast : 200,
- _default : 400
- };
- /**
- * @param {!Object} b
- * @param {!Object} type
- * @return {?}
- */
- jQuery.fn.delay = function(b, type) {
- return b = jQuery.fx && jQuery.fx.speeds[b] || b, type = type || "fx", this.queue(type, function(show, incoming_item) {
- var cb = window.setTimeout(show, b);
- /**
- * @return {undefined}
- */
- incoming_item.stop = function() {
- window.clearTimeout(cb);
- };
- });
- };
- elem = document.createElement("input");
- opt = document.createElement("select").appendChild(document.createElement("option"));
- /** @type {string} */
- elem.type = "checkbox";
- /** @type {boolean} */
- support.checkOn = "" !== elem.value;
- support.optSelected = opt.selected;
- /** @type {string} */
- (elem = document.createElement("input")).value = "t";
- /** @type {string} */
- elem.type = "radio";
- /** @type {boolean} */
- support.radioValue = "t" === elem.value;
- var boolHook;
- var attrHandle = jQuery.expr.attrHandle;
- jQuery.fn.extend({
- attr : function(value, name) {
- return access(this, jQuery.attr, value, name, 1 < arguments.length);
- },
- removeAttr : function(name) {
- return this.each(function() {
- jQuery.removeAttr(this, name);
- });
- }
- });
- jQuery.extend({
- attr : function(elem, name, value) {
- var ret;
- var hooks;
- var type = elem.nodeType;
- if (3 !== type && 8 !== type && 2 !== type) {
- return "undefined" == typeof elem.getAttribute ? jQuery.prop(elem, name, value) : (1 === type && jQuery.isXMLDoc(elem) || (hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0)), void 0 !== value ? null === value ? void jQuery.removeAttr(elem, name) : hooks && "set" in hooks && void 0 !== (ret = hooks.set(elem, value, name)) ? ret : (elem.setAttribute(name, value + ""), value) : hooks && "get" in hooks && null !== (ret = hooks.get(elem, name)) ?
- ret : null == (ret = jQuery.find.attr(elem, name)) ? void 0 : ret);
- }
- },
- attrHooks : {
- type : {
- set : function(item, value) {
- if (!support.radioValue && "radio" === value && callback(item, "input")) {
- var n = item.value;
- return item.setAttribute("type", value), n && (item.value = n), value;
- }
- }
- }
- },
- removeAttr : function(elem, name) {
- var ATTR_MAXLENGTH;
- /** @type {number} */
- var callbackCount = 0;
- var callbackVals = name && name.match(re);
- if (callbackVals && 1 === elem.nodeType) {
- for (; ATTR_MAXLENGTH = callbackVals[callbackCount++];) {
- elem.removeAttribute(ATTR_MAXLENGTH);
- }
- }
- }
- });
- boolHook = {
- set : function(elem, value, name) {
- return false === value ? jQuery.removeAttr(elem, name) : elem.setAttribute(name, name), name;
- }
- };
- jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(canCreateDiscussions, name) {
- var callService$1 = attrHandle[name] || jQuery.find.attr;
- /**
- * @param {undefined} e
- * @param {string} t
- * @param {number} n
- * @return {?}
- */
- attrHandle[name] = function(e, t, n) {
- var ret;
- var handle;
- var lowercaseName = t.toLowerCase();
- return n || (handle = attrHandle[lowercaseName], attrHandle[lowercaseName] = ret, ret = null != callService$1(e, t, n) ? lowercaseName : null, attrHandle[lowercaseName] = handle), ret;
- };
- });
- /** @type {!RegExp} */
- var inputNodeNames = /^(?:input|select|textarea|button)$/i;
- /** @type {!RegExp} */
- var srsRegex = /^(?:a|area)$/i;
- jQuery.fn.extend({
- prop : function(type, value) {
- return access(this, jQuery.prop, type, value, 1 < arguments.length);
- },
- removeProp : function(name) {
- return this.each(function() {
- delete this[jQuery.propFix[name] || name];
- });
- }
- });
- jQuery.extend({
- prop : function(elem, name, value) {
- var ret;
- var hooks;
- var type = elem.nodeType;
- if (3 !== type && 8 !== type && 2 !== type) {
- return 1 === type && jQuery.isXMLDoc(elem) || (name = jQuery.propFix[name] || name, hooks = jQuery.propHooks[name]), void 0 !== value ? hooks && "set" in hooks && void 0 !== (ret = hooks.set(elem, value, name)) ? ret : elem[name] = value : hooks && "get" in hooks && null !== (ret = hooks.get(elem, name)) ? ret : elem[name];
- }
- },
- propHooks : {
- tabIndex : {
- get : function(target) {
- var b = jQuery.find.attr(target, "tabindex");
- return b ? parseInt(b, 10) : inputNodeNames.test(target.nodeName) || srsRegex.test(target.nodeName) && target.href ? 0 : -1;
- }
- }
- },
- propFix : {
- "for" : "htmlFor",
- "class" : "className"
- }
- });
- if (!support.optSelected) {
- jQuery.propHooks.selected = {
- get : function(e) {
- var elem = e.parentNode;
- return elem && elem.parentNode && elem.parentNode.selectedIndex, null;
- },
- set : function(e) {
- var elem = e.parentNode;
- if (elem) {
- elem.selectedIndex;
- if (elem.parentNode) {
- elem.parentNode.selectedIndex;
- }
- }
- }
- };
- }
- jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
- jQuery.propFix[this.toLowerCase()] = this;
- });
- jQuery.fn.extend({
- addClass : function(callback) {
- var result;
- var next;
- var i;
- var m;
- var k;
- var j;
- var a;
- /** @type {number} */
- var u = 0;
- if (fn(callback)) {
- return this.each(function(i) {
- jQuery(this).addClass(callback.call(this, i, $(this)));
- });
- }
- if ((result = clean(callback)).length) {
- for (; next = this[u++];) {
- if (m = $(next), i = 1 === next.nodeType && " " + merge(m) + " ") {
- /** @type {number} */
- j = 0;
- for (; k = result[j++];) {
- if (i.indexOf(" " + k + " ") < 0) {
- /** @type {string} */
- i = i + (k + " ");
- }
- }
- if (m !== (a = merge(i))) {
- next.setAttribute("class", a);
- }
- }
- }
- }
- return this;
- },
- removeClass : function(callback) {
- var result;
- var n;
- var f;
- var i;
- var activeObserveHandle;
- var j;
- var p;
- /** @type {number} */
- var u = 0;
- if (fn(callback)) {
- return this.each(function(i) {
- jQuery(this).removeClass(callback.call(this, i, $(this)));
- });
- }
- if (!arguments.length) {
- return this.attr("class", "");
- }
- if ((result = clean(callback)).length) {
- for (; n = this[u++];) {
- if (i = $(n), f = 1 === n.nodeType && " " + merge(i) + " ") {
- /** @type {number} */
- j = 0;
- for (; activeObserveHandle = result[j++];) {
- for (; -1 < f.indexOf(" " + activeObserveHandle + " ");) {
- /** @type {string} */
- f = f.replace(" " + activeObserveHandle + " ", " ");
- }
- }
- if (i !== (p = merge(f))) {
- n.setAttribute("class", p);
- }
- }
- }
- }
- return this;
- },
- toggleClass : function(value, stateVal) {
- /** @type {string} */
- var undefined = typeof value;
- /** @type {boolean} */
- var a = "string" === undefined || Array.isArray(value);
- return "boolean" == typeof stateVal && a ? stateVal ? this.addClass(value) : this.removeClass(value) : fn(value) ? this.each(function(i) {
- jQuery(this).toggleClass(value.call(this, i, $(this), stateVal), stateVal);
- }) : this.each(function() {
- var className;
- var pindex;
- var $body;
- var parts;
- if (a) {
- /** @type {number} */
- pindex = 0;
- $body = jQuery(this);
- parts = clean(value);
- for (; className = parts[pindex++];) {
- if ($body.hasClass(className)) {
- $body.removeClass(className);
- } else {
- $body.addClass(className);
- }
- }
- } else {
- if (!(void 0 !== value && "boolean" !== undefined)) {
- if (className = $(this)) {
- dataPriv.set(this, "__className__", className);
- }
- if (this.setAttribute) {
- this.setAttribute("class", className || false === value ? "" : dataPriv.get(this, "__className__") || "");
- }
- }
- }
- });
- },
- hasClass : function(elem) {
- var exactLanguageCode;
- var target;
- /** @type {number} */
- var r = 0;
- /** @type {string} */
- exactLanguageCode = " " + elem + " ";
- for (; target = this[r++];) {
- if (1 === target.nodeType && -1 < (" " + merge($(target)) + " ").indexOf(exactLanguageCode)) {
- return true;
- }
- }
- return false;
- }
- });
- /** @type {!RegExp} */
- var n = /\r/g;
- jQuery.fn.extend({
- val : function(v) {
- var hooks;
- var value;
- var raw;
- var elem = this[0];
- return arguments.length ? (raw = fn(v), this.each(function(a) {
- var val;
- if (1 === this.nodeType) {
- if (null == (val = raw ? v.call(this, a, jQuery(this).val()) : v)) {
- /** @type {string} */
- val = "";
- } else {
- if ("number" == typeof val) {
- /** @type {string} */
- val = val + "";
- } else {
- if (Array.isArray(val)) {
- val = jQuery.map(val, function(value) {
- return null == value ? "" : value + "";
- });
- }
- }
- }
- if (!((hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()]) && "set" in hooks && void 0 !== hooks.set(this, val, "value"))) {
- this.value = val;
- }
- }
- })) : elem ? (hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()]) && "get" in hooks && void 0 !== (value = hooks.get(elem, "value")) ? value : "string" == typeof(value = elem.value) ? value.replace(n, "") : null == value ? "" : value : void 0;
- }
- });
- jQuery.extend({
- valHooks : {
- option : {
- get : function(key) {
- var isInvalid = jQuery.find.attr(key, "value");
- return null != isInvalid ? isInvalid : merge(jQuery.text(key));
- }
- },
- select : {
- get : function(elm) {
- var value;
- var e;
- var i;
- var data = elm.options;
- var index = elm.selectedIndex;
- /** @type {boolean} */
- var one = "select-one" === elm.type;
- /** @type {(Array|null)} */
- var values = one ? null : [];
- var max = one ? index + 1 : data.length;
- i = index < 0 ? max : one ? index : 0;
- for (; i < max; i++) {
- if (((e = data[i]).selected || i === index) && !e.disabled && (!e.parentNode.disabled || !callback(e.parentNode, "optgroup"))) {
- if (value = jQuery(e).val(), one) {
- return value;
- }
- values.push(value);
- }
- }
- return values;
- },
- set : function(context, value) {
- var outputFn;
- var b;
- var a = context.options;
- var result = jQuery.makeArray(value);
- var i = a.length;
- for (; i--;) {
- if ((b = a[i]).selected = -1 < jQuery.inArray(jQuery.valHooks.option.get(b), result)) {
- /** @type {boolean} */
- outputFn = true;
- }
- }
- return outputFn || (context.selectedIndex = -1), result;
- }
- }
- }
- });
- jQuery.each(["radio", "checkbox"], function() {
- jQuery.valHooks[this] = {
- set : function(elem, value) {
- if (Array.isArray(value)) {
- return elem.checked = -1 < jQuery.inArray(jQuery(elem).val(), value);
- }
- }
- };
- if (!support.checkOn) {
- /**
- * @param {!Object} elem
- * @return {?}
- */
- jQuery.valHooks[this].get = function(elem) {
- return null === elem.getAttribute("value") ? "on" : elem.value;
- };
- }
- });
- /** @type {boolean} */
- support.focusin = "onfocusin" in window;
- /** @type {!RegExp} */
- var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
- /**
- * @param {!Event} e
- * @return {undefined}
- */
- var onInspectorMove = function(e) {
- e.stopPropagation();
- };
- jQuery.extend(jQuery.event, {
- trigger : function(event, value, elem, onlyHandlers) {
- var i;
- var cur;
- var tmp;
- var bubbleType;
- var ontype;
- var next;
- var special;
- var parent;
- /** @type {!Array} */
- var eventPath = [elem || document];
- var type = hasOwn.call(event, "type") ? event.type : event;
- var parts = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
- if (cur = parent = tmp = elem = elem || document, 3 !== elem.nodeType && 8 !== elem.nodeType && !rfocusMorph.test(type + jQuery.event.triggered) && (-1 < type.indexOf(".") && (type = (parts = type.split(".")).shift(), parts.sort()), ontype = type.indexOf(":") < 0 && "on" + type, (event = event[jQuery.expando] ? event : new jQuery.Event(type, "object" == typeof event && event)).isTrigger = onlyHandlers ? 2 : 3, event.namespace = parts.join("."), event.rnamespace = event.namespace ? new RegExp("(^|\\.)" +
- parts.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, event.result = void 0, event.target || (event.target = elem), value = null == value ? [event] : jQuery.makeArray(value, [event]), special = jQuery.event.special[type] || {}, onlyHandlers || !special.trigger || false !== special.trigger.apply(elem, value))) {
- if (!onlyHandlers && !special.noBubble && !isWindow(elem)) {
- bubbleType = special.delegateType || type;
- if (!rfocusMorph.test(bubbleType + type)) {
- cur = cur.parentNode;
- }
- for (; cur; cur = cur.parentNode) {
- eventPath.push(cur);
- tmp = cur;
- }
- if (tmp === (elem.ownerDocument || document)) {
- eventPath.push(tmp.defaultView || tmp.parentWindow || window);
- }
- }
- /** @type {number} */
- i = 0;
- for (; (cur = eventPath[i++]) && !event.isPropagationStopped();) {
- parent = cur;
- event.type = 1 < i ? bubbleType : special.bindType || type;
- if (next = (dataPriv.get(cur, "events") || Object.create(null))[event.type] && dataPriv.get(cur, "handle")) {
- next.apply(cur, value);
- }
- if ((next = ontype && cur[ontype]) && next.apply && acceptData(cur)) {
- event.result = next.apply(cur, value);
- if (false === event.result) {
- event.preventDefault();
- }
- }
- }
- return event.type = type, onlyHandlers || event.isDefaultPrevented() || special._default && false !== special._default.apply(eventPath.pop(), value) || !acceptData(elem) || ontype && fn(elem[type]) && !isWindow(elem) && ((tmp = elem[ontype]) && (elem[ontype] = null), jQuery.event.triggered = type, event.isPropagationStopped() && parent.addEventListener(type, onInspectorMove), elem[type](), event.isPropagationStopped() && parent.removeEventListener(type, onInspectorMove), jQuery.event.triggered =
- void 0, tmp && (elem[ontype] = tmp)), event.result;
- }
- },
- simulate : function(type, node, options) {
- var r = jQuery.extend(new jQuery.Event, options, {
- type : type,
- isSimulated : true
- });
- jQuery.event.trigger(r, null, node);
- }
- });
- jQuery.fn.extend({
- trigger : function(event, data) {
- return this.each(function() {
- jQuery.event.trigger(event, data, this);
- });
- },
- triggerHandler : function(type, data) {
- var parent = this[0];
- if (parent) {
- return jQuery.event.trigger(type, data, parent, true);
- }
- }
- });
- if (!support.focusin) {
- jQuery.each({
- focus : "focusin",
- blur : "focusout"
- }, function(type, name) {
- /**
- * @param {(Object|string)} event
- * @return {undefined}
- */
- var handler = function(event) {
- jQuery.event.simulate(name, event.target, jQuery.event.fix(event));
- };
- jQuery.event.special[name] = {
- setup : function() {
- var node = this.ownerDocument || this.document || this;
- var ownName = dataPriv.access(node, name);
- if (!ownName) {
- node.addEventListener(type, handler, true);
- }
- dataPriv.access(node, name, (ownName || 0) + 1);
- },
- teardown : function() {
- var elem = this.ownerDocument || this.document || this;
- /** @type {number} */
- var data = dataPriv.access(elem, name) - 1;
- if (data) {
- dataPriv.access(elem, name, data);
- } else {
- elem.removeEventListener(type, handler, true);
- dataPriv.remove(elem, name);
- }
- }
- };
- });
- }
- var location = window.location;
- var _enum = {
- guid : Date.now()
- };
- /** @type {!RegExp} */
- var rquery = /\?/;
- /**
- * @param {string} data
- * @return {?}
- */
- jQuery.parseXML = function(data) {
- var xml;
- if (!data || "string" != typeof data) {
- return null;
- }
- try {
- xml = (new window.DOMParser).parseFromString(data, "text/xml");
- } catch (e) {
- xml = void 0;
- }
- return xml && !xml.getElementsByTagName("parsererror").length || jQuery.error("Invalid XML: " + data), xml;
- };
- /** @type {!RegExp} */
- var reIsFile = /\[\]$/;
- /** @type {!RegExp} */
- var reVowels = /\r?\n/g;
- /** @type {!RegExp} */
- var reHasHexPrefix = /^(?:submit|button|image|reset|file)$/i;
- /** @type {!RegExp} */
- var rsubmittable = /^(?:input|select|textarea|keygen)/i;
- /**
- * @param {?} a
- * @param {string} obj
- * @return {?}
- */
- jQuery.param = function(a, obj) {
- var key;
- /** @type {!Array} */
- var displayUsedBy = [];
- /**
- * @param {?} e
- * @param {string} result
- * @return {undefined}
- */
- var add = function(e, result) {
- var value = fn(result) ? result() : result;
- /** @type {string} */
- displayUsedBy[displayUsedBy.length] = encodeURIComponent(e) + "=" + encodeURIComponent(null == value ? "" : value);
- };
- if (null == a) {
- return "";
- }
- if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
- jQuery.each(a, function() {
- add(this.name, this.value);
- });
- } else {
- for (key in a) {
- set(key, a[key], obj, add);
- }
- }
- return displayUsedBy.join("&");
- };
- jQuery.fn.extend({
- serialize : function() {
- return jQuery.param(this.serializeArray());
- },
- serializeArray : function() {
- return this.map(function() {
- var elements = jQuery.prop(this, "elements");
- return elements ? jQuery.makeArray(elements) : this;
- }).filter(function() {
- var string = this.type;
- return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !reHasHexPrefix.test(string) && (this.checked || !app.test(string));
- }).map(function(canCreateDiscussions, ctlParams) {
- var val = jQuery(this).val();
- return null == val ? null : Array.isArray(val) ? jQuery.map(val, function(val) {
- return {
- name : ctlParams.name,
- value : val.replace(reVowels, "\r\n")
- };
- }) : {
- name : ctlParams.name,
- value : val.replace(reVowels, "\r\n")
- };
- }).get();
- }
- });
- /** @type {!RegExp} */
- var jsre = /%20/g;
- /** @type {!RegExp} */
- var rhash = /#.*$/;
- /** @type {!RegExp} */
- var rts = /([?&])_=[^&]*/;
- /** @type {!RegExp} */
- var rheaders = /^(.*?):[ \t]*([^\r\n]*)$/gm;
- /** @type {!RegExp} */
- var loader = /^(?:GET|HEAD)$/;
- /** @type {!RegExp} */
- var rprotocol = /^\/\//;
- var prefilters = {};
- var transports = {};
- /** @type {string} */
- var It = "*/".concat("*");
- var originAnchor = document.createElement("a");
- originAnchor.href = location.href;
- jQuery.extend({
- active : 0,
- lastModified : {},
- etag : {},
- ajaxSettings : {
- url : location.href,
- type : "GET",
- isLocal : /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(location.protocol),
- global : true,
- processData : true,
- async : true,
- contentType : "application/x-www-form-urlencoded; charset=UTF-8",
- accepts : {
- "*" : It,
- text : "text/plain",
- html : "text/html",
- xml : "application/xml, text/xml",
- json : "application/json, text/javascript"
- },
- contents : {
- xml : /\bxml\b/,
- html : /\bhtml/,
- json : /\bjson\b/
- },
- responseFields : {
- xml : "responseXML",
- text : "responseText",
- json : "responseJSON"
- },
- converters : {
- "* text" : String,
- "text html" : true,
- "text json" : JSON.parse,
- "text xml" : jQuery.parseXML
- },
- flatOptions : {
- url : true,
- context : true
- }
- },
- ajaxSetup : function(target, settings) {
- return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target);
- },
- ajaxPrefilter : addToPrefiltersOrTransports(prefilters),
- ajaxTransport : addToPrefiltersOrTransports(transports),
- ajax : function(url, options) {
- /**
- * @param {number} status
- * @param {string} nativeStatusText
- * @param {!Array} responses
- * @param {string} headers
- * @return {undefined}
- */
- function done(status, nativeStatusText, responses, headers) {
- var isSuccess;
- var success;
- var error;
- var response;
- var modified;
- /** @type {string} */
- var statusText = nativeStatusText;
- if (!completed) {
- /** @type {boolean} */
- completed = true;
- if (showAboveTimeout) {
- window.clearTimeout(showAboveTimeout);
- }
- transport = void 0;
- responseHeadersString = headers || "";
- /** @type {number} */
- jqXHR.readyState = 0 < status ? 4 : 0;
- /** @type {boolean} */
- isSuccess = 200 <= status && status < 300 || 304 === status;
- if (responses) {
- response = function(s, ajaxRequest, responses) {
- var ct;
- var type;
- var finalDataType;
- var firstDataType;
- var contents = s.contents;
- var dataTypes = s.dataTypes;
- for (; "*" === dataTypes[0];) {
- dataTypes.shift();
- if (void 0 === ct) {
- ct = s.mimeType || ajaxRequest.getResponseHeader("Content-Type");
- }
- }
- if (ct) {
- for (type in contents) {
- if (contents[type] && contents[type].test(ct)) {
- dataTypes.unshift(type);
- break;
- }
- }
- }
- if (dataTypes[0] in responses) {
- finalDataType = dataTypes[0];
- } else {
- for (type in responses) {
- if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
- /** @type {string} */
- finalDataType = type;
- break;
- }
- if (!firstDataType) {
- /** @type {string} */
- firstDataType = type;
- }
- }
- /** @type {(string|undefined)} */
- finalDataType = finalDataType || firstDataType;
- }
- if (finalDataType) {
- return finalDataType !== dataTypes[0] && dataTypes.unshift(finalDataType), responses[finalDataType];
- }
- }(s, jqXHR, responses);
- }
- if (!isSuccess && -1 < jQuery.inArray("script", s.dataTypes)) {
- /**
- * @return {undefined}
- */
- s.converters["text script"] = function() {
- };
- }
- response = function(s, response, jqXHR, isSuccess) {
- var conv2;
- var current;
- var conv;
- var parts;
- var value;
- var converters = {};
- var resList = s.dataTypes.slice();
- if (resList[1]) {
- for (conv in s.converters) {
- converters[conv.toLowerCase()] = s.converters[conv];
- }
- }
- current = resList.shift();
- for (; current;) {
- if (s.responseFields[current] && (jqXHR[s.responseFields[current]] = response), !value && isSuccess && s.dataFilter && (response = s.dataFilter(response, s.dataType)), value = current, current = resList.shift()) {
- if ("*" === current) {
- current = value;
- } else {
- if ("*" !== value && value !== current) {
- if (!(conv = converters[value + " " + current] || converters["* " + current])) {
- for (conv2 in converters) {
- if ((parts = conv2.split(" "))[1] === current && (conv = converters[value + " " + parts[0]] || converters["* " + parts[0]])) {
- if (true === conv) {
- conv = converters[conv2];
- } else {
- if (true !== converters[conv2]) {
- /** @type {string} */
- current = parts[0];
- resList.unshift(parts[1]);
- }
- }
- break;
- }
- }
- }
- if (true !== conv) {
- if (conv && s["throws"]) {
- response = conv(response);
- } else {
- try {
- response = conv(response);
- } catch (e) {
- return {
- state : "parsererror",
- error : conv ? e : "No conversion from " + value + " to " + current
- };
- }
- }
- }
- }
- }
- }
- }
- return {
- state : "success",
- data : response
- };
- }(s, response, jqXHR, isSuccess);
- if (isSuccess) {
- if (s.ifModified) {
- if (modified = jqXHR.getResponseHeader("Last-Modified")) {
- jQuery.lastModified[cacheURL] = modified;
- }
- if (modified = jqXHR.getResponseHeader("etag")) {
- jQuery.etag[cacheURL] = modified;
- }
- }
- if (204 === status || "HEAD" === s.type) {
- /** @type {string} */
- statusText = "nocontent";
- } else {
- if (304 === status) {
- /** @type {string} */
- statusText = "notmodified";
- } else {
- statusText = response.state;
- success = response.data;
- /** @type {boolean} */
- isSuccess = !(error = response.error);
- }
- }
- } else {
- error = statusText;
- if (!(!status && statusText)) {
- /** @type {string} */
- statusText = "error";
- if (status < 0) {
- /** @type {number} */
- status = 0;
- }
- }
- }
- /** @type {number} */
- jqXHR.status = status;
- /** @type {string} */
- jqXHR.statusText = (nativeStatusText || statusText) + "";
- if (isSuccess) {
- deferred.resolveWith(obj, [success, statusText, jqXHR]);
- } else {
- deferred.rejectWith(obj, [jqXHR, statusText, error]);
- }
- jqXHR.statusCode(statusCode);
- statusCode = void 0;
- if (g) {
- globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, s, isSuccess ? success : error]);
- }
- completeDeferred.fireWith(obj, [jqXHR, statusText]);
- if (g) {
- globalEventContext.trigger("ajaxComplete", [jqXHR, s]);
- if (!--jQuery.active) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
- }
- if ("object" == typeof url) {
- /** @type {string} */
- options = url;
- url = void 0;
- }
- options = options || {};
- var transport;
- var cacheURL;
- var responseHeadersString;
- var marks;
- var showAboveTimeout;
- var urlAnchor;
- var completed;
- var g;
- var i;
- var uncached;
- var s = jQuery.ajaxSetup({}, options);
- var obj = s.context || s;
- var globalEventContext = s.context && (obj.nodeType || obj.jquery) ? jQuery(obj) : jQuery.event;
- var deferred = jQuery.Deferred();
- var completeDeferred = jQuery.Callbacks("once memory");
- var statusCode = s.statusCode || {};
- var data = {};
- var requestHeadersNames = {};
- /** @type {string} */
- var status = "canceled";
- var jqXHR = {
- readyState : 0,
- getResponseHeader : function(header) {
- var match;
- if (completed) {
- if (!marks) {
- marks = {};
- for (; match = rheaders.exec(responseHeadersString);) {
- marks[match[1].toLowerCase() + " "] = (marks[match[1].toLowerCase() + " "] || []).concat(match[2]);
- }
- }
- match = marks[header.toLowerCase() + " "];
- }
- return null == match ? null : match.join(", ");
- },
- getAllResponseHeaders : function() {
- return completed ? responseHeadersString : null;
- },
- setRequestHeader : function(name, value) {
- return null == completed && (name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name, data[name] = value), this;
- },
- overrideMimeType : function(type) {
- return null == completed && (s.mimeType = type), this;
- },
- statusCode : function(map) {
- var tmp;
- if (map) {
- if (completed) {
- jqXHR.always(map[jqXHR.status]);
- } else {
- for (tmp in map) {
- /** @type {!Array} */
- statusCode[tmp] = [statusCode[tmp], map[tmp]];
- }
- }
- }
- return this;
- },
- abort : function(type) {
- var statusText = type || status;
- return transport && transport.abort(statusText), done(0, statusText), this;
- }
- };
- if (deferred.promise(jqXHR), s.url = ((url || s.url || location.href) + "").replace(rprotocol, location.protocol + "//"), s.type = options.method || options.type || s.method || s.type, s.dataTypes = (s.dataType || "*").toLowerCase().match(re) || [""], null == s.crossDomain) {
- urlAnchor = document.createElement("a");
- try {
- /** @type {string} */
- urlAnchor.href = s.url;
- /** @type {string} */
- urlAnchor.href = urlAnchor.href;
- /** @type {boolean} */
- s.crossDomain = originAnchor.protocol + "//" + originAnchor.host != urlAnchor.protocol + "//" + urlAnchor.host;
- } catch (e) {
- /** @type {boolean} */
- s.crossDomain = true;
- }
- }
- if (s.data && s.processData && "string" != typeof s.data && (s.data = jQuery.param(s.data, s.traditional)), inspectPrefiltersOrTransports(prefilters, s, options, jqXHR), completed) {
- return jqXHR;
- }
- for (i in(g = jQuery.event && s.global) && 0 == jQuery.active++ && jQuery.event.trigger("ajaxStart"), s.type = s.type.toUpperCase(), s.hasContent = !loader.test(s.type), cacheURL = s.url.replace(rhash, ""), s.hasContent ? s.data && s.processData && 0 === (s.contentType || "").indexOf("application/x-www-form-urlencoded") && (s.data = s.data.replace(jsre, "+")) : (uncached = s.url.slice(cacheURL.length), s.data && (s.processData || "string" == typeof s.data) && (cacheURL = cacheURL + ((rquery.test(cacheURL) ?
- "&" : "?") + s.data), delete s.data), false === s.cache && (cacheURL = cacheURL.replace(rts, "$1"), uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + _enum.guid++ + uncached), s.url = cacheURL + uncached), s.ifModified && (jQuery.lastModified[cacheURL] && jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]), jQuery.etag[cacheURL] && jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL])), (s.data && s.hasContent && false !== s.contentType || options.contentType) &&
- jqXHR.setRequestHeader("Content-Type", s.contentType), jqXHR.setRequestHeader("Accept", s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + ("*" !== s.dataTypes[0] ? ", " + It + "; q=0.01" : "") : s.accepts["*"]), s.headers) {
- jqXHR.setRequestHeader(i, s.headers[i]);
- }
- if (s.beforeSend && (false === s.beforeSend.call(obj, jqXHR, s) || completed)) {
- return jqXHR.abort();
- }
- if (status = "abort", completeDeferred.add(s.complete), jqXHR.done(s.success), jqXHR.fail(s.error), transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR)) {
- if (jqXHR.readyState = 1, g && globalEventContext.trigger("ajaxSend", [jqXHR, s]), completed) {
- return jqXHR;
- }
- if (s.async && 0 < s.timeout) {
- showAboveTimeout = window.setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout);
- }
- try {
- /** @type {boolean} */
- completed = false;
- transport.send(data, done);
- } catch (success) {
- if (completed) {
- throw success;
- }
- done(-1, success);
- }
- } else {
- done(-1, "No Transport");
- }
- return jqXHR;
- },
- getJSON : function(name, callback, data) {
- return jQuery.get(name, callback, data, "json");
- },
- getScript : function(name, callback) {
- return jQuery.get(name, void 0, callback, "script");
- }
- });
- jQuery.each(["get", "post"], function(canCreateDiscussions, method) {
- /**
- * @param {!Object} url
- * @param {!Object} e
- * @param {!Function} s
- * @param {string} o
- * @return {?}
- */
- jQuery[method] = function(url, e, s, o) {
- return fn(e) && (o = o || s, s = e, e = void 0), jQuery.ajax(jQuery.extend({
- url : url,
- type : method,
- dataType : o,
- data : e,
- success : s
- }, jQuery.isPlainObject(url) && url));
- };
- });
- jQuery.ajaxPrefilter(function(settings) {
- var name;
- for (name in settings.headers) {
- if ("content-type" === name.toLowerCase()) {
- settings.contentType = settings.headers[name] || "";
- }
- }
- });
- /**
- * @param {string} value
- * @param {string} name
- * @param {!Object} url
- * @return {?}
- */
- jQuery._evalUrl = function(value, name, url) {
- return jQuery.ajax({
- url : value,
- type : "GET",
- dataType : "script",
- cache : true,
- async : false,
- global : false,
- converters : {
- "text script" : function() {
- }
- },
- dataFilter : function(text) {
- jQuery.globalEval(text, name, url);
- }
- });
- };
- jQuery.fn.extend({
- wrapAll : function(e) {
- var t;
- return this[0] && (fn(e) && (e = e.call(this[0])), t = jQuery(e, this[0].ownerDocument).eq(0).clone(true), this[0].parentNode && t.insertBefore(this[0]), t.map(function() {
- var elem = this;
- for (; elem.firstElementChild;) {
- elem = elem.firstElementChild;
- }
- return elem;
- }).append(this)), this;
- },
- wrapInner : function(wrapper) {
- return fn(wrapper) ? this.each(function(i) {
- jQuery(this).wrapInner(wrapper.call(this, i));
- }) : this.each(function() {
- var e = jQuery(this);
- var clone = e.contents();
- if (clone.length) {
- clone.wrapAll(wrapper);
- } else {
- e.append(wrapper);
- }
- });
- },
- wrap : function(html) {
- var isFunction = fn(html);
- return this.each(function(i) {
- jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
- });
- },
- unwrap : function(fn) {
- return this.parent(fn).not("body").each(function() {
- jQuery(this).replaceWith(this.childNodes);
- }), this;
- }
- });
- /**
- * @param {string} value
- * @return {?}
- */
- jQuery.expr.pseudos.hidden = function(value) {
- return !jQuery.expr.pseudos.visible(value);
- };
- /**
- * @param {!Element} elem
- * @return {?}
- */
- jQuery.expr.pseudos.visible = function(elem) {
- return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
- };
- /**
- * @return {?}
- */
- jQuery.ajaxSettings.xhr = function() {
- try {
- return new window.XMLHttpRequest;
- } catch (e) {
- }
- };
- var xhrSuccessStatus = {
- 0 : 200,
- 1223 : 204
- };
- var xhrSupported = jQuery.ajaxSettings.xhr();
- /** @type {boolean} */
- support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
- /** @type {boolean} */
- support.ajax = xhrSupported = !!xhrSupported;
- jQuery.ajaxTransport(function(s) {
- var callback;
- var errorCallback;
- if (support.cors || xhrSupported && !s.crossDomain) {
- return {
- send : function(headers, callback) {
- var i;
- var xhr = s.xhr();
- if (xhr.open(s.type, s.url, s.async, s.username, s.password), s.xhrFields) {
- for (i in s.xhrFields) {
- xhr[i] = s.xhrFields[i];
- }
- }
- for (i in s.mimeType && xhr.overrideMimeType && xhr.overrideMimeType(s.mimeType), s.crossDomain || headers["X-Requested-With"] || (headers["X-Requested-With"] = "XMLHttpRequest"), headers) {
- xhr.setRequestHeader(i, headers[i]);
- }
- /**
- * @param {string} event
- * @return {?}
- */
- callback = function(event) {
- return function() {
- if (callback) {
- /** @type {null} */
- callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
- if ("abort" === event) {
- xhr.abort();
- } else {
- if ("error" === event) {
- if ("number" != typeof xhr.status) {
- callback(0, "error");
- } else {
- callback(xhr.status, xhr.statusText);
- }
- } else {
- callback(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, "text" !== (xhr.responseType || "text") || "string" != typeof xhr.responseText ? {
- binary : xhr.response
- } : {
- text : xhr.responseText
- }, xhr.getAllResponseHeaders());
- }
- }
- }
- };
- };
- xhr.onload = callback();
- errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
- if (void 0 !== xhr.onabort) {
- xhr.onabort = errorCallback;
- } else {
- /**
- * @return {undefined}
- */
- xhr.onreadystatechange = function() {
- if (4 === xhr.readyState) {
- window.setTimeout(function() {
- if (callback) {
- errorCallback();
- }
- });
- }
- };
- }
- callback = callback("abort");
- try {
- xhr.send(s.hasContent && s.data || null);
- } catch (e) {
- if (callback) {
- throw e;
- }
- }
- },
- abort : function() {
- if (callback) {
- callback();
- }
- }
- };
- }
- });
- jQuery.ajaxPrefilter(function(options) {
- if (options.crossDomain) {
- /** @type {boolean} */
- options.contents.script = false;
- }
- });
- jQuery.ajaxSetup({
- accepts : {
- script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents : {
- script : /\b(?:java|ecma)script\b/
- },
- converters : {
- "text script" : function(value) {
- return jQuery.globalEval(value), value;
- }
- }
- });
- jQuery.ajaxPrefilter("script", function(settings) {
- if (void 0 === settings.cache) {
- /** @type {boolean} */
- settings.cache = false;
- }
- if (settings.crossDomain) {
- /** @type {string} */
- settings.type = "GET";
- }
- });
- jQuery.ajaxTransport("script", function(options) {
- var fileElem;
- var callback;
- if (options.crossDomain || options.scriptAttrs) {
- return {
- send : function(packets, callback) {
- fileElem = jQuery("<script>").attr(options.scriptAttrs || {}).prop({
- charset : options.scriptCharset,
- src : options.url
- }).on("load error", callback = function(result) {
- fileElem.remove();
- /** @type {null} */
- callback = null;
- if (result) {
- callback("error" === result.type ? 404 : 200, result.type);
- }
- });
- document.head.appendChild(fileElem[0]);
- },
- abort : function() {
- if (callback) {
- callback();
- }
- }
- };
- }
- });
- var summary;
- /** @type {!Array} */
- var oldCallbacks = [];
- /** @type {!RegExp} */
- var rjsonp = /(=)\?(?=&|$)|\?\?/;
- jQuery.ajaxSetup({
- jsonp : "callback",
- jsonpCallback : function() {
- var indexLookupKey = oldCallbacks.pop() || jQuery.expando + "_" + _enum.guid++;
- return this[indexLookupKey] = true, indexLookupKey;
- }
- });
- jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, scanners) {
- var callbackName;
- var overwritten;
- var responseContainer;
- /** @type {(boolean|string)} */
- var jsonProp = false !== s.jsonp && (rjsonp.test(s.url) ? "url" : "string" == typeof s.data && 0 === (s.contentType || "").indexOf("application/x-www-form-urlencoded") && rjsonp.test(s.data) && "data");
- if (jsonProp || "jsonp" === s.dataTypes[0]) {
- return callbackName = s.jsonpCallback = fn(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback, jsonProp ? s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName) : false !== s.jsonp && (s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName), s.converters["script json"] = function() {
- return responseContainer || jQuery.error(callbackName + " was not called"), responseContainer[0];
- }, s.dataTypes[0] = "json", overwritten = window[callbackName], window[callbackName] = function() {
- /** @type {!Arguments} */
- responseContainer = arguments;
- }, scanners.always(function() {
- if (void 0 === overwritten) {
- jQuery(window).removeProp(callbackName);
- } else {
- window[callbackName] = overwritten;
- }
- if (s[callbackName]) {
- s.jsonpCallback = originalSettings.jsonpCallback;
- oldCallbacks.push(callbackName);
- }
- if (responseContainer && fn(overwritten)) {
- overwritten(responseContainer[0]);
- }
- responseContainer = overwritten = void 0;
- }), "script";
- }
- });
- /** @type {boolean} */
- support.createHTMLDocument = ((summary = document.implementation.createHTMLDocument("").body).innerHTML = "<form></form><form></form>", 2 === summary.childNodes.length);
- /**
- * @param {string} data
- * @param {!Object} context
- * @param {!Function} keepScripts
- * @return {?}
- */
- jQuery.parseHTML = function(data, context, keepScripts) {
- return "string" != typeof data ? [] : ("boolean" == typeof context && (keepScripts = context, context = false), context || (support.createHTMLDocument ? ((target = (context = document.implementation.createHTMLDocument("")).createElement("base")).href = document.location.href, context.head.appendChild(target)) : context = document), scripts = !keepScripts && [], (parsed = rsingleTag.exec(data)) ? [context.createElement(parsed[1])] : (parsed = buildFragment([data], context, scripts), scripts &&
- scripts.length && jQuery(scripts).remove(), jQuery.merge([], parsed.childNodes)));
- var target;
- var parsed;
- var scripts;
- };
- /**
- * @param {string} result
- * @param {string} value
- * @param {string} callback
- * @return {?}
- */
- jQuery.fn.load = function(result, value, callback) {
- var selector;
- var method;
- var args;
- var self = this;
- var i = result.indexOf(" ");
- return -1 < i && (selector = merge(result.slice(i)), result = result.slice(0, i)), fn(value) ? (callback = value, value = void 0) : value && "object" == typeof value && (method = "POST"), 0 < self.length && jQuery.ajax({
- url : result,
- type : method || "GET",
- dataType : "html",
- data : value
- }).done(function(responseText) {
- /** @type {!Arguments} */
- args = arguments;
- self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText);
- }).always(callback && function(elem, document) {
- self.each(function() {
- callback.apply(this, args || [elem.responseText, document, elem]);
- });
- }), this;
- };
- /**
- * @param {?} elem
- * @return {?}
- */
- jQuery.expr.pseudos.animated = function(elem) {
- return jQuery.grep(jQuery.timers, function(fn) {
- return elem === fn.elem;
- }).length;
- };
- jQuery.offset = {
- setOffset : function(element, options, x) {
- var opt_boundsOrLeft;
- var width;
- var curCSSTop;
- var height;
- var curOffset;
- var curCSSLeft;
- var propertyName = jQuery.css(element, "position");
- var self = jQuery(element);
- var c = {};
- if ("static" === propertyName) {
- /** @type {string} */
- element.style.position = "relative";
- }
- curOffset = self.offset();
- curCSSTop = jQuery.css(element, "top");
- curCSSLeft = jQuery.css(element, "left");
- if (("absolute" === propertyName || "fixed" === propertyName) && -1 < (curCSSTop + curCSSLeft).indexOf("auto")) {
- height = (opt_boundsOrLeft = self.position()).top;
- width = opt_boundsOrLeft.left;
- } else {
- /** @type {number} */
- height = parseFloat(curCSSTop) || 0;
- /** @type {number} */
- width = parseFloat(curCSSLeft) || 0;
- }
- if (fn(options)) {
- options = options.call(element, x, jQuery.extend({}, curOffset));
- }
- if (null != options.top) {
- /** @type {number} */
- c.top = options.top - curOffset.top + height;
- }
- if (null != options.left) {
- /** @type {number} */
- c.left = options.left - curOffset.left + width;
- }
- if ("using" in options) {
- options.using.call(element, c);
- } else {
- if ("number" == typeof c.top) {
- c.top += "px";
- }
- if ("number" == typeof c.left) {
- c.left += "px";
- }
- self.css(c);
- }
- }
- };
- jQuery.fn.extend({
- offset : function(y) {
- if (arguments.length) {
- return void 0 === y ? this : this.each(function(i) {
- jQuery.offset.setOffset(this, y, i);
- });
- }
- var box;
- var win;
- var aTarget = this[0];
- return aTarget ? aTarget.getClientRects().length ? (box = aTarget.getBoundingClientRect(), win = aTarget.ownerDocument.defaultView, {
- top : box.top + win.pageYOffset,
- left : box.left + win.pageXOffset
- }) : {
- top : 0,
- left : 0
- } : void 0;
- },
- position : function() {
- if (this[0]) {
- var el;
- var offset;
- var node;
- var element = this[0];
- var parentOffset = {
- top : 0,
- left : 0
- };
- if ("fixed" === jQuery.css(element, "position")) {
- offset = element.getBoundingClientRect();
- } else {
- offset = this.offset();
- node = element.ownerDocument;
- el = element.offsetParent || node.documentElement;
- for (; el && (el === node.body || el === node.documentElement) && "static" === jQuery.css(el, "position");) {
- el = el.parentNode;
- }
- if (el && el !== element && 1 === el.nodeType) {
- (parentOffset = jQuery(el).offset()).top += jQuery.css(el, "borderTopWidth", true);
- parentOffset.left += jQuery.css(el, "borderLeftWidth", true);
- }
- }
- return {
- top : offset.top - parentOffset.top - jQuery.css(element, "marginTop", true),
- left : offset.left - parentOffset.left - jQuery.css(element, "marginLeft", true)
- };
- }
- },
- offsetParent : function() {
- return this.map(function() {
- var parent = this.offsetParent;
- for (; parent && "static" === jQuery.css(parent, "position");) {
- parent = parent.offsetParent;
- }
- return parent || node;
- });
- }
- });
- jQuery.each({
- scrollLeft : "pageXOffset",
- scrollTop : "pageYOffset"
- }, function(type, prop) {
- /** @type {boolean} */
- var top = "pageYOffset" === prop;
- /**
- * @param {?} value
- * @return {?}
- */
- jQuery.fn[type] = function(value) {
- return access(this, function(node, method, val) {
- var win;
- if (isWindow(node) ? win = node : 9 === node.nodeType && (win = node.defaultView), void 0 === val) {
- return win ? win[prop] : node[method];
- }
- if (win) {
- win.scrollTo(top ? win.pageXOffset : val, top ? val : win.pageYOffset);
- } else {
- /** @type {number} */
- node[method] = val;
- }
- }, type, value, arguments.length);
- };
- });
- jQuery.each(["top", "left"], function(canCreateDiscussions, prop) {
- jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function(elem, val) {
- if (val) {
- return val = curCSS(elem, prop), rnumnonpx.test(val) ? jQuery(elem).position()[prop] + "px" : val;
- }
- });
- });
- jQuery.each({
- Height : "height",
- Width : "width"
- }, function(name, type) {
- jQuery.each({
- padding : "inner" + name,
- content : type,
- "" : "outer" + name
- }, function(defaultExtra, type) {
- /**
- * @param {boolean} margin
- * @param {(number|string)} boardManager
- * @return {?}
- */
- jQuery.fn[type] = function(margin, boardManager) {
- var chainable = arguments.length && (defaultExtra || "boolean" != typeof margin);
- var extra = defaultExtra || (true === margin || true === boardManager ? "margin" : "border");
- return access(this, function(el, offset, undefined) {
- var doc;
- return isWindow(el) ? 0 === type.indexOf("outer") ? el["inner" + name] : el.document.documentElement["client" + name] : 9 === el.nodeType ? (doc = el.documentElement, Math.max(el.body["scroll" + name], doc["scroll" + name], el.body["offset" + name], doc["offset" + name], doc["client" + name])) : void 0 === undefined ? jQuery.css(el, offset, extra) : jQuery.style(el, offset, undefined, extra);
- }, type, chainable ? margin : void 0, chainable);
- };
- });
- });
- jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(canCreateDiscussions, type) {
- /**
- * @param {string} e
- * @return {?}
- */
- jQuery.fn[type] = function(e) {
- return this.on(type, e);
- };
- });
- jQuery.fn.extend({
- bind : function(event, callback, obj) {
- return this.on(event, null, callback, obj);
- },
- unbind : function(type, fn) {
- return this.off(type, null, fn);
- },
- delegate : function(eventHandler, event, fn, t) {
- return this.on(event, eventHandler, fn, t);
- },
- undelegate : function(selector, event, callback) {
- return 1 === arguments.length ? this.off(selector, "**") : this.off(event, selector || "**", callback);
- },
- hover : function(fnOver, fnOut) {
- return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
- }
- });
- jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(canCreateDiscussions, type) {
- /**
- * @param {!Object} callback
- * @param {!Object} obj
- * @return {?}
- */
- jQuery.fn[type] = function(callback, obj) {
- return 0 < arguments.length ? this.on(type, null, callback, obj) : this.trigger(type);
- };
- });
- /** @type {!RegExp} */
- var REGEX_ESCAPE_EXPR = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
- /**
- * @param {!Object} p
- * @param {!Object} c
- * @return {?}
- */
- jQuery.proxy = function(p, c) {
- var b;
- var headArgs;
- var proxyFn;
- if ("string" == typeof c && (b = p[c], c = p, p = b), fn(p)) {
- return headArgs = slice.call(arguments, 2), (proxyFn = function() {
- return p.apply(c || this, headArgs.concat(slice.call(arguments)));
- }).guid = p.guid = p.guid || jQuery.guid++, proxyFn;
- }
- };
- /**
- * @param {?} hold
- * @return {undefined}
- */
- jQuery.holdReady = function(hold) {
- if (hold) {
- jQuery.readyWait++;
- } else {
- jQuery.ready(true);
- }
- };
- /** @type {function(*): boolean} */
- jQuery.isArray = Array.isArray;
- /** @type {function(this:JSONType, string, function(string, *): *=): *} */
- jQuery.parseJSON = JSON.parse;
- /** @type {function(!Object, !Object): ?} */
- jQuery.nodeName = callback;
- /** @type {function(string): ?} */
- jQuery.isFunction = fn;
- /** @type {function(!Object): ?} */
- jQuery.isWindow = isWindow;
- /** @type {function(!Object): ?} */
- jQuery.camelCase = camelCase;
- /** @type {function(string): ?} */
- jQuery.type = type;
- /** @type {function(): number} */
- jQuery.now = Date.now;
- /**
- * @param {string} value
- * @return {?}
- */
- jQuery.isNumeric = function(value) {
- var undefined = jQuery.type(value);
- return ("number" === undefined || "string" === undefined) && !isNaN(value - parseFloat(value));
- };
- /**
- * @param {string} text
- * @return {?}
- */
- jQuery.trim = function(text) {
- return null == text ? "" : (text + "").replace(REGEX_ESCAPE_EXPR, "");
- };
- if ("function" == typeof define && define.amd) {
- define("jquery", [], function() {
- return jQuery;
- });
- }
- var _jQuery = window.jQuery;
- var old$ = window.$;
- return jQuery.noConflict = function(deep) {
- return window.$ === jQuery && (window.$ = old$), deep && window.jQuery === jQuery && (window.jQuery = _jQuery), jQuery;
- }, "undefined" == typeof start_column && (window.jQuery = window.$ = jQuery), jQuery;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement