var t = require; var e = module; class l { constructor() { this._objs = []; } static registerClass(t, e) { l._classes[e] = t; } static getObjCnt(t) { return l._content[t] && l._content[t].length; } pushObj(t) { this._objs.push(t); } popObj() { return 0 < this._objs.length ? this._objs.pop() : null; } clear() { for (; 0 < this._objs.length; ) this._objs.pop(); } static pop(t, ...e) { l._content[t] || (l._content[t] = []); var i = l._content[t]; if (i.length) return i.pop(); var s, o = l._classes[t], i = e.length; return ( 0 == i ? (s = new o()) : 1 == i ? (s = new o(e[0])) : 2 == i ? (s = new o(e[0], e[1])) : 3 == i ? (s = new o(e[0], e[1], e[2])) : 4 == i ? (s = new o(e[0], e[1], e[2], e[3])) : 5 == i && (s = new o(e[0], e[1], e[2], e[3], e[4])), (s.ObjectPoolKey = t), s ); } static popWithExtraKey(t, e, ...i) { l._content[t] || (l._content[t] = []); var s, o, a, n = l._content[t]; if (n.length) for (var r = 0; r < n.length; r++) if (n[r].extraKey == e) { (s = n[r]), n.splice(r, 1); break; } return ( s || ((o = l._classes[t]), 0 == (a = i.length) ? (s = new o()) : 1 == a ? (s = new o(i[0])) : 2 == a ? (s = new o(i[0], i[1])) : 3 == a ? (s = new o(i[0], i[1], i[2])) : 4 == a ? (s = new o(i[0], i[1], i[2], i[3])) : 5 == a && (s = new o(i[0], i[1], i[2], i[3], i[4])), (s.extraKey = e), (s.ObjectPoolKey = t)), s ); } static print() {} static push(t) { if (null == t) return !1; var e = t.ObjectPoolKey; return !!l._content[e] && (l._content[e].push(t), !0); } static clear() { l._content = {}; } static clearClass(t, e = null) { for (var i = l._content[t]; i && i.length; ) { var s = i.pop(); e && s[e](), (s = null); } (l._content[t] = null), delete l._content[t]; } static dealFunc(t, e) { var i = l._content[t]; if (null != i) for (var s = 0, o = i.length; s < o; s++) i[s][e](); } } (l._content = {}), (l._classes = {}), (window.ObjectPool = l);