Advertisement
scripts_tradicional

aaaaaaaaa

Apr 20th, 2017
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 241.12 KB | None | 0 0
  1. !function(element, proceed) {
  2. if ("object" == typeof module && "object" == typeof module.exports) {
  3. module.exports = element.document ? proceed(element, true) : function(element) {
  4. if (!element.document) {
  5. throw new Error("jQuery requires a window with a document");
  6. }
  7. return proceed(element);
  8. };
  9. } else {
  10. proceed(element);
  11. }
  12. }("undefined" != typeof window ? window : this, function(win, dataAndEvents) {
  13. /**
  14. * @param {string} data
  15. * @param {Object} context
  16. * @return {undefined}
  17. */
  18. function load(data, context) {
  19. context = context || doc;
  20. var script = context.createElement("script");
  21. /** @type {string} */
  22. script.text = data;
  23. context.head.appendChild(script).parentNode.removeChild(script);
  24. }
  25. /**
  26. * @param {Object} obj
  27. * @return {?}
  28. */
  29. function isArraylike(obj) {
  30. var length = !!obj && ("length" in obj && obj.length);
  31. var type = jQuery.type(obj);
  32. return "function" !== type && (!jQuery.isWindow(obj) && ("array" === type || (0 === length || "number" == typeof length && (length > 0 && length - 1 in obj))));
  33. }
  34. /**
  35. * @param {string} elements
  36. * @param {Object} qualifier
  37. * @param {boolean} not
  38. * @return {?}
  39. */
  40. function winnow(elements, qualifier, not) {
  41. return jQuery.isFunction(qualifier) ? jQuery.grep(elements, function(elem, i) {
  42. return!!qualifier.call(elem, i, elem) !== not;
  43. }) : qualifier.nodeType ? jQuery.grep(elements, function(elem) {
  44. return elem === qualifier !== not;
  45. }) : "string" != typeof qualifier ? jQuery.grep(elements, function(elem) {
  46. return core_indexOf.call(qualifier, elem) > -1 !== not;
  47. }) : isSimple.test(qualifier) ? jQuery.filter(qualifier, elements, not) : (qualifier = jQuery.filter(qualifier, elements), jQuery.grep(elements, function(elem) {
  48. return core_indexOf.call(qualifier, elem) > -1 !== not && 1 === elem.nodeType;
  49. }));
  50. }
  51. /**
  52. * @param {Object} cur
  53. * @param {string} dir
  54. * @return {?}
  55. */
  56. function _singleSibling(cur, dir) {
  57. for (;(cur = cur[dir]) && 1 !== cur.nodeType;) {
  58. }
  59. return cur;
  60. }
  61. /**
  62. * @param {string} options
  63. * @return {?}
  64. */
  65. function createOptions(options) {
  66. var buf = {};
  67. return jQuery.each(options.match(core_rnotwhite) || [], function(dataAndEvents, off) {
  68. /** @type {boolean} */
  69. buf[off] = true;
  70. }), buf;
  71. }
  72. /**
  73. * @param {?} key
  74. * @return {?}
  75. */
  76. function index(key) {
  77. return key;
  78. }
  79. /**
  80. * @param {?} obj
  81. * @return {?}
  82. */
  83. function i(obj) {
  84. throw obj;
  85. }
  86. /**
  87. * @param {?} value
  88. * @param {Function} callback
  89. * @param {Function} handler
  90. * @return {undefined}
  91. */
  92. function require(value, callback, handler) {
  93. var element;
  94. try {
  95. if (value && jQuery.isFunction(element = value.promise)) {
  96. element.call(value).done(callback).fail(handler);
  97. } else {
  98. if (value && jQuery.isFunction(element = value.then)) {
  99. element.call(value, callback, handler);
  100. } else {
  101. callback.call(void 0, value);
  102. }
  103. }
  104. } catch (prevTag) {
  105. handler.call(void 0, prevTag);
  106. }
  107. }
  108. /**
  109. * @return {undefined}
  110. */
  111. function completed() {
  112. doc.removeEventListener("DOMContentLoaded", completed);
  113. win.removeEventListener("load", completed);
  114. jQuery.ready();
  115. }
  116. /**
  117. * @return {undefined}
  118. */
  119. function Data() {
  120. this.expando = jQuery.expando + Data.uid++;
  121. }
  122. /**
  123. * @param {?} data
  124. * @return {?}
  125. */
  126. function render(data) {
  127. return "true" === data || "false" !== data && ("null" === data ? null : data === +data + "" ? +data : rbrace.test(data) ? JSON.parse(data) : data);
  128. }
  129. /**
  130. * @param {Object} elem
  131. * @param {string} udataCur
  132. * @param {Object} data
  133. * @return {?}
  134. */
  135. function dataAttr(elem, udataCur, data) {
  136. var pattern;
  137. if (void 0 === data && 1 === elem.nodeType) {
  138. if (pattern = "data-" + udataCur.replace(r20, "-$&").toLowerCase(), data = elem.getAttribute(pattern), "string" == typeof data) {
  139. try {
  140. data = render(data);
  141. } catch (e) {
  142. }
  143. data_user.set(elem, udataCur, data);
  144. } else {
  145. data = void 0;
  146. }
  147. }
  148. return data;
  149. }
  150. /**
  151. * @param {Object} elem
  152. * @param {string} prop
  153. * @param {Object} parts
  154. * @param {Object} t
  155. * @return {?}
  156. */
  157. function get(elem, prop, parts, t) {
  158. var end;
  159. /** @type {number} */
  160. var scale = 1;
  161. /** @type {number} */
  162. var g = 20;
  163. /** @type {function (): ?} */
  164. var swap = t ? function() {
  165. return t.cur();
  166. } : function() {
  167. return jQuery.css(elem, prop, "");
  168. };
  169. var target = swap();
  170. var unit = parts && parts[3] || (jQuery.cssNumber[prop] ? "" : "px");
  171. var start = (jQuery.cssNumber[prop] || "px" !== unit && +target) && regexp.exec(jQuery.css(elem, prop));
  172. if (start && start[3] !== unit) {
  173. unit = unit || start[3];
  174. parts = parts || [];
  175. /** @type {number} */
  176. start = +target || 1;
  177. do {
  178. /** @type {(number|string)} */
  179. scale = scale || ".5";
  180. start /= scale;
  181. jQuery.style(elem, prop, start + unit);
  182. } while (scale !== (scale = swap() / target) && (1 !== scale && --g));
  183. }
  184. return parts && (start = +start || (+target || 0), end = parts[1] ? start + (parts[1] + 1) * parts[2] : +parts[2], t && (t.unit = unit, t.start = start, t.end = end)), end;
  185. }
  186. /**
  187. * @param {Node} element
  188. * @return {?}
  189. */
  190. function callback(element) {
  191. var elem;
  192. var doc = element.ownerDocument;
  193. var tag = element.nodeName;
  194. var display = _elm_display[tag];
  195. return display ? display : (elem = doc.body.appendChild(doc.createElement(tag)), display = jQuery.css(elem, "display"), elem.parentNode.removeChild(elem), "none" === display && (display = "block"), _elm_display[tag] = display, display);
  196. }
  197. /**
  198. * @param {Array} elements
  199. * @param {boolean} dataAndEvents
  200. * @return {?}
  201. */
  202. function showHide(elements, dataAndEvents) {
  203. var data;
  204. var cur;
  205. /** @type {Array} */
  206. var display = [];
  207. /** @type {number} */
  208. var i = 0;
  209. var valuesLen = elements.length;
  210. for (;i < valuesLen;i++) {
  211. cur = elements[i];
  212. if (cur.style) {
  213. data = cur.style.display;
  214. if (dataAndEvents) {
  215. if ("none" === data) {
  216. display[i] = data_priv.get(cur, "display") || null;
  217. if (!display[i]) {
  218. /** @type {string} */
  219. cur.style.display = "";
  220. }
  221. }
  222. if ("" === cur.style.display) {
  223. if (isHidden(cur)) {
  224. display[i] = callback(cur);
  225. }
  226. }
  227. } else {
  228. if ("none" !== data) {
  229. /** @type {string} */
  230. display[i] = "none";
  231. data_priv.set(cur, "display", data);
  232. }
  233. }
  234. }
  235. }
  236. /** @type {number} */
  237. i = 0;
  238. for (;i < valuesLen;i++) {
  239. if (null != display[i]) {
  240. elements[i].style.display = display[i];
  241. }
  242. }
  243. return elements;
  244. }
  245. /**
  246. * @param {Node} context
  247. * @param {string} tag
  248. * @return {?}
  249. */
  250. function getAll(context, tag) {
  251. var ret;
  252. return ret = "undefined" != typeof context.getElementsByTagName ? context.getElementsByTagName(tag || "*") : "undefined" != typeof context.querySelectorAll ? context.querySelectorAll(tag || "*") : [], void 0 === tag || tag && jQuery.nodeName(context, tag) ? jQuery.merge([context], ret) : ret;
  253. }
  254. /**
  255. * @param {(Array|NodeList)} elems
  256. * @param {Array} refElements
  257. * @return {undefined}
  258. */
  259. function setGlobalEval(elems, refElements) {
  260. /** @type {number} */
  261. var i = 0;
  262. var length = elems.length;
  263. for (;i < length;i++) {
  264. data_priv.set(elems[i], "globalEval", !refElements || data_priv.get(refElements[i], "globalEval"));
  265. }
  266. }
  267. /**
  268. * @param {Array} elems
  269. * @param {Document} context
  270. * @param {boolean} scripts
  271. * @param {Object} values
  272. * @param {boolean} str
  273. * @return {?}
  274. */
  275. function parse(elems, context, scripts, values, str) {
  276. var elem;
  277. var tmp;
  278. var tag;
  279. var wrap;
  280. var contains;
  281. var j;
  282. var fragment = context.createDocumentFragment();
  283. /** @type {Array} */
  284. var nodes = [];
  285. /** @type {number} */
  286. var i = 0;
  287. var length = elems.length;
  288. for (;i < length;i++) {
  289. if (elem = elems[i], elem || 0 === elem) {
  290. if ("object" === jQuery.type(elem)) {
  291. jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
  292. } else {
  293. if (rhtml.test(elem)) {
  294. tmp = tmp || fragment.appendChild(context.createElement("div"));
  295. tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
  296. wrap = wrapMap[tag] || wrapMap._default;
  297. tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
  298. j = wrap[0];
  299. for (;j--;) {
  300. tmp = tmp.lastChild;
  301. }
  302. jQuery.merge(nodes, tmp.childNodes);
  303. tmp = fragment.firstChild;
  304. /** @type {string} */
  305. tmp.textContent = "";
  306. } else {
  307. nodes.push(context.createTextNode(elem));
  308. }
  309. }
  310. }
  311. }
  312. /** @type {string} */
  313. fragment.textContent = "";
  314. /** @type {number} */
  315. i = 0;
  316. for (;elem = nodes[i++];) {
  317. if (values && jQuery.inArray(elem, values) > -1) {
  318. if (str) {
  319. str.push(elem);
  320. }
  321. } else {
  322. if (contains = jQuery.contains(elem.ownerDocument, elem), tmp = getAll(fragment.appendChild(elem), "script"), contains && setGlobalEval(tmp), scripts) {
  323. /** @type {number} */
  324. j = 0;
  325. for (;elem = tmp[j++];) {
  326. if (rchecked.test(elem.type || "")) {
  327. scripts.push(elem);
  328. }
  329. }
  330. }
  331. }
  332. }
  333. return fragment;
  334. }
  335. /**
  336. * @return {?}
  337. */
  338. function returnTrue() {
  339. return true;
  340. }
  341. /**
  342. * @return {?}
  343. */
  344. function returnFalse() {
  345. return false;
  346. }
  347. /**
  348. * @return {?}
  349. */
  350. function safeActiveElement() {
  351. try {
  352. return doc.activeElement;
  353. } catch (a) {
  354. }
  355. }
  356. /**
  357. * @param {Object} object
  358. * @param {Object} types
  359. * @param {Object} selector
  360. * @param {Object} data
  361. * @param {Function} fn
  362. * @param {(number|string)} deepDataAndEvents
  363. * @return {?}
  364. */
  365. function on(object, types, selector, data, fn, deepDataAndEvents) {
  366. var origFn;
  367. var type;
  368. if ("object" == typeof types) {
  369. if ("string" != typeof selector) {
  370. data = data || selector;
  371. selector = void 0;
  372. }
  373. for (type in types) {
  374. on(object, type, selector, data, types[type], deepDataAndEvents);
  375. }
  376. return object;
  377. }
  378. if (null == data && null == fn ? (fn = selector, data = selector = void 0) : null == fn && ("string" == typeof selector ? (fn = data, data = void 0) : (fn = data, data = selector, selector = void 0)), fn === false) {
  379. /** @type {function (): ?} */
  380. fn = returnFalse;
  381. } else {
  382. if (!fn) {
  383. return object;
  384. }
  385. }
  386. return 1 === deepDataAndEvents && (origFn = fn, fn = function(event) {
  387. return jQuery().off(event), origFn.apply(this, arguments);
  388. }, fn.guid = origFn.guid || (origFn.guid = jQuery.guid++)), object.each(function() {
  389. jQuery.event.add(this, types, fn, data, selector);
  390. });
  391. }
  392. /**
  393. * @param {Node} elem
  394. * @param {Element} content
  395. * @return {?}
  396. */
  397. function manipulationTarget(elem, content) {
  398. return jQuery.nodeName(elem, "table") && jQuery.nodeName(11 !== content.nodeType ? content : content.firstChild, "tr") ? elem.getElementsByTagName("tbody")[0] || elem : elem;
  399. }
  400. /**
  401. * @param {Element} elem
  402. * @return {?}
  403. */
  404. function restoreScript(elem) {
  405. return elem.type = (null !== elem.getAttribute("type")) + "/" + elem.type, elem;
  406. }
  407. /**
  408. * @param {Element} s
  409. * @return {?}
  410. */
  411. function fn(s) {
  412. /** @type {(Array.<string>|null)} */
  413. var l = re.exec(s.type);
  414. return l ? s.type = l[1] : s.removeAttribute("type"), s;
  415. }
  416. /**
  417. * @param {Object} src
  418. * @param {Object} dest
  419. * @return {undefined}
  420. */
  421. function cloneCopyEvent(src, dest) {
  422. var i;
  423. var valsLength;
  424. var type;
  425. var pdataOld;
  426. var pdataCur;
  427. var udataOld;
  428. var udataCur;
  429. var events;
  430. if (1 === dest.nodeType) {
  431. if (data_priv.hasData(src) && (pdataOld = data_priv.access(src), pdataCur = data_priv.set(dest, pdataOld), events = pdataOld.events)) {
  432. delete pdataCur.handle;
  433. pdataCur.events = {};
  434. for (type in events) {
  435. /** @type {number} */
  436. i = 0;
  437. valsLength = events[type].length;
  438. for (;i < valsLength;i++) {
  439. jQuery.event.add(dest, type, events[type][i]);
  440. }
  441. }
  442. }
  443. if (data_user.hasData(src)) {
  444. udataOld = data_user.access(src);
  445. udataCur = jQuery.extend({}, udataOld);
  446. data_user.set(dest, udataCur);
  447. }
  448. }
  449. }
  450. /**
  451. * @param {Element} src
  452. * @param {Element} dest
  453. * @return {undefined}
  454. */
  455. function fixInput(src, dest) {
  456. var _undefined = dest.nodeName.toLowerCase();
  457. if ("input" === _undefined && manipulation_rcheckableType.test(src.type)) {
  458. dest.checked = src.checked;
  459. } else {
  460. if (!("input" !== _undefined && "textarea" !== _undefined)) {
  461. dest.defaultValue = src.defaultValue;
  462. }
  463. }
  464. }
  465. /**
  466. * @param {Array} obj
  467. * @param {Object} args
  468. * @param {Function} callback
  469. * @param {Element} atts
  470. * @return {?}
  471. */
  472. function update(obj, args, callback, atts) {
  473. /** @type {Array} */
  474. args = core_concat.apply([], args);
  475. var fragment;
  476. var first;
  477. var scripts;
  478. var hasScripts;
  479. var node;
  480. var doc;
  481. /** @type {number} */
  482. var i = 0;
  483. var l = obj.length;
  484. /** @type {number} */
  485. var iNoClone = l - 1;
  486. var html = args[0];
  487. var isFunction = jQuery.isFunction(html);
  488. if (isFunction || l > 1 && ("string" == typeof html && (!support.checkClone && exclude.test(html)))) {
  489. return obj.each(function(index) {
  490. var data = obj.eq(index);
  491. if (isFunction) {
  492. args[0] = html.call(this, index, data.html());
  493. }
  494. update(data, args, callback, atts);
  495. });
  496. }
  497. if (l && (fragment = parse(args, obj[0].ownerDocument, false, obj, atts), first = fragment.firstChild, 1 === fragment.childNodes.length && (fragment = first), first || atts)) {
  498. scripts = jQuery.map(getAll(fragment, "script"), restoreScript);
  499. hasScripts = scripts.length;
  500. for (;i < l;i++) {
  501. node = fragment;
  502. if (i !== iNoClone) {
  503. node = jQuery.clone(node, true, true);
  504. if (hasScripts) {
  505. jQuery.merge(scripts, getAll(node, "script"));
  506. }
  507. }
  508. callback.call(obj[i], node, i);
  509. }
  510. if (hasScripts) {
  511. doc = scripts[scripts.length - 1].ownerDocument;
  512. jQuery.map(scripts, fn);
  513. /** @type {number} */
  514. i = 0;
  515. for (;i < hasScripts;i++) {
  516. node = scripts[i];
  517. if (rchecked.test(node.type || "")) {
  518. if (!data_priv.access(node, "globalEval")) {
  519. if (jQuery.contains(doc, node)) {
  520. if (node.src) {
  521. if (jQuery._evalUrl) {
  522. jQuery._evalUrl(node.src);
  523. }
  524. } else {
  525. load(node.textContent.replace(normalizr, ""), doc);
  526. }
  527. }
  528. }
  529. }
  530. }
  531. }
  532. }
  533. return obj;
  534. }
  535. /**
  536. * @param {string} elements
  537. * @param {?} selector
  538. * @param {boolean} keepData
  539. * @return {?}
  540. */
  541. function remove(elements, selector, keepData) {
  542. var elem;
  543. var elems = selector ? jQuery.filter(selector, elements) : elements;
  544. /** @type {number} */
  545. var i = 0;
  546. for (;null != (elem = elems[i]);i++) {
  547. if (!keepData) {
  548. if (!(1 !== elem.nodeType)) {
  549. jQuery.cleanData(getAll(elem));
  550. }
  551. }
  552. if (elem.parentNode) {
  553. if (keepData) {
  554. if (jQuery.contains(elem.ownerDocument, elem)) {
  555. setGlobalEval(getAll(elem, "script"));
  556. }
  557. }
  558. elem.parentNode.removeChild(elem);
  559. }
  560. }
  561. return elements;
  562. }
  563. /**
  564. * @param {Object} node
  565. * @param {string} prop
  566. * @param {Object} styles
  567. * @return {?}
  568. */
  569. function css(node, prop, styles) {
  570. var width;
  571. var minWidth;
  572. var maxWidth;
  573. var val;
  574. var style = node.style;
  575. return styles = styles || getStyles(node), styles && (val = styles.getPropertyValue(prop) || styles[prop], "" !== val || (jQuery.contains(node.ownerDocument, node) || (val = jQuery.style(node, prop))), !support.pixelMarginRight() && (rnumnonpx.test(val) && (rbracket.test(prop) && (width = style.width, minWidth = style.minWidth, maxWidth = style.maxWidth, style.minWidth = style.maxWidth = style.width = val, val = styles.width, style.width = width, style.minWidth = minWidth, style.maxWidth = maxWidth)))),
  576. void 0 !== val ? val + "" : val;
  577. }
  578. /**
  579. * @param {?} $timeout
  580. * @param {Function} hookFn
  581. * @return {?}
  582. */
  583. function addGetHookIf($timeout, hookFn) {
  584. return{
  585. /**
  586. * @return {?}
  587. */
  588. get : function() {
  589. return $timeout() ? void delete this.get : (this.get = hookFn).apply(this, arguments);
  590. }
  591. };
  592. }
  593. /**
  594. * @param {string} str
  595. * @return {?}
  596. */
  597. function camelCase(str) {
  598. if (str in table) {
  599. return str;
  600. }
  601. var capitalized = str[0].toUpperCase() + str.slice(1);
  602. /** @type {number} */
  603. var length = VENDOR_PREFIXES.length;
  604. for (;length--;) {
  605. if (str = VENDOR_PREFIXES[length] + capitalized, str in table) {
  606. return str;
  607. }
  608. }
  609. }
  610. /**
  611. * @param {Object} elem
  612. * @param {string} value
  613. * @param {string} actual
  614. * @return {?}
  615. */
  616. function set(elem, value, actual) {
  617. /** @type {(Array.<string>|null)} */
  618. var iterator = regexp.exec(value);
  619. return iterator ? Math.max(0, iterator[2] - (actual || 0)) + (iterator[3] || "px") : value;
  620. }
  621. /**
  622. * @param {Object} elem
  623. * @param {string} keepData
  624. * @param {string} extra
  625. * @param {boolean} isBorderBox
  626. * @param {?} styles
  627. * @return {?}
  628. */
  629. function augmentWidthOrHeight(elem, keepData, extra, isBorderBox, styles) {
  630. var i;
  631. /** @type {number} */
  632. var val = 0;
  633. /** @type {number} */
  634. i = extra === (isBorderBox ? "border" : "content") ? 4 : "width" === keepData ? 1 : 0;
  635. for (;i < 4;i += 2) {
  636. if ("margin" === extra) {
  637. val += jQuery.css(elem, extra + cssExpand[i], true, styles);
  638. }
  639. if (isBorderBox) {
  640. if ("content" === extra) {
  641. val -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  642. }
  643. if ("margin" !== extra) {
  644. val -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  645. }
  646. } else {
  647. val += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
  648. if ("padding" !== extra) {
  649. val += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
  650. }
  651. }
  652. }
  653. return val;
  654. }
  655. /**
  656. * @param {Object} elem
  657. * @param {string} name
  658. * @param {string} extra
  659. * @return {?}
  660. */
  661. function getWidthOrHeight(elem, name, extra) {
  662. var val;
  663. /** @type {boolean} */
  664. var valueIsBorderBox = true;
  665. var styles = getStyles(elem);
  666. /** @type {boolean} */
  667. var isBorderBox = "border-box" === jQuery.css(elem, "boxSizing", false, styles);
  668. if (elem.getClientRects().length && (val = elem.getBoundingClientRect()[name]), val <= 0 || null == val) {
  669. if (val = css(elem, name, styles), (val < 0 || null == val) && (val = elem.style[name]), rnumnonpx.test(val)) {
  670. return val;
  671. }
  672. valueIsBorderBox = isBorderBox && (support.boxSizingReliable() || val === elem.style[name]);
  673. /** @type {number} */
  674. val = parseFloat(val) || 0;
  675. }
  676. return val + augmentWidthOrHeight(elem, name, extra || (isBorderBox ? "border" : "content"), valueIsBorderBox, styles) + "px";
  677. }
  678. /**
  679. * @param {Object} selector
  680. * @param {Function} context
  681. * @param {boolean} prop
  682. * @param {Object} end
  683. * @param {number} easing
  684. * @return {?}
  685. */
  686. function Tween(selector, context, prop, end, easing) {
  687. return new Tween.prototype.init(selector, context, prop, end, easing);
  688. }
  689. /**
  690. * @return {undefined}
  691. */
  692. function raf() {
  693. if (id) {
  694. win.requestAnimationFrame(raf);
  695. jQuery.fx.tick();
  696. }
  697. }
  698. /**
  699. * @return {?}
  700. */
  701. function createFxNow() {
  702. return win.setTimeout(function() {
  703. fxNow = void 0;
  704. }), fxNow = jQuery.now();
  705. }
  706. /**
  707. * @param {string} type
  708. * @param {boolean} includeWidth
  709. * @return {?}
  710. */
  711. function genFx(type, includeWidth) {
  712. var which;
  713. /** @type {number} */
  714. var i = 0;
  715. var attrs = {
  716. height : type
  717. };
  718. /** @type {number} */
  719. includeWidth = includeWidth ? 1 : 0;
  720. for (;i < 4;i += 2 - includeWidth) {
  721. which = cssExpand[i];
  722. attrs["margin" + which] = attrs["padding" + which] = type;
  723. }
  724. return includeWidth && (attrs.opacity = attrs.width = type), attrs;
  725. }
  726. /**
  727. * @param {?} value
  728. * @param {string} prop
  729. * @param {?} animation
  730. * @return {?}
  731. */
  732. function createTween(value, prop, animation) {
  733. var tween;
  734. var codeSegments = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]);
  735. /** @type {number} */
  736. var i = 0;
  737. var valuesLen = codeSegments.length;
  738. for (;i < valuesLen;i++) {
  739. if (tween = codeSegments[i].call(animation, prop, value)) {
  740. return tween;
  741. }
  742. }
  743. }
  744. /**
  745. * @param {Object} elem
  746. * @param {Object} props
  747. * @param {Object} opts
  748. * @return {undefined}
  749. */
  750. function defaultPrefilter(elem, props, opts) {
  751. var prop;
  752. var value;
  753. var thisp;
  754. var hooks;
  755. var oldfire;
  756. var tween;
  757. var val;
  758. var type;
  759. /** @type {boolean} */
  760. var l = "width" in props || "height" in props;
  761. var anim = this;
  762. var orig = {};
  763. var style = elem.style;
  764. var hidden = elem.nodeType && isHidden(elem);
  765. var dataShow = data_priv.get(elem, "fxshow");
  766. if (!opts.queue) {
  767. hooks = jQuery._queueHooks(elem, "fx");
  768. if (null == hooks.unqueued) {
  769. /** @type {number} */
  770. hooks.unqueued = 0;
  771. /** @type {function (): undefined} */
  772. oldfire = hooks.empty.fire;
  773. /**
  774. * @return {undefined}
  775. */
  776. hooks.empty.fire = function() {
  777. if (!hooks.unqueued) {
  778. oldfire();
  779. }
  780. };
  781. }
  782. hooks.unqueued++;
  783. anim.always(function() {
  784. anim.always(function() {
  785. hooks.unqueued--;
  786. if (!jQuery.queue(elem, "fx").length) {
  787. hooks.empty.fire();
  788. }
  789. });
  790. });
  791. }
  792. for (prop in props) {
  793. if (value = props[prop], spaceRe.test(value)) {
  794. if (delete props[prop], thisp = thisp || "toggle" === value, value === (hidden ? "hide" : "show")) {
  795. if ("show" !== value || (!dataShow || void 0 === dataShow[prop])) {
  796. continue;
  797. }
  798. /** @type {boolean} */
  799. hidden = true;
  800. }
  801. orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
  802. }
  803. }
  804. if (tween = !jQuery.isEmptyObject(props), tween || !jQuery.isEmptyObject(orig)) {
  805. if (l) {
  806. if (1 === elem.nodeType) {
  807. /** @type {Array} */
  808. opts.overflow = [style.overflow, style.overflowX, style.overflowY];
  809. val = dataShow && dataShow.display;
  810. if (null == val) {
  811. val = data_priv.get(elem, "display");
  812. }
  813. type = jQuery.css(elem, "display");
  814. if ("none" === type) {
  815. if (val) {
  816. type = val;
  817. } else {
  818. showHide([elem], true);
  819. val = elem.style.display || val;
  820. type = jQuery.css(elem, "display");
  821. showHide([elem]);
  822. }
  823. }
  824. if ("inline" === type || "inline-block" === type && null != val) {
  825. if ("none" === jQuery.css(elem, "float")) {
  826. if (!tween) {
  827. anim.done(function() {
  828. style.display = val;
  829. });
  830. if (null == val) {
  831. type = style.display;
  832. val = "none" === type ? "" : type;
  833. }
  834. }
  835. /** @type {string} */
  836. style.display = "inline-block";
  837. }
  838. }
  839. }
  840. }
  841. if (opts.overflow) {
  842. /** @type {string} */
  843. style.overflow = "hidden";
  844. anim.always(function() {
  845. style.overflow = opts.overflow[0];
  846. style.overflowX = opts.overflow[1];
  847. style.overflowY = opts.overflow[2];
  848. });
  849. }
  850. /** @type {boolean} */
  851. tween = false;
  852. for (prop in orig) {
  853. if (!tween) {
  854. if (dataShow) {
  855. if ("hidden" in dataShow) {
  856. hidden = dataShow.hidden;
  857. }
  858. } else {
  859. dataShow = data_priv.access(elem, "fxshow", {
  860. display : val
  861. });
  862. }
  863. if (thisp) {
  864. /** @type {boolean} */
  865. dataShow.hidden = !hidden;
  866. }
  867. if (hidden) {
  868. showHide([elem], true);
  869. }
  870. anim.done(function() {
  871. if (!hidden) {
  872. showHide([elem]);
  873. }
  874. data_priv.remove(elem, "fxshow");
  875. for (prop in orig) {
  876. jQuery.style(elem, prop, orig[prop]);
  877. }
  878. });
  879. }
  880. tween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
  881. if (!(prop in dataShow)) {
  882. dataShow[prop] = tween.start;
  883. if (hidden) {
  884. tween.end = tween.start;
  885. /** @type {number} */
  886. tween.start = 0;
  887. }
  888. }
  889. }
  890. }
  891. }
  892. /**
  893. * @param {Object} object
  894. * @param {Object} paramMap
  895. * @return {undefined}
  896. */
  897. function propFilter(object, paramMap) {
  898. var key;
  899. var name;
  900. var value;
  901. var data;
  902. var hooks;
  903. for (key in object) {
  904. if (name = jQuery.camelCase(key), value = paramMap[name], data = object[key], jQuery.isArray(data) && (value = data[1], data = object[key] = data[0]), key !== name && (object[name] = data, delete object[key]), hooks = jQuery.cssHooks[name], hooks && "expand" in hooks) {
  905. data = hooks.expand(data);
  906. delete object[name];
  907. for (key in data) {
  908. if (!(key in object)) {
  909. object[key] = data[key];
  910. paramMap[key] = value;
  911. }
  912. }
  913. } else {
  914. paramMap[name] = value;
  915. }
  916. }
  917. }
  918. /**
  919. * @param {Object} elem
  920. * @param {?} properties
  921. * @param {Object} options
  922. * @return {?}
  923. */
  924. function Animation(elem, properties, options) {
  925. var that;
  926. var e;
  927. /** @type {number} */
  928. var i = 0;
  929. var valuesLen = Animation.prefilters.length;
  930. var deferred = jQuery.Deferred().always(function() {
  931. delete tick.elem;
  932. });
  933. /**
  934. * @return {?}
  935. */
  936. var tick = function() {
  937. if (e) {
  938. return false;
  939. }
  940. var currentTime = fxNow || createFxNow();
  941. /** @type {number} */
  942. var remaining = Math.max(0, animation.startTime + animation.duration - currentTime);
  943. /** @type {number} */
  944. var temp = remaining / animation.duration || 0;
  945. /** @type {number} */
  946. var percent = 1 - temp;
  947. /** @type {number} */
  948. var index = 0;
  949. var length = animation.tweens.length;
  950. for (;index < length;index++) {
  951. animation.tweens[index].run(percent);
  952. }
  953. return deferred.notifyWith(elem, [animation, percent, remaining]), percent < 1 && length ? remaining : (deferred.resolveWith(elem, [animation]), false);
  954. };
  955. var animation = deferred.promise({
  956. elem : elem,
  957. props : jQuery.extend({}, properties),
  958. opts : jQuery.extend(true, {
  959. specialEasing : {},
  960. easing : jQuery.easing._default
  961. }, options),
  962. originalProperties : properties,
  963. originalOptions : options,
  964. startTime : fxNow || createFxNow(),
  965. duration : options.duration,
  966. tweens : [],
  967. /**
  968. * @param {boolean} prop
  969. * @param {?} end
  970. * @return {?}
  971. */
  972. createTween : function(prop, end) {
  973. var tween = jQuery.Tween(elem, animation.opts, prop, end, animation.opts.specialEasing[prop] || animation.opts.easing);
  974. return animation.tweens.push(tween), tween;
  975. },
  976. /**
  977. * @param {boolean} gotoEnd
  978. * @return {?}
  979. */
  980. stop : function(gotoEnd) {
  981. /** @type {number} */
  982. var index = 0;
  983. var length = gotoEnd ? animation.tweens.length : 0;
  984. if (e) {
  985. return this;
  986. }
  987. /** @type {boolean} */
  988. e = true;
  989. for (;index < length;index++) {
  990. animation.tweens[index].run(1);
  991. }
  992. return gotoEnd ? (deferred.notifyWith(elem, [animation, 1, 0]), deferred.resolveWith(elem, [animation, gotoEnd])) : deferred.rejectWith(elem, [animation, gotoEnd]), this;
  993. }
  994. });
  995. var scripts = animation.props;
  996. propFilter(scripts, animation.opts.specialEasing);
  997. for (;i < valuesLen;i++) {
  998. if (that = Animation.prefilters[i].call(animation, elem, scripts, animation.opts)) {
  999. return jQuery.isFunction(that.stop) && (jQuery._queueHooks(animation.elem, animation.opts.queue).stop = jQuery.proxy(that.stop, that)), that;
  1000. }
  1001. }
  1002. return jQuery.map(scripts, createTween, animation), jQuery.isFunction(animation.opts.start) && animation.opts.start.call(elem, animation), jQuery.fx.timer(jQuery.extend(tick, {
  1003. elem : elem,
  1004. anim : animation,
  1005. queue : animation.opts.queue
  1006. })), animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
  1007. }
  1008. /**
  1009. * @param {string} value
  1010. * @return {?}
  1011. */
  1012. function $(value) {
  1013. var dig = value.match(core_rnotwhite) || [];
  1014. return dig.join(" ");
  1015. }
  1016. /**
  1017. * @param {Element} object
  1018. * @return {?}
  1019. */
  1020. function each(object) {
  1021. return object.getAttribute && object.getAttribute("class") || "";
  1022. }
  1023. /**
  1024. * @param {string} prefix
  1025. * @param {string} obj
  1026. * @param {boolean} traditional
  1027. * @param {Function} add
  1028. * @return {undefined}
  1029. */
  1030. function buildParams(prefix, obj, traditional, add) {
  1031. var name;
  1032. if (jQuery.isArray(obj)) {
  1033. jQuery.each(obj, function(i, v) {
  1034. if (traditional || rmargin.test(prefix)) {
  1035. add(prefix, v);
  1036. } else {
  1037. buildParams(prefix + "[" + ("object" == typeof v && null != v ? i : "") + "]", v, traditional, add);
  1038. }
  1039. });
  1040. } else {
  1041. if (traditional || "object" !== jQuery.type(obj)) {
  1042. add(prefix, obj);
  1043. } else {
  1044. for (name in obj) {
  1045. buildParams(prefix + "[" + name + "]", obj[name], traditional, add);
  1046. }
  1047. }
  1048. }
  1049. }
  1050. /**
  1051. * @param {Object} structure
  1052. * @return {?}
  1053. */
  1054. function addToPrefiltersOrTransports(structure) {
  1055. return function(selector, fn) {
  1056. if ("string" != typeof selector) {
  1057. /** @type {(Function|string)} */
  1058. fn = selector;
  1059. /** @type {string} */
  1060. selector = "*";
  1061. }
  1062. var node;
  1063. /** @type {number} */
  1064. var i = 0;
  1065. var elem = selector.toLowerCase().match(core_rnotwhite) || [];
  1066. if (jQuery.isFunction(fn)) {
  1067. for (;node = elem[i++];) {
  1068. if ("+" === node[0]) {
  1069. node = node.slice(1) || "*";
  1070. (structure[node] = structure[node] || []).unshift(fn);
  1071. } else {
  1072. (structure[node] = structure[node] || []).push(fn);
  1073. }
  1074. }
  1075. }
  1076. };
  1077. }
  1078. /**
  1079. * @param {?} structure
  1080. * @param {?} options
  1081. * @param {Object} target
  1082. * @param {?} jqXHR
  1083. * @return {?}
  1084. */
  1085. function inspectPrefiltersOrTransports(structure, options, target, jqXHR) {
  1086. /**
  1087. * @param {string} key
  1088. * @return {?}
  1089. */
  1090. function inspect(key) {
  1091. var oldName;
  1092. return old[key] = true, jQuery.each(structure[key] || [], function(dataAndEvents, prefilterOrFactory) {
  1093. var name = prefilterOrFactory(options, target, jqXHR);
  1094. return "string" != typeof name || (seekingTransport || old[name]) ? seekingTransport ? !(oldName = name) : void 0 : (options.dataTypes.unshift(name), inspect(name), false);
  1095. }), oldName;
  1096. }
  1097. var old = {};
  1098. /** @type {boolean} */
  1099. var seekingTransport = structure === transports;
  1100. return inspect(options.dataTypes[0]) || !old["*"] && inspect("*");
  1101. }
  1102. /**
  1103. * @param {(Object|string)} target
  1104. * @param {Object} src
  1105. * @return {?}
  1106. */
  1107. function ajaxExtend(target, src) {
  1108. var key;
  1109. var deep;
  1110. var flatOptions = jQuery.ajaxSettings.flatOptions || {};
  1111. for (key in src) {
  1112. if (void 0 !== src[key]) {
  1113. (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key];
  1114. }
  1115. }
  1116. return deep && jQuery.extend(true, target, deep), target;
  1117. }
  1118. /**
  1119. * @param {Object} s
  1120. * @param {XMLHttpRequest} jqXHR
  1121. * @param {Object} responses
  1122. * @return {?}
  1123. */
  1124. function ajaxHandleResponses(s, jqXHR, responses) {
  1125. var ct;
  1126. var type;
  1127. var finalDataType;
  1128. var firstDataType;
  1129. var contents = s.contents;
  1130. var dataTypes = s.dataTypes;
  1131. for (;"*" === dataTypes[0];) {
  1132. dataTypes.shift();
  1133. if (void 0 === ct) {
  1134. ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
  1135. }
  1136. }
  1137. if (ct) {
  1138. for (type in contents) {
  1139. if (contents[type] && contents[type].test(ct)) {
  1140. dataTypes.unshift(type);
  1141. break;
  1142. }
  1143. }
  1144. }
  1145. if (dataTypes[0] in responses) {
  1146. finalDataType = dataTypes[0];
  1147. } else {
  1148. for (type in responses) {
  1149. if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) {
  1150. /** @type {string} */
  1151. finalDataType = type;
  1152. break;
  1153. }
  1154. if (!firstDataType) {
  1155. /** @type {string} */
  1156. firstDataType = type;
  1157. }
  1158. }
  1159. /** @type {(string|undefined)} */
  1160. finalDataType = finalDataType || firstDataType;
  1161. }
  1162. if (finalDataType) {
  1163. return finalDataType !== dataTypes[0] && dataTypes.unshift(finalDataType), responses[finalDataType];
  1164. }
  1165. }
  1166. /**
  1167. * @param {Object} s
  1168. * @param {Object} response
  1169. * @param {?} jqXHR
  1170. * @param {Object} isSuccess
  1171. * @return {?}
  1172. */
  1173. function ajaxConvert(s, response, jqXHR, isSuccess) {
  1174. var conv2;
  1175. var current;
  1176. var conv;
  1177. var tmp;
  1178. var prev;
  1179. var converters = {};
  1180. var dataTypes = s.dataTypes.slice();
  1181. if (dataTypes[1]) {
  1182. for (conv in s.converters) {
  1183. converters[conv.toLowerCase()] = s.converters[conv];
  1184. }
  1185. }
  1186. current = dataTypes.shift();
  1187. for (;current;) {
  1188. if (s.responseFields[current] && (jqXHR[s.responseFields[current]] = response), !prev && (isSuccess && (s.dataFilter && (response = s.dataFilter(response, s.dataType)))), prev = current, current = dataTypes.shift()) {
  1189. if ("*" === current) {
  1190. current = prev;
  1191. } else {
  1192. if ("*" !== prev && prev !== current) {
  1193. if (conv = converters[prev + " " + current] || converters["* " + current], !conv) {
  1194. for (conv2 in converters) {
  1195. if (tmp = conv2.split(" "), tmp[1] === current && (conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]])) {
  1196. if (conv === true) {
  1197. conv = converters[conv2];
  1198. } else {
  1199. if (converters[conv2] !== true) {
  1200. /** @type {string} */
  1201. current = tmp[0];
  1202. dataTypes.unshift(tmp[1]);
  1203. }
  1204. }
  1205. break;
  1206. }
  1207. }
  1208. }
  1209. if (conv !== true) {
  1210. if (conv && s["throws"]) {
  1211. response = conv(response);
  1212. } else {
  1213. try {
  1214. response = conv(response);
  1215. } catch (e) {
  1216. return{
  1217. state : "parsererror",
  1218. error : conv ? e : "No conversion from " + prev + " to " + current
  1219. };
  1220. }
  1221. }
  1222. }
  1223. }
  1224. }
  1225. }
  1226. }
  1227. return{
  1228. state : "success",
  1229. data : response
  1230. };
  1231. }
  1232. /**
  1233. * @param {Object} node
  1234. * @return {?}
  1235. */
  1236. function getWindow(node) {
  1237. return jQuery.isWindow(node) ? node : 9 === node.nodeType && node.defaultView;
  1238. }
  1239. /** @type {Array} */
  1240. var core_deletedIds = [];
  1241. var doc = win.document;
  1242. /** @type {function (Object): (Object|null)} */
  1243. var getPrototypeOf = Object.getPrototypeOf;
  1244. /** @type {function (this:(Array.<T>|string|{length: number}), *=, *=): Array.<T>} */
  1245. var core_slice = core_deletedIds.slice;
  1246. /** @type {function (this:*, ...[*]): Array} */
  1247. var core_concat = core_deletedIds.concat;
  1248. /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
  1249. var core_push = core_deletedIds.push;
  1250. /** @type {function (this:(Array.<T>|string|{length: number}), T, number=): number} */
  1251. var core_indexOf = core_deletedIds.indexOf;
  1252. var class2type = {};
  1253. /** @type {function (this:*): string} */
  1254. var core_toString = class2type.toString;
  1255. /** @type {function (this:Object, *): boolean} */
  1256. var hasOwn = class2type.hasOwnProperty;
  1257. /** @type {function (this:Function): string} */
  1258. var ostring = hasOwn.toString;
  1259. /** @type {string} */
  1260. var events = ostring.call(Object);
  1261. var support = {};
  1262. /** @type {string} */
  1263. var core_version = "3.1.1";
  1264. /**
  1265. * @param {Object} selector
  1266. * @param {Array} context
  1267. * @return {?}
  1268. */
  1269. var jQuery = function(selector, context) {
  1270. return new jQuery.fn.init(selector, context);
  1271. };
  1272. /** @type {RegExp} */
  1273. var rclass = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
  1274. /** @type {RegExp} */
  1275. var rmsPrefix = /^-ms-/;
  1276. /** @type {RegExp} */
  1277. var newlineRe = /-([a-z])/g;
  1278. /**
  1279. * @param {?} all
  1280. * @param {string} letter
  1281. * @return {?}
  1282. */
  1283. var fcamelCase = function(all, letter) {
  1284. return letter.toUpperCase();
  1285. };
  1286. jQuery.fn = jQuery.prototype = {
  1287. jquery : core_version,
  1288. /** @type {function (Object, Array): ?} */
  1289. constructor : jQuery,
  1290. length : 0,
  1291. /**
  1292. * @return {?}
  1293. */
  1294. toArray : function() {
  1295. return core_slice.call(this);
  1296. },
  1297. /**
  1298. * @param {Object} num
  1299. * @return {?}
  1300. */
  1301. get : function(num) {
  1302. return null == num ? core_slice.call(this) : num < 0 ? this[num + this.length] : this[num];
  1303. },
  1304. /**
  1305. * @param {Array} elems
  1306. * @return {?}
  1307. */
  1308. pushStack : function(elems) {
  1309. var ret = jQuery.merge(this.constructor(), elems);
  1310. return ret.prevObject = this, ret;
  1311. },
  1312. /**
  1313. * @param {Function} opt_attributes
  1314. * @return {?}
  1315. */
  1316. each : function(opt_attributes) {
  1317. return jQuery.each(this, opt_attributes);
  1318. },
  1319. /**
  1320. * @param {Function} callback
  1321. * @return {?}
  1322. */
  1323. map : function(callback) {
  1324. return this.pushStack(jQuery.map(this, function(el, operation) {
  1325. return callback.call(el, operation, el);
  1326. }));
  1327. },
  1328. /**
  1329. * @return {?}
  1330. */
  1331. slice : function() {
  1332. return this.pushStack(core_slice.apply(this, arguments));
  1333. },
  1334. /**
  1335. * @return {?}
  1336. */
  1337. first : function() {
  1338. return this.eq(0);
  1339. },
  1340. /**
  1341. * @return {?}
  1342. */
  1343. last : function() {
  1344. return this.eq(-1);
  1345. },
  1346. /**
  1347. * @param {number} i
  1348. * @return {?}
  1349. */
  1350. eq : function(i) {
  1351. var len = this.length;
  1352. var j = +i + (i < 0 ? len : 0);
  1353. return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
  1354. },
  1355. /**
  1356. * @return {?}
  1357. */
  1358. end : function() {
  1359. return this.prevObject || this.constructor();
  1360. },
  1361. /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
  1362. push : core_push,
  1363. /** @type {function (this:(Array.<T>|{length: number}), function (T, T): number=): ?} */
  1364. sort : core_deletedIds.sort,
  1365. /** @type {function (this:(Array.<T>|{length: number}), *=, *=, ...[T]): Array.<T>} */
  1366. splice : core_deletedIds.splice
  1367. };
  1368. /** @type {function (): ?} */
  1369. jQuery.extend = jQuery.fn.extend = function() {
  1370. var options;
  1371. var name;
  1372. var src;
  1373. var copy;
  1374. var copyIsArray;
  1375. var clone;
  1376. var target = arguments[0] || {};
  1377. /** @type {number} */
  1378. var i = 1;
  1379. /** @type {number} */
  1380. var l = arguments.length;
  1381. /** @type {boolean} */
  1382. var deep = false;
  1383. if ("boolean" == typeof target) {
  1384. /** @type {boolean} */
  1385. deep = target;
  1386. target = arguments[i] || {};
  1387. i++;
  1388. }
  1389. if (!("object" == typeof target)) {
  1390. if (!jQuery.isFunction(target)) {
  1391. target = {};
  1392. }
  1393. }
  1394. if (i === l) {
  1395. target = this;
  1396. i--;
  1397. }
  1398. for (;i < l;i++) {
  1399. if (null != (options = arguments[i])) {
  1400. for (name in options) {
  1401. src = target[name];
  1402. copy = options[name];
  1403. if (target !== copy) {
  1404. if (deep && (copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy))))) {
  1405. if (copyIsArray) {
  1406. /** @type {boolean} */
  1407. copyIsArray = false;
  1408. clone = src && jQuery.isArray(src) ? src : [];
  1409. } else {
  1410. clone = src && jQuery.isPlainObject(src) ? src : {};
  1411. }
  1412. target[name] = jQuery.extend(deep, clone, copy);
  1413. } else {
  1414. if (void 0 !== copy) {
  1415. target[name] = copy;
  1416. }
  1417. }
  1418. }
  1419. }
  1420. }
  1421. }
  1422. return target;
  1423. };
  1424. jQuery.extend({
  1425. expando : "jQuery" + (core_version + Math.random()).replace(/\D/g, ""),
  1426. isReady : true,
  1427. /**
  1428. * @param {string} elem
  1429. * @return {?}
  1430. */
  1431. error : function(elem) {
  1432. throw new Error(elem);
  1433. },
  1434. /**
  1435. * @return {undefined}
  1436. */
  1437. noop : function() {
  1438. },
  1439. /**
  1440. * @param {string} obj
  1441. * @return {?}
  1442. */
  1443. isFunction : function(obj) {
  1444. return "function" === jQuery.type(obj);
  1445. },
  1446. /** @type {function (*): boolean} */
  1447. isArray : Array.isArray,
  1448. /**
  1449. * @param {Object} obj
  1450. * @return {?}
  1451. */
  1452. isWindow : function(obj) {
  1453. return null != obj && obj === obj.window;
  1454. },
  1455. /**
  1456. * @param {string} arg
  1457. * @return {?}
  1458. */
  1459. isNumeric : function(arg) {
  1460. var type = jQuery.type(arg);
  1461. return("number" === type || "string" === type) && !isNaN(arg - parseFloat(arg));
  1462. },
  1463. /**
  1464. * @param {string} obj
  1465. * @return {?}
  1466. */
  1467. isPlainObject : function(obj) {
  1468. var node;
  1469. var it;
  1470. return!(!obj || "[object Object]" !== core_toString.call(obj)) && (!(node = getPrototypeOf(obj)) || (it = hasOwn.call(node, "constructor") && node.constructor, "function" == typeof it && ostring.call(it) === events));
  1471. },
  1472. /**
  1473. * @param {?} obj
  1474. * @return {?}
  1475. */
  1476. isEmptyObject : function(obj) {
  1477. var prop;
  1478. for (prop in obj) {
  1479. return false;
  1480. }
  1481. return true;
  1482. },
  1483. /**
  1484. * @param {string} obj
  1485. * @return {?}
  1486. */
  1487. type : function(obj) {
  1488. return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[core_toString.call(obj)] || "object" : typeof obj;
  1489. },
  1490. /**
  1491. * @param {string} data
  1492. * @return {undefined}
  1493. */
  1494. globalEval : function(data) {
  1495. load(data);
  1496. },
  1497. /**
  1498. * @param {string} string
  1499. * @return {?}
  1500. */
  1501. camelCase : function(string) {
  1502. return string.replace(rmsPrefix, "ms-").replace(newlineRe, fcamelCase);
  1503. },
  1504. /**
  1505. * @param {Node} elem
  1506. * @param {string} name
  1507. * @return {?}
  1508. */
  1509. nodeName : function(elem, name) {
  1510. return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
  1511. },
  1512. /**
  1513. * @param {Function} obj
  1514. * @param {Function} callback
  1515. * @return {?}
  1516. */
  1517. each : function(obj, callback) {
  1518. var l;
  1519. /** @type {number} */
  1520. var i = 0;
  1521. if (isArraylike(obj)) {
  1522. l = obj.length;
  1523. for (;i < l;i++) {
  1524. if (callback.call(obj[i], i, obj[i]) === false) {
  1525. break;
  1526. }
  1527. }
  1528. } else {
  1529. for (i in obj) {
  1530. if (callback.call(obj[i], i, obj[i]) === false) {
  1531. break;
  1532. }
  1533. }
  1534. }
  1535. return obj;
  1536. },
  1537. /**
  1538. * @param {(number|string)} s
  1539. * @return {?}
  1540. */
  1541. trim : function(s) {
  1542. return null == s ? "" : (s + "").replace(rclass, "");
  1543. },
  1544. /**
  1545. * @param {?} arr
  1546. * @param {Array} results
  1547. * @return {?}
  1548. */
  1549. makeArray : function(arr, results) {
  1550. var ret = results || [];
  1551. return null != arr && (isArraylike(Object(arr)) ? jQuery.merge(ret, "string" == typeof arr ? [arr] : arr) : core_push.call(ret, arr)), ret;
  1552. },
  1553. /**
  1554. * @param {?} elem
  1555. * @param {?} arr
  1556. * @param {?} i
  1557. * @return {?}
  1558. */
  1559. inArray : function(elem, arr, i) {
  1560. return null == arr ? -1 : core_indexOf.call(arr, elem, i);
  1561. },
  1562. /**
  1563. * @param {Array} first
  1564. * @param {?} second
  1565. * @return {?}
  1566. */
  1567. merge : function(first, second) {
  1568. /** @type {number} */
  1569. var subLn = +second.length;
  1570. /** @type {number} */
  1571. var j = 0;
  1572. var i = first.length;
  1573. for (;j < subLn;j++) {
  1574. first[i++] = second[j];
  1575. }
  1576. return first.length = i, first;
  1577. },
  1578. /**
  1579. * @param {Array} elems
  1580. * @param {Function} callback
  1581. * @param {?} inv
  1582. * @return {?}
  1583. */
  1584. grep : function(elems, callback, inv) {
  1585. var val;
  1586. /** @type {Array} */
  1587. var ret = [];
  1588. /** @type {number} */
  1589. var i = 0;
  1590. var length = elems.length;
  1591. /** @type {boolean} */
  1592. var skip = !inv;
  1593. for (;i < length;i++) {
  1594. /** @type {boolean} */
  1595. val = !callback(elems[i], i);
  1596. if (val !== skip) {
  1597. ret.push(elems[i]);
  1598. }
  1599. }
  1600. return ret;
  1601. },
  1602. /**
  1603. * @param {Object} elems
  1604. * @param {Function} callback
  1605. * @param {?} arg
  1606. * @return {?}
  1607. */
  1608. map : function(elems, callback, arg) {
  1609. var valsLength;
  1610. var value;
  1611. /** @type {number} */
  1612. var i = 0;
  1613. /** @type {Array} */
  1614. var ret = [];
  1615. if (isArraylike(elems)) {
  1616. valsLength = elems.length;
  1617. for (;i < valsLength;i++) {
  1618. value = callback(elems[i], i, arg);
  1619. if (null != value) {
  1620. ret.push(value);
  1621. }
  1622. }
  1623. } else {
  1624. for (i in elems) {
  1625. value = callback(elems[i], i, arg);
  1626. if (null != value) {
  1627. ret.push(value);
  1628. }
  1629. }
  1630. }
  1631. return core_concat.apply([], ret);
  1632. },
  1633. guid : 1,
  1634. /**
  1635. * @param {Object} fn
  1636. * @param {(Function|string)} context
  1637. * @return {?}
  1638. */
  1639. proxy : function(fn, context) {
  1640. var tmp;
  1641. var args;
  1642. var proxy;
  1643. if ("string" == typeof context && (tmp = fn[context], context = fn, fn = tmp), jQuery.isFunction(fn)) {
  1644. return args = core_slice.call(arguments, 2), proxy = function() {
  1645. return fn.apply(context || this, args.concat(core_slice.call(arguments)));
  1646. }, proxy.guid = fn.guid = fn.guid || jQuery.guid++, proxy;
  1647. }
  1648. },
  1649. /** @type {function (): number} */
  1650. now : Date.now,
  1651. support : support
  1652. });
  1653. if ("function" == typeof Symbol) {
  1654. jQuery.fn[Symbol.iterator] = core_deletedIds[Symbol.iterator];
  1655. }
  1656. jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function(dataAndEvents, m3) {
  1657. class2type["[object " + m3 + "]"] = m3.toLowerCase();
  1658. });
  1659. var Sizzle = function(win) {
  1660. /**
  1661. * @param {string} selector
  1662. * @param {Object} context
  1663. * @param {Array} results
  1664. * @param {Array} seed
  1665. * @return {?}
  1666. */
  1667. function Sizzle(selector, context, results, seed) {
  1668. var m;
  1669. var i;
  1670. var elem;
  1671. var ret;
  1672. var match;
  1673. var groups;
  1674. var elements;
  1675. var c = context && context.ownerDocument;
  1676. var midline = context ? context.nodeType : 9;
  1677. if (results = results || [], "string" != typeof selector || (!selector || 1 !== midline && (9 !== midline && 11 !== midline))) {
  1678. return results;
  1679. }
  1680. if (!seed && ((context ? context.ownerDocument || context : preferredDoc) !== doc && setDocument(context), context = context || doc, documentIsHTML)) {
  1681. if (11 !== midline && (match = rquickExpr.exec(selector))) {
  1682. if (m = match[1]) {
  1683. if (9 === midline) {
  1684. if (!(elem = context.getElementById(m))) {
  1685. return results;
  1686. }
  1687. if (elem.id === m) {
  1688. return results.push(elem), results;
  1689. }
  1690. } else {
  1691. if (c && ((elem = c.getElementById(m)) && (contains(context, elem) && elem.id === m))) {
  1692. return results.push(elem), results;
  1693. }
  1694. }
  1695. } else {
  1696. if (match[2]) {
  1697. return push.apply(results, context.getElementsByTagName(selector)), results;
  1698. }
  1699. if ((m = match[3]) && (support.getElementsByClassName && context.getElementsByClassName)) {
  1700. return push.apply(results, context.getElementsByClassName(m)), results;
  1701. }
  1702. }
  1703. }
  1704. if (support.qsa && (!compilerCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector)))) {
  1705. if (1 !== midline) {
  1706. /** @type {Object} */
  1707. c = context;
  1708. /** @type {string} */
  1709. elements = selector;
  1710. } else {
  1711. if ("object" !== context.nodeName.toLowerCase()) {
  1712. if (ret = context.getAttribute("id")) {
  1713. ret = ret.replace(rreturn, filter);
  1714. } else {
  1715. context.setAttribute("id", ret = expando);
  1716. }
  1717. groups = tokenize(selector);
  1718. i = groups.length;
  1719. for (;i--;) {
  1720. /** @type {string} */
  1721. groups[i] = "#" + ret + " " + toSelector(groups[i]);
  1722. }
  1723. elements = groups.join(",");
  1724. c = rsibling.test(selector) && testContext(context.parentNode) || context;
  1725. }
  1726. }
  1727. if (elements) {
  1728. try {
  1729. return push.apply(results, c.querySelectorAll(elements)), results;
  1730. } catch (x) {
  1731. } finally {
  1732. if (ret === expando) {
  1733. context.removeAttribute("id");
  1734. }
  1735. }
  1736. }
  1737. }
  1738. }
  1739. return select(selector.replace(rtrim, "$1"), context, results, seed);
  1740. }
  1741. /**
  1742. * @return {?}
  1743. */
  1744. function createCache() {
  1745. /**
  1746. * @param {string} key
  1747. * @param {?} value
  1748. * @return {?}
  1749. */
  1750. function cache(key, value) {
  1751. return buf.push(key + " ") > Expr.cacheLength && delete cache[buf.shift()], cache[key + " "] = value;
  1752. }
  1753. /** @type {Array} */
  1754. var buf = [];
  1755. return cache;
  1756. }
  1757. /**
  1758. * @param {Function} fn
  1759. * @return {?}
  1760. */
  1761. function markFunction(fn) {
  1762. return fn[expando] = true, fn;
  1763. }
  1764. /**
  1765. * @param {Function} fn
  1766. * @return {?}
  1767. */
  1768. function assert(fn) {
  1769. var el = doc.createElement("fieldset");
  1770. try {
  1771. return!!fn(el);
  1772. } catch (c) {
  1773. return false;
  1774. } finally {
  1775. if (el.parentNode) {
  1776. el.parentNode.removeChild(el);
  1777. }
  1778. /** @type {null} */
  1779. el = null;
  1780. }
  1781. }
  1782. /**
  1783. * @param {string} attrs
  1784. * @param {Function} handler
  1785. * @return {undefined}
  1786. */
  1787. function addHandle(attrs, handler) {
  1788. var arr = attrs.split("|");
  1789. var i = arr.length;
  1790. for (;i--;) {
  1791. /** @type {Function} */
  1792. Expr.attrHandle[arr[i]] = handler;
  1793. }
  1794. }
  1795. /**
  1796. * @param {Element} a
  1797. * @param {Element} b
  1798. * @return {?}
  1799. */
  1800. function siblingCheck(a, b) {
  1801. var cur = b && a;
  1802. var diff = cur && (1 === a.nodeType && (1 === b.nodeType && a.sourceIndex - b.sourceIndex));
  1803. if (diff) {
  1804. return diff;
  1805. }
  1806. if (cur) {
  1807. for (;cur = cur.nextSibling;) {
  1808. if (cur === b) {
  1809. return-1;
  1810. }
  1811. }
  1812. }
  1813. return a ? 1 : -1;
  1814. }
  1815. /**
  1816. * @param {?} type
  1817. * @return {?}
  1818. */
  1819. function createInputPseudo(type) {
  1820. return function(elem) {
  1821. var b = elem.nodeName.toLowerCase();
  1822. return "input" === b && elem.type === type;
  1823. };
  1824. }
  1825. /**
  1826. * @param {?} type
  1827. * @return {?}
  1828. */
  1829. function createButtonPseudo(type) {
  1830. return function(elem) {
  1831. var NULL = elem.nodeName.toLowerCase();
  1832. return("input" === NULL || "button" === NULL) && elem.type === type;
  1833. };
  1834. }
  1835. /**
  1836. * @param {?} val
  1837. * @return {?}
  1838. */
  1839. function init(val) {
  1840. return function(option) {
  1841. return "form" in option ? option.parentNode && option.disabled === false ? "label" in option ? "label" in option.parentNode ? option.parentNode.disabled === val : option.disabled === val : option.isDisabled === val || option.isDisabled !== !val && jQuery(option) === val : option.disabled === val : "label" in option && option.disabled === val;
  1842. };
  1843. }
  1844. /**
  1845. * @param {Function} fn
  1846. * @return {?}
  1847. */
  1848. function createPositionalPseudo(fn) {
  1849. return markFunction(function(argument) {
  1850. return argument = +argument, markFunction(function(seed, matches) {
  1851. var j;
  1852. var matchIndexes = fn([], seed.length, argument);
  1853. var i = matchIndexes.length;
  1854. for (;i--;) {
  1855. if (seed[j = matchIndexes[i]]) {
  1856. /** @type {boolean} */
  1857. seed[j] = !(matches[j] = seed[j]);
  1858. }
  1859. }
  1860. });
  1861. });
  1862. }
  1863. /**
  1864. * @param {Object} context
  1865. * @return {?}
  1866. */
  1867. function testContext(context) {
  1868. return context && ("undefined" != typeof context.getElementsByTagName && context);
  1869. }
  1870. /**
  1871. * @return {undefined}
  1872. */
  1873. function setFilters() {
  1874. }
  1875. /**
  1876. * @param {Array} tokens
  1877. * @return {?}
  1878. */
  1879. function toSelector(tokens) {
  1880. /** @type {number} */
  1881. var ti = 0;
  1882. var nTokens = tokens.length;
  1883. /** @type {string} */
  1884. var selector = "";
  1885. for (;ti < nTokens;ti++) {
  1886. selector += tokens[ti].value;
  1887. }
  1888. return selector;
  1889. }
  1890. /**
  1891. * @param {Function} done
  1892. * @param {Object} element
  1893. * @param {boolean} dataAndEvents
  1894. * @return {?}
  1895. */
  1896. function addCombinator(done, element, dataAndEvents) {
  1897. var parentNode = element.dir;
  1898. var node = element.next;
  1899. var root = node || parentNode;
  1900. var g = dataAndEvents && "parentNode" === root;
  1901. /** @type {number} */
  1902. var id = rightId++;
  1903. return element.first ? function(element, profile, code) {
  1904. for (;element = element[parentNode];) {
  1905. if (1 === element.nodeType || g) {
  1906. return done(element, profile, code);
  1907. }
  1908. }
  1909. return false;
  1910. } : function(element, context, code) {
  1911. var args;
  1912. var item;
  1913. var pair;
  1914. /** @type {Array} */
  1915. var data = [dirruns, id];
  1916. if (code) {
  1917. for (;element = element[parentNode];) {
  1918. if ((1 === element.nodeType || g) && done(element, context, code)) {
  1919. return true;
  1920. }
  1921. }
  1922. } else {
  1923. for (;element = element[parentNode];) {
  1924. if (1 === element.nodeType || g) {
  1925. if (pair = element[expando] || (element[expando] = {}), item = pair[element.uniqueID] || (pair[element.uniqueID] = {}), node && node === element.nodeName.toLowerCase()) {
  1926. element = element[parentNode] || element;
  1927. } else {
  1928. if ((args = item[root]) && (args[0] === dirruns && args[1] === id)) {
  1929. return data[2] = args[2];
  1930. }
  1931. if (item[root] = data, data[2] = done(element, context, code)) {
  1932. return true;
  1933. }
  1934. }
  1935. }
  1936. }
  1937. }
  1938. return false;
  1939. };
  1940. }
  1941. /**
  1942. * @param {Array} matchers
  1943. * @return {?}
  1944. */
  1945. function elementMatcher(matchers) {
  1946. return matchers.length > 1 ? function(elem, context, xml) {
  1947. var i = matchers.length;
  1948. for (;i--;) {
  1949. if (!matchers[i](elem, context, xml)) {
  1950. return false;
  1951. }
  1952. }
  1953. return true;
  1954. } : matchers[0];
  1955. }
  1956. /**
  1957. * @param {string} selector
  1958. * @param {Array} contexts
  1959. * @param {?} results
  1960. * @return {?}
  1961. */
  1962. function multipleContexts(selector, contexts, results) {
  1963. /** @type {number} */
  1964. var i = 0;
  1965. var len = contexts.length;
  1966. for (;i < len;i++) {
  1967. Sizzle(selector, contexts[i], results);
  1968. }
  1969. return results;
  1970. }
  1971. /**
  1972. * @param {Array} a
  1973. * @param {Object} map
  1974. * @param {Function} filter
  1975. * @param {?} context
  1976. * @param {?} xml
  1977. * @return {?}
  1978. */
  1979. function condense(a, map, filter, context, xml) {
  1980. var item;
  1981. /** @type {Array} */
  1982. var caseSensitive = [];
  1983. /** @type {number} */
  1984. var i = 0;
  1985. var aLength = a.length;
  1986. /** @type {boolean} */
  1987. var j = null != map;
  1988. for (;i < aLength;i++) {
  1989. if (item = a[i]) {
  1990. if (!(filter && !filter(item, context, xml))) {
  1991. caseSensitive.push(item);
  1992. if (j) {
  1993. map.push(i);
  1994. }
  1995. }
  1996. }
  1997. }
  1998. return caseSensitive;
  1999. }
  2000. /**
  2001. * @param {string} preFilter
  2002. * @param {string} selector
  2003. * @param {boolean} matcher
  2004. * @param {Object} postFilter
  2005. * @param {Object} postFinder
  2006. * @param {string} postSelector
  2007. * @return {?}
  2008. */
  2009. function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
  2010. return postFilter && (!postFilter[expando] && (postFilter = setMatcher(postFilter))), postFinder && (!postFinder[expando] && (postFinder = setMatcher(postFinder, postSelector))), markFunction(function(seed, results, context, xml) {
  2011. var temp;
  2012. var i;
  2013. var elem;
  2014. /** @type {Array} */
  2015. var preMap = [];
  2016. /** @type {Array} */
  2017. var postMap = [];
  2018. var preexisting = results.length;
  2019. var QUnit = seed || multipleContexts(selector || "*", context.nodeType ? [context] : context, []);
  2020. var matcherIn = !preFilter || !seed && selector ? QUnit : condense(QUnit, preMap, preFilter, context, xml);
  2021. var matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
  2022. if (matcher && matcher(matcherIn, matcherOut, context, xml), postFilter) {
  2023. temp = condense(matcherOut, postMap);
  2024. postFilter(temp, [], context, xml);
  2025. i = temp.length;
  2026. for (;i--;) {
  2027. if (elem = temp[i]) {
  2028. /** @type {boolean} */
  2029. matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
  2030. }
  2031. }
  2032. }
  2033. if (seed) {
  2034. if (postFinder || preFilter) {
  2035. if (postFinder) {
  2036. /** @type {Array} */
  2037. temp = [];
  2038. i = matcherOut.length;
  2039. for (;i--;) {
  2040. if (elem = matcherOut[i]) {
  2041. temp.push(matcherIn[i] = elem);
  2042. }
  2043. }
  2044. postFinder(null, matcherOut = [], temp, xml);
  2045. }
  2046. i = matcherOut.length;
  2047. for (;i--;) {
  2048. if (elem = matcherOut[i]) {
  2049. if ((temp = postFinder ? sortFunction(seed, elem) : preMap[i]) > -1) {
  2050. /** @type {boolean} */
  2051. seed[temp] = !(results[temp] = elem);
  2052. }
  2053. }
  2054. }
  2055. }
  2056. } else {
  2057. matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
  2058. if (postFinder) {
  2059. postFinder(null, results, matcherOut, xml);
  2060. } else {
  2061. push.apply(results, matcherOut);
  2062. }
  2063. }
  2064. });
  2065. }
  2066. /**
  2067. * @param {Object} tokens
  2068. * @return {?}
  2069. */
  2070. function matcherFromTokens(tokens) {
  2071. var a;
  2072. var matcher;
  2073. var j;
  2074. var len = tokens.length;
  2075. var leadingRelative = Expr.relative[tokens[0].type];
  2076. var implicitRelative = leadingRelative || Expr.relative[" "];
  2077. /** @type {number} */
  2078. var i = leadingRelative ? 1 : 0;
  2079. var matchContext = addCombinator(function(out) {
  2080. return out === a;
  2081. }, implicitRelative, true);
  2082. var matchAnyContext = addCombinator(function(walkers) {
  2083. return sortFunction(a, walkers) > -1;
  2084. }, implicitRelative, true);
  2085. /** @type {Array} */
  2086. var matchers = [function(elem, context, xml) {
  2087. var e = !leadingRelative && (xml || context !== queuedFn) || ((a = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
  2088. return a = null, e;
  2089. }];
  2090. for (;i < len;i++) {
  2091. if (matcher = Expr.relative[tokens[i].type]) {
  2092. /** @type {Array} */
  2093. matchers = [addCombinator(elementMatcher(matchers), matcher)];
  2094. } else {
  2095. if (matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches), matcher[expando]) {
  2096. /** @type {number} */
  2097. j = ++i;
  2098. for (;j < len;j++) {
  2099. if (Expr.relative[tokens[j].type]) {
  2100. break;
  2101. }
  2102. }
  2103. return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({
  2104. value : " " === tokens[i - 2].type ? "*" : ""
  2105. })).replace(rtrim, "$1"), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
  2106. }
  2107. matchers.push(matcher);
  2108. }
  2109. }
  2110. return elementMatcher(matchers);
  2111. }
  2112. /**
  2113. * @param {Array} elementMatchers
  2114. * @param {Array} setMatchers
  2115. * @return {?}
  2116. */
  2117. function matcherFromGroupMatchers(elementMatchers, setMatchers) {
  2118. /** @type {boolean} */
  2119. var bySet = setMatchers.length > 0;
  2120. /** @type {boolean} */
  2121. var triggerElem = elementMatchers.length > 0;
  2122. /**
  2123. * @param {HTMLElement} dataAndEvents
  2124. * @param {undefined} xml
  2125. * @param {boolean} context
  2126. * @param {Array} results
  2127. * @param {Object} seed
  2128. * @return {?}
  2129. */
  2130. var superMatcher = function(dataAndEvents, xml, context, results, seed) {
  2131. var elem;
  2132. var j;
  2133. var matcher;
  2134. /** @type {number} */
  2135. var matchedCount = 0;
  2136. /** @type {string} */
  2137. var i = "0";
  2138. var unmatched = dataAndEvents && [];
  2139. /** @type {Array} */
  2140. var setMatched = [];
  2141. var fn = queuedFn;
  2142. var elems = dataAndEvents || triggerElem && Expr.find.TAG("*", seed);
  2143. var dirrunsUnique = dirruns += null == fn ? 1 : Math.random() || 0.1;
  2144. var len = elems.length;
  2145. if (seed) {
  2146. queuedFn = xml === doc || (xml || seed);
  2147. }
  2148. for (;i !== len && null != (elem = elems[i]);i++) {
  2149. if (triggerElem && elem) {
  2150. /** @type {number} */
  2151. j = 0;
  2152. if (!xml) {
  2153. if (!(elem.ownerDocument === doc)) {
  2154. setDocument(elem);
  2155. /** @type {boolean} */
  2156. context = !documentIsHTML;
  2157. }
  2158. }
  2159. for (;matcher = elementMatchers[j++];) {
  2160. if (matcher(elem, xml || doc, context)) {
  2161. results.push(elem);
  2162. break;
  2163. }
  2164. }
  2165. if (seed) {
  2166. dirruns = dirrunsUnique;
  2167. }
  2168. }
  2169. if (bySet) {
  2170. if (elem = !matcher && elem) {
  2171. matchedCount--;
  2172. }
  2173. if (dataAndEvents) {
  2174. unmatched.push(elem);
  2175. }
  2176. }
  2177. }
  2178. if (matchedCount += i, bySet && i !== matchedCount) {
  2179. /** @type {number} */
  2180. j = 0;
  2181. for (;matcher = setMatchers[j++];) {
  2182. matcher(unmatched, setMatched, xml, context);
  2183. }
  2184. if (dataAndEvents) {
  2185. if (matchedCount > 0) {
  2186. for (;i--;) {
  2187. if (!unmatched[i]) {
  2188. if (!setMatched[i]) {
  2189. setMatched[i] = pop.call(results);
  2190. }
  2191. }
  2192. }
  2193. }
  2194. setMatched = condense(setMatched);
  2195. }
  2196. push.apply(results, setMatched);
  2197. if (seed) {
  2198. if (!dataAndEvents) {
  2199. if (setMatched.length > 0) {
  2200. if (matchedCount + setMatchers.length > 1) {
  2201. Sizzle.uniqueSort(results);
  2202. }
  2203. }
  2204. }
  2205. }
  2206. }
  2207. return seed && (dirruns = dirrunsUnique, queuedFn = fn), unmatched;
  2208. };
  2209. return bySet ? markFunction(superMatcher) : superMatcher;
  2210. }
  2211. var i;
  2212. var support;
  2213. var Expr;
  2214. var getText;
  2215. var isXML;
  2216. var tokenize;
  2217. var compile;
  2218. var select;
  2219. var queuedFn;
  2220. var sortInput;
  2221. var l;
  2222. var setDocument;
  2223. var doc;
  2224. var docElem;
  2225. var documentIsHTML;
  2226. var rbuggyQSA;
  2227. var rbuggyMatches;
  2228. var matches;
  2229. var contains;
  2230. /** @type {string} */
  2231. var expando = "sizzle" + 1 * new Date;
  2232. var preferredDoc = win.document;
  2233. /** @type {number} */
  2234. var dirruns = 0;
  2235. /** @type {number} */
  2236. var rightId = 0;
  2237. var classCache = createCache();
  2238. var tokenCache = createCache();
  2239. var compilerCache = createCache();
  2240. /**
  2241. * @param {?} a
  2242. * @param {?} b
  2243. * @return {?}
  2244. */
  2245. var sortOrder = function(a, b) {
  2246. return a === b && (l = true), 0;
  2247. };
  2248. /** @type {function (this:Object, *): boolean} */
  2249. var hasOwn = {}.hasOwnProperty;
  2250. /** @type {Array} */
  2251. var arr = [];
  2252. /** @type {function (this:(Array.<T>|{length: number})): T} */
  2253. var pop = arr.pop;
  2254. /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
  2255. var push_native = arr.push;
  2256. /** @type {function (this:(Array.<T>|{length: number}), ...[T]): number} */
  2257. var push = arr.push;
  2258. /** @type {function (this:(Array.<T>|string|{length: number}), *=, *=): Array.<T>} */
  2259. var slice = arr.slice;
  2260. /**
  2261. * @param {Object} a
  2262. * @param {?} obj
  2263. * @return {?}
  2264. */
  2265. var sortFunction = function(a, obj) {
  2266. /** @type {number} */
  2267. var i = 0;
  2268. var aLength = a.length;
  2269. for (;i < aLength;i++) {
  2270. if (a[i] === obj) {
  2271. return i;
  2272. }
  2273. }
  2274. return-1;
  2275. };
  2276. /** @type {string} */
  2277. var booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped";
  2278. /** @type {string} */
  2279. var whitespace = "[\\x20\\t\\r\\n\\f]";
  2280. /** @type {string} */
  2281. var ele = "(?:\\\\.|[\\w-]|[^\x00-\\xa0])+";
  2282. /** @type {string} */
  2283. var attributes = "\\[" + whitespace + "*(" + ele + ")(?:" + whitespace + "*([*^$|!~]?=)" + whitespace + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + ele + "))|)" + whitespace + "*\\]";
  2284. /** @type {string} */
  2285. var pseudos = ":(" + ele + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|.*)\\)|)";
  2286. /** @type {RegExp} */
  2287. var regexp = new RegExp(whitespace + "+", "g");
  2288. /** @type {RegExp} */
  2289. var rtrim = new RegExp("^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g");
  2290. /** @type {RegExp} */
  2291. var rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*");
  2292. /** @type {RegExp} */
  2293. var rcombinators = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*");
  2294. /** @type {RegExp} */
  2295. var rattributeQuotes = new RegExp("=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g");
  2296. /** @type {RegExp} */
  2297. var rpseudo = new RegExp(pseudos);
  2298. /** @type {RegExp} */
  2299. var ridentifier = new RegExp("^" + ele + "$");
  2300. var matchExpr = {
  2301. ID : new RegExp("^#(" + ele + ")"),
  2302. CLASS : new RegExp("^\\.(" + ele + ")"),
  2303. TAG : new RegExp("^(" + ele + "|[*])"),
  2304. ATTR : new RegExp("^" + attributes),
  2305. PSEUDO : new RegExp("^" + pseudos),
  2306. CHILD : new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i"),
  2307. bool : new RegExp("^(?:" + booleans + ")$", "i"),
  2308. needsContext : new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
  2309. };
  2310. /** @type {RegExp} */
  2311. var rinputs = /^(?:input|select|textarea|button)$/i;
  2312. /** @type {RegExp} */
  2313. var rheader = /^h\d$/i;
  2314. /** @type {RegExp} */
  2315. var rnative = /^[^{]+\{\s*\[native \w/;
  2316. /** @type {RegExp} */
  2317. var rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/;
  2318. /** @type {RegExp} */
  2319. var rsibling = /[+~]/;
  2320. /** @type {RegExp} */
  2321. var runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig");
  2322. /**
  2323. * @param {?} _
  2324. * @param {(number|string)} escaped
  2325. * @param {boolean} escapedWhitespace
  2326. * @return {?}
  2327. */
  2328. var funescape = function(_, escaped, escapedWhitespace) {
  2329. /** @type {number} */
  2330. var high = "0x" + escaped - 65536;
  2331. return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, 1023 & high | 56320);
  2332. };
  2333. /** @type {RegExp} */
  2334. var rreturn = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g;
  2335. /**
  2336. * @param {string} from
  2337. * @param {boolean} to
  2338. * @return {?}
  2339. */
  2340. var filter = function(from, to) {
  2341. return to ? "\x00" === from ? "\ufffd" : from.slice(0, -1) + "\\" + from.charCodeAt(from.length - 1).toString(16) + " " : "\\" + from;
  2342. };
  2343. /**
  2344. * @return {undefined}
  2345. */
  2346. var f = function() {
  2347. setDocument();
  2348. };
  2349. var jQuery = addCombinator(function(config) {
  2350. return config.disabled === true && ("form" in config || "label" in config);
  2351. }, {
  2352. dir : "parentNode",
  2353. next : "legend"
  2354. });
  2355. try {
  2356. push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
  2357. arr[preferredDoc.childNodes.length].nodeType;
  2358. } catch (fa) {
  2359. push = {
  2360. /** @type {function (?, Object): undefined} */
  2361. apply : arr.length ? function(a, els) {
  2362. push_native.apply(a, slice.call(els));
  2363. } : function(target, els) {
  2364. var j = target.length;
  2365. /** @type {number} */
  2366. var i = 0;
  2367. for (;target[j++] = els[i++];) {
  2368. }
  2369. /** @type {number} */
  2370. target.length = j - 1;
  2371. }
  2372. };
  2373. }
  2374. support = Sizzle.support = {};
  2375. /** @type {function (Object): ?} */
  2376. isXML = Sizzle.isXML = function(elem) {
  2377. var node = elem && (elem.ownerDocument || elem).documentElement;
  2378. return!!node && "HTML" !== node.nodeName;
  2379. };
  2380. /** @type {function (boolean): ?} */
  2381. setDocument = Sizzle.setDocument = function(node) {
  2382. var hasCompare;
  2383. var win;
  2384. var result = node ? node.ownerDocument || node : preferredDoc;
  2385. return result !== doc && (9 === result.nodeType && result.documentElement) ? (doc = result, docElem = doc.documentElement, documentIsHTML = !isXML(doc), preferredDoc !== doc && ((win = doc.defaultView) && (win.top !== win && (win.addEventListener ? win.addEventListener("unload", f, false) : win.attachEvent && win.attachEvent("onunload", f)))), support.attributes = assert(function(div) {
  2386. return div.className = "i", !div.getAttribute("className");
  2387. }), support.getElementsByTagName = assert(function(div) {
  2388. return div.appendChild(doc.createComment("")), !div.getElementsByTagName("*").length;
  2389. }), support.getElementsByClassName = rnative.test(doc.getElementsByClassName), support.getById = assert(function(div) {
  2390. return docElem.appendChild(div).id = expando, !doc.getElementsByName || !doc.getElementsByName(expando).length;
  2391. }), support.getById ? (Expr.filter.ID = function(id) {
  2392. var attrId = id.replace(runescape, funescape);
  2393. return function(elem) {
  2394. return elem.getAttribute("id") === attrId;
  2395. };
  2396. }, Expr.find.ID = function(id, context) {
  2397. if ("undefined" != typeof context.getElementById && documentIsHTML) {
  2398. var m = context.getElementById(id);
  2399. return m ? [m] : [];
  2400. }
  2401. }) : (Expr.filter.ID = function(id) {
  2402. var attrId = id.replace(runescape, funescape);
  2403. return function(elem) {
  2404. var node = "undefined" != typeof elem.getAttributeNode && elem.getAttributeNode("id");
  2405. return node && node.value === attrId;
  2406. };
  2407. }, Expr.find.ID = function(id, context) {
  2408. if ("undefined" != typeof context.getElementById && documentIsHTML) {
  2409. var m;
  2410. var i;
  2411. var nodes;
  2412. var elem = context.getElementById(id);
  2413. if (elem) {
  2414. if (m = elem.getAttributeNode("id"), m && m.value === id) {
  2415. return[elem];
  2416. }
  2417. nodes = context.getElementsByName(id);
  2418. /** @type {number} */
  2419. i = 0;
  2420. for (;elem = nodes[i++];) {
  2421. if (m = elem.getAttributeNode("id"), m && m.value === id) {
  2422. return[elem];
  2423. }
  2424. }
  2425. }
  2426. return[];
  2427. }
  2428. }), Expr.find.TAG = support.getElementsByTagName ? function(selector, el) {
  2429. return "undefined" != typeof el.getElementsByTagName ? el.getElementsByTagName(selector) : support.qsa ? el.querySelectorAll(selector) : void 0;
  2430. } : function(tag, from) {
  2431. var node;
  2432. /** @type {Array} */
  2433. var tmp = [];
  2434. /** @type {number} */
  2435. var i = 0;
  2436. var elem = from.getElementsByTagName(tag);
  2437. if ("*" === tag) {
  2438. for (;node = elem[i++];) {
  2439. if (1 === node.nodeType) {
  2440. tmp.push(node);
  2441. }
  2442. }
  2443. return tmp;
  2444. }
  2445. return elem;
  2446. }, Expr.find.CLASS = support.getElementsByClassName && function(m, c) {
  2447. if ("undefined" != typeof c.getElementsByClassName && documentIsHTML) {
  2448. return c.getElementsByClassName(m);
  2449. }
  2450. }, rbuggyMatches = [], rbuggyQSA = [], (support.qsa = rnative.test(doc.querySelectorAll)) && (assert(function(div) {
  2451. /** @type {string} */
  2452. docElem.appendChild(div).innerHTML = "<a id='" + expando + "'></a><select id='" + expando + "-\r\\' msallowcapture=''><option selected=''></option></select>";
  2453. if (div.querySelectorAll("[msallowcapture^='']").length) {
  2454. rbuggyQSA.push("[*^$]=" + whitespace + "*(?:''|\"\")");
  2455. }
  2456. if (!div.querySelectorAll("[selected]").length) {
  2457. rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
  2458. }
  2459. if (!div.querySelectorAll("[id~=" + expando + "-]").length) {
  2460. rbuggyQSA.push("~=");
  2461. }
  2462. if (!div.querySelectorAll(":checked").length) {
  2463. rbuggyQSA.push(":checked");
  2464. }
  2465. if (!div.querySelectorAll("a#" + expando + "+*").length) {
  2466. rbuggyQSA.push(".#.+[+~]");
  2467. }
  2468. }), assert(function(div) {
  2469. /** @type {string} */
  2470. div.innerHTML = "<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";
  2471. var input = doc.createElement("input");
  2472. input.setAttribute("type", "hidden");
  2473. div.appendChild(input).setAttribute("name", "D");
  2474. if (div.querySelectorAll("[name=d]").length) {
  2475. rbuggyQSA.push("name" + whitespace + "*[*^$|!~]?=");
  2476. }
  2477. if (2 !== div.querySelectorAll(":enabled").length) {
  2478. rbuggyQSA.push(":enabled", ":disabled");
  2479. }
  2480. /** @type {boolean} */
  2481. docElem.appendChild(div).disabled = true;
  2482. if (2 !== div.querySelectorAll(":disabled").length) {
  2483. rbuggyQSA.push(":enabled", ":disabled");
  2484. }
  2485. div.querySelectorAll("*,:x");
  2486. rbuggyQSA.push(",.*:");
  2487. })), (support.matchesSelector = rnative.test(matches = docElem.matches || (docElem.webkitMatchesSelector || (docElem.mozMatchesSelector || (docElem.oMatchesSelector || docElem.msMatchesSelector))))) && assert(function(div) {
  2488. support.disconnectedMatch = matches.call(div, "*");
  2489. matches.call(div, "[s!='']:x");
  2490. rbuggyMatches.push("!=", pseudos);
  2491. }), rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")), rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join("|")), hasCompare = rnative.test(docElem.compareDocumentPosition), contains = hasCompare || rnative.test(docElem.contains) ? function(a, b) {
  2492. var adown = 9 === a.nodeType ? a.documentElement : a;
  2493. var bup = b && b.parentNode;
  2494. return a === bup || !(!bup || (1 !== bup.nodeType || !(adown.contains ? adown.contains(bup) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(bup))));
  2495. } : function(a, b) {
  2496. if (b) {
  2497. for (;b = b.parentNode;) {
  2498. if (b === a) {
  2499. return true;
  2500. }
  2501. }
  2502. }
  2503. return false;
  2504. }, sortOrder = hasCompare ? function(a, b) {
  2505. if (a === b) {
  2506. return l = true, 0;
  2507. }
  2508. /** @type {number} */
  2509. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  2510. return compare ? compare : (compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & compare || !support.sortDetached && b.compareDocumentPosition(a) === compare ? a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ? -1 : b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ? 1 : sortInput ? sortFunction(sortInput, a) - sortFunction(sortInput, b) : 0 : 4 & compare ? -1 : 1);
  2511. } : function(a, b) {
  2512. if (a === b) {
  2513. return l = true, 0;
  2514. }
  2515. var cur;
  2516. /** @type {number} */
  2517. var i = 0;
  2518. var aup = a.parentNode;
  2519. var bup = b.parentNode;
  2520. /** @type {Array} */
  2521. var ap = [a];
  2522. /** @type {Array} */
  2523. var bp = [b];
  2524. if (!aup || !bup) {
  2525. return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? sortFunction(sortInput, a) - sortFunction(sortInput, b) : 0;
  2526. }
  2527. if (aup === bup) {
  2528. return siblingCheck(a, b);
  2529. }
  2530. cur = a;
  2531. for (;cur = cur.parentNode;) {
  2532. ap.unshift(cur);
  2533. }
  2534. cur = b;
  2535. for (;cur = cur.parentNode;) {
  2536. bp.unshift(cur);
  2537. }
  2538. for (;ap[i] === bp[i];) {
  2539. i++;
  2540. }
  2541. return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
  2542. }, doc) : doc;
  2543. };
  2544. /**
  2545. * @param {Function} expr
  2546. * @param {Array} elements
  2547. * @return {?}
  2548. */
  2549. Sizzle.matches = function(expr, elements) {
  2550. return Sizzle(expr, null, null, elements);
  2551. };
  2552. /**
  2553. * @param {HTMLElement} elem
  2554. * @param {string} expr
  2555. * @return {?}
  2556. */
  2557. Sizzle.matchesSelector = function(elem, expr) {
  2558. if ((elem.ownerDocument || elem) !== doc && setDocument(elem), expr = expr.replace(rattributeQuotes, "='$1']"), support.matchesSelector && (documentIsHTML && (!compilerCache[expr + " "] && ((!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr)))))) {
  2559. try {
  2560. var ret = matches.call(elem, expr);
  2561. if (ret || (support.disconnectedMatch || elem.document && 11 !== elem.document.nodeType)) {
  2562. return ret;
  2563. }
  2564. } catch (e) {
  2565. }
  2566. }
  2567. return Sizzle(expr, doc, null, [elem]).length > 0;
  2568. };
  2569. /**
  2570. * @param {Object} context
  2571. * @param {Object} b
  2572. * @return {?}
  2573. */
  2574. Sizzle.contains = function(context, b) {
  2575. return(context.ownerDocument || context) !== doc && setDocument(context), contains(context, b);
  2576. };
  2577. /**
  2578. * @param {Object} elem
  2579. * @param {string} name
  2580. * @return {?}
  2581. */
  2582. Sizzle.attr = function(elem, name) {
  2583. if ((elem.ownerDocument || elem) !== doc) {
  2584. setDocument(elem);
  2585. }
  2586. var fn = Expr.attrHandle[name.toLowerCase()];
  2587. var val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
  2588. return void 0 !== val ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  2589. };
  2590. /**
  2591. * @param {(number|string)} attr
  2592. * @return {?}
  2593. */
  2594. Sizzle.escape = function(attr) {
  2595. return(attr + "").replace(rreturn, filter);
  2596. };
  2597. /**
  2598. * @param {string} elem
  2599. * @return {?}
  2600. */
  2601. Sizzle.error = function(elem) {
  2602. throw new Error("Syntax error, unrecognized expression: " + elem);
  2603. };
  2604. /**
  2605. * @param {Array} results
  2606. * @return {?}
  2607. */
  2608. Sizzle.uniqueSort = function(results) {
  2609. var elem;
  2610. /** @type {Array} */
  2611. var duplicates = [];
  2612. /** @type {number} */
  2613. var j = 0;
  2614. /** @type {number} */
  2615. var i = 0;
  2616. if (l = !support.detectDuplicates, sortInput = !support.sortStable && results.slice(0), results.sort(sortOrder), l) {
  2617. for (;elem = results[i++];) {
  2618. if (elem === results[i]) {
  2619. /** @type {number} */
  2620. j = duplicates.push(i);
  2621. }
  2622. }
  2623. for (;j--;) {
  2624. results.splice(duplicates[j], 1);
  2625. }
  2626. }
  2627. return sortInput = null, results;
  2628. };
  2629. /** @type {function ((Array|Element)): ?} */
  2630. getText = Sizzle.getText = function(elem) {
  2631. var node;
  2632. /** @type {string} */
  2633. var ret = "";
  2634. /** @type {number} */
  2635. var i = 0;
  2636. var nodeType = elem.nodeType;
  2637. if (nodeType) {
  2638. if (1 === nodeType || (9 === nodeType || 11 === nodeType)) {
  2639. if ("string" == typeof elem.textContent) {
  2640. return elem.textContent;
  2641. }
  2642. elem = elem.firstChild;
  2643. for (;elem;elem = elem.nextSibling) {
  2644. ret += getText(elem);
  2645. }
  2646. } else {
  2647. if (3 === nodeType || 4 === nodeType) {
  2648. return elem.nodeValue;
  2649. }
  2650. }
  2651. } else {
  2652. for (;node = elem[i++];) {
  2653. ret += getText(node);
  2654. }
  2655. }
  2656. return ret;
  2657. };
  2658. Expr = Sizzle.selectors = {
  2659. cacheLength : 50,
  2660. /** @type {function (Function): ?} */
  2661. createPseudo : markFunction,
  2662. match : matchExpr,
  2663. attrHandle : {},
  2664. find : {},
  2665. relative : {
  2666. ">" : {
  2667. dir : "parentNode",
  2668. first : true
  2669. },
  2670. " " : {
  2671. dir : "parentNode"
  2672. },
  2673. "+" : {
  2674. dir : "previousSibling",
  2675. first : true
  2676. },
  2677. "~" : {
  2678. dir : "previousSibling"
  2679. }
  2680. },
  2681. preFilter : {
  2682. /**
  2683. * @param {Array} match
  2684. * @return {?}
  2685. */
  2686. ATTR : function(match) {
  2687. return match[1] = match[1].replace(runescape, funescape), match[3] = (match[3] || (match[4] || (match[5] || ""))).replace(runescape, funescape), "~=" === match[2] && (match[3] = " " + match[3] + " "), match.slice(0, 4);
  2688. },
  2689. /**
  2690. * @param {Array} match
  2691. * @return {?}
  2692. */
  2693. CHILD : function(match) {
  2694. return match[1] = match[1].toLowerCase(), "nth" === match[1].slice(0, 3) ? (match[3] || Sizzle.error(match[0]), match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * ("even" === match[3] || "odd" === match[3])), match[5] = +(match[7] + match[8] || "odd" === match[3])) : match[3] && Sizzle.error(match[0]), match;
  2695. },
  2696. /**
  2697. * @param {Array} match
  2698. * @return {?}
  2699. */
  2700. PSEUDO : function(match) {
  2701. var excess;
  2702. var unquoted = !match[6] && match[2];
  2703. return matchExpr.CHILD.test(match[0]) ? null : (match[3] ? match[2] = match[4] || (match[5] || "") : unquoted && (rpseudo.test(unquoted) && ((excess = tokenize(unquoted, true)) && ((excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length) && (match[0] = match[0].slice(0, excess), match[2] = unquoted.slice(0, excess))))), match.slice(0, 3));
  2704. }
  2705. },
  2706. filter : {
  2707. /**
  2708. * @param {string} nodeNameSelector
  2709. * @return {?}
  2710. */
  2711. TAG : function(nodeNameSelector) {
  2712. var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
  2713. return "*" === nodeNameSelector ? function() {
  2714. return true;
  2715. } : function(elem) {
  2716. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  2717. };
  2718. },
  2719. /**
  2720. * @param {string} className
  2721. * @return {?}
  2722. */
  2723. CLASS : function(className) {
  2724. var pattern = classCache[className + " "];
  2725. return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
  2726. return pattern.test("string" == typeof elem.className && elem.className || ("undefined" != typeof elem.getAttribute && elem.getAttribute("class") || ""));
  2727. });
  2728. },
  2729. /**
  2730. * @param {string} name
  2731. * @param {string} not
  2732. * @param {string} check
  2733. * @return {?}
  2734. */
  2735. ATTR : function(name, not, check) {
  2736. return function(elem) {
  2737. var result = Sizzle.attr(elem, name);
  2738. return null == result ? "!=" === not : !not || (result += "", "=" === not ? result === check : "!=" === not ? result !== check : "^=" === not ? check && 0 === result.indexOf(check) : "*=" === not ? check && result.indexOf(check) > -1 : "$=" === not ? check && result.slice(-check.length) === check : "~=" === not ? (" " + result.replace(regexp, " ") + " ").indexOf(check) > -1 : "|=" === not && (result === check || result.slice(0, check.length + 1) === check + "-"));
  2739. };
  2740. },
  2741. /**
  2742. * @param {string} type
  2743. * @param {string} argument
  2744. * @param {?} dataAndEvents
  2745. * @param {boolean} first
  2746. * @param {number} last
  2747. * @return {?}
  2748. */
  2749. CHILD : function(type, argument, dataAndEvents, first, last) {
  2750. /** @type {boolean} */
  2751. var simple = "nth" !== type.slice(0, 3);
  2752. /** @type {boolean} */
  2753. var forward = "last" !== type.slice(-4);
  2754. /** @type {boolean} */
  2755. var value = "of-type" === argument;
  2756. return 1 === first && 0 === last ? function(contestant) {
  2757. return!!contestant.parentNode;
  2758. } : function(elem, dataAndEvents, computed) {
  2759. var cache;
  2760. var outerCache;
  2761. var options;
  2762. var node;
  2763. var nodeIndex;
  2764. var eventPath;
  2765. /** @type {string} */
  2766. var which = simple !== forward ? "nextSibling" : "previousSibling";
  2767. var parent = elem.parentNode;
  2768. var attrNames = value && elem.nodeName.toLowerCase();
  2769. /** @type {boolean} */
  2770. var useCache = !computed && !value;
  2771. /** @type {boolean} */
  2772. var diff = false;
  2773. if (parent) {
  2774. if (simple) {
  2775. for (;which;) {
  2776. /** @type {Element} */
  2777. node = elem;
  2778. for (;node = node[which];) {
  2779. if (value ? node.nodeName.toLowerCase() === attrNames : 1 === node.nodeType) {
  2780. return false;
  2781. }
  2782. }
  2783. /** @type {(boolean|string)} */
  2784. eventPath = which = "only" === type && (!eventPath && "nextSibling");
  2785. }
  2786. return true;
  2787. }
  2788. if (eventPath = [forward ? parent.firstChild : parent.lastChild], forward && useCache) {
  2789. node = parent;
  2790. options = node[expando] || (node[expando] = {});
  2791. outerCache = options[node.uniqueID] || (options[node.uniqueID] = {});
  2792. cache = outerCache[type] || [];
  2793. nodeIndex = cache[0] === dirruns && cache[1];
  2794. diff = nodeIndex && cache[2];
  2795. node = nodeIndex && parent.childNodes[nodeIndex];
  2796. for (;node = ++nodeIndex && (node && node[which]) || ((diff = nodeIndex = 0) || eventPath.pop());) {
  2797. if (1 === node.nodeType && (++diff && node === elem)) {
  2798. /** @type {Array} */
  2799. outerCache[type] = [dirruns, nodeIndex, diff];
  2800. break;
  2801. }
  2802. }
  2803. } else {
  2804. if (useCache && (node = elem, options = node[expando] || (node[expando] = {}), outerCache = options[node.uniqueID] || (options[node.uniqueID] = {}), cache = outerCache[type] || [], nodeIndex = cache[0] === dirruns && cache[1], diff = nodeIndex), diff === false) {
  2805. for (;node = ++nodeIndex && (node && node[which]) || ((diff = nodeIndex = 0) || eventPath.pop());) {
  2806. if ((value ? node.nodeName.toLowerCase() === attrNames : 1 === node.nodeType) && (++diff && (useCache && (options = node[expando] || (node[expando] = {}), outerCache = options[node.uniqueID] || (options[node.uniqueID] = {}), outerCache[type] = [dirruns, diff]), node === elem))) {
  2807. break;
  2808. }
  2809. }
  2810. }
  2811. }
  2812. return diff -= last, diff === first || diff % first === 0 && diff / first >= 0;
  2813. }
  2814. };
  2815. },
  2816. /**
  2817. * @param {string} pseudo
  2818. * @param {?} context
  2819. * @return {?}
  2820. */
  2821. PSEUDO : function(pseudo, context) {
  2822. var args;
  2823. var fn = Expr.pseudos[pseudo] || (Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error("unsupported pseudo: " + pseudo));
  2824. return fn[expando] ? fn(context) : fn.length > 1 ? (args = [pseudo, pseudo, "", context], Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(a, cssRules) {
  2825. var i;
  2826. var ret = fn(a, context);
  2827. var len = ret.length;
  2828. for (;len--;) {
  2829. i = sortFunction(a, ret[len]);
  2830. /** @type {boolean} */
  2831. a[i] = !(cssRules[i] = ret[len]);
  2832. }
  2833. }) : function(err) {
  2834. return fn(err, 0, args);
  2835. }) : fn;
  2836. }
  2837. },
  2838. pseudos : {
  2839. not : markFunction(function(selector) {
  2840. /** @type {Array} */
  2841. var elem = [];
  2842. /** @type {Array} */
  2843. var memory = [];
  2844. var matcher = compile(selector.replace(rtrim, "$1"));
  2845. return matcher[expando] ? markFunction(function(seed, qs, dataAndEvents, xml) {
  2846. var val;
  2847. var unmatched = matcher(seed, null, xml, []);
  2848. var i = seed.length;
  2849. for (;i--;) {
  2850. if (val = unmatched[i]) {
  2851. /** @type {boolean} */
  2852. seed[i] = !(qs[i] = val);
  2853. }
  2854. }
  2855. }) : function(value, dataAndEvents, xml) {
  2856. return elem[0] = value, matcher(elem, null, xml, memory), elem[0] = null, !memory.pop();
  2857. };
  2858. }),
  2859. has : markFunction(function(selector) {
  2860. return function(elem) {
  2861. return Sizzle(selector, elem).length > 0;
  2862. };
  2863. }),
  2864. contains : markFunction(function(id) {
  2865. return id = id.replace(runescape, funescape), function(elem) {
  2866. return(elem.textContent || (elem.innerText || getText(elem))).indexOf(id) > -1;
  2867. };
  2868. }),
  2869. lang : markFunction(function(lang) {
  2870. return ridentifier.test(lang || "") || Sizzle.error("unsupported lang: " + lang), lang = lang.replace(runescape, funescape).toLowerCase(), function(elem) {
  2871. var elemLang;
  2872. do {
  2873. if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
  2874. return elemLang = elemLang.toLowerCase(), elemLang === lang || 0 === elemLang.indexOf(lang + "-");
  2875. }
  2876. } while ((elem = elem.parentNode) && 1 === elem.nodeType);
  2877. return false;
  2878. };
  2879. }),
  2880. /**
  2881. * @param {Object} value
  2882. * @return {?}
  2883. */
  2884. target : function(value) {
  2885. var models = win.location && win.location.hash;
  2886. return models && models.slice(1) === value.id;
  2887. },
  2888. /**
  2889. * @param {undefined} elem
  2890. * @return {?}
  2891. */
  2892. root : function(elem) {
  2893. return elem === docElem;
  2894. },
  2895. /**
  2896. * @param {string} elem
  2897. * @return {?}
  2898. */
  2899. focus : function(elem) {
  2900. return elem === doc.activeElement && ((!doc.hasFocus || doc.hasFocus()) && !!(elem.type || (elem.href || ~elem.tabIndex)));
  2901. },
  2902. enabled : init(false),
  2903. disabled : init(true),
  2904. /**
  2905. * @param {Node} node
  2906. * @return {?}
  2907. */
  2908. checked : function(node) {
  2909. var b = node.nodeName.toLowerCase();
  2910. return "input" === b && !!node.checked || "option" === b && !!node.selected;
  2911. },
  2912. /**
  2913. * @param {Node} elem
  2914. * @return {?}
  2915. */
  2916. selected : function(elem) {
  2917. return elem.parentNode && elem.parentNode.selectedIndex, elem.selected === true;
  2918. },
  2919. /**
  2920. * @param {(Array|Element)} elem
  2921. * @return {?}
  2922. */
  2923. empty : function(elem) {
  2924. elem = elem.firstChild;
  2925. for (;elem;elem = elem.nextSibling) {
  2926. if (elem.nodeType < 6) {
  2927. return false;
  2928. }
  2929. }
  2930. return true;
  2931. },
  2932. /**
  2933. * @param {(Node|string)} elem
  2934. * @return {?}
  2935. */
  2936. parent : function(elem) {
  2937. return!Expr.pseudos.empty(elem);
  2938. },
  2939. /**
  2940. * @param {Node} elem
  2941. * @return {?}
  2942. */
  2943. header : function(elem) {
  2944. return rheader.test(elem.nodeName);
  2945. },
  2946. /**
  2947. * @param {Node} elem
  2948. * @return {?}
  2949. */
  2950. input : function(elem) {
  2951. return rinputs.test(elem.nodeName);
  2952. },
  2953. /**
  2954. * @param {Node} elem
  2955. * @return {?}
  2956. */
  2957. button : function(elem) {
  2958. var b = elem.nodeName.toLowerCase();
  2959. return "input" === b && "button" === elem.type || "button" === b;
  2960. },
  2961. /**
  2962. * @param {Node} elem
  2963. * @return {?}
  2964. */
  2965. text : function(elem) {
  2966. var evt;
  2967. return "input" === elem.nodeName.toLowerCase() && ("text" === elem.type && (null == (evt = elem.getAttribute("type")) || "text" === evt.toLowerCase()));
  2968. },
  2969. first : createPositionalPseudo(function() {
  2970. return[0];
  2971. }),
  2972. last : createPositionalPseudo(function(dataAndEvents, deepDataAndEvents) {
  2973. return[deepDataAndEvents - 1];
  2974. }),
  2975. eq : createPositionalPseudo(function(dataAndEvents, length, argument) {
  2976. return[argument < 0 ? argument + length : argument];
  2977. }),
  2978. even : createPositionalPseudo(function(assigns, dataAndEvents) {
  2979. /** @type {number} */
  2980. var vvar = 0;
  2981. for (;vvar < dataAndEvents;vvar += 2) {
  2982. assigns.push(vvar);
  2983. }
  2984. return assigns;
  2985. }),
  2986. odd : createPositionalPseudo(function(assigns, dataAndEvents) {
  2987. /** @type {number} */
  2988. var vvar = 1;
  2989. for (;vvar < dataAndEvents;vvar += 2) {
  2990. assigns.push(vvar);
  2991. }
  2992. return assigns;
  2993. }),
  2994. lt : createPositionalPseudo(function(assigns, length, argument) {
  2995. var vvar = argument < 0 ? argument + length : argument;
  2996. for (;--vvar >= 0;) {
  2997. assigns.push(vvar);
  2998. }
  2999. return assigns;
  3000. }),
  3001. gt : createPositionalPseudo(function(assigns, length, argument) {
  3002. var vvar = argument < 0 ? argument + length : argument;
  3003. for (;++vvar < length;) {
  3004. assigns.push(vvar);
  3005. }
  3006. return assigns;
  3007. })
  3008. }
  3009. };
  3010. Expr.pseudos.nth = Expr.pseudos.eq;
  3011. for (i in{
  3012. radio : true,
  3013. checkbox : true,
  3014. file : true,
  3015. password : true,
  3016. image : true
  3017. }) {
  3018. Expr.pseudos[i] = createInputPseudo(i);
  3019. }
  3020. for (i in{
  3021. submit : true,
  3022. reset : true
  3023. }) {
  3024. Expr.pseudos[i] = createButtonPseudo(i);
  3025. }
  3026. setFilters.prototype = Expr.filters = Expr.pseudos;
  3027. Expr.setFilters = new setFilters;
  3028. /** @type {function (string, boolean): ?} */
  3029. tokenize = Sizzle.tokenize = function(selector, parseOnly) {
  3030. var matched;
  3031. var match;
  3032. var tokens;
  3033. var type;
  3034. var soFar;
  3035. var groups;
  3036. var preFilters;
  3037. var cached = tokenCache[selector + " "];
  3038. if (cached) {
  3039. return parseOnly ? 0 : cached.slice(0);
  3040. }
  3041. /** @type {string} */
  3042. soFar = selector;
  3043. /** @type {Array} */
  3044. groups = [];
  3045. preFilters = Expr.preFilter;
  3046. for (;soFar;) {
  3047. if (!(matched && !(match = rcomma.exec(soFar)))) {
  3048. if (match) {
  3049. soFar = soFar.slice(match[0].length) || soFar;
  3050. }
  3051. groups.push(tokens = []);
  3052. }
  3053. /** @type {boolean} */
  3054. matched = false;
  3055. if (match = rcombinators.exec(soFar)) {
  3056. /** @type {string} */
  3057. matched = match.shift();
  3058. tokens.push({
  3059. value : matched,
  3060. type : match[0].replace(rtrim, " ")
  3061. });
  3062. soFar = soFar.slice(matched.length);
  3063. }
  3064. for (type in Expr.filter) {
  3065. if (!!(match = matchExpr[type].exec(soFar))) {
  3066. if (!(preFilters[type] && !(match = preFilters[type](match)))) {
  3067. matched = match.shift();
  3068. tokens.push({
  3069. value : matched,
  3070. type : type,
  3071. matches : match
  3072. });
  3073. soFar = soFar.slice(matched.length);
  3074. }
  3075. }
  3076. }
  3077. if (!matched) {
  3078. break;
  3079. }
  3080. }
  3081. return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
  3082. };
  3083. return compile = Sizzle.compile = function(selector, group) {
  3084. var i;
  3085. /** @type {Array} */
  3086. var setMatchers = [];
  3087. /** @type {Array} */
  3088. var elementMatchers = [];
  3089. var cached = compilerCache[selector + " "];
  3090. if (!cached) {
  3091. if (!group) {
  3092. group = tokenize(selector);
  3093. }
  3094. i = group.length;
  3095. for (;i--;) {
  3096. cached = matcherFromTokens(group[i]);
  3097. if (cached[expando]) {
  3098. setMatchers.push(cached);
  3099. } else {
  3100. elementMatchers.push(cached);
  3101. }
  3102. }
  3103. cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
  3104. /** @type {string} */
  3105. cached.selector = selector;
  3106. }
  3107. return cached;
  3108. }, select = Sizzle.select = function(selector, context, results, seed) {
  3109. var i;
  3110. var tokens;
  3111. var token;
  3112. var type;
  3113. var find;
  3114. /** @type {(Function|boolean)} */
  3115. var compiled = "function" == typeof selector && selector;
  3116. var match = !seed && tokenize(selector = compiled.selector || selector);
  3117. if (results = results || [], 1 === match.length) {
  3118. if (tokens = match[0] = match[0].slice(0), tokens.length > 2 && ("ID" === (token = tokens[0]).type && (9 === context.nodeType && (documentIsHTML && Expr.relative[tokens[1].type])))) {
  3119. if (context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0], !context) {
  3120. return results;
  3121. }
  3122. if (compiled) {
  3123. context = context.parentNode;
  3124. }
  3125. selector = selector.slice(tokens.shift().value.length);
  3126. }
  3127. i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
  3128. for (;i--;) {
  3129. if (token = tokens[i], Expr.relative[type = token.type]) {
  3130. break;
  3131. }
  3132. if ((find = Expr.find[type]) && (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context))) {
  3133. if (tokens.splice(i, 1), selector = seed.length && toSelector(tokens), !selector) {
  3134. return push.apply(results, seed), results;
  3135. }
  3136. break;
  3137. }
  3138. }
  3139. }
  3140. return(compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || (rsibling.test(selector) && testContext(context.parentNode) || context)), results;
  3141. }, support.sortStable = expando.split("").sort(sortOrder).join("") === expando, support.detectDuplicates = !!l, setDocument(), support.sortDetached = assert(function(a) {
  3142. return 1 & a.compareDocumentPosition(doc.createElement("fieldset"));
  3143. }), assert(function(div) {
  3144. return div.innerHTML = "<a href='#'></a>", "#" === div.firstChild.getAttribute("href");
  3145. }) || addHandle("type|href|height|width", function(source, dest, dataAndEvents) {
  3146. if (!dataAndEvents) {
  3147. return source.getAttribute(dest, "type" === dest.toLowerCase() ? 1 : 2);
  3148. }
  3149. }), support.attributes && assert(function(div) {
  3150. return div.innerHTML = "<input/>", div.firstChild.setAttribute("value", ""), "" === div.firstChild.getAttribute("value");
  3151. }) || addHandle("value", function(target, deepDataAndEvents, dataAndEvents) {
  3152. if (!dataAndEvents && "input" === target.nodeName.toLowerCase()) {
  3153. return target.defaultValue;
  3154. }
  3155. }), assert(function(div) {
  3156. return null == div.getAttribute("disabled");
  3157. }) || addHandle(booleans, function(elem, name, dataAndEvents) {
  3158. var val;
  3159. if (!dataAndEvents) {
  3160. return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
  3161. }
  3162. }), Sizzle;
  3163. }(win);
  3164. jQuery.find = Sizzle;
  3165. jQuery.expr = Sizzle.selectors;
  3166. jQuery.expr[":"] = jQuery.expr.pseudos;
  3167. jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
  3168. jQuery.text = Sizzle.getText;
  3169. jQuery.isXMLDoc = Sizzle.isXML;
  3170. jQuery.contains = Sizzle.contains;
  3171. jQuery.escapeSelector = Sizzle.escape;
  3172. /**
  3173. * @param {Object} elem
  3174. * @param {string} dir
  3175. * @param {(Object|string)} until
  3176. * @return {?}
  3177. */
  3178. var dir = function(elem, dir, until) {
  3179. /** @type {Array} */
  3180. var matched = [];
  3181. /** @type {boolean} */
  3182. var truncate = void 0 !== until;
  3183. for (;(elem = elem[dir]) && 9 !== elem.nodeType;) {
  3184. if (1 === elem.nodeType) {
  3185. if (truncate && jQuery(elem).is(until)) {
  3186. break;
  3187. }
  3188. matched.push(elem);
  3189. }
  3190. }
  3191. return matched;
  3192. };
  3193. /**
  3194. * @param {(Array|Element)} n
  3195. * @param {(Node|string)} elem
  3196. * @return {?}
  3197. */
  3198. var sibling = function(n, elem) {
  3199. /** @type {Array} */
  3200. var r = [];
  3201. for (;n;n = n.nextSibling) {
  3202. if (1 === n.nodeType) {
  3203. if (n !== elem) {
  3204. r.push(n);
  3205. }
  3206. }
  3207. }
  3208. return r;
  3209. };
  3210. var rneedsContext = jQuery.expr.match.needsContext;
  3211. /** @type {RegExp} */
  3212. var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
  3213. /** @type {RegExp} */
  3214. var isSimple = /^.[^:#\[\.,]*$/;
  3215. /**
  3216. * @param {Function} expr
  3217. * @param {string} elems
  3218. * @param {boolean} not
  3219. * @return {?}
  3220. */
  3221. jQuery.filter = function(expr, elems, not) {
  3222. var elem = elems[0];
  3223. return not && (expr = ":not(" + expr + ")"), 1 === elems.length && 1 === elem.nodeType ? jQuery.find.matchesSelector(elem, expr) ? [elem] : [] : jQuery.find.matches(expr, jQuery.grep(elems, function(dest) {
  3224. return 1 === dest.nodeType;
  3225. }));
  3226. };
  3227. jQuery.fn.extend({
  3228. /**
  3229. * @param {Object} sel
  3230. * @return {?}
  3231. */
  3232. find : function(sel) {
  3233. var i;
  3234. var ret;
  3235. var len = this.length;
  3236. var self = this;
  3237. if ("string" != typeof sel) {
  3238. return this.pushStack(jQuery(sel).filter(function() {
  3239. /** @type {number} */
  3240. i = 0;
  3241. for (;i < len;i++) {
  3242. if (jQuery.contains(self[i], this)) {
  3243. return true;
  3244. }
  3245. }
  3246. }));
  3247. }
  3248. ret = this.pushStack([]);
  3249. /** @type {number} */
  3250. i = 0;
  3251. for (;i < len;i++) {
  3252. jQuery.find(sel, self[i], ret);
  3253. }
  3254. return len > 1 ? jQuery.uniqueSort(ret) : ret;
  3255. },
  3256. /**
  3257. * @param {Function} selector
  3258. * @return {?}
  3259. */
  3260. filter : function(selector) {
  3261. return this.pushStack(winnow(this, selector || [], false));
  3262. },
  3263. /**
  3264. * @param {Array} selector
  3265. * @return {?}
  3266. */
  3267. not : function(selector) {
  3268. return this.pushStack(winnow(this, selector || [], true));
  3269. },
  3270. /**
  3271. * @param {Object} selector
  3272. * @return {?}
  3273. */
  3274. is : function(selector) {
  3275. return!!winnow(this, "string" == typeof selector && rneedsContext.test(selector) ? jQuery(selector) : selector || [], false).length;
  3276. }
  3277. });
  3278. var object;
  3279. /** @type {RegExp} */
  3280. var rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;
  3281. /** @type {function (Object, Object, (Object|string)): ?} */
  3282. var init = jQuery.fn.init = function(selector, context, rootjQuery) {
  3283. var match;
  3284. var length;
  3285. if (!selector) {
  3286. return this;
  3287. }
  3288. if (rootjQuery = rootjQuery || object, "string" == typeof selector) {
  3289. if (match = "<" === selector[0] && (">" === selector[selector.length - 1] && selector.length >= 3) ? [null, selector, null] : rquickExpr.exec(selector), !match || !match[1] && context) {
  3290. return!context || context.jquery ? (context || rootjQuery).find(selector) : this.constructor(context).find(selector);
  3291. }
  3292. if (match[1]) {
  3293. if (context = context instanceof jQuery ? context[0] : context, jQuery.merge(this, jQuery.parseHTML(match[1], context && context.nodeType ? context.ownerDocument || context : doc, true)), rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
  3294. for (match in context) {
  3295. if (jQuery.isFunction(this[match])) {
  3296. this[match](context[match]);
  3297. } else {
  3298. this.attr(match, context[match]);
  3299. }
  3300. }
  3301. }
  3302. return this;
  3303. }
  3304. return length = doc.getElementById(match[2]), length && (this[0] = length, this.length = 1), this;
  3305. }
  3306. return selector.nodeType ? (this[0] = selector, this.length = 1, this) : jQuery.isFunction(selector) ? void 0 !== rootjQuery.ready ? rootjQuery.ready(selector) : selector(jQuery) : jQuery.makeArray(selector, this);
  3307. };
  3308. init.prototype = jQuery.fn;
  3309. object = jQuery(doc);
  3310. /** @type {RegExp} */
  3311. var rparentsprev = /^(?:parents|prev(?:Until|All))/;
  3312. var guaranteedUnique = {
  3313. children : true,
  3314. contents : true,
  3315. next : true,
  3316. prev : true
  3317. };
  3318. jQuery.fn.extend({
  3319. /**
  3320. * @param {Object} target
  3321. * @return {?}
  3322. */
  3323. has : function(target) {
  3324. var targets = jQuery(target, this);
  3325. var l = targets.length;
  3326. return this.filter(function() {
  3327. /** @type {number} */
  3328. var i = 0;
  3329. for (;i < l;i++) {
  3330. if (jQuery.contains(this, targets[i])) {
  3331. return true;
  3332. }
  3333. }
  3334. });
  3335. },
  3336. /**
  3337. * @param {Object} selectors
  3338. * @param {string} context
  3339. * @return {?}
  3340. */
  3341. closest : function(selectors, context) {
  3342. var cur;
  3343. /** @type {number} */
  3344. var i = 0;
  3345. var l = this.length;
  3346. /** @type {Array} */
  3347. var matched = [];
  3348. var pos = "string" != typeof selectors && jQuery(selectors);
  3349. if (!rneedsContext.test(selectors)) {
  3350. for (;i < l;i++) {
  3351. cur = this[i];
  3352. for (;cur && cur !== context;cur = cur.parentNode) {
  3353. if (cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : 1 === cur.nodeType && jQuery.find.matchesSelector(cur, selectors))) {
  3354. matched.push(cur);
  3355. break;
  3356. }
  3357. }
  3358. }
  3359. }
  3360. return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
  3361. },
  3362. /**
  3363. * @param {boolean} elem
  3364. * @return {?}
  3365. */
  3366. index : function(elem) {
  3367. return elem ? "string" == typeof elem ? core_indexOf.call(jQuery(elem), this[0]) : core_indexOf.call(this, elem.jquery ? elem[0] : elem) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
  3368. },
  3369. /**
  3370. * @param {Function} selector
  3371. * @param {Object} context
  3372. * @return {?}
  3373. */
  3374. add : function(selector, context) {
  3375. return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))));
  3376. },
  3377. /**
  3378. * @param {Object} selector
  3379. * @return {?}
  3380. */
  3381. addBack : function(selector) {
  3382. return this.add(null == selector ? this.prevObject : this.prevObject.filter(selector));
  3383. }
  3384. });
  3385. jQuery.each({
  3386. /**
  3387. * @param {Node} elem
  3388. * @return {?}
  3389. */
  3390. parent : function(elem) {
  3391. var parent = elem.parentNode;
  3392. return parent && 11 !== parent.nodeType ? parent : null;
  3393. },
  3394. /**
  3395. * @param {Object} elem
  3396. * @return {?}
  3397. */
  3398. parents : function(elem) {
  3399. return dir(elem, "parentNode");
  3400. },
  3401. /**
  3402. * @param {Object} elem
  3403. * @param {?} i
  3404. * @param {(Object|string)} until
  3405. * @return {?}
  3406. */
  3407. parentsUntil : function(elem, i, until) {
  3408. return dir(elem, "parentNode", until);
  3409. },
  3410. /**
  3411. * @param {Object} elem
  3412. * @return {?}
  3413. */
  3414. next : function(elem) {
  3415. return _singleSibling(elem, "nextSibling");
  3416. },
  3417. /**
  3418. * @param {Object} elem
  3419. * @return {?}
  3420. */
  3421. prev : function(elem) {
  3422. return _singleSibling(elem, "previousSibling");
  3423. },
  3424. /**
  3425. * @param {Object} elem
  3426. * @return {?}
  3427. */
  3428. nextAll : function(elem) {
  3429. return dir(elem, "nextSibling");
  3430. },
  3431. /**
  3432. * @param {Object} elem
  3433. * @return {?}
  3434. */
  3435. prevAll : function(elem) {
  3436. return dir(elem, "previousSibling");
  3437. },
  3438. /**
  3439. * @param {Object} elem
  3440. * @param {?} i
  3441. * @param {(Object|string)} until
  3442. * @return {?}
  3443. */
  3444. nextUntil : function(elem, i, until) {
  3445. return dir(elem, "nextSibling", until);
  3446. },
  3447. /**
  3448. * @param {Object} elem
  3449. * @param {?} i
  3450. * @param {(Object|string)} until
  3451. * @return {?}
  3452. */
  3453. prevUntil : function(elem, i, until) {
  3454. return dir(elem, "previousSibling", until);
  3455. },
  3456. /**
  3457. * @param {Node} elem
  3458. * @return {?}
  3459. */
  3460. siblings : function(elem) {
  3461. return sibling((elem.parentNode || {}).firstChild, elem);
  3462. },
  3463. /**
  3464. * @param {Element} node
  3465. * @return {?}
  3466. */
  3467. children : function(node) {
  3468. return sibling(node.firstChild);
  3469. },
  3470. /**
  3471. * @param {Element} elem
  3472. * @return {?}
  3473. */
  3474. contents : function(elem) {
  3475. return elem.contentDocument || jQuery.merge([], elem.childNodes);
  3476. }
  3477. }, function(name, fn) {
  3478. /**
  3479. * @param {?} until
  3480. * @param {?} selector
  3481. * @return {?}
  3482. */
  3483. jQuery.fn[name] = function(until, selector) {
  3484. var matched = jQuery.map(this, fn, until);
  3485. return "Until" !== name.slice(-5) && (selector = until), selector && ("string" == typeof selector && (matched = jQuery.filter(selector, matched))), this.length > 1 && (guaranteedUnique[name] || jQuery.uniqueSort(matched), rparentsprev.test(name) && matched.reverse()), this.pushStack(matched);
  3486. };
  3487. });
  3488. /** @type {RegExp} */
  3489. var core_rnotwhite = /[^\x20\t\r\n\f]+/g;
  3490. /**
  3491. * @param {string} options
  3492. * @return {?}
  3493. */
  3494. jQuery.Callbacks = function(options) {
  3495. options = "string" == typeof options ? createOptions(options) : jQuery.extend({}, options);
  3496. var memory;
  3497. var data;
  3498. var stack;
  3499. var image;
  3500. /** @type {Array} */
  3501. var list = [];
  3502. /** @type {Array} */
  3503. var messages = [];
  3504. /** @type {number} */
  3505. var count = -1;
  3506. /**
  3507. * @return {undefined}
  3508. */
  3509. var fire = function() {
  3510. image = options.once;
  3511. /** @type {boolean} */
  3512. stack = memory = true;
  3513. for (;messages.length;count = -1) {
  3514. data = messages.shift();
  3515. for (;++count < list.length;) {
  3516. if (list[count].apply(data[0], data[1]) === false) {
  3517. if (options.stopOnFalse) {
  3518. count = list.length;
  3519. /** @type {boolean} */
  3520. data = false;
  3521. }
  3522. }
  3523. }
  3524. }
  3525. if (!options.memory) {
  3526. /** @type {boolean} */
  3527. data = false;
  3528. }
  3529. /** @type {boolean} */
  3530. memory = false;
  3531. if (image) {
  3532. /** @type {(Array|string)} */
  3533. list = data ? [] : "";
  3534. }
  3535. };
  3536. var self = {
  3537. /**
  3538. * @return {?}
  3539. */
  3540. add : function() {
  3541. return list && (data && (!memory && (count = list.length - 1, messages.push(data))), function add(args) {
  3542. jQuery.each(args, function(dataAndEvents, arg) {
  3543. if (jQuery.isFunction(arg)) {
  3544. if (!(options.unique && self.has(arg))) {
  3545. list.push(arg);
  3546. }
  3547. } else {
  3548. if (arg) {
  3549. if (arg.length) {
  3550. if ("string" !== jQuery.type(arg)) {
  3551. add(arg);
  3552. }
  3553. }
  3554. }
  3555. }
  3556. });
  3557. }(arguments), data && (!memory && fire())), this;
  3558. },
  3559. /**
  3560. * @return {?}
  3561. */
  3562. remove : function() {
  3563. return jQuery.each(arguments, function(dataAndEvents, arg) {
  3564. var index;
  3565. for (;(index = jQuery.inArray(arg, list, index)) > -1;) {
  3566. list.splice(index, 1);
  3567. if (index <= count) {
  3568. count--;
  3569. }
  3570. }
  3571. }), this;
  3572. },
  3573. /**
  3574. * @param {string} fn
  3575. * @return {?}
  3576. */
  3577. has : function(fn) {
  3578. return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
  3579. },
  3580. /**
  3581. * @return {?}
  3582. */
  3583. empty : function() {
  3584. return list && (list = []), this;
  3585. },
  3586. /**
  3587. * @return {?}
  3588. */
  3589. disable : function() {
  3590. return image = messages = [], list = data = "", this;
  3591. },
  3592. /**
  3593. * @return {?}
  3594. */
  3595. disabled : function() {
  3596. return!list;
  3597. },
  3598. /**
  3599. * @return {?}
  3600. */
  3601. lock : function() {
  3602. return image = messages = [], data || (memory || (list = data = "")), this;
  3603. },
  3604. /**
  3605. * @return {?}
  3606. */
  3607. locked : function() {
  3608. return!!image;
  3609. },
  3610. /**
  3611. * @param {?} context
  3612. * @param {Array} args
  3613. * @return {?}
  3614. */
  3615. fireWith : function(context, args) {
  3616. return image || (args = args || [], args = [context, args.slice ? args.slice() : args], messages.push(args), memory || fire()), this;
  3617. },
  3618. /**
  3619. * @return {?}
  3620. */
  3621. fire : function() {
  3622. return self.fireWith(this, arguments), this;
  3623. },
  3624. /**
  3625. * @return {?}
  3626. */
  3627. fired : function() {
  3628. return!!stack;
  3629. }
  3630. };
  3631. return self;
  3632. };
  3633. jQuery.extend({
  3634. /**
  3635. * @param {Function} func
  3636. * @return {?}
  3637. */
  3638. Deferred : function(func) {
  3639. /** @type {Array} */
  3640. var which = [["notify", "progress", jQuery.Callbacks("memory"), jQuery.Callbacks("memory"), 2], ["resolve", "done", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 0, "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), 1, "rejected"]];
  3641. /** @type {string} */
  3642. var state = "pending";
  3643. var promise = {
  3644. /**
  3645. * @return {?}
  3646. */
  3647. state : function() {
  3648. return state;
  3649. },
  3650. /**
  3651. * @return {?}
  3652. */
  3653. always : function() {
  3654. return deferred.done(arguments).fail(arguments), this;
  3655. },
  3656. /**
  3657. * @param {string} error
  3658. * @return {?}
  3659. */
  3660. "catch" : function(error) {
  3661. return promise.then(null, error);
  3662. },
  3663. /**
  3664. * @return {?}
  3665. */
  3666. pipe : function() {
  3667. /** @type {Arguments} */
  3668. var fns = arguments;
  3669. return jQuery.Deferred(function(newDefer) {
  3670. jQuery.each(which, function(dataAndEvents, tuple) {
  3671. var fn = jQuery.isFunction(fns[tuple[4]]) && fns[tuple[4]];
  3672. deferred[tuple[1]](function() {
  3673. var returned = fn && fn.apply(this, arguments);
  3674. if (returned && jQuery.isFunction(returned.promise)) {
  3675. returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
  3676. } else {
  3677. newDefer[tuple[0] + "With"](this, fn ? [returned] : arguments);
  3678. }
  3679. });
  3680. });
  3681. /** @type {null} */
  3682. fns = null;
  3683. }).promise();
  3684. },
  3685. /**
  3686. * @param {Function} value
  3687. * @param {string} html
  3688. * @param {Function} qualifier
  3689. * @return {?}
  3690. */
  3691. then : function(value, html, qualifier) {
  3692. /**
  3693. * @param {number} s
  3694. * @param {?} key
  3695. * @param {Function} start
  3696. * @param {boolean} type
  3697. * @return {?}
  3698. */
  3699. function fn(s, key, start, type) {
  3700. return function() {
  3701. var self = this;
  3702. /** @type {Arguments} */
  3703. var args = arguments;
  3704. /**
  3705. * @return {undefined}
  3706. */
  3707. var invoke = function() {
  3708. var a;
  3709. var value;
  3710. if (!(s < e)) {
  3711. if (a = start.apply(self, args), a === key.promise()) {
  3712. throw new TypeError("Thenable self-resolution");
  3713. }
  3714. value = a && (("object" == typeof a || "function" == typeof a) && a.then);
  3715. if (jQuery.isFunction(value)) {
  3716. if (type) {
  3717. value.call(a, fn(e, key, index, type), fn(e, key, i, type));
  3718. } else {
  3719. e++;
  3720. value.call(a, fn(e, key, index, type), fn(e, key, i, type), fn(e, key, index, key.notifyWith));
  3721. }
  3722. } else {
  3723. if (start !== index) {
  3724. self = void 0;
  3725. /** @type {Array} */
  3726. args = [a];
  3727. }
  3728. (type || key.resolveWith)(self, args);
  3729. }
  3730. }
  3731. };
  3732. /** @type {function (): undefined} */
  3733. var close = type ? invoke : function() {
  3734. try {
  3735. invoke();
  3736. } catch (context) {
  3737. if (jQuery.Deferred.exceptionHook) {
  3738. jQuery.Deferred.exceptionHook(context, close.stackTrace);
  3739. }
  3740. if (s + 1 >= e) {
  3741. if (start !== i) {
  3742. self = void 0;
  3743. /** @type {Array} */
  3744. args = [context];
  3745. }
  3746. key.rejectWith(self, args);
  3747. }
  3748. }
  3749. };
  3750. if (s) {
  3751. close();
  3752. } else {
  3753. if (jQuery.Deferred.getStackHook) {
  3754. close.stackTrace = jQuery.Deferred.getStackHook();
  3755. }
  3756. win.setTimeout(close);
  3757. }
  3758. };
  3759. }
  3760. /** @type {number} */
  3761. var e = 0;
  3762. return jQuery.Deferred(function(type) {
  3763. which[0][3].add(fn(0, type, jQuery.isFunction(qualifier) ? qualifier : index, type.notifyWith));
  3764. which[1][3].add(fn(0, type, jQuery.isFunction(value) ? value : index));
  3765. which[2][3].add(fn(0, type, jQuery.isFunction(html) ? html : i));
  3766. }).promise();
  3767. },
  3768. /**
  3769. * @param {string} obj
  3770. * @return {?}
  3771. */
  3772. promise : function(obj) {
  3773. return null != obj ? jQuery.extend(obj, promise) : promise;
  3774. }
  3775. };
  3776. var deferred = {};
  3777. return jQuery.each(which, function(dataAndEvents, tuple) {
  3778. var list = tuple[2];
  3779. var stateString = tuple[5];
  3780. promise[tuple[1]] = list.add;
  3781. if (stateString) {
  3782. list.add(function() {
  3783. state = stateString;
  3784. }, which[3 - dataAndEvents][2].disable, which[0][2].lock);
  3785. }
  3786. list.add(tuple[3].fire);
  3787. /**
  3788. * @return {?}
  3789. */
  3790. deferred[tuple[0]] = function() {
  3791. return deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments), this;
  3792. };
  3793. deferred[tuple[0] + "With"] = list.fireWith;
  3794. }), promise.promise(deferred), func && func.call(deferred, deferred), deferred;
  3795. },
  3796. /**
  3797. * @param {?} path
  3798. * @return {?}
  3799. */
  3800. when : function(path) {
  3801. /** @type {number} */
  3802. var len = arguments.length;
  3803. var i = len;
  3804. /** @type {Array} */
  3805. var result = Array(i);
  3806. /** @type {Array.<?>} */
  3807. var args = core_slice.call(arguments);
  3808. var d = jQuery.Deferred();
  3809. /**
  3810. * @param {number} i
  3811. * @return {?}
  3812. */
  3813. var updateFunc = function(i) {
  3814. return function(value) {
  3815. result[i] = this;
  3816. args[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
  3817. if (!--len) {
  3818. d.resolveWith(result, args);
  3819. }
  3820. };
  3821. };
  3822. if (len <= 1 && (require(path, d.done(updateFunc(i)).resolve, d.reject), "pending" === d.state() || jQuery.isFunction(args[i] && args[i].then))) {
  3823. return d.then();
  3824. }
  3825. for (;i--;) {
  3826. require(args[i], updateFunc(i), d.reject);
  3827. }
  3828. return d.promise();
  3829. }
  3830. });
  3831. /** @type {RegExp} */
  3832. var rinlinejQuery = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
  3833. /**
  3834. * @param {(Error|string)} e
  3835. * @param {?} err
  3836. * @return {undefined}
  3837. */
  3838. jQuery.Deferred.exceptionHook = function(e, err) {
  3839. if (win.console) {
  3840. if (win.console.warn) {
  3841. if (e) {
  3842. if (rinlinejQuery.test(e.name)) {
  3843. win.console.warn("jQuery.Deferred exception: " + e.message, e.stack, err);
  3844. }
  3845. }
  3846. }
  3847. }
  3848. };
  3849. /**
  3850. * @param {?} dataAndEvents
  3851. * @return {undefined}
  3852. */
  3853. jQuery.readyException = function(dataAndEvents) {
  3854. win.setTimeout(function() {
  3855. throw dataAndEvents;
  3856. });
  3857. };
  3858. var promise = jQuery.Deferred();
  3859. /**
  3860. * @param {Object} func
  3861. * @return {?}
  3862. */
  3863. jQuery.fn.ready = function(func) {
  3864. return promise.then(func)["catch"](function(node) {
  3865. jQuery.readyException(node);
  3866. }), this;
  3867. };
  3868. jQuery.extend({
  3869. isReady : false,
  3870. readyWait : 1,
  3871. /**
  3872. * @param {?} hold
  3873. * @return {undefined}
  3874. */
  3875. holdReady : function(hold) {
  3876. if (hold) {
  3877. jQuery.readyWait++;
  3878. } else {
  3879. jQuery.ready(true);
  3880. }
  3881. },
  3882. /**
  3883. * @param {boolean} wait
  3884. * @return {undefined}
  3885. */
  3886. ready : function(wait) {
  3887. if (!(wait === true ? --jQuery.readyWait : jQuery.isReady)) {
  3888. /** @type {boolean} */
  3889. jQuery.isReady = true;
  3890. if (!(wait !== true && --jQuery.readyWait > 0)) {
  3891. promise.resolveWith(doc, [jQuery]);
  3892. }
  3893. }
  3894. }
  3895. });
  3896. jQuery.ready.then = promise.then;
  3897. if ("complete" === doc.readyState || "loading" !== doc.readyState && !doc.documentElement.doScroll) {
  3898. win.setTimeout(jQuery.ready);
  3899. } else {
  3900. doc.addEventListener("DOMContentLoaded", completed);
  3901. win.addEventListener("load", completed);
  3902. }
  3903. /**
  3904. * @param {Object} elems
  3905. * @param {Function} fn
  3906. * @param {Object} key
  3907. * @param {string} value
  3908. * @param {boolean} chainable
  3909. * @param {string} emptyGet
  3910. * @param {boolean} raw
  3911. * @return {?}
  3912. */
  3913. var access = function(elems, fn, key, value, chainable, emptyGet, raw) {
  3914. /** @type {number} */
  3915. var i = 0;
  3916. var length = elems.length;
  3917. /** @type {boolean} */
  3918. var bulk = null == key;
  3919. if ("object" === jQuery.type(key)) {
  3920. /** @type {boolean} */
  3921. chainable = true;
  3922. for (i in key) {
  3923. access(elems, fn, i, key[i], true, emptyGet, raw);
  3924. }
  3925. } else {
  3926. if (void 0 !== value && (chainable = true, jQuery.isFunction(value) || (raw = true), bulk && (raw ? (fn.call(elems, value), fn = null) : (bulk = fn, fn = function(elem, event, value) {
  3927. return bulk.call(jQuery(elem), value);
  3928. })), fn)) {
  3929. for (;i < length;i++) {
  3930. fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)));
  3931. }
  3932. }
  3933. }
  3934. return chainable ? elems : bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet;
  3935. };
  3936. /**
  3937. * @param {Object} elem
  3938. * @return {?}
  3939. */
  3940. var next = function(elem) {
  3941. return 1 === elem.nodeType || (9 === elem.nodeType || !+elem.nodeType);
  3942. };
  3943. /** @type {number} */
  3944. Data.uid = 1;
  3945. Data.prototype = {
  3946. /**
  3947. * @param {Object} owner
  3948. * @return {?}
  3949. */
  3950. cache : function(owner) {
  3951. var unlock = owner[this.expando];
  3952. return unlock || (unlock = {}, next(owner) && (owner.nodeType ? owner[this.expando] = unlock : Object.defineProperty(owner, this.expando, {
  3953. value : unlock,
  3954. configurable : true
  3955. }))), unlock;
  3956. },
  3957. /**
  3958. * @param {Object} owner
  3959. * @param {string} data
  3960. * @param {string} value
  3961. * @return {?}
  3962. */
  3963. set : function(owner, data, value) {
  3964. var key;
  3965. var values = this.cache(owner);
  3966. if ("string" == typeof data) {
  3967. /** @type {string} */
  3968. values[jQuery.camelCase(data)] = value;
  3969. } else {
  3970. for (key in data) {
  3971. values[jQuery.camelCase(key)] = data[key];
  3972. }
  3973. }
  3974. return values;
  3975. },
  3976. /**
  3977. * @param {Object} owner
  3978. * @param {string} key
  3979. * @return {?}
  3980. */
  3981. get : function(owner, key) {
  3982. return void 0 === key ? this.cache(owner) : owner[this.expando] && owner[this.expando][jQuery.camelCase(key)];
  3983. },
  3984. /**
  3985. * @param {Object} owner
  3986. * @param {Object} key
  3987. * @param {number} value
  3988. * @return {?}
  3989. */
  3990. access : function(owner, key, value) {
  3991. return void 0 === key || key && ("string" == typeof key && void 0 === value) ? this.get(owner, key) : (this.set(owner, key, value), void 0 !== value ? value : key);
  3992. },
  3993. /**
  3994. * @param {Object} owner
  3995. * @param {Object} key
  3996. * @return {undefined}
  3997. */
  3998. remove : function(owner, key) {
  3999. var i;
  4000. var cache = owner[this.expando];
  4001. if (void 0 !== cache) {
  4002. if (void 0 !== key) {
  4003. if (jQuery.isArray(key)) {
  4004. key = key.map(jQuery.camelCase);
  4005. } else {
  4006. key = jQuery.camelCase(key);
  4007. key = key in cache ? [key] : key.match(core_rnotwhite) || [];
  4008. }
  4009. i = key.length;
  4010. for (;i--;) {
  4011. delete cache[key[i]];
  4012. }
  4013. }
  4014. if (void 0 === key || jQuery.isEmptyObject(cache)) {
  4015. if (owner.nodeType) {
  4016. owner[this.expando] = void 0;
  4017. } else {
  4018. delete owner[this.expando];
  4019. }
  4020. }
  4021. }
  4022. },
  4023. /**
  4024. * @param {Object} owner
  4025. * @return {?}
  4026. */
  4027. hasData : function(owner) {
  4028. var cache = owner[this.expando];
  4029. return void 0 !== cache && !jQuery.isEmptyObject(cache);
  4030. }
  4031. };
  4032. var data_priv = new Data;
  4033. var data_user = new Data;
  4034. /** @type {RegExp} */
  4035. var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
  4036. /** @type {RegExp} */
  4037. var r20 = /[A-Z]/g;
  4038. jQuery.extend({
  4039. /**
  4040. * @param {Object} elem
  4041. * @return {?}
  4042. */
  4043. hasData : function(elem) {
  4044. return data_user.hasData(elem) || data_priv.hasData(elem);
  4045. },
  4046. /**
  4047. * @param {string} elem
  4048. * @param {number} name
  4049. * @param {number} data
  4050. * @return {?}
  4051. */
  4052. data : function(elem, name, data) {
  4053. return data_user.access(elem, name, data);
  4054. },
  4055. /**
  4056. * @param {Object} elem
  4057. * @param {Object} name
  4058. * @return {undefined}
  4059. */
  4060. removeData : function(elem, name) {
  4061. data_user.remove(elem, name);
  4062. },
  4063. /**
  4064. * @param {Object} src
  4065. * @param {Object} name
  4066. * @param {number} data
  4067. * @return {?}
  4068. */
  4069. _data : function(src, name, data) {
  4070. return data_priv.access(src, name, data);
  4071. },
  4072. /**
  4073. * @param {Object} elem
  4074. * @param {Object} name
  4075. * @return {undefined}
  4076. */
  4077. _removeData : function(elem, name) {
  4078. data_priv.remove(elem, name);
  4079. }
  4080. });
  4081. jQuery.fn.extend({
  4082. /**
  4083. * @param {string} key
  4084. * @param {(number|string)} value
  4085. * @return {?}
  4086. */
  4087. data : function(key, value) {
  4088. var len;
  4089. var name;
  4090. var data;
  4091. var elem = this[0];
  4092. var attrs = elem && elem.attributes;
  4093. if (void 0 === key) {
  4094. if (this.length && (data = data_user.get(elem), 1 === elem.nodeType && !data_priv.get(elem, "hasDataAttrs"))) {
  4095. len = attrs.length;
  4096. for (;len--;) {
  4097. if (attrs[len]) {
  4098. name = attrs[len].name;
  4099. if (0 === name.indexOf("data-")) {
  4100. name = jQuery.camelCase(name.slice(5));
  4101. dataAttr(elem, name, data[name]);
  4102. }
  4103. }
  4104. }
  4105. data_priv.set(elem, "hasDataAttrs", true);
  4106. }
  4107. return data;
  4108. }
  4109. return "object" == typeof key ? this.each(function() {
  4110. data_user.set(this, key);
  4111. }) : access(this, function(value) {
  4112. var data;
  4113. if (elem && void 0 === value) {
  4114. if (data = data_user.get(elem, key), void 0 !== data) {
  4115. return data;
  4116. }
  4117. if (data = dataAttr(elem, key), void 0 !== data) {
  4118. return data;
  4119. }
  4120. } else {
  4121. this.each(function() {
  4122. data_user.set(this, key, value);
  4123. });
  4124. }
  4125. }, null, value, arguments.length > 1, null, true);
  4126. },
  4127. /**
  4128. * @param {Object} name
  4129. * @return {?}
  4130. */
  4131. removeData : function(name) {
  4132. return this.each(function() {
  4133. data_user.remove(this, name);
  4134. });
  4135. }
  4136. });
  4137. jQuery.extend({
  4138. /**
  4139. * @param {Object} elem
  4140. * @param {string} type
  4141. * @param {Object} data
  4142. * @return {?}
  4143. */
  4144. queue : function(elem, type, data) {
  4145. var queue;
  4146. if (elem) {
  4147. return type = (type || "fx") + "queue", queue = data_priv.get(elem, type), data && (!queue || jQuery.isArray(data) ? queue = data_priv.access(elem, type, jQuery.makeArray(data)) : queue.push(data)), queue || [];
  4148. }
  4149. },
  4150. /**
  4151. * @param {Object} elem
  4152. * @param {string} type
  4153. * @return {undefined}
  4154. */
  4155. dequeue : function(elem, type) {
  4156. type = type || "fx";
  4157. var queue = jQuery.queue(elem, type);
  4158. var ln = queue.length;
  4159. var fn = queue.shift();
  4160. var hooks = jQuery._queueHooks(elem, type);
  4161. /**
  4162. * @return {undefined}
  4163. */
  4164. var next = function() {
  4165. jQuery.dequeue(elem, type);
  4166. };
  4167. if ("inprogress" === fn) {
  4168. fn = queue.shift();
  4169. ln--;
  4170. }
  4171. if (fn) {
  4172. if ("fx" === type) {
  4173. queue.unshift("inprogress");
  4174. }
  4175. delete hooks.stop;
  4176. fn.call(elem, next, hooks);
  4177. }
  4178. if (!ln) {
  4179. if (hooks) {
  4180. hooks.empty.fire();
  4181. }
  4182. }
  4183. },
  4184. /**
  4185. * @param {Object} elem
  4186. * @param {string} type
  4187. * @return {?}
  4188. */
  4189. _queueHooks : function(elem, type) {
  4190. /** @type {string} */
  4191. var key = type + "queueHooks";
  4192. return data_priv.get(elem, key) || data_priv.access(elem, key, {
  4193. empty : jQuery.Callbacks("once memory").add(function() {
  4194. data_priv.remove(elem, [type + "queue", key]);
  4195. })
  4196. });
  4197. }
  4198. });
  4199. jQuery.fn.extend({
  4200. /**
  4201. * @param {Object} type
  4202. * @param {Object} data
  4203. * @return {?}
  4204. */
  4205. queue : function(type, data) {
  4206. /** @type {number} */
  4207. var setter = 2;
  4208. return "string" != typeof type && (data = type, type = "fx", setter--), arguments.length < setter ? jQuery.queue(this[0], type) : void 0 === data ? this : this.each(function() {
  4209. var queue = jQuery.queue(this, type, data);
  4210. jQuery._queueHooks(this, type);
  4211. if ("fx" === type) {
  4212. if ("inprogress" !== queue[0]) {
  4213. jQuery.dequeue(this, type);
  4214. }
  4215. }
  4216. });
  4217. },
  4218. /**
  4219. * @param {string} type
  4220. * @return {?}
  4221. */
  4222. dequeue : function(type) {
  4223. return this.each(function() {
  4224. jQuery.dequeue(this, type);
  4225. });
  4226. },
  4227. /**
  4228. * @param {string} type
  4229. * @return {?}
  4230. */
  4231. clearQueue : function(type) {
  4232. return this.queue(type || "fx", []);
  4233. },
  4234. /**
  4235. * @param {string} type
  4236. * @param {string} obj
  4237. * @return {?}
  4238. */
  4239. promise : function(type, obj) {
  4240. var body;
  4241. /** @type {number} */
  4242. var d = 1;
  4243. var defer = jQuery.Deferred();
  4244. var elements = this;
  4245. var i = this.length;
  4246. /**
  4247. * @return {undefined}
  4248. */
  4249. var resolve = function() {
  4250. if (!--d) {
  4251. defer.resolveWith(elements, [elements]);
  4252. }
  4253. };
  4254. if ("string" != typeof type) {
  4255. /** @type {string} */
  4256. obj = type;
  4257. type = void 0;
  4258. }
  4259. type = type || "fx";
  4260. for (;i--;) {
  4261. body = data_priv.get(elements[i], type + "queueHooks");
  4262. if (body) {
  4263. if (body.empty) {
  4264. d++;
  4265. body.empty.add(resolve);
  4266. }
  4267. }
  4268. }
  4269. return resolve(), defer.promise(obj);
  4270. }
  4271. });
  4272. /** @type {string} */
  4273. var core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
  4274. /** @type {RegExp} */
  4275. var regexp = new RegExp("^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i");
  4276. /** @type {Array} */
  4277. var cssExpand = ["Top", "Right", "Bottom", "Left"];
  4278. /**
  4279. * @param {Object} node
  4280. * @param {Function} context
  4281. * @return {?}
  4282. */
  4283. var isHidden = function(node, context) {
  4284. return node = context || node, "none" === node.style.display || "" === node.style.display && (jQuery.contains(node.ownerDocument, node) && "none" === jQuery.css(node, "display"));
  4285. };
  4286. /**
  4287. * @param {Object} elem
  4288. * @param {Object} options
  4289. * @param {Function} callback
  4290. * @param {Array} args
  4291. * @return {?}
  4292. */
  4293. var swap = function(elem, options, callback, args) {
  4294. var ret;
  4295. var name;
  4296. var old = {};
  4297. for (name in options) {
  4298. old[name] = elem.style[name];
  4299. elem.style[name] = options[name];
  4300. }
  4301. ret = callback.apply(elem, args || []);
  4302. for (name in options) {
  4303. elem.style[name] = old[name];
  4304. }
  4305. return ret;
  4306. };
  4307. var _elm_display = {};
  4308. jQuery.fn.extend({
  4309. /**
  4310. * @return {?}
  4311. */
  4312. show : function() {
  4313. return showHide(this, true);
  4314. },
  4315. /**
  4316. * @return {?}
  4317. */
  4318. hide : function() {
  4319. return showHide(this);
  4320. },
  4321. /**
  4322. * @param {?} state
  4323. * @return {?}
  4324. */
  4325. toggle : function(state) {
  4326. return "boolean" == typeof state ? state ? this.show() : this.hide() : this.each(function() {
  4327. if (isHidden(this)) {
  4328. jQuery(this).show();
  4329. } else {
  4330. jQuery(this).hide();
  4331. }
  4332. });
  4333. }
  4334. });
  4335. /** @type {RegExp} */
  4336. var manipulation_rcheckableType = /^(?:checkbox|radio)$/i;
  4337. /** @type {RegExp} */
  4338. var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i;
  4339. /** @type {RegExp} */
  4340. var rchecked = /^$|\/(?:java|ecma)script/i;
  4341. var wrapMap = {
  4342. option : [1, "<select multiple='multiple'>", "</select>"],
  4343. thead : [1, "<table>", "</table>"],
  4344. col : [2, "<table><colgroup>", "</colgroup></table>"],
  4345. tr : [2, "<table><tbody>", "</tbody></table>"],
  4346. td : [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  4347. _default : [0, "", ""]
  4348. };
  4349. /** @type {Array} */
  4350. wrapMap.optgroup = wrapMap.option;
  4351. /** @type {Array} */
  4352. wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
  4353. /** @type {Array} */
  4354. wrapMap.th = wrapMap.td;
  4355. /** @type {RegExp} */
  4356. var rhtml = /<|&#?\w+;/;
  4357. !function() {
  4358. var fragment = doc.createDocumentFragment();
  4359. var form = fragment.appendChild(doc.createElement("div"));
  4360. var input = doc.createElement("input");
  4361. input.setAttribute("type", "radio");
  4362. input.setAttribute("checked", "checked");
  4363. input.setAttribute("name", "t");
  4364. form.appendChild(input);
  4365. support.checkClone = form.cloneNode(true).cloneNode(true).lastChild.checked;
  4366. /** @type {string} */
  4367. form.innerHTML = "<textarea>x</textarea>";
  4368. /** @type {boolean} */
  4369. support.noCloneChecked = !!form.cloneNode(true).lastChild.defaultValue;
  4370. }();
  4371. var docElem = doc.documentElement;
  4372. /** @type {RegExp} */
  4373. var RE_INPUT_CHECKABLE_TYPES = /^key/;
  4374. /** @type {RegExp} */
  4375. var evt = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
  4376. /** @type {RegExp} */
  4377. var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
  4378. jQuery.event = {
  4379. global : {},
  4380. /**
  4381. * @param {Object} elem
  4382. * @param {Object} types
  4383. * @param {Function} handler
  4384. * @param {Object} e
  4385. * @param {Object} selector
  4386. * @return {undefined}
  4387. */
  4388. add : function(elem, types, handler, e, selector) {
  4389. var handleObjIn;
  4390. var eventHandle;
  4391. var segmentMatch;
  4392. var events;
  4393. var t;
  4394. var handleObj;
  4395. var special;
  4396. var handlers;
  4397. var type;
  4398. var namespaces;
  4399. var origType;
  4400. var elemData = data_priv.get(elem);
  4401. if (elemData) {
  4402. if (handler.handler) {
  4403. /** @type {Function} */
  4404. handleObjIn = handler;
  4405. handler = handleObjIn.handler;
  4406. selector = handleObjIn.selector;
  4407. }
  4408. if (selector) {
  4409. jQuery.find.matchesSelector(docElem, selector);
  4410. }
  4411. if (!handler.guid) {
  4412. /** @type {number} */
  4413. handler.guid = jQuery.guid++;
  4414. }
  4415. if (!(events = elemData.events)) {
  4416. events = elemData.events = {};
  4417. }
  4418. if (!(eventHandle = elemData.handle)) {
  4419. /** @type {function (Event): ?} */
  4420. eventHandle = elemData.handle = function(e) {
  4421. return "undefined" != typeof jQuery && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
  4422. };
  4423. }
  4424. types = (types || "").match(core_rnotwhite) || [""];
  4425. t = types.length;
  4426. for (;t--;) {
  4427. /** @type {Array} */
  4428. segmentMatch = rtypenamespace.exec(types[t]) || [];
  4429. type = origType = segmentMatch[1];
  4430. namespaces = (segmentMatch[2] || "").split(".").sort();
  4431. if (type) {
  4432. special = jQuery.event.special[type] || {};
  4433. type = (selector ? special.delegateType : special.bindType) || type;
  4434. special = jQuery.event.special[type] || {};
  4435. handleObj = jQuery.extend({
  4436. type : type,
  4437. origType : origType,
  4438. data : e,
  4439. /** @type {Function} */
  4440. handler : handler,
  4441. guid : handler.guid,
  4442. selector : selector,
  4443. needsContext : selector && jQuery.expr.match.needsContext.test(selector),
  4444. namespace : namespaces.join(".")
  4445. }, handleObjIn);
  4446. if (!(handlers = events[type])) {
  4447. /** @type {Array} */
  4448. handlers = events[type] = [];
  4449. /** @type {number} */
  4450. handlers.delegateCount = 0;
  4451. if (!(special.setup && special.setup.call(elem, e, namespaces, eventHandle) !== false)) {
  4452. if (elem.addEventListener) {
  4453. elem.addEventListener(type, eventHandle);
  4454. }
  4455. }
  4456. }
  4457. if (special.add) {
  4458. special.add.call(elem, handleObj);
  4459. if (!handleObj.handler.guid) {
  4460. handleObj.handler.guid = handler.guid;
  4461. }
  4462. }
  4463. if (selector) {
  4464. handlers.splice(handlers.delegateCount++, 0, handleObj);
  4465. } else {
  4466. handlers.push(handleObj);
  4467. }
  4468. /** @type {boolean} */
  4469. jQuery.event.global[type] = true;
  4470. }
  4471. }
  4472. }
  4473. },
  4474. /**
  4475. * @param {Object} elem
  4476. * @param {Object} types
  4477. * @param {Function} handler
  4478. * @param {boolean} selector
  4479. * @param {boolean} keepData
  4480. * @return {undefined}
  4481. */
  4482. remove : function(elem, types, handler, selector, keepData) {
  4483. var j;
  4484. var origCount;
  4485. var tmp;
  4486. var events;
  4487. var t;
  4488. var handleObj;
  4489. var special;
  4490. var handlers;
  4491. var type;
  4492. var namespaces;
  4493. var origType;
  4494. var elemData = data_priv.hasData(elem) && data_priv.get(elem);
  4495. if (elemData && (events = elemData.events)) {
  4496. types = (types || "").match(core_rnotwhite) || [""];
  4497. t = types.length;
  4498. for (;t--;) {
  4499. if (tmp = rtypenamespace.exec(types[t]) || [], type = origType = tmp[1], namespaces = (tmp[2] || "").split(".").sort(), type) {
  4500. special = jQuery.event.special[type] || {};
  4501. type = (selector ? special.delegateType : special.bindType) || type;
  4502. handlers = events[type] || [];
  4503. tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
  4504. origCount = j = handlers.length;
  4505. for (;j--;) {
  4506. handleObj = handlers[j];
  4507. if (!(!keepData && origType !== handleObj.origType)) {
  4508. if (!(handler && handler.guid !== handleObj.guid)) {
  4509. if (!(tmp && !tmp.test(handleObj.namespace))) {
  4510. if (!(selector && (selector !== handleObj.selector && ("**" !== selector || !handleObj.selector)))) {
  4511. handlers.splice(j, 1);
  4512. if (handleObj.selector) {
  4513. handlers.delegateCount--;
  4514. }
  4515. if (special.remove) {
  4516. special.remove.call(elem, handleObj);
  4517. }
  4518. }
  4519. }
  4520. }
  4521. }
  4522. }
  4523. if (origCount) {
  4524. if (!handlers.length) {
  4525. if (!(special.teardown && special.teardown.call(elem, namespaces, elemData.handle) !== false)) {
  4526. jQuery.removeEvent(elem, type, elemData.handle);
  4527. }
  4528. delete events[type];
  4529. }
  4530. }
  4531. } else {
  4532. for (type in events) {
  4533. jQuery.event.remove(elem, type + types[t], handler, selector, true);
  4534. }
  4535. }
  4536. }
  4537. if (jQuery.isEmptyObject(events)) {
  4538. data_priv.remove(elem, "handle events");
  4539. }
  4540. }
  4541. },
  4542. /**
  4543. * @param {?} e
  4544. * @return {?}
  4545. */
  4546. dispatch : function(e) {
  4547. var event = jQuery.event.fix(e);
  4548. var i;
  4549. var j;
  4550. var ret;
  4551. var matched;
  4552. var handleObj;
  4553. var handlerQueue;
  4554. /** @type {Array} */
  4555. var args = new Array(arguments.length);
  4556. var handlers = (data_priv.get(this, "events") || {})[event.type] || [];
  4557. var special = jQuery.event.special[event.type] || {};
  4558. args[0] = event;
  4559. /** @type {number} */
  4560. i = 1;
  4561. for (;i < arguments.length;i++) {
  4562. args[i] = arguments[i];
  4563. }
  4564. if (event.delegateTarget = this, !special.preDispatch || special.preDispatch.call(this, event) !== false) {
  4565. handlerQueue = jQuery.event.handlers.call(this, event, handlers);
  4566. /** @type {number} */
  4567. i = 0;
  4568. for (;(matched = handlerQueue[i++]) && !event.isPropagationStopped();) {
  4569. event.currentTarget = matched.elem;
  4570. /** @type {number} */
  4571. j = 0;
  4572. for (;(handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped();) {
  4573. if (!(event.rnamespace && !event.rnamespace.test(handleObj.namespace))) {
  4574. event.handleObj = handleObj;
  4575. event.data = handleObj.data;
  4576. ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
  4577. if (void 0 !== ret) {
  4578. if ((event.result = ret) === false) {
  4579. event.preventDefault();
  4580. event.stopPropagation();
  4581. }
  4582. }
  4583. }
  4584. }
  4585. }
  4586. return special.postDispatch && special.postDispatch.call(this, event), event.result;
  4587. }
  4588. },
  4589. /**
  4590. * @param {Event} event
  4591. * @param {Object} handlers
  4592. * @return {?}
  4593. */
  4594. handlers : function(event, handlers) {
  4595. var i;
  4596. var handleObj;
  4597. var sel;
  4598. var matches;
  4599. var selMatch;
  4600. /** @type {Array} */
  4601. var handlerQueue = [];
  4602. var delegateCount = handlers.delegateCount;
  4603. var cur = event.target;
  4604. if (delegateCount && (cur.nodeType && !("click" === event.type && event.button >= 1))) {
  4605. for (;cur !== this;cur = cur.parentNode || this) {
  4606. if (1 === cur.nodeType && ("click" !== event.type || cur.disabled !== true)) {
  4607. /** @type {Array} */
  4608. matches = [];
  4609. selMatch = {};
  4610. /** @type {number} */
  4611. i = 0;
  4612. for (;i < delegateCount;i++) {
  4613. handleObj = handlers[i];
  4614. /** @type {string} */
  4615. sel = handleObj.selector + " ";
  4616. if (void 0 === selMatch[sel]) {
  4617. selMatch[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
  4618. }
  4619. if (selMatch[sel]) {
  4620. matches.push(handleObj);
  4621. }
  4622. }
  4623. if (matches.length) {
  4624. handlerQueue.push({
  4625. elem : cur,
  4626. handlers : matches
  4627. });
  4628. }
  4629. }
  4630. }
  4631. }
  4632. return cur = this, delegateCount < handlers.length && handlerQueue.push({
  4633. elem : cur,
  4634. handlers : handlers.slice(delegateCount)
  4635. }), handlerQueue;
  4636. },
  4637. /**
  4638. * @param {?} prop
  4639. * @param {string} html
  4640. * @return {undefined}
  4641. */
  4642. addProp : function(prop, html) {
  4643. Object.defineProperty(jQuery.Event.prototype, prop, {
  4644. enumerable : true,
  4645. configurable : true,
  4646. /** @type {function (): ?} */
  4647. get : jQuery.isFunction(html) ? function() {
  4648. if (this.originalEvent) {
  4649. return html(this.originalEvent);
  4650. }
  4651. } : function() {
  4652. if (this.originalEvent) {
  4653. return this.originalEvent[prop];
  4654. }
  4655. },
  4656. /**
  4657. * @param {Object} elem
  4658. * @return {undefined}
  4659. */
  4660. set : function(elem) {
  4661. Object.defineProperty(this, prop, {
  4662. enumerable : true,
  4663. configurable : true,
  4664. writable : true,
  4665. value : elem
  4666. });
  4667. }
  4668. });
  4669. },
  4670. /**
  4671. * @param {?} event
  4672. * @return {?}
  4673. */
  4674. fix : function(event) {
  4675. return event[jQuery.expando] ? event : new jQuery.Event(event);
  4676. },
  4677. special : {
  4678. load : {
  4679. noBubble : true
  4680. },
  4681. focus : {
  4682. /**
  4683. * @return {?}
  4684. */
  4685. trigger : function() {
  4686. if (this !== safeActiveElement() && this.focus) {
  4687. return this.focus(), false;
  4688. }
  4689. },
  4690. delegateType : "focusin"
  4691. },
  4692. blur : {
  4693. /**
  4694. * @return {?}
  4695. */
  4696. trigger : function() {
  4697. if (this === safeActiveElement() && this.blur) {
  4698. return this.blur(), false;
  4699. }
  4700. },
  4701. delegateType : "focusout"
  4702. },
  4703. click : {
  4704. /**
  4705. * @return {?}
  4706. */
  4707. trigger : function() {
  4708. if ("checkbox" === this.type && (this.click && jQuery.nodeName(this, "input"))) {
  4709. return this.click(), false;
  4710. }
  4711. },
  4712. /**
  4713. * @param {Event} event
  4714. * @return {?}
  4715. */
  4716. _default : function(event) {
  4717. return jQuery.nodeName(event.target, "a");
  4718. }
  4719. },
  4720. beforeunload : {
  4721. /**
  4722. * @param {Object} event
  4723. * @return {undefined}
  4724. */
  4725. postDispatch : function(event) {
  4726. if (void 0 !== event.result) {
  4727. if (event.originalEvent) {
  4728. event.originalEvent.returnValue = event.result;
  4729. }
  4730. }
  4731. }
  4732. }
  4733. }
  4734. };
  4735. /**
  4736. * @param {Object} elem
  4737. * @param {?} type
  4738. * @param {?} handle
  4739. * @return {undefined}
  4740. */
  4741. jQuery.removeEvent = function(elem, type, handle) {
  4742. if (elem.removeEventListener) {
  4743. elem.removeEventListener(type, handle);
  4744. }
  4745. };
  4746. /**
  4747. * @param {Object} src
  4748. * @param {boolean} event
  4749. * @return {?}
  4750. */
  4751. jQuery.Event = function(src, event) {
  4752. return this instanceof jQuery.Event ? (src && src.type ? (this.originalEvent = src, this.type = src.type, this.isDefaultPrevented = src.defaultPrevented || void 0 === src.defaultPrevented && src.returnValue === false ? returnTrue : returnFalse, this.target = src.target && 3 === src.target.nodeType ? src.target.parentNode : src.target, this.currentTarget = src.currentTarget, this.relatedTarget = src.relatedTarget) : this.type = src, event && jQuery.extend(this, event), this.timeStamp = src &&
  4753. src.timeStamp || jQuery.now(), void(this[jQuery.expando] = true)) : new jQuery.Event(src, event);
  4754. };
  4755. jQuery.Event.prototype = {
  4756. /** @type {function (Object, boolean): ?} */
  4757. constructor : jQuery.Event,
  4758. /** @type {function (): ?} */
  4759. isDefaultPrevented : returnFalse,
  4760. /** @type {function (): ?} */
  4761. isPropagationStopped : returnFalse,
  4762. /** @type {function (): ?} */
  4763. isImmediatePropagationStopped : returnFalse,
  4764. isSimulated : false,
  4765. /**
  4766. * @return {undefined}
  4767. */
  4768. preventDefault : function() {
  4769. var e = this.originalEvent;
  4770. /** @type {function (): ?} */
  4771. this.isDefaultPrevented = returnTrue;
  4772. if (e) {
  4773. if (!this.isSimulated) {
  4774. e.preventDefault();
  4775. }
  4776. }
  4777. },
  4778. /**
  4779. * @return {undefined}
  4780. */
  4781. stopPropagation : function() {
  4782. var e = this.originalEvent;
  4783. /** @type {function (): ?} */
  4784. this.isPropagationStopped = returnTrue;
  4785. if (e) {
  4786. if (!this.isSimulated) {
  4787. e.stopPropagation();
  4788. }
  4789. }
  4790. },
  4791. /**
  4792. * @return {undefined}
  4793. */
  4794. stopImmediatePropagation : function() {
  4795. var e = this.originalEvent;
  4796. /** @type {function (): ?} */
  4797. this.isImmediatePropagationStopped = returnTrue;
  4798. if (e) {
  4799. if (!this.isSimulated) {
  4800. e.stopImmediatePropagation();
  4801. }
  4802. }
  4803. this.stopPropagation();
  4804. }
  4805. };
  4806. jQuery.each({
  4807. altKey : true,
  4808. bubbles : true,
  4809. cancelable : true,
  4810. changedTouches : true,
  4811. ctrlKey : true,
  4812. detail : true,
  4813. eventPhase : true,
  4814. metaKey : true,
  4815. pageX : true,
  4816. pageY : true,
  4817. shiftKey : true,
  4818. view : true,
  4819. "char" : true,
  4820. charCode : true,
  4821. key : true,
  4822. keyCode : true,
  4823. button : true,
  4824. buttons : true,
  4825. clientX : true,
  4826. clientY : true,
  4827. offsetX : true,
  4828. offsetY : true,
  4829. pointerId : true,
  4830. pointerType : true,
  4831. screenX : true,
  4832. screenY : true,
  4833. targetTouches : true,
  4834. toElement : true,
  4835. touches : true,
  4836. /**
  4837. * @param {Event} e
  4838. * @return {?}
  4839. */
  4840. which : function(e) {
  4841. var button = e.button;
  4842. return null == e.which && RE_INPUT_CHECKABLE_TYPES.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && (void 0 !== button && evt.test(e.type)) ? 1 & button ? 1 : 2 & button ? 3 : 4 & button ? 2 : 0 : e.which;
  4843. }
  4844. }, jQuery.event.addProp);
  4845. jQuery.each({
  4846. mouseenter : "mouseover",
  4847. mouseleave : "mouseout",
  4848. pointerenter : "pointerover",
  4849. pointerleave : "pointerout"
  4850. }, function(orig, fix) {
  4851. jQuery.event.special[orig] = {
  4852. delegateType : fix,
  4853. bindType : fix,
  4854. /**
  4855. * @param {Object} event
  4856. * @return {?}
  4857. */
  4858. handle : function(event) {
  4859. var returnValue;
  4860. var target = this;
  4861. var related = event.relatedTarget;
  4862. var handleObj = event.handleObj;
  4863. return related && (related === target || jQuery.contains(target, related)) || (event.type = handleObj.origType, returnValue = handleObj.handler.apply(this, arguments), event.type = fix), returnValue;
  4864. }
  4865. };
  4866. });
  4867. jQuery.fn.extend({
  4868. /**
  4869. * @param {string} name
  4870. * @param {Function} selector
  4871. * @param {Object} one
  4872. * @param {Function} fn
  4873. * @return {?}
  4874. */
  4875. on : function(name, selector, one, fn) {
  4876. return on(this, name, selector, one, fn);
  4877. },
  4878. /**
  4879. * @param {Object} type
  4880. * @param {Object} selector
  4881. * @param {Object} callback
  4882. * @param {Function} types
  4883. * @return {?}
  4884. */
  4885. one : function(type, selector, callback, types) {
  4886. return on(this, type, selector, callback, types, 1);
  4887. },
  4888. /**
  4889. * @param {Object} types
  4890. * @param {Function} selector
  4891. * @param {Function} fn
  4892. * @return {?}
  4893. */
  4894. off : function(types, selector, fn) {
  4895. var handleObj;
  4896. var type;
  4897. if (types && (types.preventDefault && types.handleObj)) {
  4898. return handleObj = types.handleObj, jQuery(types.delegateTarget).off(handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler), this;
  4899. }
  4900. if ("object" == typeof types) {
  4901. for (type in types) {
  4902. this.off(type, selector, types[type]);
  4903. }
  4904. return this;
  4905. }
  4906. return selector !== false && "function" != typeof selector || (fn = selector, selector = void 0), fn === false && (fn = returnFalse), this.each(function() {
  4907. jQuery.event.remove(this, types, fn, selector);
  4908. });
  4909. }
  4910. });
  4911. /** @type {RegExp} */
  4912. var br = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;
  4913. /** @type {RegExp} */
  4914. var rRadial = /<script|<style|<link/i;
  4915. /** @type {RegExp} */
  4916. var exclude = /checked\s*(?:[^=]|=\s*.checked.)/i;
  4917. /** @type {RegExp} */
  4918. var re = /^true\/(.*)/;
  4919. /** @type {RegExp} */
  4920. var normalizr = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
  4921. jQuery.extend({
  4922. /**
  4923. * @param {string} b
  4924. * @return {?}
  4925. */
  4926. htmlPrefilter : function(b) {
  4927. return b.replace(br, "<$1></$2>");
  4928. },
  4929. /**
  4930. * @param {Object} elem
  4931. * @param {(boolean|number|string)} dataAndEvents
  4932. * @param {(boolean|number|string)} deepDataAndEvents
  4933. * @return {?}
  4934. */
  4935. clone : function(elem, dataAndEvents, deepDataAndEvents) {
  4936. var i;
  4937. var l;
  4938. var srcElements;
  4939. var destElements;
  4940. var clone = elem.cloneNode(true);
  4941. var inPage = jQuery.contains(elem.ownerDocument, elem);
  4942. if (!(support.noCloneChecked || (1 !== elem.nodeType && 11 !== elem.nodeType || jQuery.isXMLDoc(elem)))) {
  4943. destElements = getAll(clone);
  4944. srcElements = getAll(elem);
  4945. /** @type {number} */
  4946. i = 0;
  4947. l = srcElements.length;
  4948. for (;i < l;i++) {
  4949. fixInput(srcElements[i], destElements[i]);
  4950. }
  4951. }
  4952. if (dataAndEvents) {
  4953. if (deepDataAndEvents) {
  4954. srcElements = srcElements || getAll(elem);
  4955. destElements = destElements || getAll(clone);
  4956. /** @type {number} */
  4957. i = 0;
  4958. l = srcElements.length;
  4959. for (;i < l;i++) {
  4960. cloneCopyEvent(srcElements[i], destElements[i]);
  4961. }
  4962. } else {
  4963. cloneCopyEvent(elem, clone);
  4964. }
  4965. }
  4966. return destElements = getAll(clone, "script"), destElements.length > 0 && setGlobalEval(destElements, !inPage && getAll(elem, "script")), clone;
  4967. },
  4968. /**
  4969. * @param {?} elems
  4970. * @return {undefined}
  4971. */
  4972. cleanData : function(elems) {
  4973. var data;
  4974. var elem;
  4975. var type;
  4976. var special = jQuery.event.special;
  4977. /** @type {number} */
  4978. var i = 0;
  4979. for (;void 0 !== (elem = elems[i]);i++) {
  4980. if (next(elem)) {
  4981. if (data = elem[data_priv.expando]) {
  4982. if (data.events) {
  4983. for (type in data.events) {
  4984. if (special[type]) {
  4985. jQuery.event.remove(elem, type);
  4986. } else {
  4987. jQuery.removeEvent(elem, type, data.handle);
  4988. }
  4989. }
  4990. }
  4991. elem[data_priv.expando] = void 0;
  4992. }
  4993. if (elem[data_user.expando]) {
  4994. elem[data_user.expando] = void 0;
  4995. }
  4996. }
  4997. }
  4998. }
  4999. });
  5000. jQuery.fn.extend({
  5001. /**
  5002. * @param {?} type
  5003. * @return {?}
  5004. */
  5005. detach : function(type) {
  5006. return remove(this, type, true);
  5007. },
  5008. /**
  5009. * @param {Object} elems
  5010. * @return {?}
  5011. */
  5012. remove : function(elems) {
  5013. return remove(this, elems);
  5014. },
  5015. /**
  5016. * @param {string} value
  5017. * @return {?}
  5018. */
  5019. text : function(value) {
  5020. return access(this, function(textString) {
  5021. return void 0 === textString ? jQuery.text(this) : this.empty().each(function() {
  5022. if (!(1 !== this.nodeType && (11 !== this.nodeType && 9 !== this.nodeType))) {
  5023. /** @type {string} */
  5024. this.textContent = textString;
  5025. }
  5026. });
  5027. }, null, value, arguments.length);
  5028. },
  5029. /**
  5030. * @return {?}
  5031. */
  5032. append : function() {
  5033. return update(this, arguments, function(elem) {
  5034. if (1 === this.nodeType || (11 === this.nodeType || 9 === this.nodeType)) {
  5035. var target = manipulationTarget(this, elem);
  5036. target.appendChild(elem);
  5037. }
  5038. });
  5039. },
  5040. /**
  5041. * @return {?}
  5042. */
  5043. prepend : function() {
  5044. return update(this, arguments, function(elem) {
  5045. if (1 === this.nodeType || (11 === this.nodeType || 9 === this.nodeType)) {
  5046. var target = manipulationTarget(this, elem);
  5047. target.insertBefore(elem, target.firstChild);
  5048. }
  5049. });
  5050. },
  5051. /**
  5052. * @return {?}
  5053. */
  5054. before : function() {
  5055. return update(this, arguments, function(elem) {
  5056. if (this.parentNode) {
  5057. this.parentNode.insertBefore(elem, this);
  5058. }
  5059. });
  5060. },
  5061. /**
  5062. * @return {?}
  5063. */
  5064. after : function() {
  5065. return update(this, arguments, function(elem) {
  5066. if (this.parentNode) {
  5067. this.parentNode.insertBefore(elem, this.nextSibling);
  5068. }
  5069. });
  5070. },
  5071. /**
  5072. * @return {?}
  5073. */
  5074. empty : function() {
  5075. var elem;
  5076. /** @type {number} */
  5077. var unlock = 0;
  5078. for (;null != (elem = this[unlock]);unlock++) {
  5079. if (1 === elem.nodeType) {
  5080. jQuery.cleanData(getAll(elem, false));
  5081. /** @type {string} */
  5082. elem.textContent = "";
  5083. }
  5084. }
  5085. return this;
  5086. },
  5087. /**
  5088. * @param {?} dataAndEvents
  5089. * @param {?} deepDataAndEvents
  5090. * @return {?}
  5091. */
  5092. clone : function(dataAndEvents, deepDataAndEvents) {
  5093. return dataAndEvents = null != dataAndEvents && dataAndEvents, deepDataAndEvents = null == deepDataAndEvents ? dataAndEvents : deepDataAndEvents, this.map(function() {
  5094. return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
  5095. });
  5096. },
  5097. /**
  5098. * @param {string} value
  5099. * @return {?}
  5100. */
  5101. html : function(value) {
  5102. return access(this, function(value) {
  5103. var elem = this[0] || {};
  5104. /** @type {number} */
  5105. var i = 0;
  5106. var l = this.length;
  5107. if (void 0 === value && 1 === elem.nodeType) {
  5108. return elem.innerHTML;
  5109. }
  5110. if ("string" == typeof value && (!rRadial.test(value) && !wrapMap[(rtagName.exec(value) || ["", ""])[1].toLowerCase()])) {
  5111. value = jQuery.htmlPrefilter(value);
  5112. try {
  5113. for (;i < l;i++) {
  5114. elem = this[i] || {};
  5115. if (1 === elem.nodeType) {
  5116. jQuery.cleanData(getAll(elem, false));
  5117. /** @type {(Object|string)} */
  5118. elem.innerHTML = value;
  5119. }
  5120. }
  5121. /** @type {number} */
  5122. elem = 0;
  5123. } catch (e) {
  5124. }
  5125. }
  5126. if (elem) {
  5127. this.empty().append(value);
  5128. }
  5129. }, null, value, arguments.length);
  5130. },
  5131. /**
  5132. * @return {?}
  5133. */
  5134. replaceWith : function() {
  5135. /** @type {Array} */
  5136. var selection = [];
  5137. return update(this, arguments, function(relatedNode) {
  5138. var node = this.parentNode;
  5139. if (jQuery.inArray(this, selection) < 0) {
  5140. jQuery.cleanData(getAll(this));
  5141. if (node) {
  5142. node.replaceChild(relatedNode, this);
  5143. }
  5144. }
  5145. }, selection);
  5146. }
  5147. });
  5148. jQuery.each({
  5149. appendTo : "append",
  5150. prependTo : "prepend",
  5151. insertBefore : "before",
  5152. insertAfter : "after",
  5153. replaceAll : "replaceWith"
  5154. }, function(original, method) {
  5155. /**
  5156. * @param {Object} scripts
  5157. * @return {?}
  5158. */
  5159. jQuery.fn[original] = function(scripts) {
  5160. var resp;
  5161. /** @type {Array} */
  5162. var ret = [];
  5163. var insert = jQuery(scripts);
  5164. /** @type {number} */
  5165. var last = insert.length - 1;
  5166. /** @type {number} */
  5167. var i = 0;
  5168. for (;i <= last;i++) {
  5169. resp = i === last ? this : this.clone(true);
  5170. jQuery(insert[i])[method](resp);
  5171. core_push.apply(ret, resp.get());
  5172. }
  5173. return this.pushStack(ret);
  5174. };
  5175. });
  5176. /** @type {RegExp} */
  5177. var rbracket = /^margin/;
  5178. /** @type {RegExp} */
  5179. var rnumnonpx = new RegExp("^(" + core_pnum + ")(?!px)[a-z%]+$", "i");
  5180. /**
  5181. * @param {Object} elem
  5182. * @return {?}
  5183. */
  5184. var getStyles = function(elem) {
  5185. var defaultView = elem.ownerDocument.defaultView;
  5186. return defaultView && defaultView.opener || (defaultView = win), defaultView.getComputedStyle(elem);
  5187. };
  5188. !function() {
  5189. /**
  5190. * @return {undefined}
  5191. */
  5192. function computePixelPositionAndBoxSizingReliable() {
  5193. if (div) {
  5194. /** @type {string} */
  5195. div.style.cssText = "box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";
  5196. /** @type {string} */
  5197. div.innerHTML = "";
  5198. docElem.appendChild(container);
  5199. var s = win.getComputedStyle(div);
  5200. /** @type {boolean} */
  5201. c = "1%" !== s.top;
  5202. /** @type {boolean} */
  5203. g = "2px" === s.marginLeft;
  5204. /** @type {boolean} */
  5205. e = "4px" === s.width;
  5206. /** @type {string} */
  5207. div.style.marginRight = "50%";
  5208. /** @type {boolean} */
  5209. f = "4px" === s.marginRight;
  5210. docElem.removeChild(container);
  5211. /** @type {null} */
  5212. div = null;
  5213. }
  5214. }
  5215. var c;
  5216. var e;
  5217. var f;
  5218. var g;
  5219. var container = doc.createElement("div");
  5220. var div = doc.createElement("div");
  5221. if (div.style) {
  5222. /** @type {string} */
  5223. div.style.backgroundClip = "content-box";
  5224. /** @type {string} */
  5225. div.cloneNode(true).style.backgroundClip = "";
  5226. /** @type {boolean} */
  5227. support.clearCloneStyle = "content-box" === div.style.backgroundClip;
  5228. /** @type {string} */
  5229. container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute";
  5230. container.appendChild(div);
  5231. jQuery.extend(support, {
  5232. /**
  5233. * @return {?}
  5234. */
  5235. pixelPosition : function() {
  5236. return computePixelPositionAndBoxSizingReliable(), c;
  5237. },
  5238. /**
  5239. * @return {?}
  5240. */
  5241. boxSizingReliable : function() {
  5242. return computePixelPositionAndBoxSizingReliable(), e;
  5243. },
  5244. /**
  5245. * @return {?}
  5246. */
  5247. pixelMarginRight : function() {
  5248. return computePixelPositionAndBoxSizingReliable(), f;
  5249. },
  5250. /**
  5251. * @return {?}
  5252. */
  5253. reliableMarginLeft : function() {
  5254. return computePixelPositionAndBoxSizingReliable(), g;
  5255. }
  5256. });
  5257. }
  5258. }();
  5259. /** @type {RegExp} */
  5260. var rdisplayswap = /^(none|table(?!-c[ea]).+)/;
  5261. var cssShow = {
  5262. position : "absolute",
  5263. visibility : "hidden",
  5264. display : "block"
  5265. };
  5266. var cssNormalTransform = {
  5267. letterSpacing : "0",
  5268. fontWeight : "400"
  5269. };
  5270. /** @type {Array} */
  5271. var VENDOR_PREFIXES = ["Webkit", "Moz", "ms"];
  5272. var table = doc.createElement("div").style;
  5273. jQuery.extend({
  5274. cssHooks : {
  5275. opacity : {
  5276. /**
  5277. * @param {Object} elem
  5278. * @param {string} value
  5279. * @return {?}
  5280. */
  5281. get : function(elem, value) {
  5282. if (value) {
  5283. var buffer = css(elem, "opacity");
  5284. return "" === buffer ? "1" : buffer;
  5285. }
  5286. }
  5287. }
  5288. },
  5289. cssNumber : {
  5290. animationIterationCount : true,
  5291. columnCount : true,
  5292. fillOpacity : true,
  5293. flexGrow : true,
  5294. flexShrink : true,
  5295. fontWeight : true,
  5296. lineHeight : true,
  5297. opacity : true,
  5298. order : true,
  5299. orphans : true,
  5300. widows : true,
  5301. zIndex : true,
  5302. zoom : true
  5303. },
  5304. cssProps : {
  5305. "float" : "cssFloat"
  5306. },
  5307. /**
  5308. * @param {Object} elem
  5309. * @param {string} prop
  5310. * @param {string} value
  5311. * @param {string} name
  5312. * @return {?}
  5313. */
  5314. style : function(elem, prop, value, name) {
  5315. if (elem && (3 !== elem.nodeType && (8 !== elem.nodeType && elem.style))) {
  5316. var ret;
  5317. var type;
  5318. var hooks;
  5319. var p = jQuery.camelCase(prop);
  5320. var style = elem.style;
  5321. return prop = jQuery.cssProps[p] || (jQuery.cssProps[p] = camelCase(p) || p), hooks = jQuery.cssHooks[prop] || jQuery.cssHooks[p], void 0 === value ? hooks && ("get" in hooks && void 0 !== (ret = hooks.get(elem, false, name))) ? ret : style[prop] : (type = typeof value, "string" === type && ((ret = regexp.exec(value)) && (ret[1] && (value = get(elem, prop, ret), type = "number"))), null != value && (value === value && ("number" === type && (value += ret && ret[3] || (jQuery.cssNumber[p] ?
  5322. "" : "px")), support.clearCloneStyle || ("" !== value || (0 !== prop.indexOf("background") || (style[prop] = "inherit"))), hooks && ("set" in hooks && void 0 === (value = hooks.set(elem, value, name))) || (style[prop] = value))), void 0);
  5323. }
  5324. },
  5325. /**
  5326. * @param {Object} elem
  5327. * @param {string} prop
  5328. * @param {boolean} recurring
  5329. * @param {?} val
  5330. * @return {?}
  5331. */
  5332. css : function(elem, prop, recurring, val) {
  5333. var ret;
  5334. var result;
  5335. var hooks;
  5336. var name = jQuery.camelCase(prop);
  5337. return prop = jQuery.cssProps[name] || (jQuery.cssProps[name] = camelCase(name) || name), hooks = jQuery.cssHooks[prop] || jQuery.cssHooks[name], hooks && ("get" in hooks && (ret = hooks.get(elem, true, recurring))), void 0 === ret && (ret = css(elem, prop, val)), "normal" === ret && (prop in cssNormalTransform && (ret = cssNormalTransform[prop])), "" === recurring || recurring ? (result = parseFloat(ret), recurring === true || isFinite(result) ? result || 0 : ret) : ret;
  5338. }
  5339. });
  5340. jQuery.each(["height", "width"], function(dataAndEvents, name) {
  5341. jQuery.cssHooks[name] = {
  5342. /**
  5343. * @param {Object} elem
  5344. * @param {string} value
  5345. * @param {string} extra
  5346. * @return {?}
  5347. */
  5348. get : function(elem, value, extra) {
  5349. if (value) {
  5350. return!rdisplayswap.test(jQuery.css(elem, "display")) || elem.getClientRects().length && elem.getBoundingClientRect().width ? getWidthOrHeight(elem, name, extra) : swap(elem, cssShow, function() {
  5351. return getWidthOrHeight(elem, name, extra);
  5352. });
  5353. }
  5354. },
  5355. /**
  5356. * @param {Object} elem
  5357. * @param {string} value
  5358. * @param {string} fn
  5359. * @return {?}
  5360. */
  5361. set : function(elem, value, fn) {
  5362. var match;
  5363. var styles = fn && getStyles(elem);
  5364. var val = fn && augmentWidthOrHeight(elem, name, fn, "border-box" === jQuery.css(elem, "boxSizing", false, styles), styles);
  5365. return val && ((match = regexp.exec(value)) && ("px" !== (match[3] || "px") && (elem.style[name] = value, value = jQuery.css(elem, name)))), set(elem, value, val);
  5366. }
  5367. };
  5368. });
  5369. jQuery.cssHooks.marginLeft = addGetHookIf(support.reliableMarginLeft, function(child, dataAndEvents) {
  5370. if (dataAndEvents) {
  5371. return(parseFloat(css(child, "marginLeft")) || child.getBoundingClientRect().left - swap(child, {
  5372. marginLeft : 0
  5373. }, function() {
  5374. return child.getBoundingClientRect().left;
  5375. })) + "px";
  5376. }
  5377. });
  5378. jQuery.each({
  5379. margin : "",
  5380. padding : "",
  5381. border : "Width"
  5382. }, function(prefix, suffix) {
  5383. jQuery.cssHooks[prefix + suffix] = {
  5384. /**
  5385. * @param {string} line
  5386. * @return {?}
  5387. */
  5388. expand : function(line) {
  5389. /** @type {number} */
  5390. var i = 0;
  5391. var expanded = {};
  5392. /** @type {Array} */
  5393. var tokens = "string" == typeof line ? line.split(" ") : [line];
  5394. for (;i < 4;i++) {
  5395. expanded[prefix + cssExpand[i] + suffix] = tokens[i] || (tokens[i - 2] || tokens[0]);
  5396. }
  5397. return expanded;
  5398. }
  5399. };
  5400. if (!rbracket.test(prefix)) {
  5401. /** @type {function (Object, string, string): ?} */
  5402. jQuery.cssHooks[prefix + suffix].set = set;
  5403. }
  5404. });
  5405. jQuery.fn.extend({
  5406. /**
  5407. * @param {Object} elem
  5408. * @param {string} value
  5409. * @return {?}
  5410. */
  5411. css : function(elem, value) {
  5412. return access(this, function(elem, prop, value) {
  5413. var styles;
  5414. var valsLength;
  5415. var map = {};
  5416. /** @type {number} */
  5417. var i = 0;
  5418. if (jQuery.isArray(prop)) {
  5419. styles = getStyles(elem);
  5420. valsLength = prop.length;
  5421. for (;i < valsLength;i++) {
  5422. map[prop[i]] = jQuery.css(elem, prop[i], false, styles);
  5423. }
  5424. return map;
  5425. }
  5426. return void 0 !== value ? jQuery.style(elem, prop, value) : jQuery.css(elem, prop);
  5427. }, elem, value, arguments.length > 1);
  5428. }
  5429. });
  5430. /** @type {function (Object, Function, boolean, Object, number): ?} */
  5431. jQuery.Tween = Tween;
  5432. Tween.prototype = {
  5433. /** @type {function (Object, Function, boolean, Object, number): ?} */
  5434. constructor : Tween,
  5435. /**
  5436. * @param {Object} allBindingsAccessor
  5437. * @param {Object} options
  5438. * @param {?} prop
  5439. * @param {number} to
  5440. * @param {string} easing
  5441. * @param {string} unit
  5442. * @return {undefined}
  5443. */
  5444. init : function(allBindingsAccessor, options, prop, to, easing, unit) {
  5445. /** @type {Object} */
  5446. this.elem = allBindingsAccessor;
  5447. this.prop = prop;
  5448. this.easing = easing || jQuery.easing._default;
  5449. /** @type {Object} */
  5450. this.options = options;
  5451. this.start = this.now = this.cur();
  5452. /** @type {number} */
  5453. this.end = to;
  5454. this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
  5455. },
  5456. /**
  5457. * @return {?}
  5458. */
  5459. cur : function() {
  5460. var hooks = Tween.propHooks[this.prop];
  5461. return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
  5462. },
  5463. /**
  5464. * @param {number} percent
  5465. * @return {?}
  5466. */
  5467. run : function(percent) {
  5468. var eased;
  5469. var hooks = Tween.propHooks[this.prop];
  5470. return this.options.duration ? this.pos = eased = jQuery.easing[this.easing](percent, this.options.duration * percent, 0, 1, this.options.duration) : this.pos = eased = percent, this.now = (this.end - this.start) * eased + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), hooks && hooks.set ? hooks.set(this) : Tween.propHooks._default.set(this), this;
  5471. }
  5472. };
  5473. Tween.prototype.init.prototype = Tween.prototype;
  5474. Tween.propHooks = {
  5475. _default : {
  5476. /**
  5477. * @param {Object} elem
  5478. * @return {?}
  5479. */
  5480. get : function(elem) {
  5481. var node;
  5482. return 1 !== elem.elem.nodeType || null != elem.elem[elem.prop] && null == elem.elem.style[elem.prop] ? elem.elem[elem.prop] : (node = jQuery.css(elem.elem, elem.prop, ""), node && "auto" !== node ? node : 0);
  5483. },
  5484. /**
  5485. * @param {Object} tween
  5486. * @return {undefined}
  5487. */
  5488. set : function(tween) {
  5489. if (jQuery.fx.step[tween.prop]) {
  5490. jQuery.fx.step[tween.prop](tween);
  5491. } else {
  5492. if (1 !== tween.elem.nodeType || null == tween.elem.style[jQuery.cssProps[tween.prop]] && !jQuery.cssHooks[tween.prop]) {
  5493. tween.elem[tween.prop] = tween.now;
  5494. } else {
  5495. jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
  5496. }
  5497. }
  5498. }
  5499. }
  5500. };
  5501. Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
  5502. /**
  5503. * @param {Object} elem
  5504. * @return {undefined}
  5505. */
  5506. set : function(elem) {
  5507. if (elem.elem.nodeType) {
  5508. if (elem.elem.parentNode) {
  5509. elem.elem[elem.prop] = elem.now;
  5510. }
  5511. }
  5512. }
  5513. };
  5514. jQuery.easing = {
  5515. /**
  5516. * @param {?} t
  5517. * @return {?}
  5518. */
  5519. linear : function(t) {
  5520. return t;
  5521. },
  5522. /**
  5523. * @param {number} p
  5524. * @return {?}
  5525. */
  5526. swing : function(p) {
  5527. return 0.5 - Math.cos(p * Math.PI) / 2;
  5528. },
  5529. _default : "swing"
  5530. };
  5531. /** @type {function (Object, Object, ?, number, string, string): undefined} */
  5532. jQuery.fx = Tween.prototype.init;
  5533. jQuery.fx.step = {};
  5534. var fxNow;
  5535. var id;
  5536. /** @type {RegExp} */
  5537. var spaceRe = /^(?:toggle|show|hide)$/;
  5538. /** @type {RegExp} */
  5539. var numbers = /queueHooks$/;
  5540. jQuery.Animation = jQuery.extend(Animation, {
  5541. tweeners : {
  5542. "*" : [function(prop, value) {
  5543. var tween = this.createTween(prop, value);
  5544. return get(tween.elem, prop, regexp.exec(value), tween), tween;
  5545. }]
  5546. },
  5547. /**
  5548. * @param {Object} value
  5549. * @param {Function} callback
  5550. * @return {undefined}
  5551. */
  5552. tweener : function(value, callback) {
  5553. if (jQuery.isFunction(value)) {
  5554. /** @type {Object} */
  5555. callback = value;
  5556. /** @type {Array} */
  5557. value = ["*"];
  5558. } else {
  5559. value = value.match(core_rnotwhite);
  5560. }
  5561. var type;
  5562. /** @type {number} */
  5563. var j = 0;
  5564. var jlen = value.length;
  5565. for (;j < jlen;j++) {
  5566. type = value[j];
  5567. Animation.tweeners[type] = Animation.tweeners[type] || [];
  5568. Animation.tweeners[type].unshift(callback);
  5569. }
  5570. },
  5571. prefilters : [defaultPrefilter],
  5572. /**
  5573. * @param {?} suite
  5574. * @param {?} prepend
  5575. * @return {undefined}
  5576. */
  5577. prefilter : function(suite, prepend) {
  5578. if (prepend) {
  5579. Animation.prefilters.unshift(suite);
  5580. } else {
  5581. Animation.prefilters.push(suite);
  5582. }
  5583. }
  5584. });
  5585. /**
  5586. * @param {string} speed
  5587. * @param {boolean} easing
  5588. * @param {string} fn
  5589. * @return {?}
  5590. */
  5591. jQuery.speed = function(speed, easing, fn) {
  5592. var opt = speed && "object" == typeof speed ? jQuery.extend({}, speed) : {
  5593. complete : fn || (!fn && easing || jQuery.isFunction(speed) && speed),
  5594. duration : speed,
  5595. easing : fn && easing || easing && (!jQuery.isFunction(easing) && easing)
  5596. };
  5597. return jQuery.fx.off || doc.hidden ? opt.duration = 0 : "number" != typeof opt.duration && (opt.duration in jQuery.fx.speeds ? opt.duration = jQuery.fx.speeds[opt.duration] : opt.duration = jQuery.fx.speeds._default), null != opt.queue && opt.queue !== true || (opt.queue = "fx"), opt.old = opt.complete, opt.complete = function() {
  5598. if (jQuery.isFunction(opt.old)) {
  5599. opt.old.call(this);
  5600. }
  5601. if (opt.queue) {
  5602. jQuery.dequeue(this, opt.queue);
  5603. }
  5604. }, opt;
  5605. };
  5606. jQuery.fn.extend({
  5607. /**
  5608. * @param {string} speed
  5609. * @param {(number|string)} to
  5610. * @param {boolean} callback
  5611. * @param {string} _callback
  5612. * @return {?}
  5613. */
  5614. fadeTo : function(speed, to, callback, _callback) {
  5615. return this.filter(isHidden).css("opacity", 0).show().end().animate({
  5616. opacity : to
  5617. }, speed, callback, _callback);
  5618. },
  5619. /**
  5620. * @param {?} prop
  5621. * @param {string} speed
  5622. * @param {boolean} easing
  5623. * @param {string} callback
  5624. * @return {?}
  5625. */
  5626. animate : function(prop, speed, easing, callback) {
  5627. var empty = jQuery.isEmptyObject(prop);
  5628. var optall = jQuery.speed(speed, easing, callback);
  5629. /**
  5630. * @return {undefined}
  5631. */
  5632. var doAnimation = function() {
  5633. var anim = Animation(this, jQuery.extend({}, prop), optall);
  5634. if (empty || data_priv.get(this, "finish")) {
  5635. anim.stop(true);
  5636. }
  5637. };
  5638. return doAnimation.finish = doAnimation, empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
  5639. },
  5640. /**
  5641. * @param {boolean} type
  5642. * @param {boolean} clearQueue
  5643. * @param {boolean} gotoEnd
  5644. * @return {?}
  5645. */
  5646. stop : function(type, clearQueue, gotoEnd) {
  5647. /**
  5648. * @param {Object} e
  5649. * @return {undefined}
  5650. */
  5651. var stop = function(e) {
  5652. var stop = e.stop;
  5653. delete e.stop;
  5654. stop(gotoEnd);
  5655. };
  5656. return "string" != typeof type && (gotoEnd = clearQueue, clearQueue = type, type = void 0), clearQueue && (type !== false && this.queue(type || "fx", [])), this.each(function() {
  5657. /** @type {boolean} */
  5658. var b = true;
  5659. var i = null != type && type + "queueHooks";
  5660. /** @type {Array} */
  5661. var timers = jQuery.timers;
  5662. var gradient = data_priv.get(this);
  5663. if (i) {
  5664. if (gradient[i]) {
  5665. if (gradient[i].stop) {
  5666. stop(gradient[i]);
  5667. }
  5668. }
  5669. } else {
  5670. for (i in gradient) {
  5671. if (gradient[i]) {
  5672. if (gradient[i].stop) {
  5673. if (numbers.test(i)) {
  5674. stop(gradient[i]);
  5675. }
  5676. }
  5677. }
  5678. }
  5679. }
  5680. /** @type {number} */
  5681. i = timers.length;
  5682. for (;i--;) {
  5683. if (!(timers[i].elem !== this)) {
  5684. if (!(null != type && timers[i].queue !== type)) {
  5685. timers[i].anim.stop(gotoEnd);
  5686. /** @type {boolean} */
  5687. b = false;
  5688. timers.splice(i, 1);
  5689. }
  5690. }
  5691. }
  5692. if (!(!b && gotoEnd)) {
  5693. jQuery.dequeue(this, type);
  5694. }
  5695. });
  5696. },
  5697. /**
  5698. * @param {string} type
  5699. * @return {?}
  5700. */
  5701. finish : function(type) {
  5702. return type !== false && (type = type || "fx"), this.each(function() {
  5703. var index;
  5704. var data = data_priv.get(this);
  5705. var array = data[type + "queue"];
  5706. var event = data[type + "queueHooks"];
  5707. /** @type {Array} */
  5708. var timers = jQuery.timers;
  5709. var length = array ? array.length : 0;
  5710. /** @type {boolean} */
  5711. data.finish = true;
  5712. jQuery.queue(this, type, []);
  5713. if (event) {
  5714. if (event.stop) {
  5715. event.stop.call(this, true);
  5716. }
  5717. }
  5718. /** @type {number} */
  5719. index = timers.length;
  5720. for (;index--;) {
  5721. if (timers[index].elem === this) {
  5722. if (timers[index].queue === type) {
  5723. timers[index].anim.stop(true);
  5724. timers.splice(index, 1);
  5725. }
  5726. }
  5727. }
  5728. /** @type {number} */
  5729. index = 0;
  5730. for (;index < length;index++) {
  5731. if (array[index]) {
  5732. if (array[index].finish) {
  5733. array[index].finish.call(this);
  5734. }
  5735. }
  5736. }
  5737. delete data.finish;
  5738. });
  5739. }
  5740. });
  5741. jQuery.each(["toggle", "show", "hide"], function(dataAndEvents, name) {
  5742. var matcherFunction = jQuery.fn[name];
  5743. /**
  5744. * @param {string} speed
  5745. * @param {boolean} callback
  5746. * @param {string} next_callback
  5747. * @return {?}
  5748. */
  5749. jQuery.fn[name] = function(speed, callback, next_callback) {
  5750. return null == speed || "boolean" == typeof speed ? matcherFunction.apply(this, arguments) : this.animate(genFx(name, true), speed, callback, next_callback);
  5751. };
  5752. });
  5753. jQuery.each({
  5754. slideDown : genFx("show"),
  5755. slideUp : genFx("hide"),
  5756. slideToggle : genFx("toggle"),
  5757. fadeIn : {
  5758. opacity : "show"
  5759. },
  5760. fadeOut : {
  5761. opacity : "hide"
  5762. },
  5763. fadeToggle : {
  5764. opacity : "toggle"
  5765. }
  5766. }, function(original, props) {
  5767. /**
  5768. * @param {string} speed
  5769. * @param {boolean} callback
  5770. * @param {string} next_callback
  5771. * @return {?}
  5772. */
  5773. jQuery.fn[original] = function(speed, callback, next_callback) {
  5774. return this.animate(props, speed, callback, next_callback);
  5775. };
  5776. });
  5777. /** @type {Array} */
  5778. jQuery.timers = [];
  5779. /**
  5780. * @return {undefined}
  5781. */
  5782. jQuery.fx.tick = function() {
  5783. var last;
  5784. /** @type {number} */
  5785. var i = 0;
  5786. /** @type {Array} */
  5787. var timers = jQuery.timers;
  5788. fxNow = jQuery.now();
  5789. for (;i < timers.length;i++) {
  5790. last = timers[i];
  5791. if (!last()) {
  5792. if (!(timers[i] !== last)) {
  5793. timers.splice(i--, 1);
  5794. }
  5795. }
  5796. }
  5797. if (!timers.length) {
  5798. jQuery.fx.stop();
  5799. }
  5800. fxNow = void 0;
  5801. };
  5802. /**
  5803. * @param {?} timer
  5804. * @return {undefined}
  5805. */
  5806. jQuery.fx.timer = function(timer) {
  5807. jQuery.timers.push(timer);
  5808. if (timer()) {
  5809. jQuery.fx.start();
  5810. } else {
  5811. jQuery.timers.pop();
  5812. }
  5813. };
  5814. /** @type {number} */
  5815. jQuery.fx.interval = 13;
  5816. /**
  5817. * @return {undefined}
  5818. */
  5819. jQuery.fx.start = function() {
  5820. if (!id) {
  5821. id = win.requestAnimationFrame ? win.requestAnimationFrame(raf) : win.setInterval(jQuery.fx.tick, jQuery.fx.interval);
  5822. }
  5823. };
  5824. /**
  5825. * @return {undefined}
  5826. */
  5827. jQuery.fx.stop = function() {
  5828. if (win.cancelAnimationFrame) {
  5829. win.cancelAnimationFrame(id);
  5830. } else {
  5831. win.clearInterval(id);
  5832. }
  5833. /** @type {null} */
  5834. id = null;
  5835. };
  5836. jQuery.fx.speeds = {
  5837. slow : 600,
  5838. fast : 200,
  5839. _default : 400
  5840. };
  5841. /**
  5842. * @param {HTMLElement} time
  5843. * @param {string} type
  5844. * @return {?}
  5845. */
  5846. jQuery.fn.delay = function(time, type) {
  5847. return time = jQuery.fx ? jQuery.fx.speeds[time] || time : time, type = type || "fx", this.queue(type, function(next, event) {
  5848. var timeout = win.setTimeout(next, time);
  5849. /**
  5850. * @return {undefined}
  5851. */
  5852. event.stop = function() {
  5853. win.clearTimeout(timeout);
  5854. };
  5855. });
  5856. };
  5857. (function() {
  5858. var input = doc.createElement("input");
  5859. var select = doc.createElement("select");
  5860. var opt = select.appendChild(doc.createElement("option"));
  5861. /** @type {string} */
  5862. input.type = "checkbox";
  5863. /** @type {boolean} */
  5864. support.checkOn = "" !== input.value;
  5865. support.optSelected = opt.selected;
  5866. input = doc.createElement("input");
  5867. /** @type {string} */
  5868. input.value = "t";
  5869. /** @type {string} */
  5870. input.type = "radio";
  5871. /** @type {boolean} */
  5872. support.radioValue = "t" === input.value;
  5873. })();
  5874. var boolHook;
  5875. var files = jQuery.expr.attrHandle;
  5876. jQuery.fn.extend({
  5877. /**
  5878. * @param {Object} name
  5879. * @param {string} value
  5880. * @return {?}
  5881. */
  5882. attr : function(name, value) {
  5883. return access(this, jQuery.attr, name, value, arguments.length > 1);
  5884. },
  5885. /**
  5886. * @param {Object} name
  5887. * @return {?}
  5888. */
  5889. removeAttr : function(name) {
  5890. return this.each(function() {
  5891. jQuery.removeAttr(this, name);
  5892. });
  5893. }
  5894. });
  5895. jQuery.extend({
  5896. /**
  5897. * @param {Object} elem
  5898. * @param {string} name
  5899. * @param {string} value
  5900. * @return {?}
  5901. */
  5902. attr : function(elem, name, value) {
  5903. var ret;
  5904. var hooks;
  5905. var nodeType = elem.nodeType;
  5906. if (3 !== nodeType && (8 !== nodeType && 2 !== nodeType)) {
  5907. return "undefined" == typeof elem.getAttribute ? jQuery.prop(elem, name, value) : (1 === nodeType && jQuery.isXMLDoc(elem) || (hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0)), void 0 !== value ? null === value ? void jQuery.removeAttr(elem, name) : hooks && ("set" in hooks && void 0 !== (ret = hooks.set(elem, value, name))) ? ret : (elem.setAttribute(name, value + ""), value) : hooks && ("get" in hooks && null !== (ret = hooks.get(elem,
  5908. name))) ? ret : (ret = jQuery.find.attr(elem, name), null == ret ? void 0 : ret));
  5909. }
  5910. },
  5911. attrHooks : {
  5912. type : {
  5913. /**
  5914. * @param {Object} elem
  5915. * @param {string} value
  5916. * @return {?}
  5917. */
  5918. set : function(elem, value) {
  5919. if (!support.radioValue && ("radio" === value && jQuery.nodeName(elem, "input"))) {
  5920. var val = elem.value;
  5921. return elem.setAttribute("type", value), val && (elem.value = val), value;
  5922. }
  5923. }
  5924. }
  5925. },
  5926. /**
  5927. * @param {Object} elem
  5928. * @param {string} value
  5929. * @return {undefined}
  5930. */
  5931. removeAttr : function(elem, value) {
  5932. var name;
  5933. /** @type {number} */
  5934. var i = 0;
  5935. var attrNames = value && value.match(core_rnotwhite);
  5936. if (attrNames && 1 === elem.nodeType) {
  5937. for (;name = attrNames[i++];) {
  5938. elem.removeAttribute(name);
  5939. }
  5940. }
  5941. }
  5942. });
  5943. boolHook = {
  5944. /**
  5945. * @param {Object} elem
  5946. * @param {string} value
  5947. * @param {string} name
  5948. * @return {?}
  5949. */
  5950. set : function(elem, value, name) {
  5951. return value === false ? jQuery.removeAttr(elem, name) : elem.setAttribute(name, name), name;
  5952. }
  5953. };
  5954. jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(dataAndEvents, name) {
  5955. var callback = files[name] || jQuery.find.attr;
  5956. /**
  5957. * @param {Object} body
  5958. * @param {string} header
  5959. * @param {string} arg
  5960. * @return {?}
  5961. */
  5962. files[name] = function(body, header, arg) {
  5963. var value;
  5964. var file;
  5965. var name = header.toLowerCase();
  5966. return arg || (file = files[name], files[name] = value, value = null != callback(body, header, arg) ? name : null, files[name] = file), value;
  5967. };
  5968. });
  5969. /** @type {RegExp} */
  5970. var rinputs = /^(?:input|select|textarea|button)$/i;
  5971. /** @type {RegExp} */
  5972. var rheader = /^(?:a|area)$/i;
  5973. jQuery.fn.extend({
  5974. /**
  5975. * @param {Object} name
  5976. * @param {string} value
  5977. * @return {?}
  5978. */
  5979. prop : function(name, value) {
  5980. return access(this, jQuery.prop, name, value, arguments.length > 1);
  5981. },
  5982. /**
  5983. * @param {?} name
  5984. * @return {?}
  5985. */
  5986. removeProp : function(name) {
  5987. return this.each(function() {
  5988. delete this[jQuery.propFix[name] || name];
  5989. });
  5990. }
  5991. });
  5992. jQuery.extend({
  5993. /**
  5994. * @param {Object} elem
  5995. * @param {string} name
  5996. * @param {string} value
  5997. * @return {?}
  5998. */
  5999. prop : function(elem, name, value) {
  6000. var ret;
  6001. var hooks;
  6002. var nodeType = elem.nodeType;
  6003. if (3 !== nodeType && (8 !== nodeType && 2 !== nodeType)) {
  6004. return 1 === nodeType && jQuery.isXMLDoc(elem) || (name = jQuery.propFix[name] || name, hooks = jQuery.propHooks[name]), void 0 !== value ? hooks && ("set" in hooks && void 0 !== (ret = hooks.set(elem, value, name))) ? ret : elem[name] = value : hooks && ("get" in hooks && null !== (ret = hooks.get(elem, name))) ? ret : elem[name];
  6005. }
  6006. },
  6007. propHooks : {
  6008. tabIndex : {
  6009. /**
  6010. * @param {Object} elem
  6011. * @return {?}
  6012. */
  6013. get : function(elem) {
  6014. var tabindex = jQuery.find.attr(elem, "tabindex");
  6015. return tabindex ? parseInt(tabindex, 10) : rinputs.test(elem.nodeName) || rheader.test(elem.nodeName) && elem.href ? 0 : -1;
  6016. }
  6017. }
  6018. },
  6019. propFix : {
  6020. "for" : "htmlFor",
  6021. "class" : "className"
  6022. }
  6023. });
  6024. if (!support.optSelected) {
  6025. jQuery.propHooks.selected = {
  6026. /**
  6027. * @param {Object} elem
  6028. * @return {?}
  6029. */
  6030. get : function(elem) {
  6031. var parent = elem.parentNode;
  6032. return parent && (parent.parentNode && parent.parentNode.selectedIndex), null;
  6033. },
  6034. /**
  6035. * @param {Object} elem
  6036. * @return {undefined}
  6037. */
  6038. set : function(elem) {
  6039. var parent = elem.parentNode;
  6040. if (parent) {
  6041. parent.selectedIndex;
  6042. if (parent.parentNode) {
  6043. parent.parentNode.selectedIndex;
  6044. }
  6045. }
  6046. }
  6047. };
  6048. }
  6049. jQuery.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
  6050. jQuery.propFix[this.toLowerCase()] = this;
  6051. });
  6052. jQuery.fn.extend({
  6053. /**
  6054. * @param {string} value
  6055. * @return {?}
  6056. */
  6057. addClass : function(value) {
  6058. var res;
  6059. var obj;
  6060. var cls;
  6061. var result;
  6062. var c;
  6063. var resLength;
  6064. var a;
  6065. /** @type {number} */
  6066. var i = 0;
  6067. if (jQuery.isFunction(value)) {
  6068. return this.each(function(j) {
  6069. jQuery(this).addClass(value.call(this, j, each(this)));
  6070. });
  6071. }
  6072. if ("string" == typeof value && value) {
  6073. /** @type {Array} */
  6074. res = value.match(core_rnotwhite) || [];
  6075. for (;obj = this[i++];) {
  6076. if (result = each(obj), cls = 1 === obj.nodeType && " " + $(result) + " ") {
  6077. /** @type {number} */
  6078. resLength = 0;
  6079. for (;c = res[resLength++];) {
  6080. if (cls.indexOf(" " + c + " ") < 0) {
  6081. cls += c + " ";
  6082. }
  6083. }
  6084. a = $(cls);
  6085. if (result !== a) {
  6086. obj.setAttribute("class", a);
  6087. }
  6088. }
  6089. }
  6090. }
  6091. return this;
  6092. },
  6093. /**
  6094. * @param {string} value
  6095. * @return {?}
  6096. */
  6097. removeClass : function(value) {
  6098. var res;
  6099. var obj;
  6100. var caption;
  6101. var result;
  6102. var apn;
  6103. var resLength;
  6104. var id;
  6105. /** @type {number} */
  6106. var i = 0;
  6107. if (jQuery.isFunction(value)) {
  6108. return this.each(function(j) {
  6109. jQuery(this).removeClass(value.call(this, j, each(this)));
  6110. });
  6111. }
  6112. if (!arguments.length) {
  6113. return this.attr("class", "");
  6114. }
  6115. if ("string" == typeof value && value) {
  6116. /** @type {Array} */
  6117. res = value.match(core_rnotwhite) || [];
  6118. for (;obj = this[i++];) {
  6119. if (result = each(obj), caption = 1 === obj.nodeType && " " + $(result) + " ") {
  6120. /** @type {number} */
  6121. resLength = 0;
  6122. for (;apn = res[resLength++];) {
  6123. for (;caption.indexOf(" " + apn + " ") > -1;) {
  6124. /** @type {string} */
  6125. caption = caption.replace(" " + apn + " ", " ");
  6126. }
  6127. }
  6128. id = $(caption);
  6129. if (result !== id) {
  6130. obj.setAttribute("class", id);
  6131. }
  6132. }
  6133. }
  6134. }
  6135. return this;
  6136. },
  6137. /**
  6138. * @param {string} value
  6139. * @param {?} stateVal
  6140. * @return {?}
  6141. */
  6142. toggleClass : function(value, stateVal) {
  6143. /** @type {string} */
  6144. var type = typeof value;
  6145. return "boolean" == typeof stateVal && "string" === type ? stateVal ? this.addClass(value) : this.removeClass(value) : jQuery.isFunction(value) ? this.each(function(i) {
  6146. jQuery(this).toggleClass(value.call(this, i, each(this), stateVal), stateVal);
  6147. }) : this.each(function() {
  6148. var b;
  6149. var p;
  6150. var li;
  6151. var imageData;
  6152. if ("string" === type) {
  6153. /** @type {number} */
  6154. p = 0;
  6155. li = jQuery(this);
  6156. imageData = value.match(core_rnotwhite) || [];
  6157. for (;b = imageData[p++];) {
  6158. if (li.hasClass(b)) {
  6159. li.removeClass(b);
  6160. } else {
  6161. li.addClass(b);
  6162. }
  6163. }
  6164. } else {
  6165. if (!(void 0 !== value && "boolean" !== type)) {
  6166. b = each(this);
  6167. if (b) {
  6168. data_priv.set(this, "__className__", b);
  6169. }
  6170. if (this.setAttribute) {
  6171. this.setAttribute("class", b || value === false ? "" : data_priv.get(this, "__className__") || "");
  6172. }
  6173. }
  6174. }
  6175. });
  6176. },
  6177. /**
  6178. * @param {string} name
  6179. * @return {?}
  6180. */
  6181. hasClass : function(name) {
  6182. var tval;
  6183. var self;
  6184. /** @type {number} */
  6185. var d = 0;
  6186. /** @type {string} */
  6187. tval = " " + name + " ";
  6188. for (;self = this[d++];) {
  6189. if (1 === self.nodeType && (" " + $(each(self)) + " ").indexOf(tval) > -1) {
  6190. return true;
  6191. }
  6192. }
  6193. return false;
  6194. }
  6195. });
  6196. /** @type {RegExp} */
  6197. var rreturn = /\r/g;
  6198. jQuery.fn.extend({
  6199. /**
  6200. * @param {string} value
  6201. * @return {?}
  6202. */
  6203. val : function(value) {
  6204. var hooks;
  6205. var ret;
  6206. var isFunction;
  6207. var elem = this[0];
  6208. if (arguments.length) {
  6209. return isFunction = jQuery.isFunction(value), this.each(function(i) {
  6210. var val;
  6211. if (1 === this.nodeType) {
  6212. val = isFunction ? value.call(this, i, jQuery(this).val()) : value;
  6213. if (null == val) {
  6214. /** @type {string} */
  6215. val = "";
  6216. } else {
  6217. if ("number" == typeof val) {
  6218. val += "";
  6219. } else {
  6220. if (jQuery.isArray(val)) {
  6221. val = jQuery.map(val, function(month) {
  6222. return null == month ? "" : month + "";
  6223. });
  6224. }
  6225. }
  6226. }
  6227. hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
  6228. if (!(hooks && ("set" in hooks && void 0 !== hooks.set(this, val, "value")))) {
  6229. this.value = val;
  6230. }
  6231. }
  6232. });
  6233. }
  6234. if (elem) {
  6235. return hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()], hooks && ("get" in hooks && void 0 !== (ret = hooks.get(elem, "value"))) ? ret : (ret = elem.value, "string" == typeof ret ? ret.replace(rreturn, "") : null == ret ? "" : ret);
  6236. }
  6237. }
  6238. });
  6239. jQuery.extend({
  6240. valHooks : {
  6241. option : {
  6242. /**
  6243. * @param {Object} elem
  6244. * @return {?}
  6245. */
  6246. get : function(elem) {
  6247. var handle = jQuery.find.attr(elem, "value");
  6248. return null != handle ? handle : $(jQuery.text(elem));
  6249. }
  6250. },
  6251. select : {
  6252. /**
  6253. * @param {Object} elem
  6254. * @return {?}
  6255. */
  6256. get : function(elem) {
  6257. var copies;
  6258. var option;
  6259. var i;
  6260. var options = elem.options;
  6261. var index = elem.selectedIndex;
  6262. /** @type {boolean} */
  6263. var one = "select-one" === elem.type;
  6264. /** @type {(Array|null)} */
  6265. var out = one ? null : [];
  6266. var max = one ? index + 1 : options.length;
  6267. i = index < 0 ? max : one ? index : 0;
  6268. for (;i < max;i++) {
  6269. if (option = options[i], (option.selected || i === index) && (!option.disabled && (!option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup")))) {
  6270. if (copies = jQuery(option).val(), one) {
  6271. return copies;
  6272. }
  6273. out.push(copies);
  6274. }
  6275. }
  6276. return out;
  6277. },
  6278. /**
  6279. * @param {Object} elem
  6280. * @param {string} value
  6281. * @return {?}
  6282. */
  6283. set : function(elem, value) {
  6284. var c;
  6285. var cur;
  6286. var options = elem.options;
  6287. var values = jQuery.makeArray(value);
  6288. var i = options.length;
  6289. for (;i--;) {
  6290. cur = options[i];
  6291. if (cur.selected = jQuery.inArray(jQuery.valHooks.option.get(cur), values) > -1) {
  6292. /** @type {boolean} */
  6293. c = true;
  6294. }
  6295. }
  6296. return c || (elem.selectedIndex = -1), values;
  6297. }
  6298. }
  6299. }
  6300. });
  6301. jQuery.each(["radio", "checkbox"], function() {
  6302. jQuery.valHooks[this] = {
  6303. /**
  6304. * @param {Object} elem
  6305. * @param {string} value
  6306. * @return {?}
  6307. */
  6308. set : function(elem, value) {
  6309. if (jQuery.isArray(value)) {
  6310. return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
  6311. }
  6312. }
  6313. };
  6314. if (!support.checkOn) {
  6315. /**
  6316. * @param {Object} elem
  6317. * @return {?}
  6318. */
  6319. jQuery.valHooks[this].get = function(elem) {
  6320. return null === elem.getAttribute("value") ? "on" : elem.value;
  6321. };
  6322. }
  6323. });
  6324. /** @type {RegExp} */
  6325. var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
  6326. jQuery.extend(jQuery.event, {
  6327. /**
  6328. * @param {Object} event
  6329. * @param {?} data
  6330. * @param {Object} elem
  6331. * @param {boolean} onlyHandlers
  6332. * @return {?}
  6333. */
  6334. trigger : function(event, data, elem, onlyHandlers) {
  6335. var i;
  6336. var cur;
  6337. var tmp;
  6338. var bubbleType;
  6339. var ontype;
  6340. var handle;
  6341. var special;
  6342. /** @type {Array} */
  6343. var eventPath = [elem || doc];
  6344. var type = hasOwn.call(event, "type") ? event.type : event;
  6345. var namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
  6346. if (cur = tmp = elem = elem || doc, 3 !== elem.nodeType && (8 !== elem.nodeType && (!rfocusMorph.test(type + jQuery.event.triggered) && (type.indexOf(".") > -1 && (namespaces = type.split("."), type = namespaces.shift(), namespaces.sort()), ontype = type.indexOf(":") < 0 && "on" + type, event = event[jQuery.expando] ? event : new jQuery.Event(type, "object" == typeof event && event), event.isTrigger = onlyHandlers ? 2 : 3, event.namespace = namespaces.join("."), event.rnamespace = event.namespace ?
  6347. new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, event.result = void 0, event.target || (event.target = elem), data = null == data ? [event] : jQuery.makeArray(data, [event]), special = jQuery.event.special[type] || {}, onlyHandlers || (!special.trigger || special.trigger.apply(elem, data) !== false))))) {
  6348. if (!onlyHandlers && (!special.noBubble && !jQuery.isWindow(elem))) {
  6349. bubbleType = special.delegateType || type;
  6350. if (!rfocusMorph.test(bubbleType + type)) {
  6351. cur = cur.parentNode;
  6352. }
  6353. for (;cur;cur = cur.parentNode) {
  6354. eventPath.push(cur);
  6355. tmp = cur;
  6356. }
  6357. if (tmp === (elem.ownerDocument || doc)) {
  6358. eventPath.push(tmp.defaultView || (tmp.parentWindow || win));
  6359. }
  6360. }
  6361. /** @type {number} */
  6362. i = 0;
  6363. for (;(cur = eventPath[i++]) && !event.isPropagationStopped();) {
  6364. event.type = i > 1 ? bubbleType : special.bindType || type;
  6365. handle = (data_priv.get(cur, "events") || {})[event.type] && data_priv.get(cur, "handle");
  6366. if (handle) {
  6367. handle.apply(cur, data);
  6368. }
  6369. handle = ontype && cur[ontype];
  6370. if (handle) {
  6371. if (handle.apply) {
  6372. if (next(cur)) {
  6373. event.result = handle.apply(cur, data);
  6374. if (event.result === false) {
  6375. event.preventDefault();
  6376. }
  6377. }
  6378. }
  6379. }
  6380. }
  6381. return event.type = type, onlyHandlers || (event.isDefaultPrevented() || (special._default && special._default.apply(eventPath.pop(), data) !== false || (!next(elem) || ontype && (jQuery.isFunction(elem[type]) && (!jQuery.isWindow(elem) && (tmp = elem[ontype], tmp && (elem[ontype] = null), jQuery.event.triggered = type, elem[type](), jQuery.event.triggered = void 0, tmp && (elem[ontype] = tmp))))))), event.result;
  6382. }
  6383. },
  6384. /**
  6385. * @param {string} type
  6386. * @param {Object} elem
  6387. * @param {?} event
  6388. * @return {undefined}
  6389. */
  6390. simulate : function(type, elem, event) {
  6391. var e = jQuery.extend(new jQuery.Event, event, {
  6392. type : type,
  6393. isSimulated : true
  6394. });
  6395. jQuery.event.trigger(e, null, elem);
  6396. }
  6397. });
  6398. jQuery.fn.extend({
  6399. /**
  6400. * @param {string} type
  6401. * @param {?} data
  6402. * @return {?}
  6403. */
  6404. trigger : function(type, data) {
  6405. return this.each(function() {
  6406. jQuery.event.trigger(type, data, this);
  6407. });
  6408. },
  6409. /**
  6410. * @param {string} type
  6411. * @param {?} data
  6412. * @return {?}
  6413. */
  6414. triggerHandler : function(type, data) {
  6415. var parent = this[0];
  6416. if (parent) {
  6417. return jQuery.event.trigger(type, data, parent, true);
  6418. }
  6419. }
  6420. });
  6421. jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(dataAndEvents, name) {
  6422. /**
  6423. * @param {Object} one
  6424. * @param {Function} fn
  6425. * @return {?}
  6426. */
  6427. jQuery.fn[name] = function(one, fn) {
  6428. return arguments.length > 0 ? this.on(name, null, one, fn) : this.trigger(name);
  6429. };
  6430. });
  6431. jQuery.fn.extend({
  6432. /**
  6433. * @param {undefined} fnOver
  6434. * @param {Object} fnOut
  6435. * @return {?}
  6436. */
  6437. hover : function(fnOver, fnOut) {
  6438. return this.mouseenter(fnOver).mouseleave(fnOut || fnOver);
  6439. }
  6440. });
  6441. /** @type {boolean} */
  6442. support.focusin = "onfocusin" in win;
  6443. if (!support.focusin) {
  6444. jQuery.each({
  6445. focus : "focusin",
  6446. blur : "focusout"
  6447. }, function(event, name) {
  6448. /**
  6449. * @param {Object} event
  6450. * @return {undefined}
  6451. */
  6452. var handler = function(event) {
  6453. jQuery.event.simulate(name, event.target, jQuery.event.fix(event));
  6454. };
  6455. jQuery.event.special[name] = {
  6456. /**
  6457. * @return {undefined}
  6458. */
  6459. setup : function() {
  6460. var node = this.ownerDocument || this;
  6461. var descriptor = data_priv.access(node, name);
  6462. if (!descriptor) {
  6463. node.addEventListener(event, handler, true);
  6464. }
  6465. data_priv.access(node, name, (descriptor || 0) + 1);
  6466. },
  6467. /**
  6468. * @return {undefined}
  6469. */
  6470. teardown : function() {
  6471. var node = this.ownerDocument || this;
  6472. /** @type {number} */
  6473. var data = data_priv.access(node, name) - 1;
  6474. if (data) {
  6475. data_priv.access(node, name, data);
  6476. } else {
  6477. node.removeEventListener(event, handler, true);
  6478. data_priv.remove(node, name);
  6479. }
  6480. }
  6481. };
  6482. });
  6483. }
  6484. var req = win.location;
  6485. var iIdCounter = jQuery.now();
  6486. /** @type {RegExp} */
  6487. var rquery = /\?/;
  6488. /**
  6489. * @param {string} data
  6490. * @return {?}
  6491. */
  6492. jQuery.parseXML = function(data) {
  6493. var xml;
  6494. if (!data || "string" != typeof data) {
  6495. return null;
  6496. }
  6497. try {
  6498. xml = (new win.DOMParser).parseFromString(data, "text/xml");
  6499. } catch (d) {
  6500. xml = void 0;
  6501. }
  6502. return xml && !xml.getElementsByTagName("parsererror").length || jQuery.error("Invalid XML: " + data), xml;
  6503. };
  6504. /** @type {RegExp} */
  6505. var rmargin = /\[\]$/;
  6506. /** @type {RegExp} */
  6507. var rCRLF = /\r?\n/g;
  6508. /** @type {RegExp} */
  6509. var mouseTypeRegex = /^(?:submit|button|image|reset|file)$/i;
  6510. /** @type {RegExp} */
  6511. var rsubmittable = /^(?:input|select|textarea|keygen)/i;
  6512. /**
  6513. * @param {Object} a
  6514. * @param {boolean} traditional
  6515. * @return {?}
  6516. */
  6517. jQuery.param = function(a, traditional) {
  6518. var prefix;
  6519. /** @type {Array} */
  6520. var klass = [];
  6521. /**
  6522. * @param {?} key
  6523. * @param {string} value
  6524. * @return {undefined}
  6525. */
  6526. var add = function(key, value) {
  6527. var val = jQuery.isFunction(value) ? value() : value;
  6528. /** @type {string} */
  6529. klass[klass.length] = encodeURIComponent(key) + "=" + encodeURIComponent(null == val ? "" : val);
  6530. };
  6531. if (jQuery.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
  6532. jQuery.each(a, function() {
  6533. add(this.name, this.value);
  6534. });
  6535. } else {
  6536. for (prefix in a) {
  6537. buildParams(prefix, a[prefix], traditional, add);
  6538. }
  6539. }
  6540. return klass.join("&");
  6541. };
  6542. jQuery.fn.extend({
  6543. /**
  6544. * @return {?}
  6545. */
  6546. serialize : function() {
  6547. return jQuery.param(this.serializeArray());
  6548. },
  6549. /**
  6550. * @return {?}
  6551. */
  6552. serializeArray : function() {
  6553. return this.map(function() {
  6554. var elements = jQuery.prop(this, "elements");
  6555. return elements ? jQuery.makeArray(elements) : this;
  6556. }).filter(function() {
  6557. var type = this.type;
  6558. return this.name && (!jQuery(this).is(":disabled") && (rsubmittable.test(this.nodeName) && (!mouseTypeRegex.test(type) && (this.checked || !manipulation_rcheckableType.test(type)))));
  6559. }).map(function(dataAndEvents, elem) {
  6560. var val = jQuery(this).val();
  6561. return null == val ? null : jQuery.isArray(val) ? jQuery.map(val, function(val) {
  6562. return{
  6563. name : elem.name,
  6564. value : val.replace(rCRLF, "\r\n")
  6565. };
  6566. }) : {
  6567. name : elem.name,
  6568. value : val.replace(rCRLF, "\r\n")
  6569. };
  6570. }).get();
  6571. }
  6572. });
  6573. /** @type {RegExp} */
  6574. var badChars = /%20/g;
  6575. /** @type {RegExp} */
  6576. var trimRight = /#.*$/;
  6577. /** @type {RegExp} */
  6578. var reParent = /([?&])_=[^&]*/;
  6579. /** @type {RegExp} */
  6580. var whiteSpace = /^(.*?):[ \t]*([^\r\n]*)$/gm;
  6581. /** @type {RegExp} */
  6582. var url = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/;
  6583. /** @type {RegExp} */
  6584. var getOrPostRegEx = /^(?:GET|HEAD)$/;
  6585. /** @type {RegExp} */
  6586. var path = /^\/\//;
  6587. var prefilters = {};
  6588. var transports = {};
  6589. /** @type {string} */
  6590. var Hb = "*/".concat("*");
  6591. var l = doc.createElement("a");
  6592. l.href = req.href;
  6593. jQuery.extend({
  6594. active : 0,
  6595. lastModified : {},
  6596. etag : {},
  6597. ajaxSettings : {
  6598. url : req.href,
  6599. type : "GET",
  6600. isLocal : url.test(req.protocol),
  6601. global : true,
  6602. processData : true,
  6603. async : true,
  6604. contentType : "application/x-www-form-urlencoded; charset=UTF-8",
  6605. accepts : {
  6606. "*" : Hb,
  6607. text : "text/plain",
  6608. html : "text/html",
  6609. xml : "application/xml, text/xml",
  6610. json : "application/json, text/javascript"
  6611. },
  6612. contents : {
  6613. xml : /\bxml\b/,
  6614. html : /\bhtml/,
  6615. json : /\bjson\b/
  6616. },
  6617. responseFields : {
  6618. xml : "responseXML",
  6619. text : "responseText",
  6620. json : "responseJSON"
  6621. },
  6622. converters : {
  6623. /** @type {function (new:String, *=): string} */
  6624. "* text" : String,
  6625. "text html" : true,
  6626. /** @type {function (this:JSONType, string, function (string, *): *=): *} */
  6627. "text json" : JSON.parse,
  6628. /** @type {function (string): ?} */
  6629. "text xml" : jQuery.parseXML
  6630. },
  6631. flatOptions : {
  6632. url : true,
  6633. context : true
  6634. }
  6635. },
  6636. /**
  6637. * @param {(Object|string)} target
  6638. * @param {Object} settings
  6639. * @return {?}
  6640. */
  6641. ajaxSetup : function(target, settings) {
  6642. return settings ? ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings) : ajaxExtend(jQuery.ajaxSettings, target);
  6643. },
  6644. ajaxPrefilter : addToPrefiltersOrTransports(prefilters),
  6645. ajaxTransport : addToPrefiltersOrTransports(transports),
  6646. /**
  6647. * @param {Object} arg
  6648. * @param {Object} opts
  6649. * @return {?}
  6650. */
  6651. ajax : function(arg, opts) {
  6652. /**
  6653. * @param {number} status
  6654. * @param {Node} nativeStatusText
  6655. * @param {Object} responses
  6656. * @param {string} total
  6657. * @return {undefined}
  6658. */
  6659. function done(status, nativeStatusText, responses, total) {
  6660. var isSuccess;
  6661. var success;
  6662. var error;
  6663. var response;
  6664. var modified;
  6665. /** @type {Node} */
  6666. var statusText = nativeStatusText;
  6667. if (!escape) {
  6668. /** @type {boolean} */
  6669. escape = true;
  6670. if (resizeId) {
  6671. win.clearTimeout(resizeId);
  6672. }
  6673. transport = void 0;
  6674. str = total || "";
  6675. /** @type {number} */
  6676. jqXHR.readyState = status > 0 ? 4 : 0;
  6677. /** @type {boolean} */
  6678. isSuccess = status >= 200 && status < 300 || 304 === status;
  6679. if (responses) {
  6680. response = ajaxHandleResponses(options, jqXHR, responses);
  6681. }
  6682. response = ajaxConvert(options, response, jqXHR, isSuccess);
  6683. if (isSuccess) {
  6684. if (options.ifModified) {
  6685. modified = jqXHR.getResponseHeader("Last-Modified");
  6686. if (modified) {
  6687. jQuery.lastModified[url] = modified;
  6688. }
  6689. modified = jqXHR.getResponseHeader("etag");
  6690. if (modified) {
  6691. jQuery.etag[url] = modified;
  6692. }
  6693. }
  6694. if (204 === status || "HEAD" === options.type) {
  6695. /** @type {string} */
  6696. statusText = "nocontent";
  6697. } else {
  6698. if (304 === status) {
  6699. /** @type {string} */
  6700. statusText = "notmodified";
  6701. } else {
  6702. statusText = response.state;
  6703. success = response.data;
  6704. error = response.error;
  6705. /** @type {boolean} */
  6706. isSuccess = !error;
  6707. }
  6708. }
  6709. } else {
  6710. error = statusText;
  6711. if (!(!status && statusText)) {
  6712. /** @type {string} */
  6713. statusText = "error";
  6714. if (status < 0) {
  6715. /** @type {number} */
  6716. status = 0;
  6717. }
  6718. }
  6719. }
  6720. /** @type {number} */
  6721. jqXHR.status = status;
  6722. /** @type {string} */
  6723. jqXHR.statusText = (nativeStatusText || statusText) + "";
  6724. if (isSuccess) {
  6725. deferred.resolveWith(context, [success, statusText, jqXHR]);
  6726. } else {
  6727. deferred.rejectWith(context, [jqXHR, statusText, error]);
  6728. }
  6729. jqXHR.statusCode(statusCode);
  6730. statusCode = void 0;
  6731. if (ajaxSend) {
  6732. globalEventContext.trigger(isSuccess ? "ajaxSuccess" : "ajaxError", [jqXHR, options, isSuccess ? success : error]);
  6733. }
  6734. self.fireWith(context, [jqXHR, statusText]);
  6735. if (ajaxSend) {
  6736. globalEventContext.trigger("ajaxComplete", [jqXHR, options]);
  6737. if (!--jQuery.active) {
  6738. jQuery.event.trigger("ajaxStop");
  6739. }
  6740. }
  6741. }
  6742. }
  6743. if ("object" == typeof arg) {
  6744. /** @type {Object} */
  6745. opts = arg;
  6746. arg = void 0;
  6747. }
  6748. opts = opts || {};
  6749. var transport;
  6750. var url;
  6751. var str;
  6752. var obj;
  6753. var resizeId;
  6754. var params;
  6755. var escape;
  6756. var ajaxSend;
  6757. var i;
  6758. var port;
  6759. var options = jQuery.ajaxSetup({}, opts);
  6760. var context = options.context || options;
  6761. var globalEventContext = options.context && (context.nodeType || context.jquery) ? jQuery(context) : jQuery.event;
  6762. var deferred = jQuery.Deferred();
  6763. var self = jQuery.Callbacks("once memory");
  6764. var statusCode = options.statusCode || {};
  6765. var requestHeaders = {};
  6766. var requestHeadersNames = {};
  6767. /** @type {string} */
  6768. var strAbort = "canceled";
  6769. var jqXHR = {
  6770. readyState : 0,
  6771. /**
  6772. * @param {string} key
  6773. * @return {?}
  6774. */
  6775. getResponseHeader : function(key) {
  6776. var value;
  6777. if (escape) {
  6778. if (!obj) {
  6779. obj = {};
  6780. for (;value = whiteSpace.exec(str);) {
  6781. /** @type {string} */
  6782. obj[value[1].toLowerCase()] = value[2];
  6783. }
  6784. }
  6785. value = obj[key.toLowerCase()];
  6786. }
  6787. return null == value ? null : value;
  6788. },
  6789. /**
  6790. * @return {?}
  6791. */
  6792. getAllResponseHeaders : function() {
  6793. return escape ? str : null;
  6794. },
  6795. /**
  6796. * @param {string} name
  6797. * @param {?} value
  6798. * @return {?}
  6799. */
  6800. setRequestHeader : function(name, value) {
  6801. return null == escape && (name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name, requestHeaders[name] = value), this;
  6802. },
  6803. /**
  6804. * @param {(Object|number)} type
  6805. * @return {?}
  6806. */
  6807. overrideMimeType : function(type) {
  6808. return null == escape && (options.mimeType = type), this;
  6809. },
  6810. /**
  6811. * @param {Object} map
  6812. * @return {?}
  6813. */
  6814. statusCode : function(map) {
  6815. var letter;
  6816. if (map) {
  6817. if (escape) {
  6818. jqXHR.always(map[jqXHR.status]);
  6819. } else {
  6820. for (letter in map) {
  6821. /** @type {Array} */
  6822. statusCode[letter] = [statusCode[letter], map[letter]];
  6823. }
  6824. }
  6825. }
  6826. return this;
  6827. },
  6828. /**
  6829. * @param {string} statusText
  6830. * @return {?}
  6831. */
  6832. abort : function(statusText) {
  6833. var finalText = statusText || strAbort;
  6834. return transport && transport.abort(finalText), done(0, finalText), this;
  6835. }
  6836. };
  6837. if (deferred.promise(jqXHR), options.url = ((arg || (options.url || req.href)) + "").replace(path, req.protocol + "//"), options.type = opts.method || (opts.type || (options.method || options.type)), options.dataTypes = (options.dataType || "*").toLowerCase().match(core_rnotwhite) || [""], null == options.crossDomain) {
  6838. params = doc.createElement("a");
  6839. try {
  6840. /** @type {string} */
  6841. params.href = options.url;
  6842. /** @type {string} */
  6843. params.href = params.href;
  6844. /** @type {boolean} */
  6845. options.crossDomain = l.protocol + "//" + l.host != params.protocol + "//" + params.host;
  6846. } catch (z) {
  6847. /** @type {boolean} */
  6848. options.crossDomain = true;
  6849. }
  6850. }
  6851. if (options.data && (options.processData && ("string" != typeof options.data && (options.data = jQuery.param(options.data, options.traditional)))), inspectPrefiltersOrTransports(prefilters, options, opts, jqXHR), escape) {
  6852. return jqXHR;
  6853. }
  6854. ajaxSend = jQuery.event && options.global;
  6855. if (ajaxSend) {
  6856. if (0 === jQuery.active++) {
  6857. jQuery.event.trigger("ajaxStart");
  6858. }
  6859. }
  6860. options.type = options.type.toUpperCase();
  6861. /** @type {boolean} */
  6862. options.hasContent = !getOrPostRegEx.test(options.type);
  6863. /** @type {string} */
  6864. url = options.url.replace(trimRight, "");
  6865. if (options.hasContent) {
  6866. if (options.data) {
  6867. if (options.processData) {
  6868. if (0 === (options.contentType || "").indexOf("application/x-www-form-urlencoded")) {
  6869. options.data = options.data.replace(badChars, "+");
  6870. }
  6871. }
  6872. }
  6873. } else {
  6874. /** @type {string} */
  6875. port = options.url.slice(url.length);
  6876. if (options.data) {
  6877. url += (rquery.test(url) ? "&" : "?") + options.data;
  6878. delete options.data;
  6879. }
  6880. if (options.cache === false) {
  6881. /** @type {string} */
  6882. url = url.replace(reParent, "$1");
  6883. /** @type {string} */
  6884. port = (rquery.test(url) ? "&" : "?") + "_=" + iIdCounter++ + port;
  6885. }
  6886. /** @type {string} */
  6887. options.url = url + port;
  6888. }
  6889. if (options.ifModified) {
  6890. if (jQuery.lastModified[url]) {
  6891. jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[url]);
  6892. }
  6893. if (jQuery.etag[url]) {
  6894. jqXHR.setRequestHeader("If-None-Match", jQuery.etag[url]);
  6895. }
  6896. }
  6897. if (options.data && (options.hasContent && options.contentType !== false) || opts.contentType) {
  6898. jqXHR.setRequestHeader("Content-Type", options.contentType);
  6899. }
  6900. jqXHR.setRequestHeader("Accept", options.dataTypes[0] && options.accepts[options.dataTypes[0]] ? options.accepts[options.dataTypes[0]] + ("*" !== options.dataTypes[0] ? ", " + Hb + "; q=0.01" : "") : options.accepts["*"]);
  6901. for (i in options.headers) {
  6902. jqXHR.setRequestHeader(i, options.headers[i]);
  6903. }
  6904. if (options.beforeSend && (options.beforeSend.call(context, jqXHR, options) === false || escape)) {
  6905. return jqXHR.abort();
  6906. }
  6907. if (strAbort = "abort", self.add(options.complete), jqXHR.done(options.success), jqXHR.fail(options.error), transport = inspectPrefiltersOrTransports(transports, options, opts, jqXHR)) {
  6908. if (jqXHR.readyState = 1, ajaxSend && globalEventContext.trigger("ajaxSend", [jqXHR, options]), escape) {
  6909. return jqXHR;
  6910. }
  6911. if (options.async) {
  6912. if (options.timeout > 0) {
  6913. resizeId = win.setTimeout(function() {
  6914. jqXHR.abort("timeout");
  6915. }, options.timeout);
  6916. }
  6917. }
  6918. try {
  6919. /** @type {boolean} */
  6920. escape = false;
  6921. transport.send(requestHeaders, done);
  6922. } catch (e) {
  6923. if (escape) {
  6924. throw e;
  6925. }
  6926. done(-1, e);
  6927. }
  6928. } else {
  6929. done(-1, "No Transport");
  6930. }
  6931. return jqXHR;
  6932. },
  6933. /**
  6934. * @param {Object} cur
  6935. * @param {string} data
  6936. * @param {string} callback
  6937. * @return {?}
  6938. */
  6939. getJSON : function(cur, data, callback) {
  6940. return jQuery.get(cur, data, callback, "json");
  6941. },
  6942. /**
  6943. * @param {Object} cur
  6944. * @param {string} callback
  6945. * @return {?}
  6946. */
  6947. getScript : function(cur, callback) {
  6948. return jQuery.get(cur, void 0, callback, "script");
  6949. }
  6950. });
  6951. jQuery.each(["get", "post"], function(dataAndEvents, method) {
  6952. /**
  6953. * @param {string} value
  6954. * @param {Object} html
  6955. * @param {Object} success
  6956. * @param {boolean} dataType
  6957. * @return {?}
  6958. */
  6959. jQuery[method] = function(value, html, success, dataType) {
  6960. return jQuery.isFunction(html) && (dataType = dataType || success, success = html, html = void 0), jQuery.ajax(jQuery.extend({
  6961. url : value,
  6962. type : method,
  6963. dataType : dataType,
  6964. data : html,
  6965. success : success
  6966. }, jQuery.isPlainObject(value) && value));
  6967. };
  6968. });
  6969. /**
  6970. * @param {string} url
  6971. * @return {?}
  6972. */
  6973. jQuery._evalUrl = function(url) {
  6974. return jQuery.ajax({
  6975. url : url,
  6976. type : "GET",
  6977. dataType : "script",
  6978. cache : true,
  6979. async : false,
  6980. global : false,
  6981. "throws" : true
  6982. });
  6983. };
  6984. jQuery.fn.extend({
  6985. /**
  6986. * @param {Function} html
  6987. * @return {?}
  6988. */
  6989. wrapAll : function(html) {
  6990. var wrap;
  6991. return this[0] && (jQuery.isFunction(html) && (html = html.call(this[0])), wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true), this[0].parentNode && wrap.insertBefore(this[0]), wrap.map(function() {
  6992. var elem = this;
  6993. for (;elem.firstElementChild;) {
  6994. elem = elem.firstElementChild;
  6995. }
  6996. return elem;
  6997. }).append(this)), this;
  6998. },
  6999. /**
  7000. * @param {Function} html
  7001. * @return {?}
  7002. */
  7003. wrapInner : function(html) {
  7004. return jQuery.isFunction(html) ? this.each(function(i) {
  7005. jQuery(this).wrapInner(html.call(this, i));
  7006. }) : this.each(function() {
  7007. var self = jQuery(this);
  7008. var contents = self.contents();
  7009. if (contents.length) {
  7010. contents.wrapAll(html);
  7011. } else {
  7012. self.append(html);
  7013. }
  7014. });
  7015. },
  7016. /**
  7017. * @param {Function} html
  7018. * @return {?}
  7019. */
  7020. wrap : function(html) {
  7021. var isFunction = jQuery.isFunction(html);
  7022. return this.each(function(i) {
  7023. jQuery(this).wrapAll(isFunction ? html.call(this, i) : html);
  7024. });
  7025. },
  7026. /**
  7027. * @param {Node} fn
  7028. * @return {?}
  7029. */
  7030. unwrap : function(fn) {
  7031. return this.parent(fn).not("body").each(function() {
  7032. jQuery(this).replaceWith(this.childNodes);
  7033. }), this;
  7034. }
  7035. });
  7036. /**
  7037. * @param {string} type
  7038. * @return {?}
  7039. */
  7040. jQuery.expr.pseudos.hidden = function(type) {
  7041. return!jQuery.expr.pseudos.visible(type);
  7042. };
  7043. /**
  7044. * @param {Element} node
  7045. * @return {?}
  7046. */
  7047. jQuery.expr.pseudos.visible = function(node) {
  7048. return!!(node.offsetWidth || (node.offsetHeight || node.getClientRects().length));
  7049. };
  7050. /**
  7051. * @return {?}
  7052. */
  7053. jQuery.ajaxSettings.xhr = function() {
  7054. try {
  7055. return new win.XMLHttpRequest;
  7056. } catch (b) {
  7057. }
  7058. };
  7059. var xhrSuccessStatus = {
  7060. 0 : 200,
  7061. 1223 : 204
  7062. };
  7063. var xhrSupported = jQuery.ajaxSettings.xhr();
  7064. /** @type {boolean} */
  7065. support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
  7066. /** @type {boolean} */
  7067. support.ajax = xhrSupported = !!xhrSupported;
  7068. jQuery.ajaxTransport(function(options) {
  7069. var callback;
  7070. var onerror;
  7071. if (support.cors || xhrSupported && !options.crossDomain) {
  7072. return{
  7073. /**
  7074. * @param {Object} headers
  7075. * @param {Function} complete
  7076. * @return {undefined}
  7077. */
  7078. send : function(headers, complete) {
  7079. var name;
  7080. var xhr = options.xhr();
  7081. if (xhr.open(options.type, options.url, options.async, options.username, options.password), options.xhrFields) {
  7082. for (name in options.xhrFields) {
  7083. xhr[name] = options.xhrFields[name];
  7084. }
  7085. }
  7086. if (options.mimeType) {
  7087. if (xhr.overrideMimeType) {
  7088. xhr.overrideMimeType(options.mimeType);
  7089. }
  7090. }
  7091. if (!options.crossDomain) {
  7092. if (!headers["X-Requested-With"]) {
  7093. /** @type {string} */
  7094. headers["X-Requested-With"] = "XMLHttpRequest";
  7095. }
  7096. }
  7097. for (name in headers) {
  7098. xhr.setRequestHeader(name, headers[name]);
  7099. }
  7100. /**
  7101. * @param {string} status
  7102. * @return {?}
  7103. */
  7104. callback = function(status) {
  7105. return function() {
  7106. if (callback) {
  7107. /** @type {null} */
  7108. callback = onerror = xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
  7109. if ("abort" === status) {
  7110. xhr.abort();
  7111. } else {
  7112. if ("error" === status) {
  7113. if ("number" != typeof xhr.status) {
  7114. complete(0, "error");
  7115. } else {
  7116. complete(xhr.status, xhr.statusText);
  7117. }
  7118. } else {
  7119. complete(xhrSuccessStatus[xhr.status] || xhr.status, xhr.statusText, "text" !== (xhr.responseType || "text") || "string" != typeof xhr.responseText ? {
  7120. binary : xhr.response
  7121. } : {
  7122. text : xhr.responseText
  7123. }, xhr.getAllResponseHeaders());
  7124. }
  7125. }
  7126. }
  7127. };
  7128. };
  7129. xhr.onload = callback();
  7130. onerror = xhr.onerror = callback("error");
  7131. if (void 0 !== xhr.onabort) {
  7132. xhr.onabort = onerror;
  7133. } else {
  7134. /**
  7135. * @return {undefined}
  7136. */
  7137. xhr.onreadystatechange = function() {
  7138. if (4 === xhr.readyState) {
  7139. win.setTimeout(function() {
  7140. if (callback) {
  7141. onerror();
  7142. }
  7143. });
  7144. }
  7145. };
  7146. }
  7147. callback = callback("abort");
  7148. try {
  7149. xhr.send(options.hasContent && options.data || null);
  7150. } catch (i) {
  7151. if (callback) {
  7152. throw i;
  7153. }
  7154. }
  7155. },
  7156. /**
  7157. * @return {undefined}
  7158. */
  7159. abort : function() {
  7160. if (callback) {
  7161. callback();
  7162. }
  7163. }
  7164. };
  7165. }
  7166. });
  7167. jQuery.ajaxPrefilter(function(options) {
  7168. if (options.crossDomain) {
  7169. /** @type {boolean} */
  7170. options.contents.script = false;
  7171. }
  7172. });
  7173. jQuery.ajaxSetup({
  7174. accepts : {
  7175. script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  7176. },
  7177. contents : {
  7178. script : /\b(?:java|ecma)script\b/
  7179. },
  7180. converters : {
  7181. /**
  7182. * @param {string} value
  7183. * @return {?}
  7184. */
  7185. "text script" : function(value) {
  7186. return jQuery.globalEval(value), value;
  7187. }
  7188. }
  7189. });
  7190. jQuery.ajaxPrefilter("script", function(s) {
  7191. if (void 0 === s.cache) {
  7192. /** @type {boolean} */
  7193. s.cache = false;
  7194. }
  7195. if (s.crossDomain) {
  7196. /** @type {string} */
  7197. s.type = "GET";
  7198. }
  7199. });
  7200. jQuery.ajaxTransport("script", function(s) {
  7201. if (s.crossDomain) {
  7202. var script;
  7203. var callback;
  7204. return{
  7205. /**
  7206. * @param {?} _
  7207. * @param {Function} complete
  7208. * @return {undefined}
  7209. */
  7210. send : function(_, complete) {
  7211. script = jQuery("<script>").prop({
  7212. charset : s.scriptCharset,
  7213. src : s.url
  7214. }).on("load error", callback = function(evt) {
  7215. script.remove();
  7216. /** @type {null} */
  7217. callback = null;
  7218. if (evt) {
  7219. complete("error" === evt.type ? 404 : 200, evt.type);
  7220. }
  7221. });
  7222. doc.head.appendChild(script[0]);
  7223. },
  7224. /**
  7225. * @return {undefined}
  7226. */
  7227. abort : function() {
  7228. if (callback) {
  7229. callback();
  7230. }
  7231. }
  7232. };
  7233. }
  7234. });
  7235. /** @type {Array} */
  7236. var eventPath = [];
  7237. /** @type {RegExp} */
  7238. var rjsonp = /(=)\?(?=&|$)|\?\?/;
  7239. jQuery.ajaxSetup({
  7240. jsonp : "callback",
  7241. /**
  7242. * @return {?}
  7243. */
  7244. jsonpCallback : function() {
  7245. var unlock = eventPath.pop() || jQuery.expando + "_" + iIdCounter++;
  7246. return this[unlock] = true, unlock;
  7247. }
  7248. });
  7249. jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, jqXHR) {
  7250. var callbackName;
  7251. var fn;
  7252. var elems;
  7253. /** @type {(boolean|string)} */
  7254. var jsonProp = s.jsonp !== false && (rjsonp.test(s.url) ? "url" : "string" == typeof s.data && (0 === (s.contentType || "").indexOf("application/x-www-form-urlencoded") && (rjsonp.test(s.data) && "data")));
  7255. if (jsonProp || "jsonp" === s.dataTypes[0]) {
  7256. return callbackName = s.jsonpCallback = jQuery.isFunction(s.jsonpCallback) ? s.jsonpCallback() : s.jsonpCallback, jsonProp ? s[jsonProp] = s[jsonProp].replace(rjsonp, "$1" + callbackName) : s.jsonp !== false && (s.url += (rquery.test(s.url) ? "&" : "?") + s.jsonp + "=" + callbackName), s.converters["script json"] = function() {
  7257. return elems || jQuery.error(callbackName + " was not called"), elems[0];
  7258. }, s.dataTypes[0] = "json", fn = win[callbackName], win[callbackName] = function() {
  7259. /** @type {Arguments} */
  7260. elems = arguments;
  7261. }, jqXHR.always(function() {
  7262. if (void 0 === fn) {
  7263. jQuery(win).removeProp(callbackName);
  7264. } else {
  7265. win[callbackName] = fn;
  7266. }
  7267. if (s[callbackName]) {
  7268. s.jsonpCallback = originalSettings.jsonpCallback;
  7269. eventPath.push(callbackName);
  7270. }
  7271. if (elems) {
  7272. if (jQuery.isFunction(fn)) {
  7273. fn(elems[0]);
  7274. }
  7275. }
  7276. elems = fn = void 0;
  7277. }), "script";
  7278. }
  7279. });
  7280. support.createHTMLDocument = function() {
  7281. var body = doc.implementation.createHTMLDocument("").body;
  7282. return body.innerHTML = "<form></form><form></form>", 2 === body.childNodes.length;
  7283. }();
  7284. /**
  7285. * @param {?} data
  7286. * @param {Object} context
  7287. * @param {(Function|string)} keepScripts
  7288. * @return {?}
  7289. */
  7290. jQuery.parseHTML = function(data, context, keepScripts) {
  7291. if ("string" != typeof data) {
  7292. return[];
  7293. }
  7294. if ("boolean" == typeof context) {
  7295. /** @type {Object} */
  7296. keepScripts = context;
  7297. /** @type {boolean} */
  7298. context = false;
  7299. }
  7300. var comp;
  7301. var parsed;
  7302. var scripts;
  7303. return context || (support.createHTMLDocument ? (context = doc.implementation.createHTMLDocument(""), comp = context.createElement("base"), comp.href = doc.location.href, context.head.appendChild(comp)) : context = doc), parsed = rsingleTag.exec(data), scripts = !keepScripts && [], parsed ? [context.createElement(parsed[1])] : (parsed = parse([data], context, scripts), scripts && (scripts.length && jQuery(scripts).remove()), jQuery.merge([], parsed.childNodes));
  7304. };
  7305. /**
  7306. * @param {(Function|string)} source
  7307. * @param {Object} data
  7308. * @param {Object} callback
  7309. * @return {?}
  7310. */
  7311. jQuery.fn.load = function(source, data, callback) {
  7312. var selector;
  7313. var method;
  7314. var args;
  7315. var self = this;
  7316. var n = source.indexOf(" ");
  7317. return n > -1 && (selector = $(source.slice(n)), source = source.slice(0, n)), jQuery.isFunction(data) ? (callback = data, data = void 0) : data && ("object" == typeof data && (method = "POST")), self.length > 0 && jQuery.ajax({
  7318. url : source,
  7319. type : method || "GET",
  7320. dataType : "html",
  7321. data : data
  7322. }).done(function(responseText) {
  7323. /** @type {Arguments} */
  7324. args = arguments;
  7325. self.html(selector ? jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector) : responseText);
  7326. }).always(callback && function(elem, dataAndEvents) {
  7327. self.each(function() {
  7328. callback.apply(this, args || [elem.responseText, dataAndEvents, elem]);
  7329. });
  7330. }), this;
  7331. };
  7332. jQuery.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(dataAndEvents, name) {
  7333. /**
  7334. * @param {Function} selector
  7335. * @return {?}
  7336. */
  7337. jQuery.fn[name] = function(selector) {
  7338. return this.on(name, selector);
  7339. };
  7340. });
  7341. /**
  7342. * @param {undefined} elem
  7343. * @return {?}
  7344. */
  7345. jQuery.expr.pseudos.animated = function(elem) {
  7346. return jQuery.grep(jQuery.timers, function(fn) {
  7347. return elem === fn.elem;
  7348. }).length;
  7349. };
  7350. jQuery.offset = {
  7351. /**
  7352. * @param {Object} elem
  7353. * @param {Object} value
  7354. * @param {?} i
  7355. * @return {undefined}
  7356. */
  7357. setOffset : function(elem, value, i) {
  7358. var curPosition;
  7359. var curLeft;
  7360. var curCSSTop;
  7361. var curTop;
  7362. var offset;
  7363. var curCSSLeft;
  7364. var j;
  7365. var position = jQuery.css(elem, "position");
  7366. var curElem = jQuery(elem);
  7367. var cur = {};
  7368. if ("static" === position) {
  7369. /** @type {string} */
  7370. elem.style.position = "relative";
  7371. }
  7372. offset = curElem.offset();
  7373. curCSSTop = jQuery.css(elem, "top");
  7374. curCSSLeft = jQuery.css(elem, "left");
  7375. /** @type {boolean} */
  7376. j = ("absolute" === position || "fixed" === position) && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
  7377. if (j) {
  7378. curPosition = curElem.position();
  7379. curTop = curPosition.top;
  7380. curLeft = curPosition.left;
  7381. } else {
  7382. /** @type {number} */
  7383. curTop = parseFloat(curCSSTop) || 0;
  7384. /** @type {number} */
  7385. curLeft = parseFloat(curCSSLeft) || 0;
  7386. }
  7387. if (jQuery.isFunction(value)) {
  7388. value = value.call(elem, i, jQuery.extend({}, offset));
  7389. }
  7390. if (null != value.top) {
  7391. /** @type {number} */
  7392. cur.top = value.top - offset.top + curTop;
  7393. }
  7394. if (null != value.left) {
  7395. /** @type {number} */
  7396. cur.left = value.left - offset.left + curLeft;
  7397. }
  7398. if ("using" in value) {
  7399. value.using.call(elem, cur);
  7400. } else {
  7401. curElem.css(cur);
  7402. }
  7403. }
  7404. };
  7405. jQuery.fn.extend({
  7406. /**
  7407. * @param {number} options
  7408. * @return {?}
  7409. */
  7410. offset : function(options) {
  7411. if (arguments.length) {
  7412. return void 0 === options ? this : this.each(function(dataName) {
  7413. jQuery.offset.setOffset(this, options, dataName);
  7414. });
  7415. }
  7416. var docElem;
  7417. var win;
  7418. var box;
  7419. var doc;
  7420. var element = this[0];
  7421. if (element) {
  7422. return element.getClientRects().length ? (box = element.getBoundingClientRect(), box.width || box.height ? (doc = element.ownerDocument, win = getWindow(doc), docElem = doc.documentElement, {
  7423. top : box.top + win.pageYOffset - docElem.clientTop,
  7424. left : box.left + win.pageXOffset - docElem.clientLeft
  7425. }) : box) : {
  7426. top : 0,
  7427. left : 0
  7428. };
  7429. }
  7430. },
  7431. /**
  7432. * @return {?}
  7433. */
  7434. position : function() {
  7435. if (this[0]) {
  7436. var elem;
  7437. var gdOffset;
  7438. var offsetParent = this[0];
  7439. var offset = {
  7440. top : 0,
  7441. left : 0
  7442. };
  7443. return "fixed" === jQuery.css(offsetParent, "position") ? gdOffset = offsetParent.getBoundingClientRect() : (elem = this.offsetParent(), gdOffset = this.offset(), jQuery.nodeName(elem[0], "html") || (offset = elem.offset()), offset = {
  7444. top : offset.top + jQuery.css(elem[0], "borderTopWidth", true),
  7445. left : offset.left + jQuery.css(elem[0], "borderLeftWidth", true)
  7446. }), {
  7447. top : gdOffset.top - offset.top - jQuery.css(offsetParent, "marginTop", true),
  7448. left : gdOffset.left - offset.left - jQuery.css(offsetParent, "marginLeft", true)
  7449. };
  7450. }
  7451. },
  7452. /**
  7453. * @return {?}
  7454. */
  7455. offsetParent : function() {
  7456. return this.map(function() {
  7457. var offsetParent = this.offsetParent;
  7458. for (;offsetParent && "static" === jQuery.css(offsetParent, "position");) {
  7459. offsetParent = offsetParent.offsetParent;
  7460. }
  7461. return offsetParent || docElem;
  7462. });
  7463. }
  7464. });
  7465. jQuery.each({
  7466. scrollLeft : "pageXOffset",
  7467. scrollTop : "pageYOffset"
  7468. }, function(name, prop) {
  7469. /** @type {boolean} */
  7470. var top = "pageYOffset" === prop;
  7471. /**
  7472. * @param {string} isXML
  7473. * @return {?}
  7474. */
  7475. jQuery.fn[name] = function(isXML) {
  7476. return access(this, function(elem, method, val) {
  7477. var win = getWindow(elem);
  7478. return void 0 === val ? win ? win[prop] : elem[method] : void(win ? win.scrollTo(top ? win.pageXOffset : val, top ? val : win.pageYOffset) : elem[method] = val);
  7479. }, name, isXML, arguments.length);
  7480. };
  7481. });
  7482. jQuery.each(["top", "left"], function(dataAndEvents, prop) {
  7483. jQuery.cssHooks[prop] = addGetHookIf(support.pixelPosition, function(elem, val) {
  7484. if (val) {
  7485. return val = css(elem, prop), rnumnonpx.test(val) ? jQuery(elem).position()[prop] + "px" : val;
  7486. }
  7487. });
  7488. });
  7489. jQuery.each({
  7490. Height : "height",
  7491. Width : "width"
  7492. }, function(name, type) {
  7493. jQuery.each({
  7494. padding : "inner" + name,
  7495. content : type,
  7496. "" : "outer" + name
  7497. }, function(defaultExtra, original) {
  7498. /**
  7499. * @param {?} margin
  7500. * @param {boolean} value
  7501. * @return {?}
  7502. */
  7503. jQuery.fn[original] = function(margin, value) {
  7504. var chainable = arguments.length && (defaultExtra || "boolean" != typeof margin);
  7505. var extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
  7506. return access(this, function(elem, prop, value) {
  7507. var doc;
  7508. return jQuery.isWindow(elem) ? 0 === original.indexOf("outer") ? elem["inner" + name] : elem.document.documentElement["client" + name] : 9 === elem.nodeType ? (doc = elem.documentElement, Math.max(elem.body["scroll" + name], doc["scroll" + name], elem.body["offset" + name], doc["offset" + name], doc["client" + name])) : void 0 === value ? jQuery.css(elem, prop, extra) : jQuery.style(elem, prop, value, extra);
  7509. }, type, chainable ? margin : void 0, chainable);
  7510. };
  7511. });
  7512. });
  7513. jQuery.fn.extend({
  7514. /**
  7515. * @param {string} ev
  7516. * @param {Object} one
  7517. * @param {Function} fn
  7518. * @return {?}
  7519. */
  7520. bind : function(ev, one, fn) {
  7521. return this.on(ev, null, one, fn);
  7522. },
  7523. /**
  7524. * @param {Object} type
  7525. * @param {Function} fn
  7526. * @return {?}
  7527. */
  7528. unbind : function(type, fn) {
  7529. return this.off(type, null, fn);
  7530. },
  7531. /**
  7532. * @param {Function} selector
  7533. * @param {string} ev
  7534. * @param {Object} data
  7535. * @param {Function} fn
  7536. * @return {?}
  7537. */
  7538. delegate : function(selector, ev, data, fn) {
  7539. return this.on(ev, selector, data, fn);
  7540. },
  7541. /**
  7542. * @param {string} selector
  7543. * @param {Object} event
  7544. * @param {Function} fn
  7545. * @return {?}
  7546. */
  7547. undelegate : function(selector, event, fn) {
  7548. return 1 === arguments.length ? this.off(selector, "**") : this.off(event, selector || "**", fn);
  7549. }
  7550. });
  7551. /** @type {function (this:JSONType, string, function (string, *): *=): *} */
  7552. jQuery.parseJSON = JSON.parse;
  7553. if ("function" == typeof define) {
  7554. if (define.amd) {
  7555. define("jquery", [], function() {
  7556. return jQuery;
  7557. });
  7558. }
  7559. }
  7560. var _jQuery = win.jQuery;
  7561. var _$ = win.$;
  7562. return jQuery.noConflict = function(deep) {
  7563. return win.$ === jQuery && (win.$ = _$), deep && (win.jQuery === jQuery && (win.jQuery = _jQuery)), jQuery;
  7564. }, dataAndEvents || (win.jQuery = win.$ = jQuery), jQuery;
  7565. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement