circular-mirror 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/jquery.min.js DELETED
@@ -1,2628 +0,0 @@
1
- "use strict";
2
-
3
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4
-
5
- /*
6
- * jQuery JavaScript Library v1.4a2
7
- * http://jquery.com/
8
- *
9
- * Copyright (c) 2009 John Resig
10
- * Dual licensed under the MIT or GPL Version 2 licenses.
11
- * http://docs.jquery.com/License
12
- *
13
- * Date: Fri Dec 18 19:58:11 2009 -0500
14
- */
15
- (function (window, undefined) {
16
- var jQuery = function jQuery(selector, context) {
17
- return new jQuery.fn.init(selector, context);
18
- },
19
- _jQuery = window.jQuery,
20
- _$ = window.$,
21
- document = window.document,
22
- rootjQuery,
23
- quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
24
- isSimple = /^.[^:#\[\.,]*$/,
25
- rnotwhite = /\S/,
26
- rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
27
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
28
- userAgent = navigator.userAgent.toLowerCase(),
29
- readyBound = false,
30
- readyList = [],
31
- _DOMContentLoaded2,
32
- toString = Object.prototype.toString,
33
- hasOwnProperty = Object.prototype.hasOwnProperty,
34
- push = Array.prototype.push,
35
- _slice = Array.prototype.slice,
36
- indexOf = Array.prototype.indexOf;jQuery.fn = jQuery.prototype = { init: function init(selector, context) {
37
- var match, elem, ret, doc;if (!selector) {
38
- return this;
39
- }if (selector.nodeType) {
40
- this.context = this[0] = selector;this.length = 1;return this;
41
- }if (typeof selector === "string") {
42
- match = quickExpr.exec(selector);if (match && (match[1] || !context)) {
43
- if (match[1]) {
44
- doc = context ? context.ownerDocument || context : document;ret = rsingleTag.exec(selector);if (ret) {
45
- if (jQuery.isPlainObject(context)) {
46
- selector = [document.createElement(ret[1])];jQuery.fn.attr.call(selector, context, true);
47
- } else {
48
- selector = [doc.createElement(ret[1])];
49
- }
50
- } else {
51
- ret = buildFragment([match[1]], [doc]);selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
52
- }
53
- } else {
54
- elem = document.getElementById(match[2]);if (elem) {
55
- if (elem.id !== match[2]) {
56
- return rootjQuery.find(selector);
57
- }this.length = 1;this[0] = elem;
58
- }this.context = document;this.selector = selector;return this;
59
- }
60
- } else {
61
- if (!context && /^\w+$/.test(selector)) {
62
- this.selector = selector;this.context = document;selector = document.getElementsByTagName(selector);
63
- } else {
64
- if (!context || context.jquery) {
65
- return (context || rootjQuery).find(selector);
66
- } else {
67
- return jQuery(context).find(selector);
68
- }
69
- }
70
- }
71
- } else {
72
- if (jQuery.isFunction(selector)) {
73
- return rootjQuery.ready(selector);
74
- }
75
- }if (selector.selector !== undefined) {
76
- this.selector = selector.selector;this.context = selector.context;
77
- }return jQuery.isArray(selector) ? this.setArray(selector) : jQuery.makeArray(selector, this);
78
- }, selector: "", jquery: "1.4a2", length: 0, size: function size() {
79
- return this.length;
80
- }, toArray: function toArray() {
81
- return _slice.call(this, 0);
82
- }, get: function get(num) {
83
- return num == null ? this.toArray() : num < 0 ? this.slice(num)[0] : this[num];
84
- }, pushStack: function pushStack(elems, name, selector) {
85
- var ret = jQuery(elems || null);ret.prevObject = this;ret.context = this.context;if (name === "find") {
86
- ret.selector = this.selector + (this.selector ? " " : "") + selector;
87
- } else {
88
- if (name) {
89
- ret.selector = this.selector + "." + name + "(" + selector + ")";
90
- }
91
- }return ret;
92
- }, setArray: function setArray(elems) {
93
- this.length = 0;push.apply(this, elems);return this;
94
- }, each: function each(callback, args) {
95
- return jQuery.each(this, callback, args);
96
- }, ready: function ready(fn) {
97
- jQuery.bindReady();if (jQuery.isReady) {
98
- fn.call(document, jQuery);
99
- } else {
100
- if (readyList) {
101
- readyList.push(fn);
102
- }
103
- }return this;
104
- }, eq: function eq(i) {
105
- return i === -1 ? this.slice(i) : this.slice(i, +i + 1);
106
- }, first: function first() {
107
- return this.eq(0);
108
- }, last: function last() {
109
- return this.eq(-1);
110
- }, slice: function slice() {
111
- return this.pushStack(_slice.apply(this, arguments), "slice", _slice.call(arguments).join(","));
112
- }, map: function map(callback) {
113
- return this.pushStack(jQuery.map(this, function (elem, i) {
114
- return callback.call(elem, i, elem);
115
- }));
116
- }, end: function end() {
117
- return this.prevObject || jQuery(null);
118
- }, push: push, sort: [].sort, splice: [].splice };jQuery.fn.init.prototype = jQuery.fn;jQuery.extend = jQuery.fn.extend = function () {
119
- var target = arguments[0] || {},
120
- i = 1,
121
- length = arguments.length,
122
- deep = false,
123
- options,
124
- name,
125
- src,
126
- copy;if (typeof target === "boolean") {
127
- deep = target;target = arguments[1] || {};i = 2;
128
- }if ((typeof target === "undefined" ? "undefined" : _typeof(target)) !== "object" && !jQuery.isFunction(target)) {
129
- target = {};
130
- }if (length === i) {
131
- target = this;--i;
132
- }for (; i < length; i++) {
133
- if ((options = arguments[i]) != null) {
134
- for (name in options) {
135
- src = target[name];copy = options[name];if (target === copy) {
136
- continue;
137
- }if (deep && copy && jQuery.isPlainObject(copy)) {
138
- var clone = src && jQuery.isPlainObject(src) ? src : {};target[name] = jQuery.extend(deep, clone, copy);
139
- } else {
140
- if (copy !== undefined) {
141
- target[name] = copy;
142
- }
143
- }
144
- }
145
- }
146
- }return target;
147
- };jQuery.extend({ noConflict: function noConflict(deep) {
148
- window.$ = _$;if (deep) {
149
- window.jQuery = _jQuery;
150
- }return jQuery;
151
- }, isReady: false, ready: function ready() {
152
- if (!jQuery.isReady) {
153
- if (!document.body) {
154
- return setTimeout(jQuery.ready, 13);
155
- }jQuery.isReady = true;if (readyList) {
156
- var fn,
157
- i = 0;while (fn = readyList[i++]) {
158
- fn.call(document, jQuery);
159
- }readyList = null;
160
- }if (jQuery.fn.triggerHandler) {
161
- jQuery(document).triggerHandler("ready");
162
- }
163
- }
164
- }, bindReady: function bindReady() {
165
- if (readyBound) {
166
- return;
167
- }readyBound = true;if (document.readyState === "complete") {
168
- return jQuery.ready();
169
- }if (document.addEventListener) {
170
- document.addEventListener("DOMContentLoaded", _DOMContentLoaded2, false);window.addEventListener("load", jQuery.ready, false);
171
- } else {
172
- if (document.attachEvent) {
173
- document.attachEvent("onreadystatechange", _DOMContentLoaded2);window.attachEvent("onload", jQuery.ready);var toplevel = false;try {
174
- toplevel = window.frameElement == null;
175
- } catch (e) {}if (document.documentElement.doScroll && toplevel) {
176
- doScrollCheck();
177
- }
178
- }
179
- }
180
- }, isFunction: function isFunction(obj) {
181
- return toString.call(obj) === "[object Function]";
182
- }, isArray: function isArray(obj) {
183
- return toString.call(obj) === "[object Array]";
184
- }, isPlainObject: function isPlainObject(obj) {
185
- if (!obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval) {
186
- return false;
187
- }if (obj.constructor && !hasOwnProperty.call(obj, "constructor") && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
188
- return false;
189
- }var key;for (key in obj) {}return key === undefined || hasOwnProperty.call(obj, key);
190
- }, isEmptyObject: function isEmptyObject(obj) {
191
- for (var name in obj) {
192
- return false;
193
- }return true;
194
- }, globalEval: function globalEval(data) {
195
- if (data && rnotwhite.test(data)) {
196
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
197
- script = document.createElement("script");script.type = "text/javascript";if (jQuery.support.scriptEval) {
198
- script.appendChild(document.createTextNode(data));
199
- } else {
200
- script.text = data;
201
- }head.insertBefore(script, head.firstChild);head.removeChild(script);
202
- }
203
- }, nodeName: function nodeName(elem, name) {
204
- return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
205
- }, each: function each(object, callback, args) {
206
- var name,
207
- i = 0,
208
- length = object.length,
209
- isObj = length === undefined || jQuery.isFunction(object);if (args) {
210
- if (isObj) {
211
- for (name in object) {
212
- if (callback.apply(object[name], args) === false) {
213
- break;
214
- }
215
- }
216
- } else {
217
- for (; i < length;) {
218
- if (callback.apply(object[i++], args) === false) {
219
- break;
220
- }
221
- }
222
- }
223
- } else {
224
- if (isObj) {
225
- for (name in object) {
226
- if (callback.call(object[name], name, object[name]) === false) {
227
- break;
228
- }
229
- }
230
- } else {
231
- for (var value = object[0]; i < length && callback.call(value, i, value) !== false; value = object[++i]) {}
232
- }
233
- }return object;
234
- }, trim: function trim(text) {
235
- return (text || "").replace(rtrim, "");
236
- }, makeArray: function makeArray(array, results) {
237
- var ret = results || [];if (array != null) {
238
- if (array.length == null || typeof array === "string" || jQuery.isFunction(array) || typeof array !== "function" && array.setInterval) {
239
- push.call(ret, array);
240
- } else {
241
- jQuery.merge(ret, array);
242
- }
243
- }return ret;
244
- }, inArray: function inArray(elem, array) {
245
- if (array.indexOf) {
246
- return array.indexOf(elem);
247
- }for (var i = 0, length = array.length; i < length; i++) {
248
- if (array[i] === elem) {
249
- return i;
250
- }
251
- }return -1;
252
- }, merge: function merge(first, second) {
253
- var i = first.length,
254
- j = 0;if (typeof second.length === "number") {
255
- for (var l = second.length; j < l; j++) {
256
- first[i++] = second[j];
257
- }
258
- } else {
259
- while (second[j] !== undefined) {
260
- first[i++] = second[j++];
261
- }
262
- }first.length = i;return first;
263
- }, grep: function grep(elems, callback, inv) {
264
- var ret = [];for (var i = 0, length = elems.length; i < length; i++) {
265
- if (!inv !== !callback(elems[i], i)) {
266
- ret.push(elems[i]);
267
- }
268
- }return ret;
269
- }, map: function map(elems, callback, arg) {
270
- var ret = [],
271
- value;for (var i = 0, length = elems.length; i < length; i++) {
272
- value = callback(elems[i], i, arg);if (value != null) {
273
- ret[ret.length] = value;
274
- }
275
- }return ret.concat.apply([], ret);
276
- }, browser: { version: (/.*?(?:firefox|safari|opera|msie)[\/ ]([\d.]+)/.exec(userAgent) || [0, "0"])[1], safari: /safari/.test(userAgent), opera: /opera/.test(userAgent), msie: /msie/.test(userAgent) && !/opera/.test(userAgent), firefox: /firefox/.test(userAgent) } });jQuery.browser.mozilla = /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent);if (indexOf) {
277
- jQuery.inArray = function (elem, array) {
278
- return indexOf.call(array, elem);
279
- };
280
- }rootjQuery = jQuery(document);if (document.addEventListener) {
281
- _DOMContentLoaded2 = function DOMContentLoaded() {
282
- document.removeEventListener("DOMContentLoaded", _DOMContentLoaded2, false);jQuery.ready();
283
- };
284
- } else {
285
- if (document.attachEvent) {
286
- _DOMContentLoaded2 = function _DOMContentLoaded() {
287
- if (document.readyState === "complete") {
288
- document.detachEvent("onreadystatechange", _DOMContentLoaded2);jQuery.ready();
289
- }
290
- };
291
- }
292
- }function doScrollCheck() {
293
- if (jQuery.isReady) {
294
- return;
295
- }try {
296
- document.documentElement.doScroll("left");
297
- } catch (error) {
298
- setTimeout(doScrollCheck, 1);return;
299
- }jQuery.ready();
300
- }if (indexOf) {
301
- jQuery.inArray = function (elem, array) {
302
- return indexOf.call(array, elem);
303
- };
304
- }function evalScript(i, elem) {
305
- if (elem.src) {
306
- jQuery.ajax({ url: elem.src, async: false, dataType: "script" });
307
- } else {
308
- jQuery.globalEval(elem.text || elem.textContent || elem.innerHTML || "");
309
- }if (elem.parentNode) {
310
- elem.parentNode.removeChild(elem);
311
- }
312
- }function access(elems, key, value, exec, fn, pass) {
313
- var length = elems.length;if ((typeof key === "undefined" ? "undefined" : _typeof(key)) === "object") {
314
- for (var k in key) {
315
- access(elems, k, key[k], exec, fn, value);
316
- }return elems;
317
- }if (value !== undefined) {
318
- exec = exec && jQuery.isFunction(value);for (var i = 0; i < length; i++) {
319
- fn(elems[i], key, exec ? value.call(elems[i], i) : value, pass);
320
- }return elems;
321
- }return length ? fn(elems[0], key) : null;
322
- }function now() {
323
- return new Date().getTime();
324
- }(function () {
325
- jQuery.support = {};var root = document.documentElement,
326
- script = document.createElement("script"),
327
- div = document.createElement("div"),
328
- id = "script" + now();div.style.display = "none";div.innerHTML = ' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.55;">a</a><select><option>text</option></select>';var all = div.getElementsByTagName("*"),
329
- a = div.getElementsByTagName("a")[0];if (!all || !all.length || !a) {
330
- return;
331
- }jQuery.support = { leadingWhitespace: div.firstChild.nodeType == 3, tbody: !div.getElementsByTagName("tbody").length, htmlSerialize: !!div.getElementsByTagName("link").length, style: /red/.test(a.getAttribute("style")), hrefNormalized: a.getAttribute("href") === "/a", opacity: /^0.55$/.test(a.style.opacity), cssFloat: !!a.style.cssFloat, scriptEval: false, noCloneEvent: true, boxModel: null };script.type = "text/javascript";try {
332
- script.appendChild(document.createTextNode("window." + id + "=1;"));
333
- } catch (e) {}root.insertBefore(script, root.firstChild);if (window[id]) {
334
- jQuery.support.scriptEval = true;delete window[id];
335
- }root.removeChild(script);if (div.attachEvent && div.fireEvent) {
336
- div.attachEvent("onclick", function click() {
337
- jQuery.support.noCloneEvent = false;div.detachEvent("onclick", click);
338
- });div.cloneNode(true).fireEvent("onclick");
339
- }jQuery(function () {
340
- var div = document.createElement("div");div.style.width = div.style.paddingLeft = "1px";document.body.appendChild(div);jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;document.body.removeChild(div).style.display = "none";div = null;
341
- });var eventSupported = function eventSupported(eventName) {
342
- var el = document.createElement("div");eventName = "on" + eventName;var isSupported = eventName in el;if (!isSupported) {
343
- el.setAttribute(eventName, "return;");isSupported = typeof el[eventName] === "function";
344
- }el = null;return isSupported;
345
- };jQuery.support.submitBubbles = eventSupported("submit");jQuery.support.changeBubbles = eventSupported("change");jQuery.support.focusBubbles = eventSupported("focus");root = script = div = all = a = null;
346
- })();jQuery.props = { "for": "htmlFor", "class": "className", readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", colspan: "colSpan", tabindex: "tabIndex", usemap: "useMap", frameborder: "frameBorder" };var expando = "jQuery" + now(),
347
- uuid = 0,
348
- windowData = {};var emptyObject = {};jQuery.extend({ cache: {}, expando: expando, noData: { embed: true, object: true, applet: true }, data: function data(elem, name, _data) {
349
- if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) {
350
- return;
351
- }elem = elem == window ? windowData : elem;var id = elem[expando],
352
- cache = jQuery.cache,
353
- thisCache;if (!name && !id) {
354
- return null;
355
- }if (!id) {
356
- id = ++uuid;
357
- }if ((typeof name === "undefined" ? "undefined" : _typeof(name)) === "object") {
358
- elem[expando] = id;thisCache = cache[id] = jQuery.extend(true, {}, name);
359
- } else {
360
- if (cache[id]) {
361
- thisCache = cache[id];
362
- } else {
363
- if (typeof _data === "undefined") {
364
- thisCache = emptyObject;
365
- } else {
366
- thisCache = cache[id] = {};
367
- }
368
- }
369
- }if (_data !== undefined) {
370
- elem[expando] = id;thisCache[name] = _data;
371
- }return typeof name === "string" ? thisCache[name] : thisCache;
372
- }, removeData: function removeData(elem, name) {
373
- if (elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) {
374
- return;
375
- }elem = elem == window ? windowData : elem;var id = elem[expando],
376
- cache = jQuery.cache,
377
- thisCache = cache[id];if (name) {
378
- if (thisCache) {
379
- delete thisCache[name];if (jQuery.isEmptyObject(thisCache)) {
380
- jQuery.removeData(elem);
381
- }
382
- }
383
- } else {
384
- try {
385
- delete elem[expando];
386
- } catch (e) {
387
- if (elem.removeAttribute) {
388
- elem.removeAttribute(expando);
389
- }
390
- }delete cache[id];
391
- }
392
- } });jQuery.fn.extend({ data: function data(key, value) {
393
- if (typeof key === "undefined" && this.length) {
394
- return jQuery.data(this[0]);
395
- } else {
396
- if ((typeof key === "undefined" ? "undefined" : _typeof(key)) === "object") {
397
- return this.each(function () {
398
- jQuery.data(this, key);
399
- });
400
- }
401
- }var parts = key.split(".");parts[1] = parts[1] ? "." + parts[1] : "";if (value === undefined) {
402
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);if (data === undefined && this.length) {
403
- data = jQuery.data(this[0], key);
404
- }return data === undefined && parts[1] ? this.data(parts[0]) : data;
405
- } else {
406
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function () {
407
- jQuery.data(this, key, value);
408
- });
409
- }
410
- }, removeData: function removeData(key) {
411
- return this.each(function () {
412
- jQuery.removeData(this, key);
413
- });
414
- } });jQuery.extend({ queue: function queue(elem, type, data) {
415
- if (!elem) {
416
- return;
417
- }type = (type || "fx") + "queue";var q = jQuery.data(elem, type);if (!data) {
418
- return q || [];
419
- }if (!q || jQuery.isArray(data)) {
420
- q = jQuery.data(elem, type, jQuery.makeArray(data));
421
- } else {
422
- q.push(data);
423
- }return q;
424
- }, dequeue: function dequeue(elem, type) {
425
- type = type || "fx";var queue = jQuery.queue(elem, type),
426
- fn = queue.shift();if (fn === "inprogress") {
427
- fn = queue.shift();
428
- }if (fn) {
429
- if (type == "fx") {
430
- queue.unshift("inprogress");
431
- }fn.call(elem, function () {
432
- jQuery.dequeue(elem, type);
433
- });
434
- }
435
- } });jQuery.fn.extend({ queue: function queue(type, data) {
436
- if (typeof type !== "string") {
437
- data = type;type = "fx";
438
- }if (data === undefined) {
439
- return jQuery.queue(this[0], type);
440
- }return this.each(function (i, elem) {
441
- var queue = jQuery.queue(this, type, data);if (type == "fx" && queue[0] !== "inprogress") {
442
- jQuery.dequeue(this, type);
443
- }
444
- });
445
- }, dequeue: function dequeue(type) {
446
- return this.each(function () {
447
- jQuery.dequeue(this, type);
448
- });
449
- }, delay: function delay(time, type) {
450
- time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;type = type || "fx";return this.queue(type, function () {
451
- var elem = this;setTimeout(function () {
452
- jQuery.dequeue(elem, type);
453
- }, time);
454
- });
455
- }, clearQueue: function clearQueue(type) {
456
- return this.queue(type || "fx", []);
457
- } });jQuery.event = { add: function add(elem, types, handler, data) {
458
- if (elem.nodeType === 3 || elem.nodeType === 8) {
459
- return;
460
- }if (elem.setInterval && elem !== window && !elem.frameElement) {
461
- elem = window;
462
- }if (!handler.guid) {
463
- handler.guid = this.guid++;
464
- }if (data !== undefined) {
465
- var fn = handler;handler = this.proxy(fn);handler.data = data;
466
- }var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
467
- handle = jQuery.data(elem, "handle"),
468
- _eventHandle;if (!handle) {
469
- _eventHandle = function eventHandle() {
470
- return typeof jQuery !== "undefined" && !jQuery.event.triggered ? jQuery.event.handle.apply(_eventHandle.elem, arguments) : undefined;
471
- };handle = jQuery.data(elem, "handle", _eventHandle);
472
- }handle.elem = elem;types = types.split(/\s+/);var type,
473
- i = 0;while (type = types[i++]) {
474
- var namespaces = type.split(".");type = namespaces.shift();handler.type = namespaces.slice(0).sort().join(".");var handlers = events[type],
475
- special = this.special[type] || {};if (!handlers) {
476
- handlers = events[type] = {};if (!special.setup || special.setup.call(elem, data, namespaces, handler) === false) {
477
- if (elem.addEventListener) {
478
- elem.addEventListener(type, handle, false);
479
- } else {
480
- if (elem.attachEvent) {
481
- elem.attachEvent("on" + type, handle);
482
- }
483
- }
484
- }
485
- }if (special.add) {
486
- var modifiedHandler = special.add.call(elem, handler, data, namespaces, handlers);if (modifiedHandler && jQuery.isFunction(modifiedHandler)) {
487
- modifiedHandler.guid = modifiedHandler.guid || handler.guid;handler = modifiedHandler;
488
- }
489
- }handlers[handler.guid] = handler;this.global[type] = true;
490
- }elem = null;
491
- }, guid: 1, global: {}, remove: function remove(elem, types, handler) {
492
- if (elem.nodeType === 3 || elem.nodeType === 8) {
493
- return;
494
- }var events = jQuery.data(elem, "events"),
495
- ret,
496
- type,
497
- fn;if (events) {
498
- if (types === undefined || typeof types === "string" && types.charAt(0) === ".") {
499
- for (type in events) {
500
- this.remove(elem, type + (types || ""));
501
- }
502
- } else {
503
- if (types.type) {
504
- handler = types.handler;types = types.type;
505
- }types = types.split(/\s+/);var i = 0;while (type = types[i++]) {
506
- var namespaces = type.split(".");type = namespaces.shift();var all = !namespaces.length,
507
- cleaned = jQuery.map(namespaces.slice(0).sort(), function (nm) {
508
- return nm.replace(/[^\w\s\.\|`]/g, function (ch) {
509
- return "\\" + ch;
510
- });
511
- }),
512
- namespace = new RegExp("(^|\\.)" + cleaned.join("\\.(?:.*\\.)?") + "(\\.|$)"),
513
- special = this.special[type] || {};if (events[type]) {
514
- if (handler) {
515
- fn = events[type][handler.guid];delete events[type][handler.guid];
516
- } else {
517
- for (var handle in events[type]) {
518
- if (all || namespace.test(events[type][handle].type)) {
519
- delete events[type][handle];
520
- }
521
- }
522
- }if (special.remove) {
523
- special.remove.call(elem, namespaces, fn);
524
- }for (ret in events[type]) {
525
- break;
526
- }if (!ret) {
527
- if (!special.teardown || special.teardown.call(elem, namespaces) === false) {
528
- if (elem.removeEventListener) {
529
- elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
530
- } else {
531
- if (elem.detachEvent) {
532
- elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
533
- }
534
- }
535
- }ret = null;delete events[type];
536
- }
537
- }
538
- }
539
- }for (ret in events) {
540
- break;
541
- }if (!ret) {
542
- var handle = jQuery.data(elem, "handle");if (handle) {
543
- handle.elem = null;
544
- }jQuery.removeData(elem, "events");jQuery.removeData(elem, "handle");
545
- }
546
- }
547
- }, trigger: function trigger(event, data, elem) {
548
- var type = event.type || event,
549
- bubbling = arguments[3];if (!bubbling) {
550
- event = (typeof event === "undefined" ? "undefined" : _typeof(event)) === "object" ? event[expando] ? event : jQuery.extend(jQuery.Event(type), event) : jQuery.Event(type);if (type.indexOf("!") >= 0) {
551
- event.type = type = type.slice(0, -1);event.exclusive = true;
552
- }if (!elem) {
553
- event.stopPropagation();if (this.global[type]) {
554
- jQuery.each(jQuery.cache, function () {
555
- if (this.events && this.events[type]) {
556
- jQuery.event.trigger(event, data, this.handle.elem);
557
- }
558
- });
559
- }
560
- }if (!elem || elem.nodeType === 3 || elem.nodeType === 8) {
561
- return undefined;
562
- }event.result = undefined;event.target = elem;data = jQuery.makeArray(data);data.unshift(event);
563
- }event.currentTarget = elem;var handle = jQuery.data(elem, "handle");if (handle) {
564
- handle.apply(elem, data);
565
- }var nativeFn, nativeHandler;try {
566
- if (!(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()])) {
567
- nativeFn = elem[type];nativeHandler = elem["on" + type];
568
- }
569
- } catch (e) {}var isClick = jQuery.nodeName(elem, "a") && type === "click";if (!bubbling && nativeFn && !event.isDefaultPrevented() && !isClick) {
570
- this.triggered = true;try {
571
- elem[type]();
572
- } catch (e) {}
573
- } else {
574
- if (nativeHandler && elem["on" + type].apply(elem, data) === false) {
575
- event.result = false;
576
- }
577
- }this.triggered = false;if (!event.isPropagationStopped()) {
578
- var parent = elem.parentNode || elem.ownerDocument;if (parent) {
579
- jQuery.event.trigger(event, data, parent, true);
580
- }
581
- }
582
- }, handle: function handle(event) {
583
- var all, handlers;event = arguments[0] = jQuery.event.fix(event || window.event);event.currentTarget = this;var namespaces = event.type.split(".");event.type = namespaces.shift();all = !namespaces.length && !event.exclusive;var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");handlers = (jQuery.data(this, "events") || {})[event.type];for (var j in handlers) {
584
- var handler = handlers[j];if (all || namespace.test(handler.type)) {
585
- event.handler = handler;event.data = handler.data;var ret = handler.apply(this, arguments);if (ret !== undefined) {
586
- event.result = ret;if (ret === false) {
587
- event.preventDefault();event.stopPropagation();
588
- }
589
- }if (event.isImmediatePropagationStopped()) {
590
- break;
591
- }
592
- }
593
- }return event.result;
594
- }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function fix(event) {
595
- if (event[expando]) {
596
- return event;
597
- }var originalEvent = event;event = jQuery.Event(originalEvent);for (var i = this.props.length, prop; i;) {
598
- prop = this.props[--i];event[prop] = originalEvent[prop];
599
- }if (!event.target) {
600
- event.target = event.srcElement || document;
601
- }if (event.target.nodeType === 3) {
602
- event.target = event.target.parentNode;
603
- }if (!event.relatedTarget && event.fromElement) {
604
- event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
605
- }if (event.pageX == null && event.clientX != null) {
606
- var doc = document.documentElement,
607
- body = document.body;event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
608
- }if (!event.which && (event.charCode || event.charCode === 0 ? event.charCode : event.keyCode)) {
609
- event.which = event.charCode || event.keyCode;
610
- }if (!event.metaKey && event.ctrlKey) {
611
- event.metaKey = event.ctrlKey;
612
- }if (!event.which && event.button !== undefined) {
613
- event.which = event.button & 1 ? 1 : event.button & 2 ? 3 : event.button & 4 ? 2 : 0;
614
- }return event;
615
- }, proxy: function proxy(fn, _proxy, thisObject) {
616
- if (_proxy !== undefined && !jQuery.isFunction(_proxy)) {
617
- thisObject = _proxy;_proxy = undefined;
618
- }_proxy = _proxy || function () {
619
- return fn.apply(thisObject !== undefined ? thisObject : this, arguments);
620
- };_proxy.guid = fn.guid = fn.guid || _proxy.guid || this.guid++;return _proxy;
621
- }, special: { ready: { setup: jQuery.bindReady, teardown: function teardown() {} }, live: { add: function add(proxy, data, namespaces, live) {
622
- jQuery.extend(proxy, data || {});proxy.guid += data.selector + data.live;jQuery.event.add(this, data.live, liveHandler, data);
623
- }, remove: function remove(namespaces) {
624
- if (namespaces.length) {
625
- var remove = 0,
626
- name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");jQuery.each(jQuery.data(this, "events").live || {}, function () {
627
- if (name.test(this.type)) {
628
- remove++;
629
- }
630
- });if (remove < 1) {
631
- jQuery.event.remove(this, namespaces[0], liveHandler);
632
- }
633
- }
634
- }, special: {} }, beforeunload: { setup: function setup(data, namespaces, fn) {
635
- if (this.setInterval) {
636
- this.onbeforeunload = fn;
637
- }return false;
638
- }, teardown: function teardown(namespaces, fn) {
639
- if (this.onbeforeunload === fn) {
640
- this.onbeforeunload = null;
641
- }
642
- } } } };jQuery.Event = function (src) {
643
- if (!this.preventDefault) {
644
- return new jQuery.Event(src);
645
- }if (src && src.type) {
646
- this.originalEvent = src;this.type = src.type;
647
- } else {
648
- this.type = src;
649
- }this.timeStamp = now();this[expando] = true;
650
- };function returnFalse() {
651
- return false;
652
- }function returnTrue() {
653
- return true;
654
- }jQuery.Event.prototype = { preventDefault: function preventDefault() {
655
- this.isDefaultPrevented = returnTrue;var e = this.originalEvent;if (!e) {
656
- return;
657
- }if (e.preventDefault) {
658
- e.preventDefault();
659
- }e.returnValue = false;
660
- }, stopPropagation: function stopPropagation() {
661
- this.isPropagationStopped = returnTrue;var e = this.originalEvent;if (!e) {
662
- return;
663
- }if (e.stopPropagation) {
664
- e.stopPropagation();
665
- }e.cancelBubble = true;
666
- }, stopImmediatePropagation: function stopImmediatePropagation() {
667
- this.isImmediatePropagationStopped = returnTrue;this.stopPropagation();
668
- }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse };var withinElement = function withinElement(event) {
669
- var parent = event.relatedTarget;while (parent && parent != this) {
670
- try {
671
- parent = parent.parentNode;
672
- } catch (e) {
673
- break;
674
- }
675
- }if (parent != this) {
676
- event.type = event.data;jQuery.event.handle.apply(this, arguments);
677
- }
678
- },
679
- delegate = function delegate(event) {
680
- event.type = event.data;jQuery.event.handle.apply(this, arguments);
681
- };jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function (orig, fix) {
682
- jQuery.event.special[orig] = { setup: function setup(data) {
683
- jQuery.event.add(this, fix, data && data.selector ? delegate : withinElement, orig);
684
- }, teardown: function teardown(data) {
685
- jQuery.event.remove(this, fix, data && data.selector ? delegate : withinElement);
686
- } };
687
- });if (!jQuery.support.submitBubbles) {
688
- jQuery.event.special.submit = { setup: function setup(data, namespaces, fn) {
689
- if (this.nodeName.toLowerCase() !== "form") {
690
- jQuery.event.add(this, "click.specialSubmit." + fn.guid, function (e) {
691
- var elem = e.target,
692
- type = elem.type;if ((type === "submit" || type === "image") && jQuery(elem).closest("form").length) {
693
- return trigger("submit", this, arguments);
694
- }
695
- });jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function (e) {
696
- var elem = e.target,
697
- type = elem.type;if ((type === "text" || type === "password") && jQuery(elem).closest("form").length && e.keyCode === 13) {
698
- return trigger("submit", this, arguments);
699
- }
700
- });
701
- }
702
- }, remove: function remove(namespaces, fn) {
703
- jQuery.event.remove(this, "click.specialSubmit" + (fn ? "." + fn.guid : ""));jQuery.event.remove(this, "keypress.specialSubmit" + (fn ? "." + fn.guid : ""));
704
- } };
705
- }if (!jQuery.support.changeBubbles) {
706
- jQuery.event.special.change = { filters: { click: function click(e) {
707
- var elem = e.target;if (elem.nodeName.toLowerCase() === "input" && elem.type === "checkbox") {
708
- return trigger("change", this, arguments);
709
- }return changeFilters.keyup.call(this, e);
710
- }, keyup: function keyup(e) {
711
- var elem = e.target,
712
- data,
713
- index = elem.selectedIndex + "";if (elem.nodeName.toLowerCase() === "select") {
714
- data = jQuery.data(elem, "_change_data");jQuery.data(elem, "_change_data", index);if ((elem.type === "select-multiple" || data != null) && data !== index) {
715
- return trigger("change", this, arguments);
716
- }
717
- }
718
- }, beforeactivate: function beforeactivate(e) {
719
- var elem = e.target;if (elem.nodeName.toLowerCase() === "input" && elem.type === "radio" && !elem.checked) {
720
- return trigger("change", this, arguments);
721
- }
722
- }, blur: function blur(e) {
723
- var elem = e.target,
724
- nodeName = elem.nodeName.toLowerCase();if ((nodeName === "textarea" || nodeName === "input" && (elem.type === "text" || elem.type === "password")) && jQuery.data(elem, "_change_data") !== elem.value) {
725
- return trigger("change", this, arguments);
726
- }
727
- }, focus: function focus(e) {
728
- var elem = e.target,
729
- nodeName = elem.nodeName.toLowerCase();if (nodeName === "textarea" || nodeName === "input" && (elem.type === "text" || elem.type === "password")) {
730
- jQuery.data(elem, "_change_data", elem.value);
731
- }
732
- } }, setup: function setup(data, namespaces, fn) {
733
- for (var type in changeFilters) {
734
- jQuery.event.add(this, type + ".specialChange." + fn.guid, changeFilters[type]);
735
- }return false;
736
- }, remove: function remove(namespaces, fn) {
737
- for (var type in changeFilters) {
738
- jQuery.event.remove(this, type + ".specialChange" + (fn ? "." + fn.guid : ""), changeFilters[type]);
739
- }
740
- } };var changeFilters = jQuery.event.special.change.filters;
741
- }function trigger(type, elem, args) {
742
- args[0].type = type;return jQuery.event.handle.apply(elem, args);
743
- }if (!jQuery.support.focusBubbles) {
744
- jQuery.each({ focus: "focusin", blur: "focusout" }, function (orig, fix) {
745
- jQuery.event.special[orig] = { setup: function setup() {
746
- jQuery.event.add(this, fix, ieHandler);
747
- }, teardown: function teardown() {
748
- jQuery.event.remove(this, fix, ieHandler);
749
- } };function ieHandler() {
750
- arguments[0].type = orig;return jQuery.event.handle.apply(this, arguments);
751
- }
752
- });
753
- }jQuery.each(["bind", "one"], function (i, name) {
754
- jQuery.fn[name] = function (type, data, fn, thisObject) {
755
- if ((typeof type === "undefined" ? "undefined" : _typeof(type)) === "object") {
756
- for (var key in type) {
757
- this[name](key, data, type[key], fn);
758
- }return this;
759
- }if (jQuery.isFunction(data)) {
760
- thisObject = fn;fn = data;data = undefined;
761
- }fn = thisObject === undefined ? fn : jQuery.event.proxy(fn, thisObject);var handler = name == "one" ? jQuery.event.proxy(fn, function (event) {
762
- jQuery(this).unbind(event, handler);return fn.apply(this, arguments);
763
- }) : fn;return type === "unload" ? this.one(type, data, handler, thisObject) : this.each(function () {
764
- jQuery.event.add(this, type, handler, data);
765
- });
766
- };
767
- });jQuery.fn.extend({ unbind: function unbind(type, fn) {
768
- if ((typeof type === "undefined" ? "undefined" : _typeof(type)) === "object" && !type.preventDefault) {
769
- for (var key in type) {
770
- this.unbind(key, type[key]);
771
- }return this;
772
- }return this.each(function () {
773
- jQuery.event.remove(this, type, fn);
774
- });
775
- }, trigger: function trigger(type, data) {
776
- return this.each(function () {
777
- jQuery.event.trigger(type, data, this);
778
- });
779
- }, triggerHandler: function triggerHandler(type, data) {
780
- if (this[0]) {
781
- var event = jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event, data, this[0]);return event.result;
782
- }
783
- }, toggle: function toggle(fn) {
784
- var args = arguments,
785
- i = 1;while (i < args.length) {
786
- jQuery.event.proxy(fn, args[i++]);
787
- }return this.click(jQuery.event.proxy(fn, function (event) {
788
- var lastToggle = (jQuery.data(this, "lastToggle" + fn.guid) || 0) % i;jQuery.data(this, "lastToggle" + fn.guid, lastToggle + 1);event.preventDefault();return args[lastToggle].apply(this, arguments) || false;
789
- }));
790
- }, hover: function hover(fnOver, fnOut) {
791
- return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
792
- }, live: function live(type, data, fn, thisObject) {
793
- if (jQuery.isFunction(data)) {
794
- if (fn !== undefined) {
795
- thisObject = fn;
796
- }fn = data;data = undefined;
797
- }jQuery(this.context).bind(liveConvert(type, this.selector), { data: data, selector: this.selector, live: type }, fn, thisObject);return this;
798
- }, die: function die(type, fn) {
799
- jQuery(this.context).unbind(liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null);return this;
800
- } });function liveHandler(event) {
801
- var stop = true,
802
- elems = [],
803
- selectors = [],
804
- args = arguments,
805
- related,
806
- match,
807
- fn,
808
- elem,
809
- j,
810
- i,
811
- data,
812
- live = jQuery.extend({}, jQuery.data(this, "events").live);for (j in live) {
813
- fn = live[j];if (fn.live === event.type || fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1) {
814
- data = fn.data;if (!(data.beforeFilter && data.beforeFilter[event.type] && !data.beforeFilter[event.type](event))) {
815
- selectors.push(fn.selector);
816
- }
817
- } else {
818
- delete live[j];
819
- }
820
- }match = jQuery(event.target).closest(selectors, event.currentTarget);for (i = 0, l = match.length; i < l; i++) {
821
- for (j in live) {
822
- fn = live[j];elem = match[i].elem;related = null;if (match[i].selector === fn.selector) {
823
- if (fn.live === "mouseenter" || fn.live === "mouseleave") {
824
- related = jQuery(event.relatedTarget).closest(fn.selector)[0];
825
- }if (!related || related !== elem) {
826
- elems.push({ elem: elem, fn: fn });
827
- }
828
- }
829
- }
830
- }for (i = 0, l = elems.length; i < l; i++) {
831
- match = elems[i];event.currentTarget = match.elem;event.data = match.fn.data;if (match.fn.apply(match.elem, args) === false) {
832
- stop = false;break;
833
- }
834
- }return stop;
835
- }function liveConvert(type, selector) {
836
- return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "&")].join(".");
837
- }jQuery.each("blur focus load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "), function (i, name) {
838
- jQuery.fn[name] = function (fn) {
839
- return fn ? this.bind(name, fn) : this.trigger(name);
840
- };if (jQuery.fnAttr) {
841
- jQuery.fnAttr[name] = true;
842
- }
843
- });
844
- /*@cc_on
845
- window.attachEvent("onunload", function() {
846
- for ( var id in jQuery.cache ) {
847
- if ( jQuery.cache[ id ].handle ) {
848
- // Try/Catch is to handle iframes being unloaded, see #4280
849
- try {
850
- jQuery.event.remove( jQuery.cache[ id ].handle.elem );
851
- } catch(e) {}
852
- }
853
- }
854
- });
855
- @*/
856
- /*
857
- * Sizzle CSS Selector Engine - v1.0
858
- * Copyright 2009, The Dojo Foundation
859
- * Released under the MIT, BSD, and GPL Licenses.
860
- * More information: http://sizzlejs.com/
861
- */
862
- (function () {
863
- var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
864
- done = 0,
865
- toString = Object.prototype.toString,
866
- hasDuplicate = false,
867
- baseHasDuplicate = true;[0, 0].sort(function () {
868
- baseHasDuplicate = false;return 0;
869
- });var _Sizzle = function Sizzle(selector, context, results, seed) {
870
- results = results || [];var origContext = context = context || document;if (context.nodeType !== 1 && context.nodeType !== 9) {
871
- return [];
872
- }if (!selector || typeof selector !== "string") {
873
- return results;
874
- }var parts = [],
875
- m,
876
- set,
877
- checkSet,
878
- extra,
879
- prune = true,
880
- contextXML = isXML(context),
881
- soFar = selector;while ((chunker.exec(""), m = chunker.exec(soFar)) !== null) {
882
- soFar = m[3];parts.push(m[1]);if (m[2]) {
883
- extra = m[3];break;
884
- }
885
- }if (parts.length > 1 && origPOS.exec(selector)) {
886
- if (parts.length === 2 && Expr.relative[parts[0]]) {
887
- set = posProcess(parts[0] + parts[1], context);
888
- } else {
889
- set = Expr.relative[parts[0]] ? [context] : _Sizzle(parts.shift(), context);while (parts.length) {
890
- selector = parts.shift();if (Expr.relative[selector]) {
891
- selector += parts.shift();
892
- }set = posProcess(selector, set);
893
- }
894
- }
895
- } else {
896
- if (!seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1])) {
897
- var ret = _Sizzle.find(parts.shift(), context, contextXML);context = ret.expr ? _Sizzle.filter(ret.expr, ret.set)[0] : ret.set[0];
898
- }if (context) {
899
- var ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : _Sizzle.find(parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML);set = ret.expr ? _Sizzle.filter(ret.expr, ret.set) : ret.set;if (parts.length > 0) {
900
- checkSet = makeArray(set);
901
- } else {
902
- prune = false;
903
- }while (parts.length) {
904
- var cur = parts.pop(),
905
- pop = cur;if (!Expr.relative[cur]) {
906
- cur = "";
907
- } else {
908
- pop = parts.pop();
909
- }if (pop == null) {
910
- pop = context;
911
- }Expr.relative[cur](checkSet, pop, contextXML);
912
- }
913
- } else {
914
- checkSet = parts = [];
915
- }
916
- }if (!checkSet) {
917
- checkSet = set;
918
- }if (!checkSet) {
919
- throw "Syntax error, unrecognized expression: " + (cur || selector);
920
- }if (toString.call(checkSet) === "[object Array]") {
921
- if (!prune) {
922
- results.push.apply(results, checkSet);
923
- } else {
924
- if (context && context.nodeType === 1) {
925
- for (var i = 0; checkSet[i] != null; i++) {
926
- if (checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i]))) {
927
- results.push(set[i]);
928
- }
929
- }
930
- } else {
931
- for (var i = 0; checkSet[i] != null; i++) {
932
- if (checkSet[i] && checkSet[i].nodeType === 1) {
933
- results.push(set[i]);
934
- }
935
- }
936
- }
937
- }
938
- } else {
939
- makeArray(checkSet, results);
940
- }if (extra) {
941
- _Sizzle(extra, origContext, results, seed);_Sizzle.uniqueSort(results);
942
- }return results;
943
- };_Sizzle.uniqueSort = function (results) {
944
- if (sortOrder) {
945
- hasDuplicate = baseHasDuplicate;results.sort(sortOrder);if (hasDuplicate) {
946
- for (var i = 1; i < results.length; i++) {
947
- if (results[i] === results[i - 1]) {
948
- results.splice(i--, 1);
949
- }
950
- }
951
- }
952
- }return results;
953
- };_Sizzle.matches = function (expr, set) {
954
- return _Sizzle(expr, null, null, set);
955
- };_Sizzle.find = function (expr, context, isXML) {
956
- var set, match;if (!expr) {
957
- return [];
958
- }for (var i = 0, l = Expr.order.length; i < l; i++) {
959
- var type = Expr.order[i],
960
- match;if (match = Expr.leftMatch[type].exec(expr)) {
961
- var left = match[1];match.splice(1, 1);if (left.substr(left.length - 1) !== "\\") {
962
- match[1] = (match[1] || "").replace(/\\/g, "");set = Expr.find[type](match, context, isXML);if (set != null) {
963
- expr = expr.replace(Expr.match[type], "");break;
964
- }
965
- }
966
- }
967
- }if (!set) {
968
- set = context.getElementsByTagName("*");
969
- }return { set: set, expr: expr };
970
- };_Sizzle.filter = function (expr, set, inplace, not) {
971
- var old = expr,
972
- result = [],
973
- curLoop = set,
974
- match,
975
- anyFound,
976
- isXMLFilter = set && set[0] && isXML(set[0]);while (expr && set.length) {
977
- for (var type in Expr.filter) {
978
- if ((match = Expr.match[type].exec(expr)) != null) {
979
- var filter = Expr.filter[type],
980
- found,
981
- item;anyFound = false;if (curLoop == result) {
982
- result = [];
983
- }if (Expr.preFilter[type]) {
984
- match = Expr.preFilter[type](match, curLoop, inplace, result, not, isXMLFilter);if (!match) {
985
- anyFound = found = true;
986
- } else {
987
- if (match === true) {
988
- continue;
989
- }
990
- }
991
- }if (match) {
992
- for (var i = 0; (item = curLoop[i]) != null; i++) {
993
- if (item) {
994
- found = filter(item, match, i, curLoop);var pass = not ^ !!found;if (inplace && found != null) {
995
- if (pass) {
996
- anyFound = true;
997
- } else {
998
- curLoop[i] = false;
999
- }
1000
- } else {
1001
- if (pass) {
1002
- result.push(item);anyFound = true;
1003
- }
1004
- }
1005
- }
1006
- }
1007
- }if (found !== undefined) {
1008
- if (!inplace) {
1009
- curLoop = result;
1010
- }expr = expr.replace(Expr.match[type], "");if (!anyFound) {
1011
- return [];
1012
- }break;
1013
- }
1014
- }
1015
- }if (expr == old) {
1016
- if (anyFound == null) {
1017
- throw "Syntax error, unrecognized expression: " + expr;
1018
- } else {
1019
- break;
1020
- }
1021
- }old = expr;
1022
- }return curLoop;
1023
- };var Expr = _Sizzle.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function href(elem) {
1024
- return elem.getAttribute("href");
1025
- } }, relative: { "+": function _(checkSet, part) {
1026
- var isPartStr = typeof part === "string",
1027
- isTag = isPartStr && !/\W/.test(part),
1028
- isPartStrNotTag = isPartStr && !isTag;if (isTag) {
1029
- part = part.toLowerCase();
1030
- }for (var i = 0, l = checkSet.length, elem; i < l; i++) {
1031
- if (elem = checkSet[i]) {
1032
- while ((elem = elem.previousSibling) && elem.nodeType !== 1) {}checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part;
1033
- }
1034
- }if (isPartStrNotTag) {
1035
- _Sizzle.filter(part, checkSet, true);
1036
- }
1037
- }, ">": function _(checkSet, part) {
1038
- var isPartStr = typeof part === "string";if (isPartStr && !/\W/.test(part)) {
1039
- part = part.toLowerCase();for (var i = 0, l = checkSet.length; i < l; i++) {
1040
- var elem = checkSet[i];if (elem) {
1041
- var parent = elem.parentNode;checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
1042
- }
1043
- }
1044
- } else {
1045
- for (var i = 0, l = checkSet.length; i < l; i++) {
1046
- var elem = checkSet[i];if (elem) {
1047
- checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part;
1048
- }
1049
- }if (isPartStr) {
1050
- _Sizzle.filter(part, checkSet, true);
1051
- }
1052
- }
1053
- }, "": function _(checkSet, part) {
1054
- var doneName = done++,
1055
- checkFn = dirCheck;if (!/\W/.test(part)) {
1056
- var nodeCheck = part = part.toLowerCase();checkFn = dirNodeCheck;
1057
- }checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
1058
- }, "~": function _(checkSet, part) {
1059
- var doneName = done++,
1060
- checkFn = dirCheck;if (typeof part === "string" && !/\W/.test(part)) {
1061
- var nodeCheck = part = part.toLowerCase();checkFn = dirNodeCheck;
1062
- }checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
1063
- } }, find: { ID: function ID(match, context, isXML) {
1064
- if (typeof context.getElementById !== "undefined" && !isXML) {
1065
- var m = context.getElementById(match[1]);return m ? [m] : [];
1066
- }
1067
- }, NAME: function NAME(match, context) {
1068
- if (typeof context.getElementsByName !== "undefined") {
1069
- var ret = [],
1070
- results = context.getElementsByName(match[1]);for (var i = 0, l = results.length; i < l; i++) {
1071
- if (results[i].getAttribute("name") === match[1]) {
1072
- ret.push(results[i]);
1073
- }
1074
- }return ret.length === 0 ? null : ret;
1075
- }
1076
- }, TAG: function TAG(match, context) {
1077
- return context.getElementsByTagName(match[1]);
1078
- } }, preFilter: { CLASS: function CLASS(match, curLoop, inplace, result, not, isXML) {
1079
- match = " " + match[1].replace(/\\/g, "") + " ";if (isXML) {
1080
- return match;
1081
- }for (var i = 0, elem; (elem = curLoop[i]) != null; i++) {
1082
- if (elem) {
1083
- if (not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0)) {
1084
- if (!inplace) {
1085
- result.push(elem);
1086
- }
1087
- } else {
1088
- if (inplace) {
1089
- curLoop[i] = false;
1090
- }
1091
- }
1092
- }
1093
- }return false;
1094
- }, ID: function ID(match) {
1095
- return match[1].replace(/\\/g, "");
1096
- }, TAG: function TAG(match, curLoop) {
1097
- return match[1].toLowerCase();
1098
- }, CHILD: function CHILD(match) {
1099
- if (match[1] == "nth") {
1100
- var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" || !/\D/.test(match[2]) && "0n+" + match[2] || match[2]);match[2] = test[1] + (test[2] || 1) - 0;match[3] = test[3] - 0;
1101
- }match[0] = done++;return match;
1102
- }, ATTR: function ATTR(match, curLoop, inplace, result, not, isXML) {
1103
- var name = match[1].replace(/\\/g, "");if (!isXML && Expr.attrMap[name]) {
1104
- match[1] = Expr.attrMap[name];
1105
- }if (match[2] === "~=") {
1106
- match[4] = " " + match[4] + " ";
1107
- }return match;
1108
- }, PSEUDO: function PSEUDO(match, curLoop, inplace, result, not) {
1109
- if (match[1] === "not") {
1110
- if ((chunker.exec(match[3]) || "").length > 1 || /^\w/.test(match[3])) {
1111
- match[3] = _Sizzle(match[3], null, null, curLoop);
1112
- } else {
1113
- var ret = _Sizzle.filter(match[3], curLoop, inplace, true ^ not);if (!inplace) {
1114
- result.push.apply(result, ret);
1115
- }return false;
1116
- }
1117
- } else {
1118
- if (Expr.match.POS.test(match[0]) || Expr.match.CHILD.test(match[0])) {
1119
- return true;
1120
- }
1121
- }return match;
1122
- }, POS: function POS(match) {
1123
- match.unshift(true);return match;
1124
- } }, filters: { enabled: function enabled(elem) {
1125
- return elem.disabled === false && elem.type !== "hidden";
1126
- }, disabled: function disabled(elem) {
1127
- return elem.disabled === true;
1128
- }, checked: function checked(elem) {
1129
- return elem.checked === true;
1130
- }, selected: function selected(elem) {
1131
- elem.parentNode.selectedIndex;return elem.selected === true;
1132
- }, parent: function parent(elem) {
1133
- return !!elem.firstChild;
1134
- }, empty: function empty(elem) {
1135
- return !elem.firstChild;
1136
- }, has: function has(elem, i, match) {
1137
- return !!_Sizzle(match[3], elem).length;
1138
- }, header: function header(elem) {
1139
- return (/h\d/i.test(elem.nodeName)
1140
- );
1141
- }, text: function text(elem) {
1142
- return "text" === elem.type;
1143
- }, radio: function radio(elem) {
1144
- return "radio" === elem.type;
1145
- }, checkbox: function checkbox(elem) {
1146
- return "checkbox" === elem.type;
1147
- }, file: function file(elem) {
1148
- return "file" === elem.type;
1149
- }, password: function password(elem) {
1150
- return "password" === elem.type;
1151
- }, submit: function submit(elem) {
1152
- return "submit" === elem.type;
1153
- }, image: function image(elem) {
1154
- return "image" === elem.type;
1155
- }, reset: function reset(elem) {
1156
- return "reset" === elem.type;
1157
- }, button: function button(elem) {
1158
- return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
1159
- }, input: function input(elem) {
1160
- return (/input|select|textarea|button/i.test(elem.nodeName)
1161
- );
1162
- } }, setFilters: { first: function first(elem, i) {
1163
- return i === 0;
1164
- }, last: function last(elem, i, match, array) {
1165
- return i === array.length - 1;
1166
- }, even: function even(elem, i) {
1167
- return i % 2 === 0;
1168
- }, odd: function odd(elem, i) {
1169
- return i % 2 === 1;
1170
- }, lt: function lt(elem, i, match) {
1171
- return i < match[3] - 0;
1172
- }, gt: function gt(elem, i, match) {
1173
- return i > match[3] - 0;
1174
- }, nth: function nth(elem, i, match) {
1175
- return match[3] - 0 == i;
1176
- }, eq: function eq(elem, i, match) {
1177
- return match[3] - 0 == i;
1178
- } }, filter: { PSEUDO: function PSEUDO(elem, match, i, array) {
1179
- var name = match[1],
1180
- filter = Expr.filters[name];if (filter) {
1181
- return filter(elem, i, match, array);
1182
- } else {
1183
- if (name === "contains") {
1184
- return (elem.textContent || elem.innerText || getText([elem]) || "").indexOf(match[3]) >= 0;
1185
- } else {
1186
- if (name === "not") {
1187
- var not = match[3];for (var i = 0, l = not.length; i < l; i++) {
1188
- if (not[i] === elem) {
1189
- return false;
1190
- }
1191
- }return true;
1192
- }
1193
- }
1194
- }
1195
- }, CHILD: function CHILD(elem, match) {
1196
- var type = match[1],
1197
- node = elem;switch (type) {case "only":case "first":
1198
- while (node = node.previousSibling) {
1199
- if (node.nodeType === 1) {
1200
- return false;
1201
- }
1202
- }if (type == "first") {
1203
- return true;
1204
- }node = elem;case "last":
1205
- while (node = node.nextSibling) {
1206
- if (node.nodeType === 1) {
1207
- return false;
1208
- }
1209
- }return true;case "nth":
1210
- var first = match[2],
1211
- last = match[3];if (first == 1 && last == 0) {
1212
- return true;
1213
- }var doneName = match[0],
1214
- parent = elem.parentNode;if (parent && (parent.sizcache !== doneName || !elem.nodeIndex)) {
1215
- var count = 0;for (node = parent.firstChild; node; node = node.nextSibling) {
1216
- if (node.nodeType === 1) {
1217
- node.nodeIndex = ++count;
1218
- }
1219
- }parent.sizcache = doneName;
1220
- }var diff = elem.nodeIndex - last;if (first == 0) {
1221
- return diff == 0;
1222
- } else {
1223
- return diff % first == 0 && diff / first >= 0;
1224
- }}
1225
- }, ID: function ID(elem, match) {
1226
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
1227
- }, TAG: function TAG(elem, match) {
1228
- return match === "*" && elem.nodeType === 1 || elem.nodeName.toLowerCase() === match;
1229
- }, CLASS: function CLASS(elem, match) {
1230
- return (" " + (elem.className || elem.getAttribute("class")) + " ").indexOf(match) > -1;
1231
- }, ATTR: function ATTR(elem, match) {
1232
- var name = match[1],
1233
- result = Expr.attrHandle[name] ? Expr.attrHandle[name](elem) : elem[name] != null ? elem[name] : elem.getAttribute(name),
1234
- value = result + "",
1235
- type = match[2],
1236
- check = match[4];return result == null ? type === "!=" : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value != check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false;
1237
- }, POS: function POS(elem, match, i, array) {
1238
- var name = match[2],
1239
- filter = Expr.setFilters[name];if (filter) {
1240
- return filter(elem, i, match, array);
1241
- }
1242
- } } };var origPOS = Expr.match.POS;for (var type in Expr.match) {
1243
- Expr.match[type] = new RegExp(Expr.match[type].source + /(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type] = new RegExp(/(^(?:.|\r|\n)*?)/.source + Expr.match[type].source);
1244
- }var makeArray = function makeArray(array, results) {
1245
- array = Array.prototype.slice.call(array, 0);if (results) {
1246
- results.push.apply(results, array);return results;
1247
- }return array;
1248
- };try {
1249
- Array.prototype.slice.call(document.documentElement.childNodes, 0);
1250
- } catch (e) {
1251
- makeArray = function makeArray(array, results) {
1252
- var ret = results || [];if (toString.call(array) === "[object Array]") {
1253
- Array.prototype.push.apply(ret, array);
1254
- } else {
1255
- if (typeof array.length === "number") {
1256
- for (var i = 0, l = array.length; i < l; i++) {
1257
- ret.push(array[i]);
1258
- }
1259
- } else {
1260
- for (var i = 0; array[i]; i++) {
1261
- ret.push(array[i]);
1262
- }
1263
- }
1264
- }return ret;
1265
- };
1266
- }var sortOrder;if (document.documentElement.compareDocumentPosition) {
1267
- sortOrder = function sortOrder(a, b) {
1268
- if (!a.compareDocumentPosition || !b.compareDocumentPosition) {
1269
- if (a == b) {
1270
- hasDuplicate = true;
1271
- }return a.compareDocumentPosition ? -1 : 1;
1272
- }var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;if (ret === 0) {
1273
- hasDuplicate = true;
1274
- }return ret;
1275
- };
1276
- } else {
1277
- if ("sourceIndex" in document.documentElement) {
1278
- sortOrder = function sortOrder(a, b) {
1279
- if (!a.sourceIndex || !b.sourceIndex) {
1280
- if (a == b) {
1281
- hasDuplicate = true;
1282
- }return a.sourceIndex ? -1 : 1;
1283
- }var ret = a.sourceIndex - b.sourceIndex;if (ret === 0) {
1284
- hasDuplicate = true;
1285
- }return ret;
1286
- };
1287
- } else {
1288
- if (document.createRange) {
1289
- sortOrder = function sortOrder(a, b) {
1290
- if (!a.ownerDocument || !b.ownerDocument) {
1291
- if (a == b) {
1292
- hasDuplicate = true;
1293
- }return a.ownerDocument ? -1 : 1;
1294
- }var aRange = a.ownerDocument.createRange(),
1295
- bRange = b.ownerDocument.createRange();aRange.setStart(a, 0);aRange.setEnd(a, 0);bRange.setStart(b, 0);bRange.setEnd(b, 0);var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);if (ret === 0) {
1296
- hasDuplicate = true;
1297
- }return ret;
1298
- };
1299
- }
1300
- }
1301
- }function getText(elems) {
1302
- var ret = "",
1303
- elem;for (var i = 0; elems[i]; i++) {
1304
- elem = elems[i];if (elem.nodeType === 3 || elem.nodeType === 4) {
1305
- ret += elem.nodeValue;
1306
- } else {
1307
- if (elem.nodeType !== 8) {
1308
- ret += getText(elem.childNodes);
1309
- }
1310
- }
1311
- }return ret;
1312
- }(function () {
1313
- var form = document.createElement("div"),
1314
- id = "script" + new Date().getTime();form.innerHTML = "<a name='" + id + "'/>";var root = document.documentElement;root.insertBefore(form, root.firstChild);if (document.getElementById(id)) {
1315
- Expr.find.ID = function (match, context, isXML) {
1316
- if (typeof context.getElementById !== "undefined" && !isXML) {
1317
- var m = context.getElementById(match[1]);return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
1318
- }
1319
- };Expr.filter.ID = function (elem, match) {
1320
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");return elem.nodeType === 1 && node && node.nodeValue === match;
1321
- };
1322
- }root.removeChild(form);root = form = null;
1323
- })();(function () {
1324
- var div = document.createElement("div");div.appendChild(document.createComment(""));if (div.getElementsByTagName("*").length > 0) {
1325
- Expr.find.TAG = function (match, context) {
1326
- var results = context.getElementsByTagName(match[1]);if (match[1] === "*") {
1327
- var tmp = [];for (var i = 0; results[i]; i++) {
1328
- if (results[i].nodeType === 1) {
1329
- tmp.push(results[i]);
1330
- }
1331
- }results = tmp;
1332
- }return results;
1333
- };
1334
- }div.innerHTML = "<a href='#'></a>";if (div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#") {
1335
- Expr.attrHandle.href = function (elem) {
1336
- return elem.getAttribute("href", 2);
1337
- };
1338
- }div = null;
1339
- })();if (document.querySelectorAll) {
1340
- (function () {
1341
- var oldSizzle = _Sizzle,
1342
- div = document.createElement("div");div.innerHTML = "<p class='TEST'></p>";if (div.querySelectorAll && div.querySelectorAll(".TEST").length === 0) {
1343
- return;
1344
- }_Sizzle = function _Sizzle(query, context, extra, seed) {
1345
- context = context || document;if (!seed && context.nodeType === 9 && !isXML(context)) {
1346
- try {
1347
- return makeArray(context.querySelectorAll(query), extra);
1348
- } catch (e) {}
1349
- }return oldSizzle(query, context, extra, seed);
1350
- };for (var prop in oldSizzle) {
1351
- _Sizzle[prop] = oldSizzle[prop];
1352
- }div = null;
1353
- })();
1354
- }(function () {
1355
- var div = document.createElement("div");div.innerHTML = "<div class='test e'></div><div class='test'></div>";if (!div.getElementsByClassName || div.getElementsByClassName("e").length === 0) {
1356
- return;
1357
- }div.lastChild.className = "e";if (div.getElementsByClassName("e").length === 1) {
1358
- return;
1359
- }Expr.order.splice(1, 0, "CLASS");Expr.find.CLASS = function (match, context, isXML) {
1360
- if (typeof context.getElementsByClassName !== "undefined" && !isXML) {
1361
- return context.getElementsByClassName(match[1]);
1362
- }
1363
- };div = null;
1364
- })();function dirNodeCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
1365
- var sibDir = dir == "previousSibling" && !isXML;for (var i = 0, l = checkSet.length; i < l; i++) {
1366
- var elem = checkSet[i];if (elem) {
1367
- if (sibDir && elem.nodeType === 1) {
1368
- elem.sizcache = doneName;elem.sizset = i;
1369
- }elem = elem[dir];var match = false;while (elem) {
1370
- if (elem.sizcache === doneName) {
1371
- match = checkSet[elem.sizset];break;
1372
- }if (elem.nodeType === 1 && !isXML) {
1373
- elem.sizcache = doneName;elem.sizset = i;
1374
- }if (elem.nodeName.toLowerCase() === cur) {
1375
- match = elem;break;
1376
- }elem = elem[dir];
1377
- }checkSet[i] = match;
1378
- }
1379
- }
1380
- }function dirCheck(dir, cur, doneName, checkSet, nodeCheck, isXML) {
1381
- var sibDir = dir == "previousSibling" && !isXML;for (var i = 0, l = checkSet.length; i < l; i++) {
1382
- var elem = checkSet[i];if (elem) {
1383
- if (sibDir && elem.nodeType === 1) {
1384
- elem.sizcache = doneName;elem.sizset = i;
1385
- }elem = elem[dir];var match = false;while (elem) {
1386
- if (elem.sizcache === doneName) {
1387
- match = checkSet[elem.sizset];break;
1388
- }if (elem.nodeType === 1) {
1389
- if (!isXML) {
1390
- elem.sizcache = doneName;elem.sizset = i;
1391
- }if (typeof cur !== "string") {
1392
- if (elem === cur) {
1393
- match = true;break;
1394
- }
1395
- } else {
1396
- if (_Sizzle.filter(cur, [elem]).length > 0) {
1397
- match = elem;break;
1398
- }
1399
- }
1400
- }elem = elem[dir];
1401
- }checkSet[i] = match;
1402
- }
1403
- }
1404
- }var contains = document.compareDocumentPosition ? function (a, b) {
1405
- return a.compareDocumentPosition(b) & 16;
1406
- } : function (a, b) {
1407
- return a !== b && (a.contains ? a.contains(b) : true);
1408
- };var isXML = function isXML(elem) {
1409
- var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;return documentElement ? documentElement.nodeName !== "HTML" : false;
1410
- };var posProcess = function posProcess(selector, context) {
1411
- var tmpSet = [],
1412
- later = "",
1413
- match,
1414
- root = context.nodeType ? [context] : context;while (match = Expr.match.PSEUDO.exec(selector)) {
1415
- later += match[0];selector = selector.replace(Expr.match.PSEUDO, "");
1416
- }selector = Expr.relative[selector] ? selector + "*" : selector;for (var i = 0, l = root.length; i < l; i++) {
1417
- _Sizzle(selector, root[i], tmpSet);
1418
- }return _Sizzle.filter(later, tmpSet);
1419
- };jQuery.find = _Sizzle;jQuery.expr = _Sizzle.selectors;jQuery.expr[":"] = jQuery.expr.filters;jQuery.unique = _Sizzle.uniqueSort;jQuery.getText = getText;jQuery.isXMLDoc = isXML;jQuery.contains = contains;return;window.Sizzle = _Sizzle;
1420
- })();var runtil = /Until$/,
1421
- rparentsprev = /^(?:parents|prevUntil|prevAll)/,
1422
- rmultiselector = /,/,
1423
- _slice = Array.prototype.slice;var winnow = function winnow(elements, qualifier, keep) {
1424
- if (jQuery.isFunction(qualifier)) {
1425
- return jQuery.grep(elements, function (elem, i) {
1426
- return !!qualifier.call(elem, i, elem) === keep;
1427
- });
1428
- } else {
1429
- if (qualifier.nodeType) {
1430
- return jQuery.grep(elements, function (elem, i) {
1431
- return elem === qualifier === keep;
1432
- });
1433
- } else {
1434
- if (typeof qualifier === "string") {
1435
- var filtered = jQuery.grep(elements, function (elem) {
1436
- return elem.nodeType === 1;
1437
- });if (isSimple.test(qualifier)) {
1438
- return jQuery.filter(qualifier, filtered, !keep);
1439
- } else {
1440
- qualifier = jQuery.filter(qualifier, elements);
1441
- }
1442
- }
1443
- }
1444
- }return jQuery.grep(elements, function (elem, i) {
1445
- return jQuery.inArray(elem, qualifier) >= 0 === keep;
1446
- });
1447
- };jQuery.fn.extend({ find: function find(selector) {
1448
- var ret = this.pushStack("", "find", selector),
1449
- length = 0;for (var i = 0, l = this.length; i < l; i++) {
1450
- length = ret.length;jQuery.find(selector, this[i], ret);if (i > 0) {
1451
- for (var n = length; n < ret.length; n++) {
1452
- for (var r = 0; r < length; r++) {
1453
- if (ret[r] === ret[n]) {
1454
- ret.splice(n--, 1);break;
1455
- }
1456
- }
1457
- }
1458
- }
1459
- }return ret;
1460
- }, has: function has(target) {
1461
- var targets = jQuery(target);return this.filter(function () {
1462
- for (var i = 0, l = targets.length; i < l; i++) {
1463
- if (jQuery.contains(this, targets[i])) {
1464
- return true;
1465
- }
1466
- }
1467
- });
1468
- }, not: function not(selector) {
1469
- return this.pushStack(winnow(this, selector, false), "not", selector);
1470
- }, filter: function filter(selector) {
1471
- return this.pushStack(winnow(this, selector, true), "filter", selector);
1472
- }, is: function is(selector) {
1473
- return !!selector && jQuery.filter(selector, this).length > 0;
1474
- }, closest: function closest(selectors, context) {
1475
- if (jQuery.isArray(selectors)) {
1476
- var ret = [],
1477
- cur = this[0],
1478
- match,
1479
- matches = {},
1480
- selector;if (cur && selectors.length) {
1481
- for (var i = 0, l = selectors.length; i < l; i++) {
1482
- selector = selectors[i];if (!matches[selector]) {
1483
- matches[selector] = jQuery.expr.match.POS.test(selector) ? jQuery(selector, context || this.context) : selector;
1484
- }
1485
- }while (cur && cur.ownerDocument && cur !== context) {
1486
- for (selector in matches) {
1487
- match = matches[selector];if (match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match)) {
1488
- ret.push({ selector: selector, elem: cur });delete matches[selector];
1489
- }
1490
- }cur = cur.parentNode;
1491
- }
1492
- }return ret;
1493
- }var pos = jQuery.expr.match.POS.test(selectors) ? jQuery(selectors, context || this.context) : null;return this.map(function (i, cur) {
1494
- while (cur && cur.ownerDocument && cur !== context) {
1495
- if (pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors)) {
1496
- return cur;
1497
- }cur = cur.parentNode;
1498
- }return null;
1499
- });
1500
- }, index: function index(elem) {
1501
- if (!elem || typeof elem === "string") {
1502
- return jQuery.inArray(this[0], elem ? jQuery(elem) : this.parent().children());
1503
- }return jQuery.inArray(elem.jquery ? elem[0] : elem, this);
1504
- }, add: function add(selector, context) {
1505
- var set = typeof selector === "string" ? jQuery(selector, context || this.context) : jQuery.makeArray(selector),
1506
- all = jQuery.merge(this.get(), set);return this.pushStack(set[0] && (set[0].setInterval || set[0].nodeType === 9 || set[0].parentNode && set[0].parentNode.nodeType !== 11) ? jQuery.unique(all) : all);
1507
- }, andSelf: function andSelf() {
1508
- return this.add(this.prevObject);
1509
- } });jQuery.each({ parent: function parent(elem) {
1510
- var parent = elem.parentNode;return parent && parent.nodeType !== 11 ? parent : null;
1511
- }, parents: function parents(elem) {
1512
- return jQuery.dir(elem, "parentNode");
1513
- }, parentsUntil: function parentsUntil(elem, i, until) {
1514
- return jQuery.dir(elem, "parentNode", until);
1515
- }, next: function next(elem) {
1516
- return jQuery.nth(elem, 2, "nextSibling");
1517
- }, prev: function prev(elem) {
1518
- return jQuery.nth(elem, 2, "previousSibling");
1519
- }, nextAll: function nextAll(elem) {
1520
- return jQuery.dir(elem, "nextSibling");
1521
- }, prevAll: function prevAll(elem) {
1522
- return jQuery.dir(elem, "previousSibling");
1523
- }, nextUntil: function nextUntil(elem, i, until) {
1524
- return jQuery.dir(elem, "nextSibling", until);
1525
- }, prevUntil: function prevUntil(elem, i, until) {
1526
- return jQuery.dir(elem, "previousSibling", until);
1527
- }, siblings: function siblings(elem) {
1528
- return jQuery.sibling(elem.parentNode.firstChild, elem);
1529
- }, children: function children(elem) {
1530
- return jQuery.sibling(elem.firstChild);
1531
- }, contents: function contents(elem) {
1532
- return jQuery.nodeName(elem, "iframe") ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray(elem.childNodes);
1533
- } }, function (name, fn) {
1534
- jQuery.fn[name] = function (until, selector) {
1535
- var ret = jQuery.map(this, fn, until);if (!runtil.test(name)) {
1536
- selector = until;
1537
- }if (selector && typeof selector === "string") {
1538
- ret = jQuery.filter(selector, ret);
1539
- }ret = this.length > 1 ? jQuery.unique(ret) : ret;if ((this.length > 1 || rmultiselector.test(selector)) && rparentsprev.test(name)) {
1540
- ret = ret.reverse();
1541
- }return this.pushStack(ret, name, _slice.call(arguments).join(","));
1542
- };
1543
- });jQuery.extend({ filter: function filter(expr, elems, not) {
1544
- if (not) {
1545
- expr = ":not(" + expr + ")";
1546
- }return jQuery.find.matches(expr, elems);
1547
- }, dir: function dir(elem, _dir, until) {
1548
- var matched = [],
1549
- cur = elem[_dir];while (cur && cur.nodeType !== 9 && (until === undefined || !jQuery(cur).is(until))) {
1550
- if (cur.nodeType === 1) {
1551
- matched.push(cur);
1552
- }cur = cur[_dir];
1553
- }return matched;
1554
- }, nth: function nth(cur, result, dir, elem) {
1555
- result = result || 1;var num = 0;for (; cur; cur = cur[dir]) {
1556
- if (cur.nodeType === 1 && ++num === result) {
1557
- break;
1558
- }
1559
- }return cur;
1560
- }, sibling: function sibling(n, elem) {
1561
- var r = [];for (; n; n = n.nextSibling) {
1562
- if (n.nodeType === 1 && n !== elem) {
1563
- r.push(n);
1564
- }
1565
- }return r;
1566
- } });var rclass = /[\n\t]/g,
1567
- rspace = /\s+/,
1568
- rreturn = /\r/g,
1569
- rspecialurl = /href|src|style/,
1570
- rtype = /(button|input)/i,
1571
- rfocusable = /(button|input|object|select|textarea)/i,
1572
- rclickable = /^(a|area)$/i;jQuery.fn.extend({ attr: function attr(name, value) {
1573
- return access(this, name, value, true, jQuery.attr);
1574
- }, addClass: function addClass(value) {
1575
- if (jQuery.isFunction(value)) {
1576
- return this.each(function () {
1577
- jQuery(this).addClass(value.call(this));
1578
- });
1579
- }if (value && typeof value === "string") {
1580
- var classNames = (value || "").split(rspace);for (var i = 0, l = this.length; i < l; i++) {
1581
- var elem = this[i];if (elem.nodeType === 1) {
1582
- if (!elem.className) {
1583
- elem.className = value;
1584
- } else {
1585
- var className = " " + elem.className + " ";for (var c = 0, cl = classNames.length; c < cl; c++) {
1586
- if (className.indexOf(" " + classNames[c] + " ") < 0) {
1587
- elem.className += " " + classNames[c];
1588
- }
1589
- }
1590
- }
1591
- }
1592
- }
1593
- }return this;
1594
- }, removeClass: function removeClass(value) {
1595
- if (jQuery.isFunction(value)) {
1596
- return this.each(function () {
1597
- jQuery(this).removeClass(value.call(this));
1598
- });
1599
- }if (value && typeof value === "string" || value === undefined) {
1600
- var classNames = (value || "").split(rspace);for (var i = 0, l = this.length; i < l; i++) {
1601
- var elem = this[i];if (elem.nodeType === 1 && elem.className) {
1602
- if (value) {
1603
- var className = (" " + elem.className + " ").replace(rclass, " ");for (var c = 0, cl = classNames.length; c < cl; c++) {
1604
- className = className.replace(" " + classNames[c] + " ", " ");
1605
- }elem.className = className.substring(1, className.length - 1);
1606
- } else {
1607
- elem.className = "";
1608
- }
1609
- }
1610
- }
1611
- }return this;
1612
- }, hasClass: function hasClass(selector) {
1613
- var className = " " + selector + " ";for (var i = 0, l = this.length; i < l; i++) {
1614
- if ((" " + this[i].className + " ").replace(rclass, " ").indexOf(className) > -1) {
1615
- return true;
1616
- }
1617
- }return false;
1618
- }, val: function val(value) {
1619
- if (value === undefined) {
1620
- var elem = this[0];if (elem) {
1621
- if (jQuery.nodeName(elem, "option")) {
1622
- return (elem.attributes.value || {}).specified ? elem.value : elem.text;
1623
- }if (jQuery.nodeName(elem, "select")) {
1624
- var index = elem.selectedIndex,
1625
- values = [],
1626
- options = elem.options,
1627
- one = elem.type === "select-one";if (index < 0) {
1628
- return null;
1629
- }for (var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++) {
1630
- var option = options[i];if (option.selected) {
1631
- value = jQuery(option).val();if (one) {
1632
- return value;
1633
- }values.push(value);
1634
- }
1635
- }return values;
1636
- }return (elem.value || "").replace(rreturn, "");
1637
- }return undefined;
1638
- }if (typeof value === "number") {
1639
- value += "";
1640
- }var val = value;return this.each(function () {
1641
- if (jQuery.isFunction(value)) {
1642
- val = value.call(this);if (typeof val === "number") {
1643
- val += "";
1644
- }
1645
- }if (this.nodeType !== 1) {
1646
- return;
1647
- }if (jQuery.isArray(val) && /radio|checkbox/.test(this.type)) {
1648
- this.checked = jQuery.inArray(this.value || this.name, val) >= 0;
1649
- } else {
1650
- if (jQuery.nodeName(this, "select")) {
1651
- var values = jQuery.makeArray(val);jQuery("option", this).each(function () {
1652
- this.selected = jQuery.inArray(this.value || this.text, values) >= 0;
1653
- });if (!values.length) {
1654
- this.selectedIndex = -1;
1655
- }
1656
- } else {
1657
- this.value = val;
1658
- }
1659
- }
1660
- });
1661
- } });jQuery.each({ removeAttr: function removeAttr(name) {
1662
- jQuery.attr(this, name, "");if (this.nodeType === 1) {
1663
- this.removeAttribute(name);
1664
- }
1665
- }, toggleClass: function toggleClass(classNames, state) {
1666
- var type = typeof classNames === "undefined" ? "undefined" : _typeof(classNames);if (type === "string") {
1667
- var isBool = typeof state === "boolean",
1668
- className,
1669
- i = 0,
1670
- classNames = classNames.split(rspace);while (className = classNames[i++]) {
1671
- state = isBool ? state : !jQuery(this).hasClass(className);jQuery(this)[state ? "addClass" : "removeClass"](className);
1672
- }
1673
- } else {
1674
- if (type === "undefined" || type === "boolean") {
1675
- if (this.className) {
1676
- jQuery.data(this, "__className__", this.className);
1677
- }this.className = this.className || classNames === false ? "" : jQuery.data(this, "__className__") || "";
1678
- }
1679
- }
1680
- } }, function (name, fn) {
1681
- jQuery.fn[name] = function (val, state) {
1682
- if (jQuery.isFunction(val)) {
1683
- return this.each(function () {
1684
- jQuery(this)[name](val.call(this), state);
1685
- });
1686
- }return this.each(fn, arguments);
1687
- };
1688
- });jQuery.extend({ attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function attr(elem, name, value, pass) {
1689
- if (!elem || elem.nodeType === 3 || elem.nodeType === 8) {
1690
- return undefined;
1691
- }if (pass && name in jQuery.attrFn) {
1692
- return jQuery(elem)[name](value);
1693
- }var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc(elem),
1694
- set = value !== undefined;name = notxml && jQuery.props[name] || name;if (elem.nodeType === 1) {
1695
- var special = rspecialurl.test(name);if (name === "selected" && elem.parentNode) {
1696
- elem.parentNode.selectedIndex;
1697
- }if (name in elem && notxml && !special) {
1698
- if (set) {
1699
- if (name === "type" && rtype.test(elem.nodeName) && elem.parentNode) {
1700
- throw "type property can't be changed";
1701
- }elem[name] = value;
1702
- }if (jQuery.nodeName(elem, "form") && elem.getAttributeNode(name)) {
1703
- return elem.getAttributeNode(name).nodeValue;
1704
- }if (name === "tabIndex") {
1705
- var attributeNode = elem.getAttributeNode("tabIndex");return attributeNode && attributeNode.specified ? attributeNode.value : rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href ? 0 : undefined;
1706
- }return elem[name];
1707
- }if (!jQuery.support.style && notxml && name === "style") {
1708
- if (set) {
1709
- elem.style.cssText = "" + value;
1710
- }return elem.style.cssText;
1711
- }if (set) {
1712
- elem.setAttribute(name, "" + value);
1713
- }var attr = !jQuery.support.hrefNormalized && notxml && special ? elem.getAttribute(name, 2) : elem.getAttribute(name);return attr === null ? undefined : attr;
1714
- }return jQuery.style(elem, name, value);
1715
- } });var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
1716
- rleadingWhitespace = /^\s+/,
1717
- rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
1718
- rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
1719
- rtagName = /<([\w:]+)/,
1720
- rtbody = /<tbody/i,
1721
- rhtml = /<|&\w+;/,
1722
- fcloseTag = function fcloseTag(all, front, tag) {
1723
- return rselfClosing.test(tag) ? all : front + "></" + tag + ">";
1724
- },
1725
- wrapMap = { option: [1, "<select multiple='multiple'>", "</select>"], legend: [1, "<fieldset>", "</fieldset>"], thead: [1, "<table>", "</table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], area: [1, "<map>", "</map>"], _default: [0, "", ""] };wrapMap.optgroup = wrapMap.option;wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;wrapMap.th = wrapMap.td;if (!jQuery.support.htmlSerialize) {
1726
- wrapMap._default = [1, "div<div>", "</div>"];
1727
- }jQuery.fn.extend({ text: function text(_text) {
1728
- if (jQuery.isFunction(_text)) {
1729
- return this.each(function () {
1730
- return jQuery(this).text(_text.call(this));
1731
- });
1732
- }if ((typeof _text === "undefined" ? "undefined" : _typeof(_text)) !== "object" && _text !== undefined) {
1733
- return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(_text));
1734
- }return jQuery.getText(this);
1735
- }, wrapAll: function wrapAll(html) {
1736
- if (jQuery.isFunction(html)) {
1737
- return this.each(function () {
1738
- jQuery(this).wrapAll(html.apply(this, arguments));
1739
- });
1740
- }if (this[0]) {
1741
- var wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);if (this[0].parentNode) {
1742
- wrap.insertBefore(this[0]);
1743
- }wrap.map(function () {
1744
- var elem = this;while (elem.firstChild && elem.firstChild.nodeType === 1) {
1745
- elem = elem.firstChild;
1746
- }return elem;
1747
- }).append(this);
1748
- }return this;
1749
- }, wrapInner: function wrapInner(html) {
1750
- return this.each(function () {
1751
- jQuery(this).contents().wrapAll(html);
1752
- });
1753
- }, wrap: function wrap(html) {
1754
- return this.each(function () {
1755
- jQuery(this).wrapAll(html);
1756
- });
1757
- }, unwrap: function unwrap() {
1758
- return this.parent().each(function () {
1759
- if (!jQuery.nodeName(this, "body")) {
1760
- jQuery(this).replaceWith(this.childNodes);
1761
- }
1762
- }).end();
1763
- }, append: function append() {
1764
- return this.domManip(arguments, true, function (elem) {
1765
- if (this.nodeType === 1) {
1766
- this.appendChild(elem);
1767
- }
1768
- });
1769
- }, prepend: function prepend() {
1770
- return this.domManip(arguments, true, function (elem) {
1771
- if (this.nodeType === 1) {
1772
- this.insertBefore(elem, this.firstChild);
1773
- }
1774
- });
1775
- }, before: function before() {
1776
- if (this[0] && this[0].parentNode) {
1777
- return this.domManip(arguments, false, function (elem) {
1778
- this.parentNode.insertBefore(elem, this);
1779
- });
1780
- } else {
1781
- if (arguments.length) {
1782
- var set = jQuery(arguments[0]);set.push.apply(set, this.toArray());return this.pushStack(set, "before", arguments);
1783
- }
1784
- }
1785
- }, after: function after() {
1786
- if (this[0] && this[0].parentNode) {
1787
- return this.domManip(arguments, false, function (elem) {
1788
- this.parentNode.insertBefore(elem, this.nextSibling);
1789
- });
1790
- } else {
1791
- if (arguments.length) {
1792
- var set = this.pushStack(this, "after", arguments);set.push.apply(set, jQuery(arguments[0]).toArray());return set;
1793
- }
1794
- }
1795
- }, clone: function clone(events) {
1796
- var ret = this.map(function () {
1797
- if (!jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this)) {
1798
- var html = this.outerHTML,
1799
- ownerDocument = this.ownerDocument;if (!html) {
1800
- var div = ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html = div.innerHTML;
1801
- }return jQuery.clean([html.replace(rinlinejQuery, "").replace(rleadingWhitespace, "")], ownerDocument)[0];
1802
- } else {
1803
- return this.cloneNode(true);
1804
- }
1805
- });if (events === true) {
1806
- cloneCopyEvent(this, ret);cloneCopyEvent(this.find("*"), ret.find("*"));
1807
- }return ret;
1808
- }, html: function html(value) {
1809
- if (value === undefined) {
1810
- return this[0] ? this[0].innerHTML.replace(rinlinejQuery, "") : null;
1811
- } else {
1812
- if (typeof value === "string" && !/<script/i.test(value) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test(value)) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()]) {
1813
- try {
1814
- for (var i = 0, l = this.length; i < l; i++) {
1815
- if (this[i].nodeType === 1) {
1816
- cleanData(this[i].getElementsByTagName("*"));this[i].innerHTML = value;
1817
- }
1818
- }
1819
- } catch (e) {
1820
- this.empty().append(value);
1821
- }
1822
- } else {
1823
- this.empty().append(value);
1824
- }
1825
- }return this;
1826
- }, replaceWith: function replaceWith(value) {
1827
- if (this[0] && this[0].parentNode) {
1828
- return this.each(function () {
1829
- var next = this.nextSibling,
1830
- parent = this.parentNode;jQuery(this).remove();if (next) {
1831
- jQuery(next).before(value);
1832
- } else {
1833
- jQuery(parent).append(value);
1834
- }
1835
- });
1836
- } else {
1837
- return this.pushStack(jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value);
1838
- }
1839
- }, detach: function detach(selector) {
1840
- return this.remove(selector, true);
1841
- }, domManip: function domManip(args, table, callback) {
1842
- var results,
1843
- first,
1844
- value = args[0],
1845
- scripts = [];if (jQuery.isFunction(value)) {
1846
- return this.each(function () {
1847
- args[0] = value.call(this);return jQuery(this).domManip(args, table, callback);
1848
- });
1849
- }if (this[0]) {
1850
- if (args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11) {
1851
- results = { fragment: args[0].parentNode };
1852
- } else {
1853
- results = buildFragment(args, this, scripts);
1854
- }first = results.fragment.firstChild;if (first) {
1855
- table = table && jQuery.nodeName(first, "tr");for (var i = 0, l = this.length; i < l; i++) {
1856
- callback.call(table ? root(this[i], first) : this[i], results.cacheable || this.length > 1 || i > 0 ? results.fragment.cloneNode(true) : results.fragment);
1857
- }
1858
- }if (scripts) {
1859
- jQuery.each(scripts, evalScript);
1860
- }
1861
- }return this;function root(elem, cur) {
1862
- return jQuery.nodeName(elem, "table") ? elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody")) : elem;
1863
- }
1864
- } });function cloneCopyEvent(orig, ret) {
1865
- var i = 0;ret.each(function () {
1866
- if (this.nodeName !== (orig[i] && orig[i].nodeName)) {
1867
- return;
1868
- }jQuery.data(this, jQuery.data(orig[i++]));
1869
- });
1870
- }function buildFragment(args, nodes, scripts) {
1871
- var fragment, cacheable, cached, cacheresults, doc;if (args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0) {
1872
- cacheable = true;cacheresults = jQuery.fragments[args[0]];if (cacheresults) {
1873
- if (cacheresults !== 1) {
1874
- fragment = cacheresults;
1875
- }cached = true;
1876
- }
1877
- }if (!fragment) {
1878
- doc = nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document;fragment = doc.createDocumentFragment();jQuery.clean(args, doc, fragment, scripts);
1879
- }if (cacheable) {
1880
- jQuery.fragments[args[0]] = cacheresults ? fragment : 1;
1881
- }return { fragment: fragment, cacheable: cacheable };
1882
- }jQuery.fragments = {};jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (name, original) {
1883
- jQuery.fn[name] = function (selector) {
1884
- var ret = [],
1885
- insert = jQuery(selector);for (var i = 0, l = insert.length; i < l; i++) {
1886
- var elems = (i > 0 ? this.clone(true) : this).get();jQuery.fn[original].apply(jQuery(insert[i]), elems);ret = ret.concat(elems);
1887
- }return this.pushStack(ret, name, insert.selector);
1888
- };
1889
- });jQuery.each({ remove: function remove(selector, keepData) {
1890
- if (!selector || jQuery.filter(selector, [this]).length) {
1891
- if (!keepData && this.nodeType === 1) {
1892
- cleanData(this.getElementsByTagName("*"));cleanData([this]);
1893
- }if (this.parentNode) {
1894
- this.parentNode.removeChild(this);
1895
- }
1896
- }
1897
- }, empty: function empty() {
1898
- if (this.nodeType === 1) {
1899
- cleanData(this.getElementsByTagName("*"));
1900
- }while (this.firstChild) {
1901
- this.removeChild(this.firstChild);
1902
- }
1903
- } }, function (name, fn) {
1904
- jQuery.fn[name] = function () {
1905
- return this.each(fn, arguments);
1906
- };
1907
- });jQuery.extend({ clean: function clean(elems, context, fragment, scripts) {
1908
- context = context || document;if (typeof context.createElement === "undefined") {
1909
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
1910
- }var ret = [];jQuery.each(elems, function (i, elem) {
1911
- if (typeof elem === "number") {
1912
- elem += "";
1913
- }if (!elem) {
1914
- return;
1915
- }if (typeof elem === "string" && !rhtml.test(elem)) {
1916
- elem = context.createTextNode(elem);
1917
- } else {
1918
- if (typeof elem === "string") {
1919
- elem = elem.replace(rxhtmlTag, fcloseTag);var tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(),
1920
- wrap = wrapMap[tag] || wrapMap._default,
1921
- depth = wrap[0],
1922
- div = context.createElement("div");div.innerHTML = wrap[1] + elem + wrap[2];while (depth--) {
1923
- div = div.lastChild;
1924
- }if (!jQuery.support.tbody) {
1925
- var hasBody = rtbody.test(elem),
1926
- tbody = tag === "table" && !hasBody ? div.firstChild && div.firstChild.childNodes : wrap[1] == "<table>" && !hasBody ? div.childNodes : [];for (var j = tbody.length - 1; j >= 0; --j) {
1927
- if (jQuery.nodeName(tbody[j], "tbody") && !tbody[j].childNodes.length) {
1928
- tbody[j].parentNode.removeChild(tbody[j]);
1929
- }
1930
- }
1931
- }if (!jQuery.support.leadingWhitespace && rleadingWhitespace.test(elem)) {
1932
- div.insertBefore(context.createTextNode(rleadingWhitespace.exec(elem)[0]), div.firstChild);
1933
- }elem = jQuery.makeArray(div.childNodes);
1934
- }
1935
- }if (elem.nodeType) {
1936
- ret.push(elem);
1937
- } else {
1938
- ret = jQuery.merge(ret, elem);
1939
- }
1940
- });if (fragment) {
1941
- for (var i = 0; ret[i]; i++) {
1942
- if (scripts && jQuery.nodeName(ret[i], "script") && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript")) {
1943
- scripts.push(ret[i].parentNode ? ret[i].parentNode.removeChild(ret[i]) : ret[i]);
1944
- } else {
1945
- if (ret[i].nodeType === 1) {
1946
- ret.splice.apply(ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));
1947
- }fragment.appendChild(ret[i]);
1948
- }
1949
- }
1950
- }return ret;
1951
- } });function cleanData(elems) {
1952
- for (var i = 0, elem, id; (elem = elems[i]) != null; i++) {
1953
- if (!jQuery.noData[elem.nodeName.toLowerCase()] && (id = elem[expando])) {
1954
- delete jQuery.cache[id];
1955
- }
1956
- }
1957
- }var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
1958
- ralpha = /alpha\([^)]*\)/,
1959
- ropacity = /opacity=([^)]*)/,
1960
- rfloat = /float/i,
1961
- rdashAlpha = /-([a-z])/ig,
1962
- rupper = /([A-Z])/g,
1963
- rnumpx = /^-?\d+(?:px)?$/i,
1964
- rnum = /^-?\d/,
1965
- getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
1966
- styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
1967
- fcamelCase = function fcamelCase(all, letter) {
1968
- return letter.toUpperCase();
1969
- };jQuery.fn.css = function (name, value) {
1970
- return access(this, name, value, true, function (elem, name, value) {
1971
- if (value === undefined) {
1972
- return jQuery.curCSS(elem, name);
1973
- }if (typeof value === "number" && !rexclude.test(name)) {
1974
- value += "px";
1975
- }jQuery.style(elem, name, value);
1976
- });
1977
- };jQuery.extend({ style: function style(elem, name, value) {
1978
- if (!elem || elem.nodeType === 3 || elem.nodeType === 8) {
1979
- return undefined;
1980
- }if ((name === "width" || name === "height") && parseFloat(value) < 0) {
1981
- value = undefined;
1982
- }var style = elem.style || elem,
1983
- set = value !== undefined;if (!jQuery.support.opacity && name === "opacity") {
1984
- if (set) {
1985
- style.zoom = 1;var opacity = parseInt(value, 10) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";var filter = style.filter || jQuery.curCSS(elem, "filter") || "";style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
1986
- }return style.filter && style.filter.indexOf("opacity=") >= 0 ? parseFloat(ropacity.exec(style.filter)[1]) / 100 + "" : "";
1987
- }if (rfloat.test(name)) {
1988
- name = styleFloat;
1989
- }name = name.replace(rdashAlpha, fcamelCase);if (set) {
1990
- style[name] = value;
1991
- }return style[name];
1992
- }, css: function css(elem, name, force, extra) {
1993
- if (name === "width" || name === "height") {
1994
- var getWH = function getWH() {
1995
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight;if (extra === "border") {
1996
- return;
1997
- }jQuery.each(which, function () {
1998
- if (!extra) {
1999
- val -= parseFloat(jQuery.curCSS(elem, "padding" + this, true)) || 0;
2000
- }if (extra === "margin") {
2001
- val += parseFloat(jQuery.curCSS(elem, "margin" + this, true)) || 0;
2002
- } else {
2003
- val -= parseFloat(jQuery.curCSS(elem, "border" + this + "Width", true)) || 0;
2004
- }
2005
- });
2006
- };
2007
-
2008
- var val,
2009
- props = { position: "absolute", visibility: "hidden", display: "block" },
2010
- which = name === "width" ? ["Left", "Right"] : ["Top", "Bottom"];if (elem.offsetWidth !== 0) {
2011
- getWH();
2012
- } else {
2013
- jQuery.swap(elem, props, getWH);
2014
- }return Math.max(0, Math.round(val));
2015
- }return jQuery.curCSS(elem, name, force);
2016
- }, curCSS: function curCSS(elem, name, force) {
2017
- var ret,
2018
- style = elem.style,
2019
- filter;if (!jQuery.support.opacity && name === "opacity" && elem.currentStyle) {
2020
- ret = ropacity.test(elem.currentStyle.filter || "") ? parseFloat(RegExp.$1) / 100 + "" : "";return ret === "" ? "1" : ret;
2021
- }if (rfloat.test(name)) {
2022
- name = styleFloat;
2023
- }if (!force && style && style[name]) {
2024
- ret = style[name];
2025
- } else {
2026
- if (getComputedStyle) {
2027
- if (rfloat.test(name)) {
2028
- name = "float";
2029
- }name = name.replace(rupper, "-$1").toLowerCase();var defaultView = elem.ownerDocument.defaultView;if (!defaultView) {
2030
- return null;
2031
- }var computedStyle = defaultView.getComputedStyle(elem, null);if (computedStyle) {
2032
- ret = computedStyle.getPropertyValue(name);
2033
- }if (name === "opacity" && ret === "") {
2034
- ret = "1";
2035
- }
2036
- } else {
2037
- if (elem.currentStyle) {
2038
- var camelCase = name.replace(rdashAlpha, fcamelCase);ret = elem.currentStyle[name] || elem.currentStyle[camelCase];if (!rnumpx.test(ret) && rnum.test(ret)) {
2039
- var left = style.left,
2040
- rsLeft = elem.runtimeStyle.left;elem.runtimeStyle.left = elem.currentStyle.left;style.left = camelCase === "fontSize" ? "1em" : ret || 0;ret = style.pixelLeft + "px";style.left = left;elem.runtimeStyle.left = rsLeft;
2041
- }
2042
- }
2043
- }
2044
- }return ret;
2045
- }, swap: function swap(elem, options, callback) {
2046
- var old = {};for (var name in options) {
2047
- old[name] = elem.style[name];elem.style[name] = options[name];
2048
- }callback.call(elem);for (var name in options) {
2049
- elem.style[name] = old[name];
2050
- }
2051
- } });if (jQuery.expr && jQuery.expr.filters) {
2052
- jQuery.expr.filters.hidden = function (elem) {
2053
- var width = elem.offsetWidth,
2054
- height = elem.offsetHeight,
2055
- skip = elem.nodeName.toLowerCase() === "tr";return width === 0 && height === 0 && !skip ? true : width > 0 && height > 0 && !skip ? false : jQuery.curCSS(elem, "display") === "none";
2056
- };jQuery.expr.filters.visible = function (elem) {
2057
- return !jQuery.expr.filters.hidden(elem);
2058
- };
2059
- }var jsc = now(),
2060
- rscript = /<script(.|\s)*?\/script>/gi,
2061
- rselectTextarea = /select|textarea/i,
2062
- rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
2063
- jsre = /=\?(&|$)/,
2064
- rquery = /\?/,
2065
- rts = /(\?|&)_=.*?(&|$)/,
2066
- rurl = /^(\w+:)?\/\/([^\/?#]+)/,
2067
- r20 = /%20/g;jQuery.fn.extend({ _load: jQuery.fn.load, load: function load(url, params, callback) {
2068
- if (typeof url !== "string") {
2069
- return this._load(url);
2070
- } else {
2071
- if (!this.length) {
2072
- return this;
2073
- }
2074
- }var off = url.indexOf(" ");if (off >= 0) {
2075
- var selector = url.slice(off, url.length);url = url.slice(0, off);
2076
- }var type = "GET";if (params) {
2077
- if (jQuery.isFunction(params)) {
2078
- callback = params;params = null;
2079
- } else {
2080
- if ((typeof params === "undefined" ? "undefined" : _typeof(params)) === "object") {
2081
- params = jQuery.param(params);type = "POST";
2082
- }
2083
- }
2084
- }jQuery.ajax({ url: url, type: type, dataType: "html", data: params, context: this, complete: function complete(res, status) {
2085
- if (status === "success" || status === "notmodified") {
2086
- this.html(selector ? jQuery("<div />").append(res.responseText.replace(rscript, "")).find(selector) : res.responseText);
2087
- }if (callback) {
2088
- this.each(callback, [res.responseText, status, res]);
2089
- }
2090
- } });return this;
2091
- }, serialize: function serialize() {
2092
- return jQuery.param(this.serializeArray());
2093
- }, serializeArray: function serializeArray() {
2094
- return this.map(function () {
2095
- return this.elements ? jQuery.makeArray(this.elements) : this;
2096
- }).filter(function () {
2097
- return this.name && !this.disabled && (this.checked || rselectTextarea.test(this.nodeName) || rinput.test(this.type));
2098
- }).map(function (i, elem) {
2099
- var val = jQuery(this).val();return val == null ? null : jQuery.isArray(val) ? jQuery.map(val, function (val, i) {
2100
- return { name: elem.name, value: val };
2101
- }) : { name: elem.name, value: val };
2102
- }).get();
2103
- } });jQuery.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (i, o) {
2104
- jQuery.fn[o] = function (f) {
2105
- return this.bind(o, f);
2106
- };
2107
- });jQuery.extend({ get: function get(url, data, callback, type) {
2108
- if (jQuery.isFunction(data)) {
2109
- type = type || callback;callback = data;data = null;
2110
- }return jQuery.ajax({ type: "GET", url: url, data: data, success: callback, dataType: type });
2111
- }, getScript: function getScript(url, callback) {
2112
- return jQuery.get(url, null, callback, "script");
2113
- }, getJSON: function getJSON(url, data, callback) {
2114
- return jQuery.get(url, data, callback, "json");
2115
- }, post: function post(url, data, callback, type) {
2116
- if (jQuery.isFunction(data)) {
2117
- type = type || callback;callback = data;data = {};
2118
- }return jQuery.ajax({ type: "POST", url: url, data: data, success: callback, dataType: type });
2119
- }, ajaxSetup: function ajaxSetup(settings) {
2120
- jQuery.extend(jQuery.ajaxSettings, settings);
2121
- }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: function xhr() {
2122
- return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
2123
- }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*" } }, lastModified: {}, etag: {}, ajax: function ajax(origSettings) {
2124
- var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);var jsonp,
2125
- status,
2126
- data,
2127
- callbackContext = s.context || s,
2128
- type = s.type.toUpperCase();if (s.data && s.processData && typeof s.data !== "string") {
2129
- s.data = jQuery.param(s.data);
2130
- }if (s.dataType === "jsonp") {
2131
- if (type === "GET") {
2132
- if (!jsre.test(s.url)) {
2133
- s.url += (rquery.test(s.url) ? "&" : "?") + (s.jsonp || "callback") + "=?";
2134
- }
2135
- } else {
2136
- if (!s.data || !jsre.test(s.data)) {
2137
- s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
2138
- }
2139
- }s.dataType = "json";
2140
- }if (s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url))) {
2141
- jsonp = s.jsonpCallback || "jsonp" + jsc++;if (s.data) {
2142
- s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
2143
- }s.url = s.url.replace(jsre, "=" + jsonp + "$1");s.dataType = "script";window[jsonp] = window[jsonp] || function (tmp) {
2144
- data = tmp;success();complete();window[jsonp] = undefined;try {
2145
- delete window[jsonp];
2146
- } catch (e) {}if (head) {
2147
- head.removeChild(script);
2148
- }
2149
- };
2150
- }if (s.dataType === "script" && s.cache === null) {
2151
- s.cache = false;
2152
- }if (s.cache === false && type === "GET") {
2153
- var ts = now();var ret = s.url.replace(rts, "$1_=" + ts + "$2");s.url = ret + (ret === s.url ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
2154
- }if (s.data && type === "GET") {
2155
- s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
2156
- }if (s.global && !jQuery.active++) {
2157
- jQuery.event.trigger("ajaxStart");
2158
- }var parts = rurl.exec(s.url),
2159
- remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);if (s.dataType === "script" && type === "GET" && remote) {
2160
- var head = document.getElementsByTagName("head")[0] || document.documentElement;var script = document.createElement("script");script.src = s.url;if (s.scriptCharset) {
2161
- script.charset = s.scriptCharset;
2162
- }if (!jsonp) {
2163
- var done = false;script.onload = script.onreadystatechange = function () {
2164
- if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
2165
- done = true;success();complete();script.onload = script.onreadystatechange = null;if (head && script.parentNode) {
2166
- head.removeChild(script);
2167
- }
2168
- }
2169
- };
2170
- }head.insertBefore(script, head.firstChild);return undefined;
2171
- }var requestDone = false;var xhr = s.xhr();if (s.username) {
2172
- xhr.open(type, s.url, s.async, s.username, s.password);
2173
- } else {
2174
- xhr.open(type, s.url, s.async);
2175
- }try {
2176
- if (s.data || origSettings && origSettings.contentType) {
2177
- xhr.setRequestHeader("Content-Type", s.contentType);
2178
- }if (s.ifModified) {
2179
- if (jQuery.lastModified[s.url]) {
2180
- xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
2181
- }if (jQuery.etag[s.url]) {
2182
- xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
2183
- }
2184
- }if (!remote) {
2185
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
2186
- }xhr.setRequestHeader("Accept", s.dataType && s.accepts[s.dataType] ? s.accepts[s.dataType] + ", */*" : s.accepts._default);
2187
- } catch (e) {}if (s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false) {
2188
- if (s.global && ! --jQuery.active) {
2189
- jQuery.event.trigger("ajaxStop");
2190
- }xhr.abort();return false;
2191
- }if (s.global) {
2192
- trigger("ajaxSend", [xhr, s]);
2193
- }var onreadystatechange = function onreadystatechange(isTimeout) {
2194
- if (!xhr || xhr.readyState === 0) {
2195
- if (ival) {
2196
- clearInterval(ival);ival = null;if (s.global && ! --jQuery.active) {
2197
- jQuery.event.trigger("ajaxStop");
2198
- }
2199
- }
2200
- } else {
2201
- if (!requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout")) {
2202
- requestDone = true;if (ival) {
2203
- clearInterval(ival);ival = null;
2204
- }status = isTimeout === "timeout" ? "timeout" : !jQuery.httpSuccess(xhr) ? "error" : s.ifModified && jQuery.httpNotModified(xhr, s.url) ? "notmodified" : "success";if (status === "success") {
2205
- try {
2206
- data = jQuery.httpData(xhr, s.dataType, s);
2207
- } catch (e) {
2208
- status = "parsererror";
2209
- }
2210
- }if (status === "success" || status === "notmodified") {
2211
- if (!jsonp) {
2212
- success();
2213
- }
2214
- } else {
2215
- jQuery.handleError(s, xhr, status);
2216
- }complete();if (isTimeout === "timeout") {
2217
- xhr.abort();
2218
- }if (s.async) {
2219
- xhr = null;
2220
- }
2221
- }
2222
- }
2223
- };if (s.async) {
2224
- var ival = setInterval(onreadystatechange, 13);if (s.timeout > 0) {
2225
- setTimeout(function () {
2226
- if (xhr && !requestDone) {
2227
- onreadystatechange("timeout");
2228
- }
2229
- }, s.timeout);
2230
- }
2231
- }try {
2232
- xhr.send(type === "POST" || type === "PUT" ? s.data : null);
2233
- } catch (e) {
2234
- jQuery.handleError(s, xhr, null, e);complete();
2235
- }if (!s.async) {
2236
- onreadystatechange();
2237
- }function success() {
2238
- if (s.success) {
2239
- s.success.call(callbackContext, data, status, xhr);
2240
- }if (s.global) {
2241
- trigger("ajaxSuccess", [xhr, s]);
2242
- }
2243
- }function complete() {
2244
- if (s.complete) {
2245
- s.complete.call(callbackContext, xhr, status);
2246
- }if (s.global) {
2247
- trigger("ajaxComplete", [xhr, s]);
2248
- }if (s.global && ! --jQuery.active) {
2249
- jQuery.event.trigger("ajaxStop");
2250
- }
2251
- }function trigger(type, args) {
2252
- (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
2253
- }return xhr;
2254
- }, handleError: function handleError(s, xhr, status, e) {
2255
- if (s.error) {
2256
- s.error.call(s.context || window, xhr, status, e);
2257
- }if (s.global) {
2258
- (s.context ? jQuery(s.context) : jQuery.event).trigger("ajaxError", [xhr, s, e]);
2259
- }
2260
- }, active: 0, httpSuccess: function httpSuccess(xhr) {
2261
- try {
2262
- return !xhr.status && location.protocol === "file:" || xhr.status >= 200 && xhr.status < 300 || xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
2263
- } catch (e) {}return false;
2264
- }, httpNotModified: function httpNotModified(xhr, url) {
2265
- var lastModified = xhr.getResponseHeader("Last-Modified"),
2266
- etag = xhr.getResponseHeader("Etag");if (lastModified) {
2267
- jQuery.lastModified[url] = lastModified;
2268
- }if (etag) {
2269
- jQuery.etag[url] = etag;
2270
- }return xhr.status === 304 || xhr.status === 0;
2271
- }, httpData: function httpData(xhr, type, s) {
2272
- var ct = xhr.getResponseHeader("content-type"),
2273
- xml = type === "xml" || !type && ct && ct.indexOf("xml") >= 0,
2274
- data = xml ? xhr.responseXML : xhr.responseText;if (xml && data.documentElement.nodeName === "parsererror") {
2275
- throw "parsererror";
2276
- }if (s && s.dataFilter) {
2277
- data = s.dataFilter(data, type);
2278
- }if (typeof data === "string") {
2279
- if (type === "script") {
2280
- jQuery.globalEval(data);
2281
- }if (type === "json") {
2282
- if ((typeof JSON === "undefined" ? "undefined" : _typeof(JSON)) === "object" && JSON.parse) {
2283
- data = JSON.parse(data);
2284
- } else {
2285
- data = new Function("return " + data)();
2286
- }
2287
- }
2288
- }return data;
2289
- }, param: function param(a) {
2290
- var s = [],
2291
- traditional = jQuery.param.traditional;function add(key, value) {
2292
- value = jQuery.isFunction(value) ? value() : value;s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
2293
- }if (jQuery.isArray(a) || a.jquery) {
2294
- jQuery.each(a, function () {
2295
- add(this.name, this.value);
2296
- });
2297
- } else {
2298
- jQuery.each(a, function buildParams(prefix, obj) {
2299
- if (jQuery.isArray(obj)) {
2300
- jQuery.each(obj, function (i, v) {
2301
- if (traditional) {
2302
- add(prefix, v);
2303
- } else {
2304
- buildParams(prefix + "[" + ((typeof v === "undefined" ? "undefined" : _typeof(v)) === "object" || jQuery.isArray(v) ? i : "") + "]", v);
2305
- }
2306
- });
2307
- } else {
2308
- if (!traditional && (typeof obj === "undefined" ? "undefined" : _typeof(obj)) === "object") {
2309
- jQuery.each(obj, function (k, v) {
2310
- buildParams(prefix + "[" + k + "]", v);
2311
- });
2312
- } else {
2313
- add(prefix, obj);
2314
- }
2315
- }
2316
- });
2317
- }return s.join("&").replace(r20, "+");
2318
- } });var elemdisplay = {},
2319
- rfxtypes = /toggle|show|hide/,
2320
- rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
2321
- timerId,
2322
- fxAttrs = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]];jQuery.fn.extend({ show: function show(speed, callback) {
2323
- if (speed != null) {
2324
- return this.animate(genFx("show", 3), speed, callback);
2325
- } else {
2326
- for (var i = 0, l = this.length; i < l; i++) {
2327
- var old = jQuery.data(this[i], "olddisplay");this[i].style.display = old || "";if (jQuery.css(this[i], "display") === "none") {
2328
- var nodeName = this[i].nodeName,
2329
- display;if (elemdisplay[nodeName]) {
2330
- display = elemdisplay[nodeName];
2331
- } else {
2332
- var elem = jQuery("<" + nodeName + " />").appendTo("body");display = elem.css("display");if (display === "none") {
2333
- display = "block";
2334
- }elem.remove();elemdisplay[nodeName] = display;
2335
- }jQuery.data(this[i], "olddisplay", display);
2336
- }
2337
- }for (var j = 0, k = this.length; j < k; j++) {
2338
- this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
2339
- }return this;
2340
- }
2341
- }, hide: function hide(speed, callback) {
2342
- if (speed != null) {
2343
- return this.animate(genFx("hide", 3), speed, callback);
2344
- } else {
2345
- for (var i = 0, l = this.length; i < l; i++) {
2346
- var old = jQuery.data(this[i], "olddisplay");if (!old && old !== "none") {
2347
- jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
2348
- }
2349
- }for (var j = 0, k = this.length; j < k; j++) {
2350
- this[j].style.display = "none";
2351
- }return this;
2352
- }
2353
- }, _toggle: jQuery.fn.toggle, toggle: function toggle(fn, fn2) {
2354
- var bool = typeof fn === "boolean";if (jQuery.isFunction(fn) && jQuery.isFunction(fn2)) {
2355
- this._toggle.apply(this, arguments);
2356
- } else {
2357
- if (fn == null || bool) {
2358
- this.each(function () {
2359
- var state = bool ? fn : jQuery(this).is(":hidden");jQuery(this)[state ? "show" : "hide"]();
2360
- });
2361
- } else {
2362
- this.animate(genFx("toggle", 3), fn, fn2);
2363
- }
2364
- }return this;
2365
- }, fadeTo: function fadeTo(speed, to, callback) {
2366
- return this.filter(":hidden").css("opacity", 0).show().end().animate({ opacity: to }, speed, callback);
2367
- }, animate: function animate(prop, speed, easing, callback) {
2368
- var optall = jQuery.speed(speed, easing, callback);return this[optall.queue === false ? "each" : "queue"](function () {
2369
- var opt = jQuery.extend({}, optall),
2370
- p,
2371
- hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
2372
- self = this;for (p in prop) {
2373
- var name = p.replace(rdashAlpha, fcamelCase);if (p !== name) {
2374
- prop[name] = prop[p];delete prop[p];p = name;
2375
- }if (prop[p] === "hide" && hidden || prop[p] === "show" && !hidden) {
2376
- return opt.complete.call(this);
2377
- }if ((p === "height" || p === "width") && this.style) {
2378
- opt.display = jQuery.css(this, "display");opt.overflow = this.style.overflow;
2379
- }if (jQuery.isArray(prop[p])) {
2380
- (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];prop[p] = prop[p][0];
2381
- }
2382
- }if (opt.overflow != null) {
2383
- this.style.overflow = "hidden";
2384
- }opt.curAnim = jQuery.extend({}, prop);jQuery.each(prop, function (name, val) {
2385
- var e = new jQuery.fx(self, opt, name);if (rfxtypes.test(val)) {
2386
- e[val === "toggle" ? hidden ? "show" : "hide" : val](prop);
2387
- } else {
2388
- var parts = rfxnum.exec(val),
2389
- start = e.cur(true) || 0;if (parts) {
2390
- var end = parseFloat(parts[2]),
2391
- unit = parts[3] || "px";if (unit !== "px") {
2392
- self.style[name] = (end || 1) + unit;start = (end || 1) / e.cur(true) * start;self.style[name] = start + unit;
2393
- }if (parts[1]) {
2394
- end = (parts[1] === "-=" ? -1 : 1) * end + start;
2395
- }e.custom(start, end, unit);
2396
- } else {
2397
- e.custom(start, val, "");
2398
- }
2399
- }
2400
- });if (jQuery.isEmptyObject(prop)) {
2401
- return optall.complete.call(this);
2402
- }return true;
2403
- });
2404
- }, stop: function stop(clearQueue, gotoEnd) {
2405
- var timers = jQuery.timers;if (clearQueue) {
2406
- this.queue([]);
2407
- }this.each(function () {
2408
- for (var i = timers.length - 1; i >= 0; i--) {
2409
- if (timers[i].elem === this) {
2410
- if (gotoEnd) {
2411
- timers[i](true);
2412
- }timers.splice(i, 1);
2413
- }
2414
- }
2415
- });if (!gotoEnd) {
2416
- this.dequeue();
2417
- }return this;
2418
- } });jQuery.each({ slideDown: genFx("show", 1), slideUp: genFx("hide", 1), slideToggle: genFx("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" } }, function (name, props) {
2419
- jQuery.fn[name] = function (speed, callback) {
2420
- return this.animate(props, speed, callback);
2421
- };
2422
- });jQuery.extend({ speed: function speed(_speed, easing, fn) {
2423
- var opt = _speed && (typeof _speed === "undefined" ? "undefined" : _typeof(_speed)) === "object" ? _speed : { complete: fn || !fn && easing || jQuery.isFunction(_speed) && _speed, duration: _speed, easing: fn && easing || easing && !jQuery.isFunction(easing) && easing };opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;opt.old = opt.complete;opt.complete = function () {
2424
- if (opt.queue !== false) {
2425
- jQuery(this).dequeue();
2426
- }if (jQuery.isFunction(opt.old)) {
2427
- opt.old.call(this);
2428
- }
2429
- };return opt;
2430
- }, easing: { linear: function linear(p, n, firstNum, diff) {
2431
- return firstNum + diff * p;
2432
- }, swing: function swing(p, n, firstNum, diff) {
2433
- return (-Math.cos(p * Math.PI) / 2 + 0.5) * diff + firstNum;
2434
- } }, timers: [], fx: function fx(elem, options, prop) {
2435
- this.options = options;this.elem = elem;this.prop = prop;if (!options.orig) {
2436
- options.orig = {};
2437
- }
2438
- } });jQuery.fx.prototype = { update: function update() {
2439
- if (this.options.step) {
2440
- this.options.step.call(this.elem, this.now, this);
2441
- }(jQuery.fx.step[this.prop] || jQuery.fx.step._default)(this);if ((this.prop === "height" || this.prop === "width") && this.elem.style) {
2442
- this.elem.style.display = "block";
2443
- }
2444
- }, cur: function cur(force) {
2445
- if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) {
2446
- return this.elem[this.prop];
2447
- }var r = parseFloat(jQuery.css(this.elem, this.prop, force));return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
2448
- }, custom: function custom(from, to, unit) {
2449
- this.startTime = now();this.start = from;this.end = to;this.unit = unit || this.unit || "px";this.now = this.start;this.pos = this.state = 0;var self = this;function t(gotoEnd) {
2450
- return self.step(gotoEnd);
2451
- }t.elem = this.elem;if (t() && jQuery.timers.push(t) && !timerId) {
2452
- timerId = setInterval(jQuery.fx.tick, 13);
2453
- }
2454
- }, show: function show() {
2455
- this.options.orig[this.prop] = jQuery.style(this.elem, this.prop);this.options.show = true;this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());jQuery(this.elem).show();
2456
- }, hide: function hide() {
2457
- this.options.orig[this.prop] = jQuery.style(this.elem, this.prop);this.options.hide = true;this.custom(this.cur(), 0);
2458
- }, step: function step(gotoEnd) {
2459
- var t = now(),
2460
- done = true;if (gotoEnd || t >= this.options.duration + this.startTime) {
2461
- this.now = this.end;this.pos = this.state = 1;this.update();this.options.curAnim[this.prop] = true;for (var i in this.options.curAnim) {
2462
- if (this.options.curAnim[i] !== true) {
2463
- done = false;
2464
- }
2465
- }if (done) {
2466
- if (this.options.display != null) {
2467
- this.elem.style.overflow = this.options.overflow;var old = jQuery.data(this.elem, "olddisplay");this.elem.style.display = old ? old : this.options.display;if (jQuery.css(this.elem, "display") === "none") {
2468
- this.elem.style.display = "block";
2469
- }
2470
- }if (this.options.hide) {
2471
- jQuery(this.elem).hide();
2472
- }if (this.options.hide || this.options.show) {
2473
- for (var p in this.options.curAnim) {
2474
- jQuery.style(this.elem, p, this.options.orig[p]);
2475
- }
2476
- }this.options.complete.call(this.elem);
2477
- }return false;
2478
- } else {
2479
- var n = t - this.startTime;this.state = n / this.options.duration;var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);this.now = this.start + (this.end - this.start) * this.pos;this.update();
2480
- }return true;
2481
- } };jQuery.extend(jQuery.fx, { tick: function tick() {
2482
- var timers = jQuery.timers;for (var i = 0; i < timers.length; i++) {
2483
- if (!timers[i]()) {
2484
- timers.splice(i--, 1);
2485
- }
2486
- }if (!timers.length) {
2487
- jQuery.fx.stop();
2488
- }
2489
- }, stop: function stop() {
2490
- clearInterval(timerId);timerId = null;
2491
- }, speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function opacity(fx) {
2492
- jQuery.style(fx.elem, "opacity", fx.now);
2493
- }, _default: function _default(fx) {
2494
- if (fx.elem.style && fx.elem.style[fx.prop] != null) {
2495
- fx.elem.style[fx.prop] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
2496
- } else {
2497
- fx.elem[fx.prop] = fx.now;
2498
- }
2499
- } } });if (jQuery.expr && jQuery.expr.filters) {
2500
- jQuery.expr.filters.animated = function (elem) {
2501
- return jQuery.grep(jQuery.timers, function (fn) {
2502
- return elem === fn.elem;
2503
- }).length;
2504
- };
2505
- }function genFx(type, num) {
2506
- var obj = {};jQuery.each(fxAttrs.concat.apply([], fxAttrs.slice(0, num)), function () {
2507
- obj[this] = type;
2508
- });return obj;
2509
- }if ("getBoundingClientRect" in document.documentElement) {
2510
- jQuery.fn.offset = function (options) {
2511
- var elem = this[0];if (!elem || !elem.ownerDocument) {
2512
- return null;
2513
- }if (options) {
2514
- return this.each(function () {
2515
- jQuery.offset.setOffset(this, options);
2516
- });
2517
- }if (elem === elem.ownerDocument.body) {
2518
- return jQuery.offset.bodyOffset(elem);
2519
- }var box = elem.getBoundingClientRect(),
2520
- doc = elem.ownerDocument,
2521
- body = doc.body,
2522
- docElem = doc.documentElement,
2523
- clientTop = docElem.clientTop || body.clientTop || 0,
2524
- clientLeft = docElem.clientLeft || body.clientLeft || 0,
2525
- top = box.top + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop) - clientTop,
2526
- left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;return { top: top, left: left };
2527
- };
2528
- } else {
2529
- jQuery.fn.offset = function (options) {
2530
- var elem = this[0];if (!elem || !elem.ownerDocument) {
2531
- return null;
2532
- }if (options) {
2533
- return this.each(function () {
2534
- jQuery.offset.setOffset(this, options);
2535
- });
2536
- }if (elem === elem.ownerDocument.body) {
2537
- return jQuery.offset.bodyOffset(elem);
2538
- }jQuery.offset.initialize();var offsetParent = elem.offsetParent,
2539
- prevOffsetParent = elem,
2540
- doc = elem.ownerDocument,
2541
- computedStyle,
2542
- docElem = doc.documentElement,
2543
- body = doc.body,
2544
- defaultView = doc.defaultView,
2545
- prevComputedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle,
2546
- top = elem.offsetTop,
2547
- left = elem.offsetLeft;while ((elem = elem.parentNode) && elem !== body && elem !== docElem) {
2548
- if (jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") {
2549
- break;
2550
- }computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;top -= elem.scrollTop;left -= elem.scrollLeft;if (elem === offsetParent) {
2551
- top += elem.offsetTop;left += elem.offsetLeft;if (jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName))) {
2552
- top += parseFloat(computedStyle.borderTopWidth) || 0;left += parseFloat(computedStyle.borderLeftWidth) || 0;
2553
- }prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
2554
- }if (jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible") {
2555
- top += parseFloat(computedStyle.borderTopWidth) || 0;left += parseFloat(computedStyle.borderLeftWidth) || 0;
2556
- }prevComputedStyle = computedStyle;
2557
- }if (prevComputedStyle.position === "relative" || prevComputedStyle.position === "static") {
2558
- top += body.offsetTop;left += body.offsetLeft;
2559
- }if (jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed") {
2560
- top += Math.max(docElem.scrollTop, body.scrollTop);left += Math.max(docElem.scrollLeft, body.scrollLeft);
2561
- }return { top: top, left: left };
2562
- };
2563
- }jQuery.offset = { initialize: function initialize() {
2564
- var body = document.body,
2565
- container = document.createElement("div"),
2566
- innerDiv,
2567
- checkDiv,
2568
- table,
2569
- td,
2570
- bodyMarginTop = parseFloat(jQuery.curCSS(body, "marginTop", true)) || 0,
2571
- html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';jQuery.extend(container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" });container.innerHTML = html;body.insertBefore(container, body.firstChild);innerDiv = container.firstChild;checkDiv = innerDiv.firstChild;td = innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder = checkDiv.offsetTop !== 5;this.doesAddBorderForTableAndCells = td.offsetTop === 5;checkDiv.style.position = "fixed", checkDiv.style.top = "20px";this.supportsFixedPosition = checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15;checkDiv.style.position = checkDiv.style.top = "";innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";this.subtractsBorderForOverflowNotVisible = checkDiv.offsetTop === -5;this.doesNotIncludeMarginInBodyOffset = body.offsetTop !== bodyMarginTop;body.removeChild(container);body = container = innerDiv = checkDiv = table = td = null;jQuery.offset.initialize = function () {};
2572
- }, bodyOffset: function bodyOffset(body) {
2573
- var top = body.offsetTop,
2574
- left = body.offsetLeft;jQuery.offset.initialize();if (jQuery.offset.doesNotIncludeMarginInBodyOffset) {
2575
- top += parseFloat(jQuery.curCSS(body, "marginTop", true)) || 0;left += parseFloat(jQuery.curCSS(body, "marginLeft", true)) || 0;
2576
- }return { top: top, left: left };
2577
- }, setOffset: function setOffset(elem, options) {
2578
- if (/static/.test(jQuery.curCSS(elem, "position"))) {
2579
- elem.style.position = "relative";
2580
- }var curElem = jQuery(elem),
2581
- curOffset = curElem.offset(),
2582
- curTop = parseInt(jQuery.curCSS(elem, "top", true), 10) || 0,
2583
- curLeft = parseInt(jQuery.curCSS(elem, "left", true), 10) || 0,
2584
- props = { top: options.top - curOffset.top + curTop, left: options.left - curOffset.left + curLeft };if ("using" in options) {
2585
- options.using.call(elem, props);
2586
- } else {
2587
- curElem.css(props);
2588
- }
2589
- } };jQuery.fn.extend({ position: function position() {
2590
- if (!this[0]) {
2591
- return null;
2592
- }var elem = this[0],
2593
- offsetParent = this.offsetParent(),
2594
- offset = this.offset(),
2595
- parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();offset.top -= parseFloat(jQuery.curCSS(elem, "marginTop", true)) || 0;offset.left -= parseFloat(jQuery.curCSS(elem, "marginLeft", true)) || 0;parentOffset.top += parseFloat(jQuery.curCSS(offsetParent[0], "borderTopWidth", true)) || 0;parentOffset.left += parseFloat(jQuery.curCSS(offsetParent[0], "borderLeftWidth", true)) || 0;return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left };
2596
- }, offsetParent: function offsetParent() {
2597
- return this.map(function () {
2598
- var offsetParent = this.offsetParent || document.body;while (offsetParent && !/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") {
2599
- offsetParent = offsetParent.offsetParent;
2600
- }return offsetParent;
2601
- });
2602
- } });jQuery.each(["Left", "Top"], function (i, name) {
2603
- var method = "scroll" + name;jQuery.fn[method] = function (val) {
2604
- var elem = this[0],
2605
- win;if (!elem) {
2606
- return null;
2607
- }if (val !== undefined) {
2608
- return this.each(function () {
2609
- win = getWindow(this);win ? win.scrollTo(!i ? val : jQuery(win).scrollLeft(), i ? val : jQuery(win).scrollTop()) : this[method] = val;
2610
- });
2611
- } else {
2612
- win = getWindow(elem);return win ? "pageXOffset" in win ? win[i ? "pageYOffset" : "pageXOffset"] : jQuery.support.boxModel && win.document.documentElement[method] || win.document.body[method] : elem[method];
2613
- }
2614
- };
2615
- });function getWindow(elem) {
2616
- return "scrollTo" in elem && elem.document ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false;
2617
- }jQuery.each(["Height", "Width"], function (i, name) {
2618
- var type = name.toLowerCase();jQuery.fn["inner" + name] = function () {
2619
- return this[0] ? jQuery.css(this[0], type, false, "padding") : null;
2620
- };jQuery.fn["outer" + name] = function (margin) {
2621
- return this[0] ? jQuery.css(this[0], type, false, margin ? "margin" : "border") : null;
2622
- };jQuery.fn[type] = function (size) {
2623
- var elem = this[0];if (!elem) {
2624
- return size == null ? null : this;
2625
- }return "scrollTo" in elem && elem.document ? elem.document.compatMode === "CSS1Compat" && elem.document.documentElement["client" + name] || elem.document.body["client" + name] : elem.nodeType === 9 ? Math.max(elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name]) : size === undefined ? jQuery.css(elem, type) : this.css(type, typeof size === "string" ? size : size + "px");
2626
- };
2627
- });window.jQuery = window.$ = jQuery;
2628
- })(window);