PageSourceSearch

http://www.masalladelacumbre.com/Tpl/Home/default/Public/js/layer.js

js masalladelacumbre.com collected 2026-10-03 01:39:20 UTC 33,081 bytes, 841 lines download raw bytes

1/*! layer-v2.3 弹层组件 License LGPL  http://layer.layui.com/ By 贤心 */
2; ! 
3function(a, b) {
4    "use strict";
5    var c,
6    d,
7    e = {
8        getPath: function() {
9            var a = document.scripts,
10            b = a[a.length - 1],
11            c = b.src;
12            if (!b.getAttribute("merge")) return c.substring(0, c.lastIndexOf("/") + 1)
13        } (),
14        enter: function(a) {
15            13 === a.keyCode && a.preventDefault()
16        },
17        config: {},
18        end: {},
19        btn: ["确定", "取消"],
20        type: ["dialog", "page", "iframe", "loading", "tips"]
21    },
22    f = {
23        v: "2.3",
24        ie6: !!a.ActiveXObject && !a.XMLHttpRequest,
25        index: 0,
26        path: e.getPath,
27        config: function(a, b) {
28            var d = 0;
29            return a = a || {},
30            f.cache = e.config = c.extend(e.config, a),
31            f.path = e.config.path || f.path,
32            "string" == typeof a.extend && (a.extend = [a.extend]),
33            f.use("skin/layer.css", a.extend && a.extend.length > 0 ? 
34            function g() {
35                var c = a.extend;
36                f.use(c[c[d] ? d: d - 1], d < c.length ? 
37                function() {
38                    return++d,
39                    g
40                } () : b)
41            } () : b),
42            this
43        },
44        use: function(a, b, d) {
45            var e = c("head")[0],
46            a = a.replace(/\s/g, ""),
47            g = /\.css$/.test(a),
48            h = document.createElement(g ? "link": "script"),
49            i = "layui_layer_" + a.replace(/\.|\//g, "");
50            return f.path ? (g && (h.rel = "stylesheet"), h[g ? "href": "src"] = /^http:\/\//.test(a) ? a: f.path + a, h.id = i, c("#" + i)[0] || e.appendChild(h), 
51            function j() { (g ? 1989 === parseInt(c("#" + i).css("width")) : f[d || i]) ? 
52                function() {
53                    b && b();
54                    try {
55                        g || e.removeChild(h)
56                    } catch(a) {}
57                } () : setTimeout(j, 100)
58            } (), this) : void 0
59        },
60        ready: function(a, b) {
61            var d = "function" == typeof a;
62            return d && (b = a),
63            f.config(c.extend(e.config, 
64            function() {
65                return d ? {}: {
66                    path: a
67                }
68            } ()), b),
69            this
70        },
71        alert: function(a, b, d) {
72            var e = "function" == typeof b;
73            return e && (d = b),
74            f.open(c.extend({
75                content: a,
76                yes: d
77            },
78            e ? {}: b))
79        },
80        confirm: function(a, b, d, g) {
81            var h = "function" == typeof b;
82            return h && (g = d, d = b),
83            f.open(c.extend({
84                content: a,
85                btn: e.btn,
86                yes: d,
87                btn2: g
88            },
89            h ? {}: b))
90        },
91        msg: function(a, d, g) {
92            var i = "function" == typeof d,
93            j = e.config.skin,
94            k = (j ? j + " " + j + "-msg": "") || "layui-layer-msg",
95            l = h.anim.length - 1;
96            return i && (g = d),
97            f.open(c.extend({
98                content: a,
99                time: 3e3,
100                shade: !1,
101                skin: k,
102                title: !1,
103                closeBtn: !1,
104                btn: !1,
105                end: g
106            },
107            i && !e.config.skin ? {
108                skin: k + " layui-layer-hui",
109                shift: l
110            }: function() {
111                return d = d || {},
112                ( - 1 === d.icon || d.icon === b && !e.config.skin) && (d.skin = k + " " + (d.skin || "layui-layer-hui")),
113                d
114            } ()))
115        },
116        load: function(a, b) {
117            return f.open(c.extend({
118                type: 3,
119                icon: a || 0,
120                shade: .01
121            },
122            b))
123        },
124        tips: function(a, b, d) {
125            return f.open(c.extend({
126                type: 4,
127                content: [a, b],
128                closeBtn: !1,
129                time: 3e3,
130                shade: !1,
131                maxWidth: 210
132            },
133            d))
134        }
135    },
136    g = function(a) {
137        var b = this;
138        b.index = ++f.index,
139        b.config = c.extend({},
140        b.config, e.config, a),
141        b.creat()
142    };
143    g.pt = g.prototype;
144    var h = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"];
145    h.anim = ["layer-anim", "layer-anim-01", "layer-anim-02", "layer-anim-03", "layer-anim-04", "layer-anim-05", "layer-anim-06"],
146    g.pt.config = {
147        type: 0,
148        shade: .3,
149        fix: !0,
150        move: h[1],
151        title: "&#x4FE1;&#x606F;",
152        offset: "auto",
153        area: "auto",
154        closeBtn: 1,
155        time: 0,
156        zIndex: 19891014,
157        maxWidth: 360,
158        shift: 0,
159        icon: -1,
160        scrollbar: !0,
161        tips: 2
162    },
163    g.pt.vessel = function(a, b) {
164        var c = this,
165        d = c.index,
166        f = c.config,
167        g = f.zIndex + d,
168        i = "object" == typeof f.title,
169        j = f.maxmin && (1 === f.type || 2 === f.type),
170        k = f.title ? '<div class="layui-layer-title" style="' + (i ? f.title[1] : "") + '">' + (i ? f.title[0] : f.title) + "</div>": "";
171        return f.zIndex = g,
172        b([f.shade ? '<div class="layui-layer-shade" id="layui-layer-shade' + d + '" times="' + d + '" style="' + ("z-index:" + (g - 1) + "; background-color:" + (f.shade[1] || "#000") + "; opacity:" + (f.shade[0] || f.shade) + "; filter:alpha(opacity=" + (100 * f.shade[0] || 100 * f.shade) + ");") + '"></div>': "", '<div class="' + h[0] + " " + (h.anim[f.shift] || "") + (" layui-layer-" + e.type[f.type]) + (0 != f.type && 2 != f.type || f.shade ? "": " layui-layer-border") + " " + (f.skin || "") + '" id="' + h[0] + d + '" type="' + e.type[f.type] + '" times="' + d + '" showtime="' + f.time + '" conType="' + (a ? "object": "string") + '" style="z-index: ' + g + ";
172 width:" + f.area[0] + ";height:" + f.area[1] + (f.fix ? "": ";position:absolute;") + '">' + (a && 2 != f.type ? "": k) + '<div id="' + (f.id || "") + '" class="layui-layer-content' + (0 == f.type && -1 !== f.icon ? " layui-layer-padding": "") + (3 == f.type ? " layui-layer-loading" + f.icon: "") + '">' + (0 == f.type && -1 !== f.icon ? '<i class="layui-layer-ico layui-layer-ico' + f.icon + '"></i>': "") + (1 == f.type && a ? "": f.content || "") + '</div><span class="layui-layer-setwin">' + 
173        function() {
174            var a = j ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>': "";
175            return f.closeBtn && (a += '<a class="layui-layer-ico ' + h[7] + " " + h[7] + (f.title ? f.closeBtn: 4 == f.type ? "1": "2") + '" href="javascript:;"></a>'),
176            a
177        } () + "</span>" + (f.btn ? 
178        function() {
179            var a = "";
180            "string" == typeof f.btn && (f.btn = [f.btn]);
181            for (var b = 0, c = f.btn.length; c > b; b++) a += '<a class="' + h[6] + b + '">' + f.btn[b] + "</a>";
182            return '<div class="' + h[6] + '">' + a + "</div>"
183        } () : "") + "</div>"], k),
184        c
185    },
186    g.pt.creat = function() {
187        var a = this,
188        b = a.config,
189        g = a.index,
190        i = b.content,
191        j = "object" == typeof i;
192        if (!c("#" + b.id)[0]) {
193            switch ("string" == typeof b.area && (b.area = "auto" === b.area ? ["", ""] : [b.area, ""]), b.type) {
194            case 0:
195                b.btn = "btn" in b ? b.btn: e.btn[0],
196                f.closeAll("dialog");
197                break;
198            case 2:
199                var i = b.content = j ? b.content: [b.content || "http://layer.layui.com", "auto"];
200                b.content = '<iframe scrolling="' + (b.content[1] || "auto") + '" allowtransparency="true" id="' + h[4] + g + '" name="' + h[4] + g + '" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + b.content[0] + '"></iframe>';
201                break;
202            case 3:
203                b.title = !1,
204                b.closeBtn = !1,
205                -1 === b.icon && 0 === b.icon,
206                f.closeAll("loading");
207                break;
208            case 4:
209                j || (b.content = [b.content, "body"]),
210                b.follow = b.content[1],
211                b.content = b.content[0] + '<i class="layui-layer-TipsG"></i>',
212                b.title = !1,
213                b.fix = !1,
214                b.tips = "object" == typeof b.tips ? b.tips: [b.tips, !0],
215                b.tipsMore || f.closeAll("tips")
216            }
217            a.vessel(j, 
218            function(d, e) {
219                c("body").append(d[0]),
220                j ? 
221                function() {
222                    2 == b.type || 4 == b.type ? 
223                    function() {
224                        c("body").append(d[1])
225                    } () : function() {
226                        i.parents("." + h[0])[0] || (i.show().addClass("layui-layer-wrap").wrap(d[1]), c("#" + h[0] + g).find("." + h[5]).before(e))
227                    } ()
228                } () : c("body").append(d[1]),
229                a.layero = c("#" + h[0] + g),
230                b.scrollbar || h.html.css("overflow", "hidden").attr("layer-full", g)
231            }).auto(g),
232            2 == b.type && f.ie6 && a.layero.find("iframe").attr("src", i[0]),
233            c(document).off("keydown", e.enter).on("keydown", e.enter),
234            a.layero.on("keydown", 
235            function(a) {
236                c(document).off("keydown", e.enter)
237            }),
238            4 == b.type ? a.tips() : a.offset(),
239            b.fix && d.on("resize", 
240            function() {
241                a.offset(),
242                (/^\d+%$/.test(b.area[0]) || /^\d+%$/.test(b.area[1])) && a.auto(g),
243                4 == b.type && a.tips()
244            }),
245            b.time <= 0 || setTimeout(function() {
246                f.close(a.index)
247            },
248            b.time),
249            a.move().callback()
250        }
251    },
252    g.pt.auto = function(a) {
253        function b(a) {
254            a = g.find(a),
255            a.height(i[1] - j - k - 2 * (0 | parseFloat(a.css("padding"))))
256        }
257        var e = this,
258        f = e.config,
259        g = c("#" + h[0] + a);
260        "" === f.area[0] && f.maxWidth > 0 && (/MSIE 7/.test(navigator.userAgent) && f.btn && g.width(g.innerWidth()), g.outerWidth() > f.maxWidth && g.width(f.maxWidth));
261        var i = [g.innerWidth(), g.innerHeight()],
262        j = g.find(h[1]).outerHeight() || 0,
263        k = g.find("." + h[6]).outerHeight() || 0;
264        switch (f.type) {
265        case 2:
266            b("iframe");
267            break;
268        default:
269            "" === f.area[1] ? f.fix && i[1] >= d.height() && (i[1] = d.height(), b("." + h[5])) : b("." + h[5])
270        }
271        return e
272    },
273    g.pt.offset = function() {
274        var a = this,
275        b = a.config,
276        c = a.layero,
277        e = [c.outerWidth(), c.outerHeight()],
278        f = "object" == typeof b.offset;
279        a.offsetTop = (d.height() - e[1]) / 2,
280        a.offsetLeft = (d.width() - e[0]) / 2,
281        f ? (a.offsetTop = b.offset[0], a.offsetLeft = b.offset[1] || a.offsetLeft) : "auto" !== b.offset && (a.offsetTop = b.offset, "rb" === b.offset && (a.offsetTop = d.height() - e[1], a.offsetLeft = d.width() - e[0])),
282        b.fix || (a.offsetTop = /%$/.test(a.offsetTop) ? d.height() * parseFloat(a.offsetTop) / 100: parseFloat(a.offsetTop), a.offsetLeft = /%$/.test(a.offsetLeft) ? d.width() * parseFloat(a.offsetLeft) / 100: parseFloat(a.offsetLeft), a.offsetTop += d.scrollTop(), a.offsetLeft += d.scrollLeft()),
283        c.css({
284            top: a.offsetTop,
285            left: a.offsetLeft
286        })
287    },
288    g.pt.tips = function() {
289        var a = this,
290        b = a.config,
291        e = a.layero,
292        f = [e.outerWidth(), e.outerHeight()],
293        g = c(b.follow);
294        g[0] || (g = c("body"));
295        var i = {
296            width: g.outerWidth(),
297            height: g.outerHeight(),
298            top: g.offset().top,
299            left: g.offset().left
300        },
301        j = e.find(".layui-layer-TipsG"),
302        k = b.tips[0];
303        b.tips[1] || j.remove(),
304        i.autoLeft = function() {
305            i.left + f[0] - d.width() > 0 ? (i.tipLeft = i.left + i.width - f[0], j.css({
306                right: 12,
307                left: "auto"
308            })) : i.tipLeft = i.left
309        },
310        i.where = [function() {
311            i.autoLeft(),
312            i.tipTop = i.top - f[1] - 10,
313            j.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color", b.tips[1])
314        },
315        function() {
316            i.tipLeft = i.left + i.width + 10,
317            i.tipTop = i.top,
318            j.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color", b.tips[1])
319        },
320        function() {
321            i.autoLeft(),
322            i.tipTop = i.top + i.height + 10,
323            j.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color", b.tips[1])
324        },
325        function() {
326            i.tipLeft = i.left - f[0] - 10,
327            i.tipTop = i.top,
328            j.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color", b.tips[1])
329        }],
330        i.where[k - 1](),
331        1 === k ? i.top - (d.scrollTop() + f[1] + 16) < 0 && i.where[2]() : 2 === k ? d.width() - (i.left + i.width + f[0] + 16) > 0 || i.where[3]() : 3 === k ? i.top - d.scrollTop() + i.height + f[1] + 16 - d.height() > 0 && i.where[0]() : 4 === k && f[0] + 16 - i.left > 0 && i.where[1](),
332        e.find("." + h[5]).css({
333            "background-color": b.tips[1],
334            "padding-right": b.closeBtn ? "30px": ""
335        }),
336        e.css({
337            left: i.tipLeft,
338            top: i.tipTop
339        })
340    },
341    g.pt.move = function() {
342        var a = this,
343        b = a.config,
344        e = {
345            setY: 0,
346            moveLayer: function() {
347                var a = e.layero,
348                b = parseInt(a.css("margin-left")),
349                c = parseInt(e.move.css("left"));
350                0 === b || (c -= b),
351                "fixed" !== a.css("position") && (c -= a.parent().offset().left, e.setY = 0),
352                a.css({
353                    left: c,
354                    top: parseInt(e.move.css("top")) - e.setY
355                })
356            }
357        },
358        f = a.layero.find(b.move);
359        return b.move && f.attr("move", "ok"),
360        f.css({
361            cursor: b.move ? "move": "auto"
362        }),
363        c(b.move).on("mousedown", 
364        function(a) {
365            if (a.preventDefault(), "ok" === c(this).attr("move")) {
366                e.ismove = !0,
367                e.layero = c(this).parents("." + h[0]);
368                var f = e.layero.offset().left,
369                g = e.layero.offset().top,
370                i = e.layero.outerWidth() - 6,
371                j = e.layero.outerHeight() - 6;
372                c("#layui-layer-moves")[0] || c("body").append('<div id="layui-layer-moves" class="layui-layer-moves" style="left:' + f + "px; top:" + g + "px;
372 width:" + i + "px; height:" + j + 'px; z-index:2147483584"></div>'),
373                e.move = c("#layui-layer-moves"),
374                b.moveType && e.move.css({
375                    visibility: "hidden"
376                }),
377                e.moveX = a.pageX - e.move.position().left,
378                e.moveY = a.pageY - e.move.position().top,
379                "fixed" !== e.layero.css("position") || (e.setY = d.scrollTop())
380            }
381        }),
382        c(document).mousemove(function(a) {
383            if (e.ismove) {
384                var c = a.pageX - e.moveX,
385                f = a.pageY - e.moveY;
386                if (a.preventDefault(), !b.moveOut) {
387                    e.setY = d.scrollTop();
388                    var g = d.width() - e.move.outerWidth(),
389                    h = e.setY;
390                    0 > c && (c = 0),
391                    c > g && (c = g),
392                    h > f && (f = h),
393                    f > d.height() - e.move.outerHeight() + e.setY && (f = d.height() - e.move.outerHeight() + e.setY)
394                }
395                e.move.css({
396                    left: c,
397                    top: f
398                }),
399                b.moveType && e.moveLayer(),
400                c = f = g = h = null
401            }
402        }).mouseup(function() {
403            try {
404                e.ismove && (e.moveLayer(), e.move.remove(), b.moveEnd && b.moveEnd()),
405                e.ismove = !1
406            } catch(a) {
407                e.ismove = !1
408            }
409        }),
410        a
411    },
412    g.pt.callback = function() {
413        function a() {
414            var a = g.cancel && g.cancel(b.index, d);
415            a === !1 || f.close(b.index)
416        }
417        var b = this,
418        d = b.layero,
419        g = b.config;
420        b.openLayer(),
421        g.success && (2 == g.type ? d.find("iframe").on("load", 
422        function() {
423            g.success(d, b.index)
424        }) : g.success(d, b.index)),
425        f.ie6 && b.IE6(d),
426        d.find("." + h[6]).children("a").on("click", 
427        function() {
428            var a = c(this).index();
429            if (0 === a) g.yes ? g.yes(b.index, d) : g.btn1 ? g.btn1(b.index, d) : f.close(b.index);
430            else {
431                var e = g["btn" + (a + 1)] && g["btn" + (a + 1)](b.index, d);
432                e === !1 || f.close(b.index)
433            }
434        }),
435        d.find("." + h[7]).on("click", a),
436        g.shadeClose && c("#layui-layer-shade" + b.index).on("click", 
437        function() {
438            f.close(b.index)
439        }),
440        d.find(".layui-layer-min").on("click", 
441        function() {
442            f.min(b.index, g),
443            g.min && g.min(d)
444        }),
445        d.find(".layui-layer-max").on("click", 
446        function() {
447            c(this).hasClass("layui-layer-maxmin") ? (f.restore(b.index), g.restore && g.restore(d)) : (f.full(b.index, g), g.full && g.full(d))
448        }),
449        g.end && (e.end[b.index] = g.end)
450    },
451    e.reselect = function() {
452        c.each(c("select"), 
453        function(a, b) {
454            var d = c(this);
455            d.parents("." + h[0])[0] || 1 == d.attr("layer") && c("." + h[0]).length < 1 && d.removeAttr("layer").show(),
456            d = null
457        })
458    },
459    g.pt.IE6 = function(a) {
460        function b() {
461            a.css({
462                top: f + (e.config.fix ? d.scrollTop() : 0)
463            })
464        }
465        var e = this,
466        f = a.offset().top;
467        b(),
468        d.scroll(b),
469        c("select").each(function(a, b) {
470            var d = c(this);
471            d.parents("." + h[0])[0] || "none" === d.css("display") || d.attr({
472                layer: "1"
473            }).hide(),
474            d = null
475        })
476    },
477    g.pt.openLayer = function() {
478        var a = this;
479        f.zIndex = a.config.zIndex,
480        f.setTop = function(a) {
481            var b = function() {
482                f.zIndex++,
483                a.css("z-index", f.zIndex + 1)
484            };
485            return f.zIndex = parseInt(a[0].style.zIndex),
486            a.on("mousedown", b),
487            f.zIndex
488        }
489    },
490    e.record = function(a) {
491        var b = [a.outerWidth(), a.outerHeight(), a.position().top, a.position().left + parseFloat(a.css("margin-left"))];
492        a.find(".layui-layer-max").addClass("layui-layer-maxmin"),
493        a.attr({
494            area: b
495        })
496    },
497    e.rescollbar = function(a) {
498        h.html.attr("layer-full") == a && (h.html[0].style.removeProperty ? h.html[0].style.removeProperty("overflow") : h.html[0].style.removeAttribute("overflow"), h.html.removeAttr("layer-full"))
499    },
500    a.layer = f,
501    f.getChildFrame = function(a, b) {
502        return b = b || c("." + h[4]).attr("times"),
503        c("#" + h[0] + b).find("iframe").contents().find(a)
504    },
505    f.getFrameIndex = function(a) {
506        return c("#" + a).parents("." + h[4]).attr("times")
507    },
508    f.iframeAuto = function(a) {
509        if (a) {
510            var b = f.getChildFrame("html", a).outerHeight(),
511            d = c("#" + h[0] + a),
512            e = d.find(h[1]).outerHeight() || 0,
513            g = d.find("." + h[6]).outerHeight() || 0;
514            d.css({
515                height: b + e + g
516            }),
517            d.find("iframe").css({
518                height: b
519            })
520        }
521    },
522    f.iframeSrc = function(a, b) {
523        c("#" + h[0] + a).find("iframe").attr("src", b)
524    },
525    f.style = function(a, b) {
526        var d = c("#" + h[0] + a),
527        f = d.attr("type"),
528        g = d.find(h[1]).outerHeight() || 0,
529        i = d.find("." + h[6]).outerHeight() || 0; (f === e.type[1] || f === e.type[2]) && (d.css(b), f === e.type[2] && d.find("iframe").css({
530            height: parseFloat(b.height) - g - i
531        }))
532    },
533    f.min = function(a, b) {
534        var d = c("#" + h[0] + a),
535        g = d.find(h[1]).outerHeight() || 0;
536        e.record(d),
537        f.style(a, {
538            width: 180,
539            height: g,
540            overflow: "hidden"
541        }),
542        d.find(".layui-layer-min").hide(),
543        "page" === d.attr("type") && d.find(h[4]).hide(),
544        e.rescollbar(a)
545    },
546    f.restore = function(a) {
547        var b = c("#" + h[0] + a),
548        d = b.attr("area").split(",");
549        b.attr("type");
550        f.style(a, {
551            width: parseFloat(d[0]),
552            height: parseFloat(d[1]),
553            top: parseFloat(d[2]),
554            left: parseFloat(d[3]),
555            overflow: "visible"
556        }),
557        b.find(".layui-layer-max").removeClass("layui-layer-maxmin"),
558        b.find(".layui-layer-min").show(),
559        "page" === b.attr("type") && b.find(h[4]).show(),
560        e.rescollbar(a)
561    },
562    f.full = function(a) {
563        var b,
564        g = c("#" + h[0] + a);
565        e.record(g),
566        h.html.attr("layer-full") || h.html.css("overflow", "hidden").attr("layer-full", a),
567        clearTimeout(b),
568        b = setTimeout(function() {
569            var b = "fixed" === g.css("position");
570            f.style(a, {
571                top: b ? 0: d.scrollTop(),
572                left: b ? 0: d.scrollLeft(),
573                width: d.width(),
574                height: d.height()
575            }),
576            g.find(".layui-layer-min").hide()
577        },
578        100)
579    },
580    f.title = function(a, b) {
581        var d = c("#" + h[0] + (b || f.index)).find(h[1]);
582        d.html(a)
583    },
584    f.close = function(a) {
585        var b = c("#" + h[0] + a),
586        d = b.attr("type");
587        if (b[0]) {
588            if (d === e.type[1] && "object" === b.attr("conType")) {
589                b.children(":not(." + h[5] + ")").remove();
590                for (var g = 0; 2 > g; g++) b.find(".layui-layer-wrap").unwrap().hide()
591            } else {
592                if (d === e.type[2]) try {
593                    var i = c("#" + h[4] + a)[0];
594                    i.contentWindow.document.write(""),
595                    i.contentWindow.close(),
596                    b.find("." + h[5])[0].removeChild(i)
597                } catch(j) {}
598                b[0].innerHTML = "",
599                b.remove()
600            }
601            c("#layui-layer-moves, #layui-layer-shade" + a).remove(),
602            f.ie6 && e.reselect(),
603            e.rescollbar(a),
604            c(document).off("keydown", e.enter),
605            "function" == typeof e.end[a] && e.end[a](),
606            delete e.end[a]
607        }
608    },
609    f.closeAll = function(a) {
610        c.each(c("." + h[0]), 
611        function() {
612            var b = c(this),
613            d = a ? b.attr("type") === a: 1;
614            d && f.close(b.attr("times")),
615            d = null
616        })
617    };
618    var i = f.cache || {},
619    j = function(a) {
620        return i.skin ? " " + i.skin + " " + i.skin + "-" + a: ""
621    };
622    f.prompt = function(a, b) {
623        a = a || {},
624        "function" == typeof a && (b = a);
625        var d,
626        e = 2 == a.formType ? '<textarea class="layui-layer-input">' + (a.value || "") + "</textarea>": function() {
627            return '<input type="' + (1 == a.formType ? "password": "text") + '" class="layui-layer-input" value="' + (a.value || "") + '">'
628        } ();
629        return f.open(c.extend({
630            btn: ["&#x786E;&#x5B9A;", "&#x53D6;&#x6D88;"],
631            content: e,
632            skin: "layui-layer-prompt" + j("prompt"),
633            success: function(a) {
634                d = a.find(".layui-layer-input"),
635                d.focus()
636            },
637            yes: function(c) {
638                var e = d.val();
639                "" === e ? d.focus() : e.length > (a.maxlength || 500) ? f.tips("&#x6700;&#x591A;&#x8F93;&#x5165;" + (a.maxlength || 500) + "&#x4E2A;&#x5B57;&#x6570;", d, {
640                    tips: 1
641                }) : b && b(e, c, d)
642            }
643        },
644        a))
645    },
646    f.tab = function(a) {
647        a = a || {};
648        var b = a.tab || {};
649        return f.open(c.extend({
650            type: 1,
651            skin: "layui-layer-tab" + j("tab"),
652            title: function() {
653                var a = b.length,
654                c = 1,
655                d = "";
656                if (a > 0) for (d = '<span class="layui-layer-tabnow">' + b[0].title + "</span>"; a > c; c++) d += "<span>" + b[c].title + "</span>";
657                return d
658            } (),
659            content: '<ul class="layui-layer-tabmain">' + 
660            function() {
661                var a = b.length,
662                c = 1,
663                d = "";
664                if (a > 0) for (d = '<li class="layui-layer-tabli xubox_tab_layer">' + (b[0].content || "no content") + "</li>"; a > c; c++) d += '<li class="layui-layer-tabli">' + (b[c].content || "no  content") + "</li>";
665                return d
666            } () + "</ul>",
667            success: function(b) {
vendor: 7,011 bytes, lines 668-841
668                var d = b.find(".layui-layer-title").children(),
669                e = b.find(".layui-layer-tabmain").children();
670                d.on("mousedown", 
671                function(b) {
672                    b.stopPropagation ? b.stopPropagation() : b.cancelBubble = !0;
673                    var d = c(this),
674                    f = d.index();
675                    d.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),
676                    e.eq(f).show().siblings().hide(),
677                    "function" == typeof a.change && a.change(f)
678                })
679            }
680        },
681        a))
682    },
683    f.photos = function(b, d, e) {
684        function g(a, b, c) {
685            var d = new Image;
686            return d.src = a,
687            d.complete ? b(d) : (d.onload = function() {
688                d.onload = null,
689                b(d)
690            },
691            void(d.onerror = function(a) {
692                d.onerror = null,
693                c(a)
694            }))
695        }
696        var h = {};
697        if (b = b || {},
698        b.photos) {
699            var i = b.photos.constructor === Object,
700            k = i ? b.photos: {},
701            l = k.data || [],
702            m = k.start || 0;
703            if (h.imgIndex = (0 | m) + 1, b.img = b.img || "img", i) {
704                if (0 === l.length) return f.msg("&#x6CA1;&#x6709;&#x56FE;&#x7247;")
705            } else {
706                var n = c(b.photos),
707                o = function() {
708                    l = [],
709                    n.find(b.img).each(function(a) {
710                        var b = c(this);
711                        b.attr("layer-index", a),
712                        l.push({
713                            alt: b.attr("alt"),
714                            pid: b.attr("layer-pid"),
715                            src: b.attr("layer-src") || b.attr("src"),
716                            thumb: b.attr("src")
717                        })
718                    })
719                };
720                if (o(), 0 === l.length) return;
721                if (d || n.on("click", b.img, 
722                function() {
723                    var a = c(this),
724                    d = a.attr("layer-index");
725                    f.photos(c.extend(b, {
726                        photos: {
727                            start: d,
728                            data: l,
729                            tab: b.tab
730                        },
731                        full: b.full
732                    }), !0),
733                    o()
734                }), !d) return
735            }
736            h.imgprev = function(a) {
737                h.imgIndex--,
738                h.imgIndex < 1 && (h.imgIndex = l.length),
739                h.tabimg(a)
740            },
741            h.imgnext = function(a, b) {
742                h.imgIndex++,
743                h.imgIndex > l.length && (h.imgIndex = 1, b) || h.tabimg(a)
744            },
745            h.keyup = function(a) {
746                if (!h.end) {
747                    var b = a.keyCode;
748                    a.preventDefault(),
749                    37 === b ? h.imgprev(!0) : 39 === b ? h.imgnext(!0) : 27 === b && f.close(h.index)
750                }
751            },
752            h.tabimg = function(a) {
753                l.length <= 1 || (k.start = h.imgIndex - 1, f.close(h.index), f.photos(b, !0, a))
754            },
755            h.event = function() {
756                h.bigimg.hover(function() {
757                    h.imgsee.show()
758                },
759                function() {
760                    h.imgsee.hide()
761                }),
762                h.bigimg.find(".layui-layer-imgprev").on("click", 
763                function(a) {
764                    a.preventDefault(),
765                    h.imgprev()
766                }),
767                h.bigimg.find(".layui-layer-imgnext").on("click", 
768                function(a) {
769                    a.preventDefault(),
770                    h.imgnext()
771                }),
772                c(document).on("keyup", h.keyup)
773            },
774            h.loadi = f.load(1, {
775                shade: "shade" in b ? !1: .9,
776                scrollbar: !1
777            }),
778            g(l[m].src, 
779            function(d) {
780                f.close(h.loadi),
781                h.index = f.open(c.extend({
782                    type: 1,
783                    area: function() {
784                        var e = [d.width, d.height],
785                        f = [c(a).width() - 50, c(a).height() - 50];
786                        return ! b.full && e[0] > f[0] && (e[0] = f[0], e[1] = e[0] * d.height / d.width),
787                        [e[0] + "px", e[1] + "px"]
788                    } (),
789                    title: !1,
790                    shade: .9,
791                    shadeClose: !0,
792                    closeBtn: !1,
793                    move: ".layui-layer-phimg img",
794                    moveType: 1,
795                    scrollbar: !1,
796                    moveOut: !0,
797                    shift: 5 * Math.random() | 0,
798                    skin: "layui-layer-photos" + j("photos"),
799                    content: '<div class="layui-layer-phimg"><img src="' + l[m].src + '" alt="' + (l[m].alt || "") + '" layer-pid="' + l[m].pid + '"><div class="layui-layer-imgsee">' + (l.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>': "") + '<div class="layui-layer-imgbar" style="display:' + (e ? "block": "") + '"><span class="layui-layer-imgtit"><a href="javascript:;">' + (l[m].alt || "") + "</a><em>" + h.imgIndex + "/" + l.length + "</em></span></div></div></div>",
800                    success: function(a, c) {
801                        h.bigimg = a.find(".layui-layer-phimg"),
802                        h.imgsee = a.find(".layui-layer-imguide,.layui-layer-imgbar"),
803                        h.event(a),
804                        b.tab && b.tab(l[m], a)
805                    },
806                    end: function() {
807                        h.end = !0,
808                        c(document).off("keyup", h.keyup)
809                    }
810                },
811                b))
812            },
813            function() {
814                f.close(h.loadi),
815                f.msg("&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;", {
816                    time: 3e4,
817                    btn: ["&#x4E0B;&#x4E00;&#x5F20;", "&#x4E0D;&#x770B;&#x4E86;"],
818                    yes: function() {
819                        l.length > 1 && h.imgnext(!0, !0)
820                    }
821                })
822            })
823        }
824    },
825    e.run = function() {
826        c = jQuery,
827        d = c(a),
828        h.html = c("html"),
829        f.open = function(a) {
830            var b = new g(a);
831            return b.index
832        }
833    },
834    "function" == typeof define ? define(function() {
835        return e.run(),
836        f
837    }) : function() {
838        e.run(),
839        f.use("skin/layer.css")
840    } ()
841} (window);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.