<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<html>
<body>
<script type="text/javascript" src="https://iknowpc.bdimg.com/static/common/lib/mod.75d1f98.js">
</script>
<script type="text/javascript" src="https://iknowpc.bdimg.com/static/common/pkg/lib.33719ed.js">
</script>
<script type="text/javascript" src="https://iknowpc.bdimg.com/static/common/pkg/commonjs.d6b3b29.js">
</script>
<script type="text/javascript" src="https://iknowpc.bdimg.com/static/common/pkg/ueditor.62029f8.js">
</script>
<script type="text/javascript" src="https://iknowpc.bdimg.com/static/common/pkg/more.b91a4bb.js">
</script>





<script type="text/javascript">
	

/*!common:widget/js/util/event/event.js*/
define("common:widget/js/util/event/event",
function(n, e, r) {
    function t(n) {
        var e = i(n);
        return i.extend(n, {
            on: function(r, t) {
                return e.on(o(r), t),
                n
            },
            once: function(r, t) {
                return e.one(o(r), t),
                n
            },
            fire: function(r) {
                var t = Array.prototype.slice.call(arguments, 1);
                return t.unshift(o(r)),
                e.trigger.apply(e, t),
                n
            },
            off: function(r, t) {
                return e.unbind(o(r), t),
                n
            }
        }),
        n.un = n.off,
        n.trigger = n.fire,
        n
    }
    function o(n) {
        return "on" + n.replace(/^on/i, "").toLowerCase()
    }
    var i = n("common:widget/lib/jquery/jquery");
    r.exports = t({}),
    r.exports.create = t,
    window.F && (window.F.ec = r.exports)
});;
/*!common:widget/js/ui/base/base.js*/
define("common:widget/js/ui/base/base",
function(n, t, i) {
    function e(n) {
        var t = o.isFunction(n) ? n: function() {
            this.type = "base"
        },
        i = function(n) {
            u.create(this),
            this.guid = ++o.guid,
            t.apply(this, arguments),
            "object" == typeof n && this._init(n),
            this.init(n)
        };
        return i.extend = function(n) {
            return o.extend(i.prototype, n),
            i
        },
        i.extend({
            _init: function(n) {
                var t = this;
                o.each(n,
                function(n, i) {
                    o.isFunction(i) ? t.on(n, i) : t[n] = i
                })
            },
            init: function() {},
            render: function() {},
            dispose: function() {},
            getElements: function() {}
        })
    }
    var o = n("common:widget/lib/jquery/jquery"),
    u = n("common:widget/js/util/event/event");
    i.exports = e
});;
/*!common:widget/js/util/tangram/browser.js*/
define("common:widget/js/util/tangram/browser",
function(e, t) {
    var i = /chrome\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp.$1: void 0;
    t.chrome = i;
    var r = /firefox\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp.$1: void 0;
    t.firefox = r;
    var a = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? document.documentMode || +RegExp.$1: void 0;
    t.ie = a;
    var o = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent);
    t.isGecko = o;
    var n = "CSS1Compat" == document.compatMode;
    t.isStrict = n;
    var d = /webkit/i.test(navigator.userAgent);
    t.isWebkit = d;
    try {
        if (/(\d+\.\d+)/.test(external.max_version)) {
            var s = +RegExp.$1;
            t.maxthon = s
        }
    } catch(g) {}
    var v = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? +(RegExp.$6 || RegExp.$2) : void 0;
    t.opera = v,
    function() {
        var e = navigator.userAgent,
        i = /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(e) && !/chrome/i.test(e) ? +(RegExp.$1 || RegExp.$2) : void 0;
        t.safari = i
    } ()
});;
/*!common:widget/js/ui/dialog/dialog.js*/
define("common:widget/js/ui/dialog/dialog",
function(t, n, i) {
    var e = t("common:widget/lib/jquery/jquery"),
    o = t("common:widget/js/util/event/event"),
    s = t("common:widget/js/ui/base/base"),
    a = t("common:widget/js/util/tangram/browser");
    t("common:widget/lib/jquery.ui/jquery.ui.dialog");
    var c = {},
    l = s().extend({
        init: function(t) {
            var n = this;
            t = e.extend({
                modal: !0,
                closeText: "\u5173\u95ed",
                resizable: !1,
                draggable: !0,
                dialogClass: t.className,
                btnAlign: "center"
            },
            t || {}),
            a.ie && a.ie < 7 && (t.open = function() {
                e(".ui-widget-overlay").height(e(document).height())
            }),
            n.instance = t.target ? e(t.target).dialog(t) : e("<div>", {
                id: "ik-dlg-" + n.guid
            }).html(t.content).dialog(t),
            e.isArray(t.buttons) && n.customBttons(t.buttons),
            n.instance.next().css("text-align", t.btnAlign),
            t.autoDispose && n.instance.on("dialogclose",
            function() {
                e(this).dialog("destroy").remove(),
                delete c[n.guid],
                n.isDestroy = !0
            }),
            c[n.guid] = n.instance,
            e(window).on("resize",
            function() {
                n && n.center()
            })
        },
        customBttons: function(t) {
            var n = this,
            i = this.instance.next().children("div"),
            o = i.find("button");
            e(t).each(function(t) {
                var o = this; ! this.className && 2 > t && (this.className = ["btn-32-green dialog-btn dialog-btn-1", "btn-32-white dialog-btn dialog-btn-2"][t]),
                e('<a href="#" />').text(this.text || "").appendTo(i).addClass(this.className || "").click(function(t) {
                    t.preventDefault(),
                    o.click.apply(n.instance, arguments)
                })
            }),
            o.remove()
        },
        open: function() { ! this.isDestroy && this.instance.dialog("open")
        },
        close: function() { ! this.isDestroy && this.instance.dialog("close")
        },
        center: function() { ! this.isDestroy && this.instance.dialog("option", "position", {
                my: "center",
                at: "center",
                of: window
            })
        },
        getDialogContainer: function() {
            return this.isDestroy ? null: this.instance.dialog("widget")
        },
        setSize: function(t) { ! this.isDestroy && this.instance.dialog("option", t)
        },
        setTitle: function(t) { ! this.isDestroy && t && this.instance.dialog("option", "title", t)
        }
    });
    o.on("dialog.close",
    function() {
        l.close()
    }),
    i.exports = e.extend(l, {
        alert: function(t, n) {
            return n = e.extend({
                title: "\u77e5\u9053\u63d0\u793a",
                content: t,
                buttons: [{
                    text: "\u786e\u5b9a",
                    click: function() {
                        e.isFunction(n.onaccept) && n.onaccept.apply(this, arguments),
                        e(this).dialog("close")
                    }
                }]
            },
            n || {}),
            new l(n)
        },
        confirm: function(t, n) {
            var i = [{
                text: "\u786e\u5b9a",
                click: function() {
                    e.isFunction(n.onaccept) && n.onaccept.apply(this, arguments)
                }
            },
            {
                text: "\u53d6\u6d88",
                click: function() {
                    e.isFunction(n.oncancel) && n.oncancel.apply(this, arguments),
                    e(this).dialog("close")
                }
            }];
            return n.rightIsRight && (i = i.reverse()),
            n.buttons = n.buttons || i,
            l.alert(t, n)
        },
        iframe: function(t) {
            var n = '<iframe frameborder="no" class="ui-dialog-content-iframe" src="' + t.content + '"></iframe>';
            return t.content = n,
            t.buttons || (t.buttons = []),
            t.dialogClass = "dialog-iframe",
            l.alert(n, t)
        },
        close: function() {
            e.each(c,
            function(t, n) {
                try {
                    n && n.dialog("close")
                } catch(i) {}
            })
        }
    })
});;
/*!common:widget/js/util/tangram/platform.js*/
define("common:widget/js/util/tangram/platform",
function(t, i) {
    var a = /android/i.test(navigator.userAgent);
    i.isAndroid = a;
    var n = /ipad/i.test(navigator.userAgent);
    i.isIpad = n;
    var e = /iphone/i.test(navigator.userAgent);
    i.isIphone = e;
    var s = /macintosh/i.test(navigator.userAgent);
    i.isMacintosh = s;
    var r = /windows/i.test(navigator.userAgent);
    i.isWindows = r;
    var o = /x11/i.test(navigator.userAgent);
    i.isX11 = o
});;
/*!common:widget/js/util/tangram/cookie.js*/
define("common:widget/js/util/tangram/cookie",
function(e, n) {
    var t = function(e) {
        return new RegExp('^[^\\x00-\\x20\\x7f\\(\\)<>@,;:\\\\\\"\\[\\]\\?=\\{\\}\\/\\u0080-\\uffff]+$').test(e)
    },
    o = function(e) {
        if (t(e)) {
            var n = new RegExp("(^| )" + e + "=([^;]*)(;|$)"),
            o = n.exec(document.cookie);
            if (o) return o[2] || null
        }
        return null
    };
    n.getRaw = o;
    var i = function(e) {
        var n = o(e);
        return "string" == typeof n ? n = decodeURIComponent(n) : null
    };
    n.get = i;
    var r = function(e, n, o) {
        if (t(e)) {
            o = o || {};
            var i = o.expires;
            "number" == typeof o.expires && (i = new Date, i.setTime(i.getTime() + o.expires)),
            document.cookie = e + "=" + n + (o.path ? "; path=" + o.path: "") + (i ? "; expires=" + i.toGMTString() : "") + (o.domain ? "; domain=" + o.domain: "") + (o.secure ? "; secure": "")
        }
    };
    n.setRaw = r;
    var u = function(e, n) {
        n = n || {},
        n.expires = new Date(0),
        r(e, "", n)
    };
    n.remove = u;
    var a = function(e, n, t) {
        r(e, encodeURIComponent(n), t)
    };
    n.set = a
});;
/*!common:widget/js/util/tangram/json.js*/
define("common:widget/js/util/tangram/json",
function(require, exports, module) {
    "object" != typeof JSON && (JSON = {}),
    function() {
        "use strict";
        function f(t) {
            return 10 > t ? "0" + t: t
        }
        function quote(t) {
            return escapable.lastIndex = 0,
            escapable.test(t) ? '"' + t.replace(escapable,
            function(t) {
                var e = meta[t];
                return "string" == typeof e ? e: "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice( - 4)
            }) + '"': '"' + t + '"'
        }
        function str(t, e) {
            var n, r, o, f, u, i = gap,
            p = e[t];
            switch (p && "object" == typeof p && "function" == typeof p.toJSON && (p = p.toJSON(t)), "function" == typeof rep && (p = rep.call(e, t, p)), typeof p) {
            case "string":
                return quote(p);
            case "number":
                return isFinite(p) ? String(p) : "null";
            case "boolean":
            case "null":
                return String(p);
            case "object":
                if (!p) return "null";
                if (gap += indent, u = [], "[object Array]" === Object.prototype.toString.apply(p)) {
                    for (f = p.length, n = 0; f > n; n += 1) u[n] = str(n, p) || "null";
                    return o = 0 === u.length ? "[]": gap ? "[\n" + gap + u.join(",\n" + gap) + "\n" + i + "]": "[" + u.join(",") + "]",
                    gap = i,
                    o
                }
                if (rep && "object" == typeof rep) for (f = rep.length, n = 0; f > n; n += 1)"string" == typeof rep[n] && (r = rep[n], o = str(r, p), o && u.push(quote(r) + (gap ? ": ": ":") + o));
                else for (r in p) Object.prototype.hasOwnProperty.call(p, r) && (o = str(r, p), o && u.push(quote(r) + (gap ? ": ": ":") + o));
                return o = 0 === u.length ? "{}": gap ? "{\n" + gap + u.join(",\n" + gap) + "\n" + i + "}": "{" + u.join(",") + "}",
                gap = i,
                o
            }
        }
        "function" != typeof Date.prototype.toJSON && (Date.prototype.toJSON = function() {
            return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z": null
        },
        String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
            return this.valueOf()
        });
        var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
        gap, indent, meta = {
            "\b": "\\b",
            "	": "\\t",
            "\n": "\\n",
            "\f": "\\f",
            "\r": "\\r",
            '"': '\\"',
            "\\": "\\\\"
        },
        rep;
        "function" != typeof JSON.stringify && (JSON.stringify = function(t, e, n) {
            var r;
            if (gap = "", indent = "", "number" == typeof n) for (r = 0; n > r; r += 1) indent += " ";
            else "string" == typeof n && (indent = n);
            if (rep = e, e && "function" != typeof e && ("object" != typeof e || "number" != typeof e.length)) throw new Error("JSON.stringify");
            return str("", {
                "": t
            })
        }),
        "function" != typeof JSON.parse && (JSON.parse = function(text, reviver) {
            function walk(t, e) {
                var n, r, o = t[e];
                if (o && "object" == typeof o) for (n in o) Object.prototype.hasOwnProperty.call(o, n) && (r = walk(o, n), void 0 !== r ? o[n] = r: delete o[n]);
                return reviver.call(t, e, o)
            }
            var j;
            if (text = String(text), cx.lastIndex = 0, cx.test(text) && (text = text.replace(cx,
            function(t) {
                return "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice( - 4)
            })), /^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) return j = eval("(" + text + ")"),
            "function" == typeof reviver ? walk({
                "": j
            },
            "") : j;
            throw new SyntaxError("JSON.parse")
        })
    } (),
    exports.parse = exports.decode = function(t) {
        return new Function("return (" + t + ")")()
    },
    exports.encode = exports.stringify = JSON.stringify
});;
/*!common:widget/js/util/tangram/chain.js*/
define("common:widget/js/util/tangram/chain",
function(n, t, r) {
    var e = n("common:widget/lib/jquery/jquery");
    r.exports = function(n) {
        var t = function(r) {
            var u = e.type(r),
            a = "object" == u || "array" == u ? r: n && new n(r) || {};
            return a.context = r,
            e.each(t,
            function(n, t) {
                e.isFunction(t) && (a[n] = function() {
                    var n = e.makeArray(arguments);
                    return n.unshift(a.context),
                    t.apply(null, n)
                })
            }),
            a
        };
        return t
    }
});;
/*!common:widget/js/util/tangram/number.js*/
define("common:widget/js/util/tangram/number",
function(n, t, r) {
    var a = n("common:widget/js/util/tangram/chain"),
    e = r.exports = a(Number);
    e.comma = function(n, t) {
        return (!t || 1 > t) && (t = 3),
        n = String(n).split("."),
        n[0] = n[0].replace(new RegExp("(\\d)(?=(\\d{" + t + "})+$)", "ig"), "$1,"),
        n.join(".")
    },
    e.pad = function(n, t) {
        var r = "",
        a = 0 > n,
        e = String(Math.abs(n));
        return e.length < t && (r = new Array(t - e.length + 1).join("0")),
        (a ? "-": "") + r + e
    },
    e.randomInt = function(n, t) {
        return Math.floor(Math.random() * (t - n + 1) + n)
    }
});;
/*!common:widget/js/util/tangram/string.js*/
define("common:widget/js/util/tangram/string",
function(r, e, t) {
    var n = (r("common:widget/lib/jquery/jquery"), r("common:widget/js/util/tangram/chain")),
    a = t.exports = n(String),
    c = function(r) {
        var e = String(r).replace(/&quot;/g, '"').replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
        return e.replace(/&#([\d]+);/g,
        function(r, e) {
            return String.fromCharCode(parseInt(e, 10))
        })
    };
    a.decodeHTML = c;
    var o = function(r) {
        return String(r).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
    };
    a.encodeHTML = o;
    var i = function(r) {
        return String(r).replace(new RegExp("([.*+?^=!:${}()|[\\]/\\\\])", "g"), "\\$1")
    };
    a.escapeReg = i;
    var f = function(r, e) {
        var t = Array.prototype.slice.call(arguments, 1),
        n = Object.prototype.toString;
        return t.length ? (t = 1 == t.length && null !== e && /\[object Array\]|\[object Object\]/.test(n.call(e)) ? e: t, r.replace(/#\{(.+?)\}/g,
        function(r, e) {
            var a, c, o, i, f;
            if (!t) return "";
            for (a = e.split("|"), c = t[a[0]], "[object Function]" == n.call(c) && (c = c(a[0])), o = 1, i = a.length; i > o; ++o) f = baidu.string.filterFormat[a[o]],
            "[object Function]" == n.call(f) && (c = f(c));
            return "undefined" == typeof c || null === c ? "": c
        })) : r
    };
    a.filterFormat = f,
    f.escapeJs = function(r) {
        if (!r || "string" != typeof r) return r;
        var e, t, n, a = [];
        for (e = 0, t = r.length; t > e; ++e) n = r.charCodeAt(e),
        a.push(n > 255 ? r.charAt(e) : "\\x" + n.toString(16));
        return a.join("")
    },
    f.js = f.escapeJs,
    f.escapeString = function(r) {
        return r && "string" == typeof r ? r.replace(/["'<>\\\/`]/g,
        function(r) {
            return "&#" + r.charCodeAt(0) + ";"
        }) : r
    },
    f.e = f.escapeString,
    f.toInt = function(r) {
        return parseInt(r, 10) || 0
    },
    f.i = f.toInt;
    var u = function(r, e) {
        r = String(r);
        var t = Array.prototype.slice.call(arguments, 1),
        n = Object.prototype.toString;
        return t.length ? (t = 1 == t.length && null !== e && /\[object Array\]|\[object Object\]/.test(n.call(e)) ? e: t, r.replace(/#\{(.+?)\}/g,
        function(r, e) {
            var a = t[e];
            return "[object Function]" == n.call(a) && (a = a(e)),
            "undefined" == typeof a ? "": a
        })) : r
    };
    a.format = u,
    function() {
        var r = /^\#[\da-f]{6}$/i,
        t = /^rgb\((\d+), (\d+), (\d+)\)$/,
        n = {
            black: "#000000",
            silver: "#c0c0c0",
            gray: "#808080",
            white: "#ffffff",
            maroon: "#800000",
            red: "#ff0000",
            purple: "#800080",
            fuchsia: "#ff00ff",
            green: "#008000",
            lime: "#00ff00",
            olive: "#808000",
            yellow: "#ffff0",
            navy: "#000080",
            blue: "#0000ff",
            teal: "#008080",
            aqua: "#00ffff"
        },
        a = function(e) {
            if (r.test(e)) return e;
            if (t.test(e)) {
                for (var a, c = 1,
                e = "#"; 4 > c; c++) a = parseInt(RegExp["$" + c]).toString(16),
                e += ("00" + a).substr(a.length);
                return e
            }
            if (/^\#[\da-f]{3}$/.test(e)) {
                var o = e.charAt(1),
                i = e.charAt(2),
                f = e.charAt(3);
                return "#" + o + o + i + i + f + f
            }
            return n[e] ? n[e] : ""
        };
        e.formatColor = a
    } ();
    var l = function(r) {
        return String(r).replace(/[^\x00-\xff]/g, "ci").length
    };
    a.getByteLength = l;
    var g = function(r) {
        return String(r || "").replace(/<[^>]+>/g, "")
    };
    a.stripTags = g;
    var p = function(r, e, t) {
        return r = String(r),
        t = t || "",
        0 > e || l(r) <= e ? r + t: (r = r.substr(0, e).replace(/([^\x00-\xff])/g, "$1 ").substr(0, e).replace(/[^\x00-\xff]$/, "").replace(/([^\x00-\xff]) /g, "$1"), r + t)
    };
    a.subByte = p;
    var s = function(r) {
        return r.indexOf("-") < 0 && r.indexOf("_") < 0 ? r: r.replace(/[-_][^-_]/g,
        function(r) {
            return r.charAt(1).toUpperCase()
        })
    };
    a.toCamelCase = s;
    var d = function(r) {
        return String(r).replace(/[\uFF01-\uFF5E]/g,
        function(r) {
            return String.fromCharCode(r.charCodeAt(0) - 65248)
        }).replace(/\u3000/g, " ")
    };
    a.toHalfWidth = d;
    var h = new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"),
    v = function(r) {
        return String(r).replace(h, "")
    };
    a.trim = v;
    var b = function(r) {
        return String(r).replace(/(?:<[^>]+>)|(?:&#?[0-9a-z]{2,6};)|(.{1})/gi, "$&<wbr>").replace(/><wbr>/g, ">")
    };
    a.wbr = b
});;
/*!common:widget/js/util/tangram/date.js*/
define("common:widget/js/util/tangram/date",
function(t, e) {
    var n = t("common:widget/js/util/tangram/number"),
    g = function(t, e) {
        function g(t, n) {
            e = e.replace(t, n)
        }
        var r = n.pad;
        if ("string" != typeof e) return t.toString();
        var a = t.getFullYear(),
        i = t.getMonth() + 1,
        s = t.getDate(),
        o = t.getHours(),
        u = t.getMinutes(),
        d = t.getSeconds();
        return g(/yyyy/g, r(a, 4)),
        g(/yy/g, r(parseInt(a.toString().slice(2), 10), 2)),
        g(/MM/g, r(i, 2)),
        g(/M/g, i),
        g(/dd/g, r(s, 2)),
        g(/d/g, s),
        g(/HH/g, r(o, 2)),
        g(/H/g, o),
        g(/hh/g, r(o % 12, 2)),
        g(/h/g, o % 12),
        g(/mm/g, r(u, 2)),
        g(/m/g, u),
        g(/ss/g, r(d, 2)),
        g(/s/g, d),
        e
    };
    e.format = g;
    var r = function(t) {
        var e = new RegExp("^\\d+(\\-|\\/)\\d+(\\-|\\/)\\d+$");
        if ("string" == typeof t) {
            if (e.test(t) || isNaN(Date.parse(t))) {
                var n = t.split(/ |T/),
                g = n.length > 1 ? n[1].split(/[^\d]/) : [0, 0, 0],
                r = n[0].split(/[^\d]/);
                return new Date(r[0] - 0, r[1] - 1, r[2] - 0, g[0] - 0, g[1] - 0, g[2] - 0)
            }
            return new Date(t)
        }
        return new Date
    };
    e.parse = r
});;
/*!common:widget/js/util/tangram/object.js*/
define("common:widget/js/util/tangram/object",
function(e, r) {
    function t(e, r, t, o, a) {
        r.hasOwnProperty(t) && (a && n.isPlainObject(e[t]) ? i(e[t], r[t], {
            overwrite: o,
            recursive: a
        }) : !o && t in e || (e[t] = r[t]))
    }
    var n = e("common:widget/lib/jquery/jquery");
    r.isPlain = n.isPlainObject,
    r.isArray = n.isArray,
    r.clone = function(e) {
        return n.extend(!0, {},
        e)
    },
    r.each = function(e, r, t) {
        if (e) {
            var o = function(e, n) {
                return r.apply(t || n, [n, e])
            };
            return n.each(e, o, t)
        }
    },
    r.extend = n.extend,
    r.isEmpty = n.isEmptyObject,
    Object.keys || !
    function() {
        var e = Object.prototype.hasOwnProperty,
        r = !{
            toString: null
        }.propertyIsEnumerable("toString"),
        t = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"],
        n = t.length;
        return function(o) {
            if ("object" != typeof o && "function" != typeof o || null === o) throw new TypeError("Object.keys called on a non-object");
            var i = [];
            for (var a in o) e.call(o, a) && i.push(a);
            if (r) for (var c = 0; n > c; c++) e.call(o, t[c]) && i.push(t[c]);
            return i
        }
    } (),
    r.keys = Object.keys;
    var o = function(e) {
        var r, t = [],
        n = 0;
        for (r in e) e.hasOwnProperty(r) && (t[n++] = e[r]);
        return t
    };
    r.values = o,
    r.map = n.map;
    var i = function(e, r, n) {
        var o, i = 0,
        a = n || {},
        c = a.overwrite,
        u = a.whiteList,
        s = a.recursive;
        if (u && u.length) for (o = u.length; o > i; ++i) t(e, r, u[i], c, s);
        else for (i in r) t(e, r, i, c, s);
        return e
    };
    r.merge = i
});;
/*!common:widget/js/util/tangram/array.js*/
define("common:widget/js/util/tangram/array",
function(r, t, e) {
    var n = r("common:widget/lib/jquery/jquery"),
    o = r("common:widget/js/util/tangram/object"),
    i = r("common:widget/js/util/tangram/chain"),
    a = e.exports = i(Array);
    Array.prototype.indexOf || (Array.prototype.indexOf = function(r) {
        "use strict";
        if (null == this) throw new TypeError;
        var t, e, n = Object(this),
        o = n.length >>> 0;
        if (0 === o) return - 1;
        if (t = 0, arguments.length > 1 && (t = Number(arguments[1]), t != t ? t = 0 : 0 != t && 1 / 0 != t && t != -1 / 0 && (t = (t > 0 || -1) * Math.floor(Math.abs(t)))), t >= o) return - 1;
        for (e = t >= 0 ? t: Math.max(o - Math.abs(t), 0); o > e; e++) if (e in n && n[e] === r) return e;
        return - 1
    }),
    a.indexOf = function(r, t, e) {
        return Array.prototype.indexOf.apply(r, [t, e])
    },
    a.contains = function(r, t) {
        return a.indexOf(r, t) >= 0
    },
    a.each = n.each,
    a.forEach = o.forEach;
    var u = function(r) {
        r.length = 0
    };
    a.empty = u,
    Array.prototype.every || (Array.prototype.every = function(r) {
        "use strict";
        var t, e, n, o;
        if (null == this) throw new TypeError;
        if (t = Object(this), e = t.length >>> 0, "function" != typeof r) throw new TypeError;
        for (o = arguments[1], n = 0; e > n; n++) if (n in t && !r.call(o, t[n], n, t)) return ! 1;
        return ! 0
    }),
    a.every = function(r, t, e) {
        return Array.prototype.every.apply(r, [t, e])
    },
    Array.prototype.filter || (Array.prototype.filter = function(r) {
        "use strict";
        if (!this) throw new TypeError; {
            var t = Object(this);
            t.length >>> 0
        }
        if ("function" != typeof r) throw new TypeError;
        var e = [],
        n = arguments[1];
        for (var o in t) t.hasOwnProperty(o) && r.call(n, t[o], o, t) && e.push(t[o]);
        return e
    }),
    a.filter = function(r, t, e) {
        return Array.prototype.filter.apply(r, [t, e])
    };
    var f = function(r, t) {
        var e, n, o = r.length;
        if ("function" == typeof t) for (n = 0; o > n; n++) if (e = r[n], !0 === t.call(r, e, n)) return e;
        return null
    };
    a.find = f;
    var p = function(r, t) {
        for (var e = {},
        n = t && t.length,
        o = 0,
        i = r.length; i > o; o++) e[r[o]] = n && n > o ? t[o] : !0;
        return e
    };
    a.hash = p,
    Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(r) {
        "use strict";
        if (null == this) throw new TypeError;
        var t, e, n = Object(this),
        o = n.length >>> 0;
        if (0 === o) return - 1;
        for (t = o, arguments.length > 1 && (t = Number(arguments[1]), t != t ? t = 0 : 0 != t && t != 1 / 0 && t != -(1 / 0) && (t = (t > 0 || -1) * Math.floor(Math.abs(t)))), e = t >= 0 ? Math.min(t, o - 1) : o - Math.abs(t); e >= 0; e--) if (e in n && n[e] === r) return e;
        return - 1
    }),
    a.lastIndexOf = function(r, t, e) {
        return Array.prototype.lastIndexOf.apply(r, [t, e])
    },
    a.map = n.map,
    "function" != typeof Array.prototype.reduce && (Array.prototype.reduce = function(r, t) {
        "use strict";
        if (null === this || "undefined" == typeof this) throw new TypeError("Array.prototype.reduce called on null or undefined");
        if ("function" != typeof r) throw new TypeError(r + " is not a function");
        var e, n, o = this.length >>> 0,
        i = !1;
        for (1 < arguments.length && (n = t, i = !0), e = 0; o > e; ++e) this.hasOwnProperty(e) && (i ? n = r(n, this[e], e, this) : (n = this[e], i = !0));
        if (!i) throw new TypeError("Reduce of empty array with no initial value");
        return n
    }),
    a.reduce = function(r, t, e) {
        Array.prototype.reduce.apply(r, [t, e])
    };
    var y = function(r, t) {
        for (var e = r.length; e--;) e in r && r[e] === t && r.splice(e, 1);
        return r
    };
    a.remove = y;
    var c = function(r, t) {
        return r.splice(t, 1)[0]
    };
    a.removeAt = c,
    Array.prototype.some || (Array.prototype.some = function(r) {
        "use strict";
        if (null == this) throw new TypeError;
        var t, e, n = Object(this),
        o = n.length >>> 0;
        if ("function" != typeof r) throw new TypeError;
        for (t = arguments[1], e = 0; o > e; e++) if (e in n && r.call(t, n[e], e, n)) return ! 0;
        return ! 1
    }),
    a.some = function(r, t, e) {
        Array.prototype.some.apply(r, [t, e])
    };
    var l = function(r, t) {
        var e, n, o = r.length,
        i = r.slice(0);
        for ("function" != typeof t && (t = function(r, t) {
            return r === t
        }); --o > 0;) for (n = i[o], e = o; e--;) if (t(n, i[e])) {
            i.splice(o, 1);
            break
        }
        return i
    };
    a.unique = l
});;
/*!common:widget/js/util/tangram/sio.js*/
define("common:widget/js/util/tangram/sio",
function(a, r, o) {
    var n = a("common:widget/lib/jquery/jquery"),
    t = a("common:widget/js/util/tangram/chain"),
    c = o.exports = t();
    c.callByBrowser = function(a, r, o) {
        return o && o.charset && (o.scriptCharset = o.charset),
        n.ajax(n.extend({
            url: a,
            dataType: "script",
            crossDomain: !0,
            success: r
        },
        o))
    },
    c.callByServer = function(a, r, o) {
        o && o.charset && (o.scriptCharset = o.charset);
        var t = /(\?|&)callback=([^&]*)/;
        return a = a.replace(t, "$1callback=?"),
        a.search(t) < 0 && (a += (a.indexOf("?") < 0 ? "?": "&") + "callback=?"),
        n.ajax({
            dataType: "jsonp",
            crossDomain: !0,
            url: a,
            success: r
        })
    };
    var e = function(a) {
        var r = new Image,
        o = "tangram_sio_log_" + Math.floor(2147483648 * Math.random()).toString(36);
        window[o] = r,
        r.onload = r.onerror = r.onabort = function() {
            r.onload = r.onerror = r.onabort = null,
            window[o] = null,
            r = null
        },
        r.src = a
    };
    c.log = e
});;
/*!common:widget/js/util/tangram/url.js*/
define("common:widget/js/util/tangram/url",
function(n, r) {
    var e = n("common:widget/lib/jquery/jquery"),
    t = n("common:widget/js/util/tangram/string"),
    u = function(n) {
        return String(n).replace(/[#%&+=\/\\\ \u3000\f\r\n\t]/g,
        function(n) {
            return "%" + (256 + n.charCodeAt()).toString(16).substring(1).toUpperCase()
        })
    };
    r.escapeSymbol = u;
    var i = function(n, r) {
        var e = new RegExp("(^|&|\\?|#)" + t.escapeReg(r) + "=([^&#]*)(&|$|#)", ""),
        u = n.match(e);
        return u ? u[2] : null
    };
    r.getQueryValue = i;
    var o = function(n, r) {
        var t, i = [],
        o = r ||
        function(n) {
            return u(n)
        };
        return e.each(n,
        function(n, r) {
            if (e.isArray(r)) for (t = r.length; t--;) i.push(n + "=" + o(r[t], n));
            else i.push(n + "=" + o(r, n))
        }),
        i.join("&")
    };
    r.jsonToQuery = o;
    var a = function(n) {
        for (var r, t, u, i, o = n.substr(n.lastIndexOf("?") + 1), a = o.split("&"), s = a.length, c = {},
        f = 0; s > f; f++) a[f] && (i = a[f].split("="), r = i[0], t = i[1], u = c[r], "undefined" == typeof u ? c[r] = t: e.isArray(u) ? u.push(t) : c[r] = [u, t]);
        return c
    };
    r.queryToJson = a
});;
/*!common:widget/js/util/tangram/form.js*/
define("common:widget/js/util/tangram/form",
function(n, e) {
    var r = n("common:widget/lib/jquery/jquery");
    e.json = function(n) {
        var e = r(n).serializeArray(),
        i = {};
        return r.each(e,
        function(n, e) {
            i[e.name] = e.value
        }),
        i
    }
});;
/*!common:widget/js/util/tangram/swf.js*/
define("common:widget/js/util/tangram/swf",
function(e, a) {
    var t = e("common:widget/lib/jquery/jquery"),
    r = e("common:widget/js/util/tangram/browser"),
    i = e("common:widget/js/util/tangram/array"),
    o = e("common:widget/js/util/tangram/string"),
    n = function(e) {
        var a, o = document[e];
        return 9 == r.ie ? o && o.length ? 1 == (a = i.remove(t.makeArray(o),
        function(e) {
            return "embed" != e.tagName.toLowerCase()
        })).length ? a[0] : a: o: o || window[e]
    };
    a.getMovie = n;
    var s = function(e, a, t) {
        var r, i = this,
        o = this._flash = n(e);
        return a ? void(r = setInterval(function() {
            try {
                o[a] && (i._initialized = !0, clearInterval(r), t && t())
            } catch(e) {}
        },
        100)) : this
    };
    a.Proxy = s,
    s.prototype.getFlash = function() {
        return this._flash
    },
    s.prototype.isReady = function() {
        return !! this._initialized
    },
    s.prototype.call = function(e) {
        try {
            var a = this.getFlash(),
            t = Array.prototype.slice.call(arguments);
            t.shift(),
            a[e] && a[e].apply(a, t)
        } catch(r) {}
    };
    var l = function() {
        var e = navigator;
        if (e.plugins && e.mimeTypes.length) {
            var a = e.plugins["Shockwave Flash"];
            if (a && a.description) return a.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s)+r/, ".") + ".0"
        } else if (window.ActiveXObject && !window.opera) for (var t = 12; t >= 2; t--) try {
            var r = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + t);
            if (r) {
                var i = r.GetVariable("$version");
                return i.replace(/WIN/g, "").replace(/,/g, ".")
            }
        } catch(o) {}
    } ();
    a.version = l;
    var c = function(e) {
        e = e || {};
        var a, t, r, i, n, s, c = l,
        d = e.ver || "6.0.0",
        p = {},
        u = o.encodeHTML;
        for (i in e) p[i] = e[i];
        if (e = p, !c) return "";
        for (c = c.split("."), d = d.split("."), r = 0; 3 > r && (a = parseInt(c[r], 10), t = parseInt(d[r], 10), !(a > t)); r++) if (t > a) return "";
        var v = e.vars,
        f = ["classid", "codebase", "id", "width", "height", "align"];
        if (e.align = e.align || "middle", e.classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", e.codebase = location.protocol + "//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0", e.movie = e.url || "", delete e.vars, delete e.url, "string" == typeof v) e.flashvars = v;
        else {
            var h = [];
            for (i in v) s = v[i],
            h.push(i + "=" + encodeURIComponent(s));
            e.flashvars = h.join("&")
        }
        var m = ["<object "];
        for (r = 0, n = f.length; n > r; r++) s = f[r],
        m.push(" ", s, '="', u(e[s]), '"');
        m.push(">");
        var g = {
            wmode: 1,
            scale: 1,
            quality: 1,
            play: 1,
            loop: 1,
            menu: 1,
            salign: 1,
            bgcolor: 1,
            base: 1,
            allowscriptaccess: 1,
            allownetworking: 1,
            allowfullscreen: 1,
            seamlesstabbing: 1,
            devicefont: 1,
            swliveconnect: 1,
            flashvars: 1,
            movie: 1
        };
        for (i in e) s = e[i],
        i = i.toLowerCase(),
        g[i] && (s || s === !1 || 0 === s) && m.push('<param name="' + i + '" value="' + u(s) + '" />');
        e.src = e.movie,
        e.name = e.id,
        delete e.id,
        delete e.movie,
        delete e.classid,
        delete e.codebase,
        e.type = "application/x-shockwave-flash",
        e.pluginspage = location.protocol + "//www.macromedia.com/go/getflashplayer",
        m.push("<embed");
        var w;
        for (i in e) if (s = e[i], s || s === !1 || 0 === s) {
            if (new RegExp("^salign$", "i").test(i)) {
                w = s;
                continue
            }
            m.push(" ", i, '="', u(s), '"')
        }
        return w && m.push(' salign="', u(w), '"'),
        m.push("></embed></object>"),
        m.join("")
    };
    a.createHTML = c;
    var d = function(e, a) {
        e = e || {};
        var r = c(e) || e.errorMessage || "";
        a && "string" == typeof a && (a = document.getElementById(a)),
        t(a || "body").insertHTML("beforeEnd", r)
    };
    a.create = d
});;
/*!common:widget/js/util/tangram/tangram.js*/
define("common:widget/js/util/tangram/tangram",
function(t, e, n) {
    var r = n.exports = t("common:widget/lib/jquery/jquery"),
    o = t("common:widget/js/util/event/event");
    r.browser = t("common:widget/js/util/tangram/browser"),
    r.platform = t("common:widget/js/util/tangram/platform"),
    r.cookie = t("common:widget/js/util/tangram/cookie"),
    r.json = t("common:widget/js/util/tangram/json"),
    r.number = t("common:widget/js/util/tangram/number"),
    r.string = t("common:widget/js/util/tangram/string"),
    r.date = t("common:widget/js/util/tangram/date"),
    r.object = t("common:widget/js/util/tangram/object"),
    r.array = t("common:widget/js/util/tangram/array"),
    r.sio = t("common:widget/js/util/tangram/sio"),
    r.url = t("common:widget/js/util/tangram/url"),
    r.form = t("common:widget/js/util/tangram/form"),
    r.swf = t("common:widget/js/util/tangram/swf"),
    r.createClass = function(t, e) {
        t = r.isFunction(t) ? t: function() {},
        e = e || {};
        var n = function() {
            this.guid = r.id(),
            t.apply(this, arguments),
            o.create(this)
        };
        if (n.extend = function(t) {
            return r.extend(n.prototype, t),
            n
        },
        r.isFunction(e.superClass)) {
            var i = function() {};
            i.prototype = (n.superClass = e.superClass).prototype;
            var a = n.prototype = new i;
            r.extend(n.prototype, t.prototype),
            a.constructor = t
        }
        return n
    },
    r.fn.insertHTML = function(t, e) {
        return this.each(function(n, o) {
            var i, a;
            return o.insertAdjacentHTML && !r.browser.opera ? o.insertAdjacentHTML(t, e) : (i = o.ownerDocument.createRange(), t = t.toUpperCase(), "AFTERBEGIN" == t || "BEFOREEND" == t ? (i.selectNodeContents(o), i.collapse("AFTERBEGIN" == t)) : (a = "BEFOREBEGIN" == t, i[a ? "setStartBefore": "setEndAfter"](o), i.collapse(a)), i.insertNode(i.createContextualFragment(e))),
            o
        }),
        this
    },
    r.isNumber = function(t) {
        return "number" == r.type(t) && isFinite(t)
    },
    r.isString = function(t) {
        return "string" == r.type(t)
    },
    r.forEach = r.object.each,
    r.fn.forEach = function(t) {
        return r.forEach(this, t)
    };
    var i = 1;
    r.id = function() {
        return i++
    }
});;
/*!common:widget/js/util/form/form.js*/
define("common:widget/js/util/form/form",
function(n, t, i) {
    var e = n("common:widget/lib/jquery/jquery"),
    o = function(n) {
        var t = this,
        i = e({});
        e.extend(t, {
            guid: e.guid++,
            on: function(n, t) {
                i.on(n, t)
            },
            fire: function(n, t) {
                i.trigger(n, t)
            },
            un: function(n, t) {
                i.unbind(n, t)
            }
        }),
        t.id = t.name = "form-" + t.guid,
        t.instance = e("<form></form>").attr({
            name: t.name,
            id: t.id,
            method: "get",
            action: "/submit"
        }).appendTo(document.body),
        e.each(n,
        function(n, i) {
            e.isFunction(i) ? t.on(n, i) : e.isPlainObject(i) && "input" == n ? e.each(i,
            function(n, i) {
                e('<input type="hidden" name="' + n + '" />').val(i).appendTo(t.instance)
            }) : t.instance.attr(n, i)
        })
    };
    e.extend(o.prototype, {
        get: function() {
            return this.instance
        },
        dispose: function() {
            this.instance.remove()
        },
        submit: function() {
            return this.instance.submit(),
            this
        }
    }),
    i.exports = o
});;
/*!common:widget/js/logic/ut/ut.js*/
define("common:widget/js/logic/ut/ut",
function(t, e, n) {
    function o(t) {
        var e = [t.x, t.y],
        n = m(this),
        o = v[this.id];
        if (o) o.hover || (o.hover = !0, o.count++);
        else {
            var i = n.position();
            i.right = i.left + n.width(),
            i.botton = i.top + n.height(),
            o = v[this.id] = m.extend(i, {
                hover: !0,
                count: 1
            })
        }
        o["mouse" + o.count] || (o["mouse" + o.count] = [], o["time" + o.count] = {
            start: +new Date
        },
        v.ma.push(o["mouse" + o.count]), v.ea.push(this.id)),
        o["mouse" + o.count].push(e)
    }
    function i(t) {
        var e = [t.x, t.y],
        n = v[this.id];
        if (n && n.hover) {
            if (e[0] && e[0] > n.left && e[0] < n.right && e[1] && e[1] > n.top && e[1] < n.buttom) return;
            n["time" + n.count].end = (new Date).getTime(),
            n.hover = !1
        }
    }
    function u() {
        var t = v.ma.length;
        if (t > 0) {
            var e = v.ma[t - 1];
            return e[e.length - 1]
        }
    }
    function r() {
        var t = v.ea.concat(),
        e = t.length;
        return e > 10 && (t = t.splice(e - 10, 10)),
        t.join(",")
    }
    function c() {
        if (p) return g;
        m.each(v.ea,
        function(t, e) {
            v.ea[t] = j[e]
        });
        //var t = [u(), r(), (new Date).getTime() - d, [screen.width, screen.height].join(",")].join("	");
        //var t = [',', '3,2,3,2,3,2,3,2,3,2', (new Date).getTime() - d+7000, [screen.width, screen.height].join(",")].join("	");
        var t = [',', '**', (new Date).getTime() - d+7000, [screen.width, screen.height].join(",")].join("	");
        return g.c = s(t) + "," + w + l,
        p = !0,
        g
    }
    function s(t) {
        for (var e = [], n = {},
        o = w % 100, i = 0, u = t.length; u > i; i++) {
            var r = t.charCodeAt(i) ^ o;
            e.push(r),
            n[r] || (n[r] = []),
            n[r].push(i)
        }
        return e
    }
    function a(t) {
        m.each(t,
        function(t, e) {
            m("#" + e).mouseover(o).mouseout(i),
            j[e] = t
        }),
        m(document.body).click(function() {
            l = 1
        })
    }
    function h(t, e) {
        new f({
            method: "post",
            target: "iktssender",
            action: t,
            input: e
        }).submit().dispose()
    }
    var m = t("common:widget/lib/jquery/jquery"),
    f = t("common:widget/js/util/form/form"),
    d = +new Date,
    v = {
        ea: [],
        ma: []
    },
    g = {},
    p = !1,
    l = 0,
    w = +new Date,
    j = {};
    n.exports = {
        start: a,
        report: c,
        send: h
    }
});;
/*!common:widget/js/util/https/https.js*/
define("common:widget/js/util/https/https",
function(t, s, o) {
    var c = {
        "Xhttp://hiphotos.baidu.com": "https://gss0.baidu.com/7LsWdDW5_xN3otqbppnN2DJv",
        "Xhttp://iknow01.bosstatic.bdimg.com": "https://gss0.baidu.com/7051cy89RMgCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://a.hiphotos.baidu.com": "https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://b.hiphotos.baidu.com": "https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://c.hiphotos.baidu.com": "https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://d.hiphotos.baidu.com": "https://gss0.baidu.com/-Po3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://e.hiphotos.baidu.com": "https://gss0.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://f.hiphotos.baidu.com": "https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://g.hiphotos.baidu.com": "https://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://h.hiphotos.baidu.com": "https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://priv.hiphotos.baidu.com": "https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy",
        "Xhttp://himg.bdimg.com": "https://gss0.bdstatic.com/7Ls0a8Sm1A5BphGlnYG",
        "Xhttp://imgsrc.baidu.com": "https://gss0.baidu.com/70cFfyinKgQFm2e88IuM_a",
        "Xhttp://iknowwap.bdimg.com": "https://gss0.bdstatic.com/7051cy7z2RZ3otebn9fN2DJv",
        "Xhttp://iknow02.bosstatic.bdimg.com": "https://gss0.bdstatic.com/7051cy89RcgCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://iknow03.bosstatic.bdimg.com": "https://gss0.bdstatic.com/7051cy89RsgCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://iknow04.bosstatic.bdimg.com": "https://gss0.bdstatic.com/7051cy89Q1gCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://iknow05.bosstatic.bdimg.com": "https://gss0.bdstatic.com/7051cy89QMgCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://iknow-base.bj.bcebos.com": "https://gss0.bdstatic.com/7051cy89QMgCncy6lo7D0j9wexYrbOWh7c50",
        "Xhttp://img.baidu.com": "https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq",
        "Xhttp://img.iknow.bdimg.com": "https://gss0.bdstatic.com/70cFsj3f_gcX8t7mm9GUKT-xh_",
        "Xhttp://mt1.baidu.com": "https://gss0.baidu.com/8_BXsjip0QIZ8tyhnq",
        "Xhttp://mt2.baidu.com": "https://gss0.bdstatic.com/8_BYsjip0QIZ8tyhnq",
        "Xhttp://mt3.baidu.com": "https://gss0.bdstatic.com/8_BZsjip0QIZ8tyhnq",
        "Xhttp://mt4.baidu.com": "https://gss0.bdstatic.com/8_BSsjip0QIZ8tyhnq",
        "Xhttp://msg.baidu.com": "https://gsp0.baidu.com/8_UFsjip0QIZ8tyhnq",
        "Xhttp://nssug.baidu.com": "https://gsp0.baidu.com/8qUZeT8a2gU2pMbgoY3K",
        "Xhttp://iknowpc.bdimg.com": "https://gss0.bdstatic.com/7051cy792sgCpNKfpU_Y_D3",
        "Xhttp://captcha.baidu.com": "https://gsp0.baidu.com/9bMWeDmg2MgCo2Kml5_Y_D3"
    },
    h = null,
    i = function(t, s) {
        return t && "string" == typeof t ? s ? t.replace(/\W(?:src|img)="(http:\/\/[\.\w\-]+).+?"/gi,
        function(t, s) {
            return c["X" + s] ? t.replace(s, c["X" + s]) : t
        }).replace(/background(?:\-image)?:\s*(?:#(?:[A-Za-z0-9]{3}|[A-Za-z0-9]{6})\s+)?url\(['"]?(http:\/\/[\.\w\-]+).+?['"]?\)/gi,
        function(t, s) {
            return c["X" + s] ? t.replace(s, c["X" + s]) : t
        }) : (t = t.replace(/^\s+/g, ""), t.indexOf("http:") ? t: t.replace(/^(http:\/\/[\w\d\.\-]+)/,
        function(t, s) {
            return c["X" + s] ? t.replace(s, c["X" + s]) : t
        })) : t
    },
    p = function(t) {
        if (!t || "string" != typeof t) return t;
        if (!h) {
            h = {};
            for (var s in c) h[c[s]] = s.substr(1)
        }
        return t.replace(/(?:src|img)="(https:\/\/gss0\.bdstatic\.com\/[\.\w\-]+|https:\/\/gsp0\.baidu\.com\/[\.\w\-]+|https:\/\/gss0\.baidu\.com\/[\.\w\-]+).+?"/gi,
        function(t, s) {
            return h[s] ? t.replace(s, h[s]) : t
        })
    },
    a = {
        autoTrans: location.href.indexOf("https:") ?
        function(t) {
            return t
        }: i,
        getOrigin: p,
        forceTrans: i
    };
    o.exports = a
});;
/*!common:widget/js/logic/captcha/captcha.js*/
define("common:widget/js/logic/captcha/captcha",
function(t, a, e) {
    var c = t("common:widget/lib/jquery/jquery"),
    i = t("common:widget/js/ui/base/base"),
    n = t("common:widget/js/ui/dialog/dialog"),
    r = t("common:widget/js/util/event/event"),
    d = t("common:widget/js/util/https/https"),
    s = i(function() {
        var t = this;
        t.type = "pcbefore",
        t.from = "",
        t.url = "/api/vcode",
        t.tip = "\u70b9\u51fb\u4ee5\u4e0b\u6587\u5b57\u8f93\u5165\u9a8c\u8bc1\u7801",
        t.errorTip = "\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e",
        t._codeArr = [],
        t._currIndex = 0,
        t._styleSheetTpl = ".captcha-buttons a div, .captcha-content-img, .captcha-input dd{background:url(#{imgUrl}&t=#{t}) no-repeat;}",
        t._positionArr = ["-6px -36px", "-53px -39px", "-96px -38px", "0px -83px", "-53px -85px", "-96px -86px", "-2px -135px", "-53px -135px", "-96px -135px"],
        t._templateTpl = ['<div class="captcha-box">', '<div class="captcha-input">', '<div class="captcha-input-title">\u9a8c\u8bc1\u7801</div>', '<dl class="ml-5"><dt class="grid-r"></dt><dd></dd><dd></dd><dd></dd><dd></dd></dl>', "</div>", '<div class="captcha-content">', '<div><a href="#" class="captcha-content-img mt-5"></a><a href="#" class="captcha-content-change f-12 ml-5">\u770b\u4e0d\u6e05?</a></div>', '<p class="captcha-content-tip f-12">#{tip}</p>', '<div class="captcha-buttons">', '<a href="#"><div class="captcha-btn-1"></div></a>', '<a href="#"><div class="captcha-btn-2"></div></a>', '<a href="#"><div class="captcha-btn-3"></div></a>', '<a href="#"><div class="captcha-btn-4"></div></a>', '<a href="#"><div class="captcha-btn-5"></div></a>', '<a href="#"><div class="captcha-btn-6"></div></a>', '<a href="#"><div class="captcha-btn-7"></div></a>', '<a href="#"><div class="captcha-btn-8"></div></a>', '<a href="#"><div class="captcha-btn-9"></div></a>', "</div>", "</div>", "</div>"].join("")
    }).extend({
        init: function() {
            var t = this;
            t._initCaptcha({
                url: t.url,
                from: t.from || "",
                type: t.type,
                callback: function() {
                    t.grid(),
                    c.isFunction(t.callback) && t.callback.call(res.data)
                }
            })
        },
        _initCaptcha: function(t) {
            var a = this,
            e = c.string("#{url}?from=#{from}&style=#{type}&t=").format(t) + (new Date).getTime();
            c.get(e,
            function(e) {
                if (0 == e.status && e.data.need_verify) {
                    var i = d.autoTrans(e.data.imgurl);
                    c.extend(a.vcode = {},
                    {
                        vcodeStr: e.data.vcode_str,
                        imgUrl: i,
                        from: t.from || ""
                    }),
                    c.isFunction(t.callback) && t.callback.call(e.data),
                    a.styleSheet(a.vcode)
                }
            },
            "json")
        },
        getCode: function() {
            return {
                vcode_str: this.vcode.vcodeStr,
                vcode: this._codeArr.join("")
            }
        },
        change: function() {
            var t = this;
            t._initCaptcha({
                url: t.url,
                from: t.from || "",
                type: t.type,
                callback: function() {
                    t.captchaInputs.each(function() {
                        c(this).removeAttr("style")
                    }),
                    t._currIndex = 0,
                    t._codeArr.length = 0
                }
            })
        },
        styleSheet: function(t) {
            var a = this;
            a.styleSheetEle = c("#captcha-sheet")[0],
            a.styleSheetEle || (a.styleSheetEle = c('<style id="captcha-sheet" type="text/css"></style>').appendTo("head")[0]);
            var e = c.string(a._styleSheetTpl).format({
                imgUrl: t.imgUrl,
                t: (new Date).getTime()
            });
            a.styleSheetEle.styleSheet ? a.styleSheetEle.styleSheet.cssText = e: a.styleSheetEle.innerHTML = e
        },
        error: function() {
            var t = this;
            t.change(),
            t.captchaErrTip.text(t.errorTip).addClass("f-red")
        },
        submit: function(t) {
            var a = this;
            t && (c.extend(t.params, a.getCode()), r.fire("catcha.submit", t))
        },
        grid: function() {
            var t = this,
            a = new n({
                title: "\u77e5\u9053\u63d0\u793a",
                width: 345,
                height: 340,
                autoDispose: !0,
                content: c.string(t._templateTpl).format({
                    tip: t.tip
                })
            });
            this.dialog = a;
            var e = a.instance,
            i = e.find(".captcha-input dt"),
            r = e.find(".captcha-content-img"),
            d = e.find(".captcha-content-change"),
            s = e.find(".captcha-input dd");
            c.extend(t, {
                captchaInputs: s,
                captchaErrTip: e.find(".captcha-content-tip")
            }),
            i.click(function() {
                0 != t._currIndex && (t._codeArr.pop(), c(this).nextAll("dd").eq(--t._currIndex).removeAttr("style"))
            }),
            r.add(d).click(function(a) {
                t.change(),
                a.preventDefault()
            }),
            e.find(".captcha-buttons a").each(function(a) {
                c(this).click(function(e) {
                    if (e.preventDefault(), 0 == t._currIndex) t.captchaErrTip.text(t.tip).removeClass("f-red");
                    else if (4 == t._currIndex) return;
                    t._codeArr.push(a + 1),
                    s.eq(t._currIndex++).css("background-position", t._positionArr[a]),
                    4 == t._currIndex && t.submit(t.submitParams)
                })
            })
        }
    });
    e.exports = s
});;
/*!common:widget/js/util/log/log.js*/
define("common:widget/js/util/log/log",
function(o, t) {
    function n(o) {
        var t = o.split(","),
        n = {};
        return a.forEach(t,
        function(o) {
            var t = o.split(":");
            n[t[0]] = t[1]
        }),
        n
    }
    var a = o("common:widget/js/util/tangram/tangram");
    _globalOptions = {},
    t.log = function(o) {
        var t = new Image,
        n = "bd_iknow_log_" + Math.floor(2147483648 * Math.random()).toString(36);
        window[n] = t,
        t.onload = t.onerror = t.onabort = function() {
            t.onload = t.onerror = t.onabort = null,
            window[n] = null,
            t = null
        },
        t.src = o
    },
    t.send = function(o) {
        var n = "//kstj.baidu.com/v.gif?",
        e = {
            pid: 102,
            url: location.href,
            isLogin: !F.context("user") || 1 != F.context("user").isLogin && 1 != F.context("user").isLogin ? 0 : 1
        };
        a.extend(e, _globalOptions.global || {}),
        a.extend(e, _globalOptions[o.action] || {});
        var i = a.extend(e, o);
        return i.type = a.isNumeric(i.type) ? i.type: i.key,
        n += a.param(i),
        t.log(n),
        n
    },
    t.parse = n,
    t.addKey = function(o, t) {
        var n = a.extend({
            append: !1,
            action: "global",
            separator: ","
        },
        t || {});
        _globalOptions[n.action] = _globalOptions[n.action] || {},
        a.each(o,
        function(o, t) {
            n.append && _globalOptions[n.action][o] ? _globalOptions[n.action][o] += n.separator + t: _globalOptions[n.action][o] = t
        })
    },
    t.init = function(o) {
        var n = a.extend({
            query: "",
            action: "click",
            target: "a"
        },
        o || {});
        if (n.query) {
            var e = n.query;
            delete n.query,
            a(e).delegate(n.target, n.action,
            function() {
                var o = a(this);
                if (o.data("log") || o.attr("log")) {
                    var e = t.parse(o.data("log") || o.attr("log"));
                    o.is("a") && !e.url && (e.url = o.attr("href")),
                    e = a.extend(a.extend({},
                    n), e),
                    t.send(e)
                }
            })
        }
    }
});;
/*!common:widget/js/logic/submit/submit.js*/
define("common:widget/js/logic/submit/submit",
function(e, o, t) {
    var r = e("common:widget/js/util/tangram/tangram"),
    a = e("common:widget/js/ui/base/base"),
    n = e("common:widget/js/ui/dialog/dialog"),
    c = e("common:widget/js/logic/ut/ut"),
    i = e("common:widget/js/util/event/event"),
    d = e("common:widget/js/util/form/form"),
    s = e("common:widget/js/logic/captcha/captcha"),
    l = e("common:widget/js/util/log/log"),
    u = a(function(e) {
        var o = this;
        i.fire("editor.default");
        var t = {
            url: "/submit/ajax/",
            params: {
                ie: "UTF-8"
            },
            hasJump: !1,
            autoRefresh: !1,
            jumpSubmit: function(e, t, a) {
                var n = {
                    name: o.guid + "_FORM_NAME",
                    id: o.guid + "_FORM_ID",
                    action: "/submit/",
                    method: "post"
                };
                n.action = "" != document.referrer ? "/submit/?cm=" + t.cm + "&fr=" + encodeURIComponent(document.referrer) : "/submit/?cm=" + t.cm,
                1 == F.context("hasZhimaTag") && F.context("zhimaTagOpen") && (n.action += "&iszhima=1"),
                new d(r.extend(r.extend(n, a || {}), {
                    input: t
                })).submit()
            },
            errorDeal: function(e, o) {
                var a = o && o.data || {
                    info: "\u7f51\u7edc\u5f02\u5e38\u5566\uff1a\uff08\u8bf7\u91cd\u65b0\u63d0\u4ea4"
                },
                c = o && o.errorNo;
                if (a && c && 10054 == c) {
                    var d = ['<div class="dialog-noemail"><i class="i-upload-big"></i><i class="i-download-big"></i>', '<p class="f-bold mt-20">\u77e5\u9053\u5df2\u652f\u6301\u6587\u4ef6\u4e0a\u4f20\u3001\u4e0b\u8f7d\u529f\u80fd\u3002</p>', '<p class="f-gray mt-5">\u77e5\u9053\u7f51\u53cb\u4f1a\u5c06\u60a8\u9700\u8981\u7684\u6587\u4ef6\u4e0a\u4f20\u5230\u77e5\u9053\uff0c\u60a8\u53ef\u4ee5\u5728\u7ebf\u9884\u89c8\u548c\u4e0b\u8f7d\u3002</p>', '<p class="f-orange mt-5">\u4e3a\u4e86\u60a8\u7684\u4fe1\u606f\u5b89\u5168\uff0c\u8bf7\u4e0d\u8981\u7559\u4e0b\u60a8\u7684\u4e2a\u4eba\u90ae\u7bb1\u3002</p>', '<p class="dialog-noemail-btn"><a id="dialog-noemail-btn" class="btn-32-green"><em><b>\u8fd4\u56de\u4fee\u6539</b></em></a></p></div>'];
                    new n({
                        title: "\u4fe1\u606f\u63d0\u793a",
                        width: 480,
                        height: 360,
                        content: d.join(""),
                        open: function() {
                            r(".dialog-noemail-btn").delegate("a", "click",
                            function(e) {
                                e.preventDefault(),
                                i.fire("dialog.close")
                            })
                        }
                    })
                } else 12303 == c && t.authcode ? t.captcha = new s({
                    type: "pcafter",
                    submitParams: t,
                    from: t.authcode.getFrom() || ""
                }) : 12304 == c && t.captcha ? t.captcha.error() : 12302 == c && t.authcode ? t.authcode.error() : (n.alert(a.info), t.autoRefresh && setTimeout(function() {
                    window.location.reload(!0)
                },
                3e3));
                l.send({
                    type: 2032,
                    action: "submitError",
                    errorNo: c
                })
            }
        };
        if (r.each(r.extend(t, e),
        function(e, t) {
            r.isFunction(t) && o.on(e, t)
        }), t.params && (t.params.utdata = c.report().c), t.syncId) {
            if ("undefined" == typeof o.syncIdMap[t.syncId] && (o.syncIdMap[t.syncId] = !1), o.syncIdMap[t.syncId]) return;
            o.syncIdMap[t.syncId] = !0
        }
        var a=function(){/\/submit\/(ajax|user)/.test(t.url)&&F.context("user").stoken&&(t.params.stoken=F.context("user").stoken),r.ajax(t.url,{
                type: t.method || "post",
                dataType: t.dataType || "json",
                data: t.params,
                async: !t.sync,
                success: function(e) {
                    if (t.syncId && (o.syncIdMap[t.syncId] = !1), e && "undefined" == typeof e.errorNo && (e.errorNo = e.errno), e && "undefined" == typeof e.data && (e.data = e), e && 0 == e.errorNo) t.captcha && t.captcha.dialog.close(),
                    o.fire("beforeJump", e.data),
                    t.hasJump && t.jumpSubmitDelay ? setTimeout(function() {
                        o.fire("jumpSubmit", e.data)
                    },
                    t.jumpSubmitDelay) : t.hasJump && o.fire("jumpSubmit", e.data);
                    else {
                        var r = e ? e.data: "";
                        if (o.fire("beforeError", r), e && 267 == e.errorNo) return void o.errorCheck({
                            errorNo: 267,
                            actCallback: function() {
                                window.open("https://passport.baidu.com/v2/?binding&tpl=ik&u=http%3A%2F%2Fzhidao.baidu.com&device=pc")
                            },
                            confirmCallback: function() {
                                a()
                            }
                        });
                        if (e && 12 == e.errorNo && 16 == r.reason) return void o.errorCheck({
                            errorNo: 12,
                            actCallback: function() {
                                window.open("/feedback/account.html")
                            },
                            confirmCallback: function() {
                                a()
                            }
                        });
                        if (e && 12 === Number(e.errorNo) && 1 !== Number(r.reason)) {
                            var c = new Date(1e3 * r.optime),
                            i = c.getFullYear(),
                            d = c.getMonth() + 1,
                            s = 10 > d ? "0" + d: d,
                            l = c.getDate(),
                            u = 10 > l ? "0" + l: l,
                            m = i + "-" + s + "-" + u;
                            if (r.days > 0) var f = Math.ceil((1e3 * r.optime + 864e5 * r.days - new Date) / 864e5); {
                                var p = '\u60a8\u7684\u8d26\u53f7\u8fdd\u53cd\u4e86<a href="http://help.baidu.com/question?prod_en=zhidao&class=154&id=851" target="_blank">\u77e5\u9053\u89c4\u8303</a>\uff0c\u5df2\u4e8e' + m + "\u88ab" + (r.days > 0 ? "": "\u6c38\u4e45") + "\u5c01\u7981\uff0c\u65e0\u6cd5\u8fdb\u884c\u4efb\u4f55\u64cd\u4f5c" + (r.days > 0 ? "\uff0c\u8fd8\u6709" + f + "\u5929\u89e3\u5c01": "") + '\u3002\u5982\u679c\u60a8\u8ba4\u4e3a\u5224\u65ad\u6709\u8bef\uff0c\u8bf7<a target="_blank" href="http://zhidao.baidu.com/feedback/account.html">\u53d1\u8d77\u7533\u8bc9</a>\uff0c\u5e2e\u52a9\u6211\u4eec\u6301\u7eed\u6539\u8fdb\u3002';
                                n.alert(p, {
                                    width: 400
                                })
                            }
                            return
                        }
                        if (e && 13 == e.errorNo) return void o.errorCheck({
                            errorNo: 13,
                            actCallback: function() {
                                window.open("/ihome/set/profile?type=contact")
                            },
                            confirmCallback: function() {
                                a()
                            }
                        });
                        o.fire("errorDeal", e)
                    }
                },
                error: function(e, r, a) {
                    t.syncId && (o.syncIdMap[t.syncId] = !1),
                    o.fire("error", a),
                    o.fire("errorDeal")
                }
            })
        };
        a()
    }).extend({
        syncIdMap: {},
        _init: function() {},
        errorCheck: function(e) {
            var o = this;
            if (o.errorNo_Checked || (o.errorNo_Checked = {
                267 : {
                    title: "\u77e5\u9053\u63d0\u793a",
                    content: "\u8fd8\u5dee\u4e00\u6b65\u5373\u53ef\u5b8c\u6210\u63d0\u4ea4\u54e6\uff1a\u5b8c\u6210\u4e2a\u4eba\u4fe1\u606f\u8865\u586b",
                    act: "\u4fe1\u606f\u8865\u586b",
                    confirm: "\u786e\u8ba4\u63d0\u4ea4",
                    cancel: "\u653e\u5f03\u63d0\u4ea4"
                },
                12 : {
                    title: "\u77e5\u9053\u63d0\u793a",
                    content: "\u7531\u4e8e\u60a8\u7684\u8d26\u53f7\u5b58\u5728\u5f02\u5e38\u98ce\u9669\uff0c\u6211\u4eec\u6682\u65f6\u51bb\u7ed3\u4e86\u60a8\u7684\u8d26\u53f7\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8d26\u53f7\u7533\u8bc9\u6765\u89e3\u9664\u51bb\u7ed3\u72b6\u6001",
                    act: "\u8fdb\u884c\u8d26\u53f7\u7533\u8bc9",
                    confirm: "\u8fdb\u884c\u8d26\u53f7\u7533\u8bc9",
                    cancel: "\u53d6\u6d88"
                },
                13 : {
                    title: "\u5e10\u53f7\u5b89\u5168\u98ce\u9669\u63d0\u793a",
                    content: "\u5c0a\u656c\u7684\u77e5\u53cb\uff0c\u4e3a\u4e86\u66f4\u597d\u5730\u4fdd\u62a4\u60a8\u7684\u5e10\u53f7\uff0c\u8bf7\u7ed1\u5b9a\u624b\u673a\u540e\u518d\u8fdb\u884c\u8be5\u64cd\u4f5c\u3002\u7ed1\u5b9a\u540e\u5e10\u53f7\u51fa\u73b0\u5f02\u5e38\u53ef\u514d\u8d39\u83b7\u5f97\u77ed\u4fe1\u63d0\u9192",
                    act: "\u8fdb\u884c\u624b\u673a\u7ed1\u5b9a",
                    confirm: "\u5b8c\u6210\u624b\u673a\u7ed1\u5b9a",
                    cancel: "\u53d6\u6d88",
                    height: 180
                }
            }), o.errorNo_Checked[e.errorNo]) var t = new n({
                width: 350,
                height: o.errorNo_Checked[e.errorNo].height || 160,
                title: o.errorNo_Checked[e.errorNo].title || "\u77e5\u9053\u63d0\u793a",
                content: o.errorNo_Checked[e.errorNo].content || "",
                buttons: [{
                    text: o.errorNo_Checked[e.errorNo].act || "",
                    click: function() {
                        var a = r(this).next().find(".btn-32-green");
                        a.html() == (o.errorNo_Checked[e.errorNo].act || "") ? (e.actCallback && e.actCallback(), a.html(o.errorNo_Checked[e.errorNo].confirm || "")) : (t.close(), e.confirmCallback && e.confirmCallback())
                    }
                },
                {
                    text: o.errorNo_Checked[e.errorNo].cancel || "\u53d6\u6d88",
                    click: function() {
                        t.close(),
                        e.cancelCallback && e.cancelCallback()
                    }
                }],
                autoDispose: !0
            })
        }
    });
    i.on("catcha.submit",
    function(e, o) {
        new u(o)
    }),
    t.exports = u
});;
/*!common:widget/js/ui/address/address.js*/
define("common:widget/js/ui/address/address",
function(e, t, i) {
    var n = e("common:widget/js/util/tangram/tangram"),
    a = e("common:widget/js/ui/base/base");
    i.exports = a(function(e) {
        var t = this;
        if (n.extend(t, {
            optionTpl: '<option value="#{name}">#{name}</option>',
            optionDefaultTpl: '<option value="">#{name}</option>',
            value: {},
            defaultValue: {},
            defaultWord: "",
            filterMap: {},
            dataCache: null
        },
        e), t.filterValue) for (var i = 0,
        a = t.filterValue.length; a > i; i++) t.filterMap[t.filterValue[i]] = !0
    }).extend({
        init: function(e) {
            var t = this;
            "object" == typeof e && t._init(e),
            window.arrCity ? (t.dataCache = window.arrCity, t.render()) : n.sio("https://passport.baidu.com/js/sitedata_bas.js?v=1.1").callByBrowser(function() {
                window.arrCity && (t.dataCache = window.arrCity, t.render())
            },
            {
                charset: "gbk"
            })
        },
        buildOptions: function(e, t) {
            var i = this;
            return e && t && t.length ? (e.empty(), n.each(t,
            function(t, a) {
                if (!i.filterMap[a.name]) if (a.name == i.defaultWord) {
                    var o = "";
                    o = n.isFunction(i.optionDefaultTpl) ? i.optionDefaultTpl(a) : n.string(i.optionDefaultTpl).format(a),
                    n(o).appendTo(e)
                } else n(n.string(i.optionTpl).format(a)).appendTo(e)
            }), void e.show()) : void e.empty()
        },
        render: function() {
            var e, t = this,
            i = n(t.container[0]),
            a = n(t.container[1]).hide(),
            o = n(t.container[2]).hide();
            i.change(function() { - 1 == this.selectedIndex && (this.selectedIndex = 0),
                e = t.dataCache[this.selectedIndex].sub,
                a.add(o).hide(),
                t.buildOptions(a, e),
                a.trigger("change")
            }),
            a.change(function() { - 1 == this.selectedIndex && (this.selectedIndex = 0);
                var i = e[this.selectedIndex].sub;
                t.buildOptions(o.hide(), i),
                o.trigger("change")
            }),
            t.buildOptions(i, t.dataCache),
            i.add(a).add(o).change(function() {
                t.value[this.id] = n(this).val(),
                this.id == t.container[0] ? (t.value[t.container[1]] = "", t.value[t.container[2]] = "") : this.id == t.container[1] && (t.value[t.container[2]] = ""),
                t.fire("change")
            }).each(function(e, i) {
                t.defaultValue[e] && n(i).val(t.defaultValue[e]).change()
            }),
            t.fire("change")
        }
    }),
    n.fn.address = function(e) {
        return this.size() == this.filter("select").size() == 3 ? (e.container = this, (new t).init(e), this) : this.each(function() {
            var i = this,
            a = i.id || "ik_address" + ++n.guid,
            o = ["_province", "_city", "_county"];
            e.container = [],
            n.each(o,
            function(t, o) {
                e.container.push(n("<select>", {
                    id: a + o
                }).appendTo(i))
            }),
            (new t).init(e)
        })
    }
});;
/*!common:widget/js/logic/qianbao-iframe/qianbao-dialog.js*/
define("common:widget/js/logic/qianbao-iframe/qianbao-dialog",
function(i, o, a) {
    var n = i("common:widget/js/util/tangram/tangram"),
    e = i("common:widget/js/ui/dialog/dialog"),
    t = function(i) {
        var o = {
            message_namespace: "iknowbindcard",
            service_type: "iknoe_actbindcard"
        },
        a = "https://baifubao.baidu.com/jump?uri=",
        t = "/fastpay/0/iframe_card_add/0&version=" + i.version + "&sp_no=" + i.sp_no + "&order_no=" + i.order_no + "&activity_no=" + i.activity_no + "&return_url=" + i.return_url + "&page_url=&sign=" + i.sign + "&sign_method=" + i.sign_method + "&custom_params=" + encodeURIComponent(n.json.stringify(o));
        e.close();
        e.iframe({
            title: "\u767e\u5ea6\u94b1\u5305\u5361\u53f7\u7ed1\u5b9a",
            content: a + t,
            width: 820,
            height: 570,
            autoDispose: !0,
            className: ""
        })
    };
    a.exports = {
        showDialog: t
    }
});;
/*!common:widget/js/logic/address-dialog/address-dialog.js*/
define("common:widget/js/logic/address-dialog/address-dialog",
function(i, e, s) {
    var t = i("common:widget/lib/jquery/jquery"),
    a = (i("common:widget/js/ui/base/base"), i("common:widget/js/ui/dialog/dialog")),
    d = i("common:widget/js/util/event/event"),
    l = (i("common:widget/js/logic/submit/submit"), i("common:widget/js/ui/address/address")),
    o = i("common:widget/js/logic/qianbao-iframe/qianbao-dialog");
    i("common:widget/lib/jquery.validate/jquery.validate");
    var n = {},
    c = t.createClass(function(i) {
        var e = this,
        s = {
            title: "",
            noCloseBtn: !1,
            url: "/shop/submit/setaddress"
        };
        t.extend(s, i),
        e.opt = s;
        var d = {
            content: "",
            width: 480,
            height: 260,
            autoDispose: !0,
            className: "ik-task-ex-dialog address-dialog"
        },
        l = '<h1>\u606d\u559c\u60a8\uff01\u5f00\u542f\u5b9d\u7bb1\u83b7\u5f97<span style="color:red"> ' + s.goodsName + "</span></h1>";
        if (s.sType && "noTitle" === s.sType && (l = ""), 3 == s.goodsType) {
            {
                s.noCloseBtn ? "": '<span class="close-dialog grid-r">X</span>'
            }
            d.content = ['<div class="dialog-container f-12">', '<div class="header">', '<span class="close-dialog grid-r">X</span>', '<div class="title f-bold">', l, "</div>", "\u8bf7\u586b\u5199\u6536\u8d27\u5730\u5740\uff0c\u8fd9\u4ef6\u5546\u54c1\u5c31\u4f1a\u6295\u5411\u60a8\u7684\u6000\u62b1\u5566~", "</div>", '<div class="main mt-10">', '<form id="add-form" class="add-form">', '<div class="line">', '<label id="lbl-name" for="ipt-name">\u6536\u4ef6\u4eba\u59d3\u540d\uff1a</label><input id="ipt-name" name="Name" value="', n.addName, '" />', "</div>", '<div class="line">', '<label id="lbl-province" for="sel-province">\u6240\u5728\u5730\u533a\uff1a</label>', '<div class="select" id="con-province">', '<select id="sel-province" data-save="', n.addProvince, '" name="Province"></select>', "</div>", '<div class="select" id="con-city">', '<select id="sel-city" name="City" data-save="', n.addCity, '"></select>', "</div>", '<div class="select" id="con-district">', '<select id="sel-district" name="District" data-save="', n.addDistrict, '"></select>', "</div>", "</div>", '<div class="line">', '<label id="lbl-address" for="ipt-address">\u8857\u9053\u5730\u5740\uff1a</label><input id="ipt-address" name="Address" value="', n.addStreet, '" />', "</div>", '<div class="line">', '<label id="lbl-zipcode" for="ipt-zipcode">\u90ae\u653f\u7f16\u7801\uff1a</label><input id="ipt-zipcode" name="ZipCode" value="', n.addZip, '" />', "</div>", '<div class="line">', '<label id="lbl-tel" for="ipt-tel">\u624b\u673a\u53f7\u7801\uff1a</label><input id="ipt-tel" type="tel" name="Tel" value="', n.addPhone, '" />', "</div>", "</form>", '<a class="submit-btn" id="submit-btn">\u786e\u8ba4\u63d0\u4ea4</a>', "</div>", '<div class="footer mt-10">', '<p class="f-red">\u8bf7\u786e\u8ba4\u60a8\u63d0\u4ea4\u7684\u4fe1\u606f\u6b63\u786e\uff0c\u63d0\u4ea4\u540e\u4e0d\u80fd\u4fee\u6539</p>', "<p>\u5982\u56e0\u586b\u5199\u4fe1\u606f\u9519\u8bef\u5bfc\u81f4\u672a\u80fd\u6536\u8d27\uff0c\u8d23\u4efb\u81ea\u8d1f</p>", "</div>", "</div>"].join(""),
            d.width = 850,
            d.height = 430
        } else {
            s.url = "/shop/submit/setTradeInfo";
            var l, c, r, p, m;
            d.className = "phone-dialog address-dialog ik-task-ex-dialog",
            5 == s.goodsType ? (c = "\u586b\u5199\u5b8c\u624b\u673a\u53f7\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u7ed9\u60a8\u7684\u624b\u673a\u5145\u503c\u5566~", r = '<label id="lbl-tel" for="ipt-tel">\u5145\u503c\u624b\u673a\u53f7\uff1a</label><span class="phone-pre">+86</span><input id="ipt-tel" class="ipt-exchange" type="tel" maxlength="11" name="tele" />', p = "\u624b\u673a\u53f7", exchangeDialogWarnRed = "\u8bf7\u786e\u4fdd\u60a8\u7684\u624b\u673a\u53f7\u6b63\u786e\u6709\u6548\uff0c\u4e00\u65e6\u63d0\u4ea4\uff0c\u4e0d\u53ef\u4fee\u6539", m = "<p>\u76ee\u524d\u4ec5\u652f\u6301\u4e2d\u56fd\u5927\u9646\u5730\u533a\u624b\u673a\u53f7</p>", exchangeDialogbutton = "\u786e\u8ba4\u63d0\u4ea4") : 6 == s.goodsType ? (c = "\u586b\u5199\u5b8cQQ\u53f7\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u9001\u60a8Q\u5e01\u5566~", r = '<label id="lbl-qq" for="ipt-qq">\u5145\u503cQQ\u53f7\uff1a</label><input id="ipt-qq" class="ipt-exchange" type="text" maxlength="20" name="qq" />', p = "QQ\u53f7", exchangeDialogWarnRed = "\u8bf7\u786e\u4fdd\u60a8\u7684QQ\u53f7\u6b63\u786e\u6709\u6548\uff0c\u4e00\u65e6\u63d0\u4ea4\uff0c\u4e0d\u53ef\u4fee\u6539", m = "", exchangeDialogbutton = "\u786e\u8ba4\u63d0\u4ea4") : 8 == s.goodsType && (c = "\u586b\u5199\u8981\u5145\u503c\u7684\u624b\u673a\u53f7\uff0c\u7ed1\u5361\u6210\u529f\u81ea\u52a8\u5145\u503c", r = '<label id="lbl-tel" for="ipt-tel">\u5145\u503c\u624b\u673a\u53f7\uff1a</label><span class="phone-pre">+86</span><input id="ipt-tel" class="ipt-exchange" type="tel" maxlength="11" name="tele" />', p = "\u624b\u673a\u53f7", exchangeDialogWarnRed = "\u767e\u5ea6\u94b1\u5305\u65b0\u7528\u6237\u4e13\u4eab\uff0c\u8bf7\u786e\u4fdd\u7ed1\u5b9a\u7684\u94f6\u884c\u5361\u672a\u4f7f\u7528\u8fc7\u767e\u5ea6\u94b1\u5305\uff0c\u5426\u5219\u5145\u503c\u5931\u8d25\uff01", m = "<p>\u76ee\u524d\u4ec5\u652f\u6301\u4e2d\u56fd\u5927\u9646\u5730\u533a\u624b\u673a\u53f7</p>", exchangeDialogbutton = "\u53bb\u7ed1\u5361"),
            d.content = ['<div class="dialog-container f-12">', '<div class="header">', '<span class="close-dialog grid-r">X</span>', '<div class="title f-bold">', l, "</div>", c, "</div>", '<div class="main mt-10">', '<form id="add-form" class="add-form">', '<div class="line" id="phone-wp">', r, "</div>", '<div class="line" id="phone-wp-c" style="display:none;">', '<span class="confirm-title">\u8bf7\u786e\u8ba4\u5145\u503c', p, '\uff1a</span><span class="confirm-content"></span>', "</div>", "</form>", '<div class="line" id="submit-wp-pre">', '<a class="submit-btn grid" id="submit-btn">', exchangeDialogbutton, "</a>", "</div>", '<div class="line" id="submit-wp" style="display:none;">', '<a class="submit-btn mr-10 grid" id="modify-btn">\u8fd4\u56de\u4fee\u6539</a>', '<a class="submit-btn grid" id="submit-btn-c">\u786e\u8ba4\u63d0\u4ea4</a>', "</div>", "</div>", '<div class="footer mt-10">', '<p class="f-red">', exchangeDialogWarnRed, "</p>", m, "</div>", "</div>"].join("")
        }
        dialog = new a(d),
        t(".address-dialog").find(".close-dialog").click(function() {
            dialog.close()
        }),
        e.init(),
        t("#submit-btn").click(function() {
            e.validate()
        }),
        t("#submit-btn-c").click(function() {
            if (8 == s.goodsType) {
                var e = t("#ipt-tel").val(),
                a = F.context("mybdpayinfo");
                F.context("qianbaoPostParams", {
                    tele: e,
                    type: "tele",
                    goodsId: i.params.goodsId,
                    tradeId: i.params.tradeId
                }),
                o.showDialog(a)
            }
        }),
        t("#modify-btn").click(function() {
            e.backConfirmInput()
        })
    }).extend({
        _init: function() {},
        submit: function() {
            var i = this,
            e = t.form.json(t("#add-form")[0]),
            s = {};
            3 == this.opt.goodsType ? (s = {
                name: e.Name,
                zipcode: e.ZipCode,
                address: e.Address,
                tel: e.Tel,
                province: e.Province,
                city: e.City,
                district: e.District,
                type: "new"
            },
            s.fullAddress = e.Province + e.City + (e.District || "") + e.Address) : (s = e, s.type = 6 == this.opt.goodsType ? "qq": "tele"),
            t.extend(s, i.opt.params),
            i.opt.closeSubmit ? dialog.close() : d.fire("dialog.close"),
            t.ajax({
                url: i.opt.url,
                type: "post",
                data: s,
                success: function(e) {
                    e.errno ? i.opt.errorDeal && i.opt.errorDeal(e) : i.opt.successDeal && i.opt.successDeal(e)
                }
            })
        },
        validate: function() {
            var i = this;
            t.validator.addMethod("notEmpty",
            function(i) {
                return t.trim(i) && "\u8bf7\u9009\u62e9" != i
            },
            ""),
            t("#add-form").validate({
                rules: {
                    Province: "notEmpty",
                    City: "notEmpty",
                    ZipCode: {
                        required: !0,
                        maxlength: 10
                    },
                    Address: {
                        required: !0,
                        maxlength: 50
                    },
                    Name: {
                        required: !0,
                        maxlength: 10
                    },
                    Tel: {
                        required: !0,
                        number: !0
                    }
                },
                messages: {
                    Province: "\u8bf7\u9009\u62e9\u7701\u4efd",
                    City: "\u8bf7\u9009\u62e9\u57ce\u5e02",
                    ZipCode: {
                        required: "\u8bf7\u586b\u5199\u90ae\u7f16",
                        maxlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u90ae\u7f16"
                    },
                    Address: {
                        required: "\u8bf7\u586b\u5199\u5730\u5740",
                        maxlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u5730\u5740"
                    },
                    Name: {
                        required: "\u8bf7\u586b\u5199\u59d3\u540d",
                        maxlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u59d3\u540d"
                    },
                    Tel: {
                        required: "\u8bf7\u586b\u5199\u7535\u8bdd\u53f7\u7801",
                        phone: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u7535\u8bdd\u53f7\u7801"
                    },
                    tele: {
                        required: "\u8bf7\u586b\u5199\u624b\u673a\u53f7\u7801",
                        digits: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u624b\u673a\u53f7\u7801",
                        maxlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u624b\u673a\u53f7\u7801",
                        minlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684\u624b\u673a\u53f7\u7801"
                    },
                    qq: {
                        required: "\u8bf7\u586b\u5199QQ\u53f7\u7801",
                        digits: "\u8bf7\u586b\u5199\u6b63\u786e\u7684QQ\u53f7\u7801",
                        maxlength: "\u8bf7\u586b\u5199\u6b63\u786e\u7684QQ\u53f7\u7801"
                    }
                },
                highlight: function(i, e) {
                    t(i).closest("input, .select").addClass(e)
                },
                unhighlight: function(i, e) {
                    t(i).closest("input, .select").removeClass(e)
                }
            });
            var e = t("#add-form").valid();
            e && (8 == i.opt.goodsType ? (i.confirmInput(), t.ajax({
                url: "/shop/mybdpayinfo",
                type: "get",
                success: function(i) {
                    i.errno || F.context("mybdpayinfo", i.mybdpayinfo)
                }
            })) : this.submit())
        },
        confirmInput: function() {
            t("#phone-wp").hide(),
            t(".confirm-content").text(t(".ipt-exchange").val()),
            t("#phone-wp-c").show(),
            t("#submit-wp-pre").hide(),
            t("#submit-wp").show(),
            t(".footer").hide()
        },
        backConfirmInput: function() {
            t("#phone-wp-c").hide(),
            t("#phone-wp").show(),
            t("#submit-wp").hide(),
            t("#submit-wp-pre").show(),
            t(".footer").show()
        },
        addressVisability: function(i) {
            t("#sel-city").show(),
            t("#con-city").css("visibility", ""),
            t("#lbl-city").css("visibility", ""),
            "none" == t("#sel-district").css("display") ? (t("#sel-district").show(), t("#con-district").css("visibility", "hidden"), t("#lbl-district").css("visibility", "hidden")) : i.value["sel-district"] && (t("#con-district").css("visibility", ""), t("#lbl-district").css("visibility", ""))
        },
        init: function() {
            var i = this,
            e = {
                container: ["#sel-province", "#sel-city", "#sel-district"],
                defaultValue: ["\u5317\u4eac", "\u6d77\u6dc0\u533a"]
            };
            t("#sel-province").data("save") && (e.defaultValue = [t("#sel-province").data("save"), t("#sel-city").data("save"), t("#sel-district").data("save")]);
            var s = new l(e);
            i.addressVisability(s),
            s.on("change",
            function() {
                i.addressVisability(s)
            })
        }
    });
    s.exports = {
        init: function(i) {
            new c(i)
        }
    }
});;
/*!common:widget/js/ui/tip/tip.js*/
define("common:widget/js/ui/tip/tip",
function(t, i, o) {
    var s = t("common:widget/lib/jquery/jquery"),
    e = t("common:widget/js/ui/base/base");
    t("common:widget/lib/jquery.ui/jquery.ui.tooltip"),
    o.exports = e(function(t) {
        var i = this;
        i.position = s.extend({
            my: "left top",
            at: "left bottom+10",
            collision: "none",
            using: function(o, e) {
                "popcms" != t.rightbottom && s(this).css(o),
                i.arrow && s("<div>").addClass("tip-arrow").addClass("tip-arrow-" + (i.direction || e[e.important])).html("<em></em><span></span>").appendTo(this),
                i.closebox && (s('<a href="#" class="tip-close" title="\u5173\u95ed">\xd7</a>').addClass(e.vertical).addClass(e.horizontal).click(function(t) {
                    t.preventDefault(),
                    i.autoDispose ? i.close() : i.hide(),
                    i.fire("closeall")
                }).appendTo(this), s(this).addClass("tip-has-close")),
                i.shadow && s(this).addClass("tip-shadow"),
                i.radius && s(this).addClass("tip-radius")
            }
        },
        t.position),
        delete t.position,
        i.content = "",
        i.target = "",
        i.tooltipClass = "",
        i.arrow = !0,
        i.closebox = !1,
        i.shadow = !0,
        i.radius = !0,
        i.autoDispose = !0,
        i.effect = !0
    }).extend({
        init: function(t) {
            var i = this;
            i.target = s(i.target),
            0 != i.target.size() && (i.target.attr("title") || i.target.attr("title", ""), i.target.tooltip({
                content: i.content,
                position: i.position,
                tooltipClass: i.tooltipClass,
                open: function(t) {
                    i.fire("onopen", t)
                },
                close: function(t) {
                    i.fire("onclose", t)
                }
            }), i.instance = i.target.data("ui-tooltip"), i.target.tooltip("open", {
                target: i.instance.element
            }), i._status = "show", t.autoDisplay === !1 && this.close())
        },
        getTipContainer: function() {
            return this.instance._find(s(this.target))
        },
        getTipBody: function() {
            return this.getTipContainer().find(".ui-tooltip-content")
        },
        getStatus: function() {
            return this._status
        },
        open: function() {
            var t = this.target;
            t.attr("title") || t.attr("title", ""),
            t.tooltip("open", {
                target: this.instance.element
            }),
            this._status = "show",
            this.fire("show")
        },
        show: function() {
            this.autoDispose ? this.open() : (this.getTipContainer()[this.effect ? "fadeIn": "show"](), this._status = "show")
        },
        close: function() {
            this.target.tooltip("close"),
            this._status = "hide"
        },
        hide: function() {
            this.autoDispose ? this.close() : (this.getTipContainer()[this.effect ? "fadeOut": "hide"](), this._status = "hide")
        }
    })
});;
/*!common:widget/js/logic/authcode/authcode.js*/
define("common:widget/js/logic/authcode/authcode",
function(t, a, e) {
    var i = t("common:widget/lib/jquery/jquery"),
    n = t("common:widget/js/ui/base/base"),
    u = t("common:widget/js/ui/dialog/dialog"),
    o = t("common:widget/js/ui/tip/tip"),
    c = t("common:widget/js/util/https/https"),
    s = n().extend({
        init: function() {
            var t = this;
            t._authData = {},
            t._authUrl = t.url || "/api/vcode",
            t._authId = "IK_AUTHCODE_" + t.guid,
            t._tip = new o({
                content: "\u8bf7\u70b9\u51fb\u540e\u8f93\u5165\u9a8c\u8bc1\u7801",
                direction: "bottom"
            }),
            t.container = i(t.container),
            (!t._authData[t._authId] || t.force) && (t._authData[t._authId] = {
                display: !1,
                show: !1
            },
            t._initAuthCode({
                callback: function() {
                    t._show(),
                    t._display(),
                    i.isFunction(t.callback) && t.callback.call(t)
                }
            }))
        },
        _show: function() {
            var t = this,
            a = i('<div class="ik-authcode-wrapper"></div>');
            a.append('<label class="ik-authcode-label">\u9a8c\u8bc1\u7801\uff1a</label>').append('<input class="ik-authcode-input" type="text" maxlength="4">').append('<img class="ik-authcode-img" src="about:blank" style="display: none; ">').append('<a class="ik-authcode-change" href="#" style="display: none; ">\u770b\u4e0d\u6e05\uff1f</a>').append('<div class="ik-authcode-error" style="display: none; ">\u9a8c\u8bc1\u7801\u9519\u8bef</div>'),
            t.className && a.addClass(t.className),
            t.container.append(a).show();
            var e = (t.getAuthElement("me._tip"), t.getAuthElement("error")),
            n = t.getAuthElement("input"),
            u = t.getAuthElement("img");
            authCodeChange = t.getAuthElement("change"),
            i.isFunction(t.initCallback) && t.initCallback(),
            t.container.mouseover(function() {
                t._authData[t._authId].display || (clearTimeout(t._mouseTimeOut), t._tip.show(n))
            }).mouseout(function() {
                t._mouseTimeOut = setTimeout(function() {
                    t._tip.hide()
                },
                200)
            }),
            authCodeChange.click(function(a) {
                t.change(function() {
                    n.focus().val(""),
                    e.hide()
                }),
                a.preventDefault()
            }),
            u.click(function() {
                authCodeChange.trigger("click")
            }).css("cursor", "pointer"),
            t.isDisplay && t._display()
        },
        _initAuthCode: function(t) {
            var a = this,
            e = a._authUrl + "?from=" + a.from + ("chat" === a.from ? "&forceHit=1": "");
            a.urlParams && (e += "&" + i.url.jsonToQuery(a.urlParams)),
            i.get(e + "&t=" + (new Date).getTime(),
            function(e) {
                0 == e.status && e.data.need_verify && (i.extend(a._authData[a._authId], {
                    vcodeStr: e.data.vcode_str,
                    imgUrl: c.autoTrans(e.data.imgurl),
                    display: !1,
                    show: !0,
                    from: a.from || ""
                }), i.isFunction(t.callback) && t.callback.call(e.data))
            },
            "json")
        },
        _display: function() {
            var t = this;
            t._authData[t._authId].display || (t.getAuthElement("img").attr("src", t._authData[t._authId].imgUrl).show(), t.getAuthElement("me._tip").hide(), t.getAuthElement("change").show(), t._authData[t._authId].display = !0)
        },
        _error: function() {
            this.getAuthElement("error").show(),
            this.getAuthElement("input").focus()
        },
        getAuthElement: function(t) {
            return i(".ik-authcode-" + t, this.container[0])
        },
        getCode: function() {
            var t = this;
            return t._authData[t._authId] && t._authData[t._authId].show ? {
                vcode_str: t._authData[t._authId].vcodeStr,
                vcode: t.getAuthElement("input").val()
            }: null
        },
        getFrom: function() {
            return this.from
        },
        submitParam: function(t) {
            return i.extend(t || {},
            this.getCode())
        },
        change: function(t) {
            var a = this;
            a._initAuthCode({
                callback: function() {
                    a._display(),
                    i.isFunction(t) && t(arguments)
                }
            })
        },
        dispose: function() {
            this.getAuthElement("wrapper").remove()
        },
        error: function() {
            var t = this;
            t._authData[t._authId] && t._authData[t._authId].show ? (t._error(), t._initAuthCode({
                callback: function() {
                    t._display();
                    var a = t.getAuthElement("input");
                    a.value = "",
                    a.focus()
                }
            })) : u.alert("\u7f51\u7edc\u5f02\u5e38\uff0c\u8bf7\u91cd\u65b0\u63d0\u4ea4")
        }
    });
    e.exports = s
});;
/*!common:widget/js/logic/category/category.js*/
define("common:widget/js/logic/category/category",
function(e, t, a) {
    var i = e("common:widget/lib/jquery/jquery"),
    l = e("common:widget/js/ui/base/base"),
    n = l(function() {
        var e = this;
        e.selectSize = 16,
        e.sourceUrl = "/classleveljs",
        e.splitor = ""
    }).extend({
        data: {},
        init: function() {
            var e = this;
            e.target && (e.target = i(e.target), e.data.level1 ? e._render() : i.ajax({
                url: e.sourceUrl,
                dataType: "script",
                scriptCharset: "gbk",
                crossDomain: !0,
                success: function() {
                    e.data = {
                        level1: class_level_1,
                        level2: class_level_2,
                        level3: class_level_3
                    },
                    e.isPGC && (e.data.level2.splice(7, 1), e.data.level2.splice(21, 1), e.data.level2.splice(42, 1), e.data.level2.splice(42, 1)),
                    e._render()
                }
            }))
        },
        _render: function() {
            var e = this;
            e.container = i("<div/>").addClass("category-box " + (e.className || "")).attr("id", "category-" + e.guid).appendTo(e.target),
            i.each([1, 2, 3],
            function(t, a) {
                i("<select/>").attr("size", e.selectSize).addClass("category-select-" + a).hide().appendTo(e.container).change(function() {
                    e._changeHandler(a, i(this)),
                    e.fire("change")
                }).after(i("<span/>").html(e.splitor).hide())
            }),
            e.selector = e.container.find("select"),
            e._buildOptions(e.selector.eq(0), e.data.level1),
            e.fire("init"),
            e.defaultValue && e.setValue(e.defaultValue)
        },
        _changeHandler: function(e, t) {
            var a = this,
            i = t.val();
            3 > e && (a.selector.eq(2).hide().empty().prev().hide(), i && a._buildOptions(a.selector.eq(e), a._getSubLevelData(i, e + 1), e, a.isPGC))
        },
        _getSubLevelData: function(e, t) {
            var a = this,
            l = [];
            return i.each(a.data["level" + t],
            function(t, a) {
                var i = [];
                i[0] = a[1],
                i[1] = a[2],
                e == a[0] && l.push(i)
            }),
            l
        },
        _buildOptions: function(e, t, a, l) {
            e && t && t.length && (e.empty().show().prev().show(), l || a && i(new Option("\u4e0d\u9009", 0)).appendTo(e).prop("selected", !0), i.each(t,
            function(t, a) {
                e.get(0) && e.get(0).options.add(new Option(a[1], a[0]))
            }))
        },
        setValue: function(e) {
            function t(e, i) {
                if (!e || 0 == i) return void 0;
                i = i || 3;
                for (var l = a.data["level" + i], n = 0, r = l.length; r > n; n++) {
                    var s = l[n];
                    if (1 == i) {
                        if (e == s[0]) return [e, "0", "0"]
                    } else if (e == s[1]) {
                        var c = 2 == i ? s: t(s[0], 2);
                        return [c[0], c[1], 3 == i ? e: "0"]
                    }
                }
                return t(e, --i)
            }
            var a = this;
            "undefined" != typeof e && (i.isArray(e) ? i.each(e,
            function(e, t) {
                a.selector.eq(e).val(t || "0").change()
            }) : a.setValue(t(e)))
        },
        getValue: function() {
            var e = this,
            t = {
                cid: 0,
                name: "",
                arrCid: [],
                arrName: []
            };
            return e.selector.each(function(e) {
                this.value && "0" != this.value && (t.cid = t.arrCid[e] = this.value, t.name = t.arrName[e] = i(this.options[this.selectedIndex]).text())
            }),
            t.cid ? t: !1
        }
    });
    a.exports = n
});;
/*!common:widget/js/util/uri/uri.js*/
define("common:widget/js/util/uri/uri",
function(t, m, o) {
    var a = (t("common:widget/lib/jquery/jquery"), {
        bindok: "/static/common/html/bindok.html",
        jump: "/static/common/html/jump.html",
        map: "/static/common/html/map.html",
        qbasktoteam: "/static/common/html/qbasktoteam.html",
        username: "/static/common/html/username.html",
        v2Jump: "/static/common/html/v2Jump.html",
        v3Jump: "/static/common/html/v3Jump.html",
        xd: "/static/common/html/xd.html",
        addmapBrowse: "/static/common/html/map_add_for_browse.html",
        addmapAddress: "/static/common/html/map_add_address.html",
        userSetJump: "/static/common/html/user_set_jump.html",
        fileUploaderSwf: "/static/common/swf/fileUploader.3a1c6cc.swf",
        uploadSwf: "/static/common/swf/upload.6c721a5.swf",
        webuploaderSwf: "/static/common/swf/webuploader.8e6362e.swf"
    });
    "https:" === location.protocol && (a = {
        bindok: "/static/common/https-html/bindok.html",
        jump: "/static/common/https-html/jump.html",
        map: "/static/common/https-html/map.html",
        qbasktoteam: "/static/common/https-html/qbasktoteam.html",
        username: "/static/common/https-html/username.html",
        v2Jump: "/static/common/https-html/v2Jump.html",
        v3Jump: "/static/common/https-html/v3Jump.html",
        xd: "/static/common/https-html/xd.html",
        addmapBrowse: "/static/common/https-html/map_add_for_browse.html",
        addmapAddress: "/static/common/https-html/map_add_address.html",
        userSetJump: "/static/common/https-html/user_set_jump.html",
        fileUploaderSwf: "/static/common/swf/fileUploader.3a1c6cc.swf",
        uploadSwf: "/static/common/swf/upload.6c721a5.swf",
        webuploaderSwf: "/static/common/swf/webuploader.8e6362e.swf"
    }),
    o.exports = a
});;
/*!common:widget/js/logic/login/login.js*/
define("common:widget/js/logic/login/login",
function(o, n) {
    function e() {
        window.location.reload(!0)
    }
    function i() {
        c.fire("login.log")
    }
    function t() {}
    var s = T = o("common:widget/js/util/tangram/tangram"),
    c = o("common:widget/js/util/event/event"),
    u = o("common:widget/js/util/uri/uri"),
    a = o("common:widget/js/ui/dialog/dialog"),
    r = null,
    l = null,
    g = !1,
    p = !1,
    f = "//passport.baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + +new Date,
    m = "/api/loginInfo",
    h = location.href.indexOf("http:") ? "https:": "http:",
    d = {
        registerLink: "https://passport.baidu.com/v2/?reg&tpl=ik&color=green&u=" + escape(top.location.href),
        onLoginSuccess: e,
        onLoginFailure: i,
        onSubmitedErr: t,
        cache: !0,
        tangram: !0,
        color: "green",
        apiOpt: {
            product: "ik",
            charset: F.context("PageCharset") || "GBK",
            u: window.top.location.href,
            qrcode: 3,
            staticPage: h + "//" + location.hostname + u.v3Jump
        },
        onshow: function() {}
    },
    S = {
        type: "accRealName",
        apiOpt: {
            product: "ik",
            staticPage: h + "//passport.baidu.com/passApi/html/jump.html"
        },
        tangram: !0,
        color: "green",
        onHide: function() {},
        onSubmitSuccess: function() {}
    };
    d.authsite = ["qzone", "tsina", "renren"],
    d.authsiteCfg = {
        tpl: "ik",
        display: "popup",
        u: window.top.location.href,
        jumpUrl: h + "//zhidao.baidu.com" + u.xd,
        onBindSuccess: d.onLoginSuccess,
        onBindFailure: d.onSubmitedErr
    },
    c.on("login.log",
    function(o, e) {
        var i = e && s.isFunction(e.onLoginSuccess) ? e.onLoginSuccess: d.onLoginSuccess;
        if (e && e.sms) {
            var t = "\u65e0\u9700\u767e\u5ea6\u5e10\u53f7\uff0c\u8f93\u5165\u624b\u673a\u53f7\u5373\u53ef\u514d\u8d39\u63d0\u95ee";
            e.psFlag && (t = "\u9a8c\u8bc1\u5373\u767b\u5f55\uff0c\u6ca1\u6709\u767e\u5ea6\u5e10\u53f7\u4e5f\u53ef\u4ee5\u4f7f\u7528", d.img = "https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/ui/sms-login-bg.jpg"),
            s.extend(d.apiOpt, {
                sms: e.sms,
                smsText: t
            }),
            d.authsite = []
        }
        d.onLoginSuccess = function(o) {
            c.fire("dialog.close"),
            c.fire("login.check", {
                sync: e && e.sync,
                isLogin: function(o) {
                    o.isFilter && c.fire("login.filter", {
                        type: "set",
                        filterInfo: o.isFilter
                    }),
                    i(o)
                },
                noLogin: function() {}
            }),
            o.returnValue = !1
        },
        g ? r && r.show() : (s.getScript(f,
        function() {
            r = passport.pop.init(d),
            r.show(),
            s.extend(n, r)
        }), g = !0)
    }),
    c.on("login.realName",
    function(o, i) {
        i = i || {},
        S.onHide = i.onHide || t,
        S.onSubmitSuccess = i.onSubmitSuccess || e,
        i && i.onHide && (S.onHide = function() {
            i.onHide()
        }),
        i && i.onSubmitSuccess && (S.onSubmitSuccess = function() {
            i.onSubmitSuccess()
        }),
        p ? l && l.show() : (s.getScript(f,
        function() {
            l = passport.pop.init(S),
            l.show(),
            s.extend(n, l)
        }), p = !0)
    }),
    c.on("login.check",
    function(o, n) {
        n = n || {},
        d.onLoginSuccess = n.isLogin || e,
        d.onLoginFailure = n.noLogin || i,
        s.ajax({
            url: m + "?t=" + (new Date).getTime(),
            async: n && n.sync ? !1 : !0,
            dataType: "html",
            success: function(o, n, e) {
                var i = s.json.parse(e.responseText),
                t = F.context("user") || {};
                return 1 == i.isLogin ? (t.isLogin = !0, t.id = i.userId, t.wealth = i.userWealth, t.stoken = i.stoken, d.onLoginSuccess(i)) : (t.isLogin = !1, d.onLoginFailure()),
                !0
            }
        })
    }),
    c.on("login._success",
    function() {
        d.onLoginSuccess()
    }),
    c.on("login.setUsername",
    function(o, n) {
        function e() {
            var o = a.iframe({
                content: u.username + i,
                title: n.titleText || "\u4f60\u8fd8\u6ca1\u6709\u7528\u6237\u540d\uff0c\u8d77\u4e00\u4e2a\u597d\u542c\u7684\u7528\u6237\u540d\u5427\uff01",
                width: 430,
                height: 170,
                autoDispose: !0
            });
            c.on("setusername.update",
            function(n, e) {
                o && o.setSize({
                    width: e.width,
                    height: e.height
                })
            })
        }
        n = n || {},
        n.onSetSuccess || (n.onSetSuccess = function() {
            window.location.reload(!0)
        }),
        d.onLoginSuccess = n.onSetSuccess;
        var i = "?" + (n.patch ? n.patch + "&": "") + "t=" + (new Date).getTime();
        c.fire("login.check", {
            isLogin: function() {
                var o = F.context("user") || {};
                o.isNoUserName ? e() : n.onSetSuccess()
            },
            noLogin: function() {
                c.fire("login.log", {
                    onLoginSuccess: e
                })
            }
        })
    }),
    c.on("login.filter",
    function(o, n) {
        if ("set" == n.type) T.cookie.set("IK_USER_FILTER", n.filterInfo.reason, {
            path: "/",
            expires: 6e4
        }),
        T.cookie.set("IK_USER_FILTERI", n.filterInfo.lastLoginIp, {
            path: "/",
            expires: 6e4
        }),
        T.cookie.set("IK_USER_FILTERT", n.filterInfo.lastLoginTime, {
            path: "/",
            expires: 6e4
        });
        else if ("check" == n.type && 16 == parseInt(T.cookie.get("IK_USER_FILTER"))) {
            var e = new a({
                width: 350,
                height: 200,
                title: "\u77e5\u9053\u63d0\u793a",
                content: "\u7531\u4e8e\u60a8\u7684\u5e10\u53f7\u5b58\u5728\u5f02\u5e38\u98ce\u9669\uff0c\u6211\u4eec\u6682\u65f6\u51bb\u7ed3\u4e86\u60a8\u7684\u5e10\u53f7\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8d26\u53f7\u7533\u8bc9\u6765\u89e3\u9664\u51bb\u7ed3\u72b6\u6001",
                buttons: [{
                    text: "\u8fdb\u884c\u8d26\u53f7\u7533\u8bc9",
                    click: function() {
                        window.open("/feedback/account.html"),
                        e.close()
                    }
                },
                {
                    text: "\u53d6\u6d88",
                    click: function() {
                        e.close()
                    }
                }],
                autoDispose: !0
            });
            T.cookie.remove("IK_USER_FILTER", {
                path: "/"
            }),
            T.cookie.remove("IK_USER_FILTERI", {
                path: "/"
            }),
            T.cookie.remove("IK_USER_FILTERT", {
                path: "/"
            })
        }
    }),
    c.on("dialog.close",
    function() {
        r && r.hide && r.hide()
    }),
    c.on("login.success",
    function() {
        e()
    }),
    function() {
        c.fire("login.filter", {
            type: "check"
        })
    } ()
});;
/*!common:widget/js/logic/mini-editor/mini-editor.js*/
define("common:widget/js/logic/mini-editor/mini-editor",
function(t, e, n) {
    var i = t("common:widget/js/util/tangram/tangram"),
    o = t("common:widget/js/util/event/event"),
    a = t("common:widget/js/ui/base/base"),
    r = a(function() {
        var t = this;
        t.maxLength = 200,
        t.countByte = !1,
        t.className = "",
        t.name = "mini-editor",
        t.defaultContent = ""
    }).extend({
        init: function() {
            var t = this;
            t.target = i(t.target),
            t.container = i("<div/>").attr("id", t.guid + t.name).addClass(t.name).addClass(t.className).appendTo(t.target),
            i("<textarea/>").attr("id", t.guid + "textarea").appendTo(t.container).val(t.defaultContent),
            i("<p/>").attr("id", t.guid + "limit").addClass("mini-editor-limit").hide().appendTo(t.container).html(t.maxLength),
            t._getElement("textarea").on("change keyup",
            function() {
                t.fire("change", this)
            }).keydown(function(e) {
                e.ctrlKey && 13 == e.keyCode && (t.fire("submit"), this.blur())
            }).focus(function() {
                t.getContent() == t.defaultContent && t.setContent(""),
                t.container.css({
                    borderColor: "#4aca6d"
                }),
                t._getElement("textarea").css("color", "#333"),
                t.fire("focus")
            }).blur(function() {
                t.container.css("borderColor", "#d2dbe1"),
                "" == t.getContent() && t.setContent(t.defaultContent),
                t.fire("blur")
            }),
            t.on("change",
            function(e, n) {
                var a = t.getContent(),
                r = t.countByte ? i.string(a).getByteLength() : a.length,
                s = t.maxLength - r,
                l = t._getElement("limit");
                1 > s && (t.setContent(t.countByte ? i.string(a).subByte(t.maxLength) : a.substr(0, t.maxLength)), s = 0),
                1 > s ? l.addClass("mini-editor-alert") : l.removeClass("mini-editor-alert"),
                l.html(s).hide();
                var d = i(n).removeClass("longer").css("width", "").css("line-height");
                n.scrollHeight > 1.5 * (parseFloat(d) || 24) ? (i(n).addClass("longer"), o.fire("expand"), l.show(), i.browser.isGecko && i(n).css({
                    width: t.width || "100%",
                    "overflow-y": "scroll"
                })) : (i.browser.isGecko && i(n).css("overflow-y", ""), o.fire("shrink"))
            })
        },
        _getElement: function(t) {
            return t ? this.container.find("#" + this.guid + t) : this.container
        },
        getElement: function(t) {
            return this._getElement(t).get(0)
        },
        getContent: function() {
            return i.string(this._getElement("textarea").val()).trim()
        },
        setContent: function(t) {
            return this._getElement("textarea").val(t)
        }
    });
    n.exports = r
});;
/*!common:widget/js/logic/comment/comment.js*/
define("common:widget/js/logic/comment/comment",
function(e, t, n) {
    var a = e("common:widget/js/util/tangram/tangram"),
    o = e("common:widget/js/ui/base/base"),
    i = e("common:widget/js/util/event/event"),
    r = (e("common:widget/js/logic/login/login"), e("common:widget/js/logic/authcode/authcode")),
    c = e("common:widget/js/logic/submit/submit"),
    d = e("common:widget/js/ui/dialog/dialog"),
    s = e("common:widget/js/logic/mini-editor/mini-editor"),
    l = o(function() {
        var e = this;
        e.name = "comment-area",
        e.rn = 10,
        e.pn = 0,
        e.targetTxt = "\u8bc4\u8bba",
        e.btnTxt = "\u63d0\u4ea4",
        e.dispNum = 0,
        e.hasLoading = !0,
        e.hasArrow = !1,
        e.hasAuthcode = !1,
        e.hasRemove = !0,
        e.hasForbidden = !0,
        e.hasHide = !1,
        e.defaultStatus = "show"
    }).extend({
        init: function() {
            var e = this;
            e.target = a(e.target),
            e.targetCon = a(e.targetCon),
            "show" == e.defaultStatus ? (e.container || e._renderDom(), e.show()) : "hide" == e.defaultStatus && e.target.click(function(t) {
                t.preventDefault(),
                e.container || e._renderDom(),
                "hide" == e.getStatus() ? e.show() : e.hide()
            })
        },
        _getElement: function(e) {
            return a("#" + this.guid + (e || this.name))
        },
        _createElement: function(e, t, n) {
            var o = this;
            return a("<" + e + "/>").attr("id", o.guid + t).addClass(n)
        },
        getStatus: function() {
            return "none" == this.container.css("display") ? "hide": "show"
        },
        _renderDom: function() {
            var e = this;
            if (e.container = e._createElement("div", e.name, e.name).hide(), e.targetCon.append(e.container), e.hasArrow) {
                var t = ['<div class="comment-arrow">', "<em></em><span></span>", "</div>"].join("");
                e.container.append(t),
                e.fire("setArrowPos", {
                    arrowTarget: e.commentArea.find(".comment-arrow")
                }),
                0 == e.dispNum && e.container.addClass("no-comment")
            }
            var n = e._createElement("div", "inner", "comment-area-inner"),
            a = e._createElement("div", "bar", "comment-bar line"),
            o = e._createElement("div", "body", "comment-body line"),
            c = e._createElement("div", "action", "comment-action"),
            d = e._createElement("a", "submit", "comment-submit").prop({
                title: "\u6309 Ctrl+Enter " + e.btnTxt
            }).html(e.btnTxt).click(function(t) {
                t.preventDefault(),
                e.submit()
            }),
            l = e._createElement("a", "cancel", "comment-cancel f-aid").html("\u53d6\u6d88").click(function(t) {
                t.preventDefault(),
                e.hide()
            });
            e.editor = new s({
                target: a,
                defaultContent: "\u5199\u4e0b\u4f60\u7684\u8bc4\u8bba",
                onsubmit: function() {
                    e.submit()
                },
                onfocus: function() {
                    e.hasAuthcode && (e.authcode = e.authcode || new r({
                        container: e._getElement("bar"),
                        from: "new_comment",
                        className: "mt-5"
                    })),
                    i.fire("comment.editorFocus", e)
                }
            }),
            e.hasHide && c.append(l),
            c.append(d),
            n.append(a.append(c)).append(o),
            e.container.append(n)
        },
        _renderList: function(e) {
            var t = this,
            n = t._getElement("body").empty();
            if (! (e.total_count > 0)) return t.target.html(t.targetTxt),
            void t.container.addClass("no-comment");
            if (t.target.html(t.targetTxt + "(" + e.total_count + ")"), t.container.removeClass("no-comment"), e.data && e.data.length > 0 && (t.curPageData = {
                firstReplyId: parseInt(e.data[0].reply_id, 10),
                lastReplyId: parseInt(e.data[e.data.length - 1].reply_id, 10),
                currentPn: t.pn,
                total: e.total_count,
                count: e.response_count
            },
            0 == t.pn && (t.firstPageData = a.object.clone(t.curPageData)), a.each(e.data,
            function(o, i) {
                var r, c, d = a("<div/>").addClass("comment-entry f-12"),
                s = a.string((i.title.indexOf("#") > 0 ? "": i.title) + i.content).decodeHTML().replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\"/g, "&quot;").replace(/\'/g, "&#39;");
                if (!i.user_name || i.user_name.indexOf("#") > 1 ? c = r = "\u70ed\u5fc3\u7f51\u53cb": (r = ['<a class="f-light" href="http://www.baidu.com/p/' + i.user_name + '?from=zhidao" target="_blank">', a.string(i.user_name).encodeHTML(), "</a>"].join(""), c = i.user_name), d.html(['<div class="details f-aid">', r, '<span class="ml-10">', a.date.format(new Date(1e3 * i.create_time), "yyyy-M-d HH:mm"), "</span>", "</div>", '<div class="comment-content">', s, '<a class="reply-comment ml-5 f-light" href="#">\u56de\u590d</a>', "</div>"].join("")), n.append(d), 0 == o && d.addClass("first"), o == e.data.length - 1 && d.addClass("last"), t.hasRemove) {
                    var l = F.context("user").name == i.user_name ? 1 : 0,
                    m = F.context("user").internalAdmin,
                    u = m && m.bitAuth || {};
                    if (l || u.comment_delete) {
                        var g = a('<div class="comment-admin grid-r"/>').prependTo(d),
                        p = a('<a href="#" class="comment-delete i-del" title="\u5220\u9664\u8fd9\u6761\u8bc4\u8bba"/>').click(function(e) {
                            e.preventDefault(),
                            t.remove(i.reply_id)
                        }).appendTo(g).hide();
                        u.comment_delete ? p.show() : d.mouseover(function() {
                            p.show()
                        }).mouseout(function() {
                            p.hide()
                        })
                    }
                }
                if (t.hasForbidden) {
                    var f = i.user_name,
                    h = !i.user_name || i.user_name.indexOf("#") > 1,
                    m = F.context("user").internalAdmin,
                    u = m && m.bitAuth || {};
                    if (u.user_band && !h) {
                        var g = a('<div class="comment-admin grid-r"/>').prependTo(d);
                        a('<a href="#" class="comment-forbidden btn-24-white ml-10">\u5c01\u7981\u7528\u6237</a>').click(function(e) {
                            e.preventDefault(),
                            t.forbidden(f)
                        }).appendTo(g)
                    }
                }
                d.find(".reply-comment").click(function(e) {
                    e.preventDefault(),
                    t.editor.setContent("\u56de\u590d " + c + "\uff1a "),
                    t.replyToUser = i.user_name,
                    t.replyToId = i.reply_id,
                    t.replyTosUser = c;
                    var n = t.editor.getElement("textarea"),
                    o = n.value.length - 1;
                    if (n.setSelectionRange) n.setSelectionRange(o, o);
                    else if (n.createTextRange) {
                        var r = n.createTextRange();
                        r.move("character", o),
                        r.select()
                    }
                    a(n).change(),
                    n.focus();
                    var o = t.container.offset();
                    a("body").scrollTop() > o.top && window.scroll(0, o.top - 30)
                })
            }), e.total_count > t.rn)) {
                var o = t.container.offset();
                a("body").scrollTop() > o.top && window.scroll(0, o.top - 30);
                var i = a("<p/>").addClass("comment-pager pager h-center pt-5 pb-15").attr("id", t.guid + "page");
                i.appendTo(n),
                t._renderPager()
            }
        },
        _renderPager: function() {
            function e(e, o, i) {
                var r = '<a href="#"/>';
                a(r).html(e).addClass(i).click(function(e) {
                    e.preventDefault(),
                    t._getPageData(o)
                }).appendTo(n)
            }
            var t = this,
            n = t._getElement("page").empty(),
            o = 4,
            i = 5,
            r = 10,
            c = t.pn,
            d = t.rn,
            s = t.curPageData.total;
            if (d >= s) return "";
            var l = Math.floor(c / d),
            m = Math.ceil(s / d),
            u = 0,
            g = m;
            m > r && (o >= l ? (u = 0, g = r) : l + i >= m ? (u = m - r, g = m) : (u = l - o, g = u + r), l > o && e("\u9996\u9875", 0, "pager-first")),
            u != l && e("<\u4e0a\u4e00\u9875", c - d, "pager-pre");
            for (var p = u; g > p; p++) p == l ? a("<b/>").addClass("mr-5").html(p + 1).appendTo(n) : e(p + 1, p * d);
            return m - 1 > l && e("\u4e0b\u4e00\u9875>", c + d, "pager-next"),
            m > r && m > l + i + 1 && e("\u5c3e\u9875", (m - 1) * d, "pager-last"),
            n
        },
        _getPageData: function(e) {
            var t = this;
            t.pn = e || 0;
            var n = a.url.jsonToQuery({
                method: "get_reply",
                app: "article",
                thread_id: t.threadId,
                encoding: "gbk",
                start: t.pn,
                limit: t.rn,
                r: (new Date).getTime()
            });
            a.get("/api/comment?" + n,
            function(e) {
                t._renderList(e),
                t.fire("dataloaded"),
                t.fire("show")
            },
            "json")
        },
        show: function() {
            var e = this;
            e.once("dataloaded",
            function() {
                e._getElement("loading").hide(),
                a(e._getElement()).slideDown(300)
            }),
            e.curPageData ? e.fire("dataloaded") : (e.hasLoading && !e._getElement("loading") && e._createElement("div", "loading", "comment-loading").html('<img src="https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/ask/loading.gif" width="20" height="20" alt="loading..." />').insertBefore(e.container), e._getPageData())
        },
        hide: function() {
            var e = this;
            a(e._getElement()).slideUp(300)
        },
        submit: function() {
            var e = this,
            t = e.editor.getContent();
            if (commentLen = e.editor.countByte ? a.string(t).getByteLength() : t.length, restLen = e.editor.maxLength - commentLen, t == e.editor.defaultContent) return void d.alert('<p class="mt-20 h-center">\u60a8\u8f93\u5165\u7684\u8bc4\u8bba\u5185\u5bb9\u4e3a\u7a7a</p>');
            if (! (0 > restLen)) {
                var n = {
                    cm: 100678,
                    app: "article",
                    thread_id: e.threadId,
                    content: t,
                    reply_id: F.context("user").id
                }; !! e.replyTosUser && a.extend(n, {
                    sun: e.replyTosUser
                }),
                e.authcode && e.authcode.submitParam(n),
                i.fire("login.check", {
                    isLogin: function() {
                        if ("1" === F.context("user").isRealName) i.fire("login.realName", {
                            onHide: function() {}
                        });
                        else {
                            new c({
                                url: "/submit/ajax",
                                syncId: "commentReply",
                                dataType: "json",
                                params: n,
                                hasJump: !1,
                                autoRefresh: !0,
                                beforeJump: function() {
                                    e.editor.setContent("").change(),
                                    e.replyToUser = "",
                                    e.replyToId = "",
                                    e.replyTosUser = "",
                                    e.once("dataloaded",
                                    function() {
                                        var t = e.container.find(".first").get(0);
                                        a(t).fadeIn(function() {
                                            t.style && t.style.zoom && (t.style.zoom = "1")
                                        })
                                    }),
                                    e._getPageData(0),
                                    e.authcode && (e.authcode.dispose(), e.authcode = null)
                                },
                                authcode: e.authcode || null
                            })
                        }
                    },
                    noLogin: function() {
                        i.fire("login.log", {
                            onLoginSuccess: function() {
                                if ("1" === F.context("user").isRealName) i.fire("login.realName", {
                                    onHide: function() {}
                                });
                                else {
                                    new c({
                                        url: "/submit/ajax",
                                        syncId: "commentReply",
                                        dataType: "text",
                                        params: n,
                                        hasJump: !1,
                                        autoRefresh: !0,
                                        beforeJump: function() {
                                            location.reload()
                                        }
                                    })
                                }
                            }
                        })
                    }
                })
            }
        },
        remove: function(e) {
            {
                var t = this;
                d.confirm('<div class="h-center f-14 pt-20">\u786e\u5b9a\u8981\u5220\u9664\u8be5\u8bc4\u8bba\u5417\uff1f</div>', {
                    width: 360,
                    height: 150,
                    titleText: "\u77e5\u9053\u63d0\u793a",
                    onaccept: function() {
                        var n = {
                            cm: 100679,
                            app: "article",
                            thread_id: t.threadId,
                            reply_id: e
                        };
                        i.fire("login.check", {
                            isLogin: function() {
                                new c({
                                    url: "/submit/ajax/",
                                    params: n,
                                    hasJump: !1,
                                    autoRefresh: !0,
                                    beforeJump: function() {
                                        i.fire("dialog.close");
                                        var e = t.pn;
                                        t.curPageData.count <= 1 && (e = e && e - t.rn),
                                        t.curPageData = a.object.clone(t.firstPageData),
                                        t._getPageData(0 > e ? 0 : e)
                                    }
                                })
                            }
                        })
                    }
                })
            }
        },
        forbidden: function(e) {
            d.confirm('<div class="h-center f-14 pt-20">\u786e\u5b9a\u8981\u5c01\u7981\u8be5\u7528\u6237\u5417\uff1f</div>', {
                width: 360,
                height: 150,
                titleText: "\u77e5\u9053\u63d0\u793a",
                onaccept: function() {
                    window.open("/misc/usermanager?un=" + a.url.escapeSymbol(e) + "&ie=gbk"),
                    i.fire("dialog.close")
                }
            })
        }
    });
    n.exports = l
});;
/*!common:widget/js/logic/complain/complain.js*/
define("common:widget/js/logic/complain/complain",
function(e, t, o) {
    function i() {
        a.fire("dialog.close");
        var e = "\u60a8\u7684\u7533\u8bc9\u5df2\u7ecf\u63d0\u4ea4\uff0c\u5de5\u4f5c\u4eba\u5458\u6b63\u5728\u5904\u7406\uff0c\u6211\u4eec\u4f1a\u572848\u5c0f\u65f6\u5185\u7ed9\u60a8\u7b54\u590d\uff0c\u5e26\u6765\u4e0d\u4fbf\uff0c\u8bf7\u8c05\u89e3\u3002";
        c.alert(e, {
            onaccept: function() {
                window.location.reload(!0)
            }
        }),
        setTimeout(function() {
            a.fire("dialog.close"),
            window.location.reload(!0)
        },
        3e3)
    }
    var n = e("common:widget/js/util/tangram/tangram"),
    a = e("common:widget/js/util/event/event"),
    c = e("common:widget/js/ui/dialog/dialog"),
    d = e("common:widget/js/logic/submit/submit"),
    l = e("common:widget/js/logic/authcode/authcode");
    o.exports = function(e, t, o, a) {
        function r() {
            s.getAuthElement("input").css("border", "1px solid red")
        }
        var s, m = '<span style="width:78px;font-weight: bold;vertical-align: top;">\u7533\u8bc9\u7406\u7531\uff1a</span><textarea id="complain-dialog" cols="37" rows="5" maxlength="1000" style="width:290px;height:90px;border:1px solid #000;"></textarea>',
        u = {
            cm: 100043,
            qid: e,
            type: 100001
        },
        p = {
            title: "\u77e5\u9053\u63d0\u793a",
            height: 290,
            width: 400,
            autoDispose: !0
        }; !! t && n.extend(u, {
            aid: t,
            type: 100009
        }),
        "object" == n.type(a) && n.extend(u, a);
        var g = c.confirm(m, n.extend({
            type: "confirm",
            onaccept: function() {
                return 3 == o ? void i() : (u.appeal_reason = n.trim(n("#complain-dialog").val()), 2 == o && n.extend(u, {
                    mode_type: "realtime"
                }), n.extend(u, s.getCode()), 4 != n.trim(u.vcode).length ? void r() : void new d({
                    params: u,
                    syncId: e,
                    beforeJump: i,
                    errorDeal: function(e, t) {
                        var o = (t.data, t.errorNo);
                        12302 == o && (s.getAuthElement("input").css("border", "1px solid red"), s.change(function() {
                            s.getAuthElement("input").val("")
                        }))
                    }
                }))
            }
        },
        p));
        s = new l({
            container: g.instance,
            from: "new_complain",
            isDisplay: !0,
            className: "ik-authcode-s1",
            initCallback: function() {
                s.getAuthElement("input").focus(function() {
                    n(this).css("border", "1px solid #d5d5d5")
                }),
                s.getAuthElement("change").click(function() {
                    s.getAuthElement("input")[0].focus()
                })
            }
        })
    }
});;
/*!common:widget/js/logic/jump-top/jump-top.js*/
define("common:widget/js/logic/jump-top/jump-top",
function(i, n, a) {
    function e(i) {
        if (! (i.url && i.img && i.on && i.off)) return "";
        var n = d.date.parse(i.on),
        a = d.date.parse(i.off),
        e = 1e3 * F.context("now");
        if (n > e || e > a) return "";
        i.h = parseInt(i.h, 10) || "",
        i.img = u.autoTrans(i.img);
        var t = ['<a class="gb-pr-lk" target="_blank"', ' href="' + i.url + '"', ' style="', i.h ? "height:" + i.h + "px;": "", "background: url(" + i.img + ") no-repeat;", '"', "></a>"];
        return t.join("")
    }
    function t(i) {
        return ['<div class="jump-goto-naire">', '<a href="' + i + '" target="_blank">\u6709\u5956\u95ee\u5377</a>', "</div>"].join("")
    }
    function s(i) {
        var n = "";
        return /^\/(user\/admin|uadmin)/i.test(location.pathname) ? n = "&rt=2": /^\/shop/i.test(location.pathname) ? n = "&rt=3": /^\/business/i.test(location.pathname) && (n = "&rt=4"),
        ['<div class="jump-feedback">', '<a href="/feedback?pl=', i || "1", n, '" target="_blank">\u610f\u89c1\u53cd\u9988</a>', "</div>"].join("")
    }
    function o(i) {
        var n = "";
        n = "1" === i ? "/business/admin/index": "2" === i ? "/business/admin/qlist": "/mavin/home/index";
        var a = ['<div class="jump-goto-mavin">', '<a href="', n, '" data-type="', i, '" target="_blank"><i></i><span>\u8fdb\u5165\u884c\u5bb6\u5de5\u4f5c\u5ba4<span></a>', "</div>"].join("");
        return a
    }
    function r(i) {
        var i = parseInt(i);
        i > 99 && (i = "99+");
        var n = ['<div class="jump-goto-unread">', '<i class="unread-total">' + i + '</i><div class="message-icon"><a href="javascript:void(0)"></a></div><div class="unread-list-container"></div>', "</div>"].join("");
        return n
    }
    var d = i("common:widget/js/util/tangram/tangram"),
    l = i("common:widget/js/util/log/log"),
    u = (i("common:widget/js/ui/dialog/dialog"), i("common:widget/js/util/https/https")),
    c = ['<div class="jump-top">', '<a href="#" target="_self">\u8fd4\u56de\u9876\u90e8</a>', "</div>"].join(""),
    m = ['<div class="jump-profhelp">', '<a href="http://wpa.qq.com/msgrd?v=3&uin=2725326332&site=qq&menu=yes" target="_blank">\u5728\u7ebf\u5ba2\u670d</a>', "</div>"].join(""),
    p = ['<div class="jump-task-list">', '<a class="open-task-list" data-action="open-task-list">\u4efb\u52a1\u5217\u8868</a>', "</div>"].join("");
    a.exports = function(i) {
        function n(i) {
            "undefined" == typeof window.CLIENT_WIN || window.CLIENT_WIN && window.CLIENT_WIN.closed ? (window.CLIENT_WIN = window.open(i, "serverwin", "width=1150,height=680,status=no,resizable=yes"), (null == window.CLIENT_WIN || window.CLIENT_WIN.document.location.href != i) && (window.CLIENT_WIN = window.open(i, "serverwin", "width=1150,height=680,status=no,resizable=yes"))) : window.CLIENT_WIN.focus()
        }
        function a(i) {
            d.get("/business/ajax/getrecentlytalklist?type=2",
            function(a) {
                var e = a.data.total,
                t = a.data.list,
                s = [];
                if (0 != e) {
                    for (var o = 0; o < t.length; o++) {
                        var r = t[o].offineCount ? '<span class="unread-count-num"> (' + t[o].offineCount + ")</span>": "",
                        l = t[o].businessName.length > 9 ? t[o].businessName.slice(0, 9) + "...": t[o].businessName;
                        s.push('<li class="is-online-' + t[o].is_online + '"><a href="/business/client?businessId=' + t[o].businessId + "&custom_id=" + t[o].custom_id + '" target="_blank" title="' + l + "\u5ba2\u670d\uff1a" + t[o].username + '"><i></i>' + l + r + "</a></li>")
                    }
                    i.find(".ul-unread-container").append(s.join("")).delegate("li a", "click",
                    function(i) {
                        i.preventDefault();
                        var a = d(this).attr("href");
                        n(a)
                    })
                }
            })
        }
        function u(n) {
            var a = d(window).scrollTop(),
            e = (6 == d.browser.ie ? a: 0) + d(window).height() - g.height() - i.offset[0] - 110,
            t = a > d(window).height() / 2 ? "visible": "hidden";
            i.isFeedback || i.isProf || i.isMavin || i.isQuestionnaire || i.isTaskList ? g.find(".jump-top").css("visibility", t) : g.css("visibility", t),
            g.animate({
                top: e + "px"
            },
            n || 0)
        }
        d.isPlainObject(i) || (i = {}),
        d.isArray(i.offset) || (i.offset = [0, 0]);
        var f = i.isFeedback ? s(i.feedbackPl) : i.isProf ? m: "",
        v = i.isQuestionnaire ? t(i.isQuestionnaire) : "",
        h = i.isMavin ? o(i.isMavin) : "",
        g = d("<div />").addClass("jump-top-box").css({
            right: i.offset[1] + 5 + "px"
        }).html([c, f, v, h, i.isTaskList ? p: "", i.bottomPr ? e(i.bottomPr) : ""].join("")).appendTo(document.body);
        g.find(".jump-top a").click(function(i) {
            i.preventDefault();
            var n = d(document.documentElement.scrollTop > 0 ? document.documentElement: document.body);
            n.animate({
                scrollTop: "0px"
            },
            500)
        }),
        g.find(".jump-goto-mavin a").click(function() {
            var i = d(this).data("type");
            l.send({
                module: "common",
                page: "jump-top",
                area: "goto-mavin",
                mavin: i,
                action: "click",
                type: 2031
            })
        }),
        i.isShowUserUnread && d.get("/business/ajax/unreaddetailtotal", {
            type: 2
        },
        function(i) {
            if (i && i.data && i.data.unReadTotal > 0) {
                var n = r(i.data.unReadTotal);
                g.append(n).find(".jump-goto-unread").click(function() {
                    d(this).hasClass("show-unread-list") ? (d(this).removeClass("show-unread-list"), d(".unread-list-container").html("")) : (d(this).addClass("show-unread-list"), d('<div class="unread-title">\u6700\u8fd1\u8054\u7cfb\u4eba</div><div class="unread-list"><ul class="ul-unread-container"></ul></ul></div>').appendTo(".unread-list-container"), d(this).find("i").remove(), a(g)),
                    l.send({
                        type: 2014,
                        module: "common",
                        page: "all",
                        area: "business-unreadmsg",
                        action: "click"
                    })
                })
            }
        });
        var w;
        6 == d.browser.ie && g.css("position", "absolute"),
        d(window).on("resize scroll",
        function() {
            clearTimeout(w),
            w = setTimeout(u, 200)
        }),
        u(1)
    }
});;
/*!common:widget/js/ui/scrollbar-new/scrollbar-new.js*/
define("common:widget/js/ui/scrollbar-new/scrollbar-new",
function(l) {
    function e(l) {
        if (i.webkit && !l) return {
            height: 0,
            width: 0
        };
        if (!i.data.outer) {
            var e = {
                border: "none",
                "box-sizing": "content-box",
                height: "200px",
                margin: "0",
                padding: "0",
                width: "200px"
            };
            i.data.inner = r("<div>").css(r.extend({},
            e)),
            i.data.outer = r("<div>").css(r.extend({
                left: "-1000px",
                overflow: "scroll",
                position: "absolute",
                top: "-1000px"
            },
            e)).append(i.data.inner).appendTo("body")
        }
        return i.data.outer.scrollLeft(1e3).scrollTop(1e3),
        {
            height: Math.ceil(i.data.outer.offset().top - i.data.inner.offset().top || 0),
            width: Math.ceil(i.data.outer.offset().left - i.data.inner.offset().left || 0)
        }
    }
    function o() {
        var l = e(!0);
        return ! (l.height || l.width)
    }
    function s(l) {
        var e = l.originalEvent;
        return e.axis && e.axis === e.HORIZONTAL_AXIS ? !1 : e.wheelDeltaX ? !1 : !0
    }
    var r = l("common:widget/js/util/tangram/tangram"),
    t = !1,
    i = {
        data: {
            index: 0,
            name: "scrollbar"
        },
        macosx: /mac/i.test(navigator.platform),
        mobile: /android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),
        overlay: null,
        scroll: null,
        scrolls: [],
        webkit: /webkit/i.test(navigator.userAgent) && !/edge\/\d+/i.test(navigator.userAgent)
    };
    i.scrolls.add = function(l) {
        this.remove(l).push(l)
    },
    i.scrolls.remove = function(l) {
        for (; r.inArray(l, this) >= 0;) this.splice(r.inArray(l, this), 1);
        return this
    };
    var n = {
        autoScrollSize: !0,
        autoUpdate: !0,
        debug: !1,
        disableBodyScroll: !1,
        duration: 200,
        ignoreMobile: !1,
        ignoreOverlay: !1,
        scrollStep: 30,
        showArrows: !1,
        stepScrolling: !0,
        scrollx: null,
        scrolly: null,
        onDestroy: null,
        onInit: null,
        onScroll: null,
        onUpdate: null
    },
    c = function(l) {
        i.scroll || (i.overlay = o(), i.scroll = e(), d(), r(window).resize(function() {
            var l = !1;
            if (i.scroll && (i.scroll.height || i.scroll.width)) {
                var o = e(); (o.height !== i.scroll.height || o.width !== i.scroll.width) && (i.scroll = o, l = !0)
            }
            d(l)
        })),
        this.container = l,
        this.namespace = ".scrollbar_" + i.data.index++,
        this.options = r.extend({},
        n, window.jQueryScrollbarOptions || {}),
        this.scrollTo = null,
        this.scrollx = {},
        this.scrolly = {},
        l.data(i.data.name, this),
        i.scrolls.add(this)
    };
    c.prototype = {
        destroy: function() {
            if (this.wrapper) {
                this.container.removeData(i.data.name),
                i.scrolls.remove(this);
                var l = this.container.scrollLeft(),
                e = this.container.scrollTop();
                this.container.insertBefore(this.wrapper).css({
                    height: "",
                    margin: "",
                    "max-height": ""
                }).removeClass("scroll-content scroll-scrollx_visible scroll-scrolly_visible").off(this.namespace).scrollLeft(l).scrollTop(e),
                this.scrollx.scroll.removeClass("scroll-scrollx_visible").find("div").andSelf().off(this.namespace),
                this.scrolly.scroll.removeClass("scroll-scrolly_visible").find("div").andSelf().off(this.namespace),
                this.wrapper.remove(),
                r(document).add("body").off(this.namespace),
                r.isFunction(this.options.onDestroy) && this.options.onDestroy.apply(this, [this.container])
            }
        },
        init: function(l) {
            var e = this,
            o = this.container,
            t = this.containerWrapper || o,
            n = this.namespace,
            c = r.extend(this.options, l || {}),
            a = {
                x: this.scrollx,
                y: this.scrolly
            },
            d = this.wrapper,
            h = {
                scrollLeft: o.scrollLeft(),
                scrollTop: o.scrollTop()
            };
            if (i.mobile && c.ignoreMobile || i.overlay && c.ignoreOverlay || i.macosx && !i.webkit) return ! 1;
            if (d) t.css({
                height: "auto",
                "margin-bottom": -1 * i.scroll.height + "px",
                "margin-right": -1 * i.scroll.width + "px",
                "max-height": ""
            });
            else {
                if (this.wrapper = d = r("<div>").addClass("scroll-wrapper").addClass(o.attr("class")).css("position", "absolute" == o.css("position") ? "absolute": "relative").insertBefore(o).append(o), o.is("textarea") && (this.containerWrapper = t = r("<div>").insertBefore(o).append(o), d.addClass("scroll-textarea")), t.addClass("scroll-content").css({
                    height: "auto",
                    "margin-bottom": -1 * i.scroll.height + "px",
                    "margin-right": -1 * i.scroll.width + "px",
                    "max-height": ""
                }), o.on("scroll" + n,
                function() {
                    r.isFunction(c.onScroll) && c.onScroll.call(e, {
                        maxScroll: a.y.maxScrollOffset,
                        scroll: o.scrollTop(),
                        size: a.y.size,
                        visible: a.y.visible
                    },
                    {
                        maxScroll: a.x.maxScrollOffset,
                        scroll: o.scrollLeft(),
                        size: a.x.size,
                        visible: a.x.visible
                    }),
                    a.x.isVisible && a.x.scroll.bar.css("left", o.scrollLeft() * a.x.kx + "px"),
                    a.y.isVisible && a.y.scroll.bar.css("top", o.scrollTop() * a.y.kx + "px")
                }), d.on("scroll" + n,
                function() {
                    d.scrollTop(0).scrollLeft(0)
                }), c.disableBodyScroll) {
                    var p = function(l) {
                        s(l) ? a.y.isVisible && a.y.mousewheel(l) : a.x.isVisible && a.x.mousewheel(l)
                    };
                    d.on("MozMousePixelScroll" + n, p),
                    d.on("mousewheel" + n, p),
                    i.mobile && d.on("touchstart" + n,
                    function(l) {
                        var e = l.originalEvent.touches && l.originalEvent.touches[0] || l,
                        s = {
                            pageX: e.pageX,
                            pageY: e.pageY
                        },
                        t = {
                            left: o.scrollLeft(),
                            top: o.scrollTop()
                        };
                        r(document).on("touchmove" + n,
                        function(l) {
                            var e = l.originalEvent.targetTouches && l.originalEvent.targetTouches[0] || l;
                            o.scrollLeft(t.left + s.pageX - e.pageX),
                            o.scrollTop(t.top + s.pageY - e.pageY),
                            l.preventDefault()
                        }),
                        r(document).on("touchend" + n,
                        function() {
                            r(document).off(n)
                        })
                    })
                }
                r.isFunction(c.onInit) && c.onInit.apply(this, [o])
            }
            r.each(a,
            function(l, t) {
                var i = null,
                d = 1,
                h = "x" === l ? "scrollLeft": "scrollTop",
                p = c.scrollStep,
                f = function() {
                    var l = o[h]();
                    o[h](l + p),
                    1 == d && l + p >= u && (l = o[h]()),
                    -1 == d && u >= l + p && (l = o[h]()),
                    o[h]() == l && i && i()
                },
                u = 0;
                t.scroll || (t.scroll = e._getScroll(c["scroll" + l]).addClass("scroll-" + l), c.showArrows && t.scroll.addClass("scroll-element_arrows_visible"), t.mousewheel = function(r) {
                    if (!t.isVisible || "x" === l && s(r)) return ! 0;
                    if ("y" === l && !s(r)) return a.x.mousewheel(r),
                    !0;
                    var i = -1 * r.originalEvent.wheelDelta || r.originalEvent.detail,
                    n = t.size - t.visible - t.offset;
                    return (i > 0 && n > u || 0 > i && u > 0) && (u += i, 0 > u && (u = 0), u > n && (u = n), e.scrollTo = e.scrollTo || {},
                    e.scrollTo[h] = u, setTimeout(function() {
                        e.scrollTo && (o.stop().animate(e.scrollTo, 240, "linear",
                        function() {
                            u = o[h]()
                        }), e.scrollTo = null)
                    },
                    1)),
                    r.preventDefault(),
                    !1
                },
                t.scroll.on("MozMousePixelScroll" + n, t.mousewheel).on("mousewheel" + n, t.mousewheel).on("mouseenter" + n,
                function() {
                    u = o[h]()
                }), t.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown" + n,
                function(s) {
                    if (1 != s.which) return ! 0;
                    d = 1;
                    var n = {
                        eventOffset: s["x" === l ? "pageX": "pageY"],
                        maxScrollValue: t.size - t.visible - t.offset,
                        scrollbarOffset: t.scroll.bar.offset()["x" === l ? "left": "top"],
                        scrollbarSize: t.scroll.bar["x" === l ? "outerWidth": "outerHeight"]()
                    },
                    a = 0,
                    v = 0;
                    return r(this).hasClass("scroll-arrow") ? (d = r(this).hasClass("scroll-arrow_more") ? 1 : -1, p = c.scrollStep * d, u = d > 0 ? n.maxScrollValue: 0) : (d = n.eventOffset > n.scrollbarOffset + n.scrollbarSize ? 1 : n.eventOffset < n.scrollbarOffset ? -1 : 0, p = Math.round(.75 * t.visible) * d, u = n.eventOffset - n.scrollbarOffset - (c.stepScrolling ? 1 == d ? n.scrollbarSize: 0 : Math.round(n.scrollbarSize / 2)), u = o[h]() + u / t.kx),
                    e.scrollTo = e.scrollTo || {},
                    e.scrollTo[h] = c.stepScrolling ? o[h]() + p: u,
                    c.stepScrolling && (i = function() {
                        u = o[h](),
                        clearInterval(v),
                        clearTimeout(a),
                        a = 0,
                        v = 0
                    },
                    a = setTimeout(function() {
                        v = setInterval(f, 40)
                    },
                    c.duration + 100)),
                    setTimeout(function() {
                        e.scrollTo && (o.animate(e.scrollTo, c.duration), e.scrollTo = null)
                    },
                    1),
                    e._handleMouseDown(i, s)
                }), t.scroll.bar.on("mousedown" + n,
                function(s) {
                    if (1 != s.which) return ! 0;
                    var i = s["x" === l ? "pageX": "pageY"],
                    c = o[h]();
                    return t.scroll.addClass("scroll-draggable"),
                    r(document).on("mousemove" + n,
                    function(e) {
                        var s = parseInt((e["x" === l ? "pageX": "pageY"] - i) / t.kx, 10);
                        o[h](c + s)
                    }),
                    e._handleMouseDown(function() {
                        t.scroll.removeClass("scroll-draggable"),
                        u = o[h]()
                    },
                    s)
                }))
            }),
            r.each(a,
            function(l, e) {
                var o = "scroll-scroll" + l + "_visible",
                s = "x" == l ? a.y: a.x;
                e.scroll.removeClass(o),
                s.scroll.removeClass(o),
                t.removeClass(o)
            }),
            r.each(a,
            function(l, e) {
                r.extend(e, "x" == l ? {
                    offset: parseInt(o.css("left"), 10) || 0,
                    size: o.prop("scrollWidth"),
                    visible: d.width()
                }: {
                    offset: parseInt(o.css("top"), 10) || 0,
                    size: o.prop("scrollHeight"),
                    visible: d.height()
                })
            }),
            this._updateScroll("x", this.scrollx),
            this._updateScroll("y", this.scrolly),
            r.isFunction(c.onUpdate) && c.onUpdate.apply(this, [o]),
            r.each(a,
            function(l, e) {
                var s = "x" === l ? "left": "top",
                r = "x" === l ? "outerWidth": "outerHeight",
                t = "x" === l ? "width": "height",
                i = parseInt(o.css(s), 10) || 0,
                n = e.size,
                a = e.visible + i,
                d = e.scroll.size[r]() + (parseInt(e.scroll.size.css(s), 10) || 0);
                c.autoScrollSize && (e.scrollbarSize = parseInt(d * a / n, 10), e.scroll.bar.css(t, e.scrollbarSize + "px")),
                e.scrollbarSize = e.scroll.bar[r](),
                e.kx = (d - e.scrollbarSize) / (n - a) || 1,
                e.maxScrollOffset = n - a
            }),
            o.scrollLeft(h.scrollLeft).scrollTop(h.scrollTop).trigger("scroll")
        },
        _getScroll: function(l) {
            var e = {
                advanced: ['<div class="scroll-element">', '<div class="scroll-element_corner"></div>', '<div class="scroll-arrow scroll-arrow_less"></div>', '<div class="scroll-arrow scroll-arrow_more"></div>', '<div class="scroll-element_outer">', '<div class="scroll-element_size"></div>', '<div class="scroll-element_inner-wrapper">', '<div class="scroll-element_inner scroll-element_track">', '<div class="scroll-element_inner-bottom"></div>', "</div>", "</div>", '<div class="scroll-bar">', '<div class="scroll-bar_body">', '<div class="scroll-bar_body-inner"></div>', "</div>", '<div class="scroll-bar_bottom"></div>', '<div class="scroll-bar_center"></div>', "</div>", "</div>", "</div>"].join(""),
                simple: ['<div class="scroll-element">', '<div class="scroll-element_outer">', '<div class="scroll-element_size"></div>', '<div class="scroll-element_track"></div>', '<div class="scroll-bar"></div>', "</div>", "</div>"].join("")
            };
            return e[l] && (l = e[l]),
            l || (l = e.simple),
            l = "string" == typeof l ? r(l).appendTo(this.wrapper) : r(l),
            r.extend(l, {
                bar: l.find(".scroll-bar"),
                size: l.find(".scroll-element_size"),
                track: l.find(".scroll-element_track")
            }),
            l
        },
        _handleMouseDown: function(l, e) {
            var o = this.namespace;
            return r(document).on("blur" + o,
            function() {
                r(document).add("body").off(o),
                l && l()
            }),
            r(document).on("dragstart" + o,
            function(l) {
                return l.preventDefault(),
                !1
            }),
            r(document).on("mouseup" + o,
            function() {
                r(document).add("body").off(o),
                l && l()
            }),
            r("body").on("selectstart" + o,
            function(l) {
                return l.preventDefault(),
                !1
            }),
            e && e.preventDefault(),
            !1
        },
        _updateScroll: function(l, e) {
            var o = this.container,
            s = this.containerWrapper || o,
            t = "scroll-scroll" + l + "_visible",
            n = "x" === l ? this.scrolly: this.scrollx,
            c = parseInt(this.container.css("x" === l ? "left": "top"), 10) || 0,
            a = this.wrapper,
            d = e.size,
            h = e.visible + c;
            e.isVisible = d - h > 1,
            e.isVisible ? (e.scroll.addClass(t), n.scroll.addClass(t), s.addClass(t)) : (e.scroll.removeClass(t), n.scroll.removeClass(t), s.removeClass(t)),
            "y" === l && s.css(o.is("textarea") || h > d ? {
                height: h + i.scroll.height + "px",
                "max-height": "none"
            }: {
                "max-height": h + i.scroll.height + "px"
            }),
            (e.size != o.prop("scrollWidth") || n.size != o.prop("scrollHeight") || e.visible != a.width() || n.visible != a.height() || e.offset != (parseInt(o.css("left"), 10) || 0) || n.offset != (parseInt(o.css("top"), 10) || 0)) && (r.extend(this.scrollx, {
                offset: parseInt(o.css("left"), 10) || 0,
                size: o.prop("scrollWidth"),
                visible: a.width()
            }), r.extend(this.scrolly, {
                offset: parseInt(o.css("top"), 10) || 0,
                size: this.container.prop("scrollHeight"),
                visible: a.height()
            }), this._updateScroll("x" === l ? "y": "x", n))
        }
    };
    var a = c;
    r.fn.scrollbar = function(l, e) {
        return "string" != typeof l && (e = l, l = "init"),
        "undefined" == typeof e && (e = []),
        r.isArray(e) || (e = [e]),
        this.not("body, .scroll-wrapper").each(function() {
            var o = r(this),
            s = o.data(i.data.name); (s || "init" === l) && (s || (s = new a(o)), s[l] && s[l].apply(s, e))
        }),
        this
    },
    r.fn.scrollbar.options = n;
    var d = function() {
        var l = 0,
        e = 0;
        return function(o) {
            var s, r, n, c, a, h, p;
            for (s = 0; s < i.scrolls.length; s++) c = i.scrolls[s],
            r = c.container,
            n = c.options,
            a = c.wrapper,
            h = c.scrollx,
            p = c.scrolly,
            (o || n.autoUpdate && a && a.is(":visible") && (r.prop("scrollWidth") != h.size || r.prop("scrollHeight") != p.size || a.width() != h.visible || a.height() != p.visible)) && (c.init(), n.debug && (window.console && console.log({
                scrollHeight: r.prop("scrollHeight") + ":" + c.scrolly.size,
                scrollWidth: r.prop("scrollWidth") + ":" + c.scrollx.size,
                visibleHeight: a.height() + ":" + c.scrolly.visible,
                visibleWidth: a.width() + ":" + c.scrollx.visible
            },
            !0), e++));
            t && e > 10 ? (window.console && console.log("Scroll updates exceed 10"), d = function() {}) : (clearTimeout(l), l = setTimeout(d, 300))
        }
    } ()
});;
/*!common:widget/js/util/template/template.js*/
define("common:widget/js/util/template/template",
function(e, n, t) {
    e("common:widget/js/util/https/https");
    window.baidu = window.baidu || {},
    baidu.template = function(e, n) {
        var t = function() {
            if (!window.document) return a._compile(e);
            var n = document.getElementById(e);
            if (n) {
                if (a.cache[e]) return a.cache[e];
                var t = /^(textarea|input)$/i.test(n.nodeName) ? n.value: n.innerHTML;
                return a._compile(t)
            }
            return a._compile(e)
        } ();
        if (a._isObject(n)) for (var r in a._method)"undefined" == typeof n[r] && (n[r] = a._method[r]);
        var p = a._isObject(n) ? t(n) : t;
        return t = null,
        p
    };
    var a = baidu.template;
    a.versions = a.versions || [],
    a.versions.push("1.0.6"),
    a.cache = {},
    a.LEFT_DELIMITER = a.LEFT_DELIMITER || "<%",
    a.RIGHT_DELIMITER = a.RIGHT_DELIMITER || "%>",
    a.ESCAPE = !0,
    a._encodeHTML = function(e) {
        return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\\/g, "&#92;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
    },
    a._encodeReg=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},
    a._encodeEventHTML = function(e) {
        return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/\\\\/g, "\\").replace(/\\\//g, "/").replace(/\\n/g, "\n").replace(/\\r/g, "\r")
    },
    a._compile = function(e) {
        var n = "var https = require('common:widget/js/util/https/https.js');\nvar __2ssl__=https.autoTrans;\nvar _template_fun_array=[];\nvar fn=(function(__data__){\nvar _template_varName='';\nfor(name in __data__){\n_template_varName+=('var '+name+'=__data__[\"'+name+'\"];');\n};\neval(_template_varName);\n_template_fun_array.push('" + a._analysisStr(e) + "');\n_template_varName=null;\n})(_template_object);\nfn = null;\nreturn _template_fun_array.join('');\n";
        return new Function("_template_object", n)
    },
    a._isObject = function(e) {
        return "function" == typeof e || !(!e || "object" != typeof e)
    },
    a._analysisStr = function(e) {
        var n = a.LEFT_DELIMITER,
        t = a.RIGHT_DELIMITER,
        r = a._encodeReg(n),
        p = a._encodeReg(t);
        return e = String(e).replace(new RegExp("(" + r + "[^" + p + "]*)//.*\n", "g"), "$1").replace(new RegExp("<!--.*?-->", "g"), "").replace(new RegExp(r + "\\*.*?\\*" + p, "g"), "").replace(new RegExp("[\\r\\t\\n]", "g"), "").replace(new RegExp(r + "(?:(?!" + p + ")[\\s\\S])*" + p + "|((?:(?!" + r + ")[\\s\\S])+)", "g"),
        function(e, n) {
            var t = "";
            if (n) for (t = n.replace(/\\/g, "&#92;").replace(/'/g, "&#39;");
            /<[^<]*?&#39;[^<]*?>/g.test(t);) t = t.replace(/(<[^<]*?)&#39;([^<]*?>)/g, "$1\r$2");
            else t = e;
            return t
        }),
        e = e.replace(new RegExp("(" + r + "[\\s]*?var[\\s]*?.*?[\\s]*?[^;])[\\s]*?" + p, "g"), "$1;" + t).replace(new RegExp("(" + r + ":?[hvu]?[\\s]*?=[\\s]*?[^;|" + p + "]*?);[\\s]*?" + p, "g"), "$1" + t).split(n).join("	"),
        e = a.ESCAPE ? e.replace(new RegExp("\\t=(.*?)" + p, "g"), "',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'") : e.replace(new RegExp("\\t=(.*?)" + p, "g"), "',typeof($1) === 'undefined'?'':$1,'"),
        e = e.replace(new RegExp("\\t:h=(.*?)" + p, "g"), "',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'").replace(new RegExp("\\t(?::=|-)(.*?)" + p, "g"), "',typeof($1)==='undefined'?'':$1,'").replace(new RegExp("\\t:u=(.*?)" + p, "g"), "',typeof($1)==='undefined'?'':encodeURIComponent($1),'").replace(new RegExp("\\t:v=(.*?)" + p, "g"), "',typeof($1)==='undefined'?'':baidu.template._encodeEventHTML($1),'").split("	").join("');").split(t).join("_template_fun_array.push('").split("\r").join("\\'")
    },
    window.baiduTemplate = a,
    a.LEFT_DELIMITER = "<#",
    a.RIGHT_DELIMITER = "#>",
    t.exports = a
});;
/*!common:widget/js/logic/task/task.js*/
define("common:widget/js/logic/task/task",
function(require, exports, module) {
    var $ = require("common:widget/js/util/tangram/tangram"),
    Scrollbar = require("common:widget/js/ui/scrollbar-new/scrollbar-new"),
    bt = require("common:widget/js/util/template/template"),
    Dialog = require("common:widget/js/ui/dialog/dialog"),
    login = require("common:widget/js/logic/login/login"),
    ec = require("common:widget/js/util/event/event"),
    addressDialog = require("common:widget/js/logic/address-dialog/address-dialog"),
    Tip = require("common:widget/js/ui/tip/tip"),
    log = require("common:widget/js/util/log/log"),
    https = require("common:widget/js/util/https/https"),
    stoken = F.context("user") && F.context("user").stoken,
    task = {
        init: function() {
            F.context("user").isLogin && (this.api = "/task/api/mytask", this.bindEnter(), this.loadAccomplishTask())
        },
        bindEnter: function() {
            var a = this;
            $(document.body).on("click", ".open-task-list",
            function() {
                "open-task-list" === $(this).data("action") && ($(this).hasClass("task-list-isopen") || ($(this).addClass("task-list-isopen"), a.openTaskListDialog(), log.send({
                    type: 20150626,
                    action: "click",
                    module: "pc-common",
                    area: "tasklist",
                    page: "all"
                })))
            }).on("click", ".jump-task-list .toggle-btn",
            function() {
                $(this).parents(".ik-task-award-tips").animate({
                    left: 50
                })
            }).on("click", ".jump-task-list .get-award-btn",
            function() {
                var t = $(this).data("task-id"),
                e = $(this).parents(".ik-task-award-tips");
                a.getTaskAward({
                    taskId: t
                },
                function() {
                    e.animate({
                        left: 50
                    })
                }),
                $(".ik-task-award-count").remove()
            }).on("click", ".jump-task-list .open-award-list-btn",
            function() {
                a.openTaskListDialog(),
                $(this).parents(".ik-task-award-tips").animate({
                    left: 50
                })
            }).on("mouseover.taskTip", ".ik-task-award-tips",
            function() {
                $(document.body).off("mouseover.taskTip"),
                clearTimeout(a.accomplishTipTimer)
            }).on("mouseover", ".hq-em-tip",
            function() {
                a.tip || (a.tip = new Tip({
                    direction: "top",
                    content: "<p>\u5982\u4f55\u56de\u7b54\u9ad8\u8d28\u91cf\u95ee\u9898\uff1f</p><p>\u2460\u52a0\u5165\u56e2\u961f\u5185\u6709\u4efb\u52a1\u5305\u53ef\u56de\u7b54\u9ad8\u8d28\u91cf\u95ee\u9898</p><p>\u2461\u516b\u7ea7\u4ee5\u4e0a\u7528\u6237\u4e2a\u4eba\u4e2d\u5fc3\u53ef\u56de\u7b54\u9ad8\u8d28\u95ee\u9898</p>",
                    target: this,
                    position: {
                        my: "left top",
                        at: "left-10 bottom+10"
                    }
                })),
                a.tip.show(),
                a.tip.getTipContainer().css({
                    "z-index": 1e4
                }),
                $(".tip-arrow-top", a.tip.getTipContainer()).css("left", "12px")
            }).on("mouseout", ".hq-em-tip",
            function() {
                a.tip && a.tip.hide()
            })
        },
        openGiftBox: function(a, t) {
            var e = this,
            s = {
                128 : "CopperChest",
                129 : "SilverChest",
                130 : "GoldChest",
                131 : "DiamondChest"
            };
            if (s[a]) {
                var i = "/shop/submit/chest?type=" + s[a];
                $.ajax({
                    url: i,
                    type: "post",
                    data: {
                        itemId: a,
                        stoken: stoken
                    },
                    success: function(a) {
                        return a.errno ? void Dialog.alert('<div style="text-align:center">' + a.errmsg + "</div>") : void e.showBoxGift(a.data, t)
                    }
                })
            }
        },
        showBoxGift: function(a, t) {
            var e = a.goodsInfo;
            e.goodsPicSmall = https.autoTrans(e.goodsPicSmall);
            var s = [];
            s.push('<div class="award-item hidden" data-type="item">'),
            s.push('<p class="finish-award " data-item-id="' + e.itemId + '">'),
            s.push('<img src="' + e.goodsPicSmall + '" />'),
            s.push("</p>"),
            s.push('<p class="award-name">' + e.goodsName + "</p>"),
            s.push("</div>"),
            t.fadeOut(function() {
                $(s.join("")).insertBefore(this).fadeIn(function() {
                    t.remove()
                })
            }),
            1 != e.goodsType && /^[356]$/.test(e.goodsType) && addressDialog.init({
                goodsName: e.goodsName,
                goodsType: e.goodsType,
                cmd: 10005,
                params: {
                    tradeStyle: e.tradeStyle,
                    goodsId: e.goodsId,
                    tradeId: e.tradeId
                }
            })
        },
        bindDialog: function() {
            var a = this;
            this.$el.on("click", ".task-card-header li",
            function() {
                var t = /(\w+)\-task\-menu/.test($(this).attr("class")) && RegExp.$1;
                $(this).addClass("selected").siblings().removeClass("selected"),
                a.loadCard(t)
            }).on("click", ".get-ranking-award",
            function() {
                a.getTaskAward({
                    type: "weekAdoptReward"
                },
                function() {
                    a.$el.find(".get-ranking-award").removeClass("get-ranking-award").addClass("get-ranking-award-disabled"),
                    a.$el.find(".ranking-award-num").text("0")
                })
            }).on("click", ".open-grow-up-task",
            function() {
                if (!$(this).hasClass("open-grow-up-task-disabled")) {
                    $(this).addClass("open-grow-up-task-disabled");
                    var t = $(this).data("tgroup"),
                    e = $(this);
                    return a.startGrowthTask({
                        tgroup: t
                    },
                    function() {
                        e.removeClass("open-grow-up-task").text("\u524d\u5f80");
                        var a = $(".growth-task-finish-count");
                        a.data("count") > 0 || a.data("task") - 1 > 0 || a.remove()
                    }),
                    !1
                }
            }).on("click", ".get-task-award",
            function() {
                var t = $(this).data("taskid"),
                e = $(this).parent("li");
                log.send({
                    taskId: t,
                    module: "pc-common",
                    page: "task-list",
                    area: "task-reward",
                    action: "click"
                }),
                a.getTaskAward({
                    taskId: t
                },
                function() {
                    e.addClass("finish-item"),
                    e.find(".task-process").hide(),
                    e.find(".get-task-award").hide(),
                    e.append('<span class="finish-sign"></span>');
                    var a = $(".ik-task-award-count");
                    if (a.length) {
                        var t = a.text() - 1;
                        t ? a.text(t) : a.remove()
                    }
                    if (e.hasClass("grow-up-item") || e.hasClass("adopt-up-item")) {
                        var a = $(".growth-task-finish-count");
                        if (a.data("count") - 1 > 0 || a.data("task") > 0) return;
                        a.remove()
                    }
                })
            })
        },
        startGrowthTask: function(a, t) {
            a.stoken = stoken,
            $.ajax({
                url: "/task/submit/opentask",
                type: "post",
                data: a,
                dataType: "json",
                success: function(a) {
                    return a.errno ? void Dialog.alert('<div style="text-align:center">' + a.errmsg + "</div>") : void Dialog.alert('<div style="text-align:center">\u606d\u559c\uff0c\u4efb\u52a1\u5f00\u542f\u6210\u529f\uff01</div>', {
                        close: function() {
                            t && t()
                        }
                    })
                }
            })
        },
        getTaskAward: function(a, t) {
            var e = "/task/submit/getreward",
            s = this;
            a.stoken = stoken,
            $.ajax({
                url: e,
                type: "post",
                data: a,
                dataType: "json",
                success: function(a) {
                    return a.errno ? void Dialog.alert('<div style="text-align:center">' + a.errmsg + "</div>") : (s.openAward(a.data), void(t && t()))
                }
            })
        },
        openTaskListDialog: function() {
            if (!this.isTaskListDialogOpen) {
                var a = ['<div class="ik-task-list-top"></div>', '<div class="ik-task-list">', '<div class="ik-task-list-bg">\u4efb\u52a1\u5217\u8868</div>', '<span class="close iknow-icons iconfont-close"></span>', '<div class="loading" style="text-align:center;line-height:450px;font-size:18px;color:#666;">\u4efb\u52a1\u5217\u8868\u52a0\u8f7d\u4e2d...</div>', "</div>"].join(""),
                t = this;
                this.$taskListDialog = new Dialog({
                    width: 625,
                    height: 625,
                    autoDispose: !0,
                    className: "ik-task-dialog",
                    content: a,
                    open: function() {
                        var a = $(this).find(".ik-task-list");
                        t.initTaskListDialog(a),
                        a.on("click", ".close",
                        function() {
                            t.$taskListDialog.close()
                        })
                    },
                    close: function() {
                        t.isTaskListDialogOpen = 0,
                        $(".jump-task-list .open-task-list").removeClass("task-list-isopen")
                    }
                })
            }
        },
        initTaskListDialog: function(a) {
            var t = this;
            $.ajax({
                url: this.api,
                cache: !1,
                dataType: "json",
                success: function(e) {
                    return e.errno ? 12003 === e.errno ? (t.$taskListDialog.close(), void ec.fire("login.log", {
                        onLoginSuccess: function() {
                            t.openTaskListDialog()
                        }
                    })) : void 0 : void t._initTaskListDialog(e.data, a)
                }
            })
        },
        _filterDataList: function(a) {
            var t = 0,
            e = [];
            return $.each(a,
            function(a, s) {
                return "3" == s.taskStatus ? !0 : (1 !== t ? (s.display = 1, t = 1) : s.display = 0, void e.push(s))
            }),
            e
        },
        _initTaskListDialog: function(data, $el) {
            var tmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    eval(_template_varName),
                    _template_fun_array.push('    <div class="task-board">        <ul class="task-card-header clearfix">            <li class="daily-task-menu selected">\u65e5\u5e38\u4efb\u52a1</li>            <li class="growth-task-menu">\u6210\u957f\u4efb\u52a1<em class="growth-task-finish-count hidden"></em></li></ul>        <div class="task-card-content">            <div class="task-list-com daily-task-list">                <ul class="task-card-list '),
                    dailyTask.length >= 3 && _template_fun_array.push("card-list-scroll"),
                    _template_fun_array.push('">                '),
                    dailyTask && dailyTask.length || _template_fun_array.push('                    <li class="empty-task">\u6682\u65e0\u65e5\u5e38\u4efb\u52a1</li>                '),
                    _template_fun_array.push("                ");
                    for (var i = 0; i < dailyTask.length; i++) {
                        _template_fun_array.push('                    <li>                        <p class="task-desc">', "undefined" == typeof dailyTask[i].tdesc ? "": baidu.template._encodeHTML(dailyTask[i].tdesc), ""),
                        117 == dailyTask[i].taskId && _template_fun_array.push('<em class="hq-em-tip"></em>'),
                        _template_fun_array.push('</p>                        <div class="task-cont">                            <p class="task-reward clearfix"><label>\u5956\u52b1\uff1a</label>                                <span class="task-reward-content">                                ');
                        for (var j = 0; j < dailyTask[i].reward.length; j++) _template_fun_array.push('                                    <span data-type="', "undefined" == typeof dailyTask[i].reward[j].type ? "": baidu.template._encodeHTML(dailyTask[i].reward[j].type), '"                                        '),
                        dailyTask[i].reward[j].itemId && _template_fun_array.push('                                            data-item-id="', "undefined" == typeof dailyTask[i].reward[j].itemId ? "": baidu.template._encodeHTML(dailyTask[i].reward[j].itemId), '"                                        '),
                        _template_fun_array.push('                                        class="aw">', "undefined" == typeof dailyTask[i].reward[j].name ? "": baidu.template._encodeHTML(dailyTask[i].reward[j].name), "x", "undefined" == typeof dailyTask[i].reward[j].value ? "": baidu.template._encodeHTML(dailyTask[i].reward[j].value), "                                    </span>                                ");
                        _template_fun_array.push('                                </span>                            </p>                        </div>                    <span class="task-process">                        \u5df2\u5b8c\u6210\uff1a<em>', "undefined" == typeof dailyTask[i].taskProgressNum ? "": dailyTask[i].taskProgressNum, "</em>/", "undefined" == typeof dailyTask[i].targetNum ? "": dailyTask[i].targetNum, "                    </span>                        "),
                        ("0" == dailyTask[i].taskStatus || "1" == dailyTask[i].taskStatus) && (_template_fun_array.push("                            "), "" !== dailyTask[i].gotoUrl ? _template_fun_array.push('                                <a class="go-btn" target="_blank" href="', "undefined" == typeof dailyTask[i].gotoUrl ? "": dailyTask[i].gotoUrl, '">\u8be6\u60c5</a>                            ') : _template_fun_array.push('                                <a class="go-btn get-task-award-disabled">\u9886\u53d6</a>                            '), _template_fun_array.push("                        ")),
                        _template_fun_array.push("                        "),
                        "2" == dailyTask[i].taskStatus && _template_fun_array.push('                           <a class="go-btn get-task-award" data-taskid="', "undefined" == typeof dailyTask[i].taskId ? "": baidu.template._encodeHTML(dailyTask[i].taskId), '">\u9886\u53d6</a>                        '),
                        _template_fun_array.push("                    </li>                ")
                    }
                    _template_fun_array.push('                </ul>            </div>            <div class="task-list-com growth-task-list" style="display:none">                <ul class="task-card-list">                    '),
                    growupTask.levelUpList.length || growupTask.adoptUpList.length || _template_fun_array.push('                        <li class="empty-task">\u6682\u65e0\u6210\u957f\u4efb\u52a1</li>                    '),
                    _template_fun_array.push("                    ");
                    for (var i = 0; i < freshmanTask.length; i++) {
                        _template_fun_array.push('                        <li>                            <span class="task-ico" style="background: url(', "undefined" == typeof freshmanTask[i].imgUrl ? "": freshmanTask[i].imgUrl, ')"></span>                            <p class="task-desc">', "undefined" == typeof freshmanTask[i].tdesc ? "": baidu.template._encodeHTML(freshmanTask[i].tdesc), ""),
                        117 == freshmanTask[i].taskId && _template_fun_array.push('<em class="hq-em-tip"></em>'),
                        _template_fun_array.push('</p>                            <div class="task-cont">                                <p class="task-reward clearfix"><label>\u5956\u52b1\uff1a</label>                                    <span class="task-reward-content">                                    ');
                        for (var j = 0; j < freshmanTask[i].reward.length; j++) _template_fun_array.push('                                        <span data-type="', "undefined" == typeof freshmanTask[i].reward[j].type ? "": baidu.template._encodeHTML(freshmanTask[i].reward[j].type), '"                                            '),
                        freshmanTask[i].reward[j].itemId && _template_fun_array.push('                                                data-item-id="', "undefined" == typeof freshmanTask[i].reward[j].itemId ? "": baidu.template._encodeHTML(freshmanTask[i].reward[j].itemId), '"                                            '),
                        _template_fun_array.push('                                            class="aw">', "undefined" == typeof freshmanTask[i].reward[j].name ? "": baidu.template._encodeHTML(freshmanTask[i].reward[j].name), "x", "undefined" == typeof freshmanTask[i].reward[j].value ? "": baidu.template._encodeHTML(freshmanTask[i].reward[j].value), "                                        </span>                                    ");
                        _template_fun_array.push('                                    </span>                                </p>                            </div>                        <span class="task-process">                            \u5df2\u5b8c\u6210\uff1a<em>', "undefined" == typeof freshmanTask[i].taskProgressNum ? "": freshmanTask[i].taskProgressNum, "</em>/", "undefined" == typeof freshmanTask[i].targetNum ? "": freshmanTask[i].targetNum, "                        </span>                            "),
                        ("0" == freshmanTask[i].taskStatus || "1" == freshmanTask[i].taskStatus) && (_template_fun_array.push("                                "), "" !== freshmanTask[i].gotoUrl ? _template_fun_array.push('                                    <a class="go-btn" target="_blank" href="', "undefined" == typeof freshmanTask[i].gotoUrl ? "": freshmanTask[i].gotoUrl, '">\u8be6\u60c5</a>                                ') : _template_fun_array.push('                                    <a class="go-btn get-task-award-disabled">\u9886\u53d6</a>                                '), _template_fun_array.push("                            ")),
                        _template_fun_array.push("                            "),
                        "2" == freshmanTask[i].taskStatus && _template_fun_array.push('                               <a class="go-btn get-task-award" data-taskid="', "undefined" == typeof freshmanTask[i].taskId ? "": baidu.template._encodeHTML(freshmanTask[i].taskId), '">\u9886\u53d6</a>                            '),
                        _template_fun_array.push("                        </li>                    ")
                    }
                    _template_fun_array.push("                   ");
                    for (var k = 0; k < growupTask.levelUpList.length; k++) {
                        _template_fun_array.push('                       <li class="grow-up-item '),
                        growupTask.levelUpList[k].display || _template_fun_array.push(" hidden"),
                        _template_fun_array.push('">                           <span class="task-ico" style="background: url(', "undefined" == typeof growupTask.levelUpList[k].imgUrl ? "": growupTask.levelUpList[k].imgUrl, ')"></span>                           <p class="task-desc">', "undefined" == typeof growupTask.levelUpList[k].tdesc ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].tdesc), '</p>                           <div class="task-cont">                               <p class="task-reward clearfix"><label>\u5956\u52b1\uff1a</label>                                   <span class="task-reward-content">                                    ');
                        for (var l = 0; l < growupTask.levelUpList[k].reward.length; l++) _template_fun_array.push('                                        <span data-type="', "undefined" == typeof growupTask.levelUpList[k].reward[l].type ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].reward[l].type), '"                                            '),
                        growupTask.levelUpList[k].reward[l].itemId && _template_fun_array.push('                                                data-item-id="', "undefined" == typeof growupTask.levelUpList[k].reward[l].itemId ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].reward[l].itemId), '"                                            '),
                        _template_fun_array.push('                                                class="aw">                                            ', "undefined" == typeof growupTask.levelUpList[k].reward[l].name ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].reward[l].name), "x", "undefined" == typeof growupTask.levelUpList[k].reward[l].value ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].reward[l].value), "                                        </span>                                    ");
                        _template_fun_array.push('                                    </span>                               </p>                           </div>                           <span class="task-process">                               \u5df2\u5b8c\u6210\uff1a<em>', "undefined" == typeof growupTask.levelUpList[k].taskProgressNum ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].taskProgressNum), "</em>/", "undefined" == typeof growupTask.levelUpList[k].targetNum ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].targetNum), "                           </span>                           "),
                        growupTask.levelUp.openFlag ? (_template_fun_array.push("                                "), ("0" == growupTask.levelUpList[k].taskStatus || "1" == growupTask.levelUpList[k].taskStatus) && (_template_fun_array.push("                                    "), "" !== growupTask.levelUpList[k].gotoUrl ? _template_fun_array.push('                                        <a class="go-btn" target="_blank" href="', "undefined" == typeof growupTask.levelUpList[k].gotoUrl ? "": growupTask.levelUpList[k].gotoUrl, '">\u8be6\u60c5</a>                                    ') : _template_fun_array.push('                                        <a class="go-btn get-task-award-disabled">\u9886\u53d6</a>                                    '), _template_fun_array.push("                                ")), _template_fun_array.push("                                "), "2" == growupTask.levelUpList[k].taskStatus && _template_fun_array.push('                                   <a class="go-btn get-task-award" data-taskid="', "undefined" == typeof growupTask.levelUpList[k].taskId ? "": baidu.template._encodeHTML(growupTask.levelUpList[k].taskId), '">\u9886\u53d6</a>                                '), _template_fun_array.push("                           ")) : _template_fun_array.push('                               <a class="go-btn open-grow-up-task" href="', "undefined" == typeof growupTask.levelUpList[k].gotoUrl ? "": growupTask.levelUpList[k].gotoUrl, '" data-tgroup="levelUp">\u5f00\u542f</a>                           '),
                        _template_fun_array.push("                       </li>                   ")
                    }
                    _template_fun_array.push("                   ");
                    for (var k = 0; k < growupTask.adoptUpList.length; k++) {
                        _template_fun_array.push('                          <li class="adopt-up-item '),
                        growupTask.adoptUpList[k].display || _template_fun_array.push(" hidden"),
                        _template_fun_array.push('">                              <span class="task-ico" style="background: url(', "undefined" == typeof growupTask.adoptUpList[k].imgUrl ? "": growupTask.adoptUpList[k].imgUrl, ')"></span>                              <p class="task-desc">', "undefined" == typeof growupTask.adoptUpList[k].tdesc ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].tdesc), '</p>                              <div class="task-cont">                                  <p class="task-reward clearfix"><label>\u5956\u52b1\uff1a</label>                                      <span class="task-reward-content">                                       ');
                        for (var l = 0; l < growupTask.adoptUpList[k].reward.length; l++) _template_fun_array.push('                                           <span data-type="', "undefined" == typeof growupTask.adoptUpList[k].reward[l].type ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].reward[l].type), '"                                               '),
                        growupTask.adoptUpList[k].reward[l].itemId && _template_fun_array.push('                                                   data-item-id="', "undefined" == typeof growupTask.adoptUpList[k].reward[l].itemId ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].reward[l].itemId), '"                                               '),
                        _template_fun_array.push('                                                   class="aw">                                               ', "undefined" == typeof growupTask.adoptUpList[k].reward[l].name ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].reward[l].name), "x", "undefined" == typeof growupTask.adoptUpList[k].reward[l].value ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].reward[l].value), "                                           </span>                                       ");
                        _template_fun_array.push('                                       </span>                                  </p>                              </div>                              <span class="task-process">                                  \u5df2\u5b8c\u6210\uff1a<em>', "undefined" == typeof growupTask.adoptUpList[k].taskProgressNum ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].taskProgressNum), "</em>/", "undefined" == typeof growupTask.adoptUpList[k].targetNum ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].targetNum), "                              </span>                              "),
                        growupTask.adoptUp.openFlag ? (_template_fun_array.push("                                 "), ("0" == growupTask.adoptUpList[k].taskStatus || "1" == growupTask.adoptUpList[k].taskStatus) && (_template_fun_array.push("                                     "), "" !== growupTask.adoptUpList[k].gotoUrl ? _template_fun_array.push('                                         <a class="go-btn" target="_blank" href="', "undefined" == typeof growupTask.adoptUpList[k].gotoUrl ? "": growupTask.adoptUpList[k].gotoUrl, '">\u8be6\u60c5</a>                                     ') : _template_fun_array.push('                                         <a class="go-btn get-task-award-disabled">\u9886\u53d6</a>                                     '), _template_fun_array.push("                                 ")), _template_fun_array.push("                                 "), "2" == growupTask.adoptUpList[k].taskStatus && _template_fun_array.push('                                    <a class="go-btn get-task-award" data-taskid="', "undefined" == typeof growupTask.adoptUpList[k].taskId ? "": baidu.template._encodeHTML(growupTask.adoptUpList[k].taskId), '">\u9886\u53d6</a>                                 '), _template_fun_array.push("                              ")) : _template_fun_array.push('                                 <a class="go-btn open-grow-up-task" data-tgroup="adoptUp" href="', "undefined" == typeof growupTask.adoptUpList[k].gotoUrl ? "": growupTask.adoptUpList[k].gotoUrl, '">\u5f00\u542f</a>                              '),
                        _template_fun_array.push("                          </li>                   ")
                    }
                    if (_template_fun_array.push("                    "), growupTask.levelUp.openFlag && growupTask.branchList) {
                        _template_fun_array.push("                       ");
                        for (var k = 0; k < growupTask.branchList.length; k++) {
                            _template_fun_array.push('                           <li class="branch-task-item">                               <span class="task-ico" style="background: url(', "undefined" == typeof growupTask.branchList[k].imgUrl ? "": growupTask.branchList[k].imgUrl, ')"></span>                               <p class="task-desc">', "undefined" == typeof growupTask.branchList[k].tdesc ? "": baidu.template._encodeHTML(growupTask.branchList[k].tdesc), '</p>                               <div class="task-cont">                                   <p class="task-reward clearfix"><label>\u5956\u52b1\uff1a</label>                                       <span class="task-reward-content">                                       ');
                            for (var l = 0; l < growupTask.branchList[k].reward.length; l++) _template_fun_array.push('                                           <span data-type="', "undefined" == typeof growupTask.branchList[k].reward[l].type ? "": baidu.template._encodeHTML(growupTask.branchList[k].reward[l].type), '"                                           '),
                            growupTask.branchList[k].reward[l].itemId && _template_fun_array.push('                                               data-item-id="', "undefined" == typeof growupTask.branchList[k].reward[l].itemId ? "": baidu.template._encodeHTML(growupTask.branchList[k].reward[l].itemId), '"                                               '),
                            _template_fun_array.push('                                                   class="aw">                                                   ', "undefined" == typeof growupTask.branchList[k].reward[l].name ? "": baidu.template._encodeHTML(growupTask.branchList[k].reward[l].name), "x", "undefined" == typeof growupTask.branchList[k].reward[l].value ? "": baidu.template._encodeHTML(growupTask.branchList[k].reward[l].value), "                                            </span>                                        ");
                            _template_fun_array.push('                                            </span>                                   </p>                               </div>                               <span class="task-process">                                  \u5df2\u5b8c\u6210\uff1a<em>', "undefined" == typeof growupTask.branchList[k].taskProgressNum ? "": baidu.template._encodeHTML(growupTask.branchList[k].taskProgressNum), "</em>/", "undefined" == typeof growupTask.branchList[k].targetNum ? "": baidu.template._encodeHTML(growupTask.branchList[k].targetNum), "                               </span>                               "),
                            ("0" == growupTask.branchList[k].taskStatus || "1" == growupTask.branchList[k].taskStatus) && (_template_fun_array.push("                                   "), "" !== growupTask.branchList[k].gotoUrl ? _template_fun_array.push('                                       <a class="go-btn" target="_blank" href="', "undefined" == typeof growupTask.branchList[k].gotoUrl ? "": growupTask.branchList[k].gotoUrl, '">\u8be6\u60c5</a>                                   ') : _template_fun_array.push('                                       <a class="go-btn get-task-award-disabled">\u9886\u53d6</a>                                   '), _template_fun_array.push("                               ")),
                            _template_fun_array.push("                               "),
                            "2" == growupTask.branchList[k].taskStatus && _template_fun_array.push('                                  <a class="go-btn get-task-award" data-taskid="', "undefined" == typeof growupTask.branchList[k].taskId ? "": baidu.template._encodeHTML(growupTask.branchList[k].taskId), '">\u9886\u53d6</a>                               '),
                            _template_fun_array.push("                           </li>                       ")
                        }
                        _template_fun_array.push("                    ")
                    }
                    _template_fun_array.push("                </ul>            </div>        </div>    </div>"),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0],
            levelUpList = data.growupTask.levelUp.list,
            adoptUpList = data.growupTask.adoptUp.list,
            dailyTask = data.dailyTask,
            freshmanTask = data.freshmanTask,
            branchList = [];
            data.growupTask.levelUpList = [],
            data.growupTask.adoptUpList = [],
            data.growupTask.branchList = [];
            var growthTaskFinishCount = 0,
            growthTaskNotOpen = 0;
            levelUpList && levelUpList.length && ($.each(levelUpList,
            function(a, t) {
                t.branch && (branchList = branchList.concat(t.branch))
            }), data.growupTask.levelUpList = this._filterDataList(levelUpList), data.growupTask.branchList = this._filterDataList(branchList, 1), data.growupTask.levelUpList[0] && "2" == data.growupTask.levelUpList[0].taskStatus && (growthTaskFinishCount += 1), data.growupTask.branchList[0] && "2" == data.growupTask.branchList[0].taskStatus && (growthTaskFinishCount += 1), data.growupTask.levelUp.openFlag || (growthTaskNotOpen += 1)),
            adoptUpList && adoptUpList.length && (data.growupTask.adoptUpList = this._filterDataList(adoptUpList), data.growupTask.adoptUpList[0] && "2" == data.growupTask.adoptUpList[0].taskStatus && (growthTaskFinishCount += 1), data.growupTask.adoptUp.openFlag || (growthTaskNotOpen += 1)),
            dailyTask && $.isArray(dailyTask) && (data.dailyTask = this._filterDataList(dailyTask)),
            freshmanTask && $.isArray(freshmanTask) && (data.freshmanTask = this._filterDataList(freshmanTask));
            var content = tmpl(data);
            content = https.autoTrans(content, 1),
            this._onDialogOpen($el, growthTaskFinishCount, growthTaskNotOpen, content),
            this.isTaskListDialogOpen = 1
        },
        _onDialogOpen: function(a, t, e, s) {
            a.find(".loading").remove(),
            a.prepend(s);
            var i = this;
            i.$el = a,
            i.initScrollBar(a.find(".daily-task-list")),
            i.bindDialog(),
            t && $(".growth-task-finish-count").attr("data-count", t).fadeIn(),
            e && $(".growth-task-finish-count").attr("data-task", e).fadeIn();
            var r = a.find(".growth-task-list").find(".task-card-list");
            r.find("li").not(".hidden").length >= 3 && r.addClass("card-list-scroll"),
            a.find(".go-btn").each(function(a, t) {
                var e = $(t).attr("href");
                e && (e += (~e.indexOf("?") ? "&": "?") + "from=taskBoard", $(t).attr("href", e))
            })
        },
        openAward: function(data, callback, openCallback) {
            var tmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    eval(_template_varName),
                    _template_fun_array.push('<dl class="ik-finish-task">    <dt>        <i class="iknow-icons iconfont-resolve"></i>        ', "undefined" == typeof name ? "": baidu.template._encodeHTML(name), '    </dt>    <dd class="clearfix finish-task-', "undefined" == typeof reward.length ? "": reward.length, '">        ');
                    for (var j = 0; j < reward.length; j++) _template_fun_array.push('            <div data-type="', "undefined" == typeof reward[j].type ? "": baidu.template._encodeHTML(reward[j].type), '"  class="award-item" data-item-id="', "undefined" == typeof reward[j].itemId ? "": baidu.template._encodeHTML(reward[j].itemId), '">                <p class="finish-award"><img src="', "undefined" == typeof reward[j].imgUrl ? "": reward[j].imgUrl, '"/></p>                <p class="award-name">', "undefined" == typeof reward[j].name ? "": reward[j].name, "x", "undefined" == typeof reward[j].value ? "": reward[j].value, "</p></div>        ");
                    _template_fun_array.push('    </dd>    <dd>        <span class="btn-ok">\u6211\u77e5\u9053\u4e86</span>    </dd></dl>'),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0],
            content = tmpl(data);
            content = https.autoTrans(content, 1);
            var me = this;
            this.$awardDialog = new Dialog({
                width: 319,
                height: 238,
                autoDispose: !0,
                className: "ik-task-dialog",
                content: content,
                open: function() {
                    me._bindAward($(this)),
                    openCallback && openCallback()
                },
                close: function() {
                    callback && callback()
                }
            })
        },
        _bindAward: function(a) {
            var t = this;
            a.on("click", ".btn-ok",
            function() {
                t.$awardDialog.close(),
                t.isTaskListDialogOpen && t.swipeOffItem()
            })
        },
        initAward: function() {
            this.$awardDialog ? this.$awardDialog.open() : this.openAward()
        },
        loadCard: function(a) {
            if (/daily|growth/.test(a)) {
                var t = "growth" === a ? "addClass": "removeClass";
                this.$el.find(".task-card-content")[t]("growth-task-card-content"); {
                    var e = this.$el,
                    s = e.find("." + a + "-task-list");
                    e.find(".task-card-content").children(".task-list-com").hide().filter("." + a + "-task-list").fadeIn()
                }
                this.initScrollBar(s)
            }
        },
        initScrollBar: function(a) {
            a.hasClass("scroll-loaded") || a.find("li").length < 3 || (a.addClass("scroll-loaded"), a.find(".scrollbar-wp").remove(), a.addClass("scrollbar-inner"), setTimeout(function() {
                a.scrollbar()
            },
            150))
        },
        accomplishTip: function() {},
        swipeOffItem: function() {
            if (this.isTaskListDialogOpen) {
                var a = $(".growth-task-list").find(".finish-item").not(".branch-task-item");
                a.length && a.next("li.hidden").length && a.animate({
                    left: 530
                },
                {
                    complete: function() {
                        a.hide().next("li").fadeIn(function() {
                            a.remove()
                        })
                    }
                })
            }
        },
        loadAccomplishTask: function() {
            var a = this,
            t = setInterval(function() {
                var e = $(document.body).find(".jump-task-list");
                e.length && (clearInterval(t), a._loadAccomplishTaskData(e))
            },
            50)
        },
        _loadAccomplishTask: function($taskList, data) {
            if (!~location.href.indexOf("/question/") && !~location.href.indexOf("/link?url=")) {
                var tmpl = [function(_template_object) {
                    var _template_fun_array = [],
                    fn = function(__data__) {
                        var _template_varName = "";
                        for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                        eval(_template_varName),
                        _template_fun_array.push('<div class="ik-task-award-tips '),
                        1 == len && _template_fun_array.push("ik-task-award-tips-short"),
                        _template_fun_array.push('">    <div class="task-tips-cont">        <p>\u5b8c\u6210<em>\u201c', "undefined" == typeof text ? "": baidu.template._encodeHTML(text), "\u201d</em>\u4efb\u52a1\u3002</p>        "),
                        1 == len ? _template_fun_array.push('            <span class="get-award get-award-btn" data-task-id="', "undefined" == typeof taskId ? "": baidu.template._encodeHTML(taskId), '">\u9886\u53d6\u5956\u52b1</span>        ') : _template_fun_array.push('            <span class="get-award open-award-list-btn">\u67e5\u770b\u5956\u52b1</span>        '),
                        _template_fun_array.push('        <span class="toggle-btn iknow-icons iconfont-close"></span>    </div></div>'),
                        _template_varName = null
                    } (_template_object);
                    return fn = null,
                    _template_fun_array.join("")
                }][0],
                content = tmpl(data),
                left = 1 === data.len ? -553 : -620,
                me = this;
                $(content).appendTo($taskList).animate({
                    left: left
                },
                {
                    complete: function() {
                        var a = $(this);
                        me.accomplishTipTimer = setTimeout(function() {
                            a.animate({
                                left: 50
                            })
                        },
                        5e3)
                    }
                })
            }
        },
        _loadAccomplishTaskData: function(a) {
            var t = this;
            $.ajax({
                url: "/task/api/getmytasklist",
                cache: !1,
                data: {
                    popFlag: 1,
                    status: "done"
                },
                success: function(e) {
                    if (!e.errno) {
                        var s = e.data && e.data.done,
                        i = e.data && e.data.doneNum;
                        i = +i;
                        var r = {
                            len: 0,
                            taskId: 0,
                            text: ""
                        };
                        if (r.len = s.length, i && $("<div />").addClass("ik-task-award-count").html(i).appendTo(".jump-top-box .jump-task-list"), s && s.length) {
                            if (1 === s.length) r.text = s[0].name,
                            r.taskId = s[0].taskId;
                            else {
                                var n = [];
                                $.each(s,
                                function(a, t) {
                                    n.push(t.name)
                                }),
                                r.text = n.join("\u3001"),
                                r.text.length > 14 && (r.text = r.text.substring(0, 13) + "...")
                            }
                            t._loadAccomplishTask(a, r)
                        }
                    }
                }
            })
        }
    };
    module.exports = task
});;
/*!common:widget/js/logic/dom-ready/dom-ready.js*/
define("common:widget/js/logic/dom-ready/dom-ready",
function(t, o) {
    function i(t) {
        e.ajax({
            url: "/s/toutu/questionnaire.js",
            dataType: "json",
            success: function(o) {
                if (!o) return void(t && t({
                    url: ""
                }));
                if (o.qn) {
                    var i = o.qn,
                    e = i.at,
                    n = i.url;
                    if (!e || "http://" === e || !n || "http://" === n) return void(t && t({
                        url: "",
                        pr: o.pr
                    }));
                    for (var r = window.location.pathname,
                    a = e.split(" "), s = !1, c = 0, l = a.length; l > c; c++) if ("/" === a[c] && r === a[c] || "/" !== a[c] && -1 !== r.indexOf(a[c])) {
                        s = !0;
                        break
                    }
                    window.location.href === e || s ? t && t({
                        url: n,
                        pr: o.pr
                    }) : t && t({
                        url: "",
                        pr: o.pr
                    })
                }
            },
            error: function() {
                t && t({
                    url: ""
                })
            }
        })
    }
    var e = t("common:widget/js/util/tangram/tangram"),
    n = t("common:widget/js/logic/jump-top/jump-top"),
    r = t("common:widget/js/logic/task/task"),
    a = (t("common:widget/https/https-replace"), t("common:widget/js/util/log/log"));
    o.init = function(t) {
        var o = location.pathname,
        s = t.img;
        try {
            F.context("sysTaskAutoInit") ? i(function(i) {
                n({
                    isFeedback: 0,
                    isProf: /^\/(doctor|prof\/education|prof\/apply|expert)/i.test(o),
                    feedbackPl: t.feedbackPl || 1,
                    isMavin: t.isMavin,
                    isQuestionnaire: i.url,
                    isTaskList: F.context("user").isLogin,
                    isShowUserUnread: F.context("user").isLogin && !F.context("user").isBusiness,
                    bottomPr: i.pr
                })
            }) : n({
                isFeedback: 0,
                isProf: 0,
                feedbackPl: 0,
                isMavin: 0,
                isQuestionnaire: 0,
                isTaskList: 0,
                isShowUserUnread: 0,
                bottomPr: 0
            })
        } catch(c) {}
        if (F.context("sysTaskAutoInit") && r.init(), s && s.bgImg) {
            if (!e.swf.version) return;
            var l = e("<div/>").attr("id", "top-flash-container").attr("title", s.title).css({
                position: "absolute",
                bottom: "0",
                right: "0"
            }).mousedown(function() {
                location.href = s.url
            });
            e("#header").css("position", "relative").append(l),
            e.swf.create({
                id: "top-flash",
                width: 179,
                height: 73,
                url: s.bgImg,
                allowscriptaccess: "always",
                wmode: "transparent"
            },
            "top-flash-container")
        }
        a.send({
            module: "common",
            page: "framework",
            action: "common-pv",
            area: "common-page",
            location: window.location.href
        })
    }
});;
/*!common:widget/js/logic/file-type/file-type.js*/
define("common:widget/js/logic/file-type/file-type",
function(e, i, p) {
    var f = e("common:widget/lib/jquery/jquery"),
    l = {
        "file-image": "jpg,jpeg,gif,bmp,png,jpe,cur,svg,svgz,tif,tiff,ico",
        "file-doc": "doc,docx,ods,ots,odt,rtf,dot,dotx,odm, vsd,vsdx",
        "file-pdf": "pdf",
        "file-excel": "xls,xlsx,xlt,xltx,csv",
        "file-txt": "txt,html,htm,xhtml,xml,js,css",
        "file-mp3": "wma,wav,mp3,aac,ra,ram,mp2,ogg,aif,mpega,amr,mid,midi",
        "file-video": "wmv,rmvb,mpeg4,mpeg2,flv,avi,3gp,mpga,qt,rm,wmz,wmd,wvx,wmx,wm,swf,mpg,mp4,mkv,mpeg,mov",
        "file-ppt": "ppt,pptx,pps,pot,ppsx,potx",
        "file-ipa": "ipa",
        "file-exe": "exe,msi",
        "file-zip": "zip,rar,7z,tar,gz",
        "file-apk": "apk",
        "file-bt": "torrent",
        "file-epub": "epub",
        "file-umd": "umd"
    },
    t = {
        0 : ["file-doc", "file-pdf", "file-excel", "file-ppt", "file-txt", "file-epub", "file-umd"],
        1 : ["file-exe", "file-apk", "file-ipa"],
        2 : ["file-mp3"],
        3 : ["file-video"],
        4 : ["file-bt"],
        5 : ["file-unknow"]
    };
    p.exports = function(e) {
        e = ("" + e).toLocaleLowerCase();
        var i = 5,
        p = "unknow";
        return f.each(l,
        function(l, m) {
            return f.array(f.makeArray(m.split(","))).contains(e) ? (p = l, f.each(t,
            function(e, p) {
                return f.array(p).contains(l) ? (i = e, !1) : void 0
            }), !1) : void 0
        }),
        {
            fileClass: p,
            fileType: i
        }
    }
});;
/*!common:widget/js/logic/iask/iask.js*/
define("common:widget/js/logic/iask/iask",
function(e, i, n) {
    var o = e("common:widget/js/util/tangram/tangram"),
    t = e("common:widget/js/ui/dialog/dialog"),
    a = e("common:widget/js/util/event/event");
    n.exports = function(e) {
        a.fire("login.check", {
            isLogin: function() {
                o.get("/iask/api/ikhelplimit?un=" + encodeURIComponent(e) + "&t=" + (new Date).getTime(),
                function(i) {
                    var n = o.json.parse(i);
                    if (n && 0 == n.status) {
                        var c = n.data,
                        m = c.replyLimit,
                        r = c.replyMaxNum,
                        l = c.ifLogin,
                        s = c.ifUsernameOK;
                        return 0 == s ? (t.alert("\u5bf9\u4e0d\u8d77\uff01\u6b64\u7528\u6237\u4e0d\u5b58\u5728\u3002"), !1) : 0 == r || 0 >= m ? (t.alert("\u5bf9\u4e0d\u8d77\uff01\u6b64\u7528\u6237\u6682\u65f6\u65e0\u6cd5\u63a5\u6536\u63d0\u95ee\u6c42\u52a9\uff0c\u60a8\u53ef\u4ee5\u6362\u4e00\u4f4d\u7528\u6237\u8bd5\u8bd5\u3002", {
                            close: function() {
                                a.fire("dialog.close")
                            }
                        }), !1) : 0 == l ? (location.href = "/new?fix=" + encodeURIComponent(e), !1) : void(location.href = "/new?fix=" + encodeURIComponent(e))
                    }
                })
            }
        })
    }
});;
/*!common:widget/js/logic/ie-prompt/ie-prompt.js*/
define("common:widget/js/logic/ie-prompt/ie-prompt",
function(o) {
    var e = o("common:widget/lib/jquery/jquery"),
    t = !!window.ActiveXObject,
    i = t && !window.XMLHttpRequest,
    n = t && !!document.documentMode,
    p = t && !i && !n,
    c = ['<div class="prompt-body">', '<a href="javascript:void(0);" class="prompt-close"></a>', "<ul>", '<li class="prompt-message">\u60a8\u7684\u6d4f\u89c8\u5668\u7248\u672c\u8fc7\u4f4e\uff0c\u4e3a\u4e86\u66f4\u4f73\u7684\u6d4f\u89c8\u6548\u679c\uff0c</li>', '<li class="prompt-suggest">\u5efa\u8bae\u60a8\u5347\u7ea7\u6d4f\u89c8\u5668\uff01</li>', "</ul>", "</div>"].join("");
    "undefined" == typeof dontTriggerPrompt && (i || p) && (e("body").append(c), e(".prompt-body").on("del",
    function() {
        e(this).animate({
            opacity: 0
        },
        500,
        function() {
            e(this).remove()
        })
    }).on("location",
    function() {
        if (1 != e.cookie.get("IK_PROMPT_FLAG")) {
            var o = e.cookie.get("IK_PROMPT_COUNT");
            null == o || 3 >= o ? e(this).animate({
                opacity: 1
            },
            500,
            function() {
                setTimeout(e.proxy(function() {
                    e(this).trigger("del"),
                    o = null == o ? 1 : ++o,
                    e.cookie.set("IK_PROMPT_COUNT", o, {
                        path: "/",
                        expires: 864e5
                    })
                },
                this), 3e3)
            }) : e.cookie.set("IK_PROMPT_FLAG", "1", {
                path: "/",
                expires: 864e5
            })
        }
    }), e(".prompt-body").trigger("location"), e(".prompt-close").on("click",
    function() {
        e(".prompt-body").trigger("del"),
        e.cookie.set("IK_PROMPT_FLAG", "1", {
            path: "/",
            expires: 864e5
        })
    }))
});;
/*!common:widget/js/logic/incompatible/incompatible.js*/
define("common:widget/js/logic/incompatible/incompatible",
function(i, o, a) {
    var t = i("common:widget/lib/jquery/jquery");
    a.exports = {
        init: function() {
            t("body").addClass("body-incompatible"),
            t("html").addClass("html-incompatible"),
            t("#body").addClass("body-incompatible"),
            t(".wgt-incompatible-wp").parent().addClass("body-incompatible")
        }
    }
});;
/*!common:widget/js/util/store/store.js*/
define("common:widget/js/util/store/store",
function(e, t, n) {
    function r() {
        try {
            return f in s && s[f]
        } catch(e) {
            return ! 1
        }
    }
    function i() {
        try {
            return d in s && s[d] && s[d][s.location.hostname]
        } catch(e) {
            return ! 1
        }
    }
    function o(e) {
        return function() {
            var t = Array.prototype.slice.call(arguments, 0);
            t.unshift(a),
            l.body.appendChild(a),
            a.addBehavior("#default#userData"),
            a.load(f);
            var n = e.apply(c, t);
            return l.body.removeChild(a),
            n
        }
    }
    var a, u = e("common:widget/js/util/tangram/tangram"),
    c = {},
    s = window,
    l = s.document,
    f = "localStorage",
    d = "globalStorage",
    m = "__storejs__";
    if (c.disabled = !1, c.set = function() {},
    c.get = function() {},
    c.remove = function() {},
    c.clear = function() {},
    c.transact = function(e, t) {
        var n = c.get(e);
        "undefined" == typeof n && (n = {}),
        t(n),
        c.set(e, n)
    },
    c.serialize = function(e) {
        return u.json.stringify(e)
    },
    c.deserialize = function(e) {
        return "string" != typeof e ? void 0 : u.json.parse(e)
    },
    r()) a = s[f],
    c.set = function(e, t) {
        a.setItem(e, c.serialize(t))
    },
    c.get = function(e) {
        return c.deserialize(a.getItem(e))
    },
    c.remove = function(e) {
        a.removeItem(e)
    },
    c.clear = function() {
        a.clear()
    };
    else if (i()) a = s[d][s.location.hostname],
    c.set = function(e, t) {
        a[e] = c.serialize(t)
    },
    c.get = function(e) {
        return c.deserialize(a[e] && a[e].value)
    },
    c.remove = function(e) {
        delete a[e]
    },
    c.clear = function() {
        for (var e in a) delete a[e]
    };
    else if (l.documentElement.addBehavior) {
        var a = l.createElement("div");
        c.set = o(function(e, t, n) {
            e.setAttribute(t, c.serialize(n)),
            e.save(f)
        }),
        c.get = o(function(e, t) {
            return c.deserialize(e.getAttribute(t))
        }),
        c.remove = o(function(e, t) {
            e.removeAttribute(t),
            e.save(f)
        }),
        c.clear = o(function(e) {
            var t = e.XMLDocument.documentElement.attributes;
            e.load(f);
            for (var n, r = 0; n = t[r]; r++) e.removeAttribute(n.name);
            e.save(f)
        })
    }
    try {
        c.set(m, m),
        c.get(m) != m && (c.disabled = !0),
        c.remove(m)
    } catch(v) {
        c.disabled = !0
    }
    n.exports = c
});;
/*!common:widget/js/logic/msg-new/msg-new.js*/
define("common:widget/js/logic/msg-new/msg-new",
function(require, exports, module) {
    var $ = require("common:widget/js/util/tangram/tangram"),
    Tip = require("common:widget/js/ui/tip/tip"),
    bt = require("common:widget/js/util/template/template"),
    log = require("common:widget/js/util/log/log"),
    Scrollbar = require("common:widget/js/ui/scrollbar-new/scrollbar-new"),
    ec = require("common:widget/js/util/event/event"),
    ikStore = require("common:widget/js/util/store/store"),
    Dialog = require("common:widget/js/ui/dialog/dialog"),
    log = require("common:widget/js/util/log/log"),
    baidu = window.baidu || {};
    baidu.template = bt,
    module.exports = {
        init: function(options) {
            var userInfo = F.context("user"),
            me = this;
            me.timer = null,
            me.container = $("#userbar-msg"),
            me.tmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    eval(_template_varName),
                    _template_fun_array.push(""),
                    0 === errno ? (_template_fun_array.push("    "), data.other && (_template_fun_array.push('        <div class="msg-tab-wp">            <ul class="msg-tab">                <li class="msg-tab-li selected" data-type="qr"><i class="iknow-icons iconfont-normal-msg"></i></li>                <li class="msg-tag-split"></li>                <li class="msg-tab-li '), data.other && data.other.list && data.other.list.length > 0 && _template_fun_array.push(" new"), _template_fun_array.push('" data-type="other"><i class="iknow-icons iconfont-team-msg"></i></li>            </ul>        </div>    ')), _template_fun_array.push('    <div class="msg-list-wp scrollbar-inner">        <div class="msg-list-content'), data.other || _template_fun_array.push(" single-list"), _template_fun_array.push('"></div>    </div>')) : _template_fun_array.push('    <div class="nav-msg-warn"></div>    <p class="nav-msg-warntext">', "undefined" == typeof errmsg ? "": baidu.template._encodeHTML(errmsg), "</p>"),
                    _template_fun_array.push(""),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0],
            me.listTmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    if (eval(_template_varName), _template_fun_array.push(""), list.length > 0) {
                        _template_fun_array.push("            ");
                        for (var i = 0; i < list.length; i++) _template_fun_array.push('            <div class="nav-msg-listitem'),
                        list[i].hasRead && _template_fun_array.push(" item-read"),
                        _template_fun_array.push('" data-id="', "undefined" == typeof list[i].msgId ? "": baidu.template._encodeHTML(list[i].msgId), '" data-type="', "undefined" == typeof list[i].msgType ? "": baidu.template._encodeHTML(list[i].msgType), '">', "undefined" == typeof("" !== list[i].title ? list[i].brief + list[i].title: list[i].brief) ? "": "" !== list[i].title ? list[i].brief + list[i].title: list[i].brief, "</div>        ");
                        _template_fun_array.push("")
                    } else _template_fun_array.push('    <div class="nav-msg-warn"></div>    <p class="nav-msg-warntext">\u6682\u65f6\u6ca1\u6709\u6d88\u606f~</p>');
                    _template_fun_array.push(""),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0],
            me.containerTmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    eval(_template_varName),
                    _template_fun_array.push('<div class="nav-msg-layout">    <div class="nav-msg-tri"></div>    <div class="msg-content-wp">            </div>    <div class="msg-show-all"><a href="" target="_blank">\u67e5\u770b\u5168\u90e8</a></div></div>'),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0],
            me.loading = !1,
            me.data = {},
            "0" !== userInfo.isLogin && "" !== userInfo.isLogin && "false" !== userInfo.isLogin && userInfo.isLogin && me.bindEvent()
        },
        bindEvent: function() {
            var t = this;
            t.container.on("mouseenter",
            function(e) {
                e.stopPropagation(),
                t.destroyTimer(),
                t.fetchNum(),
                $(this).find(".nav-msg-layout").length > 0 ? (t.fetchList(), $(this).find(".nav-msg-layout").fadeIn()) : t.initMsgContainer(!0)
            }).on("mouseleave",
            function(e) {
                e.stopPropagation(),
                $(".nav-msg-layout").hide(),
                t.timer || t.setTimer()
            }).on("mouseenter", ".userbar-msg-a",
            function(t) {
                t.stopPropagation()
            }).on("mouseenter", ".nav-msg-layout",
            function(t) {
                t.stopPropagation()
            }).on("click", ".msg-tab-li",
            function(e) {
                if (e.preventDefault(), e.stopPropagation(), !$(this).hasClass("selected") && (t.loading || t.data)) {
                    $(".msg-tab-li").removeClass("selected"),
                    $(this).removeClass("new").addClass("selected");
                    var a = $(this).data("type"),
                    n = t.data[a] && t.data[a].list || [];
                    t.renderList(n)
                }
            }).on("click", ".msg-list-content a",
            function(e) {
                e.stopPropagation();
                var a = $(this).parents(".nav-msg-listitem");
                if (!a.hasClass("item-read")) {
                    var n = $(this).attr("href");
                    if (/\/notice\/center\?type=[\w\W]*/.test(n)) {
                        var i = n.split("type=")[1].split("&")[0];
                        if (!t.countObj || "undefined" == typeof t.countObj[i]) return;
                        t.countObj.total -= t.countObj[i],
                        t.countObj[i] = 0,
                        t.setMsgNum(t.countObj),
                        a.remove()
                    } else {
                        var r = $.json.stringify([{
                            srctype: a.data("type"),
                            uniq_id: a.data("id")
                        }]);
                        t.batchMsg(r, $(this).parents(".nav-msg-listitem"))
                    }
                }
            }).on("click", ".msg-show-all",
            function(e) {
                e.preventDefault(),
                e.stopPropagation();
                var a = "/ihome/notice/center",
                n = "qr";
                t.countObj.qr > 0 ? a += "?type=qr": t.countObj.interact > 0 ? (a += "?type=interact", n = "interact") : t.countObj.system > 0 ? (a += "?type=system", n = "system") : Object.keys(t.countObj).forEach(function(e) {
                    t.countObj[e] > 0 && "total" !== e && "qr" === n && (a += "?type=" + e, n = e)
                }),
                $(".nav-msg-layout").hide(),
                t.setTimer(),
                window.open(a),
                t.countObj.total -= t.countObj[n],
                t.countObj[n] = 0,
                t.setMsgNum(t.countObj),
                log.send({
                    module: "common",
                    page: "common",
                    area: "userbar-notice-showall",
                    action: "click"
                })
            }).on("click", ".userbar-msg-a",
            function() {
                log.send({
                    module: "common",
                    page: "common",
                    area: "userbar-notice",
                    action: "click"
                })
            }),
            ec.on("common.userbarReadMsgNum",
            function(e, a) {
                t.countObj && t.countObj.total && (t.countObj.total -= a.unread, t.countObj[a.type] -= a.unread, ec.fire("common.userbarMsgNum", t.countObj.total))
            }),
            t.fetchNum(),
            t.setTimer()
        },
        unbindEvent: function() {
            var t = this;
            t.destroyTimer(),
            ec.fire("common.userbarMsgNum", 0),
            t.container.unbind("mouseenter"),
            t.container.unbind("mouseleave")
        },
        batchMsg: function(t, e) {
            var a = this;
            $.ajax({
                type: "POST",
                dataType: "json",
                data: {
                    close_list: t
                },
                url: "/notice/close/batch"
            }).done(function(t) {
                t.errno || (a.countObj && a.countObj.total && a.countObj.total--&&a.setMsgNum(a.countObj), e.remove())
            })
        },
        setTimer: function() {
            var t = this;
            t.timer = setInterval(function() {
                t.fetchNum()
            }.bind(t), 12e4)
        },
        destroyTimer: function() {
            var t = this;
            clearInterval(t.timer),
            t.timer = null
        },
        fetchList: function() {
            var t = this;
            t.loading = !0,
            $.ajax({
                url: "/notice/get/simplelist",
                type: "GET",
                dataType: "json",
                data: {
                    t: +new Date
                }
            }).done(function(e) {
                t.loading = !1,
                t.renderListWp(e)
            }).fail(function() {
                t.loading = !1
            })
        },
        initMsgContainer: function() {
            var t = this;
            t.container.find(".nav-msg-layout").length < 1 && t.container.append(this.containerTmpl()),
            t.fetchList()
        },
        renderListWp: function(t) {
            var e = this;
            if ($(".msg-content-wp").html(e.tmpl(t)), 0 === t.errno) {
                e.data = t.data;
                var a = [];
                t.data && t.data.qr && t.data.qr.list && (a = t.data.qr.list),
                e.renderList(a)
            }
        },
        renderList: function(t) {
            var e = this;
            $(".msg-list-content").html(e.listTmpl({
                list: t
            })),
            e.updateScrollbar()
        },
        updateScrollbar: function() {
            $(".msg-list-wp .scrollbar-wp").remove(),
            $(".msg-list-wp").scrollbar()
        },
        fetchNum: function() {
            var t = this;
            $.ajax({
                type: "GET",
                url: "/notice/get/unreadcount",
                dataType: "json",
                data: {
                    iswrap: 0,
                    t: +new Date
                }
            }).done(function(e) {
                return 0 !== e.errno ? void t.unbindEvent() : (t.countObj = e.data, void t.setMsgNum(e.data))
            })
        },
        setMsgNum: function(t) {
            ec.fire("common.userbarMsgNum", [t.total ? parseInt(t.total, 10) : 0, t])
        }
    }
});;
/*!common:widget/js/util/visibility/visibility.js*/
define("common:widget/js/util/visibility/visibility",
function(i, e, n) {
    var t = i("common:widget/lib/jquery/jquery"),
    o = i("common:widget/js/util/event/event"),
    d = {};
    o.create(d);
    var c = "hidden",
    m = function() {
        return "undefined" != typeof this[c] ? void d.trigger(this[c] ? "hide": "show") : void 0
    };
    c in document ? t(document).on("visibilitychange", m) : (c = "mozHidden") in document ? t(document).on("mozvisibilitychange", m) : (c = "webkitHidden") in document ? t(document).on("webkitvisibilitychange", m) : (c = "msHidden") in document && t(document).on("msvisibilitychange", m),
    n.exports = d
});;
/*!common:widget/js/logic/msg/msg.js*/
define("common:widget/js/logic/msg/msg",
function(e, t) {
    function i(e, t) {
        if (k) {
            var o, a = d + 1e3 * h < (new Date).getTime() ? !0 : !1,
            r = !0,
            s = _.getLocalData();
            s && s.data && (s.data.interval && (o = s.data.interval), s.time && (a || v || s.time > (new Date).getTime() - 1e3 * o) && (n(s.data), r = !1)),
            r && _.getServerData(t),
            !e && o && (clearTimeout(D), D = setTimeout(function() {
                i(!1, {
                    poll: 1
                })
            },
            1e3 * o))
        }
    }
    function o(e, t) {
        var i = t || !0,
        o = _.delLocalData(e);
        if (i && o.length > 0) {
            var n = {
                type: 10091 == o[0].type || 10092 == o[0].type ? 1009 : o[0].type,
                id: o[0].id,
                count: o[0].count
            };
            _.delServerData(n)
        }
    }
    function n(e) {
        e && 0 == e.status && (e.globalList && "2040" == e.globalList.type && e.globalList.data && j.show(e.globalList.data), e.actList && r.isArray(e.actList) ? _.show(e.actList) : document.title = x)
    }
    function a() {
        if (r(window).on("resize",
        function() {
            t.resize()
        }).on("scroll",
        function() {
            t.resize()
        }), !k) return void j.getCms(f);
        if (0 != r("#userbar #user-name").size()) {
            var e, o = {},
            n = location.pathname + location.search; (e = n.match(/^\/question\/(\d+)/i)) ? (o.fr = "question", _.getServerData(o)) : i();
            var a = r.url.getQueryValue(location.href, "time");
            a && (a = (new Date).getTime() - parseInt(a), c.send({
                type: 2031,
                page: "bubble",
                action: "time",
                time: a
            })),
            r(document).on("mousemove",
            function() {
                d = (new Date).getTime()
            }),
            g.on("show",
            function() {
                i()
            })
        }
    }
    var r = e("common:widget/js/util/tangram/tangram"),
    s = e("common:widget/js/ui/tip/tip"),
    l = e("common:widget/js/util/store/store"),
    c = e("common:widget/js/util/log/log"),
    u = e("common:widget/js/util/event/event"),
    m = e("common:widget/js/ui/dialog/dialog"),
    g = e("common:widget/js/util/visibility/visibility"),
    p = "http://msg.zhidao.baidu.com/",
    f = "/s/toutu/promotion.js",
    d = (new Date).getTime(),
    h = 180,
    v = 0,
    w = 3,
    b = !1,
    y = null,
    T = null,
    D = null,
    k = 0 != F.context("user").isLogin,
    L = "/uhome/msg/",
    C = "/uhome",
    x = document.title,
    $ = {
        1001 : {
            title: "{$n}\u4e2a\u63d0\u95ee\u6709\u65b0\u56de\u7b54",
            url1: L + "newreply?fr=msg",
            url2: L + "newreply?fr=msg"
        },
        1003 : {
            title: "{$n}\u4e2a\u5165\u56e2\u7533\u8bf7",
            url1: "/team/view/{$tname}#manage-3",
            url2: "/team/view/{$tname}#manage-3"
        },
        1006 : {
            title: "{$n}\u4e2a\u56de\u7b54\u6709\u65b0\u8ffd\u95ee",
            url1: L + "replyask?fr=msg",
            url2: L + "replyask?fr=msg"
        },
        1010 : {
            title: "{$n}\u4e2a\u63d0\u95ee\u5f97\u5230\u8865\u5145",
            url1: L + "questionsup?fr=msg",
            url2: L + "questionsup?fr=msg"
        },
        1011 : {
            title: "{$n}\u4e2a\u63d0\u95ee\u6025\u5f85\u5904\u7406",
            url1: L + "waitdeal?fr=msg",
            url2: L + "waitdeal?fr=msg"
        },
        1009 : {
            title: "{$n}\u4e2a\u56de\u7b54\u88ab\u91c7\u7eb3",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        },
        10091 : {
            title: "{$n}\u4e2a\u56de\u7b54\u83b7\u5f97\u597d\u8bc4",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        },
        10092 : {
            title: "{$n}\u4e2a\u56de\u7b54\u83b7\u5f97\u4e2d\u8bc4",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        },
        1018 : {
            title: "{$n}\u4e2a\u56de\u7b54\u88ab\u63a8\u8350",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        },
        1008 : {
            title: "{$n}\u4e2a\u56de\u7b54\u8d5e\u540c",
            url1: L + "evaluate?type=to&fr=msg",
            url2: L + "evaluate?type=to&fr=msg"
        },
        1002 : {
            title: "{$n}\u4f4d\u77e5\u53cb\u5411\u60a8\u6c42\u52a9",
            url1: C + "?type=help&fr=msg",
            url2: C + "?type=help&fr=msg"
        },
        1005 : {
            title: "{$n}\u4e2a\u56e2\u961f\u6c42\u52a9",
            url1: "/team",
            url2: "/team/view/{$tname}#question-3"
        },
        1012 : {
            title: "{$n}\u4e2a\u65b0\u52a8\u6001",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        },
        1019 : {
            title: "{$n}\u4e2a\u65b0\u901a\u77e5",
            url1: L + "sysmsg?fr=msg",
            url2: L + "sysmsg?fr=msg"
        },
        1020 : {
            title: "{$n}\u4e2a\u56de\u7b54\u88ab\u63a8\u8350\u4e3a\u4f18\u8d28",
            url1: L + "event?fr=msg",
            url2: L + "event?fr=msg"
        }
    },
    j = {
        cookieName: "IK_MSG_POPUP",
        getCms: function(e) {
            r.ajax({
                url: e,
                dataType: "json",
                success: function(e) {
                    e && j.show(e, "cms")
                }
            })
        },
        setCookie: function(e) {
            r.cookie.set(j.cookieName, e.id, {
                expires: r.date.parse(e.endTime).getTime(),
                path: "/"
            })
        },
        generateView: function(e) {
            var t = [];
            return e.linkText = e.linkText || "\u8fdb\u5165\u4e13\u9898",
            t.push('<a target="_blank"  href="' + e.linkUrl + '"><img class="task-guide-image" src="' + e.imageUrl + '" /></a>'),
            t.join("")
        },
        show: function(e, i) {
            var o = i || "msg";
            if ("msg" == o) {
                if (e = r.array(e).find(j.Validate), !e) return;
                t.del({
                    type: "2040"
                },
                !1)
            } else if ("cms" == o && !j.Validate(e)) return; ! e.imageUrl || "http://" === e.imageUrl || e.imageUrl.length < 17 || (T = new s({
                rightbottom: "popcms",
                width: 240,
                position: {
                    my: "right-3 bottom-3",
                    at: "right bottom"
                },
                tooltipClass: "task-guide tip-green",
                arrow: !1,
                radius: !1,
                closebox: !0,
                content: j.generateView(e),
                close: function() {
                    "cms" == o && j.setCookie(e)
                },
                target: r("#footer")
            }), T.show(), u.fire("pop.resize"), c.send({
                type: 2031,
                page: "bubble",
                action: "pv"
            }), T.getTipContainer().delegate("a", "click",
            function(e) {
                T.hide(),
                c.send("img" == e.target.nodeName.toLowerCase() ? {
                    type: 2031,
                    page: "bubble",
                    pos: "bubble-img"
                }: r(e.target).hasClass("tip-close") ? {
                    type: 2031,
                    page: "bubble",
                    pos: "bubble-close"
                }: {
                    type: 2031,
                    page: "bubble",
                    pos: "bubble-link"
                })
            }))
        },
        Validate: function(e) {
            var t = r.date.parse(e.startTime),
            i = r.date.parse(e.endTime),
            o = r.cookie.get(j.cookieName);
            return 1 == e.enabled && o != e.id && (new Date).getTime() >= t.getTime() && (new Date).getTime() < i.getTime() ? (u.fire("cmsMsg.show"), !0) : !1
        }
    },
    _ = {
        getServerData: function(e) {
            var i = p + "api?source=iknow&t=" + (new Date).getTime();
            i += "&cu=" + encodeURIComponent(F.context("user").name),
            e && (e.fr || e.poll) && (i += "&" + r.url.jsonToQuery(e)),
            r.sio(i).callByServer(function(i) {
                if (e && e.poll) {
                    var o = _.getLocalData();
                    if (o && o.data && i) {
                        var n = r.json.stringify(o.data) == r.json.stringify(i);
                        c.send({
                            type: 2031,
                            page: "bubble",
                            action: "poll",
                            match: n
                        })
                    }
                }
                t.refresh(i)
            })
        },
        delServerData: function(e) {
            var t = p + "close_notice?t=" + (new Date).getTime();
            t += "&" + r.url.jsonToQuery(e),
            r.sio(t).callByServer(function() {})
        },
        setLocalData: function(e) {
            l.set("ikmsg_time", (new Date).getTime()),
            l.set("ikmsg_data", r.json.stringify(e))
        },
        getLocalData: function() {
            return {
                time: l.get("ikmsg_time") || 0,
                data: r.json.parse(l.get("ikmsg_data") || "null")
            }
        },
        delLocalData: function(e) {
            var i = [],
            o = this.getLocalData();
            if (o && (o = o.data)) {
                if (o.actList) for (var n = 0; n < o.actList.length; n++) if (o.actList[n].type == e.type) {
                    i = o.actList.splice(n, 1);
                    break
                }
                o.globalList && o.globalList.type == e.type && (o.globalList.data = null)
            }
            return t.refresh(o),
            i
        },
        clearLocalData: function() {
            l.remove("ikmsg_data"),
            l.remove("ikmsg_time"),
            this.delServerData({
                type: "99999",
                count: 1
            })
        },
        _buildMsg: function(e) {
            var t = [],
            i = "",
            o = "";
            return i = ' alog-alias="' + e.type + '-title"',
            o = ' alog-action="' + e.type + '-close"',
            t.push('<a target="_blank" href="' + e.url + '"' + i + ' index="' + e.type + '"><i' + o + '></i><span id="notice-' + e.type + '">' + e.title + "</span></a>"),
            t
        },
        show: function(e) {
            this.generateView(e)
        },
        hideTip: function() {
            y && y.getTipContainer().hide()
        },
        showTip: function() {
            y && y.getTipContainer().show()
        },
        generateView: function(e) {
            var i = [],
            o = [],
            n = [],
            a = this,
            l = 0;
            if (r.forEach(e,
            function(e, t) {
                var a = $[e.type];
                if (! (1008 == e.type && e.create_time < (new Date).getTime() / 1e3 - 864e5)) {
                    if (a) {
                        var r = a.title.replace("{$n}", '<span class="num">' + e.count + "</span>"),
                        s = e.count > 1 ? a.url1: a.url2.replace("{$qid}", e.qid).replace("{$aid}", e.aid); ("1005" == e.type || "1003" == e.type) && (s = s.replace("{$tname}", e.tname)),
                        e.url = s,
                        e.title = r,
                        e.index = t,
                        w > l ? i.push(_._buildMsg(e)) : o.push(_._buildMsg(e)),
                        l++,
                        n.push(e.type)
                    }
                    u.fire("tip.callback", e)
                }
            }), i.length <= 0) return void(y && (y.hide(), y = null));
            y || (y = new s({
                target: "#user-name",
                closebox: !0,
                tooltipClass: "nav-notice",
                direction: "top",
                closeall: function() {
                    _.clearLocalData()
                }
            }), r(document).delegate(".nav-notice .ui-tooltip-content", "click",
            function(e) {
                var i = {},
                o = e.target.nodeName.toLowerCase();
                "i" == o ? (e.stopPropagation(), e.preventDefault(e), i.pos = "msg-del") : i.pos = "msg-title";
                var n = r(e.target).closest("a"),
                a = n.attr("index");
                a && (i.actType = a, i && c.send(r.extend(i, {
                    type: 2031,
                    page: "msg"
                })), document.title = x, t.del({
                    type: a
                }), -1 == n.attr("href").indexOf("time=") && (n[0].href += ( - 1 == n[0].href.indexOf("?") ? "?": "&") + "time=" + (new Date).getTime())),
                1008 == a && "i" == o && m.confirm("\u662f\u5426\u4e0d\u518d\u663e\u793a\u88ab\u8d5e\u540c\u6d88\u606f\uff1f", {
                    onaccept: function() {
                        r.sio(p + "getuswitch?t=" + (new Date).getTime()).callByServer(function(e) {
                            var t = e.config || {};
                            t[1008] = 0,
                            r.sio(p + "uswitch?config=" + r.json.stringify(t)).callByServer(function() {})
                        }),
                        r(this).dialog("close")
                    }
                })
            })),
            y.target.tooltip("option", "content", i.join("")),
            y.on("show",
            function() {
                a.generateMore(this.getTipBody(), o.join(""))
            }),
            y.show(); {
                var g = y.getTipBody();
                r(g).find("a").each(function(e, t) {
                    var i, o, n = (t.href + top.location.href).match(/uhome/gi);
                    n && n.length > 1 ? (i = t.href, o = i.substr(i.lastIndexOf("#")), i = i.replace(/(&t=\d+)*#.+$/g, "") + "&t=" + (new Date).getTime(), -1 == i.indexOf("?") && (i = i.replace(/&/, "?")), t.href = i + o, t.target = "_top") : t.target = "_blank"
                })
            }
            u.fire("tip.resize")
        },
        generateMore: function(e, t) {
            "" != r.string(t).trim() ? (r(y.getTipContainer()).removeClass("nav-notice-small"), r(e).append('<div id="more-notice-holder" style="display:none;">' + t + "</div>"), 0 == r("#more-control-div").size() && (r(e).after('<div id="more-control-div"><a href="###" id="more-control-a" class="open"></a></div>'), r("#more-control-div").click(function(e) {
                e.preventDefault();
                var t = r(this).find("a").first();
                t.hasClass("open") ? (t.removeClass("open").addClass("close"), r("#more-notice-holder").show(), b = !0) : t.hasClass("close") && (r("#more-notice-holder").hide(), t.removeClass("close").addClass("open"), b = !1)
            })), b && (r("#more-notice-holder").show(), r("#more-control-div a").removeClass("open").addClass("close"))) : (r("#more-control-div").remove(), r("#more-notice-holder").remove(), b = !1, r(y.getTipContainer()).addClass("nav-notice-small"))
        }
    };
    u.on("tip.resize",
    function() {
        if (y) {
            var e = r("#user-name"),
            t = y.getTipContainer(),
            i = r(t).find(".tip-arrow");
            if (!e || !t || z) return ! 1;
            var o = r(e).offset(),
            n = r(window).scrollTop();
            n > o.top + 27 ? (r(t).css(r.browser.ie && r.browser.ie < 7 ? {
                left: o.left + "px",
                top: n + 1 + "px"
            }: {
                left: o.left + "px",
                top: "1px",
                position: "fixed"
            }), r(i).hide()) : (o.top += 27, r(t).css({
                left: o.left + "px",
                top: o.top + "px",
                position: "absolute"
            }), r(i).show())
        }
    }),
    u.on("tip.del",
    function(e, t, i) {
        o(t, i)
    });
    var z = !1;
    u.on("userbar.show",
    function(e, i) {
        z = i.waiting,
        t.hide()
    }),
    u.on("userbar.hide",
    function(e, i) {
        z = i.waiting,
        t.resize(),
        t.show()
    }),
    u.on("userbar.reposition",
    function(e, i) {
        z = i.waiting,
        t.resize(),
        t.show()
    }),
    r.object.extend(t, {
        init: a,
        show: _.showTip,
        hide: _.hideTip,
        del: o,
        resize: function() {
            u.fire("tip.resize"),
            u.fire("pop.resize")
        },
        force: function() {},
        refresh: function(e) {
            _.setLocalData(e),
            i()
        }
    })
});;
/*!common:widget/js/logic/phone-bind/phone-bind.js*/
define("common:widget/js/logic/phone-bind/phone-bind",
function(t, n, e) {
    var i = t("common:widget/js/util/tangram/tangram"),
    r = (t("common:widget/js/ui/dialog/dialog"), t("common:widget/js/util/event/event"), t("common:widget/js/ui/base/base")),
    s = t("common:widget/js/logic/submit/submit"),
    a = r(function(t) {
        if (t && t.container) {
            var n = this;
            n.error = {
                oldPhoneErr: "\u539f\u624b\u673a\u8f93\u5165\u9519\u8bef",
                phoneEmpty: "\u8bf7\u8f93\u5165\u624b\u673a\u53f7\u7801",
                phoneErr: "\u8c8c\u4f3c\u624b\u673a\u53f7\u7801\u8f93\u9519\u4e86\uff0c\u786e\u8ba4\u4e00\u4e0b\u5427",
                authEmpty: "\u5c1a\u672a\u8f93\u5165\u9a8c\u8bc1\u7801",
                authOver: "\u83b7\u53d6\u9a8c\u8bc1\u7801\u6b21\u6570\u8fc7\u591a\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",
                authErr: "\u9a8c\u8bc1\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165",
                authInvalid: "\u9a8c\u8bc1\u7801\u5931\u6548\uff0c\u8bf7\u91cd\u65b0\u83b7\u53d6",
                authFail: "\u53d1\u9001\u5931\u8d25\uff0c\u8bf7\u70b9\u51fb\u518d\u6b21\u53d1\u9001",
                authOnce: "\u8be5\u624b\u673a\u53f7\u5df2\u7ed1\u5b9a\u8fc7\u5176\u4ed6\u8d26\u53f7",
                authEqual: "\u8bf7\u4fee\u6539\u4e3a\u4e0d\u540c\u624b\u673a\u53f7",
                netErr: "\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u7ed1\u5b9a",
                verifyErr: "\u9a8c\u8bc1\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",
                verifyMore: "\u9a8c\u8bc1\u9519\u8bef\uff0c\u6bcf\u5929\u6700\u591a\u9a8c\u8bc1\u4e00\u6b21"
            };
            var e = i.extend({
                type: "verify"
            },
            t),
            r = function() {
                this.container = e.container,
                this.phone_tip = "",
                this.auth_input = "",
                this.auth_send = "",
                this.auth_resend = "",
                this.auth_tip = "",
                this.submit_btn = "",
                this.succss_btn = "",
                this.successObj = e.successObj,
                this.panelObj = i(['<div class="phone-bind-panel">', '<div class="bind-info"><label>\u624b\u673a\u53f7</label>', '<label class="phone-verify">' + e.phoneToShow + "</label>", '<span id="phone-bind-input-success" style="display:none;"></span><span class="span-error"></span></div>', '<div class="bind-info"><label>\u9a8c\u8bc1\u7801\uff1a</label>', '<input id="phone-bind-auth" type="text" />', '<a id="phone-bind-auth-send" class="btn-24-white1">\u70b9\u51fb\u83b7\u53d6</a>', '<span id="phone-bind-auth-resend" style="display:none;"><em>60</em>\u79d2\u540e\u53ef\u91cd\u65b0\u83b7\u53d6</span>', '<span></span></div><span class="bind-tip ml-48">\u6ce8\uff1a\u540c\u4e00\u624b\u673a\u53f724\u5c0f\u65f6\u5185\u6700\u591a\u53ef\u83b7\u53d65\u6b21\u9a8c\u8bc1\u7801</span>', '<div class="ml-48 mt-10"><a id="phone-bind-submit" class="btn-24-green">\u786e\u8ba4\u9a8c\u8bc1</a>', "</div>", "</div>"].join("")).get(0),
                this.oldPhoneError = "",
                this.phoneError = "",
                this.authError = "",
                this._init(),
                this._bindEvent()
            };
            r.prototype = {
                _init: function() {
                    i("#" + this.container).append(this.panelObj),
                    this.auth_input = i("#phone-bind-auth", this.panelObj),
                    this.auth_send = i("#phone-bind-auth-send", this.panelObj),
                    this.auth_resend = i("#phone-bind-auth-resend", this.panelObj),
                    this.auth_tip = this.auth_resend.next(),
                    this.submit_btn = i("#phone-bind-submit", this.panelObj)
                },
                _bindEvent: function() {
                    var t = this;
                    t.auth_input.on("focus",
                    function() {
                        t.auth_tip.html(""),
                        i(this).removeClass("input-error")
                    }),
                    t.auth_send.on("click",
                    function(n) {
                        n.preventDefault(),
                        t._sendAuth()
                    }),
                    t.submit_btn.on("click",
                    function(n) {
                        n.preventDefault(),
                        t._bindPhone()
                    })
                },
                _checkAuth: function() {
                    "" == i.trim(this.auth_input.val()) ? (this.authError = "authEmpty", this.auth_tip.html(n.error[this.authError]).addClass("span-error"), this.auth_input.addClass("input-error")) : this.authError = ""
                },
                _sendAuth: function() {
                    var t = this;
                    if (!t.phoneError || e.phoneToSubmit) {
                        var r = {
                            authOver: function() {
                                t.auth_tip.html(n.error.authOver).addClass("span-error")
                            },
                            authSucc: function() {
                                t.auth_send.hide(),
                                t.auth_resend.show();
                                var n = i(t.auth_resend).children("em"),
                                e = setInterval(function() {
                                    n.html() > 1 ? n.html(n.html() - 1) : 1 == n.html() && (t.auth_resend.hide(), t.auth_send.show(), n.html(60), t.auth_tip.html(""), clearInterval(e))
                                },
                                1e3);
                                t.auth_tip.removeClass("span-error").html("\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\uff0c\u8bf7\u67e5\u6536\u77ed\u4fe1")
                            },
                            authErr: function() {
                                t.auth_tip.html(n.error.authFail).addClass("span-error")
                            }
                        };
                        n.phoneAuth(e.phoneToSubmit, "verify" == e.type ? 1 : 0,
                        function(t) {
                            var n = i.json.parse(t);
                            if (n) switch (n.errno) {
                            case 0:
                                r.authSucc();
                                break;
                            case 3:
                                r.authOver();
                                break;
                            case 5:
                                r.authOnce();
                                break;
                            default:
                                r.authErr()
                            } else r.authErr()
                        },
                        function() {
                            r.authErr()
                        })
                    }
                },
                _bindPhone: function() {
                    function t(t) {
                        n.phoneVerify(t, r.auth_input.val(),
                        function() {
                            i("#" + r.container).empty().append(r.successObj)
                        },
                        function(t, e) {
                            if (t) {
                                var i = parseInt(e);
                                17001 == i ? r.phone_tip.html(n.error.authOnce).addClass("span-error") : 10064 == i ? r.auth_tip.html(n.error.verifyMore).addClass("span-error") : 17002 == i ? (r.auth_input.addClass("input-error"), r.auth_tip.html(n.error.authInvalid).addClass("span-error")) : r.auth_tip.html(n.error.verifyErr).addClass("span-error")
                            } else r.auth_tip.html(n.error.netErr).addClass("span-error")
                        })
                    }
                    var r = this;
                    r._checkAuth(),
                    r.oldPhoneError || r.phoneError && !e.phoneToSubmit || r.authError || "verify" == e.type && e.phoneToSubmit && t(e.phoneToSubmit)
                }
            }; {
                new r(t.container)
            }
        }
    }).extend({
        phoneAuth: function(t, n, e, r) {
            i.ajax({
                url: "/api/sendphonevcode",
                type: "GET",
                data: {
                    phone: t,
                    fr: "normal",
                    mtype: n,
                    t: (new Date).getTime()
                },
                success: function(t) {
                    e(t)
                },
                error: function() {
                    r()
                }
            })
        },
        phoneVerify: function(t, n, e, i) {
            new s({
                url: "/submit/user",
                params: {
                    cm: 100501,
                    phone: t,
                    vcode: n,
                    flag: "uhome",
                    reason: 16
                },
                beforeJump: function(t) {
                    e(t)
                },
                errorDeal: function(t, n, e) {
                    i(n, e)
                }
            })
        },
        bindPassMobile: function(t) {
            var n = "//passport.baidu.com/passApi/js/uni_armorwidget_wrapper.js";
            i.sio.callByBrowser(n + "?_=" + (new Date).getTime(),
            function() {
                var n = passport.pop.ArmorWidget(t.action, {
                    token: t.token,
                    title: t.title,
                    msg: t.msg,
                    auth_title: t.auth_title,
                    auth_msg: t.auth_msg,
                    color: t.color,
                    submitText: t.submitText,
                    footerText: t.footerText,
                    onRender: function() {
                        t.onRender = t.onRender ||
                        function() {},
                        t.onRender(this)
                    },
                    onBeforeSuccess: function() {
                        t.onBeforeSuccess = t.onBeforeSuccess ||
                        function() {},
                        t.onBeforeSuccess(this)
                    },
                    onSubmitSuccess: function() {
                        t.onSubmitSuccess = t.onSubmitSuccess ||
                        function() {},
                        t.onSubmitSuccess(this)
                    }
                });
                n.show()
            })
        }
    });
    e.exports = a
});;
/*!common:widget/js/logic/qianbao-iframe/iframe-lib.js*/
define("common:widget/js/logic/qianbao-iframe/iframe-lib",
function(n, i, t) {
    var o, a = n("common:widget/js/util/tangram/tangram"),
    e = {
        parse: a.json.parse,
        stringify: a.json.stringify
    },
    s = window.parent,
    c = !!window.ActiveXObject,
    r = [],
    d = function(n, i) {
        a.each(r,
        function(t, o) {
            o(n, i)
        })
    },
    g = function(n) {
        r.push(n)
    };
    window.postMessage ? (o = function(n, i) {
        s.postMessage(e.stringify({
            type: n,
            data: i
        }), "*")
    },
    a(window).on("message",
    function(n) {
        n = n.originalEvent;
        var i = e.parse(n.data);
        d(i.type, i.data)
    })) : c && (window.navigator.sendNotice = d, window.navigator.getNotice = window.navigator.getNotice ||
    function() {}),
    t.exports = {
        sendNotice: o,
        addNotice: g
    }
});;
/*!common:widget/js/logic/qianbao-iframe/qianbao-iframe.js*/
define("common:widget/js/logic/qianbao-iframe/qianbao-iframe",
function(a) {
    var i = a("common:widget/js/util/tangram/tangram"),
    e = a("common:widget/js/logic/qianbao-iframe/iframe-lib"),
    o = a("common:widget/js/ui/dialog/dialog");
    i(function() {
        var a = {
            message_namespace: "iknowbindcard",
            service_type: "iknow_actbindcard"
        };
        e.addNotice(function(e, t) {
            switch (e = e.replace(new RegExp("^" + a.message_namespace + "_"), "")) {
            case "resize":
                break;
            case "submit_result":
                if (t.result + "" == "0") {
                    o.close(); {
                        var n = '<div class="qianbao-suc-dialog"><div class="qianbao-suc-text-1"><i></i>\u6dfb\u5361\u6210\u529f</div><div class="qianbao-suc-text-2">\u8bf7\u8fd4\u56de\u5546\u57ce\u67e5\u770b\u53d1\u8d27\u72b6\u6001\uff0c\u82e5\u72b6\u6001\u4e3a\u5f85\u5145\u503c\uff0c\u5219\u8bdd\u8d39\u4f1a\u57285~15\u4e2a\u5de5\u4f5c\u65e5\u5185\u5145\u503c\u6210\u529f\u3002</div></div>';
                        o.alert(n, {
                            title: "\u7ed1\u5361\u6210\u529f",
                            width: 500,
                            height: 260,
                            className: "msg-dialog",
                            buttons: [{
                                text: "\u8fd4\u56de\u5546\u57ce",
                                click: function() {
                                    window.location.href = "/shop/lottery"
                                }
                            },
                            {
                                text: "\u6211\u7684\u94f6\u884c\u5361",
                                click: function() {
                                    window.open("https://www.baifubao.com/fastpay/0/cardmanager/0")
                                }
                            }],
                            close: function() {
                                window.location.reload()
                            }
                        })
                    }
                    i.ajax({
                        url: "/shop/submit/setbkhdtradeinfo",
                        type: "post",
                        dataType: "json",
                        data: F.context("qianbaoPostParams"),
                        cache: !1
                    }).done(function(a) {
                        return 0 != a.errno ? void o.alert(a.errmsg) : void 0
                    }).fail(function() {
                        o.alert("\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u5237\u65b0\u9875\u9762\u91cd\u8bd5\uff01")
                    })
                }
            }
        })
    })
});;
/*!common:widget/js/logic/qrcode/qrcode.js*/
define("common:widget/js/logic/qrcode/qrcode",
function(t) {
    var e = t("common:widget/js/util/tangram/tangram"); !
    function(t) {
        function r(t) {
            this.mode = u.MODE_8BIT_BYTE,
            this.data = t
        }
        function o(t, e) {
            this.typeNumber = t,
            this.errorCorrectLevel = e,
            this.modules = null,
            this.moduleCount = 0,
            this.dataCache = null,
            this.dataList = new Array
        }
        function n(t, e) {
            if (void 0 == t.length) throw new Error(t.length + "/" + e);
            for (var r = 0; r < t.length && 0 == t[r];) r++;
            this.num = new Array(t.length - r + e);
            for (var o = 0; o < t.length - r; o++) this.num[o] = t[o + r]
        }
        function i(t, e) {
            this.totalCount = t,
            this.dataCount = e
        }
        function a() {
            this.buffer = new Array,
            this.length = 0
        }
        r.prototype = {
            getLength: function() {
                return this.data.length
            },
            write: function(t) {
                for (var e = 0; e < this.data.length; e++) t.put(this.data.charCodeAt(e), 8)
            }
        },
        o.prototype = {
            addData: function(t) {
                var e = new r(t);
                this.dataList.push(e),
                this.dataCache = null
            },
            isDark: function(t, e) {
                if (0 > t || this.moduleCount <= t || 0 > e || this.moduleCount <= e) throw new Error(t + "," + e);
                return this.modules[t][e]
            },
            getModuleCount: function() {
                return this.moduleCount
            },
            make: function() {
                if (this.typeNumber < 1) {
                    var t = 1;
                    for (t = 1; 40 > t; t++) {
                        for (var e = i.getRSBlocks(t, this.errorCorrectLevel), r = new a, o = 0, n = 0; n < e.length; n++) o += e[n].dataCount;
                        for (var n = 0; n < this.dataList.length; n++) {
                            var u = this.dataList[n];
                            r.put(u.mode, 4),
                            r.put(u.getLength(), l.getLengthInBits(u.mode, t)),
                            u.write(r)
                        }
                        if (r.getLengthInBits() <= 8 * o) break
                    }
                    this.typeNumber = t
                }
                this.makeImpl(!1, this.getBestMaskPattern())
            },
            makeImpl: function(t, e) {
                this.moduleCount = 4 * this.typeNumber + 17,
                this.modules = new Array(this.moduleCount);
                for (var r = 0; r < this.moduleCount; r++) {
                    this.modules[r] = new Array(this.moduleCount);
                    for (var n = 0; n < this.moduleCount; n++) this.modules[r][n] = null
                }
                this.setupPositionProbePattern(0, 0),
                this.setupPositionProbePattern(this.moduleCount - 7, 0),
                this.setupPositionProbePattern(0, this.moduleCount - 7),
                this.setupPositionAdjustPattern(),
                this.setupTimingPattern(),
                this.setupTypeInfo(t, e),
                this.typeNumber >= 7 && this.setupTypeNumber(t),
                null == this.dataCache && (this.dataCache = o.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)),
                this.mapData(this.dataCache, e)
            },
            setupPositionProbePattern: function(t, e) {
                for (var r = -1; 7 >= r; r++) if (! ( - 1 >= t + r || this.moduleCount <= t + r)) for (var o = -1; 7 >= o; o++) - 1 >= e + o || this.moduleCount <= e + o || (this.modules[t + r][e + o] = r >= 0 && 6 >= r && (0 == o || 6 == o) || o >= 0 && 6 >= o && (0 == r || 6 == r) || r >= 2 && 4 >= r && o >= 2 && 4 >= o ? !0 : !1)
            },
            getBestMaskPattern: function() {
                for (var t = 0,
                e = 0,
                r = 0; 8 > r; r++) {
                    this.makeImpl(!0, r);
                    var o = l.getLostPoint(this); (0 == r || t > o) && (t = o, e = r)
                }
                return e
            },
            createMovieClip: function(t, e, r) {
                var o = t.createEmptyMovieClip(e, r),
                n = 1;
                this.make();
                for (var i = 0; i < this.modules.length; i++) for (var a = i * n,
                u = 0; u < this.modules[i].length; u++) {
                    var s = u * n,
                    h = this.modules[i][u];
                    h && (o.beginFill(0, 100), o.moveTo(s, a), o.lineTo(s + n, a), o.lineTo(s + n, a + n), o.lineTo(s, a + n), o.endFill())
                }
                return o
            },
            setupTimingPattern: function() {
                for (var t = 8; t < this.moduleCount - 8; t++) null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0);
                for (var e = 8; e < this.moduleCount - 8; e++) null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0)
            },
            setupPositionAdjustPattern: function() {
                for (var t = l.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++) for (var r = 0; r < t.length; r++) {
                    var o = t[e],
                    n = t[r];
                    if (null == this.modules[o][n]) for (var i = -2; 2 >= i; i++) for (var a = -2; 2 >= a; a++) this.modules[o + i][n + a] = -2 == i || 2 == i || -2 == a || 2 == a || 0 == i && 0 == a ? !0 : !1
                }
            },
            setupTypeNumber: function(t) {
                for (var e = l.getBCHTypeNumber(this.typeNumber), r = 0; 18 > r; r++) {
                    var o = !t && 1 == (e >> r & 1);
                    this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = o
                }
                for (var r = 0; 18 > r; r++) {
                    var o = !t && 1 == (e >> r & 1);
                    this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = o
                }
            },
            setupTypeInfo: function(t, e) {
                for (var r = this.errorCorrectLevel << 3 | e,
                o = l.getBCHTypeInfo(r), n = 0; 15 > n; n++) {
                    var i = !t && 1 == (o >> n & 1);
                    6 > n ? this.modules[n][8] = i: 8 > n ? this.modules[n + 1][8] = i: this.modules[this.moduleCount - 15 + n][8] = i
                }
                for (var n = 0; 15 > n; n++) {
                    var i = !t && 1 == (o >> n & 1);
                    8 > n ? this.modules[8][this.moduleCount - n - 1] = i: 9 > n ? this.modules[8][15 - n - 1 + 1] = i: this.modules[8][15 - n - 1] = i
                }
                this.modules[this.moduleCount - 8][8] = !t
            },
            mapData: function(t, e) {
                for (var r = -1,
                o = this.moduleCount - 1,
                n = 7,
                i = 0,
                a = this.moduleCount - 1; a > 0; a -= 2) for (6 == a && a--;;) {
                    for (var u = 0; 2 > u; u++) if (null == this.modules[o][a - u]) {
                        var s = !1;
                        i < t.length && (s = 1 == (t[i] >>> n & 1));
                        var h = l.getMask(e, o, a - u);
                        h && (s = !s),
                        this.modules[o][a - u] = s,
                        n--,
                        -1 == n && (i++, n = 7)
                    }
                    if (o += r, 0 > o || this.moduleCount <= o) {
                        o -= r,
                        r = -r;
                        break
                    }
                }
            }
        },
        o.PAD0 = 236,
        o.PAD1 = 17,
        o.createData = function(t, e, r) {
            for (var n = i.getRSBlocks(t, e), u = new a, s = 0; s < r.length; s++) {
                var h = r[s];
                u.put(h.mode, 4),
                u.put(h.getLength(), l.getLengthInBits(h.mode, t)),
                h.write(u)
            }
            for (var g = 0,
            s = 0; s < n.length; s++) g += n[s].dataCount;
            if (u.getLengthInBits() > 8 * g) throw new Error("code length overflow. (" + u.getLengthInBits() + ">" + 8 * g + ")");
            for (u.getLengthInBits() + 4 <= 8 * g && u.put(0, 4); u.getLengthInBits() % 8 != 0;) u.putBit(!1);
            for (;;) {
                if (u.getLengthInBits() >= 8 * g) break;
                if (u.put(o.PAD0, 8), u.getLengthInBits() >= 8 * g) break;
                u.put(o.PAD1, 8)
            }
            return o.createBytes(u, n)
        },
        o.createBytes = function(t, e) {
            for (var r = 0,
            o = 0,
            i = 0,
            a = new Array(e.length), u = new Array(e.length), s = 0; s < e.length; s++) {
                var h = e[s].dataCount,
                g = e[s].totalCount - h;
                o = Math.max(o, h),
                i = Math.max(i, g),
                a[s] = new Array(h);
                for (var f = 0; f < a[s].length; f++) a[s][f] = 255 & t.buffer[f + r];
                r += h;
                var d = l.getErrorCorrectPolynomial(g),
                c = new n(a[s], d.getLength() - 1),
                m = c.mod(d);
                u[s] = new Array(d.getLength() - 1);
                for (var f = 0; f < u[s].length; f++) {
                    var v = f + m.getLength() - u[s].length;
                    u[s][f] = v >= 0 ? m.get(v) : 0
                }
            }
            for (var E = 0,
            f = 0; f < e.length; f++) E += e[f].totalCount;
            for (var T = new Array(E), p = 0, f = 0; o > f; f++) for (var s = 0; s < e.length; s++) f < a[s].length && (T[p++] = a[s][f]);
            for (var f = 0; i > f; f++) for (var s = 0; s < e.length; s++) f < u[s].length && (T[p++] = u[s][f]);
            return T
        };
        for (var u = {
            MODE_NUMBER: 1,
            MODE_ALPHA_NUM: 2,
            MODE_8BIT_BYTE: 4,
            MODE_KANJI: 8
        },
        s = {
            L: 1,
            M: 0,
            Q: 3,
            H: 2
        },
        h = {
            PATTERN000: 0,
            PATTERN001: 1,
            PATTERN010: 2,
            PATTERN011: 3,
            PATTERN100: 4,
            PATTERN101: 5,
            PATTERN110: 6,
            PATTERN111: 7
        },
        l = {
            PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
            G15: 1335,
            G18: 7973,
            G15_MASK: 21522,
            getBCHTypeInfo: function(t) {
                for (var e = t << 10; l.getBCHDigit(e) - l.getBCHDigit(l.G15) >= 0;) e ^= l.G15 << l.getBCHDigit(e) - l.getBCHDigit(l.G15);
                return (t << 10 | e) ^ l.G15_MASK
            },
            getBCHTypeNumber: function(t) {
                for (var e = t << 12; l.getBCHDigit(e) - l.getBCHDigit(l.G18) >= 0;) e ^= l.G18 << l.getBCHDigit(e) - l.getBCHDigit(l.G18);
                return t << 12 | e
            },
            getBCHDigit: function(t) {
                for (var e = 0; 0 != t;) e++,
                t >>>= 1;
                return e
            },
            getPatternPosition: function(t) {
                return l.PATTERN_POSITION_TABLE[t - 1]
            },
            getMask: function(t, e, r) {
                switch (t) {
                case h.PATTERN000:
                    return (e + r) % 2 == 0;
                case h.PATTERN001:
                    return e % 2 == 0;
                case h.PATTERN010:
                    return r % 3 == 0;
                case h.PATTERN011:
                    return (e + r) % 3 == 0;
                case h.PATTERN100:
                    return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0;
                case h.PATTERN101:
                    return e * r % 2 + e * r % 3 == 0;
                case h.PATTERN110:
                    return (e * r % 2 + e * r % 3) % 2 == 0;
                case h.PATTERN111:
                    return (e * r % 3 + (e + r) % 2) % 2 == 0;
                default:
                    throw new Error("bad maskPattern:" + t)
                }
            },
            getErrorCorrectPolynomial: function(t) {
                for (var e = new n([1], 0), r = 0; t > r; r++) e = e.multiply(new n([1, g.gexp(r)], 0));
                return e
            },
            getLengthInBits: function(t, e) {
                if (e >= 1 && 10 > e) switch (t) {
                case u.MODE_NUMBER:
                    return 10;
                case u.MODE_ALPHA_NUM:
                    return 9;
                case u.MODE_8BIT_BYTE:
                    return 8;
                case u.MODE_KANJI:
                    return 8;
                default:
                    throw new Error("mode:" + t)
                } else if (27 > e) switch (t) {
                case u.MODE_NUMBER:
                    return 12;
                case u.MODE_ALPHA_NUM:
                    return 11;
                case u.MODE_8BIT_BYTE:
                    return 16;
                case u.MODE_KANJI:
                    return 10;
                default:
                    throw new Error("mode:" + t)
                } else {
                    if (! (41 > e)) throw new Error("type:" + e);
                    switch (t) {
                    case u.MODE_NUMBER:
                        return 14;
                    case u.MODE_ALPHA_NUM:
                        return 13;
                    case u.MODE_8BIT_BYTE:
                        return 16;
                    case u.MODE_KANJI:
                        return 12;
                    default:
                        throw new Error("mode:" + t)
                    }
                }
            },
            getLostPoint: function(t) {
                for (var e = t.getModuleCount(), r = 0, o = 0; e > o; o++) for (var n = 0; e > n; n++) {
                    for (var i = 0,
                    a = t.isDark(o, n), u = -1; 1 >= u; u++) if (! (0 > o + u || o + u >= e)) for (var s = -1; 1 >= s; s++) 0 > n + s || n + s >= e || (0 != u || 0 != s) && a == t.isDark(o + u, n + s) && i++;
                    i > 5 && (r += 3 + i - 5)
                }
                for (var o = 0; e - 1 > o; o++) for (var n = 0; e - 1 > n; n++) {
                    var h = 0;
                    t.isDark(o, n) && h++,
                    t.isDark(o + 1, n) && h++,
                    t.isDark(o, n + 1) && h++,
                    t.isDark(o + 1, n + 1) && h++,
                    (0 == h || 4 == h) && (r += 3)
                }
                for (var o = 0; e > o; o++) for (var n = 0; e - 6 > n; n++) t.isDark(o, n) && !t.isDark(o, n + 1) && t.isDark(o, n + 2) && t.isDark(o, n + 3) && t.isDark(o, n + 4) && !t.isDark(o, n + 5) && t.isDark(o, n + 6) && (r += 40);
                for (var n = 0; e > n; n++) for (var o = 0; e - 6 > o; o++) t.isDark(o, n) && !t.isDark(o + 1, n) && t.isDark(o + 2, n) && t.isDark(o + 3, n) && t.isDark(o + 4, n) && !t.isDark(o + 5, n) && t.isDark(o + 6, n) && (r += 40);
                for (var l = 0,
                n = 0; e > n; n++) for (var o = 0; e > o; o++) t.isDark(o, n) && l++;
                var g = Math.abs(100 * l / e / e - 50) / 5;
                return r += 10 * g
            }
        },
        g = {
            glog: function(t) {
                if (1 > t) throw new Error("glog(" + t + ")");
                return g.LOG_TABLE[t]
            },
            gexp: function(t) {
                for (; 0 > t;) t += 255;
                for (; t >= 256;) t -= 255;
                return g.EXP_TABLE[t]
            },
            EXP_TABLE: new Array(256),
            LOG_TABLE: new Array(256)
        },
        f = 0; 8 > f; f++) g.EXP_TABLE[f] = 1 << f;
        for (var f = 8; 256 > f; f++) g.EXP_TABLE[f] = g.EXP_TABLE[f - 4] ^ g.EXP_TABLE[f - 5] ^ g.EXP_TABLE[f - 6] ^ g.EXP_TABLE[f - 8];
        for (var f = 0; 255 > f; f++) g.LOG_TABLE[g.EXP_TABLE[f]] = f;
        n.prototype = {
            get: function(t) {
                return this.num[t]
            },
            getLength: function() {
                return this.num.length
            },
            multiply: function(t) {
                for (var e = new Array(this.getLength() + t.getLength() - 1), r = 0; r < this.getLength(); r++) for (var o = 0; o < t.getLength(); o++) e[r + o] ^= g.gexp(g.glog(this.get(r)) + g.glog(t.get(o)));
                return new n(e, 0)
            },
            mod: function(t) {
                if (this.getLength() - t.getLength() < 0) return this;
                for (var e = g.glog(this.get(0)) - g.glog(t.get(0)), r = new Array(this.getLength()), o = 0; o < this.getLength(); o++) r[o] = this.get(o);
                for (var o = 0; o < t.getLength(); o++) r[o] ^= g.gexp(g.glog(t.get(o)) + e);
                return new n(r, 0).mod(t)
            }
        },
        i.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]],
        i.getRSBlocks = function(t, e) {
            var r = i.getRsBlockTable(t, e);
            if (void 0 == r) throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e);
            for (var o = r.length / 3,
            n = new Array,
            a = 0; o > a; a++) for (var u = r[3 * a + 0], s = r[3 * a + 1], h = r[3 * a + 2], l = 0; u > l; l++) n.push(new i(s, h));
            return n
        },
        i.getRsBlockTable = function(t, e) {
            switch (e) {
            case s.L:
                return i.RS_BLOCK_TABLE[4 * (t - 1) + 0];
            case s.M:
                return i.RS_BLOCK_TABLE[4 * (t - 1) + 1];
            case s.Q:
                return i.RS_BLOCK_TABLE[4 * (t - 1) + 2];
            case s.H:
                return i.RS_BLOCK_TABLE[4 * (t - 1) + 3];
            default:
                return void 0
            }
        },
        a.prototype = {
            get: function(t) {
                var e = Math.floor(t / 8);
                return 1 == (this.buffer[e] >>> 7 - t % 8 & 1)
            },
            put: function(t, e) {
                for (var r = 0; e > r; r++) this.putBit(1 == (t >>> e - r - 1 & 1))
            },
            getLengthInBits: function() {
                return this.length
            },
            putBit: function(t) {
                var e = Math.floor(this.length / 8);
                this.buffer.length <= e && this.buffer.push(0),
                t && (this.buffer[e] |= 128 >>> this.length % 8),
                this.length++
            }
        },
        t.fn.qrcode = function(r) {
            "string" == typeof r && (r = {
                text: r
            }),
            r = t.extend({},
            {
                render: "canvas",
                width: 256,
                height: 256,
                typeNumber: -1,
                correctLevel: s.H,
                background: "#ffffff",
                foreground: "#000000"
            },
            r);
            var n = function() {
                var t = new o(r.typeNumber, r.correctLevel);
                t.addData(r.text),
                t.make();
                var e = document.createElement("canvas");
                e.width = r.width,
                e.height = r.height;
                for (var n = e.getContext("2d"), i = r.width / t.getModuleCount(), a = r.height / t.getModuleCount(), u = 0; u < t.getModuleCount(); u++) for (var s = 0; s < t.getModuleCount(); s++) {
                    n.fillStyle = t.isDark(u, s) ? r.foreground: r.background;
                    var h = Math.ceil((s + 1) * i) - Math.floor(s * i),
                    l = Math.ceil((u + 1) * i) - Math.floor(u * i);
                    n.fillRect(Math.round(s * i), Math.round(u * a), h, l)
                }
                return e
            },
            i = function() {
                var e = new o(r.typeNumber, r.correctLevel);
                e.addData(r.text),
                e.make();
                for (var n = t("<table></table>").css("width", r.width + "px").css("height", r.height + "px").css("border", "0px").css("border-collapse", "collapse").css("background-color", r.background), i = r.width / e.getModuleCount(), a = r.height / e.getModuleCount(), u = 0; u < e.getModuleCount(); u++) for (var s = t("<tr></tr>").css("height", a + "px").appendTo(n), h = 0; h < e.getModuleCount(); h++) t("<td></td>").css("width", i + "px").css("background-color", e.isDark(u, h) ? r.foreground: r.background).appendTo(s);
                return n
            };
            return this.each(function() {
                var t = "canvas" == r.render ? n() : i();
                e(t).appendTo(this)
            })
        }
    } (e)
});;
/*!common:widget/js/logic/set-avatar/set-avatar.js*/
define("common:widget/js/logic/set-avatar/set-avatar",
function(a, e) {
    function t(a, e, t, n) {
        var s = o('<div class="goto-set-avatar" />').appendTo(a).html('<a href="' + (e || "/ihome/set/profile?type=avatar") + '" target="' + (t || "_blank") + '">' + (n || "\u66f4\u6362\u5f62\u8c61") + "</a><p></p>");
        a.addClass("avatar-mask-p"),
        a.mouseover(function() {
            s.css("display", "block")
        }).mouseout(function() {
            s.css("display", "none")
        })
    } {
        var o = a("common:widget/lib/jquery/jquery");
        a("common:widget/js/util/event/event")
    }
    e.init = function(a) {
        t(o(a.elem), a.href, a.openTag, a.str)
    }
});;
/*!common:widget/js/logic/set-carefield/set-carefield.js*/
define("common:widget/js/logic/set-carefield/set-carefield",
function(require, exports, module) {
    var $ = require("common:widget/js/util/tangram/tangram"),
    dialog = require("common:widget/js/ui/dialog/dialog"),
    ec = require("common:widget/js/util/event/event"),
    login = require("common:widget/js/logic/login/login"),
    uiBase = require("common:widget/js/ui/base/base"),
    category = require("common:widget/js/logic/category/category"),
    setCareField = uiBase(function(opts) {
        function _resize() {
            _dialog.setSize({
                width: 520,
                height: $("#setCareField-wrap").height() + 60
            })
        }
        function _initHtml(e, i) {
            function d() {
                var e = "";
                me._cids = [];
                for (var d = 0; d < i.length; d++) me._cids.push(i[d]),
                e += me._careSpan.format({
                    cid: i[d][0],
                    text: i[d][1].split(",").reverse().join('<span class="split">></span>')
                });
                $("#careList").html(e)
            }
            function r() {
                var i = "";
                me._keywords = [];
                for (var d = 0; d < e.length; d++) e[d] = e[d].replace(/&lt;/g, "<").replace(/&gt;/g, ">"),
                me._keywords.push(e[d]),
                i += me._wordSpan.format({
                    word: $.string.encodeHTML(e[d])
                });
                $("#wordList").html(i + '<div style="clear:both"></div>')
            }
            r(),
            d(),
            _checkKeyword(),
            _checkCid(),
            _resize(),
            _dialog.center(),
            $("#addCareBtnAdd").css("top", options.selectSize / 2 * 17 - 4 + "px"),
            $("#addCareBtnDel").css("top", options.selectSize / 2 * 17 - 4 + "px")
        }
        function _Submit(keywords, cids, success, error) {
            error || (error = function() {}),
            success || (success = function() {});
            for (var temp = [], i = 0; i < cids.length; i++) temp.push(cids[i][0]);
            for (var idStr = temp.join("_"), kwStr = "", i = 0; i < keywords.length; i++) {
                var decode = T.string.decodeHTML(keywords[i]);
                kwStr += "&kw" + i + "=" + encodeURIComponent(decode)
            }
            0 != keywords.length && (kwStr += "&kwn=" + keywords.length);
            var url = "cm=100522&word=" + idStr + kwStr + "&stoken=" + F.context("user").stoken;
            T.ajax({
                url: "/submit/user",
                data: url,
                type: "POST",
                dataType: "text",
                success: function(data) {
                    if (data) {
                        var backData = eval("(" + data + ")");
                        if ("0" == backData.errorNo) {
                            me._keywords = [];
                            for (var i = 0; i < keywords.length; i++) me._keywords.push(keywords[i]);
                            me._cids = [];
                            for (var i = 0; i < cids.length; i++) me._cids.push(cids[i]);
                            _checkKeyword(),
                            _checkCid(),
                            me.tag = !0,
                            success()
                        } else error()
                    } else error();
                    _resize()
                },
                error: error
            })
        }
        function dialogBind() {
            $(window).on("resize",
            function() {
                _dialog.center()
            }),
            $("#setCareField-wrap").click(function(e) {
                e.preventDefault()
            }),
            $("#setCareField-wrap").mouseover(function(e) {
                var i = $(e.target);
                i.is("i") && i.addClass("ihover")
            }),
            $("#setCareField-wrap").mouseout(function(e) {
                var i = $(e.target);
                i.is("i") && i.removeClass("ihover")
            }),
            $("#care-wrap-addBtn").mouseenter(function() {
                $(this).addClass("hover")
            }),
            $("#care-wrap-addBtn").mouseleave(function() {
                $(this).removeClass("hover")
            }),
            $("#keyWord-header").click(function() {
                $(this).attr("ishide") ? $(this).attr("ishide", "").removeClass("headerClose").next().show() : $(this).attr("ishide", "true").addClass("headerClose").next().hide(),
                _resize()
            }),
            $("#category-header").click(function() {
                $(this).attr("ishide") ? $(this).attr("ishide", "").removeClass("headerClose").next().show() : $(this).attr("ishide", "true").addClass("headerClose").next().hide(),
                _resize()
            }),
            $("#wordList").on("click",
            function(e) {
                var i = $(e.target);
                i.is("i") && i.parent().hasClass("wordSpan") && _delKeyword(i.parent())
            }),
            $("#careList").on("click",
            function(e) {
                var i = $(e.target);
                i.is("i") && i.parent().hasClass("careSpan") && _delCid(i.parent())
            }),
            $("#addWordBtn").on("click",
            function() {
                _addKeyword($("#wordInput").val())
            }),
            $("#wordInput").on("focus",
            function() {
                "\u8f93\u5165\u60a8\u64c5\u957f\u7684\u5173\u952e\u8bcd" == $("#wordInput").val() && $("#wordInput").val("").css("color", "#333333")
            }),
            $("#wordInput").on("blur",
            function() {
                "" == $("#wordInput").val() && $("#wordInput").val("\u8f93\u5165\u60a8\u64c5\u957f\u7684\u5173\u952e\u8bcd").css("color", "#b3b3b3")
            }),
            $("#addCareBtn").on("click",
            function() {
                $("#care-wrap-addBtn").show(),
                $(this).hide(),
                _resize()
            }),
            $("#addCareBtnAdd").on("click",
            function() {
                var e = [],
                i = _dialog.cat.getValue();
                i && (e.push(i.cid), e.push(i.arrName.reverse().join(","))),
                i.cid ? _addCid(e) : ($("#care-wrap-addBtn").hide(), $("#addCareBtn").show(), _resize())
            }),
            $("#addCareBtnDel").on("click",
            function() {
                $("#care-wrap-addBtn").hide(),
                $("#addCareBtn").show(),
                _resize()
            })
        }
        function _delKeyword(e) {
            for (tempKeywords = [], i = 0; i < me._keywords.length; i++) e.attr("word") != me._keywords[i] && tempKeywords.push(me._keywords[i]);
            _Submit(tempKeywords, me._cids,
            function() {
                e.remove(),
                _resize()
            },
            function() {
                $("#addWordTip").html(remindMsg.key.error).show(),
                _resize()
            })
        }
        function _addCid(e) {
            for (tempCids = [], i = 0; i < me._cids.length; i++) tempCids.push(me._cids[i]);
            e && _checkCid(e[0]) && (tempCids.push(e), _Submit(me._keywords, tempCids,
            function() {
                var i = e[1].split(",").reverse().join('<span class="split">></span>');
                T(me._careSpan.format({
                    cid: e[0],
                    text: i
                })).appendTo("#careList"),
                T("#care-wrap-addBtn").hide(),
                T("#addCareBtn").show(),
                _resize()
            },
            function() {
                T("#addCareTip").html(remindMsg.cat.error).show(),
                _resize()
            }))
        }
        function _delCid(e) {
            for (tempCids = [], i = 0; i < me._cids.length; i++) e.attr("cid") != me._cids[i][0] && tempCids.push(me._cids[i]);
            _Submit(me._keywords, tempCids,
            function() {
                e.remove(),
                _resize()
            },
            function() {
                T("#addCareTip").html(remindMsg.cat.error).show(),
                _resize()
            })
        }
        function _addKeyword(e) {
            if (! (e = $.string(e || "").trim())) return $("#addWordTip").html(remindMsg.key.noWord).show(),
            void _resize();
            for (tempKeywords = [], i = 0; i < me._keywords.length; i++) tempKeywords.push(me._keywords[i]);
            e && (e = e.replace(/&lt;/g, "<").replace(/&gt;/g, ">"), _checkKeyword(e) && (tempKeywords.push(e), _Submit(tempKeywords, me._cids,
            function() {
                $(me._wordSpan.format({
                    word: $.string.encodeHTML(e)
                })).insertBefore($("#wordList div")[0]),
                $("#wordInput").val(""),
                $("#wordInput").trigger("focus"),
                _resize()
            },
            function() {
                $("#addWordTip").html(remindMsg.key.error).show(),
                _resize()
            })))
        }
        function _checkCid(e) {
            if (tag = !0, e && 0 != e) {
                if (0 == e.length) $("#addCareTip").html(remindMsg.cat.noCid).show(),
                tag = !1;
                else for (var i = 0; i < me._cids.length; i++) me._cids[i][0] == e && ($("#addCareTip").html(remindMsg.cat.exist).show(), tag = !1);
                0 == me._cids.length && $("#careList").html("")
            } else me._cids.length >= defaultOptions._maxCidNum ? ($("#care-wrap-btn").hide(), $("#careTip").html(remindMsg.cat.enough).show(), tag = !1) : ($("#care-wrap-btn").show(), $("#careTip").html("").hide()),
            0 == me._cids.length ? ($("#careList-title").html(""), $("#careList").html(remindMsg.cat.wordTip)) : $("#careList-title").html("\u5df2\u6dfb\u52a0\u7684\u5206\u7c7b"),
            $("#addCareTip").html("").hide();
            return tag && $("#addCareTip").html("").hide(),
            _resize(),
            tag
        }
        function _checkKeyword(e) {
            if (tag = !0, e && "" != e) {
                if (e = $.string(e).trim(), 0 == e.length || "\u8f93\u5165\u60a8\u64c5\u957f\u7684\u5173\u952e\u8bcd" == e) $("#addWordTip").html(remindMsg.key.noWord).show(),
                tag = !1;
                else if ($.string.getByteLength(e) > 20) $("#addWordTip").html(remindMsg.key.tooLong).show(),
                tag = !1;
                else for (var i = 0; i < me._keywords.length; i++) me._keywords[i] == e && ($("#addWordTip").html(remindMsg.key.exist).show(), tag = !1);
                0 == me._keywords.length && $("#wordList").html('<div style="clear:both"></div>')
            } else me._keywords.length >= defaultOptions._maxKeywordNum ? ($("#word-wrap-btn").hide(), $("#wordTip").html(remindMsg.key.enough).show(), tag = !1) : ($("#word-wrap-btn").show(), $("#wordTip").html("").hide()),
            0 == me._keywords.length ? ($("#wordList-title").html(""), $("#wordList").html(remindMsg.key.wordTip)) : $("#wordList-title").html("\u5df2\u6dfb\u52a0\u7684\u5173\u952e\u8bcd"),
            $("#addWordTip").html("").hide();
            return tag && $("#addWordTip").html("").hide(),
            _resize(),
            tag
        }
        function _init(e) {
            options = $.object.extend(defaultOptions, e),
            options.onopen && options.onopen.apply(me),
            $.forEach(options,
            function(e, i) {
                $.isFunction(e) ? me.on(i, e) : me[i] = e
            });
            var i = '<div id="setCareField-wrap"><div id="keyWord-wrap" class="wrap"><div id="keyWord-header" class="header"><span>\u6211\u5173\u6ce8\u7684\u5173\u952e\u8bcd</span></div><div id="keyWord-body" class="body"><div id="wordList-title">\u5df2\u6dfb\u52a0\u7684\u5173\u952e\u8bcd</div><div id="wordList"></div><div style="clear:both"></div><span class="alert" id="addWordTip">\u6dfb\u52a0\u5173\u952e\u8bcd\u5931\u8d25</span><div id="word-wrap-btn"><div id="word-wrap-addBtn"><input type="text" id="wordInput" value="\u8f93\u5165\u60a8\u64c5\u957f\u7684\u5173\u952e\u8bcd" /><a type="button" id="addWordBtn" href="#"></a></div><div id="recWordsList"></div></div><div style="clear:both"></div><div id="wordTip" class="tip">\u4f60\u5173\u6ce8\u7684\u5173\u952e\u8bcd\u4e2a\u6570\u5df2\u8fbe\u5230\u4e0a\u9650\uff0c\u8bf7\u5220\u9664\u540e\u518d\u505a\u6dfb\u52a0</div></div></div><div id="category-wrap" class="wrap"><div id="category-header" class="header"><span>\u6211\u5173\u6ce8\u7684\u5206\u7c7b</span></div><div id="category-body" class="body"><div id="careList-title">\u5df2\u6dfb\u52a0\u7684\u5206\u7c7b</div><div id="careList"></div><div id="care-wrap-btn"><div id="care-wrap-addBtn"><div id="addCareBtnAdd"><a href="#"></a></div><div id="addCareBtnDel"><a href="#"></a></div></div><div id="addCareBtn"><a href="#"></a></div></div><div style="clear:both"></div><span class="alert" id="addCareTip">\u6dfb\u52a0\u5173\u952e\u8bcd\u5931\u8d25</span><div id="careTip" class="tip">\u4f60\u5173\u6ce8\u7684\u5173\u952e\u8bcd\u4e2a\u6570\u5df2\u8fbe\u5230\u4e0a\u9650\uff0c\u8bf7\u5220\u9664\u540e\u518d\u505a\u6dfb\u52a0</div></div></div></div>';
            _dialog = new dialog({
                title: "\u8bbe\u7f6e\u5173\u6ce8\u9886\u57df",
                content: i,
                contentType: "html",
                autoDispose: !0,
                width: 520,
                close: function() {
                    var e = {
                        keywords: me._keywords,
                        cids: me._cids
                    };
                    options.onclose(e)
                }
            }),
            _dialog.cat = new category({
                target: "#care-wrap-addBtn",
                selectSize: options.selectSize,
                splitor: "<span>&gt</span>"
            }),
            dialogBind(),
            $.sio("/ucenter/api/uccarefieldpop?t=" + (new Date).getTime()).callByServer(function(e) {
                return e ? void _initHtml(e.keyword, e.category) : void _initHtml([], [])
            }),
            _checkKeyword(),
            _checkCid(),
            _resize(),
            _dialog.center();
            var d = "\u8bbe\u7f6e\u5173\u6ce8\u9886\u57df";
            options.expand && "all" != options.expand ? ($("#careList-title").show(), $("#wordList-title").show(), "onlyCid" == options.expand ? (d = "\u8bbe\u7f6e\u5206\u7c7b", $("#category-wrap").show(), $("#keyWord-header").show(), $("#keyWord-wrap").hide(), $("#category-header").hide()) : "onlyKey" == options.expand && (d = "\u8bbe\u7f6e\u5173\u952e\u8bcd", $("#keyWord-wrap").show(), $("#category-header").show(), $("#category-wrap").hide(), $("#keyWord-header").hide(), T("#wordInput").focus())) : ($("#keyWord-wrap").show(), $("#category-header").show(), $("#category-wrap").show(), $("#keyWord-header").show(), $("#careList-title").hide(), $("#wordList-title").hide()),
            _dialog.setTitle(d)
        }
        var defaultOptions = {
            _maxKeywordNum: 20,
            _maxKeywordLength: 20,
            _maxCidNum: 5,
            selectSize: 7,
            expand: "all",
            onopen: function() {},
            onclose: function() {
                me.tag && window.location.reload(!0)
            }
        },
        me = this,
        options = {},
        _dialog;
        me.tag = !1;
        var remindMsg = {
            key: {
                noWord: "\u8bf7\u8f93\u5165\u60a8\u7684\u5173\u952e\u8bcd\uff01",
                tooLong: "\u60a8\u8f93\u5165\u7684\u5173\u952e\u8bcd\u592a\u957f\u62c9\uff0c\u91cd\u65b0\u68c0\u67e5\u4e00\u4e0b\u5427\uff01",
                exist: "\u60a8\u8f93\u5165\u7684\u5173\u952e\u8bcd\u5df2\u7ecf\u6dfb\u52a0\u8fc7\u4e86\uff0c\u4e0d\u8981\u91cd\u590d\u6dfb\u52a0\u54e6\uff01",
                wordTip: "\u60a8\u53ef\u4ee5\u8bbe\u5b9a <b>" + defaultOptions._maxKeywordNum + '</b> \u7ec4\u5173\u952e\u8bcd\uff0c\u82e5\u4e00\u7ec4\u4e2d\u5305\u542b\u591a\u4e2a\u5173\u952e\u8bcd\uff0c\u8bf7\u7528\u7a7a\u683c\u5206\u9694\uff0c\u4f8b\u5982"\u7231\u597d \u8db3\u7403"',
                enough: "\u4f60\u5173\u6ce8\u7684\u5173\u952e\u8bcd\u4e2a\u6570\u5df2\u8fbe\u5230\u4e0a\u9650\uff0c\u8bf7\u5220\u9664\u540e\u518d\u505a\u6dfb\u52a0\uff01",
                error: "\u5f88\u62b1\u6b49\u6ca1\u64cd\u4f5c\u6210\u529f\uff0c\u518d\u8bd5\u8bd5\u770b\u5427\uff01"
            },
            cat: {
                noCid: "\u8bf7\u70b9\u51fb\u9009\u62e9\u6846\uff0c\u9009\u62e9\u5206\u7c7b\uff01",
                exist: "\u4f60\u9009\u62e9\u7684\u5206\u7c7b\u5df2\u7ecf\u6dfb\u52a0\u8fc7\u4e86\uff0c\u4e0d\u8981\u91cd\u590d\u6dfb\u52a0\u54e6\uff01",
                addTip: "\u60a8\u53ef\u4ee5\u8bbe\u5b9a<b>" + defaultOptions._maxCidNum + "</b>\u4e2a\u5206\u7c7b\uff01",
                enough: "\u5173\u6ce8\u5206\u7c7b\u5df2\u6ee1\uff0c\u5220\u51cf\u540e\u53ef\u4ee5\u7ee7\u7eed\u6dfb\u52a0\uff5e",
                wordTip: "\u4f60\u8fd8\u6ca1\u6709\u6dfb\u52a0\u5206\u7c7b\uff0c\u70b9\u51fb\u6dfb\u52a0\u6309\u94ae\u6dfb\u52a0\u5427\uff01",
                error: "\u5f88\u62b1\u6b49\u6ca1\u64cd\u4f5c\u6210\u529f\uff0c\u518d\u8bd5\u8bd5\u770b\u5427\uff01"
            }
        };
        me._keywords = [],
        me._cids = [],
        me._wordSpan = new $.string('<a href="#" class="wordSpan" word="#{word}"><span>#{word}</span><i></i></a>'),
        me._careSpan = new $.string('<a href="#" class="careSpan" cid="#{cid}"><span>#{text}</span><i></i></a>'),
        ec.fire("login.check", {
            isLogin: function() {
                _init(opts)
            },
            noLogin: function() {
                ec.fire("login.log", {
                    onLoginSuccess: function() {
                        _init(opts)
                    }
                })
            }
        })
    });
    module.exports = setCareField
});;
/*!common:widget/js/ui/scrollbar/scrollbar.js*/
define("common:widget/js/ui/scrollbar/scrollbar",
function(t, e, s) {
    function o(t) {
        "undefined" != typeof t.style.WebkitUserSelect ? t.style.WebkitUserSelect = "none": "undefined" != typeof t.style.MozUserSelect ? t.style.MozUserSelect = "none": "undefined" != typeof t.onselectstart ? t.onselectstart = function() {
            return ! 1
        }: t.onmousedown = function() {
            return ! 1
        }
    }
    function n(t) {
        "undefined" != typeof t.style.WebkitUserSelect ? t.style.WebkitUserSelect = "": "undefined" != typeof t.style.MozUserSelect ? t.style.MozUserSelect = "": "undefined" != typeof t.onselectstart ? t.onselectstart = function() {
            return ! 0
        }: t.onmousedown = function() {
            return ! 0
        }
    }
    var r = t("common:widget/js/util/tangram/tangram"),
    i = t("common:widget/js/ui/base/base");
    t("common:widget/lib/jquery.ui/jquery.ui.mousewheel");
    var c = i().extend({
        init: function(t) {
            this.options = r.extend({
                scrollWrapper: "",
                scrollContent: "",
                maxHeight: 600,
                autoHide: 1
            },
            t),
            this.rate = 0,
            this.scrollbarHeight = 0,
            this.contentHeight = 0
        },
        render: function() {
            var t = this,
            e = '<div class="scrollbar-wp" ' + (t.options.autoHide ? 'style="display:none;"': "") + '><div class="scrollbar"></div></div>',
            s = t.options.scrollWrapper,
            i = t.options.scrollContent,
            c = t.options.maxHeight;
            if (t.contentHeight = i.height(), t.rate = c / t.contentHeight, t.contentHeight > c) {
                s.css({
                    position: "relative",
                    top: 0,
                    left: 0,
                    height: c,
                    overflow: "hidden"
                }),
                i.css({
                    position: "relative",
                    top: 0,
                    left: 0
                }),
                s.append(r(e));
                var p = r(".scrollbar", s);
                p.height(t.rate * c),
                p.hover(function() {
                    r(this).addClass("hover")
                },
                function() {
                    r(this).removeClass("hover")
                });
                var a = 0,
                l = 0,
                u = 0,
                h = 0;
                t.scrollbarHeight = p.height(),
                p.mousedown(function(t) {
                    a = 1,
                    l = t.pageY,
                    u = parseInt(p.css("top"), 10),
                    h = parseInt(i.css("top"), 10),
                    o(document.body)
                }),
                r(document).mousemove(function(e) {
                    if (a) {
                        var s = e.pageY - l;
                        if (0 > s && parseInt(p.css("top"), 10) <= 0) return p.css("top", "0"),
                        void i.css("top", "0");
                        if (s > 0 && parseInt(p.css("top"), 10) >= c - t.scrollbarHeight) return p.css("top", c - t.scrollbarHeight + "px"),
                        void i.css("top", "-" + (t.contentHeight - c) + "px");
                        p.css("top", parseInt(u + s, 10) + "px"),
                        i.css({
                            top: parseInt(h - s / c * t.contentHeight, 10) + "px"
                        })
                    }
                }),
                r(document).mouseup(function() {
                    a = 0,
                    n(document.body)
                });
                var d = 5,
                f = 0;
                t.options.autoHide ? (s.click(function() {
                    f = 1,
                    u = parseInt(p.css("top"), 10),
                    h = parseInt(i.css("top"), 10)
                }), s.blur(function() {
                    f = 0
                })) : (f = 1, u = parseInt(p.css("top"), 10), h = parseInt(i.css("top"), 10)),
                s.mousewheel(function(e, s) {
                    if (f && p.is(":visible")) if (e.preventDefault(), u = parseInt(p.css("top"), 10), h = parseInt(i.css("top"), 10), 0 > s) {
                        if (parseInt(p.css("top"), 10) / (c - t.scrollbarHeight) > .8 && t.options.onScrollEnd && t.options.onScrollEnd.call(t), parseInt(p.css("top"), 10) >= c - t.scrollbarHeight) return p.css("top", c - t.scrollbarHeight + "px"),
                        void i.css("top", "-" + (t.contentHeight - c) + "px");
                        p.css("top", parseInt(u + d, 10) + "px"),
                        i.css("top", parseInt(h - d / t.rate, 10) + "px")
                    } else {
                        if (parseInt(p.css("top"), 10) <= 0) return p.css("top", "0"),
                        void i.css("top", "0");
                        p.css("top", parseInt(u - d, 10) + "px"),
                        i.css("top", parseInt(h + d / t.rate, 10) + "px")
                    }
                }),
                t.options.autoHide && s.hover(function() {
                    r(".scrollbar-wp", s).show()
                },
                function() {
                    r(".scrollbar-wp", s).hide(),
                    a = 0,
                    n(document.body)
                })
            }
        },
        update: function() {
            var t = this,
            e = t.options.scrollWrapper,
            s = t.options.scrollContent,
            o = t.options.maxHeight;
            t.contentHeight = s.height();
            var n = r(".scrollbar", e);
            if (t.rate = o / t.contentHeight, t.contentHeight > o) if (n.length) {
                var i = parseInt(n.css("top"), 10),
                c = parseInt(s.css("top"), 10);
                n.height(parseInt(t.rate * o, 10)),
                t.scrollbarHeight = parseInt(t.rate * o, 10),
                i >= o - t.scrollbarHeight ? (n.css("top", o - t.scrollbarHeight + "px"), s.css("top", "-" + (t.contentHeight - o) + "px")) : (n.css("top", parseInt(t.rate * i, 10) + "px"), s.css("top", parseInt(t.rate * c, 10) + "px")),
                n.parent().show(),
                s.css("position", "relative")
            } else t.render();
            else n.length && n.parent().hide(),
            s.css("position", "static")
        }
    });
    s.exports = c
});;
/*!common:widget/js/logic/set-tag-dialog/sortable.js*/
define("common:widget/js/logic/set-tag-dialog/sortable",
function(t) {
    var e = t("common:widget/lib/jquery/jquery");
    t("common:widget/lib/jquery.ui/jquery.ui.core"),
    t("common:widget/lib/jquery.ui/jquery.ui.widget"),
    t("common:widget/lib/jquery.ui/jquery.ui.position"),
    t("common:widget/lib/jquery.ui/jquery.ui.mouse"),
    e.widget("ui.sortable", e.ui.mouse, {
        version: "1.11.0",
        widgetEventPrefix: "sort",
        ready: !1,
        options: {
            appendTo: "parent",
            axis: !1,
            connectWith: !1,
            containment: !1,
            cursor: "auto",
            cursorAt: !1,
            dropOnEmpty: !0,
            forcePlaceholderSize: !1,
            forceHelperSize: !1,
            grid: !1,
            handle: !1,
            helper: "original",
            items: "> *",
            opacity: !1,
            placeholder: !1,
            revert: !1,
            scroll: !0,
            scrollSensitivity: 20,
            scrollSpeed: 20,
            scope: "default",
            tolerance: "intersect",
            zIndex: 1e3,
            activate: null,
            beforeStop: null,
            change: null,
            deactivate: null,
            out: null,
            over: null,
            receive: null,
            remove: null,
            sort: null,
            start: null,
            stop: null,
            update: null
        },
        _isOverAxis: function(t, e, i) {
            return t >= e && e + i > t
        },
        _isFloating: function(t) {
            return /left|right/.test(t.css("float")) || /inline|table-cell/.test(t.css("display"))
        },
        _create: function() {
            var t = this.options;
            this.containerCache = {},
            this.element.addClass("ui-sortable"),
            this.refresh(),
            this.floating = this.items.length ? "x" === t.axis || this._isFloating(this.items[0].item) : !1,
            this.offset = this.element.offset(),
            this._mouseInit(),
            this._setHandleClassName(),
            this.ready = !0
        },
        _setOption: function(t, e) {
            this._super(t, e),
            "handle" === t && this._setHandleClassName()
        },
        _setHandleClassName: function() {
            this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),
            e.each(this.items,
            function() { (this.instance.options.handle ? this.item.find(this.instance.options.handle) : this.item).addClass("ui-sortable-handle")
            })
        },
        _destroy: function() {
            this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),
            this._mouseDestroy();
            for (var t = this.items.length - 1; t >= 0; t--) this.items[t].item.removeData(this.widgetName + "-item");
            return this
        },
        _mouseCapture: function(t, i) {
            var s = null,
            o = !1,
            r = this;
            return this.reverting ? !1 : this.options.disabled || "static" === this.options.type ? !1 : (this._refreshItems(t), e(t.target).parents().each(function() {
                return e.data(this, r.widgetName + "-item") === r ? (s = e(this), !1) : void 0
            }), e.data(t.target, r.widgetName + "-item") === r && (s = e(t.target)), s && (!this.options.handle || i || (e(this.options.handle, s).find("*").addBack().each(function() {
                this === t.target && (o = !0)
            }), o)) ? (this.currentItem = s, this._removeCurrentsFromItems(), !0) : !1)
        },
        _mouseStart: function(t, i, s) {
            var o, r, n = this.options;
            if (this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(t), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {
                top: this.offset.top - this.margins.top,
                left: this.offset.left - this.margins.left
            },
            e.extend(this.offset, {
                click: {
                    left: t.pageX - this.offset.left,
                    top: t.pageY - this.offset.top
                },
                parent: this._getParentOffset(),
                relative: this._getRelativeOffset()
            }), this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), this.originalPosition = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt), this.domPosition = {
                prev: this.currentItem.prev()[0],
                parent: this.currentItem.parent()[0]
            },
            this.helper[0] !== this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), n.containment && this._setContainment(), n.cursor && "auto" !== n.cursor && (r = this.document.find("body"), this.storedCursor = r.css("cursor"), r.css("cursor", n.cursor), this.storedStylesheet = e("<style>*{ cursor: " + n.cursor + " !important; }</style>").appendTo(r)), n.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", n.opacity)), n.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", n.zIndex)), this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", t, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(), !s) for (o = this.containers.length - 1; o >= 0; o--) this.containers[o]._trigger("activate", t, this._uiHash(this));
            return e.ui.ddmanager && (e.ui.ddmanager.current = this),
            e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t),
            this.dragging = !0,
            this.helper.addClass("ui-sortable-helper"),
            this._mouseDrag(t),
            !0
        },
        _mouseDrag: function(t) {
            var i, s, o, r, n = this.options,
            h = !1;
            for (this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs), this.options.scroll && (this.scrollParent[0] !== document && "HTML" !== this.scrollParent[0].tagName ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t.pageY < n.scrollSensitivity ? this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop + n.scrollSpeed: t.pageY - this.overflowOffset.top < n.scrollSensitivity && (this.scrollParent[0].scrollTop = h = this.scrollParent[0].scrollTop - n.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < n.scrollSensitivity ? this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft + n.scrollSpeed: t.pageX - this.overflowOffset.left < n.scrollSensitivity && (this.scrollParent[0].scrollLeft = h = this.scrollParent[0].scrollLeft - n.scrollSpeed)) : (t.pageY - e(document).scrollTop() < n.scrollSensitivity ? h = e(document).scrollTop(e(document).scrollTop() - n.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < n.scrollSensitivity && (h = e(document).scrollTop(e(document).scrollTop() + n.scrollSpeed)), t.pageX - e(document).scrollLeft() < n.scrollSensitivity ? h = e(document).scrollLeft(e(document).scrollLeft() - n.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < n.scrollSensitivity && (h = e(document).scrollLeft(e(document).scrollLeft() + n.scrollSpeed))), h !== !1 && e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t)), this.positionAbs = this._convertPositionTo("absolute"), this.options.axis && "y" === this.options.axis || (this.helper[0].style.left = this.position.left + "px"), this.options.axis && "x" === this.options.axis || (this.helper[0].style.top = this.position.top + "px"), i = this.items.length - 1; i >= 0; i--) if (s = this.items[i], o = s.item[0], r = this._intersectsWithPointer(s), r && s.instance === this.currentContainer && o !== this.currentItem[0] && this.placeholder[1 === r ? "next": "prev"]()[0] !== o && !e.contains(this.placeholder[0], o) && ("semi-dynamic" === this.options.type ? !e.contains(this.element[0], o) : !0)) {
                if (this.direction = 1 === r ? "down": "up", "pointer" !== this.options.tolerance && !this._intersectsWithSides(s)) break;
                this._rearrange(t, s),
                this._trigger("change", t, this._uiHash());
                break
            }
            return this._contactContainers(t),
            e.ui.ddmanager && e.ui.ddmanager.drag(this, t),
            this._trigger("sort", t, this._uiHash()),
            this.lastPositionAbs = this.positionAbs,
            !1
        },
        _mouseStop: function(t, i) {
            if (t) {
                if (e.ui.ddmanager && !this.options.dropBehaviour && e.ui.ddmanager.drop(this, t), this.options.revert) {
                    var s = this,
                    o = this.placeholder.offset(),
                    r = this.options.axis,
                    n = {};
                    r && "x" !== r || (n.left = o.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft)),
                    r && "y" !== r || (n.top = o.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop)),
                    this.reverting = !0,
                    e(this.helper).animate(n, parseInt(this.options.revert, 10) || 500,
                    function() {
                        s._clear(t)
                    })
                } else this._clear(t, i);
                return ! 1
            }
        },
        cancel: function() {
            if (this.dragging) {
                this._mouseUp({
                    target: null
                }),
                "original" === this.options.helper ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
                for (var t = this.containers.length - 1; t >= 0; t--) this.containers[t]._trigger("deactivate", null, this._uiHash(this)),
                this.containers[t].containerCache.over && (this.containers[t]._trigger("out", null, this._uiHash(this)), this.containers[t].containerCache.over = 0)
            }
            return this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), "original" !== this.options.helper && this.helper && this.helper[0].parentNode && this.helper.remove(), e.extend(this, {
                helper: null,
                dragging: !1,
                reverting: !1,
                _noFinalSort: null
            }), this.domPosition.prev ? e(this.domPosition.prev).after(this.currentItem) : e(this.domPosition.parent).prepend(this.currentItem)),
            this
        },
        serialize: function(t) {
            var i = this._getItemsAsjQuery(t && t.connected),
            s = [];
            return t = t || {},
            e(i).each(function() {
                var i = (e(t.item || this).attr(t.attribute || "id") || "").match(t.expression || /(.+)[\-=_](.+)/);
                i && s.push((t.key || i[1] + "[]") + "=" + (t.key && t.expression ? i[1] : i[2]))
            }),
            !s.length && t.key && s.push(t.key + "="),
            s.join("&")
        },
        toArray: function(t) {
            var i = this._getItemsAsjQuery(t && t.connected),
            s = [];
            return t = t || {},
            i.each(function() {
                s.push(e(t.item || this).attr(t.attribute || "id") || "")
            }),
            s
        },
        _intersectsWith: function(t) {
            var e = this.positionAbs.left,
            i = e + this.helperProportions.width,
            s = this.positionAbs.top,
            o = s + this.helperProportions.height,
            r = t.left,
            n = r + t.width,
            h = t.top,
            a = h + t.height,
            l = this.offset.click.top,
            c = this.offset.click.left,
            p = "x" === this.options.axis || s + l > h && a > s + l,
            f = "y" === this.options.axis || e + c > r && n > e + c,
            u = p && f;
            return "pointer" === this.options.tolerance || this.options.forcePointerForContainers || "pointer" !== this.options.tolerance && this.helperProportions[this.floating ? "width": "height"] > t[this.floating ? "width": "height"] ? u: r < e + this.helperProportions.width / 2 && i - this.helperProportions.width / 2 < n && h < s + this.helperProportions.height / 2 && o - this.helperProportions.height / 2 < a
        },
        _intersectsWithPointer: function(t) {
            var e = "x" === this.options.axis || this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height),
            i = "y" === this.options.axis || this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width),
            s = e && i,
            o = this._getDragVerticalDirection(),
            r = this._getDragHorizontalDirection();
            return s ? this.floating ? r && "right" === r || "down" === o ? 2 : 1 : o && ("down" === o ? 2 : 1) : !1
        },
        _intersectsWithSides: function(t) {
            var e = this._isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height),
            i = this._isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width),
            s = this._getDragVerticalDirection(),
            o = this._getDragHorizontalDirection();
            return this.floating && o ? "right" === o && i || "left" === o && !i: s && ("down" === s && e || "up" === s && !e)
        },
        _getDragVerticalDirection: function() {
            var t = this.positionAbs.top - this.lastPositionAbs.top;
            return 0 !== t && (t > 0 ? "down": "up")
        },
        _getDragHorizontalDirection: function() {
            var t = this.positionAbs.left - this.lastPositionAbs.left;
            return 0 !== t && (t > 0 ? "right": "left")
        },
        refresh: function(t) {
            return this._refreshItems(t),
            this._setHandleClassName(),
            this.refreshPositions(),
            this
        },
        _connectWith: function() {
            var t = this.options;
            return t.connectWith.constructor === String ? [t.connectWith] : t.connectWith
        },
        _getItemsAsjQuery: function(t) {
            function i() {
                h.push(this)
            }
            var s, o, r, n, h = [],
            a = [],
            l = this._connectWith();
            if (l && t) for (s = l.length - 1; s >= 0; s--) for (r = e(l[s]), o = r.length - 1; o >= 0; o--) n = e.data(r[o], this.widgetFullName),
            n && n !== this && !n.options.disabled && a.push([e.isFunction(n.options.items) ? n.options.items.call(n.element) : e(n.options.items, n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), n]);
            for (a.push([e.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
                options: this.options,
                item: this.currentItem
            }) : e(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]), s = a.length - 1; s >= 0; s--) a[s][0].each(i);
            return e(h)
        },
        _removeCurrentsFromItems: function() {
            var t = this.currentItem.find(":data(" + this.widgetName + "-item)");
            this.items = e.grep(this.items,
            function(e) {
                for (var i = 0; i < t.length; i++) if (t[i] === e.item[0]) return ! 1;
                return ! 0
            })
        },
        _refreshItems: function(t) {
            this.items = [],
            this.containers = [this];
            var i, s, o, r, n, h, a, l, c = this.items,
            p = [[e.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, {
                item: this.currentItem
            }) : e(this.options.items, this.element), this]],
            f = this._connectWith();
            if (f && this.ready) for (i = f.length - 1; i >= 0; i--) for (o = e(f[i]), s = o.length - 1; s >= 0; s--) r = e.data(o[s], this.widgetFullName),
            r && r !== this && !r.options.disabled && (p.push([e.isFunction(r.options.items) ? r.options.items.call(r.element[0], t, {
                item: this.currentItem
            }) : e(r.options.items, r.element), r]), this.containers.push(r));
            for (i = p.length - 1; i >= 0; i--) for (n = p[i][1], h = p[i][0], s = 0, l = h.length; l > s; s++) a = e(h[s]),
            a.data(this.widgetName + "-item", n),
            c.push({
                item: a,
                instance: n,
                width: 0,
                height: 0,
                left: 0,
                top: 0
            })
        },
        refreshPositions: function(t) {
            this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
            var i, s, o, r;
            for (i = this.items.length - 1; i >= 0; i--) s = this.items[i],
            s.instance !== this.currentContainer && this.currentContainer && s.item[0] !== this.currentItem[0] || (o = this.options.toleranceElement ? e(this.options.toleranceElement, s.item) : s.item, t || (s.width = o.outerWidth(), s.height = o.outerHeight()), r = o.offset(), s.left = r.left, s.top = r.top);
            if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);
            else for (i = this.containers.length - 1; i >= 0; i--) r = this.containers[i].element.offset(),
            this.containers[i].containerCache.left = r.left,
            this.containers[i].containerCache.top = r.top,
            this.containers[i].containerCache.width = this.containers[i].element.outerWidth(),
            this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
            return this
        },
        _createPlaceholder: function(t) {
            t = t || this;
            var i, s = t.options;
            s.placeholder && s.placeholder.constructor !== String || (i = s.placeholder, s.placeholder = {
                element: function() {
                    var s = t.currentItem[0].nodeName.toLowerCase(),
                    o = e("<" + s + ">", t.document[0]).addClass(i || t.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper");
                    return "tr" === s ? t.currentItem.children().each(function() {
                        e("<td>&#160;</td>", t.document[0]).attr("colspan", e(this).attr("colspan") || 1).appendTo(o)
                    }) : "img" === s && o.attr("src", t.currentItem.attr("src")),
                    i || o.css("visibility", "hidden"),
                    o
                },
                update: function(e, o) { (!i || s.forcePlaceholderSize) && (o.height() || o.height(t.currentItem.innerHeight() - parseInt(t.currentItem.css("paddingTop") || 0, 10) - parseInt(t.currentItem.css("paddingBottom") || 0, 10)), o.width() || o.width(t.currentItem.innerWidth() - parseInt(t.currentItem.css("paddingLeft") || 0, 10) - parseInt(t.currentItem.css("paddingRight") || 0, 10)))
                }
            }),
            t.placeholder = e(s.placeholder.element.call(t.element, t.currentItem)),
            t.currentItem.after(t.placeholder),
            s.placeholder.update(t, t.placeholder)
        },
        _contactContainers: function(t) {
            var i, s, o, r, n, h, a, l, c, p, f = null,
            u = null;
            for (i = this.containers.length - 1; i >= 0; i--) if (!e.contains(this.currentItem[0], this.containers[i].element[0])) if (this._intersectsWith(this.containers[i].containerCache)) {
                if (f && e.contains(this.containers[i].element[0], f.element[0])) continue;
                f = this.containers[i],
                u = i
            } else this.containers[i].containerCache.over && (this.containers[i]._trigger("out", t, this._uiHash(this)), this.containers[i].containerCache.over = 0);
            if (f) if (1 === this.containers.length) this.containers[u].containerCache.over || (this.containers[u]._trigger("over", t, this._uiHash(this)), this.containers[u].containerCache.over = 1);
            else {
                for (o = 1e4, r = null, c = f.floating || this._isFloating(this.currentItem), n = c ? "left": "top", h = c ? "width": "height", p = c ? "clientX": "clientY", s = this.items.length - 1; s >= 0; s--) e.contains(this.containers[u].element[0], this.items[s].item[0]) && this.items[s].item[0] !== this.currentItem[0] && (a = this.items[s].item.offset()[n], l = !1, t[p] - a > this.items[s][h] / 2 && (l = !0), Math.abs(t[p] - a) < o && (o = Math.abs(t[p] - a), r = this.items[s], this.direction = l ? "up": "down"));
                if (!r && !this.options.dropOnEmpty) return;
                if (this.currentContainer === this.containers[u]) return;
                r ? this._rearrange(t, r, null, !0) : this._rearrange(t, null, this.containers[u].element, !0),
                this._trigger("change", t, this._uiHash()),
                this.containers[u]._trigger("change", t, this._uiHash(this)),
                this.currentContainer = this.containers[u],
                this.options.placeholder.update(this.currentContainer, this.placeholder),
                this.containers[u]._trigger("over", t, this._uiHash(this)),
                this.containers[u].containerCache.over = 1
            }
        },
        _createHelper: function(t) {
            var i = this.options,
            s = e.isFunction(i.helper) ? e(i.helper.apply(this.element[0], [t, this.currentItem])) : "clone" === i.helper ? this.currentItem.clone() : this.currentItem;
            return s.parents("body").length || e("parent" !== i.appendTo ? i.appendTo: this.currentItem[0].parentNode)[0].appendChild(s[0]),
            s[0] === this.currentItem[0] && (this._storedCSS = {
                width: this.currentItem[0].style.width,
                height: this.currentItem[0].style.height,
                position: this.currentItem.css("position"),
                top: this.currentItem.css("top"),
                left: this.currentItem.css("left")
            }),
            (!s[0].style.width || i.forceHelperSize) && s.width(this.currentItem.width()),
            (!s[0].style.height || i.forceHelperSize) && s.height(this.currentItem.height()),
            s
        },
        _adjustOffsetFromHelper: function(t) {
            "string" == typeof t && (t = t.split(" ")),
            e.isArray(t) && (t = {
                left: +t[0],
                top: +t[1] || 0
            }),
            "left" in t && (this.offset.click.left = t.left + this.margins.left),
            "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left),
            "top" in t && (this.offset.click.top = t.top + this.margins.top),
            "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
        },
        _getParentOffset: function() {
            this.offsetParent = this.helper.offsetParent();
            var t = this.offsetParent.offset();
            return "absolute" === this.cssPosition && this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop()),
            (this.offsetParent[0] === document.body || this.offsetParent[0].tagName && "html" === this.offsetParent[0].tagName.toLowerCase() && e.ui.ie) && (t = {
                top: 0,
                left: 0
            }),
            {
                top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
                left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
            }
        },
        _getRelativeOffset: function() {
            if ("relative" === this.cssPosition) {
                var t = this.currentItem.position();
                return {
                    top: t.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
                    left: t.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
                }
            }
            return {
                top: 0,
                left: 0
            }
        },
        _cacheMargins: function() {
            this.margins = {
                left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
                top: parseInt(this.currentItem.css("marginTop"), 10) || 0
            }
        },
        _cacheHelperProportions: function() {
            this.helperProportions = {
                width: this.helper.outerWidth(),
                height: this.helper.outerHeight()
            }
        },
        _setContainment: function() {
            var t, i, s, o = this.options;
            "parent" === o.containment && (o.containment = this.helper[0].parentNode),
            ("document" === o.containment || "window" === o.containment) && (this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, e("document" === o.containment ? document: window).width() - this.helperProportions.width - this.margins.left, (e("document" === o.containment ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]),
            /^(document|window|parent)$/.test(o.containment) || (t = e(o.containment)[0], i = e(o.containment).offset(), s = "hidden" !== e(t).css("overflow"), this.containment = [i.left + (parseInt(e(t).css("borderLeftWidth"), 10) || 0) + (parseInt(e(t).css("paddingLeft"), 10) || 0) - this.margins.left, i.top + (parseInt(e(t).css("borderTopWidth"), 10) || 0) + (parseInt(e(t).css("paddingTop"), 10) || 0) - this.margins.top, i.left + (s ? Math.max(t.scrollWidth, t.offsetWidth) : t.offsetWidth) - (parseInt(e(t).css("borderLeftWidth"), 10) || 0) - (parseInt(e(t).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, i.top + (s ? Math.max(t.scrollHeight, t.offsetHeight) : t.offsetHeight) - (parseInt(e(t).css("borderTopWidth"), 10) || 0) - (parseInt(e(t).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top])
        },
        _convertPositionTo: function(t, i) {
            i || (i = this.position);
            var s = "absolute" === t ? 1 : -1,
            o = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent: this.offsetParent,
            r = /(html|body)/i.test(o[0].tagName);
            return {
                top: i.top + this.offset.relative.top * s + this.offset.parent.top * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : r ? 0 : o.scrollTop()) * s,
                left: i.left + this.offset.relative.left * s + this.offset.parent.left * s - ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : r ? 0 : o.scrollLeft()) * s
            }
        },
        _generatePosition: function(t) {
            var i, s, o = this.options,
            r = t.pageX,
            n = t.pageY,
            h = "absolute" !== this.cssPosition || this.scrollParent[0] !== document && e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent: this.offsetParent,
            a = /(html|body)/i.test(h[0].tagName);
            return "relative" !== this.cssPosition || this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0] || (this.offset.relative = this._getRelativeOffset()),
            this.originalPosition && (this.containment && (t.pageX - this.offset.click.left < this.containment[0] && (r = this.containment[0] + this.offset.click.left), t.pageY - this.offset.click.top < this.containment[1] && (n = this.containment[1] + this.offset.click.top), t.pageX - this.offset.click.left > this.containment[2] && (r = this.containment[2] + this.offset.click.left), t.pageY - this.offset.click.top > this.containment[3] && (n = this.containment[3] + this.offset.click.top)), o.grid && (i = this.originalPageY + Math.round((n - this.originalPageY) / o.grid[1]) * o.grid[1], n = this.containment ? i - this.offset.click.top >= this.containment[1] && i - this.offset.click.top <= this.containment[3] ? i: i - this.offset.click.top >= this.containment[1] ? i - o.grid[1] : i + o.grid[1] : i, s = this.originalPageX + Math.round((r - this.originalPageX) / o.grid[0]) * o.grid[0], r = this.containment ? s - this.offset.click.left >= this.containment[0] && s - this.offset.click.left <= this.containment[2] ? s: s - this.offset.click.left >= this.containment[0] ? s - o.grid[0] : s + o.grid[0] : s)),
            {
                top: n - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ("fixed" === this.cssPosition ? -this.scrollParent.scrollTop() : a ? 0 : h.scrollTop()),
                left: r - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ("fixed" === this.cssPosition ? -this.scrollParent.scrollLeft() : a ? 0 : h.scrollLeft())
            }
        },
        _rearrange: function(t, e, i, s) {
            i ? i[0].appendChild(this.placeholder[0]) : e.item[0].parentNode.insertBefore(this.placeholder[0], "down" === this.direction ? e.item[0] : e.item[0].nextSibling),
            this.counter = this.counter ? ++this.counter: 1;
            var o = this.counter;
            this._delay(function() {
                o === this.counter && this.refreshPositions(!s)
            })
        },
        _clear: function(t, e) {
            function i(t, e, i) {
                return function(s) {
                    i._trigger(t, s, e._uiHash(e))
                }
            }
            this.reverting = !1;
            var s, o = [];
            if (!this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null, this.helper[0] === this.currentItem[0]) {
                for (s in this._storedCSS)("auto" === this._storedCSS[s] || "static" === this._storedCSS[s]) && (this._storedCSS[s] = "");
                this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
            } else this.currentItem.show();
            for (this.fromOutside && !e && o.push(function(t) {
                this._trigger("receive", t, this._uiHash(this.fromOutside))
            }), !this.fromOutside && this.domPosition.prev === this.currentItem.prev().not(".ui-sortable-helper")[0] && this.domPosition.parent === this.currentItem.parent()[0] || e || o.push(function(t) {
                this._trigger("update", t, this._uiHash())
            }), this !== this.currentContainer && (e || (o.push(function(t) {
                this._trigger("remove", t, this._uiHash())
            }), o.push(function(t) {
                return function(e) {
                    t._trigger("receive", e, this._uiHash(this))
                }
            }.call(this, this.currentContainer)), o.push(function(t) {
                return function(e) {
                    t._trigger("update", e, this._uiHash(this))
                }
            }.call(this, this.currentContainer)))), s = this.containers.length - 1; s >= 0; s--) e || o.push(i("deactivate", this, this.containers[s])),
            this.containers[s].containerCache.over && (o.push(i("out", this, this.containers[s])), this.containers[s].containerCache.over = 0);
            if (this.storedCursor && (this.document.find("body").css("cursor", this.storedCursor), this.storedStylesheet.remove()), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", "auto" === this._storedZIndex ? "": this._storedZIndex), this.dragging = !1, this.cancelHelperRemoval) {
                if (!e) {
                    for (this._trigger("beforeStop", t, this._uiHash()), s = 0; s < o.length; s++) o[s].call(this, t);
                    this._trigger("stop", t, this._uiHash())
                }
                return this.fromOutside = !1,
                !1
            }
            if (e || this._trigger("beforeStop", t, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] !== this.currentItem[0] && this.helper.remove(), this.helper = null, !e) {
                for (s = 0; s < o.length; s++) o[s].call(this, t);
                this._trigger("stop", t, this._uiHash())
            }
            return this.fromOutside = !1,
            !0
        },
        _trigger: function() {
            e.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
        },
        _uiHash: function(t) {
            var i = t || this;
            return {
                helper: i.helper,
                placeholder: i.placeholder || e([]),
                position: i.position,
                originalPosition: i.originalPosition,
                offset: i.positionAbs,
                item: i.currentItem,
                sender: t ? t.element: null
            }
        }
    })
});;
/*!common:widget/js/logic/set-tag-dialog/set-tag-dialog.js*/
define("common:widget/js/logic/set-tag-dialog/set-tag-dialog",
function(t, a, e) {
    function s(t) {
        return t ? t.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;") : void 0
    }
    var i = t("common:widget/js/util/tangram/tangram"),
    n = (t("common:widget/js/util/event/event"), t("common:widget/js/ui/base/base")),
    o = t("common:widget/js/util/template/template"),
    c = t("common:widget/js/ui/dialog/dialog"),
    l = t("common:widget/js/ui/scrollbar/scrollbar");
    t("common:widget/js/logic/set-tag-dialog/sortable");
    var g, d = n(function(t) {
        var a = this;
        a.options = i.extend({
            title: "\u6211\u7684\u5174\u8da3",
            width: "582px",
            height: "471px",
            type: "add",
            askTitle: "",
            dialogClassName: "",
            success: function() {},
            error: function() {}
        },
        t),
        a.delTags = []
    }).extend({
        init: function(t) {
            this.render(t)
        },
        render: function(t) {
            var a = this,
            t = i.extend(a.options, t);
            a.instance = new c({
                title: t.title,
                dialogClass: t.dialogClassName || "common-dialog-set-tag",
                content: a.html(t.type),
                autoDispose: !0,
                width: t.width,
                height: t.height,
                open: function() {
                    i(".common-dialog-set-tag").delegate(".tag-search-input", "focus",
                    function() {
                        i(this).hasClass("error") && i(this).val("").removeClass("error")
                    }),
                    i(document).bind("keydown",
                    function(t) {
                        var t = t || window.event,
                        a = t.keyCode || t.which || t.charCode;
                        13 == a && i(".common-dialog-set-tag .search-btn").click()
                    })
                },
                close: function() {
                    g = !1,
                    i(document).unbind("keydown")
                },
                buttons: [{
                    text: g ? "\u4fdd\u5b58": "\u5b8c\u6210",
                    click: function() {
                        "set" == t.type && (i(a.delTags).each(function() {
                            for (var t = a.tags.length - 1; t >= 0; t--) a.tags[t].name == this && a.tags.splice(t, 1)
                        }), a.delTags.length = 0),
                        ("set" == t.type || "add" == t.type) && a.submit(g ?
                        function() {
                            i(".wgt-ihome-filter .tag-setting").click()
                        }: null)
                    }
                },
                {
                    text: g ? "\u8fd4\u56de": "\u53d6\u6d88",
                    click: function() {
                        g && (g = !1, i(".wgt-ihome-filter .tag-setting").click()),
                        i(this).dialog("close")
                    }
                }]
            }),
            a.instance.setSize({
                width: parseInt(t.width),
                height: parseInt(t.height)
            });
            var e = a.container = a.instance.getDialogContainer();
            if ("add" == t.type) e.on("click", ".search-btn",
            function() {
                a.search(i(this).prev())
            }),
            e.on("click", ".tag-item",
            function() {
                var t = i(this);
                t.hasClass("active") ? t.removeClass("active") : t.addClass("active")
            });
            else if ("set" == t.type) {
                e.on("click", ".i-del",
                function(t) {
                    var e = i(this).parent();
                    a.delTags.push(e.text()),
                    e.remove(),
                    t.stopPropagation()
                }),
                e.on("click", ".addtag-btn",
                function() {
                    a.close(),
                    g = !0,
                    i(".carousel-inner .tag-item:last").click()
                });
                e.find(".dialog-tags").sortable(),
                e.find(".dialog-tags").disableSelection().find(".tag-item").css("cursor", "move")
            } else "uadmin" == t.type && (e.delegate(".i-del", "click",
            function(t) {
                var e = i(this).parent();
                a.delTags.push(e.text()),
                e.remove(),
                t.stopPropagation()
            }), e.find(".item-checked").delegate(".tag-item, .third-tags .tags", "click",
            function() {
                var t = i(this),
                a = i(".currentTag").find(".tag-item").length;
                if (a >= 3) return i(this).hasClass("tags") ? i(".more-labels").append(i(".red-tips")) : i(this).parent().parent().prev().append(i(".red-tips")),
                i(".red-tips").show(),
                void setTimeout(function() {
                    i(".red-tips").hide()
                },
                3e3);
                var e = !0;
                if (i(".currentTag .tag-item").each(function(a, s) {
                    i.trim(i(s).text()) == i.trim(t.text()) && (e = !1)
                }), e) {
                    var n = s(t.text());
                    i('<a class="tag-item"><i class="i-del"></i><span>' + n + "</span></a>").insertAfter(".currentTag .currentTitle")
                }
                i(this).hasClass("tags") ? t.parent().addClass("checked") : t.addClass("active")
            }))
        },
        submit: function(t) {
            var a = this,
            e = a._getTag(),
            s = {
                cm: 100522,
                tags: e.name.join("	")
            },
            n = F.context("user") && F.context("user").stoken;
            n && (s.stoken = n),
            i.post("/submit/user", s,
            function(s) {
                if (s && 0 == s.errorNo) F.context("user").tags = a.tags = e.obj,
                a.close(),
                a.options.success.call(a, e.obj),
                i.isFunction(t) && t();
                else {
                    var n = "\u62b1\u6b49\uff0c\u672a\u80fd\u627e\u5230\u60a8\u60f3\u6dfb\u52a0\u7684\u5174\u8da3\u6807\u7b7e\uff0c\u8bf7\u91cd\u65b0\u5c1d\u8bd5";
                    i("#tag-search-input").val(n).addClass("error")
                }
            },
            "json")
        },
        html: function(t) {
            var a = [];
            return "add" == t ? a.push('<div class="line mb-15">', '<input name="tag-search" type="text" value="" placeholder="\u5728\u6b64\u8f93\u5165\u5174\u8da3\u5173\u952e\u5b57" class="tag-search-input" id="tag-search-input" />', '<a class="btn-32-green search-btn ml-10">\u641c\u7d22\u5174\u8da3</a>', "</div>", '<h1 class="mt-10 mb-15">\u70ed\u95e8\u6807\u7b7e</h1>', '<div class="dialog-tags-wp mt-15">', '<div class="dialog-tags line">', '<#if( "object" == typeof hot ){#>', "<#for(var i = 0;i < hot.length;i++){#>", '<a class="tag-item" data-type="<#=hot[i].legal#>">', "<span><#=hot[i].name#></span>", "</a>", "<#}#>", "<#}#>", "</div>", "</div>") : "uadmin" == t ? a.push('<div class="tags-wrap">', '<span class="red-tips">\u95ee\u9898\u6807\u7b7e\u4e0d\u80fd\u8d85\u8fc7\u4e09\u4e2a</span>', '<div class="line question">', '<span>\u95ee\u9898\u63cf\u8ff0\uff1a</span><span class="uadmin-question">', "<#=tags.title#>", "</span>", "</div>", '<div class="currentTag dialog-tags">', '<h1 class="currentTitle">\u5f53\u524d\u6807\u7b7e\uff1a</h1>', '<#if( "object" == typeof tags.current ){#>', "<#for(var i = 0;i < tags.current.length;i++){#>", '<a class="tag-item" data-type="<#=tags.current[i].legal#>">', '<i class="i-del"></i>', "<span><#=tags.current[i].name#></span>", "</a>", "<#}#>", "<#}#>", '<span class="tag-tips">\u81f3\u591a3\u9879</span>', "</div>", '<div class="commonused-tag">', '<#if( "object" == typeof tags.commonused && tags.commonused.length > 0 ){#>', '<h1 class="mt-15 mb-10">\u5e38\u7528\u6807\u7b7e\uff1a</h1>', '<div class="dialog-tags-wp mt-15 item-checked">', '<div class="dialog-tags line">', "<#for(var i = 0;i < tags.commonused.length;i++){#>", '<a class="tag-item" data-type="<#=tags.commonused[i]#>">', "<span><#=tags.commonused[i]#></span>", "</a>", "<#}#>", "</div>", "</div>", "<#}#>", "</div>", '<div class="recommend-tag">', '<#if( "object" == typeof tags.recommend && tags.recommend.length > 0){#>', '<h1 class="">\u63a8\u8350\u6807\u7b7e\uff1a</h1>', '<div class="dialog-tags-wp mt-15 item-checked">', '<div class="dialog-tags line">', "<#for(var i = 0;i < tags.recommend.length;i++){#>", '<a class="tag-item" data-type="<#=tags.recommend[i]#>">', "<span><#=tags.recommend[i].tagname#></span>", "</a>", "<#}#>", "</div>", "</div>", "<#}#>", "</div>", "</div>", '<h1 class="more-labels mt-10">\u66f4\u591a\u6807\u7b7e\uff1a</h1>', '<div class="line more-tags">', '<div class="tag-input line">', '<input type="text" placeholder="\u5728\u6b64\u8f93\u5165\u5174\u8da3\u5173\u952e\u8bcd" />', "</div>", '<a class="btn-32-green search-interest ml-10">\u641c\u7d22\u6807\u7b7e</a>', '<a class="btn-32-green search-all ml-10">\u67e5\u770b\u5168\u90e8\u6807\u7b7e</a>', "</div>", '<div class="dialog-tags-wp mt-15 item-checked">', '<div class="dialog-tags line more-tags-container">', "</div>", "</div>", '<div class="dialog-tags-wp mt-15 ui-dialog-buttonset">', '<a href="javascript:void(0)" class="btn-32-white cancel">\u53d6\u6d88</a>', '<a href="javascript:void(0)" class="btn-32-green save">\u4fdd\u5b58</a>', "</div>") : (i(this.options.tags).each(function() {
                this.dbLine = i.string(this.name).getByteLength() > 8 ? "tag-db-line": ""
            }), a.push('<p class="dialog-intro line">', '<a class="addtag-btn grid"><i></i><span>\u6dfb\u52a0\u5174\u8da3</span></a>', '<span class="grid-r mr-40">', '<i class="i-tip"></i>', "\u76f4\u63a5\u62d6\u52a8\u53ef\u6539\u53d8\u6807\u7b7e\u987a\u5e8f\u54e6~", "</span>", "</p>", '<div class="dialog-tags-wp mt-15">', '<div class="dialog-tags line">', '<#if( "object" == typeof tags ){#>', "<#for(var i = 0;i < tags.length;i++){#>", '<a class="tag-item <#=tags[i].dbLine#>" data-type="<#=tags[i].legal#>">', '<i class="i-del"></i>', "<span><#=tags[i].name#></span>", "</a>", "<#}#>", "<#}#>", "</div>", "</div>")),
            o(a.join(""), this.options)
        },
        show: function() {
            this.instance.show()
        },
        close: function() {
            this.instance.close()
        },
        search: function(t) {
            var a = this;
            if (!i(t).hasClass("error")) {
                "" == i(t).val() && i(t).addClass("error");
                var e = t.val();
                i.post("/api/gettag", {
                    type: 1,
                    wd: e
                },
                function(t) {
                    if (t && 0 == t.errno) {
                        i("h1", a.container).empty();
                        var s = i(".dialog-tags", a.container).empty(),
                        n = e;
                        i(t.data).each(function() {
                            a.addTag({
                                name: this.tagname,
                                legal: 1
                            },
                            s),
                            n.toLocaleUpperCase() == this.tagname.toLocaleUpperCase() && (n = "")
                        }),
                        n && a.addTag({
                            name: n,
                            legal: 1
                        },
                        s),
                        i(".dialog-tags-wp .scrollbar-wp").remove();
                        var o = new l({
                            scrollWrapper: i(".dialog-tags-wp"),
                            scrollContent: i(".dialog-tags"),
                            maxHeight: 225
                        });
                        o.render()
                    }
                },
                "json")
            }
        },
        getTags: function() {
            var t = [];
            return i(".tag-item.active", this.container).each(function() {
                t.push({
                    name: i(this).text(),
                    legal: i(this).data("type")
                })
            }),
            t
        },
        _getTag: function() {
            var t = {
                name: [],
                type: [],
                obj: []
            };
            if ("set" == this.options.type) i(".tag-item", this.container).each(function() {
                t.name.push(i(this).text()),
                t.type.push(i(this).data("type")),
                t.obj.push({
                    name: i(this).text(),
                    legal: i(this).data("type")
                })
            });
            else {
                i(".carousel-inner .tag-item").each(function() {
                    i(this).data("type") >= 0 && (t.name.push(i(this).text()), t.type.push(i(this).data("type")), t.obj.push({
                        name: i(this).text(),
                        legal: i(this).data("type")
                    }))
                });
                var a = "|" + t.name.join("|") + "|";
                i(".tag-item.active", this.container).each(function() {
                    var e = i(this).text(); - 1 == a.indexOf("|" + e + "|") && (t.name.push(e), t.type.push(i(this).data("type")), t.obj.push({
                        name: i(this).text(),
                        legal: i(this).data("type")
                    }))
                })
            }
            return t
        },
        addTag: function(t, a) {
            var e = t.name || t.tagname,
            n = i.string(e).getByteLength() > 8;
            e = s(e),
            i("<a />").addClass("tag-item" + (n ? " tag-db-line": "")).data("type", t.legal || 0).html("<span>" + e + "</span>").appendTo(a)
        }
    });
    e.exports = d
});;
/*!common:widget/js/logic/share/share.js*/
define("common:widget/js/logic/share/share",
function(t, e) {
    function i(t) {
        var e = ["toolbar=0,status=0,resizable=1,width=", t.width || 440, ",height=", t.height || 430, ",left=", (screen.width - (t.width || 440)) / 2, ",top=", (screen.height - (t.height || 430)) / 2].join("");
        window.open(t.url, "shareWindow", e) || (location.href = t.url)
    }
    function o(t, e) {
        var i = {
            render: document.createElement("canvas").getContext ? "canvas": "table",
            width: e.width,
            height: e.height,
            text: e.href
        };
        F.context("weixinShareTinyUrl") ? (i.text = F.context("weixinShareTinyUrl"), t.qrcode(i)) : n.ajax({
            url: "/api/gettinyurl",
            type: "POST",
            dataType: "json",
            data: {
                url: e.href
            }
        }).done(function(e) {
            var o = e.data;
            0 == e.errno ? (F.context("weixinShareTinyUrl", o.tinyurl), i.text = o.tinyurl, t.qrcode(i)) : t.qrcode(i)
        }).fail(function() {
            t.qrcode(i)
        })
    }
    var n = t("common:widget/js/util/tangram/tangram"),
    a = t("common:widget/js/ui/tip/tip"),
    r = t("common:widget/js/util/log/log");
    t("common:widget/js/logic/qrcode/qrcode"),
    e.init = function(t) {
        if (t.target && t.pageUrl && t.title) {
            var e = n(t.target),
            c = t.pageUrl,
            s = -1 == c.indexOf("?") ? "?": "&";
            e.on("tooltipopen",
            function(e, a) {
                n(this).addClass("tips-open"),
                o(a.tooltip.find(".weixin-qrcode-img"), {
                    width: 100,
                    height: 100,
                    href: c + s + "sharesource=weixin"
                }),
                t.logOpt && (t.logOpt.action = "share-view", r.send(t.logOpt)),
                a.tooltip.on("click", ".others-share-item",
                function(e) {
                    e.preventDefault();
                    var o = n(this),
                    a = {
                        url: o.attr("href")
                    };
                    o.hasClass("weibo") || (a.width = 800, a.height = 600),
                    i(a),
                    t.logOpt && (t.logOpt.action = "share-click-" + o.data("type"), r.send(t.logOpt))
                })
            }),
            e.on("tooltipclose",
            function() {
                n(this).removeClass("tips-open")
            });
            var h = {
                url: c + s + "sharesource=qq",
                title: t.title,
                pics: t.pic || "https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/zhidaologo.png"
            },
            l = {
                url: c + s + "sharesource=qzone",
                title: t.title,
                pics: t.pic || "https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/zhidaologo.png"
            },
            d = {
                url: c + s + "sharesource=weibo",
                title: t.weiboTitle || t.title,
                pic: t.pic || "https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/zhidaologo.png"
            };
            t.summary && (h.summary = t.summary, l.summary = t.summary, d.summary = t.summary);
            var p = [],
            m = [],
            g = [];
            for (var u in h) p.push(u + "=" + encodeURIComponent(h[u] || ""));
            for (var u in l) m.push(u + "=" + encodeURIComponent(l[u] || ""));
            for (var u in d) g.push(u + "=" + encodeURIComponent(d[u] || ""));
            var w, f, q = "http://connect.qq.com/widget/shareqq/index.html?" + p.join("&"),
            v = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?" + m.join("&"),
            x = "http://v.t.sina.com.cn/share/share.php?" + g.join("&"),
            y = ['<div class="weixin-container">', '<div class="weixin-qrcode">', '<div class="weixin-qrcode-img"></div>', '<p class="weixin-qrcode-title">\u626b\u4e00\u626b\u5206\u4eab\u5230\u5fae\u4fe1</p>', "</div>", '<div class="weixin-qrcode-lead"></div>', "</div>", '<div class="others-container">', '<a href="' + q + '" target="_blank" class="others-share-item qq" data-type="qq-click">qq</a>', '<a href="' + v + '" target="_blank" class="others-share-item qzone" data-type="qzone-click">qzone</a>', '<a href="' + x + '" target="_blank" class="others-share-item weibo" data-type="weibo-click">weibo</a>', "</div>"].join(""),
            b = {
                direction: "top",
                tooltipClass: "wgt-common-share-tip",
                content: y,
                target: e[0],
                position: {
                    my: "left top",
                    at: "left-80 bottom+5"
                }
            },
            j = n.extend(!0, b, t.tipsOpt);
            e.hover(function() {
                clearTimeout(f),
                (w || (w = new a(j))).show(),
                w.getTipContainer().hover(function() {
                    clearTimeout(f)
                },
                function() {
                    f = setTimeout(function() {
                        w.hide()
                    },
                    100)
                })
            },
            function() {
                f = setTimeout(function() {
                    w.hide()
                },
                100)
            })
        }
    }
});;
/*!common:widget/js/logic/sign-in/sign-in.js*/
define("common:widget/js/logic/sign-in/sign-in",
function(n, i, e) {
    {
        var t = n("common:widget/js/util/tangram/tangram"),
        s = n("common:widget/js/ui/base/base"),
        a = n("common:widget/js/ui/tip/tip"),
        o = n("common:widget/js/ui/dialog/dialog"),
        d = n("common:widget/js/util/template/template"),
        r = n("common:widget/js/logic/submit/submit"),
        c = n("common:widget/js/util/event/event"),
        l = n("common:widget/js/util/log/log");
        n("common:widget/js/logic/authcode/authcode")
    }
    n("common:widget/lib/jquery.ui/jquery.ui.datepicker"),
    c.on("short.dialog",
    function(n, i) {
        var e = ['<div class="short-content short-signin-content">', i.content, "</div>"].join(""),
        s = new o({
            content: e,
            autoDispose: !0,
            width: i.width || 215,
            height: i.height || 100,
            className: i.dialogName || "short-dialog",
            open: function() {
                t(this).parent().prev();
                t(this).parent().prev().css({
                    opacity: i.overlay || ".25",
                    "z-index": i.zindex || "1015"
                });
                var n = t(this),
                e = +n.css("top").replace("px", "") + i.top;
                n.css("top", e + "px"),
                setTimeout(function() {
                    i.openDialog && i.openDialog()
                },
                1100),
                setTimeout(function() {
                    s.close(),
                    i.callback && i.callback()
                },
                i.time || 2e3)
            }
        })
    });
    var g = (F.context("user") && F.context("user").stoken, s().extend({
        _initDialog: function() {
            var n = this,
            i = +F.context("sign-in").signBoxId ? +F.context("sign-in").signBoxId: +F.context("sign-in").futureSignBoxId;
            window.dialogInstance ? window.dialogInstance.open() : window.dialogInstance = new o({
                width: 800,
                height: 580,
                autoDispose: !1,
                className: "sign-in-dialog",
                content: d(['<div class="wrapper">', '<div class="close-layer"></div>', '<div class="line upper">', '<div class="grid sign-in-desc">', '<div class="signin-leftbar">\u60a8\u5df2\u7ecf\u7b7e\u5230<span id="sign-in-days" class="sign-in-days">0</span>\u5929\u5566~<i></i></div>', '<div class="left-info">', '<div class="info-top">\u8fde\u7eed\u7b7e\u5230\u5f00\u5b9d\u7bb1</div>', '<div class="info-box box-' + i + '" data-signBoxId="' + F.context("sign-in").signBoxId + '" data-futureSignBoxId="' + F.context("sign-in").futureSignBoxId + '"></div>', '<div class="info-des">\u8ddd\u79bb\u6253\u5f00\u5b9d\u7bb1\u8fd8\u5269<span id="surplus-days" class="surplus-days">' + F.context("sign-in").futureBoxDay + "</span>\u5929</div>", '<div class="info-openbox-des hide">\u60a8\u6709\u4e00\u4e2a\u5b9d\u7bb1\u672a\u9886\u53d6</div>', "</div>", '<a href="#" class="sign-in-btn" id="sign-in-btn">\u70b9\u51fb\u7b7e\u5230</a>', "</div>", '<div class="grid calendar-container">', '<div class="sign-in-calendar" id="sign-in-calendar"></div>', "</div>", "</div>"].join("")),
                open: function() { + F.context("sign-in").signBoxId ? (t(".sign-in-dialog .info-top").addClass("info-openbox").text("\u70b9\u51fb\u5b9d\u7bb1"), t(".sign-in-dialog .info-box").attr("class", "info-box").addClass("box-" + F.context("sign-in").signBoxId).addClass("box-can-open").data("signboxid", F.context("sign-in").signBoxId).data("futuresignboxId", F.context("sign-in").futureSignBoxId), t(".sign-in-dialog .info-des").addClass("hide"), t(".sign-in-dialog .info-openbox-des").removeClass("hide")) : (t(".sign-in-dialog .info-top").removeClass("info-openbox").text("\u8fde\u7eed\u7b7e\u5230\u5f00\u5b9d\u7bb1"), t(".sign-in-dialog .info-box").attr("class", "info-box").addClass("box-" + F.context("sign-in").futureSignBoxId).removeClass("box-can-open"), t(".sign-in-dialog .info-des").removeClass("hide"), t(".sign-in-dialog .info-openbox-des").addClass("hide")),
                    t(".sign-in-dialog .close-layer").click(function() {
                        n._removeRemedyTip(),
                        t(n.container).find("table .td-signin-none .add-signin").remove(),
                        t(n.container).find("table .td-signin-none").removeClass("active");
                        var i = {
                            type: 2014,
                            action: "click",
                            pos: "signin-dialog-close"
                        };
                        i.done = t("#sign-in-btn").hasClass("done") ? 1 : 0,
                        l.send(i),
                        window.dialogInstance.close()
                    }),
                    n._initProperty(),
                    n.defaultDate = [n.month, n.day, n.year].join("/"),
                    n.lastDay = 1,
                    1 == n.month ? (n.lastMonth = 12, n.lastYear = n.year - 1) : (n.lastMonth = n.month - 1, n.lastYear = n.year),
                    n.minDate = [n.lastMonth, n.lastDay, n.lastYear].join("/"),
                    t(n.target).datepicker({
                        showOtherMonths: !0,
                        selectOtherMonths: !1,
                        showMonthAfterYear: !0,
                        yearSuffix: "\u5e74",
                        prevText: "\u67e5\u770b\u4e0a\u4e00\u6708",
                        nextText: "\u67e5\u770b\u4e0b\u4e00\u6708",
                        defaultDate: n.defaultDate,
                        minDate: n.minDate,
                        maxDate: n.defaultDate,
                        beforeShowDay: function(i) {
                            var e = t.parseJSON(F.context("sign-in").signinDays),
                            s = lastMonth = futureDate = !1,
                            a = [i.getFullYear(), i.getMonth() + 1, i.getDate()].join("/");
                            return t(e).each(function(n, i) {
                                a == i && (s = !0)
                            }),
                            i.getMonth() + 1 <= n.lastMonth && i.getFullYear() == n.lastYear && (lastMonth = !0),
                            (i.getDate() > n.day || i.getMonth() + 1 > n.month) && (futureDate = !0),
                            s ? [!1, "td-signin-done"] : lastMonth ? [!1, "td-signin-none td-signin-lastMonth"] : futureDate ? [!1, "td-signin-none td-signin-future"] : [!1, "td-signin-none"]
                        }
                    }),
                    t(".ui-datepicker-calendar .td-signin-done .ui-td-div").append('<span class="ui-signin-right"></span>'),
                    n.instance = t(n.target).data("datepicker"),
                    t(n.instance).on("update",
                    function() {
                        t(".ui-datepicker-calendar .td-signin-done .ui-td-div").append('<span class="ui-signin-right"></span>'),
                        n._lightToday(),
                        n._showRemedyTip()
                    }),
                    n._updateSignIn()
                }
            })
        },
        _initProperty: function() {
            var n = this;
            n.year = n.options.year,
            n.month = n.options.month,
            n.day = n.options.day,
            n.target = ".sign-in-dialog #sign-in-calendar",
            n.container = ".sign-in-dialog",
            n.signCardCanUsed = F.context("sign-in").signCardCanUsed,
            n.cardShopId = 910
        },
        _initEvent: function() {
            var n = this;
            t(".sign-in-dialog").delegate("#sign-in-btn", "click",
            function(i) {
                n._remedyTip && n._remedyTip.instance.element.size() && "show" == n._remedyTip._status && (t(n.container).find("table .td-signin-none").removeClass("active"), t(n.container).find("table .td-signin-none .add-signin").remove(), n._remedyTip.hide());
                var e = t(this);
                e.hasClass("done") ? l.send({
                    type: 2014,
                    action: "click",
                    pos: "signin-dialog-uhome"
                }) : (i.preventDefault(), l.send({
                    type: 2014,
                    action: "click",
                    pos: "signin-dialog-submit"
                }), c.fire("login.check", {
                    isLogin: function() {
                        new r({
                            url: "/submit/user",
                            params: {
                                cm: 100509
                            },
                            beforeJump: function(i, t) {
                                t && "0" == t.errorNo && (n._updateSignIn(), c.fire("short.dialog", {
                                    content: '<div class="reward"><p>\u606d\u559c\u60a8\uff0c\u83b7\u5f97\u4e86</p><p><span>1</span>\u70b9\u6210\u957f\u503c</p></div>'
                                }), e.addClass("done").html("\u5df2\u7b7e\u5230"), n.options.success && n.options.success(t), n._todayMonth())
                            },
                            errorDeal: function(n, i) {
                                c.fire("short.dialog", {
                                    content: "<p>" + i.errorMsg + "</p>"
                                })
                            }
                        })
                    }
                }))
            }).delegate(".speed-up-desc", "mouseenter",
            function() {
                t(".speed-up-tip").css("display", "block")
            }).delegate(".speed-up-desc", "mouseleave",
            function() {
                t(".speed-up-tip").css("display", "none")
            }).on("click", ".box-can-open",
            function() {
                n.getBox(t(this).data("signboxid"))
            })
        },
        _lightToday: function() {
            var n = this,
            i = t(n.target).find(".ui-datepicker-today");
            1 != F.context("sign-in").isSignIn || i.hasClass("td-signin-done") || i.removeClass("td-signin-none").addClass("td-signin-done").find(".ui-td-div").append('<span class="ui-signin-right"></span>')
        },
        _updateSignIn: function() {
            var n = this;
            setTimeout(function() {
                t.get("/ihome/api/signInfo?t=" + (new Date).getTime(),
                function(i) {
                    if (!i.errno) {
                        if (i = i.data, t.object.each(i,
                        function(n, i) {
                            "num" != i && "newNum" != i && "allDate" != i && (F.context("sign-in")[i] = n)
                        }), F.context("sign-in").dayNum = i.num, F.context("sign-in").originalNewDayNum = i.newNum, F.context("sign-in").userWealth = i.userWealth, -1 != (F.context("sign-in").newDayNum + "").indexOf(".") && (F.context("sign-in").newDayNum = Number(F.context("sign-in").newDayNum.toFixed(1))), n.signCardCanUsed = F.context("sign-in").signCardCanUsed, 1 == F.context("sign-in").isSignIn) {
                            var e = 0 === Number(F.context("user").isMavin) ? "/ihome": "/mavin/home/index",
                            s = t("#sign-in-btn");
                            s.addClass("done").prop({
                                href: e,
                                target: "_blank"
                            }).html("\u5df2\u7b7e\u5230").on("click",
                            function(n) {
                                s.hasClass("done") && n.preventDefault()
                            }),
                            t(".go-sign-in").html("<span>\u5df2\u7b7e\u5230</span>"),
                            n._lightToday()
                        }
                        t("#sign-in-days").text(F.context("sign-in").dayNum),
                        t("#surplus-days").text(F.context("sign-in").futureBoxDay),
                        F.context("sign-in").signBoxId ? (t(".sign-in-dialog .info-top").addClass("info-openbox").text("\u70b9\u51fb\u5b9d\u7bb1"), t(".sign-in-dialog .info-box").attr("class", "info-box").addClass("box-" + F.context("sign-in").signBoxId).addClass("box-can-open").data("signboxid", F.context("sign-in").signBoxId).data("futuresignboxid", F.context("sign-in").futureSignBoxId), t(".sign-in-dialog .info-des").addClass("hide"), t(".sign-in-dialog .info-openbox-des").removeClass("hide")) : (t(".sign-in-dialog .info-top").removeClass("info-openbox").text("\u8fde\u7eed\u7b7e\u5230\u5f00\u5b9d\u7bb1"), t(".sign-in-dialog .info-box").attr("class", "info-box").addClass("box-" + F.context("sign-in").futureSignBoxId).removeClass("box-can-open"), t(".sign-in-dialog .info-des").removeClass("hide"), t(".sign-in-dialog .info-openbox-des").addClass("hide")),
                        t(".sign-in-day-num").text(F.context("sign-in").dayNum),
                        n._showRemedyTip()
                    }
                })
            },
            300)
        },
        _todayMonth: function() {
            var n = this,
            i = t(n.target).find(".ui-datepicker-today"),
            e = t(n.target).find(".ui-datepicker-prev"),
            s = t(n.target).find(".ui-datepicker-next");
            i.hasClass("ui-datepicker-other-month") && (e.hasClass("ui-state-disabled") ? s.click() : e.click())
        },
        getBox: function(n) {
            var i = this;
            c.fire("login.check", {
                isLogin: function() {
                    var e = F.context("user") && F.context("user").stoken,
                    s = {
                        128 : "CopperChest",
                        129 : "SilverChest",
                        130 : "GoldChest",
                        131 : "DiamondChest"
                    };
                    if (s[n]) {
                        var a = "/shop/submit/chest?type=" + s[n];
                        t.ajax({
                            url: a,
                            type: "post",
                            data: {
                                itemId: n,
                                stoken: e
                            },
                            success: function(e) {
                                if (e.errno) return void o.alert('<div style="text-align:center">' + e.errmsg + "</div>");
                                var s = e.data.goodsInfo;
                                if (c.fire("short.dialog", {
                                    top: 50,
                                    overlay: .75,
                                    zindex: 1015,
                                    width: 400,
                                    height: 600,
                                    dialogName: "box-dialog",
                                    content: '<div class="ka"><div class="apace-line"></div><div class="image"><img src="' + s.goodsPicSmall + '" /></div> <p>' + s.goodsName + '</p><p>\u60a8\u7684\u7b7e\u5230\u5956\u52b1</p></div><div class="box-big wobble' + n + '"></div>',
                                    time: 3e3,
                                    openDialog: function() {
                                        t(".box-big").addClass("box-big" + n).removeClass("wobble" + n)
                                    },
                                    callback: function() {
                                        var n = '<div class="reward"><p>\u606d\u559c\u60a8\uff0c\u83b7\u5f97\u4e86</p><p>' + s.goodsName + "</p></div>";
                                        c.fire("short.dialog", {
                                            content: n
                                        })
                                    }
                                }), !e.errno) {
                                    var a = {
                                        cm: 100508,
                                        uflag: "sign_award"
                                    };
                                    new r({
                                        url: "/submit/user",
                                        params: a,
                                        beforeJump: function() {
                                            i._updateSignIn()
                                        },
                                        errorDeal: function(n, i) {
                                            c.fire("short.dialog", {
                                                content: "<p>" + i.errorMsg + "</p>"
                                            })
                                        }
                                    })
                                }
                            }
                        })
                    }
                }
            })
        },
        _getRemedyInfo: function(n) {
            var i = this,
            e = F.context("sign-in").reSignItemId,
            s = 0;
            t.ajax({
                url: "/ihome/myitem/ucenter",
                dataType: "jsonp",
                success: function(a) {
                    t.each(a.property,
                    function(n, i) {
                        i.item_id == e && (s = parseInt(i.number))
                    }),
                    n && t.isFunction(n) && n({
                        itemId: e,
                        itemNum: s,
                        signCardCanUsed: i.signCardCanUsed,
                        userWealth: F.context("sign-in").userWealth
                    })
                }
            })
        },
        _removeRemedyTip: function() {
            var n = this;
            n._remedyTip && n._remedyTip.instance.element.size() && "show" == n._remedyTip._status && n._remedyTip.hide()
        },
        _canResignin: function(n) {
            var i = !0,
            n = t(n),
            e = n.hasClass("td-signin-lastMonth"),
            s = n.hasClass("td-signin-future");
            return i = e && s || !e && !s ? !0 : !1,
            (n.hasClass("ui-datepicker-other-month") || n.hasClass("td-signin-done")) && (i = !1),
            i
        },
        _showRemedyTip: function() {
            var n = this,
            i = null;
            t(n.container).find("table .ui-state-disabled").unbind("click"),
            t(n.container).find("table .ui-state-disabled").click(function(e) {
                var s = t(this),
                o = parseInt(s.find(".ui-state-default").html());
                s.hasClass("active") || t(s).size() && (n._remedyTip && n._remedyTip.instance.element.size() && t(n._remedyTip.target).closest(s).size() && "show" == n._remedyTip._status || (t(n.container).find("table .td-signin-none").removeClass("active"), t(n.container).find("table .td-signin-none .add-signin").remove(), n._removeRemedyTip(), n._canResignin(s) && (t(s).closest(".ui-datepicker-today").size() ? 0 == F.context("sign-in").isSignIn && (t("#sign-in-btn").click(), t(s).unbind("click")) : (s.addClass("active"), s.find(".ui-td-div").append('<span class="add-signin">\u8865\u7b7e</span>'), n._getRemedyInfo(function(d) {
                    var l = 0 === Number(F.context("user").isMavin) ? "/ihome": "/mavin/home/index";
                    0 == F.context("sign-in").isSignIn ? i = ['<p class="intro">\u54ce\u5440\uff0c\u4eca\u5929\u8fd8\u6ca1\u6709\u7b7e\u5230 T_T</p>', '<p class="intro">\u8d76\u7d27\u70b9\u51fb\u7b7e\u5230\u5427\u3002</p>'].join("") : d.signCardCanUsed <= 0 ? i = ['<p class="intro">\u8865\u7b7e\u7684\u673a\u4f1a\u5df2\u7ecf\u7528\u5b8c\u4e86T_T...</p>', '<p class="intro">\u4ee5\u540e\u4e00\u5b9a\u8981\u597d\u597d\u73cd\u60dc\u554a\uff01</p>', '<p class="btn">', '<a class="btn-22-green mr-10 mt-10" target="_blank" href="' + l + '">\u7b54\u9898\u52a0\u901f</a>', '<a class="btn-22-white remedy-cancel mt-10">\u53d6\u6d88</a>', "</p>"].join("") : d.signCardCanUsed > 0 && 0 == d.itemNum && d.userWealth >= 150 ? i = ['<p class="title"><strong>150</strong>\u8d22\u5bcc\u503c\u5151\u6362<strong>1</strong>\u5f20\u8865\u7b7e\u5361</p>', '<p class="intro">\u5269\u4f59\u8d22\u5bcc\u503c\u4e3a' + d.userWealth + "</p>", '<p class="btn">', '<a href="/shop/view?id=' + n.cardShopId + '" target="_blank" class="mt-5 btn-22-green">\u5151\u6362\u8865\u7b7e\u5361</a>', '<a class="btn-22-white remedy-cancel mt-10">\u53d6\u6d88</a>', "</p>"].join("") : d.signCardCanUsed > 0 && 0 == d.itemNum && d.userWealth < 150 ? i = ['<p class="intro">\u8d22\u5bcc\u503c\u4e0d\u8db3\uff0c\u4e0d\u80fd\u5151\u6362\u8865\u7b7e\u5361</p>', '<p class="intro">\u7b54\u9898\u53ef\u8d62\u53d6\u8d22\u5bcc\u503c</p>', '<p class="btn">', '<a href="' + l + '" target="_blank" class="mt-5 btn-22-green">\u53bb\u7b54\u9898</a>', '<a class="btn-22-white remedy-cancel mt-10">\u53d6\u6d88</a>', "</p>"].join("") : d.signCardCanUsed > 0 && d.itemNum > 0 && d.itemId > 0 && (i = ['<p class="title">\u60a8\u672c\u6708\u8fd8\u6709<strong>' + d.signCardCanUsed + "</strong>\u6b21\u8865\u7b7e\u7684\u673a\u4f1a</p>", '<p class="intro">\u5269\u4f59' + d.itemNum + "\u5f20\u8865\u7b7e\u5361</p>", '<p class="btn">', '<a class="btn-22-green remedy-ok mr-10 mt-10">\u8865\u7b7e</a>', '<a class="btn-22-white remedy-cancel mt-10">\u53d6\u6d88</a>', "</p>"].join("")),
                    n._remedyTip = new a({
                        direction: "top",
                        tooltipClass: "remedyTip",
                        target: s,
                        content: i,
                        closebox: !0,
                        position: {
                            my: "left top+10",
                            at: "left-90 bottom"
                        }
                    }),
                    n._remedyTip.show(),
                    t(n._remedyTip.getTipContainer()).delegate(".remedy-ok", "click",
                    function(i) {
                        i.preventDefault(),
                        t(n.container).find("table .td-signin-none").removeClass("active"),
                        t(n.container).find("table .td-signin-none .add-signin").remove();
                        var e = parseInt(n.month),
                        a = n.year;
                        new r({
                            params: {
                                cm: 100900,
                                itemid: d.itemId,
                                number: 1,
                                args: t.json.stringify({
                                    day: o
                                })
                            },
                            beforeJump: function() {
                                s.addClass("td-signin-done ui-datepicker-unselectable ui-state-disabled").removeClass("td-signin-none").find(".ui-td-div").append('<span class="ui-signin-right"></span>'),
                                n._remedyTip.hide();
                                var i = t.parseJSON(F.context("sign-in").signinDays);
                                i.push([a, e, o].join("/")),
                                F.context("sign-in").signinDays = t.json.stringify(i),
                                n.signCardCanUsed = n.signCardCanUsed - 1;
                                var d = '<div class="reward"><p>\u8865\u7b7e\u6210\u529f\uff01</p><p>\u672c\u6708\u8fd8\u6709<span>' + n.signCardCanUsed + "</span>\u6b21\u8865\u7b7e\u673a\u4f1a</p></div>";
                                c.fire("short.dialog", {
                                    content: d
                                }),
                                n._updateSignIn()
                            },
                            errorDeal: function(i, e, t) {
                                n._remedyTip.hide(),
                                n._updateSignIn();
                                var s = "";
                                switch (t) {
                                case 17011:
                                    s = "<p>\u9009\u62e9\u7684\u65e5\u671f\u5df2\u7ecf\u7b7e\u5230\u4e86\u3002</p>";
                                    break;
                                case 17012:
                                    s = "<p>\u60a8\u672c\u6708\u8865\u7b7e\u7684\u673a\u4f1a\u5df2\u7ecf\u7528\u5b8c\u4e86\u3002</p>";
                                    break;
                                case 17010:
                                    s = "<p>\u60a8\u6ca1\u6709\u8db3\u591f\u7684\u8865\u7b7e\u5361\u3002</p>";
                                    break;
                                default:
                                    s = "<p>\u7f51\u7edc\u9519\u8bef\uff0c\u8bf7\u91cd\u8bd5\u3002</p>"
                                }
                                c.fire("short.dialog", {
                                    content: s
                                })
                            }
                        })
                    }).on("click", ".remedy-cancel",
                    function(i) {
                        i.preventDefault(),
                        t(n.container).find("table .td-signin-none").removeClass("active"),
                        t(n.container).find("table .td-signin-none .add-signin").remove(),
                        n._remedyTip.hide()
                    }).on("click", ".remedy-sign",
                    function(i) {
                        i.preventDefault(),
                        t(n.container).find("table .td-signin-none").removeClass("active"),
                        t(n.container).find("table .td-signin-none .add-signin").remove(),
                        t(".sign-in-dialog #sign-in-btn").click(),
                        n._remedyTip.hide()
                    }),
                    t(e.target).unbind("mouseover")
                })))))
            }).mouseenter(function(i) {
                tdElem = t(i.target).closest(".td-signin-none"),
                n._canResignin(tdElem) && (tdElem.find(".add-signin").length || tdElem.hasClass("ui-datepicker-today") || tdElem.find(".ui-td-div").append('<span class="add-signin">\u8865\u7b7e</span>'))
            }).mouseleave(function(i) {
                tdElem = t(i.target).closest(".td-signin-none"),
                n._canResignin(tdElem) && (tdElem.hasClass("active") || t(tdElem).find(".add-signin").remove())
            })
        },
        init: function(n) {
            var i = this;
            i.options = n,
            i._initDialog(),
            i._initEvent()
        }
    }));
    e.exports = g
});;
/*!common:widget/js/logic/union/union.js*/
define("common:widget/js/logic/union/union",
function(n, i, o) {
    var t, e = n("common:widget/lib/jquery/jquery");
    o.exports = function(n, i, o) {
        t = t || e.ajax({
            url: "//dup.baidustatic.com/js/m.js",
            dataType: "script",
            cache: !0
        }),
        window.BAIDU_DAN_config = window.BAIDU_DAN_config || {},
        window.BAIDU_DAN_config.zIndex = 1,
        t.done(function() {
            "object" == e.type(o) && "undefined" != typeof BAIDU_CLB_addOrientation && e.map(o,
            function(n, i) {
                "string" == e.type(n) && "" != e.trim(n) && BAIDU_CLB_addOrientation(i, n)
            }),
            "undefined" != typeof BAIDU_CLB_fillSlotAsync && BAIDU_CLB_fillSlotAsync(n, i)
        })
    }
});;
/*!common:widget/js/ui/crop/crop.min.js*/
define("common:widget/js/ui/crop/crop.min",
function(t, e, a) {
    "use strict";
    function i(t) {
        return ce.call(t).slice(8, -1).toLowerCase()
    }
    function o(t) {
        return "number" == typeof t && !isNaN(t)
    }
    function n(t) {
        return "undefined" == typeof t
    }
    function r(t) {
        return "object" === ("undefined" == typeof t ? "undefined": G(t)) && null !== t
    }
    function h(t) {
        if (!r(t)) return ! 1;
        try {
            var e = t.constructor,
            a = e.prototype;
            return e && a && se.call(a, "isPrototypeOf")
        } catch(i) {
            return ! 1
        }
    }
    function c(t) {
        return "function" === i(t)
    }
    function s(t) {
        return Array.isArray ? Array.isArray(t) : "array" === i(t)
    }
    function l(t) {
        return "string" == typeof t && (t = t.trim ? t.trim() : t.replace(ie, "$1")),
        t
    }
    function d(t, e) {
        if (t && c(e)) {
            var a = void 0;
            if (s(t) || o(t.length)) {
                var i = t.length;
                for (a = 0; i > a && e.call(t, t[a], a, t) !== !1; a += 1);
            } else r(t) && Object.keys(t).forEach(function(a) {
                e.call(t, t[a], a, t)
            })
        }
        return t
    }
    function p(t) {
        for (var e = arguments.length,
        a = Array(e > 1 ? e - 1 : 0), i = 1; e > i; i++) a[i - 1] = arguments[i];
        if (r(t) && a.length > 0) {
            if (Object.assign) return Object.assign.apply(Object, [t].concat(a));
            a.forEach(function(e) {
                r(e) && Object.keys(e).forEach(function(a) {
                    t[a] = e[a]
                })
            })
        }
        return t
    }
    function u(t, e) {
        for (var a = arguments.length,
        i = Array(a > 2 ? a - 2 : 0), o = 2; a > o; o++) i[o - 2] = arguments[o];
        return function() {
            for (var a = arguments.length,
            o = Array(a), n = 0; a > n; n++) o[n] = arguments[n];
            return t.apply(e, i.concat(o))
        }
    }
    function m(t, e) {
        var a = t.style;
        d(e,
        function(t, e) {
            ae.test(e) && o(t) && (t += "px"),
            a[e] = t
        })
    }
    function g(t, e) {
        return t.classList ? t.classList.contains(e) : t.className.indexOf(e) > -1
    }
    function f(t, e) {
        if (e) {
            if (o(t.length)) return void d(t,
            function(t) {
                f(t, e)
            });
            if (t.classList) return void t.classList.add(e);
            var a = l(t.className);
            a ? a.indexOf(e) < 0 && (t.className = a + " " + e) : t.className = e
        }
    }
    function v(t, e) {
        return e ? o(t.length) ? void d(t,
        function(t) {
            v(t, e)
        }) : t.classList ? void t.classList.remove(e) : void(t.className.indexOf(e) >= 0 && (t.className = t.className.replace(e, ""))) : void 0
    }
    function w(t, e, a) {
        return e ? o(t.length) ? void d(t,
        function(t) {
            w(t, e, a)
        }) : void(a ? f(t, e) : v(t, e)) : void 0
    }
    function b(t) {
        return t.replace(_, "$1-$2").toLowerCase()
    }
    function x(t, e) {
        return r(t[e]) ? t[e] : t.dataset ? t.dataset[e] : t.getAttribute("data-" + b(e))
    }
    function y(t, e, a) {
        r(a) ? t[e] = a: t.dataset ? t.dataset[e] = a: t.setAttribute("data-" + b(e), a)
    }
    function M(t, e) {
        if (r(t[e])) delete t[e];
        else if (t.dataset) try {
            delete t.dataset[e]
        } catch(a) {
            t.dataset[e] = null
        } else t.removeAttribute("data-" + b(e))
    }
    function C(t, e, a) {
        var i = l(e).split(ee);
        return i.length > 1 ? void d(i,
        function(e) {
            C(t, e, a)
        }) : void(t.removeEventListener ? t.removeEventListener(e, a, !1) : t.detachEvent && t.detachEvent("on" + e, a))
    }
    function D(t, e, a, i) {
        var o = l(e).split(ee),
        n = a;
        return o.length > 1 ? void d(o,
        function(e) {
            D(t, e, a)
        }) : (i && (a = function() {
            for (var i = arguments.length,
            o = Array(i), r = 0; i > r; r++) o[r] = arguments[r];
            return C(t, e, a),
            n.apply(t, o)
        }), void(t.addEventListener ? t.addEventListener(e, a, !1) : t.attachEvent && t.attachEvent("on" + e, a)))
    }
    function B(t, e, a) {
        if (t.dispatchEvent) {
            var i = void 0;
            return c(Event) && c(CustomEvent) ? i = n(a) ? new Event(e, {
                bubbles: !0,
                cancelable: !0
            }) : new CustomEvent(e, {
                detail: a,
                bubbles: !0,
                cancelable: !0
            }) : n(a) ? (i = document.createEvent("Event"), i.initEvent(e, !0, !0)) : (i = document.createEvent("CustomEvent"), i.initCustomEvent(e, !0, !0, a)),
            t.dispatchEvent(i)
        }
        return t.fireEvent ? t.fireEvent("on" + e) : !0
    }
    function k(t) {
        var e = t || window.event;
        if (e.target || (e.target = e.srcElement || document), !o(e.pageX) && o(e.clientX)) {
            var a = t.target.ownerDocument || document,
            i = a.documentElement,
            n = a.body;
            e.pageX = e.clientX + ((i && i.scrollLeft || n && n.scrollLeft || 0) - (i && i.clientLeft || n && n.clientLeft || 0)),
            e.pageY = e.clientY + ((i && i.scrollTop || n && n.scrollTop || 0) - (i && i.clientTop || n && n.clientTop || 0))
        }
        return e
    }
    function T(t) {
        var e = document.documentElement,
        a = t.getBoundingClientRect();
        return {
            left: a.left + ((window.scrollX || e && e.scrollLeft || 0) - (e && e.clientLeft || 0)),
            top: a.top + ((window.scrollY || e && e.scrollTop || 0) - (e && e.clientTop || 0))
        }
    }
    function L(t, e) {
        return t.getElementsByTagName(e)
    }
    function W(t, e) {
        return t.getElementsByClassName ? t.getElementsByClassName(e) : t.querySelectorAll("." + e)
    }
    function E(t) {
        return document.createElement(t)
    }
    function H(t, e) {
        t.appendChild(e)
    }
    function X(t) {
        t.parentNode && t.parentNode.removeChild(t)
    }
    function Y(t) {
        for (; t.firstChild;) t.removeChild(t.firstChild)
    }
    function O(t) {
        var e = t.match(te);
        return e && (e[1] !== location.protocol || e[2] !== location.hostname || e[3] !== location.port)
    }
    function N(t) {
        var e = "timestamp=" + (new Date).getTime();
        return t + ( - 1 === t.indexOf("?") ? "?": "&") + e
    }
    function S(t, e) {
        if (t.naturalWidth && !re) return void e(t.naturalWidth, t.naturalHeight);
        var a = E("img");
        a.onload = function() {
            e(this.width, this.height)
        },
        a.src = t.src
    }
    function z(t) {
        var e = [],
        a = t.translateX,
        i = t.translateY,
        n = t.rotate,
        r = t.scaleX,
        h = t.scaleY;
        o(a) && 0 !== a && e.push("translateX(" + a + "px)"),
        o(i) && 0 !== i && e.push("translateY(" + i + "px)"),
        o(n) && 0 !== n && e.push("rotate(" + n + "deg)"),
        o(r) && 1 !== r && e.push("scaleX(" + r + ")"),
        o(h) && 1 !== h && e.push("scaleY(" + h + ")");
        var c = e.length ? e.join(" ") : "none";
        return {
            WebkitTransform: c,
            msTransform: c,
            transform: c
        }
    }
    function R(t, e) {
        var a = Math.abs(t.degree) % 180,
        i = (a > 90 ? 180 - a: a) * Math.PI / 180,
        o = Math.sin(i),
        n = Math.cos(i),
        r = t.width,
        h = t.height,
        c = t.aspectRatio,
        s = void 0,
        l = void 0;
        return e ? (s = r / (n + o / c), l = s / c) : (s = r * n + h * o, l = r * o + h * n),
        {
            width: s,
            height: l
        }
    }
    function A(t, e, a) {
        var i = E("canvas"),
        n = i.getContext("2d"),
        r = 0,
        h = 0,
        c = e.naturalWidth,
        s = e.naturalHeight,
        l = e.rotate,
        d = e.scaleX,
        p = e.scaleY,
        u = o(d) && o(p) && (1 !== d || 1 !== p),
        m = o(l) && 0 !== l,
        g = m || u,
        f = c * Math.abs(d || 1),
        v = s * Math.abs(p || 1),
        w = void 0,
        b = void 0,
        x = void 0;
        return u && (w = f / 2, b = v / 2),
        m && (x = R({
            width: f,
            height: v,
            degree: l
        }), f = x.width, v = x.height, w = f / 2, b = v / 2),
        i.width = f,
        i.height = v,
        a.fillColor && (n.fillStyle = a.fillColor, n.fillRect(0, 0, f, v)),
        g && (r = -c / 2, h = -s / 2, n.save(), n.translate(w, b)),
        m && n.rotate(l * Math.PI / 180),
        u && n.scale(d, p),
        n.imageSmoothingEnabled = !!a.imageSmoothingEnabled,
        a.imageSmoothingQuality && (n.imageSmoothingQuality = a.imageSmoothingQuality),
        n.drawImage(t, Math.floor(r), Math.floor(h), Math.floor(c), Math.floor(s)),
        g && n.restore(),
        i
    }
    function I(t, e, a) {
        var i = "",
        o = e;
        for (a += e; a > o; o += 1) i += le(t.getUint8(o));
        return i
    }
    function U(t) {
        var e = new DataView(t),
        a = e.byteLength,
        i = void 0,
        o = void 0,
        n = void 0,
        r = void 0,
        h = void 0,
        c = void 0,
        s = void 0,
        l = void 0,
        d = void 0,
        p = void 0;
        if (255 === e.getUint8(0) && 216 === e.getUint8(1)) for (d = 2; a > d;) {
            if (255 === e.getUint8(d) && 225 === e.getUint8(d + 1)) {
                s = d;
                break
            }
            d += 1
        }
        if (s && (o = s + 4, n = s + 10, "Exif" === I(e, o, 4) && (c = e.getUint16(n), h = 18761 === c, (h || 19789 === c) && 42 === e.getUint16(n + 2, h) && (r = e.getUint32(n + 4, h), r >= 8 && (l = n + r)))), l) for (a = e.getUint16(l, h), p = 0; a > p; p += 1) if (d = l + 12 * p + 2, 274 === e.getUint16(d, h)) {
            d += 8,
            i = e.getUint16(d, h),
            re && e.setUint16(d, 1, h);
            break
        }
        return i
    }
    function j(t) {
        var e = t.replace(J, ""),
        a = atob(e),
        i = a.length,
        o = new ArrayBuffer(i),
        n = new Uint8Array(o),
        r = void 0;
        for (r = 0; i > r; r += 1) n[r] = a.charCodeAt(r);
        return o
    }
    function P(t) {
        var e = new Uint8Array(t),
        a = e.length,
        i = "",
        o = void 0;
        for (o = 0; a > o; o += 1) i += le(e[o]);
        return "data:image/jpeg;base64," + btoa(i)
    }
    function q(t, e) {
        var a = t.pageX,
        i = t.pageY,
        o = {
            endX: a,
            endY: i
        };
        return e ? o: p({
            startX: a,
            startY: i
        },
        o)
    }
    function Q(t) {
        var e = p({},
        t),
        a = [];
        return d(t,
        function(t, i) {
            delete e[i],
            d(e,
            function(e) {
                var i = Math.abs(t.startX - e.startX),
                o = Math.abs(t.startY - e.startY),
                n = Math.abs(t.endX - e.endX),
                r = Math.abs(t.endY - e.endY),
                h = Math.sqrt(i * i + o * o),
                c = Math.sqrt(n * n + r * r),
                s = (c - h) / h;
                a.push(s)
            })
        }),
        a.sort(function(t, e) {
            return Math.abs(t) < Math.abs(e)
        }),
        a[0]
    }
    function $(t) {
        if (Array.isArray(t)) {
            for (var e = 0,
            a = Array(t.length); e < t.length; e++) a[e] = t[e];
            return a
        }
        return Array.from(t)
    }
    function Z(t) {
        var e = 0,
        a = 0,
        i = 0;
        return d(t,
        function(t) {
            var o = t.startX,
            n = t.startY;
            e += o,
            a += n,
            i += 1
        }),
        e /= i,
        a /= i,
        {
            pageX: e,
            pageY: a
        }
    }
    function K(t, e) {
        if (! (t instanceof e)) throw new TypeError("Cannot call a class as a function")
    }
    var V = {
        viewMode: 0,
        dragMode: "crop",
        aspectRatio: 0 / 0,
        data: null,
        preview: "",
        responsive: !0,
        restore: !0,
        checkCrossOrigin: !0,
        checkOrientation: !0,
        modal: !0,
        guides: !0,
        center: !0,
        highlight: !0,
        background: !0,
        autoCrop: !0,
        autoCropArea: .8,
        movable: !0,
        rotatable: !0,
        scalable: !0,
        zoomable: !0,
        zoomOnTouch: !0,
        zoomOnWheel: !0,
        wheelZoomRatio: .1,
        cropBoxMovable: !0,
        cropBoxResizable: !0,
        toggleDragModeOnDblclick: !0,
        minCanvasWidth: 0,
        minCanvasHeight: 0,
        minCropBoxWidth: 0,
        minCropBoxHeight: 0,
        minContainerWidth: 200,
        minContainerHeight: 100,
        ready: null,
        cropstart: null,
        cropmove: null,
        cropend: null,
        crop: null,
        zoom: null
    },
    F = '<div class="cropper-container"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',
    G = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ?
    function(t) {
        return typeof t
    }: function(t) {
        return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol": typeof t
    },
    J = /^data:.*,/,
    _ = /([a-z\d])([A-Z])/g,
    te=/^(https?:)\/\/([^:/?#]+):?(\d*)/i,ee=/\s+/,ae=/^(width|height|left|top|marginLeft|marginTop)$/,ie=/^\s+(.*)\s+$/,oe=/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i,ne="undefined"!=typeof window?window.navigator:null,re=ne&&oe.test(ne.userAgent),he=Object.prototype,ce=he.toString,se=he.hasOwnProperty,le=String.fromCharCode,de={
        render: function() {
            var t = this;
            t.initContainer(),
            t.initCanvas(),
            t.initCropBox(),
            t.renderCanvas(),
            t.cropped && t.renderCropBox()
        },
        initContainer: function() {
            var t = this,
            e = t.options,
            a = t.element,
            i = t.container,
            o = t.cropper,
            n = "cropper-hidden";
            f(o, n),
            v(a, n);
            var r = {
                width: Math.max(i.offsetWidth, Number(e.minContainerWidth) || 200),
                height: Math.max(i.offsetHeight, Number(e.minContainerHeight) || 100)
            };
            t.containerData = r,
            m(o, {
                width: r.width,
                height: r.height
            }),
            f(a, n),
            v(o, n)
        },
        initCanvas: function() {
            var t = this,
            e = t.options.viewMode,
            a = t.containerData,
            i = t.imageData,
            o = Math.abs(i.rotate) % 180 === 90,
            n = o ? i.naturalHeight: i.naturalWidth,
            r = o ? i.naturalWidth: i.naturalHeight,
            h = n / r,
            c = a.width,
            s = a.height;
            a.height * h > a.width ? 3 === e ? c = a.height * h: s = a.width / h: 3 === e ? s = a.width / h: c = a.height * h;
            var l = {
                naturalWidth: n,
                naturalHeight: r,
                aspectRatio: h,
                width: c,
                height: s
            };
            l.left = (a.width - c) / 2,
            l.top = (a.height - s) / 2,
            l.oldLeft = l.left,
            l.oldTop = l.top,
            t.canvasData = l,
            t.limited = 1 === e || 2 === e,
            t.limitCanvas(!0, !0),
            t.initialImageData = p({},
            i),
            t.initialCanvasData = p({},
            l)
        },
        limitCanvas: function(t, e) {
            var a = this,
            i = a.options,
            o = i.viewMode,
            n = a.containerData,
            r = a.canvasData,
            h = r.aspectRatio,
            c = a.cropBoxData,
            s = a.cropped && c;
            if (t) {
                var l = Number(i.minCanvasWidth) || 0,
                d = Number(i.minCanvasHeight) || 0;
                o > 1 ? (l = Math.max(l, n.width), d = Math.max(d, n.height), 3 === o && (d * h > l ? l = d * h: d = l / h)) : o > 0 && (l ? l = Math.max(l, s ? c.width: 0) : d ? d = Math.max(d, s ? c.height: 0) : s && (l = c.width, d = c.height, d * h > l ? l = d * h: d = l / h)),
                l && d ? d * h > l ? d = l / h: l = d * h: l ? d = l / h: d && (l = d * h),
                r.minWidth = l,
                r.minHeight = d,
                r.maxWidth = 1 / 0,
                r.maxHeight = 1 / 0
            }
            if (e) if (o) {
                var p = n.width - r.width,
                u = n.height - r.height;
                r.minLeft = Math.min(0, p),
                r.minTop = Math.min(0, u),
                r.maxLeft = Math.max(0, p),
                r.maxTop = Math.max(0, u),
                s && a.limited && (r.minLeft = Math.min(c.left, c.left + (c.width - r.width)), r.minTop = Math.min(c.top, c.top + (c.height - r.height)), r.maxLeft = c.left, r.maxTop = c.top, 2 === o && (r.width >= n.width && (r.minLeft = Math.min(0, p), r.maxLeft = Math.max(0, p)), r.height >= n.height && (r.minTop = Math.min(0, u), r.maxTop = Math.max(0, u))))
            } else r.minLeft = -r.width,
            r.minTop = -r.height,
            r.maxLeft = n.width,
            r.maxTop = n.height
        },
        renderCanvas: function(t) {
            var e = this,
            a = e.canvasData,
            i = e.imageData,
            o = i.rotate;
            if (e.rotated) {
                e.rotated = !1;
                var n = R({
                    width: i.width,
                    height: i.height,
                    degree: o
                }),
                r = n.width / n.height,
                h = 1 === i.aspectRatio;
                if (h || r !== a.aspectRatio) {
                    if (a.left -= (n.width - a.width) / 2, a.top -= (n.height - a.height) / 2, a.width = n.width, a.height = n.height, a.aspectRatio = r, a.naturalWidth = i.naturalWidth, a.naturalHeight = i.naturalHeight, h && o % 90 || o % 180) {
                        var c = R({
                            width: i.naturalWidth,
                            height: i.naturalHeight,
                            degree: o
                        });
                        a.naturalWidth = c.width,
                        a.naturalHeight = c.height
                    }
                    e.limitCanvas(!0, !1)
                }
            } (a.width > a.maxWidth || a.width < a.minWidth) && (a.left = a.oldLeft),
            (a.height > a.maxHeight || a.height < a.minHeight) && (a.top = a.oldTop),
            a.width = Math.min(Math.max(a.width, a.minWidth), a.maxWidth),
            a.height = Math.min(Math.max(a.height, a.minHeight), a.maxHeight),
            e.limitCanvas(!1, !0),
            a.left = Math.min(Math.max(a.left, a.minLeft), a.maxLeft),
            a.top = Math.min(Math.max(a.top, a.minTop), a.maxTop),
            a.oldLeft = a.left,
            a.oldTop = a.top,
            m(e.canvas, p({
                width: a.width,
                height: a.height
            },
            z({
                translateX: a.left,
                translateY: a.top
            }))),
            e.renderImage(),
            e.cropped && e.limited && e.limitCropBox(!0, !0),
            t && e.output()
        },
        renderImage: function(t) {
            var e = this,
            a = e.canvasData,
            i = e.imageData,
            o = void 0,
            n = void 0,
            r = void 0,
            h = void 0;
            i.rotate && (n = R({
                width: a.width,
                height: a.height,
                degree: i.rotate,
                aspectRatio: i.aspectRatio
            },
            !0), r = n.width, h = n.height, o = {
                width: r,
                height: h,
                left: (a.width - r) / 2,
                top: (a.height - h) / 2
            }),
            p(i, o || {
                width: a.width,
                height: a.height,
                left: 0,
                top: 0
            }),
            m(e.image, p({
                width: i.width,
                height: i.height
            },
            z(p({
                translateX: i.left,
                translateY: i.top
            },
            i)))),
            t && e.output()
        },
        initCropBox: function() {
            var t = this,
            e = t.options,
            a = e.aspectRatio,
            i = Number(e.autoCropArea) || .8,
            o = t.canvasData,
            n = {
                width: o.width,
                height: o.height
            };
            a && (o.height * a > o.width ? n.height = n.width / a: n.width = n.height * a),
            t.cropBoxData = n,
            t.limitCropBox(!0, !0),
            n.width = Math.min(Math.max(n.width, n.minWidth), n.maxWidth),
            n.height = Math.min(Math.max(n.height, n.minHeight), n.maxHeight),
            n.width = Math.max(n.minWidth, n.width * i),
            n.height = Math.max(n.minHeight, n.height * i),
            n.left = o.left + (o.width - n.width) / 2,
            n.top = o.top + (o.height - n.height) / 2,
            n.oldLeft = n.left,
            n.oldTop = n.top,
            t.initialCropBoxData = p({},
            n)
        },
        limitCropBox: function(t, e) {
            var a = this,
            i = a.options,
            o = i.aspectRatio,
            n = a.containerData,
            r = a.canvasData,
            h = a.cropBoxData,
            c = a.limited;
            if (t) {
                var s = Number(i.minCropBoxWidth) || 0,
                l = Number(i.minCropBoxHeight) || 0,
                d = Math.min(n.width, c ? r.width: n.width),
                p = Math.min(n.height, c ? r.height: n.height);
                s = Math.min(s, n.width),
                l = Math.min(l, n.height),
                o && (s && l ? l * o > s ? l = s / o: s = l * o: s ? l = s / o: l && (s = l * o), p * o > d ? p = d / o: d = p * o),
                h.minWidth = Math.min(s, d),
                h.minHeight = Math.min(l, p),
                h.maxWidth = d,
                h.maxHeight = p
            }
            e && (c ? (h.minLeft = Math.max(0, r.left), h.minTop = Math.max(0, r.top), h.maxLeft = Math.min(n.width, r.left + r.width) - h.width, h.maxTop = Math.min(n.height, r.top + r.height) - h.height) : (h.minLeft = 0, h.minTop = 0, h.maxLeft = n.width - h.width, h.maxTop = n.height - h.height))
        },
        renderCropBox: function() {
            var t = this,
            e = t.options,
            a = t.containerData,
            i = t.cropBoxData; (i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft),
            (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop),
            i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth),
            i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight),
            t.limitCropBox(!1, !0),
            i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft),
            i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop),
            i.oldLeft = i.left,
            i.oldTop = i.top,
            e.movable && e.cropBoxMovable && y(t.face, "action", i.width === a.width && i.height === a.height ? "move": "all"),
            m(t.cropBox, p({
                width: i.width,
                height: i.height
            },
            z({
                translateX: i.left,
                translateY: i.top
            }))),
            t.cropped && t.limited && t.limitCanvas(!0, !0),
            t.disabled || t.output()
        },
        output: function() {
            var t = this;
            t.preview(),
            t.complete && B(t.element, "crop", t.getData())
        }
    },
    pe = "preview", ue = {
        initPreview: function() {
            var t = this,
            e = t.options.preview,
            a = E("img"),
            i = t.crossOrigin,
            o = i ? t.crossOriginUrl: t.url;
            if (i && (a.crossOrigin = i), a.src = o, H(t.viewBox, a), t.image2 = a, e) {
                var n = e.querySelector ? [e] : document.querySelectorAll(e);
                t.previews = n,
                d(n,
                function(t) {
                    var e = E("img");
                    y(t, pe, {
                        width: t.offsetWidth,
                        height: t.offsetHeight,
                        html: t.innerHTML
                    }),
                    i && (e.crossOrigin = i),
                    e.src = o,
                    e.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',
                    Y(t),
                    H(t, e)
                })
            }
        },
        resetPreview: function() {
            d(this.previews,
            function(t) {
                var e = x(t, pe);
                m(t, {
                    width: e.width,
                    height: e.height
                }),
                t.innerHTML = e.html,
                M(t, pe)
            })
        },
        preview: function() {
            var t = this,
            e = t.imageData,
            a = t.canvasData,
            i = t.cropBoxData,
            o = i.width,
            n = i.height,
            r = e.width,
            h = e.height,
            c = i.left - a.left - e.left,
            s = i.top - a.top - e.top;
            t.cropped && !t.disabled && (m(t.image2, p({
                width: r,
                height: h
            },
            z(p({
                translateX: -c,
                translateY: -s
            },
            e)))), d(t.previews,
            function(t) {
                var a = x(t, pe),
                i = a.width,
                l = a.height,
                d = i,
                u = l,
                g = 1;
                o && (g = i / o, u = n * g),
                n && u > l && (g = l / n, d = o * g, u = l),
                m(t, {
                    width: d,
                    height: u
                }),
                m(L(t, "img")[0], p({
                    width: r * g,
                    height: h * g
                },
                z(p({
                    translateX: -c * g,
                    translateY: -s * g
                },
                e))))
            }))
        }
    },
    me = "undefined" != typeof window ? window.PointerEvent: null, ge = me ? "pointerdown": "touchstart mousedown", fe = me ? "pointermove": "touchmove mousemove", ve = me ? " pointerup pointercancel": "touchend touchcancel mouseup", we = "wheel mousewheel DOMMouseScroll", be = "dblclick", xe = "resize", ye = "cropstart", Me = "cropmove", Ce = "cropend", De = "crop", Be = "zoom", ke = {
        bind: function() {
            var t = this,
            e = t.options,
            a = t.element,
            i = t.cropper;
            c(e.cropstart) && D(a, ye, e.cropstart),
            c(e.cropmove) && D(a, Me, e.cropmove),
            c(e.cropend) && D(a, Ce, e.cropend),
            c(e.crop) && D(a, De, e.crop),
            c(e.zoom) && D(a, Be, e.zoom),
            D(i, ge, t.onCropStart = u(t.cropStart, t)),
            e.zoomable && e.zoomOnWheel && D(i, we, t.onWheel = u(t.wheel, t)),
            e.toggleDragModeOnDblclick && D(i, be, t.onDblclick = u(t.dblclick, t)),
            D(document, fe, t.onCropMove = u(t.cropMove, t)),
            D(document, ve, t.onCropEnd = u(t.cropEnd, t)),
            e.responsive && D(window, xe, t.onResize = u(t.resize, t))
        },
        unbind: function() {
            var t = this,
            e = t.options,
            a = t.element,
            i = t.cropper;
            c(e.cropstart) && C(a, ye, e.cropstart),
            c(e.cropmove) && C(a, Me, e.cropmove),
            c(e.cropend) && C(a, Ce, e.cropend),
            c(e.crop) && C(a, De, e.crop),
            c(e.zoom) && C(a, Be, e.zoom),
            C(i, ge, t.onCropStart),
            e.zoomable && e.zoomOnWheel && C(i, we, t.onWheel),
            e.toggleDragModeOnDblclick && C(i, be, t.onDblclick),
            C(document, fe, t.onCropMove),
            C(document, ve, t.onCropEnd),
            e.responsive && C(window, xe, t.onResize)
        }
    },
    Te = /^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/, Le = {
        resize: function() {
            var t = this,
            e = t.options,
            a = t.container,
            i = t.containerData,
            o = Number(e.minContainerWidth) || 200,
            n = Number(e.minContainerHeight) || 100;
            if (!t.disabled && i.width !== o && i.height !== n) {
                var r = a.offsetWidth / i.width;
                if (1 !== r || a.offsetHeight !== i.height) {
                    var h = void 0,
                    c = void 0;
                    e.restore && (h = t.getCanvasData(), c = t.getCropBoxData()),
                    t.render(),
                    e.restore && (t.setCanvasData(d(h,
                    function(t, e) {
                        h[e] = t * r
                    })), t.setCropBoxData(d(c,
                    function(t, e) {
                        c[e] = t * r
                    })))
                }
            }
        },
        dblclick: function() {
            var t = this;
            t.disabled || "none" === t.options.dragMode || t.setDragMode(g(t.dragBox, "cropper-crop") ? "move": "crop")
        },
        wheel: function(t) {
            var e = this,
            a = k(t),
            i = Number(e.options.wheelZoomRatio) || .1,
            o = 1;
            e.disabled || (a.preventDefault(), e.wheeling || (e.wheeling = !0, setTimeout(function() {
                e.wheeling = !1
            },
            50), a.deltaY ? o = a.deltaY > 0 ? 1 : -1 : a.wheelDelta ? o = -a.wheelDelta / 120 : a.detail && (o = a.detail > 0 ? 1 : -1), e.zoom( - o * i, a)))
        },
        cropStart: function(t) {
            var e = this;
            if (!e.disabled) {
                var a = e.options,
                i = e.pointers,
                o = k(t),
                n = void 0;
                o.changedTouches ? d(o.changedTouches,
                function(t) {
                    i[t.identifier] = q(t)
                }) : i[o.pointerId || 0] = q(o),
                n = Object.keys(i).length > 1 && a.zoomable && a.zoomOnTouch ? "zoom": x(o.target, "action"),
                Te.test(n) && B(e.element, "cropstart", {
                    originalEvent: o,
                    action: n
                }) !== !1 && (o.preventDefault(), e.action = n, e.cropping = !1, "crop" === n && (e.cropping = !0, f(e.dragBox, "cropper-modal")))
            }
        },
        cropMove: function(t) {
            var e = this,
            a = e.action;
            if (!e.disabled && a) {
                var i = e.pointers,
                o = k(t);
                o.preventDefault(),
                B(e.element, "cropmove", {
                    originalEvent: o,
                    action: a
                }) !== !1 && (o.changedTouches ? d(o.changedTouches,
                function(t) {
                    p(i[t.identifier], q(t, !0))
                }) : p(i[o.pointerId || 0], q(o, !0)), e.change(o))
            }
        },
        cropEnd: function(t) {
            var e = this;
            if (!e.disabled) {
                var a = e.action,
                i = e.pointers,
                o = k(t);
                o.changedTouches ? d(o.changedTouches,
                function(t) {
                    delete i[t.identifier]
                }) : delete i[o.pointerId || 0],
                a && (o.preventDefault(), Object.keys(i).length || (e.action = ""), e.cropping && (e.cropping = !1, w(e.dragBox, "cropper-modal", e.cropped && this.options.modal)), B(e.element, "cropend", {
                    originalEvent: o,
                    action: a
                }))
            }
        }
    },
    We = "e", Ee = "w", He = "s", Xe = "n", Ye = "se", Oe = "sw", Ne = "ne", Se = "nw", ze = {
        change: function(t) {
            var e = this,
            a = e.options,
            i = e.containerData,
            o = e.canvasData,
            n = e.cropBoxData,
            r = a.aspectRatio,
            h = e.action,
            c = n.width,
            s = n.height,
            l = n.left,
            p = n.top,
            u = l + c,
            m = p + s,
            g = 0,
            f = 0,
            w = i.width,
            b = i.height,
            x = !0,
            y = void 0; ! r && t.shiftKey && (r = c && s ? c / s: 1),
            e.limited && (g = n.minLeft, f = n.minTop, w = g + Math.min(i.width, o.width, o.left + o.width), b = f + Math.min(i.height, o.height, o.top + o.height));
            var M = e.pointers,
            C = M[Object.keys(M)[0]],
            D = {
                x: C.endX - C.startX,
                y: C.endY - C.startY
            };
            switch (h) {
            case "all":
                l += D.x,
                p += D.y;
                break;
            case We:
                if (D.x >= 0 && (u >= w || r && (f >= p || m >= b))) {
                    x = !1;
                    break
                }
                u + D.x > w && (D.x = w - u),
                c += D.x,
                r && (s = c / r, p -= D.x / r / 2),
                0 > c && (h = Ee, c = 0);
                break;
            case Xe:
                if (D.y <= 0 && (f >= p || r && (g >= l || u >= w))) {
                    x = !1;
                    break
                }
                p + D.y < f && (D.y = f - p),
                s -= D.y,
                p += D.y,
                r && (c = s * r, l += D.y * r / 2),
                0 > s && (h = He, s = 0);
                break;
            case Ee:
                if (D.x <= 0 && (g >= l || r && (f >= p || m >= b))) {
                    x = !1;
                    break
                }
                l + D.x < g && (D.x = g - l),
                c -= D.x,
                l += D.x,
                r && (s = c / r, p += D.x / r / 2),
                0 > c && (h = We, c = 0);
                break;
            case He:
                if (D.y >= 0 && (m >= b || r && (g >= l || u >= w))) {
                    x = !1;
                    break
                }
                m + D.y > b && (D.y = b - m),
                s += D.y,
                r && (c = s * r, l -= D.y * r / 2),
                0 > s && (h = Xe, s = 0);
                break;
            case Ne:
                if (r) {
                    if (D.y <= 0 && (f >= p || u >= w)) {
                        x = !1;
                        break
                    }
                    s -= D.y,
                    p += D.y,
                    c = s * r
                } else D.x >= 0 ? w > u ? c += D.x: D.y <= 0 && f >= p && (x = !1) : c += D.x,
                D.y <= 0 ? p > f && (s -= D.y, p += D.y) : (s -= D.y, p += D.y);
                0 > c && 0 > s ? (h = Oe, s = 0, c = 0) : 0 > c ? (h = Se, c = 0) : 0 > s && (h = Ye, s = 0);
                break;
            case Se:
                if (r) {
                    if (D.y <= 0 && (f >= p || g >= l)) {
                        x = !1;
                        break
                    }
                    s -= D.y,
                    p += D.y,
                    c = s * r,
                    l += D.y * r
                } else D.x <= 0 ? l > g ? (c -= D.x, l += D.x) : D.y <= 0 && f >= p && (x = !1) : (c -= D.x, l += D.x),
                D.y <= 0 ? p > f && (s -= D.y, p += D.y) : (s -= D.y, p += D.y);
                0 > c && 0 > s ? (h = Ye, s = 0, c = 0) : 0 > c ? (h = Ne, c = 0) : 0 > s && (h = Oe, s = 0);
                break;
            case Oe:
                if (r) {
                    if (D.x <= 0 && (g >= l || m >= b)) {
                        x = !1;
                        break
                    }
                    c -= D.x,
                    l += D.x,
                    s = c / r
                } else D.x <= 0 ? l > g ? (c -= D.x, l += D.x) : D.y >= 0 && m >= b && (x = !1) : (c -= D.x, l += D.x),
                D.y >= 0 ? b > m && (s += D.y) : s += D.y;
                0 > c && 0 > s ? (h = Ne, s = 0, c = 0) : 0 > c ? (h = Ye, c = 0) : 0 > s && (h = Se, s = 0);
                break;
            case Ye:
                if (r) {
                    if (D.x >= 0 && (u >= w || m >= b)) {
                        x = !1;
                        break
                    }
                    c += D.x,
                    s = c / r
                } else D.x >= 0 ? w > u ? c += D.x: D.y >= 0 && m >= b && (x = !1) : c += D.x,
                D.y >= 0 ? b > m && (s += D.y) : s += D.y;
                0 > c && 0 > s ? (h = Se, s = 0, c = 0) : 0 > c ? (h = Oe, c = 0) : 0 > s && (h = Ne, s = 0);
                break;
            case "move":
                e.move(D.x, D.y),
                x = !1;
                break;
            case "zoom":
                e.zoom(Q(M), t),
                x = !1;
                break;
            case "crop":
                if (!D.x || !D.y) {
                    x = !1;
                    break
                }
                y = T(e.cropper),
                l = C.startX - y.left,
                p = C.startY - y.top,
                c = n.minWidth,
                s = n.minHeight,
                D.x > 0 ? h = D.y > 0 ? Ye: Ne: D.x < 0 && (l -= c, h = D.y > 0 ? Oe: Se),
                D.y < 0 && (p -= s),
                e.cropped || (v(e.cropBox, "cropper-hidden"), e.cropped = !0, e.limited && e.limitCropBox(!0, !0))
            }
            x && (n.width = c, n.height = s, n.left = l, n.top = p, e.action = h, e.renderCropBox()),
            d(M,
            function(t) {
                t.startX = t.endX,
                t.startY = t.endY
            })
        }
    },
    Re = {
        crop: function() {
            var t = this;
            return t.ready && !t.disabled && (t.cropped || (t.cropped = !0, t.limitCropBox(!0, !0), t.options.modal && f(t.dragBox, "cropper-modal"), v(t.cropBox, "cropper-hidden")), t.setCropBoxData(t.initialCropBoxData)),
            t
        },
        reset: function() {
            var t = this;
            return t.ready && !t.disabled && (t.imageData = p({},
            t.initialImageData), t.canvasData = p({},
            t.initialCanvasData), t.cropBoxData = p({},
            t.initialCropBoxData), t.renderCanvas(), t.cropped && t.renderCropBox()),
            t
        },
        clear: function() {
            var t = this;
            return t.cropped && !t.disabled && (p(t.cropBoxData, {
                left: 0,
                top: 0,
                width: 0,
                height: 0
            }), t.cropped = !1, t.renderCropBox(), t.limitCanvas(!0, !0), t.renderCanvas(), v(t.dragBox, "cropper-modal"), f(t.cropBox, "cropper-hidden")),
            t
        },
        replace: function(t, e) {
            var a = this;
            return ! a.disabled && t && (a.isImg && (a.element.src = t), e ? (a.url = t, a.image.src = t, a.ready && (a.image2.src = t, d(a.previews,
            function(e) {
                L(e, "img")[0].src = t
            }))) : (a.isImg && (a.replaced = !0), a.options.data = null, a.load(t))),
            a
        },
        enable: function() {
            var t = this;
            return t.ready && (t.disabled = !1, v(t.cropper, "cropper-disabled")),
            t
        },
        disable: function() {
            var t = this;
            return t.ready && (t.disabled = !0, f(t.cropper, "cropper-disabled")),
            t
        },
        destroy: function() {
            var t = this,
            e = t.element,
            a = t.image;
            return t.loaded ? (t.isImg && t.replaced && (e.src = t.originalUrl), t.unbuild(), v(e, "cropper-hidden")) : t.isImg ? C(e, "load", t.onStart) : a && X(a),
            M(e, "cropper"),
            t
        },
        move: function(t, e) {
            var a = this,
            i = a.canvasData;
            return a.moveTo(n(t) ? t: i.left + Number(t), n(e) ? e: i.top + Number(e))
        },
        moveTo: function(t, e) {
            var a = this,
            i = a.canvasData,
            r = !1;
            return n(e) && (e = t),
            t = Number(t),
            e = Number(e),
            a.ready && !a.disabled && a.options.movable && (o(t) && (i.left = t, r = !0), o(e) && (i.top = e, r = !0), r && a.renderCanvas(!0)),
            a
        },
        zoom: function(t, e) {
            var a = this,
            i = a.canvasData;
            return t = Number(t),
            t = 0 > t ? 1 / (1 - t) : 1 + t,
            a.zoomTo(i.width * t / i.naturalWidth, e)
        },
        zoomTo: function(t, e) {
            var a = this,
            i = a.options,
            o = a.canvasData,
            n = o.width,
            r = o.height,
            h = o.naturalWidth,
            c = o.naturalHeight;
            if (t = Number(t), t >= 0 && a.ready && !a.disabled && i.zoomable) {
                var s = h * t,
                l = c * t;
                if (B(a.element, "zoom", {
                    originalEvent: e,
                    oldRatio: n / h,
                    ratio: s / h
                }) === !1) return a;
                if (e) {
                    var d = a.pointers,
                    p = T(a.cropper),
                    u = d && Object.keys(d).length ? Z(d) : {
                        pageX: e.pageX,
                        pageY: e.pageY
                    };
                    o.left -= (s - n) * ((u.pageX - p.left - o.left) / n),
                    o.top -= (l - r) * ((u.pageY - p.top - o.top) / r)
                } else o.left -= (s - n) / 2,
                o.top -= (l - r) / 2;
                o.width = s,
                o.height = l,
                a.renderCanvas(!0)
            }
            return a
        },
        rotate: function(t) {
            var e = this;
            return e.rotateTo((e.imageData.rotate || 0) + Number(t))
        },
        rotateTo: function(t) {
            var e = this;
            return t = Number(t),
            o(t) && e.ready && !e.disabled && e.options.rotatable && (e.imageData.rotate = t % 360, e.rotated = !0, e.renderCanvas(!0)),
            e
        },
        scale: function(t, e) {
            var a = this,
            i = a.imageData,
            r = !1;
            return n(e) && (e = t),
            t = Number(t),
            e = Number(e),
            a.ready && !a.disabled && a.options.scalable && (o(t) && (i.scaleX = t, r = !0), o(e) && (i.scaleY = e, r = !0), r && a.renderImage(!0)),
            a
        },
        scaleX: function(t) {
            var e = this,
            a = e.imageData.scaleY;
            return e.scale(t, o(a) ? a: 1)
        },
        scaleY: function(t) {
            var e = this,
            a = e.imageData.scaleX;
            return e.scale(o(a) ? a: 1, t)
        },
        getData: function(t) {
            var e = this,
            a = e.options,
            i = e.imageData,
            o = e.canvasData,
            n = e.cropBoxData,
            r = void 0,
            h = void 0;
            return e.ready && e.cropped ? (h = {
                x: n.left - o.left,
                y: n.top - o.top,
                width: n.width,
                height: n.height
            },
            r = i.width / i.naturalWidth, d(h,
            function(e, a) {
                e /= r,
                h[a] = t ? Math.round(e) : e
            })) : h = {
                x: 0,
                y: 0,
                width: 0,
                height: 0
            },
            a.rotatable && (h.rotate = i.rotate || 0),
            a.scalable && (h.scaleX = i.scaleX || 1, h.scaleY = i.scaleY || 1),
            h
        },
        setData: function(t) {
            var e = this,
            a = e.options,
            i = e.imageData,
            n = e.canvasData,
            r = {},
            s = void 0,
            l = void 0,
            d = void 0;
            return c(t) && (t = t.call(e.element)),
            e.ready && !e.disabled && h(t) && (a.rotatable && o(t.rotate) && t.rotate !== i.rotate && (i.rotate = t.rotate, s = !0, e.rotated = s), a.scalable && (o(t.scaleX) && t.scaleX !== i.scaleX && (i.scaleX = t.scaleX, l = !0), o(t.scaleY) && t.scaleY !== i.scaleY && (i.scaleY = t.scaleY, l = !0)), s ? e.renderCanvas() : l && e.renderImage(), d = i.width / i.naturalWidth, o(t.x) && (r.left = t.x * d + n.left), o(t.y) && (r.top = t.y * d + n.top), o(t.width) && (r.width = t.width * d), o(t.height) && (r.height = t.height * d), e.setCropBoxData(r)),
            e
        },
        getContainerData: function() {
            var t = this;
            return t.ready ? t.containerData: {}
        },
        getImageData: function() {
            var t = this;
            return t.loaded ? t.imageData: {}
        },
        getCanvasData: function() {
            var t = this,
            e = t.canvasData,
            a = {};
            return t.ready && d(["left", "top", "width", "height", "naturalWidth", "naturalHeight"],
            function(t) {
                a[t] = e[t]
            }),
            a
        },
        setCanvasData: function(t) {
            var e = this,
            a = e.canvasData,
            i = a.aspectRatio;
            return c(t) && (t = t.call(e.element)),
            e.ready && !e.disabled && h(t) && (o(t.left) && (a.left = t.left), o(t.top) && (a.top = t.top), o(t.width) ? (a.width = t.width, a.height = t.width / i) : o(t.height) && (a.height = t.height, a.width = t.height * i), e.renderCanvas(!0)),
            e
        },
        getCropBoxData: function() {
            var t = this,
            e = t.cropBoxData,
            a = void 0;
            return t.ready && t.cropped && (a = {
                left: e.left,
                top: e.top,
                width: e.width,
                height: e.height
            }),
            a || {}
        },
        setCropBoxData: function(t) {
            var e = this,
            a = e.cropBoxData,
            i = e.options.aspectRatio,
            n = void 0,
            r = void 0;
            return c(t) && (t = t.call(e.element)),
            e.ready && e.cropped && !e.disabled && h(t) && (o(t.left) && (a.left = t.left), o(t.top) && (a.top = t.top), o(t.width) && t.width !== a.width && (n = !0, a.width = t.width), o(t.height) && t.height !== a.height && (r = !0, a.height = t.height), i && (n ? a.height = a.width / i: r && (a.width = a.height * i)), e.renderCropBox()),
            e
        },
        getCroppedCanvas: function(t) {
            var e = this;
            if (!e.ready || !window.HTMLCanvasElement) return null;
            if (h(t) || (t = {}), !e.cropped) return A(e.image, e.imageData, t);
            var a = e.getData(),
            i = a.width,
            o = a.height,
            n = i / o,
            r = void 0,
            c = void 0,
            s = void 0;
            h(t) && (r = t.width, c = t.height, r ? (c = r / n, s = r / i) : c && (r = c * n, s = c / o));
            var l = Math.floor(r || i),
            d = Math.floor(c || o),
            p = E("canvas"),
            u = p.getContext("2d");
            p.width = l,
            p.height = d,
            t.fillColor && (u.fillStyle = t.fillColor, u.fillRect(0, 0, l, d));
            var m = function() {
                var n = A(e.image, e.imageData, t),
                r = n.width,
                h = n.height,
                c = e.canvasData,
                l = [n],
                d = a.x + c.naturalWidth * (Math.abs(a.scaleX || 1) - 1) / 2,
                p = a.y + c.naturalHeight * (Math.abs(a.scaleY || 1) - 1) / 2,
                u = void 0,
                m = void 0,
                g = void 0,
                f = void 0,
                v = void 0,
                w = void 0;
                return - i >= d || d > r ? (d = 0, u = 0, g = 0, v = 0) : 0 >= d ? (g = -d, d = 0, u = Math.min(r, i + d), v = u) : r >= d && (g = 0, u = Math.min(i, r - d), v = u),
                0 >= u || -o >= p || p > h ? (p = 0, m = 0, f = 0, w = 0) : 0 >= p ? (f = -p, p = 0, m = Math.min(h, o + p), w = m) : h >= p && (f = 0, m = Math.min(o, h - p), w = m),
                l.push(Math.floor(d), Math.floor(p), Math.floor(u), Math.floor(m)),
                s && (g *= s, f *= s, v *= s, w *= s),
                v > 0 && w > 0 && l.push(Math.floor(g), Math.floor(f), Math.floor(v), Math.floor(w)),
                l
            } ();
            return u.imageSmoothingEnabled = !!t.imageSmoothingEnabled,
            t.imageSmoothingQuality && (u.imageSmoothingQuality = t.imageSmoothingQuality),
            u.drawImage.apply(u, $(m)),
            p
        },
        setAspectRatio: function(t) {
            var e = this,
            a = e.options;
            return e.disabled || n(t) || (a.aspectRatio = Math.max(0, t) || 0 / 0, e.ready && (e.initCropBox(), e.cropped && e.renderCropBox())),
            e
        },
        setDragMode: function(t) {
            var e = this,
            a = e.options,
            i = e.dragBox,
            o = e.face,
            n = void 0,
            r = void 0;
            return e.loaded && !e.disabled && (n = "crop" === t, r = a.movable && "move" === t, t = n || r ? t: "none", y(i, "action", t), w(i, "cropper-crop", n), w(i, "cropper-move", r), a.cropBoxMovable || (y(o, "action", t), w(o, "cropper-crop", n), w(o, "cropper-move", r))),
            e
        }
    },
    Ae = function() {
        function t(t, e) {
            for (var a = 0; a < e.length; a++) {
                var i = e[a];
                i.enumerable = i.enumerable || !1,
                i.configurable = !0,
                "value" in i && (i.writable = !0),
                Object.defineProperty(t, i.key, i)
            }
        }
        return function(e, a, i) {
            return a && t(e.prototype, a),
            i && t(e, i),
            e
        }
    } (), Ie = "cropper", Ue = Ie + "-hidden", je = "error", Pe = "load", qe = "ready", Qe = "crop", $e = /^data:/, Ze = /^data:image\/jpeg;base64,/, Ke = void 0, Ve = function() {
        function t(e, a) {
            K(this, t);
            var i = this;
            i.element = e,
            i.options = p({},
            V, h(a) && a),
            i.loaded = !1,
            i.ready = !1,
            i.complete = !1,
            i.rotated = !1,
            i.cropped = !1,
            i.disabled = !1,
            i.replaced = !1,
            i.limited = !1,
            i.wheeling = !1,
            i.isImg = !1,
            i.originalUrl = "",
            i.canvasData = null,
            i.cropBoxData = null,
            i.previews = null,
            i.pointers = {},
            i.init()
        }
        return Ae(t, [{
            key: "init",
            value: function() {
                var t = this,
                e = t.element,
                a = e.tagName.toLowerCase(),
                i = void 0;
                if (!x(e, Ie)) {
                    if (y(e, Ie, t), "img" === a) {
                        if (t.isImg = !0, i = e.getAttribute("src"), t.originalUrl = i, !i) return;
                        i = e.src
                    } else "canvas" === a && window.HTMLCanvasElement && (i = e.toDataURL());
                    t.load(i)
                }
            }
        },
        {
            key: "load",
            value: function(t) {
                var e = this,
                a = e.options,
                i = e.element;
                if (t) {
                    if (e.url = t, e.imageData = {},
                    !a.checkOrientation || !window.ArrayBuffer) return void e.clone();
                    if ($e.test(t)) return void(Ze.test(t) ? e.read(j(t)) : e.clone());
                    var o = new XMLHttpRequest;
                    o.onerror = function() {
                        e.clone()
                    },
                    o.onload = function() {
                        e.read(o.response)
                    },
                    a.checkCrossOrigin && O(t) && i.crossOrigin && (t = N(t)),
                    o.open("get", t),
                    o.responseType = "arraybuffer",
                    o.withCredentials = "use-credentials" === i.crossOrigin,
                    o.send()
                }
            }
        },
        {
            key: "read",
            value: function(t) {
                var e = this,
                a = e.options,
                i = U(t),
                o = e.imageData,
                n = 0,
                r = 1,
                h = 1;
                if (i > 1) switch (e.url = P(t), i) {
                case 2:
                    r = -1;
                    break;
                case 3:
                    n = -180;
                    break;
                case 4:
                    h = -1;
                    break;
                case 5:
                    n = 90,
                    h = -1;
                    break;
                case 6:
                    n = 90;
                    break;
                case 7:
                    n = 90,
                    r = -1;
                    break;
                case 8:
                    n = -90
                }
                a.rotatable && (o.rotate = n),
                a.scalable && (o.scaleX = r, o.scaleY = h),
                e.clone()
            }
        },
        {
            key: "clone",
            value: function() {
                var t = this,
                e = t.element,
                a = t.url,
                i = void 0,
                o = void 0;
                t.options.checkCrossOrigin && O(a) && (i = e.crossOrigin, i ? o = a: (i = "anonymous", o = N(a))),
                t.crossOrigin = i,
                t.crossOriginUrl = o;
                var n = E("img");
                i && (n.crossOrigin = i),
                n.src = o || a;
                var r = u(t.start, t),
                h = u(t.stop, t);
                t.image = n,
                t.onStart = r,
                t.onStop = h,
                t.isImg ? e.complete ? t.start() : D(e, Pe, r) : (D(n, Pe, r), D(n, je, h), f(n, "cropper-hide"), e.parentNode.insertBefore(n, e.nextSibling))
            }
        },
        {
            key: "start",
            value: function(t) {
                var e = this,
                a = e.isImg ? e.element: e.image;
                t && (C(a, Pe, e.onStart), C(a, je, e.onStop)),
                S(a,
                function(t, a) {
                    p(e.imageData, {
                        naturalWidth: t,
                        naturalHeight: a,
                        aspectRatio: t / a
                    }),
                    e.loaded = !0,
                    e.build()
                })
            }
        },
        {
            key: "stop",
            value: function() {
                var t = this,
                e = t.image;
                C(e, Pe, t.onStart),
                C(e, je, t.onStop),
                X(e),
                t.image = null
            }
        },
        {
            key: "build",
            value: function() {
                var t = this,
                e = t.options,
                a = t.element,
                i = t.image;
                if (t.loaded) {
                    t.ready && t.unbuild();
                    var o = a.parentNode,
                    n = E("div");
                    n.innerHTML = F;
                    var r = W(n, "cropper-container")[0],
                    h = W(r, "cropper-canvas")[0],
                    s = W(r, "cropper-drag-box")[0],
                    l = W(r, "cropper-crop-box")[0],
                    d = W(l, "cropper-face")[0];
                    t.container = o,
                    t.cropper = r,
                    t.canvas = h,
                    t.dragBox = s,
                    t.cropBox = l,
                    t.viewBox = W(r, "cropper-view-box")[0],
                    t.face = d,
                    H(h, i),
                    f(a, Ue),
                    o.insertBefore(r, a.nextSibling),
                    t.isImg || v(i, "cropper-hide"),
                    t.initPreview(),
                    t.bind(),
                    e.aspectRatio = Math.max(0, e.aspectRatio) || 0 / 0,
                    e.viewMode = Math.max(0, Math.min(3, Math.round(e.viewMode))) || 0,
                    t.cropped = e.autoCrop,
                    e.autoCrop ? e.modal && f(s, "cropper-modal") : f(l, Ue),
                    e.guides || f(W(l, "cropper-dashed"), Ue),
                    e.center || f(W(l, "cropper-center"), Ue),
                    e.background && f(r, "cropper-bg"),
                    e.highlight || f(d, "cropper-invisible"),
                    e.cropBoxMovable && (f(d, "cropper-move"), y(d, "action", "all")),
                    e.cropBoxResizable || (f(W(l, "cropper-line"), Ue), f(W(l, "cropper-point"), Ue)),
                    t.setDragMode(e.dragMode),
                    t.render(),
                    t.ready = !0,
                    t.setData(e.data),
                    t.completing = setTimeout(function() {
                        c(e.ready) && D(a, qe, e.ready, !0),
                        B(a, qe),
                        B(a, Qe, t.getData()),
                        t.complete = !0
                    },
                    0)
                }
            }
        },
        {
            key: "unbuild",
            value: function() {
                var t = this;
                t.ready && (t.complete || clearTimeout(t.completing), t.ready = !1, t.complete = !1, t.initialImageData = null, t.initialCanvasData = null, t.initialCropBoxData = null, t.containerData = null, t.canvasData = null, t.cropBoxData = null, t.unbind(), t.resetPreview(), t.previews = null, t.viewBox = null, t.cropBox = null, t.dragBox = null, t.canvas = null, t.container = null, X(t.cropper), t.cropper = null)
            }
        }], [{
            key: "noConflict",
            value: function() {
                return window.Cropper = Ke,
                t
            }
        },
        {
            key: "setDefaults",
            value: function(t) {
                p(V, h(t) && t)
            }
        }]),
        t
    } ();p(Ve.prototype, de), p(Ve.prototype, ue), p(Ve.prototype, ke), p(Ve.prototype, Le), p(Ve.prototype, ze), p(Ve.prototype, Re), "undefined" != typeof window && (Ke = window.Cropper, window.Cropper = Ve), a.exports = Ve
});;
/*!common:widget/js/ui/avatar-uploader/avatar-uploader.js*/
define("common:widget/js/ui/avatar-uploader/avatar-uploader",
function(require, exports, module) {
    var $ = require("common:widget/js/util/tangram/tangram"),
    URI = require("common:widget/js/util/uri/uri"),
    uiBase = require("common:widget/js/ui/base/base"),
    Cropper = require("common:widget/js/ui/crop/crop.min"),
    Dialog = require("common:widget/js/ui/dialog/dialog"),
    Uploader = uiBase().extend({
        init: function(e) {
            var a = this;
            a.cropper = null,
            a.options = $.object.merge({
                uploadUrl: "/submit/ajax/",
                keys: ["image", "middleFile", "smallFile"],
                params: {
                    cm: "100672"
                },
                errorMsg: {
                    errdimension: "\u56fe\u7247\u9ad8\u5bbd\u4e0d\u5408\u6cd5",
                    errsize: "\u56fe\u7247\u5927\u5c0f\u8d85\u8fc71M",
                    errtype: "\u4e0a\u4f20\u56fe\u7247\u7c7b\u578b\u9519\u8bef",
                    errformat: "\u60a8\u4e0a\u4f20\u7684\u56fe\u7247\u683c\u5f0f\u4e0d\u5408\u6cd5",
                    notlogin: "\u5bf9\u4e0d\u8d77\uff01\u60a8\u672a\u767b\u5f55",
                    error: "\u5bf9\u4e0d\u8d77\uff01\u4e0a\u4f20\u51fa\u73b0\u672a\u77e5\u9519\u8bef",
                    errupload: "\u4e0a\u4f20\u51fa\u73b0\u672a\u77e5\u9519\u8bef"
                }
            },
            e, {
                overwrite: !0,
                recursive: !0
            })
        },
        render: function(domClass) {
            var me = this,
            tmpl = [function(_template_object) {
                var _template_fun_array = [],
                fn = function(__data__) {
                    var _template_varName = "";
                    for (var name in __data__) _template_varName += "var " + name + '=__data__["' + name + '"];';
                    eval(_template_varName),
                    _template_fun_array.push('<div class="avatar-crop-wp">    <div class="avatar-crop-selectdiv button-green">\u9009\u62e9\u56fe\u7247</div>    <input type="file" id="avatar-crop-input">    <div class="avatar-crop-imagewp">        <div class="avatar-crop-container"></div>        <div class="avatar-crop-preview" accept="image/*"></div>    </div></div>'),
                    _template_varName = null
                } (_template_object);
                return fn = null,
                _template_fun_array.join("")
            }][0];
            return $(domClass).html(tmpl()),
            me.bindEvent(domClass),
            me
        },
        bindEvent: function(e) {
            var a = this;
            $(e).on("click", ".avatar-crop-selectdiv",
            function() {
                $("#avatar-crop-input").click()
            }).on("change", "#avatar-crop-input",
            function(e) {
                if (this.files[0]) {
                    var r = this.files[0];
                    if (r.size > 1048576 * a.maxSize) return void Dialog.alert("\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7" + a.maxSize + "M\u7684\u9650\u5236\u3002");
                    if ("undefined" == typeof FileReader) {
                        if ($.browser.msie === !0) {
                            var t = e.target.value;
                            a.readImage(t)
                        } else if ($.browser.mozilla === !0) {
                            var t = e.target.files.item(0).getAsDataURL();
                            a.readImage(t)
                        }
                    } else {
                        var r = e.target.files.item(0),
                        i = new FileReader;
                        i.readAsDataURL(r),
                        i.onload = function(e) {
                            var r = e.target.result;
                            a.readImage(r)
                        }
                    }
                }
            })
        },
        readImage: function(e) {
            var a = this,
            r = new Image;
            r.src = e,
            r.onload = function() {
                return this.width < 221 || this.height < 221 ? void Dialog.alert("\u56fe\u7247\u5c3a\u5bf8\u5fc5\u987b\u5927\u4e8e221*221") : void($(".avatar-crop-container #avatar-crop-target").length > 0 ? a.cropper.replace(e) : ($(".avatar-crop-container").html('<img id="avatar-crop-target" src="' + e + '"/>'), a.cropper = new Cropper($(".avatar-crop-container #avatar-crop-target").get(0), {
                    aspectRatio: 1,
                    viewMode: 1,
                    minCropBoxWidth: 10,
                    minCropBoxHeight: 10,
                    ready: function() {
                        var e = this.cloneNode();
                        e.className = "",
                        e.style.cssText = "display: block;width: 100%;min-width: 0;min-height: 0;max-width: none;max-height: none;",
                        $(".avatar-crop-preview").empty().append(e.cloneNode())
                    },
                    crop: function(e) {
                        var a = e.detail,
                        r = this.cropper,
                        t = r.getImageData(),
                        i = a.width / a.height,
                        o = $(".avatar-crop-preview").get(0),
                        n = $(".avatar-crop-preview img").get(0),
                        p = o.offsetWidth,
                        l = p / i,
                        s = a.width / p;
                        o.style.height = l + "px",
                        n.style.width = t.naturalWidth / s + "px",
                        n.style.height = t.naturalHeight / s + "px",
                        n.style.marginLeft = -a.x / s + "px",
                        n.style.marginTop = -a.y / s + "px"
                    }
                })))
            }
        },
        upload: function() {
            var e = this;
            if (!e.cropper) return void Dialog.alert("\u8bf7\u4e0a\u4f20\u56fe\u7247");
            var a = e.cropper.getCroppedCanvas().toDataURL();
            a = a.split(",")[1],
            a = window.atob(a);
            for (var r = new Uint8Array(a.length), t = 0; t < a.length; t++) r[t] = a.charCodeAt(t);
            var i = new Blob([r], {
                type: "image/png"
            }),
            o = new FormData;
            o.append("image", i),
            $.each(e.options.params,
            function(e, a) {
                o.append(e, a)
            });
            var n = new XMLHttpRequest;
            return n.open("POST", e.options.uploadUrl, !0),
            n.withCredentials = !0,
            n.addEventListener("error",
            function() {
                e.fire("error")
            }),
            n.addEventListener("load",
            function() {
                var a = JSON.parse(n.responseText);
                "0" === a.errorNo ? e.fire("uploadComplete", a) : e.fire("error")
            }),
            n.send(o),
            e
        }
    });
    module.exports = Uploader
});;
/*!common:widget/js/ui/birthday/birthday.js*/
define("common:widget/js/ui/birthday/birthday",
function(e, t, a) {
    var n = e("common:widget/lib/jquery/jquery"),
    r = e("common:widget/js/ui/base/base"),
    o = r().extend({
        init: function() {
            var e = this;
            e.startYear = e.startYear || 1970,
            e.defaultWord = e.defaultWord || "\u8bf7\u9009\u62e9",
            e.year = e.defaultValue[0] || null,
            e.month = e.defaultValue[1] || null,
            e.day = e.defaultValue[2] || null,
            n(e.container[1]).hide(),
            n(e.container[2]).hide(),
            e.renderYear(e.startYear)
        },
        renderYear: function() {
            var e = this,
            t = n(e.container[0]),
            a = (new Date).getFullYear(),
            r = e.endYear || a,
            o = e.startYear;
            if (t) {
                if (r && r >= o) {
                    t.empty(),
                    n("<option/>").val("").html(e.defaultWord).appendTo(t);
                    for (var d = r; d >= o; d--) {
                        var i = n("<option/>");
                        i.val(d).html(d + "\u5e74").appendTo(t),
                        e.year && d == e.year && (i.attr("selected", "selected"), n(e.container[1]).show(), e.renderMonth(e.year))
                    }
                }
                t.change(function() {
                    e.year = t.val(),
                    n(e.container[1]).show(),
                    e.renderMonth(e.year),
                    e.month && e.renderDay(e.year, e.month)
                })
            }
        },
        renderMonth: function(e) {
            var t, a = this,
            r = n(a.container[1]),
            o = 1,
            d = new Date,
            e = parseInt(e);
            if (r) {
                t = e && e == d.getFullYear() ? d.getMonth() + 1 : 12,
                e == a.startYear && a.startMonth && (o = a.startMonth),
                a.endYear && e == a.endYear && a.endMonth && (t = a.endMonth),
                r.empty(),
                n("<option/>").val("").html(a.defaultWord).appendTo(r);
                for (var i = o; t >= i; i++) {
                    var l = n("<option/>");
                    l.val(i).html(i + "\u6708").appendTo(r),
                    a.month && i == a.month && (l.attr("selected", "selected"), n(a.container[2]).show(), a.renderDay(a.year, a.month))
                }
                r.change(function() {
                    a.month = r.val(),
                    n(a.container[2]).show(),
                    a.year && a.month && a.renderDay(a.year, a.month)
                })
            }
        },
        renderDay: function(e, t) {
            var a = this,
            r = n(a.container[2]),
            o = 1,
            e = parseInt(e),
            t = parseInt(t),
            d = new Date;
            if (r) {
                if (0 == t) return r.empty(),
                void n("<option/>").val("").html(a.defaultWord).appendTo(r);
                if (t && e && r) {
                    var i = {
                        1 : 1,
                        3 : 1,
                        5 : 1,
                        7 : 1,
                        8 : 1,
                        10 : 1,
                        12 : 1
                    };
                    r.empty(),
                    n("<option/>").val("").html(a.defaultWord).appendTo(r);
                    var l = t.toString() in i ? 31 : 2 == t ? a.isLeapYear(e) ? 29 : 28 : 30;
                    e == d.getFullYear() && t == d.getMonth() + 1 && (l = d.getDate()),
                    a.startMonth && t == a.startMonth && a.startDay && (o = a.startDay),
                    a.endYear && a.endMonth && e == a.endYear && t == a.endMonth && a.endDay && (l = a.endDay);
                    for (var h = o; l >= h; h++) {
                        var s = n("<option/>");
                        s.val(h).html(h + "\u65e5").appendTo(r),
                        a.day && h == a.day && s.attr("selected", "selected")
                    }
                }
            }
        },
        isLeapYear: function(e) {
            var e = parseInt(e);
            return e ? e % 400 == 0 || e % 100 != 0 && e % 4 == 0 : !1
        }
    });
    a.exports = o
});;
/*!common:widget/js/ui/bubblePanel/bubblePanel.js*/
define("common:widget/js/ui/bubblePanel/bubblePanel",
function(t, i, e) {
    function o(t) {
        if (!t) throw new Error("[BubblePanel Exception]: No arguments.");
        if (!l(t.host).length) throw new Error('[BubblePanel Exception]: Invalid argument "host".');
        if (this.host = l(t.host), this.extClassNames = t.classNames || "", this.zIndex = isNaN(t.zIndex) ? 2147483647 : parseInt(t.zIndex), this.marginFromHost = isNaN(t.marginFromHost) ? 0 : parseInt(t.marginFromHost), this.offset = l.extend({
            top: 0,
            left: 0
        },
        this.marginFromHost ? null: t.offset), this.hideWhenBlur = "boolean" == l.type(t.hideWhenBlur) ? t.hideWhenBlur: !0, this.animation = /^FADE|SLIDE$/.test(t.animation) ? t.animation: !1, this.hideAfterDelay = isNaN(t.hideAfterDelay) ? 0 : parseInt(t.hideAfterDelay) + (this.animation ? 200 : 0), this.content = t.content || "", this.onShow = "function" == l.type(t.onShow) ? t.onShow: null, this.onHide = "function" == l.type(t.onHide) ? t.onHide: null, this.isVisible = !1, this.blurProtect = [this.host[0]], t.blurProtect) {
            t.blurProtect = [].concat(t.blurProtect);
            var i = this;
            l(t.blurProtect).each(function(t, e) {
                var o = l(e);
                o.length && i.blurProtect.push(o[0])
            })
        }
        var e = t.pos && t.pos.match(/^auto|(?:(top|right|bottom|left)(?:[- |]?(top|right|bottom|left|center|auto))?)$/i);
        this.pos = e ? (e[1] || e[0]).toLowerCase() : "auto",
        this.align = "auto" == this.pos ? "auto": e && e[2] && e[2] != e[1] ? e[2].toLowerCase() : "center"
    }
    function h(t) {
        var i = l.extend("http://www.w3.org/2000/svg" == this.host[0].namespaceURI ? this.host[0].getBBox() : {
            width: this.host.outerWidth(),
            height: this.host.outerHeight()
        },
        this.host.offset()),
        e = l(document),
        o = l(window);
        l.extend(i, {
            viewTop: i.top - e.scrollTop(),
            viewRight: o.width() - (i.left - e.scrollLeft() + i.width),
            viewBottom: o.height() - (i.top - e.scrollTop() + i.height),
            viewLeft: i.left - e.scrollLeft()
        });
        var h = {
            width: this.node.outerWidth(),
            height: this.node.outerHeight()
        },
        s = l([o.width() * i.viewTop, o.height() * i.viewRight, o.width() * i.viewBottom, o.height() * i.viewLeft]);~this.pos.indexOf("auto") && (this.pos = "auto-" + ["top", "right", "bottom", "left"][s.index(Math.max.apply(null, s))]);
        var n = {},
        a = "SLIDE" == this.animation;
        switch (this.pos.replace(/auto-/, "")) {
        case "top":
            this.aniSlide = {
                direction: "top",
                len: a ? -20 : 0
            },
            n.top = i.top - h.height - this.marginFromHost + (t ? 0 : this.aniSlide.len);
            break;
        case "right":
            this.aniSlide = {
                direction: "left",
                len: a ? 20 : 0
            },
            n.left = i.left + i.width + this.marginFromHost + (t ? 0 : this.aniSlide.len);
            break;
        case "left":
            this.aniSlide = {
                direction: "left",
                len: a ? -20 : 0
            },
            n.left = i.left - h.width - this.marginFromHost + (t ? 0 : this.aniSlide.len);
            break;
        default:
            this.aniSlide = {
                direction: "top",
                len: a ? 20 : 0
            },
            n.top = i.top + i.height + this.marginFromHost + (t ? 0 : this.aniSlide.len)
        }
        switch (~this.align.indexOf("auto") && (this.align = "auto-", this.align += /top|bottom/.test(this.pos) ? ((i.width - h.width) / 2 + i.viewLeft) * ((i.width - h.width) / 2 + i.viewRight) > 0 ? "center": i.viewLeft > i.viewRight ? "right": "left": ((i.height - h.height) / 2 + i.viewTop) * ((i.height - h.height) / 2 + i.viewBottom) > 0 ? "center": i.viewTop > i.viewBottom ? "bottom": "top"), this.align.replace(/auto-/, "")) {
        case "top":
            n.top = i.top;
            break;
        case "right":
            n.left = i.left + i.width - h.width;
            break;
        case "bottom":
            n.top = i.top + i.height - h.height;
            break;
        case "left":
            n.left = i.left;
            break;
        default:
            isNaN(n.left) ? n.left = i.left + (i.width - h.width) / 2 : n.top = i.top + (i.height - h.height) / 2
        }
        this.node.css({
            top: n.top + this.offset.top,
            left: n.left + this.offset.left
        })
    }
    function s(t, i) {
        t && "function" == l.type(t) && t.call(null, i)
    }
    function n(t) {
        o.call(this, t),
        this.node = l('<div class="bubblePanel"></div>').html(this.content).addClass(this.extClassNames).css({
            zIndex: this.zIndex
        }).appendTo(l("body")).hide(),
        this.blurProtect.push(this.node[0]);
        var i = this;
        this.hideWhenBlur && l("body").on("click.bubblePanel",
        function(t) {
            var e = !1;
            l.each(i.blurProtect,
            function(i, o) {
                try {
                    if (t.target == o || l.contains(o, t.target)) return e = !0,
                    !1
                } catch(h) {}
            }),
            !e && i.hide()
        }),
        l(window).on("resize.bubblePanel",
        function() {
            i.resetPos()
        }).on("scroll.bubblePanel",
        function() {
            i.resetPos()
        })
    }
    var l = t("common:widget/lib/jquery/jquery");
    n.prototype = {
        constructor: n,
        setHost: function(t) {
            return l(t).length ? (this.blurProtect.splice(l.inArray(this.host[0], this.blurProtect), 1), this.host = l(t), this.blurProtect.push(this.host[0]), this) : void 0
        },
        setContent: function(t) {
            return this.content = t,
            this.node.html(this.content),
            this
        },
        resetPos: function() {
            return this.isVisible && h.call(this, !0),
            this
        },
        getNode: function() {
            return this.node
        },
        show: function(t) {
            if (!this.isVisible) {
                var i = this;
                if (this.isVisible = !0, this.node.show(), h.call(i), i.animation) {
                    var e = {
                        opacity: 1
                    };
                    e[i.aniSlide.direction] = "-=" + i.aniSlide.len,
                    i.node.css("opacity", 0).animate(e, {
                        duration: 200,
                        queue: !1,
                        complete: function() {
                            i.node.show(),
                            s(t),
                            s(i.onShow)
                        }
                    })
                } else s(t),
                s(i.onShow);
                return clearTimeout(i.hideDelayTimer),
                i.hideAfterDelay && (i.hideDelayTimer = setTimeout(function() {
                    i.hide()
                },
                i.hideAfterDelay)),
                this
            }
            h.call(this, !0)
        },
        hide: function(t) {
            if (this.isVisible) {
                var i = this;
                if (this.isVisible = !1, this.animation) {
                    var e = {
                        opacity: 0
                    };
                    e[this.aniSlide.direction] = "+=" + this.aniSlide.len,
                    this.node.animate(e, {
                        duration: 200,
                        queue: !1,
                        complete: function() {
                            i.node.hide(),
                            s(t),
                            s(i.onHide)
                        }
                    })
                } else this.node.hide(),
                s(t),
                s(this.onHide);
                return this
            }
        }
    },
    e.exports = n
});;
/*!common:widget/js/ui/carousel/carousel.js*/
define("common:widget/js/ui/carousel/carousel",
function(i, t, e) {
    var s = i("common:widget/lib/jquery/jquery"),
    n = i("common:widget/js/ui/base/base"),
    a = n().extend({
        init: function(i) {
            this.options = s.extend({
                interval: 3e3,
                duration: 1e3,
                items: [],
                viewSize: 1,
                direction: "horizontal",
                serviceItem: ""
            },
            i),
            this.paused = null,
            this.sliding = null,
            this.interval = null,
            this.activeIndex = 0,
            this.lastActiveIndex = this.options.items.length
        },
        render: function(i) {
            var t = this;
            if (t.$inner = s("<div/>").addClass("carousel-inner"), s(t.options.items).each(function(i) {
                s("<div/>").addClass("item").html(this).appendTo(t.$inner).attr("index", i)
            }), t.$items = t.$inner.children(), t.$active = t.$items.slice(0, t.options.viewSize).addClass("active"), t.$misc = s("<div/>").addClass("carousel-misc"), t.options.indicators) {
                for (var e = s("<ol/>").addClass("carousel-indicators").appendTo(t.$misc), n = 0; n < t.$items.size(); n++) s("<li/>").attr("data-slide-to", n).appendTo(e);
                e.children().slice(0, t.options.viewSize).addClass("active").first().addClass("first")
            }
            t.$indicators = t.$misc.find(".carousel-indicators li"),
            t.options.controls && (s("<a/>").addClass("carousel-control carousel-control-left").prependTo(t.$misc), s("<a/>").addClass("carousel-control carousel-control-right").appendTo(t.$misc)),
            t.target = s(i).append(t.$inner).append(t.$misc).addClass("carousel"),
            t.initStyle(),
            t.bindEvents(),
            t.cycle()
        },
        setup: function(i) {
            this.target = s(i),
            this.target.size() || (this.target = s("#" + i)),
            this.target.addClass("carousel"),
            this.$inner = this.target.find(".carousel-inner"),
            this.$items = this.$inner.children(),
            this.$active = this.target.find(".item.active"),
            this.$active.size() || (this.$active = this.$items.slice(0, this.options.viewSize).addClass("active")),
            this.$misc = this.target.find(".carousel-misc"),
            this.$indicators = this.target.find(".carousel-indicators li"),
            this.initStyle(),
            this.bindEvents(),
            this.cycle()
        },
        initStyle: function() {
            var i = this,
            t = "horizontal" == i.options.direction ? "width": "height",
            e = "horizontal" == i.options.direction ? "left": "top",
            n = "horizontal" == i.options.direction ? "top": "left";
            i.$items.css(t, 100 / i.options.viewSize + "%").css(n, "0").slice(0, i.options.viewSize).each(function(t, n) {
                s(n).css(e, 100 * t / i.options.viewSize + "%")
            })
        },
        bindEvents: function() {
            var i = this;
            i.target.on("mouseenter", s.proxy(i.pause, i)).on("mouseleave", s.proxy(i.cycle, i)).on("click", ".carousel-control-left",
            function(t) {
                t.preventDefault(),
                i.prev()
            }).on("click", ".carousel-control-right",
            function(t) {
                t.preventDefault(),
                i.next()
            }).on("click", ".carousel-indicators li",
            function(t) {
                t.preventDefault(),
                i.to(s(t.currentTarget).data("slide-to"))
            })
        },
        cycle: function(i) {
            return i && (this.paused = !1),
            this.interval && clearInterval(this.interval),
            this.options.interval && !this.paused && (this.interval = setInterval(s.proxy(this.next, this), this.options.interval)),
            this
        },
        pause: function(i) {
            return i && (this.paused = !0),
            this.interval = clearInterval(this.interval),
            this
        },
        setActiveItems: function() {
            var i = this.activeIndex;
            this.$items.removeClass("active"),
            this.$active = [],
            this.$indicators.removeClass("active");
            for (var t = 0; t < this.options.viewSize; t++) {
                var e = (i + t) % this.$items.size();
                this.$active.push(this.$items.get(e)),
                this.$indicators.eq(e).addClass("active")
            }
            return s(this.$active).addClass("active"),
            this.$active
        },
        to: function(i) {
            var t = this,
            e = t.activeIndex;
            return i > t.$items.length - 1 || 0 > i ? void 0 : t.sliding ? t.once("slid",
            function() {
                t.to(i)
            }) : e == i ? t.pause().cycle() : t.slide(i > e ? "next": "prev", i)
        },
        prev: function() {
            return this.sliding ? void 0 : this.slide("prev")
        },
        next: function() {
            return this.sliding ? void 0 : this.slide("next")
        },
        getActiveIndex: function() {
            return this.activeIndex
        },
        isSliding: function() {
            return this.sliding
        },
        getLastActiveIndex: function() {
            return this.lastActiveIndex
        },
        slide: function(i, t) {
            var e = this,
            n = e.setActiveItems(),
            a = "horizontal" == e.options.direction ? "left": "top",
            o = e.activeIndex + ("next" == i ? e.options.viewSize: -1);
            o = (e.$items.size() + o) % e.$items.size();
            var r = s(n["next" == i ? 0 : e.options.viewSize - 1]),
            c = e.$items.eq(o);
            if ("experts" == e.options.serviceItem) {
                var o = c.attr("index"),
                l = e.$items.size();
                if ("next" == i && 0 == o) return ! 1;
                if ("prev" == i && o == l - 1) return ! 1
            }
            if (e.sliding = !0, e.interval && e.pause(), !c.hasClass("active")) {
                e.fire("slide", {
                    relatedTarget: c[0],
                    direction: i,
                    index: o
                }),
                c.css(a, "next" == i ? "100%": -100 / e.options.viewSize + "%").addClass("active"),
                e.lastActiveIndex = e.activeIndex;
                var d = [];
                s.each(n,
                function(t) {
                    var n = "next" == i ? -1 : 1,
                    o = {};
                    o[a] = 100 * (t + n) / e.options.viewSize + "%",
                    d.push(s(this).animate(o, e.duration))
                });
                var v = {};
                return v[a] = "prev" == i ? 0 : 100 - 100 / e.options.viewSize + "%",
                d.push(c.animate(v, e.duration)),
                s.when.apply(s, d).done(function() {
                    r.removeClass("active"),
                    e.activeIndex = (e.$items.size() + e.activeIndex + ("next" == i ? 1 : -1)) % e.$items.size(),
                    e.setActiveItems(),
                    e.sliding = !1,
                    "undefined" != typeof t && t != e.activeIndex ? e.slide(i, t) : setTimeout(function() {
                        e.fire("slid")
                    },
                    0)
                }),
                !e.paused && e.cycle(),
                e
            }
        }
    });
    e.exports = a
});;
/*!common:widget/js/ui/combobox/combobox.js*/
define("common:widget/js/ui/combobox/combobox",
function(t, e, i) {
    var n = t("common:widget/lib/jquery/jquery"),
    o = t("common:widget/js/ui/base/base");
    t("common:widget/lib/jquery.ui/jquery.ui.autocomplete");
    var a = o().extend({
        init: function(t) {
            this.target = n(t.target),
            this.width = parseInt(t.width) || 120,
            this.wrapper = n("<span/>").addClass("ik-combobox").insertAfter(this.target),
            t.skin && this.wrapper.addClass(t.skin),
            this.target.hide(),
            this.render()
        },
        render: function() {
            {
                var t = this,
                e = this.target.children(":selected");
                e.val() ? e.text() : ""
            }
            this.input = n("<input/>").css("width", "1px").appendTo(this.wrapper).val(e.text()).attr("title", "").prop("readonly", !0).addClass("ik-combobox-input").autocomplete({
                delay: 0,
                minLength: 0,
                source: n.proxy(this, "_source")
            }).on("autocompleteopen",
            function(e, i) {
                t.fire("open", {
                    event: e,
                    ui: i
                })
            }).on("autocompleteclose",
            function(e, i) {
                t.fire("close", {
                    event: e,
                    ui: i
                })
            }).on("autocompleteselect",
            function(e, i) {
                i.item.option.selected = !0,
                t.target.trigger("change"),
                t.fire("select", e, {
                    item: i.item.option
                })
            }).on("click",
            function() {
                n(this).next().trigger("click")
            });
            var i = !1;
            this.toggle = n("<a/>").attr("tabIndex", -1).addClass("ik-combobox-toggle").appendTo(this.wrapper).mousedown(function() {
                i = t.input.autocomplete("widget").is(":visible")
            }).click(function() {
                t.input.focus(),
                i || t.input.autocomplete("search", "")
            }),
            this.instance = this.input.data("ui-autocomplete"),
            this.input.width(this.width - this.wrapper.outerWidth());
            var o = this.instance.menu.element.addClass("ik-combobox-menu");
            o.css("min-width", this.wrapper.outerWidth() - 1 - parseInt(o.css("padding-left")) - parseInt(o.css("padding-right")) - parseInt(o.css("border-left-width")) - parseInt(o.css("border-right-width")) + "px"),
            t.target.on("change",
            function() {
                t.input.val(t.getText())
            })
        },
        getText: function() {
            return this.target.children(":selected").text()
        },
        getValue: function() {
            return this.target.children(":selected").val()
        },
        setByValue: function(t) {
            var e = this,
            i = e.target.find('[value="' + t + '"]').text();
            e.input.data("ui-autocomplete")._value(i),
            e.input.data("ui-autocomplete")._change()
        },
        _source: function(t, e) {
            e(this.target.children("option").map(function() {
                var t = n(this).text();
                return {
                    label: t,
                    value: t,
                    option: this
                }
            }))
        }
    });
    i.exports = a
});;
/*!common:widget/js/ui/countword/countword.js*/
define("common:widget/js/ui/countword/countword",
function(r, t, a) {
    var s = r("common:widget/js/util/tangram/tangram"),
    n = r("common:widget/js/ui/base/base"),
    o = n(function(r) {
        var t = {
            min: 0,
            max: 50
        };
        s.object.extend(t, r);
        var a = this;
        if (this.id = t.id || this.guid, this.target = t.target || s(s.isString(t.id) ? "#" + t.id: t.id), this.error = this.target.next("span.count"), t.show && (a.show = t.show), 0 == s(this.error).size()) {
            var n = null;
            n = "pgc" == t.mold ? s.string("<span class='count'>\u60a8\u8fd8\u53ef\u4ee5\u8f93\u5165<b>#{max}</b>\u5b57</span>").format({
                max: t.max
            }) : s.string("<span class='count'><b>0</b>/#{max}</span>").format({
                max: t.max
            }),
            this.target.after(n),
            this.error = this.target.next("span.count")
        }
        this._change = function() {
            var r = s.string(a.target.val()).trim(),
            n = Math.ceil(s.string(r).getByteLength() / 2);
            n >= t.max ? (a.target.val(s.string(r).subByte(2 * t.max)), a.error.show(), a.show({
                isError: !0,
                num: t.max,
                max: t.max
            })) : "pgc" == t.mold ? t.max - n <= 300 ? (a.error.show(), a.show({
                isError: !1,
                num: n,
                max: t.max
            })) : (a.error.hide(), a.show({
                isError: !1,
                num: n,
                max: t.max
            })) : a.show({
                isError: !1,
                num: n,
                max: t.max
            })
        },
        this.target.on("keydown", a._change).on("keyup", a._change).on("focus", a._change).on("change", a._change)
    }).extend({
        show: function(r) {
            var t = this,
            a = t.error.find("b");
            r.isError ? a.addClass("error") : a.removeClass("error"),
            a.html(r.num)
        }
    });
    a.exports = o
});;
/*!common:widget/js/util/num2chinese/num2chinese.js*/
define("common:widget/js/util/num2chinese/num2chinese",
function(n, e, t) {
    t.exports = function(n) {
        for (var e = n.toString(), t = parseInt(e.split("").reverse().join(""), 10), i = ["", "\u5341", "\u767e", "\u5343", "\u4e07"], o = ["\u96f6", "\u4e00", "\u4e8c", "\u4e09", "\u56db", "\u4e94", "\u516d", "\u4e03", "\u516b", "\u4e5d", "\u5341"], r = e.length, s = "", u = t.toString().length, c = 0; u > c; c++) s += 0 == c && 2 == r && t % 10 == 1 ? "": o[t % 10],
        s += t % 10 == 0 ? "": i[r - c - 1],
        t = Math.floor(t / 10);
        return s
    }
});;
/*!common:widget/js/util/tangram/timeFormater.js*/
define("common:widget/js/util/tangram/timeFormater",
function(e, t) {
    function r(e, t, r) {
        switch (r) {
        case "zh":
            return i(e + 1) + "\u6708";
        case "en":
            return ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][e].substr(0, t ? 3 : void 0);
        default:
            return ""
        }
    }
    function n(e, t, r) {
        switch (r) {
        case "zh":
            return (t ? "\u5468": "\u661f\u671f") + (e ? i(e) : "\u65e5");
        case "en":
            return ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][e].substr(0, t ? 3 : void 0);
        default:
            return ""
        }
    }
    function a(e, t) {
        switch (t) {
        case "zh":
            return i(e) + "\u65e5";
        case "en":
            return e + (4 > e % 10 && 1 != Math.floor(e / 10) ? ["th", "st", "nd", "rd"][e % 10] : "th");
        default:
            return ""
        }
    }
    var u = e("common:widget/js/util/tangram/number").pad,
    i = e("common:widget/js/util/num2chinese/num2chinese");
    t.build = function(e) {
        var t;
        switch (typeof e) {
        case "number":
            t = new Date(parseInt(e));
            break;
        case "string":
            if (Number(e)) t = arguments.callee(parseInt(e));
            else {
                e = e.replace(/-/g, "/").replace("/+d+/", "");
                var r = e.match(/^(.+?)\.(\d+)$/);
                t = new Date(r && r[2] ? +new Date(r[1]) + parseInt(r[2]) : e)
            }
            break;
        default:
            t = e instanceof Date ? e: new Date
        }
        if ("Invalid Date" == t) throw new Error("[TimeFormater Exception]: Invalid Date!");
        return t
    },
    t.format = function(e, t, i) {
        e = this.build(e),
        t = t || "yyyy/MM/dd HH:mm:ss",
        i = /^(zh|en)$/i.test(i || (navigator.browserLanguage || navigator.language).substr(0, 2)) ? RegExp.$1.toLowerCase() : "en";
        var o = {
            "h+": e.getHours() > 12 ? e.getHours() - 12 : e.getHours(),
            "H+": e.getHours(),
            "m+": e.getMinutes(),
            "s+": e.getSeconds()
        };
        for (var s in o) t = t.replace(new RegExp(s, "g"),
        function(e) {
            return u(o[s], Math.min(2, e.length))
        });
        return t = t.replace(/f+/g,
        function(t) {
            return u(e.getMilliseconds(), 3).substr(0, Math.min(t.length, 3))
        }),
        t = t.replace(/y+/g,
        function(t) {
            return t.length < 3 ? u(e.getFullYear() % 1e3, Math.min(t.length, 2)) : u(e.getFullYear(), t.length)
        }),
        t = t.replace(/M+/g,
        function(t) {
            return t.length < 3 ? u(e.getMonth() + 1, t.length) : r(e.getMonth(), 3 == t.length, i)
        }),
        t = t.replace(/d+/g,
        function(t) {
            return t.length < 3 ? u(e.getDate(), t.length) : a(e.getDate(), i)
        }),
        t = t.replace(/w+/g,
        function(t) {
            return n(e.getDay(), t.length < 2, i)
        })
    },
    t.timeSpan = function(e, t, r) {
        var n = r;
        e = this.build(e),
        t = this.build(t),
        r = r || "d\u5929h\u5c0f\u65f6m\u5206s\u79d2f\u6beb\u79d2";
        for (var a = Math.abs(t.getTime() - e.getTime()), i = [{
            pattern: /d+/g,
            rate: 864e5
        },
        {
            pattern: /h+/g,
            rate: 36e5
        },
        {
            pattern: /m+/g,
            rate: 6e4
        },
        {
            pattern: /s+/g,
            rate: 1e3
        },
        {
            pattern: /f+/g,
            rate: 1
        }], o = 0; o < i.length; ++o) {
            i[o].value = a;
            for (var s = 0; o > s; ++s) r.match(i[s].pattern) && (i[o].value -= i[s].value * i[s].rate);
            i[o].value = Math.floor(i[o].value / i[o].rate)
        }
        for (var o = 0; o < i.length; ++o) r = r.replace(i[o].pattern,
        function(e) {
            var t = Math.min(e.length, 0 == o ? 1 / 0 : 4 == o ? 3 : 2);
            return u(i[o].value, t)
        });
        return r = n ? r: r.replace(/(\d+)(?:\u5929|\u5c0f\u65f6|\u5206|\u79d2|\u6beb\u79d2)/g,
        function(e, t) {
            return Number(t) ? e: ""
        }),
        (t >= e ? "": "-") + r
    },
    t.timeDiff = function(e, t) {
        if (null == e || "undefined" == typeof e) throw new Error("[TimeFormater Exception]: Invalid arguments!");
        return this.timeSpan(0, e, t)
    },
    t.startEnd = function(e, t, r, n, a, u) {
        return e = this.build(e),
        t = this.build(t),
        a = (null == a || "undefined" == typeof a ? "-": a).toString(),
        r = r || "yyyy/MM/dd HH:mm:ss",
        n = n || r,
        this.format(e, r, u) + a + this.format(t, n, u)
    }
});;
/*!common:widget/js/ui/datePicker/datePicker.js*/
define("common:widget/js/ui/datePicker/datePicker",
function(e, t, a) {
    function s(e) {
        e = e || this.selectedDate,
        this.curYear = e.getFullYear(),
        this.curMonth = e.getMonth(),
        this.curDate = e.getDate()
    }
    function i() {
        var e = {
            headerText: m.format(this.selectedDate, "yyyy\u5e74M\u6708"),
            bodyContent: n.call(this),
            footerText: m.format(this.today, "yyyy\u5e74M\u6708d\u65e5 ")
        };
        return b.render(e)
    }
    function n() {
        for (var e = new Date(this.curYear, this.curMonth, 1, 0, 0, 0, 0), t = e.getDay() || 7, a = 42 - t, s = [], i = -t; a > i; ++i) {
            var n = new Date(e.getTime() + 24 * i * 3600 * 1e3);
            s.push({
                color: n.getDay() % 6 ? "": " holiday",
                disabled: n.getMonth() != e.getMonth() ? " disabled": "",
                selected: n.getTime() == this.selectedDate.getTime() ? " selected": "",
                now: n.getTime() == this.today.getTime() ? " now": "",
                value: n.getDate()
            })
        }
        return w.render({
            dData: s
        })
    }
    function r(e) {
        for (var t = [], a = 0; 12 > a; ++a) t.push({
            selected: (e ? a == this.curMonth: this.curYear == this.selectedDate.getFullYear() && a == this.selectedDate.getMonth()) ? " selected": "",
            now: this.curYear == this.today.getFullYear() && a == this.today.getMonth() ? " now": ""
        });
        return D.render({
            mData: t
        })
    }
    function l(e) {
        for (var t = this.curYear - this.curYear % 10,
        a = [], s = -1; 10 >= s; ++s) a.push({
            disabled: (s + 1) % 11 ? "": " disabled",
            selected: t + s == (e ? this.curYear: this.selectedDate.getFullYear()) ? " selected": "",
            now: t + s == this.today.getFullYear() ? " now": "",
            value: t + s
        });
        return g.render({
            yData: a
        })
    }
    function o(e, t) {
        var a = this.bubblePanel.getNode(),
        s = v(".headerContent", a),
        i = v(".calendarBody .aniBox", a);
        s.attr("evt-data", "type=" + e),
        v(".leftBtn", a).attr("evt-data", "type=" + e + "&method=REDUCE"),
        v(".rightBtn", a).attr("evt-data", "type=" + e + "&method=INCREASE");
        var o, c = v(".new", i).removeClass("new").addClass("old"),
        h = c.outerWidth();
        switch (e) {
        case "YEAR":
            s.removeAttr("evt-action").addClass("disabled").html(this.curYear - this.curYear % 10 + "-" + (this.curYear - this.curYear % 10 + 9)),
            i.css("left", "slideRight" == t ? -h: 0),
            o = v(l.call(this, "shrink" == t ? !0 : !1)),
            i[/slideLeft|expand/.test(t) ? "append": "prepend"](o);
            break;
        case "MONTH":
            s.attr("evt-action", "headerContent").removeClass("disabled").html(this.curYear + "\u5e74"),
            i.css("left", "slideRight" == t ? -h: 0),
            o = v(r.call(this, "shrink" == t ? !0 : !1)),
            i[/slideLeft|expand/.test(t) ? "append": "prepend"](o);
            break;
        case "DATE":
            s.attr("evt-action", "headerContent").removeClass("disabled").html(this.curYear + "\u5e74" + (this.curMonth + 1) + "\u6708"),
            i.css("left", "slideRight" == t ? -h: 0),
            o = v(n.call(this)),
            i[/slideLeft|expand/.test(t) ? "append": "prepend"](o)
        }
        switch (t) {
        case "slideRight":
            i.animate({
                left:
                0
            },
            300,
            function() {
                c.remove()
            });
            break;
        case "slideLeft":
            i.animate({
                left:
                -h
            },
            300,
            function() {
                c.remove(),
                i.css("left", 0)
            });
            break;
        case "shrink":
        case "expand":
            v(".pageBlock", i).css({
                position: "absolute",
                left: 0,
                top: 0
            });
            var d = v("shrink" == t ? v(".big", o).not(".disabled")["MONTH" == e ? this.curMonth: this.curYear % 10] : v(".big", c).not(".disabled")["MONTH" == e ? this.curYear % 10 : this.curMonth]),
            p = d.position(),
            m = {
                width: d.outerWidth(),
                height: d.outerHeight()
            },
            f = {
                width: c.outerWidth(),
                height: c.outerHeight()
            },
            y = {
                x: f.width / m.width,
                y: f.height / m.height
            },
            b = {
                x: p.left + m.width / 2,
                y: p.top + m.height / 2
            },
            g = {
                translateX: b.x - f.width / 2,
                translateY: b.y - f.height / 2,
                innerScaleX: 1 - 1 / y.x,
                innerScaleY: 1 - 1 / y.y,
                outerScaleX: y.x - 1,
                outerScaleY: y.y - 1
            };
            "shrink" == t ? (u.call(o, "transform-origin", b.x + "px " + b.y + "px"), u.call(o, "transform", "scale(" + y.x + "," + y.y + ")"), c.animate({
                opacity: 0
            },
            {
                duration: 300,
                step: function(e) {
                    u.call(o, "transform", "scale(" + (1 + e * g.outerScaleX) + "," + (1 + e * g.outerScaleY) + ")"),
                    e = 1 - e,
                    u.call(c, "transform", "translate(" + e * g.translateX + "px," + e * g.translateY + "px)scale(" + (1 - e * g.innerScaleX) + "," + (1 - e * g.innerScaleY) + ")")
                },
                complete: function() {
                    c.remove(),
                    o.removeAttr("style")
                }
            })) : (u.call(c, "transform-origin", b.x + "px " + b.y + "px"), u.call(o, "transform", "translate(" + g.translateX + "px," + g.translateY + "px)scale(" + 1 / y.x + "," + 1 / y.y + ")"), o.css("opacity", 0), o.animate({
                opacity: 1
            },
            {
                duration: 300,
                step: function(e) {
                    c.css("opacity", 1 - e),
                    u.call(c, "transform", "scale(" + (1 + e * g.outerScaleX) + "," + (1 + e * g.outerScaleY) + ")"),
                    e = 1 - e,
                    u.call(o, "transform", "translate(" + e * g.translateX + "px," + e * g.translateY + "px)scale(" + (1 - e * g.innerScaleX) + "," + (1 - e * g.innerScaleY) + ")")
                },
                complete: function() {
                    c.remove(),
                    o.removeAttr("style")
                }
            }))
        }
    }
    function c() {
        this.hide(),
        d(this.onSelect, this.selectedDate),
        this.hostAutoFill && this.host.val(m.format(this.selectedDate, this.datePattern))
    }
    function h() {
        var e = this.bubblePanel.getNode(),
        t = this;
        this.host.on("focus",
        function() {
            t.show()
        }),
        e.on("click.datePicker", '[evt-action="headerContent"]',
        function() {
            var e = v.url.queryToJson(v(this).attr("evt-data"));
            switch (e.type) {
            case "MONTH":
                o.call(t, "YEAR", "shrink");
                break;
            case "DATE":
                o.call(t, "MONTH", "shrink")
            }
        }),
        e.on("click.datePicker", '[evt-action="headerSwitch"]',
        function() {
            var e = v.url.queryToJson(v(this).attr("evt-data")),
            a = new Date(t.curYear, t.curMonth, 1, 0, 0, 0, 0);
            switch (e.type) {
            case "YEAR":
                a.setYear(a.getFullYear() + ("REDUCE" == e.method ? -10 : 10));
                break;
            case "MONTH":
                a.setYear(a.getFullYear() + ("REDUCE" == e.method ? -1 : 1));
                break;
            case "DATE":
                a.setMonth(a.getMonth() + ("REDUCE" == e.method ? -1 : 1))
            }
            s.call(t, a),
            o.call(t, e.type, "REDUCE" == e.method ? "slideRight": "slideLeft")
        }),
        e.on("click.datePicker", '[evt-action="pickUp"]',
        function(e) {
            var a = v.url.queryToJson(v(this).attr("evt-data"));
            switch (e.stopPropagation(), a.type) {
            case "YEAR":
                t.curYear = parseInt(a.value),
                o.call(t, "MONTH", "expand");
                break;
            case "MONTH":
                t.curMonth = parseInt(a.value),
                o.call(t, "DATE", "expand");
                break;
            case "DATE":
                t.curDate = parseInt(a.value),
                t.selectedDate = new Date(t.curYear, t.curMonth, t.curDate, 0, 0, 0, 0),
                c.call(t);
                break;
            case "TODAY":
                t.selectedDate = new Date(t.today.setHours(0, 0, 0, 0)),
                c.call(t)
            }
        })
    }
    function d(e, t) {
        e && "function" == v.type(e) && e.call(null, t)
    }
    function u(e, t) {
        this.css("-webkit-" + e, t),
        this.css("-moz-" + e, t),
        this.css("-o-" + e, t),
        this.css("-ms-" + e, t),
        this.css(e, t)
    }
    function p(e) {
        if (!e) throw new Error("[DatePicker Exception]: No arguments.");
        this.host = v(e.host),
        this.hostAutoFill = "boolean" == v.type(e.hostAutoFill) ? e.hostAutoFill: !0,
        this.datePattern = e.datePattern || "yyyy-MM-dd",
        this.today = m.build(e.today) || new Date,
        this.today.setHours(0, 0, 0, 0),
        this.onSelect = "function" == v.type(e.onSelect) ? e.onSelect: null,
        this.bubblePanel = new f({
            host: this.host,
            pos: e.pos,
            zIndex: e.zIndex,
            marginFromHost: e.marginFromHost,
            offset: e.offset,
            hideWhenBlur: e.hideWhenBlur,
            blurProtect: e.blurProtect,
            animation: e.animation,
            onShow: e.onShow,
            onHide: e.onHide
        }),
        h.call(this)
    }
    var v = e("common:widget/lib/jquery/jquery"),
    m = e("common:widget/js/util/tangram/timeFormater"),
    f = e("common:widget/js/ui/bubblePanel/bubblePanel"),
    y = e("common:widget/lib/juicer/juicer"),
    b = y('<div class="calendarPanel"><div class="calendarHeader"><a href="javascript:;" class="leftBtn" evt-action="headerSwitch" evt-data="type=DATE&method=REDUCE"><em></em></a><a href="javascript:;" class="headerContent" evt-action="headerContent" evt-data="type=DATE">$${headerText}</a><a href="javascript:;" class="rightBtn" evt-action="headerSwitch" evt-data="type=DATE&method=INCREASE"><em></em></a></div><div class="calendarBody"><div class="aniBox">$${bodyContent}</div></div><div class="calendarFooter" evt-action="pickUp" evt-data="type=TODAY" title="\u9009\u62e9\u4eca\u65e5"><a href="javascript:;">\u4eca\u65e5\uff1a$${footerText}</a></div></div>'),
    g = y('<div class="pageBlock new">{@each yData as item}<a href="javascript:;" class="big$${item.disabled}$${item.selected}$${item.now}"{@if !item.disabled} evt-action="pickUp" evt-data="type=YEAR&value=$${item.value}"{@/if}>$${item.value}</a>{@/each}</div>'),
    D = y('<div class="pageBlock new">{@each mData as item, i}<a href="javascript:;" class="big$${item.selected}$${item.now}" evt-action="pickUp" evt-data="type=MONTH&value=$${i}">$${parseInt(i) + 1}\u6708</a>{@/each}</div>'),
    w = y('<div class="pageBlock new"><div class="week"><span class="holiday">\u65e5</span><span>\u4e00</span><span>\u4e8c</span><span>\u4e09</span><span>\u56db</span><span>\u4e94</span><span class="holiday">\u516d</span></div><div class="day">{@each dData as item}<a href="javascript:;" class="small$${item.color}$${item.disabled}$${item.selected}$${item.now}" evt-action="$${item.disabled ? "" : "pickUp"}" evt-data="type=DATE&value=$${item.value}">$${item.value}</a>{@/each}</div></div>');
    p.prototype = {
        constructor: p,
        getDate: function() {
            return this.selectedDate || this.today || (new Date).setHours(0, 0, 0, 0)
        },
        show: function(e) {
            try {
                this.selectedDate = m.build(e || this.hostAutoFill && this.host.val() || this.today || new Date)
            } catch(t) {
                this.selectedDate = this.today || new Date
            } (isNaN(this.selectedDate) || "Invalid Date" == this.selectedDate.toString()) && (this.selectedDate = new Date),
            this.selectedDate.setHours(0, 0, 0, 0),
            s.call(this),
            this.bubblePanel.setContent(i.call(this));
            var a = this;
            this.bubblePanel.show(function() {
                a.hostAutoFill && a.host.val(m.format(a.selectedDate, a.datePattern))
            })
        },
        hide: function() {
            this.bubblePanel.hide()
        }
    },
    a.exports = p
});;
/*!common:widget/js/ui/lazyload/lazyload.js*/
define("common:widget/js/ui/lazyload/lazyload",
function(a) {
    var o = a("common:widget/lib/jquery/jquery");
    o.fn.lazyload = function(a) {
        function t() {
            i.each(function() {
                o(window).scrollTop() + o(window).height() > o(this).offset().top - e.threshold && o(this).trigger("appear")
            })
        }
        var e = o.extend({
            threshold: 100,
            effect: "show",
            appear: null,
            load: null
        },
        a),
        i = this;
        return this.each(function() {
            var t = o(this);
            t.one("appear",
            function() {
                if (this.loaded = !0, !e.appear || e.appear.call(this, a) !== !1) {
                    if (t.data("img")) {
                        var n = "IMG" == this.tagName.toUpperCase() ? t: o("<img />");
                        n.on("load",
                        function() {
                            "IMG" != t.prop("tagName").toUpperCase() && n.appendTo(t),
                            n.hide()[e.effect](),
                            e.load && e.load.call(this, a)
                        }),
                        n.attr("src", t.data("img"))
                    }
                    i = o(o.grep(i,
                    function(a) {
                        return ! a.loaded
                    }))
                }
            })
        }),
        o(function() {
            t()
        }),
        o(window).on("resize scroll",
        function() {
            t()
        }),
        this
    }
});;
/*!common:widget/js/ui/pager/pagerBase.js*/
define("common:widget/js/ui/pager/pagerBase",
function(t, n, e) {
    function o(t, n) {
        if (!u(n.pContainer)) throw new Error('[pagerBase Exception]: Invalid argument "pContainer".');
        if (!n.conTotalCount || isNaN(n.conTotalCount) || Number(n.conTotalCount) < 1) throw new Error('[pagerBase Exception]: Invalid argument "conTotalCount".');
        if (n.onIndexChange && "function" != typeof n.onIndexChange) throw new Error('[pagerBase Exception]: Invalid argument "onIndexChange".');
        t.conTotalCount = parseInt(n.conTotalCount) || 0,
        t.pContainer = u("string" == typeof n.pContainer ? "#" + n.pContainer: n.pContainer),
        t.conPerPage = parseInt(n.conPerPage) || t.conTotalCount,
        t.pTotalCount = Math.ceil(t.conTotalCount / t.conPerPage) || 0,
        t.pMaxCount = parseInt(n.pMaxCount) || t.pTotalCount,
        t.pCount = Math.min(n.pMaxCount, t.pTotalCount),
        t.activeIndex = parseInt(n.activeIndex) || 1,
        t.stopEvt = "boolean" == typeof n.stopEvt ? n.stopEvt: !1
    }
    function a(t, n, e) {
        return {
            type: t,
            index: n,
            state: e
        }
    }
    function i(t, n) {
        n.push(a("active", t.activeIndex, "disabled"))
    }
    function p(t) {
        if (isNaN(parseInt(t.activeIndex)) || t.activeIndex < 1 || t.activeIndex > t.pTotalCount) throw new Error("[pagerBase Exception]: Invalid activeIndex.");
        var n, e;
        switch (t.pCount) {
        case 1:
            n = e = t.activeIndex;
            break;
        case 2:
            n = t.activeIndex == t.pTotalCount ? t.pTotalCount - 1 : t.activeIndex,
            e = n + 1;
            break;
        default:
            n = t.activeIndex - Math.ceil((t.pCount - 2) / 2) + 1,
            2 > n ? n = 2 : n > t.pTotalCount - t.pCount + 2 && (n = t.pTotalCount - t.pCount > 0 ? t.pTotalCount - t.pCount + 2 : 2),
            e = n + t.pCount - 3 < t.pTotalCount ? n + t.pCount - 3 : t.pTotalCount - 1
        }
        var o = [];
        o.push(a.apply(null, 1 == t.activeIndex ? ["previous", 1, "disabled"] : ["previous", t.activeIndex - 1, "normal"])),
        t.pCount > 2 && (1 == t.activeIndex ? i(t, o) : o.push(a("normal", 1, "normal"))),
        (n > 2 || t.pCount < 3 && n > 1) && o.push(a("ellipsis", void 0, "disabled"));
        for (var p = n; e >= p; ++p) t.activeIndex == p ? i(t, o) : o.push(a("normal", p, "normal"));
        return (t.pTotalCount - e > 1 || t.pCount < 3 && t.pTotalCount > e) && o.push(a("ellipsis", void 0, "disabled")),
        t.pCount > 2 && t.pTotalCount > 1 && (t.activeIndex == t.pTotalCount ? i(t, o) : o.push(a("normal", t.pTotalCount, "normal"))),
        o.push(a.apply(null, t.activeIndex == t.pTotalCount ? ["next", t.pTotalCount, "disabled"] : ["next", t.activeIndex + 1, "normal"])),
        {
            activeIndex: t.activeIndex,
            previous: o.shift(),
            next: o.pop(),
            others: o
        }
    }
    function r(t) {
        var n = this;
        t && (o(this, t), u(this.pContainer).unbind("click.pagerBase").on("click.pagerBase", "[pagerIndex]",
        function(t) {
            n.activeIndex = parseInt(u(this).attr("pagerIndex")),
            n.stopEvt && u.stopPropagation(),
            n.onIndexChange && n.onIndexChange(p(n), t)
        }))
    }
    var u = t("common:widget/lib/jquery/jquery");
    r.prototype = {
        constructor: r,
        getPagers: function(t) {
            return this.activeIndex = "undefined" == typeof t ? this.activeIndex: t,
            p(this)
        },
        getActiveIndex: function() {
            return this.activeIndex
        },
        getPagerTotalCount: function() {
            return this.pTotalCount
        },
        baseReset: function(t) {
            if (!t) throw new Error("[pagerBase Exception]: Invalid reset arguments.");
            t.pContainer = this.pContainer,
            t.conTotalCount = "undefined" == typeof t.conTotalCount ? this.conTotalCount: t.conTotalCount,
            t.conPerPage = "undefined" == typeof t.conPerPage ? this.conPerPage: t.conPerPage,
            t.pMaxCount = "undefined" == typeof t.pMaxCount ? this.pMaxCount: t.pMaxCount,
            t.activeIndex = "undefined" == typeof t.activeIndex ? this.activeIndex: t.activeIndex,
            t.stopEvt = "boolean" == typeof t.stopEvt ? t.stopEvt: this.stopEvt,
            t.onIndexChange = t.onIndexChange || this.onIndexChange,
            o(this, t),
            this.activeIndex = Math.min(this.activeIndex, this.pTotalCount)
        },
        baseDestroy: function() {
            u(this.pContainer).off("click.pagerBase")
        }
    },
    e.exports = r
});;
/*!common:widget/js/ui/pager/normalPager.js*/
define("common:widget/js/ui/pager/normalPager",
function(e, t, n) {
    function a(e) {
        if (!e) throw new Error("[normalPager Exception]: No arguments.");
        if (e.onIndexChange && "function" != typeof e.onIndexChange) throw new Error('[normalPager Exception]: Invalid argument "onIndexChange".');
        this.showSinglePage = "boolean" == typeof e.showSinglePage ? e.showSinglePage: !0,
        this.autoRefresh = "boolean" == typeof e.autoRefresh ? e.autoRefresh: !0,
        this.template = s(e.template || r);
        var t = this;
        this.onIndexChange = function(n, a) {
            t.autoRefresh && t.show(),
            e.onIndexChange && e.onIndexChange(t.activeIndex, a)
        }
    }
    function o(e) {
        a.call(this, e),
        i.call(this, e),
        this.show = function(e) {
            var t = this;
            setTimeout(function() {
                1 != t.pTotalCount || t.showSinglePage ? (t.pContainer.show(), t.pContainer.html(t.template.render(t.getPagers(e)))) : t.hide()
            },
            0)
        },
        this.hide = function() {
            this.pContainer.hide()
        },
        this.getHTML = function(e) {
            return 1 != this.pTotalCount || this.showSinglePage ? this.template.render(this.getPagers(e)) : ""
        },
        this.reset = function(e) {
            var t = this;
            if (!e) throw new Error("[normalPager Exception]: Invalid reset arguments.");
            if (e.onIndexChange && "function" != typeof e.onIndexChange) throw new Error('[normalPager Exception]: Invalid reset argument "onIndexChange".');
            e.pContainer = this.pContainer,
            e.conTotalCount = "undefined" == typeof e.conTotalCount ? this.conTotalCount: e.conTotalCount,
            e.conPerPage = "undefined" == typeof e.conPerPage ? this.conPerPage: e.conPerPage,
            e.pMaxCount = "undefined" == typeof e.pMaxCount ? this.pMaxCount: e.pMaxCount,
            e.activeIndex = "undefined" == typeof e.activeIndex ? this.activeIndex: e.activeIndex,
            e.showSinglePage = "undefined" == typeof e.showSinglePage ? this.showSinglePage: "boolean" == typeof e.showSinglePage ? e.showSinglePage: !0,
            e.stopEvt = "boolean" == typeof e.stopEvt ? e.stopEvt: this.stopEvt,
            e.autoRefresh = "boolean" == typeof e.autoRefresh ? e.autoRefresh: this.autoRefresh,
            this.template = e.template || this.template,
            this.onIndexChange = e.onIndexChange ?
            function(n, a) {
                obj.autoRefresh && obj.show(),
                e.onIndexChange && e.onIndexChange(t.activeIndex, a)
            }: this.onIndexChange,
            this.baseReset(e),
            this.autoRefresh && this.show()
        },
        this.destroy = function() {
            this.pContainer.empty(),
            this.baseDestroy()
        }
    }
    var i = (e("common:widget/lib/jquery/jquery"), e("common:widget/js/ui/pager/pagerBase")),
    s = e("common:widget/lib/juicer/juicer"),
    r = '<a href="javascript:;" class="pTag prev{@if previous.state == "disabled"} disabled{@/if}"{@if previous.state != "disabled"} pagerIndex="$${previous.index}"{@/if}>\u4e0a\u4e00\u9875</a>{@each others as item}{@if item.type == "active"}<a href="javascript:;" class="pTag cur">$${item.index}</a>{@else if item.type == "ellipsis"}<span class="ellipsis">...</span>{@else}<a href="javascript:;" class="pTag" pagerIndex="$${item.index}">$${item.index}</a>{@/if}{@/each}<a href="javascript:;" class="pTag next{@if next.state == "disabled"} disabled{@/if}"{@if next.state != "disabled"} pagerIndex="$${next.index}"{@/if}>\u4e0b\u4e00\u9875</a>';
    o.prototype = new i,
    n.exports = o
});;
/*!common:widget/js/ui/pager/pager.js*/
define("common:widget/js/ui/pager/pager",
function(e, t, a) {
    var r = e("common:widget/js/util/tangram/tangram"),
    i = e("common:widget/js/ui/base/base");
    a.exports = new i(function() {
        var e = this;
        e.currentPage = 1,
        e.totalPage = 1,
        e.viewSize = 10,
        e.currentPagePos = 4,
        e.labelFirst = "\u9996\u9875",
        e.labelPrev = "\u4e0a\u4e00\u9875",
        e.labelNext = "\u4e0b\u4e00\u9875",
        e.labelLast = "\u5c3e\u9875",
        e.ellipsis = !1,
        e.tplURL = "##{pageNum}",
        e.tplLabelNormal = "#{pageNum}",
        e.tplLabelCurrent = "#{pageNum}",
        e.tplEllipsis = '<span class="pager-more">...</span>',
        e.currentPage = Math.max(e.currentPage, 1)
    }).extend({
        _init: function(e) {
            var t = this;
            r.each(e,
            function(e, a) {
                r.isFunction(a) ? t.on(e, a) : t[e] = a
            })
        },
        _toHTMLString: function() {
            function e(e, a, i) {
                return i ? r.string.format('<a href="' + t.tplURL + '" data-index="#{pageNum}" class="pager-' + a + '">' + i + "</a>", {
                    pageNum: e
                }) : ""
            }
            if (this.totalPage < 2) return "";
            var t = this,
            a = ['<div class="pager' + (t.ellipsis ? " pager-ellipsis": "") + '">'],
            i = t.totalPage < t.viewSize || t.currentPage <= t.currentPagePos ? 1 : Math.min(t.currentPage - t.currentPagePos, t.totalPage - t.viewSize + 1);
            t.ellipsis && 1 == i && t.currentPage > 1 && (i = 2);
            var n = Math.min(t.totalPage, i + t.viewSize - 1),
            l = t.currentPage > 1 ? "": " disabled";
            t.ellipsis && n == t.totalPage && t.currentPage < t.totalPage && (n = t.totalPage - 1, i = Math.max(1, n - t.viewSize + 1));
            var s = [e(1, "first" + (t.ellipsis && 1 == i && t.currentPage > 1 ? " disabled": l), t.labelFirst), e(t.currentPage - 1, "pre" + l, t.labelPrev)];
            t.ellipsis && (s = [s[1], s[0]], i > 2 && s.push(t.tplEllipsis)),
            a = a.concat(s);
            for (var g = i; n >= g; g++) a.push(g == t.currentPage ? '<b class="pager-current">' + r.string.format(t.tplLabelCurrent, {
                pageNum: g
            }) + "</b>": e(g, "normal", t.tplLabelNormal));
            return l = t.currentPage < t.totalPage ? "": " disabled",
            s = [e(parseInt(t.currentPage) + 1, "next" + l, t.labelNext), e(t.totalPage, "last" + l, t.labelLast)],
            t.ellipsis && (s = [s[1], s[0]], n < t.totalPage - 1 && s.unshift(t.tplEllipsis)),
            a = a.concat(s),
            a.push("</div>"),
            a.join("")
        },
        init: function() {
            this.render().fire("load");
            var e = this,
            t = r(e.target);
            t.size() && "render" != e.status && (e.status = "render", t.delegate("a[data-index]", "click",
            function(t) {
                e.currentPage = r(this).data("index"),
                e.fire("pagechange", {
                    event: t,
                    target: this
                })
            }))
        },
        render: function(e) {
            e && this._init(e); {
                var t = this;
                r(t.target).html(t._toHTMLString())
            }
            return t
        }
    })
});;
/*!common:widget/js/util/add-stylesheets/add-stylesheets.js*/
define("common:widget/js/util/add-stylesheets/add-stylesheets",
function(e, t, s) {
    var n = e("common:widget/lib/jquery/jquery");
    s.exports = function(e) {
        if ("object" == n.type(e) && !n.isEmptyObject(e)) {
            var t = ["\n"];
            for (var s in e) t.push(s, "{", e[s], "}\n");
            if (document.createStyleSheet) document.createStyleSheet().cssText = t.join("");
            else {
                var o = n('<style type="text/css"></style>');
                o.append(t.join("")).appendTo(n("head")[0])
            }
        }
    }
});;
/*!common:widget/js/ui/pie/pie.js*/
define("common:widget/js/ui/pie/pie",
function(t, e, a) {
    function r(t) {
        this.args = i.extend({
            pieR: 100,
            slices: [{
                percent: 1
            }]
        },
        t),
        i.each(this.args.slices,
        function(t, e) {
            e.angle = 360 * (e.percent || 0)
        }),
        i.extend(this.args, {
            pieR: parseInt(this.args.pieR),
            donutR: parseInt(Math.min(this.args.pieR, this.args.donutR || 0)),
            rotation: this.args.rotation || 0,
            flip: "boolean" == i.type(this.args.flip) ? this.args.flip: !1,
            strokeWidth: this.args.strokeWidth || 0,
            animation: i.browser.chrome ? this.args.animation: !1
        }),
        i.extend(this.args, {
            outerR: this.args.pieR + this.args.strokeWidth,
            innerR: Math.max(this.args.donutR - this.args.strokeWidth, 0)
        }),
        this.args.boxWidth = this.args.boxHeight = 2 * this.args.outerR
    }
    function s(t) {
        var e = ["E32322", "EA621F", "F18E1C", "FDC60B", "F4E500", "8CBB26", "008E5B", "0696BB", "2A71B0", "444E99", "6D398B", "C4037D"];
        return "#" + e[t % e.length]
    }
    function o(t) {
        r.call(this, t),
        this.graphEngine = i.browser.ie < 9 ? "vml": "svg";
        var e = this;
        this.getPie = {
            svg: function() {
                var t = g.svg.createElement("svg").attr({
                    width: e.args.boxWidth,
                    height: e.args.boxHeight,
                    "class": "pie"
                });
                e.args.animation && (t.on("load",
                function() {
                    o.animate.call(e)
                }), e.clipPath = g.svg.createElement("path").attr("d", g.svg.getSectorPath(0, 0, e.args.outerR, 0)), t.append(g.svg.createElement("defs").append(g.svg.createElement("clipPath").attr("id", "pieAnimateClip").append(e.clipPath))));
                var a = g.svg.createElement("g").attr({
                    transform: "translate(" + e.args.boxWidth / 2 + "," + e.args.boxHeight / 2 + ")scale(" + (e.args.flip ? "-1": "1") + ",1)rotate(" + e.args.rotation + ")",
                    "clip-path": e.args.animation ? "url(#pieAnimateClip)": ""
                }).appendTo(t),
                r = 0;
                return i.each(e.args.slices,
                function(t, o) {
                    g.svg.createElement("path").attr({
                        d: g.svg.getSectorPath(r, o.angle, e.args.pieR, e.args.donutR)
                    }).css({
                        fill: o.color || s(t),
                        stroke: e.args.strokeColor || o.color || s(t),
                        strokeWidth: e.args.strokeColor ? e.args.strokeWidth || 1 : 0
                    }).appendTo(a),
                    r += o.angle
                }),
                e.args.totalAngle = r,
                t
            },
            vml: function() {
                var t = g.vml.createElement("group").attr({
                    coordsize: e.args.boxWidth + "," + e.args.boxHeight,
                    coordorigin: -e.args.boxWidth / 2 + "," + -e.args.boxHeight / 2,
                    "class": "pie"
                }).css({
                    width: e.args.boxWidth,
                    height: e.args.boxHeight,
                    position: "relative",
                    rotation: e.args.rotation + "deg",
                    flip: e.args.flip ? "x": ""
                }),
                a = 0;
                return i.each(e.args.slices,
                function(r, o) {
                    g.vml.createElement("shape").attr({
                        path: g.vml.getSectorPath(a, o.angle, e.args.pieR, e.args.donutR),
                        coordsize: e.args.boxWidth + "," + e.args.boxHeight,
                        coordorigin: "0,0",
                        fillcolor: o.color || s(r),
                        stroked: e.args.strokeColor ? !0 : !1,
                        strokecolor: e.args.strokeColor || o.color || s(r),
                        strokeweight: e.args.strokeColor ? e.args.strokeWidth || 1 : 0
                    }).css({
                        width: e.args.boxWidth,
                        height: e.args.boxHeight,
                        position: "absolute"
                    }).appendTo(t),
                    a += o.angle
                }),
                t
            }
        }
    }
    var i = t("common:widget/js/util/tangram/tangram"),
    n = t("common:widget/js/util/add-stylesheets/add-stylesheets");
    i.browser.ie < 9 && !document.namespaces.v && (document.namespaces.add("v", "urn:schemas-microsoft-com:vml"), n({
        "v\\:shape,v\\:group": "behavior:url(#default#VML);display:inline-block"
    }));
    var g = {
        svg: {
            createElement: function(t) {
                return i(document.createElementNS("http://www.w3.org/2000/svg", t))
            },
            getSectorPath: function(t, e, a, r) {
                t = t * Math.PI / 180,
                e = e * Math.PI / 180;
                var s = {
                    cos: Math.cos(t),
                    sin: Math.sin(t)
                },
                o = {
                    cos: Math.cos(t + e),
                    sin: Math.sin(t + e)
                };
                return ["M", r * s.cos, r * s.sin, "L", a * s.cos, a * s.sin, "A", a, a, 0, Math.abs(e) > Math.PI ? 1 : 0, 1, a * o.cos, a * o.sin, "L", r * o.cos, r * o.sin, "A", r, r, 0, Math.abs(e) > Math.PI ? 1 : 0, 0, r * s.cos, r * s.sin].join(" ")
            }
        },
        vml: {
            createElement: function(t) {
                return i(document.createElement("<v:" + t + "/>"))
            },
            getSectorPath: function(t, e, a, r) {
                var s = t * Math.PI / 180,
                o = {
                    cos: Math.cos(s),
                    sin: Math.sin(s)
                };
                return t = Math.round(t * Math.pow(2, 16)),
                e = Math.round(e * Math.pow(2, 16)),
                ["m", Math.round(r * o.cos), Math.round(r * o.sin), "l", Math.round(a * o.cos), Math.round(a * o.sin), "ae", 0, 0, a, a, -t, -e, "ae", 0, 0, r, r, -t - e, e, "xe"].join(" ")
            }
        }
    };
    o.animate = function() {
        var t = this,
        e = t.args.animation;
        i({
            aniStep: 0
        }).animate({
            aniStep: 1
        },
        i.extend(!0, {},
        e, {
            step: function(a) {
                t.clipPath.attr("d", g.svg.getSectorPath(0, a * t.args.totalAngle, t.args.outerR, 0)),
                "function" == i.type(e.step) && e.step(a)
            },
            complete: function() {
                t.clipPath.parent().remove(),
                "function" == i.type(e.complete) && e.complete()
            }
        }))
    },
    o.prototype = {
        constructor: o,
        getHTML: function() {
            var t = this.getNode();
            return "vml" == this.graphEngine ? t.html() : (new XMLSerializer).serializeToString(t[0])
        },
        getNode: function() {
            return this.getPie[this.graphEngine]()
        }
    },
    a.exports = o
});;
/*!common:widget/js/ui/pop-tip/pop-tip.js*/
define("common:widget/js/ui/pop-tip/pop-tip",
function(o, t, e) {
    {
        var i = o("common:widget/js/util/tangram/tangram");
        o("common:widget/js/util/event/event")
    }
    e.exports = function(o, t) {
        var e = i.extend({},
        t);
        i("#pop-layer-box").remove();
        var p = i("<div />").prop({
            id: "pop-layer-box"
        }).addClass("pop-layer-box").html(o).appendTo(document.body),
        a = i(window).height() / 2 + i(window).scrollTop() - 100,
        n = (i(window).width() - p.width() - 60) / 2;
        a = a > 50 ? a: 50,
        n = n > 400 ? n: 400,
        p.css({
            left: n + "px",
            top: a + "px",
            opacity: 0
        }),
        p.animate({
            top: a - 25,
            opacity: 1
        },
        200),
        setTimeout(function() {
            p.animate({
                top: a,
                opacity: 0
            },
            200,
            function() {
                p.remove(),
                e.callback && e.callback()
            })
        },
        2e3)
    }
});;
/*!common:widget/js/ui/prof-star/prof-star.js*/
define("common:widget/js/ui/prof-star/prof-star",
function(t, r, a) {
    var e = t("common:widget/lib/jquery/jquery"),
    o = function(t) {
        if (t.target) {
            var r = t.starW || 25,
            a = t.starG || 15,
            o = parseInt(t.rate || 0),
            i = o / 100 * 5 * r,
            s = i / r;
            e(t.target).css("width", i + Math.floor(s) * a + "px")
        }
    };
    a.exports = o
});;
/*!common:widget/js/ui/suggestion-new/suggestion-new.js*/
define("common:widget/js/ui/suggestion-new/suggestion-new",
function(e, t, i) {
    var n = e("common:widget/js/util/tangram/tangram"),
    o = (e("common:widget/lib/jquery.ui/jquery.ui.autocomplete"), e("common:widget/js/ui/base/base")),
    a = {};
    baidu = "undefined" == typeof baidu ? {}: baidu,
    i.exports = o(function() {
        this.target = ""
    }).extend({
        init: function() {
            var e = this;
            e.fire("beforeinit"),
            e.target && !e.checkDisabled() && n(e.target).keyup(function(t) {
                t.keyCode >= 37 && t.keyCode <= 40 || e.getData()
            }).on("paste",
            function() {
                setTimeout(function() {
                    e.getData()
                },
                20)
            })
        },
        checkDisabled: function() {
            return ! 1
        },
        getData: function() {
            var e = this,
            t = e.checkDisabled(),
            i = n.trim(n(e.target).val()),
            o = e.url || "https://gsp0.baidu.com/8qUZeT8a2gU2pMbgoY3K/su?wd=#word#&prod=zhidao";
            t || "" == i || (a[e.guid] = a[e.guid] || {},
            a[e.guid][escape(i)] ? n(e.target).autocomplete({
                source: a[e.guid][escape(i)],
                minLength: 0,
                create: function(t) {
                    e.fire("create", t)
                },
                open: function(t) {
                    e.fire("open", t)
                },
                select: function(t, i) {
                    e.fire("select", i)
                },
                close: function(t) {
                    e.fire("close", t)
                }
            }).autocomplete("search", "") : (baidu.sug = function(t) {
                e.fire("dataloaded", t),
                a[e.guid][escape(i)] = t.s,
                e.getData()
            },
            n.getScript(o.replace("#word#", encodeURIComponent(i)))))
        }
    })
});;
/*!common:widget/js/ui/suggestion/suggestion.js*/
define("common:widget/js/ui/suggestion/suggestion",
function(e, t, i) {
    var n = e("common:widget/js/util/tangram/tangram"),
    o = (e("common:widget/lib/jquery.ui/jquery.ui.autocomplete"), e("common:widget/js/ui/base/base")),
    a = {};
    baidu = "undefined" == typeof baidu ? {}: baidu,
    i.exports = o(function() {
        this.target = ""
    }).extend({
        init: function() {
            var e = this;
            e.fire("beforeinit"),
            e.target && !e.checkDisabled() && n(e.target).keyup(function(t) {
                t.keyCode >= 37 && t.keyCode <= 40 || e.getData()
            }).on("paste",
            function() {
                setTimeout(function() {
                    e.getData()
                },
                20)
            })
        },
        checkDisabled: function() {
            return ! 1
        },
        getData: function() {
            var e = this,
            t = e.checkDisabled(),
            i = n.trim(n(e.target).val()),
            o = e.url || "https://gsp0.baidu.com/8qUZeT8a2gU2pMbgoY3K/su?wd=#word#&prod=zhidao";
            t || "" == i || (a[e.guid] = a[e.guid] || {},
            a[e.guid][escape(i)] ? n(e.target).autocomplete({
                source: a[e.guid][escape(i)],
                minLength: 0,
                create: function(t) {
                    e.fire("create", t)
                },
                open: function(t) {
                    e.fire("open", t)
                },
                select: function(t, i) {
                    e.fire("select", i)
                }
            }).autocomplete("search", "") : (baidu.sug = function(t) {
                e.fire("dataloaded", t),
                a[e.guid][escape(i)] = t.s,
                e.getData()
            },
            n.getScript(o.replace("#word#", encodeURIComponent(i)))))
        }
    })
});;
/*!common:widget/js/util/webuploader/webuploader.js*/
define("common:widget/js/util/webuploader/webuploader",
function(e) {
    var t = e("common:widget/lib/jquery/jquery");
    return function(e, n) {
        var r = {},
        i = function(e, t) {
            var n, r, i;
            if ("string" == typeof e) return s(e);
            for (n = [], r = e.length, i = 0; r > i; i++) n.push(s(e[i]));
            return t.apply(null, n)
        },
        o = function(e, t, n) {
            2 === arguments.length && (n = t, t = null),
            i(t || [],
            function() {
                a(e, n, arguments)
            })
        },
        a = function(e, t, n) {
            var o, a = {
                exports: t
            };
            "function" == typeof t && (n.length || (n = [i, a.exports, a]), o = t.apply(null, n), void 0 !== o && (a.exports = o)),
            r[e] = a.exports
        },
        s = function(t) {
            var n = r[t] || e[t];
            if (!n) throw new Error("`" + t + "` is undefined");
            return n
        },
        u = function(e) {
            var t, n, i, o, a, s;
            s = function(e) {
                return e && e.charAt(0).toUpperCase() + e.substr(1)
            };
            for (t in r) if (n = e, r.hasOwnProperty(t)) {
                for (i = t.split("/"), a = s(i.pop()); o = s(i.shift());) n[o] = n[o] || {},
                n = n[o];
                n[a] = r[t]
            }
            return e
        },
        c = function(t) {
            return e.__dollar = t,
            u(n(e, o, i))
        };
        return c(t)
    } (window,
    function(e, t, n) {
        t("dollar-third", [],
        function() {
            var t = e.__dollar || e.jQuery || e.Zepto;
            if (!t) throw new Error("jQuery or Zepto not found!");
            return t
        }),
        t("dollar", ["dollar-third"],
        function(e) {
            return e
        }),
        t("promise-third", ["dollar"],
        function(e) {
            return {
                Deferred: e.Deferred,
                when: e.when,
                isPromise: function(e) {
                    return e && "function" == typeof e.then
                }
            }
        }),
        t("promise", ["promise-third"],
        function(e) {
            return e
        }),
        t("base", ["dollar", "promise"],
        function(t, n) {
            function r(e) {
                return function() {
                    return s.apply(e, arguments)
                }
            }
            function i(e, t) {
                return function() {
                    return e.apply(t, arguments)
                }
            }
            function o(e) {
                var t;
                return Object.create ? Object.create(e) : (t = function() {},
                t.prototype = e, new t)
            }
            var a = function() {},
            s = Function.call;
            return {
                version: "0.1.5",
                $: t,
                Deferred: n.Deferred,
                isPromise: n.isPromise,
                when: n.when,
                browser: function(e) {
                    var t = {},
                    n = e.match(/WebKit\/([\d.]+)/),
                    r = e.match(/Chrome\/([\d.]+)/) || e.match(/CriOS\/([\d.]+)/),
                    i = e.match(/MSIE\s([\d\.]+)/) || e.match(/(?:trident)(?:.*rv:([\w.]+))?/i),
                    o = e.match(/Firefox\/([\d.]+)/),
                    a = e.match(/Safari\/([\d.]+)/),
                    s = e.match(/OPR\/([\d.]+)/);
                    return n && (t.webkit = parseFloat(n[1])),
                    r && (t.chrome = parseFloat(r[1])),
                    i && (t.ie = parseFloat(i[1])),
                    o && (t.firefox = parseFloat(o[1])),
                    a && (t.safari = parseFloat(a[1])),
                    s && (t.opera = parseFloat(s[1])),
                    t
                } (navigator.userAgent),
                os: function(e) {
                    var t = {},
                    n = e.match(/(?:Android);?[\s\/]+([\d.]+)?/),
                    r = e.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);
                    return n && (t.android = parseFloat(n[1])),
                    r && (t.ios = parseFloat(r[1].replace(/_/g, "."))),
                    t
                } (navigator.userAgent),
                inherits: function(e, n, r) {
                    var i;
                    return "function" == typeof n ? (i = n, n = null) : i = n && n.hasOwnProperty("constructor") ? n.constructor: function() {
                        return e.apply(this, arguments)
                    },
                    t.extend(!0, i, e, r || {}),
                    i.__super__ = e.prototype,
                    i.prototype = o(e.prototype),
                    n && t.extend(!0, i.prototype, n),
                    i
                },
                noop: a,
                bindFn: i,
                log: function() {
                    return e.console ? i(console.log, console) : a
                } (),
                nextTick: function() {
                    return function(e) {
                        setTimeout(e, 1)
                    }
                } (),
                slice: r([].slice),
                guid: function() {
                    var e = 0;
                    return function(t) {
                        for (var n = ( + new Date).toString(32), r = 0; 5 > r; r++) n += Math.floor(65535 * Math.random()).toString(32);
                        return (t || "wu_") + n + (e++).toString(32)
                    }
                } (),
                formatSize: function(e, t, n) {
                    var r;
                    for (n = n || ["B", "K", "M", "G", "TB"]; (r = n.shift()) && e > 1024;) e /= 1024;
                    return ("B" === r ? e: e.toFixed(t || 2)) + r
                }
            }
        }),
        t("mediator", ["base"],
        function(e) {
            function t(e, t, n, r) {
                return o.grep(e,
                function(e) {
                    return ! (!e || t && e.e !== t || n && e.cb !== n && e.cb._cb !== n || r && e.ctx !== r)
                })
            }
            function n(e, t, n) {
                o.each((e || "").split(s),
                function(e, r) {
                    n(r, t)
                })
            }
            function r(e, t) {
                for (var n, r = !1,
                i = -1,
                o = e.length; ++i < o;) if (n = e[i], n.cb.apply(n.ctx2, t) === !1) {
                    r = !0;
                    break
                }
                return ! r
            }
            var i, o = e.$,
            a = [].slice,
            s = /\s+/;
            return i = {
                on: function(e, t, r) {
                    var i, o = this;
                    return t ? (i = this._events || (this._events = []), n(e, t,
                    function(e, t) {
                        var n = {
                            e: e
                        };
                        n.cb = t,
                        n.ctx = r,
                        n.ctx2 = r || o,
                        n.id = i.length,
                        i.push(n)
                    }), this) : this
                },
                once: function(e, t, r) {
                    var i = this;
                    return t ? (n(e, t,
                    function(e, t) {
                        var n = function() {
                            return i.off(e, n),
                            t.apply(r || i, arguments)
                        };
                        n._cb = t,
                        i.on(e, n, r)
                    }), i) : i
                },
                off: function(e, r, i) {
                    var a = this._events;
                    return a ? e || r || i ? (n(e, r,
                    function(e, n) {
                        o.each(t(a, e, n, i),
                        function() {
                            delete a[this.id]
                        })
                    }), this) : (this._events = [], this) : this
                },
                trigger: function(e) {
                    var n, i, o;
                    return this._events && e ? (n = a.call(arguments, 1), i = t(this._events, e), o = t(this._events, "all"), r(i, n) && r(o, arguments)) : this
                }
            },
            o.extend({
                installTo: function(e) {
                    return o.extend(e, i)
                }
            },
            i)
        }),
        t("uploader", ["base", "mediator"],
        function(e, t) {
            function n(e) {
                this.options = r.extend(!0, {},
                n.options, e),
                this._init(this.options)
            }
            var r = e.$;
            return n.options = {},
            t.installTo(n.prototype),
            r.each({
                upload: "start-upload",
                stop: "stop-upload",
                getFile: "get-file",
                getFiles: "get-files",
                addFile: "add-file",
                addFiles: "add-file",
                sort: "sort-files",
                removeFile: "remove-file",
                cancelFile: "cancel-file",
                skipFile: "skip-file",
                retry: "retry",
                isInProgress: "is-in-progress",
                makeThumb: "make-thumb",
                md5File: "md5-file",
                getDimension: "get-dimension",
                addButton: "add-btn",
                predictRuntimeType: "predict-runtime-type",
                refresh: "refresh",
                disable: "disable",
                enable: "enable",
                reset: "reset"
            },
            function(e, t) {
                n.prototype[e] = function() {
                    return this.request(t, arguments)
                }
            }),
            r.extend(n.prototype, {
                state: "pending",
                _init: function(e) {
                    var t = this;
                    t.request("init", e,
                    function() {
                        t.state = "ready",
                        t.trigger("ready")
                    })
                },
                option: function(e, t) {
                    var n = this.options;
                    return arguments.length > 1 ? void(r.isPlainObject(t) && r.isPlainObject(n[e]) ? r.extend(n[e], t) : n[e] = t) : e ? n[e] : n
                },
                getStats: function() {
                    var e = this.request("get-stats");
                    return e ? {
                        successNum: e.numOfSuccess,
                        progressNum: e.numOfProgress,
                        cancelNum: e.numOfCancel,
                        invalidNum: e.numOfInvalid,
                        uploadFailNum: e.numOfUploadFailed,
                        queueNum: e.numOfQueue,
                        interruptNum: e.numofInterrupt
                    }: {}
                },
                trigger: function(e) {
                    var n = [].slice.call(arguments, 1),
                    i = this.options,
                    o = "on" + e.substring(0, 1).toUpperCase() + e.substring(1);
                    return t.trigger.apply(this, arguments) === !1 || r.isFunction(i[o]) && i[o].apply(this, n) === !1 || r.isFunction(this[o]) && this[o].apply(this, n) === !1 || t.trigger.apply(t, [this, e].concat(n)) === !1 ? !1 : !0
                },
                destroy: function() {
                    this.request("destroy", arguments),
                    this.off()
                },
                request: e.noop
            }),
            e.create = n.create = function(e) {
                return new n(e)
            },
            e.Uploader = n,
            n
        }),
        t("runtime/runtime", ["base", "mediator"],
        function(e, t) {
            function n(t) {
                this.options = r.extend({
                    container: document.body
                },
                t),
                this.uid = e.guid("rt_")
            }
            var r = e.$,
            i = {},
            o = function(e) {
                for (var t in e) if (e.hasOwnProperty(t)) return t;
                return null
            };
            return r.extend(n.prototype, {
                getContainer: function() {
                    var e, t, n = this.options;
                    return this._container ? this._container: (e = r(n.container || document.body), t = r(document.createElement("div")), t.attr("id", "rt_" + this.uid), t.css({
                        position: "absolute",
                        top: "0px",
                        left: "0px",
                        width: "1px",
                        height: "1px",
                        overflow: "hidden"
                    }), e.append(t), e.addClass("webuploader-container"), this._container = t, this._parent = e, t)
                },
                init: e.noop,
                exec: e.noop,
                destroy: function() {
                    this._container && this._container.remove(),
                    this._parent && this._parent.removeClass("webuploader-container"),
                    this.off()
                }
            }),
            n.orders = "html5,flash",
            n.addRuntime = function(e, t) {
                i[e] = t
            },
            n.hasRuntime = function(e) {
                return !! (e ? i[e] : o(i))
            },
            n.create = function(e, t) {
                var a, s;
                if (t = t || n.orders, r.each(t.split(/\s*,\s*/g),
                function() {
                    return i[this] ? (a = this, !1) : void 0
                }), a = a || o(i), !a) throw new Error("Runtime Error");
                return s = new i[a](e)
            },
            t.installTo(n.prototype),
            n
        }),
        t("runtime/client", ["base", "mediator", "runtime/runtime"],
        function(e, t, n) {
            function r(t, r) {
                var o, a = e.Deferred();
                this.uid = e.guid("client_"),
                this.runtimeReady = function(e) {
                    return a.done(e)
                },
                this.connectRuntime = function(t, s) {
                    if (o) throw new Error("already connected!");
                    return a.done(s),
                    "string" == typeof t && i.get(t) && (o = i.get(t)),
                    o = o || i.get(null, r),
                    o ? (e.$.extend(o.options, t), o.__promise.then(a.resolve), o.__client++) : (o = n.create(t, t.runtimeOrder), o.__promise = a.promise(), o.once("ready", a.resolve), o.init(), i.add(o), o.__client = 1),
                    r && (o.__standalone = r),
                    o
                },
                this.getRuntime = function() {
                    return o
                },
                this.disconnectRuntime = function() {
                    o && (o.__client--, o.__client <= 0 && (i.remove(o), delete o.__promise, o.destroy()), o = null)
                },
                this.exec = function() {
                    if (o) {
                        var n = e.slice(arguments);
                        return t && n.unshift(t),
                        o.exec.apply(this, n)
                    }
                },
                this.getRuid = function() {
                    return o && o.uid
                },
                this.destroy = function(e) {
                    return function() {
                        e && e.apply(this, arguments),
                        this.trigger("destroy"),
                        this.off(),
                        this.exec("destroy"),
                        this.disconnectRuntime()
                    }
                } (this.destroy)
            }
            var i;
            return i = function() {
                var e = {};
                return {
                    add: function(t) {
                        e[t.uid] = t
                    },
                    get: function(t, n) {
                        var r;
                        if (t) return e[t];
                        for (r in e) if (!n || !e[r].__standalone) return e[r];
                        return null
                    },
                    remove: function(t) {
                        delete e[t.uid]
                    }
                }
            } (),
            t.installTo(r.prototype),
            r
        }),
        t("lib/dnd", ["base", "mediator", "runtime/client"],
        function(e, t, n) {
            function r(e) {
                e = this.options = i.extend({},
                r.options, e),
                e.container = i(e.container),
                e.container.length && n.call(this, "DragAndDrop")
            }
            var i = e.$;
            return r.options = {
                accept: null,
                disableGlobalDnd: !1
            },
            e.inherits(n, {
                constructor: r,
                init: function() {
                    var e = this;
                    e.connectRuntime(e.options,
                    function() {
                        e.exec("init"),
                        e.trigger("ready")
                    })
                }
            }),
            t.installTo(r.prototype),
            r
        }),
        t("widgets/widget", ["base", "uploader"],
        function(e, t) {
            function n(e) {
                if (!e) return ! 1;
                var t = e.length,
                n = i.type(e);
                return 1 === e.nodeType && t ? !0 : "array" === n || "function" !== n && "string" !== n && (0 === t || "number" == typeof t && t > 0 && t - 1 in e)
            }
            function r(e) {
                this.owner = e,
                this.options = e.options
            }
            var i = e.$,
            o = t.prototype._init,
            a = t.prototype.destroy,
            s = {},
            u = [];
            return i.extend(r.prototype, {
                init: e.noop,
                invoke: function(e, t) {
                    var n = this.responseMap;
                    return n && e in n && n[e] in this && i.isFunction(this[n[e]]) ? this[n[e]].apply(this, t) : s
                },
                request: function() {
                    return this.owner.request.apply(this.owner, arguments)
                }
            }),
            i.extend(t.prototype, {
                _init: function() {
                    var e = this,
                    t = e._widgets = [],
                    n = e.options.disableWidgets || "";
                    return i.each(u,
                    function(r, i) { (!n || !~n.indexOf(i._name)) && t.push(new i(e))
                    }),
                    o.apply(e, arguments)
                },
                request: function(t, r, i) {
                    var o, a, u, c, l = 0,
                    f = this._widgets,
                    d = f && f.length,
                    h = [],
                    p = [];
                    for (r = n(r) ? r: [r]; d > l; l++) o = f[l],
                    a = o.invoke(t, r),
                    a !== s && (e.isPromise(a) ? p.push(a) : h.push(a));
                    return i || p.length ? (u = e.when.apply(e, p), c = u.pipe ? "pipe": "then", u[c](function() {
                        var t = e.Deferred(),
                        n = arguments;
                        return 1 === n.length && (n = n[0]),
                        setTimeout(function() {
                            t.resolve(n)
                        },
                        1),
                        t.promise()
                    })[i ? c: "done"](i || e.noop)) : h[0]
                },
                destroy: function() {
                    a.apply(this, arguments),
                    this._widgets = null
                }
            }),
            t.register = r.register = function(t, n) {
                var o, a = {
                    init: "init",
                    destroy: "destroy",
                    name: "anonymous"
                };
                return 1 === arguments.length ? (n = t, i.each(n,
                function(e) {
                    return "_" === e[0] || "name" === e ? void("name" === e && (a.name = n.name)) : void(a[e.replace(/[A-Z]/g, "-$&").toLowerCase()] = e)
                })) : a = i.extend(a, t),
                n.responseMap = a,
                o = e.inherits(r, n),
                o._name = a.name,
                u.push(o),
                o
            },
            t.unRegister = r.unRegister = function(e) {
                if (e && "anonymous" !== e) for (var t = u.length; t--;) u[t]._name === e && u.splice(t, 1)
            },
            r
        }),
        t("widgets/filednd", ["base", "uploader", "lib/dnd", "widgets/widget"],
        function(e, t, n) {
            var r = e.$;
            return t.options.dnd = "",
            t.register({
                name: "dnd",
                init: function(t) {
                    if (t.dnd && "html5" === this.request("predict-runtime-type")) {
                        var i, o = this,
                        a = e.Deferred(),
                        s = r.extend({},
                        {
                            disableGlobalDnd: t.disableGlobalDnd,
                            container: t.dnd,
                            accept: t.accept
                        });
                        return this.dnd = i = new n(s),
                        i.once("ready", a.resolve),
                        i.on("drop",
                        function(e) {
                            o.request("add-file", [e])
                        }),
                        i.on("accept",
                        function(e) {
                            return o.owner.trigger("dndAccept", e)
                        }),
                        i.init(),
                        a.promise()
                    }
                },
                destroy: function() {
                    this.dnd && this.dnd.destroy()
                }
            })
        }),
        t("lib/filepaste", ["base", "mediator", "runtime/client"],
        function(e, t, n) {
            function r(e) {
                e = this.options = i.extend({},
                e),
                e.container = i(e.container || document.body),
                n.call(this, "FilePaste")
            }
            var i = e.$;
            return e.inherits(n, {
                constructor: r,
                init: function() {
                    var e = this;
                    e.connectRuntime(e.options,
                    function() {
                        e.exec("init"),
                        e.trigger("ready")
                    })
                }
            }),
            t.installTo(r.prototype),
            r
        }),
        t("widgets/filepaste", ["base", "uploader", "lib/filepaste", "widgets/widget"],
        function(e, t, n) {
            var r = e.$;
            return t.register({
                name: "paste",
                init: function(t) {
                    if (t.paste && "html5" === this.request("predict-runtime-type")) {
                        var i, o = this,
                        a = e.Deferred(),
                        s = r.extend({},
                        {
                            container: t.paste,
                            accept: t.accept
                        });
                        return this.paste = i = new n(s),
                        i.once("ready", a.resolve),
                        i.on("paste",
                        function(e) {
                            o.owner.request("add-file", [e])
                        }),
                        i.init(),
                        a.promise()
                    }
                },
                destroy: function() {
                    this.paste && this.paste.destroy()
                }
            })
        }),
        t("lib/blob", ["base", "runtime/client"],
        function(e, t) {
            function n(e, n) {
                var r = this;
                r.source = n,
                r.ruid = e,
                this.size = n.size || 0,
                this.type = !n.type && this.ext && ~"jpg,jpeg,png,gif,bmp".indexOf(this.ext) ? "image/" + ("jpg" === this.ext ? "jpeg": this.ext) : n.type || "application/octet-stream",
                t.call(r, "Blob"),
                this.uid = n.uid || this.uid,
                e && r.connectRuntime(e)
            }
            return e.inherits(t, {
                constructor: n,
                slice: function(e, t) {
                    return this.exec("slice", e, t)
                },
                getSource: function() {
                    return this.source
                }
            }),
            n
        }),
        t("lib/file", ["base", "lib/blob"],
        function(e, t) {
            function n(e, n) {
                var o;
                this.name = n.name || "untitled" + r++,
                o = i.exec(n.name) ? RegExp.$1.toLowerCase() : "",
                !o && n.type && (o = /\/(jpg|jpeg|png|gif|bmp)$/i.exec(n.type) ? RegExp.$1.toLowerCase() : "", this.name += "." + o),
                this.ext = o,
                this.lastModifiedDate = n.lastModifiedDate || (new Date).toLocaleString(),
                t.apply(this, arguments)
            }
            var r = 1,
            i = /\.([^.]+)$/;
            return e.inherits(t, n)
        }),
        t("lib/filepicker", ["base", "runtime/client", "lib/file"],
        function(t, n, r) {
            function i(e) {
                if (e = this.options = o.extend({},
                i.options, e), e.container = o(e.id), !e.container.length) throw new Error("\u6309\u94ae\u6307\u5b9a\u9519\u8bef");
                e.innerHTML = e.innerHTML || e.label || e.container.html() || "",
                e.button = o(e.button || document.createElement("div")),
                e.button.html(e.innerHTML),
                e.container.html(e.button),
                n.call(this, "FilePicker", !0)
            }
            var o = t.$;
            return i.options = {
                button: null,
                container: null,
                label: null,
                innerHTML: null,
                multiple: !0,
                accept: null,
                name: "file"
            },
            t.inherits(n, {
                constructor: i,
                init: function() {
                    var n = this,
                    i = n.options,
                    a = i.button;
                    a.addClass("webuploader-pick"),
                    n.on("all",
                    function(e) {
                        var t;
                        switch (e) {
                        case "mouseenter":
                            a.addClass("webuploader-pick-hover");
                            break;
                        case "mouseleave":
                            a.removeClass("webuploader-pick-hover");
                            break;
                        case "change":
                            t = n.exec("getFiles"),
                            n.trigger("select", o.map(t,
                            function(e) {
                                return e = new r(n.getRuid(), e),
                                e._refer = i.container,
                                e
                            }), i.container)
                        }
                    }),
                    n.connectRuntime(i,
                    function() {
                        n.refresh(),
                        n.exec("init", i),
                        n.trigger("ready")
                    }),
                    this._resizeHandler = t.bindFn(this.refresh, this),
                    o(e).on("resize", this._resizeHandler)
                },
                refresh: function() {
                    var e = this.getRuntime().getContainer(),
                    t = this.options.button,
                    n = t.outerWidth ? t.outerWidth() : t.width(),
                    r = t.outerHeight ? t.outerHeight() : t.height(),
                    i = t.offset();
                    n && r && e.css({
                        bottom: "auto",
                        right: "auto",
                        width: n + "px",
                        height: r + "px"
                    }).offset(i)
                },
                enable: function() {
                    var e = this.options.button;
                    e.removeClass("webuploader-pick-disable"),
                    this.refresh()
                },
                disable: function() {
                    var e = this.options.button;
                    this.getRuntime().getContainer().css({
                        top: "-99999px"
                    }),
                    e.addClass("webuploader-pick-disable")
                },
                destroy: function() {
                    var t = this.options.button;
                    o(e).off("resize", this._resizeHandler),
                    t.removeClass("webuploader-pick-disable webuploader-pick-hover webuploader-pick")
                }
            }),
            i
        }),
        t("widgets/filepicker", ["base", "uploader", "lib/filepicker", "widgets/widget"],
        function(e, t, n) {
            var r = e.$;
            return r.extend(t.options, {
                pick: null,
                accept: null
            }),
            t.register({
                name: "picker",
                init: function(e) {
                    return this.pickers = [],
                    e.pick && this.addBtn(e.pick)
                },
                refresh: function() {
                    r.each(this.pickers,
                    function() {
                        this.refresh()
                    })
                },
                addBtn: function(t) {
                    var i = this,
                    o = i.options,
                    a = o.accept,
                    s = [];
                    if (t) return r.isPlainObject(t) || (t = {
                        id: t
                    }),
                    r(t.id).each(function() {
                        var u, c, l;
                        l = e.Deferred(),
                        u = r.extend({},
                        t, {
                            accept: r.isPlainObject(a) ? [a] : a,
                            swf: o.swf,
                            runtimeOrder: o.runtimeOrder,
                            id: this
                        }),
                        c = new n(u),
                        c.once("ready", l.resolve),
                        c.on("select",
                        function(e) {
                            i.owner.request("add-file", [e])
                        }),
                        c.init(),
                        i.pickers.push(c),
                        s.push(l.promise())
                    }),
                    e.when.apply(e, s)
                },
                disable: function() {
                    r.each(this.pickers,
                    function() {
                        this.disable()
                    })
                },
                enable: function() {
                    r.each(this.pickers,
                    function() {
                        this.enable()
                    })
                },
                destroy: function() {
                    r.each(this.pickers,
                    function() {
                        this.destroy()
                    }),
                    this.pickers = null
                }
            })
        }),
        t("lib/image", ["base", "runtime/client", "lib/blob"],
        function(e, t, n) {
            function r(e) {
                this.options = i.extend({},
                r.options, e),
                t.call(this, "Image"),
                this.on("load",
                function() {
                    this._info = this.exec("info"),
                    this._meta = this.exec("meta")
                })
            }
            var i = e.$;
            return r.options = {
                quality: 90,
                crop: !1,
                preserveHeaders: !1,
                allowMagnify: !1
            },
            e.inherits(t, {
                constructor: r,
                info: function(e) {
                    return e ? (this._info = e, this) : this._info
                },
                meta: function(e) {
                    return e ? (this._meta = e, this) : this._meta
                },
                loadFromBlob: function(e) {
                    var t = this,
                    n = e.getRuid();
                    this.connectRuntime(n,
                    function() {
                        t.exec("init", t.options),
                        t.exec("loadFromBlob", e)
                    })
                },
                resize: function() {
                    var t = e.slice(arguments);
                    return this.exec.apply(this, ["resize"].concat(t))
                },
                crop: function() {
                    var t = e.slice(arguments);
                    return this.exec.apply(this, ["crop"].concat(t))
                },
                getAsDataUrl: function(e) {
                    return this.exec("getAsDataUrl", e)
                },
                getAsBlob: function(e) {
                    var t = this.exec("getAsBlob", e);
                    return new n(this.getRuid(), t)
                }
            }),
            r
        }),
        t("widgets/image", ["base", "uploader", "lib/image", "widgets/widget"],
        function(e, t, n) {
            var r, i = e.$;
            return r = function(e) {
                var t = 0,
                n = [],
                r = function() {
                    for (var r; n.length && e > t;) r = n.shift(),
                    t += r[0],
                    r[1]()
                };
                return function(e, i, o) {
                    n.push([i, o]),
                    e.once("destroy",
                    function() {
                        t -= i,
                        setTimeout(r, 1)
                    }),
                    setTimeout(r, 1)
                }
            } (5242880),
            i.extend(t.options, {
                thumb: {
                    width: 110,
                    height: 110,
                    quality: 70,
                    allowMagnify: !0,
                    crop: !0,
                    preserveHeaders: !1,
                    type: "image/jpeg"
                },
                compress: {
                    width: 1600,
                    height: 1600,
                    quality: 90,
                    allowMagnify: !1,
                    crop: !1,
                    preserveHeaders: !0
                }
            }),
            t.register({
                name: "image",
                makeThumb: function(e, t, o, a) {
                    var s, u;
                    return e = this.request("get-file", e),
                    e.type.match(/^image/) ? (s = i.extend({},
                    this.options.thumb), i.isPlainObject(o) && (s = i.extend(s, o), o = null), o = o || s.width, a = a || s.height, u = new n(s), u.once("load",
                    function() {
                        e._info = e._info || u.info(),
                        e._meta = e._meta || u.meta(),
                        1 >= o && o > 0 && (o = e._info.width * o),
                        1 >= a && a > 0 && (a = e._info.height * a),
                        u.resize(o, a)
                    }), u.once("complete",
                    function() {
                        t(!1, u.getAsDataUrl(s.type)),
                        u.destroy()
                    }), u.once("error",
                    function(e) {
                        t(e || !0),
                        u.destroy()
                    }), void r(u, e.source.size,
                    function() {
                        e._info && u.info(e._info),
                        e._meta && u.meta(e._meta),
                        u.loadFromBlob(e.source)
                    })) : void t(!0)
                },
                beforeSendFile: function(t) {
                    var r, o, a = this.options.compress || this.options.resize,
                    s = a && a.compressSize || 0,
                    u = a && a.noCompressIfLarger || !1;
                    return t = this.request("get-file", t),
                    !a || !~"image/jpeg,image/jpg".indexOf(t.type) || t.size < s || t._compressed ? void 0 : (a = i.extend({},
                    a), o = e.Deferred(), r = new n(a), o.always(function() {
                        r.destroy(),
                        r = null
                    }), r.once("error", o.reject), r.once("load",
                    function() {
                        var e = a.width,
                        n = a.height;
                        t._info = t._info || r.info(),
                        t._meta = t._meta || r.meta(),
                        1 >= e && e > 0 && (e = t._info.width * e),
                        1 >= n && n > 0 && (n = t._info.height * n),
                        r.resize(e, n)
                    }), r.once("complete",
                    function() {
                        var e, n;
                        try {
                            e = r.getAsBlob(a.type),
                            n = t.size,
                            (!u || e.size < n) && (t.source = e, t.size = e.size, t.trigger("resize", e.size, n)),
                            t._compressed = !0,
                            o.resolve()
                        } catch(i) {
                            o.resolve()
                        }
                    }), t._info && r.info(t._info), t._meta && r.meta(t._meta), r.loadFromBlob(t.source), o.promise())
                }
            })
        }),
        t("file", ["base", "mediator"],
        function(e, t) {
            function n() {
                return o + a++
            }
            function r(e) {
                this.name = e.name || "Untitled",
                this.size = e.size || 0,
                this.type = e.type || "application/octet-stream",
                this.lastModifiedDate = e.lastModifiedDate || 1 * new Date,
                this.id = n(),
                this.ext = s.exec(this.name) ? RegExp.$1: "",
                this.statusText = "",
                u[this.id] = r.Status.INITED,
                this.source = e,
                this.loaded = 0,
                this.on("error",
                function(e) {
                    this.setStatus(r.Status.ERROR, e)
                })
            }
            var i = e.$,
            o = "WU_FILE_",
            a = 0,
            s = /\.([^.]+)$/,
            u = {};
            return i.extend(r.prototype, {
                setStatus: function(e, t) {
                    var n = u[this.id];
                    "undefined" != typeof t && (this.statusText = t),
                    e !== n && (u[this.id] = e, this.trigger("statuschange", e, n))
                },
                getStatus: function() {
                    return u[this.id]
                },
                getSource: function() {
                    return this.source
                },
                destroy: function() {
                    this.off(),
                    delete u[this.id]
                }
            }),
            t.installTo(r.prototype),
            r.Status = {
                INITED: "inited",
                QUEUED: "queued",
                PROGRESS: "progress",
                ERROR: "error",
                COMPLETE: "complete",
                CANCELLED: "cancelled",
                INTERRUPT: "interrupt",
                INVALID: "invalid"
            },
            r
        }),
        t("queue", ["base", "mediator", "file"],
        function(e, t, n) {
            function r() {
                this.stats = {
                    numOfQueue: 0,
                    numOfSuccess: 0,
                    numOfCancel: 0,
                    numOfProgress: 0,
                    numOfUploadFailed: 0,
                    numOfInvalid: 0,
                    numofDeleted: 0,
                    numofInterrupt: 0
                },
                this._queue = [],
                this._map = {}
            }
            var i = e.$,
            o = n.Status;
            return i.extend(r.prototype, {
                append: function(e) {
                    return this._queue.push(e),
                    this._fileAdded(e),
                    this
                },
                prepend: function(e) {
                    return this._queue.unshift(e),
                    this._fileAdded(e),
                    this
                },
                getFile: function(e) {
                    return "string" != typeof e ? e: this._map[e]
                },
                fetch: function(e) {
                    var t, n, r = this._queue.length;
                    for (e = e || o.QUEUED, t = 0; r > t; t++) if (n = this._queue[t], e === n.getStatus()) return n;
                    return null
                },
                sort: function(e) {
                    "function" == typeof e && this._queue.sort(e)
                },
                getFiles: function() {
                    for (var e, t = [].slice.call(arguments, 0), n = [], r = 0, o = this._queue.length; o > r; r++) e = this._queue[r],
                    (!t.length || ~i.inArray(e.getStatus(), t)) && n.push(e);
                    return n
                },
                removeFile: function(e) {
                    var t = this._map[e.id];
                    t && (delete this._map[e.id], e.destroy(), this.stats.numofDeleted++)
                },
                _fileAdded: function(e) {
                    var t = this,
                    n = this._map[e.id];
                    n || (this._map[e.id] = e, e.on("statuschange",
                    function(e, n) {
                        t._onFileStatusChange(e, n)
                    }))
                },
                _onFileStatusChange: function(e, t) {
                    var n = this.stats;
                    switch (t) {
                    case o.PROGRESS:
                        n.numOfProgress--;
                        break;
                    case o.QUEUED:
                        n.numOfQueue--;
                        break;
                    case o.ERROR:
                        n.numOfUploadFailed--;
                        break;
                    case o.INVALID:
                        n.numOfInvalid--;
                        break;
                    case o.INTERRUPT:
                        n.numofInterrupt--
                    }
                    switch (e) {
                    case o.QUEUED:
                        n.numOfQueue++;
                        break;
                    case o.PROGRESS:
                        n.numOfProgress++;
                        break;
                    case o.ERROR:
                        n.numOfUploadFailed++;
                        break;
                    case o.COMPLETE:
                        n.numOfSuccess++;
                        break;
                    case o.CANCELLED:
                        n.numOfCancel++;
                        break;
                    case o.INVALID:
                        n.numOfInvalid++;
                        break;
                    case o.INTERRUPT:
                        n.numofInterrupt++
                    }
                }
            }),
            t.installTo(r.prototype),
            r
        }),
        t("widgets/queue", ["base", "uploader", "queue", "file", "lib/file", "runtime/client", "widgets/widget"],
        function(e, t, n, r, i, o) {
            var a = e.$,
            s = /\.\w+$/,
            u = r.Status;
            return t.register({
                name: "queue",
                init: function(t) {
                    var r, i, s, u, c, l, f, d = this;
                    if (a.isPlainObject(t.accept) && (t.accept = [t.accept]), t.accept) {
                        for (c = [], s = 0, i = t.accept.length; i > s; s++) u = t.accept[s].extensions,
                        u && c.push(u);
                        c.length && (l = "\\." + c.join(",").replace(/,/g, "$|\\.").replace(/\*/g, ".*") + "$"),
                        d.accept = new RegExp(l, "i")
                    }
                    return d.queue = new n,
                    d.stats = d.queue.stats,
                    "html5" === this.request("predict-runtime-type") ? (r = e.Deferred(), this.placeholder = f = new o("Placeholder"), f.connectRuntime({
                        runtimeOrder: "html5"
                    },
                    function() {
                        d._ruid = f.getRuid(),
                        r.resolve()
                    }), r.promise()) : void 0
                },
                _wrapFile: function(e) {
                    if (! (e instanceof r)) {
                        if (! (e instanceof i)) {
                            if (!this._ruid) throw new Error("Can't add external files.");
                            e = new i(this._ruid, e)
                        }
                        e = new r(e)
                    }
                    return e
                },
                acceptFile: function(e) {
                    var t = !e || !e.size || this.accept && s.exec(e.name) && !this.accept.test(e.name);
                    return ! t
                },
                _addFile: function(e) {
                    var t = this;
                    return e = t._wrapFile(e),
                    t.owner.trigger("beforeFileQueued", e) ? t.acceptFile(e) ? (t.queue.append(e), t.owner.trigger("fileQueued", e), e) : void t.owner.trigger("error", "Q_TYPE_DENIED", e) : void 0
                },
                getFile: function(e) {
                    return this.queue.getFile(e)
                },
                addFile: function(e) {
                    var t = this;
                    e.length || (e = [e]),
                    e = a.map(e,
                    function(e) {
                        return t._addFile(e)
                    }),
                    t.owner.trigger("filesQueued", e),
                    t.options.auto && setTimeout(function() {
                        t.request("start-upload")
                    },
                    20)
                },
                getStats: function() {
                    return this.stats
                },
                removeFile: function(e, t) {
                    var n = this;
                    e = e.id ? e: n.queue.getFile(e),
                    this.request("cancel-file", e),
                    t && this.queue.removeFile(e)
                },
                getFiles: function() {
                    return this.queue.getFiles.apply(this.queue, arguments)
                },
                fetchFile: function() {
                    return this.queue.fetch.apply(this.queue, arguments)
                },
                retry: function(e, t) {
                    var n, r, i, o = this;
                    if (e) return e = e.id ? e: o.queue.getFile(e),
                    e.setStatus(u.QUEUED),
                    void(t || o.request("start-upload"));
                    for (n = o.queue.getFiles(u.ERROR), r = 0, i = n.length; i > r; r++) e = n[r],
                    e.setStatus(u.QUEUED);
                    o.request("start-upload")
                },
                sortFiles: function() {
                    return this.queue.sort.apply(this.queue, arguments)
                },
                reset: function() {
                    this.owner.trigger("reset"),
                    this.queue = new n,
                    this.stats = this.queue.stats
                },
                destroy: function() {
                    this.reset(),
                    this.placeholder && this.placeholder.destroy()
                }
            })
        }),
        t("widgets/runtime", ["uploader", "runtime/runtime", "widgets/widget"],
        function(e, t) {
            return e.support = function() {
                return t.hasRuntime.apply(t, arguments)
            },
            e.register({
                name: "runtime",
                init: function() {
                    if (!this.predictRuntimeType()) throw Error("Runtime Error")
                },
                predictRuntimeType: function() {
                    var e, n, r = this.options.runtimeOrder || t.orders,
                    i = this.type;
                    if (!i) for (r = r.split(/\s*,\s*/g), e = 0, n = r.length; n > e; e++) if (t.hasRuntime(r[e])) {
                        this.type = i = r[e];
                        break
                    }
                    return i
                }
            })
        }),
        t("lib/transport", ["base", "runtime/client", "mediator"],
        function(e, t, n) {
            function r(e) {
                var n = this;
                e = n.options = i.extend(!0, {},
                r.options, e || {}),
                t.call(this, "Transport"),
                this._blob = null,
                this._formData = e.formData || {},
                this._headers = e.headers || {},
                this.on("progress", this._timeout),
                this.on("load error",
                function() {
                    n.trigger("progress", 1),
                    clearTimeout(n._timer)
                })
            }
            var i = e.$;
            return r.options = {
                server: "",
                method: "POST",
                withCredentials: !1,
                fileVal: "file",
                timeout: 12e4,
                formData: {},
                headers: {},
                sendAsBinary: !1
            },
            i.extend(r.prototype, {
                appendBlob: function(e, t, n) {
                    var r = this,
                    i = r.options;
                    r.getRuid() && r.disconnectRuntime(),
                    r.connectRuntime(t.ruid,
                    function() {
                        r.exec("init")
                    }),
                    r._blob = t,
                    i.fileVal = e || i.fileVal,
                    i.filename = n || i.filename
                },
                append: function(e, t) {
                    "object" == typeof e ? i.extend(this._formData, e) : this._formData[e] = t
                },
                setRequestHeader: function(e, t) {
                    "object" == typeof e ? i.extend(this._headers, e) : this._headers[e] = t
                },
                send: function(e) {
                    this.exec("send", e),
                    this._timeout()
                },
                abort: function() {
                    return clearTimeout(this._timer),
                    this.exec("abort")
                },
                destroy: function() {
                    this.trigger("destroy"),
                    this.off(),
                    this.exec("destroy"),
                    this.disconnectRuntime()
                },
                getResponse: function() {
                    return this.exec("getResponse")
                },
                getResponseAsJson: function() {
                    return this.exec("getResponseAsJson")
                },
                getStatus: function() {
                    return this.exec("getStatus")
                },
                _timeout: function() {
                    var e = this,
                    t = e.options.timeout;
                    t && (clearTimeout(e._timer), e._timer = setTimeout(function() {
                        e.abort(),
                        e.trigger("error", "timeout")
                    },
                    t))
                }
            }),
            n.installTo(r.prototype),
            r
        }),
        t("widgets/upload", ["base", "uploader", "file", "lib/transport", "widgets/widget"],
        function(e, t, n, r) {
            function i(e, t) {
                var n, r, i = [],
                o = e.source,
                a = o.size,
                s = t ? Math.ceil(a / t) : 1,
                u = 0,
                c = 0;
                for (r = {
                    file: e,
                    has: function() {
                        return !! i.length
                    },
                    shift: function() {
                        return i.shift()
                    },
                    unshift: function(e) {
                        i.unshift(e)
                    }
                }; s > c;) n = Math.min(t, a - u),
                i.push({
                    file: e,
                    start: u,
                    end: t ? u + n: a,
                    total: a,
                    chunks: s,
                    chunk: c++,
                    cuted: r
                }),
                u += n;
                return e.blocks = i.concat(),
                e.remaning = i.length,
                r
            }
            var o = e.$,
            a = e.isPromise,
            s = n.Status;
            o.extend(t.options, {
                prepareNextFile: !1,
                chunked: !1,
                chunkSize: 5242880,
                chunkRetry: 2,
                threads: 3,
                formData: {}
            }),
            t.register({
                name: "upload",
                init: function() {
                    var t = this.owner,
                    n = this;
                    this.runing = !1,
                    this.progress = !1,
                    t.on("startUpload",
                    function() {
                        n.progress = !0
                    }).on("uploadFinished",
                    function() {
                        n.progress = !1
                    }),
                    this.pool = [],
                    this.stack = [],
                    this.pending = [],
                    this.remaning = 0,
                    this.__tick = e.bindFn(this._tick, this),
                    t.on("uploadComplete",
                    function(e) {
                        e.blocks && o.each(e.blocks,
                        function(e, t) {
                            t.transport && (t.transport.abort(), t.transport.destroy()),
                            delete t.transport
                        }),
                        delete e.blocks,
                        delete e.remaning
                    })
                },
                reset: function() {
                    this.request("stop-upload", !0),
                    this.runing = !1,
                    this.pool = [],
                    this.stack = [],
                    this.pending = [],
                    this.remaning = 0,
                    this._trigged = !1,
                    this._promise = null
                },
                startUpload: function(t) {
                    var n = this;
                    if (o.each(n.request("get-files", s.INVALID),
                    function() {
                        n.request("remove-file", this)
                    }), t) if (t = t.id ? t: n.request("get-file", t), t.getStatus() === s.INTERRUPT) o.each(n.pool,
                    function(e, n) {
                        n.file === t && n.transport && n.transport.send()
                    }),
                    t.setStatus(s.QUEUED);
                    else {
                        if (t.getStatus() === s.PROGRESS) return;
                        t.setStatus(s.QUEUED)
                    } else o.each(n.request("get-files", [s.INITED]),
                    function() {
                        this.setStatus(s.QUEUED)
                    });
                    if (!n.runing) {
                        n.runing = !0;
                        var r = [];
                        o.each(n.pool,
                        function(e, t) {
                            var i = t.file;
                            i.getStatus() === s.INTERRUPT && (r.push(i), n._trigged = !1, t.transport && t.transport.send())
                        });
                        for (var t; t = r.shift();) t.setStatus(s.PROGRESS);
                        t || o.each(n.request("get-files", s.INTERRUPT),
                        function() {
                            this.setStatus(s.PROGRESS)
                        }),
                        n._trigged = !1,
                        e.nextTick(n.__tick),
                        n.owner.trigger("startUpload")
                    }
                },
                stopUpload: function(t, n) {
                    var r = this;
                    if (t === !0 && (n = t, t = null), r.runing !== !1) {
                        if (t) {
                            if (t = t.id ? t: r.request("get-file", t), t.getStatus() !== s.PROGRESS && t.getStatus() !== s.QUEUED) return;
                            return t.setStatus(s.INTERRUPT),
                            o.each(r.pool,
                            function(e, n) {
                                n.file === t && (n.transport && n.transport.abort(), r._putback(n), r._popBlock(n))
                            }),
                            e.nextTick(r.__tick)
                        }
                        r.runing = !1,
                        this._promise && this._promise.file && this._promise.file.setStatus(s.INTERRUPT),
                        n && o.each(r.pool,
                        function(e, t) {
                            t.transport && t.transport.abort(),
                            t.file.setStatus(s.INTERRUPT)
                        }),
                        r.owner.trigger("stopUpload")
                    }
                },
                cancelFile: function(e) {
                    e = e.id ? e: this.request("get-file", e),
                    e.blocks && o.each(e.blocks,
                    function(e, t) {
                        var n = t.transport;
                        n && (n.abort(), n.destroy(), delete t.transport)
                    }),
                    e.setStatus(s.CANCELLED),
                    this.owner.trigger("fileDequeued", e)
                },
                isInProgress: function() {
                    return !! this.progress
                },
                _getStats: function() {
                    return this.request("get-stats")
                },
                skipFile: function(e, t) {
                    e = e.id ? e: this.request("get-file", e),
                    e.setStatus(t || s.COMPLETE),
                    e.skipped = !0,
                    e.blocks && o.each(e.blocks,
                    function(e, t) {
                        var n = t.transport;
                        n && (n.abort(), n.destroy(), delete t.transport)
                    }),
                    this.owner.trigger("uploadSkip", e)
                },
                _tick: function() {
                    var t, n, r = this,
                    i = r.options;
                    return r._promise ? r._promise.always(r.__tick) : void(r.pool.length < i.threads && (n = r._nextBlock()) ? (r._trigged = !1, t = function(t) {
                        r._promise = null,
                        t && t.file && r._startSend(t),
                        e.nextTick(r.__tick)
                    },
                    r._promise = a(n) ? n.always(t) : t(n)) : r.remaning || r._getStats().numOfQueue || r._getStats().numofInterrupt || (r.runing = !1, r._trigged || e.nextTick(function() {
                        r.owner.trigger("uploadFinished")
                    }), r._trigged = !0))
                },
                _putback: function(e) {
                    var t;
                    e.cuted.unshift(e),
                    t = this.stack.indexOf(e.cuted),
                    ~t || this.stack.unshift(e.cuted)
                },
                _getStack: function() {
                    for (var e, t = 0; e = this.stack[t++];) {
                        if (e.has() && e.file.getStatus() === s.PROGRESS) return e; (!e.has() || e.file.getStatus() !== s.PROGRESS && e.file.getStatus() !== s.INTERRUPT) && this.stack.splice(--t, 1)
                    }
                    return null
                },
                _nextBlock: function() {
                    var e, t, n, r, o = this,
                    s = o.options;
                    return (e = this._getStack()) ? (s.prepareNextFile && !o.pending.length && o._prepareNextFile(), e.shift()) : o.runing ? (!o.pending.length && o._getStats().numOfQueue && o._prepareNextFile(), t = o.pending.shift(), n = function(t) {
                        return t ? (e = i(t, s.chunked ? s.chunkSize: 0), o.stack.push(e), e.shift()) : null
                    },
                    a(t) ? (r = t.file, t = t[t.pipe ? "pipe": "then"](n), t.file = r, t) : n(t)) : void 0
                },
                _prepareNextFile: function() {
                    var e, t = this,
                    n = t.request("fetch-file"),
                    r = t.pending;
                    n && (e = t.request("before-send-file", n,
                    function() {
                        return n.getStatus() === s.PROGRESS || n.getStatus() === s.INTERRUPT ? n: t._finishFile(n)
                    }), t.owner.trigger("uploadStart", n), n.setStatus(s.PROGRESS), e.file = n, e.done(function() {
                        var t = o.inArray(e, r);~t && r.splice(t, 1, n)
                    }), e.fail(function(e) {
                        n.setStatus(s.ERROR, e),
                        t.owner.trigger("uploadError", n, e),
                        t.owner.trigger("uploadComplete", n)
                    }), r.push(e))
                },
                _popBlock: function(e) {
                    var t = o.inArray(e, this.pool);
                    this.pool.splice(t, 1),
                    e.file.remaning--,
                    this.remaning--
                },
                _startSend: function(t) {
                    var n, r = this,
                    i = t.file;
                    return i.getStatus() !== s.PROGRESS ? void(i.getStatus() === s.INTERRUPT && r._putback(t)) : (r.pool.push(t), r.remaning++, t.blob = 1 === t.chunks ? i.source: i.source.slice(t.start, t.end), n = r.request("before-send", t,
                    function() {
                        i.getStatus() === s.PROGRESS ? r._doSend(t) : (r._popBlock(t), e.nextTick(r.__tick))
                    }), void n.fail(function() {
                        1 === i.remaning ? r._finishFile(i).always(function() {
                            t.percentage = 1,
                            r._popBlock(t),
                            r.owner.trigger("uploadComplete", i),
                            e.nextTick(r.__tick)
                        }) : (t.percentage = 1, r.updateFileProgress(i), r._popBlock(t), e.nextTick(r.__tick))
                    }))
                },
                _doSend: function(t) {
                    var n, i, a = this,
                    u = a.owner,
                    c = a.options,
                    l = t.file,
                    f = new r(c),
                    d = o.extend({},
                    c.formData),
                    h = o.extend({},
                    c.headers);
                    t.transport = f,
                    f.on("destroy",
                    function() {
                        delete t.transport,
                        a._popBlock(t),
                        e.nextTick(a.__tick)
                    }),
                    f.on("progress",
                    function(e) {
                        t.percentage = e,
                        a.updateFileProgress(l)
                    }),
                    n = function(e) {
                        var n;
                        return i = f.getResponseAsJson() || {},
                        i._raw = f.getResponse(),
                        n = function(t) {
                            e = t
                        },
                        u.trigger("uploadAccept", t, i, n) || (e = e || "server"),
                        e
                    },
                    f.on("error",
                    function(e, r) {
                        t.retried = t.retried || 0,
                        t.chunks > 1 && ~"http,abort".indexOf(e) && t.retried < c.chunkRetry ? (t.retried++, f.send()) : (r || "server" !== e || (e = n(e)), l.setStatus(s.ERROR, e), u.trigger("uploadError", l, e), u.trigger("uploadComplete", l))
                    }),
                    f.on("load",
                    function() {
                        var e;
                        return (e = n()) ? void f.trigger("error", e, !0) : void(1 === l.remaning ? a._finishFile(l, i) : f.destroy())
                    }),
                    d = o.extend(d, {
                        id: l.id,
                        name: l.name,
                        type: l.type,
                        lastModifiedDate: l.lastModifiedDate,
                        size: l.size
                    }),
                    t.chunks > 1 && o.extend(d, {
                        chunks: t.chunks,
                        chunk: t.chunk
                    }),
                    u.trigger("uploadBeforeSend", t, d, h),
                    f.appendBlob(c.fileVal, t.blob, l.name),
                    f.append(d),
                    f.setRequestHeader(h),
                    f.send()
                },
                _finishFile: function(e, t, n) {
                    var r = this.owner;
                    return r.request("after-send-file", arguments,
                    function() {
                        e.setStatus(s.COMPLETE),
                        r.trigger("uploadSuccess", e, t, n)
                    }).fail(function(t) {
                        e.getStatus() === s.PROGRESS && e.setStatus(s.ERROR, t),
                        r.trigger("uploadError", e, t)
                    }).always(function() {
                        r.trigger("uploadComplete", e)
                    })
                },
                updateFileProgress: function(e) {
                    var t = 0,
                    n = 0;
                    e.blocks && (o.each(e.blocks,
                    function(e, t) {
                        n += (t.percentage || 0) * (t.end - t.start)
                    }), t = n / e.size, this.owner.trigger("uploadProgress", e, t || 0))
                }
            })
        }),
        t("widgets/validator", ["base", "uploader", "file", "widgets/widget"],
        function(e, t, n) {
            var r, i = e.$,
            o = {};
            return r = {
                addValidator: function(e, t) {
                    o[e] = t
                },
                removeValidator: function(e) {
                    delete o[e]
                }
            },
            t.register({
                name: "validator",
                init: function() {
                    var t = this;
                    e.nextTick(function() {
                        i.each(o,
                        function() {
                            this.call(t.owner)
                        })
                    })
                }
            }),
            r.addValidator("fileNumLimit",
            function() {
                var e = this,
                t = e.options,
                n = 0,
                r = parseInt(t.fileNumLimit, 10),
                i = !0;
                r && (e.on("beforeFileQueued",
                function(e) {
                    return n >= r && i && (i = !1, this.trigger("error", "Q_EXCEED_NUM_LIMIT", r, e), setTimeout(function() {
                        i = !0
                    },
                    1)),
                    n >= r ? !1 : !0
                }), e.on("fileQueued",
                function() {
                    n++
                }), e.on("fileDequeued",
                function() {
                    n--
                }), e.on("reset",
                function() {
                    n = 0
                }))
            }),
            r.addValidator("fileSizeLimit",
            function() {
                var e = this,
                t = e.options,
                n = 0,
                r = parseInt(t.fileSizeLimit, 10),
                i = !0;
                r && (e.on("beforeFileQueued",
                function(e) {
                    var t = n + e.size > r;
                    return t && i && (i = !1, this.trigger("error", "Q_EXCEED_SIZE_LIMIT", r, e), setTimeout(function() {
                        i = !0
                    },
                    1)),
                    t ? !1 : !0
                }), e.on("fileQueued",
                function(e) {
                    n += e.size
                }), e.on("fileDequeued",
                function(e) {
                    n -= e.size
                }), e.on("reset",
                function() {
                    n = 0
                }))
            }),
            r.addValidator("fileSingleSizeLimit",
            function() {
                var e = this,
                t = e.options,
                r = t.fileSingleSizeLimit;
                r && e.on("beforeFileQueued",
                function(e) {
                    return e.size > r ? (e.setStatus(n.Status.INVALID, "exceed_size"), this.trigger("error", "F_EXCEED_SIZE", r, e), !1) : void 0
                })
            }),
            r.addValidator("duplicate",
            function() {
                function e(e) {
                    for (var t, n = 0,
                    r = 0,
                    i = e.length; i > r; r++) t = e.charCodeAt(r),
                    n = t + (n << 6) + (n << 16) - n;
                    return n
                }
                var t = this,
                n = t.options,
                r = {};
                n.duplicate || (t.on("beforeFileQueued",
                function(t) {
                    var n = t.__hash || (t.__hash = e(t.name + t.size + t.lastModifiedDate));
                    return r[n] ? (this.trigger("error", "F_DUPLICATE", t), !1) : void 0
                }), t.on("fileQueued",
                function(e) {
                    var t = e.__hash;
                    t && (r[t] = !0)
                }), t.on("fileDequeued",
                function(e) {
                    var t = e.__hash;
                    t && delete r[t]
                }), t.on("reset",
                function() {
                    r = {}
                }))
            }),
            r
        }),
        t("lib/md5", ["runtime/client", "mediator"],
        function(e, t) {
            function n() {
                e.call(this, "Md5")
            }
            return t.installTo(n.prototype),
            n.prototype.loadFromBlob = function(e) {
                var t = this;
                t.getRuid() && t.disconnectRuntime(),
                t.connectRuntime(e.ruid,
                function() {
                    t.exec("init"),
                    t.exec("loadFromBlob", e)
                })
            },
            n.prototype.getResult = function() {
                return this.exec("getResult")
            },
            n
        }),
        t("widgets/md5", ["base", "uploader", "lib/md5", "lib/blob", "widgets/widget"],
        function(e, t, n, r) {
            return t.register({
                name: "md5",
                md5File: function(t, i, o) {
                    var a = new n,
                    s = e.Deferred(),
                    u = t instanceof r ? t: this.request("get-file", t).source;
                    return a.on("progress load",
                    function(e) {
                        e = e || {},
                        s.notify(e.total ? e.loaded / e.total: 1)
                    }),
                    a.on("complete",
                    function() {
                        s.resolve(a.getResult())
                    }),
                    a.on("error",
                    function(e) {
                        s.reject(e)
                    }),
                    arguments.length > 1 && (i = i || 0, o = o || 0, 0 > i && (i = u.size + i), 0 > o && (o = u.size + o), o = Math.min(o, u.size), u = u.slice(i, o)),
                    a.loadFromBlob(u),
                    s.promise()
                }
            })
        }),
        t("runtime/compbase", [],
        function() {
            function e(e, t) {
                this.owner = e,
                this.options = e.options,
                this.getRuntime = function() {
                    return t
                },
                this.getRuid = function() {
                    return t.uid
                },
                this.trigger = function() {
                    return e.trigger.apply(e, arguments)
                }
            }
            return e
        }),
        t("runtime/html5/runtime", ["base", "runtime/runtime", "runtime/compbase"],
        function(t, n, r) {
            function i() {
                var e = {},
                r = this,
                i = this.destroy;
                n.apply(r, arguments),
                r.type = o,
                r.exec = function(n, i) {
                    var o, s = this,
                    u = s.uid,
                    c = t.slice(arguments, 2);
                    return a[n] && (o = e[u] = e[u] || new a[n](s, r), o[i]) ? o[i].apply(o, c) : void 0
                },
                r.destroy = function() {
                    return i && i.apply(this, arguments)
                }
            }
            var o = "html5",
            a = {};
            return t.inherits(n, {
                constructor: i,
                init: function() {
                    var e = this;
                    setTimeout(function() {
                        e.trigger("ready")
                    },
                    1)
                }
            }),
            i.register = function(e, n) {
                var i = a[e] = t.inherits(r, n);
                return i
            },
            e.Blob && e.FileReader && e.DataView && n.addRuntime(o, i),
            i
        }),
        t("runtime/html5/blob", ["runtime/html5/runtime", "lib/blob"],
        function(e, t) {
            return e.register("Blob", {
                slice: function(e, n) {
                    var r = this.owner.source,
                    i = r.slice || r.webkitSlice || r.mozSlice;
                    return r = i.call(r, e, n),
                    new t(this.getRuid(), r)
                }
            })
        }),
        t("runtime/html5/dnd", ["base", "runtime/html5/runtime", "lib/file"],
        function(e, t, n) {
            var r = e.$,
            i = "webuploader-dnd-";
            return t.register("DragAndDrop", {
                init: function() {
                    var t = this.elem = this.options.container;
                    this.dragEnterHandler = e.bindFn(this._dragEnterHandler, this),
                    this.dragOverHandler = e.bindFn(this._dragOverHandler, this),
                    this.dragLeaveHandler = e.bindFn(this._dragLeaveHandler, this),
                    this.dropHandler = e.bindFn(this._dropHandler, this),
                    this.dndOver = !1,
                    t.on("dragenter", this.dragEnterHandler),
                    t.on("dragover", this.dragOverHandler),
                    t.on("dragleave", this.dragLeaveHandler),
                    t.on("drop", this.dropHandler),
                    this.options.disableGlobalDnd && (r(document).on("dragover", this.dragOverHandler), r(document).on("drop", this.dropHandler))
                },
                _dragEnterHandler: function(e) {
                    var t, n = this,
                    r = n._denied || !1;
                    return e = e.originalEvent || e,
                    n.dndOver || (n.dndOver = !0, t = e.dataTransfer.items, t && t.length && (n._denied = r = !n.trigger("accept", t)), n.elem.addClass(i + "over"), n.elem[r ? "addClass": "removeClass"](i + "denied")),
                    e.dataTransfer.dropEffect = r ? "none": "copy",
                    !1
                },
                _dragOverHandler: function(e) {
                    var t = this.elem.parent().get(0);
                    return t && !r.contains(t, e.currentTarget) ? !1 : (clearTimeout(this._leaveTimer), this._dragEnterHandler.call(this, e), !1)
                },
                _dragLeaveHandler: function() {
                    var e, t = this;
                    return e = function() {
                        t.dndOver = !1,
                        t.elem.removeClass(i + "over " + i + "denied")
                    },
                    clearTimeout(t._leaveTimer),
                    t._leaveTimer = setTimeout(e, 100),
                    !1
                },
                _dropHandler: function(e) {
                    var t, o, a = this,
                    s = a.getRuid(),
                    u = a.elem.parent().get(0);
                    if (u && !r.contains(u, e.currentTarget)) return ! 1;
                    e = e.originalEvent || e,
                    t = e.dataTransfer;
                    try {
                        o = t.getData("text/html")
                    } catch(c) {}
                    return o ? void 0 : (a._getTansferFiles(t,
                    function(e) {
                        a.trigger("drop", r.map(e,
                        function(e) {
                            return new n(s, e)
                        }))
                    }), a.dndOver = !1, a.elem.removeClass(i + "over"), !1)
                },
                _getTansferFiles: function(t, n) {
                    var r, i, o, a, s, u, c, l = [],
                    f = [];
                    for (r = t.items, i = t.files, c = !(!r || !r[0].webkitGetAsEntry), s = 0, u = i.length; u > s; s++) o = i[s],
                    a = r && r[s],
                    c && a.webkitGetAsEntry().isDirectory ? f.push(this._traverseDirectoryTree(a.webkitGetAsEntry(), l)) : l.push(o);
                    e.when.apply(e, f).done(function() {
                        l.length && n(l)
                    })
                },
                _traverseDirectoryTree: function(t, n) {
                    var r = e.Deferred(),
                    i = this;
                    return t.isFile ? t.file(function(e) {
                        n.push(e),
                        r.resolve()
                    }) : t.isDirectory && t.createReader().readEntries(function(t) {
                        var o, a = t.length,
                        s = [],
                        u = [];
                        for (o = 0; a > o; o++) s.push(i._traverseDirectoryTree(t[o], u));
                        e.when.apply(e, s).then(function() {
                            n.push.apply(n, u),
                            r.resolve()
                        },
                        r.reject)
                    }),
                    r.promise()
                },
                destroy: function() {
                    var e = this.elem;
                    e && (e.off("dragenter", this.dragEnterHandler), e.off("dragover", this.dragOverHandler), e.off("dragleave", this.dragLeaveHandler), e.off("drop", this.dropHandler), this.options.disableGlobalDnd && (r(document).off("dragover", this.dragOverHandler), r(document).off("drop", this.dropHandler)))
                }
            })
        }),
        t("runtime/html5/filepaste", ["base", "runtime/html5/runtime", "lib/file"],
        function(e, t, n) {
            return t.register("FilePaste", {
                init: function() {
                    var t, n, r, i, o = this.options,
                    a = this.elem = o.container,
                    s = ".*";
                    if (o.accept) {
                        for (t = [], n = 0, r = o.accept.length; r > n; n++) i = o.accept[n].mimeTypes,
                        i && t.push(i);
                        t.length && (s = t.join(","), s = s.replace(/,/g, "|").replace(/\*/g, ".*"))
                    }
                    this.accept = s = new RegExp(s, "i"),
                    this.hander = e.bindFn(this._pasteHander, this),
                    a.on("paste", this.hander)
                },
                _pasteHander: function(e) {
                    var t, r, i, o, a, s = [],
                    u = this.getRuid();
                    for (e = e.originalEvent || e, t = e.clipboardData.items, o = 0, a = t.length; a > o; o++) r = t[o],
                    "file" === r.kind && (i = r.getAsFile()) && s.push(new n(u, i));
                    s.length && (e.preventDefault(), e.stopPropagation(), this.trigger("paste", s))
                },
                destroy: function() {
                    this.elem.off("paste", this.hander)
                }
            })
        }),
        t("runtime/html5/filepicker", ["base", "runtime/html5/runtime"],
        function(e, t) {
            var n = e.$;
            return t.register("FilePicker", {
                init: function() {
                    var e, t, r, i, o = this.getRuntime().getContainer(),
                    a = this,
                    s = a.owner,
                    u = a.options,
                    c = this.label = n(document.createElement("label")),
                    l = this.input = n(document.createElement("input"));
                    if (l.attr("type", "file"), l.attr("name", u.name), l.addClass("webuploader-element-invisible"), c.on("click",
                    function() {
                        l.trigger("click")
                    }), c.css({
                        opacity: 0,
                        width: "100%",
                        height: "100%",
                        display: "block",
                        cursor: "pointer",
                        background: "#ffffff"
                    }), u.multiple && l.attr("multiple", "multiple"), u.accept && u.accept.length > 0) {
                        for (e = [], t = 0, r = u.accept.length; r > t; t++) e.push(u.accept[t].mimeTypes);
                        l.attr("accept", e.join(","))
                    }
                    o.append(l),
                    o.append(c),
                    i = function(e) {
                        s.trigger(e.type)
                    },
                    l.on("change",
                    function(e) {
                        var t, r = arguments.callee;
                        a.files = e.target.files,
                        t = this.cloneNode(!0),
                        t.value = null,
                        this.parentNode.replaceChild(t, this),
                        l.off(),
                        l = n(t).on("change", r).on("mouseenter mouseleave", i),
                        s.trigger("change")
                    }),
                    c.on("mouseenter mouseleave", i)
                },
                getFiles: function() {
                    return this.files
                },
                destroy: function() {
                    this.input.off(),
                    this.label.off()
                }
            })
        }),
        t("runtime/html5/util", ["base"],
        function(t) {
            var n = e.createObjectURL && e || e.URL && URL.revokeObjectURL && URL || e.webkitURL,
            r = t.noop,
            i = r;
            return n && (r = function() {
                return n.createObjectURL.apply(n, arguments)
            },
            i = function() {
                return n.revokeObjectURL.apply(n, arguments)
            }),
            {
                createObjectURL: r,
                revokeObjectURL: i,
                dataURL2Blob: function(e) {
                    var t, n, r, i, o, a;
                    for (a = e.split(","), t = ~a[0].indexOf("base64") ? atob(a[1]) : decodeURIComponent(a[1]), r = new ArrayBuffer(t.length), n = new Uint8Array(r), i = 0; i < t.length; i++) n[i] = t.charCodeAt(i);
                    return o = a[0].split(":")[1].split(";")[0],
                    this.arrayBufferToBlob(r, o)
                },
                dataURL2ArrayBuffer: function(e) {
                    var t, n, r, i;
                    for (i = e.split(","), t = ~i[0].indexOf("base64") ? atob(i[1]) : decodeURIComponent(i[1]), n = new Uint8Array(t.length), r = 0; r < t.length; r++) n[r] = t.charCodeAt(r);
                    return n.buffer
                },
                arrayBufferToBlob: function(t, n) {
                    var r, i = e.BlobBuilder || e.WebKitBlobBuilder;
                    return i ? (r = new i, r.append(t), r.getBlob(n)) : new Blob([t], n ? {
                        type: n
                    }: {})
                },
                canvasToDataUrl: function(e, t, n) {
                    return e.toDataURL(t, n / 100)
                },
                parseMeta: function(e, t) {
                    t(!1, {})
                },
                updateImageHead: function(e) {
                    return e
                }
            }
        }),
        t("runtime/html5/imagemeta", ["runtime/html5/util"],
        function(e) {
            var t;
            return t = {
                parsers: {
                    65505 : []
                },
                maxMetaDataSize: 262144,
                parse: function(e, t) {
                    var n = this,
                    r = new FileReader;
                    r.onload = function() {
                        t(!1, n._parse(this.result)),
                        r = r.onload = r.onerror = null
                    },
                    r.onerror = function(e) {
                        t(e.message),
                        r = r.onload = r.onerror = null
                    },
                    e = e.slice(0, n.maxMetaDataSize),
                    r.readAsArrayBuffer(e.getSource())
                },
                _parse: function(e, n) {
                    if (! (e.byteLength < 6)) {
                        var r, i, o, a, s = new DataView(e),
                        u = 2,
                        c = s.byteLength - 4,
                        l = u,
                        f = {};
                        if (65496 === s.getUint16(0)) {
                            for (; c > u && (r = s.getUint16(u), r >= 65504 && 65519 >= r || 65534 === r) && (i = s.getUint16(u + 2) + 2, !(u + i > s.byteLength));) {
                                if (o = t.parsers[r], !n && o) for (a = 0; a < o.length; a += 1) o[a].call(t, s, u, i, f);
                                u += i,
                                l = u
                            }
                            l > 6 && (f.imageHead = e.slice ? e.slice(2, l) : new Uint8Array(e).subarray(2, l))
                        }
                        return f
                    }
                },
                updateImageHead: function(e, t) {
                    var n, r, i, o = this._parse(e, !0);
                    return i = 2,
                    o.imageHead && (i = 2 + o.imageHead.byteLength),
                    r = e.slice ? e.slice(i) : new Uint8Array(e).subarray(i),
                    n = new Uint8Array(t.byteLength + 2 + r.byteLength),
                    n[0] = 255,
                    n[1] = 216,
                    n.set(new Uint8Array(t), 2),
                    n.set(new Uint8Array(r), t.byteLength + 2),
                    n.buffer
                }
            },
            e.parseMeta = function() {
                return t.parse.apply(t, arguments)
            },
            e.updateImageHead = function() {
                return t.updateImageHead.apply(t, arguments)
            },
            t
        }),
        t("runtime/html5/imagemeta/exif", ["base", "runtime/html5/imagemeta"],
        function(e, t) {
            var n = {};
            return n.ExifMap = function() {
                return this
            },
            n.ExifMap.prototype.map = {
                Orientation: 274
            },
            n.ExifMap.prototype.get = function(e) {
                return this[e] || this[this.map[e]]
            },
            n.exifTagTypes = {
                1 : {
                    getValue: function(e, t) {
                        return e.getUint8(t)
                    },
                    size: 1
                },
                2 : {
                    getValue: function(e, t) {
                        return String.fromCharCode(e.getUint8(t))
                    },
                    size: 1,
                    ascii: !0
                },
                3 : {
                    getValue: function(e, t, n) {
                        return e.getUint16(t, n)
                    },
                    size: 2
                },
                4 : {
                    getValue: function(e, t, n) {
                        return e.getUint32(t, n)
                    },
                    size: 4
                },
                5 : {
                    getValue: function(e, t, n) {
                        return e.getUint32(t, n) / e.getUint32(t + 4, n)
                    },
                    size: 8
                },
                9 : {
                    getValue: function(e, t, n) {
                        return e.getInt32(t, n)
                    },
                    size: 4
                },
                10 : {
                    getValue: function(e, t, n) {
                        return e.getInt32(t, n) / e.getInt32(t + 4, n)
                    },
                    size: 8
                }
            },
            n.exifTagTypes[7] = n.exifTagTypes[1],
            n.getExifValue = function(t, r, i, o, a, s) {
                var u, c, l, f, d, h, p = n.exifTagTypes[o];
                if (!p) return void e.log("Invalid Exif data: Invalid tag type.");
                if (u = p.size * a, c = u > 4 ? r + t.getUint32(i + 8, s) : i + 8, c + u > t.byteLength) return void e.log("Invalid Exif data: Invalid data offset.");
                if (1 === a) return p.getValue(t, c, s);
                for (l = [], f = 0; a > f; f += 1) l[f] = p.getValue(t, c + f * p.size, s);
                if (p.ascii) {
                    for (d = "", f = 0; f < l.length && (h = l[f], "\x00" !== h); f += 1) d += h;
                    return d
                }
                return l
            },
            n.parseExifTag = function(e, t, r, i, o) {
                var a = e.getUint16(r, i);
                o.exif[a] = n.getExifValue(e, t, r, e.getUint16(r + 2, i), e.getUint32(r + 4, i), i)
            },
            n.parseExifTags = function(t, n, r, i, o) {
                var a, s, u;
                if (r + 6 > t.byteLength) return void e.log("Invalid Exif data: Invalid directory offset.");
                if (a = t.getUint16(r, i), s = r + 2 + 12 * a, s + 4 > t.byteLength) return void e.log("Invalid Exif data: Invalid directory size.");
                for (u = 0; a > u; u += 1) this.parseExifTag(t, n, r + 2 + 12 * u, i, o);
                return t.getUint32(s, i)
            },
            n.parseExifData = function(t, r, i, o) {
                var a, s, u = r + 10;
                if (1165519206 === t.getUint32(r + 4)) {
                    if (u + 8 > t.byteLength) return void e.log("Invalid Exif data: Invalid segment size.");
                    if (0 !== t.getUint16(r + 8)) return void e.log("Invalid Exif data: Missing byte alignment offset.");
                    switch (t.getUint16(u)) {
                    case 18761:
                        a = !0;
                        break;
                    case 19789:
                        a = !1;
                        break;
                    default:
                        return void e.log("Invalid Exif data: Invalid byte alignment marker.")
                    }
                    if (42 !== t.getUint16(u + 2, a)) return void e.log("Invalid Exif data: Missing TIFF marker.");
                    s = t.getUint32(u + 4, a),
                    o.exif = new n.ExifMap,
                    s = n.parseExifTags(t, u, u + s, a, o)
                }
            },
            t.parsers[65505].push(n.parseExifData),
            n
        }),
        t("runtime/html5/jpegencoder", [],
        function() {
            function e(e) {
                function t(e) {
                    for (var t = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99], n = 0; 64 > n; n++) {
                        var r = E((t[n] * e + 50) / 100);
                        1 > r ? r = 1 : r > 255 && (r = 255),
                        k[M[n]] = r
                    }
                    for (var i = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], o = 0; 64 > o; o++) {
                        var a = E((i[o] * e + 50) / 100);
                        1 > a ? a = 1 : a > 255 && (a = 255),
                        S[M[o]] = a
                    }
                    for (var s = [1, 1.387039845, 1.306562965, 1.175875602, 1, .785694958, .5411961, .275899379], u = 0, c = 0; 8 > c; c++) for (var l = 0; 8 > l; l++) T[u] = 1 / (k[M[u]] * s[c] * s[l] * 8),
                    F[u] = 1 / (S[M[u]] * s[c] * s[l] * 8),
                    u++
                }
                function n(e, t) {
                    for (var n = 0,
                    r = 0,
                    i = new Array,
                    o = 1; 16 >= o; o++) {
                        for (var a = 1; a <= e[o]; a++) i[t[r]] = [],
                        i[t[r]][0] = n,
                        i[t[r]][1] = o,
                        r++,
                        n++;
                        n *= 2
                    }
                    return i
                }
                function r() {
                    _ = n(j, N),
                    y = n(V, G),
                    w = n($, Q),
                    x = n(J, W)
                }
                function i() {
                    for (var e = 1,
                    t = 2,
                    n = 1; 15 >= n; n++) {
                        for (var r = e; t > r; r++) U[32767 + r] = n,
                        A[32767 + r] = [],
                        A[32767 + r][1] = n,
                        A[32767 + r][0] = r;
                        for (var i = -(t - 1); - e >= i; i++) U[32767 + i] = n,
                        A[32767 + i] = [],
                        A[32767 + i][1] = n,
                        A[32767 + i][0] = t - 1 + i;
                        e <<= 1,
                        t <<= 1
                    }
                }
                function o() {
                    for (var e = 0; 256 > e; e++) H[e] = 19595 * e,
                    H[e + 256 >> 0] = 38470 * e,
                    H[e + 512 >> 0] = 7471 * e + 32768,
                    H[e + 768 >> 0] = -11059 * e,
                    H[e + 1024 >> 0] = -21709 * e,
                    H[e + 1280 >> 0] = 32768 * e + 8421375,
                    H[e + 1536 >> 0] = -27439 * e,
                    H[e + 1792 >> 0] = -5329 * e
                }
                function a(e) {
                    for (var t = e[0], n = e[1] - 1; n >= 0;) t & 1 << n && (C |= 1 << q),
                    n--,
                    q--,
                    0 > q && (255 == C ? (s(255), s(0)) : s(C), q = 7, C = 0)
                }
                function s(e) {
                    O.push(z[e])
                }
                function u(e) {
                    s(e >> 8 & 255),
                    s(255 & e)
                }
                function c(e, t) {
                    var n, r, i, o, a, s, u, c, l, f = 0,
                    d = 8,
                    h = 64;
                    for (l = 0; d > l; ++l) {
                        n = e[f],
                        r = e[f + 1],
                        i = e[f + 2],
                        o = e[f + 3],
                        a = e[f + 4],
                        s = e[f + 5],
                        u = e[f + 6],
                        c = e[f + 7];
                        var p = n + c,
                        g = n - c,
                        m = r + u,
                        v = r - u,
                        b = i + s,
                        _ = i - s,
                        y = o + a,
                        w = o - a,
                        x = p + y,
                        R = p - y,
                        E = m + b,
                        k = m - b;
                        e[f] = x + E,
                        e[f + 4] = x - E;
                        var S = .707106781 * (k + R);
                        e[f + 2] = R + S,
                        e[f + 6] = R - S,
                        x = w + _,
                        E = _ + v,
                        k = v + g;
                        var T = .382683433 * (x - k),
                        F = .5411961 * x + T,
                        A = 1.306562965 * k + T,
                        U = .707106781 * E,
                        I = g + U,
                        O = g - U;
                        e[f + 5] = O + F,
                        e[f + 3] = O - F,
                        e[f + 1] = I + A,
                        e[f + 7] = I - A,
                        f += 8
                    }
                    for (f = 0, l = 0; d > l; ++l) {
                        n = e[f],
                        r = e[f + 8],
                        i = e[f + 16],
                        o = e[f + 24],
                        a = e[f + 32],
                        s = e[f + 40],
                        u = e[f + 48],
                        c = e[f + 56];
                        var C = n + c,
                        q = n - c,
                        B = r + u,
                        L = r - u,
                        P = i + s,
                        z = i - s,
                        H = o + a,
                        M = o - a,
                        j = C + H,
                        N = C - H,
                        $ = B + P,
                        Q = B - P;
                        e[f] = j + $,
                        e[f + 32] = j - $;
                        var V = .707106781 * (Q + N);
                        e[f + 16] = N + V,
                        e[f + 48] = N - V,
                        j = M + z,
                        $ = z + L,
                        Q = L + q;
                        var G = .382683433 * (j - Q),
                        J = .5411961 * j + G,
                        W = 1.306562965 * Q + G,
                        X = .707106781 * $,
                        K = q + X,
                        Z = q - X;
                        e[f + 40] = Z + J,
                        e[f + 24] = Z - J,
                        e[f + 8] = K + W,
                        e[f + 56] = K - W,
                        f++
                    }
                    var Y;
                    for (l = 0; h > l; ++l) Y = e[l] * t[l],
                    D[l] = Y > 0 ? Y + .5 | 0 : Y - .5 | 0;
                    return D
                }
                function l() {
                    u(65504),
                    u(16),
                    s(74),
                    s(70),
                    s(73),
                    s(70),
                    s(0),
                    s(1),
                    s(1),
                    s(0),
                    u(1),
                    u(1),
                    s(0),
                    s(0)
                }
                function f(e, t) {
                    u(65472),
                    u(17),
                    s(8),
                    u(t),
                    u(e),
                    s(3),
                    s(1),
                    s(17),
                    s(0),
                    s(2),
                    s(17),
                    s(1),
                    s(3),
                    s(17),
                    s(1)
                }
                function d() {
                    u(65499),
                    u(132),
                    s(0);
                    for (var e = 0; 64 > e; e++) s(k[e]);
                    s(1);
                    for (var t = 0; 64 > t; t++) s(S[t])
                }
                function h() {
                    u(65476),
                    u(418),
                    s(0);
                    for (var e = 0; 16 > e; e++) s(j[e + 1]);
                    for (var t = 0; 11 >= t; t++) s(N[t]);
                    s(16);
                    for (var n = 0; 16 > n; n++) s($[n + 1]);
                    for (var r = 0; 161 >= r; r++) s(Q[r]);
                    s(1);
                    for (var i = 0; 16 > i; i++) s(V[i + 1]);
                    for (var o = 0; 11 >= o; o++) s(G[o]);
                    s(17);
                    for (var a = 0; 16 > a; a++) s(J[a + 1]);
                    for (var c = 0; 161 >= c; c++) s(W[c])
                }
                function p() {
                    u(65498),
                    u(12),
                    s(3),
                    s(1),
                    s(0),
                    s(2),
                    s(17),
                    s(3),
                    s(17),
                    s(0),
                    s(63),
                    s(0)
                }
                function g(e, t, n, r, i) {
                    for (var o, s = i[0], u = i[240], l = 16, f = 63, d = 64, h = c(e, t), p = 0; d > p; ++p) I[M[p]] = h[p];
                    var g = I[0] - n;
                    n = I[0],
                    0 == g ? a(r[0]) : (o = 32767 + g, a(r[U[o]]), a(A[o]));
                    for (var m = 63; m > 0 && 0 == I[m]; m--);
                    if (0 == m) return a(s),
                    n;
                    for (var v, b = 1; m >= b;) {
                        for (var _ = b; 0 == I[b] && m >= b; ++b);
                        var y = b - _;
                        if (y >= l) {
                            v = y >> 4;
                            for (var w = 1; v >= w; ++w) a(u);
                            y = 15 & y
                        }
                        o = 32767 + I[b],
                        a(i[(y << 4) + U[o]]),
                        a(A[o]),
                        b++
                    }
                    return m != f && a(s),
                    n
                }
                function m() {
                    for (var e = String.fromCharCode,
                    t = 0; 256 > t; t++) z[t] = e(t)
                }
                function v(e) {
                    if (0 >= e && (e = 1), e > 100 && (e = 100), R != e) {
                        var n = 0;
                        n = Math.floor(50 > e ? 5e3 / e: 200 - 2 * e),
                        t(n),
                        R = e
                    }
                }
                function b() {
                    e || (e = 50),
                    m(),
                    r(),
                    i(),
                    o(),
                    v(e)
                }
                var _, y, w, x, R, E = (Math.round, Math.floor),
                k = new Array(64),
                S = new Array(64),
                T = new Array(64),
                F = new Array(64),
                A = new Array(65535),
                U = new Array(65535),
                D = new Array(64),
                I = new Array(64),
                O = [],
                C = 0,
                q = 7,
                B = new Array(64),
                L = new Array(64),
                P = new Array(64),
                z = new Array(256),
                H = new Array(2048),
                M = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63],
                j = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
                N = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
                $ = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125],
                Q = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250],
                V = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
                G = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
                J = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119],
                W = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250];
                this.encode = function(e, t) {
                    t && v(t),
                    O = new Array,
                    C = 0,
                    q = 7,
                    u(65496),
                    l(),
                    d(),
                    f(e.width, e.height),
                    h(),
                    p();
                    var n = 0,
                    r = 0,
                    i = 0;
                    C = 0,
                    q = 7,
                    this.encode.displayName = "_encode_";
                    for (var o, s, c, m, b, R, E, k, S, A = e.data,
                    U = e.width,
                    D = e.height,
                    I = 4 * U,
                    z = 0; D > z;) {
                        for (o = 0; I > o;) {
                            for (b = I * z + o, R = b, E = -1, k = 0, S = 0; 64 > S; S++) k = S >> 3,
                            E = 4 * (7 & S),
                            R = b + k * I + E,
                            z + k >= D && (R -= I * (z + 1 + k - D)),
                            o + E >= I && (R -= o + E - I + 4),
                            s = A[R++],
                            c = A[R++],
                            m = A[R++],
                            B[S] = (H[s] + H[c + 256 >> 0] + H[m + 512 >> 0] >> 16) - 128,
                            L[S] = (H[s + 768 >> 0] + H[c + 1024 >> 0] + H[m + 1280 >> 0] >> 16) - 128,
                            P[S] = (H[s + 1280 >> 0] + H[c + 1536 >> 0] + H[m + 1792 >> 0] >> 16) - 128;
                            n = g(B, T, n, _, w),
                            r = g(L, F, r, y, x),
                            i = g(P, F, i, y, x),
                            o += 32
                        }
                        z += 8
                    }
                    if (q >= 0) {
                        var M = [];
                        M[1] = q + 1,
                        M[0] = (1 << q + 1) - 1,
                        a(M)
                    }
                    u(65497);
                    var j = "data:image/jpeg;base64," + btoa(O.join(""));
                    return O = [],
                    j
                },
                b()
            }
            return e.encode = function(t, n) {
                var r = new e(n);
                return r.encode(t)
            },
            e
        }),
        t("runtime/html5/androidpatch", ["runtime/html5/util", "runtime/html5/jpegencoder", "base"],
        function(e, t, n) {
            var r, i = e.canvasToDataUrl;
            e.canvasToDataUrl = function(e, o, a) {
                var s, u, c, l, f;
                return n.os.android ? ("image/jpeg" === o && "undefined" == typeof r && (l = i.apply(null, arguments), f = l.split(","), l = ~f[0].indexOf("base64") ? atob(f[1]) : decodeURIComponent(f[1]), l = l.substring(0, 2), r = 255 === l.charCodeAt(0) && 216 === l.charCodeAt(1)), "image/jpeg" !== o || r ? i.apply(null, arguments) : (u = e.width, c = e.height, s = e.getContext("2d"), t.encode(s.getImageData(0, 0, u, c), a))) : i.apply(null, arguments)
            }
        }),
        t("runtime/html5/image", ["base", "runtime/html5/runtime", "runtime/html5/util"],
        function(e, t, n) {
            var r = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D";
            return t.register("Image", {
                modified: !1,
                init: function() {
                    var e = this,
                    t = new Image;
                    t.onload = function() {
                        e._info = {
                            type: e.type,
                            width: this.width,
                            height: this.height
                        },
                        e._metas || "image/jpeg" !== e.type ? e.owner.trigger("load") : n.parseMeta(e._blob,
                        function(t, n) {
                            e._metas = n,
                            e.owner.trigger("load")
                        })
                    },
                    t.onerror = function() {
                        e.owner.trigger("error")
                    },
                    e._img = t
                },
                loadFromBlob: function(e) {
                    var t = this,
                    r = t._img;
                    t._blob = e,
                    t.type = e.type,
                    r.src = n.createObjectURL(e.getSource()),
                    t.owner.once("load",
                    function() {
                        n.revokeObjectURL(r.src)
                    })
                },
                resize: function(e, t) {
                    var n = this._canvas || (this._canvas = document.createElement("canvas"));
                    this._resize(this._img, n, e, t),
                    this._blob = null,
                    this.modified = !0,
                    this.owner.trigger("complete", "resize")
                },
                crop: function(e, t, n, r, i) {
                    var o = this._canvas || (this._canvas = document.createElement("canvas")),
                    a = this.options,
                    s = this._img,
                    u = s.naturalWidth,
                    c = s.naturalHeight,
                    l = this.getOrientation();
                    i = i || 1,
                    o.width = n,
                    o.height = r,
                    a.preserveHeaders || this._rotate2Orientaion(o, l),
                    this._renderImageToCanvas(o, s, -e, -t, u * i, c * i),
                    this._blob = null,
                    this.modified = !0,
                    this.owner.trigger("complete", "crop")
                },
                getAsBlob: function(e) {
                    var t, r = this._blob,
                    i = this.options;
                    if (e = e || this.type, this.modified || this.type !== e) {
                        if (t = this._canvas, "image/jpeg" === e) {
                            if (r = n.canvasToDataUrl(t, e, i.quality), i.preserveHeaders && this._metas && this._metas.imageHead) return r = n.dataURL2ArrayBuffer(r),
                            r = n.updateImageHead(r, this._metas.imageHead),
                            r = n.arrayBufferToBlob(r, e)
                        } else r = n.canvasToDataUrl(t, e);
                        r = n.dataURL2Blob(r)
                    }
                    return r
                },
                getAsDataUrl: function(e) {
                    var t = this.options;
                    return e = e || this.type,
                    "image/jpeg" === e ? n.canvasToDataUrl(this._canvas, e, t.quality) : this._canvas.toDataURL(e)
                },
                getOrientation: function() {
                    return this._metas && this._metas.exif && this._metas.exif.get("Orientation") || 1
                },
                info: function(e) {
                    return e ? (this._info = e, this) : this._info
                },
                meta: function(e) {
                    return e ? (this._meta = e, this) : this._meta
                },
                destroy: function() {
                    var e = this._canvas;
                    this._img.onload = null,
                    e && (e.getContext("2d").clearRect(0, 0, e.width, e.height), e.width = e.height = 0, this._canvas = null),
                    this._img.src = r,
                    this._img = this._blob = null
                },
                _resize: function(e, t, n, r) {
                    var i, o, a, s, u, c = this.options,
                    l = e.width,
                    f = e.height,
                    d = this.getOrientation();~ [5, 6, 7, 8].indexOf(d) && (n ^= r, r ^= n, n ^= r),
                    i = Math[c.crop ? "max": "min"](n / l, r / f),
                    c.allowMagnify || (i = Math.min(1, i)),
                    o = l * i,
                    a = f * i,
                    c.crop ? (t.width = n, t.height = r) : (t.width = o, t.height = a),
                    s = (t.width - o) / 2,
                    u = (t.height - a) / 2,
                    c.preserveHeaders || this._rotate2Orientaion(t, d),
                    this._renderImageToCanvas(t, e, s, u, o, a)
                },
                _rotate2Orientaion: function(e, t) {
                    var n = e.width,
                    r = e.height,
                    i = e.getContext("2d");
                    switch (t) {
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                        e.width = r,
                        e.height = n
                    }
                    switch (t) {
                    case 2:
                        i.translate(n, 0),
                        i.scale( - 1, 1);
                        break;
                    case 3:
                        i.translate(n, r),
                        i.rotate(Math.PI);
                        break;
                    case 4:
                        i.translate(0, r),
                        i.scale(1, -1);
                        break;
                    case 5:
                        i.rotate(.5 * Math.PI),
                        i.scale(1, -1);
                        break;
                    case 6:
                        i.rotate(.5 * Math.PI),
                        i.translate(0, -r);
                        break;
                    case 7:
                        i.rotate(.5 * Math.PI),
                        i.translate(n, -r),
                        i.scale( - 1, 1);
                        break;
                    case 8:
                        i.rotate( - .5 * Math.PI),
                        i.translate( - n, 0)
                    }
                },
                _renderImageToCanvas: function() {
                    function t(e, t, n) {
                        var r, i, o, a = document.createElement("canvas"),
                        s = a.getContext("2d"),
                        u = 0,
                        c = n,
                        l = n;
                        for (a.width = 1, a.height = n, s.drawImage(e, 0, 0), r = s.getImageData(0, 0, 1, n).data; l > u;) i = r[4 * (l - 1) + 3],
                        0 === i ? c = l: u = l,
                        l = c + u >> 1;
                        return o = l / n,
                        0 === o ? 1 : o
                    }
                    function n(e) {
                        var t, n, r = e.naturalWidth,
                        i = e.naturalHeight;
                        return r * i > 1048576 ? (t = document.createElement("canvas"), t.width = t.height = 1, n = t.getContext("2d"), n.drawImage(e, -r + 1, 0), 0 === n.getImageData(0, 0, 1, 1).data[3]) : !1
                    }
                    return e.os.ios ? e.os.ios >= 7 ?
                    function(e, n, r, i, o, a) {
                        var s = n.naturalWidth,
                        u = n.naturalHeight,
                        c = t(n, s, u);
                        return e.getContext("2d").drawImage(n, 0, 0, s * c, u * c, r, i, o, a)
                    }: function(e, r, i, o, a, s) {
                        var u, c, l, f, d, h, p, g = r.naturalWidth,
                        m = r.naturalHeight,
                        v = e.getContext("2d"),
                        b = n(r),
                        _ = "image/jpeg" === this.type,
                        y = 1024,
                        w = 0,
                        x = 0;
                        for (b && (g /= 2, m /= 2), v.save(), u = document.createElement("canvas"), u.width = u.height = y, c = u.getContext("2d"), l = _ ? t(r, g, m) : 1, f = Math.ceil(y * a / g), d = Math.ceil(y * s / m / l); m > w;) {
                            for (h = 0, p = 0; g > h;) c.clearRect(0, 0, y, y),
                            c.drawImage(r, -h, -w),
                            v.drawImage(u, 0, 0, y, y, i + p, o + x, f, d),
                            h += y,
                            p += f;
                            w += y,
                            x += d
                        }
                        v.restore(),
                        u = c = null
                    }: function(t) {
                        var n = e.slice(arguments, 1),
                        r = t.getContext("2d");
                        r.drawImage.apply(r, n)
                    }
                } ()
            })
        }),
        t("runtime/html5/transport", ["base", "runtime/html5/runtime"],
        function(e, t) {
            var n = e.noop,
            r = e.$;
            return t.register("Transport", {
                init: function() {
                    this._status = 0,
                    this._response = null
                },
                send: function() {
                    var t, n, i, o = this.owner,
                    a = this.options,
                    s = this._initAjax(),
                    u = o._blob,
                    c = a.server;
                    a.sendAsBinary ? (c += (/\?/.test(c) ? "&": "?") + r.param(o._formData), n = u.getSource()) : (t = new FormData, r.each(o._formData,
                    function(e, n) {
                        t.append(e, n)
                    }), t.append(a.fileVal, u.getSource(), a.filename || o._formData.name || "")),
                    a.withCredentials && "withCredentials" in s ? (s.open(a.method, c, !0), s.withCredentials = !0) : s.open(a.method, c),
                    this._setRequestHeader(s, a.headers),
                    n ? (s.overrideMimeType && s.overrideMimeType("application/octet-stream"), e.os.android ? (i = new FileReader, i.onload = function() {
                        s.send(this.result),
                        i = i.onload = null
                    },
                    i.readAsArrayBuffer(n)) : s.send(n)) : s.send(t)
                },
                getResponse: function() {
                    return this._response
                },
                getResponseAsJson: function() {
                    return this._parseJson(this._response)
                },
                getStatus: function() {
                    return this._status
                },
                abort: function() {
                    var e = this._xhr;
                    e && (e.upload.onprogress = n, e.onreadystatechange = n, e.abort(), this._xhr = e = null)
                },
                destroy: function() {
                    this.abort()
                },
                _initAjax: function() {
                    var e = this,
                    t = new XMLHttpRequest,
                    r = this.options;
                    return ! r.withCredentials || "withCredentials" in t || "undefined" == typeof XDomainRequest || (t = new XDomainRequest),
                    t.upload.onprogress = function(t) {
                        var n = 0;
                        return t.lengthComputable && (n = t.loaded / t.total),
                        e.trigger("progress", n)
                    },
                    t.onreadystatechange = function() {
                        return 4 === t.readyState ? (t.upload.onprogress = n, t.onreadystatechange = n, e._xhr = null, e._status = t.status, t.status >= 200 && t.status < 300 ? (e._response = t.responseText, e.trigger("load")) : t.status >= 500 && t.status < 600 ? (e._response = t.responseText, e.trigger("error", "server")) : e.trigger("error", e._status ? "http": "abort")) : void 0
                    },
                    e._xhr = t,
                    t
                },
                _setRequestHeader: function(e, t) {
                    r.each(t,
                    function(t, n) {
                        e.setRequestHeader(t, n)
                    })
                },
                _parseJson: function(e) {
                    var t;
                    try {
                        t = JSON.parse(e)
                    } catch(n) {
                        t = {}
                    }
                    return t
                }
            })
        }),
        t("runtime/html5/md5", ["runtime/html5/runtime"],
        function(e) {
            var t = function(e, t) {
                return e + t & 4294967295
            },
            n = function(e, n, r, i, o, a) {
                return n = t(t(n, e), t(i, a)),
                t(n << o | n >>> 32 - o, r)
            },
            r = function(e, t, r, i, o, a, s) {
                return n(t & r | ~t & i, e, t, o, a, s)
            },
            i = function(e, t, r, i, o, a, s) {
                return n(t & i | r & ~i, e, t, o, a, s)
            },
            o = function(e, t, r, i, o, a, s) {
                return n(t ^ r ^ i, e, t, o, a, s)
            },
            a = function(e, t, r, i, o, a, s) {
                return n(r ^ (t | ~i), e, t, o, a, s)
            },
            s = function(e, n) {
                var s = e[0],
                u = e[1],
                c = e[2],
                l = e[3];
                s = r(s, u, c, l, n[0], 7, -680876936),
                l = r(l, s, u, c, n[1], 12, -389564586),
                c = r(c, l, s, u, n[2], 17, 606105819),
                u = r(u, c, l, s, n[3], 22, -1044525330),
                s = r(s, u, c, l, n[4], 7, -176418897),
                l = r(l, s, u, c, n[5], 12, 1200080426),
                c = r(c, l, s, u, n[6], 17, -1473231341),
                u = r(u, c, l, s, n[7], 22, -45705983),
                s = r(s, u, c, l, n[8], 7, 1770035416),
                l = r(l, s, u, c, n[9], 12, -1958414417),
                c = r(c, l, s, u, n[10], 17, -42063),
                u = r(u, c, l, s, n[11], 22, -1990404162),
                s = r(s, u, c, l, n[12], 7, 1804603682),
                l = r(l, s, u, c, n[13], 12, -40341101),
                c = r(c, l, s, u, n[14], 17, -1502002290),
                u = r(u, c, l, s, n[15], 22, 1236535329),
                s = i(s, u, c, l, n[1], 5, -165796510),
                l = i(l, s, u, c, n[6], 9, -1069501632),
                c = i(c, l, s, u, n[11], 14, 643717713),
                u = i(u, c, l, s, n[0], 20, -373897302),
                s = i(s, u, c, l, n[5], 5, -701558691),
                l = i(l, s, u, c, n[10], 9, 38016083),
                c = i(c, l, s, u, n[15], 14, -660478335),
                u = i(u, c, l, s, n[4], 20, -405537848),
                s = i(s, u, c, l, n[9], 5, 568446438),
                l = i(l, s, u, c, n[14], 9, -1019803690),
                c = i(c, l, s, u, n[3], 14, -187363961),
                u = i(u, c, l, s, n[8], 20, 1163531501),
                s = i(s, u, c, l, n[13], 5, -1444681467),
                l = i(l, s, u, c, n[2], 9, -51403784),
                c = i(c, l, s, u, n[7], 14, 1735328473),
                u = i(u, c, l, s, n[12], 20, -1926607734),
                s = o(s, u, c, l, n[5], 4, -378558),
                l = o(l, s, u, c, n[8], 11, -2022574463),
                c = o(c, l, s, u, n[11], 16, 1839030562),
                u = o(u, c, l, s, n[14], 23, -35309556),
                s = o(s, u, c, l, n[1], 4, -1530992060),
                l = o(l, s, u, c, n[4], 11, 1272893353),
                c = o(c, l, s, u, n[7], 16, -155497632),
                u = o(u, c, l, s, n[10], 23, -1094730640),
                s = o(s, u, c, l, n[13], 4, 681279174),
                l = o(l, s, u, c, n[0], 11, -358537222),
                c = o(c, l, s, u, n[3], 16, -722521979),
                u = o(u, c, l, s, n[6], 23, 76029189),
                s = o(s, u, c, l, n[9], 4, -640364487),
                l = o(l, s, u, c, n[12], 11, -421815835),
                c = o(c, l, s, u, n[15], 16, 530742520),
                u = o(u, c, l, s, n[2], 23, -995338651),
                s = a(s, u, c, l, n[0], 6, -198630844),
                l = a(l, s, u, c, n[7], 10, 1126891415),
                c = a(c, l, s, u, n[14], 15, -1416354905),
                u = a(u, c, l, s, n[5], 21, -57434055),
                s = a(s, u, c, l, n[12], 6, 1700485571),
                l = a(l, s, u, c, n[3], 10, -1894986606),
                c = a(c, l, s, u, n[10], 15, -1051523),
                u = a(u, c, l, s, n[1], 21, -2054922799),
                s = a(s, u, c, l, n[8], 6, 1873313359),
                l = a(l, s, u, c, n[15], 10, -30611744),
                c = a(c, l, s, u, n[6], 15, -1560198380),
                u = a(u, c, l, s, n[13], 21, 1309151649),
                s = a(s, u, c, l, n[4], 6, -145523070),
                l = a(l, s, u, c, n[11], 10, -1120210379),
                c = a(c, l, s, u, n[2], 15, 718787259),
                u = a(u, c, l, s, n[9], 21, -343485551),
                e[0] = t(s, e[0]),
                e[1] = t(u, e[1]),
                e[2] = t(c, e[2]),
                e[3] = t(l, e[3])
            },
            u = function(e) {
                var t, n = [];
                for (t = 0; 64 > t; t += 4) n[t >> 2] = e.charCodeAt(t) + (e.charCodeAt(t + 1) << 8) + (e.charCodeAt(t + 2) << 16) + (e.charCodeAt(t + 3) << 24);
                return n
            },
            c = function(e) {
                var t, n = [];
                for (t = 0; 64 > t; t += 4) n[t >> 2] = e[t] + (e[t + 1] << 8) + (e[t + 2] << 16) + (e[t + 3] << 24);
                return n
            },
            l = function(e) {
                var t, n, r, i, o, a, c = e.length,
                l = [1732584193, -271733879, -1732584194, 271733878];
                for (t = 64; c >= t; t += 64) s(l, u(e.substring(t - 64, t)));
                for (e = e.substring(t - 64), n = e.length, r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; n > t; t += 1) r[t >> 2] |= e.charCodeAt(t) << (t % 4 << 3);
                if (r[t >> 2] |= 128 << (t % 4 << 3), t > 55) for (s(l, r), t = 0; 16 > t; t += 1) r[t] = 0;
                return i = 8 * c,
                i = i.toString(16).match(/(.*?)(.{0,8})$/),
                o = parseInt(i[2], 16),
                a = parseInt(i[1], 16) || 0,
                r[14] = o,
                r[15] = a,
                s(l, r),
                l
            },
            f = function(e) {
                var t, n, r, i, o, a, u = e.length,
                l = [1732584193, -271733879, -1732584194, 271733878];
                for (t = 64; u >= t; t += 64) s(l, c(e.subarray(t - 64, t)));
                for (e = u > t - 64 ? e.subarray(t - 64) : new Uint8Array(0), n = e.length, r = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], t = 0; n > t; t += 1) r[t >> 2] |= e[t] << (t % 4 << 3);
                if (r[t >> 2] |= 128 << (t % 4 << 3), t > 55) for (s(l, r), t = 0; 16 > t; t += 1) r[t] = 0;
                return i = 8 * u,
                i = i.toString(16).match(/(.*?)(.{0,8})$/),
                o = parseInt(i[2], 16),
                a = parseInt(i[1], 16) || 0,
                r[14] = o,
                r[15] = a,
                s(l, r),
                l
            },
            d = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"],
            h = function(e) {
                var t, n = "";
                for (t = 0; 4 > t; t += 1) n += d[e >> 8 * t + 4 & 15] + d[e >> 8 * t & 15];
                return n
            },
            p = function(e) {
                var t;
                for (t = 0; t < e.length; t += 1) e[t] = h(e[t]);
                return e.join("")
            },
            g = function(e) {
                return p(l(e))
            },
            m = function() {
                this.reset()
            };
            return "5d41402abc4b2a76b9719d911017c592" !== g("hello") && (t = function(e, t) {
                var n = (65535 & e) + (65535 & t),
                r = (e >> 16) + (t >> 16) + (n >> 16);
                return r << 16 | 65535 & n
            }),
            m.prototype.append = function(e) {
                return /[\u0080-\uFFFF]/.test(e) && (e = unescape(encodeURIComponent(e))),
                this.appendBinary(e),
                this
            },
            m.prototype.appendBinary = function(e) {
                this._buff += e,
                this._length += e.length;
                var t, n = this._buff.length;
                for (t = 64; n >= t; t += 64) s(this._state, u(this._buff.substring(t - 64, t)));
                return this._buff = this._buff.substr(t - 64),
                this
            },
            m.prototype.end = function(e) {
                var t, n, r = this._buff,
                i = r.length,
                o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                for (t = 0; i > t; t += 1) o[t >> 2] |= r.charCodeAt(t) << (t % 4 << 3);
                return this._finish(o, i),
                n = e ? this._state: p(this._state),
                this.reset(),
                n
            },
            m.prototype._finish = function(e, t) {
                var n, r, i, o = t;
                if (e[o >> 2] |= 128 << (o % 4 << 3), o > 55) for (s(this._state, e), o = 0; 16 > o; o += 1) e[o] = 0;
                n = 8 * this._length,
                n = n.toString(16).match(/(.*?)(.{0,8})$/),
                r = parseInt(n[2], 16),
                i = parseInt(n[1], 16) || 0,
                e[14] = r,
                e[15] = i,
                s(this._state, e)
            },
            m.prototype.reset = function() {
                return this._buff = "",
                this._length = 0,
                this._state = [1732584193, -271733879, -1732584194, 271733878],
                this
            },
            m.prototype.destroy = function() {
                delete this._state,
                delete this._buff,
                delete this._length
            },
            m.hash = function(e, t) { / [\u0080 - \uFFFF] / .test(e) && (e = unescape(encodeURIComponent(e)));
                var n = l(e);
                return t ? n: p(n)
            },
            m.hashBinary = function(e, t) {
                var n = l(e);
                return t ? n: p(n)
            },
            m.ArrayBuffer = function() {
                this.reset()
            },
            m.ArrayBuffer.prototype.append = function(e) {
                var t, n = this._concatArrayBuffer(this._buff, e),
                r = n.length;
                for (this._length += e.byteLength, t = 64; r >= t; t += 64) s(this._state, c(n.subarray(t - 64, t)));
                return this._buff = r > t - 64 ? n.subarray(t - 64) : new Uint8Array(0),
                this
            },
            m.ArrayBuffer.prototype.end = function(e) {
                var t, n, r = this._buff,
                i = r.length,
                o = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
                for (t = 0; i > t; t += 1) o[t >> 2] |= r[t] << (t % 4 << 3);
                return this._finish(o, i),
                n = e ? this._state: p(this._state),
                this.reset(),
                n
            },
            m.ArrayBuffer.prototype._finish = m.prototype._finish,
            m.ArrayBuffer.prototype.reset = function() {
                return this._buff = new Uint8Array(0),
                this._length = 0,
                this._state = [1732584193, -271733879, -1732584194, 271733878],
                this
            },
            m.ArrayBuffer.prototype.destroy = m.prototype.destroy,
            m.ArrayBuffer.prototype._concatArrayBuffer = function(e, t) {
                var n = e.length,
                r = new Uint8Array(n + t.byteLength);
                return r.set(e),
                r.set(new Uint8Array(t), n),
                r
            },
            m.ArrayBuffer.hash = function(e, t) {
                var n = f(new Uint8Array(e));
                return t ? n: p(n)
            },
            e.register("Md5", {
                init: function() {},
                loadFromBlob: function(e) {
                    var t, n, r = e.getSource(),
                    i = 2097152,
                    o = Math.ceil(r.size / i),
                    a = 0,
                    s = this.owner,
                    u = new m.ArrayBuffer,
                    c = this,
                    l = r.mozSlice || r.webkitSlice || r.slice;
                    n = new FileReader,
                    (t = function() {
                        var f, d;
                        f = a * i,
                        d = Math.min(f + i, r.size),
                        n.onload = function(t) {
                            u.append(t.target.result),
                            s.trigger("progress", {
                                total: e.size,
                                loaded: d
                            })
                        },
                        n.onloadend = function() {
                            n.onloadend = n.onload = null,
                            ++a < o ? setTimeout(t, 1) : setTimeout(function() {
                                s.trigger("load"),
                                c.result = u.end(),
                                t = e = r = u = null,
                                s.trigger("complete")
                            },
                            50)
                        },
                        n.readAsArrayBuffer(l.call(r, f, d))
                    })()
                },
                getResult: function() {
                    return this.result
                }
            })
        }),
        t("runtime/flash/runtime", ["base", "runtime/runtime", "runtime/compbase"],
        function(t, n, r) {
            function i() {
                var e;
                try {
                    e = navigator.plugins["Shockwave Flash"],
                    e = e.description
                } catch(t) {
                    try {
                        e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")
                    } catch(n) {
                        e = "0.0"
                    }
                }
                return e = e.match(/\d+/g),
                parseFloat(e[0] + "." + e[1], 10)
            }
            function o() {
                function r(e, t) {
                    var n, r, i = e.type || e;
                    n = i.split("::"),
                    r = n[0],
                    i = n[1],
                    "Ready" === i && r === c.uid ? c.trigger("ready") : o[r] && o[r].trigger(i.toLowerCase(), e, t)
                }
                var i = {},
                o = {},
                a = this.destroy,
                c = this,
                l = t.guid("webuploader_");
                n.apply(c, arguments),
                c.type = s,
                c.exec = function(e, n) {
                    var r, a = this,
                    s = a.uid,
                    l = t.slice(arguments, 2);
                    return o[s] = a,
                    u[e] && (i[s] || (i[s] = new u[e](a, c)), r = i[s], r[n]) ? r[n].apply(r, l) : c.flashExec.apply(a, arguments)
                },
                e[l] = function() {
                    var e = arguments;
                    setTimeout(function() {
                        r.apply(null, e)
                    },
                    1)
                },
                this.jsreciver = l,
                this.destroy = function() {
                    return a && a.apply(this, arguments)
                },
                this.flashExec = function(e, n) {
                    var r = c.getFlash(),
                    i = t.slice(arguments, 2);
                    return r.exec(this.uid, e, n, i)
                }
            }
            var a = t.$,
            s = "flash",
            u = {};
            return t.inherits(n, {
                constructor: o,
                init: function() {
                    var e, n = this.getContainer(),
                    r = this.options;
                    n.css({
                        position: "absolute",
                        top: "-8px",
                        left: "-8px",
                        width: "9px",
                        height: "9px",
                        overflow: "hidden"
                    }),
                    e = '<object id="' + this.uid + '" type="application/x-shockwave-flash" data="' + r.swf + '" ',
                    t.browser.ie && (e += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),
                    e += 'width="100%" height="100%" style="outline:0"><param name="movie" value="' + r.swf + '" /><param name="flashvars" value="uid=' + this.uid + "&jsreciver=" + this.jsreciver + '" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>',
                    n.html(e)
                },
                getFlash: function() {
                    return this._flash ? this._flash: (this._flash = a("#" + this.uid).get(0), this._flash)
                }
            }),
            o.register = function(e, n) {
                return n = u[e] = t.inherits(r, a.extend({
                    flashExec: function() {
                        var e = this.owner,
                        t = this.getRuntime();
                        return t.flashExec.apply(e, arguments)
                    }
                },
                n))
            },
            i() >= 11.4 && n.addRuntime(s, o),
            o
        }),
        t("runtime/flash/filepicker", ["base", "runtime/flash/runtime"],
        function(e, t) {
            var n = e.$;
            return t.register("FilePicker", {
                init: function(e) {
                    var t, r, i = n.extend({},
                    e);
                    for (t = i.accept && i.accept.length, r = 0; t > r; r++) i.accept[r].title || (i.accept[r].title = "Files");
                    delete i.button,
                    delete i.id,
                    delete i.container,
                    this.flashExec("FilePicker", "init", i)
                },
                destroy: function() {
                    this.flashExec("FilePicker", "destroy")
                }
            })
        }),
        t("runtime/flash/image", ["runtime/flash/runtime"],
        function(e) {
            return e.register("Image", {
                loadFromBlob: function(e) {
                    var t = this.owner;
                    t.info() && this.flashExec("Image", "info", t.info()),
                    t.meta() && this.flashExec("Image", "meta", t.meta()),
                    this.flashExec("Image", "loadFromBlob", e.uid)
                }
            })
        }),
        t("runtime/flash/transport", ["base", "runtime/flash/runtime", "runtime/client"],
        function(t, n, r) {
            var i = t.$;
            return n.register("Transport", {
                init: function() {
                    this._status = 0,
                    this._response = null,
                    this._responseJson = null
                },
                send: function() {
                    var e, t = this.owner,
                    n = this.options,
                    r = this._initAjax(),
                    o = t._blob,
                    a = n.server;
                    r.connectRuntime(o.ruid),
                    n.sendAsBinary ? (a += (/\?/.test(a) ? "&": "?") + i.param(t._formData), e = o.uid) : (i.each(t._formData,
                    function(e, t) {
                        r.exec("append", e, t)
                    }), r.exec("appendBlob", n.fileVal, o.uid, n.filename || t._formData.name || "")),
                    this._setRequestHeader(r, n.headers),
                    r.exec("send", {
                        method: n.method,
                        url: a,
                        forceURLStream: n.forceURLStream,
                        mimeType: "application/octet-stream"
                    },
                    e)
                },
                getStatus: function() {
                    return this._status
                },
                getResponse: function() {
                    return this._response || ""
                },
                getResponseAsJson: function() {
                    return this._responseJson
                },
                abort: function() {
                    var e = this._xhr;
                    e && (e.exec("abort"), e.destroy(), this._xhr = e = null)
                },
                destroy: function() {
                    this.abort()
                },
                _initAjax: function() {
                    var t = this,
                    n = new r("XMLHttpRequest");
                    return n.on("uploadprogress progress",
                    function(e) {
                        var n = e.loaded / e.total;
                        return n = Math.min(1, Math.max(0, n)),
                        t.trigger("progress", n)
                    }),
                    n.on("load",
                    function() {
                        var r, i = n.exec("getStatus"),
                        o = !1,
                        a = "";
                        return n.off(),
                        t._xhr = null,
                        i >= 200 && 300 > i ? o = !0 : i >= 500 && 600 > i ? (o = !0, a = "server") : a = "http",
                        o && (t._response = n.exec("getResponse"), t._response = decodeURIComponent(t._response), r = e.JSON && e.JSON.parse ||
                        function(e) {
                            try {
                                return new Function("return " + e).call()
                            } catch(t) {
                                return {}
                            }
                        },
                        t._responseJson = t._response ? r(t._response) : {}),
                        n.destroy(),
                        n = null,
                        a ? t.trigger("error", a) : t.trigger("load")
                    }),
                    n.on("error",
                    function() {
                        n.off(),
                        t._xhr = null,
                        t.trigger("error", "http")
                    }),
                    t._xhr = n,
                    n
                },
                _setRequestHeader: function(e, t) {
                    i.each(t,
                    function(t, n) {
                        e.exec("setRequestHeader", t, n)
                    })
                }
            })
        }),
        t("runtime/flash/blob", ["runtime/flash/runtime", "lib/blob"],
        function(e, t) {
            return e.register("Blob", {
                slice: function(e, n) {
                    var r = this.flashExec("Blob", "slice", e, n);
                    return new t(r.uid, r)
                }
            })
        }),
        t("runtime/flash/md5", ["runtime/flash/runtime"],
        function(e) {
            return e.register("Md5", {
                init: function() {},
                loadFromBlob: function(e) {
                    return this.flashExec("Md5", "loadFromBlob", e.uid)
                }
            })
        }),
        t("preset/all", ["base", "widgets/filednd", "widgets/filepaste", "widgets/filepicker", "widgets/image", "widgets/queue", "widgets/runtime", "widgets/upload", "widgets/validator", "widgets/md5", "runtime/html5/blob", "runtime/html5/dnd", "runtime/html5/filepaste", "runtime/html5/filepicker", "runtime/html5/imagemeta/exif", "runtime/html5/androidpatch", "runtime/html5/image", "runtime/html5/transport", "runtime/html5/md5", "runtime/flash/filepicker", "runtime/flash/image", "runtime/flash/transport", "runtime/flash/blob", "runtime/flash/md5"],
        function(e) {
            return e
        }),
        t("widgets/log", ["base", "uploader", "widgets/widget"],
        function(e, t) {
            function n(e) {
                var t = i.extend({},
                r, e),
                n = o.replace(/^(.*)\?/, "$1" + i.param(t)),
                a = new Image;
                a.src = n
            }
            var r, i = e.$,
            o = "https:" === location.protocol ? "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK/tb/pms/img/st.gif??": "http://static.tieba.baidu.com/tb/pms/img/st.gif??",
            a = (location.hostname || location.host || "protected").toLowerCase(),
            s = a && /baidu/i.exec(a);
            if (s) return r = {
                dv: 3,
                master: "webuploader",
                online: /test/.exec(a) ? 0 : 1,
                module: "",
                product: a,
                type: 0
            },
            t.register({
                name: "log",
                init: function() {
                    var e = this.owner,
                    t = 0,
                    r = 0;
                    e.on("error",
                    function(e) {
                        n({
                            type: 2,
                            c_error_code: e
                        })
                    }).on("uploadError",
                    function(e, t) {
                        n({
                            type: 2,
                            c_error_code: "UPLOAD_ERROR",
                            c_reason: "" + t
                        })
                    }).on("uploadComplete",
                    function(e) {
                        t++,
                        r += e.size
                    }).on("uploadFinished",
                    function() {
                        n({
                            c_count: t,
                            c_size: r
                        }),
                        t = r = 0
                    }),
                    n({
                        c_usage: 1
                    })
                }
            })
        }),
        t("webuploader", ["preset/all", "widgets/log"],
        function(e) {
            return e
        });
        var r = n;
        return r("webuploader")
    })
});;
/*!common:widget/js/ui/uploader/uploader.js*/
define("common:widget/js/ui/uploader/uploader",
function(e, i, t) {
    var a = e("common:widget/lib/jquery/jquery"),
    o = e("common:widget/js/ui/base/base"),
    r = e("common:widget/js/ui/dialog/dialog"),
    s = (e("common:widget/js/util/uri/uri"), e("common:widget/js/util/webuploader/webuploader")),
    l = o().extend({
        init: function(e) {
            this.target = a(this.target),
            this.url = e.url || "/submit/ajax/",
            this.maxSize = this.maxSize || 5,
            this.params = a.extend({
                cm: 100672
            },
            e.params),
            this.paramName = e.paramName || "image",
            this.imageOnly = e.imageOnly === !1 ? !1 : !0,
            this.multiple = e.multiple === !0 ? !0 : !1,
            this.initWebUploader()
        },
        initWebUploader: function() {
            var e = this;
            e.uploader = s.create({
                swf: "/static/swf/webuploader.swf",
                auto: !0,
                server: "/submit/ajax/",
                pick: e.multiple ? {
                    multiple: !0,
                    id: e.target.get(0)
                }: {
                    multiple: !1,
                    id: e.target.get(0)
                },
                resize: !1,
                formData: e.params,
                duplicate: !0,
                fileVal: e.paramName,
                accept: {
                    title: "Images",
                    extensions: "gif,jpg,jpeg,png,bmp",
                    mimeTypes: "image/*"
                }
            }),
            e.initUploadProgress()
        },
        initUploadProgress: function() {
            var e = this;
            e.uploader.on("beforeFileQueued",
            function(i) {
                return i.size > 1024 * e.maxSize * 1024 ? (r.alert("\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7" + e.maxSize + "M\u7684\u9650\u5236\u3002"), !1) : void 0
            }),
            e.uploader.on("uploadSuccess",
            function(i, t) {
                e.fire("complete", t)
            }),
            e.uploader.on("uploadProgress",
            function(i, t) {
                e.fire("progress", {
                    loaded: 100 * t,
                    total: 100
                })
            }),
            e.uploader.on("uploadError",
            function() {
                e.fire("error")
            })
        }
    });
    t.exports = l
});;
/*!common:widget/js/util/countdown/countdown.js*/
define("common:widget/js/util/countdown/countdown",
function(t, n, i) {
    function s(t, n) {
        var i = n - ("" + Math.abs(t)).length + 1;
        return Array(i > 0 ? i: 0).join(0) + t
    }
    var r = t("common:widget/js/util/tangram/tangram"),
    a = t("common:widget/js/ui/base/base"),
    e = a(function(t) {
        var n = this;
        this.dataArr = [],
        T.each(t || [],
        function() {
            this.seconds > 0 && n.dataArr.push(this)
        }),
        this._inter = null
    }).extend({
        callback: function(t) {
            var n = this.dateFormat || "#{HH}:#{mm}:#{ss}";
            this.elem.html(r.string(n).format(t))
        },
        execution: function() {
            var t = this,
            n = 0;
            r(this.dataArr).each(function(i) {
                var s = t._timer(--this.seconds);
                null == s ? (this.complete && this.complete.call(this), t.dataArr.splice(i, 1)) : (n++, this.callback && this.callback.call(this, s))
            }),
            0 === n && t.stop()
        },
        add: function(t) {
            return t.seconds > 0 && this.dataArr.push(t),
            this
        },
        remove: function(t) {
            var n = this.dataArr;
            return r(n).each(function(i) {
                this.name == t && n.splice(i, 1)
            }),
            this
        },
        start: function() {
            if (null === this._inter) {
                var t = this;
                this.execution(),
                this._inter = setInterval(function() {
                    t.execution()
                },
                1e3)
            }
            return this
        },
        stop: function() {
            clearInterval(this._inter),
            this._inter = null
        },
        _timer: function(t) {
            var n = {
                dd: Math.floor(t / 86400),
                HH: s(Math.floor(t / 3600) % 24, 2),
                mm: s(Math.floor(t / 60) % 60, 2),
                ss: s(Math.floor(t / 1) % 60, 2)
            };
            return n.dd <= 0 && n.HH <= 0 && n.mm <= 0 && n.ss <= 0 && (n = null),
            n
        }
    });
    i.exports = e
});;
/*!common:widget/js/util/img-resize/img-resize.js*/
define("common:widget/js/util/img-resize/img-resize",
function(i, t, r) {
    function e(i, t, r, e, a) {
        return s(i).each(function() {
            if (s(this).is("img")) {
                var i = s(this).hide(),
                c = t || i.attr("width"),
                u = r || i.attr("height"),
                g = a || i.attr("align") || "center",
                d = i.attr("res") || i.attr("src"),
                f = "img_" + ++s.guid;
                if (e = s.isFunction(e) ? e: function() {
                    this.remove()
                },
                h[d]) return i.css(o(h[d], c, u, g)).attr({
                    src: h[d].src
                }).show();
                var m = new Image;
                window[f] = m,
                m.onload = function() {
                    h[d] = {
                        width: this.width,
                        height: this.height,
                        src: this.src
                    };
                    var t = i.attr("id") || f;
                    i.after(m).remove(),
                    s(m).css(o(h[d], c, u, g)).show(),
                    m.id = t,
                    n(this, f)
                },
                m.onerror = function(t) {
                    e.call(i, t),
                    n(this, f)
                },
                m.src = d + "?k=" + f
            }
        })
    }
    function n(i, t) {
        i.onload = i.onerror = null,
        window[t] = null,
        i = null
    }
    function o(i, t, r, e) {
        var n = i.height,
        o = i.width;
        if (o > 0 && n > 0) {
            var h = Math.min(t / o, r / n);
            h = h > 1 ? 1 : h;
            var a = {
                width: o * h,
                height: n * h
            };
            return "center" == e && s.extend(a, {
                marginLeft: (t - o * h) / 2,
                marginTop: (r - n * h) / 2
            }),
            a
        }
        return {}
    }
    var s = i("common:widget/lib/jquery/jquery"),
    h = {};
    s.fn.imgResize = function(i, t, r, n) {
        return e(this, i, t, r, n)
    },
    r.exports = {
        resize: e,
        getSize: o
    }
});;
/*!common:widget/js/util/suffix-str/suffix-str.js*/
define("common:widget/js/util/suffix-str/suffix-str",
function(t, e, n) {
    var i = t("common:widget/js/util/tangram/string");
    n.exports = function(t, e, n) {
        var r = t || "";
        if ("string" == typeof t && Math.max(Math.floor(e), 0)) {
            n = "undefined" == typeof n ? "...": n.toString();
            var f = i.getByteLength(n);
            f > e && (n = i.subByte(n, e), f = i.getByteLength(n)),
            i.getByteLength(t) > e && (r = i.subByte(t, e - f) + n)
        }
        return r
    }
});;
/*!common:widget/js/util/xss/xss.js*/
define("common:widget/js/util/xss/xss",
function(e, t, r) {
    r.exports = {
        xssReplace: function(e) {
            if ("string" != typeof e) throw new Error("function xssReplace: param must be a string!");
            return e.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
        }
    }
});

</script>
<script type="text/javascript">
 require.async('common:widget/js/logic/ut/ut', function(UT){
       var b=  UT.report().c;
     //  alert(b);
document.writeln("%%"+b+"%%");
document.writeln("</center><br>");        
        });

</script>

</body>
</html>