You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

6426 lines
378 KiB

  1. /** layui-v2.4.5 MIT License By https://www.layui.com */
  2. ;!function (e) {
  3. "use strict";
  4. var t = document, o = {modules: {}, status: {}, timeout: 10, event: {}}, n = function () {
  5. this.v = "2.4.5"
  6. }, r = function () {
  7. var e = t.currentScript ? t.currentScript.src : function () {
  8. for (var e, o = t.scripts, n = o.length - 1, r = n; r > 0; r--) if ("interactive" === o[r].readyState) {
  9. e = o[r].src;
  10. break
  11. }
  12. return e || o[n].src
  13. }();
  14. return e.substring(0, e.lastIndexOf("/") + 1)
  15. }(), i = function (t) {
  16. e.console && console.error && console.error("Layui hint: " + t)
  17. }, a = "undefined" != typeof opera && "[object Opera]" === opera.toString(), u = {
  18. layer: "modules/layer",
  19. laydate: "modules/laydate",
  20. laypage: "modules/laypage",
  21. laytpl: "modules/laytpl",
  22. layim: "modules/layim",
  23. layedit: "modules/layedit",
  24. form: "modules/form",
  25. upload: "modules/upload",
  26. tree: "modules/tree",
  27. table: "modules/table",
  28. element: "modules/element",
  29. rate: "modules/rate",
  30. colorpicker: "modules/colorpicker",
  31. slider: "modules/slider",
  32. carousel: "modules/carousel",
  33. flow: "modules/flow",
  34. util: "modules/util",
  35. code: "modules/code",
  36. jquery: "modules/jquery",
  37. mobile: "modules/mobile",
  38. "layui.all": "../layui.all"
  39. };
  40. n.prototype.cache = o, n.prototype.define = function (e, t) {
  41. var n = this, r = "function" == typeof e, i = function () {
  42. var e = function (e, t) {
  43. layui[e] = t, o.status[e] = !0
  44. };
  45. return "function" == typeof t && t(function (n, r) {
  46. e(n, r), o.callback[n] = function () {
  47. t(e)
  48. }
  49. }), this
  50. };
  51. return r && (t = e, e = []), layui["layui.all"] || !layui["layui.all"] && layui["layui.mobile"] ? i.call(n) : (n.use(e, i), n)
  52. }, n.prototype.use = function (e, n, l) {
  53. function s(e, t) {
  54. var n = "PLaySTATION 3" === navigator.platform ? /^complete$/ : /^(complete|loaded)$/;
  55. ("load" === e.type || n.test((e.currentTarget || e.srcElement).readyState)) && (o.modules[f] = t, d.removeChild(v), function r() {
  56. return ++m > 1e3 * o.timeout / 4 ? i(f + " is not a valid module") : void (o.status[f] ? c() : setTimeout(r, 4))
  57. }())
  58. }
  59. function c() {
  60. l.push(layui[f]), e.length > 1 ? y.use(e.slice(1), n, l) : "function" == typeof n && n.apply(layui, l)
  61. }
  62. var y = this, p = o.dir = o.dir ? o.dir : r, d = t.getElementsByTagName("head")[0];
  63. e = "string" == typeof e ? [e] : e, window.jQuery && jQuery.fn.on && (y.each(e, function (t, o) {
  64. "jquery" === o && e.splice(t, 1)
  65. }), layui.jquery = layui.$ = jQuery);
  66. var f = e[0], m = 0;
  67. if (l = l || [], o.host = o.host || (p.match(/\/\/([\s\S]+?)\//) || ["//" + location.host + "/"])[0], 0 === e.length || layui["layui.all"] && u[f] || !layui["layui.all"] && layui["layui.mobile"] && u[f]) return c(), y;
  68. if (o.modules[f]) !function g() {
  69. return ++m > 1e3 * o.timeout / 4 ? i(f + " is not a valid module") : void ("string" == typeof o.modules[f] && o.status[f] ? c() : setTimeout(g, 4))
  70. }(); else {
  71. var v = t.createElement("script"),
  72. h = (u[f] ? p + "lay/" : /^\{\/\}/.test(y.modules[f]) ? "" : o.base || "") + (y.modules[f] || f) + ".js";
  73. h = h.replace(/^\{\/\}/, ""), v.async = !0, v.charset = "utf-8", v.src = h + function () {
  74. var e = o.version === !0 ? o.v || (new Date).getTime() : o.version || "";
  75. return e ? "?v=" + e : ""
  76. }(), d.appendChild(v), !v.attachEvent || v.attachEvent.toString && v.attachEvent.toString().indexOf("[native code") < 0 || a ? v.addEventListener("load", function (e) {
  77. s(e, h)
  78. }, !1) : v.attachEvent("onreadystatechange", function (e) {
  79. s(e, h)
  80. }), o.modules[f] = h
  81. }
  82. return y
  83. }, n.prototype.getStyle = function (t, o) {
  84. var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
  85. return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](o)
  86. }, n.prototype.link = function (e, n, r) {
  87. var a = this, u = t.createElement("link"), l = t.getElementsByTagName("head")[0];
  88. "string" == typeof n && (r = n);
  89. var s = (r || e).replace(/\.|\//g, ""), c = u.id = "layuicss-" + s, y = 0;
  90. return u.rel = "stylesheet", u.href = e + (o.debug ? "?v=" + (new Date).getTime() : ""), u.media = "all", t.getElementById(c) || l.appendChild(u), "function" != typeof n ? a : (function p() {
  91. return ++y > 1e3 * o.timeout / 100 ? i(e + " timeout") : void (1989 === parseInt(a.getStyle(t.getElementById(c), "width")) ? function () {
  92. n()
  93. }() : setTimeout(p, 100))
  94. }(), a)
  95. }, o.callback = {}, n.prototype.factory = function (e) {
  96. if (layui[e]) return "function" == typeof o.callback[e] ? o.callback[e] : null
  97. }, n.prototype.addcss = function (e, t, n) {
  98. return layui.link(o.dir + "css/" + e, t, n)
  99. }, n.prototype.img = function (e, t, o) {
  100. var n = new Image;
  101. return n.src = e, n.complete ? t(n) : (n.onload = function () {
  102. n.onload = null, "function" == typeof t && t(n)
  103. }, void (n.onerror = function (e) {
  104. n.onerror = null, "function" == typeof o && o(e)
  105. }))
  106. }, n.prototype.config = function (e) {
  107. e = e || {};
  108. for (var t in e) o[t] = e[t];
  109. return this
  110. }, n.prototype.modules = function () {
  111. var e = {};
  112. for (var t in u) e[t] = u[t];
  113. return e
  114. }(), n.prototype.extend = function (e) {
  115. var t = this;
  116. e = e || {};
  117. for (var o in e) t[o] || t.modules[o] ? i("模块名 " + o + " 已被占用") : t.modules[o] = e[o];
  118. return t
  119. }, n.prototype.router = function (e) {
  120. var t = this, e = e || location.hash, o = {path: [], search: {}, hash: (e.match(/[^#](#.*$)/) || [])[1] || ""};
  121. return /^#\//.test(e) ? (e = e.replace(/^#\//, ""), o.href = "/" + e, e = e.replace(/([^#])(#.*$)/, "$1").split("/") || [], t.each(e, function (e, t) {
  122. /^\w+=/.test(t) ? function () {
  123. t = t.split("="), o.search[t[0]] = t[1]
  124. }() : o.path.push(t)
  125. }), o) : o
  126. }, n.prototype.data = function (t, o, n) {
  127. if (t = t || "layui", n = n || localStorage, e.JSON && e.JSON.parse) {
  128. if (null === o) return delete n[t];
  129. o = "object" == typeof o ? o : {key: o};
  130. try {
  131. var r = JSON.parse(n[t])
  132. } catch (i) {
  133. var r = {}
  134. }
  135. return "value" in o && (r[o.key] = o.value), o.remove && delete r[o.key], n[t] = JSON.stringify(r), o.key ? r[o.key] : r
  136. }
  137. }, n.prototype.sessionData = function (e, t) {
  138. return this.data(e, t, sessionStorage)
  139. }, n.prototype.device = function (t) {
  140. var o = navigator.userAgent.toLowerCase(), n = function (e) {
  141. var t = new RegExp(e + "/([^\\s\\_\\-]+)");
  142. return e = (o.match(t) || [])[1], e || !1
  143. }, r = {
  144. os: function () {
  145. return /windows/.test(o) ? "windows" : /linux/.test(o) ? "linux" : /iphone|ipod|ipad|ios/.test(o) ? "ios" : /mac/.test(o) ? "mac" : void 0
  146. }(), ie: function () {
  147. return !!(e.ActiveXObject || "ActiveXObject" in e) && ((o.match(/msie\s(\d+)/) || [])[1] || "11")
  148. }(), weixin: n("micromessenger")
  149. };
  150. return t && !r[t] && (r[t] = n(t)), r.android = /android/.test(o), r.ios = "ios" === r.os, r
  151. }, n.prototype.hint = function () {
  152. return {error: i}
  153. }, n.prototype.each = function (e, t) {
  154. var o, n = this;
  155. if ("function" != typeof t) return n;
  156. if (e = e || [], e.constructor === Object) {
  157. for (o in e) if (t.call(e[o], o, e[o])) break
  158. } else for (o = 0; o < e.length && !t.call(e[o], o, e[o]); o++) ;
  159. return n
  160. }, n.prototype.sort = function (e, t, o) {
  161. var n = JSON.parse(JSON.stringify(e || []));
  162. return t ? (n.sort(function (e, o) {
  163. var n = /^-?\d+$/, r = e[t], i = o[t];
  164. return n.test(r) && (r = parseFloat(r)), n.test(i) && (i = parseFloat(i)), r && !i ? 1 : !r && i ? -1 : r > i ? 1 : r < i ? -1 : 0
  165. }), o && n.reverse(), n) : n
  166. }, n.prototype.stope = function (t) {
  167. t = t || e.event;
  168. try {
  169. t.stopPropagation()
  170. } catch (o) {
  171. t.cancelBubble = !0
  172. }
  173. }, n.prototype.onevent = function (e, t, o) {
  174. return "string" != typeof e || "function" != typeof o ? this : n.event(e, t, null, o)
  175. }, n.prototype.event = n.event = function (e, t, n, r) {
  176. var i = this, a = null, u = t.match(/\((.*)\)$/) || [], l = (e + "." + t).replace(u[0], ""), s = u[1] || "",
  177. c = function (e, t) {
  178. var o = t && t.call(i, n);
  179. o === !1 && null === a && (a = !1)
  180. };
  181. return r ? (o.event[l] = o.event[l] || {}, o.event[l][s] = [r], this) : (layui.each(o.event[l], function (e, t) {
  182. return "{*}" === s ? void layui.each(t, c) : ("" === e && layui.each(t, c), void (s && e === s && layui.each(t, c)))
  183. }), a)
  184. }, e.layui = new n
  185. }(window);
  186. layui.define(function (a) {
  187. var i = layui.cache;
  188. layui.config({dir: i.dir.replace(/lay\/dest\/$/, "")}), a("layui.all", layui.v)
  189. });
  190. layui.define(function (e) {
  191. "use strict";
  192. var r = {open: "{{", close: "}}"}, c = {
  193. exp: function (e) {
  194. return new RegExp(e, "g")
  195. }, query: function (e, c, t) {
  196. var o = ["#([\\s\\S])+?", "([^{#}])*?"][e || 0];
  197. return n((c || "") + r.open + o + r.close + (t || ""))
  198. }, escape: function (e) {
  199. return String(e || "").replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#39;").replace(/"/g, "&quot;")
  200. }, error: function (e, r) {
  201. var c = "Laytpl Error:";
  202. return "object" == typeof console && console.error(c + e + "\n" + (r || "")), c + e
  203. }
  204. }, n = c.exp, t = function (e) {
  205. this.tpl = e
  206. };
  207. t.pt = t.prototype, window.errors = 0, t.pt.parse = function (e, t) {
  208. var o = this, p = e, a = n("^" + r.open + "#", ""), l = n(r.close + "$", "");
  209. e = e.replace(/\s+|\r|\t|\n/g, " ").replace(n(r.open + "#"), r.open + "# ").replace(n(r.close + "}"), "} " + r.close).replace(/\\/g, "\\\\").replace(n(r.open + "!(.+?)!" + r.close), function (e) {
  210. return e = e.replace(n("^" + r.open + "!"), "").replace(n("!" + r.close), "").replace(n(r.open + "|" + r.close), function (e) {
  211. return e.replace(/(.)/g, "\\$1")
  212. })
  213. }).replace(/(?="|')/g, "\\").replace(c.query(), function (e) {
  214. return e = e.replace(a, "").replace(l, ""), '";' + e.replace(/\\/g, "") + ';view+="'
  215. }).replace(c.query(1), function (e) {
  216. var c = '"+(';
  217. return e.replace(/\s/g, "") === r.open + r.close ? "" : (e = e.replace(n(r.open + "|" + r.close), ""), /^=/.test(e) && (e = e.replace(/^=/, ""), c = '"+_escape_('), c + e.replace(/\\/g, "") + ')+"')
  218. }), e = '"use strict";var view = "' + e + '";return view;';
  219. try {
  220. return o.cache = e = new Function("d, _escape_", e), e(t, c.escape)
  221. } catch (u) {
  222. return delete o.cache, c.error(u, p)
  223. }
  224. }, t.pt.render = function (e, r) {
  225. var n, t = this;
  226. return e ? (n = t.cache ? t.cache(e, c.escape) : t.parse(t.tpl, e), r ? void r(n) : n) : c.error("no data")
  227. };
  228. var o = function (e) {
  229. return "string" != typeof e ? c.error("Template not found") : new t(e)
  230. };
  231. o.config = function (e) {
  232. e = e || {};
  233. for (var c in e) r[c] = e[c]
  234. }, o.v = "1.2.0", e("laytpl", o)
  235. });
  236. layui.define(function (e) {
  237. "use strict";
  238. var a = document, t = "getElementById", n = "getElementsByTagName", i = "laypage", r = "layui-disabled",
  239. u = function (e) {
  240. var a = this;
  241. a.config = e || {}, a.config.index = ++s.index, a.render(!0)
  242. };
  243. u.prototype.type = function () {
  244. var e = this.config;
  245. if ("object" == typeof e.elem) return void 0 === e.elem.length ? 2 : 3
  246. }, u.prototype.view = function () {
  247. var e = this, a = e.config, t = a.groups = "groups" in a ? 0 | a.groups : 5;
  248. a.layout = "object" == typeof a.layout ? a.layout : ["prev", "page", "next"], a.count = 0 | a.count, a.curr = 0 | a.curr || 1, a.limits = "object" == typeof a.limits ? a.limits : [10, 20, 30, 40, 50], a.limit = 0 | a.limit || 10, a.pages = Math.ceil(a.count / a.limit) || 1, a.curr > a.pages && (a.curr = a.pages), t < 0 ? t = 1 : t > a.pages && (t = a.pages), a.prev = "prev" in a ? a.prev : "&#x4E0A;&#x4E00;&#x9875;", a.next = "next" in a ? a.next : "&#x4E0B;&#x4E00;&#x9875;";
  249. var n = a.pages > t ? Math.ceil((a.curr + (t > 1 ? 1 : 0)) / (t > 0 ? t : 1)) : 1, i = {
  250. prev: function () {
  251. return a.prev ? '<a href="javascript:;" class="layui-laypage-prev' + (1 == a.curr ? " " + r : "") + '" data-page="' + (a.curr - 1) + '">' + a.prev + "</a>" : ""
  252. }(),
  253. page: function () {
  254. var e = [];
  255. if (a.count < 1) return "";
  256. n > 1 && a.first !== !1 && 0 !== t && e.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">' + (a.first || 1) + "</a>");
  257. var i = Math.floor((t - 1) / 2), r = n > 1 ? a.curr - i : 1, u = n > 1 ? function () {
  258. var e = a.curr + (t - i - 1);
  259. return e > a.pages ? a.pages : e
  260. }() : t;
  261. for (u - r < t - 1 && (r = u - t + 1), a.first !== !1 && r > 2 && e.push('<span class="layui-laypage-spr">&#x2026;</span>'); r <= u; r++) r === a.curr ? e.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" ' + (/^#/.test(a.theme) ? 'style="background-color:' + a.theme + ';"' : "") + "></em><em>" + r + "</em></span>") : e.push('<a href="javascript:;" data-page="' + r + '">' + r + "</a>");
  262. return a.pages > t && a.pages > u && a.last !== !1 && (u + 1 < a.pages && e.push('<span class="layui-laypage-spr">&#x2026;</span>'), 0 !== t && e.push('<a href="javascript:;" class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="' + a.pages + '">' + (a.last || a.pages) + "</a>")), e.join("")
  263. }(),
  264. next: function () {
  265. return a.next ? '<a href="javascript:;" class="layui-laypage-next' + (a.curr == a.pages ? " " + r : "") + '" data-page="' + (a.curr + 1) + '">' + a.next + "</a>" : ""
  266. }(),
  267. count: '<span class="layui-laypage-count">共 ' + a.count + " 条</span>",
  268. limit: function () {
  269. var e = ['<span class="layui-laypage-limits"><select lay-ignore>'];
  270. return layui.each(a.limits, function (t, n) {
  271. e.push('<option value="' + n + '"' + (n === a.limit ? "selected" : "") + ">" + n + " 条/页</option>")
  272. }), e.join("") + "</select></span>"
  273. }(),
  274. refresh: ['<a href="javascript:;" data-page="' + a.curr + '" class="layui-laypage-refresh">', '<i class="layui-icon layui-icon-refresh"></i>', "</a>"].join(""),
  275. skip: function () {
  276. return ['<span class="layui-laypage-skip">&#x5230;&#x7B2C;', '<input type="text" min="1" value="' + a.curr + '" class="layui-input">', '&#x9875;<button type="button" class="layui-laypage-btn">&#x786e;&#x5b9a;</button>', "</span>"].join("")
  277. }()
  278. };
  279. return ['<div class="layui-box layui-laypage layui-laypage-' + (a.theme ? /^#/.test(a.theme) ? "molv" : a.theme : "default") + '" id="layui-laypage-' + a.index + '">', function () {
  280. var e = [];
  281. return layui.each(a.layout, function (a, t) {
  282. i[t] && e.push(i[t])
  283. }), e.join("")
  284. }(), "</div>"].join("")
  285. }, u.prototype.jump = function (e, a) {
  286. if (e) {
  287. var t = this, i = t.config, r = e.children, u = e[n]("button")[0], l = e[n]("input")[0],
  288. p = e[n]("select")[0], c = function () {
  289. var e = 0 | l.value.replace(/\s|\D/g, "");
  290. e && (i.curr = e, t.render())
  291. };
  292. if (a) return c();
  293. for (var o = 0, y = r.length; o < y; o++) "a" === r[o].nodeName.toLowerCase() && s.on(r[o], "click", function () {
  294. var e = 0 | this.getAttribute("data-page");
  295. e < 1 || e > i.pages || (i.curr = e, t.render())
  296. });
  297. p && s.on(p, "change", function () {
  298. var e = this.value;
  299. i.curr * e > i.count && (i.curr = Math.ceil(i.count / e)), i.limit = e, t.render()
  300. }), u && s.on(u, "click", function () {
  301. c()
  302. })
  303. }
  304. }, u.prototype.skip = function (e) {
  305. if (e) {
  306. var a = this, t = e[n]("input")[0];
  307. t && s.on(t, "keyup", function (t) {
  308. var n = this.value, i = t.keyCode;
  309. /^(37|38|39|40)$/.test(i) || (/\D/.test(n) && (this.value = n.replace(/\D/, "")), 13 === i && a.jump(e, !0))
  310. })
  311. }
  312. }, u.prototype.render = function (e) {
  313. var n = this, i = n.config, r = n.type(), u = n.view();
  314. 2 === r ? i.elem && (i.elem.innerHTML = u) : 3 === r ? i.elem.html(u) : a[t](i.elem) && (a[t](i.elem).innerHTML = u), i.jump && i.jump(i, e);
  315. var s = a[t]("layui-laypage-" + i.index);
  316. n.jump(s), i.hash && !e && (location.hash = "!" + i.hash + "=" + i.curr), n.skip(s)
  317. };
  318. var s = {
  319. render: function (e) {
  320. var a = new u(e);
  321. return a.index
  322. }, index: layui.laypage ? layui.laypage.index + 1e4 : 0, on: function (e, a, t) {
  323. return e.attachEvent ? e.attachEvent("on" + a, function (a) {
  324. a.target = a.srcElement, t.call(e, a)
  325. }) : e.addEventListener(a, t, !1), this
  326. }
  327. };
  328. e(i, s)
  329. });
  330. !function () {
  331. "use strict";
  332. var e = window.layui && layui.define, t = {
  333. getPath: function () {
  334. var e = document.currentScript ? document.currentScript.src : function () {
  335. for (var e, t = document.scripts, n = t.length - 1, a = n; a > 0; a--) if ("interactive" === t[a].readyState) {
  336. e = t[a].src;
  337. break
  338. }
  339. return e || t[n].src
  340. }();
  341. return e.substring(0, e.lastIndexOf("/") + 1)
  342. }(), getStyle: function (e, t) {
  343. var n = e.currentStyle ? e.currentStyle : window.getComputedStyle(e, null);
  344. return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](t)
  345. }, link: function (e, a, i) {
  346. if (n.path) {
  347. var r = document.getElementsByTagName("head")[0], o = document.createElement("link");
  348. "string" == typeof a && (i = a);
  349. var s = (i || e).replace(/\.|\//g, ""), l = "layuicss-" + s, d = 0;
  350. o.rel = "stylesheet", o.href = n.path + e, o.id = l, document.getElementById(l) || r.appendChild(o), "function" == typeof a && !function c() {
  351. return ++d > 80 ? window.console && console.error("laydate.css: Invalid") : void (1989 === parseInt(t.getStyle(document.getElementById(l), "width")) ? a() : setTimeout(c, 100))
  352. }()
  353. }
  354. }
  355. }, n = {
  356. v: "5.0.9",
  357. config: {},
  358. index: window.laydate && window.laydate.v ? 1e5 : 0,
  359. path: t.getPath,
  360. set: function (e) {
  361. var t = this;
  362. return t.config = w.extend({}, t.config, e), t
  363. },
  364. ready: function (a) {
  365. var i = "laydate", r = "", o = (e ? "modules/laydate/" : "theme/") + "default/laydate.css?v=" + n.v + r;
  366. return e ? layui.addcss(o, a, i) : t.link(o, a, i), this
  367. }
  368. }, a = function () {
  369. var e = this;
  370. return {
  371. hint: function (t) {
  372. e.hint.call(e, t)
  373. }, config: e.config
  374. }
  375. }, i = "laydate", r = ".layui-laydate", o = "layui-this", s = "laydate-disabled", l = "开始日期超出了结束日期<br>建议重新选择",
  376. d = [100, 2e5], c = "layui-laydate-static", m = "layui-laydate-list", u = "laydate-selected",
  377. h = "layui-laydate-hint", y = "laydate-day-prev", f = "laydate-day-next", p = "layui-laydate-footer",
  378. g = ".laydate-btns-confirm", v = "laydate-time-text", D = ".laydate-btns-time", T = function (e) {
  379. var t = this;
  380. t.index = ++n.index, t.config = w.extend({}, t.config, n.config, e), n.ready(function () {
  381. t.init()
  382. })
  383. }, w = function (e) {
  384. return new C(e)
  385. }, C = function (e) {
  386. for (var t = 0, n = "object" == typeof e ? [e] : (this.selector = e, document.querySelectorAll(e || null)); t < n.length; t++) this.push(n[t])
  387. };
  388. C.prototype = [], C.prototype.constructor = C, w.extend = function () {
  389. var e = 1, t = arguments, n = function (e, t) {
  390. e = e || (t.constructor === Array ? [] : {});
  391. for (var a in t) e[a] = t[a] && t[a].constructor === Object ? n(e[a], t[a]) : t[a];
  392. return e
  393. };
  394. for (t[0] = "object" == typeof t[0] ? t[0] : {}; e < t.length; e++) "object" == typeof t[e] && n(t[0], t[e]);
  395. return t[0]
  396. }, w.ie = function () {
  397. var e = navigator.userAgent.toLowerCase();
  398. return !!(window.ActiveXObject || "ActiveXObject" in window) && ((e.match(/msie\s(\d+)/) || [])[1] || "11")
  399. }(), w.stope = function (e) {
  400. e = e || window.event, e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0
  401. }, w.each = function (e, t) {
  402. var n, a = this;
  403. if ("function" != typeof t) return a;
  404. if (e = e || [], e.constructor === Object) {
  405. for (n in e) if (t.call(e[n], n, e[n])) break
  406. } else for (n = 0; n < e.length && !t.call(e[n], n, e[n]); n++) ;
  407. return a
  408. }, w.digit = function (e, t, n) {
  409. var a = "";
  410. e = String(e), t = t || 2;
  411. for (var i = e.length; i < t; i++) a += "0";
  412. return e < Math.pow(10, t) ? a + (0 | e) : e
  413. }, w.elem = function (e, t) {
  414. var n = document.createElement(e);
  415. return w.each(t || {}, function (e, t) {
  416. n.setAttribute(e, t)
  417. }), n
  418. }, C.addStr = function (e, t) {
  419. return e = e.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), w.each(t, function (t, n) {
  420. new RegExp("\\b" + n + "\\b").test(e) || (e = e + " " + n)
  421. }), e.replace(/^\s|\s$/, "")
  422. }, C.removeStr = function (e, t) {
  423. return e = e.replace(/\s+/, " "), t = t.replace(/\s+/, " ").split(" "), w.each(t, function (t, n) {
  424. var a = new RegExp("\\b" + n + "\\b");
  425. a.test(e) && (e = e.replace(a, ""))
  426. }), e.replace(/\s+/, " ").replace(/^\s|\s$/, "")
  427. }, C.prototype.find = function (e) {
  428. var t = this, n = 0, a = [], i = "object" == typeof e;
  429. return this.each(function (r, o) {
  430. for (var s = i ? [e] : o.querySelectorAll(e || null); n < s.length; n++) a.push(s[n]);
  431. t.shift()
  432. }), i || (t.selector = (t.selector ? t.selector + " " : "") + e), w.each(a, function (e, n) {
  433. t.push(n)
  434. }), t
  435. }, C.prototype.each = function (e) {
  436. return w.each.call(this, this, e)
  437. }, C.prototype.addClass = function (e, t) {
  438. return this.each(function (n, a) {
  439. a.className = C[t ? "removeStr" : "addStr"](a.className, e)
  440. })
  441. }, C.prototype.removeClass = function (e) {
  442. return this.addClass(e, !0)
  443. }, C.prototype.hasClass = function (e) {
  444. var t = !1;
  445. return this.each(function (n, a) {
  446. new RegExp("\\b" + e + "\\b").test(a.className) && (t = !0)
  447. }), t
  448. }, C.prototype.attr = function (e, t) {
  449. var n = this;
  450. return void 0 === t ? function () {
  451. if (n.length > 0) return n[0].getAttribute(e)
  452. }() : n.each(function (n, a) {
  453. a.setAttribute(e, t)
  454. })
  455. }, C.prototype.removeAttr = function (e) {
  456. return this.each(function (t, n) {
  457. n.removeAttribute(e)
  458. })
  459. }, C.prototype.html = function (e) {
  460. return this.each(function (t, n) {
  461. n.innerHTML = e
  462. })
  463. }, C.prototype.val = function (e) {
  464. return this.each(function (t, n) {
  465. n.value = e
  466. })
  467. }, C.prototype.append = function (e) {
  468. return this.each(function (t, n) {
  469. "object" == typeof e ? n.appendChild(e) : n.innerHTML = n.innerHTML + e
  470. })
  471. }, C.prototype.remove = function (e) {
  472. return this.each(function (t, n) {
  473. e ? n.removeChild(e) : n.parentNode.removeChild(n)
  474. })
  475. }, C.prototype.on = function (e, t) {
  476. return this.each(function (n, a) {
  477. a.attachEvent ? a.attachEvent("on" + e, function (e) {
  478. e.target = e.srcElement, t.call(a, e)
  479. }) : a.addEventListener(e, t, !1)
  480. })
  481. }, C.prototype.off = function (e, t) {
  482. return this.each(function (n, a) {
  483. a.detachEvent ? a.detachEvent("on" + e, t) : a.removeEventListener(e, t, !1)
  484. })
  485. }, T.isLeapYear = function (e) {
  486. return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0
  487. }, T.prototype.config = {
  488. type: "date",
  489. range: !1,
  490. format: "yyyy-MM-dd",
  491. value: null,
  492. isInitValue: !0,
  493. min: "1900-1-1",
  494. max: "2099-12-31",
  495. trigger: "focus",
  496. show: !1,
  497. showBottom: !0,
  498. btns: ["clear", "now", "confirm"],
  499. lang: "cn",
  500. theme: "default",
  501. position: null,
  502. calendar: !1,
  503. mark: {},
  504. zIndex: null,
  505. done: null,
  506. change: null
  507. }, T.prototype.lang = function () {
  508. var e = this, t = e.config, n = {
  509. cn: {
  510. weeks: ["日", "一", "二", "三", "四", "五", "六"],
  511. time: ["时", "分", "秒"],
  512. timeTips: "选择时间",
  513. startTime: "开始时间",
  514. endTime: "结束时间",
  515. dateTips: "返回日期",
  516. month: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],
  517. tools: {confirm: "确定", clear: "清空", now: "现在"}
  518. },
  519. en: {
  520. weeks: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  521. time: ["Hours", "Minutes", "Seconds"],
  522. timeTips: "Select Time",
  523. startTime: "Start Time",
  524. endTime: "End Time",
  525. dateTips: "Select Date",
  526. month: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  527. tools: {confirm: "Confirm", clear: "Clear", now: "Now"}
  528. }
  529. };
  530. return n[t.lang] || n.cn
  531. }, T.prototype.init = function () {
  532. var e = this, t = e.config, n = "yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s", a = "static" === t.position,
  533. i = {year: "yyyy", month: "yyyy-MM", date: "yyyy-MM-dd", time: "HH:mm:ss", datetime: "yyyy-MM-dd HH:mm:ss"};
  534. t.elem = w(t.elem), t.eventElem = w(t.eventElem), t.elem[0] && (t.range === !0 && (t.range = "-"), t.format === i.date && (t.format = i[t.type]), e.format = t.format.match(new RegExp(n + "|.", "g")) || [], e.EXP_IF = "", e.EXP_SPLIT = "", w.each(e.format, function (t, a) {
  535. var i = new RegExp(n).test(a) ? "\\d{" + function () {
  536. return new RegExp(n).test(e.format[0 === t ? t + 1 : t - 1] || "") ? /^yyyy|y$/.test(a) ? 4 : a.length : /^yyyy$/.test(a) ? "1,4" : /^y$/.test(a) ? "1,308" : "1,2"
  537. }() + "}" : "\\" + a;
  538. e.EXP_IF = e.EXP_IF + i, e.EXP_SPLIT = e.EXP_SPLIT + "(" + i + ")"
  539. }), e.EXP_IF = new RegExp("^" + (t.range ? e.EXP_IF + "\\s\\" + t.range + "\\s" + e.EXP_IF : e.EXP_IF) + "$"), e.EXP_SPLIT = new RegExp("^" + e.EXP_SPLIT + "$", ""), e.isInput(t.elem[0]) || "focus" === t.trigger && (t.trigger = "click"), t.elem.attr("lay-key") || (t.elem.attr("lay-key", e.index), t.eventElem.attr("lay-key", e.index)), t.mark = w.extend({}, t.calendar && "cn" === t.lang ? {
  540. "0-1-1": "元旦",
  541. "0-2-14": "情人",
  542. "0-3-8": "妇女",
  543. "0-3-12": "植树",
  544. "0-4-1": "愚人",
  545. "0-5-1": "劳动",
  546. "0-5-4": "青年",
  547. "0-6-1": "儿童",
  548. "0-9-10": "教师",
  549. "0-9-18": "国耻",
  550. "0-10-1": "国庆",
  551. "0-12-25": "圣诞"
  552. } : {}, t.mark), w.each(["min", "max"], function (e, n) {
  553. var a = [], i = [];
  554. if ("number" == typeof t[n]) {
  555. var r = t[n], o = (new Date).getTime(), s = 864e5, l = new Date(r ? r < s ? o + r * s : r : o);
  556. a = [l.getFullYear(), l.getMonth() + 1, l.getDate()], r < s || (i = [l.getHours(), l.getMinutes(), l.getSeconds()])
  557. } else a = (t[n].match(/\d+-\d+-\d+/) || [""])[0].split("-"), i = (t[n].match(/\d+:\d+:\d+/) || [""])[0].split(":");
  558. t[n] = {
  559. year: 0 | a[0] || (new Date).getFullYear(),
  560. month: a[1] ? (0 | a[1]) - 1 : (new Date).getMonth(),
  561. date: 0 | a[2] || (new Date).getDate(),
  562. hours: 0 | i[0],
  563. minutes: 0 | i[1],
  564. seconds: 0 | i[2]
  565. }
  566. }), e.elemID = "layui-laydate" + t.elem.attr("lay-key"), (t.show || a) && e.render(), a || e.events(), t.value && t.isInitValue && (t.value.constructor === Date ? e.setValue(e.parse(0, e.systemDate(t.value))) : e.setValue(t.value)))
  567. }, T.prototype.render = function () {
  568. var e = this, t = e.config, n = e.lang(), a = "static" === t.position, i = e.elem = w.elem("div", {
  569. id: e.elemID,
  570. "class": ["layui-laydate", t.range ? " layui-laydate-range" : "", a ? " " + c : "", t.theme && "default" !== t.theme && !/^#/.test(t.theme) ? " laydate-theme-" + t.theme : ""].join("")
  571. }), r = e.elemMain = [], o = e.elemHeader = [], s = e.elemCont = [], l = e.table = [],
  572. d = e.footer = w.elem("div", {"class": p});
  573. if (t.zIndex && (i.style.zIndex = t.zIndex), w.each(new Array(2), function (e) {
  574. if (!t.range && e > 0) return !0;
  575. var a = w.elem("div", {"class": "layui-laydate-header"}), i = [function () {
  576. var e = w.elem("i", {"class": "layui-icon laydate-icon laydate-prev-y"});
  577. return e.innerHTML = "&#xe65a;", e
  578. }(), function () {
  579. var e = w.elem("i", {"class": "layui-icon laydate-icon laydate-prev-m"});
  580. return e.innerHTML = "&#xe603;", e
  581. }(), function () {
  582. var e = w.elem("div", {"class": "laydate-set-ym"}), t = w.elem("span"), n = w.elem("span");
  583. return e.appendChild(t), e.appendChild(n), e
  584. }(), function () {
  585. var e = w.elem("i", {"class": "layui-icon laydate-icon laydate-next-m"});
  586. return e.innerHTML = "&#xe602;", e
  587. }(), function () {
  588. var e = w.elem("i", {"class": "layui-icon laydate-icon laydate-next-y"});
  589. return e.innerHTML = "&#xe65b;", e
  590. }()], d = w.elem("div", {"class": "layui-laydate-content"}), c = w.elem("table"), m = w.elem("thead"),
  591. u = w.elem("tr");
  592. w.each(i, function (e, t) {
  593. a.appendChild(t)
  594. }), m.appendChild(u), w.each(new Array(6), function (e) {
  595. var t = c.insertRow(0);
  596. w.each(new Array(7), function (a) {
  597. if (0 === e) {
  598. var i = w.elem("th");
  599. i.innerHTML = n.weeks[a], u.appendChild(i)
  600. }
  601. t.insertCell(a)
  602. })
  603. }), c.insertBefore(m, c.children[0]), d.appendChild(c), r[e] = w.elem("div", {"class": "layui-laydate-main laydate-main-list-" + e}), r[e].appendChild(a), r[e].appendChild(d), o.push(i), s.push(d), l.push(c)
  604. }), w(d).html(function () {
  605. var e = [], i = [];
  606. return "datetime" === t.type && e.push('<span lay-type="datetime" class="laydate-btns-time">' + n.timeTips + "</span>"), w.each(t.btns, function (e, r) {
  607. var o = n.tools[r] || "btn";
  608. t.range && "now" === r || (a && "clear" === r && (o = "cn" === t.lang ? "重置" : "Reset"), i.push('<span lay-type="' + r + '" class="laydate-btns-' + r + '">' + o + "</span>"))
  609. }), e.push('<div class="laydate-footer-btns">' + i.join("") + "</div>"), e.join("")
  610. }()), w.each(r, function (e, t) {
  611. i.appendChild(t)
  612. }), t.showBottom && i.appendChild(d), /^#/.test(t.theme)) {
  613. var m = w.elem("style"),
  614. u = ["#{{id}} .layui-laydate-header{background-color:{{theme}};}", "#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g, e.elemID).replace(/{{theme}}/g, t.theme);
  615. "styleSheet" in m ? (m.setAttribute("type", "text/css"), m.styleSheet.cssText = u) : m.innerHTML = u, w(i).addClass("laydate-theme-molv"), i.appendChild(m)
  616. }
  617. e.remove(T.thisElemDate), a ? t.elem.append(i) : (document.body.appendChild(i), e.position()), e.checkDate().calendar(), e.changeEvent(), T.thisElemDate = e.elemID, "function" == typeof t.ready && t.ready(w.extend({}, t.dateTime, {month: t.dateTime.month + 1}))
  618. }, T.prototype.remove = function (e) {
  619. var t = this, n = (t.config, w("#" + (e || t.elemID)));
  620. return n.hasClass(c) || t.checkDate(function () {
  621. n.remove()
  622. }), t
  623. }, T.prototype.position = function () {
  624. var e = this, t = e.config, n = e.bindElem || t.elem[0], a = n.getBoundingClientRect(), i = e.elem.offsetWidth,
  625. r = e.elem.offsetHeight, o = function (e) {
  626. return e = e ? "scrollLeft" : "scrollTop", document.body[e] | document.documentElement[e]
  627. }, s = function (e) {
  628. return document.documentElement[e ? "clientWidth" : "clientHeight"]
  629. }, l = 5, d = a.left, c = a.bottom;
  630. d + i + l > s("width") && (d = s("width") - i - l), c + r + l > s() && (c = a.top > r ? a.top - r : s() - r, c -= 2 * l), t.position && (e.elem.style.position = t.position), e.elem.style.left = d + ("fixed" === t.position ? 0 : o(1)) + "px", e.elem.style.top = c + ("fixed" === t.position ? 0 : o()) + "px"
  631. }, T.prototype.hint = function (e) {
  632. var t = this, n = (t.config, w.elem("div", {"class": h}));
  633. t.elem && (n.innerHTML = e || "", w(t.elem).find("." + h).remove(), t.elem.appendChild(n), clearTimeout(t.hinTimer), t.hinTimer = setTimeout(function () {
  634. w(t.elem).find("." + h).remove()
  635. }, 3e3))
  636. }, T.prototype.getAsYM = function (e, t, n) {
  637. return n ? t-- : t++, t < 0 && (t = 11, e--), t > 11 && (t = 0, e++), [e, t]
  638. }, T.prototype.systemDate = function (e) {
  639. var t = e || new Date;
  640. return {
  641. year: t.getFullYear(),
  642. month: t.getMonth(),
  643. date: t.getDate(),
  644. hours: e ? e.getHours() : 0,
  645. minutes: e ? e.getMinutes() : 0,
  646. seconds: e ? e.getSeconds() : 0
  647. }
  648. }, T.prototype.checkDate = function (e) {
  649. var t, a, i = this, r = (new Date, i.config), o = r.dateTime = r.dateTime || i.systemDate(),
  650. s = i.bindElem || r.elem[0],
  651. l = (i.isInput(s) ? "val" : "html", i.isInput(s) ? s.value : "static" === r.position ? "" : s.innerHTML),
  652. c = function (e) {
  653. e.year > d[1] && (e.year = d[1], a = !0), e.month > 11 && (e.month = 11, a = !0), e.hours > 23 && (e.hours = 0, a = !0), e.minutes > 59 && (e.minutes = 0, e.hours++, a = !0), e.seconds > 59 && (e.seconds = 0, e.minutes++, a = !0), t = n.getEndDate(e.month + 1, e.year), e.date > t && (e.date = t, a = !0)
  654. }, m = function (e, t, n) {
  655. var o = ["startTime", "endTime"];
  656. t = (t.match(i.EXP_SPLIT) || []).slice(1), n = n || 0, r.range && (i[o[n]] = i[o[n]] || {}), w.each(i.format, function (s, l) {
  657. var c = parseFloat(t[s]);
  658. t[s].length < l.length && (a = !0), /yyyy|y/.test(l) ? (c < d[0] && (c = d[0], a = !0), e.year = c) : /MM|M/.test(l) ? (c < 1 && (c = 1, a = !0), e.month = c - 1) : /dd|d/.test(l) ? (c < 1 && (c = 1, a = !0), e.date = c) : /HH|H/.test(l) ? (c < 1 && (c = 0, a = !0), e.hours = c, r.range && (i[o[n]].hours = c)) : /mm|m/.test(l) ? (c < 1 && (c = 0, a = !0), e.minutes = c, r.range && (i[o[n]].minutes = c)) : /ss|s/.test(l) && (c < 1 && (c = 0, a = !0), e.seconds = c, r.range && (i[o[n]].seconds = c))
  659. }), c(e)
  660. };
  661. return "limit" === e ? (c(o), i) : (l = l || r.value, "string" == typeof l && (l = l.replace(/\s+/g, " ").replace(/^\s|\s$/g, "")), i.startState && !i.endState && (delete i.startState, i.endState = !0), "string" == typeof l && l ? i.EXP_IF.test(l) ? r.range ? (l = l.split(" " + r.range + " "), i.startDate = i.startDate || i.systemDate(), i.endDate = i.endDate || i.systemDate(), r.dateTime = w.extend({}, i.startDate), w.each([i.startDate, i.endDate], function (e, t) {
  662. m(t, l[e], e)
  663. })) : m(o, l) : (i.hint("日期格式不合法<br>必须遵循下述格式:<br>" + (r.range ? r.format + " " + r.range + " " + r.format : r.format) + "<br>已为你重置"), a = !0) : l && l.constructor === Date ? r.dateTime = i.systemDate(l) : (r.dateTime = i.systemDate(), delete i.startState, delete i.endState, delete i.startDate, delete i.endDate, delete i.startTime, delete i.endTime), c(o), a && l && i.setValue(r.range ? i.endDate ? i.parse() : "" : i.parse()), e && e(), i)
  664. }, T.prototype.mark = function (e, t) {
  665. var n, a = this, i = a.config;
  666. return w.each(i.mark, function (e, a) {
  667. var i = e.split("-");
  668. i[0] != t[0] && 0 != i[0] || i[1] != t[1] && 0 != i[1] || i[2] != t[2] || (n = a || t[2])
  669. }), n && e.html('<span class="laydate-day-mark">' + n + "</span>"), a
  670. }, T.prototype.limit = function (e, t, n, a) {
  671. var i, r = this, o = r.config, l = {}, d = o[n > 41 ? "endDate" : "dateTime"], c = w.extend({}, d, t || {});
  672. return w.each({now: c, min: o.min, max: o.max}, function (e, t) {
  673. l[e] = r.newDate(w.extend({year: t.year, month: t.month, date: t.date}, function () {
  674. var e = {};
  675. return w.each(a, function (n, a) {
  676. e[a] = t[a]
  677. }), e
  678. }())).getTime()
  679. }), i = l.now < l.min || l.now > l.max, e && e[i ? "addClass" : "removeClass"](s), i
  680. }, T.prototype.calendar = function (e) {
  681. var t, a, i, r = this, s = r.config, l = e || s.dateTime, c = new Date, m = r.lang(),
  682. u = "date" !== s.type && "datetime" !== s.type, h = e ? 1 : 0, y = w(r.table[h]).find("td"),
  683. f = w(r.elemHeader[h][2]).find("span");
  684. if (l.year < d[0] && (l.year = d[0], r.hint("最低只能支持到公元" + d[0] + "年")), l.year > d[1] && (l.year = d[1], r.hint("最高只能支持到公元" + d[1] + "年")), r.firstDate || (r.firstDate = w.extend({}, l)), c.setFullYear(l.year, l.month, 1), t = c.getDay(), a = n.getEndDate(l.month || 12, l.year), i = n.getEndDate(l.month + 1, l.year), w.each(y, function (e, n) {
  685. var d = [l.year, l.month], c = 0;
  686. n = w(n), n.removeAttr("class"), e < t ? (c = a - t + e, n.addClass("laydate-day-prev"), d = r.getAsYM(l.year, l.month, "sub")) : e >= t && e < i + t ? (c = e - t, s.range || c + 1 === l.date && n.addClass(o)) : (c = e - i - t, n.addClass("laydate-day-next"), d = r.getAsYM(l.year, l.month)), d[1]++, d[2] = c + 1, n.attr("lay-ymd", d.join("-")).html(d[2]), r.mark(n, d).limit(n, {
  687. year: d[0],
  688. month: d[1] - 1,
  689. date: d[2]
  690. }, e)
  691. }), w(f[0]).attr("lay-ym", l.year + "-" + (l.month + 1)), w(f[1]).attr("lay-ym", l.year + "-" + (l.month + 1)), "cn" === s.lang ? (w(f[0]).attr("lay-type", "year").html(l.year + "年"), w(f[1]).attr("lay-type", "month").html(l.month + 1 + "月")) : (w(f[0]).attr("lay-type", "month").html(m.month[l.month]), w(f[1]).attr("lay-type", "year").html(l.year)), u && (s.range && (e ? r.endDate = r.endDate || {
  692. year: l.year + ("year" === s.type ? 1 : 0),
  693. month: l.month + ("month" === s.type ? 0 : -1)
  694. } : r.startDate = r.startDate || {
  695. year: l.year,
  696. month: l.month
  697. }, e && (r.listYM = [[r.startDate.year, r.startDate.month + 1], [r.endDate.year, r.endDate.month + 1]], r.list(s.type, 0).list(s.type, 1), "time" === s.type ? r.setBtnStatus("时间", w.extend({}, r.systemDate(), r.startTime), w.extend({}, r.systemDate(), r.endTime)) : r.setBtnStatus(!0))), s.range || (r.listYM = [[l.year, l.month + 1]], r.list(s.type, 0))), s.range && !e) {
  698. var p = r.getAsYM(l.year, l.month);
  699. r.calendar(w.extend({}, l, {year: p[0], month: p[1]}))
  700. }
  701. return s.range || r.limit(w(r.footer).find(g), null, 0, ["hours", "minutes", "seconds"]), s.range && e && !u && r.stampRange(), r
  702. }, T.prototype.list = function (e, t) {
  703. var n = this, a = n.config, i = a.dateTime, r = n.lang(),
  704. l = a.range && "date" !== a.type && "datetime" !== a.type, d = w.elem("ul", {
  705. "class": m + " " + {
  706. year: "laydate-year-list",
  707. month: "laydate-month-list",
  708. time: "laydate-time-list"
  709. }[e]
  710. }), c = n.elemHeader[t], u = w(c[2]).find("span"), h = n.elemCont[t || 0], y = w(h).find("." + m)[0],
  711. f = "cn" === a.lang, p = f ? "年" : "", T = n.listYM[t] || {}, C = ["hours", "minutes", "seconds"],
  712. x = ["startTime", "endTime"][t];
  713. if (T[0] < 1 && (T[0] = 1), "year" === e) {
  714. var M, b = M = T[0] - 7;
  715. b < 1 && (b = M = 1), w.each(new Array(15), function (e) {
  716. var i = w.elem("li", {"lay-ym": M}), r = {year: M};
  717. M == T[0] && w(i).addClass(o), i.innerHTML = M + p, d.appendChild(i), M < n.firstDate.year ? (r.month = a.min.month, r.date = a.min.date) : M >= n.firstDate.year && (r.month = a.max.month, r.date = a.max.date), n.limit(w(i), r, t), M++
  718. }), w(u[f ? 0 : 1]).attr("lay-ym", M - 8 + "-" + T[1]).html(b + p + " - " + (M - 1 + p))
  719. } else if ("month" === e) w.each(new Array(12), function (e) {
  720. var i = w.elem("li", {"lay-ym": e}), s = {year: T[0], month: e};
  721. e + 1 == T[1] && w(i).addClass(o), i.innerHTML = r.month[e] + (f ? "月" : ""), d.appendChild(i), T[0] < n.firstDate.year ? s.date = a.min.date : T[0] >= n.firstDate.year && (s.date = a.max.date), n.limit(w(i), s, t)
  722. }), w(u[f ? 0 : 1]).attr("lay-ym", T[0] + "-" + T[1]).html(T[0] + p); else if ("time" === e) {
  723. var E = function () {
  724. w(d).find("ol").each(function (e, a) {
  725. w(a).find("li").each(function (a, i) {
  726. n.limit(w(i), [{hours: a}, {hours: n[x].hours, minutes: a}, {
  727. hours: n[x].hours,
  728. minutes: n[x].minutes,
  729. seconds: a
  730. }][e], t, [["hours"], ["hours", "minutes"], ["hours", "minutes", "seconds"]][e])
  731. })
  732. }), a.range || n.limit(w(n.footer).find(g), n[x], 0, ["hours", "minutes", "seconds"])
  733. };
  734. a.range ? n[x] || (n[x] = {
  735. hours: 0,
  736. minutes: 0,
  737. seconds: 0
  738. }) : n[x] = i, w.each([24, 60, 60], function (e, t) {
  739. var a = w.elem("li"), i = ["<p>" + r.time[e] + "</p><ol>"];
  740. w.each(new Array(t), function (t) {
  741. i.push("<li" + (n[x][C[e]] === t ? ' class="' + o + '"' : "") + ">" + w.digit(t, 2) + "</li>")
  742. }), a.innerHTML = i.join("") + "</ol>", d.appendChild(a)
  743. }), E()
  744. }
  745. if (y && h.removeChild(y), h.appendChild(d), "year" === e || "month" === e) w(n.elemMain[t]).addClass("laydate-ym-show"), w(d).find("li").on("click", function () {
  746. var r = 0 | w(this).attr("lay-ym");
  747. if (!w(this).hasClass(s)) {
  748. if (0 === t) i[e] = r, l && (n.startDate[e] = r), n.limit(w(n.footer).find(g), null, 0); else if (l) n.endDate[e] = r; else {
  749. var c = "year" === e ? n.getAsYM(r, T[1] - 1, "sub") : n.getAsYM(T[0], r, "sub");
  750. w.extend(i, {year: c[0], month: c[1]})
  751. }
  752. "year" === a.type || "month" === a.type ? (w(d).find("." + o).removeClass(o), w(this).addClass(o), "month" === a.type && "year" === e && (n.listYM[t][0] = r, l && (n[["startDate", "endDate"][t]].year = r), n.list("month", t))) : (n.checkDate("limit").calendar(), n.closeList()), n.setBtnStatus(), a.range || n.done(null, "change"), w(n.footer).find(D).removeClass(s)
  753. }
  754. }); else {
  755. var S = w.elem("span", {"class": v}), k = function () {
  756. w(d).find("ol").each(function (e) {
  757. var t = this, a = w(t).find("li");
  758. t.scrollTop = 30 * (n[x][C[e]] - 2), t.scrollTop <= 0 && a.each(function (e, n) {
  759. if (!w(this).hasClass(s)) return t.scrollTop = 30 * (e - 2), !0
  760. })
  761. })
  762. }, H = w(c[2]).find("." + v);
  763. k(), S.innerHTML = a.range ? [r.startTime, r.endTime][t] : r.timeTips, w(n.elemMain[t]).addClass("laydate-time-show"), H[0] && H.remove(), c[2].appendChild(S), w(d).find("ol").each(function (e) {
  764. var t = this;
  765. w(t).find("li").on("click", function () {
  766. var r = 0 | this.innerHTML;
  767. w(this).hasClass(s) || (a.range ? n[x][C[e]] = r : i[C[e]] = r, w(t).find("." + o).removeClass(o), w(this).addClass(o), E(), k(), (n.endDate || "time" === a.type) && n.done(null, "change"), n.setBtnStatus())
  768. })
  769. })
  770. }
  771. return n
  772. }, T.prototype.listYM = [], T.prototype.closeList = function () {
  773. var e = this;
  774. e.config;
  775. w.each(e.elemCont, function (t, n) {
  776. w(this).find("." + m).remove(), w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")
  777. }), w(e.elem).find("." + v).remove()
  778. }, T.prototype.setBtnStatus = function (e, t, n) {
  779. var a, i = this, r = i.config, o = w(i.footer).find(g), d = r.range && "date" !== r.type && "time" !== r.type;
  780. d && (t = t || i.startDate, n = n || i.endDate, a = i.newDate(t).getTime() > i.newDate(n).getTime(), i.limit(null, t) || i.limit(null, n) ? o.addClass(s) : o[a ? "addClass" : "removeClass"](s), e && a && i.hint("string" == typeof e ? l.replace(/日期/g, e) : l))
  781. }, T.prototype.parse = function (e, t) {
  782. var n = this, a = n.config,
  783. i = t || (e ? w.extend({}, n.endDate, n.endTime) : a.range ? w.extend({}, n.startDate, n.startTime) : a.dateTime),
  784. r = n.format.concat();
  785. return w.each(r, function (e, t) {
  786. /yyyy|y/.test(t) ? r[e] = w.digit(i.year, t.length) : /MM|M/.test(t) ? r[e] = w.digit(i.month + 1, t.length) : /dd|d/.test(t) ? r[e] = w.digit(i.date, t.length) : /HH|H/.test(t) ? r[e] = w.digit(i.hours, t.length) : /mm|m/.test(t) ? r[e] = w.digit(i.minutes, t.length) : /ss|s/.test(t) && (r[e] = w.digit(i.seconds, t.length))
  787. }), a.range && !e ? r.join("") + " " + a.range + " " + n.parse(1) : r.join("")
  788. }, T.prototype.newDate = function (e) {
  789. return e = e || {}, new Date(e.year || 1, e.month || 0, e.date || 1, e.hours || 0, e.minutes || 0, e.seconds || 0)
  790. }, T.prototype.setValue = function (e) {
  791. var t = this, n = t.config, a = t.bindElem || n.elem[0], i = t.isInput(a) ? "val" : "html";
  792. return "static" === n.position || w(a)[i](e || ""), this
  793. }, T.prototype.stampRange = function () {
  794. var e, t, n = this, a = n.config, i = w(n.elem).find("td");
  795. if (a.range && !n.endDate && w(n.footer).find(g).addClass(s), n.endDate) return e = n.newDate({
  796. year: n.startDate.year,
  797. month: n.startDate.month,
  798. date: n.startDate.date
  799. }).getTime(), t = n.newDate({
  800. year: n.endDate.year,
  801. month: n.endDate.month,
  802. date: n.endDate.date
  803. }).getTime(), e > t ? n.hint(l) : void w.each(i, function (a, i) {
  804. var r = w(i).attr("lay-ymd").split("-"), s = n.newDate({year: r[0], month: r[1] - 1, date: r[2]}).getTime();
  805. w(i).removeClass(u + " " + o), s !== e && s !== t || w(i).addClass(w(i).hasClass(y) || w(i).hasClass(f) ? u : o), s > e && s < t && w(i).addClass(u)
  806. })
  807. }, T.prototype.done = function (e, t) {
  808. var n = this, a = n.config, i = w.extend({}, n.startDate ? w.extend(n.startDate, n.startTime) : a.dateTime),
  809. r = w.extend({}, w.extend(n.endDate, n.endTime));
  810. return w.each([i, r], function (e, t) {
  811. "month" in t && w.extend(t, {month: t.month + 1})
  812. }), e = e || [n.parse(), i, r], "function" == typeof a[t || "done"] && a[t || "done"].apply(a, e), n
  813. }, T.prototype.choose = function (e) {
  814. var t = this, n = t.config, a = n.dateTime, i = w(t.elem).find("td"), r = e.attr("lay-ymd").split("-"),
  815. l = function (e) {
  816. new Date;
  817. e && w.extend(a, r), n.range && (t.startDate ? w.extend(t.startDate, r) : t.startDate = w.extend({}, r, t.startTime), t.startYMD = r)
  818. };
  819. if (r = {year: 0 | r[0], month: (0 | r[1]) - 1, date: 0 | r[2]}, !e.hasClass(s)) if (n.range) {
  820. if (w.each(["startTime", "endTime"], function (e, n) {
  821. t[n] = t[n] || {hours: 0, minutes: 0, seconds: 0}
  822. }), t.endState) l(), delete t.endState, delete t.endDate, t.startState = !0, i.removeClass(o + " " + u), e.addClass(o); else if (t.startState) {
  823. if (e.addClass(o), t.endDate ? w.extend(t.endDate, r) : t.endDate = w.extend({}, r, t.endTime), t.newDate(r).getTime() < t.newDate(t.startYMD).getTime()) {
  824. var d = w.extend({}, t.endDate, {
  825. hours: t.startDate.hours,
  826. minutes: t.startDate.minutes,
  827. seconds: t.startDate.seconds
  828. });
  829. w.extend(t.endDate, t.startDate, {
  830. hours: t.endDate.hours,
  831. minutes: t.endDate.minutes,
  832. seconds: t.endDate.seconds
  833. }), t.startDate = d
  834. }
  835. n.showBottom || t.done(), t.stampRange(), t.endState = !0, t.done(null, "change")
  836. } else e.addClass(o), l(), t.startState = !0;
  837. w(t.footer).find(g)[t.endDate ? "removeClass" : "addClass"](s)
  838. } else "static" === n.position ? (l(!0), t.calendar().done().done(null, "change")) : "date" === n.type ? (l(!0), t.setValue(t.parse()).remove().done()) : "datetime" === n.type && (l(!0), t.calendar().done(null, "change"))
  839. }, T.prototype.tool = function (e, t) {
  840. var n = this, a = n.config, i = a.dateTime, r = "static" === a.position, o = {
  841. datetime: function () {
  842. w(e).hasClass(s) || (n.list("time", 0), a.range && n.list("time", 1), w(e).attr("lay-type", "date").html(n.lang().dateTips))
  843. }, date: function () {
  844. n.closeList(), w(e).attr("lay-type", "datetime").html(n.lang().timeTips)
  845. }, clear: function () {
  846. n.setValue("").remove(), r && (w.extend(i, n.firstDate), n.calendar()), a.range && (delete n.startState, delete n.endState, delete n.endDate, delete n.startTime, delete n.endTime), n.done(["", {}, {}])
  847. }, now: function () {
  848. var e = new Date;
  849. w.extend(i, n.systemDate(), {
  850. hours: e.getHours(),
  851. minutes: e.getMinutes(),
  852. seconds: e.getSeconds()
  853. }), n.setValue(n.parse()).remove(), r && n.calendar(), n.done()
  854. }, confirm: function () {
  855. if (a.range) {
  856. if (!n.endDate) return n.hint("请先选择日期范围");
  857. if (w(e).hasClass(s)) return n.hint("time" === a.type ? l.replace(/日期/g, "时间") : l)
  858. } else if (w(e).hasClass(s)) return n.hint("不在有效日期或时间范围内");
  859. n.done(), n.setValue(n.parse()).remove()
  860. }
  861. };
  862. o[t] && o[t]()
  863. }, T.prototype.change = function (e) {
  864. var t = this, n = t.config, a = n.dateTime, i = n.range && ("year" === n.type || "month" === n.type),
  865. r = t.elemCont[e || 0], o = t.listYM[e], s = function (s) {
  866. var l = ["startDate", "endDate"][e], d = w(r).find(".laydate-year-list")[0],
  867. c = w(r).find(".laydate-month-list")[0];
  868. return d && (o[0] = s ? o[0] - 15 : o[0] + 15, t.list("year", e)), c && (s ? o[0]-- : o[0]++, t.list("month", e)), (d || c) && (w.extend(a, {year: o[0]}), i && (t[l].year = o[0]), n.range || t.done(null, "change"), t.setBtnStatus(), n.range || t.limit(w(t.footer).find(g), {year: o[0]})), d || c
  869. };
  870. return {
  871. prevYear: function () {
  872. s("sub") || (a.year--, t.checkDate("limit").calendar(), n.range || t.done(null, "change"))
  873. }, prevMonth: function () {
  874. var e = t.getAsYM(a.year, a.month, "sub");
  875. w.extend(a, {
  876. year: e[0],
  877. month: e[1]
  878. }), t.checkDate("limit").calendar(), n.range || t.done(null, "change")
  879. }, nextMonth: function () {
  880. var e = t.getAsYM(a.year, a.month);
  881. w.extend(a, {
  882. year: e[0],
  883. month: e[1]
  884. }), t.checkDate("limit").calendar(), n.range || t.done(null, "change")
  885. }, nextYear: function () {
  886. s() || (a.year++, t.checkDate("limit").calendar(), n.range || t.done(null, "change"))
  887. }
  888. }
  889. }, T.prototype.changeEvent = function () {
  890. var e = this;
  891. e.config;
  892. w(e.elem).on("click", function (e) {
  893. w.stope(e)
  894. }), w.each(e.elemHeader, function (t, n) {
  895. w(n[0]).on("click", function (n) {
  896. e.change(t).prevYear()
  897. }), w(n[1]).on("click", function (n) {
  898. e.change(t).prevMonth()
  899. }), w(n[2]).find("span").on("click", function (n) {
  900. var a = w(this), i = a.attr("lay-ym"), r = a.attr("lay-type");
  901. i && (i = i.split("-"), e.listYM[t] = [0 | i[0], 0 | i[1]], e.list(r, t), w(e.footer).find(D).addClass(s))
  902. }), w(n[3]).on("click", function (n) {
  903. e.change(t).nextMonth()
  904. }), w(n[4]).on("click", function (n) {
  905. e.change(t).nextYear()
  906. })
  907. }), w.each(e.table, function (t, n) {
  908. var a = w(n).find("td");
  909. a.on("click", function () {
  910. e.choose(w(this))
  911. })
  912. }), w(e.footer).find("span").on("click", function () {
  913. var t = w(this).attr("lay-type");
  914. e.tool(this, t)
  915. })
  916. }, T.prototype.isInput = function (e) {
  917. return /input|textarea/.test(e.tagName.toLocaleLowerCase())
  918. }, T.prototype.events = function () {
  919. var e = this, t = e.config, n = function (n, a) {
  920. n.on(t.trigger, function () {
  921. a && (e.bindElem = this), e.render()
  922. })
  923. };
  924. t.elem[0] && !t.elem[0].eventHandler && (n(t.elem, "bind"), n(t.eventElem), w(document).on("click", function (n) {
  925. n.target !== t.elem[0] && n.target !== t.eventElem[0] && n.target !== w(t.closeStop)[0] && e.remove()
  926. }).on("keydown", function (t) {
  927. 13 === t.keyCode && w("#" + e.elemID)[0] && e.elemID === T.thisElem && (t.preventDefault(), w(e.footer).find(g)[0].click())
  928. }), w(window).on("resize", function () {
  929. return !(!e.elem || !w(r)[0]) && void e.position()
  930. }), t.elem[0].eventHandler = !0)
  931. }, n.render = function (e) {
  932. var t = new T(e);
  933. return a.call(t)
  934. }, n.getEndDate = function (e, t) {
  935. var n = new Date;
  936. return n.setFullYear(t || n.getFullYear(), e || n.getMonth() + 1, 1), new Date(n.getTime() - 864e5).getDate()
  937. }, window.lay = window.lay || w, e ? (n.ready(), layui.define(function (e) {
  938. n.path = layui.cache.dir, e(i, n)
  939. })) : "function" == typeof define && define.amd ? define(function () {
  940. return n
  941. }) : function () {
  942. n.ready(), window.laydate = n
  943. }()
  944. }();
  945. !function (e, t) {
  946. "object" == typeof module && "object" == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) {
  947. if (!e.document) throw new Error("jQuery requires a window with a document");
  948. return t(e)
  949. } : t(e)
  950. }("undefined" != typeof window ? window : this, function (e, t) {
  951. function n(e) {
  952. var t = !!e && "length" in e && e.length, n = pe.type(e);
  953. return "function" !== n && !pe.isWindow(e) && ("array" === n || 0 === t || "number" == typeof t && t > 0 && t - 1 in e)
  954. }
  955. function r(e, t, n) {
  956. if (pe.isFunction(t)) return pe.grep(e, function (e, r) {
  957. return !!t.call(e, r, e) !== n
  958. });
  959. if (t.nodeType) return pe.grep(e, function (e) {
  960. return e === t !== n
  961. });
  962. if ("string" == typeof t) {
  963. if (Ce.test(t)) return pe.filter(t, e, n);
  964. t = pe.filter(t, e)
  965. }
  966. return pe.grep(e, function (e) {
  967. return pe.inArray(e, t) > -1 !== n
  968. })
  969. }
  970. function i(e, t) {
  971. do e = e[t]; while (e && 1 !== e.nodeType);
  972. return e
  973. }
  974. function o(e) {
  975. var t = {};
  976. return pe.each(e.match(De) || [], function (e, n) {
  977. t[n] = !0
  978. }), t
  979. }
  980. function a() {
  981. re.addEventListener ? (re.removeEventListener("DOMContentLoaded", s), e.removeEventListener("load", s)) : (re.detachEvent("onreadystatechange", s), e.detachEvent("onload", s))
  982. }
  983. function s() {
  984. (re.addEventListener || "load" === e.event.type || "complete" === re.readyState) && (a(), pe.ready())
  985. }
  986. function u(e, t, n) {
  987. if (void 0 === n && 1 === e.nodeType) {
  988. var r = "data-" + t.replace(_e, "-$1").toLowerCase();
  989. if (n = e.getAttribute(r), "string" == typeof n) {
  990. try {
  991. n = "true" === n || "false" !== n && ("null" === n ? null : +n + "" === n ? +n : qe.test(n) ? pe.parseJSON(n) : n)
  992. } catch (i) {
  993. }
  994. pe.data(e, t, n)
  995. } else n = void 0
  996. }
  997. return n
  998. }
  999. function l(e) {
  1000. var t;
  1001. for (t in e) if (("data" !== t || !pe.isEmptyObject(e[t])) && "toJSON" !== t) return !1;
  1002. return !0
  1003. }
  1004. function c(e, t, n, r) {
  1005. if (He(e)) {
  1006. var i, o, a = pe.expando, s = e.nodeType, u = s ? pe.cache : e, l = s ? e[a] : e[a] && a;
  1007. if (l && u[l] && (r || u[l].data) || void 0 !== n || "string" != typeof t) return l || (l = s ? e[a] = ne.pop() || pe.guid++ : a), u[l] || (u[l] = s ? {} : {toJSON: pe.noop}), "object" != typeof t && "function" != typeof t || (r ? u[l] = pe.extend(u[l], t) : u[l].data = pe.extend(u[l].data, t)), o = u[l], r || (o.data || (o.data = {}), o = o.data), void 0 !== n && (o[pe.camelCase(t)] = n), "string" == typeof t ? (i = o[t], null == i && (i = o[pe.camelCase(t)])) : i = o, i
  1008. }
  1009. }
  1010. function f(e, t, n) {
  1011. if (He(e)) {
  1012. var r, i, o = e.nodeType, a = o ? pe.cache : e, s = o ? e[pe.expando] : pe.expando;
  1013. if (a[s]) {
  1014. if (t && (r = n ? a[s] : a[s].data)) {
  1015. pe.isArray(t) ? t = t.concat(pe.map(t, pe.camelCase)) : t in r ? t = [t] : (t = pe.camelCase(t), t = t in r ? [t] : t.split(" ")), i = t.length;
  1016. for (; i--;) delete r[t[i]];
  1017. if (n ? !l(r) : !pe.isEmptyObject(r)) return
  1018. }
  1019. (n || (delete a[s].data, l(a[s]))) && (o ? pe.cleanData([e], !0) : fe.deleteExpando || a != a.window ? delete a[s] : a[s] = void 0)
  1020. }
  1021. }
  1022. }
  1023. function d(e, t, n, r) {
  1024. var i, o = 1, a = 20, s = r ? function () {
  1025. return r.cur()
  1026. } : function () {
  1027. return pe.css(e, t, "")
  1028. }, u = s(), l = n && n[3] || (pe.cssNumber[t] ? "" : "px"),
  1029. c = (pe.cssNumber[t] || "px" !== l && +u) && Me.exec(pe.css(e, t));
  1030. if (c && c[3] !== l) {
  1031. l = l || c[3], n = n || [], c = +u || 1;
  1032. do o = o || ".5", c /= o, pe.style(e, t, c + l); while (o !== (o = s() / u) && 1 !== o && --a)
  1033. }
  1034. return n && (c = +c || +u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : +n[2], r && (r.unit = l, r.start = c, r.end = i)), i
  1035. }
  1036. function p(e) {
  1037. var t = ze.split("|"), n = e.createDocumentFragment();
  1038. if (n.createElement) for (; t.length;) n.createElement(t.pop());
  1039. return n
  1040. }
  1041. function h(e, t) {
  1042. var n, r, i = 0,
  1043. o = "undefined" != typeof e.getElementsByTagName ? e.getElementsByTagName(t || "*") : "undefined" != typeof e.querySelectorAll ? e.querySelectorAll(t || "*") : void 0;
  1044. if (!o) for (o = [], n = e.childNodes || e; null != (r = n[i]); i++) !t || pe.nodeName(r, t) ? o.push(r) : pe.merge(o, h(r, t));
  1045. return void 0 === t || t && pe.nodeName(e, t) ? pe.merge([e], o) : o
  1046. }
  1047. function g(e, t) {
  1048. for (var n, r = 0; null != (n = e[r]); r++) pe._data(n, "globalEval", !t || pe._data(t[r], "globalEval"))
  1049. }
  1050. function m(e) {
  1051. Be.test(e.type) && (e.defaultChecked = e.checked)
  1052. }
  1053. function y(e, t, n, r, i) {
  1054. for (var o, a, s, u, l, c, f, d = e.length, y = p(t), v = [], x = 0; x < d; x++) if (a = e[x], a || 0 === a) if ("object" === pe.type(a)) pe.merge(v, a.nodeType ? [a] : a); else if (Ue.test(a)) {
  1055. for (u = u || y.appendChild(t.createElement("div")), l = (We.exec(a) || ["", ""])[1].toLowerCase(), f = Xe[l] || Xe._default, u.innerHTML = f[1] + pe.htmlPrefilter(a) + f[2], o = f[0]; o--;) u = u.lastChild;
  1056. if (!fe.leadingWhitespace && $e.test(a) && v.push(t.createTextNode($e.exec(a)[0])), !fe.tbody) for (a = "table" !== l || Ve.test(a) ? "<table>" !== f[1] || Ve.test(a) ? 0 : u : u.firstChild, o = a && a.childNodes.length; o--;) pe.nodeName(c = a.childNodes[o], "tbody") && !c.childNodes.length && a.removeChild(c);
  1057. for (pe.merge(v, u.childNodes), u.textContent = ""; u.firstChild;) u.removeChild(u.firstChild);
  1058. u = y.lastChild
  1059. } else v.push(t.createTextNode(a));
  1060. for (u && y.removeChild(u), fe.appendChecked || pe.grep(h(v, "input"), m), x = 0; a = v[x++];) if (r && pe.inArray(a, r) > -1) i && i.push(a); else if (s = pe.contains(a.ownerDocument, a), u = h(y.appendChild(a), "script"), s && g(u), n) for (o = 0; a = u[o++];) Ie.test(a.type || "") && n.push(a);
  1061. return u = null, y
  1062. }
  1063. function v() {
  1064. return !0
  1065. }
  1066. function x() {
  1067. return !1
  1068. }
  1069. function b() {
  1070. try {
  1071. return re.activeElement
  1072. } catch (e) {
  1073. }
  1074. }
  1075. function w(e, t, n, r, i, o) {
  1076. var a, s;
  1077. if ("object" == typeof t) {
  1078. "string" != typeof n && (r = r || n, n = void 0);
  1079. for (s in t) w(e, s, n, r, t[s], o);
  1080. return e
  1081. }
  1082. if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ("string" == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), i === !1) i = x; else if (!i) return e;
  1083. return 1 === o && (a = i, i = function (e) {
  1084. return pe().off(e), a.apply(this, arguments)
  1085. }, i.guid = a.guid || (a.guid = pe.guid++)), e.each(function () {
  1086. pe.event.add(this, t, i, r, n)
  1087. })
  1088. }
  1089. function T(e, t) {
  1090. return pe.nodeName(e, "table") && pe.nodeName(11 !== t.nodeType ? t : t.firstChild, "tr") ? e.getElementsByTagName("tbody")[0] || e.appendChild(e.ownerDocument.createElement("tbody")) : e
  1091. }
  1092. function C(e) {
  1093. return e.type = (null !== pe.find.attr(e, "type")) + "/" + e.type, e
  1094. }
  1095. function E(e) {
  1096. var t = it.exec(e.type);
  1097. return t ? e.type = t[1] : e.removeAttribute("type"), e
  1098. }
  1099. function N(e, t) {
  1100. if (1 === t.nodeType && pe.hasData(e)) {
  1101. var n, r, i, o = pe._data(e), a = pe._data(t, o), s = o.events;
  1102. if (s) {
  1103. delete a.handle, a.events = {};
  1104. for (n in s) for (r = 0, i = s[n].length; r < i; r++) pe.event.add(t, n, s[n][r])
  1105. }
  1106. a.data && (a.data = pe.extend({}, a.data))
  1107. }
  1108. }
  1109. function k(e, t) {
  1110. var n, r, i;
  1111. if (1 === t.nodeType) {
  1112. if (n = t.nodeName.toLowerCase(), !fe.noCloneEvent && t[pe.expando]) {
  1113. i = pe._data(t);
  1114. for (r in i.events) pe.removeEvent(t, r, i.handle);
  1115. t.removeAttribute(pe.expando)
  1116. }
  1117. "script" === n && t.text !== e.text ? (C(t).text = e.text, E(t)) : "object" === n ? (t.parentNode && (t.outerHTML = e.outerHTML), fe.html5Clone && e.innerHTML && !pe.trim(t.innerHTML) && (t.innerHTML = e.innerHTML)) : "input" === n && Be.test(e.type) ? (t.defaultChecked = t.checked = e.checked, t.value !== e.value && (t.value = e.value)) : "option" === n ? t.defaultSelected = t.selected = e.defaultSelected : "input" !== n && "textarea" !== n || (t.defaultValue = e.defaultValue)
  1118. }
  1119. }
  1120. function S(e, t, n, r) {
  1121. t = oe.apply([], t);
  1122. var i, o, a, s, u, l, c = 0, f = e.length, d = f - 1, p = t[0], g = pe.isFunction(p);
  1123. if (g || f > 1 && "string" == typeof p && !fe.checkClone && rt.test(p)) return e.each(function (i) {
  1124. var o = e.eq(i);
  1125. g && (t[0] = p.call(this, i, o.html())), S(o, t, n, r)
  1126. });
  1127. if (f && (l = y(t, e[0].ownerDocument, !1, e, r), i = l.firstChild, 1 === l.childNodes.length && (l = i), i || r)) {
  1128. for (s = pe.map(h(l, "script"), C), a = s.length; c < f; c++) o = l, c !== d && (o = pe.clone(o, !0, !0), a && pe.merge(s, h(o, "script"))), n.call(e[c], o, c);
  1129. if (a) for (u = s[s.length - 1].ownerDocument, pe.map(s, E), c = 0; c < a; c++) o = s[c], Ie.test(o.type || "") && !pe._data(o, "globalEval") && pe.contains(u, o) && (o.src ? pe._evalUrl && pe._evalUrl(o.src) : pe.globalEval((o.text || o.textContent || o.innerHTML || "").replace(ot, "")));
  1130. l = i = null
  1131. }
  1132. return e
  1133. }
  1134. function A(e, t, n) {
  1135. for (var r, i = t ? pe.filter(t, e) : e, o = 0; null != (r = i[o]); o++) n || 1 !== r.nodeType || pe.cleanData(h(r)), r.parentNode && (n && pe.contains(r.ownerDocument, r) && g(h(r, "script")), r.parentNode.removeChild(r));
  1136. return e
  1137. }
  1138. function D(e, t) {
  1139. var n = pe(t.createElement(e)).appendTo(t.body), r = pe.css(n[0], "display");
  1140. return n.detach(), r
  1141. }
  1142. function j(e) {
  1143. var t = re, n = lt[e];
  1144. return n || (n = D(e, t), "none" !== n && n || (ut = (ut || pe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement), t = (ut[0].contentWindow || ut[0].contentDocument).document, t.write(), t.close(), n = D(e, t), ut.detach()), lt[e] = n), n
  1145. }
  1146. function L(e, t) {
  1147. return {
  1148. get: function () {
  1149. return e() ? void delete this.get : (this.get = t).apply(this, arguments)
  1150. }
  1151. }
  1152. }
  1153. function H(e) {
  1154. if (e in Et) return e;
  1155. for (var t = e.charAt(0).toUpperCase() + e.slice(1), n = Ct.length; n--;) if (e = Ct[n] + t, e in Et) return e
  1156. }
  1157. function q(e, t) {
  1158. for (var n, r, i, o = [], a = 0, s = e.length; a < s; a++) r = e[a], r.style && (o[a] = pe._data(r, "olddisplay"), n = r.style.display, t ? (o[a] || "none" !== n || (r.style.display = ""), "" === r.style.display && Re(r) && (o[a] = pe._data(r, "olddisplay", j(r.nodeName)))) : (i = Re(r), (n && "none" !== n || !i) && pe._data(r, "olddisplay", i ? n : pe.css(r, "display"))));
  1159. for (a = 0; a < s; a++) r = e[a], r.style && (t && "none" !== r.style.display && "" !== r.style.display || (r.style.display = t ? o[a] || "" : "none"));
  1160. return e
  1161. }
  1162. function _(e, t, n) {
  1163. var r = bt.exec(t);
  1164. return r ? Math.max(0, r[1] - (n || 0)) + (r[2] || "px") : t
  1165. }
  1166. function F(e, t, n, r, i) {
  1167. for (var o = n === (r ? "border" : "content") ? 4 : "width" === t ? 1 : 0, a = 0; o < 4; o += 2) "margin" === n && (a += pe.css(e, n + Oe[o], !0, i)), r ? ("content" === n && (a -= pe.css(e, "padding" + Oe[o], !0, i)), "margin" !== n && (a -= pe.css(e, "border" + Oe[o] + "Width", !0, i))) : (a += pe.css(e, "padding" + Oe[o], !0, i), "padding" !== n && (a += pe.css(e, "border" + Oe[o] + "Width", !0, i)));
  1168. return a
  1169. }
  1170. function M(t, n, r) {
  1171. var i = !0, o = "width" === n ? t.offsetWidth : t.offsetHeight, a = ht(t),
  1172. s = fe.boxSizing && "border-box" === pe.css(t, "boxSizing", !1, a);
  1173. if (re.msFullscreenElement && e.top !== e && t.getClientRects().length && (o = Math.round(100 * t.getBoundingClientRect()[n])), o <= 0 || null == o) {
  1174. if (o = gt(t, n, a), (o < 0 || null == o) && (o = t.style[n]), ft.test(o)) return o;
  1175. i = s && (fe.boxSizingReliable() || o === t.style[n]), o = parseFloat(o) || 0
  1176. }
  1177. return o + F(t, n, r || (s ? "border" : "content"), i, a) + "px"
  1178. }
  1179. function O(e, t, n, r, i) {
  1180. return new O.prototype.init(e, t, n, r, i)
  1181. }
  1182. function R() {
  1183. return e.setTimeout(function () {
  1184. Nt = void 0
  1185. }), Nt = pe.now()
  1186. }
  1187. function P(e, t) {
  1188. var n, r = {height: e}, i = 0;
  1189. for (t = t ? 1 : 0; i < 4; i += 2 - t) n = Oe[i], r["margin" + n] = r["padding" + n] = e;
  1190. return t && (r.opacity = r.width = e), r
  1191. }
  1192. function B(e, t, n) {
  1193. for (var r, i = ($.tweeners[t] || []).concat($.tweeners["*"]), o = 0, a = i.length; o < a; o++) if (r = i[o].call(n, t, e)) return r
  1194. }
  1195. function W(e, t, n) {
  1196. var r, i, o, a, s, u, l, c, f = this, d = {}, p = e.style, h = e.nodeType && Re(e), g = pe._data(e, "fxshow");
  1197. n.queue || (s = pe._queueHooks(e, "fx"), null == s.unqueued && (s.unqueued = 0, u = s.empty.fire, s.empty.fire = function () {
  1198. s.unqueued || u()
  1199. }), s.unqueued++, f.always(function () {
  1200. f.always(function () {
  1201. s.unqueued--, pe.queue(e, "fx").length || s.empty.fire()
  1202. })
  1203. })), 1 === e.nodeType && ("height" in t || "width" in t) && (n.overflow = [p.overflow, p.overflowX, p.overflowY], l = pe.css(e, "display"), c = "none" === l ? pe._data(e, "olddisplay") || j(e.nodeName) : l, "inline" === c && "none" === pe.css(e, "float") && (fe.inlineBlockNeedsLayout && "inline" !== j(e.nodeName) ? p.zoom = 1 : p.display = "inline-block")), n.overflow && (p.overflow = "hidden", fe.shrinkWrapBlocks() || f.always(function () {
  1204. p.overflow = n.overflow[0], p.overflowX = n.overflow[1], p.overflowY = n.overflow[2]
  1205. }));
  1206. for (r in t) if (i = t[r], St.exec(i)) {
  1207. if (delete t[r], o = o || "toggle" === i, i === (h ? "hide" : "show")) {
  1208. if ("show" !== i || !g || void 0 === g[r]) continue;
  1209. h = !0
  1210. }
  1211. d[r] = g && g[r] || pe.style(e, r)
  1212. } else l = void 0;
  1213. if (pe.isEmptyObject(d)) "inline" === ("none" === l ? j(e.nodeName) : l) && (p.display = l); else {
  1214. g ? "hidden" in g && (h = g.hidden) : g = pe._data(e, "fxshow", {}), o && (g.hidden = !h), h ? pe(e).show() : f.done(function () {
  1215. pe(e).hide()
  1216. }), f.done(function () {
  1217. var t;
  1218. pe._removeData(e, "fxshow");
  1219. for (t in d) pe.style(e, t, d[t])
  1220. });
  1221. for (r in d) a = B(h ? g[r] : 0, r, f), r in g || (g[r] = a.start, h && (a.end = a.start, a.start = "width" === r || "height" === r ? 1 : 0))
  1222. }
  1223. }
  1224. function I(e, t) {
  1225. var n, r, i, o, a;
  1226. for (n in e) if (r = pe.camelCase(n), i = t[r], o = e[n], pe.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), a = pe.cssHooks[r], a && "expand" in a) {
  1227. o = a.expand(o), delete e[r];
  1228. for (n in o) n in e || (e[n] = o[n], t[n] = i)
  1229. } else t[r] = i
  1230. }
  1231. function $(e, t, n) {
  1232. var r, i, o = 0, a = $.prefilters.length, s = pe.Deferred().always(function () {
  1233. delete u.elem
  1234. }), u = function () {
  1235. if (i) return !1;
  1236. for (var t = Nt || R(), n = Math.max(0, l.startTime + l.duration - t), r = n / l.duration || 0, o = 1 - r, a = 0, u = l.tweens.length; a < u; a++) l.tweens[a].run(o);
  1237. return s.notifyWith(e, [l, o, n]), o < 1 && u ? n : (s.resolveWith(e, [l]), !1)
  1238. }, l = s.promise({
  1239. elem: e,
  1240. props: pe.extend({}, t),
  1241. opts: pe.extend(!0, {specialEasing: {}, easing: pe.easing._default}, n),
  1242. originalProperties: t,
  1243. originalOptions: n,
  1244. startTime: Nt || R(),
  1245. duration: n.duration,
  1246. tweens: [],
  1247. createTween: function (t, n) {
  1248. var r = pe.Tween(e, l.opts, t, n, l.opts.specialEasing[t] || l.opts.easing);
  1249. return l.tweens.push(r), r
  1250. },
  1251. stop: function (t) {
  1252. var n = 0, r = t ? l.tweens.length : 0;
  1253. if (i) return this;
  1254. for (i = !0; n < r; n++) l.tweens[n].run(1);
  1255. return t ? (s.notifyWith(e, [l, 1, 0]), s.resolveWith(e, [l, t])) : s.rejectWith(e, [l, t]), this
  1256. }
  1257. }), c = l.props;
  1258. for (I(c, l.opts.specialEasing); o < a; o++) if (r = $.prefilters[o].call(l, e, c, l.opts)) return pe.isFunction(r.stop) && (pe._queueHooks(l.elem, l.opts.queue).stop = pe.proxy(r.stop, r)), r;
  1259. return pe.map(c, B, l), pe.isFunction(l.opts.start) && l.opts.start.call(e, l), pe.fx.timer(pe.extend(u, {
  1260. elem: e,
  1261. anim: l,
  1262. queue: l.opts.queue
  1263. })), l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always)
  1264. }
  1265. function z(e) {
  1266. return pe.attr(e, "class") || ""
  1267. }
  1268. function X(e) {
  1269. return function (t, n) {
  1270. "string" != typeof t && (n = t, t = "*");
  1271. var r, i = 0, o = t.toLowerCase().match(De) || [];
  1272. if (pe.isFunction(n)) for (; r = o[i++];) "+" === r.charAt(0) ? (r = r.slice(1) || "*", (e[r] = e[r] || []).unshift(n)) : (e[r] = e[r] || []).push(n)
  1273. }
  1274. }
  1275. function U(e, t, n, r) {
  1276. function i(s) {
  1277. var u;
  1278. return o[s] = !0, pe.each(e[s] || [], function (e, s) {
  1279. var l = s(t, n, r);
  1280. return "string" != typeof l || a || o[l] ? a ? !(u = l) : void 0 : (t.dataTypes.unshift(l), i(l), !1)
  1281. }), u
  1282. }
  1283. var o = {}, a = e === Qt;
  1284. return i(t.dataTypes[0]) || !o["*"] && i("*")
  1285. }
  1286. function V(e, t) {
  1287. var n, r, i = pe.ajaxSettings.flatOptions || {};
  1288. for (r in t) void 0 !== t[r] && ((i[r] ? e : n || (n = {}))[r] = t[r]);
  1289. return n && pe.extend(!0, e, n), e
  1290. }
  1291. function Y(e, t, n) {
  1292. for (var r, i, o, a, s = e.contents, u = e.dataTypes; "*" === u[0];) u.shift(), void 0 === i && (i = e.mimeType || t.getResponseHeader("Content-Type"));
  1293. if (i) for (a in s) if (s[a] && s[a].test(i)) {
  1294. u.unshift(a);
  1295. break
  1296. }
  1297. if (u[0] in n) o = u[0]; else {
  1298. for (a in n) {
  1299. if (!u[0] || e.converters[a + " " + u[0]]) {
  1300. o = a;
  1301. break
  1302. }
  1303. r || (r = a)
  1304. }
  1305. o = o || r
  1306. }
  1307. if (o) return o !== u[0] && u.unshift(o), n[o]
  1308. }
  1309. function J(e, t, n, r) {
  1310. var i, o, a, s, u, l = {}, c = e.dataTypes.slice();
  1311. if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a];
  1312. for (o = c.shift(); o;) if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) if ("*" === o) o = u; else if ("*" !== u && u !== o) {
  1313. if (a = l[u + " " + o] || l["* " + o], !a) for (i in l) if (s = i.split(" "), s[1] === o && (a = l[u + " " + s[0]] || l["* " + s[0]])) {
  1314. a === !0 ? a = l[i] : l[i] !== !0 && (o = s[0], c.unshift(s[1]));
  1315. break
  1316. }
  1317. if (a !== !0) if (a && e["throws"]) t = a(t); else try {
  1318. t = a(t)
  1319. } catch (f) {
  1320. return {state: "parsererror", error: a ? f : "No conversion from " + u + " to " + o}
  1321. }
  1322. }
  1323. return {state: "success", data: t}
  1324. }
  1325. function G(e) {
  1326. return e.style && e.style.display || pe.css(e, "display")
  1327. }
  1328. function K(e) {
  1329. for (; e && 1 === e.nodeType;) {
  1330. if ("none" === G(e) || "hidden" === e.type) return !0;
  1331. e = e.parentNode
  1332. }
  1333. return !1
  1334. }
  1335. function Q(e, t, n, r) {
  1336. var i;
  1337. if (pe.isArray(t)) pe.each(t, function (t, i) {
  1338. n || rn.test(e) ? r(e, i) : Q(e + "[" + ("object" == typeof i && null != i ? t : "") + "]", i, n, r)
  1339. }); else if (n || "object" !== pe.type(t)) r(e, t); else for (i in t) Q(e + "[" + i + "]", t[i], n, r)
  1340. }
  1341. function Z() {
  1342. try {
  1343. return new e.XMLHttpRequest
  1344. } catch (t) {
  1345. }
  1346. }
  1347. function ee() {
  1348. try {
  1349. return new e.ActiveXObject("Microsoft.XMLHTTP")
  1350. } catch (t) {
  1351. }
  1352. }
  1353. function te(e) {
  1354. return pe.isWindow(e) ? e : 9 === e.nodeType && (e.defaultView || e.parentWindow)
  1355. }
  1356. var ne = [], re = e.document, ie = ne.slice, oe = ne.concat, ae = ne.push, se = ne.indexOf, ue = {},
  1357. le = ue.toString, ce = ue.hasOwnProperty, fe = {}, de = "1.12.3", pe = function (e, t) {
  1358. return new pe.fn.init(e, t)
  1359. }, he = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ge = /^-ms-/, me = /-([\da-z])/gi, ye = function (e, t) {
  1360. return t.toUpperCase()
  1361. };
  1362. pe.fn = pe.prototype = {
  1363. jquery: de, constructor: pe, selector: "", length: 0, toArray: function () {
  1364. return ie.call(this)
  1365. }, get: function (e) {
  1366. return null != e ? e < 0 ? this[e + this.length] : this[e] : ie.call(this)
  1367. }, pushStack: function (e) {
  1368. var t = pe.merge(this.constructor(), e);
  1369. return t.prevObject = this, t.context = this.context, t
  1370. }, each: function (e) {
  1371. return pe.each(this, e)
  1372. }, map: function (e) {
  1373. return this.pushStack(pe.map(this, function (t, n) {
  1374. return e.call(t, n, t)
  1375. }))
  1376. }, slice: function () {
  1377. return this.pushStack(ie.apply(this, arguments))
  1378. }, first: function () {
  1379. return this.eq(0)
  1380. }, last: function () {
  1381. return this.eq(-1)
  1382. }, eq: function (e) {
  1383. var t = this.length, n = +e + (e < 0 ? t : 0);
  1384. return this.pushStack(n >= 0 && n < t ? [this[n]] : [])
  1385. }, end: function () {
  1386. return this.prevObject || this.constructor()
  1387. }, push: ae, sort: ne.sort, splice: ne.splice
  1388. }, pe.extend = pe.fn.extend = function () {
  1389. var e, t, n, r, i, o, a = arguments[0] || {}, s = 1, u = arguments.length, l = !1;
  1390. for ("boolean" == typeof a && (l = a, a = arguments[s] || {}, s++), "object" == typeof a || pe.isFunction(a) || (a = {}), s === u && (a = this, s--); s < u; s++) if (null != (i = arguments[s])) for (r in i) e = a[r], n = i[r], a !== n && (l && n && (pe.isPlainObject(n) || (t = pe.isArray(n))) ? (t ? (t = !1, o = e && pe.isArray(e) ? e : []) : o = e && pe.isPlainObject(e) ? e : {}, a[r] = pe.extend(l, o, n)) : void 0 !== n && (a[r] = n));
  1391. return a
  1392. }, pe.extend({
  1393. expando: "jQuery" + (de + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (e) {
  1394. throw new Error(e)
  1395. }, noop: function () {
  1396. }, isFunction: function (e) {
  1397. return "function" === pe.type(e)
  1398. }, isArray: Array.isArray || function (e) {
  1399. return "array" === pe.type(e)
  1400. }, isWindow: function (e) {
  1401. return null != e && e == e.window
  1402. }, isNumeric: function (e) {
  1403. var t = e && e.toString();
  1404. return !pe.isArray(e) && t - parseFloat(t) + 1 >= 0
  1405. }, isEmptyObject: function (e) {
  1406. var t;
  1407. for (t in e) return !1;
  1408. return !0
  1409. }, isPlainObject: function (e) {
  1410. var t;
  1411. if (!e || "object" !== pe.type(e) || e.nodeType || pe.isWindow(e)) return !1;
  1412. try {
  1413. if (e.constructor && !ce.call(e, "constructor") && !ce.call(e.constructor.prototype, "isPrototypeOf")) return !1
  1414. } catch (n) {
  1415. return !1
  1416. }
  1417. if (!fe.ownFirst) for (t in e) return ce.call(e, t);
  1418. for (t in e) ;
  1419. return void 0 === t || ce.call(e, t)
  1420. }, type: function (e) {
  1421. return null == e ? e + "" : "object" == typeof e || "function" == typeof e ? ue[le.call(e)] || "object" : typeof e
  1422. }, globalEval: function (t) {
  1423. t && pe.trim(t) && (e.execScript || function (t) {
  1424. e.eval.call(e, t)
  1425. })(t)
  1426. }, camelCase: function (e) {
  1427. return e.replace(ge, "ms-").replace(me, ye)
  1428. }, nodeName: function (e, t) {
  1429. return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase()
  1430. }, each: function (e, t) {
  1431. var r, i = 0;
  1432. if (n(e)) for (r = e.length; i < r && t.call(e[i], i, e[i]) !== !1; i++) ; else for (i in e) if (t.call(e[i], i, e[i]) === !1) break;
  1433. return e
  1434. }, trim: function (e) {
  1435. return null == e ? "" : (e + "").replace(he, "")
  1436. }, makeArray: function (e, t) {
  1437. var r = t || [];
  1438. return null != e && (n(Object(e)) ? pe.merge(r, "string" == typeof e ? [e] : e) : ae.call(r, e)), r
  1439. }, inArray: function (e, t, n) {
  1440. var r;
  1441. if (t) {
  1442. if (se) return se.call(t, e, n);
  1443. for (r = t.length, n = n ? n < 0 ? Math.max(0, r + n) : n : 0; n < r; n++) if (n in t && t[n] === e) return n
  1444. }
  1445. return -1
  1446. }, merge: function (e, t) {
  1447. for (var n = +t.length, r = 0, i = e.length; r < n;) e[i++] = t[r++];
  1448. if (n !== n) for (; void 0 !== t[r];) e[i++] = t[r++];
  1449. return e.length = i, e
  1450. }, grep: function (e, t, n) {
  1451. for (var r, i = [], o = 0, a = e.length, s = !n; o < a; o++) r = !t(e[o], o), r !== s && i.push(e[o]);
  1452. return i
  1453. }, map: function (e, t, r) {
  1454. var i, o, a = 0, s = [];
  1455. if (n(e)) for (i = e.length; a < i; a++) o = t(e[a], a, r), null != o && s.push(o); else for (a in e) o = t(e[a], a, r), null != o && s.push(o);
  1456. return oe.apply([], s)
  1457. }, guid: 1, proxy: function (e, t) {
  1458. var n, r, i;
  1459. if ("string" == typeof t && (i = e[t], t = e, e = i), pe.isFunction(e)) return n = ie.call(arguments, 2), r = function () {
  1460. return e.apply(t || this, n.concat(ie.call(arguments)))
  1461. }, r.guid = e.guid = e.guid || pe.guid++, r
  1462. }, now: function () {
  1463. return +new Date
  1464. }, support: fe
  1465. }), "function" == typeof Symbol && (pe.fn[Symbol.iterator] = ne[Symbol.iterator]), pe.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (e, t) {
  1466. ue["[object " + t + "]"] = t.toLowerCase()
  1467. });
  1468. var ve = function (e) {
  1469. function t(e, t, n, r) {
  1470. var i, o, a, s, u, l, f, p, h = t && t.ownerDocument, g = t ? t.nodeType : 9;
  1471. if (n = n || [], "string" != typeof e || !e || 1 !== g && 9 !== g && 11 !== g) return n;
  1472. if (!r && ((t ? t.ownerDocument || t : B) !== H && L(t), t = t || H, _)) {
  1473. if (11 !== g && (l = ye.exec(e))) if (i = l[1]) {
  1474. if (9 === g) {
  1475. if (!(a = t.getElementById(i))) return n;
  1476. if (a.id === i) return n.push(a), n
  1477. } else if (h && (a = h.getElementById(i)) && R(t, a) && a.id === i) return n.push(a), n
  1478. } else {
  1479. if (l[2]) return Q.apply(n, t.getElementsByTagName(e)), n;
  1480. if ((i = l[3]) && w.getElementsByClassName && t.getElementsByClassName) return Q.apply(n, t.getElementsByClassName(i)), n
  1481. }
  1482. if (w.qsa && !X[e + " "] && (!F || !F.test(e))) {
  1483. if (1 !== g) h = t, p = e; else if ("object" !== t.nodeName.toLowerCase()) {
  1484. for ((s = t.getAttribute("id")) ? s = s.replace(xe, "\\$&") : t.setAttribute("id", s = P), f = N(e), o = f.length, u = de.test(s) ? "#" + s : "[id='" + s + "']"; o--;) f[o] = u + " " + d(f[o]);
  1485. p = f.join(","), h = ve.test(e) && c(t.parentNode) || t
  1486. }
  1487. if (p) try {
  1488. return Q.apply(n, h.querySelectorAll(p)), n
  1489. } catch (m) {
  1490. } finally {
  1491. s === P && t.removeAttribute("id")
  1492. }
  1493. }
  1494. }
  1495. return S(e.replace(se, "$1"), t, n, r)
  1496. }
  1497. function n() {
  1498. function e(n, r) {
  1499. return t.push(n + " ") > T.cacheLength && delete e[t.shift()], e[n + " "] = r
  1500. }
  1501. var t = [];
  1502. return e
  1503. }
  1504. function r(e) {
  1505. return e[P] = !0, e
  1506. }
  1507. function i(e) {
  1508. var t = H.createElement("div");
  1509. try {
  1510. return !!e(t)
  1511. } catch (n) {
  1512. return !1
  1513. } finally {
  1514. t.parentNode && t.parentNode.removeChild(t), t = null
  1515. }
  1516. }
  1517. function o(e, t) {
  1518. for (var n = e.split("|"), r = n.length; r--;) T.attrHandle[n[r]] = t
  1519. }
  1520. function a(e, t) {
  1521. var n = t && e,
  1522. r = n && 1 === e.nodeType && 1 === t.nodeType && (~t.sourceIndex || V) - (~e.sourceIndex || V);
  1523. if (r) return r;
  1524. if (n) for (; n = n.nextSibling;) if (n === t) return -1;
  1525. return e ? 1 : -1
  1526. }
  1527. function s(e) {
  1528. return function (t) {
  1529. var n = t.nodeName.toLowerCase();
  1530. return "input" === n && t.type === e
  1531. }
  1532. }
  1533. function u(e) {
  1534. return function (t) {
  1535. var n = t.nodeName.toLowerCase();
  1536. return ("input" === n || "button" === n) && t.type === e
  1537. }
  1538. }
  1539. function l(e) {
  1540. return r(function (t) {
  1541. return t = +t, r(function (n, r) {
  1542. for (var i, o = e([], n.length, t), a = o.length; a--;) n[i = o[a]] && (n[i] = !(r[i] = n[i]))
  1543. })
  1544. })
  1545. }
  1546. function c(e) {
  1547. return e && "undefined" != typeof e.getElementsByTagName && e
  1548. }
  1549. function f() {
  1550. }
  1551. function d(e) {
  1552. for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value;
  1553. return r
  1554. }
  1555. function p(e, t, n) {
  1556. var r = t.dir, i = n && "parentNode" === r, o = I++;
  1557. return t.first ? function (t, n, o) {
  1558. for (; t = t[r];) if (1 === t.nodeType || i) return e(t, n, o)
  1559. } : function (t, n, a) {
  1560. var s, u, l, c = [W, o];
  1561. if (a) {
  1562. for (; t = t[r];) if ((1 === t.nodeType || i) && e(t, n, a)) return !0
  1563. } else for (; t = t[r];) if (1 === t.nodeType || i) {
  1564. if (l = t[P] || (t[P] = {}), u = l[t.uniqueID] || (l[t.uniqueID] = {}), (s = u[r]) && s[0] === W && s[1] === o) return c[2] = s[2];
  1565. if (u[r] = c, c[2] = e(t, n, a)) return !0
  1566. }
  1567. }
  1568. }
  1569. function h(e) {
  1570. return e.length > 1 ? function (t, n, r) {
  1571. for (var i = e.length; i--;) if (!e[i](t, n, r)) return !1;
  1572. return !0
  1573. } : e[0]
  1574. }
  1575. function g(e, n, r) {
  1576. for (var i = 0, o = n.length; i < o; i++) t(e, n[i], r);
  1577. return r
  1578. }
  1579. function m(e, t, n, r, i) {
  1580. for (var o, a = [], s = 0, u = e.length, l = null != t; s < u; s++) (o = e[s]) && (n && !n(o, r, i) || (a.push(o), l && t.push(s)));
  1581. return a
  1582. }
  1583. function y(e, t, n, i, o, a) {
  1584. return i && !i[P] && (i = y(i)), o && !o[P] && (o = y(o, a)), r(function (r, a, s, u) {
  1585. var l, c, f, d = [], p = [], h = a.length, y = r || g(t || "*", s.nodeType ? [s] : s, []),
  1586. v = !e || !r && t ? y : m(y, d, e, s, u), x = n ? o || (r ? e : h || i) ? [] : a : v;
  1587. if (n && n(v, x, s, u), i) for (l = m(x, p), i(l, [], s, u), c = l.length; c--;) (f = l[c]) && (x[p[c]] = !(v[p[c]] = f));
  1588. if (r) {
  1589. if (o || e) {
  1590. if (o) {
  1591. for (l = [], c = x.length; c--;) (f = x[c]) && l.push(v[c] = f);
  1592. o(null, x = [], l, u)
  1593. }
  1594. for (c = x.length; c--;) (f = x[c]) && (l = o ? ee(r, f) : d[c]) > -1 && (r[l] = !(a[l] = f))
  1595. }
  1596. } else x = m(x === a ? x.splice(h, x.length) : x), o ? o(null, a, x, u) : Q.apply(a, x)
  1597. })
  1598. }
  1599. function v(e) {
  1600. for (var t, n, r, i = e.length, o = T.relative[e[0].type], a = o || T.relative[" "], s = o ? 1 : 0, u = p(function (e) {
  1601. return e === t
  1602. }, a, !0), l = p(function (e) {
  1603. return ee(t, e) > -1
  1604. }, a, !0), c = [function (e, n, r) {
  1605. var i = !o && (r || n !== A) || ((t = n).nodeType ? u(e, n, r) : l(e, n, r));
  1606. return t = null, i
  1607. }]; s < i; s++) if (n = T.relative[e[s].type]) c = [p(h(c), n)]; else {
  1608. if (n = T.filter[e[s].type].apply(null, e[s].matches), n[P]) {
  1609. for (r = ++s; r < i && !T.relative[e[r].type]; r++) ;
  1610. return y(s > 1 && h(c), s > 1 && d(e.slice(0, s - 1).concat({value: " " === e[s - 2].type ? "*" : ""})).replace(se, "$1"), n, s < r && v(e.slice(s, r)), r < i && v(e = e.slice(r)), r < i && d(e))
  1611. }
  1612. c.push(n)
  1613. }
  1614. return h(c)
  1615. }
  1616. function x(e, n) {
  1617. var i = n.length > 0, o = e.length > 0, a = function (r, a, s, u, l) {
  1618. var c, f, d, p = 0, h = "0", g = r && [], y = [], v = A, x = r || o && T.find.TAG("*", l),
  1619. b = W += null == v ? 1 : Math.random() || .1, w = x.length;
  1620. for (l && (A = a === H || a || l); h !== w && null != (c = x[h]); h++) {
  1621. if (o && c) {
  1622. for (f = 0, a || c.ownerDocument === H || (L(c), s = !_); d = e[f++];) if (d(c, a || H, s)) {
  1623. u.push(c);
  1624. break
  1625. }
  1626. l && (W = b)
  1627. }
  1628. i && ((c = !d && c) && p--, r && g.push(c))
  1629. }
  1630. if (p += h, i && h !== p) {
  1631. for (f = 0; d = n[f++];) d(g, y, a, s);
  1632. if (r) {
  1633. if (p > 0) for (; h--;) g[h] || y[h] || (y[h] = G.call(u));
  1634. y = m(y)
  1635. }
  1636. Q.apply(u, y), l && !r && y.length > 0 && p + n.length > 1 && t.uniqueSort(u)
  1637. }
  1638. return l && (W = b, A = v), g
  1639. };
  1640. return i ? r(a) : a
  1641. }
  1642. var b, w, T, C, E, N, k, S, A, D, j, L, H, q, _, F, M, O, R, P = "sizzle" + 1 * new Date, B = e.document, W = 0,
  1643. I = 0, $ = n(), z = n(), X = n(), U = function (e, t) {
  1644. return e === t && (j = !0), 0
  1645. }, V = 1 << 31, Y = {}.hasOwnProperty, J = [], G = J.pop, K = J.push, Q = J.push, Z = J.slice,
  1646. ee = function (e, t) {
  1647. for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
  1648. return -1
  1649. },
  1650. te = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  1651. ne = "[\\x20\\t\\r\\n\\f]", re = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
  1652. ie = "\\[" + ne + "*(" + re + ")(?:" + ne + "*([*^$|!~]?=)" + ne + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + re + "))|)" + ne + "*\\]",
  1653. oe = ":(" + re + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + ie + ")*)|.*)\\)|)",
  1654. ae = new RegExp(ne + "+", "g"), se = new RegExp("^" + ne + "+|((?:^|[^\\\\])(?:\\\\.)*)" + ne + "+$", "g"),
  1655. ue = new RegExp("^" + ne + "*," + ne + "*"), le = new RegExp("^" + ne + "*([>+~]|" + ne + ")" + ne + "*"),
  1656. ce = new RegExp("=" + ne + "*([^\\]'\"]*?)" + ne + "*\\]", "g"), fe = new RegExp(oe),
  1657. de = new RegExp("^" + re + "$"), pe = {
  1658. ID: new RegExp("^#(" + re + ")"),
  1659. CLASS: new RegExp("^\\.(" + re + ")"),
  1660. TAG: new RegExp("^(" + re + "|[*])"),
  1661. ATTR: new RegExp("^" + ie),
  1662. PSEUDO: new RegExp("^" + oe),
  1663. CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + ne + "*(even|odd|(([+-]|)(\\d*)n|)" + ne + "*(?:([+-]|)" + ne + "*(\\d+)|))" + ne + "*\\)|)", "i"),
  1664. bool: new RegExp("^(?:" + te + ")$", "i"),
  1665. needsContext: new RegExp("^" + ne + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + ne + "*((?:-\\d)?\\d*)" + ne + "*\\)|)(?=[^-]|$)", "i")
  1666. }, he = /^(?:input|select|textarea|button)$/i, ge = /^h\d$/i, me = /^[^{]+\{\s*\[native \w/,
  1667. ye = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, ve = /[+~]/, xe = /'|\\/g,
  1668. be = new RegExp("\\\\([\\da-f]{1,6}" + ne + "?|(" + ne + ")|.)", "ig"), we = function (e, t, n) {
  1669. var r = "0x" + t - 65536;
  1670. return r !== r || n ? t : r < 0 ? String.fromCharCode(r + 65536) : String.fromCharCode(r >> 10 | 55296, 1023 & r | 56320)
  1671. }, Te = function () {
  1672. L()
  1673. };
  1674. try {
  1675. Q.apply(J = Z.call(B.childNodes), B.childNodes), J[B.childNodes.length].nodeType
  1676. } catch (Ce) {
  1677. Q = {
  1678. apply: J.length ? function (e, t) {
  1679. K.apply(e, Z.call(t))
  1680. } : function (e, t) {
  1681. for (var n = e.length, r = 0; e[n++] = t[r++];) ;
  1682. e.length = n - 1
  1683. }
  1684. }
  1685. }
  1686. w = t.support = {}, E = t.isXML = function (e) {
  1687. var t = e && (e.ownerDocument || e).documentElement;
  1688. return !!t && "HTML" !== t.nodeName
  1689. }, L = t.setDocument = function (e) {
  1690. var t, n, r = e ? e.ownerDocument || e : B;
  1691. return r !== H && 9 === r.nodeType && r.documentElement ? (H = r, q = H.documentElement, _ = !E(H), (n = H.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener("unload", Te, !1) : n.attachEvent && n.attachEvent("onunload", Te)), w.attributes = i(function (e) {
  1692. return e.className = "i", !e.getAttribute("className")
  1693. }), w.getElementsByTagName = i(function (e) {
  1694. return e.appendChild(H.createComment("")), !e.getElementsByTagName("*").length
  1695. }), w.getElementsByClassName = me.test(H.getElementsByClassName), w.getById = i(function (e) {
  1696. return q.appendChild(e).id = P, !H.getElementsByName || !H.getElementsByName(P).length
  1697. }), w.getById ? (T.find.ID = function (e, t) {
  1698. if ("undefined" != typeof t.getElementById && _) {
  1699. var n = t.getElementById(e);
  1700. return n ? [n] : []
  1701. }
  1702. }, T.filter.ID = function (e) {
  1703. var t = e.replace(be, we);
  1704. return function (e) {
  1705. return e.getAttribute("id") === t
  1706. }
  1707. }) : (delete T.find.ID, T.filter.ID = function (e) {
  1708. var t = e.replace(be, we);
  1709. return function (e) {
  1710. var n = "undefined" != typeof e.getAttributeNode && e.getAttributeNode("id");
  1711. return n && n.value === t
  1712. }
  1713. }), T.find.TAG = w.getElementsByTagName ? function (e, t) {
  1714. return "undefined" != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : w.qsa ? t.querySelectorAll(e) : void 0
  1715. } : function (e, t) {
  1716. var n, r = [], i = 0, o = t.getElementsByTagName(e);
  1717. if ("*" === e) {
  1718. for (; n = o[i++];) 1 === n.nodeType && r.push(n);
  1719. return r
  1720. }
  1721. return o
  1722. }, T.find.CLASS = w.getElementsByClassName && function (e, t) {
  1723. if ("undefined" != typeof t.getElementsByClassName && _) return t.getElementsByClassName(e)
  1724. }, M = [], F = [], (w.qsa = me.test(H.querySelectorAll)) && (i(function (e) {
  1725. q.appendChild(e).innerHTML = "<a id='" + P + "'></a><select id='" + P + "-\r\\' msallowcapture=''><option selected=''></option></select>", e.querySelectorAll("[msallowcapture^='']").length && F.push("[*^$]=" + ne + "*(?:''|\"\")"), e.querySelectorAll("[selected]").length || F.push("\\[" + ne + "*(?:value|" + te + ")"), e.querySelectorAll("[id~=" + P + "-]").length || F.push("~="), e.querySelectorAll(":checked").length || F.push(":checked"), e.querySelectorAll("a#" + P + "+*").length || F.push(".#.+[+~]")
  1726. }), i(function (e) {
  1727. var t = H.createElement("input");
  1728. t.setAttribute("type", "hidden"), e.appendChild(t).setAttribute("name", "D"), e.querySelectorAll("[name=d]").length && F.push("name" + ne + "*[*^$|!~]?="), e.querySelectorAll(":enabled").length || F.push(":enabled", ":disabled"), e.querySelectorAll("*,:x"), F.push(",.*:")
  1729. })), (w.matchesSelector = me.test(O = q.matches || q.webkitMatchesSelector || q.mozMatchesSelector || q.oMatchesSelector || q.msMatchesSelector)) && i(function (e) {
  1730. w.disconnectedMatch = O.call(e, "div"), O.call(e, "[s!='']:x"), M.push("!=", oe)
  1731. }), F = F.length && new RegExp(F.join("|")), M = M.length && new RegExp(M.join("|")), t = me.test(q.compareDocumentPosition), R = t || me.test(q.contains) ? function (e, t) {
  1732. var n = 9 === e.nodeType ? e.documentElement : e, r = t && t.parentNode;
  1733. return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r)))
  1734. } : function (e, t) {
  1735. if (t) for (; t = t.parentNode;) if (t === e) return !0;
  1736. return !1
  1737. }, U = t ? function (e, t) {
  1738. if (e === t) return j = !0, 0;
  1739. var n = !e.compareDocumentPosition - !t.compareDocumentPosition;
  1740. return n ? n : (n = (e.ownerDocument || e) === (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1, 1 & n || !w.sortDetached && t.compareDocumentPosition(e) === n ? e === H || e.ownerDocument === B && R(B, e) ? -1 : t === H || t.ownerDocument === B && R(B, t) ? 1 : D ? ee(D, e) - ee(D, t) : 0 : 4 & n ? -1 : 1)
  1741. } : function (e, t) {
  1742. if (e === t) return j = !0, 0;
  1743. var n, r = 0, i = e.parentNode, o = t.parentNode, s = [e], u = [t];
  1744. if (!i || !o) return e === H ? -1 : t === H ? 1 : i ? -1 : o ? 1 : D ? ee(D, e) - ee(D, t) : 0;
  1745. if (i === o) return a(e, t);
  1746. for (n = e; n = n.parentNode;) s.unshift(n);
  1747. for (n = t; n = n.parentNode;) u.unshift(n);
  1748. for (; s[r] === u[r];) r++;
  1749. return r ? a(s[r], u[r]) : s[r] === B ? -1 : u[r] === B ? 1 : 0
  1750. }, H) : H
  1751. }, t.matches = function (e, n) {
  1752. return t(e, null, null, n)
  1753. }, t.matchesSelector = function (e, n) {
  1754. if ((e.ownerDocument || e) !== H && L(e), n = n.replace(ce, "='$1']"), w.matchesSelector && _ && !X[n + " "] && (!M || !M.test(n)) && (!F || !F.test(n))) try {
  1755. var r = O.call(e, n);
  1756. if (r || w.disconnectedMatch || e.document && 11 !== e.document.nodeType) return r
  1757. } catch (i) {
  1758. }
  1759. return t(n, H, null, [e]).length > 0
  1760. }, t.contains = function (e, t) {
  1761. return (e.ownerDocument || e) !== H && L(e), R(e, t)
  1762. }, t.attr = function (e, t) {
  1763. (e.ownerDocument || e) !== H && L(e);
  1764. var n = T.attrHandle[t.toLowerCase()],
  1765. r = n && Y.call(T.attrHandle, t.toLowerCase()) ? n(e, t, !_) : void 0;
  1766. return void 0 !== r ? r : w.attributes || !_ ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
  1767. }, t.error = function (e) {
  1768. throw new Error("Syntax error, unrecognized expression: " + e)
  1769. }, t.uniqueSort = function (e) {
  1770. var t, n = [], r = 0, i = 0;
  1771. if (j = !w.detectDuplicates, D = !w.sortStable && e.slice(0), e.sort(U), j) {
  1772. for (; t = e[i++];) t === e[i] && (r = n.push(i));
  1773. for (; r--;) e.splice(n[r], 1)
  1774. }
  1775. return D = null, e
  1776. }, C = t.getText = function (e) {
  1777. var t, n = "", r = 0, i = e.nodeType;
  1778. if (i) {
  1779. if (1 === i || 9 === i || 11 === i) {
  1780. if ("string" == typeof e.textContent) return e.textContent;
  1781. for (e = e.firstChild; e; e = e.nextSibling) n += C(e)
  1782. } else if (3 === i || 4 === i) return e.nodeValue
  1783. } else for (; t = e[r++];) n += C(t);
  1784. return n
  1785. }, T = t.selectors = {
  1786. cacheLength: 50,
  1787. createPseudo: r,
  1788. match: pe,
  1789. attrHandle: {},
  1790. find: {},
  1791. relative: {
  1792. ">": {dir: "parentNode", first: !0},
  1793. " ": {dir: "parentNode"},
  1794. "+": {dir: "previousSibling", first: !0},
  1795. "~": {dir: "previousSibling"}
  1796. },
  1797. preFilter: {
  1798. ATTR: function (e) {
  1799. return e[1] = e[1].replace(be, we), e[3] = (e[3] || e[4] || e[5] || "").replace(be, we), "~=" === e[2] && (e[3] = " " + e[3] + " "), e.slice(0, 4)
  1800. }, CHILD: function (e) {
  1801. return e[1] = e[1].toLowerCase(), "nth" === e[1].slice(0, 3) ? (e[3] || t.error(e[0]), e[4] = +(e[4] ? e[5] + (e[6] || 1) : 2 * ("even" === e[3] || "odd" === e[3])), e[5] = +(e[7] + e[8] || "odd" === e[3])) : e[3] && t.error(e[0]), e
  1802. }, PSEUDO: function (e) {
  1803. var t, n = !e[6] && e[2];
  1804. return pe.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || "" : n && fe.test(n) && (t = N(n, !0)) && (t = n.indexOf(")", n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3))
  1805. }
  1806. },
  1807. filter: {
  1808. TAG: function (e) {
  1809. var t = e.replace(be, we).toLowerCase();
  1810. return "*" === e ? function () {
  1811. return !0
  1812. } : function (e) {
  1813. return e.nodeName && e.nodeName.toLowerCase() === t
  1814. }
  1815. }, CLASS: function (e) {
  1816. var t = $[e + " "];
  1817. return t || (t = new RegExp("(^|" + ne + ")" + e + "(" + ne + "|$)")) && $(e, function (e) {
  1818. return t.test("string" == typeof e.className && e.className || "undefined" != typeof e.getAttribute && e.getAttribute("class") || "")
  1819. })
  1820. }, ATTR: function (e, n, r) {
  1821. return function (i) {
  1822. var o = t.attr(i, e);
  1823. return null == o ? "!=" === n : !n || (o += "", "=" === n ? o === r : "!=" === n ? o !== r : "^=" === n ? r && 0 === o.indexOf(r) : "*=" === n ? r && o.indexOf(r) > -1 : "$=" === n ? r && o.slice(-r.length) === r : "~=" === n ? (" " + o.replace(ae, " ") + " ").indexOf(r) > -1 : "|=" === n && (o === r || o.slice(0, r.length + 1) === r + "-"))
  1824. }
  1825. }, CHILD: function (e, t, n, r, i) {
  1826. var o = "nth" !== e.slice(0, 3), a = "last" !== e.slice(-4), s = "of-type" === t;
  1827. return 1 === r && 0 === i ? function (e) {
  1828. return !!e.parentNode
  1829. } : function (t, n, u) {
  1830. var l, c, f, d, p, h, g = o !== a ? "nextSibling" : "previousSibling", m = t.parentNode,
  1831. y = s && t.nodeName.toLowerCase(), v = !u && !s, x = !1;
  1832. if (m) {
  1833. if (o) {
  1834. for (; g;) {
  1835. for (d = t; d = d[g];) if (s ? d.nodeName.toLowerCase() === y : 1 === d.nodeType) return !1;
  1836. h = g = "only" === e && !h && "nextSibling"
  1837. }
  1838. return !0
  1839. }
  1840. if (h = [a ? m.firstChild : m.lastChild], a && v) {
  1841. for (d = m, f = d[P] || (d[P] = {}), c = f[d.uniqueID] || (f[d.uniqueID] = {}),
  1842. l = c[e] || [], p = l[0] === W && l[1], x = p && l[2], d = p && m.childNodes[p]; d = ++p && d && d[g] || (x = p = 0) || h.pop();) if (1 === d.nodeType && ++x && d === t) {
  1843. c[e] = [W, p, x];
  1844. break
  1845. }
  1846. } else if (v && (d = t, f = d[P] || (d[P] = {}), c = f[d.uniqueID] || (f[d.uniqueID] = {}), l = c[e] || [], p = l[0] === W && l[1], x = p), x === !1) for (; (d = ++p && d && d[g] || (x = p = 0) || h.pop()) && ((s ? d.nodeName.toLowerCase() !== y : 1 !== d.nodeType) || !++x || (v && (f = d[P] || (d[P] = {}), c = f[d.uniqueID] || (f[d.uniqueID] = {}), c[e] = [W, x]), d !== t));) ;
  1847. return x -= i, x === r || x % r === 0 && x / r >= 0
  1848. }
  1849. }
  1850. }, PSEUDO: function (e, n) {
  1851. var i, o = T.pseudos[e] || T.setFilters[e.toLowerCase()] || t.error("unsupported pseudo: " + e);
  1852. return o[P] ? o(n) : o.length > 1 ? (i = [e, e, "", n], T.setFilters.hasOwnProperty(e.toLowerCase()) ? r(function (e, t) {
  1853. for (var r, i = o(e, n), a = i.length; a--;) r = ee(e, i[a]), e[r] = !(t[r] = i[a])
  1854. }) : function (e) {
  1855. return o(e, 0, i)
  1856. }) : o
  1857. }
  1858. },
  1859. pseudos: {
  1860. not: r(function (e) {
  1861. var t = [], n = [], i = k(e.replace(se, "$1"));
  1862. return i[P] ? r(function (e, t, n, r) {
  1863. for (var o, a = i(e, null, r, []), s = e.length; s--;) (o = a[s]) && (e[s] = !(t[s] = o))
  1864. }) : function (e, r, o) {
  1865. return t[0] = e, i(t, null, o, n), t[0] = null, !n.pop()
  1866. }
  1867. }), has: r(function (e) {
  1868. return function (n) {
  1869. return t(e, n).length > 0
  1870. }
  1871. }), contains: r(function (e) {
  1872. return e = e.replace(be, we), function (t) {
  1873. return (t.textContent || t.innerText || C(t)).indexOf(e) > -1
  1874. }
  1875. }), lang: r(function (e) {
  1876. return de.test(e || "") || t.error("unsupported lang: " + e), e = e.replace(be, we).toLowerCase(), function (t) {
  1877. var n;
  1878. do if (n = _ ? t.lang : t.getAttribute("xml:lang") || t.getAttribute("lang")) return n = n.toLowerCase(), n === e || 0 === n.indexOf(e + "-"); while ((t = t.parentNode) && 1 === t.nodeType);
  1879. return !1
  1880. }
  1881. }), target: function (t) {
  1882. var n = e.location && e.location.hash;
  1883. return n && n.slice(1) === t.id
  1884. }, root: function (e) {
  1885. return e === q
  1886. }, focus: function (e) {
  1887. return e === H.activeElement && (!H.hasFocus || H.hasFocus()) && !!(e.type || e.href || ~e.tabIndex)
  1888. }, enabled: function (e) {
  1889. return e.disabled === !1
  1890. }, disabled: function (e) {
  1891. return e.disabled === !0
  1892. }, checked: function (e) {
  1893. var t = e.nodeName.toLowerCase();
  1894. return "input" === t && !!e.checked || "option" === t && !!e.selected
  1895. }, selected: function (e) {
  1896. return e.parentNode && e.parentNode.selectedIndex, e.selected === !0
  1897. }, empty: function (e) {
  1898. for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1;
  1899. return !0
  1900. }, parent: function (e) {
  1901. return !T.pseudos.empty(e)
  1902. }, header: function (e) {
  1903. return ge.test(e.nodeName)
  1904. }, input: function (e) {
  1905. return he.test(e.nodeName)
  1906. }, button: function (e) {
  1907. var t = e.nodeName.toLowerCase();
  1908. return "input" === t && "button" === e.type || "button" === t
  1909. }, text: function (e) {
  1910. var t;
  1911. return "input" === e.nodeName.toLowerCase() && "text" === e.type && (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase())
  1912. }, first: l(function () {
  1913. return [0]
  1914. }), last: l(function (e, t) {
  1915. return [t - 1]
  1916. }), eq: l(function (e, t, n) {
  1917. return [n < 0 ? n + t : n]
  1918. }), even: l(function (e, t) {
  1919. for (var n = 0; n < t; n += 2) e.push(n);
  1920. return e
  1921. }), odd: l(function (e, t) {
  1922. for (var n = 1; n < t; n += 2) e.push(n);
  1923. return e
  1924. }), lt: l(function (e, t, n) {
  1925. for (var r = n < 0 ? n + t : n; --r >= 0;) e.push(r);
  1926. return e
  1927. }), gt: l(function (e, t, n) {
  1928. for (var r = n < 0 ? n + t : n; ++r < t;) e.push(r);
  1929. return e
  1930. })
  1931. }
  1932. }, T.pseudos.nth = T.pseudos.eq;
  1933. for (b in{radio: !0, checkbox: !0, file: !0, password: !0, image: !0}) T.pseudos[b] = s(b);
  1934. for (b in{submit: !0, reset: !0}) T.pseudos[b] = u(b);
  1935. return f.prototype = T.filters = T.pseudos, T.setFilters = new f, N = t.tokenize = function (e, n) {
  1936. var r, i, o, a, s, u, l, c = z[e + " "];
  1937. if (c) return n ? 0 : c.slice(0);
  1938. for (s = e, u = [], l = T.preFilter; s;) {
  1939. r && !(i = ue.exec(s)) || (i && (s = s.slice(i[0].length) || s), u.push(o = [])), r = !1, (i = le.exec(s)) && (r = i.shift(), o.push({
  1940. value: r,
  1941. type: i[0].replace(se, " ")
  1942. }), s = s.slice(r.length));
  1943. for (a in T.filter) !(i = pe[a].exec(s)) || l[a] && !(i = l[a](i)) || (r = i.shift(), o.push({
  1944. value: r,
  1945. type: a,
  1946. matches: i
  1947. }), s = s.slice(r.length));
  1948. if (!r) break
  1949. }
  1950. return n ? s.length : s ? t.error(e) : z(e, u).slice(0)
  1951. }, k = t.compile = function (e, t) {
  1952. var n, r = [], i = [], o = X[e + " "];
  1953. if (!o) {
  1954. for (t || (t = N(e)), n = t.length; n--;) o = v(t[n]), o[P] ? r.push(o) : i.push(o);
  1955. o = X(e, x(i, r)), o.selector = e
  1956. }
  1957. return o
  1958. }, S = t.select = function (e, t, n, r) {
  1959. var i, o, a, s, u, l = "function" == typeof e && e, f = !r && N(e = l.selector || e);
  1960. if (n = n || [], 1 === f.length) {
  1961. if (o = f[0] = f[0].slice(0), o.length > 2 && "ID" === (a = o[0]).type && w.getById && 9 === t.nodeType && _ && T.relative[o[1].type]) {
  1962. if (t = (T.find.ID(a.matches[0].replace(be, we), t) || [])[0], !t) return n;
  1963. l && (t = t.parentNode), e = e.slice(o.shift().value.length)
  1964. }
  1965. for (i = pe.needsContext.test(e) ? 0 : o.length; i-- && (a = o[i], !T.relative[s = a.type]);) if ((u = T.find[s]) && (r = u(a.matches[0].replace(be, we), ve.test(o[0].type) && c(t.parentNode) || t))) {
  1966. if (o.splice(i, 1), e = r.length && d(o), !e) return Q.apply(n, r), n;
  1967. break
  1968. }
  1969. }
  1970. return (l || k(e, f))(r, t, !_, n, !t || ve.test(e) && c(t.parentNode) || t), n
  1971. }, w.sortStable = P.split("").sort(U).join("") === P, w.detectDuplicates = !!j, L(), w.sortDetached = i(function (e) {
  1972. return 1 & e.compareDocumentPosition(H.createElement("div"))
  1973. }), i(function (e) {
  1974. return e.innerHTML = "<a href='#'></a>", "#" === e.firstChild.getAttribute("href")
  1975. }) || o("type|href|height|width", function (e, t, n) {
  1976. if (!n) return e.getAttribute(t, "type" === t.toLowerCase() ? 1 : 2)
  1977. }), w.attributes && i(function (e) {
  1978. return e.innerHTML = "<input/>", e.firstChild.setAttribute("value", ""), "" === e.firstChild.getAttribute("value")
  1979. }) || o("value", function (e, t, n) {
  1980. if (!n && "input" === e.nodeName.toLowerCase()) return e.defaultValue
  1981. }), i(function (e) {
  1982. return null == e.getAttribute("disabled")
  1983. }) || o(te, function (e, t, n) {
  1984. var r;
  1985. if (!n) return e[t] === !0 ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null
  1986. }), t
  1987. }(e);
  1988. pe.find = ve, pe.expr = ve.selectors, pe.expr[":"] = pe.expr.pseudos, pe.uniqueSort = pe.unique = ve.uniqueSort, pe.text = ve.getText, pe.isXMLDoc = ve.isXML, pe.contains = ve.contains;
  1989. var xe = function (e, t, n) {
  1990. for (var r = [], i = void 0 !== n; (e = e[t]) && 9 !== e.nodeType;) if (1 === e.nodeType) {
  1991. if (i && pe(e).is(n)) break;
  1992. r.push(e)
  1993. }
  1994. return r
  1995. }, be = function (e, t) {
  1996. for (var n = []; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e);
  1997. return n
  1998. }, we = pe.expr.match.needsContext, Te = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, Ce = /^.[^:#\[\.,]*$/;
  1999. pe.filter = function (e, t, n) {
  2000. var r = t[0];
  2001. return n && (e = ":not(" + e + ")"), 1 === t.length && 1 === r.nodeType ? pe.find.matchesSelector(r, e) ? [r] : [] : pe.find.matches(e, pe.grep(t, function (e) {
  2002. return 1 === e.nodeType
  2003. }))
  2004. }, pe.fn.extend({
  2005. find: function (e) {
  2006. var t, n = [], r = this, i = r.length;
  2007. if ("string" != typeof e) return this.pushStack(pe(e).filter(function () {
  2008. for (t = 0; t < i; t++) if (pe.contains(r[t], this)) return !0
  2009. }));
  2010. for (t = 0; t < i; t++) pe.find(e, r[t], n);
  2011. return n = this.pushStack(i > 1 ? pe.unique(n) : n), n.selector = this.selector ? this.selector + " " + e : e, n
  2012. }, filter: function (e) {
  2013. return this.pushStack(r(this, e || [], !1))
  2014. }, not: function (e) {
  2015. return this.pushStack(r(this, e || [], !0))
  2016. }, is: function (e) {
  2017. return !!r(this, "string" == typeof e && we.test(e) ? pe(e) : e || [], !1).length
  2018. }
  2019. });
  2020. var Ee, Ne = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, ke = pe.fn.init = function (e, t, n) {
  2021. var r, i;
  2022. if (!e) return this;
  2023. if (n = n || Ee, "string" == typeof e) {
  2024. if (r = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [null, e, null] : Ne.exec(e), !r || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e);
  2025. if (r[1]) {
  2026. if (t = t instanceof pe ? t[0] : t, pe.merge(this, pe.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : re, !0)), Te.test(r[1]) && pe.isPlainObject(t)) for (r in t) pe.isFunction(this[r]) ? this[r](t[r]) : this.attr(r, t[r]);
  2027. return this
  2028. }
  2029. if (i = re.getElementById(r[2]), i && i.parentNode) {
  2030. if (i.id !== r[2]) return Ee.find(e);
  2031. this.length = 1, this[0] = i
  2032. }
  2033. return this.context = re, this.selector = e, this
  2034. }
  2035. return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : pe.isFunction(e) ? "undefined" != typeof n.ready ? n.ready(e) : e(pe) : (void 0 !== e.selector && (this.selector = e.selector, this.context = e.context), pe.makeArray(e, this))
  2036. };
  2037. ke.prototype = pe.fn, Ee = pe(re);
  2038. var Se = /^(?:parents|prev(?:Until|All))/, Ae = {children: !0, contents: !0, next: !0, prev: !0};
  2039. pe.fn.extend({
  2040. has: function (e) {
  2041. var t, n = pe(e, this), r = n.length;
  2042. return this.filter(function () {
  2043. for (t = 0; t < r; t++) if (pe.contains(this, n[t])) return !0
  2044. })
  2045. }, closest: function (e, t) {
  2046. for (var n, r = 0, i = this.length, o = [], a = we.test(e) || "string" != typeof e ? pe(e, t || this.context) : 0; r < i; r++) for (n = this[r]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? a.index(n) > -1 : 1 === n.nodeType && pe.find.matchesSelector(n, e))) {
  2047. o.push(n);
  2048. break
  2049. }
  2050. return this.pushStack(o.length > 1 ? pe.uniqueSort(o) : o)
  2051. }, index: function (e) {
  2052. return e ? "string" == typeof e ? pe.inArray(this[0], pe(e)) : pe.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
  2053. }, add: function (e, t) {
  2054. return this.pushStack(pe.uniqueSort(pe.merge(this.get(), pe(e, t))))
  2055. }, addBack: function (e) {
  2056. return this.add(null == e ? this.prevObject : this.prevObject.filter(e))
  2057. }
  2058. }), pe.each({
  2059. parent: function (e) {
  2060. var t = e.parentNode;
  2061. return t && 11 !== t.nodeType ? t : null
  2062. }, parents: function (e) {
  2063. return xe(e, "parentNode")
  2064. }, parentsUntil: function (e, t, n) {
  2065. return xe(e, "parentNode", n)
  2066. }, next: function (e) {
  2067. return i(e, "nextSibling")
  2068. }, prev: function (e) {
  2069. return i(e, "previousSibling")
  2070. }, nextAll: function (e) {
  2071. return xe(e, "nextSibling")
  2072. }, prevAll: function (e) {
  2073. return xe(e, "previousSibling")
  2074. }, nextUntil: function (e, t, n) {
  2075. return xe(e, "nextSibling", n)
  2076. }, prevUntil: function (e, t, n) {
  2077. return xe(e, "previousSibling", n)
  2078. }, siblings: function (e) {
  2079. return be((e.parentNode || {}).firstChild, e)
  2080. }, children: function (e) {
  2081. return be(e.firstChild)
  2082. }, contents: function (e) {
  2083. return pe.nodeName(e, "iframe") ? e.contentDocument || e.contentWindow.document : pe.merge([], e.childNodes)
  2084. }
  2085. }, function (e, t) {
  2086. pe.fn[e] = function (n, r) {
  2087. var i = pe.map(this, t, n);
  2088. return "Until" !== e.slice(-5) && (r = n), r && "string" == typeof r && (i = pe.filter(r, i)), this.length > 1 && (Ae[e] || (i = pe.uniqueSort(i)), Se.test(e) && (i = i.reverse())), this.pushStack(i)
  2089. }
  2090. });
  2091. var De = /\S+/g;
  2092. pe.Callbacks = function (e) {
  2093. e = "string" == typeof e ? o(e) : pe.extend({}, e);
  2094. var t, n, r, i, a = [], s = [], u = -1, l = function () {
  2095. for (i = e.once, r = t = !0; s.length; u = -1) for (n = s.shift(); ++u < a.length;) a[u].apply(n[0], n[1]) === !1 && e.stopOnFalse && (u = a.length, n = !1);
  2096. e.memory || (n = !1), t = !1, i && (a = n ? [] : "")
  2097. }, c = {
  2098. add: function () {
  2099. return a && (n && !t && (u = a.length - 1, s.push(n)), function r(t) {
  2100. pe.each(t, function (t, n) {
  2101. pe.isFunction(n) ? e.unique && c.has(n) || a.push(n) : n && n.length && "string" !== pe.type(n) && r(n)
  2102. })
  2103. }(arguments), n && !t && l()), this
  2104. }, remove: function () {
  2105. return pe.each(arguments, function (e, t) {
  2106. for (var n; (n = pe.inArray(t, a, n)) > -1;) a.splice(n, 1), n <= u && u--
  2107. }), this
  2108. }, has: function (e) {
  2109. return e ? pe.inArray(e, a) > -1 : a.length > 0
  2110. }, empty: function () {
  2111. return a && (a = []), this
  2112. }, disable: function () {
  2113. return i = s = [], a = n = "", this
  2114. }, disabled: function () {
  2115. return !a
  2116. }, lock: function () {
  2117. return i = !0, n || c.disable(), this
  2118. }, locked: function () {
  2119. return !!i
  2120. }, fireWith: function (e, n) {
  2121. return i || (n = n || [], n = [e, n.slice ? n.slice() : n], s.push(n), t || l()), this
  2122. }, fire: function () {
  2123. return c.fireWith(this, arguments), this
  2124. }, fired: function () {
  2125. return !!r
  2126. }
  2127. };
  2128. return c
  2129. }, pe.extend({
  2130. Deferred: function (e) {
  2131. var t = [["resolve", "done", pe.Callbacks("once memory"), "resolved"], ["reject", "fail", pe.Callbacks("once memory"), "rejected"], ["notify", "progress", pe.Callbacks("memory")]],
  2132. n = "pending", r = {
  2133. state: function () {
  2134. return n
  2135. }, always: function () {
  2136. return i.done(arguments).fail(arguments), this
  2137. }, then: function () {
  2138. var e = arguments;
  2139. return pe.Deferred(function (n) {
  2140. pe.each(t, function (t, o) {
  2141. var a = pe.isFunction(e[t]) && e[t];
  2142. i[o[1]](function () {
  2143. var e = a && a.apply(this, arguments);
  2144. e && pe.isFunction(e.promise) ? e.promise().progress(n.notify).done(n.resolve).fail(n.reject) : n[o[0] + "With"](this === r ? n.promise() : this, a ? [e] : arguments)
  2145. })
  2146. }), e = null
  2147. }).promise()
  2148. }, promise: function (e) {
  2149. return null != e ? pe.extend(e, r) : r
  2150. }
  2151. }, i = {};
  2152. return r.pipe = r.then, pe.each(t, function (e, o) {
  2153. var a = o[2], s = o[3];
  2154. r[o[1]] = a.add, s && a.add(function () {
  2155. n = s
  2156. }, t[1 ^ e][2].disable, t[2][2].lock), i[o[0]] = function () {
  2157. return i[o[0] + "With"](this === i ? r : this, arguments), this
  2158. }, i[o[0] + "With"] = a.fireWith
  2159. }), r.promise(i), e && e.call(i, i), i
  2160. }, when: function (e) {
  2161. var t, n, r, i = 0, o = ie.call(arguments), a = o.length,
  2162. s = 1 !== a || e && pe.isFunction(e.promise) ? a : 0, u = 1 === s ? e : pe.Deferred(),
  2163. l = function (e, n, r) {
  2164. return function (i) {
  2165. n[e] = this, r[e] = arguments.length > 1 ? ie.call(arguments) : i, r === t ? u.notifyWith(n, r) : --s || u.resolveWith(n, r)
  2166. }
  2167. };
  2168. if (a > 1) for (t = new Array(a), n = new Array(a), r = new Array(a); i < a; i++) o[i] && pe.isFunction(o[i].promise) ? o[i].promise().progress(l(i, n, t)).done(l(i, r, o)).fail(u.reject) : --s;
  2169. return s || u.resolveWith(r, o), u.promise()
  2170. }
  2171. });
  2172. var je;
  2173. pe.fn.ready = function (e) {
  2174. return pe.ready.promise().done(e), this
  2175. }, pe.extend({
  2176. isReady: !1, readyWait: 1, holdReady: function (e) {
  2177. e ? pe.readyWait++ : pe.ready(!0)
  2178. }, ready: function (e) {
  2179. (e === !0 ? --pe.readyWait : pe.isReady) || (pe.isReady = !0, e !== !0 && --pe.readyWait > 0 || (je.resolveWith(re, [pe]), pe.fn.triggerHandler && (pe(re).triggerHandler("ready"), pe(re).off("ready"))))
  2180. }
  2181. }), pe.ready.promise = function (t) {
  2182. if (!je) if (je = pe.Deferred(), "complete" === re.readyState || "loading" !== re.readyState && !re.documentElement.doScroll) e.setTimeout(pe.ready); else if (re.addEventListener) re.addEventListener("DOMContentLoaded", s), e.addEventListener("load", s); else {
  2183. re.attachEvent("onreadystatechange", s), e.attachEvent("onload", s);
  2184. var n = !1;
  2185. try {
  2186. n = null == e.frameElement && re.documentElement
  2187. } catch (r) {
  2188. }
  2189. n && n.doScroll && !function i() {
  2190. if (!pe.isReady) {
  2191. try {
  2192. n.doScroll("left")
  2193. } catch (t) {
  2194. return e.setTimeout(i, 50)
  2195. }
  2196. a(), pe.ready()
  2197. }
  2198. }()
  2199. }
  2200. return je.promise(t)
  2201. }, pe.ready.promise();
  2202. var Le;
  2203. for (Le in pe(fe)) break;
  2204. fe.ownFirst = "0" === Le, fe.inlineBlockNeedsLayout = !1, pe(function () {
  2205. var e, t, n, r;
  2206. n = re.getElementsByTagName("body")[0], n && n.style && (t = re.createElement("div"), r = re.createElement("div"), r.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(r).appendChild(t), "undefined" != typeof t.style.zoom && (t.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1", fe.inlineBlockNeedsLayout = e = 3 === t.offsetWidth, e && (n.style.zoom = 1)), n.removeChild(r))
  2207. }), function () {
  2208. var e = re.createElement("div");
  2209. fe.deleteExpando = !0;
  2210. try {
  2211. delete e.test
  2212. } catch (t) {
  2213. fe.deleteExpando = !1
  2214. }
  2215. e = null
  2216. }();
  2217. var He = function (e) {
  2218. var t = pe.noData[(e.nodeName + " ").toLowerCase()], n = +e.nodeType || 1;
  2219. return (1 === n || 9 === n) && (!t || t !== !0 && e.getAttribute("classid") === t)
  2220. }, qe = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, _e = /([A-Z])/g;
  2221. pe.extend({
  2222. cache: {},
  2223. noData: {"applet ": !0, "embed ": !0, "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},
  2224. hasData: function (e) {
  2225. return e = e.nodeType ? pe.cache[e[pe.expando]] : e[pe.expando], !!e && !l(e)
  2226. },
  2227. data: function (e, t, n) {
  2228. return c(e, t, n)
  2229. },
  2230. removeData: function (e, t) {
  2231. return f(e, t)
  2232. },
  2233. _data: function (e, t, n) {
  2234. return c(e, t, n, !0)
  2235. },
  2236. _removeData: function (e, t) {
  2237. return f(e, t, !0)
  2238. }
  2239. }), pe.fn.extend({
  2240. data: function (e, t) {
  2241. var n, r, i, o = this[0], a = o && o.attributes;
  2242. if (void 0 === e) {
  2243. if (this.length && (i = pe.data(o), 1 === o.nodeType && !pe._data(o, "parsedAttrs"))) {
  2244. for (n = a.length; n--;) a[n] && (r = a[n].name, 0 === r.indexOf("data-") && (r = pe.camelCase(r.slice(5)), u(o, r, i[r])));
  2245. pe._data(o, "parsedAttrs", !0)
  2246. }
  2247. return i
  2248. }
  2249. return "object" == typeof e ? this.each(function () {
  2250. pe.data(this, e)
  2251. }) : arguments.length > 1 ? this.each(function () {
  2252. pe.data(this, e, t)
  2253. }) : o ? u(o, e, pe.data(o, e)) : void 0
  2254. }, removeData: function (e) {
  2255. return this.each(function () {
  2256. pe.removeData(this, e)
  2257. })
  2258. }
  2259. }), pe.extend({
  2260. queue: function (e, t, n) {
  2261. var r;
  2262. if (e) return t = (t || "fx") + "queue", r = pe._data(e, t), n && (!r || pe.isArray(n) ? r = pe._data(e, t, pe.makeArray(n)) : r.push(n)), r || []
  2263. }, dequeue: function (e, t) {
  2264. t = t || "fx";
  2265. var n = pe.queue(e, t), r = n.length, i = n.shift(), o = pe._queueHooks(e, t), a = function () {
  2266. pe.dequeue(e, t)
  2267. };
  2268. "inprogress" === i && (i = n.shift(), r--), i && ("fx" === t && n.unshift("inprogress"), delete o.stop, i.call(e, a, o)), !r && o && o.empty.fire()
  2269. }, _queueHooks: function (e, t) {
  2270. var n = t + "queueHooks";
  2271. return pe._data(e, n) || pe._data(e, n, {
  2272. empty: pe.Callbacks("once memory").add(function () {
  2273. pe._removeData(e, t + "queue"), pe._removeData(e, n)
  2274. })
  2275. })
  2276. }
  2277. }), pe.fn.extend({
  2278. queue: function (e, t) {
  2279. var n = 2;
  2280. return "string" != typeof e && (t = e, e = "fx", n--), arguments.length < n ? pe.queue(this[0], e) : void 0 === t ? this : this.each(function () {
  2281. var n = pe.queue(this, e, t);
  2282. pe._queueHooks(this, e), "fx" === e && "inprogress" !== n[0] && pe.dequeue(this, e)
  2283. })
  2284. }, dequeue: function (e) {
  2285. return this.each(function () {
  2286. pe.dequeue(this, e)
  2287. })
  2288. }, clearQueue: function (e) {
  2289. return this.queue(e || "fx", [])
  2290. }, promise: function (e, t) {
  2291. var n, r = 1, i = pe.Deferred(), o = this, a = this.length, s = function () {
  2292. --r || i.resolveWith(o, [o])
  2293. };
  2294. for ("string" != typeof e && (t = e, e = void 0), e = e || "fx"; a--;) n = pe._data(o[a], e + "queueHooks"), n && n.empty && (r++, n.empty.add(s));
  2295. return s(), i.promise(t)
  2296. }
  2297. }), function () {
  2298. var e;
  2299. fe.shrinkWrapBlocks = function () {
  2300. if (null != e) return e;
  2301. e = !1;
  2302. var t, n, r;
  2303. return n = re.getElementsByTagName("body")[0], n && n.style ? (t = re.createElement("div"), r = re.createElement("div"), r.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px", n.appendChild(r).appendChild(t), "undefined" != typeof t.style.zoom && (t.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1", t.appendChild(re.createElement("div")).style.width = "5px", e = 3 !== t.offsetWidth), n.removeChild(r), e) : void 0
  2304. }
  2305. }();
  2306. var Fe = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, Me = new RegExp("^(?:([+-])=|)(" + Fe + ")([a-z%]*)$", "i"),
  2307. Oe = ["Top", "Right", "Bottom", "Left"], Re = function (e, t) {
  2308. return e = t || e, "none" === pe.css(e, "display") || !pe.contains(e.ownerDocument, e)
  2309. }, Pe = function (e, t, n, r, i, o, a) {
  2310. var s = 0, u = e.length, l = null == n;
  2311. if ("object" === pe.type(n)) {
  2312. i = !0;
  2313. for (s in n) Pe(e, t, s, n[s], !0, o, a)
  2314. } else if (void 0 !== r && (i = !0, pe.isFunction(r) || (a = !0), l && (a ? (t.call(e, r), t = null) : (l = t, t = function (e, t, n) {
  2315. return l.call(pe(e), n)
  2316. })), t)) for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n)));
  2317. return i ? e : l ? t.call(e) : u ? t(e[0], n) : o
  2318. }, Be = /^(?:checkbox|radio)$/i, We = /<([\w:-]+)/, Ie = /^$|\/(?:java|ecma)script/i, $e = /^\s+/,
  2319. ze = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";
  2320. !function () {
  2321. var e = re.createElement("div"), t = re.createDocumentFragment(), n = re.createElement("input");
  2322. e.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", fe.leadingWhitespace = 3 === e.firstChild.nodeType, fe.tbody = !e.getElementsByTagName("tbody").length, fe.htmlSerialize = !!e.getElementsByTagName("link").length, fe.html5Clone = "<:nav></:nav>" !== re.createElement("nav").cloneNode(!0).outerHTML, n.type = "checkbox", n.checked = !0, t.appendChild(n), fe.appendChecked = n.checked, e.innerHTML = "<textarea>x</textarea>", fe.noCloneChecked = !!e.cloneNode(!0).lastChild.defaultValue, t.appendChild(e), n = re.createElement("input"), n.setAttribute("type", "radio"), n.setAttribute("checked", "checked"), n.setAttribute("name", "t"), e.appendChild(n), fe.checkClone = e.cloneNode(!0).cloneNode(!0).lastChild.checked, fe.noCloneEvent = !!e.addEventListener, e[pe.expando] = 1, fe.attributes = !e.getAttribute(pe.expando)
  2323. }();
  2324. var Xe = {
  2325. option: [1, "<select multiple='multiple'>", "</select>"],
  2326. legend: [1, "<fieldset>", "</fieldset>"],
  2327. area: [1, "<map>", "</map>"],
  2328. param: [1, "<object>", "</object>"],
  2329. thead: [1, "<table>", "</table>"],
  2330. tr: [2, "<table><tbody>", "</tbody></table>"],
  2331. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  2332. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2333. _default: fe.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
  2334. };
  2335. Xe.optgroup = Xe.option, Xe.tbody = Xe.tfoot = Xe.colgroup = Xe.caption = Xe.thead, Xe.th = Xe.td;
  2336. var Ue = /<|&#?\w+;/, Ve = /<tbody/i;
  2337. !function () {
  2338. var t, n, r = re.createElement("div");
  2339. for (t in{
  2340. submit: !0,
  2341. change: !0,
  2342. focusin: !0
  2343. }) n = "on" + t, (fe[t] = n in e) || (r.setAttribute(n, "t"), fe[t] = r.attributes[n].expando === !1);
  2344. r = null
  2345. }();
  2346. var Ye = /^(?:input|select|textarea)$/i, Je = /^key/, Ge = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  2347. Ke = /^(?:focusinfocus|focusoutblur)$/, Qe = /^([^.]*)(?:\.(.+)|)/;
  2348. pe.event = {
  2349. global: {},
  2350. add: function (e, t, n, r, i) {
  2351. var o, a, s, u, l, c, f, d, p, h, g, m = pe._data(e);
  2352. if (m) {
  2353. for (n.handler && (u = n, n = u.handler, i = u.selector), n.guid || (n.guid = pe.guid++), (a = m.events) || (a = m.events = {}), (c = m.handle) || (c = m.handle = function (e) {
  2354. return "undefined" == typeof pe || e && pe.event.triggered === e.type ? void 0 : pe.event.dispatch.apply(c.elem, arguments)
  2355. }, c.elem = e), t = (t || "").match(De) || [""], s = t.length; s--;) o = Qe.exec(t[s]) || [], p = g = o[1], h = (o[2] || "").split(".").sort(), p && (l = pe.event.special[p] || {}, p = (i ? l.delegateType : l.bindType) || p, l = pe.event.special[p] || {}, f = pe.extend({
  2356. type: p,
  2357. origType: g,
  2358. data: r,
  2359. handler: n,
  2360. guid: n.guid,
  2361. selector: i,
  2362. needsContext: i && pe.expr.match.needsContext.test(i),
  2363. namespace: h.join(".")
  2364. }, u), (d = a[p]) || (d = a[p] = [], d.delegateCount = 0, l.setup && l.setup.call(e, r, h, c) !== !1 || (e.addEventListener ? e.addEventListener(p, c, !1) : e.attachEvent && e.attachEvent("on" + p, c))), l.add && (l.add.call(e, f), f.handler.guid || (f.handler.guid = n.guid)), i ? d.splice(d.delegateCount++, 0, f) : d.push(f), pe.event.global[p] = !0);
  2365. e = null
  2366. }
  2367. },
  2368. remove: function (e, t, n, r, i) {
  2369. var o, a, s, u, l, c, f, d, p, h, g, m = pe.hasData(e) && pe._data(e);
  2370. if (m && (c = m.events)) {
  2371. for (t = (t || "").match(De) || [""], l = t.length; l--;) if (s = Qe.exec(t[l]) || [], p = g = s[1], h = (s[2] || "").split(".").sort(), p) {
  2372. for (f = pe.event.special[p] || {}, p = (r ? f.delegateType : f.bindType) || p, d = c[p] || [], s = s[2] && new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)"), u = o = d.length; o--;) a = d[o], !i && g !== a.origType || n && n.guid !== a.guid || s && !s.test(a.namespace) || r && r !== a.selector && ("**" !== r || !a.selector) || (d.splice(o, 1), a.selector && d.delegateCount--, f.remove && f.remove.call(e, a));
  2373. u && !d.length && (f.teardown && f.teardown.call(e, h, m.handle) !== !1 || pe.removeEvent(e, p, m.handle), delete c[p])
  2374. } else for (p in c) pe.event.remove(e, p + t[l], n, r, !0);
  2375. pe.isEmptyObject(c) && (delete m.handle, pe._removeData(e, "events"))
  2376. }
  2377. },
  2378. trigger: function (t, n, r, i) {
  2379. var o, a, s, u, l, c, f, d = [r || re], p = ce.call(t, "type") ? t.type : t,
  2380. h = ce.call(t, "namespace") ? t.namespace.split(".") : [];
  2381. if (s = c = r = r || re, 3 !== r.nodeType && 8 !== r.nodeType && !Ke.test(p + pe.event.triggered) && (p.indexOf(".") > -1 && (h = p.split("."), p = h.shift(), h.sort()), a = p.indexOf(":") < 0 && "on" + p, t = t[pe.expando] ? t : new pe.Event(p, "object" == typeof t && t), t.isTrigger = i ? 2 : 3, t.namespace = h.join("."), t.rnamespace = t.namespace ? new RegExp("(^|\\.)" + h.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, t.result = void 0, t.target || (t.target = r), n = null == n ? [t] : pe.makeArray(n, [t]), l = pe.event.special[p] || {}, i || !l.trigger || l.trigger.apply(r, n) !== !1)) {
  2382. if (!i && !l.noBubble && !pe.isWindow(r)) {
  2383. for (u = l.delegateType || p, Ke.test(u + p) || (s = s.parentNode); s; s = s.parentNode) d.push(s), c = s;
  2384. c === (r.ownerDocument || re) && d.push(c.defaultView || c.parentWindow || e)
  2385. }
  2386. for (f = 0; (s = d[f++]) && !t.isPropagationStopped();) t.type = f > 1 ? u : l.bindType || p, o = (pe._data(s, "events") || {})[t.type] && pe._data(s, "handle"), o && o.apply(s, n), o = a && s[a], o && o.apply && He(s) && (t.result = o.apply(s, n), t.result === !1 && t.preventDefault());
  2387. if (t.type = p, !i && !t.isDefaultPrevented() && (!l._default || l._default.apply(d.pop(), n) === !1) && He(r) && a && r[p] && !pe.isWindow(r)) {
  2388. c = r[a], c && (r[a] = null), pe.event.triggered = p;
  2389. try {
  2390. r[p]()
  2391. } catch (g) {
  2392. }
  2393. pe.event.triggered = void 0, c && (r[a] = c)
  2394. }
  2395. return t.result
  2396. }
  2397. },
  2398. dispatch: function (e) {
  2399. e = pe.event.fix(e);
  2400. var t, n, r, i, o, a = [], s = ie.call(arguments), u = (pe._data(this, "events") || {})[e.type] || [],
  2401. l = pe.event.special[e.type] || {};
  2402. if (s[0] = e, e.delegateTarget = this, !l.preDispatch || l.preDispatch.call(this, e) !== !1) {
  2403. for (a = pe.event.handlers.call(this, e, u), t = 0; (i = a[t++]) && !e.isPropagationStopped();) for (e.currentTarget = i.elem, n = 0; (o = i.handlers[n++]) && !e.isImmediatePropagationStopped();) e.rnamespace && !e.rnamespace.test(o.namespace) || (e.handleObj = o, e.data = o.data, r = ((pe.event.special[o.origType] || {}).handle || o.handler).apply(i.elem, s), void 0 !== r && (e.result = r) === !1 && (e.preventDefault(), e.stopPropagation()));
  2404. return l.postDispatch && l.postDispatch.call(this, e), e.result
  2405. }
  2406. },
  2407. handlers: function (e, t) {
  2408. var n, r, i, o, a = [], s = t.delegateCount, u = e.target;
  2409. if (s && u.nodeType && ("click" !== e.type || isNaN(e.button) || e.button < 1)) for (; u != this; u = u.parentNode || this) if (1 === u.nodeType && (u.disabled !== !0 || "click" !== e.type)) {
  2410. for (r = [], n = 0; n < s; n++) o = t[n], i = o.selector + " ", void 0 === r[i] && (r[i] = o.needsContext ? pe(i, this).index(u) > -1 : pe.find(i, this, null, [u]).length), r[i] && r.push(o);
  2411. r.length && a.push({elem: u, handlers: r})
  2412. }
  2413. return s < t.length && a.push({elem: this, handlers: t.slice(s)}), a
  2414. },
  2415. fix: function (e) {
  2416. if (e[pe.expando]) return e;
  2417. var t, n, r, i = e.type, o = e, a = this.fixHooks[i];
  2418. for (a || (this.fixHooks[i] = a = Ge.test(i) ? this.mouseHooks : Je.test(i) ? this.keyHooks : {}), r = a.props ? this.props.concat(a.props) : this.props, e = new pe.Event(o), t = r.length; t--;) n = r[t], e[n] = o[n];
  2419. return e.target || (e.target = o.srcElement || re), 3 === e.target.nodeType && (e.target = e.target.parentNode), e.metaKey = !!e.metaKey, a.filter ? a.filter(e, o) : e
  2420. },
  2421. props: "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  2422. fixHooks: {},
  2423. keyHooks: {
  2424. props: "char charCode key keyCode".split(" "), filter: function (e, t) {
  2425. return null == e.which && (e.which = null != t.charCode ? t.charCode : t.keyCode), e
  2426. }
  2427. },
  2428. mouseHooks: {
  2429. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
  2430. filter: function (e, t) {
  2431. var n, r, i, o = t.button, a = t.fromElement;
  2432. return null == e.pageX && null != t.clientX && (r = e.target.ownerDocument || re, i = r.documentElement, n = r.body, e.pageX = t.clientX + (i && i.scrollLeft || n && n.scrollLeft || 0) - (i && i.clientLeft || n && n.clientLeft || 0), e.pageY = t.clientY + (i && i.scrollTop || n && n.scrollTop || 0) - (i && i.clientTop || n && n.clientTop || 0)), !e.relatedTarget && a && (e.relatedTarget = a === e.target ? t.toElement : a), e.which || void 0 === o || (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), e
  2433. }
  2434. },
  2435. special: {
  2436. load: {noBubble: !0}, focus: {
  2437. trigger: function () {
  2438. if (this !== b() && this.focus) try {
  2439. return this.focus(), !1
  2440. } catch (e) {
  2441. }
  2442. }, delegateType: "focusin"
  2443. }, blur: {
  2444. trigger: function () {
  2445. if (this === b() && this.blur) return this.blur(), !1
  2446. }, delegateType: "focusout"
  2447. }, click: {
  2448. trigger: function () {
  2449. if (pe.nodeName(this, "input") && "checkbox" === this.type && this.click) return this.click(), !1
  2450. }, _default: function (e) {
  2451. return pe.nodeName(e.target, "a")
  2452. }
  2453. }, beforeunload: {
  2454. postDispatch: function (e) {
  2455. void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result)
  2456. }
  2457. }
  2458. },
  2459. simulate: function (e, t, n) {
  2460. var r = pe.extend(new pe.Event, n, {type: e, isSimulated: !0});
  2461. pe.event.trigger(r, null, t), r.isDefaultPrevented() && n.preventDefault()
  2462. }
  2463. }, pe.removeEvent = re.removeEventListener ? function (e, t, n) {
  2464. e.removeEventListener && e.removeEventListener(t, n)
  2465. } : function (e, t, n) {
  2466. var r = "on" + t;
  2467. e.detachEvent && ("undefined" == typeof e[r] && (e[r] = null), e.detachEvent(r, n))
  2468. }, pe.Event = function (e, t) {
  2469. return this instanceof pe.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && e.returnValue === !1 ? v : x) : this.type = e, t && pe.extend(this, t), this.timeStamp = e && e.timeStamp || pe.now(), void (this[pe.expando] = !0)) : new pe.Event(e, t)
  2470. }, pe.Event.prototype = {
  2471. constructor: pe.Event,
  2472. isDefaultPrevented: x,
  2473. isPropagationStopped: x,
  2474. isImmediatePropagationStopped: x,
  2475. preventDefault: function () {
  2476. var e = this.originalEvent;
  2477. this.isDefaultPrevented = v, e && (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
  2478. },
  2479. stopPropagation: function () {
  2480. var e = this.originalEvent;
  2481. this.isPropagationStopped = v, e && !this.isSimulated && (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)
  2482. },
  2483. stopImmediatePropagation: function () {
  2484. var e = this.originalEvent;
  2485. this.isImmediatePropagationStopped = v, e && e.stopImmediatePropagation && e.stopImmediatePropagation(), this.stopPropagation()
  2486. }
  2487. }, pe.each({
  2488. mouseenter: "mouseover",
  2489. mouseleave: "mouseout",
  2490. pointerenter: "pointerover",
  2491. pointerleave: "pointerout"
  2492. }, function (e, t) {
  2493. pe.event.special[e] = {
  2494. delegateType: t, bindType: t, handle: function (e) {
  2495. var n, r = this, i = e.relatedTarget, o = e.handleObj;
  2496. return i && (i === r || pe.contains(r, i)) || (e.type = o.origType, n = o.handler.apply(this, arguments), e.type = t), n
  2497. }
  2498. }
  2499. }), fe.submit || (pe.event.special.submit = {
  2500. setup: function () {
  2501. return !pe.nodeName(this, "form") && void pe.event.add(this, "click._submit keypress._submit", function (e) {
  2502. var t = e.target, n = pe.nodeName(t, "input") || pe.nodeName(t, "button") ? pe.prop(t, "form") : void 0;
  2503. n && !pe._data(n, "submit") && (pe.event.add(n, "submit._submit", function (e) {
  2504. e._submitBubble = !0
  2505. }), pe._data(n, "submit", !0))
  2506. })
  2507. }, postDispatch: function (e) {
  2508. e._submitBubble && (delete e._submitBubble, this.parentNode && !e.isTrigger && pe.event.simulate("submit", this.parentNode, e))
  2509. }, teardown: function () {
  2510. return !pe.nodeName(this, "form") && void pe.event.remove(this, "._submit")
  2511. }
  2512. }), fe.change || (pe.event.special.change = {
  2513. setup: function () {
  2514. return Ye.test(this.nodeName) ? ("checkbox" !== this.type && "radio" !== this.type || (pe.event.add(this, "propertychange._change", function (e) {
  2515. "checked" === e.originalEvent.propertyName && (this._justChanged = !0)
  2516. }), pe.event.add(this, "click._change", function (e) {
  2517. this._justChanged && !e.isTrigger && (this._justChanged = !1), pe.event.simulate("change", this, e)
  2518. })), !1) : void pe.event.add(this, "beforeactivate._change", function (e) {
  2519. var t = e.target;
  2520. Ye.test(t.nodeName) && !pe._data(t, "change") && (pe.event.add(t, "change._change", function (e) {
  2521. !this.parentNode || e.isSimulated || e.isTrigger || pe.event.simulate("change", this.parentNode, e)
  2522. }), pe._data(t, "change", !0))
  2523. })
  2524. }, handle: function (e) {
  2525. var t = e.target;
  2526. if (this !== t || e.isSimulated || e.isTrigger || "radio" !== t.type && "checkbox" !== t.type) return e.handleObj.handler.apply(this, arguments)
  2527. }, teardown: function () {
  2528. return pe.event.remove(this, "._change"), !Ye.test(this.nodeName)
  2529. }
  2530. }), fe.focusin || pe.each({focus: "focusin", blur: "focusout"}, function (e, t) {
  2531. var n = function (e) {
  2532. pe.event.simulate(t, e.target, pe.event.fix(e))
  2533. };
  2534. pe.event.special[t] = {
  2535. setup: function () {
  2536. var r = this.ownerDocument || this, i = pe._data(r, t);
  2537. i || r.addEventListener(e, n, !0), pe._data(r, t, (i || 0) + 1)
  2538. }, teardown: function () {
  2539. var r = this.ownerDocument || this, i = pe._data(r, t) - 1;
  2540. i ? pe._data(r, t, i) : (r.removeEventListener(e, n, !0), pe._removeData(r, t))
  2541. }
  2542. }
  2543. }), pe.fn.extend({
  2544. on: function (e, t, n, r) {
  2545. return w(this, e, t, n, r)
  2546. }, one: function (e, t, n, r) {
  2547. return w(this, e, t, n, r, 1)
  2548. }, off: function (e, t, n) {
  2549. var r, i;
  2550. if (e && e.preventDefault && e.handleObj) return r = e.handleObj, pe(e.delegateTarget).off(r.namespace ? r.origType + "." + r.namespace : r.origType, r.selector, r.handler), this;
  2551. if ("object" == typeof e) {
  2552. for (i in e) this.off(i, t, e[i]);
  2553. return this
  2554. }
  2555. return t !== !1 && "function" != typeof t || (n = t, t = void 0), n === !1 && (n = x), this.each(function () {
  2556. pe.event.remove(this, e, n, t)
  2557. })
  2558. }, trigger: function (e, t) {
  2559. return this.each(function () {
  2560. pe.event.trigger(e, t, this)
  2561. })
  2562. }, triggerHandler: function (e, t) {
  2563. var n = this[0];
  2564. if (n) return pe.event.trigger(e, t, n, !0)
  2565. }
  2566. });
  2567. var Ze = / jQuery\d+="(?:null|\d+)"/g, et = new RegExp("<(?:" + ze + ")[\\s/>]", "i"),
  2568. tt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, nt = /<script|<style|<link/i,
  2569. rt = /checked\s*(?:[^=]|=\s*.checked.)/i, it = /^true\/(.*)/, ot = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
  2570. at = p(re), st = at.appendChild(re.createElement("div"));
  2571. pe.extend({
  2572. htmlPrefilter: function (e) {
  2573. return e.replace(tt, "<$1></$2>")
  2574. }, clone: function (e, t, n) {
  2575. var r, i, o, a, s, u = pe.contains(e.ownerDocument, e);
  2576. if (fe.html5Clone || pe.isXMLDoc(e) || !et.test("<" + e.nodeName + ">") ? o = e.cloneNode(!0) : (st.innerHTML = e.outerHTML, st.removeChild(o = st.firstChild)), !(fe.noCloneEvent && fe.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || pe.isXMLDoc(e))) for (r = h(o), s = h(e), a = 0; null != (i = s[a]); ++a) r[a] && k(i, r[a]);
  2577. if (t) if (n) for (s = s || h(e), r = r || h(o), a = 0; null != (i = s[a]); a++) N(i, r[a]); else N(e, o);
  2578. return r = h(o, "script"), r.length > 0 && g(r, !u && h(e, "script")), r = s = i = null, o
  2579. }, cleanData: function (e, t) {
  2580. for (var n, r, i, o, a = 0, s = pe.expando, u = pe.cache, l = fe.attributes, c = pe.event.special; null != (n = e[a]); a++) if ((t || He(n)) && (i = n[s], o = i && u[i])) {
  2581. if (o.events) for (r in o.events) c[r] ? pe.event.remove(n, r) : pe.removeEvent(n, r, o.handle);
  2582. u[i] && (delete u[i], l || "undefined" == typeof n.removeAttribute ? n[s] = void 0 : n.removeAttribute(s), ne.push(i))
  2583. }
  2584. }
  2585. }), pe.fn.extend({
  2586. domManip: S, detach: function (e) {
  2587. return A(this, e, !0)
  2588. }, remove: function (e) {
  2589. return A(this, e)
  2590. }, text: function (e) {
  2591. return Pe(this, function (e) {
  2592. return void 0 === e ? pe.text(this) : this.empty().append((this[0] && this[0].ownerDocument || re).createTextNode(e))
  2593. }, null, e, arguments.length)
  2594. }, append: function () {
  2595. return S(this, arguments, function (e) {
  2596. if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
  2597. var t = T(this, e);
  2598. t.appendChild(e)
  2599. }
  2600. })
  2601. }, prepend: function () {
  2602. return S(this, arguments, function (e) {
  2603. if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
  2604. var t = T(this, e);
  2605. t.insertBefore(e, t.firstChild)
  2606. }
  2607. })
  2608. }, before: function () {
  2609. return S(this, arguments, function (e) {
  2610. this.parentNode && this.parentNode.insertBefore(e, this)
  2611. })
  2612. }, after: function () {
  2613. return S(this, arguments, function (e) {
  2614. this.parentNode && this.parentNode.insertBefore(e, this.nextSibling)
  2615. })
  2616. }, empty: function () {
  2617. for (var e, t = 0; null != (e = this[t]); t++) {
  2618. for (1 === e.nodeType && pe.cleanData(h(e, !1)); e.firstChild;) e.removeChild(e.firstChild);
  2619. e.options && pe.nodeName(e, "select") && (e.options.length = 0)
  2620. }
  2621. return this
  2622. }, clone: function (e, t) {
  2623. return e = null != e && e, t = null == t ? e : t, this.map(function () {
  2624. return pe.clone(this, e, t)
  2625. })
  2626. }, html: function (e) {
  2627. return Pe(this, function (e) {
  2628. var t = this[0] || {}, n = 0, r = this.length;
  2629. if (void 0 === e) return 1 === t.nodeType ? t.innerHTML.replace(Ze, "") : void 0;
  2630. if ("string" == typeof e && !nt.test(e) && (fe.htmlSerialize || !et.test(e)) && (fe.leadingWhitespace || !$e.test(e)) && !Xe[(We.exec(e) || ["", ""])[1].toLowerCase()]) {
  2631. e = pe.htmlPrefilter(e);
  2632. try {
  2633. for (; n < r; n++) t = this[n] || {}, 1 === t.nodeType && (pe.cleanData(h(t, !1)), t.innerHTML = e);
  2634. t = 0
  2635. } catch (i) {
  2636. }
  2637. }
  2638. t && this.empty().append(e)
  2639. }, null, e, arguments.length)
  2640. }, replaceWith: function () {
  2641. var e = [];
  2642. return S(this, arguments, function (t) {
  2643. var n = this.parentNode;
  2644. pe.inArray(this, e) < 0 && (pe.cleanData(h(this)),
  2645. n && n.replaceChild(t, this))
  2646. }, e)
  2647. }
  2648. }), pe.each({
  2649. appendTo: "append",
  2650. prependTo: "prepend",
  2651. insertBefore: "before",
  2652. insertAfter: "after",
  2653. replaceAll: "replaceWith"
  2654. }, function (e, t) {
  2655. pe.fn[e] = function (e) {
  2656. for (var n, r = 0, i = [], o = pe(e), a = o.length - 1; r <= a; r++) n = r === a ? this : this.clone(!0), pe(o[r])[t](n), ae.apply(i, n.get());
  2657. return this.pushStack(i)
  2658. }
  2659. });
  2660. var ut, lt = {HTML: "block", BODY: "block"}, ct = /^margin/, ft = new RegExp("^(" + Fe + ")(?!px)[a-z%]+$", "i"),
  2661. dt = function (e, t, n, r) {
  2662. var i, o, a = {};
  2663. for (o in t) a[o] = e.style[o], e.style[o] = t[o];
  2664. i = n.apply(e, r || []);
  2665. for (o in t) e.style[o] = a[o];
  2666. return i
  2667. }, pt = re.documentElement;
  2668. !function () {
  2669. function t() {
  2670. var t, c, f = re.documentElement;
  2671. f.appendChild(u), l.style.cssText = "-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%", n = i = s = !1, r = a = !0, e.getComputedStyle && (c = e.getComputedStyle(l), n = "1%" !== (c || {}).top, s = "2px" === (c || {}).marginLeft, i = "4px" === (c || {width: "4px"}).width, l.style.marginRight = "50%", r = "4px" === (c || {marginRight: "4px"}).marginRight, t = l.appendChild(re.createElement("div")), t.style.cssText = l.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", t.style.marginRight = t.style.width = "0", l.style.width = "1px", a = !parseFloat((e.getComputedStyle(t) || {}).marginRight), l.removeChild(t)), l.style.display = "none", o = 0 === l.getClientRects().length, o && (l.style.display = "", l.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", t = l.getElementsByTagName("td"), t[0].style.cssText = "margin:0;border:0;padding:0;display:none", o = 0 === t[0].offsetHeight, o && (t[0].style.display = "", t[1].style.display = "none", o = 0 === t[0].offsetHeight)), f.removeChild(u)
  2672. }
  2673. var n, r, i, o, a, s, u = re.createElement("div"), l = re.createElement("div");
  2674. l.style && (l.style.cssText = "float:left;opacity:.5", fe.opacity = "0.5" === l.style.opacity, fe.cssFloat = !!l.style.cssFloat, l.style.backgroundClip = "content-box", l.cloneNode(!0).style.backgroundClip = "", fe.clearCloneStyle = "content-box" === l.style.backgroundClip, u = re.createElement("div"), u.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute", l.innerHTML = "", u.appendChild(l), fe.boxSizing = "" === l.style.boxSizing || "" === l.style.MozBoxSizing || "" === l.style.WebkitBoxSizing, pe.extend(fe, {
  2675. reliableHiddenOffsets: function () {
  2676. return null == n && t(), o
  2677. }, boxSizingReliable: function () {
  2678. return null == n && t(), i
  2679. }, pixelMarginRight: function () {
  2680. return null == n && t(), r
  2681. }, pixelPosition: function () {
  2682. return null == n && t(), n
  2683. }, reliableMarginRight: function () {
  2684. return null == n && t(), a
  2685. }, reliableMarginLeft: function () {
  2686. return null == n && t(), s
  2687. }
  2688. }))
  2689. }();
  2690. var ht, gt, mt = /^(top|right|bottom|left)$/;
  2691. e.getComputedStyle ? (ht = function (t) {
  2692. var n = t.ownerDocument.defaultView;
  2693. return n && n.opener || (n = e), n.getComputedStyle(t)
  2694. }, gt = function (e, t, n) {
  2695. var r, i, o, a, s = e.style;
  2696. return n = n || ht(e), a = n ? n.getPropertyValue(t) || n[t] : void 0, "" !== a && void 0 !== a || pe.contains(e.ownerDocument, e) || (a = pe.style(e, t)), n && !fe.pixelMarginRight() && ft.test(a) && ct.test(t) && (r = s.width, i = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = n.width, s.width = r, s.minWidth = i, s.maxWidth = o), void 0 === a ? a : a + ""
  2697. }) : pt.currentStyle && (ht = function (e) {
  2698. return e.currentStyle
  2699. }, gt = function (e, t, n) {
  2700. var r, i, o, a, s = e.style;
  2701. return n = n || ht(e), a = n ? n[t] : void 0, null == a && s && s[t] && (a = s[t]), ft.test(a) && !mt.test(t) && (r = s.left, i = e.runtimeStyle, o = i && i.left, o && (i.left = e.currentStyle.left), s.left = "fontSize" === t ? "1em" : a, a = s.pixelLeft + "px", s.left = r, o && (i.left = o)), void 0 === a ? a : a + "" || "auto"
  2702. });
  2703. var yt = /alpha\([^)]*\)/i, vt = /opacity\s*=\s*([^)]*)/i, xt = /^(none|table(?!-c[ea]).+)/,
  2704. bt = new RegExp("^(" + Fe + ")(.*)$", "i"), wt = {position: "absolute", visibility: "hidden", display: "block"},
  2705. Tt = {letterSpacing: "0", fontWeight: "400"}, Ct = ["Webkit", "O", "Moz", "ms"],
  2706. Et = re.createElement("div").style;
  2707. pe.extend({
  2708. cssHooks: {
  2709. opacity: {
  2710. get: function (e, t) {
  2711. if (t) {
  2712. var n = gt(e, "opacity");
  2713. return "" === n ? "1" : n
  2714. }
  2715. }
  2716. }
  2717. },
  2718. cssNumber: {
  2719. animationIterationCount: !0,
  2720. columnCount: !0,
  2721. fillOpacity: !0,
  2722. flexGrow: !0,
  2723. flexShrink: !0,
  2724. fontWeight: !0,
  2725. lineHeight: !0,
  2726. opacity: !0,
  2727. order: !0,
  2728. orphans: !0,
  2729. widows: !0,
  2730. zIndex: !0,
  2731. zoom: !0
  2732. },
  2733. cssProps: {"float": fe.cssFloat ? "cssFloat" : "styleFloat"},
  2734. style: function (e, t, n, r) {
  2735. if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) {
  2736. var i, o, a, s = pe.camelCase(t), u = e.style;
  2737. if (t = pe.cssProps[s] || (pe.cssProps[s] = H(s) || s), a = pe.cssHooks[t] || pe.cssHooks[s], void 0 === n) return a && "get" in a && void 0 !== (i = a.get(e, !1, r)) ? i : u[t];
  2738. if (o = typeof n, "string" === o && (i = Me.exec(n)) && i[1] && (n = d(e, t, i), o = "number"), null != n && n === n && ("number" === o && (n += i && i[3] || (pe.cssNumber[s] ? "" : "px")), fe.clearCloneStyle || "" !== n || 0 !== t.indexOf("background") || (u[t] = "inherit"), !(a && "set" in a && void 0 === (n = a.set(e, n, r))))) try {
  2739. u[t] = n
  2740. } catch (l) {
  2741. }
  2742. }
  2743. },
  2744. css: function (e, t, n, r) {
  2745. var i, o, a, s = pe.camelCase(t);
  2746. return t = pe.cssProps[s] || (pe.cssProps[s] = H(s) || s), a = pe.cssHooks[t] || pe.cssHooks[s], a && "get" in a && (o = a.get(e, !0, n)), void 0 === o && (o = gt(e, t, r)), "normal" === o && t in Tt && (o = Tt[t]), "" === n || n ? (i = parseFloat(o), n === !0 || isFinite(i) ? i || 0 : o) : o
  2747. }
  2748. }), pe.each(["height", "width"], function (e, t) {
  2749. pe.cssHooks[t] = {
  2750. get: function (e, n, r) {
  2751. if (n) return xt.test(pe.css(e, "display")) && 0 === e.offsetWidth ? dt(e, wt, function () {
  2752. return M(e, t, r)
  2753. }) : M(e, t, r)
  2754. }, set: function (e, n, r) {
  2755. var i = r && ht(e);
  2756. return _(e, n, r ? F(e, t, r, fe.boxSizing && "border-box" === pe.css(e, "boxSizing", !1, i), i) : 0)
  2757. }
  2758. }
  2759. }), fe.opacity || (pe.cssHooks.opacity = {
  2760. get: function (e, t) {
  2761. return vt.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : t ? "1" : ""
  2762. }, set: function (e, t) {
  2763. var n = e.style, r = e.currentStyle, i = pe.isNumeric(t) ? "alpha(opacity=" + 100 * t + ")" : "",
  2764. o = r && r.filter || n.filter || "";
  2765. n.zoom = 1, (t >= 1 || "" === t) && "" === pe.trim(o.replace(yt, "")) && n.removeAttribute && (n.removeAttribute("filter"), "" === t || r && !r.filter) || (n.filter = yt.test(o) ? o.replace(yt, i) : o + " " + i)
  2766. }
  2767. }), pe.cssHooks.marginRight = L(fe.reliableMarginRight, function (e, t) {
  2768. if (t) return dt(e, {display: "inline-block"}, gt, [e, "marginRight"])
  2769. }), pe.cssHooks.marginLeft = L(fe.reliableMarginLeft, function (e, t) {
  2770. if (t) return (parseFloat(gt(e, "marginLeft")) || (pe.contains(e.ownerDocument, e) ? e.getBoundingClientRect().left - dt(e, {marginLeft: 0}, function () {
  2771. return e.getBoundingClientRect().left
  2772. }) : 0)) + "px"
  2773. }), pe.each({margin: "", padding: "", border: "Width"}, function (e, t) {
  2774. pe.cssHooks[e + t] = {
  2775. expand: function (n) {
  2776. for (var r = 0, i = {}, o = "string" == typeof n ? n.split(" ") : [n]; r < 4; r++) i[e + Oe[r] + t] = o[r] || o[r - 2] || o[0];
  2777. return i
  2778. }
  2779. }, ct.test(e) || (pe.cssHooks[e + t].set = _)
  2780. }), pe.fn.extend({
  2781. css: function (e, t) {
  2782. return Pe(this, function (e, t, n) {
  2783. var r, i, o = {}, a = 0;
  2784. if (pe.isArray(t)) {
  2785. for (r = ht(e), i = t.length; a < i; a++) o[t[a]] = pe.css(e, t[a], !1, r);
  2786. return o
  2787. }
  2788. return void 0 !== n ? pe.style(e, t, n) : pe.css(e, t)
  2789. }, e, t, arguments.length > 1)
  2790. }, show: function () {
  2791. return q(this, !0)
  2792. }, hide: function () {
  2793. return q(this)
  2794. }, toggle: function (e) {
  2795. return "boolean" == typeof e ? e ? this.show() : this.hide() : this.each(function () {
  2796. Re(this) ? pe(this).show() : pe(this).hide()
  2797. })
  2798. }
  2799. }), pe.Tween = O, O.prototype = {
  2800. constructor: O, init: function (e, t, n, r, i, o) {
  2801. this.elem = e, this.prop = n, this.easing = i || pe.easing._default, this.options = t, this.start = this.now = this.cur(), this.end = r, this.unit = o || (pe.cssNumber[n] ? "" : "px")
  2802. }, cur: function () {
  2803. var e = O.propHooks[this.prop];
  2804. return e && e.get ? e.get(this) : O.propHooks._default.get(this)
  2805. }, run: function (e) {
  2806. var t, n = O.propHooks[this.prop];
  2807. return this.options.duration ? this.pos = t = pe.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, this.now = (this.end - this.start) * t + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), n && n.set ? n.set(this) : O.propHooks._default.set(this), this
  2808. }
  2809. }, O.prototype.init.prototype = O.prototype, O.propHooks = {
  2810. _default: {
  2811. get: function (e) {
  2812. var t;
  2813. return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = pe.css(e.elem, e.prop, ""), t && "auto" !== t ? t : 0)
  2814. }, set: function (e) {
  2815. pe.fx.step[e.prop] ? pe.fx.step[e.prop](e) : 1 !== e.elem.nodeType || null == e.elem.style[pe.cssProps[e.prop]] && !pe.cssHooks[e.prop] ? e.elem[e.prop] = e.now : pe.style(e.elem, e.prop, e.now + e.unit)
  2816. }
  2817. }
  2818. }, O.propHooks.scrollTop = O.propHooks.scrollLeft = {
  2819. set: function (e) {
  2820. e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now)
  2821. }
  2822. }, pe.easing = {
  2823. linear: function (e) {
  2824. return e
  2825. }, swing: function (e) {
  2826. return .5 - Math.cos(e * Math.PI) / 2
  2827. }, _default: "swing"
  2828. }, pe.fx = O.prototype.init, pe.fx.step = {};
  2829. var Nt, kt, St = /^(?:toggle|show|hide)$/, At = /queueHooks$/;
  2830. pe.Animation = pe.extend($, {
  2831. tweeners: {
  2832. "*": [function (e, t) {
  2833. var n = this.createTween(e, t);
  2834. return d(n.elem, e, Me.exec(t), n), n
  2835. }]
  2836. }, tweener: function (e, t) {
  2837. pe.isFunction(e) ? (t = e, e = ["*"]) : e = e.match(De);
  2838. for (var n, r = 0, i = e.length; r < i; r++) n = e[r], $.tweeners[n] = $.tweeners[n] || [], $.tweeners[n].unshift(t)
  2839. }, prefilters: [W], prefilter: function (e, t) {
  2840. t ? $.prefilters.unshift(e) : $.prefilters.push(e)
  2841. }
  2842. }), pe.speed = function (e, t, n) {
  2843. var r = e && "object" == typeof e ? pe.extend({}, e) : {
  2844. complete: n || !n && t || pe.isFunction(e) && e,
  2845. duration: e,
  2846. easing: n && t || t && !pe.isFunction(t) && t
  2847. };
  2848. return r.duration = pe.fx.off ? 0 : "number" == typeof r.duration ? r.duration : r.duration in pe.fx.speeds ? pe.fx.speeds[r.duration] : pe.fx.speeds._default, null != r.queue && r.queue !== !0 || (r.queue = "fx"), r.old = r.complete, r.complete = function () {
  2849. pe.isFunction(r.old) && r.old.call(this), r.queue && pe.dequeue(this, r.queue)
  2850. }, r
  2851. }, pe.fn.extend({
  2852. fadeTo: function (e, t, n, r) {
  2853. return this.filter(Re).css("opacity", 0).show().end().animate({opacity: t}, e, n, r)
  2854. }, animate: function (e, t, n, r) {
  2855. var i = pe.isEmptyObject(e), o = pe.speed(t, n, r), a = function () {
  2856. var t = $(this, pe.extend({}, e), o);
  2857. (i || pe._data(this, "finish")) && t.stop(!0)
  2858. };
  2859. return a.finish = a, i || o.queue === !1 ? this.each(a) : this.queue(o.queue, a)
  2860. }, stop: function (e, t, n) {
  2861. var r = function (e) {
  2862. var t = e.stop;
  2863. delete e.stop, t(n)
  2864. };
  2865. return "string" != typeof e && (n = t, t = e, e = void 0), t && e !== !1 && this.queue(e || "fx", []), this.each(function () {
  2866. var t = !0, i = null != e && e + "queueHooks", o = pe.timers, a = pe._data(this);
  2867. if (i) a[i] && a[i].stop && r(a[i]); else for (i in a) a[i] && a[i].stop && At.test(i) && r(a[i]);
  2868. for (i = o.length; i--;) o[i].elem !== this || null != e && o[i].queue !== e || (o[i].anim.stop(n), t = !1, o.splice(i, 1));
  2869. !t && n || pe.dequeue(this, e)
  2870. })
  2871. }, finish: function (e) {
  2872. return e !== !1 && (e = e || "fx"), this.each(function () {
  2873. var t, n = pe._data(this), r = n[e + "queue"], i = n[e + "queueHooks"], o = pe.timers,
  2874. a = r ? r.length : 0;
  2875. for (n.finish = !0, pe.queue(this, e, []), i && i.stop && i.stop.call(this, !0), t = o.length; t--;) o[t].elem === this && o[t].queue === e && (o[t].anim.stop(!0), o.splice(t, 1));
  2876. for (t = 0; t < a; t++) r[t] && r[t].finish && r[t].finish.call(this);
  2877. delete n.finish
  2878. })
  2879. }
  2880. }), pe.each(["toggle", "show", "hide"], function (e, t) {
  2881. var n = pe.fn[t];
  2882. pe.fn[t] = function (e, r, i) {
  2883. return null == e || "boolean" == typeof e ? n.apply(this, arguments) : this.animate(P(t, !0), e, r, i)
  2884. }
  2885. }), pe.each({
  2886. slideDown: P("show"),
  2887. slideUp: P("hide"),
  2888. slideToggle: P("toggle"),
  2889. fadeIn: {opacity: "show"},
  2890. fadeOut: {opacity: "hide"},
  2891. fadeToggle: {opacity: "toggle"}
  2892. }, function (e, t) {
  2893. pe.fn[e] = function (e, n, r) {
  2894. return this.animate(t, e, n, r)
  2895. }
  2896. }), pe.timers = [], pe.fx.tick = function () {
  2897. var e, t = pe.timers, n = 0;
  2898. for (Nt = pe.now(); n < t.length; n++) e = t[n], e() || t[n] !== e || t.splice(n--, 1);
  2899. t.length || pe.fx.stop(), Nt = void 0
  2900. }, pe.fx.timer = function (e) {
  2901. pe.timers.push(e), e() ? pe.fx.start() : pe.timers.pop()
  2902. }, pe.fx.interval = 13, pe.fx.start = function () {
  2903. kt || (kt = e.setInterval(pe.fx.tick, pe.fx.interval))
  2904. }, pe.fx.stop = function () {
  2905. e.clearInterval(kt), kt = null
  2906. }, pe.fx.speeds = {slow: 600, fast: 200, _default: 400}, pe.fn.delay = function (t, n) {
  2907. return t = pe.fx ? pe.fx.speeds[t] || t : t, n = n || "fx", this.queue(n, function (n, r) {
  2908. var i = e.setTimeout(n, t);
  2909. r.stop = function () {
  2910. e.clearTimeout(i)
  2911. }
  2912. })
  2913. }, function () {
  2914. var e, t = re.createElement("input"), n = re.createElement("div"), r = re.createElement("select"),
  2915. i = r.appendChild(re.createElement("option"));
  2916. n = re.createElement("div"), n.setAttribute("className", "t"), n.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", e = n.getElementsByTagName("a")[0], t.setAttribute("type", "checkbox"), n.appendChild(t), e = n.getElementsByTagName("a")[0], e.style.cssText = "top:1px", fe.getSetAttribute = "t" !== n.className, fe.style = /top/.test(e.getAttribute("style")), fe.hrefNormalized = "/a" === e.getAttribute("href"), fe.checkOn = !!t.value, fe.optSelected = i.selected, fe.enctype = !!re.createElement("form").enctype, r.disabled = !0, fe.optDisabled = !i.disabled, t = re.createElement("input"), t.setAttribute("value", ""), fe.input = "" === t.getAttribute("value"), t.value = "t", t.setAttribute("type", "radio"), fe.radioValue = "t" === t.value
  2917. }();
  2918. var Dt = /\r/g, jt = /[\x20\t\r\n\f]+/g;
  2919. pe.fn.extend({
  2920. val: function (e) {
  2921. var t, n, r, i = this[0];
  2922. {
  2923. if (arguments.length) return r = pe.isFunction(e), this.each(function (n) {
  2924. var i;
  2925. 1 === this.nodeType && (i = r ? e.call(this, n, pe(this).val()) : e, null == i ? i = "" : "number" == typeof i ? i += "" : pe.isArray(i) && (i = pe.map(i, function (e) {
  2926. return null == e ? "" : e + ""
  2927. })), t = pe.valHooks[this.type] || pe.valHooks[this.nodeName.toLowerCase()], t && "set" in t && void 0 !== t.set(this, i, "value") || (this.value = i))
  2928. });
  2929. if (i) return t = pe.valHooks[i.type] || pe.valHooks[i.nodeName.toLowerCase()], t && "get" in t && void 0 !== (n = t.get(i, "value")) ? n : (n = i.value, "string" == typeof n ? n.replace(Dt, "") : null == n ? "" : n)
  2930. }
  2931. }
  2932. }), pe.extend({
  2933. valHooks: {
  2934. option: {
  2935. get: function (e) {
  2936. var t = pe.find.attr(e, "value");
  2937. return null != t ? t : pe.trim(pe.text(e)).replace(jt, " ")
  2938. }
  2939. }, select: {
  2940. get: function (e) {
  2941. for (var t, n, r = e.options, i = e.selectedIndex, o = "select-one" === e.type || i < 0, a = o ? null : [], s = o ? i + 1 : r.length, u = i < 0 ? s : o ? i : 0; u < s; u++) if (n = r[u], (n.selected || u === i) && (fe.optDisabled ? !n.disabled : null === n.getAttribute("disabled")) && (!n.parentNode.disabled || !pe.nodeName(n.parentNode, "optgroup"))) {
  2942. if (t = pe(n).val(), o) return t;
  2943. a.push(t)
  2944. }
  2945. return a
  2946. }, set: function (e, t) {
  2947. for (var n, r, i = e.options, o = pe.makeArray(t), a = i.length; a--;) if (r = i[a], pe.inArray(pe.valHooks.option.get(r), o) > -1) try {
  2948. r.selected = n = !0
  2949. } catch (s) {
  2950. r.scrollHeight
  2951. } else r.selected = !1;
  2952. return n || (e.selectedIndex = -1), i
  2953. }
  2954. }
  2955. }
  2956. }), pe.each(["radio", "checkbox"], function () {
  2957. pe.valHooks[this] = {
  2958. set: function (e, t) {
  2959. if (pe.isArray(t)) return e.checked = pe.inArray(pe(e).val(), t) > -1
  2960. }
  2961. }, fe.checkOn || (pe.valHooks[this].get = function (e) {
  2962. return null === e.getAttribute("value") ? "on" : e.value
  2963. })
  2964. });
  2965. var Lt, Ht, qt = pe.expr.attrHandle, _t = /^(?:checked|selected)$/i, Ft = fe.getSetAttribute, Mt = fe.input;
  2966. pe.fn.extend({
  2967. attr: function (e, t) {
  2968. return Pe(this, pe.attr, e, t, arguments.length > 1)
  2969. }, removeAttr: function (e) {
  2970. return this.each(function () {
  2971. pe.removeAttr(this, e)
  2972. })
  2973. }
  2974. }), pe.extend({
  2975. attr: function (e, t, n) {
  2976. var r, i, o = e.nodeType;
  2977. if (3 !== o && 8 !== o && 2 !== o) return "undefined" == typeof e.getAttribute ? pe.prop(e, t, n) : (1 === o && pe.isXMLDoc(e) || (t = t.toLowerCase(), i = pe.attrHooks[t] || (pe.expr.match.bool.test(t) ? Ht : Lt)), void 0 !== n ? null === n ? void pe.removeAttr(e, t) : i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ""), n) : i && "get" in i && null !== (r = i.get(e, t)) ? r : (r = pe.find.attr(e, t), null == r ? void 0 : r))
  2978. }, attrHooks: {
  2979. type: {
  2980. set: function (e, t) {
  2981. if (!fe.radioValue && "radio" === t && pe.nodeName(e, "input")) {
  2982. var n = e.value;
  2983. return e.setAttribute("type", t), n && (e.value = n), t
  2984. }
  2985. }
  2986. }
  2987. }, removeAttr: function (e, t) {
  2988. var n, r, i = 0, o = t && t.match(De);
  2989. if (o && 1 === e.nodeType) for (; n = o[i++];) r = pe.propFix[n] || n, pe.expr.match.bool.test(n) ? Mt && Ft || !_t.test(n) ? e[r] = !1 : e[pe.camelCase("default-" + n)] = e[r] = !1 : pe.attr(e, n, ""), e.removeAttribute(Ft ? n : r)
  2990. }
  2991. }), Ht = {
  2992. set: function (e, t, n) {
  2993. return t === !1 ? pe.removeAttr(e, n) : Mt && Ft || !_t.test(n) ? e.setAttribute(!Ft && pe.propFix[n] || n, n) : e[pe.camelCase("default-" + n)] = e[n] = !0, n
  2994. }
  2995. }, pe.each(pe.expr.match.bool.source.match(/\w+/g), function (e, t) {
  2996. var n = qt[t] || pe.find.attr;
  2997. Mt && Ft || !_t.test(t) ? qt[t] = function (e, t, r) {
  2998. var i, o;
  2999. return r || (o = qt[t], qt[t] = i, i = null != n(e, t, r) ? t.toLowerCase() : null, qt[t] = o), i
  3000. } : qt[t] = function (e, t, n) {
  3001. if (!n) return e[pe.camelCase("default-" + t)] ? t.toLowerCase() : null
  3002. }
  3003. }), Mt && Ft || (pe.attrHooks.value = {
  3004. set: function (e, t, n) {
  3005. return pe.nodeName(e, "input") ? void (e.defaultValue = t) : Lt && Lt.set(e, t, n)
  3006. }
  3007. }), Ft || (Lt = {
  3008. set: function (e, t, n) {
  3009. var r = e.getAttributeNode(n);
  3010. if (r || e.setAttributeNode(r = e.ownerDocument.createAttribute(n)), r.value = t += "", "value" === n || t === e.getAttribute(n)) return t
  3011. }
  3012. }, qt.id = qt.name = qt.coords = function (e, t, n) {
  3013. var r;
  3014. if (!n) return (r = e.getAttributeNode(t)) && "" !== r.value ? r.value : null
  3015. }, pe.valHooks.button = {
  3016. get: function (e, t) {
  3017. var n = e.getAttributeNode(t);
  3018. if (n && n.specified) return n.value
  3019. }, set: Lt.set
  3020. }, pe.attrHooks.contenteditable = {
  3021. set: function (e, t, n) {
  3022. Lt.set(e, "" !== t && t, n)
  3023. }
  3024. }, pe.each(["width", "height"], function (e, t) {
  3025. pe.attrHooks[t] = {
  3026. set: function (e, n) {
  3027. if ("" === n) return e.setAttribute(t, "auto"), n
  3028. }
  3029. }
  3030. })), fe.style || (pe.attrHooks.style = {
  3031. get: function (e) {
  3032. return e.style.cssText || void 0
  3033. }, set: function (e, t) {
  3034. return e.style.cssText = t + ""
  3035. }
  3036. });
  3037. var Ot = /^(?:input|select|textarea|button|object)$/i, Rt = /^(?:a|area)$/i;
  3038. pe.fn.extend({
  3039. prop: function (e, t) {
  3040. return Pe(this, pe.prop, e, t, arguments.length > 1)
  3041. }, removeProp: function (e) {
  3042. return e = pe.propFix[e] || e, this.each(function () {
  3043. try {
  3044. this[e] = void 0, delete this[e]
  3045. } catch (t) {
  3046. }
  3047. })
  3048. }
  3049. }), pe.extend({
  3050. prop: function (e, t, n) {
  3051. var r, i, o = e.nodeType;
  3052. if (3 !== o && 8 !== o && 2 !== o) return 1 === o && pe.isXMLDoc(e) || (t = pe.propFix[t] || t, i = pe.propHooks[t]), void 0 !== n ? i && "set" in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && "get" in i && null !== (r = i.get(e, t)) ? r : e[t]
  3053. }, propHooks: {
  3054. tabIndex: {
  3055. get: function (e) {
  3056. var t = pe.find.attr(e, "tabindex");
  3057. return t ? parseInt(t, 10) : Ot.test(e.nodeName) || Rt.test(e.nodeName) && e.href ? 0 : -1
  3058. }
  3059. }
  3060. }, propFix: {"for": "htmlFor", "class": "className"}
  3061. }), fe.hrefNormalized || pe.each(["href", "src"], function (e, t) {
  3062. pe.propHooks[t] = {
  3063. get: function (e) {
  3064. return e.getAttribute(t, 4)
  3065. }
  3066. }
  3067. }), fe.optSelected || (pe.propHooks.selected = {
  3068. get: function (e) {
  3069. var t = e.parentNode;
  3070. return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex), null
  3071. }, set: function (e) {
  3072. var t = e.parentNode;
  3073. t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex)
  3074. }
  3075. }), pe.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function () {
  3076. pe.propFix[this.toLowerCase()] = this
  3077. }), fe.enctype || (pe.propFix.enctype = "encoding");
  3078. var Pt = /[\t\r\n\f]/g;
  3079. pe.fn.extend({
  3080. addClass: function (e) {
  3081. var t, n, r, i, o, a, s, u = 0;
  3082. if (pe.isFunction(e)) return this.each(function (t) {
  3083. pe(this).addClass(e.call(this, t, z(this)))
  3084. });
  3085. if ("string" == typeof e && e) for (t = e.match(De) || []; n = this[u++];) if (i = z(n), r = 1 === n.nodeType && (" " + i + " ").replace(Pt, " ")) {
  3086. for (a = 0; o = t[a++];) r.indexOf(" " + o + " ") < 0 && (r += o + " ");
  3087. s = pe.trim(r), i !== s && pe.attr(n, "class", s)
  3088. }
  3089. return this
  3090. }, removeClass: function (e) {
  3091. var t, n, r, i, o, a, s, u = 0;
  3092. if (pe.isFunction(e)) return this.each(function (t) {
  3093. pe(this).removeClass(e.call(this, t, z(this)))
  3094. });
  3095. if (!arguments.length) return this.attr("class", "");
  3096. if ("string" == typeof e && e) for (t = e.match(De) || []; n = this[u++];) if (i = z(n), r = 1 === n.nodeType && (" " + i + " ").replace(Pt, " ")) {
  3097. for (a = 0; o = t[a++];) for (; r.indexOf(" " + o + " ") > -1;) r = r.replace(" " + o + " ", " ");
  3098. s = pe.trim(r), i !== s && pe.attr(n, "class", s)
  3099. }
  3100. return this
  3101. }, toggleClass: function (e, t) {
  3102. var n = typeof e;
  3103. return "boolean" == typeof t && "string" === n ? t ? this.addClass(e) : this.removeClass(e) : pe.isFunction(e) ? this.each(function (n) {
  3104. pe(this).toggleClass(e.call(this, n, z(this), t), t)
  3105. }) : this.each(function () {
  3106. var t, r, i, o;
  3107. if ("string" === n) for (r = 0, i = pe(this), o = e.match(De) || []; t = o[r++];) i.hasClass(t) ? i.removeClass(t) : i.addClass(t); else void 0 !== e && "boolean" !== n || (t = z(this), t && pe._data(this, "__className__", t), pe.attr(this, "class", t || e === !1 ? "" : pe._data(this, "__className__") || ""))
  3108. })
  3109. }, hasClass: function (e) {
  3110. var t, n, r = 0;
  3111. for (t = " " + e + " "; n = this[r++];) if (1 === n.nodeType && (" " + z(n) + " ").replace(Pt, " ").indexOf(t) > -1) return !0;
  3112. return !1
  3113. }
  3114. }), pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (e, t) {
  3115. pe.fn[t] = function (e, n) {
  3116. return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t)
  3117. }
  3118. }), pe.fn.extend({
  3119. hover: function (e, t) {
  3120. return this.mouseenter(e).mouseleave(t || e)
  3121. }
  3122. });
  3123. var Bt = e.location, Wt = pe.now(), It = /\?/,
  3124. $t = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
  3125. pe.parseJSON = function (t) {
  3126. if (e.JSON && e.JSON.parse) return e.JSON.parse(t + "");
  3127. var n, r = null, i = pe.trim(t + "");
  3128. return i && !pe.trim(i.replace($t, function (e, t, i, o) {
  3129. return n && t && (r = 0), 0 === r ? e : (n = i || t, r += !o - !i, "")
  3130. })) ? Function("return " + i)() : pe.error("Invalid JSON: " + t)
  3131. }, pe.parseXML = function (t) {
  3132. var n, r;
  3133. if (!t || "string" != typeof t) return null;
  3134. try {
  3135. e.DOMParser ? (r = new e.DOMParser, n = r.parseFromString(t, "text/xml")) : (n = new e.ActiveXObject("Microsoft.XMLDOM"), n.async = "false", n.loadXML(t))
  3136. } catch (i) {
  3137. n = void 0
  3138. }
  3139. return n && n.documentElement && !n.getElementsByTagName("parsererror").length || pe.error("Invalid XML: " + t), n
  3140. };
  3141. var zt = /#.*$/, Xt = /([?&])_=[^&]*/, Ut = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
  3142. Vt = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Yt = /^(?:GET|HEAD)$/, Jt = /^\/\//,
  3143. Gt = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, Kt = {}, Qt = {}, Zt = "*/".concat("*"),
  3144. en = Bt.href, tn = Gt.exec(en.toLowerCase()) || [];
  3145. pe.extend({
  3146. active: 0,
  3147. lastModified: {},
  3148. etag: {},
  3149. ajaxSettings: {
  3150. url: en,
  3151. type: "GET",
  3152. isLocal: Vt.test(tn[1]),
  3153. global: !0,
  3154. processData: !0,
  3155. async: !0,
  3156. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  3157. accepts: {
  3158. "*": Zt,
  3159. text: "text/plain",
  3160. html: "text/html",
  3161. xml: "application/xml, text/xml",
  3162. json: "application/json, text/javascript"
  3163. },
  3164. contents: {xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/},
  3165. responseFields: {xml: "responseXML", text: "responseText", json: "responseJSON"},
  3166. converters: {"* text": String, "text html": !0, "text json": pe.parseJSON, "text xml": pe.parseXML},
  3167. flatOptions: {url: !0, context: !0}
  3168. },
  3169. ajaxSetup: function (e, t) {
  3170. return t ? V(V(e, pe.ajaxSettings), t) : V(pe.ajaxSettings, e)
  3171. },
  3172. ajaxPrefilter: X(Kt),
  3173. ajaxTransport: X(Qt),
  3174. ajax: function (t, n) {
  3175. function r(t, n, r, i) {
  3176. var o, f, v, x, w, C = n;
  3177. 2 !== b && (b = 2, u && e.clearTimeout(u), c = void 0, s = i || "", T.readyState = t > 0 ? 4 : 0, o = t >= 200 && t < 300 || 304 === t, r && (x = Y(d, T, r)), x = J(d, x, T, o), o ? (d.ifModified && (w = T.getResponseHeader("Last-Modified"), w && (pe.lastModified[a] = w), w = T.getResponseHeader("etag"), w && (pe.etag[a] = w)), 204 === t || "HEAD" === d.type ? C = "nocontent" : 304 === t ? C = "notmodified" : (C = x.state, f = x.data, v = x.error, o = !v)) : (v = C, !t && C || (C = "error", t < 0 && (t = 0))), T.status = t, T.statusText = (n || C) + "", o ? g.resolveWith(p, [f, C, T]) : g.rejectWith(p, [T, C, v]), T.statusCode(y), y = void 0, l && h.trigger(o ? "ajaxSuccess" : "ajaxError", [T, d, o ? f : v]), m.fireWith(p, [T, C]), l && (h.trigger("ajaxComplete", [T, d]), --pe.active || pe.event.trigger("ajaxStop")))
  3178. }
  3179. "object" == typeof t && (n = t, t = void 0), n = n || {};
  3180. var i, o, a, s, u, l, c, f, d = pe.ajaxSetup({}, n), p = d.context || d,
  3181. h = d.context && (p.nodeType || p.jquery) ? pe(p) : pe.event, g = pe.Deferred(),
  3182. m = pe.Callbacks("once memory"), y = d.statusCode || {}, v = {}, x = {}, b = 0, w = "canceled", T = {
  3183. readyState: 0, getResponseHeader: function (e) {
  3184. var t;
  3185. if (2 === b) {
  3186. if (!f) for (f = {}; t = Ut.exec(s);) f[t[1].toLowerCase()] = t[2];
  3187. t = f[e.toLowerCase()]
  3188. }
  3189. return null == t ? null : t
  3190. }, getAllResponseHeaders: function () {
  3191. return 2 === b ? s : null
  3192. }, setRequestHeader: function (e, t) {
  3193. var n = e.toLowerCase();
  3194. return b || (e = x[n] = x[n] || e, v[e] = t), this
  3195. }, overrideMimeType: function (e) {
  3196. return b || (d.mimeType = e), this
  3197. }, statusCode: function (e) {
  3198. var t;
  3199. if (e) if (b < 2) for (t in e) y[t] = [y[t], e[t]]; else T.always(e[T.status]);
  3200. return this
  3201. }, abort: function (e) {
  3202. var t = e || w;
  3203. return c && c.abort(t), r(0, t), this
  3204. }
  3205. };
  3206. if (g.promise(T).complete = m.add, T.success = T.done, T.error = T.fail, d.url = ((t || d.url || en) + "").replace(zt, "").replace(Jt, tn[1] + "//"), d.type = n.method || n.type || d.method || d.type, d.dataTypes = pe.trim(d.dataType || "*").toLowerCase().match(De) || [""], null == d.crossDomain && (i = Gt.exec(d.url.toLowerCase()), d.crossDomain = !(!i || i[1] === tn[1] && i[2] === tn[2] && (i[3] || ("http:" === i[1] ? "80" : "443")) === (tn[3] || ("http:" === tn[1] ? "80" : "443")))), d.data && d.processData && "string" != typeof d.data && (d.data = pe.param(d.data, d.traditional)), U(Kt, d, n, T), 2 === b) return T;
  3207. l = pe.event && d.global, l && 0 === pe.active++ && pe.event.trigger("ajaxStart"), d.type = d.type.toUpperCase(), d.hasContent = !Yt.test(d.type), a = d.url, d.hasContent || (d.data && (a = d.url += (It.test(a) ? "&" : "?") + d.data, delete d.data), d.cache === !1 && (d.url = Xt.test(a) ? a.replace(Xt, "$1_=" + Wt++) : a + (It.test(a) ? "&" : "?") + "_=" + Wt++)), d.ifModified && (pe.lastModified[a] && T.setRequestHeader("If-Modified-Since", pe.lastModified[a]), pe.etag[a] && T.setRequestHeader("If-None-Match", pe.etag[a])), (d.data && d.hasContent && d.contentType !== !1 || n.contentType) && T.setRequestHeader("Content-Type", d.contentType), T.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + ("*" !== d.dataTypes[0] ? ", " + Zt + "; q=0.01" : "") : d.accepts["*"]);
  3208. for (o in d.headers) T.setRequestHeader(o, d.headers[o]);
  3209. if (d.beforeSend && (d.beforeSend.call(p, T, d) === !1 || 2 === b)) return T.abort();
  3210. w = "abort";
  3211. for (o in{success: 1, error: 1, complete: 1}) T[o](d[o]);
  3212. if (c = U(Qt, d, n, T)) {
  3213. if (T.readyState = 1, l && h.trigger("ajaxSend", [T, d]), 2 === b) return T;
  3214. d.async && d.timeout > 0 && (u = e.setTimeout(function () {
  3215. T.abort("timeout")
  3216. }, d.timeout));
  3217. try {
  3218. b = 1, c.send(v, r)
  3219. } catch (C) {
  3220. if (!(b < 2)) throw C;
  3221. r(-1, C)
  3222. }
  3223. } else r(-1, "No Transport");
  3224. return T
  3225. },
  3226. getJSON: function (e, t, n) {
  3227. return pe.get(e, t, n, "json")
  3228. },
  3229. getScript: function (e, t) {
  3230. return pe.get(e, void 0, t, "script")
  3231. }
  3232. }), pe.each(["get", "post"], function (e, t) {
  3233. pe[t] = function (e, n, r, i) {
  3234. return pe.isFunction(n) && (i = i || r, r = n, n = void 0), pe.ajax(pe.extend({
  3235. url: e,
  3236. type: t,
  3237. dataType: i,
  3238. data: n,
  3239. success: r
  3240. }, pe.isPlainObject(e) && e))
  3241. }
  3242. }), pe._evalUrl = function (e) {
  3243. return pe.ajax({url: e, type: "GET", dataType: "script", cache: !0, async: !1, global: !1, "throws": !0})
  3244. }, pe.fn.extend({
  3245. wrapAll: function (e) {
  3246. if (pe.isFunction(e)) return this.each(function (t) {
  3247. pe(this).wrapAll(e.call(this, t))
  3248. });
  3249. if (this[0]) {
  3250. var t = pe(e, this[0].ownerDocument).eq(0).clone(!0);
  3251. this[0].parentNode && t.insertBefore(this[0]), t.map(function () {
  3252. for (var e = this; e.firstChild && 1 === e.firstChild.nodeType;) e = e.firstChild;
  3253. return e
  3254. }).append(this)
  3255. }
  3256. return this
  3257. }, wrapInner: function (e) {
  3258. return pe.isFunction(e) ? this.each(function (t) {
  3259. pe(this).wrapInner(e.call(this, t))
  3260. }) : this.each(function () {
  3261. var t = pe(this), n = t.contents();
  3262. n.length ? n.wrapAll(e) : t.append(e)
  3263. })
  3264. }, wrap: function (e) {
  3265. var t = pe.isFunction(e);
  3266. return this.each(function (n) {
  3267. pe(this).wrapAll(t ? e.call(this, n) : e)
  3268. })
  3269. }, unwrap: function () {
  3270. return this.parent().each(function () {
  3271. pe.nodeName(this, "body") || pe(this).replaceWith(this.childNodes)
  3272. }).end()
  3273. }
  3274. }), pe.expr.filters.hidden = function (e) {
  3275. return fe.reliableHiddenOffsets() ? e.offsetWidth <= 0 && e.offsetHeight <= 0 && !e.getClientRects().length : K(e)
  3276. }, pe.expr.filters.visible = function (e) {
  3277. return !pe.expr.filters.hidden(e)
  3278. };
  3279. var nn = /%20/g, rn = /\[\]$/, on = /\r?\n/g, an = /^(?:submit|button|image|reset|file)$/i,
  3280. sn = /^(?:input|select|textarea|keygen)/i;
  3281. pe.param = function (e, t) {
  3282. var n, r = [], i = function (e, t) {
  3283. t = pe.isFunction(t) ? t() : null == t ? "" : t, r[r.length] = encodeURIComponent(e) + "=" + encodeURIComponent(t)
  3284. };
  3285. if (void 0 === t && (t = pe.ajaxSettings && pe.ajaxSettings.traditional), pe.isArray(e) || e.jquery && !pe.isPlainObject(e)) pe.each(e, function () {
  3286. i(this.name, this.value)
  3287. }); else for (n in e) Q(n, e[n], t, i);
  3288. return r.join("&").replace(nn, "+")
  3289. }, pe.fn.extend({
  3290. serialize: function () {
  3291. return pe.param(this.serializeArray())
  3292. }, serializeArray: function () {
  3293. return this.map(function () {
  3294. var e = pe.prop(this, "elements");
  3295. return e ? pe.makeArray(e) : this
  3296. }).filter(function () {
  3297. var e = this.type;
  3298. return this.name && !pe(this).is(":disabled") && sn.test(this.nodeName) && !an.test(e) && (this.checked || !Be.test(e))
  3299. }).map(function (e, t) {
  3300. var n = pe(this).val();
  3301. return null == n ? null : pe.isArray(n) ? pe.map(n, function (e) {
  3302. return {name: t.name, value: e.replace(on, "\r\n")}
  3303. }) : {name: t.name, value: n.replace(on, "\r\n")}
  3304. }).get()
  3305. }
  3306. }), pe.ajaxSettings.xhr = void 0 !== e.ActiveXObject ? function () {
  3307. return this.isLocal ? ee() : re.documentMode > 8 ? Z() : /^(get|post|head|put|delete|options)$/i.test(this.type) && Z() || ee()
  3308. } : Z;
  3309. var un = 0, ln = {}, cn = pe.ajaxSettings.xhr();
  3310. e.attachEvent && e.attachEvent("onunload", function () {
  3311. for (var e in ln) ln[e](void 0, !0)
  3312. }), fe.cors = !!cn && "withCredentials" in cn, cn = fe.ajax = !!cn, cn && pe.ajaxTransport(function (t) {
  3313. if (!t.crossDomain || fe.cors) {
  3314. var n;
  3315. return {
  3316. send: function (r, i) {
  3317. var o, a = t.xhr(), s = ++un;
  3318. if (a.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (o in t.xhrFields) a[o] = t.xhrFields[o];
  3319. t.mimeType && a.overrideMimeType && a.overrideMimeType(t.mimeType), t.crossDomain || r["X-Requested-With"] || (r["X-Requested-With"] = "XMLHttpRequest");
  3320. for (o in r) void 0 !== r[o] && a.setRequestHeader(o, r[o] + "");
  3321. a.send(t.hasContent && t.data || null), n = function (e, r) {
  3322. var o, u, l;
  3323. if (n && (r || 4 === a.readyState)) if (delete ln[s], n = void 0, a.onreadystatechange = pe.noop, r) 4 !== a.readyState && a.abort(); else {
  3324. l = {}, o = a.status, "string" == typeof a.responseText && (l.text = a.responseText);
  3325. try {
  3326. u = a.statusText
  3327. } catch (c) {
  3328. u = ""
  3329. }
  3330. o || !t.isLocal || t.crossDomain ? 1223 === o && (o = 204) : o = l.text ? 200 : 404
  3331. }
  3332. l && i(o, u, l, a.getAllResponseHeaders())
  3333. }, t.async ? 4 === a.readyState ? e.setTimeout(n) : a.onreadystatechange = ln[s] = n : n()
  3334. }, abort: function () {
  3335. n && n(void 0, !0)
  3336. }
  3337. }
  3338. }
  3339. }), pe.ajaxSetup({
  3340. accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
  3341. contents: {script: /\b(?:java|ecma)script\b/},
  3342. converters: {
  3343. "text script": function (e) {
  3344. return pe.globalEval(e), e
  3345. }
  3346. }
  3347. }), pe.ajaxPrefilter("script", function (e) {
  3348. void 0 === e.cache && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1)
  3349. }), pe.ajaxTransport("script", function (e) {
  3350. if (e.crossDomain) {
  3351. var t, n = re.head || pe("head")[0] || re.documentElement;
  3352. return {
  3353. send: function (r, i) {
  3354. t = re.createElement("script"), t.async = !0, e.scriptCharset && (t.charset = e.scriptCharset), t.src = e.url, t.onload = t.onreadystatechange = function (e, n) {
  3355. (n || !t.readyState || /loaded|complete/.test(t.readyState)) && (t.onload = t.onreadystatechange = null, t.parentNode && t.parentNode.removeChild(t), t = null, n || i(200, "success"))
  3356. }, n.insertBefore(t, n.firstChild)
  3357. }, abort: function () {
  3358. t && t.onload(void 0, !0)
  3359. }
  3360. }
  3361. }
  3362. });
  3363. var fn = [], dn = /(=)\?(?=&|$)|\?\?/;
  3364. pe.ajaxSetup({
  3365. jsonp: "callback", jsonpCallback: function () {
  3366. var e = fn.pop() || pe.expando + "_" + Wt++;
  3367. return this[e] = !0, e
  3368. }
  3369. }), pe.ajaxPrefilter("json jsonp", function (t, n, r) {
  3370. var i, o, a,
  3371. s = t.jsonp !== !1 && (dn.test(t.url) ? "url" : "string" == typeof t.data && 0 === (t.contentType || "").indexOf("application/x-www-form-urlencoded") && dn.test(t.data) && "data");
  3372. if (s || "jsonp" === t.dataTypes[0]) return i = t.jsonpCallback = pe.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, s ? t[s] = t[s].replace(dn, "$1" + i) : t.jsonp !== !1 && (t.url += (It.test(t.url) ? "&" : "?") + t.jsonp + "=" + i), t.converters["script json"] = function () {
  3373. return a || pe.error(i + " was not called"), a[0]
  3374. }, t.dataTypes[0] = "json", o = e[i], e[i] = function () {
  3375. a = arguments
  3376. }, r.always(function () {
  3377. void 0 === o ? pe(e).removeProp(i) : e[i] = o, t[i] && (t.jsonpCallback = n.jsonpCallback, fn.push(i)), a && pe.isFunction(o) && o(a[0]), a = o = void 0
  3378. }), "script"
  3379. }), pe.parseHTML = function (e, t, n) {
  3380. if (!e || "string" != typeof e) return null;
  3381. "boolean" == typeof t && (n = t, t = !1), t = t || re;
  3382. var r = Te.exec(e), i = !n && [];
  3383. return r ? [t.createElement(r[1])] : (r = y([e], t, i), i && i.length && pe(i).remove(), pe.merge([], r.childNodes))
  3384. };
  3385. var pn = pe.fn.load;
  3386. return pe.fn.load = function (e, t, n) {
  3387. if ("string" != typeof e && pn) return pn.apply(this, arguments);
  3388. var r, i, o, a = this, s = e.indexOf(" ");
  3389. return s > -1 && (r = pe.trim(e.slice(s, e.length)), e = e.slice(0, s)), pe.isFunction(t) ? (n = t, t = void 0) : t && "object" == typeof t && (i = "POST"), a.length > 0 && pe.ajax({
  3390. url: e,
  3391. type: i || "GET",
  3392. dataType: "html",
  3393. data: t
  3394. }).done(function (e) {
  3395. o = arguments, a.html(r ? pe("<div>").append(pe.parseHTML(e)).find(r) : e)
  3396. }).always(n && function (e, t) {
  3397. a.each(function () {
  3398. n.apply(this, o || [e.responseText, t, e])
  3399. })
  3400. }), this
  3401. }, pe.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (e, t) {
  3402. pe.fn[t] = function (e) {
  3403. return this.on(t, e)
  3404. }
  3405. }), pe.expr.filters.animated = function (e) {
  3406. return pe.grep(pe.timers, function (t) {
  3407. return e === t.elem
  3408. }).length
  3409. }, pe.offset = {
  3410. setOffset: function (e, t, n) {
  3411. var r, i, o, a, s, u, l, c = pe.css(e, "position"), f = pe(e), d = {};
  3412. "static" === c && (e.style.position = "relative"), s = f.offset(), o = pe.css(e, "top"), u = pe.css(e, "left"), l = ("absolute" === c || "fixed" === c) && pe.inArray("auto", [o, u]) > -1, l ? (r = f.position(), a = r.top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(u) || 0), pe.isFunction(t) && (t = t.call(e, n, pe.extend({}, s))), null != t.top && (d.top = t.top - s.top + a), null != t.left && (d.left = t.left - s.left + i), "using" in t ? t.using.call(e, d) : f.css(d)
  3413. }
  3414. }, pe.fn.extend({
  3415. offset: function (e) {
  3416. if (arguments.length) return void 0 === e ? this : this.each(function (t) {
  3417. pe.offset.setOffset(this, e, t)
  3418. });
  3419. var t, n, r = {top: 0, left: 0}, i = this[0], o = i && i.ownerDocument;
  3420. if (o) return t = o.documentElement, pe.contains(t, i) ? ("undefined" != typeof i.getBoundingClientRect && (r = i.getBoundingClientRect()), n = te(o), {
  3421. top: r.top + (n.pageYOffset || t.scrollTop) - (t.clientTop || 0),
  3422. left: r.left + (n.pageXOffset || t.scrollLeft) - (t.clientLeft || 0)
  3423. }) : r
  3424. }, position: function () {
  3425. if (this[0]) {
  3426. var e, t, n = {top: 0, left: 0}, r = this[0];
  3427. return "fixed" === pe.css(r, "position") ? t = r.getBoundingClientRect() : (e = this.offsetParent(), t = this.offset(), pe.nodeName(e[0], "html") || (n = e.offset()), n.top += pe.css(e[0], "borderTopWidth", !0), n.left += pe.css(e[0], "borderLeftWidth", !0)), {
  3428. top: t.top - n.top - pe.css(r, "marginTop", !0),
  3429. left: t.left - n.left - pe.css(r, "marginLeft", !0)
  3430. }
  3431. }
  3432. }, offsetParent: function () {
  3433. return this.map(function () {
  3434. for (var e = this.offsetParent; e && !pe.nodeName(e, "html") && "static" === pe.css(e, "position");) e = e.offsetParent;
  3435. return e || pt
  3436. })
  3437. }
  3438. }), pe.each({scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function (e, t) {
  3439. var n = /Y/.test(t);
  3440. pe.fn[e] = function (r) {
  3441. return Pe(this, function (e, r, i) {
  3442. var o = te(e);
  3443. return void 0 === i ? o ? t in o ? o[t] : o.document.documentElement[r] : e[r] : void (o ? o.scrollTo(n ? pe(o).scrollLeft() : i, n ? i : pe(o).scrollTop()) : e[r] = i)
  3444. }, e, r, arguments.length, null)
  3445. }
  3446. }), pe.each(["top", "left"], function (e, t) {
  3447. pe.cssHooks[t] = L(fe.pixelPosition, function (e, n) {
  3448. if (n) return n = gt(e, t), ft.test(n) ? pe(e).position()[t] + "px" : n
  3449. })
  3450. }), pe.each({Height: "height", Width: "width"}, function (e, t) {
  3451. pe.each({padding: "inner" + e, content: t, "": "outer" + e}, function (n, r) {
  3452. pe.fn[r] = function (r, i) {
  3453. var o = arguments.length && (n || "boolean" != typeof r),
  3454. a = n || (r === !0 || i === !0 ? "margin" : "border");
  3455. return Pe(this, function (t, n, r) {
  3456. var i;
  3457. return pe.isWindow(t) ? t.document.documentElement["client" + e] : 9 === t.nodeType ? (i = t.documentElement, Math.max(t.body["scroll" + e], i["scroll" + e], t.body["offset" + e], i["offset" + e], i["client" + e])) : void 0 === r ? pe.css(t, n, a) : pe.style(t, n, r, a)
  3458. }, t, o ? r : void 0, o, null)
  3459. }
  3460. })
  3461. }), pe.fn.extend({
  3462. bind: function (e, t, n) {
  3463. return this.on(e, null, t, n)
  3464. }, unbind: function (e, t) {
  3465. return this.off(e, null, t)
  3466. }, delegate: function (e, t, n, r) {
  3467. return this.on(t, e, n, r)
  3468. }, undelegate: function (e, t, n) {
  3469. return 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n)
  3470. }
  3471. }), pe.fn.size = function () {
  3472. return this.length
  3473. }, pe.fn.andSelf = pe.fn.addBack, layui.define(function (e) {
  3474. layui.$ = pe, e("jquery", pe)
  3475. }), pe
  3476. });
  3477. !function (e, t) {
  3478. "use strict";
  3479. var i, n, a = e.layui && layui.define, o = {
  3480. getPath: function () {
  3481. var e = document.currentScript ? document.currentScript.src : function () {
  3482. for (var e, t = document.scripts, i = t.length - 1, n = i; n > 0; n--) if ("interactive" === t[n].readyState) {
  3483. e = t[n].src;
  3484. break
  3485. }
  3486. return e || t[i].src
  3487. }();
  3488. return e.substring(0, e.lastIndexOf("/") + 1)
  3489. }(),
  3490. config: {},
  3491. end: {},
  3492. minIndex: 0,
  3493. minLeft: [],
  3494. btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
  3495. type: ["dialog", "page", "iframe", "loading", "tips"],
  3496. getStyle: function (t, i) {
  3497. var n = t.currentStyle ? t.currentStyle : e.getComputedStyle(t, null);
  3498. return n[n.getPropertyValue ? "getPropertyValue" : "getAttribute"](i)
  3499. },
  3500. link: function (t, i, n) {
  3501. if (r.path) {
  3502. var a = document.getElementsByTagName("head")[0], s = document.createElement("link");
  3503. "string" == typeof i && (n = i);
  3504. var l = (n || t).replace(/\.|\//g, ""), f = "layuicss-" + l, c = 0;
  3505. s.rel = "stylesheet", s.href = r.path + t, s.id = f, document.getElementById(f) || a.appendChild(s), "function" == typeof i && !function u() {
  3506. return ++c > 80 ? e.console && console.error("layer.css: Invalid") : void (1989 === parseInt(o.getStyle(document.getElementById(f), "width")) ? i() : setTimeout(u, 100))
  3507. }()
  3508. }
  3509. }
  3510. }, r = {
  3511. v: "3.1.1", ie: function () {
  3512. var t = navigator.userAgent.toLowerCase();
  3513. return !!(e.ActiveXObject || "ActiveXObject" in e) && ((t.match(/msie\s(\d+)/) || [])[1] || "11")
  3514. }(), index: e.layer && e.layer.v ? 1e5 : 0, path: o.getPath, config: function (e, t) {
  3515. return e = e || {}, r.cache = o.config = i.extend({}, o.config, e), r.path = o.config.path || r.path, "string" == typeof e.extend && (e.extend = [e.extend]), o.config.path && r.ready(), e.extend ? (a ? layui.addcss("modules/layer/" + e.extend) : o.link("theme/" + e.extend), this) : this
  3516. }, ready: function (e) {
  3517. var t = "layer", i = "", n = (a ? "modules/layer/" : "theme/") + "default/layer.css?v=" + r.v + i;
  3518. return a ? layui.addcss(n, e, t) : o.link(n, e, t), this
  3519. }, alert: function (e, t, n) {
  3520. var a = "function" == typeof t;
  3521. return a && (n = t), r.open(i.extend({content: e, yes: n}, a ? {} : t))
  3522. }, confirm: function (e, t, n, a) {
  3523. var s = "function" == typeof t;
  3524. return s && (a = n, n = t), r.open(i.extend({content: e, btn: o.btn, yes: n, btn2: a}, s ? {} : t))
  3525. }, msg: function (e, n, a) {
  3526. var s = "function" == typeof n, f = o.config.skin, c = (f ? f + " " + f + "-msg" : "") || "layui-layer-msg",
  3527. u = l.anim.length - 1;
  3528. return s && (a = n), r.open(i.extend({
  3529. content: e,
  3530. time: 3e3,
  3531. shade: !1,
  3532. skin: c,
  3533. title: !1,
  3534. closeBtn: !1,
  3535. btn: !1,
  3536. resize: !1,
  3537. end: a
  3538. }, s && !o.config.skin ? {skin: c + " layui-layer-hui", anim: u} : function () {
  3539. return n = n || {}, (n.icon === -1 || n.icon === t && !o.config.skin) && (n.skin = c + " " + (n.skin || "layui-layer-hui")), n
  3540. }()))
  3541. }, load: function (e, t) {
  3542. return r.open(i.extend({type: 3, icon: e || 0, resize: !1, shade: .01}, t))
  3543. }, tips: function (e, t, n) {
  3544. return r.open(i.extend({
  3545. type: 4,
  3546. content: [e, t],
  3547. closeBtn: !1,
  3548. time: 3e3,
  3549. shade: !1,
  3550. resize: !1,
  3551. fixed: !1,
  3552. maxWidth: 210
  3553. }, n))
  3554. }
  3555. }, s = function (e) {
  3556. var t = this;
  3557. t.index = ++r.index, t.config = i.extend({}, t.config, o.config, e), document.body ? t.creat() : setTimeout(function () {
  3558. t.creat()
  3559. }, 30)
  3560. };
  3561. s.pt = s.prototype;
  3562. var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"];
  3563. l.anim = ["layer-anim-00", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"], s.pt.config = {
  3564. type: 0,
  3565. shade: .3,
  3566. fixed: !0,
  3567. move: l[1],
  3568. title: "&#x4FE1;&#x606F;",
  3569. offset: "auto",
  3570. area: "auto",
  3571. closeBtn: 1,
  3572. time: 0,
  3573. zIndex: 19891014,
  3574. maxWidth: 360,
  3575. anim: 0,
  3576. isOutAnim: !0,
  3577. icon: -1,
  3578. moveType: 1,
  3579. resize: !0,
  3580. scrollbar: !0,
  3581. tips: 2
  3582. }, s.pt.vessel = function (e, t) {
  3583. var n = this, a = n.index, r = n.config, s = r.zIndex + a, f = "object" == typeof r.title,
  3584. c = r.maxmin && (1 === r.type || 2 === r.type),
  3585. u = r.title ? '<div class="layui-layer-title" style="' + (f ? r.title[1] : "") + '">' + (f ? r.title[0] : r.title) + "</div>" : "";
  3586. return r.zIndex = s, t([r.shade ? '<div class="layui-layer-shade" id="layui-layer-shade' + a + '" times="' + a + '" style="' + ("z-index:" + (s - 1) + "; ") + '"></div>' : "", '<div class="' + l[0] + (" layui-layer-" + o.type[r.type]) + (0 != r.type && 2 != r.type || r.shade ? "" : " layui-layer-border") + " " + (r.skin || "") + '" id="' + l[0] + a + '" type="' + o.type[r.type] + '" times="' + a + '" showtime="' + r.time + '" conType="' + (e ? "object" : "string") + '" style="z-index: ' + s + "; width:" + r.area[0] + ";height:" + r.area[1] + (r.fixed ? "" : ";position:absolute;") + '">' + (e && 2 != r.type ? "" : u) + '<div id="' + (r.id || "") + '" class="layui-layer-content' + (0 == r.type && r.icon !== -1 ? " layui-layer-padding" : "") + (3 == r.type ? " layui-layer-loading" + r.icon : "") + '">' + (0 == r.type && r.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico' + r.icon + '"></i>' : "") + (1 == r.type && e ? "" : r.content || "") + '</div><span class="layui-layer-setwin">' + function () {
  3587. var e = c ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : "";
  3588. return r.closeBtn && (e += '<a class="layui-layer-ico ' + l[7] + " " + l[7] + (r.title ? r.closeBtn : 4 == r.type ? "1" : "2") + '" href="javascript:;"></a>'), e
  3589. }() + "</span>" + (r.btn ? function () {
  3590. var e = "";
  3591. "string" == typeof r.btn && (r.btn = [r.btn]);
  3592. for (var t = 0, i = r.btn.length; t < i; t++) e += '<a class="' + l[6] + t + '">' + r.btn[t] + "</a>";
  3593. return '<div class="' + l[6] + " layui-layer-btn-" + (r.btnAlign || "") + '">' + e + "</div>"
  3594. }() : "") + (r.resize ? '<span class="layui-layer-resize"></span>' : "") + "</div>"], u, i('<div class="layui-layer-move"></div>')), n
  3595. }, s.pt.creat = function () {
  3596. var e = this, t = e.config, a = e.index, s = t.content, f = "object" == typeof s, c = i("body");
  3597. if (!t.id || !i("#" + t.id)[0]) {
  3598. switch ("string" == typeof t.area && (t.area = "auto" === t.area ? ["", ""] : [t.area, ""]), t.shift && (t.anim = t.shift), 6 == r.ie && (t.fixed = !1), t.type) {
  3599. case 0:
  3600. t.btn = "btn" in t ? t.btn : o.btn[0], r.closeAll("dialog");
  3601. break;
  3602. case 2:
  3603. var s = t.content = f ? t.content : [t.content || "", "auto"];
  3604. t.content = '<iframe scrolling="' + (t.content[1] || "auto") + '" allowtransparency="true" id="' + l[4] + a + '" name="' + l[4] + a + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + t.content[0] + '"></iframe>';
  3605. break;
  3606. case 3:
  3607. delete t.title, delete t.closeBtn, t.icon === -1 && 0 === t.icon, r.closeAll("loading");
  3608. break;
  3609. case 4:
  3610. f || (t.content = [t.content, "body"]), t.follow = t.content[1], t.content = t.content[0] + '<i class="layui-layer-TipsG"></i>', delete t.title, t.tips = "object" == typeof t.tips ? t.tips : [t.tips, !0], t.tipsMore || r.closeAll("tips")
  3611. }
  3612. if (e.vessel(f, function (n, r, u) {
  3613. c.append(n[0]), f ? function () {
  3614. 2 == t.type || 4 == t.type ? function () {
  3615. i("body").append(n[1])
  3616. }() : function () {
  3617. s.parents("." + l[0])[0] || (s.data("display", s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]), i("#" + l[0] + a).find("." + l[5]).before(r))
  3618. }()
  3619. }() : c.append(n[1]), i(".layui-layer-move")[0] || c.append(o.moveElem = u), e.layero = i("#" + l[0] + a), t.scrollbar || l.html.css("overflow", "hidden").attr("layer-full", a)
  3620. }).auto(a), i("#layui-layer-shade" + e.index).css({
  3621. "background-color": t.shade[1] || "#000",
  3622. opacity: t.shade[0] || t.shade
  3623. }), 2 == t.type && 6 == r.ie && e.layero.find("iframe").attr("src", s[0]), 4 == t.type ? e.tips() : e.offset(), t.fixed && n.on("resize", function () {
  3624. e.offset(), (/^\d+%$/.test(t.area[0]) || /^\d+%$/.test(t.area[1])) && e.auto(a), 4 == t.type && e.tips()
  3625. }), t.time <= 0 || setTimeout(function () {
  3626. r.close(e.index)
  3627. }, t.time), e.move().callback(), l.anim[t.anim]) {
  3628. var u = "layer-anim " + l.anim[t.anim];
  3629. e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function () {
  3630. i(this).removeClass(u)
  3631. })
  3632. }
  3633. t.isOutAnim && e.layero.data("isOutAnim", !0)
  3634. }
  3635. }, s.pt.auto = function (e) {
  3636. var t = this, a = t.config, o = i("#" + l[0] + e);
  3637. "" === a.area[0] && a.maxWidth > 0 && (r.ie && r.ie < 8 && a.btn && o.width(o.innerWidth()), o.outerWidth() > a.maxWidth && o.width(a.maxWidth));
  3638. var s = [o.innerWidth(), o.innerHeight()], f = o.find(l[1]).outerHeight() || 0,
  3639. c = o.find("." + l[6]).outerHeight() || 0, u = function (e) {
  3640. e = o.find(e), e.height(s[1] - f - c - 2 * (0 | parseFloat(e.css("padding-top"))))
  3641. };
  3642. switch (a.type) {
  3643. case 2:
  3644. u("iframe");
  3645. break;
  3646. default:
  3647. "" === a.area[1] ? a.maxHeight > 0 && o.outerHeight() > a.maxHeight ? (s[1] = a.maxHeight, u("." + l[5])) : a.fixed && s[1] >= n.height() && (s[1] = n.height(), u("." + l[5])) : u("." + l[5])
  3648. }
  3649. return t
  3650. }, s.pt.offset = function () {
  3651. var e = this, t = e.config, i = e.layero, a = [i.outerWidth(), i.outerHeight()],
  3652. o = "object" == typeof t.offset;
  3653. e.offsetTop = (n.height() - a[1]) / 2, e.offsetLeft = (n.width() - a[0]) / 2, o ? (e.offsetTop = t.offset[0], e.offsetLeft = t.offset[1] || e.offsetLeft) : "auto" !== t.offset && ("t" === t.offset ? e.offsetTop = 0 : "r" === t.offset ? e.offsetLeft = n.width() - a[0] : "b" === t.offset ? e.offsetTop = n.height() - a[1] : "l" === t.offset ? e.offsetLeft = 0 : "lt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = 0) : "lb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = 0) : "rt" === t.offset ? (e.offsetTop = 0, e.offsetLeft = n.width() - a[0]) : "rb" === t.offset ? (e.offsetTop = n.height() - a[1], e.offsetLeft = n.width() - a[0]) : e.offsetTop = t.offset), t.fixed || (e.offsetTop = /%$/.test(e.offsetTop) ? n.height() * parseFloat(e.offsetTop) / 100 : parseFloat(e.offsetTop), e.offsetLeft = /%$/.test(e.offsetLeft) ? n.width() * parseFloat(e.offsetLeft) / 100 : parseFloat(e.offsetLeft), e.offsetTop += n.scrollTop(), e.offsetLeft += n.scrollLeft()), i.attr("minLeft") && (e.offsetTop = n.height() - (i.find(l[1]).outerHeight() || 0), e.offsetLeft = i.css("left")), i.css({
  3654. top: e.offsetTop,
  3655. left: e.offsetLeft
  3656. })
  3657. }, s.pt.tips = function () {
  3658. var e = this, t = e.config, a = e.layero, o = [a.outerWidth(), a.outerHeight()], r = i(t.follow);
  3659. r[0] || (r = i("body"));
  3660. var s = {width: r.outerWidth(), height: r.outerHeight(), top: r.offset().top, left: r.offset().left},
  3661. f = a.find(".layui-layer-TipsG"), c = t.tips[0];
  3662. t.tips[1] || f.remove(), s.autoLeft = function () {
  3663. s.left + o[0] - n.width() > 0 ? (s.tipLeft = s.left + s.width - o[0], f.css({
  3664. right: 12,
  3665. left: "auto"
  3666. })) : s.tipLeft = s.left
  3667. }, s.where = [function () {
  3668. s.autoLeft(), s.tipTop = s.top - o[1] - 10, f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", t.tips[1])
  3669. }, function () {
  3670. s.tipLeft = s.left + s.width + 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", t.tips[1])
  3671. }, function () {
  3672. s.autoLeft(), s.tipTop = s.top + s.height + 10, f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", t.tips[1])
  3673. }, function () {
  3674. s.tipLeft = s.left - o[0] - 10, s.tipTop = s.top, f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", t.tips[1])
  3675. }], s.where[c - 1](), 1 === c ? s.top - (n.scrollTop() + o[1] + 16) < 0 && s.where[2]() : 2 === c ? n.width() - (s.left + s.width + o[0] + 16) > 0 || s.where[3]() : 3 === c ? s.top - n.scrollTop() + s.height + o[1] + 16 - n.height() > 0 && s.where[0]() : 4 === c && o[0] + 16 - s.left > 0 && s.where[1](), a.find("." + l[5]).css({
  3676. "background-color": t.tips[1],
  3677. "padding-right": t.closeBtn ? "30px" : ""
  3678. }), a.css({left: s.tipLeft - (t.fixed ? n.scrollLeft() : 0), top: s.tipTop - (t.fixed ? n.scrollTop() : 0)})
  3679. }, s.pt.move = function () {
  3680. var e = this, t = e.config, a = i(document), s = e.layero, l = s.find(t.move),
  3681. f = s.find(".layui-layer-resize"), c = {};
  3682. return t.move && l.css("cursor", "move"), l.on("mousedown", function (e) {
  3683. e.preventDefault(), t.move && (c.moveStart = !0, c.offset = [e.clientX - parseFloat(s.css("left")), e.clientY - parseFloat(s.css("top"))], o.moveElem.css("cursor", "move").show())
  3684. }), f.on("mousedown", function (e) {
  3685. e.preventDefault(), c.resizeStart = !0, c.offset = [e.clientX, e.clientY], c.area = [s.outerWidth(), s.outerHeight()], o.moveElem.css("cursor", "se-resize").show()
  3686. }), a.on("mousemove", function (i) {
  3687. if (c.moveStart) {
  3688. var a = i.clientX - c.offset[0], o = i.clientY - c.offset[1], l = "fixed" === s.css("position");
  3689. if (i.preventDefault(), c.stX = l ? 0 : n.scrollLeft(), c.stY = l ? 0 : n.scrollTop(), !t.moveOut) {
  3690. var f = n.width() - s.outerWidth() + c.stX, u = n.height() - s.outerHeight() + c.stY;
  3691. a < c.stX && (a = c.stX), a > f && (a = f), o < c.stY && (o = c.stY), o > u && (o = u)
  3692. }
  3693. s.css({left: a, top: o})
  3694. }
  3695. if (t.resize && c.resizeStart) {
  3696. var a = i.clientX - c.offset[0], o = i.clientY - c.offset[1];
  3697. i.preventDefault(), r.style(e.index, {
  3698. width: c.area[0] + a,
  3699. height: c.area[1] + o
  3700. }), c.isResize = !0, t.resizing && t.resizing(s)
  3701. }
  3702. }).on("mouseup", function (e) {
  3703. c.moveStart && (delete c.moveStart, o.moveElem.hide(), t.moveEnd && t.moveEnd(s)), c.resizeStart && (delete c.resizeStart, o.moveElem.hide())
  3704. }), e
  3705. }, s.pt.callback = function () {
  3706. function e() {
  3707. var e = a.cancel && a.cancel(t.index, n);
  3708. e === !1 || r.close(t.index)
  3709. }
  3710. var t = this, n = t.layero, a = t.config;
  3711. t.openLayer(), a.success && (2 == a.type ? n.find("iframe").on("load", function () {
  3712. a.success(n, t.index)
  3713. }) : a.success(n, t.index)), 6 == r.ie && t.IE6(n), n.find("." + l[6]).children("a").on("click", function () {
  3714. var e = i(this).index();
  3715. if (0 === e) a.yes ? a.yes(t.index, n) : a.btn1 ? a.btn1(t.index, n) : r.close(t.index); else {
  3716. var o = a["btn" + (e + 1)] && a["btn" + (e + 1)](t.index, n);
  3717. o === !1 || r.close(t.index)
  3718. }
  3719. }), n.find("." + l[7]).on("click", e), a.shadeClose && i("#layui-layer-shade" + t.index).on("click", function () {
  3720. r.close(t.index)
  3721. }), n.find(".layui-layer-min").on("click", function () {
  3722. var e = a.min && a.min(n);
  3723. e === !1 || r.min(t.index, a)
  3724. }), n.find(".layui-layer-max").on("click", function () {
  3725. i(this).hasClass("layui-layer-maxmin") ? (r.restore(t.index), a.restore && a.restore(n)) : (r.full(t.index, a), setTimeout(function () {
  3726. a.full && a.full(n)
  3727. }, 100))
  3728. }), a.end && (o.end[t.index] = a.end)
  3729. }, o.reselect = function () {
  3730. i.each(i("select"), function (e, t) {
  3731. var n = i(this);
  3732. n.parents("." + l[0])[0] || 1 == n.attr("layer") && i("." + l[0]).length < 1 && n.removeAttr("layer").show(), n = null
  3733. })
  3734. }, s.pt.IE6 = function (e) {
  3735. i("select").each(function (e, t) {
  3736. var n = i(this);
  3737. n.parents("." + l[0])[0] || "none" === n.css("display") || n.attr({layer: "1"}).hide(), n = null
  3738. })
  3739. }, s.pt.openLayer = function () {
  3740. var e = this;
  3741. r.zIndex = e.config.zIndex, r.setTop = function (e) {
  3742. var t = function () {
  3743. r.zIndex++, e.css("z-index", r.zIndex + 1)
  3744. };
  3745. return r.zIndex = parseInt(e[0].style.zIndex), e.on("mousedown", t), r.zIndex
  3746. }
  3747. }, o.record = function (e) {
  3748. var t = [e.width(), e.height(), e.position().top, e.position().left + parseFloat(e.css("margin-left"))];
  3749. e.find(".layui-layer-max").addClass("layui-layer-maxmin"), e.attr({area: t})
  3750. }, o.rescollbar = function (e) {
  3751. l.html.attr("layer-full") == e && (l.html[0].style.removeProperty ? l.html[0].style.removeProperty("overflow") : l.html[0].style.removeAttribute("overflow"), l.html.removeAttr("layer-full"))
  3752. }, e.layer = r, r.getChildFrame = function (e, t) {
  3753. return t = t || i("." + l[4]).attr("times"), i("#" + l[0] + t).find("iframe").contents().find(e)
  3754. }, r.getFrameIndex = function (e) {
  3755. return i("#" + e).parents("." + l[4]).attr("times")
  3756. }, r.iframeAuto = function (e) {
  3757. if (e) {
  3758. var t = r.getChildFrame("html", e).outerHeight(), n = i("#" + l[0] + e),
  3759. a = n.find(l[1]).outerHeight() || 0, o = n.find("." + l[6]).outerHeight() || 0;
  3760. n.css({height: t + a + o}), n.find("iframe").css({height: t})
  3761. }
  3762. }, r.iframeSrc = function (e, t) {
  3763. i("#" + l[0] + e).find("iframe").attr("src", t)
  3764. }, r.style = function (e, t, n) {
  3765. var a = i("#" + l[0] + e), r = a.find(".layui-layer-content"), s = a.attr("type"),
  3766. f = a.find(l[1]).outerHeight() || 0, c = a.find("." + l[6]).outerHeight() || 0;
  3767. a.attr("minLeft");
  3768. s !== o.type[3] && s !== o.type[4] && (n || (parseFloat(t.width) <= 260 && (t.width = 260), parseFloat(t.height) - f - c <= 64 && (t.height = 64 + f + c)), a.css(t), c = a.find("." + l[6]).outerHeight(), s === o.type[2] ? a.find("iframe").css({height: parseFloat(t.height) - f - c}) : r.css({height: parseFloat(t.height) - f - c - parseFloat(r.css("padding-top")) - parseFloat(r.css("padding-bottom"))}))
  3769. }, r.min = function (e, t) {
  3770. var a = i("#" + l[0] + e), s = a.find(l[1]).outerHeight() || 0,
  3771. f = a.attr("minLeft") || 181 * o.minIndex + "px", c = a.css("position");
  3772. o.record(a), o.minLeft[0] && (f = o.minLeft[0], o.minLeft.shift()), a.attr("position", c), r.style(e, {
  3773. width: 180,
  3774. height: s,
  3775. left: f,
  3776. top: n.height() - s,
  3777. position: "fixed",
  3778. overflow: "hidden"
  3779. }, !0), a.find(".layui-layer-min").hide(), "page" === a.attr("type") && a.find(l[4]).hide(), o.rescollbar(e), a.attr("minLeft") || o.minIndex++, a.attr("minLeft", f)
  3780. }, r.restore = function (e) {
  3781. var t = i("#" + l[0] + e), n = t.attr("area").split(",");
  3782. t.attr("type");
  3783. r.style(e, {
  3784. width: parseFloat(n[0]),
  3785. height: parseFloat(n[1]),
  3786. top: parseFloat(n[2]),
  3787. left: parseFloat(n[3]),
  3788. position: t.attr("position"),
  3789. overflow: "visible"
  3790. }, !0), t.find(".layui-layer-max").removeClass("layui-layer-maxmin"), t.find(".layui-layer-min").show(), "page" === t.attr("type") && t.find(l[4]).show(), o.rescollbar(e)
  3791. }, r.full = function (e) {
  3792. var t, a = i("#" + l[0] + e);
  3793. o.record(a), l.html.attr("layer-full") || l.html.css("overflow", "hidden").attr("layer-full", e), clearTimeout(t), t = setTimeout(function () {
  3794. var t = "fixed" === a.css("position");
  3795. r.style(e, {
  3796. top: t ? 0 : n.scrollTop(),
  3797. left: t ? 0 : n.scrollLeft(),
  3798. width: n.width(),
  3799. height: n.height()
  3800. }, !0), a.find(".layui-layer-min").hide()
  3801. }, 100)
  3802. }, r.title = function (e, t) {
  3803. var n = i("#" + l[0] + (t || r.index)).find(l[1]);
  3804. n.html(e)
  3805. }, r.close = function (e) {
  3806. var t = i("#" + l[0] + e), n = t.attr("type"), a = "layer-anim-close";
  3807. if (t[0]) {
  3808. var s = "layui-layer-wrap", f = function () {
  3809. if (n === o.type[1] && "object" === t.attr("conType")) {
  3810. t.children(":not(." + l[5] + ")").remove();
  3811. for (var a = t.find("." + s), r = 0; r < 2; r++) a.unwrap();
  3812. a.css("display", a.data("display")).removeClass(s)
  3813. } else {
  3814. if (n === o.type[2]) try {
  3815. var f = i("#" + l[4] + e)[0];
  3816. f.contentWindow.document.write(""), f.contentWindow.close(), t.find("." + l[5])[0].removeChild(f)
  3817. } catch (c) {
  3818. }
  3819. t[0].innerHTML = "", t.remove()
  3820. }
  3821. "function" == typeof o.end[e] && o.end[e](), delete o.end[e]
  3822. };
  3823. t.data("isOutAnim") && t.addClass("layer-anim " + a), i("#layui-layer-moves, #layui-layer-shade" + e).remove(), 6 == r.ie && o.reselect(), o.rescollbar(e), t.attr("minLeft") && (o.minIndex--, o.minLeft.push(t.attr("minLeft"))), r.ie && r.ie < 10 || !t.data("isOutAnim") ? f() : setTimeout(function () {
  3824. f()
  3825. }, 200)
  3826. }
  3827. }, r.closeAll = function (e) {
  3828. i.each(i("." + l[0]), function () {
  3829. var t = i(this), n = e ? t.attr("type") === e : 1;
  3830. n && r.close(t.attr("times")), n = null
  3831. })
  3832. };
  3833. var f = r.cache || {}, c = function (e) {
  3834. return f.skin ? " " + f.skin + " " + f.skin + "-" + e : ""
  3835. };
  3836. r.prompt = function (e, t) {
  3837. var a = "";
  3838. if (e = e || {}, "function" == typeof e && (t = e), e.area) {
  3839. var o = e.area;
  3840. a = 'style="width: ' + o[0] + "; height: " + o[1] + ';"', delete e.area
  3841. }
  3842. var s, l = 2 == e.formType ? '<textarea class="layui-layer-input"' + a + "></textarea>" : function () {
  3843. return '<input type="' + (1 == e.formType ? "password" : "text") + '" class="layui-layer-input">'
  3844. }(), f = e.success;
  3845. return delete e.success, r.open(i.extend({
  3846. type: 1,
  3847. btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
  3848. content: l,
  3849. skin: "layui-layer-prompt" + c("prompt"),
  3850. maxWidth: n.width(),
  3851. success: function (t) {
  3852. s = t.find(".layui-layer-input"), s.val(e.value || "").focus(), "function" == typeof f && f(t)
  3853. },
  3854. resize: !1,
  3855. yes: function (i) {
  3856. var n = s.val();
  3857. "" === n ? s.focus() : n.length > (e.maxlength || 500) ? r.tips("&#x6700;&#x591A;&#x8F93;&#x5165;" + (e.maxlength || 500) + "&#x4E2A;&#x5B57;&#x6570;", s, {tips: 1}) : t && t(n, i, s)
  3858. }
  3859. }, e))
  3860. }, r.tab = function (e) {
  3861. e = e || {};
  3862. var t = e.tab || {}, n = "layui-this", a = e.success;
  3863. return delete e.success, r.open(i.extend({
  3864. type: 1,
  3865. skin: "layui-layer-tab" + c("tab"),
  3866. resize: !1,
  3867. title: function () {
  3868. var e = t.length, i = 1, a = "";
  3869. if (e > 0) for (a = '<span class="' + n + '">' + t[0].title + "</span>"; i < e; i++) a += "<span>" + t[i].title + "</span>";
  3870. return a
  3871. }(),
  3872. content: '<ul class="layui-layer-tabmain">' + function () {
  3873. var e = t.length, i = 1, a = "";
  3874. if (e > 0) for (a = '<li class="layui-layer-tabli ' + n + '">' + (t[0].content || "no content") + "</li>"; i < e; i++) a += '<li class="layui-layer-tabli">' + (t[i].content || "no content") + "</li>";
  3875. return a
  3876. }() + "</ul>",
  3877. success: function (t) {
  3878. var o = t.find(".layui-layer-title").children(), r = t.find(".layui-layer-tabmain").children();
  3879. o.on("mousedown", function (t) {
  3880. t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0;
  3881. var a = i(this), o = a.index();
  3882. a.addClass(n).siblings().removeClass(n), r.eq(o).show().siblings().hide(), "function" == typeof e.change && e.change(o)
  3883. }), "function" == typeof a && a(t)
  3884. }
  3885. }, e))
  3886. }, r.photos = function (t, n, a) {
  3887. function o(e, t, i) {
  3888. var n = new Image;
  3889. return n.src = e, n.complete ? t(n) : (n.onload = function () {
  3890. n.onload = null, t(n)
  3891. }, void (n.onerror = function (e) {
  3892. n.onerror = null, i(e)
  3893. }))
  3894. }
  3895. var s = {};
  3896. if (t = t || {}, t.photos) {
  3897. var l = t.photos.constructor === Object, f = l ? t.photos : {}, u = f.data || [], d = f.start || 0;
  3898. s.imgIndex = (0 | d) + 1, t.img = t.img || "img";
  3899. var y = t.success;
  3900. if (delete t.success, l) {
  3901. if (0 === u.length) return r.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")
  3902. } else {
  3903. var p = i(t.photos), h = function () {
  3904. u = [], p.find(t.img).each(function (e) {
  3905. var t = i(this);
  3906. t.attr("layer-index", e), u.push({
  3907. alt: t.attr("alt"),
  3908. pid: t.attr("layer-pid"),
  3909. src: t.attr("layer-src") || t.attr("src"),
  3910. thumb: t.attr("src")
  3911. })
  3912. })
  3913. };
  3914. if (h(), 0 === u.length) return;
  3915. if (n || p.on("click", t.img, function () {
  3916. var e = i(this), n = e.attr("layer-index");
  3917. r.photos(i.extend(t, {photos: {start: n, data: u, tab: t.tab}, full: t.full}), !0), h()
  3918. }), !n) return
  3919. }
  3920. s.imgprev = function (e) {
  3921. s.imgIndex--, s.imgIndex < 1 && (s.imgIndex = u.length), s.tabimg(e)
  3922. }, s.imgnext = function (e, t) {
  3923. s.imgIndex++, s.imgIndex > u.length && (s.imgIndex = 1, t) || s.tabimg(e)
  3924. }, s.keyup = function (e) {
  3925. if (!s.end) {
  3926. var t = e.keyCode;
  3927. e.preventDefault(), 37 === t ? s.imgprev(!0) : 39 === t ? s.imgnext(!0) : 27 === t && r.close(s.index)
  3928. }
  3929. }, s.tabimg = function (e) {
  3930. if (!(u.length <= 1)) return f.start = s.imgIndex - 1, r.close(s.index), r.photos(t, !0, e)
  3931. }, s.event = function () {
  3932. s.bigimg.hover(function () {
  3933. s.imgsee.show()
  3934. }, function () {
  3935. s.imgsee.hide()
  3936. }), s.bigimg.find(".layui-layer-imgprev").on("click", function (e) {
  3937. e.preventDefault(), s.imgprev()
  3938. }), s.bigimg.find(".layui-layer-imgnext").on("click", function (e) {
  3939. e.preventDefault(), s.imgnext()
  3940. }), i(document).on("keyup", s.keyup)
  3941. }, s.loadi = r.load(1, {shade: !("shade" in t) && .9, scrollbar: !1}), o(u[d].src, function (n) {
  3942. r.close(s.loadi), s.index = r.open(i.extend({
  3943. type: 1,
  3944. id: "layui-layer-photos",
  3945. area: function () {
  3946. var a = [n.width, n.height], o = [i(e).width() - 100, i(e).height() - 100];
  3947. if (!t.full && (a[0] > o[0] || a[1] > o[1])) {
  3948. var r = [a[0] / o[0], a[1] / o[1]];
  3949. r[0] > r[1] ? (a[0] = a[0] / r[0], a[1] = a[1] / r[0]) : r[0] < r[1] && (a[0] = a[0] / r[1], a[1] = a[1] / r[1])
  3950. }
  3951. return [a[0] + "px", a[1] + "px"]
  3952. }(),
  3953. title: !1,
  3954. shade: .9,
  3955. shadeClose: !0,
  3956. closeBtn: !1,
  3957. move: ".layui-layer-phimg img",
  3958. moveType: 1,
  3959. scrollbar: !1,
  3960. moveOut: !0,
  3961. isOutAnim: !1,
  3962. skin: "layui-layer-photos" + c("photos"),
  3963. content: '<div class="layui-layer-phimg"><img src="' + u[d].src + '" alt="' + (u[d].alt || "") + '" layer-pid="' + u[d].pid + '"><div class="layui-layer-imgsee">' + (u.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : "") + '<div class="layui-layer-imgbar" style="display:' + (a ? "block" : "") + '"><span class="layui-layer-imgtit"><a href="javascript:;">' + (u[d].alt || "") + "</a><em>" + s.imgIndex + "/" + u.length + "</em></span></div></div></div>",
  3964. success: function (e, i) {
  3965. s.bigimg = e.find(".layui-layer-phimg"), s.imgsee = e.find(".layui-layer-imguide,.layui-layer-imgbar"), s.event(e), t.tab && t.tab(u[d], e), "function" == typeof y && y(e)
  3966. },
  3967. end: function () {
  3968. s.end = !0, i(document).off("keyup", s.keyup)
  3969. }
  3970. }, t))
  3971. }, function () {
  3972. r.close(s.loadi), r.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;", {
  3973. time: 3e4,
  3974. btn: ["&#x4E0B;&#x4E00;&#x5F20;", "&#x4E0D;&#x770B;&#x4E86;"],
  3975. yes: function () {
  3976. u.length > 1 && s.imgnext(!0, !0)
  3977. }
  3978. })
  3979. })
  3980. }
  3981. }, o.run = function (t) {
  3982. i = t, n = i(e), l.html = i("html"), r.open = function (e) {
  3983. var t = new s(e);
  3984. return t.index
  3985. }
  3986. }, e.layui && layui.define ? (r.ready(), layui.define("jquery", function (t) {
  3987. r.path = layui.cache.dir, o.run(layui.$), e.layer = r, t("layer", r)
  3988. })) : "function" == typeof define && define.amd ? define(["jquery"], function () {
  3989. return o.run(e.jQuery), r
  3990. }) : function () {
  3991. o.run(e.jQuery), r.ready()
  3992. }()
  3993. }(window);
  3994. layui.define("jquery", function (t) {
  3995. "use strict";
  3996. var a = layui.$, i = (layui.hint(), layui.device()), e = "element", l = "layui-this", n = "layui-show",
  3997. s = function () {
  3998. this.config = {}
  3999. };
  4000. s.prototype.set = function (t) {
  4001. var i = this;
  4002. return a.extend(!0, i.config, t), i
  4003. }, s.prototype.on = function (t, a) {
  4004. return layui.onevent.call(this, e, t, a)
  4005. }, s.prototype.tabAdd = function (t, i) {
  4006. var e = ".layui-tab-title", l = a(".layui-tab[lay-filter=" + t + "]"), n = l.children(e),
  4007. s = n.children(".layui-tab-bar"), o = l.children(".layui-tab-content"),
  4008. r = '<li lay-id="' + (i.id || "") + '"' + (i.attr ? ' lay-attr="' + i.attr + '"' : "") + ">" + (i.title || "unnaming") + "</li>";
  4009. return s[0] ? s.before(r) : n.append(r), o.append('<div class="layui-tab-item">' + (i.content || "") + "</div>"), f.hideTabMore(!0), f.tabAuto(), this
  4010. }, s.prototype.tabDelete = function (t, i) {
  4011. var e = ".layui-tab-title", l = a(".layui-tab[lay-filter=" + t + "]"), n = l.children(e),
  4012. s = n.find('>li[lay-id="' + i + '"]');
  4013. return f.tabDelete(null, s), this
  4014. }, s.prototype.tabChange = function (t, i) {
  4015. var e = ".layui-tab-title", l = a(".layui-tab[lay-filter=" + t + "]"), n = l.children(e),
  4016. s = n.find('>li[lay-id="' + i + '"]');
  4017. return f.tabClick.call(s[0], null, null, s), this
  4018. }, s.prototype.tab = function (t) {
  4019. t = t || {}, b.on("click", t.headerElem, function (i) {
  4020. var e = a(this).index();
  4021. f.tabClick.call(this, i, e, null, t)
  4022. })
  4023. }, s.prototype.progress = function (t, i) {
  4024. var e = "layui-progress", l = a("." + e + "[lay-filter=" + t + "]"), n = l.find("." + e + "-bar"),
  4025. s = n.find("." + e + "-text");
  4026. return n.css("width", i), s.text(i), this
  4027. };
  4028. var o = ".layui-nav", r = "layui-nav-item", c = "layui-nav-bar", u = "layui-nav-tree", d = "layui-nav-child",
  4029. y = "layui-nav-more", h = "layui-anim layui-anim-upbit", f = {
  4030. tabClick: function (t, i, s, o) {
  4031. o = o || {};
  4032. var r = s || a(this), i = i || r.parent().children("li").index(r),
  4033. c = o.headerElem ? r.parent() : r.parents(".layui-tab").eq(0),
  4034. u = o.bodyElem ? a(o.bodyElem) : c.children(".layui-tab-content").children(".layui-tab-item"),
  4035. d = r.find("a"), y = c.attr("lay-filter");
  4036. "javascript:;" !== d.attr("href") && "_blank" === d.attr("target") || (r.addClass(l).siblings().removeClass(l), u.eq(i).addClass(n).siblings().removeClass(n)), layui.event.call(this, e, "tab(" + y + ")", {
  4037. elem: c,
  4038. index: i
  4039. })
  4040. }, tabDelete: function (t, i) {
  4041. var n = i || a(this).parent(), s = n.index(), o = n.parents(".layui-tab").eq(0),
  4042. r = o.children(".layui-tab-content").children(".layui-tab-item"), c = o.attr("lay-filter");
  4043. n.hasClass(l) && (n.next()[0] ? f.tabClick.call(n.next()[0], null, s + 1) : n.prev()[0] && f.tabClick.call(n.prev()[0], null, s - 1)), n.remove(), r.eq(s).remove(), setTimeout(function () {
  4044. f.tabAuto()
  4045. }, 50), layui.event.call(this, e, "tabDelete(" + c + ")", {elem: o, index: s})
  4046. }, tabAuto: function () {
  4047. var t = "layui-tab-more", e = "layui-tab-bar", l = "layui-tab-close", n = this;
  4048. a(".layui-tab").each(function () {
  4049. var s = a(this), o = s.children(".layui-tab-title"),
  4050. r = (s.children(".layui-tab-content").children(".layui-tab-item"), 'lay-stope="tabmore"'),
  4051. c = a('<span class="layui-unselect layui-tab-bar" ' + r + "><i " + r + ' class="layui-icon">&#xe61a;</i></span>');
  4052. if (n === window && 8 != i.ie && f.hideTabMore(!0), s.attr("lay-allowClose") && o.find("li").each(function () {
  4053. var t = a(this);
  4054. if (!t.find("." + l)[0]) {
  4055. var i = a('<i class="layui-icon layui-unselect ' + l + '">&#x1006;</i>');
  4056. i.on("click", f.tabDelete), t.append(i)
  4057. }
  4058. }), "string" != typeof s.attr("lay-unauto")) if (o.prop("scrollWidth") > o.outerWidth() + 1) {
  4059. if (o.find("." + e)[0]) return;
  4060. o.append(c), s.attr("overflow", ""), c.on("click", function (a) {
  4061. o[this.title ? "removeClass" : "addClass"](t), this.title = this.title ? "" : "收缩"
  4062. })
  4063. } else o.find("." + e).remove(), s.removeAttr("overflow")
  4064. })
  4065. }, hideTabMore: function (t) {
  4066. var i = a(".layui-tab-title");
  4067. t !== !0 && "tabmore" === a(t.target).attr("lay-stope") || (i.removeClass("layui-tab-more"), i.find(".layui-tab-bar").attr("title", ""))
  4068. }, clickThis: function () {
  4069. var t = a(this), i = t.parents(o), n = i.attr("lay-filter"), s = t.parent(), c = t.siblings("." + d),
  4070. y = "string" == typeof s.attr("lay-unselect");
  4071. "javascript:;" !== t.attr("href") && "_blank" === t.attr("target") || y || c[0] || (i.find("." + l).removeClass(l), s.addClass(l)), i.hasClass(u) && (c.removeClass(h), c[0] && (s["none" === c.css("display") ? "addClass" : "removeClass"](r + "ed"), "all" === i.attr("lay-shrink") && s.siblings().removeClass(r + "ed"))), layui.event.call(this, e, "nav(" + n + ")", t)
  4072. }, collapse: function () {
  4073. var t = a(this), i = t.find(".layui-colla-icon"), l = t.siblings(".layui-colla-content"),
  4074. s = t.parents(".layui-collapse").eq(0), o = s.attr("lay-filter"), r = "none" === l.css("display");
  4075. if ("string" == typeof s.attr("lay-accordion")) {
  4076. var c = s.children(".layui-colla-item").children("." + n);
  4077. c.siblings(".layui-colla-title").children(".layui-colla-icon").html("&#xe602;"), c.removeClass(n)
  4078. }
  4079. l[r ? "addClass" : "removeClass"](n), i.html(r ? "&#xe61a;" : "&#xe602;"), layui.event.call(this, e, "collapse(" + o + ")", {
  4080. title: t,
  4081. content: l,
  4082. show: r
  4083. })
  4084. }
  4085. };
  4086. s.prototype.init = function (t, e) {
  4087. var l = function () {
  4088. return e ? '[lay-filter="' + e + '"]' : ""
  4089. }(), s = {
  4090. tab: function () {
  4091. f.tabAuto.call({})
  4092. }, nav: function () {
  4093. var t = 200, e = {}, s = {}, p = {}, b = function (l, o, r) {
  4094. var c = a(this), f = c.find("." + d);
  4095. o.hasClass(u) ? l.css({
  4096. top: c.position().top,
  4097. height: c.children("a").outerHeight(),
  4098. opacity: 1
  4099. }) : (f.addClass(h), l.css({
  4100. left: c.position().left + parseFloat(c.css("marginLeft")),
  4101. top: c.position().top + c.height() - l.height()
  4102. }), e[r] = setTimeout(function () {
  4103. l.css({width: c.width(), opacity: 1})
  4104. }, i.ie && i.ie < 10 ? 0 : t), clearTimeout(p[r]), "block" === f.css("display") && clearTimeout(s[r]), s[r] = setTimeout(function () {
  4105. f.addClass(n), c.find("." + y).addClass(y + "d")
  4106. }, 300))
  4107. };
  4108. a(o + l).each(function (i) {
  4109. var l = a(this), o = a('<span class="' + c + '"></span>'), h = l.find("." + r);
  4110. l.find("." + c)[0] || (l.append(o), h.on("mouseenter", function () {
  4111. b.call(this, o, l, i)
  4112. }).on("mouseleave", function () {
  4113. l.hasClass(u) || (clearTimeout(s[i]), s[i] = setTimeout(function () {
  4114. l.find("." + d).removeClass(n), l.find("." + y).removeClass(y + "d")
  4115. }, 300))
  4116. }), l.on("mouseleave", function () {
  4117. clearTimeout(e[i]), p[i] = setTimeout(function () {
  4118. l.hasClass(u) ? o.css({
  4119. height: 0,
  4120. top: o.position().top + o.height() / 2,
  4121. opacity: 0
  4122. }) : o.css({width: 0, left: o.position().left + o.width() / 2, opacity: 0})
  4123. }, t)
  4124. })), h.find("a").each(function () {
  4125. var t = a(this), i = (t.parent(), t.siblings("." + d));
  4126. i[0] && !t.children("." + y)[0] && t.append('<span class="' + y + '"></span>'), t.off("click", f.clickThis).on("click", f.clickThis)
  4127. })
  4128. })
  4129. }, breadcrumb: function () {
  4130. var t = ".layui-breadcrumb";
  4131. a(t + l).each(function () {
  4132. var t = a(this), i = "lay-separator", e = t.attr(i) || "/", l = t.find("a");
  4133. l.next("span[" + i + "]")[0] || (l.each(function (t) {
  4134. t !== l.length - 1 && a(this).after("<span " + i + ">" + e + "</span>")
  4135. }), t.css("visibility", "visible"))
  4136. })
  4137. }, progress: function () {
  4138. var t = "layui-progress";
  4139. a("." + t + l).each(function () {
  4140. var i = a(this), e = i.find(".layui-progress-bar"), l = e.attr("lay-percent");
  4141. e.css("width", function () {
  4142. return /^.+\/.+$/.test(l) ? 100 * new Function("return " + l)() + "%" : l
  4143. }()), i.attr("lay-showPercent") && setTimeout(function () {
  4144. e.html('<span class="' + t + '-text">' + l + "</span>")
  4145. }, 350)
  4146. })
  4147. }, collapse: function () {
  4148. var t = "layui-collapse";
  4149. a("." + t + l).each(function () {
  4150. var t = a(this).find(".layui-colla-item");
  4151. t.each(function () {
  4152. var t = a(this), i = t.find(".layui-colla-title"), e = t.find(".layui-colla-content"),
  4153. l = "none" === e.css("display");
  4154. i.find(".layui-colla-icon").remove(), i.append('<i class="layui-icon layui-colla-icon">' + (l ? "&#xe602;" : "&#xe61a;") + "</i>"), i.off("click", f.collapse).on("click", f.collapse)
  4155. })
  4156. })
  4157. }
  4158. };
  4159. return s[t] ? s[t]() : layui.each(s, function (t, a) {
  4160. a()
  4161. })
  4162. }, s.prototype.render = s.prototype.init;
  4163. var p = new s, b = a(document);
  4164. p.render();
  4165. var v = ".layui-tab-title li";
  4166. b.on("click", v, f.tabClick), b.on("click", f.hideTabMore), a(window).on("resize", f.tabAuto), t(e, p)
  4167. });
  4168. layui.define("layer", function (e) {
  4169. "use strict";
  4170. var i = layui.$, t = layui.layer, n = layui.hint(), a = layui.device(), o = {
  4171. config: {}, set: function (e) {
  4172. var t = this;
  4173. return t.config = i.extend({}, t.config, e), t
  4174. }, on: function (e, i) {
  4175. return layui.onevent.call(this, r, e, i)
  4176. }
  4177. }, l = function () {
  4178. var e = this;
  4179. return {
  4180. upload: function (i) {
  4181. e.upload.call(e, i)
  4182. }, config: e.config
  4183. }
  4184. }, r = "upload", u = "layui-upload-file", c = "layui-upload-form", f = "layui-upload-iframe",
  4185. s = "layui-upload-choose", p = function (e) {
  4186. var t = this;
  4187. t.config = i.extend({}, t.config, o.config, e), t.render()
  4188. };
  4189. p.prototype.config = {
  4190. accept: "images",
  4191. exts: "",
  4192. auto: !0,
  4193. bindAction: "",
  4194. url: "",
  4195. field: "file",
  4196. method: "post",
  4197. data: {},
  4198. drag: !0,
  4199. size: 0,
  4200. number: 0,
  4201. multiple: !1
  4202. }, p.prototype.render = function (e) {
  4203. var t = this, e = t.config;
  4204. e.elem = i(e.elem), e.bindAction = i(e.bindAction), t.file(), t.events()
  4205. }, p.prototype.file = function () {
  4206. var e = this, t = e.config,
  4207. n = e.elemFile = i(['<input class="' + u + '" type="file" accept="' + t.acceptMime + '" name="' + t.field + '"', t.multiple ? " multiple" : "", ">"].join("")),
  4208. o = t.elem.next();
  4209. (o.hasClass(u) || o.hasClass(c)) && o.remove(), a.ie && a.ie < 10 && t.elem.wrap('<div class="layui-upload-wrap"></div>'), e.isFile() ? (e.elemFile = t.elem, t.field = t.elem[0].name) : t.elem.after(n), a.ie && a.ie < 10 && e.initIE()
  4210. }, p.prototype.initIE = function () {
  4211. var e = this, t = e.config,
  4212. n = i('<iframe id="' + f + '" class="' + f + '" name="' + f + '" frameborder="0"></iframe>'),
  4213. a = i(['<form target="' + f + '" class="' + c + '" method="post" key="set-mine" enctype="multipart/form-data" action="' + t.url + '">', "</form>"].join(""));
  4214. i("#" + f)[0] || i("body").append(n), t.elem.next().hasClass(c) || (e.elemFile.wrap(a), t.elem.next("." + c).append(function () {
  4215. var e = [];
  4216. return layui.each(t.data, function (i, t) {
  4217. t = "function" == typeof t ? t() : t, e.push('<input type="hidden" name="' + i + '" value="' + t + '">')
  4218. }), e.join("")
  4219. }()))
  4220. }, p.prototype.msg = function (e) {
  4221. return t.msg(e, {icon: 2, shift: 6})
  4222. }, p.prototype.isFile = function () {
  4223. var e = this.config.elem[0];
  4224. if (e) return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type
  4225. }, p.prototype.preview = function (e) {
  4226. var i = this;
  4227. window.FileReader && layui.each(i.chooseFiles, function (i, t) {
  4228. var n = new FileReader;
  4229. n.readAsDataURL(t), n.onload = function () {
  4230. e && e(i, t, this.result)
  4231. }
  4232. })
  4233. }, p.prototype.upload = function (e, t) {
  4234. var n, o = this, l = o.config, r = o.elemFile[0], u = function () {
  4235. var t = 0, n = 0, a = e || o.files || o.chooseFiles || r.files, u = function () {
  4236. l.multiple && t + n === o.fileLength && "function" == typeof l.allDone && l.allDone({
  4237. total: o.fileLength,
  4238. successful: t,
  4239. aborted: n
  4240. })
  4241. };
  4242. layui.each(a, function (e, a) {
  4243. var r = new FormData;
  4244. r.append(l.field, a), layui.each(l.data, function (e, i) {
  4245. i = "function" == typeof i ? i() : i, r.append(e, i)
  4246. }), i.ajax({
  4247. url: l.url,
  4248. type: "post",
  4249. data: r,
  4250. contentType: !1,
  4251. processData: !1,
  4252. dataType: "json",
  4253. headers: l.headers || {},
  4254. success: function (i) {
  4255. t++, d(e, i), u()
  4256. },
  4257. error: function () {
  4258. n++, o.msg("请求上传接口出现异常"), m(e), u()
  4259. }
  4260. })
  4261. })
  4262. }, c = function () {
  4263. var e = i("#" + f);
  4264. o.elemFile.parent().submit(), clearInterval(p.timer), p.timer = setInterval(function () {
  4265. var i, t = e.contents().find("body");
  4266. try {
  4267. i = t.text()
  4268. } catch (n) {
  4269. o.msg("获取上传后的响应信息出现异常"), clearInterval(p.timer), m()
  4270. }
  4271. i && (clearInterval(p.timer), t.html(""), d(0, i))
  4272. }, 30)
  4273. }, d = function (e, i) {
  4274. if (o.elemFile.next("." + s).remove(), r.value = "", "object" != typeof i) try {
  4275. i = JSON.parse(i)
  4276. } catch (t) {
  4277. return i = {}, o.msg("请对上传接口返回有效JSON")
  4278. }
  4279. "function" == typeof l.done && l.done(i, e || 0, function (e) {
  4280. o.upload(e)
  4281. })
  4282. }, m = function (e) {
  4283. l.auto && (r.value = ""), "function" == typeof l.error && l.error(e || 0, function (e) {
  4284. o.upload(e)
  4285. })
  4286. }, h = l.exts, v = function () {
  4287. var i = [];
  4288. return layui.each(e || o.chooseFiles, function (e, t) {
  4289. i.push(t.name)
  4290. }), i
  4291. }(), g = {
  4292. preview: function (e) {
  4293. o.preview(e)
  4294. }, upload: function (e, i) {
  4295. var t = {};
  4296. t[e] = i, o.upload(t)
  4297. }, pushFile: function () {
  4298. return o.files = o.files || {}, layui.each(o.chooseFiles, function (e, i) {
  4299. o.files[e] = i
  4300. }), o.files
  4301. }, resetFile: function (e, i, t) {
  4302. var n = new File([i], t);
  4303. o.files = o.files || {}, o.files[e] = n
  4304. }
  4305. }, y = function () {
  4306. if ("choose" !== t && !l.auto || (l.choose && l.choose(g), "choose" !== t)) return l.before && l.before(g), a.ie ? a.ie > 9 ? u() : c() : void u()
  4307. };
  4308. if (v = 0 === v.length ? r.value.match(/[^\/\\]+\..+/g) || [] || "" : v, 0 !== v.length) {
  4309. switch (l.accept) {
  4310. case"file":
  4311. if (h && !RegExp("\\w\\.(" + h + ")$", "i").test(escape(v))) return o.msg("选择的文件中包含不支持的格式"), r.value = "";
  4312. break;
  4313. case"video":
  4314. if (!RegExp("\\w\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(v))) return o.msg("选择的视频中包含不支持的格式"), r.value = "";
  4315. break;
  4316. case"audio":
  4317. if (!RegExp("\\w\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(v))) return o.msg("选择的音频中包含不支持的格式"), r.value = "";
  4318. break;
  4319. default:
  4320. if (layui.each(v, function (e, i) {
  4321. RegExp("\\w\\.(" + (h || "jpg|png|gif|bmp|jpeg$") + ")", "i").test(escape(i)) || (n = !0)
  4322. }), n) return o.msg("选择的图片中包含不支持的格式"), r.value = ""
  4323. }
  4324. if (o.fileLength = function () {
  4325. var i = 0, t = e || o.files || o.chooseFiles || r.files;
  4326. return layui.each(t, function () {
  4327. i++
  4328. }), i
  4329. }(), l.number && o.fileLength > l.number) return o.msg("同时最多只能上传的数量为:" + l.number);
  4330. if (l.size > 0 && !(a.ie && a.ie < 10)) {
  4331. var F;
  4332. if (layui.each(o.chooseFiles, function (e, i) {
  4333. if (i.size > 1024 * l.size) {
  4334. var t = l.size / 1024;
  4335. t = t >= 1 ? t.toFixed(2) + "MB" : l.size + "KB", r.value = "", F = t
  4336. }
  4337. }), F) return o.msg("文件不能超过" + F)
  4338. }
  4339. y()
  4340. }
  4341. }, p.prototype.events = function () {
  4342. var e = this, t = e.config, o = function (i) {
  4343. e.chooseFiles = {}, layui.each(i, function (i, t) {
  4344. var n = (new Date).getTime();
  4345. e.chooseFiles[n + "-" + i] = t
  4346. })
  4347. }, l = function (i, n) {
  4348. var a = e.elemFile,
  4349. o = i.length > 1 ? i.length + "个文件" : (i[0] || {}).name || a[0].value.match(/[^\/\\]+\..+/g) || [] || "";
  4350. a.next().hasClass(s) && a.next().remove(), e.upload(null, "choose"), e.isFile() || t.choose || a.after('<span class="layui-inline ' + s + '">' + o + "</span>")
  4351. };
  4352. t.elem.off("upload.start").on("upload.start", function () {
  4353. var a = i(this), o = a.attr("lay-data");
  4354. if (o) try {
  4355. o = new Function("return " + o)(), e.config = i.extend({}, t, o)
  4356. } catch (l) {
  4357. n.error("Upload element property lay-data configuration item has a syntax error: " + o)
  4358. }
  4359. e.config.item = a, e.elemFile[0].click()
  4360. }), a.ie && a.ie < 10 || t.elem.off("upload.over").on("upload.over", function () {
  4361. var e = i(this);
  4362. e.attr("lay-over", "")
  4363. }).off("upload.leave").on("upload.leave", function () {
  4364. var e = i(this);
  4365. e.removeAttr("lay-over")
  4366. }).off("upload.drop").on("upload.drop", function (n, a) {
  4367. var r = i(this), u = a.originalEvent.dataTransfer.files || [];
  4368. r.removeAttr("lay-over"), o(u), t.auto ? e.upload(u) : l(u)
  4369. }), e.elemFile.off("upload.change").on("upload.change", function () {
  4370. var i = this.files || [];
  4371. o(i), t.auto ? e.upload() : l(i)
  4372. }), t.bindAction.off("upload.action").on("upload.action", function () {
  4373. e.upload()
  4374. }), t.elem.data("haveEvents") || (e.elemFile.on("change", function () {
  4375. i(this).trigger("upload.change")
  4376. }), t.elem.on("click", function () {
  4377. e.isFile() || i(this).trigger("upload.start")
  4378. }), t.drag && t.elem.on("dragover", function (e) {
  4379. e.preventDefault(), i(this).trigger("upload.over")
  4380. }).on("dragleave", function (e) {
  4381. i(this).trigger("upload.leave")
  4382. }).on("drop", function (e) {
  4383. e.preventDefault(), i(this).trigger("upload.drop", e)
  4384. }), t.bindAction.on("click", function () {
  4385. i(this).trigger("upload.action")
  4386. }), t.elem.data("haveEvents", !0))
  4387. }, o.render = function (e) {
  4388. var i = new p(e);
  4389. return l.call(i)
  4390. }, e(r, o)
  4391. });
  4392. layui.define("jquery", function (e) {
  4393. "use strict";
  4394. var i = layui.jquery, t = {
  4395. config: {}, index: layui.slider ? layui.slider.index + 1e4 : 0, set: function (e) {
  4396. var t = this;
  4397. return t.config = i.extend({}, t.config, e), t
  4398. }, on: function (e, i) {
  4399. return layui.onevent.call(this, n, e, i)
  4400. }
  4401. }, a = function () {
  4402. var e = this, i = e.config;
  4403. return {
  4404. setValue: function (i, t) {
  4405. return e.slide("set", i, t || 0)
  4406. }, config: i
  4407. }
  4408. }, n = "slider", l = "layui-disabled", s = "layui-slider", r = "layui-slider-bar", o = "layui-slider-wrap",
  4409. u = "layui-slider-wrap-btn", d = "layui-slider-tips", v = "layui-slider-input", c = "layui-slider-input-txt",
  4410. m = "layui-slider-input-btn", p = "layui-slider-hover", f = function (e) {
  4411. var a = this;
  4412. a.index = ++t.index, a.config = i.extend({}, a.config, t.config, e), a.render()
  4413. };
  4414. f.prototype.config = {
  4415. type: "default",
  4416. min: 0,
  4417. max: 100,
  4418. value: 0,
  4419. step: 1,
  4420. showstep: !1,
  4421. tips: !0,
  4422. input: !1,
  4423. range: !1,
  4424. height: 200,
  4425. disabled: !1,
  4426. theme: "#009688"
  4427. }, f.prototype.render = function () {
  4428. var e = this, t = e.config;
  4429. if (t.step < 1 && (t.step = 1), t.max < t.min && (t.max = t.min + t.step), t.range) {
  4430. t.value = "object" == typeof t.value ? t.value : [t.min, t.value];
  4431. var a = Math.min(t.value[0], t.value[1]), n = Math.max(t.value[0], t.value[1]);
  4432. t.value[0] = a > t.min ? a : t.min, t.value[1] = n > t.min ? n : t.min, t.value[0] = t.value[0] > t.max ? t.max : t.value[0], t.value[1] = t.value[1] > t.max ? t.max : t.value[1];
  4433. var r = Math.floor((t.value[0] - t.min) / (t.max - t.min) * 100),
  4434. v = Math.floor((t.value[1] - t.min) / (t.max - t.min) * 100), m = v - r + "%";
  4435. r += "%", v += "%"
  4436. } else {
  4437. "object" == typeof t.value && (t.value = Math.min.apply(null, t.value)), t.value < t.min && (t.value = t.min), t.value > t.max && (t.value = t.max);
  4438. var m = Math.floor((t.value - t.min) / (t.max - t.min) * 100) + "%"
  4439. }
  4440. var p = t.disabled ? "#c2c2c2" : t.theme,
  4441. f = '<div class="layui-slider ' + ("vertical" === t.type ? "layui-slider-vertical" : "") + '">' + (t.tips ? '<div class="layui-slider-tips"></div>' : "") + '<div class="layui-slider-bar" style="background:' + p + "; " + ("vertical" === t.type ? "height" : "width") + ":" + m + ";" + ("vertical" === t.type ? "bottom" : "left") + ":" + (r || 0) + ';"></div><div class="layui-slider-wrap" style="' + ("vertical" === t.type ? "bottom" : "left") + ":" + (r || m) + ';"><div class="layui-slider-wrap-btn" style="border: 2px solid ' + p + ';"></div></div>' + (t.range ? '<div class="layui-slider-wrap" style="' + ("vertical" === t.type ? "bottom" : "left") + ":" + v + ';"><div class="layui-slider-wrap-btn" style="border: 2px solid ' + p + ';"></div></div>' : "") + "</div>",
  4442. h = i(t.elem), y = h.next("." + s);
  4443. if (y[0] && y.remove(), e.elemTemp = i(f), t.range ? (e.elemTemp.find("." + o).eq(0).data("value", t.value[0]), e.elemTemp.find("." + o).eq(1).data("value", t.value[1])) : e.elemTemp.find("." + o).data("value", t.value), h.html(e.elemTemp), "vertical" === t.type && e.elemTemp.height(t.height + "px"), t.showstep) {
  4444. for (var g = (t.max - t.min) / t.step, b = "", x = 1; x < g + 1; x++) {
  4445. var T = 100 * x / g;
  4446. T < 100 && (b += '<div class="layui-slider-step" style="' + ("vertical" === t.type ? "bottom" : "left") + ":" + T + '%"></div>')
  4447. }
  4448. e.elemTemp.append(b)
  4449. }
  4450. if (t.input && !t.range) {
  4451. var w = i('<div class="layui-slider-input layui-input"><div class="layui-slider-input-txt"><input type="text" class="layui-input"></div><div class="layui-slider-input-btn"><i class="layui-icon layui-icon-up"></i><i class="layui-icon layui-icon-down"></i></div></div>');
  4452. h.css("position", "relative"), h.append(w), h.find("." + c).children("input").val(t.value), "vertical" === t.type ? w.css({
  4453. left: 0,
  4454. top: -48
  4455. }) : e.elemTemp.css("margin-right", w.outerWidth() + 15)
  4456. }
  4457. t.disabled ? (e.elemTemp.addClass(l), e.elemTemp.find("." + u).addClass(l)) : e.slide(), e.elemTemp.find("." + u).on("mouseover", function () {
  4458. var a = "vertical" === t.type ? t.height : e.elemTemp[0].offsetWidth, n = e.elemTemp.find("." + o),
  4459. l = "vertical" === t.type ? a - i(this).parent()[0].offsetTop - n.height() : i(this).parent()[0].offsetLeft,
  4460. s = l / a * 100, r = i(this).parent().data("value"), u = t.setTips ? t.setTips(r) : r;
  4461. e.elemTemp.find("." + d).html(u), "vertical" === t.type ? e.elemTemp.find("." + d).css({
  4462. bottom: s + "%",
  4463. "margin-bottom": "20px",
  4464. display: "inline-block"
  4465. }) : e.elemTemp.find("." + d).css({left: s + "%", display: "inline-block"})
  4466. }).on("mouseout", function () {
  4467. e.elemTemp.find("." + d).css("display", "none")
  4468. })
  4469. }, f.prototype.slide = function (e, t, a) {
  4470. var n = this, l = n.config, s = n.elemTemp, f = function () {
  4471. return "vertical" === l.type ? l.height : s[0].offsetWidth
  4472. }, h = s.find("." + o), y = s.next("." + v), g = y.children("." + c).children("input").val(),
  4473. b = 100 / ((l.max - l.min) / Math.ceil(l.step)), x = function (e, i) {
  4474. e = Math.ceil(e) * b > 100 ? Math.ceil(e) * b : Math.round(e) * b, e = e > 100 ? 100 : e, h.eq(i).css("vertical" === l.type ? "bottom" : "left", e + "%");
  4475. var t = T(h[0].offsetLeft), a = l.range ? T(h[1].offsetLeft) : 0;
  4476. "vertical" === l.type ? (s.find("." + d).css({
  4477. bottom: e + "%",
  4478. "margin-bottom": "20px"
  4479. }), t = T(f() - h[0].offsetTop - h.height()), a = l.range ? T(f() - h[1].offsetTop - h.height()) : 0) : s.find("." + d).css("left", e + "%"), t = t > 100 ? 100 : t, a = a > 100 ? 100 : a;
  4480. var n = Math.min(t, a), o = Math.abs(t - a);
  4481. "vertical" === l.type ? s.find("." + r).css({
  4482. height: o + "%",
  4483. bottom: n + "%"
  4484. }) : s.find("." + r).css({width: o + "%", left: n + "%"});
  4485. var u = l.min + Math.round((l.max - l.min) * e / 100);
  4486. if (g = u, y.children("." + c).children("input").val(g), h.eq(i).data("value", u), u = l.setTips ? l.setTips(u) : u, s.find("." + d).html(u), l.range) {
  4487. var v = [h.eq(0).data("value"), h.eq(1).data("value")];
  4488. v[0] > v[1] && v.reverse()
  4489. }
  4490. l.change && l.change(l.range ? v : u)
  4491. }, T = function (e) {
  4492. var i = e / f() * 100 / b, t = Math.round(i) * b;
  4493. return e == f() && (t = Math.ceil(i) * b), t
  4494. }, w = i(['<div class="layui-auxiliar-moving" id="LAY-slider-moving"></div'].join("")), M = function (e, t) {
  4495. var a = function () {
  4496. t && t(), w.remove()
  4497. };
  4498. i("#LAY-slider-moving")[0] || i("body").append(w), w.on("mousemove", e), w.on("mouseup", a).on("mouseleave", a)
  4499. };
  4500. if ("set" === e) return x(t, a);
  4501. s.find("." + u).each(function (e) {
  4502. var t = i(this);
  4503. t.on("mousedown", function (i) {
  4504. i = i || window.event;
  4505. var a = t.parent()[0].offsetLeft, n = i.clientX;
  4506. "vertical" === l.type && (a = f() - t.parent()[0].offsetTop - h.height(), n = i.clientY);
  4507. var r = function (i) {
  4508. i = i || window.event;
  4509. var r = a + ("vertical" === l.type ? n - i.clientY : i.clientX - n);
  4510. r < 0 && (r = 0), r > f() && (r = f());
  4511. var o = r / f() * 100 / b;
  4512. x(o, e), t.addClass(p), s.find("." + d).show(), i.preventDefault()
  4513. }, o = function () {
  4514. t.removeClass(p), s.find("." + d).hide()
  4515. };
  4516. M(r, o)
  4517. })
  4518. }), s.on("click", function (e) {
  4519. var t = i("." + u);
  4520. if (!t.is(event.target) && 0 === t.has(event.target).length && t.length) {
  4521. var a,
  4522. n = "vertical" === l.type ? f() - e.clientY + i(this).offset().top : e.clientX - i(this).offset().left;
  4523. n < 0 && (n = 0), n > f() && (n = f());
  4524. var s = n / f() * 100 / b;
  4525. a = l.range ? "vertical" === l.type ? Math.abs(n - parseInt(i(h[0]).css("bottom"))) > Math.abs(n - parseInt(i(h[1]).css("bottom"))) ? 1 : 0 : Math.abs(n - h[0].offsetLeft) > Math.abs(n - h[1].offsetLeft) ? 1 : 0 : 0, x(s, a), e.preventDefault()
  4526. }
  4527. }), y.hover(function () {
  4528. var e = i(this);
  4529. e.children("." + m).fadeIn("fast")
  4530. }, function () {
  4531. var e = i(this);
  4532. e.children("." + m).fadeOut("fast")
  4533. }), y.children("." + m).children("i").each(function (e) {
  4534. i(this).on("click", function () {
  4535. g = 1 == e ? g - l.step < l.min ? l.min : Number(g) - l.step : Number(g) + l.step > l.max ? l.max : Number(g) + l.step;
  4536. var i = (g - l.min) / (l.max - l.min) * 100 / b;
  4537. x(i, 0)
  4538. })
  4539. });
  4540. var q = function () {
  4541. var e = this.value;
  4542. e = isNaN(e) ? 0 : e, e = e < l.min ? l.min : e, e = e > l.max ? l.max : e, this.value = e;
  4543. var i = (e - l.min) / (l.max - l.min) * 100 / b;
  4544. x(i, 0)
  4545. };
  4546. y.children("." + c).children("input").on("keydown", function (e) {
  4547. 13 === e.keyCode && (e.preventDefault(), q.call(this))
  4548. }).on("change", q)
  4549. }, f.prototype.events = function () {
  4550. var e = this;
  4551. e.config
  4552. }, t.render = function (e) {
  4553. var i = new f(e);
  4554. return a.call(i)
  4555. }, e(n, t)
  4556. });
  4557. layui.define("jquery", function (e) {
  4558. "use strict";
  4559. var i = layui.jquery, o = {
  4560. config: {}, index: layui.colorpicker ? layui.colorpicker.index + 1e4 : 0, set: function (e) {
  4561. var o = this;
  4562. return o.config = i.extend({}, o.config, e), o
  4563. }, on: function (e, i) {
  4564. return layui.onevent.call(this, "colorpicker", e, i)
  4565. }
  4566. }, r = function () {
  4567. var e = this, i = e.config;
  4568. return {config: i}
  4569. }, t = "colorpicker", n = "layui-show", l = "layui-colorpicker", c = ".layui-colorpicker-main",
  4570. a = "layui-icon-down", s = "layui-icon-close", f = "layui-colorpicker-trigger-span",
  4571. d = "layui-colorpicker-trigger-i", u = "layui-colorpicker-side", p = "layui-colorpicker-side-slider",
  4572. g = "layui-colorpicker-basis", v = "layui-colorpicker-alpha-bgcolor", h = "layui-colorpicker-alpha-slider",
  4573. m = "layui-colorpicker-basis-cursor", b = "layui-colorpicker-main-input", k = function (e) {
  4574. var i = {h: 0, s: 0, b: 0}, o = Math.min(e.r, e.g, e.b), r = Math.max(e.r, e.g, e.b), t = r - o;
  4575. return i.b = r, i.s = 0 != r ? 255 * t / r : 0, 0 != i.s ? e.r == r ? i.h = (e.g - e.b) / t : e.g == r ? i.h = 2 + (e.b - e.r) / t : i.h = 4 + (e.r - e.g) / t : i.h = -1, r == o && (i.h = 0), i.h *= 60, i.h < 0 && (i.h += 360), i.s *= 100 / 255, i.b *= 100 / 255, i
  4576. }, y = function (e) {
  4577. var e = e.indexOf("#") > -1 ? e.substring(1) : e;
  4578. if (3 == e.length) {
  4579. var i = e.split("");
  4580. e = i[0] + i[0] + i[1] + i[1] + i[2] + i[2]
  4581. }
  4582. e = parseInt(e, 16);
  4583. var o = {r: e >> 16, g: (65280 & e) >> 8, b: 255 & e};
  4584. return k(o)
  4585. }, x = function (e) {
  4586. var i = {}, o = e.h, r = 255 * e.s / 100, t = 255 * e.b / 100;
  4587. if (0 == r) i.r = i.g = i.b = t; else {
  4588. var n = t, l = (255 - r) * t / 255, c = (n - l) * (o % 60) / 60;
  4589. 360 == o && (o = 0), o < 60 ? (i.r = n, i.b = l, i.g = l + c) : o < 120 ? (i.g = n, i.b = l, i.r = n - c) : o < 180 ? (i.g = n, i.r = l, i.b = l + c) : o < 240 ? (i.b = n, i.r = l, i.g = n - c) : o < 300 ? (i.b = n, i.g = l, i.r = l + c) : o < 360 ? (i.r = n, i.g = l, i.b = n - c) : (i.r = 0, i.g = 0, i.b = 0)
  4590. }
  4591. return {r: Math.round(i.r), g: Math.round(i.g), b: Math.round(i.b)}
  4592. }, C = function (e) {
  4593. var o = x(e), r = [o.r.toString(16), o.g.toString(16), o.b.toString(16)];
  4594. return i.each(r, function (e, i) {
  4595. 1 == i.length && (r[e] = "0" + i)
  4596. }), r.join("")
  4597. }, P = function (e) {
  4598. var i = /[0-9]{1,3}/g, o = e.match(i) || [];
  4599. return {r: o[0], g: o[1], b: o[2]}
  4600. }, B = i(window), w = i(document), D = function (e) {
  4601. var r = this;
  4602. r.index = ++o.index, r.config = i.extend({}, r.config, o.config, e), r.render()
  4603. };
  4604. D.prototype.config = {
  4605. color: "",
  4606. size: null,
  4607. alpha: !1,
  4608. format: "hex",
  4609. predefine: !1,
  4610. colors: ["#009688", "#5FB878", "#1E9FFF", "#FF5722", "#FFB800", "#01AAED", "#999", "#c00", "#ff8c00", "#ffd700", "#90ee90", "#00ced1", "#1e90ff", "#c71585", "rgb(0, 186, 189)", "rgb(255, 120, 0)", "rgb(250, 212, 0)", "#393D49", "rgba(0,0,0,.5)", "rgba(255, 69, 0, 0.68)", "rgba(144, 240, 144, 0.5)", "rgba(31, 147, 255, 0.73)"]
  4611. }, D.prototype.render = function () {
  4612. var e = this, o = e.config,
  4613. r = i(['<div class="layui-unselect layui-colorpicker">', "<span " + ("rgb" == o.format && o.alpha ? 'class="layui-colorpicker-trigger-bgcolor"' : "") + ">", '<span class="layui-colorpicker-trigger-span" ', 'lay-type="' + ("rgb" == o.format ? o.alpha ? "rgba" : "torgb" : "") + '" ', 'style="' + function () {
  4614. var e = "";
  4615. return o.color ? (e = o.color, (o.color.match(/[0-9]{1,3}/g) || []).length > 3 && (o.alpha && "rgb" == o.format || (e = "#" + C(k(P(o.color))))), "background: " + e) : e
  4616. }() + '">', '<i class="layui-icon layui-colorpicker-trigger-i ' + (o.color ? a : s) + '"></i>', "</span>", "</span>", "</div>"].join("")),
  4617. t = i(o.elem);
  4618. o.size && r.addClass("layui-colorpicker-" + o.size), t.addClass("layui-inline").html(e.elemColorBox = r), e.color = e.elemColorBox.find("." + f)[0].style.background, e.events()
  4619. }, D.prototype.renderPicker = function () {
  4620. var e = this, o = e.config, r = e.elemColorBox[0],
  4621. t = e.elemPicker = i(['<div id="layui-colorpicker' + e.index + '" data-index="' + e.index + '" class="layui-anim layui-anim-upbit layui-colorpicker-main">', '<div class="layui-colorpicker-main-wrapper">', '<div class="layui-colorpicker-basis">', '<div class="layui-colorpicker-basis-white"></div>', '<div class="layui-colorpicker-basis-black"></div>', '<div class="layui-colorpicker-basis-cursor"></div>', "</div>", '<div class="layui-colorpicker-side">', '<div class="layui-colorpicker-side-slider"></div>', "</div>", "</div>", '<div class="layui-colorpicker-main-alpha ' + (o.alpha ? n : "") + '">', '<div class="layui-colorpicker-alpha-bgcolor">', '<div class="layui-colorpicker-alpha-slider"></div>', "</div>", "</div>", function () {
  4622. if (o.predefine) {
  4623. var e = ['<div class="layui-colorpicker-main-pre">'];
  4624. return layui.each(o.colors, function (i, o) {
  4625. e.push(['<div class="layui-colorpicker-pre' + ((o.match(/[0-9]{1,3}/g) || []).length > 3 ? " layui-colorpicker-pre-isalpha" : "") + '">', '<div style="background:' + o + '"></div>', "</div>"].join(""))
  4626. }), e.push("</div>"), e.join("")
  4627. }
  4628. return ""
  4629. }(), '<div class="layui-colorpicker-main-input">', '<div class="layui-inline">', '<input type="text" class="layui-input">', "</div>", '<div class="layui-btn-container">', '<button class="layui-btn layui-btn-primary layui-btn-sm" colorpicker-events="clear">清空</button>', '<button class="layui-btn layui-btn-sm" colorpicker-events="confirm">确定</button>', "</div", "</div>", "</div>"].join(""));
  4630. e.elemColorBox.find("." + f)[0];
  4631. i(c)[0] && i(c).data("index") == e.index ? e.removePicker(D.thisElemInd) : (e.removePicker(D.thisElemInd), i("body").append(t)), D.thisElemInd = e.index, D.thisColor = r.style.background, e.position(), e.pickerEvents()
  4632. }, D.prototype.removePicker = function (e) {
  4633. var o = this;
  4634. o.config;
  4635. return i("#layui-colorpicker" + (e || o.index)).remove(), o
  4636. }, D.prototype.position = function () {
  4637. var e = this, i = e.config, o = e.bindElem || e.elemColorBox[0], r = e.elemPicker[0],
  4638. t = o.getBoundingClientRect(), n = r.offsetWidth, l = r.offsetHeight, c = function (e) {
  4639. return e = e ? "scrollLeft" : "scrollTop", document.body[e] | document.documentElement[e]
  4640. }, a = function (e) {
  4641. return document.documentElement[e ? "clientWidth" : "clientHeight"]
  4642. }, s = 5, f = t.left, d = t.bottom;
  4643. f -= (n - o.offsetWidth) / 2, d += s, f + n + s > a("width") ? f = a("width") - n - s : f < s && (f = s), d + l + s > a() && (d = t.top > l ? t.top - l : a() - l, d -= 2 * s), i.position && (r.style.position = i.position), r.style.left = f + ("fixed" === i.position ? 0 : c(1)) + "px", r.style.top = d + ("fixed" === i.position ? 0 : c()) + "px"
  4644. }, D.prototype.val = function () {
  4645. var e = this, i = (e.config, e.elemColorBox.find("." + f)), o = e.elemPicker.find("." + b), r = i[0],
  4646. t = r.style.backgroundColor;
  4647. if (t) {
  4648. var n = k(P(t)), l = i.attr("lay-type");
  4649. if (e.select(n.h, n.s, n.b), "torgb" === l && o.find("input").val(t), "rgba" === l) {
  4650. var c = P(t);
  4651. if (3 == (t.match(/[0-9]{1,3}/g) || []).length) o.find("input").val("rgba(" + c.r + ", " + c.g + ", " + c.b + ", 1)"), e.elemPicker.find("." + h).css("left", 280); else {
  4652. o.find("input").val(t);
  4653. var a = 280 * t.slice(t.lastIndexOf(",") + 1, t.length - 1);
  4654. e.elemPicker.find("." + h).css("left", a)
  4655. }
  4656. e.elemPicker.find("." + v)[0].style.background = "linear-gradient(to right, rgba(" + c.r + ", " + c.g + ", " + c.b + ", 0), rgb(" + c.r + ", " + c.g + ", " + c.b + "))"
  4657. }
  4658. } else e.select(0, 100, 100), o.find("input").val(""), e.elemPicker.find("." + v)[0].style.background = "", e.elemPicker.find("." + h).css("left", 280)
  4659. }, D.prototype.side = function () {
  4660. var e = this, o = e.config, r = e.elemColorBox.find("." + f), t = r.attr("lay-type"),
  4661. n = e.elemPicker.find("." + u), l = e.elemPicker.find("." + p), c = e.elemPicker.find("." + g),
  4662. y = e.elemPicker.find("." + m), C = e.elemPicker.find("." + v), w = e.elemPicker.find("." + h),
  4663. D = l[0].offsetTop / 180 * 360, E = 100 - (y[0].offsetTop + 3) / 180 * 100,
  4664. H = (y[0].offsetLeft + 3) / 260 * 100, W = Math.round(w[0].offsetLeft / 280 * 100) / 100,
  4665. j = e.elemColorBox.find("." + d), F = e.elemPicker.find(".layui-colorpicker-pre").children("div"),
  4666. L = function (i, n, l, c) {
  4667. e.select(i, n, l);
  4668. var f = x({h: i, s: n, b: l});
  4669. if (j.addClass(a).removeClass(s), r[0].style.background = "rgb(" + f.r + ", " + f.g + ", " + f.b + ")", "torgb" === t && e.elemPicker.find("." + b).find("input").val("rgb(" + f.r + ", " + f.g + ", " + f.b + ")"), "rgba" === t) {
  4670. var d = 0;
  4671. d = 280 * c, w.css("left", d), e.elemPicker.find("." + b).find("input").val("rgba(" + f.r + ", " + f.g + ", " + f.b + ", " + c + ")"), r[0].style.background = "rgba(" + f.r + ", " + f.g + ", " + f.b + ", " + c + ")", C[0].style.background = "linear-gradient(to right, rgba(" + f.r + ", " + f.g + ", " + f.b + ", 0), rgb(" + f.r + ", " + f.g + ", " + f.b + "))"
  4672. }
  4673. o.change && o.change(e.elemPicker.find("." + b).find("input").val())
  4674. }, M = i(['<div class="layui-auxiliar-moving" id="LAY-colorpicker-moving"></div'].join("")),
  4675. Y = function (e) {
  4676. i("#LAY-colorpicker-moving")[0] || i("body").append(M), M.on("mousemove", e), M.on("mouseup", function () {
  4677. M.remove()
  4678. }).on("mouseleave", function () {
  4679. M.remove()
  4680. })
  4681. };
  4682. l.on("mousedown", function (e) {
  4683. var i = this.offsetTop, o = e.clientY, r = function (e) {
  4684. var r = i + (e.clientY - o), t = n[0].offsetHeight;
  4685. r < 0 && (r = 0), r > t && (r = t);
  4686. var l = r / 180 * 360;
  4687. D = l, L(l, H, E, W), e.preventDefault()
  4688. };
  4689. Y(r), e.preventDefault()
  4690. }), n.on("click", function (e) {
  4691. var o = e.clientY - i(this).offset().top;
  4692. o < 0 && (o = 0), o > this.offsetHeight && (o = this.offsetHeight);
  4693. var r = o / 180 * 360;
  4694. D = r, L(r, H, E, W), e.preventDefault()
  4695. }), y.on("mousedown", function (e) {
  4696. var i = this.offsetTop, o = this.offsetLeft, r = e.clientY, t = e.clientX, n = function (e) {
  4697. var n = i + (e.clientY - r), l = o + (e.clientX - t), a = c[0].offsetHeight - 3,
  4698. s = c[0].offsetWidth - 3;
  4699. n < -3 && (n = -3), n > a && (n = a), l < -3 && (l = -3), l > s && (l = s);
  4700. var f = (l + 3) / 260 * 100, d = 100 - (n + 3) / 180 * 100;
  4701. E = d, H = f, L(D, f, d, W), e.preventDefault()
  4702. };
  4703. layui.stope(e), Y(n), e.preventDefault()
  4704. }), c.on("mousedown", function (e) {
  4705. var o = e.clientY - i(this).offset().top - 3 + B.scrollTop(),
  4706. r = e.clientX - i(this).offset().left - 3 + B.scrollLeft();
  4707. o < -3 && (o = -3), o > this.offsetHeight - 3 && (o = this.offsetHeight - 3), r < -3 && (r = -3), r > this.offsetWidth - 3 && (r = this.offsetWidth - 3);
  4708. var t = (r + 3) / 260 * 100, n = 100 - (o + 3) / 180 * 100;
  4709. E = n, H = t, L(D, t, n, W), e.preventDefault(), y.trigger(e, "mousedown")
  4710. }), w.on("mousedown", function (e) {
  4711. var i = this.offsetLeft, o = e.clientX, r = function (e) {
  4712. var r = i + (e.clientX - o), t = C[0].offsetWidth;
  4713. r < 0 && (r = 0), r > t && (r = t);
  4714. var n = Math.round(r / 280 * 100) / 100;
  4715. W = n, L(D, H, E, n), e.preventDefault()
  4716. };
  4717. Y(r), e.preventDefault()
  4718. }), C.on("click", function (e) {
  4719. var o = e.clientX - i(this).offset().left;
  4720. o < 0 && (o = 0), o > this.offsetWidth && (o = this.offsetWidth);
  4721. var r = Math.round(o / 280 * 100) / 100;
  4722. W = r, L(D, H, E, r), e.preventDefault()
  4723. }), F.each(function () {
  4724. i(this).on("click", function () {
  4725. i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");
  4726. var e, o = this.style.backgroundColor, r = k(P(o)), t = o.slice(o.lastIndexOf(",") + 1, o.length - 1);
  4727. D = r.h, H = r.s, E = r.b, 3 == (o.match(/[0-9]{1,3}/g) || []).length && (t = 1), W = t, e = 280 * t, L(r.h, r.s, r.b, t)
  4728. })
  4729. })
  4730. }, D.prototype.select = function (e, i, o, r) {
  4731. var t = this, n = (t.config, C({h: e, s: 100, b: 100})), l = C({h: e, s: i, b: o}), c = e / 360 * 180,
  4732. a = 180 - o / 100 * 180 - 3, s = i / 100 * 260 - 3;
  4733. t.elemPicker.find("." + p).css("top", c), t.elemPicker.find("." + g)[0].style.background = "#" + n, t.elemPicker.find("." + m).css({
  4734. top: a,
  4735. left: s
  4736. }), "change" !== r && t.elemPicker.find("." + b).find("input").val("#" + l)
  4737. }, D.prototype.pickerEvents = function () {
  4738. var e = this, o = e.config, r = e.elemColorBox.find("." + f), t = e.elemPicker.find("." + b + " input"), n = {
  4739. clear: function (i) {
  4740. r[0].style.background = "", e.elemColorBox.find("." + d).removeClass(a).addClass(s), e.color = "", o.done && o.done(""), e.removePicker()
  4741. }, confirm: function (i, n) {
  4742. var l = t.val(), c = l, f = {};
  4743. if (l.indexOf(",") > -1) {
  4744. if (f = k(P(l)), e.select(f.h, f.s, f.b), r[0].style.background = c = "#" + C(f), (l.match(/[0-9]{1,3}/g) || []).length > 3 && "rgba" === r.attr("lay-type")) {
  4745. var u = 280 * l.slice(l.lastIndexOf(",") + 1, l.length - 1);
  4746. e.elemPicker.find("." + h).css("left", u), r[0].style.background = l, c = l
  4747. }
  4748. } else f = y(l), r[0].style.background = c = "#" + C(f), e.elemColorBox.find("." + d).removeClass(s).addClass(a);
  4749. return "change" === n ? (e.select(f.h, f.s, f.b, n), void (o.change && o.change(c))) : (e.color = l, o.done && o.done(l), void e.removePicker())
  4750. }
  4751. };
  4752. e.elemPicker.on("click", "*[colorpicker-events]", function () {
  4753. var e = i(this), o = e.attr("colorpicker-events");
  4754. n[o] && n[o].call(this, e)
  4755. }), t.on("keyup", function (e) {
  4756. var o = i(this);
  4757. n.confirm.call(this, o, 13 === e.keyCode ? null : "change")
  4758. })
  4759. }, D.prototype.events = function () {
  4760. var e = this, o = e.config, r = e.elemColorBox.find("." + f);
  4761. e.elemColorBox.on("click", function () {
  4762. e.renderPicker(), i(c)[0] && (e.val(), e.side())
  4763. }), o.elem[0] && !e.elemColorBox[0].eventHandler && (w.on("click", function (o) {
  4764. if (!i(o.target).hasClass(l) && !i(o.target).parents("." + l)[0] && !i(o.target).hasClass(c.replace(/\./g, "")) && !i(o.target).parents(c)[0] && e.elemPicker) {
  4765. if (e.color) {
  4766. var t = k(P(e.color));
  4767. e.select(t.h, t.s, t.b)
  4768. } else e.elemColorBox.find("." + d).removeClass(a).addClass(s);
  4769. r[0].style.background = e.color || "", e.removePicker()
  4770. }
  4771. }), B.on("resize", function () {
  4772. return !(!e.elemPicker || !i(c)[0]) && void e.position()
  4773. }), e.elemColorBox[0].eventHandler = !0)
  4774. }, o.render = function (e) {
  4775. var i = new D(e);
  4776. return r.call(i)
  4777. }, e(t, o)
  4778. });
  4779. layui.define("layer", function (e) {
  4780. "use strict";
  4781. var t = layui.$, i = layui.layer, a = layui.hint(), n = layui.device(), l = "form", r = ".layui-form",
  4782. s = "layui-this", o = "layui-hide", c = "layui-disabled", u = function () {
  4783. this.config = {
  4784. verify: {
  4785. required: [/[\S]+/, "必填项不能为空"],
  4786. phone: [/^1\d{10}$/, "请输入正确的手机号"],
  4787. email: [/^([a-zA-Z0-9_\.\-])+(\@|\(at\))(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "邮箱格式不正确"],
  4788. url: [/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/, "链接格式不正确"],
  4789. number: function (e) {
  4790. if (!e || isNaN(e)) return "只能填写数字"
  4791. },
  4792. date: [/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, "日期格式不正确"],
  4793. identity: [/(^\d{15}$)|(^\d{17}(x|X|\d)$)/, "请输入正确的身份证号"]
  4794. }
  4795. }
  4796. };
  4797. u.prototype.set = function (e) {
  4798. var i = this;
  4799. return t.extend(!0, i.config, e), i
  4800. }, u.prototype.verify = function (e) {
  4801. var i = this;
  4802. return t.extend(!0, i.config.verify, e), i
  4803. }, u.prototype.on = function (e, t) {
  4804. return layui.onevent.call(this, l, e, t)
  4805. }, u.prototype.val = function (e, i) {
  4806. var a = t(r + '[lay-filter="' + e + '"]');
  4807. a.each(function (e, a) {
  4808. var n = t(this);
  4809. layui.each(i, function (e, t) {
  4810. var i, a = n.find('[name="' + e + '"]');
  4811. a[0] && (i = a[0].type, "checkbox" === i ? a[0].checked = t : "radio" === i ? a.each(function () {
  4812. this.value === t && (this.checked = !0)
  4813. }) : a.val(t))
  4814. })
  4815. }), f.render(null, e)
  4816. }, u.prototype.render = function (e, i) {
  4817. var n = this, u = t(r + function () {
  4818. return i ? '[lay-filter="' + i + '"]' : ""
  4819. }()), d = {
  4820. select: function () {
  4821. var e, i = "请选择", a = "layui-form-select", n = "layui-select-title", r = "layui-select-none", d = "",
  4822. f = u.find("select"), v = function (i, l) {
  4823. t(i.target).parent().hasClass(n) && !l || (t("." + a).removeClass(a + "ed " + a + "up"), e && d && e.val(d)), e = null
  4824. }, y = function (i, u, f) {
  4825. var y, p = t(this), m = i.find("." + n), k = m.find("input"), x = i.find("dl"),
  4826. g = x.children("dd"), b = this.selectedIndex;
  4827. if (!u) {
  4828. var C = function () {
  4829. var e = i.offset().top + i.outerHeight() + 5 - h.scrollTop(), t = x.outerHeight();
  4830. b = p[0].selectedIndex, i.addClass(a + "ed"), g.removeClass(o), y = null, g.eq(b).addClass(s).siblings().removeClass(s), e + t > h.height() && e >= t && i.addClass(a + "up"), $()
  4831. }, w = function (e) {
  4832. i.removeClass(a + "ed " + a + "up"), k.blur(), y = null, e || T(k.val(), function (e) {
  4833. var i = p[0].selectedIndex;
  4834. e && (d = t(p[0].options[i]).html(), 0 === i && d === k.attr("placeholder") && (d = ""), k.val(d || ""))
  4835. })
  4836. }, $ = function () {
  4837. var e = x.children("dd." + s);
  4838. if (e[0]) {
  4839. var t = e.position().top, i = x.height(), a = e.height();
  4840. t > i && x.scrollTop(t + x.scrollTop() - i + a - 5), t < 0 && x.scrollTop(t + x.scrollTop() - 5)
  4841. }
  4842. };
  4843. m.on("click", function (e) {
  4844. i.hasClass(a + "ed") ? w() : (v(e, !0), C()), x.find("." + r).remove()
  4845. }), m.find(".layui-edge").on("click", function () {
  4846. k.focus()
  4847. }), k.on("keyup", function (e) {
  4848. var t = e.keyCode;
  4849. 9 === t && C()
  4850. }).on("keydown", function (e) {
  4851. var t = e.keyCode;
  4852. 9 === t && w();
  4853. var i = function (t, a) {
  4854. var n, l;
  4855. e.preventDefault();
  4856. var r = function () {
  4857. var e = x.children("dd." + s);
  4858. if (x.children("dd." + o)[0] && "next" === t) {
  4859. var i = x.children("dd:not(." + o + ",." + c + ")"), n = i.eq(0).index();
  4860. if (n >= 0 && n < e.index() && !i.hasClass(s)) return i.eq(0).prev()[0] ? i.eq(0).prev() : x.children(":last")
  4861. }
  4862. return a && a[0] ? a : y && y[0] ? y : e
  4863. }();
  4864. return l = r[t](), n = r[t]("dd:not(." + o + ")"), l[0] ? (y = r[t](), n[0] && !n.hasClass(c) || !y[0] ? (n.addClass(s).siblings().removeClass(s), void $()) : i(t, y)) : y = null
  4865. };
  4866. 38 === t && i("prev"), 40 === t && i("next"), 13 === t && (e.preventDefault(), x.children("dd." + s).trigger("click"))
  4867. });
  4868. var T = function (e, i, a) {
  4869. var n = 0;
  4870. layui.each(g, function () {
  4871. var i = t(this), l = i.text(), r = l.indexOf(e) === -1;
  4872. ("" === e || "blur" === a ? e !== l : r) && n++, "keyup" === a && i[r ? "addClass" : "removeClass"](o)
  4873. });
  4874. var l = n === g.length;
  4875. return i(l), l
  4876. }, j = function (e) {
  4877. var t = this.value, i = e.keyCode;
  4878. return 9 !== i && 13 !== i && 37 !== i && 38 !== i && 39 !== i && 40 !== i && (T(t, function (e) {
  4879. e ? x.find("." + r)[0] || x.append('<p class="' + r + '">无匹配项</p>') : x.find("." + r).remove()
  4880. }, "keyup"), "" === t && x.find("." + r).remove(), void $())
  4881. };
  4882. f && k.on("keyup", j).on("blur", function (i) {
  4883. var a = p[0].selectedIndex;
  4884. e = k, d = t(p[0].options[a]).html(), 0 === a && d === k.attr("placeholder") && (d = ""), setTimeout(function () {
  4885. T(k.val(), function (e) {
  4886. d || k.val("")
  4887. }, "blur")
  4888. }, 200)
  4889. }), g.on("click", function () {
  4890. var e = t(this), a = e.attr("lay-value"), n = p.attr("lay-filter");
  4891. return !e.hasClass(c) && (e.hasClass("layui-select-tips") ? k.val("") : (k.val(e.text()), e.addClass(s)), e.siblings().removeClass(s), p.val(a).removeClass("layui-form-danger"), layui.event.call(this, l, "select(" + n + ")", {
  4892. elem: p[0],
  4893. value: a,
  4894. othis: i
  4895. }), w(!0), !1)
  4896. }), i.find("dl>dt").on("click", function (e) {
  4897. return !1
  4898. }), t(document).off("click", v).on("click", v)
  4899. }
  4900. };
  4901. f.each(function (e, l) {
  4902. var r = t(this), o = r.next("." + a), u = this.disabled, d = l.value,
  4903. f = t(l.options[l.selectedIndex]), v = l.options[0];
  4904. if ("string" == typeof r.attr("lay-ignore")) return r.show();
  4905. var h = "string" == typeof r.attr("lay-search"), p = v ? v.value ? i : v.innerHTML || i : i,
  4906. m = t(['<div class="' + (h ? "" : "layui-unselect ") + a, (u ? " layui-select-disabled" : "") + '">', '<div class="' + n + '">', '<input type="text" placeholder="' + p + '" ' + ('value="' + (d ? f.html() : "") + '"') + (h ? "" : " readonly") + ' class="layui-input' + (h ? "" : " layui-unselect") + (u ? " " + c : "") + '">', '<i class="layui-edge"></i></div>', '<dl class="layui-anim layui-anim-upbit' + (r.find("optgroup")[0] ? " layui-select-group" : "") + '">', function (e) {
  4907. var t = [];
  4908. return layui.each(e, function (e, a) {
  4909. 0 !== e || a.value ? "optgroup" === a.tagName.toLowerCase() ? t.push("<dt>" + a.label + "</dt>") : t.push('<dd lay-value="' + a.value + '" class="' + (d === a.value ? s : "") + (a.disabled ? " " + c : "") + '">' + a.innerHTML + "</dd>") : t.push('<dd lay-value="" class="layui-select-tips">' + (a.innerHTML || i) + "</dd>")
  4910. }), 0 === t.length && t.push('<dd lay-value="" class="' + c + '">没有选项</dd>'), t.join("")
  4911. }(r.find("*")) + "</dl>", "</div>"].join(""));
  4912. o[0] && o.remove(), r.after(m), y.call(this, m, u, h)
  4913. })
  4914. }, checkbox: function () {
  4915. var e = {
  4916. checkbox: ["layui-form-checkbox", "layui-form-checked", "checkbox"],
  4917. _switch: ["layui-form-switch", "layui-form-onswitch", "switch"]
  4918. }, i = u.find("input[type=checkbox]"), a = function (e, i) {
  4919. var a = t(this);
  4920. e.on("click", function () {
  4921. var t = a.attr("lay-filter"), n = (a.attr("lay-text") || "").split("|");
  4922. a[0].disabled || (a[0].checked ? (a[0].checked = !1, e.removeClass(i[1]).find("em").text(n[1])) : (a[0].checked = !0, e.addClass(i[1]).find("em").text(n[0])), layui.event.call(a[0], l, i[2] + "(" + t + ")", {
  4923. elem: a[0],
  4924. value: a[0].value,
  4925. othis: e
  4926. }))
  4927. })
  4928. };
  4929. i.each(function (i, n) {
  4930. var l = t(this), r = l.attr("lay-skin"), s = (l.attr("lay-text") || "").split("|"),
  4931. o = this.disabled;
  4932. "switch" === r && (r = "_" + r);
  4933. var u = e[r] || e.checkbox;
  4934. if ("string" == typeof l.attr("lay-ignore")) return l.show();
  4935. var d = l.next("." + u[0]),
  4936. f = t(['<div class="layui-unselect ' + u[0], n.checked ? " " + u[1] : "", o ? " layui-checkbox-disbaled " + c : "", '"', r ? ' lay-skin="' + r + '"' : "", ">", function () {
  4937. var e = n.title.replace(/\s/g, ""), t = {
  4938. checkbox: [e ? "<span>" + n.title + "</span>" : "", '<i class="layui-icon layui-icon-ok"></i>'].join(""),
  4939. _switch: "<em>" + ((n.checked ? s[0] : s[1]) || "") + "</em><i></i>"
  4940. };
  4941. return t[r] || t.checkbox
  4942. }(), "</div>"].join(""));
  4943. d[0] && d.remove(), l.after(f), a.call(this, f, u)
  4944. })
  4945. }, radio: function () {
  4946. var e = "layui-form-radio", i = ["&#xe643;", "&#xe63f;"], a = u.find("input[type=radio]"),
  4947. n = function (a) {
  4948. var n = t(this), s = "layui-anim-scaleSpring";
  4949. a.on("click", function () {
  4950. var o = n[0].name, c = n.parents(r), u = n.attr("lay-filter"),
  4951. d = c.find("input[name=" + o.replace(/(\.|#|\[|\])/g, "\\$1") + "]");
  4952. n[0].disabled || (layui.each(d, function () {
  4953. var a = t(this).next("." + e);
  4954. this.checked = !1, a.removeClass(e + "ed"), a.find(".layui-icon").removeClass(s).html(i[1])
  4955. }), n[0].checked = !0, a.addClass(e + "ed"), a.find(".layui-icon").addClass(s).html(i[0]), layui.event.call(n[0], l, "radio(" + u + ")", {
  4956. elem: n[0],
  4957. value: n[0].value,
  4958. othis: a
  4959. }))
  4960. })
  4961. };
  4962. a.each(function (a, l) {
  4963. var r = t(this), s = r.next("." + e), o = this.disabled;
  4964. if ("string" == typeof r.attr("lay-ignore")) return r.show();
  4965. s[0] && s.remove();
  4966. var u = t(['<div class="layui-unselect ' + e, l.checked ? " " + e + "ed" : "", (o ? " layui-radio-disbaled " + c : "") + '">', '<i class="layui-anim layui-icon">' + i[l.checked ? 0 : 1] + "</i>", "<div>" + function () {
  4967. var e = l.title || "";
  4968. return "string" == typeof r.next().attr("lay-radio") && (e = r.next().html(), r.next().remove()), e
  4969. }() + "</div>", "</div>"].join(""));
  4970. r.after(u), n.call(this, u)
  4971. })
  4972. }
  4973. };
  4974. return e ? d[e] ? d[e]() : a.error("不支持的" + e + "表单渲染") : layui.each(d, function (e, t) {
  4975. t()
  4976. }), n
  4977. };
  4978. var d = function () {
  4979. var e = t(this), a = f.config.verify, s = null, o = "layui-form-danger", c = {}, u = e.parents(r),
  4980. d = u.find("*[lay-verify]"), v = e.parents("form")[0], h = u.find("input,select,textarea"),
  4981. y = e.attr("lay-filter");
  4982. if (layui.each(d, function (e, l) {
  4983. var r = t(this), c = r.attr("lay-verify").split("|"), u = r.attr("lay-verType"), d = r.val();
  4984. if (r.removeClass(o), layui.each(c, function (e, t) {
  4985. var c, f = "", v = "function" == typeof a[t];
  4986. if (a[t]) {
  4987. var c = v ? f = a[t](d, l) : !a[t][0].test(d);
  4988. if (f = f || a[t][1], c) return "tips" === u ? i.tips(f, function () {
  4989. return "string" == typeof r.attr("lay-ignore") || "select" !== l.tagName.toLowerCase() && !/^checkbox|radio$/.test(l.type) ? r : r.next()
  4990. }(), {tips: 1}) : "alert" === u ? i.alert(f, {title: "提示", shadeClose: !0}) : i.msg(f, {
  4991. icon: 5,
  4992. shift: 6
  4993. }), n.android || n.ios || l.focus(), r.addClass(o), s = !0
  4994. }
  4995. }), s) return s
  4996. }), s) return !1;
  4997. var p = {};
  4998. return layui.each(h, function (e, t) {
  4999. if (t.name = (t.name || "").replace(/^\s*|\s*&/, ""), t.name) {
  5000. if (/^.*\[\]$/.test(t.name)) {
  5001. var i = t.name.match(/^(.*)\[\]$/g)[0];
  5002. p[i] = 0 | p[i], t.name = t.name.replace(/^(.*)\[\]$/, "$1[" + p[i]++ + "]")
  5003. }
  5004. /^checkbox|radio$/.test(t.type) && !t.checked || (c[t.name] = t.value)
  5005. }
  5006. }), layui.event.call(this, l, "submit(" + y + ")", {elem: this, form: v, field: c})
  5007. }, f = new u, v = t(document), h = t(window);
  5008. f.render(), v.on("reset", r, function () {
  5009. var e = t(this).attr("lay-filter");
  5010. setTimeout(function () {
  5011. f.render(null, e)
  5012. }, 50)
  5013. }), v.on("submit", r, d).on("click", "*[lay-submit]", d), e(l, f)
  5014. });
  5015. layui.define("jquery", function (e) {
  5016. "use strict";
  5017. var o = layui.$, a = layui.hint(), i = "layui-tree-enter", r = function (e) {
  5018. this.options = e
  5019. }, t = {
  5020. arrow: ["&#xe623;", "&#xe625;"],
  5021. checkbox: ["&#xe626;", "&#xe627;"],
  5022. radio: ["&#xe62b;", "&#xe62a;"],
  5023. branch: ["&#xe622;", "&#xe624;"],
  5024. leaf: "&#xe621;"
  5025. };
  5026. r.prototype.init = function (e) {
  5027. var o = this;
  5028. e.addClass("layui-box layui-tree"), o.options.skin && e.addClass("layui-tree-skin-" + o.options.skin), o.tree(e), o.on(e)
  5029. }, r.prototype.tree = function (e, a) {
  5030. var i = this, r = i.options, n = a || r.nodes;
  5031. layui.each(n, function (a, n) {
  5032. var l = n.children && n.children.length > 0,
  5033. c = o('<ul class="' + (n.spread ? "layui-show" : "") + '"></ul>'),
  5034. s = o(["<li " + (n.spread ? 'data-spread="' + n.spread + '"' : "") + ">", function () {
  5035. return l ? '<i class="layui-icon layui-tree-spread">' + (n.spread ? t.arrow[1] : t.arrow[0]) + "</i>" : ""
  5036. }(), function () {
  5037. return r.check ? '<i class="layui-icon layui-tree-check">' + ("checkbox" === r.check ? t.checkbox[0] : "radio" === r.check ? t.radio[0] : "") + "</i>" : ""
  5038. }(), function () {
  5039. return '<a href="' + (n.href || "javascript:;") + '" ' + (r.target && n.href ? 'target="' + r.target + '"' : "") + ">" + ('<i class="layui-icon layui-tree-' + (l ? "branch" : "leaf") + '">' + (l ? n.spread ? t.branch[1] : t.branch[0] : t.leaf) + "</i>") + ("<cite>" + (n.name || "未命名") + "</cite></a>")
  5040. }(), "</li>"].join(""));
  5041. l && (s.append(c), i.tree(c, n.children)), e.append(s), "function" == typeof r.click && i.click(s, n), i.spread(s, n), r.drag && i.drag(s, n)
  5042. })
  5043. }, r.prototype.click = function (e, o) {
  5044. var a = this, i = a.options;
  5045. e.children("a").on("click", function (e) {
  5046. layui.stope(e), i.click(o)
  5047. })
  5048. }, r.prototype.spread = function (e, o) {
  5049. var a = this, i = (a.options, e.children(".layui-tree-spread")), r = e.children("ul"), n = e.children("a"),
  5050. l = function () {
  5051. e.data("spread") ? (e.data("spread", null), r.removeClass("layui-show"), i.html(t.arrow[0]), n.find(".layui-icon").html(t.branch[0])) : (e.data("spread", !0), r.addClass("layui-show"), i.html(t.arrow[1]), n.find(".layui-icon").html(t.branch[1]))
  5052. };
  5053. r[0] && (i.on("click", l), n.on("dblclick", l))
  5054. }, r.prototype.on = function (e) {
  5055. var a = this, r = a.options, t = "layui-tree-drag";
  5056. e.find("i").on("selectstart", function (e) {
  5057. return !1
  5058. }), r.drag && o(document).on("mousemove", function (e) {
  5059. var i = a.move;
  5060. if (i.from) {
  5061. var r = (i.to, o('<div class="layui-box ' + t + '"></div>'));
  5062. e.preventDefault(), o("." + t)[0] || o("body").append(r);
  5063. var n = o("." + t)[0] ? o("." + t) : r;
  5064. n.addClass("layui-show").html(i.from.elem.children("a").html()), n.css({
  5065. left: e.pageX + 10,
  5066. top: e.pageY + 10
  5067. })
  5068. }
  5069. }).on("mouseup", function () {
  5070. var e = a.move;
  5071. e.from && (e.from.elem.children("a").removeClass(i), e.to && e.to.elem.children("a").removeClass(i), a.move = {}, o("." + t).remove())
  5072. })
  5073. }, r.prototype.move = {}, r.prototype.drag = function (e, a) {
  5074. var r = this, t = (r.options, e.children("a")), n = function () {
  5075. var t = o(this), n = r.move;
  5076. n.from && (n.to = {item: a, elem: e}, t.addClass(i))
  5077. };
  5078. t.on("mousedown", function () {
  5079. var o = r.move;
  5080. o.from = {item: a, elem: e}
  5081. }), t.on("mouseenter", n).on("mousemove", n).on("mouseleave", function () {
  5082. var e = o(this), a = r.move;
  5083. a.from && (delete a.to, e.removeClass(i))
  5084. })
  5085. }, e("tree", function (e) {
  5086. var i = new r(e = e || {}), t = o(e.elem);
  5087. return t[0] ? void i.init(t) : a.error("layui.tree 没有找到" + e.elem + "元素")
  5088. })
  5089. });
  5090. layui.define(["laytpl", "laypage", "layer", "form", "util"], function (e) {
  5091. "use strict";
  5092. var t = layui.$, i = layui.laytpl, a = layui.laypage, l = layui.layer, n = layui.form,
  5093. o = (layui.util, layui.hint()), r = layui.device(), d = {
  5094. config: {checkName: "LAY_CHECKED", indexName: "LAY_TABLE_INDEX"},
  5095. cache: {},
  5096. index: layui.table ? layui.table.index + 1e4 : 0,
  5097. set: function (e) {
  5098. var i = this;
  5099. return i.config = t.extend({}, i.config, e), i
  5100. },
  5101. on: function (e, t) {
  5102. return layui.onevent.call(this, u, e, t)
  5103. }
  5104. }, c = function () {
  5105. var e = this, t = e.config, i = t.id || t.index;
  5106. return i && (c.that[i] = e, c.config[i] = t), {
  5107. reload: function (t) {
  5108. e.reload.call(e, t)
  5109. }, setColsWidth: function () {
  5110. e.setColsWidth.call(e)
  5111. }, resize: function () {
  5112. e.resize.call(e)
  5113. }, config: t
  5114. }
  5115. }, s = function (e) {
  5116. var t = c.config[e];
  5117. return t || o.error("The ID option was not found in the table instance"), t || null
  5118. }, u = "table", h = ".layui-table", y = "layui-hide", f = "layui-none", p = "layui-table-view",
  5119. v = ".layui-table-tool", m = ".layui-table-box", g = ".layui-table-init", b = ".layui-table-header",
  5120. x = ".layui-table-body", k = ".layui-table-main", C = ".layui-table-fixed", w = ".layui-table-fixed-l",
  5121. T = ".layui-table-fixed-r", A = ".layui-table-total", L = ".layui-table-page", S = ".layui-table-sort",
  5122. N = "layui-table-edit", W = "layui-table-hover", _ = function (e) {
  5123. var t = '{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';
  5124. return e = e || {}, ['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', "<thead>", "{{# layui.each(d.data.cols, function(i1, item1){ }}", "<tr>", "{{# layui.each(item1, function(i2, item2){ }}", '{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}', '{{# if(item2.fixed === "right"){ right = true; } }}', function () {
  5125. return e.fixed && "right" !== e.fixed ? '{{# if(item2.fixed && item2.fixed !== "right"){ }}' : "right" === e.fixed ? '{{# if(item2.fixed === "right"){ }}' : ""
  5126. }(), "{{# var isSort = !(item2.colGroup) && item2.sort; }}", '<th data-field="{{ item2.field||i2 }}" data-key="{{d.index}}-{{i1}}-{{i2}}" {{# if( item2.parentKey){ }}data-parentkey="{{ item2.parentKey }}"{{# } }} {{# if(item2.minWidth){ }}data-minwidth="{{item2.minWidth}}"{{# } }} ' + t + ' {{# if(item2.unresize || item2.colGroup){ }}data-unresize="true"{{# } }} class="{{# if(item2.hide){ }}layui-hide{{# } }}{{# if(isSort){ }} layui-unselect{{# } }}{{# if(!item2.field){ }} layui-table-col-special{{# } }}">', '<div class="layui-table-cell laytable-cell-', "{{# if(item2.colGroup){ }}", "group", "{{# } else { }}", "{{d.index}}-{{i1}}-{{i2}}", '{{# if(item2.type !== "normal"){ }}', " laytable-cell-{{ item2.type }}", "{{# } }}", "{{# } }}", '" {{#if(item2.align){}}align="{{item2.align}}"{{#}}}>', '{{# if(item2.type === "checkbox"){ }}', '<input type="checkbox" name="layTableCheckbox" lay-skin="primary" lay-filter="layTableAllChoose" {{# if(item2[d.data.checkName]){ }}checked{{# }; }}>', "{{# } else { }}", '<span>{{item2.title||""}}</span>', "{{# if(isSort){ }}", '<span class="layui-table-sort layui-inline"><i class="layui-edge layui-table-sort-asc" title="升序"></i><i class="layui-edge layui-table-sort-desc" title="降序"></i></span>', "{{# } }}", "{{# } }}", "</div>", "</th>", e.fixed ? "{{# }; }}" : "", "{{# }); }}", "</tr>", "{{# }); }}", "</thead>", "</table>"].join("")
  5127. },
  5128. E = ['<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', "<tbody></tbody>", "</table>"].join(""),
  5129. z = ['<div class="layui-form layui-border-box {{d.VIEW_CLASS}}" lay-filter="LAY-table-{{d.index}}" lay-id="{{ d.data.id }}" style="{{# if(d.data.width){ }}width:{{d.data.width}}px;{{# } }} {{# if(d.data.height){ }}height:{{d.data.height}}px;{{# } }}">', "{{# if(d.data.toolbar){ }}", '<div class="layui-table-tool">', '<div class="layui-table-tool-temp"></div>', '<div class="layui-table-tool-self"></div>', "</div>", "{{# } }}", '<div class="layui-table-box">', "{{# if(d.data.loading){ }}", '<div class="layui-table-init" style="background-color: #fff;">', '<i class="layui-icon layui-icon-loading layui-icon"></i>', "</div>", "{{# } }}", "{{# var left, right; }}", '<div class="layui-table-header">', _(), "</div>", '<div class="layui-table-body layui-table-main">', E, "</div>", "{{# if(left){ }}", '<div class="layui-table-fixed layui-table-fixed-l">', '<div class="layui-table-header">', _({fixed: !0}), "</div>", '<div class="layui-table-body">', E, "</div>", "</div>", "{{# }; }}", "{{# if(right){ }}", '<div class="layui-table-fixed layui-table-fixed-r">', '<div class="layui-table-header">', _({fixed: "right"}), '<div class="layui-table-mend"></div>', "</div>", '<div class="layui-table-body">', E, "</div>", "</div>", "{{# }; }}", "</div>", "{{# if(d.data.totalRow){ }}", '<div class="layui-table-total">', '<table cellspacing="0" cellpadding="0" border="0" class="layui-table" ', '{{# if(d.data.skin){ }}lay-skin="{{d.data.skin}}"{{# } }} {{# if(d.data.size){ }}lay-size="{{d.data.size}}"{{# } }} {{# if(d.data.even){ }}lay-even{{# } }}>', '<tbody><tr><td><div class="layui-table-cell" style="visibility: hidden;">Total</div></td></tr></tbody>', "</table>", "</div>", "{{# } }}", "{{# if(d.data.page){ }}", '<div class="layui-table-page">', '<div id="layui-table-page{{d.index}}"></div>', "</div>", "{{# } }}", "<style>", "{{# layui.each(d.data.cols, function(i1, item1){", "layui.each(item1, function(i2, item2){ }}", ".laytable-cell-{{d.index}}-{{i1}}-{{i2}}{ ", "{{# if(item2.width){ }}", "width: {{item2.width}}px;", "{{# } }}", " }", "{{# });", "}); }}", "</style>", "</div>"].join(""),
  5130. H = t(window), R = t(document), F = function (e) {
  5131. var i = this;
  5132. i.index = ++d.index, i.config = t.extend({}, i.config, d.config, e), i.render()
  5133. };
  5134. F.prototype.config = {
  5135. limit: 10,
  5136. loading: !0,
  5137. cellMinWidth: 60,
  5138. defaultToolbar: ["filter", "exports", "print"],
  5139. autoSort: !0,
  5140. text: {none: "无数据"}
  5141. }, F.prototype.render = function () {
  5142. var e = this, a = e.config;
  5143. if (a.elem = t(a.elem), a.where = a.where || {}, a.id = a.id || a.elem.attr("id") || e.index, a.request = t.extend({
  5144. pageName: "page",
  5145. limitName: "limit"
  5146. }, a.request), a.response = t.extend({
  5147. statusName: "code",
  5148. statusCode: 0,
  5149. msgName: "msg",
  5150. dataName: "data",
  5151. countName: "count"
  5152. }, a.response), "object" == typeof a.page && (a.limit = a.page.limit || a.limit, a.limits = a.page.limits || a.limits, e.page = a.page.curr = a.page.curr || 1, delete a.page.elem, delete a.page.jump), !a.elem[0]) return e;
  5153. a.height && /^full-\d+$/.test(a.height) && (e.fullHeightGap = a.height.split("-")[1], a.height = H.height() - e.fullHeightGap), e.setInit();
  5154. var l = a.elem, n = l.next("." + p), o = e.elem = t(i(z).render({VIEW_CLASS: p, data: a, index: e.index}));
  5155. if (a.index = e.index, n[0] && n.remove(), l.after(o), e.layTool = o.find(v), e.layBox = o.find(m), e.layHeader = o.find(b), e.layMain = o.find(k), e.layBody = o.find(x), e.layFixed = o.find(C), e.layFixLeft = o.find(w), e.layFixRight = o.find(T), e.layTotal = o.find(A), e.layPage = o.find(L), e.renderToolbar(), e.fullSize(), a.cols.length > 1) {
  5156. var r = e.layFixed.find(b).find("th");
  5157. r.height(e.layHeader.height() - 1 - parseFloat(r.css("padding-top")) - parseFloat(r.css("padding-bottom")))
  5158. }
  5159. e.pullData(e.page), e.events()
  5160. }, F.prototype.initOpts = function (e) {
  5161. var t = this, i = (t.config, {checkbox: 48, radio: 48, space: 15, numbers: 40});
  5162. e.checkbox && (e.type = "checkbox"), e.space && (e.type = "space"), e.type || (e.type = "normal"), "normal" !== e.type && (e.unresize = !0, e.width = e.width || i[e.type])
  5163. }, F.prototype.setInit = function (e) {
  5164. var t = this, i = t.config;
  5165. return i.clientWidth = i.width || function () {
  5166. var e = function (t) {
  5167. var a, l;
  5168. t = t || i.elem.parent(), a = t.width();
  5169. try {
  5170. l = "none" === t.css("display")
  5171. } catch (n) {
  5172. }
  5173. return !t[0] || a && !l ? a : e(t.parent())
  5174. };
  5175. return e()
  5176. }(), "width" === e ? i.clientWidth : void layui.each(i.cols, function (e, a) {
  5177. layui.each(a, function (l, n) {
  5178. if (!n) return void a.splice(l, 1);
  5179. if (n.key = e + "-" + l, n.hide = n.hide || !1, n.colGroup || n.colspan > 1) {
  5180. var o = 0;
  5181. layui.each(i.cols[e + 1], function (t, i) {
  5182. i.HAS_PARENT || o > 1 && o == n.colspan || (i.HAS_PARENT = !0, i.parentKey = e + "-" + l, o += parseInt(i.colspan > 1 ? i.colspan : 1))
  5183. }), n.colGroup = !0
  5184. }
  5185. t.initOpts(n)
  5186. })
  5187. })
  5188. }, F.prototype.renderToolbar = function () {
  5189. var e = this, a = e.config,
  5190. l = ['<div class="layui-inline" lay-event="add"><i class="layui-icon layui-icon-add-1"></i></div>', '<div class="layui-inline" lay-event="update"><i class="layui-icon layui-icon-edit"></i></div>', '<div class="layui-inline" lay-event="delete"><i class="layui-icon layui-icon-delete"></i></div>'].join(""),
  5191. n = e.layTool.find(".layui-table-tool-temp");
  5192. if ("default" === a.toolbar) n.html(l); else if ("string" == typeof a.toolbar) {
  5193. var o = t(a.toolbar).html() || "";
  5194. o && n.html(i(o).render(a))
  5195. }
  5196. var r = {
  5197. filter: {title: "筛选列", layEvent: "LAYTABLE_COLS", icon: "layui-icon-cols"},
  5198. exports: {title: "导出", layEvent: "LAYTABLE_EXPORT", icon: "layui-icon-export"},
  5199. print: {title: "打印", layEvent: "LAYTABLE_PRINT", icon: "layui-icon-print"}
  5200. }, d = [];
  5201. "object" == typeof a.defaultToolbar && layui.each(a.defaultToolbar, function (e, t) {
  5202. var i = r[t];
  5203. i && d.push('<div class="layui-inline" title="' + i.title + '" lay-event="' + i.layEvent + '"><i class="layui-icon ' + i.icon + '"></i></div>')
  5204. }), e.layTool.find(".layui-table-tool-self").html(d.join(""))
  5205. }, F.prototype.setParentCol = function (e, t) {
  5206. var i = this, a = i.config, l = i.layHeader.find('th[data-key="' + a.index + "-" + t + '"]'),
  5207. n = parseInt(l.attr("colspan")) || 0;
  5208. if (l[0]) {
  5209. var o = t.split("-"), r = a.cols[o[0]][o[1]];
  5210. e ? n-- : n++, l.attr("colspan", n), l[n < 1 ? "addClass" : "removeClass"](y), r.colspan = n, r.hide = n < 1;
  5211. var d = l.data("parentkey");
  5212. d && i.setParentCol(e, d)
  5213. }
  5214. }, F.prototype.setColsPatch = function () {
  5215. var e = this, t = e.config;
  5216. layui.each(t.cols, function (t, i) {
  5217. layui.each(i, function (t, i) {
  5218. i.hide && e.setParentCol(i.hide, i.parentKey)
  5219. })
  5220. })
  5221. }, F.prototype.setColsWidth = function () {
  5222. var e = this, t = e.config, i = 0, a = 0, l = 0, n = 0, o = e.setInit("width");
  5223. e.eachCols(function (e, t) {
  5224. t.hide || i++
  5225. }), o = o - function () {
  5226. return "line" === t.skin || "nob" === t.skin ? 2 : i + 1
  5227. }() - e.getScrollWidth(e.layMain[0]) - 1;
  5228. var r = function (e) {
  5229. layui.each(t.cols, function (i, r) {
  5230. layui.each(r, function (i, d) {
  5231. var c = 0, s = d.minWidth || t.cellMinWidth;
  5232. return d ? void (d.colGroup || d.hide || (e ? l && l < s && (a--, c = s) : (c = d.width || 0, /\d+%$/.test(c) ? (c = Math.floor(parseFloat(c) / 100 * o), c < s && (c = s)) : c || (d.width = c = 0, a++)), d.hide && (c = 0), n += c)) : void r.splice(i, 1)
  5233. })
  5234. }), o > n && a && (l = (o - n) / a)
  5235. };
  5236. r(), r(!0), e.autoColNums = a, e.eachCols(function (i, a) {
  5237. var n = a.minWidth || t.cellMinWidth;
  5238. a.colGroup || a.hide || (0 === a.width ? e.getCssRule(t.index + "-" + a.key, function (e) {
  5239. e.style.width = Math.floor(l >= n ? l : n) + "px"
  5240. }) : /\d+%$/.test(a.width) && e.getCssRule(t.index + "-" + a.key, function (e) {
  5241. e.style.width = Math.floor(parseFloat(a.width) / 100 * o) + "px"
  5242. }))
  5243. });
  5244. var d = e.layMain.width() - e.getScrollWidth(e.layMain[0]) - e.layMain.children("table").outerWidth();
  5245. if (e.autoColNums && d >= -i && d <= i) {
  5246. var c = function (t) {
  5247. var i;
  5248. return t = t || e.layHeader.eq(0).find("thead th:last-child"), i = t.data("field"), !i && t.prev()[0] ? c(t.prev()) : t
  5249. }, s = c(), u = s.data("key");
  5250. e.getCssRule(u, function (t) {
  5251. var i = t.style.width || s.outerWidth();
  5252. t.style.width = parseFloat(i) + d + "px", e.layMain.height() - e.layMain.prop("clientHeight") > 0 && (t.style.width = parseFloat(t.style.width) - 1 + "px")
  5253. })
  5254. }
  5255. e.loading(!0)
  5256. }, F.prototype.resize = function () {
  5257. var e = this;
  5258. e.fullSize(), e.setColsWidth(), e.scrollPatch()
  5259. }, F.prototype.reload = function (e) {
  5260. var i = this;
  5261. i.config.data && i.config.data.constructor === Array && delete i.config.data, i.config = t.extend({}, i.config, e), i.render()
  5262. }, F.prototype.page = 1, F.prototype.pullData = function (e) {
  5263. var i = this, a = i.config, l = a.request, n = a.response, o = function () {
  5264. "object" == typeof a.initSort && i.sort(a.initSort.field, a.initSort.type)
  5265. };
  5266. if (i.startTime = (new Date).getTime(), a.url) {
  5267. var r = {};
  5268. r[l.pageName] = e, r[l.limitName] = a.limit;
  5269. var d = t.extend(r, a.where);
  5270. a.contentType && 0 == a.contentType.indexOf("application/json") && (d = JSON.stringify(d)), t.ajax({
  5271. type: a.method || "get",
  5272. url: a.url,
  5273. contentType: a.contentType,
  5274. data: d,
  5275. dataType: "json",
  5276. headers: a.headers || {},
  5277. success: function (t) {
  5278. "function" == typeof a.parseData && (t = a.parseData(t) || t), t[n.statusName] != n.statusCode ? (i.renderForm(), i.layMain.html('<div class="' + f + '">' + (t[n.msgName] || "返回的数据不符合规范,正确的成功状态码 (" + n.statusName + ") 应为:" + n.statusCode) + "</div>")) : (i.renderData(t, e, t[n.countName]), o(), a.time = (new Date).getTime() - i.startTime + " ms"), i.setColsWidth(), "function" == typeof a.done && a.done(t, e, t[n.countName])
  5279. },
  5280. error: function (e, t) {
  5281. i.layMain.html('<div class="' + f + '">数据接口请求异常:' + t + "</div>"), i.renderForm(), i.setColsWidth()
  5282. }
  5283. })
  5284. } else if (a.data && a.data.constructor === Array) {
  5285. var c = {}, s = e * a.limit - a.limit;
  5286. c[n.dataName] = a.data.concat().splice(s, a.limit), c[n.countName] = a.data.length, i.renderData(c, e, a.data.length), o(), i.setColsWidth(), "function" == typeof a.done && a.done(c, e, c[n.countName])
  5287. }
  5288. }, F.prototype.eachCols = function (e) {
  5289. var t = this;
  5290. return d.eachCols(null, e, t.config.cols), t
  5291. }, F.prototype.renderData = function (e, n, o, r) {
  5292. var c = this, s = c.config, u = e[s.response.dataName] || [], h = [], p = [], v = [], m = function () {
  5293. var e;
  5294. return !r && c.sortKey ? c.sort(c.sortKey.field, c.sortKey.sort, !0) : (layui.each(u, function (a, l) {
  5295. var o = [], u = [], f = [], m = a + s.limit * (n - 1) + 1;
  5296. 0 !== l.length && (r || (l[d.config.indexName] = a), c.eachCols(function (n, r) {
  5297. var c = r.field || n, h = s.index + "-" + r.key, p = l[c];
  5298. if (void 0 !== p && null !== p || (p = ""), !r.colGroup) {
  5299. var v = ['<td data-field="' + c + '" data-key="' + h + '" ' + function () {
  5300. var e = [];
  5301. return r.edit && e.push('data-edit="' + r.edit + '"'), r.align && e.push('align="' + r.align + '"'), r.templet && e.push('data-content="' + p + '"'), r.toolbar && e.push('data-off="true"'), r.event && e.push('lay-event="' + r.event + '"'), r.style && e.push('style="' + r.style + '"'), r.minWidth && e.push('data-minwidth="' + r.minWidth + '"'), e.join(" ")
  5302. }() + ' class="' + function () {
  5303. var e = [];
  5304. return r.hide && e.push(y), r.field || e.push("layui-table-col-special"), e.join(" ")
  5305. }() + '">', '<div class="layui-table-cell laytable-cell-' + function () {
  5306. return "normal" === r.type ? h : h + " laytable-cell-" + r.type
  5307. }() + '">' + function () {
  5308. var n = t.extend(!0, {LAY_INDEX: m}, l), o = d.config.checkName;
  5309. switch (r.type) {
  5310. case"checkbox":
  5311. return '<input type="checkbox" name="layTableCheckbox" lay-skin="primary" ' + function () {
  5312. return r[o] ? (l[o] = r[o], r[o] ? "checked" : "") : n[o] ? "checked" : ""
  5313. }() + ">";
  5314. case"radio":
  5315. return n[o] && (e = a), '<input type="radio" name="layTableRadio_' + s.index + '" ' + (n[o] ? "checked" : "") + ' lay-type="layTableRadio">';
  5316. case"numbers":
  5317. return m
  5318. }
  5319. return r.toolbar ? i(t(r.toolbar).html() || "").render(n) : r.templet ? function () {
  5320. return "function" == typeof r.templet ? r.templet(n) : i(t(r.templet).html() || String(p)).render(n)
  5321. }() : p
  5322. }(), "</div></td>"].join("");
  5323. o.push(v), r.fixed && "right" !== r.fixed && u.push(v), "right" === r.fixed && f.push(v)
  5324. }
  5325. }), h.push('<tr data-index="' + a + '">' + o.join("") + "</tr>"), p.push('<tr data-index="' + a + '">' + u.join("") + "</tr>"), v.push('<tr data-index="' + a + '">' + f.join("") + "</tr>"))
  5326. }), c.layBody.scrollTop(0), c.layMain.find("." + f).remove(), c.layMain.find("tbody").html(h.join("")), c.layFixLeft.find("tbody").html(p.join("")), c.layFixRight.find("tbody").html(v.join("")), c.renderForm(), "number" == typeof e && c.setThisRowChecked(e), c.syncCheckAll(), c.haveInit ? c.scrollPatch() : setTimeout(function () {
  5327. c.scrollPatch()
  5328. }, 50), c.haveInit = !0, l.close(c.tipsIndex), s.HAS_SET_COLS_PATCH || c.setColsPatch(), void (s.HAS_SET_COLS_PATCH = !0))
  5329. };
  5330. return c.key = s.id || s.index, d.cache[c.key] = u, c.layPage[0 == o || 0 === u.length && 1 == n ? "addClass" : "removeClass"](y), r ? m() : 0 === u.length ? (c.renderForm(), c.layFixed.remove(), c.layMain.find("tbody").html(""), c.layMain.find("." + f).remove(), c.layMain.append('<div class="' + f + '">' + s.text.none + "</div>")) : (m(), c.renderTotal(u), void (s.page && (s.page = t.extend({
  5331. elem: "layui-table-page" + s.index,
  5332. count: o,
  5333. limit: s.limit,
  5334. limits: s.limits || [10, 20, 30, 40, 50, 60, 70, 80, 90],
  5335. groups: 3,
  5336. layout: ["prev", "page", "next", "skip", "count", "limit"],
  5337. prev: '<i class="layui-icon">&#xe603;</i>',
  5338. next: '<i class="layui-icon">&#xe602;</i>',
  5339. jump: function (e, t) {
  5340. t || (c.page = e.curr, s.limit = e.limit, c.loading(), c.pullData(e.curr))
  5341. }
  5342. }, s.page), s.page.count = o, a.render(s.page))))
  5343. }, F.prototype.renderTotal = function (e) {
  5344. var t = this, i = t.config, a = {};
  5345. if (i.totalRow) {
  5346. layui.each(e, function (e, i) {
  5347. 0 !== i.length && t.eachCols(function (e, t) {
  5348. var l = t.field || e, n = i[l];
  5349. t.totalRow && (a[l] = (a[l] || 0) + (parseFloat(n) || 0))
  5350. })
  5351. });
  5352. var l = [];
  5353. t.eachCols(function (e, t) {
  5354. var n = t.field || e,
  5355. o = ['<td data-field="' + n + '" data-key="' + i.index + "-" + t.key + '" ' + function () {
  5356. var e = [];
  5357. return t.align && e.push('align="' + t.align + '"'), t.style && e.push('style="' + t.style + '"'), t.minWidth && e.push('data-minwidth="' + t.minWidth + '"'), e.join(" ")
  5358. }() + ' class="' + function () {
  5359. var e = [];
  5360. return t.hide && e.push(y), t.field || e.push("layui-table-col-special"), e.join(" ")
  5361. }() + '">', '<div class="layui-table-cell laytable-cell-' + function () {
  5362. var e = i.index + "-" + t.key;
  5363. return "normal" === t.type ? e : e + " laytable-cell-" + t.type
  5364. }() + '">' + function () {
  5365. var e = t.totalRowText || "";
  5366. return t.totalRow ? parseFloat(a[n]).toFixed(2) || e : e
  5367. }(), "</div></td>"].join("");
  5368. l.push(o)
  5369. }), t.layTotal.find("tbody").html("<tr>" + l.join("") + "</tr>")
  5370. }
  5371. }, F.prototype.getColElem = function (e, t) {
  5372. var i = this, a = i.config;
  5373. return e.eq(0).find(".laytable-cell-" + (a.index + "-" + t) + ":eq(0)")
  5374. }, F.prototype.renderForm = function (e) {
  5375. n.render(e, "LAY-table-" + this.index)
  5376. }, F.prototype.setThisRowChecked = function (e) {
  5377. var t = this, i = (t.config, "layui-table-click"), a = t.layBody.find('tr[data-index="' + e + '"]');
  5378. a.addClass(i).siblings("tr").removeClass(i)
  5379. }, F.prototype.sort = function (e, i, a, l) {
  5380. var n, r, c = this, s = {}, h = c.config, y = h.elem.attr("lay-filter"), f = d.cache[c.key];
  5381. "string" == typeof e && c.layHeader.find("th").each(function (i, a) {
  5382. var l = t(this), o = l.data("field");
  5383. if (o === e) return e = l, n = o, !1
  5384. });
  5385. try {
  5386. var n = n || e.data("field"), p = e.data("key");
  5387. if (c.sortKey && !a && n === c.sortKey.field && i === c.sortKey.sort) return;
  5388. var v = c.layHeader.find("th .laytable-cell-" + p).find(S);
  5389. c.layHeader.find("th").find(S).removeAttr("lay-sort"), v.attr("lay-sort", i || null), c.layFixed.find("th")
  5390. } catch (m) {
  5391. return o.error("Table modules: Did not match to field")
  5392. }
  5393. c.sortKey = {
  5394. field: n,
  5395. sort: i
  5396. }, h.autoSort && ("asc" === i ? r = layui.sort(f, n) : "desc" === i ? r = layui.sort(f, n, !0) : (r = layui.sort(f, d.config.indexName), delete c.sortKey)), s[h.response.dataName] = r || f, c.renderData(s, c.page, c.count, !0), l && layui.event.call(e, u, "sort(" + y + ")", {
  5397. field: n,
  5398. type: i
  5399. })
  5400. }, F.prototype.loading = function (e) {
  5401. var i = this, a = i.config;
  5402. a.loading && (e ? (i.layInit && i.layInit.remove(), delete i.layInit, i.layBox.find(g).remove()) : (i.layInit = t(['<div class="layui-table-init">', '<i class="layui-icon layui-icon-loading layui-icon"></i>', "</div>"].join("")), i.layBox.append(i.layInit)))
  5403. }, F.prototype.setCheckData = function (e, t) {
  5404. var i = this, a = i.config, l = d.cache[i.key];
  5405. l[e] && l[e].constructor !== Array && (l[e][a.checkName] = t)
  5406. }, F.prototype.syncCheckAll = function () {
  5407. var e = this, t = e.config, i = e.layHeader.find('input[name="layTableCheckbox"]'), a = function (i) {
  5408. return e.eachCols(function (e, a) {
  5409. "checkbox" === a.type && (a[t.checkName] = i)
  5410. }), i
  5411. };
  5412. i[0] && (d.checkStatus(e.key).isAll ? (i[0].checked || (i.prop("checked", !0), e.renderForm("checkbox")), a(!0)) : (i[0].checked && (i.prop("checked", !1), e.renderForm("checkbox")), a(!1)))
  5413. }, F.prototype.getCssRule = function (e, t) {
  5414. var i = this, a = i.elem.find("style")[0], l = a.sheet || a.styleSheet || {}, n = l.cssRules || l.rules;
  5415. layui.each(n, function (i, a) {
  5416. if (a.selectorText === ".laytable-cell-" + e) return t(a), !0
  5417. })
  5418. }, F.prototype.fullSize = function () {
  5419. var e, t = this, i = t.config, a = i.height;
  5420. t.fullHeightGap && (a = H.height() - t.fullHeightGap, a < 135 && (a = 135), t.elem.css("height", a)), a && (e = parseFloat(a) - (t.layHeader.outerHeight() || 38), i.toolbar && (e -= t.layTool.outerHeight() || 50), i.totalRow && (e -= t.layTotal.outerHeight() || 40), i.page && (e = e - (t.layPage.outerHeight() || 41) - 2), t.layMain.css("height", e))
  5421. }, F.prototype.getScrollWidth = function (e) {
  5422. var t = 0;
  5423. return e ? t = e.offsetWidth - e.clientWidth : (e = document.createElement("div"), e.style.width = "100px", e.style.height = "100px", e.style.overflowY = "scroll", document.body.appendChild(e), t = e.offsetWidth - e.clientWidth, document.body.removeChild(e)), t
  5424. }, F.prototype.scrollPatch = function () {
  5425. var e = this, i = e.layMain.children("table"), a = e.layMain.width() - e.layMain.prop("clientWidth"),
  5426. l = e.layMain.height() - e.layMain.prop("clientHeight"),
  5427. n = (e.getScrollWidth(e.layMain[0]), i.outerWidth() - e.layMain.width()), o = function (e) {
  5428. if (a && l) {
  5429. if (e = e.eq(0), !e.find(".layui-table-patch")[0]) {
  5430. var i = t('<th class="layui-table-patch"><div class="layui-table-cell"></div></th>');
  5431. i.find("div").css({width: a}), e.find("tr").append(i)
  5432. }
  5433. } else e.find(".layui-table-patch").remove()
  5434. };
  5435. o(e.layHeader), o(e.layTotal);
  5436. var r = e.layMain.height(), d = r - l;
  5437. e.layFixed.find(x).css("height", i.height() >= d ? d : "auto"), e.layFixRight[n > 0 ? "removeClass" : "addClass"](y), e.layFixRight.css("right", a - 1)
  5438. }, F.prototype.events = function () {
  5439. var e, a = this, o = a.config, c = t("body"), s = {}, h = a.layHeader.find("th"), f = ".layui-table-cell",
  5440. p = o.elem.attr("lay-filter");
  5441. a.layTool.on("click", "*[lay-event]", function (e) {
  5442. var i = t(this), c = i.attr("lay-event"), s = function (e) {
  5443. var l = t(e.list), n = t('<ul class="layui-table-tool-panel"></ul>');
  5444. n.html(l), o.height && n.css("max-height", o.height - (a.layTool.outerHeight() || 50)), i.find(".layui-table-tool-panel")[0] || i.append(n), a.renderForm(), n.on("click", function (e) {
  5445. layui.stope(e)
  5446. }), e.done && e.done(n, l)
  5447. };
  5448. switch (layui.stope(e), R.trigger("table.tool.panel.remove"), l.close(a.tipsIndex), c) {
  5449. case"LAYTABLE_COLS":
  5450. s({
  5451. list: function () {
  5452. var e = [];
  5453. return a.eachCols(function (t, i) {
  5454. i.field && "normal" == i.type && e.push('<li><input type="checkbox" name="' + i.field + '" data-key="' + i.key + '" data-parentkey="' + (i.parentKey || "") + '" lay-skin="primary" ' + (i.hide ? "" : "checked") + ' title="' + (i.title || i.field) + '" lay-filter="LAY_TABLE_TOOL_COLS"></li>')
  5455. }), e.join("")
  5456. }(), done: function () {
  5457. n.on("checkbox(LAY_TABLE_TOOL_COLS)", function (e) {
  5458. var i = t(e.elem), l = this.checked, n = i.data("key"), r = i.data("parentkey");
  5459. layui.each(o.cols, function (e, t) {
  5460. layui.each(t, function (t, i) {
  5461. if (e + "-" + t === n) {
  5462. var d = i.hide;
  5463. i.hide = !l, a.elem.find('*[data-key="' + o.index + "-" + n + '"]')[l ? "removeClass" : "addClass"](y), d != i.hide && a.setParentCol(!l, r), a.resize()
  5464. }
  5465. })
  5466. })
  5467. })
  5468. }
  5469. });
  5470. break;
  5471. case"LAYTABLE_EXPORT":
  5472. r.ie ? l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出", this, {tips: 3}) : s({
  5473. list: function () {
  5474. return ['<li data-type="csv">导出到 Csv 文件</li>', '<li data-type="xls">导出到 Excel 文件</li>'].join("")
  5475. }(), done: function (e, i) {
  5476. i.on("click", function () {
  5477. var e = t(this).data("type");
  5478. d.exportFile(o.id, null, e)
  5479. })
  5480. }
  5481. });
  5482. break;
  5483. case"LAYTABLE_PRINT":
  5484. var h = window.open("打印窗口", "_blank"),
  5485. f = ["<style>", "body{font-size: 12px; color: #666;}", "table{width: 100%; border-collapse: collapse; border-spacing: 0;}", "th,td{line-height: 20px; padding: 9px 15px; border: 1px solid #ccc; text-align: left; font-size: 12px; color: #666;}", "a{color: #666; text-decoration:none;}", "*.layui-hide{display: none}", "</style>"].join(""),
  5486. v = t(a.layHeader.html());
  5487. v.append(a.layMain.find("table").html()), v.find("th.layui-table-patch").remove(), v.find(".layui-table-col-special").remove(), h.document.write(f + v.prop("outerHTML")), h.document.close(), h.print(), h.close()
  5488. }
  5489. layui.event.call(this, u, "toolbar(" + p + ")", t.extend({event: c, config: o}, {}))
  5490. }), h.on("mousemove", function (e) {
  5491. var i = t(this), a = i.offset().left, l = e.clientX - a;
  5492. i.data("unresize") || s.resizeStart || (s.allowResize = i.width() - l <= 10, c.css("cursor", s.allowResize ? "col-resize" : ""))
  5493. }).on("mouseleave", function () {
  5494. t(this);
  5495. s.resizeStart || c.css("cursor", "")
  5496. }).on("mousedown", function (e) {
  5497. var i = t(this);
  5498. if (s.allowResize) {
  5499. var l = i.data("key");
  5500. e.preventDefault(), s.resizeStart = !0, s.offset = [e.clientX, e.clientY], a.getCssRule(l, function (e) {
  5501. var t = e.style.width || i.outerWidth();
  5502. s.rule = e, s.ruleWidth = parseFloat(t), s.minWidth = i.data("minwidth") || o.cellMinWidth
  5503. })
  5504. }
  5505. }), R.on("mousemove", function (t) {
  5506. if (s.resizeStart) {
  5507. if (t.preventDefault(), s.rule) {
  5508. var i = s.ruleWidth + t.clientX - s.offset[0];
  5509. i < s.minWidth && (i = s.minWidth), s.rule.style.width = i + "px", l.close(a.tipsIndex)
  5510. }
  5511. e = 1
  5512. }
  5513. }).on("mouseup", function (t) {
  5514. s.resizeStart && (s = {}, c.css("cursor", ""), a.scrollPatch()), 2 === e && (e = null)
  5515. }), h.on("click", function (i) {
  5516. var l, n = t(this), o = n.find(S), r = o.attr("lay-sort");
  5517. return o[0] && 1 !== e ? (l = "asc" === r ? "desc" : "desc" === r ? null : "asc", void a.sort(n, l, null, !0)) : e = 2
  5518. }).find(S + " .layui-edge ").on("click", function (e) {
  5519. var i = t(this), l = i.index(), n = i.parents("th").eq(0).data("field");
  5520. layui.stope(e), 0 === l ? a.sort(n, "asc", null, !0) : a.sort(n, "desc", null, !0)
  5521. });
  5522. var v = function (e) {
  5523. var l = t(this), n = l.parents("tr").eq(0).data("index"), o = a.layBody.find('tr[data-index="' + n + '"]'),
  5524. r = d.cache[a.key][n];
  5525. return t.extend({
  5526. tr: o, data: d.clearCacheKey(r), del: function () {
  5527. d.cache[a.key][n] = [], o.remove(), a.scrollPatch()
  5528. }, update: function (e) {
  5529. e = e || {}, layui.each(e, function (e, l) {
  5530. if (e in r) {
  5531. var n, d = o.children('td[data-field="' + e + '"]');
  5532. r[e] = l, a.eachCols(function (t, i) {
  5533. i.field == e && i.templet && (n = i.templet)
  5534. }), d.children(f).html(function () {
  5535. return n ? function () {
  5536. return "function" == typeof n ? n(r) : i(t(n).html() || l).render(r)
  5537. }() : l
  5538. }()), d.data("content", l)
  5539. }
  5540. })
  5541. }
  5542. }, e)
  5543. };
  5544. a.elem.on("click", 'input[name="layTableCheckbox"]+', function () {
  5545. var e = t(this).prev(), i = a.layBody.find('input[name="layTableCheckbox"]'),
  5546. l = e.parents("tr").eq(0).data("index"), n = e[0].checked,
  5547. o = "layTableAllChoose" === e.attr("lay-filter");
  5548. o ? (i.each(function (e, t) {
  5549. t.checked = n, a.setCheckData(e, n)
  5550. }), a.syncCheckAll(), a.renderForm("checkbox")) : (a.setCheckData(l, n), a.syncCheckAll()), layui.event.call(e[0], u, "checkbox(" + p + ")", v.call(e[0], {
  5551. checked: n,
  5552. type: o ? "all" : "one"
  5553. }))
  5554. }), a.elem.on("click", 'input[lay-type="layTableRadio"]+', function () {
  5555. var e = t(this).prev(), i = e[0].checked, l = d.cache[a.key], n = e.parents("tr").eq(0).data("index");
  5556. layui.each(l, function (e, t) {
  5557. n === e ? t.LAY_CHECKED = !0 : delete t.LAY_CHECKED
  5558. }), a.setThisRowChecked(n), layui.event.call(this, u, "radio(" + p + ")", v.call(this, {checked: i}))
  5559. }), a.layBody.on("mouseenter", "tr", function () {
  5560. var e = t(this), i = e.index();
  5561. a.layBody.find("tr:eq(" + i + ")").addClass(W)
  5562. }).on("mouseleave", "tr", function () {
  5563. var e = t(this), i = e.index();
  5564. a.layBody.find("tr:eq(" + i + ")").removeClass(W)
  5565. }).on("click", "tr", function () {
  5566. m.call(this, "row")
  5567. }).on("dblclick", "tr", function () {
  5568. m.call(this, "rowDouble")
  5569. });
  5570. var m = function (e) {
  5571. var i = t(this);
  5572. layui.event.call(this, u, e + "(" + p + ")", v.call(i.children("td")[0]))
  5573. };
  5574. a.layBody.on("change", "." + N, function () {
  5575. var e = t(this), i = this.value, l = e.parent().data("field"), n = e.parents("tr").eq(0).data("index"),
  5576. o = d.cache[a.key][n];
  5577. o[l] = i, layui.event.call(this, u, "edit(" + p + ")", v.call(this, {value: i, field: l}))
  5578. }).on("blur", "." + N, function () {
  5579. var e, l = t(this), n = l.parent().data("field"), o = l.parents("tr").eq(0).data("index"),
  5580. r = d.cache[a.key][o];
  5581. a.eachCols(function (t, i) {
  5582. i.field == n && i.templet && (e = i.templet)
  5583. }), l.siblings(f).html(function (a) {
  5584. return e ? function () {
  5585. return "function" == typeof e ? e(r) : i(t(e).html() || this.value).render(r)
  5586. }() : a
  5587. }(this.value)), l.parent().data("content", this.value), l.remove()
  5588. }), a.layBody.on("click", "td", function (e) {
  5589. var i = t(this), a = (i.data("field"), i.data("edit")), l = i.children(f);
  5590. if (!i.data("off") && a) {
  5591. var n = t('<input class="layui-input ' + N + '">');
  5592. return n[0].value = i.data("content") || l.text(), i.find("." + N)[0] || i.append(n), n.focus(), void layui.stope(e)
  5593. }
  5594. }).on("mouseenter", "td", function () {
  5595. b.call(this)
  5596. }).on("mouseleave", "td", function () {
  5597. b.call(this, "hide")
  5598. });
  5599. var g = "layui-table-grid-down", b = function (e) {
  5600. var i = t(this), a = i.children(f);
  5601. if (e) i.find(".layui-table-grid-down").remove(); else if (a.prop("scrollWidth") > a.outerWidth()) {
  5602. if (a.find("." + g)[0]) return;
  5603. i.append('<div class="' + g + '"><i class="layui-icon layui-icon-down"></i></div>')
  5604. }
  5605. };
  5606. a.layBody.on("click", "." + g, function (e) {
  5607. var i = t(this), n = i.parent(), d = n.children(f);
  5608. a.tipsIndex = l.tips(['<div class="layui-table-tips-main" style="margin-top: -' + (d.height() + 16) + "px;" + function () {
  5609. return "sm" === o.size ? "padding: 4px 15px; font-size: 12px;" : "lg" === o.size ? "padding: 14px 15px;" : ""
  5610. }() + '">', d.html(), "</div>", '<i class="layui-icon layui-table-tips-c layui-icon-close"></i>'].join(""), d[0], {
  5611. tips: [3, ""],
  5612. time: -1,
  5613. anim: -1,
  5614. maxWidth: r.ios || r.android ? 300 : a.elem.width() / 2,
  5615. isOutAnim: !1,
  5616. skin: "layui-table-tips",
  5617. success: function (e, t) {
  5618. e.find(".layui-table-tips-c").on("click", function () {
  5619. l.close(t)
  5620. })
  5621. }
  5622. }), layui.stope(e)
  5623. }), a.layBody.on("click", "*[lay-event]", function () {
  5624. var e = t(this), i = e.parents("tr").eq(0).data("index");
  5625. layui.event.call(this, u, "tool(" + p + ")", v.call(this, {event: e.attr("lay-event")})), a.setThisRowChecked(i)
  5626. }), a.layMain.on("scroll", function () {
  5627. var e = t(this), i = e.scrollLeft(), n = e.scrollTop();
  5628. a.layHeader.scrollLeft(i), a.layTotal.scrollLeft(i), a.layFixed.find(x).scrollTop(n), l.close(a.tipsIndex)
  5629. }), R.on("click", function () {
  5630. R.trigger("table.remove.tool.panel")
  5631. }), R.on("table.remove.tool.panel", function () {
  5632. t(".layui-table-tool-panel").remove()
  5633. }), H.on("resize", function () {
  5634. a.resize()
  5635. })
  5636. }, d.init = function (e, i) {
  5637. i = i || {};
  5638. var a = this, l = t(e ? 'table[lay-filter="' + e + '"]' : h + "[lay-data]"),
  5639. n = "Table element property lay-data configuration item has a syntax error: ";
  5640. return l.each(function () {
  5641. var a = t(this), l = a.attr("lay-data");
  5642. try {
  5643. l = new Function("return " + l)()
  5644. } catch (r) {
  5645. o.error(n + l)
  5646. }
  5647. var c = [], s = t.extend({
  5648. elem: this,
  5649. cols: [],
  5650. data: [],
  5651. skin: a.attr("lay-skin"),
  5652. size: a.attr("lay-size"),
  5653. even: "string" == typeof a.attr("lay-even")
  5654. }, d.config, i, l);
  5655. e && a.hide(), a.find("thead>tr").each(function (e) {
  5656. s.cols[e] = [], t(this).children().each(function (i) {
  5657. var a = t(this), l = a.attr("lay-data");
  5658. try {
  5659. l = new Function("return " + l)()
  5660. } catch (r) {
  5661. return o.error(n + l)
  5662. }
  5663. var d = t.extend({
  5664. title: a.text(),
  5665. colspan: a.attr("colspan") || 0,
  5666. rowspan: a.attr("rowspan") || 0
  5667. }, l);
  5668. d.colspan < 2 && c.push(d), s.cols[e].push(d)
  5669. })
  5670. }), a.find("tbody>tr").each(function (e) {
  5671. var i = t(this), a = {};
  5672. i.children("td").each(function (e, i) {
  5673. var l = t(this), n = l.data("field");
  5674. if (n) return a[n] = l.html()
  5675. }), layui.each(c, function (e, t) {
  5676. var l = i.children("td").eq(e);
  5677. a[t.field] = l.html()
  5678. }), s.data[e] = a
  5679. }), d.render(s)
  5680. }), a
  5681. }, c.that = {}, c.config = {}, d.eachCols = function (e, i, a) {
  5682. var l = c.config[e] || {}, n = [], o = 0;
  5683. a = t.extend(!0, [], a || l.cols), layui.each(a, function (e, t) {
  5684. layui.each(t, function (t, i) {
  5685. if (i.colGroup) {
  5686. var l = 0;
  5687. o++, i.CHILD_COLS = [], layui.each(a[e + 1], function (e, t) {
  5688. t.PARENT_COL_INDEX || l > 1 && l == i.colspan || (t.PARENT_COL_INDEX = o, i.CHILD_COLS.push(t), l += parseInt(t.colspan > 1 ? t.colspan : 1))
  5689. })
  5690. }
  5691. i.PARENT_COL_INDEX || n.push(i)
  5692. })
  5693. });
  5694. var r = function (e) {
  5695. layui.each(e || n, function (e, t) {
  5696. return t.CHILD_COLS ? r(t.CHILD_COLS) : void ("function" == typeof i && i(e, t))
  5697. })
  5698. };
  5699. r()
  5700. }, d.checkStatus = function (e) {
  5701. var t = 0, i = 0, a = [], l = d.cache[e] || [];
  5702. return layui.each(l, function (e, l) {
  5703. return l.constructor === Array ? void i++ : void (l[d.config.checkName] && (t++, a.push(d.clearCacheKey(l))))
  5704. }), {data: a, isAll: !!l.length && t === l.length - i}
  5705. }, d.exportFile = function (e, t, i) {
  5706. t = t || d.clearCacheKey(d.cache[e]), i = i || "csv";
  5707. var a = c.config[e] || {}, l = {csv: "text/csv", xls: "application/vnd.ms-excel"}[i],
  5708. n = document.createElement("a");
  5709. return r.ie ? o.error("IE_NOT_SUPPORT_EXPORTS") : (n.href = "data:" + l + ";charset=utf-8,\ufeff" + encodeURIComponent(function () {
  5710. var i = [], a = [];
  5711. return layui.each(t, function (t, l) {
  5712. var n = [];
  5713. "object" == typeof e ? (layui.each(e, function (e, a) {
  5714. 0 == t && i.push(a || "")
  5715. }), layui.each(d.clearCacheKey(l), function (e, t) {
  5716. n.push(t)
  5717. })) : d.eachCols(e, function (e, a) {
  5718. a.field && "normal" == a.type && !a.hide && (0 == t && i.push(a.title || ""), n.push(l[a.field]))
  5719. }), a.push(n.join(","))
  5720. }), i.join(",") + "\r\n" + a.join("\r\n")
  5721. }()), n.download = (a.title || "table_" + (a.index || "")) + "." + i, document.body.appendChild(n), n.click(), void document.body.removeChild(n))
  5722. }, d.resize = function (e) {
  5723. if (e) {
  5724. var t = s(e);
  5725. if (!t) return;
  5726. c.that[e].resize()
  5727. } else layui.each(c.that, function () {
  5728. this.resize()
  5729. })
  5730. }, d.reload = function (e, i) {
  5731. i = i || {};
  5732. var a = s(e);
  5733. if (a) return i.data && i.data.constructor === Array && delete a.data, d.render(t.extend(!0, {}, a, i))
  5734. }, d.render = function (e) {
  5735. var t = new F(e);
  5736. return c.call(t)
  5737. }, d.clearCacheKey = function (e) {
  5738. return e = t.extend({}, e), delete e[d.config.checkName], delete e[d.config.indexName], e
  5739. }, d.init(), e(u, d)
  5740. });
  5741. layui.define("jquery", function (e) {
  5742. "use strict";
  5743. var i = layui.$, n = (layui.hint(), layui.device(), {
  5744. config: {}, set: function (e) {
  5745. var n = this;
  5746. return n.config = i.extend({}, n.config, e), n
  5747. }, on: function (e, i) {
  5748. return layui.onevent.call(this, t, e, i)
  5749. }
  5750. }), t = "carousel", a = "layui-this", l = ">*[carousel-item]>*", o = "layui-carousel-left",
  5751. r = "layui-carousel-right", d = "layui-carousel-prev", s = "layui-carousel-next", u = "layui-carousel-arrow",
  5752. c = "layui-carousel-ind", m = function (e) {
  5753. var t = this;
  5754. t.config = i.extend({}, t.config, n.config, e), t.render()
  5755. };
  5756. m.prototype.config = {
  5757. width: "600px",
  5758. height: "280px",
  5759. full: !1,
  5760. arrow: "hover",
  5761. indicator: "inside",
  5762. autoplay: !0,
  5763. interval: 3e3,
  5764. anim: "",
  5765. trigger: "click",
  5766. index: 0
  5767. }, m.prototype.render = function () {
  5768. var e = this, n = e.config;
  5769. n.elem = i(n.elem), n.elem[0] && (e.elemItem = n.elem.find(l), n.index < 0 && (n.index = 0), n.index >= e.elemItem.length && (n.index = e.elemItem.length - 1), n.interval < 800 && (n.interval = 800), n.full ? n.elem.css({
  5770. position: "fixed",
  5771. width: "100%",
  5772. height: "100%",
  5773. zIndex: 9999
  5774. }) : n.elem.css({
  5775. width: n.width,
  5776. height: n.height
  5777. }), n.elem.attr("lay-anim", n.anim), e.elemItem.eq(n.index).addClass(a), e.elemItem.length <= 1 || (e.indicator(), e.arrow(), e.autoplay(), e.events()))
  5778. }, m.prototype.reload = function (e) {
  5779. var n = this;
  5780. clearInterval(n.timer), n.config = i.extend({}, n.config, e), n.render()
  5781. }, m.prototype.prevIndex = function () {
  5782. var e = this, i = e.config, n = i.index - 1;
  5783. return n < 0 && (n = e.elemItem.length - 1), n
  5784. }, m.prototype.nextIndex = function () {
  5785. var e = this, i = e.config, n = i.index + 1;
  5786. return n >= e.elemItem.length && (n = 0), n
  5787. }, m.prototype.addIndex = function (e) {
  5788. var i = this, n = i.config;
  5789. e = e || 1, n.index = n.index + e, n.index >= i.elemItem.length && (n.index = 0)
  5790. }, m.prototype.subIndex = function (e) {
  5791. var i = this, n = i.config;
  5792. e = e || 1, n.index = n.index - e, n.index < 0 && (n.index = i.elemItem.length - 1)
  5793. }, m.prototype.autoplay = function () {
  5794. var e = this, i = e.config;
  5795. i.autoplay && (e.timer = setInterval(function () {
  5796. e.slide()
  5797. }, i.interval))
  5798. }, m.prototype.arrow = function () {
  5799. var e = this, n = e.config,
  5800. t = i(['<button class="layui-icon ' + u + '" lay-type="sub">' + ("updown" === n.anim ? "&#xe619;" : "&#xe603;") + "</button>", '<button class="layui-icon ' + u + '" lay-type="add">' + ("updown" === n.anim ? "&#xe61a;" : "&#xe602;") + "</button>"].join(""));
  5801. n.elem.attr("lay-arrow", n.arrow), n.elem.find("." + u)[0] && n.elem.find("." + u).remove(), n.elem.append(t), t.on("click", function () {
  5802. var n = i(this), t = n.attr("lay-type");
  5803. e.slide(t)
  5804. })
  5805. }, m.prototype.indicator = function () {
  5806. var e = this, n = e.config, t = e.elemInd = i(['<div class="' + c + '"><ul>', function () {
  5807. var i = [];
  5808. return layui.each(e.elemItem, function (e) {
  5809. i.push("<li" + (n.index === e ? ' class="layui-this"' : "") + "></li>")
  5810. }), i.join("")
  5811. }(), "</ul></div>"].join(""));
  5812. n.elem.attr("lay-indicator", n.indicator), n.elem.find("." + c)[0] && n.elem.find("." + c).remove(), n.elem.append(t), "updown" === n.anim && t.css("margin-top", -(t.height() / 2)), t.find("li").on("hover" === n.trigger ? "mouseover" : n.trigger, function () {
  5813. var t = i(this), a = t.index();
  5814. a > n.index ? e.slide("add", a - n.index) : a < n.index && e.slide("sub", n.index - a)
  5815. })
  5816. }, m.prototype.slide = function (e, i) {
  5817. var n = this, l = n.elemItem, u = n.config, c = u.index, m = u.elem.attr("lay-filter");
  5818. n.haveSlide || ("sub" === e ? (n.subIndex(i), l.eq(u.index).addClass(d), setTimeout(function () {
  5819. l.eq(c).addClass(r), l.eq(u.index).addClass(r)
  5820. }, 50)) : (n.addIndex(i), l.eq(u.index).addClass(s), setTimeout(function () {
  5821. l.eq(c).addClass(o), l.eq(u.index).addClass(o)
  5822. }, 50)), setTimeout(function () {
  5823. l.removeClass(a + " " + d + " " + s + " " + o + " " + r), l.eq(u.index).addClass(a), n.haveSlide = !1
  5824. }, 300), n.elemInd.find("li").eq(u.index).addClass(a).siblings().removeClass(a), n.haveSlide = !0, layui.event.call(this, t, "change(" + m + ")", {
  5825. index: u.index,
  5826. prevIndex: c,
  5827. item: l.eq(u.index)
  5828. }))
  5829. }, m.prototype.events = function () {
  5830. var e = this, i = e.config;
  5831. i.elem.data("haveEvents") || (i.elem.on("mouseenter", function () {
  5832. clearInterval(e.timer)
  5833. }).on("mouseleave", function () {
  5834. e.autoplay()
  5835. }), i.elem.data("haveEvents", !0))
  5836. }, n.render = function (e) {
  5837. var i = new m(e);
  5838. return i
  5839. }, e(t, n)
  5840. });
  5841. layui.define("jquery", function (e) {
  5842. "use strict";
  5843. var a = layui.jquery, i = {
  5844. config: {}, index: layui.rate ? layui.rate.index + 1e4 : 0, set: function (e) {
  5845. var i = this;
  5846. return i.config = a.extend({}, i.config, e), i
  5847. }, on: function (e, a) {
  5848. return layui.onevent.call(this, n, e, a)
  5849. }
  5850. }, l = function () {
  5851. var e = this, a = e.config;
  5852. return {
  5853. setvalue: function (a) {
  5854. e.setvalue.call(e, a)
  5855. }, config: a
  5856. }
  5857. }, n = "rate", t = "layui-rate", o = "layui-icon-rate", s = "layui-icon-rate-solid", u = "layui-icon-rate-half",
  5858. r = "layui-icon-rate-solid layui-icon-rate-half", c = "layui-icon-rate-solid layui-icon-rate",
  5859. f = "layui-icon-rate layui-icon-rate-half", v = function (e) {
  5860. var l = this;
  5861. l.index = ++i.index, l.config = a.extend({}, l.config, i.config, e), l.render()
  5862. };
  5863. v.prototype.config = {
  5864. length: 5,
  5865. text: !1,
  5866. readonly: !1,
  5867. half: !1,
  5868. value: 0,
  5869. theme: ""
  5870. }, v.prototype.render = function () {
  5871. var e = this, i = e.config, l = i.theme ? 'style="color: ' + i.theme + ';"' : "";
  5872. i.elem = a(i.elem), parseInt(i.value) !== i.value && (i.half || (i.value = Math.ceil(i.value) - i.value < .5 ? Math.ceil(i.value) : Math.floor(i.value)));
  5873. for (var n = '<ul class="layui-rate" ' + (i.readonly ? "readonly" : "") + ">", u = 1; u <= i.length; u++) {
  5874. var r = '<li class="layui-inline"><i class="layui-icon ' + (u > Math.floor(i.value) ? o : s) + '" ' + l + "></i></li>";
  5875. i.half && parseInt(i.value) !== i.value && u == Math.ceil(i.value) ? n = n + '<li><i class="layui-icon layui-icon-rate-half" ' + l + "></i></li>" : n += r
  5876. }
  5877. n += "</ul>" + (i.text ? '<span class="layui-inline">' + i.value + "星" : "") + "</span>";
  5878. var c = i.elem, f = c.next("." + t);
  5879. f[0] && f.remove(), e.elemTemp = a(n), i.span = e.elemTemp.next("span"), i.setText && i.setText(i.value), c.html(e.elemTemp), c.addClass("layui-inline"), i.readonly || e.action()
  5880. }, v.prototype.setvalue = function (e) {
  5881. var a = this, i = a.config;
  5882. i.value = e, a.render()
  5883. }, v.prototype.action = function () {
  5884. var e = this, i = e.config, l = e.elemTemp, n = l.find("i").width();
  5885. l.children("li").each(function (e) {
  5886. var t = e + 1, v = a(this);
  5887. v.on("click", function (e) {
  5888. if (i.value = t, i.half) {
  5889. var o = e.pageX - a(this).offset().left;
  5890. o <= n / 2 && (i.value = i.value - .5)
  5891. }
  5892. i.text && l.next("span").text(i.value + "星"), i.choose && i.choose(i.value), i.setText && i.setText(i.value)
  5893. }), v.on("mousemove", function (e) {
  5894. if (l.find("i").each(function () {
  5895. a(this).addClass(o).removeClass(r)
  5896. }), l.find("i:lt(" + t + ")").each(function () {
  5897. a(this).addClass(s).removeClass(f)
  5898. }), i.half) {
  5899. var c = e.pageX - a(this).offset().left;
  5900. c <= n / 2 && v.children("i").addClass(u).removeClass(s)
  5901. }
  5902. }), v.on("mouseleave", function () {
  5903. l.find("i").each(function () {
  5904. a(this).addClass(o).removeClass(r)
  5905. }), l.find("i:lt(" + Math.floor(i.value) + ")").each(function () {
  5906. a(this).addClass(s).removeClass(f)
  5907. }), i.half && parseInt(i.value) !== i.value && l.children("li:eq(" + Math.floor(i.value) + ")").children("i").addClass(u).removeClass(c)
  5908. })
  5909. })
  5910. }, v.prototype.events = function () {
  5911. var e = this;
  5912. e.config
  5913. }, i.render = function (e) {
  5914. var a = new v(e);
  5915. return l.call(a)
  5916. }, e(n, i)
  5917. });
  5918. layui.define("jquery", function (t) {
  5919. "use strict";
  5920. var e = layui.$, i = {
  5921. fixbar: function (t) {
  5922. var i, a, n = "layui-fixbar", r = "layui-fixbar-top", o = e(document), l = e("body");
  5923. t = e.extend({showHeight: 200}, t), t.bar1 = t.bar1 === !0 ? "&#xe606;" : t.bar1, t.bar2 = t.bar2 === !0 ? "&#xe607;" : t.bar2, t.bgcolor = t.bgcolor ? "background-color:" + t.bgcolor : "";
  5924. var c = [t.bar1, t.bar2, "&#xe604;"],
  5925. g = e(['<ul class="' + n + '">', t.bar1 ? '<li class="layui-icon" lay-type="bar1" style="' + t.bgcolor + '">' + c[0] + "</li>" : "", t.bar2 ? '<li class="layui-icon" lay-type="bar2" style="' + t.bgcolor + '">' + c[1] + "</li>" : "", '<li class="layui-icon ' + r + '" lay-type="top" style="' + t.bgcolor + '">' + c[2] + "</li>", "</ul>"].join("")),
  5926. s = g.find("." + r), u = function () {
  5927. var e = o.scrollTop();
  5928. e >= t.showHeight ? i || (s.show(), i = 1) : i && (s.hide(), i = 0)
  5929. };
  5930. e("." + n)[0] || ("object" == typeof t.css && g.css(t.css), l.append(g), u(), g.find("li").on("click", function () {
  5931. var i = e(this), a = i.attr("lay-type");
  5932. "top" === a && e("html,body").animate({scrollTop: 0}, 200), t.click && t.click.call(this, a)
  5933. }), o.on("scroll", function () {
  5934. clearTimeout(a), a = setTimeout(function () {
  5935. u()
  5936. }, 100)
  5937. }))
  5938. }, countdown: function (t, e, i) {
  5939. var a = this, n = "function" == typeof e, r = new Date(t).getTime(),
  5940. o = new Date(!e || n ? (new Date).getTime() : e).getTime(), l = r - o,
  5941. c = [Math.floor(l / 864e5), Math.floor(l / 36e5) % 24, Math.floor(l / 6e4) % 60, Math.floor(l / 1e3) % 60];
  5942. n && (i = e);
  5943. var g = setTimeout(function () {
  5944. a.countdown(t, o + 1e3, i)
  5945. }, 1e3);
  5946. return i && i(l > 0 ? c : [0, 0, 0, 0], e, g), l <= 0 && clearTimeout(g), g
  5947. }, timeAgo: function (t, e) {
  5948. var i = this, a = [[], []], n = (new Date).getTime() - new Date(t).getTime();
  5949. return n > 6912e5 ? (n = new Date(t), a[0][0] = i.digit(n.getFullYear(), 4), a[0][1] = i.digit(n.getMonth() + 1), a[0][2] = i.digit(n.getDate()), e || (a[1][0] = i.digit(n.getHours()), a[1][1] = i.digit(n.getMinutes()), a[1][2] = i.digit(n.getSeconds())), a[0].join("-") + " " + a[1].join(":")) : n >= 864e5 ? (n / 1e3 / 60 / 60 / 24 | 0) + "天前" : n >= 36e5 ? (n / 1e3 / 60 / 60 | 0) + "小时前" : n >= 12e4 ? (n / 1e3 / 60 | 0) + "分钟前" : n < 0 ? "未来" : "刚刚"
  5950. }, digit: function (t, e) {
  5951. var i = "";
  5952. t = String(t), e = e || 2;
  5953. for (var a = t.length; a < e; a++) i += "0";
  5954. return t < Math.pow(10, e) ? i + (0 | t) : t
  5955. }, toDateString: function (t, e) {
  5956. var i = this, a = new Date(t || new Date),
  5957. n = [i.digit(a.getFullYear(), 4), i.digit(a.getMonth() + 1), i.digit(a.getDate())],
  5958. r = [i.digit(a.getHours()), i.digit(a.getMinutes()), i.digit(a.getSeconds())];
  5959. return e = e || "yyyy-MM-dd HH:mm:ss", e.replace(/yyyy/g, n[0]).replace(/MM/g, n[1]).replace(/dd/g, n[2]).replace(/HH/g, r[0]).replace(/mm/g, r[1]).replace(/ss/g, r[2])
  5960. }, escape: function (t) {
  5961. return String(t || "").replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#39;").replace(/"/g, "&quot;")
  5962. }
  5963. };
  5964. !function (t, e, i) {
  5965. "$:nomunge";
  5966. function a() {
  5967. n = e[l](function () {
  5968. r.each(function () {
  5969. var e = t(this), i = e.width(), a = e.height(), n = t.data(this, g);
  5970. (i !== n.w || a !== n.h) && e.trigger(c, [n.w = i, n.h = a])
  5971. }), a()
  5972. }, o[s])
  5973. }
  5974. var n, r = t([]), o = t.resize = t.extend(t.resize, {}), l = "setTimeout", c = "resize",
  5975. g = c + "-special-event", s = "delay", u = "throttleWindow";
  5976. o[s] = 250, o[u] = !0, t.event.special[c] = {
  5977. setup: function () {
  5978. if (!o[u] && this[l]) return !1;
  5979. var e = t(this);
  5980. r = r.add(e), t.data(this, g, {w: e.width(), h: e.height()}), 1 === r.length && a()
  5981. }, teardown: function () {
  5982. if (!o[u] && this[l]) return !1;
  5983. var e = t(this);
  5984. r = r.not(e), e.removeData(g), r.length || clearTimeout(n)
  5985. }, add: function (e) {
  5986. function a(e, a, r) {
  5987. var o = t(this), l = t.data(this, g) || {};
  5988. l.w = a !== i ? a : o.width(), l.h = r !== i ? r : o.height(), n.apply(this, arguments)
  5989. }
  5990. if (!o[u] && this[l]) return !1;
  5991. var n;
  5992. return t.isFunction(e) ? (n = e, a) : (n = e.handler, void (e.handler = a))
  5993. }
  5994. }
  5995. }(e, window), t("util", i)
  5996. });
  5997. layui.define("jquery", function (e) {
  5998. "use strict";
  5999. var l = layui.$, o = function (e) {
  6000. }, t = '<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon ">&#xe63e;</i>';
  6001. o.prototype.load = function (e) {
  6002. var o, i, n, r, a = this, c = 0;
  6003. e = e || {};
  6004. var f = l(e.elem);
  6005. if (f[0]) {
  6006. var m = l(e.scrollElem || document), u = e.mb || 50, s = !("isAuto" in e) || e.isAuto, v = e.end || "没有更多了",
  6007. y = e.scrollElem && e.scrollElem !== document, d = "<cite>加载更多</cite>",
  6008. h = l('<div class="layui-flow-more"><a href="javascript:;">' + d + "</a></div>");
  6009. f.find(".layui-flow-more")[0] || f.append(h);
  6010. var p = function (e, t) {
  6011. e = l(e), h.before(e), t = 0 == t || null, t ? h.html(v) : h.find("a").html(d), i = t, o = null, n && n()
  6012. }, g = function () {
  6013. o = !0, h.find("a").html(t), "function" == typeof e.done && e.done(++c, p)
  6014. };
  6015. if (g(), h.find("a").on("click", function () {
  6016. l(this);
  6017. i || o || g()
  6018. }), e.isLazyimg) var n = a.lazyimg({elem: e.elem + " img", scrollElem: e.scrollElem});
  6019. return s ? (m.on("scroll", function () {
  6020. var e = l(this), t = e.scrollTop();
  6021. r && clearTimeout(r), i || (r = setTimeout(function () {
  6022. var i = y ? e.height() : l(window).height(),
  6023. n = y ? e.prop("scrollHeight") : document.documentElement.scrollHeight;
  6024. n - t - i <= u && (o || g())
  6025. }, 100))
  6026. }), a) : a
  6027. }
  6028. }, o.prototype.lazyimg = function (e) {
  6029. var o, t = this, i = 0;
  6030. e = e || {};
  6031. var n = l(e.scrollElem || document), r = e.elem || "img", a = e.scrollElem && e.scrollElem !== document,
  6032. c = function (e, l) {
  6033. var o = n.scrollTop(), r = o + l, c = a ? function () {
  6034. return e.offset().top - n.offset().top + o
  6035. }() : e.offset().top;
  6036. if (c >= o && c <= r && !e.attr("src")) {
  6037. var m = e.attr("lay-src");
  6038. layui.img(m, function () {
  6039. var l = t.lazyimg.elem.eq(i);
  6040. e.attr("src", m).removeAttr("lay-src"), l[0] && f(l), i++
  6041. })
  6042. }
  6043. }, f = function (e, o) {
  6044. var f = a ? (o || n).height() : l(window).height(), m = n.scrollTop(), u = m + f;
  6045. if (t.lazyimg.elem = l(r), e) c(e, f); else for (var s = 0; s < t.lazyimg.elem.length; s++) {
  6046. var v = t.lazyimg.elem.eq(s), y = a ? function () {
  6047. return v.offset().top - n.offset().top + m
  6048. }() : v.offset().top;
  6049. if (c(v, f), i = s, y > u) break
  6050. }
  6051. };
  6052. if (f(), !o) {
  6053. var m;
  6054. n.on("scroll", function () {
  6055. var e = l(this);
  6056. m && clearTimeout(m), m = setTimeout(function () {
  6057. f(null, e)
  6058. }, 50)
  6059. }), o = !0
  6060. }
  6061. return f
  6062. }, e("flow", new o)
  6063. });
  6064. layui.define(["layer", "form"], function (t) {
  6065. "use strict";
  6066. var e = layui.$, i = layui.layer, a = layui.form, l = (layui.hint(), layui.device()), n = "layedit",
  6067. o = "layui-show", r = "layui-disabled", c = function () {
  6068. var t = this;
  6069. t.index = 0, t.config = {
  6070. tool: ["strong", "italic", "underline", "del", "|", "left", "center", "right", "|", "link", "unlink", "face", "image"],
  6071. hideTool: [],
  6072. height: 280
  6073. }
  6074. };
  6075. c.prototype.set = function (t) {
  6076. var i = this;
  6077. return e.extend(!0, i.config, t), i
  6078. }, c.prototype.on = function (t, e) {
  6079. return layui.onevent(n, t, e)
  6080. }, c.prototype.build = function (t, i) {
  6081. i = i || {};
  6082. var a = this, n = a.config, r = "layui-layedit", c = e("string" == typeof t ? "#" + t : t),
  6083. u = "LAY_layedit_" + ++a.index, d = c.next("." + r), y = e.extend({}, n, i), f = function () {
  6084. var t = [], e = {};
  6085. return layui.each(y.hideTool, function (t, i) {
  6086. e[i] = !0
  6087. }), layui.each(y.tool, function (i, a) {
  6088. C[a] && !e[a] && t.push(C[a])
  6089. }), t.join("")
  6090. }(),
  6091. m = e(['<div class="' + r + '">', '<div class="layui-unselect layui-layedit-tool">' + f + "</div>", '<div class="layui-layedit-iframe">', '<iframe id="' + u + '" name="' + u + '" textarea="' + t + '" frameborder="0"></iframe>', "</div>", "</div>"].join(""));
  6092. return l.ie && l.ie < 8 ? c.removeClass("layui-hide").addClass(o) : (d[0] && d.remove(), s.call(a, m, c[0], y), c.addClass("layui-hide").after(m), a.index)
  6093. }, c.prototype.getContent = function (t) {
  6094. var e = u(t);
  6095. if (e[0]) return d(e[0].document.body.innerHTML)
  6096. }, c.prototype.getText = function (t) {
  6097. var i = u(t);
  6098. if (i[0]) return e(i[0].document.body).text()
  6099. }, c.prototype.setContent = function (t, i, a) {
  6100. var l = u(t);
  6101. l[0] && (a ? e(l[0].document.body).append(i) : e(l[0].document.body).html(i), layedit.sync(t))
  6102. }, c.prototype.sync = function (t) {
  6103. var i = u(t);
  6104. if (i[0]) {
  6105. var a = e("#" + i[1].attr("textarea"));
  6106. a.val(d(i[0].document.body.innerHTML))
  6107. }
  6108. }, c.prototype.getSelection = function (t) {
  6109. var e = u(t);
  6110. if (e[0]) {
  6111. var i = m(e[0].document);
  6112. return document.selection ? i.text : i.toString()
  6113. }
  6114. };
  6115. var s = function (t, i, a) {
  6116. var l = this, n = t.find("iframe");
  6117. n.css({height: a.height}).on("load", function () {
  6118. var o = n.contents(), r = n.prop("contentWindow"), c = o.find("head"),
  6119. s = e(["<style>", "*{margin: 0; padding: 0;}", "body{padding: 10px; line-height: 20px; overflow-x: hidden; word-wrap: break-word; font: 14px Helvetica Neue,Helvetica,PingFang SC,Microsoft YaHei,Tahoma,Arial,sans-serif; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}", "a{color:#01AAED; text-decoration:none;}a:hover{color:#c00}", "p{margin-bottom: 10px;}", "img{display: inline-block; border: none; vertical-align: middle;}", "pre{margin: 10px 0; padding: 10px; line-height: 20px; border: 1px solid #ddd; border-left-width: 6px; background-color: #F2F2F2; color: #333; font-family: Courier New; font-size: 12px;}", "</style>"].join("")),
  6120. u = o.find("body");
  6121. c.append(s), u.attr("contenteditable", "true").css({"min-height": a.height}).html(i.value || ""), y.apply(l, [r, n, i, a]), g.call(l, r, t, a)
  6122. })
  6123. }, u = function (t) {
  6124. var i = e("#LAY_layedit_" + t), a = i.prop("contentWindow");
  6125. return [a, i]
  6126. }, d = function (t) {
  6127. return 8 == l.ie && (t = t.replace(/<.+>/g, function (t) {
  6128. return t.toLowerCase()
  6129. })), t
  6130. }, y = function (t, a, n, o) {
  6131. var r = t.document, c = e(r.body);
  6132. c.on("keydown", function (t) {
  6133. var e = t.keyCode;
  6134. if (13 === e) {
  6135. var a = m(r), l = p(a), n = l.parentNode;
  6136. if ("pre" === n.tagName.toLowerCase()) {
  6137. if (t.shiftKey) return;
  6138. return i.msg("请暂时用shift+enter"), !1
  6139. }
  6140. r.execCommand("formatBlock", !1, "<p>")
  6141. }
  6142. }), e(n).parents("form").on("submit", function () {
  6143. var t = c.html();
  6144. 8 == l.ie && (t = t.replace(/<.+>/g, function (t) {
  6145. return t.toLowerCase()
  6146. })), n.value = t
  6147. }), c.on("paste", function (e) {
  6148. r.execCommand("formatBlock", !1, "<p>"), setTimeout(function () {
  6149. f.call(t, c), n.value = c.html()
  6150. }, 100)
  6151. })
  6152. }, f = function (t) {
  6153. var i = this;
  6154. i.document;
  6155. t.find("*[style]").each(function () {
  6156. var t = this.style.textAlign;
  6157. this.removeAttribute("style"), e(this).css({"text-align": t || ""})
  6158. }), t.find("table").addClass("layui-table"), t.find("script,link").remove()
  6159. }, m = function (t) {
  6160. return t.selection ? t.selection.createRange() : t.getSelection().getRangeAt(0)
  6161. }, p = function (t) {
  6162. return t.endContainer || t.parentElement().childNodes[0]
  6163. }, v = function (t, i, a) {
  6164. var l = this.document, n = document.createElement(t);
  6165. for (var o in i) n.setAttribute(o, i[o]);
  6166. if (n.removeAttribute("text"), l.selection) {
  6167. var r = a.text || i.text;
  6168. if ("a" === t && !r) return;
  6169. r && (n.innerHTML = r), a.pasteHTML(e(n).prop("outerHTML")), a.select()
  6170. } else {
  6171. var r = a.toString() || i.text;
  6172. if ("a" === t && !r) return;
  6173. r && (n.innerHTML = r), a.deleteContents(), a.insertNode(n)
  6174. }
  6175. }, h = function (t, i) {
  6176. var a = this.document, l = "layedit-tool-active", n = p(m(a)), o = function (e) {
  6177. return t.find(".layedit-tool-" + e)
  6178. };
  6179. i && i[i.hasClass(l) ? "removeClass" : "addClass"](l), t.find(">i").removeClass(l), o("unlink").addClass(r), e(n).parents().each(function () {
  6180. var t = this.tagName.toLowerCase(), e = this.style.textAlign;
  6181. "b" !== t && "strong" !== t || o("b").addClass(l), "i" !== t && "em" !== t || o("i").addClass(l), "u" === t && o("u").addClass(l), "strike" === t && o("d").addClass(l), "p" === t && ("center" === e ? o("center").addClass(l) : "right" === e ? o("right").addClass(l) : o("left").addClass(l)), "a" === t && (o("link").addClass(l), o("unlink").removeClass(r))
  6182. })
  6183. }, g = function (t, a, l) {
  6184. var n = t.document, o = e(n.body), c = {
  6185. link: function (i) {
  6186. var a = p(i), l = e(a).parent();
  6187. b.call(o, {href: l.attr("href"), target: l.attr("target")}, function (e) {
  6188. var a = l[0];
  6189. "A" === a.tagName ? a.href = e.url : v.call(t, "a", {target: e.target, href: e.url, text: e.url}, i)
  6190. })
  6191. }, unlink: function (t) {
  6192. n.execCommand("unlink")
  6193. }, face: function (e) {
  6194. x.call(this, function (i) {
  6195. v.call(t, "img", {src: i.src, alt: i.alt}, e)
  6196. })
  6197. }, image: function (a) {
  6198. var n = this;
  6199. layui.use("upload", function (o) {
  6200. var r = l.uploadImage || {};
  6201. o.render({
  6202. url: r.url, method: r.type, elem: e(n).find("input")[0], done: function (e) {
  6203. 0 == e.code ? (e.data = e.data || {}, v.call(t, "img", {
  6204. src: e.data.src,
  6205. alt: e.data.title
  6206. }, a)) : i.msg(e.msg || "上传失败")
  6207. }
  6208. })
  6209. })
  6210. }, code: function (e) {
  6211. k.call(o, function (i) {
  6212. v.call(t, "pre", {text: i.code, "lay-lang": i.lang}, e)
  6213. })
  6214. }, help: function () {
  6215. i.open({
  6216. type: 2,
  6217. title: "帮助",
  6218. area: ["600px", "380px"],
  6219. shadeClose: !0,
  6220. shade: .1,
  6221. skin: "layui-layer-msg",
  6222. content: ["http://www.layui.com/about/layedit/help.html", "no"]
  6223. })
  6224. }
  6225. }, s = a.find(".layui-layedit-tool"), u = function () {
  6226. var i = e(this), a = i.attr("layedit-event"), l = i.attr("lay-command");
  6227. if (!i.hasClass(r)) {
  6228. o.focus();
  6229. var u = m(n);
  6230. u.commonAncestorContainer;
  6231. l ? (n.execCommand(l), /justifyLeft|justifyCenter|justifyRight/.test(l) && n.execCommand("formatBlock", !1, "<p>"), setTimeout(function () {
  6232. o.focus()
  6233. }, 10)) : c[a] && c[a].call(this, u), h.call(t, s, i)
  6234. }
  6235. }, d = /image/;
  6236. s.find(">i").on("mousedown", function () {
  6237. var t = e(this), i = t.attr("layedit-event");
  6238. d.test(i) || u.call(this)
  6239. }).on("click", function () {
  6240. var t = e(this), i = t.attr("layedit-event");
  6241. d.test(i) && u.call(this)
  6242. }), o.on("click", function () {
  6243. h.call(t, s), i.close(x.index)
  6244. })
  6245. }, b = function (t, e) {
  6246. var l = this, n = i.open({
  6247. type: 1,
  6248. id: "LAY_layedit_link",
  6249. area: "350px",
  6250. shade: .05,
  6251. shadeClose: !0,
  6252. moveType: 1,
  6253. title: "超链接",
  6254. skin: "layui-layer-msg",
  6255. content: ['<ul class="layui-form" style="margin: 15px;">', '<li class="layui-form-item">', '<label class="layui-form-label" style="width: 60px;">URL</label>', '<div class="layui-input-block" style="margin-left: 90px">', '<input name="url" lay-verify="url" value="' + (t.href || "") + '" autofocus="true" autocomplete="off" class="layui-input">', "</div>", "</li>", '<li class="layui-form-item">', '<label class="layui-form-label" style="width: 60px;">打开方式</label>', '<div class="layui-input-block" style="margin-left: 90px">', '<input type="radio" name="target" value="_self" class="layui-input" title="当前窗口"' + ("_self" !== t.target && t.target ? "" : "checked") + ">", '<input type="radio" name="target" value="_blank" class="layui-input" title="新窗口" ' + ("_blank" === t.target ? "checked" : "") + ">", "</div>", "</li>", '<li class="layui-form-item" style="text-align: center;">', '<button type="button" lay-submit lay-filter="layedit-link-yes" class="layui-btn"> 确定 </button>', '<button style="margin-left: 20px;" type="button" class="layui-btn layui-btn-primary"> 取消 </button>', "</li>", "</ul>"].join(""),
  6256. success: function (t, n) {
  6257. var o = "submit(layedit-link-yes)";
  6258. a.render("radio"), t.find(".layui-btn-primary").on("click", function () {
  6259. i.close(n), l.focus()
  6260. }), a.on(o, function (t) {
  6261. i.close(b.index), e && e(t.field)
  6262. })
  6263. }
  6264. });
  6265. b.index = n
  6266. }, x = function (t) {
  6267. var a = function () {
  6268. var t = ["[微笑]", "[嘻嘻]", "[哈哈]", "[可爱]", "[可怜]", "[挖鼻]", "[吃惊]", "[害羞]", "[挤眼]", "[闭嘴]", "[鄙视]", "[爱你]", "[泪]", "[偷笑]", "[亲亲]", "[生病]", "[太开心]", "[白眼]", "[右哼哼]", "[左哼哼]", "[嘘]", "[衰]", "[委屈]", "[吐]", "[哈欠]", "[抱抱]", "[怒]", "[疑问]", "[馋嘴]", "[拜拜]", "[思考]", "[汗]", "[困]", "[睡]", "[钱]", "[失望]", "[酷]", "[色]", "[哼]", "[鼓掌]", "[晕]", "[悲伤]", "[抓狂]", "[黑线]", "[阴险]", "[怒骂]", "[互粉]", "[心]", "[伤心]", "[猪头]", "[熊猫]", "[兔子]", "[ok]", "[耶]", "[good]", "[NO]", "[赞]", "[来]", "[弱]", "[草泥马]", "[神马]", "[囧]", "[浮云]", "[给力]", "[围观]", "[威武]", "[奥特曼]", "[礼物]", "[钟]", "[话筒]", "[蜡烛]", "[蛋糕]"],
  6269. e = {};
  6270. return layui.each(t, function (t, i) {
  6271. e[i] = layui.cache.dir + "images/face/" + t + ".gif"
  6272. }), e
  6273. }();
  6274. return x.hide = x.hide || function (t) {
  6275. "face" !== e(t.target).attr("layedit-event") && i.close(x.index)
  6276. }, x.index = i.tips(function () {
  6277. var t = [];
  6278. return layui.each(a, function (e, i) {
  6279. t.push('<li title="' + e + '"><img src="' + i + '" alt="' + e + '"></li>')
  6280. }), '<ul class="layui-clear">' + t.join("") + "</ul>"
  6281. }(), this, {
  6282. tips: 1, time: 0, skin: "layui-box layui-util-face", maxWidth: 500, success: function (l, n) {
  6283. l.css({marginTop: -4, marginLeft: -10}).find(".layui-clear>li").on("click", function () {
  6284. t && t({src: a[this.title], alt: this.title}), i.close(n)
  6285. }), e(document).off("click", x.hide).on("click", x.hide)
  6286. }
  6287. })
  6288. }, k = function (t) {
  6289. var e = this, l = i.open({
  6290. type: 1,
  6291. id: "LAY_layedit_code",
  6292. area: "550px",
  6293. shade: .05,
  6294. shadeClose: !0,
  6295. moveType: 1,
  6296. title: "插入代码",
  6297. skin: "layui-layer-msg",
  6298. content: ['<ul class="layui-form layui-form-pane" style="margin: 15px;">', '<li class="layui-form-item">', '<label class="layui-form-label">请选择语言</label>', '<div class="layui-input-block">', '<select name="lang">', '<option value="JavaScript">JavaScript</option>', '<option value="HTML">HTML</option>', '<option value="CSS">CSS</option>', '<option value="Java">Java</option>', '<option value="PHP">PHP</option>', '<option value="C#">C#</option>', '<option value="Python">Python</option>', '<option value="Ruby">Ruby</option>', '<option value="Go">Go</option>', "</select>", "</div>", "</li>", '<li class="layui-form-item layui-form-text">', '<label class="layui-form-label">代码</label>', '<div class="layui-input-block">', '<textarea name="code" lay-verify="required" autofocus="true" class="layui-textarea" style="height: 200px;"></textarea>', "</div>", "</li>", '<li class="layui-form-item" style="text-align: center;">', '<button type="button" lay-submit lay-filter="layedit-code-yes" class="layui-btn"> 确定 </button>', '<button style="margin-left: 20px;" type="button" class="layui-btn layui-btn-primary"> 取消 </button>', "</li>", "</ul>"].join(""),
  6299. success: function (l, n) {
  6300. var o = "submit(layedit-code-yes)";
  6301. a.render("select"), l.find(".layui-btn-primary").on("click", function () {
  6302. i.close(n), e.focus()
  6303. }), a.on(o, function (e) {
  6304. i.close(k.index), t && t(e.field)
  6305. })
  6306. }
  6307. });
  6308. k.index = l
  6309. }, C = {
  6310. html: '<i class="layui-icon layedit-tool-html" title="HTML源代码" lay-command="html" layedit-event="html"">&#xe64b;</i><span class="layedit-tool-mid"></span>',
  6311. strong: '<i class="layui-icon layedit-tool-b" title="加粗" lay-command="Bold" layedit-event="b"">&#xe62b;</i>',
  6312. italic: '<i class="layui-icon layedit-tool-i" title="斜体" lay-command="italic" layedit-event="i"">&#xe644;</i>',
  6313. underline: '<i class="layui-icon layedit-tool-u" title="下划线" lay-command="underline" layedit-event="u"">&#xe646;</i>',
  6314. del: '<i class="layui-icon layedit-tool-d" title="删除线" lay-command="strikeThrough" layedit-event="d"">&#xe64f;</i>',
  6315. "|": '<span class="layedit-tool-mid"></span>',
  6316. left: '<i class="layui-icon layedit-tool-left" title="左对齐" lay-command="justifyLeft" layedit-event="left"">&#xe649;</i>',
  6317. center: '<i class="layui-icon layedit-tool-center" title="居中对齐" lay-command="justifyCenter" layedit-event="center"">&#xe647;</i>',
  6318. right: '<i class="layui-icon layedit-tool-right" title="右对齐" lay-command="justifyRight" layedit-event="right"">&#xe648;</i>',
  6319. link: '<i class="layui-icon layedit-tool-link" title="插入链接" layedit-event="link"">&#xe64c;</i>',
  6320. unlink: '<i class="layui-icon layedit-tool-unlink layui-disabled" title="清除链接" lay-command="unlink" layedit-event="unlink"">&#xe64d;</i>',
  6321. face: '<i class="layui-icon layedit-tool-face" title="表情" layedit-event="face"">&#xe650;</i>',
  6322. image: '<i class="layui-icon layedit-tool-image" title="图片" layedit-event="image">&#xe64a;<input type="file" name="file"></i>',
  6323. code: '<i class="layui-icon layedit-tool-code" title="插入代码" layedit-event="code">&#xe64e;</i>',
  6324. help: '<i class="layui-icon layedit-tool-help" title="帮助" layedit-event="help">&#xe607;</i>'
  6325. }, w = new c;
  6326. t(n, w)
  6327. });
  6328. layui.define("jquery", function (e) {
  6329. "use strict";
  6330. var a = layui.$, l = "http://www.layui.com/doc/modules/code.html";
  6331. e("code", function (e) {
  6332. var t = [];
  6333. e = e || {}, e.elem = a(e.elem || ".layui-code"), e.about = !("about" in e) || e.about, e.elem.each(function () {
  6334. t.push(this)
  6335. }), layui.each(t.reverse(), function (t, i) {
  6336. var c = a(i), o = c.html();
  6337. (c.attr("lay-encode") || e.encode) && (o = o.replace(/&(?!#?[a-zA-Z0-9]+;)/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&#39;").replace(/"/g, "&quot;")), c.html('<ol class="layui-code-ol"><li>' + o.replace(/[\r\t\n]+/g, "</li><li>") + "</li></ol>"), c.find(">.layui-code-h3")[0] || c.prepend('<h3 class="layui-code-h3">' + (c.attr("lay-title") || e.title || "code") + (e.about ? '<a href="' + l + '" target="_blank">layui.code</a>' : "") + "</h3>");
  6338. var d = c.find(">.layui-code-ol");
  6339. c.addClass("layui-box layui-code-view"), (c.attr("lay-skin") || e.skin) && c.addClass("layui-code-" + (c.attr("lay-skin") || e.skin)), (d.find("li").length / 100 | 0) > 0 && d.css("margin-left", (d.find("li").length / 100 | 0) + "px"), (c.attr("lay-height") || e.height) && d.css("max-height", c.attr("lay-height") || e.height)
  6340. })
  6341. })
  6342. }).addcss("modules/code.css", "skincodecss");