html 列表分页前端代码
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 列表分页前端代码相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html>
<html lang="zh-CN"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{$name} - 百合花俱乐部</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
<meta content="telephone=no" name="format-detection">
<link href="{MAIQUAN_LILY_STATIC}style/reset.css" rel="stylesheet">
<link href="{MAIQUAN_LILY_STATIC}style/main.css" rel="stylesheet">
<link href="{MAIQUAN_LILY_STATIC}style/weui.css" rel="stylesheet">
</head>
<body>
<div class="news">
<section class="pad10">
<div class="product_list ">
<ul class="j-flag" id="list-box">
</ul>
<a href="javascript:;" style="display: none;" id="more-btn" class="weui_btn weui_btn_primary">加载更多...</a>
</div>
</section>
</div>
<div id="template-box" style="display:none;">
<textarea name="jst" id="item-tpl">
{list beg..end as y}
{var x=xlist[y]}
<li style="padding-top: 0; padding-bottom: 0;background: #fff;">
<a style="width: 100%;" href="${x.url}">
<div class="auto">
<div class="name">${x.title}</div>
<img src="${x.cover_id}" style="height: 2.6rem;width: 100%;">
<p style="margin: .1rem 0;">${x.description}</p>
<div class="price">
<div class="more"><p>阅读全文</p></div>
</div>
</div>
</a>
</li>
{/list}
</textarea>
</div>
<script>
if ("undefined" == typeof I$)I$ = function () {
var t = {}, e = function () {
return !1
}, i = {};
var n = function (e, i) {
return t.toString.call(e) === "[object " + i + "]"
};
return function (t, _) {
var r = i[t], o = n(_, "Function");
if (null != _ && !o)r = _;
if (o) {
var s = [];
for (var a = 2, u = arguments.length; a < u; a++)s.push(arguments.callee(arguments[a]));
var c = {};
s.push.call(s, c, {}, e, []);
var h = _.apply(null, s) || c;
if (!r || !n(h, "Object"))r = h; else if (Object.keys)for (var l = Object.keys(h), a = 0, u = l.length, f; a < u; a++) {
f = l[a];
r[f] = h[f]
} else for (var f in h)r[f] = h[f]
}
if (null == r)r = {};
i[t] = r;
return r
}
}();
I$(6, function (t, e, i, n) {
var _ = Function.prototype;
_._$aop = function (t, e) {
var e = e || i, t = t || i, _ = this;
return function () {
var i = {args: n.slice.call(arguments, 0)};
t(i);
if (!i.stopped) {
i.value = _.apply(this, i.args);
e(i)
}
return i.value
}
};
_._$bind = function () {
var t = arguments, e = arguments[0], i = this;
return function () {
var _ = n.slice.call(t, 1);
n.push.apply(_, arguments);
return i.apply(e || null, _)
}
};
_._$bind2 = function () {
var t = arguments, e = n.shift.call(t), i = this;
return function () {
n.push.apply(arguments, t);
return i.apply(e || null, arguments)
}
};
var _ = String.prototype;
if (!_.trim)_.trim = function () {
var t = /(?:^\s+)|(?:\s+$)/g;
return function () {
return this.replace(t, "")
}
}();
if (!this.console)this.console = {log: i, error: i};
if (!0) {
NEJ = this.NEJ || {};
NEJ.copy = function (t, i) {
t = t || {};
i = i || e;
for (var n in i)if (i.hasOwnProperty(n))t[n] = i[n];
return t
};
NEJ = NEJ.copy(NEJ, {
O: e, R: n, F: i, P: function (t) {
if (!t || !t.length)return null;
var e = window;
for (var i = t.split("."), n = i.length, _ = "window" == i[0] ? 1 : 0; _ < n; e = e[i[_]] = e[i[_]] || {}, _++);
return e
}
});
return NEJ
}
return t
});
I$(25, function (t, e, i, n) {
t.__forIn = function (t, e, i) {
if (!t || !e)return null;
var n = Object.keys(t);
for (var _ = 0, r = n.length, o, s; _ < r; _++) {
o = n[_];
s = e.call(i || null, t[o], o, t);
if (s)return o
}
return null
};
t.__forEach = function (t, e, i) {
t.forEach(e, i)
};
t.__col2array = function (t) {
return n.slice.call(t, 0)
};
t.__str2time = function (t) {
return Date.parse(t)
};
return t
});
I$(15, function (t, e, i, n, _) {
var r = this.navigator.platform, o = this.navigator.userAgent;
var s = {mac: r, win: r, linux: r, ipad: o, ipod: o, iphone: r, android: o};
e._$IS = s;
for (var a in s)s[a] = new RegExp(a, "i").test(s[a]);
s.ios = s.ipad || s.iphone || s.ipod;
s.tablet = s.ipad;
s.desktop = s.mac || s.win || s.linux && !s.android;
e._$is = function (t) {
return !!s[t]
};
var u = {
engine: "unknow",
release: "unknow",
browser: "unknow",
version: "unknow",
prefix: {css: "", pro: "", clz: ""}
};
e._$KERNEL = u;
if (/msie\s+(.*?);/i.test(o) || /trident\/.+rv:([\d\.]+)/i.test(o)) {
u.engine = "trident";
u.browser = "ie";
u.version = RegExp.$1;
u.prefix = {css: "ms", pro: "ms", clz: "MS", evt: "MS"};
var c = {6: "2.0", 7: "3.0", 8: "4.0", 9: "5.0", 10: "6.0", 11: "7.0"};
u.release = c[document.documentMode] || c[parseInt(u.version)]
} else if (/webkit\/?([\d.]+?)(?=\s|$)/i.test(o)) {
u.engine = "webkit";
u.release = RegExp.$1 || "";
u.prefix = {css: "webkit", pro: "webkit", clz: "WebKit"}
} else if (/rv\:(.*?)\)\s+gecko\//i.test(o)) {
u.engine = "gecko";
u.release = RegExp.$1 || "";
u.browser = "firefox";
u.prefix = {css: "Moz", pro: "moz", clz: "Moz"};
if (/firefox\/(.*?)(?=\s|$)/i.test(o))u.version = RegExp.$1 || ""
} else if (/presto\/(.*?)\s/i.test(o)) {
u.engine = "presto";
u.release = RegExp.$1 || "";
u.browser = "opera";
u.prefix = {css: "O", pro: "o", clz: "O"};
if (/version\/(.*?)(?=\s|$)/i.test(o))u.version = RegExp.$1 || ""
}
if ("unknow" == u.browser) {
var c = ["chrome", "maxthon", "safari"];
for (var h = 0, l = c.length, f; h < l; h++) {
f = "safari" == c[h] ? "version" : c[h];
if (new RegExp(f + "/(.*?)(?=\\s|$)", "i").test(o)) {
u.browser = c[h];
u.version = RegExp.$1.trim();
break
}
}
}
e._$SUPPORT = {};
e._$support = function (t) {
return !!e._$SUPPORT[t]
};
if (!0)t.copy(t.P("nej.p"), e);
return e
}, 6);
I$(7, function (t, e, i, n, _, r) {
return t
}, 25, 15);
I$(1, function (t, e, i, n, _, r) {
i._$klass = function () {
var t = function () {
return "[object Function]" !== n.toString.call(arguments[0])
};
var i = function (t, i) {
for (; i;) {
var n = i.prototype, _ = e.__forIn(n, function (e) {
return t === e
});
if (null != _)return {name: _, klass: i};
i = i._$super
}
};
return function () {
var n = function () {
return this.__init.apply(this, arguments)
};
n.prototype.__init = _;
n._$extend = function (n, _) {
if (!t(n)) {
var r = this;
if (_ !== !1)e.__forIn(n, function (e, i) {
if (!t(e))r[i] = e
});
this._$super = n;
var o = function () {
};
o.prototype = n.prototype;
this.prototype = new o;
this.prototype.constructor = this;
var s = [], a = {};
var u = function (t, e) {
var n = i(t, e);
if (n) {
if (s[s.length - 1] != n.name)s.push(n.name);
a[n.name] = n.klass._$super;
return n.name
}
};
this.prototype.__super = function () {
var t = s[s.length - 1], e = arguments.callee.caller;
if (!t)t = u(e, this.constructor); else {
var i = a[t].prototype;
if (!i.hasOwnProperty(t) || e != i[t])t = u(e, this.constructor); else a[t] = a[t]._$super
}
var n = a[t].prototype[t].apply(this, arguments);
if (t == s[s.length - 1]) {
s.pop();
delete a[t]
}
return n
};
if (!0) {
var c = this.prototype;
c.__supInit = c.__super;
c.__supReset = c.__super;
c.__supDestroy = c.__super;
c.__supInitNode = c.__super;
c.__supDoBuild = c.__super;
c.__supOnShow = c.__super;
c.__supOnHide = c.__super;
c.__supOnRefresh = c.__super;
this._$supro = n.prototype
}
return this.prototype
}
};
return n
}
}();
if (!0) {
t.C = i._$klass;
t.copy(this.NEJ, t)
}
return i
}, 6, 7);
I$(8, function (t, e, i, n, _, r) {
var o = function (t, e) {
try {
e = e.toLowerCase();
if (null === t)return "null" == e;
if (void 0 === t)return "undefined" == e; else return n.toString.call(t).toLowerCase() == "[object " + e + "]"
} catch (i) {
return !1
}
};
i._$isFunction = function (t) {
return o(t, "function")
};
i._$isString = function (t) {
return o(t, "string")
};
i._$isNumber = function (t) {
return o(t, "number")
};
i._$isBoolean = function (t) {
return o(t, "boolean")
};
i._$isDate = function (t) {
return o(t, "date")
};
i._$isArray = function (t) {
return o(t, "array")
};
i._$isObject = function (t) {
return o(t, "object")
};
i._$length = function () {
var t = /[^\x00-\xff]/g;
return function (e) {
return ("" + (e || "")).replace(t, "**").length
}
}();
i._$loop = function (t, n, _) {
if (i._$isObject(t) && i._$isFunction(n))return e.__forIn.apply(e, arguments); else return null
};
i._$indexOf = function (t, e) {
var n = i._$isFunction(e) ? e : function (t) {
return t === e
}, _ = i._$forIn(t, n);
return null != _ ? _ : -1
};
i._$binSearch = function () {
var t;
var e = function (i, n, _) {
if (n > _)return -1;
var r = Math.ceil((n + _) / 2), o = t(i[r], r, i);
if (0 == o)return r;
if (o < 0)return e(i, n, r - 1); else return e(i, r + 1, _)
};
return function (i, n) {
t = n || _;
return e(i, 0, i.length - 1)
}
}();
i._$reverseEach = function (t, e, n) {
if (t && t.length && i._$isFunction(e))for (var _ = t.length - 1; _ >= 0; _--)if (e.call(n, t[_], _, t))return _;
return null
};
i._$forEach = function (t, n, _) {
if (t && t.length && i._$isFunction(n))if (!t.forEach)i._$forIn.apply(i, arguments); else e.__forEach(t, n, _)
};
i._$forIn = function (t, e, n) {
if (!t || !i._$isFunction(e))return null;
if (i._$isNumber(t.length)) {
for (var _ = 0, r = t.length; _ < r; _++)if (e.call(n, t[_], _, t))return _
} else if (i._$isObject(t))return i._$loop(t, e, n);
return null
};
i._$encode = function (t, e) {
e = "" + e;
if (!t || !e)return e || ""; else return e.replace(t.r, function (e) {
var i = t[!t.i ? e.toLowerCase() : e];
return null != i ? i : e
})
};
i._$escape = function () {
var t = /<br\/?>$/, e = {
r: /\<|\>|\&|\r|\n|\s|\'|\"/g,
"<": "<",
">": ">",
"&": "&",
" ": " ",
'"': """,
"'": "'",
"\n": "<br/>",
"\r": ""
};
return function (n) {
n = i._$encode(e, n);
return n.replace(t, "<br/><br/>")
}
}();
i._$unescape = function () {
var t = {
r: /\&(?:lt|gt|amp|nbsp|#39|quot)\;|\<br\/\>/gi,
"<": "<",
">": ">",
"&": "&",
" ": " ",
"'": "'",
""": '"',
"<br/>": "\n"
};
return function (e) {
return i._$encode(t, e)
}
}();
i._$format = function () {
var t = {
i: !0,
r: /\byyyy|yy|MM|cM|eM|M|dd|d|HH|H|mm|ms|ss|m|s|w|ct|et\b/g
}, e = ["上午", "下午"], n = ["A.M.", "P.M."], _ = ["日", "一", "二", "三", "四", "五", "六"], r = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"], o = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"];
var s = function (t) {
t = parseInt(t) || 0;
return (t < 10 ? "0" : "") + t
};
var a = function (t) {
return t < 12 ? 0 : 1
};
return function (u, c, h) {
if (!u || !c)return "";
u = i._$var2date(u);
t.yyyy = u.getFullYear();
t.yy = ("" + t.yyyy).substr(2);
t.M = u.getMonth() + 1;
t.MM = s(t.M);
t.eM = o[t.M - 1];
t.cM = r[t.M - 1];
t.d = u.getDate();
t.dd = s(t.d);
t.H = u.getHours();
t.HH = s(t.H);
t.m = u.getMinutes();
t.mm = s(t.m);
t.s = u.getSeconds();
t.ss = s(t.s);
t.ms = u.getMilliseconds();
t.w = _[u.getDay()];
var l = a(t.H);
t.ct = e[l];
t.et = n[l];
if (h)t.H = t.H % 12;
return i._$encode(t, c)
}
}();
i._$var2date = function (t) {
var n = t;
if (i._$isString(t))n = new Date(e.__str2time(t));
if (!i._$isDate(n))n = new Date(t);
return n
};
i._$fixed = function (t, e) {
return parseFloat(new Number(t).toFixed(e))
};
i._$absolute = function () {
var t = /([^\/:])\/.*$/, e = /\/[^\/]+$/, i = /[#\?]/, n = location.href.split(/[?#]/)[0], _ = document.createElement("a");
var r = function (t) {
return (t || "").indexOf("://") > 0
};
var o = function (t) {
return (t || "").split(i)[0].replace(e, "/")
};
var s = function (e, i) {
if (0 == e.indexOf("/"))return i.replace(t, "$1") + e; else return o(i) + e
};
n = o(n);
return function (t, e) {
t = (t || "").trim();
if (!r(e))e = n;
if (!t)return e;
if (r(t))return t;
t = s(t, e);
_.href = t;
t = _.href;
return r(t) ? t : _.getAttribute("href", 4)
}
}();
i._$url2origin = function () {
var t = /^([\w]+?:\/\/.*?(?=\/|$))/i;
return function (e) {
if (t.test(e || ""))return RegExp.$1.toLowerCase(); else return ""
}
}();
i._$string2object = function (t, e, n) {
var _ = {};
var r = n;
if (!i._$isFunction(r))r = function (t) {
return !n ? t : decodeURIComponent(t)
};
i._$forEach((t || "").split(e), function (t) {
var e = t.split("=");
if (e && e.length) {
var i = e.shift();
if (i)_[r(i)] = r(e.join("="))
}
});
return _
};
i._$object2string = function (t, e, n) {
if (!t)return "";
var _ = [];
var r = n;
if (!i._$isFunction(r))r = function (t) {
return !n ? t : encodeURIComponent(t)
};
i._$loop(t, function (t, e) {
if (!i._$isFunction(t)) {
if (i._$isDate(t))t = t.getTime(); else if (i._$isArray(t))t = t.join(","); else if (i._$isObject(t))t = JSON.stringify(t);
_.push(r(e) + "=" + r(t))
}
});
return _.join(e || ",")
};
i._$query2object = function (t) {
return i._$string2object(t, "&", !0)
};
i._$object2query = function (t) {
return i._$object2string(t, "&", !0)
};
i._$object2array = function (t) {
return e.__col2array(t)
};
i._$array2object = function (t, e) {
var n = {};
i._$forEach(t, function (t) {
var i = t;
if (e)i = e(t);
if (null != i)n[i] = t
});
return n
};
i._$number2string = function (t, e) {
var i = ("" + t).length, n = Math.max(1, parseInt(e) || 0), _ = n - i;
if (_ > 0)t = new Array(_ + 1).join("0") + t;
return "" + t
};
i._$safeDelete = function (t, e) {
if (!i._$isArray(e))try {
delete t[e]
} catch (n) {
t[e] = void 0
} else i._$forEach(e, function (e) {
i._$safeDelete(t, e)
})
};
i._$randString = function () {
var t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
return function (e) {
e = e || 10;
var i = [];
for (var n = 0, _; n < e; ++n) {
_ = Math.floor(Math.random() * t.length);
i.push(t.charAt(_))
}
return i.join("")
}
}();
i._$randNumber = function (t, e) {
return Math.floor(Math.random() * (e - t) + t)
};
i._$randNumberString = function (t) {
t = Math.max(0, Math.min(t || 8, 30));
var e = Math.pow(10, t - 1), n = 10 * e;
return i._$randNumber(e, n).toString()
};
i._$uniqueID = function () {
var t = +new Date;
return function () {
return "" + t++
}
}();
i._$query = function (t, e) {
t = t || n;
var i = (e || "").split(".");
for (var _ = 0, r = i.length; _ < r; _++) {
t = t[i[_]];
if (!t)break
}
return t
};
i._$merge = function () {
var t = arguments.length - 1, e = arguments[t];
if (i._$isFunction(e))t -= 1; else e = _;
var n = arguments[0] || {};
for (var r = 1; r <= t; r++)i._$loop(arguments[r], function (t, i) {
if (!e(t, i))n[i] = t
});
return n
};
i._$fetch = function (t, e) {
if (e)i._$loop(t, function (t, i, n) {
var _ = e[i];
if (null != _)n[i] = _
});
return t
};
i._$hasProperty = function (t) {
if (!t)return !1;
if (null != t.length)return t.length > 0;
var e = 0;
i._$loop(t, function () {
e++;
return e > 0
});
return e > 0
};
if (!0) {
t.Q = i._$query;
t.X = i._$merge;
t.EX = i._$fetch;
t.copy(this.NEJ, t);
t.copy(t.P("nej.u"), i)
}
return i
}, 6, 7);
I$(78, function (t, e, i, n, _, r) {
var o = {};
i.__url2host = function () {
var t = /^([\w]+?:\/\/.*?(?=\/|$))/i;
return function (e) {
e = e || "";
if (t.test(e))return RegExp.$1; else return location.protocol + "//" + location.host
}
}();
i.__set = function (t, e) {
o[t] = e
};
i.__get = function (t) {
return o[t]
};
var s = function () {
var t = {
portrait: {name: "portrait", dft: "portrait/"},
"ajax.swf": {name: "ajax", dft: "nej_proxy_flash.swf"},
"chart.swf": {name: "chart", dft: "nej_flex_chart.swf"},
"audio.swf": {name: "audio", dft: "nej_player_audio.swf"},
"video.swf": {name: "video", dft: "nej_player_video.swf"},
"clipboard.swf": {name: "clipboard", dft: "nej_clipboard.swf"},
"upload.image.swf": {name: "uploadimage", dft: "nej_upload_image.swf"}
};
var _ = function (t) {
var e = {};
if (!t || !t.length)return e;
for (var n = 0, _ = t.length, r; n < _; n++) {
r = t[n];
if (r.indexOf("://") > 0)e[i.__url2host(r)] = r
}
return e
};
return function (r) {
i.__set("root", r.root || "/res/");
var o = i.__get("root");
e._$loop(t, function (t, e, n) {
i.__set(e, r[t.name] || o + t.dft)
});
var s = r.p_csrf;
if (s === !0)s = {cookie: "AntiCSRF", param: "AntiCSRF"};
s = s || n;
i.__set("csrf", {param: s.param || "", cookie: s.cookie || ""});
i.__set("frames", _(r.p_frame));
i.__set("flashs", _(r.p_flash))
}
}();
s(this.NEJ_CONF || n);
return i
}, 6, 8);
I$(63, function (t, e, i, n, _, r) {
return t
}, 78, 15);
I$(47, function (t, e, i, n, _, r) {
i._$getFrameProxy = function (t) {
var n = e.__url2host(t);
return i._$get("frames")[n] || n + "/res/nej_proxy_frame.html"
};
i._$getFlashProxy = function (t) {
return i._$get("flashs")[e.__url2host(t)]
};
i._$get = function (t) {
return e.__get(t)
};
if (!0)t.copy(t.P("nej.c"), i);
return i
}, 6, 63);
I$(27, function (t, e, i, n, _, r) {
var o = +new Date;
i._$CODE_NOTFUND = 1e4 - o;
i._$CODE_NOTASGN = 10001 - o;
i._$CODE_NOTSPOT = 10002 - o;
i._$CODE_TIMEOUT = 10003 - o;
i._$CODE_ERREVAL = 10004 - o;
i._$CODE_ERRCABK = 10005 - o;
i._$CODE_ERRSERV = 10006 - o;
i._$CODE_ERRABRT = 10007 - o;
i._$HEAD_CT = "Content-Type";
i._$HEAD_CT_PLAN = "text/plain";
i._$HEAD_CT_FILE = "multipart/form-data";
i._$HEAD_CT_FORM = "application/x-www-form-urlencoded";
i._$BLANK_IMAGE = e._$get("blank.png") || "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
if (!0)t.copy(t.P("nej.g"), i);
return i
}, 6, 47);
I$(19, function (t, e) {
var i = {};
e._$merge = function (e) {
t._$merge(i, e)
};
e._$dump = function () {
return i
};
e._$clear = function () {
i = {}
};
return e
}, 8);
I$(46, function (t, e, i, n, _, r) {
i.__checkEvent = function () {
var t = {
touchstart: "mousedown",
touchmove: "mousemove",
touchend: "mouseup"
}, i = e._$KERNEL.prefix, n = {
transitionend: "TransitionEnd",
animationend: "AnimationEnd",
animationstart: "AnimationStart",
animationiteration: "AnimationIteration",
visibilitychange: "visibilitychange",
fullscreenchange: "fullscreenchange"
};
var _ = {
enter: function (t, e, i) {
var n = {type: "keypress"};
if (i)n.handler = function (e) {
if (13 === e.keyCode)i.call(t, e)
};
return n
}
};
var r = function (t) {
return (i.evt || i.pro) + t
};
return function (e, i, o) {
var s = {type: i, handler: o};
if (!("on" + i in e)) {
var a = t[i];
if (a) {
s.type = a;
return s
}
var a = n[i];
if (a) {
s.type = r(a);
return s
}
var u = _[i];
if (u)return u.apply(null, arguments)
}
return s
}
}();
i.__addEvent = function () {
var t = arguments;
if (!1)if (!("on" + t[1] in t[0]))console.log("not support event[" + t[1] + "] for " + t[0]);
t[0].addEventListener(t[1], t[2], t[3])
};
i.__delEvent = function () {
var t = arguments;
t[0].removeEventListener(t[1], t[2], t[3])
};
i.__dispatchEvent = function (e, i, n) {
var _ = document.createEvent("Event");
_.initEvent(i, !0, !0);
t._$merge(_, n);
e.dispatchEvent(_)
};
return i
}, 8, 15);
I$(26, function (t, e, i, n, _, r, o) {
return e
}, 15, 46, 8);
I$(9, function (t, e, i, n, _, r, o, s, a) {
var u = {}, c = {};
var h = function () {
var t = /[\s,;]+/;
return function (e) {
var e = (e || "").trim().toLowerCase();
return !e ? null : e.split(t)
}
}();
var l = function (t, i, n) {
var _ = "page" + i;
return null != t[_] ? t[_] : t["client" + i] + e._$getPageBox()["scroll" + n]
};
var f = function (t, e, i) {
var n = "scroll" + i;
_node = r._$getElement(t), _xret = l(t, e, i);
for (; _node && _node != document.body && _node != document.documentElement;) {
_xret += _node[n] || 0;
_node = _node.parentNode
}
return _xret
};
var d = function (t, n, _, r) {
var o = {};
t = e._$get(t);
if (!t)return null;
e._$id(t);
o.element = t;
if (!i._$isFunction(_))return null;
o.handler = _;
var n = h(n);
if (!n)return null;
o.type = n;
o.capture = !!r;
return o
};
r._$addEvent = c._$addEvent = function () {
var t = function (t, i, n) {
var _ = e._$id(i.element), r = u[_] || {}, o = r[t] || [];
o.push({
type: n.type || t,
func: n.handler || i.handler,
sfun: i.handler,
capt: i.capture,
link: n.link,
destroy: n.destroy
});
r[t] = o;
u[_] = r
};
return function () {
var n = d.apply(null, arguments);
if (n)i._$forEach(n.type, function (r) {
var o = _.__checkEvent(n.element, r, n.handler);
_.__addEvent(n.element, o.type, o.handler, n.capture);
i._$forIn(o.link, function (t) {
t[3] = !!t[3];
_.__addEvent.apply(_, t);
t[0] = e._$id(t[0])
});
t(r, n, o)
})
}
}();
r._$delEvent = c._$delEvent = function () {
var t = function (t, n) {
var _ = e._$id(n.element), r = u[_] || o, s = r[t], a = i._$indexOf(s, function (t) {
return t.sfun === n.handler && t.capt === n.capture
});
var c = null;
if (a >= 0) {
var h = s.splice(a, 1)[0];
c = [[n.element, h.type, h.func, n.capture]];
if (h.link) {
i._$forEach(h.link, function (t) {
t[0] = e._$get(t[0])
});
c.push.apply(c, h.link)
}
if (h.destroy)h.destroy();
if (!s.length)delete r[t];
if (!i._$hasProperty(r))delete u[_]
}
return c
};
return function () {
var e = d.apply(null, arguments);
if (e)i._$forEach(e.type, function (n) {
i._$forEach(t(n, e), function (t) {
_.__delEvent.apply(_, t)
})
})
}
}();
r._$clearEvent = c._$clearEvent = function () {
var t = function (t, e, n) {
i._$reverseEach(n, function (i) {
r._$delEvent(t, e, i.sfun, i.capt)
})
};
return function (n, _) {
var o = e._$id(n);
if (o) {
var s = u[o];
if (s) {
_ = h(_);
if (_)i._$forEach(_, function (e) {
t(o, e, s[e])
}); else i._$loop(s, function (t, e) {
r._$clearEvent(n, e)
})
}
}
}
}();
r._$dispatchEvent = c._$dispatchEvent = function (t, n, r) {
var t = e._$get(t);
if (t)i._$forEach(h(n), function (e) {
var i = _.__checkEvent(t, e);
_.__dispatchEvent(t, i.type, r)
})
};
r._$getElement = function (t) {
if (!t)return null;
var i = t.target || t.srcElement, n = arguments[1];
return e._$getParent(i, n)
};
r._$stop = function (t) {
r._$stopBubble(t);
r._$stopDefault(t)
};
r._$stopBubble = function (t) {
if (t)t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0
};
r._$stopDefault = function (t) {
if (t)t.preventDefault ? t.preventDefault() : t.returnValue = !1
};
r._$page = function (t) {
return {x: r._$pageX(t), y: r._$pageY(t)}
};
r._$pageX = function (t) {
return f(t, "X", "Left")
};
r._$pageY = function (t) {
return f(t, "Y", "Top")
};
r._$clientX = function (t) {
return l(t, "X", "Left")
};
r._$clientY = function (t) {
return l(t, "Y", "Top")
};
n._$merge(c);
if (!0)t.copy(t.P("nej.v"), r);
return r
}, 6, 13, 8, 19, 26);
I$(55, function (t, e, i, n, _, r) {
i.__getElementById = function (t, e) {
if (t.getElementById)return t.getElementById("" + e);
try {
return t.querySelector("#" + e)
} catch (i) {
return null
}
};
i.__getChildren = function (e) {
return t._$object2array(e.children)
};
i.__getElementsByClassName = function (e, i) {
return t._$object2array(e.getElementsByClassName(i))
};
i.__nextSibling = function (t) {
return t.nextElementSibling
};
i.__previousSibling = function (t) {
return t.previousElementSibling
};
i.__dataset = function (t, e, i) {
t.dataset = t.dataset || {};
if (void 0 !== i)t.dataset[e] = i;
return t.dataset[e]
};
i.__getAttribute = function (t, e) {
if (t.getAttribute)return t.getAttribute(e)
};
i.__serializeDOM2XML = function (t) {
return (new XMLSerializer).serializeToString(t) || ""
};
i.__parseDOMFromXML = function (t) {
var e = (new DOMParser).parseFromString(t, "text/xml").documentElement;
return "parsererror" == e.nodeName ? null : e
};
i.__fullScreen = function () {
};
i.__mask = function () {
};
i.__unmask = function () {
};
var o = e._$SUPPORT, s = e._$KERNEL.prefix;
i.__isMatchedName = function () {
var t = /^([a-z]+?)[A-Z]/;
return function (e, i) {
return !!(i[e] || t.test(e) && i[RegExp.$1])
}
}();
i.__isNeedPrefixed = function () {
var e = t._$array2object(["animation", "transform", "transition", "appearance", "userSelect", "box", "flex", "column"]);
return function (t) {
return i.__isMatchedName(t, e)
}
}();
i.__fmtStyleName = function () {
var t = /-([a-z])/g;
return function (e) {
e = e || "";
return e.replace(t, function (t, e) {
return e.toUpperCase()
})
}
}();
i.__getStyleName = function () {
var t = /^[a-z]/, e = s.css || "";
return function (n) {
n = i.__fmtStyleName(n);
if (!i.__isNeedPrefixed(n))return n; else return e + n.replace(t, function (t) {
return t.toUpperCase()
})
}
}();
i.__getStyleValue = function (t, e) {
var n = window.getComputedStyle(t, null);
return n[i.__getStyleName(e)] || ""
};
i.__setStyleValue = function (t, e, n) {
t.style[i.__getStyleName(e)] = n
};
i.__getCSSMatrix = function () {
var e = /\((.*?)\)/, i = /\s*,\s*/, n = ["CSSMatrix", s.clz + "CSSMatrix"], _ = ["m11", "m12", "m21", "m22", "m41", "m42"];
var r = function (n) {
var r = {};
if (e.test(n || ""))t._$forEach(RegExp.$1.split(i), function (t, e) {
r[_[e]] = t
});
return r
};
return function (e) {
var i;
t._$forIn(n, function (t) {
if (this[t]) {
i = new this[t](e || "");
return !0
}
});
return !i ? r(e) : i
}
}();
i.__injectCSSText = function (t, e) {
t.textContent = e
};
i.__processCSSText = function () {
var e = /\$<(.*?)>/gi, _ = /\{(.*?)\}/g, r = "-" + s.css.toLowerCase() + "-", a = {
scale: "scale({x|1},{y|1})",
rotate: "rotate({a})",
translate: "translate({x},{y})",
matrix: "matrix({m11},{m12},{m21},{m22},{m41},{m42})"
}, u = {
scale: "scale3d({x|1},{y|1},{z|1})",
rotate: "rotate3d({x},{y},{z},{a})",
translate: "translate3d({x},{y},{z})",
matrix: "matrix3d({m11},{m12},{m13},{m14},{m21},{m22},{m23},{m24},{m31},{m32},{m33|1},{m34},{m41},{m42},{m43},{m44|1})"
};
var c = function (t, e) {
e = e || n;
return t.replace(_, function (t, i) {
var n = i.split("|");
return e[n[0]] || n[1] || "0"
})
};
i.__processTransformValue = function (t, e) {
var i = (!o.css3d ? a : u)[t.trim()];
if (i)return c(i, e); else return ""
};
return function (n) {
if (!n.replace)return n; else return n.replace(e, function (e, n) {
if ("vendor" === n)return r;
var _ = (n || "").split("|");
return i.__processTransformValue(_[0], t._$query2object(_[1])) || e
})
}
}();
i.__appendCSSText = function (t, e) {
var i = t.sheet, n = i.cssRules.length;
i.insertRule(e, n);
return i.cssRules[n]
};
i.__getClassList = function () {
var t = /\s+/;
return function (e) {
e = (e || "").trim();
return e ? e.split(t) : null
}
}();
i.__processClassName = function (e, n, _) {
if ("replace" != n)t._$forEach(i.__getClassList(_), function (t) {
e.classList[n](t)
}); else {
i.__processClassName(e, "remove", _);
i.__processClassName(e, "add", arguments[3])
}
};
i.__hasClassName = function (e, n) {
var _ = e.classList;
if (!_ || !_.length)return !1; else return t._$indexOf(i.__getClassList(n), function (t) {
return _.contains(t)
}) >= 0
};
!function () {
if (!o.css3d) {
var t = i.__getCSSMatrix();
o.css3d = !!t && null != t.m41
}
}();
return i
}, 8, 15);
I$(31, function (t, e, i, n, _, r, o) {
return t
}, 55, 15, 8);
I$(13, function (t, e, i, n, _, r, o, s, a, u) {
var c = {}, h, l = {}, f = {}, d = document.createDocumentFragment();
if (!document.head)document.head = document.getElementsByTagName("head")[0] || document.body;
o.dump = function () {
return {pool: l, dirty: f, fragment: d}
};
o._$id = c._$id = function (t) {
t = o._$get(t);
if (t) {
var e = t.id ? t.id : "auto-id-" + i._$uniqueID();
if (!("id" in t))l[e] = t;
t.id = e;
if (!o._$get(e))f[e] = t;
return e
}
};
o._$get = function (t) {
try {
var e = l["" + t]
} catch (n) {
}
if (e)return e;
if (!i._$isString(t) && !i._$isNumber(t))return t;
var e = document.getElementById(t);
if (!e)e = r.__getElementById(d, t);
if (e)delete f[t];
return e || f[t]
};
o._$getChildren = c._$getChildren = function (t, e) {
t = o._$get(t);
if (!t)return null;
var n = r.__getChildren(t);
if (e)i._$reverseEach(n, function (t, i, n) {
if (!o._$hasClassName(t, e))n.splice(i, 1)
});
return n
};
o._$getParent = function () {
var t;
var e = function (e, i) {
var n = e.split(":");
if (n.length > 1) {
if (!t)t = {
a: o._$attr, d: o._$dataset, c: o._$hasClassName, t: function (t, e) {
return (t.tagName || "").toLowerCase() === e
}
};
var _ = t[n[0]];
if (_)return !!_(i, n[1]);
e = n[1]
}
return !!o._$attr(i, e) || !!o._$dataset(i, e) || o._$hasClassName(i, e)
};
return function (t, n) {
t = o._$get(t);
if (t) {
if (!n)return t;
if (i._$isString(n))n = e._$bind(null, n);
if (i._$isFunction(n)) {
for (; t;) {
if (n(t))return t;
t = t.parentNode
}
return null
}
return t
}
}
}();
o._$getByClassName = c._$getByClassName = function (t, e) {
t = o._$get(t);
return !t ? null : r.__getElementsByClassName(t, e.trim())
};
o._$getSibling = c._$getSibling = function () {
var t = function () {
return !0
};
return function (e, n) {
e = o._$get(e);
if (!e)return null;
var _ = {backward: !1, filter: t};
if (i._$isFunction(n))_.filter = n; else _ = i._$fetch(_, n);
var s = _.backward ? r.__previousSibling : r.__nextSibling;
for (; (e = s(e)) && !_.filter(e););
return e
}
}();
o._$getScrollViewPort = function (t) {
t = o._$get(t);
if (t) {
t = t.parentNode;
for (; t && !(t.scrollHeight > t.clientHeight);)t = t.parentNode;
if (t)return t
}
var e = document.body.scrollHeight, i = document.documentElement.scrollHeight;
return i >= e ? document.documentElement : document.body
};
o._$getPageBox = function () {
var t = function (t) {
var e = 0;
i._$forEach(t, function (t) {
if (t)if (!e)e = t; else e = Math.min(e, t)
});
return e
};
var e = [{
main: "scroll", sub: ["Top", "Left"], func: function (t, e, i) {
return Math.max(e["scroll" + t], i["scroll" + t])
}
}, {
main: "client", sub: ["Width", "Height"], func: function (e, i, n) {
return t([i["client" + e], i["offset" + e], n["client" + e], n["offset" + e]])
}
}, {
main: "scroll", sub: ["Width", "Height"], func: function (t, e, i, n) {
return Math.max(n["client" + t], e["scroll" + t], i["scroll" + t])
}
}];
return function (t) {
var n = {}, _ = t || document, r = _.body, o = _.documentElement;
i._$forEach(e, function (t) {
var e = t.main;
i._$forEach(t.sub, function (i) {
n[e + i] = t.func(i, r, o, n)
})
});
return n
}
}();
o._$getMaxBox = function (t, e) {
var n = i._$merge({}, t), _ = e.width / e.height, r = t.width / t.height;
if (_ > r && t.height > e.height) {
n.height = e.height;
n.width = n.height * r
}
if (_ < r && t.width > e.width) {
n.width = e.width;
n.height = n.width / r
}
return n
};
o._$scrollTo = c._$scrollTo = function (t) {
var e = o._$offset(t);
window.scrollTo(e.x, e.y)
};
o._$align = function () {
var t = /\s+/;
var e = {
left: function () {
return 0
}, center: function (t, e) {
return (t.width - e.width) / 2
}, right: function (t, e) {
return t.width - e.width
}, top: function () {
return 0
}, middle: function (t, e) {
return (t.height - e.height) / 2
}, bottom: function (t, e) {
return t.height - e.height
}
};
return function (i, n, _) {
var r = {}, o = (_ || "").split(t), s = e[o[1]] || e.middle, a = e[o[0]] || e.center;
r.top = s(i, n);
r.left = a(i, n);
return r
}
}();
o._$offset = c._$offset = function () {
var t = function (t) {
return t == document.body || t == document.documentElement
};
return function (e, i) {
e = o._$get(e);
if (!e)return null;
i = o._$get(i) || null;
var n = e, _ = {x: 0, y: 0}, r, s, a;
for (; n && n != i;) {
r = t(n) || n == e;
s = r ? 0 : n.scrollLeft;
a = parseInt(o._$getStyle(n, "borderLeftWidth")) || 0;
_.x += n.offsetLeft + a - s;
s = r ? 0 : n.scrollTop;
a = parseInt(o._$getStyle(n, "borderTopWidth")) || 0;
_.y += n.offsetTop + a - s;
n = n.offsetParent
}
return _
}
}();
o._$fullScreen = c._$fullScreen = function (t) {
t = o._$get(t);
if (t)r.__fullScreen(t, o._$getPageBox())
};
o._$mask = c._$mask = function (t) {
t = o._$get(t);
if (t) {
o._$id(t);
return r.__mask(t)
}
return null
};
o._$unmask = c._$unmask = function (t) {
t = o._$get(t);
if (t) {
o._$id(t);
return r.__unmask(t)
}
return null
};
o._$create = function () {
var t = {
a: {href: "#", hideFocus: !0},
style: {type: "text/css"},
link: {type: "text/css", rel: "stylesheet"},
iframe: {frameBorder: 0},
script: {defer: !0, type: "text/javascript"}
};
return function (e, n, _) {
var r = document.createElement(e), s = t[e.toLowerCase()];
i._$merge(r, s);
if (n)r.className = n;
_ = o._$get(_);
if (_)_.appendChild(r); else if (!s)d.appendChild(r);
return r
}
}();
o._$createXFrame = function () {
var t = function () {
if (location.hostname == document.domain)return "about:blank"; else return 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();})();'
};
var e = function (t) {
t = t.trim();
if (!t)return o._$create("iframe");
var e;
try {
e = document.createElement('<iframe name="' + t + '"></iframe>');
e.frameBorder = 0
} catch (i) {
e = o._$create("iframe");
e.name = t
}
return e
};
return function (_) {
_ = _ || s;
var r = e(_.name || "");
if (!_.visible)r.style.display = "none";
if (i._$isFunction(_.onload))n._$addEvent(r, "load", function (t) {
if (r.src) {
n._$clearEvent(r, "load");
_.onload(t)
}
});
var a = _.parent;
if (i._$isFunction(a))try {
a(r)
} catch (u) {
} else(o._$get(a) || document.body).appendChild(r);
var c = _.src || t();
window.setTimeout(function () {
r.src = c
}, 0);
return r
}
}();
o._$remove = c._$remove = function () {
var t = {
img: function (t) {
t.src = e._$BLANK_IMAGE
}, iframe: function (t) {
t.src = "about:blank"
}
};
var _ = function (e, n) {
if (n) {
if (e.getElementsByTagName)i._$forEach(e.getElementsByTagName(n), _)
} else {
var r = (e.tagName || "").toLowerCase(), o = t[r];
if (o)o(e)
}
};
return function (t) {
t = o._$get(t);
if (t) {
if (!arguments[1])n._$clearEvent(t);
_(t);
_(t, "img");
_(t, "iframe");
if (t.parentNode)t.parentNode.removeChild(t)
}
}
}();
o._$removeByEC = c._$removeByEC = function (t) {
t = o._$get(t);
if (t)try {
d.appendChild(t)
} catch (e) {
console.error(e)
}
};
o._$clearChildren = c._$clearChildren = function (t) {
t = o._$get(t);
if (t)i._$reverseEach(t.childNodes, function (t) {
o._$remove(t)
})
};
o._$wrapInline = c._$wrapInline = function () {
var t, e = /\s+/;
var i = function () {
if (!t) {
t = o._$pushCSSText(".#<uispace>{position:relative;zoom:1;}.#<uispace>-show{position:absolute;top:0;left:100%;cursor:text;white-space:nowrap;overflow:hidden;}");
o._$dumpCSSText()
}
};
return function (n, _) {
n = o._$get(n);
if (!n)return null;
i();
_ = _ || s;
var r = n.parentNode;
if (!o._$hasClassName(r, t)) {
r = o._$create("span", t);
n.insertAdjacentElement("beforeBegin", r);
r.appendChild(n)
}
var a = _.nid || "", u = o._$getByClassName(r, a || t + "-show")[0];
if (!u) {
var c = ((_.clazz || "") + " " + a).trim();
c = t + "-show" + (!c ? "" : " ") + c;
u = o._$create(_.tag || "span", c);
r.appendChild(u)
}
var c = _.clazz;
if (c) {
c = (c || "").trim().split(e)[0] + "-parent";
o._$addClassName(r, c)
}
return u
}
}();
o._$dataset = c._$dataset = function (t, e, n) {
var _ = o._$id(t);
if (!_)return null;
if (i._$isString(e))return r.__dataset(o._$get(t), e, n);
if (i._$isObject(e)) {
var s = {};
i._$forIn(e, function (t, e) {
s[e] = o._$dataset(_, e, t)
});
return s
}
if (i._$isArray(e)) {
var s = {};
i._$forEach(e, function (t) {
s[t] = o._$dataset(_, t)
});
return s
}
return null
};
o._$attr = c._$attr = function (t, e, i) {
t = o._$get(t);
if (!t)return "";
if (void 0 !== i && t.setAttribute)t.setAttribute(e, i);
return r.__getAttribute(t, e)
};
o._$html2node = function () {
var t = /<(.*?)(?=\s|>)/i, e = {li: "ul", tr: "tbody", td: "tr", th: "tr", option: "select"};
return function (i) {
var n;
if (t.test(i))n = e[(RegExp.$1 || "").toLowerCase()] || "";
var _ = o._$create(n || "div");
_.innerHTML = i;
var r = o._$getChildren(_);
return r.length > 1 ? _ : r[0]
}
}();
o._$dom2xml = c._$dom2xml = function (t) {
t = o._$get(t);
return !t ? "" : r.__serializeDOM2XML(t)
};
o._$xml2dom = function (t) {
t = (t || "").trim();
return !t ? null : r.__parseDOMFromXML(t)
};
o._$dom2object = c._$dom2object = function (t, e) {
e = e || {};
t = o._$get(t);
if (!t)return e;
var n = t.tagName.toLowerCase(), _ = o._$getChildren(t);
if (!_ || !_.length) {
e[n] = t.textContent || t.text || "";
return e
}
var r = {};
e[n] = r;
i._$forEach(_, function (t) {
o._$dom2object(t, r)
});
return e
};
o._$xml2object = function (t) {
try {
return o._$dom2object(o._$xml2dom(t))
} catch (e) {
return null
}
};
o._$text2type = function () {
var t = {
xml: function (t) {
return o._$xml2dom(t)
}, json: function (t) {
try {
return JSON.parse(t)
} catch (e) {
return null
}
}, dft: function (t) {
return t
}
};
return function (e, i) {
i = (i || "").toLowerCase();
return (t[i] || t.dft)(e || "")
}
}();
o._$style = c._$style = function (t, e) {
t = o._$get(t);
if (t)i._$loop(e, function (e, i) {
o._$setStyle(t, i, e)
})
};
o._$setStyle = c._$setStyle = function (t, e, i) {
t = o._$get(t);
if (t)r.__setStyleValue(t, e, r.__processCSSText(i))
};
o._$getStyle = c._$getStyle = function (t, e) {
t = o._$get(t);
return !t ? "" : r.__getStyleValue(t, e)
};
o._$addScript = function (t) {
try {
t = t.trim();
if (t)return new Function(t)()
} catch (e) {
console.error(e.message);
console.error(e.stack)
}
};
o._$addStyle = function () {
var t = /[\s\r\n]+/gi;
return function (e) {
e = (e || "").replace(t, " ").trim();
var i = null;
if (e) {
i = o._$create("style");
document.head.appendChild(i);
r.__injectCSSText(i, r.__processCSSText(e))
}
return i
}
}();
o._$pushCSSText = function () {
var t = /#<(.*?)>/g, e = +new Date;
return function (e, n) {
if (!h)h = [];
var _ = "auto-" + i._$uniqueID(), r = i._$merge({uispace: _}, n);
h.push(e.replace(t, function (t, e) {
return r[e] || t
}));
return _
}
}();
o._$dumpCSSText = function () {
if (h) {
o._$addStyle(h.join(" "));
h = null
}
};
o._$appendCSSText = c._$appendCSSText = function (t, e) {
t = o._$get(t);
return !t ? null : r.__appendCSSText(t, r.__processCSSText(e))
};
o._$addClassName = c._$addClassName = function (t, e) {
if (e) {
t = o._$get(t);
if (t)r.__processClassName(t, "add", e)
}
};
o._$delClassName = c._$delClassName = function (t, e) {
t = o._$get(t);
if (t)r.__processClassName(t, "remove", e)
};
o._$replaceClassName = c._$replaceClassName = function (t, e, i) {
t = o._$get(t);
if (t)r.__processClassName(t, "replace", e, i)
};
o._$hasClassName = c._$hasClassName = function (t, e) {
t = o._$get(t);
if (t)return r.__hasClassName(t, e); else return !1
};
o._$matrix = function (t) {
t = (t || "").trim();
return r.__getCSSMatrix(t)
};
o._$css3d = c._$css3d = function (t, e, i) {
t = o._$get(t);
if (t) {
var n = r.__processTransformValue(e, i);
if (n)o._$setStyle(t, "transform", n)
}
};
_._$merge(c);
if (!0)t.copy(t.P("nej.e"), o);
return o
}, 6, 27, 8, 9, 19, 31);
I$(34, function (t, e, i, n, _, r, o, s) {
var a;
_._$$EventTarget = e._$klass();
a = _._$$EventTarget.prototype;
_._$$EventTarget._$allocate = function (t) {
t = t || {};
var e = !!this.__pool && this.__pool.shift();
if (!e) {
e = new this(t);
this.__inst__ = (this.__inst__ || 0) + 1
}
e.__reset(t);
return e
};
_._$$EventTarget._$recycle = function () {
var t = function (t, e, i) {
t._$recycle();
i.splice(e, 1)
};
return function (e) {
if (!e)return null;
if (!n._$isArray(e)) {
if (!(e instanceof this)) {
var i = e.constructor;
if (i._$recycle)i._$recycle(e);
return null
}
if (e == this.__instance)delete this.__instance;
if (e == this.__inctanse)delete this.__inctanse;
e.__destroy();
if (!this.__pool)this.__pool = [];
if (n._$indexOf(this.__pool, e) < 0)this.__pool.push(e);
return null
}
n._$reverseEach(e, t, this)
}
}();
_._$$EventTarget._$getInstance = function (t) {
if (!this.__instance)this.__instance = this._$allocate(t);
return this.__instance
};
_._$$EventTarget._$getInstanceWithReset = function (t, e) {
if (e && this.__inctanse) {
this.__inctanse._$recycle();
delete this.__inctanse
}
if (!this.__inctanse)this.__inctanse = this._$allocate(t); else this.__inctanse.__reset(t);
return this.__inctanse
};
a.__init = function () {
this.__events = {};
this.__events_dom = {};
this.id = n._$uniqueID()
};
a.__reset = function (t) {
this._$batEvent(t)
};
a.__destroy = function () {
this._$clearEvent();
this.__doClearDomEvent()
};
a.__doInitDomEvent = function () {
var t = function (t) {
if (t && !(t.length < 3)) {
this.__events_dom["de-" + n._$uniqueID()] = t;
i._$addEvent.apply(i, t)
}
};
return function (e) {
n._$forEach(e, t, this)
}
}();
a.__doClearDomEvent = function () {
var t = function (t, e, n) {
delete n[e];
i._$delEvent.apply(i, t)
};
return function () {
n._$loop(this.__events_dom, t)
}
}();
a.__doClearComponent = function (t) {
t = t || o;
n._$loop(this, function (e, i, n) {
if (e && e._$recycle && !t(e)) {
delete n[i];
e._$recycle()
}
})
};
a._$recycle = function () {
this.constructor._$recycle(this)
};
a._$hasEvent = function (t) {
var t = (t || "").toLowerCase(), e = this.__events[t];
return !!e && e !== o
};
a._$delEvent = function (t, e) {
var t = (t || "").toLowerCase(), i = this.__events[t];
if (n._$isArray(i)) {
n._$reverseEach(i, function (t, i, n) {
if (t == e)n.splice(i, 1)
});
if (!i.length)delete this.__events[t]
} else if (i == e)delete this.__events[t]
};
a._$setEvent = function (t, e) {
if (t && n._$isFunction(e))this.__events[t.toLowerCase()] = e
};
a._$batEvent = function () {
var t = function (t, e) {
this._$setEvent(e, t)
};
return function (e) {
n._$loop(e, t, this)
}
}();
a._$clearEvent = function () {
var t = function (t, e) {
this._$clearEvent(e)
};
return function (e) {
var e = (e || "").toLowerCase();
if (e)delete this.__events[e]; else n._$loop(this.__events, t, this)
}
}();
a._$addEvent = function (t, e) {
if (t && n._$isFunction(e)) {
t = t.toLowerCase();
var i = this.__events[t];
if (i) {
if (!n._$isArray(i))this.__events[t] = [i];
this.__events[t].push(e)
} else this.__events[t] = e
}
};
a._$dispatchEvent = function (t) {
var t = (t || "").toLowerCase(), e = this.__events[t];
if (e) {
var i = s.slice.call(arguments, 1);
if (n._$isArray(e))n._$forEach(e, function (t) {
if (!1)t.apply(this, i); else try {
t.apply(this, i)
} catch (e) {
console.error(e.message);
console.error(e.stack)
}
}, this); else e.apply(this, i)
}
};
if (!0) {
_._$$Event = _._$$EventTarget;
t.copy(t.P("nej.ut"), _)
}
return _
}, 6, 1, 9, 8);
I$(17, function (t, e, i, n, _, r, o, s, a, u) {
var c;
o._$$CustomEvent = e._$klass();
c = o._$$CustomEvent._$extend(r._$$EventTarget);
c.__init = function () {
this.__cache = {};
this.__super()
};
c.__reset = function (t) {
this.__super(t);
this.__element = i._$get(t.element) || window;
this.__doEventInit(t.event);
this.__doEventAPIEnhance();
this._$dispatchEvent("oninit")
};
c.__destroy = function () {
var t = function (t, e, i) {
if (!_._$isArray(t))_._$safeDelete(this.__element, e);
delete i[e]
};
return function () {
this.__super();
_._$loop(this.__cache, t, this);
delete this.__element
}
}();
c.__isDelegate = function (t, e) {
t = i._$get(t);
return !(t !== this.__element || e && !this.__cache["on" + e])
};
c.__doEventInit = function (t) {
if (!_._$isString(t)) {
if (_._$isArray(t))_._$forEach(t, this.__doEventInit, this)
} else {
var e = "on" + t;
if (!this.__cache[e])this.__cache[e] = this.__doEventDispatch._$bind(this, t);
this.__doEventBind(t)
}
};
c.__doEventBind = function (t) {
var e = "on" + t, i = this.__element[e], n = this.__cache[e];
if (i != n) {
this.__doEventDelete(t);
if (i && i != a)this.__doEventAdd(t, i);
this.__element[e] = n
}
};
c.__doEventAdd = function (t, e, i) {
var n = this.__cache[t];
if (!n) {
n = [];
this.__cache[t] = n
}
if (_._$isFunction(e))!i ? n.push(e) : n.unshift(e)
};
c.__doEventDelete = function (t, e) {
var i = this.__cache[t];
if (i && i.length)if (e)_._$reverseEach(i, function (t, i, n) {
if (e === t) {
n.splice(i, 1);
return !0
}
}); else delete this.__cache[t]
};
c.__doEventDispatch = function (t, e) {
e = e || {noargs: !0};
if (e == s)e = {};
e.type = t;
this._$dispatchEvent("ondispatch", e);
if (!e.stopped)_._$forEach(this.__cache[t], function (t) {
if (!1)t(e); else try {
t(e)
} catch (i) {
console.error(i.message);
console.error(i.stack)
}
})
};
c.__doEventAPIEnhance = function () {
var e = function (t) {
var e = t.args, i = e[1].toLowerCase();
if (this.__isDelegate(e[0], i)) {
t.stopped = !0;
this.__doEventBind(i);
this.__doEventAdd(i, e[2], e[3]);
this._$dispatchEvent("oneventadd", {type: i, listener: e[2]})
}
};
var i = function (t) {
var e = t.args, i = e[1].toLowerCase();
if (this.__isDelegate(e[0], i)) {
t.stopped = !0;
this.__doEventDelete(i, e[2])
}
};
var r = function (t) {
var e = t.args, i = (e[1] || "").toLowerCase();
if (this.__isDelegate(e[0])) {
if (i) {
this.__doEventDelete(i);
return
}
_._$loop(this.__cache, function (t, e) {
if (_._$isArray(t))this.__doEventDelete(e)
}, this)
}
};
var o = function (t) {
var e = t.args, i = e[1].toLowerCase();
if (this.__isDelegate(e[0], i)) {
t.stopped = !0;
e[0]["on" + i].apply(e[0], e.slice(2))
}
};
return function () {
if (!this.__enhanced) {
this.__enhanced = !0;
n._$addEvent = n._$addEvent._$aop(e._$bind(this));
n._$delEvent = n._$delEvent._$aop(i._$bind(this));
n._$clearEvent = n._$clearEvent._$aop(r._$bind(this));
n._$dispatchEvent = n._$dispatchEvent._$aop(o._$bind(this));
if (!0)t.copy(t.P("nej.v"), n)
}
}
}();
if (!0)t.copy(t.P("nej.ut"), o);
return o
}, 6, 1, 13, 9, 8, 34);
I$(85, function (t, e, i, n, _) {
var r = this, o = t._$KERNEL.prefix.pro, s = t._$is("desktop") ? 80 : t._$is("ios") ? 50 : 30;
e.__requestAnimationFrame = function () {
var e = t._$is("android") ? null : r.requestAnimationFrame || r[o + "RequestAnimationFrame"];
return function () {
if (!e)e = function (t) {
return window.setTimeout(function () {
try {
t(+new Date)
} catch (e) {
}
}, 1e3 / s)
};
return e.apply(this, arguments)
}
}();
e.__cancelAnimationFrame = function () {
var e = t._$is("android") ? null : r.cancelAnimationFrame || r[o + "CancelAnimationFrame"];
return function () {
if (!e)e = function (t) {
window.clearTimeout(t)
};
return e.apply(this, arguments)
}
}();
return e
}, 15);
I$(74, function (t, e) {
return t
}, 85, 15);
I$(60, function (t, e, i, n, _, r) {
i.requestAnimationFrame = function () {
e.__requestAnimationFrame.apply(null, arguments)
};
i.cancelAnimationFrame = function () {
e.__cancelAnimationFrame.apply(null, arguments)
};
if (!0) {
if (!this.requestAnimationFrame)this.requestAnimationFrame = i.requestAnimationFrame;
if (!this.cancelAnimationFrame)this.cancelAnimationFrame = i.cancelAnimationFrame
}
return i
}, 15, 74);
!function () {
if ("undefined" == typeof TrimPath) {
TrimPath = {};
if ("undefined" != typeof exports)TrimPath = exports
}
var t = {}, e = [], i = /\s+/g, n = +new Date, _, r, o;
var s = function () {
var t = /^\s*[\[\{'"].*?[\]\}'"]\s*$/, e = /[\&\|\<\>\+\-\*\/\%\,\(\)\[\]\?\:\!\=\;]/, i = /^(?:defined|null|undefined|true|false|instanceof|new|this|typeof|\$v|[\d]+)$/i, n = /^new\s+/, _ = /['"]/;
var r = function (e) {
if (!t.test(e)) {
e = e.split(".")[0].trim();
if (e && !_.test(e)) {
e = e.replace(n, "");
try {
if (i.test(e))return;
o[e] = 1
} catch (r) {
}
}
}
};
return function (i) {
i = i || "";
if (i && !t.test(i)) {
var n = i.split(e);
for (var _ = 0, o = n.length; _ < o; _++)r(n[_])
}
}
}();
var a = function (t) {
if ("in" != t[2])throw"bad for loop statement: " + t.join(" ");
e.push(t[1]);
s(t[3]);
return "var __HASH__" + t[1] + " = " + t[3] + "," + t[1] + "," + t[1] + "_count=0;if (!!__HASH__" + t[1] + ")for(var " + t[1] + "_key in __HASH__" + t[1] + "){" + t[1] + " = __HASH__" + t[1] + "[" + t[1] + "_key];if (typeof(" + t[1] + ')=="function") continue;' + t[1] + "_count++;"
};
var u = function () {
var t = e[e.length - 1];
return "}; if(!__HASH__" + t + "||!" + t + "_count){"
};
var c = function () {
e.pop();
return "};"
};
var h = function (t) {
if ("as" != t[2])throw"bad for list loop statement: " + t.join(" ");
var e = t[1].split("..");
if (e.length > 1) {
s(e[0]);
s(e[1]);
return "for(var " + t[3] + "," + t[3] + "_index=0," + t[3] + "_beg=" + e[0] + "," + t[3] + "_end=" + e[1] + "," + t[3] + "_length=parseInt(" + t[3] + "_end-" + t[3] + "_beg+1);" + t[3] + "_index<" + t[3] + "_length;" + t[3] + "_index++){" + t[3] + " = " + t[3] + "_beg+" + t[3] + "_index;"
} else {
s(t[1]);
return "for(var __LIST__" + t[3] + " = " + t[1] + "," + t[3] + "," + t[3] + "_index=0," + t[3] + "_length=__LIST__" + t[3] + ".length;" + t[3] + "_index<" + t[3] + "_length;" + t[3] + "_index++){" + t[3] + " = __LIST__" + t[3] + "[" + t[3] + "_index];"
}
};
var l = function (t) {
if (t && t.length) {
t.shift();
var e = t[0].split("(")[0];
return "var " + e + " = function" + t.join("").replace(e, "") + "{var __OUT=[];"
}
};
var f = function (t) {
if (!t[1])throw"bad include statement: " + t.join(" ");
return 'if (typeof inline == "function"){__OUT.push(inline('
};
var d = function (t, e) {
s(e.slice(1).join(" "));
return t
};
var $ = function (t) {
return d("if(", t)
};
var p = function (t) {
return d("}else if(", t)
};
var m = function (t) {
return d("var ", t)
};
r = {
blk: /^\{(cdata|minify|eval)/i,
tag: "forelse|for|list|if|elseif|else|var|macro|break|notrim|trim|include",
def: {
"if": {pfix: $, sfix: "){", pmin: 1},
"else": {pfix: "}else{"},
elseif: {pfix: p, sfix: "){", pdft: "true"},
"/if": {pfix: "}"},
"for": {pfix: a, pmin: 3},
forelse: {pfix: u},
"/for": {pfix: c},
list: {pfix: h, pmin: 3},
"/list": {pfix: "};"},
"break": {pfix: "break;"},
"var": {pfix: m, sfix: ";"},
macro: {
pfix: l
},
"/macro": {pfix: 'return __OUT.join("");};'},
trim: {
pfix: function () {
_ = !0
}
},
"/trim": {
pfix: function () {
_ = null
}
},
inline: {pfix: f, pmin: 1, sfix: "));}"}
},
ext: {
seed: function (t) {
return (t || "") + "" + n
}, "default": function (t, e) {
return t || e
}
}
};
var g = function () {
var t = /\\([\{\}])/g;
return function (e, n) {
e = e.replace(t, "$1");
var _ = e.slice(1, -1).split(i), o = r.def[_[0]];
if (o) {
if (o.pmin && o.pmin >= _.length)throw"Statement needs more parameters:" + e;
n.push(o.pfix && "string" != typeof o.pfix ? o.pfix(_) : o.pfix || "");
if (o.sfix) {
if (_.length <= 1) {
if (o.pdft)n.push(o.pdft)
} else for (var s = 1, a = _.length; s < a; s++) {
if (s > 1)n.push(" ");
n.push(_[s])
}
n.push(o.sfix)
}
} else y(e, n)
}
}();
var v = function (t, e) {
if (t && t.length)if (1 != t.length) {
var i = t.pop().split(":");
e.push("__MDF['" + i.shift() + "'](");
v(t, e);
if (i.length > 0) {
var n = i.join(":");
s(n);
e.push("," + n)
}
e.push(")")
} else {
var _ = t.pop();
s(_);
e.push("" == _ ? '""' : _)
}
};
var y = function (t, e) {
if (t) {
var i = t.split("\n");
if (i && i.length)for (var n = 0, r = i.length, o; n < r; n++) {
o = i[n];
if (_) {
o = o.trim();
if (!o)continue
}
b(o, e);
if (_ && n < r - 1)e.push("__OUT.push('\\n');")
}
}
};
var b = function () {
var t = /\|\|/g, e = /#@@#/g;
return function (i, n) {
var _ = "}", r = -1, o = i.length, s, a, u, c, h;
for (; r + _.length < o;) {
s = "${";
a = "}";
u = i.indexOf(s, r + _.length);
if (u < 0)break;
if ("%" == i.charAt(u + 2)) {
s = "${%";
a = "%}"
}
c = i.indexOf(a, u + s.length);
if (c < 0)break;
x(i.substring(r + _.length, u), n);
h = i.substring(u + s.length, c).replace(t, "#@@#").split("|");
for (var l = 0, f = h.length; l < f; h[l] = h[l].replace(e, "||"), l++);
n.push("__OUT.push(");
v(h, n);
n.push(");");
_ = a;
r = c
}
x(i.substring(r + _.length), n)
}
}();
var x = function () {
var t = {r: /\n|\\|\'/g, "\n": "\\n", "\\": "\\\\", "'": "\\'"};
var e = function (e) {
return (e || "").replace(t.r, function (e) {
return t[e] || e
})
};
return function (t, i) {
if (t)i.push("__OUT.push('" + e(t) + "');")
}
}();
var E = function () {
var t = /\t/g, e = /\n/g, n = /\r\n?/g;
var _ = function (t, e) {
var i = t.indexOf("}", e + 1);
for (; "\\" == t.charAt(i - 1);)i = t.indexOf("}", i + 1);
return i
};
var s = function () {
var t = [], e = arguments[0];
for (var i in e) {
i = (i || "").trim();
if (i)t.push(i + "=$v('" + i + "')"); else;
}
return t.length > 0 ? "var " + t.join(",") + ";" : ""
};
return function (a) {
o = {};
a = a.replace(n, "\n").replace(t, " ");
var u = ["if(!__CTX) return '';", ""];
u.push("function $v(__NAME){var v = __CTX[__NAME];return v==null?window[__NAME]:v;};");
u.push("var defined=function(__NAME){return __CTX[__NAME]!=null;},");
u.push("__OUT=[];");
var c = -1, h = a.length;
var l, f, d, $, p, m, v, b;
for (; c + 1 < h;) {
l = c;
l = a.indexOf("{", l + 1);
for (; l >= 0;) {
f = _(a, l);
d = a.substring(l, f);
$ = d.match(r.blk);
if ($) {
p = $[1].length + 1;
m = a.indexOf("}", l + p);
if (m >= 0) {
v = m - l - p <= 0 ? "{/" + $[1] + "}" : d.substr(p + 1);
p = a.indexOf(v, m + 1);
if (p >= 0) {
y(a.substring(c + 1, l), u);
b = a.substring(m + 1, p);
switch ($[1]) {
case"cdata":
x(b, u);
break;
case"minify":
x(b.replace(e, " ").replace(i, " "), u);
break;
case"eval":
if (b)u.push("__OUT.push((function(){" + b + "})());")
}
l = c = p + v.length - 1
}
}
} else if ("$" != a.charAt(l - 1) && "\\" != a.charAt(l - 1) && 0 == d.substr("/" == d.charAt(1) ? 2 : 1).search(r.tag))break;
l = a.indexOf("{", l + 1)
}
if (l < 0)break;
f = _(a, l);
if (f < 0)break;
y(a.substring(c + 1, l), u);
g(a.substring(l, f + 1), u);
c = f
}
y(a.substring(c + 1), u);
u.push(';return __OUT.join("");');
u[1] = s(o);
o = null;
return new Function("__CTX", "__MDF", u.join(""))
}
}();
TrimPath.seed = function () {
return n
};
TrimPath.merge = function () {
var e = {};
TrimPath.dump = function () {
return {func: e, text: t}
};
return function (i, n, _) {
try {
n = n || {};
if (!e[i] && !t[i])return "";
if (!e[i]) {
e[i] = E(t[i]);
delete t[i]
}
if (_)for (var o in r.ext)if (!_[o])_[o] = r.ext[o];
return e[i](n, _ || r.ext)
} catch (s) {
return s.message || ""
}
}
}();
TrimPath.parse = function () {
var e = +new Date;
return function (i, n) {
if (!i)return "";
n = n || "ck-" + e++;
if (null != t[n]) {
console.warn("jst template overwrited with key " + n);
console.debug("old template content: " + t[n].replace(/\n/g, " "));
console.debug("new template content: " + i.replace(/\n/g, " "))
}
t[n] = i;
return n
}
}()
}();
I$(16, function (t, e, i, n, _, r, o, s, a) {
var u = {};
r._$seed = TrimPath.seed;
r._$get = function () {
var t = function (t) {
return !r._$getTextTemplate ? "" : r._$getTextTemplate(t)
};
return function (i, n, _) {
n = n || {};
n.inline = t;
_ = e._$merge({}, u, _);
_.rand = e._$uniqueID;
_.format = e._$format;
_.escape = e._$escape;
_.inline = t;
return TrimPath.merge(i, n, _)
}
}();
r._$add = function (t, e) {
if (!t)return "";
var n, _ = i._$get(t);
if (_) {
n = _.id;
t = _.value || _.innerText;
if (!e)i._$remove(_)
}
return TrimPath.parse(t, n)
};
r._$addTemplate = function (t, e) {
return TrimPath.parse(t, e)
};
r._$render = function (t, e, n, _) {
t = i._$get(t);
if (t)t.innerHTML = r._$get(e, n, _)
};
r._$extend = function (t) {
e._$merge(u, t)
};
n._$merge({_$render: r._$render});
if (!0) {
var c = t.P("nej.e");
c._$addHtmlTemplate = r._$add;
c._$getHtmlTemplate = r._$get;
c._$getHtmlTemplateSeed = r._$seed;
c._$renderHtmlTemplate = r._$render;
c._$registJSTExt = r._$extend
}
return r
}, 6, 8, 13, 19, 33);
I$(58, function (t, e, i, n, _, r, o, s, a, u) {
var c, h = 6e4;
o._$$LoaderAbstract = e._$klass();
c = o._$$LoaderAbstract._$extend(r._$$EventTarget);
c.__init = function () {
this.__super();
this.__qopt = {onerror: this.__onQueueError._$bind(this), onload: this.__onQueueLoaded._$bind(this)};
if (!this.constructor.__cache)this.constructor.__cache = {loaded: {}}
};
c.__reset = function (t) {
this.__super(t);
this.__version = t.version;
this.__timeout = t.timeout;
this.__qopt.version = this.__version;
this.__qopt.timeout = this.__timeout
};
c.__delLoadData = function (t) {
delete this.constructor.__cache[t]
};
c.__getLoadData = function (t) {
return this.constructor.__cache[t]
};
c.__setLoadData = function (t, e) {
this.constructor.__cache[t] = e
};
c.__getRequest = a;
c.__doClearRequest = function (t) {
n._$clearEvent(t)
};
c.__doRequest = function (t) {
t.src = this.__url;
document.head.appendChild(t)
};
c.__doClear = function () {
var t = this.__getLoadData(this.__url);
if (t) {
window.clearTimeout(t.timer);
this.__doClearRequest(t.request);
delete t.bind;
delete t.timer;
delete t.request;
this.__delLoadData(this.__url);
this.__getLoadData("loaded")[this.__url] = !0
}
};
c.__doCallback = function (t) {
var e = this.__getLoadData(this.__url);
if (e) {
var i = e.bind;
this.__doClear();
if (i && i.length > 0) {
var n;
for (; i.length;) {
n = i.shift();
try {
n._$dispatchEvent(t, arguments[1])
} catch (_) {
if (!1)throw _;
console.error(_.message);
console.error(_.stack)
}
n._$recycle()
}
}
}
};
c.__onError = function (t) {
this.__doCallback("onerror", t)
};
c.__onLoaded = function () {
this.__doCallback("onload")
};
c.__doLoadQueue = function (t) {
this.constructor._$allocate(this.__qopt)._$load(t)
};
c.__onQueueCheck = function (t) {
var e = this.__getLoadData(this.__key);
if (e) {
if (t)e.error++;
e.loaded++;
if (!(e.loaded < e.total)) {
this.__delLoadData(this.__key);
this._$dispatchEvent(e.error > 0 ? "onerror" : "onload")
}
}
};
c.__onQueueError = function (t) {
this.__onQueueCheck(!0)
};
c.__onQueueLoaded = function () {
this.__onQueueCheck()
};
c._$load = function (t) {
t = _._$absolute(t);
if (t) {
this.__url = t;
if (this.__version)this.__url += (this.__url.indexOf("?") < 0 ? "?" : "&") + this.__version;
if (!this.__getLoadData("loaded")[this.__url]) {
var e = this.__getLoadData(this.__url), r;
if (e) {
e.bind.unshift(this);
e.timer = window.clearTimeout(e.timer)
} else {
r = this.__getRequest();
e = {request: r, bind: [this]};
this.__setLoadData(this.__url, e);
n._$addEvent(r, "load", this.__onLoaded._$bind(this));
n._$addEvent(r, "error", this.__onError._$bind(this, {
code: i._$CODE_ERRSERV,
message: "无法加载指定资源文件[" + this.__url + "]!"
}))
}
if (0 != this.__timeout)e.timer = window.setTimeout(this.__onError._$bind(this, {
code: i._$CODE_TIMEOUT,
message: "指定资源文件[" + this.__url + "]载入超时!"
}), this.__timeout || h);
if (r)this.__doRequest(r);
this._$dispatchEvent("onloading")
} else {
try {
this._$dispatchEvent("onload")
} catch (o) {
if (!1)throw o;
console.error(o.message);
console.error(o.stack)
}
this._$recycle()
}
} else this._$dispatchEvent("onerror", {code: i._$CODE_NOTASGN, message: "请指定要载入的资源地址!"})
};
c._$queue = function (t) {
if (t && t.length) {
this.__key = _._$uniqueID();
var e = {error: 0, loaded: 0, total: t.length};
this.__setLoadData(this.__key, e);
_._$forEach(t, function (t, i) {
if (t)this.__doLoadQueue(t); else e.total--
}, this);
this._$dispatchEvent("onloading")
} else this._$dispatchEvent("onerror", {code: i._$CODE_NOTASGN, message: "请指定要载入的资源队列!"})
};
return o
}, 6, 1, 27, 9, 8, 34);
I$(66, function (t, e, i, n, _, r) {
i._$cookie = function () {
var t = new Date, i = +t, _ = 864e5;
var r = function (t) {
var e = document.cookie, i = "\\b" + t + "=", n = e.search(i);
if (n < 0)return "";
n += i.length - 2;
var _ = e.indexOf(";", n);
if (_ < 0)_ = e.length;
return e.substring(n, _) || ""
};
return function (o, s) {
if (void 0 === s)return r(o);
if (e._$isString(s)) {
if (s) {
document.cookie = o + "=" + s + ";";
return s
}
s = {expires: -100}
}
s = s || n;
var a = o + "=" + (s.value || "") + ";";
delete s.value;
if (void 0 !== s.expires) {
t.setTime(i + s.expires * _);
s.expires = t.toGMTString()
}
a += e._$object2string(s, ";");
document.cookie = a
}
}();
if (!0)t.copy(t.P("nej.j"), i);
return i
}, 6, 8);
I$(80, function (t, e, i, n, _) {
return JSON
}, 15);
I$(67, function () {
return JSON
}, 80);
I$(52, function (t, e, i, n, _, r, o, s, a, u, c, h) {
var l;
a._$$ProxyAbstract = t._$klass();
l = a._$$ProxyAbstract._$extend(r._$$EventTarget);
l.__reset = function (t) {
this.__super(t);
this.__request = e._$fetch({url: "", sync: !1, cookie: !1, type: "text", method: "GET", timeout: 6e4}, t);
var i = n._$get("csrf");
if (i.cookie && i.param) {
var r = encodeURIComponent(i.param) + "=" + encodeURIComponent(o._$cookie(i.cookie) || ""), s = this.__request.url.indexOf("?") < 0 ? "?" : "&";
this.__request.url += s + r
}
this.__headers = t.headers || {};
var a = this.__headers[_._$HEAD_CT];
if (null == a)this.__headers[_._$HEAD_CT] = _._$HEAD_CT_FORM
};
l.__destroy = function () {
this.__super();
delete this.__rkey;
delete this.__request;
delete this.__headers
};
l.__onLoadRequest = function (t) {
var e = t.status;
if (e != -1)if (0 == ("" + e).indexOf("2"))this._$dispatchEvent("onload", i._$text2type(t.result, this.__request.type)); else this._$dispatchEvent("onerror", {
data: e,
result: t.result,
code: _._$CODE_ERRSERV,
message: "服务器返回异常状态[" + e + "]!"
}); else this._$dispatchEvent("onerror", {code: _._$CODE_TIMEOUT, message: "请求[" + this.__request.url + "]超时!"})
};
l.__doSendRequest = c;
l.__getResponseHeader = c;
l.__onAbort = function () {
this._$dispatchEvent("onerror", {code: _._$CODE_ERRABRT, message: "客户端终止请求"})
};
l._$send = function (t) {
var e = this.__request.url;
if (e)try {
this.__request.data = null == t ? null : t;
var i = {request: this.__request, headers: this.__headers};
try {
this._$dispatchEvent("onbeforerequest", i)
} catch (n) {
console.error(n.message);
console.error(n.stack)
}
this.__doSendRequest(i)
} catch (r) {
this._$dispatchEvent("onerror", {
code: _._$CODE_ERRSERV, message: "请求[" + e + "]失败:" + r.message + "!"
})
} else this._$dispatchEvent("onerror", {code: _._$CODE_NOTASGN, message: "没有输入请求地址!"})
};
l._$abort = c;
l._$header = function (t) {
if (!e._$isArray(t))return this.__getResponseHeader(t) || "";
var i = {};
e._$forEach(t, function (t) {
i[t] = this._$header(t)
}, this);
return i
};
return a
}, 1, 8, 13, 47, 27, 34, 66, 67);
I$(68, function (t, e, i, n) {
t.__getXMLHttpRequest = function () {
return new XMLHttpRequest
};
t.__hasAbortEvent = function () {
return !0
};
return t
});
I$(53, function (t, e, i, n, _, r, o) {
return e
}, 15, 68, 8);
I$(28, function (t, e, i, n, _, r, o, s, a) {
var u;
r._$$ProxyXHR = i._$klass();
u = r._$$ProxyXHR._$extend(t._$$ProxyAbstract);
u.__destroy = function () {
this.__super();
window.clearTimeout(this.__timer);
delete this.__timer;
try {
this.__xhr.onreadystatechange = s;
this.__xhr.abort()
} catch (t) {
}
delete this.__xhr
};
u.__doSendRequest = function () {
var t = function (t, e) {
this.__xhr.setRequestHeader(e, t)
};
var i = function (t) {
var i = [];
e._$reverseEach(t.getElementsByTagName("input"), function (t) {
if ("file" == t.type)if (t.name) {
if (t.files.length > 1) {
e._$forEach(t.files, function (e) {
i.push({name: t.name, file: e})
});
t.parentNode.removeChild(t)
}
} else t.parentNode.removeChild(t)
});
return i.length > 0 ? i : null
};
return function (r) {
var o = r.request, s = r.headers;
this.__xhr = _.__getXMLHttpRequest();
if (s[n._$HEAD_CT] === n._$HEAD_CT_FILE) {
delete s[n._$HEAD_CT];
this.__xhr.upload.onprogress = this.__onStateChange._$bind(this, 1);
if ("FORM" === o.data.tagName) {
var a = i(o.data);
o.data = new FormData(o.data);
e._$forEach(a, function (t) {
var i = t.file;
o.data.append(t.name || i.name || "file-" + e._$uniqueID(), i)
})
}
}
this.__xhr.onreadystatechange = this.__onStateChange._$bind(this, 2);
this.__xhr.onabort = this.__onAbort._$bind(this);
if (0 !== o.timeout)this.__timer = window.setTimeout(this.__onStateChange._$bind(this, 3), o.timeout);
this.__xhr.open(o.method, o.url, !o.sync);
e._$loop(s, t, this);
if (this.__request.cookie && "withCredentials" in this.__xhr)this.__xhr.withCredentials = !0;
if (!(s[n._$HEAD_CT] !== n._$HEAD_CT_FORM || window.FormData && o.data instanceof window.FormData))o.data = e._$object2string(o.data, "&", !0);
this.__xhr.send(o.data)
}
}();
u.__onStateChange = function (t) {
switch (t) {
case 1:
this._$dispatchEvent("onuploading", arguments[1]);
break;
case 2:
if (4 == this.__xhr.readyState)this.__onLoadRequest({
status: this.__xhr.status,
result: this.__xhr.responseText || ""
});
break;
case 3:
this.__onLoadRequest({status: -1})
}
};
u.__getResponseHeader = function (t) {
return !this.__xhr ? "" : this.__xhr.getResponseHeader(t)
};
u._$abort = function () {
if (!_.__hasAbortEvent())this.__onAbort(); else {
this.__xhr.onreadystatechange = s;
this.__xhr.abort()
}
};
return r
}, 52, 8, 1, 27, 53);
I$(86, function (t, e, i, n, _) {
e.__canFlashEventBubble = function (t) {
return "transparent" != (t || "").toLowerCase()
};
return e
}, 15);
I$(76, function (t, e, i, n, _, r) {
return t
}, 86, 15);
I$(77, '{var hide = defined("hidden")&&!!hidden}\n{var param = defined("params")&¶ms||NEJ.O}\n{var width = !hide?width:"1px",height = !hide?height:"1px"}\n{if hide}<div style="position:absolute;top:0;left:0;width:1px;height:1px;z-index:10000;overflow:hidden;">{/if}\n<object classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n codebase = "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"\n width = "${width|default:"100px"}"\n height = "${height|default:"100px"}" id="${id}">\n <param value="${src}" name="movie">\n {for x in param}\n <param value="${x}" name="${x_key}"/>\n {/for}\n <embed src="${src}" name="${id}"\n width="${width|default:"100px"}"\n height="${height|default:"100px"}"\n pluginspage="http://www.adobe.com/go/getflashplayer"\n type="application/x-shockwave-flash"\n {for x in param}${x_key}="${x}" {/for}></embed>\n</object>\n{if hide}</div>{/if}');
I$(64, function (t, e, i, n, _, r, o, s, a, u, c, h) {
var l = _._$add(s);
a._$flash = function () {
var s = {}, a, u = /^(?:mouse.*|(?:dbl)?click)$/i;
window.onflashevent = function (t) {
var e = decodeURIComponent(t.target), i = t.type.toLowerCase();
var n = s[e + "-tgt"];
if (n && u.test(i))h(n, t);
var _ = s[e + "-on" + i];
if (_) {
var r = "";
try {
r = _(t)
} catch (o) {
}
return r
}
};
var c = function (t) {
a = document.title;
var i = e._$get(t.parent) || document.body, n = _._$get(l, t);
i.insertAdjacentHTML(!t.hidden ? "beforeEnd" : "afterBegin", n)
};
var h = function (t, e) {
var n = e.type.toLowerCase();
r.requestAnimationFrame(function () {
i._$dispatchEvent(t, n)
})
};
var f = function (t) {
return !!t && !!t.inited && !!t.inited()
};
var d = function (t) {
var i = [document.embeds[t], e._$get(t), document[t], window[t]], _ = n._$forIn(i, f), r = i[_], o = t + "-count";
s[o]++;
if (!(r || s[o] > 100))window.setTimeout(d._$bind(null, t), 300); else {
if (a) {
document.title = a;
a = null
}
s[t](r);
delete s[t];
delete s[o]
}
};
var $ = function (t) {
var i = t.id, _ = t.params;
if (!_) {
_ = {};
t.params = _
}
var r = _.flashvars || "";
r += (!r ? "" : "&") + ("id=" + i);
if (!t.hidden && (t.target || o.__canFlashEventBubble(_.wmode))) {
var a = e._$id(t.target) || e._$id(t.parent);
s[i + "-tgt"] = a
}
_.flashvars = r;
n._$loop(t, function (t, e) {
if (n._$isFunction(t) && "onready" != e)s[i + "-" + e] = t
})
};
return function (e) {
e = t.X({}, e);
if (e.src) {
var i = "_" + n._$uniqueID();
e.id = i;
$(e);
c(e);
if (e.onready) {
s[i] = e.onready;
s[i + "-count"] = 0;
d(i)
}
}
}
}();
if (!0)t.copy(t.P("nej.e"), a);
return a
}, 6, 13, 9, 8, 16, 60, 76, 77);
I$(48, function (t, e, i, n, _, r, o, s, a) {
var u, c = {}, h = n._$uniqueID();
this["ld" + h] = function (t, e) {
var i = c[t];
if (i) {
delete c[t];
i.__onLoadRequest({status: 200, result: e})
}
};
this["er" + h] = function (t, e) {
var i = c[t];
if (i) {
delete c[t];
i.__onLoadRequest({status: e || 0})
}
};
r._$$ProxyFlash = e._$klass();
u = r._$$ProxyFlash._$extend(t._$$ProxyAbstract);
u.__doSendRequest = function (t) {
var e = c.flash;
if (!n._$isArray(e))if (e) {
this.__rkey = n._$uniqueID();
c[this.__rkey] = this;
var r = n._$fetch({url: "", data: null, method: "GET"}, t.request);
r.key = this.__rkey;
r.headers = t.headers;
r.onerror = "cb.er" + h;
r.onloaded = "cb.ld" + h;
var o = i._$getFlashProxy(r.url);
if (o)r.policyURL = o;
e.request(r)
} else {
c.flash = [this.__doSendRequest._$bind(this, t)];
_._$flash({
hidden: !0, src: i._$get("ajax.swf"), onready: function (t) {
if (t) {
var e = c.flash;
c.flash = t;
n._$reverseEach(e, function (t, e, i) {
try {
t()
} catch (n) {
}
})
}
}
})
} else e.push(this.__doSendRequest._$bind(this, t))
};
u._$abort = function () {
delete c[this.__rkey];
this.__onAbort()
};
return r
}, 52, 1, 47, 8, 64);
I$(87, function (t, e, i, n) {
t.__formatOrigin = function () {
var t = /^([\w]+?:\/\/.*?(?=\/|$))/i;
return function (e) {
e = e || "";
if (t.test(e))return RegExp.$1; else return "*"
}
}();
t.__formatPassData = function (t) {
return t
};
t.__postMessage = function (i, n) {
if (i.postMessage) {
n = n || e;
i.postMessage(t.__formatPassData(n.data), t.__formatOrigin(n.origin))
}
};
return t
});
I$(79, function (t, e, i, n, _, r, o, s) {
return e
}, 15, 87, 8, 9);
I$(65, function (t, e, i, n, _, r, o, s) {
_._$postMessage = function () {
var t = window.name || "_parent", _ = {_top: window.top, _self: window, _parent: window.parent};
return function (o, s) {
if (e._$isString(o)) {
o = _[o] || window.frames[o] || (i._$get(o) || r).contentWindow;
if (!o)return
}
var a = e._$fetch({data: null, origin: "*", source: t}, s);
n.__postMessage(o, a)
}
}();
if (!0)t.copy(t.P("nej.j"), _);
return _
}, 6, 8, 13, 79);
I$(49, function (t, e, i, n, _, r, o, s, a, u, c) {
var h, l = {};
s._$$ProxyFrame = i._$klass();
h = s._$$ProxyFrame._$extend(t._$$ProxyAbstract);
h.__init = function () {
var t = "NEJ-AJAX-DATA:", e = !1;
var i = function (e) {
var i = e.data;
if (0 == i.indexOf(t)) {
i = JSON.parse(i.replace(t, ""));
var n = l[i.key];
if (n) {
delete l[i.key];
i.result = decodeURIComponent(i.result || "");
n.__onLoadRequest(i)
}
}
};
var _ = function () {
if (!e) {
e = !0;
n._$addEvent(window, "message", i)
}
};
return function () {
this.__super();
_()
}
}();
h.__doSendRequest = function (t) {
var i = t.request, s = _._$getFrameProxy(i.url), a = l[s];
if (!e._$isArray(a))if (a) {
this.__rkey = e._$uniqueID();
l[this.__rkey] = this;
var u = e._$fetch({url: "", data: null, timeout: 0, method: "GET"}, i);
u.key = this.__rkey;
u.headers = t.headers;
o._$postMessage(l[s], {data: u})
} else {
l[s] = [this.__doSendRequest._$bind(this, t)];
r._$createXFrame({
src: s, visible: !1, onload: function (t) {
var i = l[s];
l[s] = n._$getElement(t).contentWindow;
e._$reverseEach(i, function (t) {
try {
t()
} catch (e) {
}
})
}
})
} else a.push(this.__doSendRequest._$bind(this, t))
};
h._$abort = function () {
delete l[this.__rkey];
this.__onAbort()
};
return s
}, 52, 8, 1, 9, 47, 13, 65);
I$(50, function (t, e, i, n, _, r, o, s, a, u, c, h) {
var l, f = {}, d = "NEJ-UPLOAD-RESULT:";
a._$$ProxyUpload = e._$klass();
l = a._$$ProxyUpload._$extend(t._$$ProxyAbstract);
l.__init = function () {
var t = !1;
var e = function (t) {
var e = t.data;
if (0 == e.indexOf(d)) {
e = JSON.parse(e.replace(d, ""));
var i = f[e.key];
if (i) {
delete f[e.key];
i.__onLoadRequest(decodeURIComponent(e.result))
}
}
};
var i = function () {
if (!t) {
t = !0;
n._$addEvent(window, "message", e)
}
};
return function () {
this.__super();
i()
}
}();
l.__destroy = function () {
this.__super();
_._$remove(this.__frame);
delete this.__frame;
window.clearTimeout(this.__timer);
delete this.__timer
};
l.__onLoadRequest = function (t) {
try {
var e = _._$text2type(t, this.__request.type);
this._$dispatchEvent("onload", e)
} catch (i) {
this._$dispatchEvent("onerror", {code: r._$CODE_ERREVAL, message: t})
}
};
l.__doSendRequest = function () {
var t = function () {
var t, e;
try {
var t = this.__frame.contentWindow.document.body, e = (t.innerText || t.textContent || "").trim();
if (e.indexOf(d) >= 0 || t.innerHTML.indexOf(d) >= 0)return
} catch (i) {
return
}
this.__onLoadRequest(e)
};
var e = function (t, i, n) {
o._$request(t, {
type: "json", method: "POST", cookie: n, mode: parseInt(i) || 0, onload: function (_) {
if (this.__timer) {
this._$dispatchEvent("onuploading", _);
this.__timer = window.setTimeout(e._$bind(this, t, i, n), 1e3)
}
}._$bind(this), onerror: function (_) {
if (this.__timer)this.__timer = window.setTimeout(e._$bind(this, t, i, n), 1e3)
}._$bind(this)
})
};
return function (o) {
var s = o.request, a = o.headers, c = s.data, h = i._$uniqueID();
f[h] = this;
c.target = h;
c.method = "POST";
c.enctype = r._$HEAD_CT_FILE;
c.encoding = r._$HEAD_CT_FILE;
var l = c.action || "", d = l.indexOf("?") <= 0 ? "?" : "&";
c.action = l + d + "_proxy_=form";
this.__frame = _._$createXFrame({
name: h, onload: function (i) {
var _ = n._$getElement(i);
n._$addEvent(_, "load", t._$bind(this));
c.submit();
var r = (c.nej_query || u).value;
if (r) {
var o = (c.nej_mode || u).value, s = "true" === (c.nej_cookie || u).value;
this.__timer = window.setTimeout(e._$bind(this, r, o, s), 100)
}
}._$bind(this)
})
}
}();
l._$abort = function () {
this.__onAbort()
};
return a
}, 52, 1, 8, 9, 13, 27, 10, 65);
I$(51, function (t, e, i, n, _, r, o, s) {
_.__getProxyByMode = function (_, r, o) {
var s = r ? {2: n._$$ProxyUpload} : {
2: i._$$ProxyFrame,
3: e._$$ProxyFlash
};
return (s[_] || t._$$ProxyXHR)._$allocate(o)
};
return _
}, 28, 48, 49, 50);
I$(29, function (t, e, i, n, _, r) {
return e
}, 15, 51);
I$(10, function (t, e, i, n, _, r, o, s, a, u) {
var c = {}, h = a;
o._$abort = function (t) {
var e = c[t];
if (e)e.req._$abort()
};
o._$filter = function (t) {
h = t || a
};
o._$request = function () {
var t = (location.protocol + "//" + location.host).toLowerCase();
var n = function (e) {
var n = i._$url2origin(e);
return !!n && n != t
};
var o = function (t) {
return (t || s)[e._$HEAD_CT] == e._$HEAD_CT_FILE
};
var u = function (t) {
var e = o(t.headers);
if (!n(t.url) && !e)return _._$$ProxyXHR._$allocate(t); else return r.__getProxyByMode(t.mode, e, t)
};
var l = function (t, e) {
var i = {data: e};
var n = t.result.headers;
if (n)i.headers = t.req._$header(n);
return i
};
var f = function (t) {
var e = c[t];
if (e) {
if (e.req)e.req._$recycle();
delete c[t]
}
};
var d = function (t, e) {
var i = c[t];
if (i) {
var n = arguments[2];
if ("onload" == e && i.result)n = l(i, n);
f(t);
var _ = {type: e, result: n};
h(_);
if (!_.stopped)(i[e] || a)(_.result)
}
};
var $ = function (t, e) {
d(t, "onload", e)
};
var p = function (t, e) {
d(t, "onerror", e)
};
var m = function (t, e) {
var n = t.indexOf("?") < 0 ? "?" : "&", e = e || "";
if (i._$isObject(e))e = i._$object2query(e);
if (e)t += n + e;
return t
};
return function (t, e) {
e = e || {};
var n = i._$uniqueID(), _ = {result: e.result, onload: e.onload || a, onerror: e.onerror || a};
c[n] = _;
e.onload = $._$bind(null, n);
e.onerror = p._$bind(null, n);
if (e.query)t = m(t, e.query);
var r = e.method || "";
if ((!r || /get/i.test(r)) && e.data) {
t = m(t, e.data);
e.data = null
}
e.url = t;
_.req = u(e);
_.req._$send(e.data);
return n
}
}();
o._$upload = function (t, _) {
t = n._$get(t);
if (!t)return "";
var r = i._$fetch({
mode: 0,
type: "json",
query: null,
cookie: !1,
headers: {},
onload: null,
onerror: null,
onuploading: null,
onbeforerequest: null
}, _);
r.data = t;
r.method = "POST";
r.timeout = 0;
r.headers[e._$HEAD_CT] = e._$HEAD_CT_FILE;
return o._$request(t.action, r)
};
if (!0)t.copy(t.P("nej.j"), o);
return o
}, 6, 27, 8, 13, 28, 29);
I$(35, function (t, e, i, n, _, r, o, s) {
var a;
_._$$LoaderText = e._$klass();
a = _._$$LoaderText._$extend(t._$$LoaderAbstract);
a.__getRequest = function () {
return null
};
a.__doRequest = function () {
n._$request(this.__url, {
method: "GET",
type: "text",
onload: this.__onLoaded._$bind(this),
onerror: this.__onError._$bind(this)
})
};
a.__onLoaded = function (t) {
this.__doCallback("onload", {url: this.__url, content: t})
};
return _
}, 58, 1, 13, 10);
I$(73, function (t, e, i, n, _) {
e.__removeIFrameKeepHistory = function (e) {
t._$remove(e)
};
return e
}, 13);
I$(59, function (t, e, i, n, _, r, o) {
return t
}, 73, 13, 15);
I$(36, function (t, e, i, n, _, r, o, s) {
var a;
_._$$LoaderHtml = e._$klass();
a = _._$$LoaderHtml._$extend(t._$$LoaderAbstract);
a.__getRequest = function () {
var t = i._$create("iframe");
t.width = 0;
t.height = 0;
t.style.display = "none";
return t
};
a.__doRequest = function (t) {
try {
document.body.appendChild(t);
t.src = this.__url
} catch (e) {
console.log(t);
console.error(e)
}
};
a.__onError = function (t) {
var e = (this.__getLoadData(this.__url) || r).request;
this.__doCallback("onerror", t);
n.__removeIFrameKeepHistory(e)
};
a.__onLoaded = function () {
var t = null, e = (this.__getLoadData(this.__url) || r).request;
try {
if (e.src != this.__url)return;
t = e.contentWindow.document.body
} catch (i) {
}
this.__doCallback("onload", t);
n.__removeIFrameKeepHistory(e)
};
return _
}, 58, 1, 13, 59);
I$(37, function (t, e, i, n, _, r, o) {
var s;
n._$$LoaderStyle = e._$klass();
s = n._$$LoaderStyle._$extend(t._$$LoaderAbstract);
s.__getRequest = function () {
return i._$create("link")
};
s.__doRequest = function (t) {
t.href = this.__url;
document.head.appendChild(t)
};
return n
}, 58, 1, 13);
I$(38, function (t, e, i, n, _, r, o) {
var s;
n._$$LoaderScript = e._$klass();
s = n._$$LoaderScript._$extend(t._$$LoaderAbstract);
s.__reset = function (t) {
this.__super(t);
this.__async = t.async;
this.__charset = t.charset;
this.__qopt.async = !1;
this.__qopt.charset = this.__charset
};
s.__getRequest = function () {
var t = i._$create("script");
if (null != this.__async)t.async = !!this.__async;
if (null != this.__charset)t.charset = this.__charset;
return t
};
s.__doClearRequest = function (t) {
i._$remove(t)
};
return n
}, 58, 1, 13);
I$(18, function (t, e, i, n, _, r, o, s, a) {
r._$loadScript = function (t, e) {
_._$$LoaderScript._$allocate(e)._$load(t)
};
r._$queueScript = function (t, e) {
_._$$LoaderScript._$allocate(e)._$queue(t)
};
r._$loadStyle = function (t, e) {
n._$$LoaderStyle._$allocate(e)._$load(t)
};
r._$queueStyle = function (t, e) {
n._$$LoaderStyle._$allocate(e)._$queue(t)
};
r._$loadHtml = function (t, e) {
i._$$LoaderHtml._$allocate(e)._$load(t)
};
r._$loadText = function (t, i) {
e._$$LoaderText._$allocate(i)._$load(t)
};
if (!0)t.copy(t.P("nej.j"), r);
return r
}, 6, 35, 36, 37, 38);
I$(2, function (t, e, i, n, _, r, o, s, a, u, c, h, l, f) {
var d = {}, $ = "ntp-" + +new Date + "-";
c.tpl = function () {
return d
};
c._$parseTemplate = function () {
var t = 0;
var u = function () {
if (!(t > 0)) {
t = 0;
i._$dispatchEvent(document, "templateready");
i._$clearEvent(document, "templateready")
}
};
var l = function (t, i) {
var _ = n._$dataset(t, "src");
if (_) {
i = i || h;
var r = i.root;
if (!r)r = t.ownerDocument.location.href; else r = e._$absolute(r);
_ = _.split(",");
e._$forEach(_, function (t, i, n) {
n[i] = e._$absolute(t, r)
});
return _
}
};
var f = function (t) {
if (_._$is("mac") && "safari" === _._$KERNEL.browser)return e._$unescape(t.innerHTML); else return t.value || t.innerText || ""
};
var d = function (t, e) {
if (t) {
var i = l(t, e);
if (i)s._$queueStyle(i, {version: n._$dataset(t, "version")});
n._$addStyle(t.value)
}
};
var $ = function (e) {
t--;
n._$addScript(e);
u()
};
var p = function (e, i) {
if (e) {
var _ = l(e, i), r = e.value;
if (!_)n._$addScript(r); else {
t++;
var i = {version: n._$dataset(e, "version"), onload: $._$bind(null, r)};
window.setTimeout(s._$queueScript._$bind(s, _, i), 0)
}
}
};
var m = function (e) {
t--;
c._$parseTemplate(e);
u()
};
var g = function (e, i) {
if (e) {
var _ = l(e, i)[0];
if (_) {
t++;
var i = {version: n._$dataset(e, "version"), onload: m};
window.setTimeout(s._$loadHtml._$bind(s, _, i), 0)
}
}
};
var v = function (e, i) {
t--;
c._$addTextTemplate(e, i || "");
u()
};
var y = function (e, i) {
if (e && e.id) {
var _ = e.id, r = l(e, i)[0];
if (r) {
t++;
var o = r + (r.indexOf("?") < 0 ? "?" : "&") + (n._$dataset(e, "version") || ""), i = {
type: "text",
method: "GET",
onload: v._$bind(null, _)
};
window.setTimeout(a._$request._$bind(a, o, i), 0)
}
}
};
var b = function (t, e) {
var i = t.name.toLowerCase();
switch (i) {
case"jst":
r._$addTemplate(f(t), t.id);
return;
case"txt":
c._$addTextTemplate(t.id, f(t));
return;
case"ntp":
c._$addNodeTemplate(f(t), t.id);
return;
case"js":
p(t, e);
return;
case"css":
d(t, e);
return;
case"html":
g(t, e);
return;
case"res":
y(t, e);
return
}
};
o._$$CustomEvent._$allocate({element: document, event: "templateready", oneventadd: u});
return function (t, i) {
t = n._$get(t);
if (t) {
var _ = "TEXTAREA" == t.tagName ? [t] : e._$object2array(t.getElementsByTagName("textarea"));
e._$forEach(_, function (t) {
b(t, i)
});
n._$remove(t, !0)
}
u()
}
}();
c._$addTextTemplate = function (t, e) {
if (null != d[t] && typeof d[t] == typeof e) {
console.warn("text template overwrited with key " + t);
console.debug("old template content: " + d[t].replace(/\n/g, " "));
console.debug("new template content: " + e.replace(/\n/g, " "))
}
d[t] = e || ""
};
c._$getTextTemplate = function (t) {
return d[t] || ""
};
c._$addNodeTemplate = function (t, i) {
i = i || e._$uniqueID();
t = n._$get(t) || t;
c._$addTextTemplate($ + i, t);
if (!e._$isString(t))n._$removeByEC(t);
return i
};
c._$getNodeTemplate = function (t) {
if (!t)return null;
t = $ + t;
var i = c._$getTextTemplate(t);
if (!i)return null;
var _;
if (e._$isString(i)) {
i = n._$html2node(i);
var r = i.getElementsByTagName("textarea");
if (!("TEXTAREA" == i.tagName || r && r.length))c._$addTextTemplate(t, i); else _ = i
}
if (!_)_ = i.cloneNode(!0);
n._$removeByEC(_);
return _
};
c._$getItemTemplate = function () {
var t = function (t, e) {
return "offset" == e || "limit" == e
};
return function (i, n, _) {
var r = [];
if (!i || !i.length || !n)return r;
_ = _ || h;
var o = i.length, s = parseInt(_.offset) || 0, a = Math.min(o, s + (parseInt(_.limit) || o)), u = {
total: i.length,
range: [s, a]
};
e._$merge(u, _, t);
for (var c = s, l; c < a; c++) {
u.index = c;
u.data = i[c];
l = n._$allocate(u);
var f = l._$getId();
d[f] = l;
l._$recycle = l._$recycle._$aop(function (t, e) {
delete d[t];
delete e._$recycle
}._$bind(null, f, l));
r.push(l)
}
return r
}
}();
c._$getItemById = function (t) {
return d[t]
};
c._$parseUITemplate = function () {
var t = /#<(.+?)>/g;
return function (i, _) {
_ = _ || {};
i = (i || "").replace(t, function (t, i) {
var n = _[i];
if (!n) {
n = "tpl-" + e._$uniqueID();
_[i] = n
}
return n
});
c._$parseTemplate(n._$html2node(i));
return _
}
}();
u._$merge({_$parseTemplate: c._$parseTemplate, _$addNodeTemplate: c._$addNodeTemplate});
if (!0)t.copy(t.P("nej.e"), c);
return c
}, 6, 8, 9, 13, 15, 16, 17, 18, 10, 19);
I$(11, function (t, e, i, n, _, r, o, s, a, u) {
o._$request = function () {
var t = {}, r = /\{(.*?)\}/gi, o = /^get|delete|head$/i, c = /json/i, h = /xml/i;
var l = function (e) {
var i = t[e];
if (i) {
delete i.s;
delete i.f;
delete t[e]
}
};
var f = function (e, i) {
var n = t[e];
if (n) {
var _ = n[i], r = u.slice.call(arguments, 2);
try {
(_ || a).apply(null, r)
} catch (o) {
if (!1)throw o;
console.error(o.message);
console.error(o)
}
l(e)
}
};
var d = function (t, e) {
f(t, "s", e)
};
var $ = function (t, i) {
i = i || {};
if (i.code != n._$CODE_ERRSERV || 204 != i.data) {
e._$dispatchEvent(window, "resterror", i);
if (!i.stopped)f(t, "f", i); else l(t)
} else d(t, null)
};
var p = function (t, e, i) {
var n = t[e] || t[e.toLowerCase()];
if (!n) {
n = i;
t[e] = n
}
return n
};
var m = function (t, e, n) {
if (i._$isArray(t))n[e] = JSON.stringify(t)
};
return function (e, n) {
n = i._$merge({}, n);
var u = {}, l = n.param || s;
e = e.replace(r, function (t, e) {
var i = l[e];
if (null != i)u[e] = !0;
return encodeURIComponent(i || "") || t
});
var f = n.data || {};
i._$loop(l, function (t, e) {
if (!u[e])f[e] = t
});
var g = "text", v = n.headers || {}, y = p(v, "Accept", "application/json"), b = p(v, "Content-Type", "application/json");
if (c.test(y))g = "json"; else if (h.test(y))g = "xml";
var x = i._$uniqueID();
t[x] = {s: n.onload || a, f: n.onerror || a};
n.method = n.method || "GET";
if (o.test(n.method.trim())) {
i._$forIn(f, m);
n.query = f;
f = null
} else if (c.test(b))f = JSON.stringify(f);
n.type = g;
n.data = f;
n.headers = v;
n.onload = d._$bind(null, x);
n.onerror = $._$bind(null, x);
return _._$request(e, n)
}
}();
o._$abort = function (t) {
_._$abort(t)
};
r._$$CustomEvent._$allocate({element: window, event: "resterror"});
if (!0)t.P("nej.j")._$requestByREST = o._$request;
return o
}, 6, 9, 8, 27, 10, 17);
I$(81, function (t, e, i, n) {
t.__getItemInStorage = function (t) {
return localStorage.getItem(t)
};
t.__setItemToStorage = function (t, e) {
localStorage.setItem(t, e)
};
t.__removeItemFromStorage = function (t) {
localStorage.removeItem(t)
};
t.__clearStorage = function () {
localStorage.clear()
};
t.__initStorage = function () {
(document.onstorageready || i)()
};
t.__isStorageReady = function () {
return !0
};
return t
});
I$(69, function (t, e, i, n, _, r, o) {
return i
}, 15, 9, 81);
I$(54, function (t, e, i, n, _, r, o, s, a, u) {
var c = {};
o._$init = function () {
var t = !1;
return function () {
if (!t) {
t = !0;
var n = function () {
var t = function (t, e, i) {
r.__setItemToStorage(e, JSON.stringify(t));
delete i[e]
};
return function () {
e._$loop(c, t)
}
}();
i._$addEvent(document, "storageready", n);
r.__initStorage()
}
}
}();
o._$setDataInStorage = function (t, e) {
o._$init();
var i = JSON.stringify(e);
try {
r.__setItemToStorage(t, i)
} catch (n) {
console.error(n.message);
console.error(n)
}
if (i != r.__getItemInStorage(t))c[t] = e
};
o._$getDataInStorage = function (t) {
o._$init();
var e = JSON.parse(r.__getItemInStorage(t) || "null");
return null == e ? c[t] : e
};
o._$getDataInStorageWithDefault = function (t, e) {
var i = o._$getDataInStorage(t);
if (null == i) {
i = e;
o._$setDataInStorage(t, i)
}
return i
};
o._$delDataInStorage = function (t) {
o._$init();
delete c[t];
r.__removeItemFromStorage(t)
};
o._$clearDataInStorage = function () {
var t = function (t, e, i) {
delete i[e]
};
return function () {
o._$init();
e._$loop(c, t);
r.__clearStorage()
}
}();
n._$$CustomEvent._$allocate({
element: document, event: "storageready", oneventadd: function () {
if (r.__isStorageReady())i._$dispatchEvent(document, "storageready")
}
});
if (!0)t.copy(t.P("nej.j"), o);
return o
}, 6, 8, 9, 17, 67, 69);
I$(30, function (t, e, i, n, _, r, o, s, a) {
var u, c = "dat-" + +new Date;
r._$$CacheAbstract = e._$klass();
u = r._$$CacheAbstract._$extend(n._$$EventTarget);
u.__init = function () {
this.__super();
this.__cache = this.constructor[c];
if (!this.__cache) {
this.__cache = {};
this.__cache[c + "-l"] = {};
this.constructor[c] = this.__cache
}
};
u.__destroy = function () {
this.__doClearReqFromQueue();
this.__super()
};
u.__getDataInCache = function (t) {
return this.__cache[t]
};
u.__setDataInCache = function (t, e) {
this.__cache[t] = e
};
u.__getDataInCacheWithDefault = function (t, e) {
var i = this.__getDataInCache(t);
if (null == i) {
i = e;
this.__setDataInCache(t, i)
}
return i
};
u.__delDataInCache = function (t) {
if (null == t)i._$loop(this.__cache, function (t, e) {
if (e != c + "-l")this.__delDataInCache(e)
}, this); else delete this.__cache[t]
};
u.__delDataInStorage = function (t) {
return _._$delDataInStorage(t)
};
u.__getDataInStorage = function (t) {
return _._$getDataInStorage(t)
};
u.__setDataInStorage = function (t, e) {
_._$setDataInStorage(t, e)
};
u.__getDataLocalWithDefault = function (t, e) {
var i = this.__getDataLocal(t);
if (null == i) {
i = e;
this.__setDataLocal(t, i)
}
return i
};
u.__getDataLocal = function (t) {
var e = this.__getDataInCache(t);
if (null != e)return e;
e = this.__getDataInStorage(t);
if (null != e)this.__setDataInCache(t, e);
return e
};
u.__setDataLocal = function (t, e) {
this.__setDataInStorage(t, e);
this.__setDataInCache(t, e)
};
u.__delDataLocal = function (t) {
if (null == t)i._$loop(this.__cache, function (t, e) {
if (e != c + "-l")this.__delDataLocal(e)
}, this); else {
delete this.__cache[t];
_._$delDataInStorage(t)
}
};
u._$clearDataLocal = function () {
this.__delDataLocal()
};
u.__doCallbackRequest = function (t) {
var e = this.__cache[c + "-l"], n = a.slice.call(arguments, 1);
i._$forEach(e[t], function (t) {
try {
t.apply(this, n)
} catch (e) {
if (!1)throw e;
console.error(e.message);
console.error(e.stack)
}
});
delete e[t]
};
u.__doQueueRequest = function (t, e) {
if (!this.__qtmp)this.__qtmp = [];
this.__qtmp.push({key: t, callback: e});
e = e || s;
var i = this.__cache[c + "-l"][t];
if (!i) {
i = [e];
this.__cache[c + "-l"][t] = i;
return !1
}
i.push(e);
return !0
};
u.__doClearReqFromQueue = function () {
i._$forEach(this.__qtmp, function (t) {
var e = this.__cache[c + "-l"][t.key];
i._$reverseEach(e, function (e, i, n) {
if (e === t.callback)n.splice(i)
});
if (!e || !e.length)this.__doClearReqQueue(t.key)
}, this);
delete this.__qtmp
};
u.__doClearReqQueue = function (t) {
delete this.__cache[c + "-l"][t]
};
u.__hasFragment = function (t, e, i) {
if (!t)return !1;
e = parseInt(e) || 0;
i = parseInt(i) || 0;
if (!i) {
if (!t.loaded)return !1;
i = t.length
}
if (t.loaded)i = Math.min(i, t.length - e);
for (var n = 0; n < i; n++)if (void 0 === t[e + n])return !1;
return !0
};
u._$isFragmentFilled = function (t, e, i) {
return this.__hasFragment(this._$getListInCache(t), e, i)
};
if (!0)t.P("nej.ut")._$$Cache = r._$$CacheAbstract;
return r
}, 6, 1, 8, 34, 54);
I$(12, function (t, e, i, n, _, r, o, s) {
var a;
_._$$CacheList = e._$klass();
a = _._$$CacheList._$extend(n._$$CacheAbstract);
a.__reset = function (t) {
this.__super(t);
this.__key = t.key || "id";
this.__data = t.data || r;
this.__auto = !!t.autogc;
this.__doSwapCache(t.id)
};
a.__destroy = function () {
this.__super();
if (this.__timer)this.__doGCAction()
};
a.__doSwapCache = function (t) {
var e;
if (t) {
e = this.__cache[t];
if (!e) {
e = {};
this.__cache[t] = e
}
}
e = e || this.__cache;
e.hash = e.hash || {};
this.__lspl = e
};
a.__doGCAction = function () {
this.__timer = window.clearTimeout(this.__timer);
var t = {};
i._$loop(this.__lspl, function (e, n) {
if ("hash" != n)if (i._$isArray(e))i._$forEach(e, function (e) {
if (e)t[e[this.__key]] = !0
}, this)
}, this);
i._$loop(this.__getHash(), function (e, i, n) {
if (!t[i])delete n[i]
})
};
a.__doGCSchedule = function () {
if (this.__timer)this.__timer = window.clearTimeout(this.__timer);
this.__timer = window.setTimeout(this.__doGCAction._$bind(this), 150)
};
a.__doSaveItemToCache = function (t, e) {
if (!i._$isArray(t)) {
t = this.__doFormatItem(t, e) || t;
if (!t)return null;
var n = t[this.__key];
if (null != n) {
var _ = this.__getHash()[n];
if (_)t = i._$merge(_, t);
this.__getHash()[n] = t
}
delete t.__dirty__;
return t
}
var r = [];
i._$forEach(t, function (t) {
r.push(this.__doSaveItemToCache(t, e))
}, this);
return r
};
a.__doRemoveItemFromList = function (t, e) {
var n = null, _ = this.__key;
if (!i._$isArray(e)) {
var n = null, _ = this.__key;
e = e[_] || e;
var r = this._$getListInCache(t), o = i._$indexOf(r, function (t) {
return !!t && t[_] == e
});
if (o >= 0) {
n = r[o];
r.splice(o, 1)
}
return n
}
var n = [];
i._$reverseEach(e, function (e) {
n.unshift(this.__doRemoveItemFromList(t, e))
}, this);
return n
};
a.__doFormatItem = o;
a.__doUnshiftToList = function (t, e) {
if (e)if (i._$isArray(e))i._$reverseEach(e, function (e) {
this.__doUnshiftToList(t, e)
}, this); else {
var n = this._$getListInCache(t), e = this.__doSaveItemToCache(e, t);
if (e)n.unshift(e)
}
};
a._$setTotal = function (t, e) {
var i = this._$getListInCache(t);
i.length = Math.max(i.length, e);
this._$setLoaded(t)
};
a._$getTotal = function (t) {
return this._$getListInCache(t).length
};
a._$setLoaded = function (t, e) {
this._$getListInCache(t).loaded = e !== !1
};
a._$isLoaded = function (t) {
return !!this._$getListInCache(t).loaded
};
a._$setListInCache = function (t, e) {
this._$clearListInCache(t);
this.__getList({key: t, offset: 0, limit: e.length + 1}, {list: e, total: e.length})
};
a._$getListInCache = function () {
var t = function (t) {
return (t || "") + (!t ? "" : "-") + "list"
};
return function (e) {
var e = t(e), i = this.__lspl[e];
if (!i) {
i = [];
this.__lspl[e] = i
}
return i
}
}();
a.__getHash = function () {
var t = this.__lspl.hash;
if (!t) {
t = {};
this.__lspl.hash = t
}
return t
};
a._$pullRefresh = function () {
var t = function (t) {
return "r-" + t.key
};
return function (e) {
var n = i._$merge({}, e), _ = t(n), r = this._$dispatchEvent._$bind(this);
if (!this.__doQueueRequest(_, r)) {
n.rkey = _;
n.onload = this.__pullRefresh._$bind(this, n);
this._$dispatchEvent("dopullrefresh", n)
}
}
}();
a.__pullRefresh = function (t, e) {
var i = t.key, n = parseInt(e.total), _ = e.list || e.result;
this.__doUnshiftToList(i, _ || e);
if (!isNaN(n) && _) {
this._$getListInCache(i).length = n;
this._$setLoaded(i)
}
this.__doCallbackRequest(t.rkey, "onpullrefresh", t)
};
a._$getList = function () {
var t = function (t) {
return "r-" + t.key + "-" + t.offset + "-" + t.limit
};
return function (e) {
e = e || r;
var i = {
key: "" + e.key || "",
ext: e.ext || null,
data: e.data || null,
offset: parseInt(e.offset) || 0,
limit: parseInt(e.limit) || 0
}, n = this._$getListInCache(i.key), _ = this.__hasFragment(n, i.offset, i.limit);
if (!_) {
var o = t(i), s = this._$dispatchEvent._$bind(this);
if (!this.__doQueueRequest(o, s)) {
i.rkey = o;
i.onload = this.__getList._$bind(this, i);
this._$dispatchEvent("doloadlist", i)
}
} else this._$dispatchEvent("onlistload", i)
}
}();
a.__getList = function () {
var t = function (t, e, i) {
if (t)return !0;
i.splice(e, 1)
};
return function (e, n) {
e = e || r;
if (n) {
var _ = e.key, o = e.offset, s = this._$getListInCache(_);
var a = n || [];
if (!i._$isArray(a)) {
a = n.result || n.list || [];
var u = parseInt(n.total);
if (!isNaN(u) || u > a.length)this._$setTotal(_, u)
}
i._$forEach(a, function (t, e) {
s[o + e] = this.__doSaveItemToCache(t, _)
}, this);
if (a.length < e.limit) {
this._$setLoaded(_);
i._$reverseEach(s, t)
}
this.__doCallbackRequest(e.rkey, "onlistload", e)
} else this.__doCallbackRequest(e.rkey, "onlistload", e)
}
}();
a._$clearListInCache = function () {
var t = function (t, e, i) {
i.splice(e, 1)
};
return function (e) {
if (i._$isString(e)) {
var n = this._$getListInCache(e);
i._$reverseEach(n, t);
this._$setLoaded(e, !1);
if (this.__auto)this.__doGCSchedule()
} else i._$loop(this.__lspl, function (t, e) {
if ("hash" != e && i._$isArray(t)) {
e = e.substr(0, e.length - 5);
this._$clearListInCache(e)
}
}, this)
}
}();
a.__doCheckItemValidity = function (t, e) {
return !t.__dirty__
};
a._$getItemInCache = function (t) {
return this.__getHash()[t]
};
a._$clearItemInCache = function (t) {
var e = this._$getItemInCache(t);
if (e)e.__dirty__ = !0
};
a._$getItem = function () {
var t = function (t) {
return "r-" + t.key + "-" + t.id
};
return function (e) {
e = e || r;
var i = e[this.__key], n = {id: i, ext: e.ext, data: e.data || {}, key: "" + e.key || ""};
_item = this._$getItemInCache(i);
n.data[this.__key] = i;
if (!_item || !this.__doCheckItemValidity(_item, n.key)) {
var _ = t(n), o = this._$dispatchEvent._$bind(this);
if (!this.__doQueueRequest(_, o)) {
n.rkey = _;
n.onload = this.__getItem._$bind(this, n);
this._$dispatchEvent("doloaditem", n)
}
} else this._$dispatchEvent("onitemload", n)
}
}();
a.__getItem = function (t, e) {
t = t || r;
this.__doSaveItemToCache(e, t.key);
this.__doCallbackRequest(t.rkey, "onitemload", t)
};
a._$addItem = function (t) {
t = i._$merge({}, t);
t.onload = this.__addItem._$bind(this, t);
this._$dispatchEvent("doadditem", t)
};
a.__addItem = function (t, e) {
var i = t.key;
e = this.__doSaveItemToCache(e, i);
if (e) {
var n = 0, _ = this._$getListInCache(i);
if (!t.push) {
n = -1;
var r = t.offset || 0;
_.splice(r, 0, e)
} else if (_.loaded) {
n = 1;
_.push(e)
} else _.length++
}
var o = {key: i, flag: n, data: e, action: "add", ext: t.ext};
this._$dispatchEvent("onitemadd", o);
return o
};
a._$deleteItem = function (t) {
t = i._$merge({}, t);
t.onload = this.__deleteItem._$bind(this, t);
this._$dispatchEvent("dodeleteitem", t)
};
a.__deleteItem = function (t, e) {
var i, n = t.key;
if (e) {
var _ = t.id;
i = this._$getItemInCache(_) || null;
this.__doRemoveItemFromList(n, _)
}
var r = {key: n, data: i, action: "delete", ext: t.ext};
this._$dispatchEvent("onitemdelete", r);
return r
};
a._$updateItem = function (t) {
t = i._$merge({}, t);
t.onload = this.__updateItem._$bind(this, t);
this._$dispatchEvent("doupdateitem", t)
};
a.__updateItem = function (t, e) {
var i = t.key;
if (e)e = this.__doSaveItemToCache(e, i);
var n = {key: i, data: e, action: "update", ext: t.ext};
this._$dispatchEvent("onitemupdate", n);
return n
};
if (!0)t.P("nej.ut")._$$ListCache = _._$$CacheList;
return _
}, 6, 1, 8, 30);
I$(3, function (t, e, i, n, _, r, o, s, a, u, c, h) {
var l = {}, f = i._$uniqueID();
var d = function (t, e) {
e = e || {};
i._$forEach(l[t + "-" + f], function (t) {
t.call(this, e);
if (e.stopped)return !0
}, this)
};
s._$$CacheListAbstract = e._$klass();
h = s._$$CacheListAbstract._$extend(o._$$CacheList);
h.__doSendRequest = function (t, e) {
var n = l[t];
if (n) {
var o = function (t) {
var _ = {req: e, error: t || {}};
d.call(this, "error", _);
if (!_.stopped) {
var r = e.onerror || n.onerror || "onerror";
if (i._$isFunction(r))r.call(this, _); else if (i._$isString(r))this._$dispatchEvent(r, _)
}
};
var s = function (t) {
var _ = {req: e, res: t};
if (i._$isFunction(n.post))n.post.call(this, _);
d.call(this, "post", _);
if (!_.error) {
if (i._$isFunction(n.format))n.format.call(this, _);
d.call(this, "format", _);
var r = e.onload || n.onload, t = _.result || t;
if (i._$isFunction(r))r.call(this, t); else if (i._$isString(r))this._$dispatchEvent(r, t);
if (i._$isFunction(n.finaly))n.finaly.call(this, _)
} else o.call(this, _.error)
};
var a = {url: n.url, req: e};
d.call(this, "filter", a);
if (i._$isFunction(n.filter))n.filter.call(this, a);
var u = i._$merge({}, e, {
type: "json",
method: n.method || "POST",
onload: s._$bind(this),
onerror: o._$bind(this)
});
(!n.rest ? _ : r)._$request(a.url, u)
} else console.error("not found request config for " + t)
};
h.__reset = function (t) {
this.__super(t);
this._$batEvent({
doloadlist: this.__doLoadList._$bind(this),
doloaditem: this.__doLoadItem._$bind(this),
doadditem: this.__doAddItem._$bind(this),
dodeleteitem: this.__doDeleteItem._$bind(this),
doupdateitem: this.__doUpdateItem._$bind(this),
dopullrefresh: this.__doPullRefresh._$bind(this)
})
};
h.__doLoadList = u;
h.__doPullRefresh = u;
h.__doLoadItem = u;
h.__doAddItem = u;
h.__doDeleteItem = u;
h.__doUpdateItem = u;
s._$on = function () {
var t = function (t, e) {
if (i._$isFunction(e)) {
var n = t + "-" + f, _ = l[n] || [];
_.push(e);
l[n] = _
}
};
return function (e) {
if (!i._$isString(e))i._$loop(e, function (e, i) {
t(i, e)
}); else t.apply(null, arguments)
}
}();
s._$do = function (t, e) {
if (i._$isFunction(e)) {
var n = t._$allocate(), _ = e.call(null, n);
n._$recycle();
return _
}
};
s._$config = function (t) {
i._$forIn(t, function (t, e) {
if ("string" == typeof t)t = {url: t};
l[e] = t
})
};
s._$merge = function (t, e) {
var n = l[t];
if (!n)l[t] = e; else l[t] = i._$merge(n, e)
};
if (!0)t.P("nej.ut")._$$AbstractListCache = s._$$CacheListAbstract;
return s
}, 6, 1, 8, 9, 10, 11, 12);
I$(82, function (t, e, i, n, _, r, o, s, a, u) {
var c;
o._$$Abstract = e._$klass();
c = o._$$Abstract._$extend(_._$$EventTarget);
c.__init = function () {
this.__super();
i._$dumpCSSText();
this.__initXGui();
this.__initNode()
};
c.__reset = function (t) {
this.__super(t);
this.__doInitClass(t.clazz);
this.__doInitDataset(t.dataset);
this._$appendTo(t.parent)
};
c.__destroy = function () {
this.__super();
this.__doDelParentClass();
this.__doDelParentDataset();
delete this.__parent;
i._$removeByEC(this.__body);
i._$delClassName(this.__body, this.__class);
delete this.__class
};
c.__initXGui = a;
c.__initNode = function () {
if (!this.__seed_html)this.__initNodeTemplate();
this.__body = r._$getNodeTemplate(this.__seed_html);
if (!this.__body)this.__body = i._$create("div", this.__seed_css);
i._$addClassName(this.__body, this.__seed_css)
};
c.__initNodeTemplate = a;
c.__doInitClass = function (t) {
this.__class = t || "";
i._$addClassName(this.__body, this.__class)
};
c.__doInitDataset = function (t) {
this.__datamap = n._$merge({}, t);
i._$dataset(this.__body, this.__datamap)
};
c.__doDelParentDataset = function () {
n._$forIn(this.__datamap, function (t, e) {
i._$dataset(this.__body, e, "")
}, this)
};
c.__doAddParentClass = function () {
if (this.__seed_css) {
var t = this.__seed_css.split(/\s+/);
i._$addClassName(this.__parent, t.pop() + "-parent")
}
};
c.__doDelParentClass = function () {
if (this.__seed_css) {
var t = this.__seed_css.split(/\s+/);
i._$delClassName(this.__parent, t.pop() + "-parent")
}
};
c._$getBody = function () {
return this.__body
};
c._$appendTo = function (t) {
if (this.__body) {
this.__doDelParentClass();
if (n._$isFunction(t))this.__parent = t(this.__body); else {
this.__parent = i._$get(t);
if (this.__parent)this.__parent.appendChild(this.__body)
}
this.__doAddParentClass()
}
};
c._$show = function () {
if (this.__parent && this.__body && this.__body.parentNode != this.__parent)this.__parent.appendChild(this.__body)
};
c._$hide = function () {
i._$removeByEC(this.__body)
};
if (!0)t.copy(t.P("nej.ui"), o);
return o
}, 6, 1, 13, 8, 34, 2);
I$(70, function (t, e, i, n, _, r, o) {
var s;
n._$$Item = e._$klass();
s = n._$$Item._$extend(i._$$Abstract);
s.__init = function () {
this.__id = this.__genId();
this.__super()
};
s.__reset = function (t) {
this.__super(t);
this.__index = t.index;
this.__total = t.total;
this.__range = t.range;
this._$refresh(t.data)
};
s.__destroy = function () {
this.__super();
delete this.__data;
delete this.__index;
delete this.__total;
delete this.__range
};
s.__doRefresh = r;
s.__genId = function () {
var t = +new Date;
return function () {
return "itm-" + ++t
}
}();
s._$getId = function () {
return this.__id
};
s._$getData = function () {
return this.__data
};
s._$refresh = function (t) {
this.__data = t || {};
this.__doRefresh(this.__data)
};
if (!0)t.copy(t.P("nej.ui"), n);
return n
}, 6, 1, 82);
I$(56, function (t, e, i, n, _, r, o) {
var s;
n._$$ListItem = e._$klass();
s = n._$$ListItem._$extend(i._$$Item);
s.__reset = function (t) {
this.__pkey = t.pkey || "id";
this.__prefix = t.prefix || "";
this.__super(t)
};
s.__onDelete = function (t) {
this._$dispatchEvent("ondelete", {ext: t, id: this._$getId(), data: this._$getData(), body: this._$getBody()})
};
s.__onUpdate = function (t) {
this._$dispatchEvent("onupdate", {ext: t, id: this._$getId(), data: this._$getData(), body: this._$getBody()})
};
s._$refresh = function (t) {
this.__super(t);
var e = this.__data[this.__pkey];
this.__id = this.__prefix + e || this.__genId()
};
if (!0)t.copy(t.P("nej.ui"), n);
return n
}, 6, 1, 70);
I$(83, ".#<uispace>{font-size:12px;line-height:160%;}\n.#<uispace> a{margin:0 2px;padding:2px 8px;color:#333;border:1px solid #aaa;text-decoration:none;}\n.#<uispace> .js-disabled{cursor:default;}\n.#<uispace> .js-selected{cursor:default;background-color:#bbb;}");
I$(71, function (t, e, i, n, _, r, o, s, a, u, c) {
var h;
s._$$AbstractPager = e._$klass();
h = s._$$AbstractPager._$extend(_._$$Abstract);
h.__reset = function (t) {
this.__bopt = n._$merge({}, t);
this.__popt = n._$merge({}, t);
delete this.__bopt.onchange;
this.__popt.onchange = this.__onChange._$bind(this);
this.__super(t);
this.__doResetNumber(t)
};
h.__destroy = function () {
if (this.__page) {
this.__page._$recycle();
delete this.__page
}
this.__super();
delete this.__bopt;
delete this.__popt;
this._$unbind();
this.__body.innerHTML = " "
};
h.__initXGui = function () {
var t = i._$pushCSSText(o);
return function () {
this.__seed_css = t
}
}();
h.__doResetNumber = function (t) {
var e = t.label || a;
if (!t.noprv) {
this.__popt.pbtn = i._$create("a", "zbtn zprv", this.__body);
this.__popt.pbtn.innerHTML = e.prev || "上一页"
}
var n = [];
for (var _ = 1, r = t.number; _ <= r; _++)n.push(i._$create("a", "zpgi zpg" + _, this.__body));
this.__popt.list = n;
if (!t.nonxt) {
this.__popt.nbtn = i._$create("a", "zbtn znxt", this.__body);
this.__popt.nbtn.innerHTML = e.next || "下一页"
}
};
h.__onChange = function (t) {
if (!this.__flag) {
var e = t.index, i = t.total;
this.__flag = !0;
this._$updatePage(e, i);
n._$forEach(this.__binders, function (t) {
t._$updatePage(e, i)
});
this.__flag = !1;
this._$dispatchEvent("onchange", t)
}
};
h._$bind = function (t) {
t = i._$get(t);
if (t) {
var e = n._$merge({}, this.__bopt);
e.parent = t;
e.index = this._$getIndex();
e.total = this._$getTotal();
var _ = this.constructor._$allocate(e);
_._$setEvent("onchange", this.__popt.onchange);
if (!this.__binders)this.__binders = [];
this.__binders.push(_)
}
};
h._$unbind = function () {
var t = function (t, e, i) {
t._$recycle();
i.splice(e, 1)
};
return function () {
n._$reverseEach(this.__binders, t)
}
}();
h._$setIndex = function (t) {
if (this.__page)this.__page._$setIndex(t)
};
h._$getIndex = function () {
if (!this.__page)return 1; else return this.__page._$getIndex()
};
h._$getTotal = function () {
if (!this.__page)return 1; else return this.__page._$getTotal()
};
h._$updatePage = function (t, e) {
if (this.__page)this.__page._$updatePage(t, e)
};
h._$updateTotal = function (t) {
if (this.__page)this.__page._$updateTotal(t)
};
if (!0)t.copy(t.P("nej.ui"), s);
return s
}, 6, 1, 13, 8, 82, 16, 83);
I$(84, function (t, e, i, n, _, r, o, s, a, u) {
var c;
o._$$PageAbstract = e._$klass();
c = o._$$PageAbstract._$extend(r._$$EventTarget);
c.__reset = function (t) {
this.__super(t);
this.__pbtn = t.pbtn;
this.__nbtn = t.nbtn;
this.__sbtn = t.sbtn;
this.__ebtn = t.ebtn;
this.__name = t.event || "click";
this.__parented = !!t.parented;
this.__selected = t.selected || "js-selected";
this.__disabled = t.disabled || "js-disabled";
this.__doPageListCheck(t.list);
this.__limit = t.limit || 1 / 0;
this._$updatePage(t.index || 1, t.total || 1)
};
c.__destroy = function () {
this.__super();
delete this.__list;
delete this.__name;
delete this.__pbtn;
delete this.__nbtn;
delete this.__sbtn;
delete this.__ebtn;
delete this.__last;
delete this.__total;
delete this.__index;
delete this.__extdata;
delete this.__selected;
delete this.__disabled
};
c.__getSelectNode = function (t) {
return !this.__parented ? t : t.parentNode
};
c.__doPageListCheck = function () {
var t = function (t) {
this.__list.push(t);
this.__doInitDomEvent([[t, this.__name, this.__onClick._$bind2(this, 0)]])
};
return function (e) {
this.__list = [];
this.__doInitDomEvent([[this.__pbtn, "click", this.__onClick._$bind2(this, -1)], [this.__nbtn, "click", this.__onClick._$bind2(this, 1)], [this.__sbtn, "click", this.__onClick._$bind2(this, -2)], [this.__ebtn, "click", this.__onClick._$bind2(this, 2)]]);
i._$forEach(e, t, this)
}
}();
c.__doSetNodeIndex = function (t, e) {
var i = this.__getSelectNode(t);
if (null == e) {
t.innerText = "";
n._$setStyle(t, "display", "none");
n._$delClassName(i, this.__selected)
} else {
t.innerText = e;
n._$setStyle(t, "display", "");
e == this.__index ? n._$addClassName(i, this.__selected) : n._$delClassName(i, this.__selected)
}
};
c.__doSyncBtnState = function () {
if (this.__index <= 1) {
n._$addClassName(this.__pbtn, this.__disabled);
n._$addClassName(this.__sbtn, this.__disabled)
} else {
n._$delClassName(this.__pbtn, this.__disabled);
n._$delClassName(this.__sbtn, this.__disabled)
}
if (this.__index >= this.__total) {
n._$addClassName(this.__nbtn, this.__disabled);
n._$addClassName(this.__ebtn, this.__disabled)
} else {
n._$delClassName(this.__nbtn, this.__disabled);
n._$delClassName(this.__ebtn, this.__disabled)
}
};
c.__doRefreshPage = a;
c.__doChangeIndex = function () {
this.__doRefreshPage();
this.__doSyncBtnState();
this._$dispatchEvent("onchange", {
last: this.__last,
total: this.__total,
index: this.__index,
ext: this.__extdata
})
};
c.__doSaveIndex = function (t) {
t = parseInt(t);
if (isNaN(t) || null == this.__total)return !1;
t = Math.max(1, Math.min(t, this.__total));
this.__last = this.__index;
this.__index = t;
return !0
};
c.__doSaveTotal = function (t) {
t = parseInt(t);
if (isNaN(t) || t < 1)return !1;
this.__total = Math.min(t, this.__limit);
return !0
};
c.__onClick = function (t, e) {
_._$stopDefault(t);
var i = _._$getElement(t), r = n._$hasClassName(this.__getSelectNode(i), this.__selected), o = n._$hasClassName(i, this.__disabled);
if (i && !r && !o) {
var s = i.innerText;
switch (e) {
case 1:
case-1:
s = this.__index + e;
break;
case 2:
s = this.__total;
break;
case-2:
s = 1
}
this._$setIndex(s)
}
};
c._$getIndex = function () {
return this.__index
};
c._$setIndex = function (t) {
var e = this.__index;
this.__doSaveIndex(t);
if (e != this.__index)this.__doChangeIndex()
};
c._$getTotal = function () {
return this.__total
};
c._$setTotal = function (t) {
if (this.__doSaveTotal(t) && null != this.__index) {
this.__index = 1;
this.__doChangeIndex()
}
};
c._$updateTotal = function (t) {
if (this.__doSaveTotal(t)) {
this.__doRefreshPage();
this.__doSyncBtnState()
}
};
c._$updatePage = function (t, e) {
if (this.__doSaveTotal(e) && this.__doSaveIndex(t))this.__doChangeIndex()
};
if (!0)t.P("nej.ut")._$$AbstractPage = o._$$PageAbstract;
return o
}, 6, 1, 8, 13, 9, 34);
I$(72, function (t, e, i, n, _, r, o, s, a) {
var u;
r._$$PageFragment = e._$klass();
u = r._$$PageFragment._$extend(_._$$PageAbstract);
u.__init = function () {
this.__ndot = [];
this.__super()
};
u.__destroy = function () {
this.__super();
this.__doRecycleDotNode()
};
u.__doRecycleDotNode = function () {
var t = function (t, e, n) {
i._$remove(t);
n.splice(e, 1)
};
return function () {
n._$reverseEach(this.__ndot, t)
}
}();
u.__doRefreshPage = function () {
this.__extdata = {last: !1, first: !1, list: this.__list};
this.__doRecycleDotNode();
this.__doSetNodeIndex(this.__list[0], 1);
var t = 1, e = this.__list.length;
if (!(this.__total < e)) {
if (this.__index > 1) {
var n = Math.floor((e - 2) / 2), _ = this.__total - e + 2, r = Math.max(2, this.__index - n);
if (this.__total >= e)r = Math.min(r, _);
if (r > 2) {
var o = i._$create("span", "zdot");
this.__ndot.push(o);
o.innerText = "...";
this.__list[0].insertAdjacentElement("afterEnd", o);
this.__extdata.first = !0
}
for (var s; ; t++) {
s = r + t - 1;
if (s > this.__index)break;
this.__doSetNodeIndex(this.__list[t], s)
}
}
if (this.__index < this.__total) {
var s, r = this.__index + 1;
for (var a = 0, u = e - 2; ; a++, t++) {
s = r + a;
if (t > u || s > this.__total)break;
this.__doSetNodeIndex(this.__list[t], s)
}
if (s < this.__total) {
var o = i._$create("span", "zdot");
this.__ndot.push(o);
o.innerText = "...";
this.__list[t].insertAdjacentElement("beforeBegin", o);
this.__extdata.last = !0
}
if (s <= this.__total)this.__doSetNodeIndex(this.__list[t++], this.__total)
}
for (; t < e; t++)this.__doSetNodeIndex(this.__list[t])
} else for (var c; t < e; t++) {
c = t + 1;
this.__doSetNodeIndex(this.__list[t], c > this.__total ? null : c)
}
};
if (!0)t.P("nej.ut")._$$Page = r._$$PageFragment;
return r
}, 6, 1, 13, 8, 84);
I$(57, function (t, e, i, n, _, r, o, s, a) {
var u;
r._$$Pager = e._$klass();
u = r._$$Pager._$extend(n._$$AbstractPager);
u.__reset = function (t) {
t.number = parseInt(t.number) || 9;
this.__super(t);
this.__page = _._$$PageFragment._$allocate(this.__popt)
};
u.__onChange = function (t) {
if (this.__bopt.noend) {
var e = t.ext || o, n = e.list || a;
if (e.last)i._$setStyle(n[n.length - 1], "display", "none")
}
this.__super(t)
};
if (!0)t.copy(t.P("nej.ui"), r);
return r
}, 6, 1, 13, 71, 72);
I$(32, function (t, e, i, n, _, r, o, s, a, u, c, h, l, f, d) {
var $;
h._$$ListModule = e._$klass();
$ = h._$$ListModule._$extend(s._$$EventTarget);
$.__reset = function (t) {
this.__ropt = {};
this.__super(t);
this.__lbox = _._$get(t.parent);
this.__iopt = {parent: this.__lbox};
this.__limit = parseInt(t.limit) || 10;
this.__first = parseInt(t.first) || this.__limit;
this.__doResetTemplate(t.item);
this.__doResetCache(t.cache || l);
this.__doResetPager(t.pager || l);
this._$refresh()
};
$.__destroy = function () {
this._$dispatchEvent("onbeforerecycle");
this.__doClearListBox();
this.__super();
if (this.__ropt.clear)this.__cache._$clearListInCache(this.__ropt.key);
this.__cache._$recycle();
if (this.__pager) {
this.__pager._$recycle();
delete this.__pager
}
delete this.__pkls;
delete this.__popt;
delete this.__pulling;
delete this.__cache;
delete this.__lbox;
delete this.__ikls;
delete this.__iopt;
delete this.__iext;
delete this.__ropt
};
$.__getItemBodyId = function (t) {
return this.__getItemId(t) + a._$seed()
};
$.__getItemId = function (t) {
var e = (this.__iopt || l).prefix || "";
return e + t
};
$.__getPageInfo = function (t, e, i, n) {
var _ = {index: 1, total: 1};
if (e >= t)_.index = Math.floor((e - t) / i) + 2;
if (n > t)_.total = Math.ceil((n - t) / i) + 1;
return _
};
$.__doResetJSTTemplate = function (t) {
delete this.__ikls;
this.__ikey = t;
this.__doInitDomEvent([[this.__lbox, "click", this.__onCheckAction._$bind(this)]])
};
$.__doResetTemplate = function (t) {
if (!i._$isString(t)) {
i._$merge(this.__iopt, t);
this.__iext = i._$merge({}, t, function (t) {
return !i._$isFunction(t)
});
var e = this.__iopt.klass;
delete this.__iopt.klass;
if (!i._$isString(e)) {
delete this.__ikey;
this.__ikls = e;
this.__iopt.ondelete = this._$dispatchEvent._$bind(this, "ondelete");
this.__iopt.onupdate = this._$dispatchEvent._$bind(this, "onupdate")
} else this.__doResetJSTTemplate(e)
} else this.__doResetJSTTemplate(t)
};
$.__doResetCache = function (t) {
var e = t.klass, n = i._$merge({}, t);
this.__ropt.key = n.lkey;
this.__ropt.ext = n.ext;
this.__ropt.data = n.data || {};
this.__ropt.clear = !!n.clear;
this.__iopt.pkey = n.key || "id";
n.onerror = this._$dispatchEvent._$bind(this, "onerror");
n.onlistload = this.__cbListLoad._$bind(this);
n.onpullrefresh = this.__cbPullRefresh._$bind(this);
if (e && "onlistchange" in e)this.__doInitDomEvent([[e, "listchange", this.__cbListChange._$bind(this)]]); else {
n.onitemadd = this.__cbItemAdd._$bind(this);
n.onitemdelete = this.__cbItemDelete._$bind(this);
n.onitemupdate = this.__cbItemUpdate._$bind(this)
}
this.__cache = (e || c._$$CacheList)._$allocate(n);
if (null != t.total)this.__cache._$setTotal(this.__ropt.key, t.total);
if (t.list)this.__cache._$setListInCache(this.__ropt.key, t.list)
};
$.__doResetPager = function (t) {
this.__pkls = t.klass || o._$$Pager;
this.__popt = i._$merge({}, t);
if (i._$isArray(t.parent)) {
this.__popt.parent = t.parent[0];
this.__pbid = t.parent.slice(1);
if (!this.__pbid || !this.__pbid.length)delete this.__pbid
}
delete this.__popt.klass
};
$.__doClearListBox = function () {
var t = /^(?:table|tr|tbody|ul|ol|select)$/i;
return function () {
this._$dispatchEvent("onbeforelistclear", {parent: this.__lbox});
if (this.__items && this.__items.length > 0) {
this.__items = this.__ikls._$recycle(this.__items);
delete this.__items
}
if (t.test(this.__lbox.tagName))_._$clearChildren(this.__lbox); else this.__lbox.innerHTML = ""
}
}();
$.__doSwitchPagerShow = function (t) {
if (!this.__popt.fixed) {
_._$setStyle(this.__popt.parent, "display", t);
i._$forEach(this.__pbid, function (e) {
_._$setStyle(e, "display", t)
}, this)
}
};
$.__doRefreshByPager = function () {
var t = this.__popt.index || 1;
delete this.__popt.index;
if (this.__pager)t = this.__pager._$getIndex();
this.__doChangePage({last: t, index: t})
};
$.__doChangePage = function (t) {
this._$dispatchEvent("onpagechange", t)
};
$.__doChangeOffset = function (t) {
this.__ropt.offset = t;
this.__doBeforeListLoad();
this.__doLoadList()
};
$.__doGenRequestOpt = function (t) {
return t
};
$.__doLoadList = function () {
var t = this.__ropt.data;
t.offset = this.__ropt.offset;
var e = 0 == t.offset;
t.total = e;
this.__ropt.limit = e ? this.__first : this.__limit;
t.limit = this.__ropt.limit;
this.__cache._$getList(this.__doGenRequestOpt(i._$merge({}, this.__ropt)))
};
$.__cbListLoad = function (t) {
if (t.key == this.__ropt.key && t.offset == this.__ropt.offset) {
this.__doBeforeListShow();
var e = this.__cache._$getListInCache(t.key);
if (!e || !e.length) {
if (!this._$cache()._$isLoaded(t.key))this.__doShowMessage("onlistloaderror", "列表加载失败"); else this.__doShowEmpty();
return !0
}
var i = t.limit, n = t.offset;
if (!this.__cache._$isFragmentFilled(t.key, n, i)) {
this.__doShowMessage("onlistloaderror", "列表加载失败");
return !0
}
if (!this.__doBeforeListRender(e, n, i)) {
this._$dispatchEvent("onbeforelistrender", {
list: e,
limit: i,
offset: n,
parent: this.__lbox,
total: this.__cache._$getTotal(t.key)
});
if (this.__ikey) {
this.__iopt.xlist = e;
this.__iopt.beg = n;
this.__iopt.end = Math.min(e.length, n + i) - 1;
this.__iopt.act = "list";
var _ = a._$get(this.__ikey, this.__iopt, this.__iext);
this.__doShowListByJST(_)
} else {
this.__iopt.limit = i;
this.__iopt.offset = n;
var r = u._$getItemTemplate(e, this.__ikls, this.__iopt);
this.__doShowListByItem(r)
}
this._$dispatchEvent("onafterlistrender", {
list: e,
limit: i,
offset: n,
parent: this.__lbox,
total: this.__cache._$getTotal(t.key)
})
}
}
};
$.__cbPullRefresh = function (t) {
if (this.__pulling) {
delete this.__pulling;
this.__doBeforeListShow("onafterpullrefresh");
this._$refresh()
}
};
$.__doSyncPager = function (t, e) {
if (this.__pager) {
if ((this.__popt || l).limit > 0)e = Math.min(e, this.__popt.limit);
var n = this.__pager._$getIndex(), _ = this.__pager._$getTotal();
if (n > e || e != _) {
this.__pager._$recycle();
delete this.__pager;
this.__doChangePage({last: n, index: Math.min(t, e)});
return !0
}
} else {
this.__popt.index = t;
this.__popt.total = e;
this.__pager = this.__pkls._$allocate(this.__popt);
this.__pager._$setEvent("onchange", this.__doChangePage._$bind(this));
i._$forEach(this.__pbid, function (t) {
this.__pager._$bind(t)
}, this)
}
};
$.__doFormatData = function () {
var t = +new Date;
return function (e) {
var i = e[this.__iopt.pkey];
if (!i) {
e["dirty-data"] = !0;
e[this.__iopt.pkey] = "dirty-" + t++
}
return e
}
}();
$.__doSplitDirty = function (t) {
var e = t[this.__iopt.pkey];
if (t["dirty-data"]) {
delete t["dirty-data"];
delete t[this.__iopt.pkey]
}
return e
};
$.__doInsertOneItem = function () {
var t = function (t, e) {
this.__lbox.insertAdjacentElement(t, e)
};
return function (e, n) {
var _ = [n];
if (this.__ikey) {
var _ = this.__cache._$getListInCache(this.__ropt.key), r = i._$indexOf(_, n);
if (r < 0) {
r = 0;
_ = [n]
}
this.__iopt.xlist = _;
this.__iopt.beg = r;
this.__iopt.end = r;
this.__iopt.act = "add";
this.__doShowListByJST(a._$get(this.__ikey, this.__iopt, this.__iext), e)
} else {
this.__iopt.limit = 1;
this.__iopt.offset = 0;
this.__iopt.parent = t._$bind(this, e);
var o = u._$getItemTemplate(_, this.__ikls, this.__iopt);
this.__iopt.parent = this.__lbox;
this.__doShowListByItem(o)
}
this._$dispatchEvent("onafterinsert")
}
}();
$.__doBeforeListLoad = f;
$.__doBeforeListShow = function (t) {
var e = {parent: this.__lbox};
this._$dispatchEvent(t || "onafterlistload", e);
if (!e.stopped)_._$removeByEC(this.__ntip)
};
$.__doBeforeListRender = f;
$.__doRenderMessage = function (t, e) {
if (i._$isString(t)) {
if (!this.__ntip)this.__ntip = _._$create("div");
this.__ntip.innerHTML = t
} else this.__ntip = t;
this.__lbox.insertAdjacentElement(e || "beforeEnd", this.__ntip)
};
$.__doShowMessage = function (t, e, i) {
var n = {parent: this.__lbox};
if (t)this._$dispatchEvent(t, n);
if (!n.stopped)this.__doRenderMessage(n.value || e, i)
};
$.__doShowEmpty = f;
$.__doShowListByJST = f;
$.__doShowListByItem = f;
$.__onCheckAction = function () {
var t = /^(?:delete|update)$/;
return function (e) {
var i = n._$getElement(e, "d:action");
if (i) {
var r = _._$dataset(i, "action");
if (t.test(r)) {
var o = _._$dataset(i, "id");
if (o) {
var s = this.__cache._$getItemInCache(o);
if (s) {
n._$stop(e);
this._$dispatchEvent("on" + r, {
data: s,
id: s[this.__iopt.pkey],
body: _._$get(this.__getItemBodyId(o))
})
}
}
}
}
}
}();
$.__cbItemAdd = f;
$.__doDeleteItem = function (t) {
var e = t.data || {}, i = {data: e, key: this.__ropt.key, id: e[this.__iopt.pkey]};
this._$dispatchEvent("onbeforedelete", i);
this.__cache._$deleteItem(i)
};
$.__cbItemDelete = f;
$.__doUpdateItem = function (t) {
var e = t.data || {}, i = {data: e, key: this.__ropt.key};
this._$dispatchEvent("onbeforeupdate", i);
this.__cache._$updateItem(i)
};
$.__cbItemUpdate = function (t) {
this.__doCheckResult(t, "onafterupdate");
if (!t.stopped) {
var e = t.data[this.__iopt.pkey];
if (this.__items) {
var n = u._$getItemById(this.__getItemId(e));
if (n)n._$refresh(t.data)
} else {
var r = this._$getItemBody(e);
if (!r)return;
var o = this.__cache._$getListInCache(this.__ropt.key), s = i._$indexOf(o, t.data);
if (s < 0)return;
this.__iopt.xlist = o;
this.__iopt.beg = s;
this.__iopt.end = s;
this.__iopt.act = "update";
var c = a._$get(this.__ikey, this.__iopt, this.__iext);
r.insertAdjacentHTML("afterEnd", c);
_._$remove(r)
}
this._$dispatchEvent("onafterupdaterender", {data: t.data, parent: this.__lbox})
}
};
$.__doCheckResult = function (t, e) {
var i = t.data;
if (!i || null == i[this.__iopt.pkey]) {
this._$dispatchEvent("onerror", t);
t.stopped = !0
}
if (!t.stopped)this._$dispatchEvent(e, t)
};
$.__cbAppendList = f;
$.__cbUnshiftList = f;
$.__cbListChange = function (t) {
if (!t.key || t.key == this.__ropt.key)switch (t.action) {
case"add":
this.__cbItemAdd(t);
break;
case"delete":
this.__cbItemDelete(t);
break;
case"update":
this.__cbItemUpdate(t);
break;
case"refresh":
this._$refresh();
break;
case"unshift":
this.__cbUnshiftList(t.offset, t.limit);
break;
case"append":
this.__cbAppendList(t.offset, t.limit)
}
};
$._$update = function (t) {
this.__doUpdateItem({data: t})
};
$._$delete = function (t) {
this.__doDeleteItem({data: t})
};
$._$add = function (t) {
this.__cache._$addItem({data: t, key: this.__ropt.key})
};
$._$cache = function () {
return this.__cache
};
$._$unshift = function (t) {
this.__doInsertOneItem("afterBegin", this.__doFormatData(t));
return this.__doSplitDirty(t)
};
$._$append = function (t) {
this.__doInsertOneItem("beforeEnd", this.__doFormatData(t));
return this.__doSplitDirty(t)
};
$._$refresh = function () {
this.__doClearListBox();
this.__doRefreshByPager()
};
$._$refreshWithClear = function () {
this.__cache._$clearListInCache(this.__ropt.key);
this._$refresh()
};
$._$reload = function (t) {
if (!t)this.__cache._$clearListInCache(this.__ropt.key);
this.__doLoadList()
};
$._$pullRefresh = function () {
if (!this.__pulling) {
this.__pulling = !0;
this.__doShowMessage("onbeforepullrefresh", "列表刷新中...", "afterBegin");
this.__cache._$pullRefresh({key: this.__ropt.key, data: this.__ropt.data})
}
};
$._$getTotal = function () {
return this.__cache._$getTotal(this.__ropt.key)
};
$._$getPager = function () {
return this.__pager
};
$._$items = function () {
return this.__items
};
$._$getItemBody = function (t) {
if (this.__ikey)return _._$get(this.__getItemBodyId(t)); else {
var e = u._$getItemById(this.__getItemId(t));
if (e)return e._$getBody()
}
};
$._$isLoaded = function () {
return this.__cache._$isLoaded(this.__ropt.key)
};
$._$showMessage = function (t) {
this.__doClearListBox();
this.__doShowMessage(null, t)
};
$._$nextPage = function () {
if (this.__pager) {
var t = this.__pager._$getIndex() + 1, e = this.__pager._$getTotal();
t = Math.max(1, Math.min(t, e));
this._$pageTo(t);
return t < e
}
};
$._$prevPage = function () {
if (this.__pager) {
var t = this.__pager._$getIndex() - 1, e = this.__pager._$getTotal();
t = Math.max(1, Math.min(t, e));
this._$pageTo(t);
return t <= 1
}
};
$._$pageTo = function (t) {
if (this.__pager) {
var e = this.__pager._$getTotal();
t = Math.max(1, Math.min(t, e));
this.__pager._$setIndex(t)
}
};
if (!0)t.copy(t.P("nej.ut"), h);
return h
}, 6, 1, 8, 9, 13, 56, 57, 34, 16, 2, 12);
I$(14, function (t, e, i, n, _, r, o, s, a, u, c) {
var h;
s._$$ListModuleWF = e._$klass();
h = s._$$ListModuleWF._$extend(o._$$ListModule);
h.__reset = function (t) {
this.__doResetMoreBtn(t.more);
this.__sbody = n._$get(t.sbody);
this.__doInitDomEvent([[this.__sbody, "scroll", this.__onCheckScroll._$bind(this)]]);
var e = t.delta;
if (null == e)e = 30;
this.__delta = Math.max(0, e);
var i = parseInt(t.count) || 0;
this.__count = Math.max(0, i);
var _ = parseInt(t.number) || 0;
if (_ > 1 && _ <= i)this.__number = _;
this.__super(t)
};
h.__destroy = function () {
this.__super();
if (this.__stimer) {
window.clearTimeout(this.__stimer);
delete this.__stimer
}
delete this.__nmore;
delete this.__sbody;
delete this.__endskr;
delete this.__nexting
};
h.__getPageInfo = function (t, e) {
var i = this.__first + (this.__count - 1) * this.__limit, n = this.__count * this.__limit;
return this.__super(i, t, n, e)
};
h.__doResetMoreBtn = function (t) {
this.__nmore = n._$get(t);
this.__doInitDomEvent([[this.__nmore, "click", this._$next._$bind(this)]])
};
h.__doLoadNextByTimer = function () {
if (!this.__endskr)this._$next()
};
h.__doCheckScroll = function (t) {
if (!this.__endskr && t && this.__lbox.clientHeight) {
if (!t.scrollHeight)t = n._$getPageBox();
var e = n._$offset(this.__lbox, this.__sbody), i = e.y + this.__lbox.offsetHeight - t.scrollTop - t.clientHeight, _ = t.scrollHeight <= t.clientHeight;
if (i <= this.__delta || _ && !this.__endskr) {
if (this.__stimer)window.clearTimeout(this.__stimer);
this.__stimer = window.setTimeout(this.__doLoadNextByTimer._$bind(this), 0)
}
}
};
h.__onCheckScroll = function (t) {
if (!this.__endskr) {
var e = i._$getElement(t);
if (!e)e = n._$getPageBox();
this.__doCheckScroll(e)
}
};
h.__doChangePage = function (t) {
this.__super(t);
if (!t.stopped) {
this.__doClearListBox();
var e = 0;
if (t.index > 1)e = this.__first + ((t.index - 1) * this.__count - 1) * this.__limit;
this.__offset = e;
this._$next()
}
};
h.__doGenRequestOpt = function (t) {
if (this.__number) {
var e = t.offset > 0 ? this.__limit : this.__first, i = e + this.__limit * (this.__number - 1);
this.__offset = t.offset + i;
t.data.limit = i;
t.limit = i;
delete this.__number
}
return t
};
h.__cbListLoad = function (t) {
delete this.__nexting;
if (!this.__super(t))this._$resize()
};
h.__cbListChange = function (t) {
if (!t.key || t.key == this.__ropt.key) {
switch (t.action) {
case"refresh":
case"append":
delete this.__nexting
}
this.__super(t)
}
};
h.__doBeforeListLoad = function () {
this.__doShowMessage("onbeforelistload", "列表加载中...");
n._$setStyle(this.__nmore, "display", "none")
};
h.__doBeforeListRender = function (t, e, i) {
var _ = t.length, r = t.loaded ? e + i >= _ : e + i > _;
this.__offset = Math.min(this.__offset, _);
n._$setStyle(this.__nmore, "display", r ? "none" : "");
if (r)this.__endskr = !0;
if (this.__count > 0) {
var o = this.__getPageInfo(e, t.length);
if (this.__doSyncPager(o.index, o.total))return !0;
var s = this.__first - this.__limit, a = this.__count * this.__limit;
this.__endskr = (e + i - s) % a == 0 || r;
n._$setStyle(this.__nmore, "display", this.__endskr ? "none" : "");
this.__doSwitchPagerShow(this.__endskr && o.total > 1 ? "" : "none")
}
};
h.__doShowEmpty = function () {
this.__offset = 0;
this.__endskr = !0;
this.__doShowMessage("onemptylist", "没有列表数据!")
};
h.__doShowListByJST = function (t, e) {
this.__lbox.insertAdjacentHTML(e || "beforeEnd", t)
};
h.__doShowListByItem = function (t) {
this.__items = this.__items || [];
if (_._$isArray(t))c.push.apply(this.__items, t); else this.__items.push(t)
};
h.__cbItemAdd = function (t) {
n._$removeByEC(this.__ntip);
this.__doCheckResult(t, "onafteradd");
var e = t.flag;
if (!t.stopped && e)if (!(this.__count > 0)) {
this.__offset += 1;
e == -1 ? this._$unshift(t.data) : this._$append(t.data)
} else this.__doRefreshByPager()
};
h.__cbItemDelete = function (t) {
this.__doCheckResult(t, "onafterdelete");
if (!t.stopped)if (!(this.__count > 0)) {
var e = t.data[this.__iopt.pkey];
if (this.__items) {
var i = r._$getItemById(this.__getItemId(e)), o = _._$indexOf(this.__items, i);
if (o >= 0) {
this.__items.splice(o, 1);
this.__offset -= 1
}
if (i)i._$recycle()
} else {
var s = this._$getItemBody(e);
if (s)this.__offset -= 1;
n._$remove(s)
}
if (this.__offset <= 0)this._$next()
} else this.__doRefreshByPager()
};
h.__cbAppendList = function (t, e) {
if (t == this.__offset)if (this._$isLoaded()) {
this.__endskr = !1;
this._$resize()
}
};
h.__cbUnshiftList = function (t, e) {
if (0 == t) {
var i = this.__cache._$getListInCache(this.__ropt.key);
for (var n = e - 1; n >= 0; n--)this._$unshift(i[n])
}
};
h._$resize = function () {
var t = this.__sbody;
if (t && !this.__endskr)this.__doCheckScroll(this.__sbody)
};
h._$refresh = function () {
delete this.__endskr;
this.__super()
};
h._$next = function () {
if (!this.__nexting) {
this.__nexting = !0;
var t = this.__offset;
this.__offset += 0 == t ? this.__first : this.__limit;
this.__doChangeOffset(t)
}
};
if (!0)t.copy(t.P("nej.ut"), s);
return s
}, 6, 1, 9, 13, 8, 2, 32);
I$(4, function (t, e, i, n, _, r) {
_.MyWF = t._$klass();
r = _.MyWF._$extend(n._$$ListModuleWF);
r.__doRenderMessage = function (t, n) {
if (i._$isString(t)) {
if (!this.__ntip)this.__ntip = e._$create("section");
e._$addClassName(this.__ntip, "ui-placehold-wrap");
this.__ntip.innerHTML = '<div class="ui-placehold">' + t + "</div>"
} else this.__ntip = t;
this.__lbox.insertAdjacentElement(n || "beforeEnd", this.__ntip)
}
}, 1, 13, 8, 14);
I$(5, function (t, e, i, n) {
var _ = {};
i._$config({"发送ajax请求的名字(填个字符串)": {url: "需要ajax直接返回数组数据"}});
_.Cache = t._$klass();
var r = _.Cache._$extend(i._$$CacheListAbstract);
r.__doLoadList = function (t) {
this.__doSendRequest("发送ajax请求的名字(填个字符串)同上", t)
};
e._$parseTemplate("template-box");
n.MyWF._$allocate({
limit: 10,
parent: "list-box",
item: "item-tpl",
cache: {lkey: "需要修改的缓存字符串形式唯一id", klass: _.Cache},
more: "more-btn"
})
}, 1, 2, 3, 4);
</script>
</body>
</html>
以上是关于html 列表分页前端代码的主要内容,如果未能解决你的问题,请参考以下文章
前端学习(3053):vue+element今日头条管理-展示列表分页