if (top != self) {
    top.location.replace(document.location);
    alert("For security reasons, framing is not allowed; click OK to remove the frames.")
}
$(function () {
    $.ajaxSetup({
        cache: false
    })
});
$.fn.extend({
    fadeOutAndRemove: function (a) {
        return this.each(function () {
            var b = $(this);
            b.fadeOut("fast", function () {
                b.remove()
            })
        })
    },
    charCounter: function (a) {
        return this.each(function () {
            $(this).bind("blur focus keyup", function () {
                var e = a.min;
                var c = a.max;
                var f = a.setIsValid ||
                function () {};
                var g = this.value ? this.value.length : 0;
                var d = g > c * 0.8 ? "supernova" : g > c * 0.6 ? "hot" : g > c * 0.4 ? "warm" : "cool";
                var b = "";
                if (g == 0) {
                    b = "enter at least " + e + " characters";
                    f(false)
                } else {
                    if (g < e) {
                        b = (e - g) + " more to go..";
                        f(false)
                    } else {
                        b = (c - g) + " character" + (c - g != 1 ? "s" : "") + " left";
                        f(g <= c)
                    }
                }
                $(this).parents("form").find("span.text-counter").text(b).removeClass().addClass("text-counter").addClass(d)
            })
        })
    }
});

function moveScroller() {
    var a = function () {
        var b = $(window).scrollTop();
        var d = $("#scroller-anchor").offset({
            scroll: false
        }).top;
        var c = $("#scroller");
        if (b > d) {
            c.css({
                position: "fixed",
                top: "0px"
            })
        } else {
            if (b <= d) {
                c.css({
                    position: "relative",
                    top: ""
                })
            }
        }
    };
    $(window).scroll(a);
    a()
}
function enableSubmitButton(a) {
    setSubmitButtonDisabled(a, false)
}
function disableSubmitButton(a) {
    setSubmitButtonDisabled(a, true)
}
function setSubmitButtonDisabled(b, a) {
    $(b).find("input[type='submit']").attr("disabled", a ? "disabled" : "")
}
function setConfirmUnload(a, b) {
    window.onbeforeunload = a ?
    function () {
        if (b && $.trim(b.val())) {
            return a
        }
    } : null
}
function showAjaxError(a, c) {
    var d = $('<div class="error-notification supernovabg"><h2>' + c + "</h2>(click on this box to dismiss)</div>");
    var b = function () {
        $(".error-notification").fadeOut("fast", function () {
            $(this).remove()
        })
    };
    d.click(function (e) {
        b()
    });
    $(a).append(d);
    d.fadeIn("fast");
    setTimeout(b, 1000 * 30)
}
function styleCode() {
    var a = false;
    $("pre code").parent().each(function () {
        if (!$(this).hasClass("prettyprint")) {
            $(this).addClass("prettyprint");
            a = true
        }
    });
    if (a) {
        prettyPrint()
    }
}
function appendLoader(a) {
    $(a).append('<img class="ajax-loader" src="http://sstatic.net/so/img/ajax-loader.gif" title="loading..." alt="loading..." />')
}
function removeLoader() {
    $("img.ajax-loader").remove()
}
function savePreference(a, b, c) {
    $.post("/users/save-preference", {
        fkey: preffkey,
        key: a,
        value: b
    }, c)
}
var notify = function () {
    var d = false;
    var e = 0;
    var c = -1;
    var g = "m";
    var a = function (i) {
        if (!d) {
            $("#notify-container").append('<table id="notify-table"></table>');
            d = true
        }
        var h = "<tr" + (i.messageTypeId ? ' id="notify-' + i.messageTypeId + '"' : "");
        h += ' class="notify" style="display:none"><td class="notify">' + i.text;
        if (i.showProfile) {
            var j = escape("/users/" + i.userId);
            h += ' See your <a href="/messages/mark-as-read?messagetypeid=' + i.messageTypeId + "&returnurl=" + escape(j) + '">profile</a>.'
        }
        h += '</td><td class="notify-close"><a title="dismiss this notification" onclick="notify.close(';
        h += (i.messageTypeId ? i.messageTypeId : "") + ')">&times;</a></td></tr>';
        $("#notify-table").append(h)
    };
    var b = function (h) {
        $.cookie(g, (h ? h : "0"), {
            expires: 90,
            path: "/"
        })
    };
    var f = function () {
        var h = parseInt($.cookie(g));
        if (isNaN(h)) {
            h = 0
        }
        if (h < 5) {
            $(".module.newuser").show();
            b(++h)
        }
    };
    return {
        showFirstTime: function () {
//            if ($.cookie(g)) {
//                f()
//            } else {
                $(".module.newuser").show();
//                $("body").css("margin-top", "2.5em");
                $("body").css("margin-top", "50px");
                a({
                    messageTypeId: c,
                    text: 'If this website isn\'t translated correctly, please <a onclick="notify.closeFirstTime()">click here to help us correct it</a>!'
                });
                $(".notify").fadeIn("slow")
//            }
        },
        showMessages: function (h) {
            for (var j = 0; j < h.length; j++) {
                a(h[j])
            }
            $(".notify").fadeIn("slow");
            e = h.length
        },
        show: function (h) {
            $("body").css("margin-top", "2.5em");
            a({
                text: h
            });
            $(".notify").fadeIn("slow")
        },
        close: function (h) {
            var j;
            var i = 0;
            if (h && h != c) {
                $.post("/messages/mark-as-read", {
                    messagetypeid: h
                });
                j = $("#notify-" + h);
                if (e > 1) {
                    i = parseInt($("body").css("margin-top").match(/\d+/));
                    i = i - (i / e)
                }
            } else {
                if (h && h == c) {
                    b()
                }
                j = $(".notify")
            }
            j.children("td").css("border-bottom", "none").end().fadeOut("fast", function () {
                $("body").css("margin-top", i + "px");
                j.remove()
            })
        },
        closeFirstTime: function () {
            b();
            document.location = "?edit=1"
        }
    }
}();

function applyPrefs(c) {
    var b = $("#ignoredTags > a");
    var e = $("#interestingTags > a");
    if (c && b.length == 0 && e.length == 0) {
        return
    }
    $("div.question-summary").removeClass("tagged-ignored tagged-ignored-hidden tagged-interesting");
    var f = getTagsSelector(b);
    var d = getTagsSelector(e);
    if (f.length > 0) {
        var a = $("#hideIgnored").is(":checked") ? "tagged-ignored-hidden" : "tagged-ignored";
        $(f).parents("div.question-summary").addClass(a)
    }
    if (d.length > 0) {
        $(d).parents("div.question-summary").addClass("tagged-interesting")
    }
}
function getTagsSelector(c) {
    var b = "";
    var a = "";
    c.each(function () {
        var d = false;
        a = $(this).text();
        if (a.indexOf("#") > -1) {
            a = a.replace(/#/g, "ñ")
        }
        if (a.indexOf("+") > -1) {
            a = a.replace(/\+/g, "ç")
        }
        if (a.indexOf(".") > -1) {
            a = a.replace(/\./g, "û")
        }
        if (a.indexOf("*") > -1) {
            d = true
        }
        if (d) {
            b += "div.tags:regex(class, t-" + a.replace(/\*/g, ".*") + "),"
        } else {
            b += "div.t-" + a + ","
        }
    });
    if (b.length > 0) {
        b = b.substring(0, b.length - 1)
    }
    return b
}
function saveTags(d, a, g, h) {
    var b = $.trim($(d).val());
    var e = b.split(" ");
    var f = false;
    for (var c = 0; c < e.length; c++) {
        if ($.trim(e[c]).length != 0) {
            $(a).children().each(function () {
                if ($(this).text() == e[c]) {
                    $(this).fadeTo(500, 0.1).fadeTo(500, 1);
                    f = true;
                    return
                }
            });
            if (!f) {
                $(a).append("<a id='" + e[c] + "' href='/questions/tagged/" + e[c].replace(/\*/g, "") + "' class='" + h + "' title='click to delete this tag'>" + e[c] + "</a> ");
                initDeleteBindings(g)
            }
            f = false
        }
    }
    $(d).val("").focus();
    savePreference(g, $(a).text());
    applyPrefs()
}
function initTagPrefs() {
    initDeleteBindings(0);
    $("#ignoredAdd").click(function () {
        saveTags("#ignoredTag", "#ignoredTags", 25, "post-tag")
    });
    $("#interestingAdd").click(function () {
        saveTags("#interestingTag", "#interestingTags", 20, "post-tag")
    });
    $("#hideIgnored").click(function () {
        savePreference(30, $(this).is(":checked"));
        applyPrefs()
    });
    bindTagFilterAutoComplete("#ignoredTag");
    bindTagFilterAutoComplete("#interestingTag")
}
function initDeleteBindings(d) {
    var b = imagePath + "comment-del.png";
    var a = imagePath + "comment-del-hover.png";
    var c = "<img class='delete' src=\"" + b + "\" onmouseover=\"$(this).attr('src', '" + a + "')\" onmouseout=\"$(this).attr('src', '" + b;
    c += '\')" title="remove this tag" width="14" height="14" />';
    if (d == 0) {
        $("#ignoredTags > .post-tag").after(c)
    }
    if (d == 25) {
        $("#ignoredTags > .post-tag:last").after(c)
    }
    $("#ignoredTags > .delete").click(function () {
        $(this).prev().remove();
        $(this).remove();
        savePreference(25, $("#ignoredTags").text());
        applyPrefs()
    });
    if (d == 0) {
        $("#interestingTags > .post-tag").after(c)
    }
    if (d == 20) {
        $("#interestingTags > .post-tag:last").after(c)
    }
    $("#interestingTags > .delete").click(function () {
        $(this).prev().remove();
        $(this).remove();
        savePreference(20, $("#interestingTags").text());
        applyPrefs()
    })
}
function initBindingsAddSuggestedTag() {
    var b = "http://sstatic.net/so/img/add-small.png";
    var a = "http://sstatic.net/so/img/add-small-hover.png";
    var c = "<img class='add' src=\"" + b + "\" onmouseover=\"$(this).attr('src', '" + a + "')\" onmouseout=\"$(this).attr('src', '" + b;
    c += '\')" title="add this tag to interesting tags" />';
    $("#suggestedTags > .post-tag").after(c);
    $("#suggestedTags > .add").click(function () {
        $("#interestingTag").val($("#interestingTag").val() + $(this).prev().text() + " ")
    })
}
jQuery.cookie = function (b, j, m) {
    if (typeof j != "undefined") {
        m = m || {};
        if (j === null) {
            j = "";
            m.expires = -1
        }
        var e = "";
        if (m.expires && (typeof m.expires == "number" || m.expires.toUTCString)) {
            var f;
            if (typeof m.expires == "number") {
                f = new Date();
                f.setTime(f.getTime() + (m.expires * 24 * 60 * 60 * 1000))
            } else {
                f = m.expires
            }
            e = "; expires=" + f.toUTCString()
        }
        var l = m.path ? "; path=" + (m.path) : "";
        var g = m.domain ? "; domain=" + (m.domain) : "";
        var a = m.secure ? "; secure" : "";
        document.cookie = [b, "=", encodeURIComponent(j), e, l, g, a].join("")
    } else {
        var d = null;
        if (document.cookie && document.cookie != "") {
            var k = document.cookie.split(";");
            for (var h = 0; h < k.length; h++) {
                var c = jQuery.trim(k[h]);
                if (c.substring(0, b.length + 1) == (b + "=")) {
                    d = decodeURIComponent(c.substring(b.length + 1));
                    break
                }
            }
        }
        return d
    }
};
window.PR_SHOULD_USE_CONTINUATION = true;
window.PR_TAB_WIDTH = 8;
window.PR_normalizedHtml = window.PR = window.prettyPrintOne = window.prettyPrint = void 0;
window._pr_isIE6 = function () {
    var a = navigator && navigator.userAgent && navigator.userAgent.match(/\bMSIE ([678])\./);
    a = a ? +a[1] : false;
    window._pr_isIE6 = function () {
        return a
    };
    return a
};
(function () {
    var l = "break continue do else for if return while ";
    var D = l + "auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ";
    var v = D + "catch class delete false import new operator private protected public this throw true try typeof ";
    var o = v + "alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ";
    var G = v + "abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ";
    var al = G + "as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ";
    var F = v + "debugger eval export function get null set undefined var with Infinity NaN ";
    var y = "caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ";
    var Z = l + "and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ";
    var j = l + "alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ";
    var X = l + "case done elif esac eval fi function in local set then until ";
    var L = (o + al + F + y + Z + j + X);
    var N = "str";
    var K = "kwd";
    var m = "com";
    var ah = "typ";
    var V = "lit";
    var ae = "pun";
    var U = "pln";
    var p = "tag";
    var T = "dec";
    var ab = "src";
    var ak = "atn";
    var r = "atv";
    var ag = "nocode";
    var af = function () {
        var ao = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"];
        var ap = "(?:^^|[+-]";
        for (var an = 0; an < ao.length; ++an) {
            ap += "|" + ao[an].replace(/([^=<>:&a-z])/g, "\\$1")
        }
        ap += ")\\s*";
        return ap
    }();
    var R = /&/g;
    var W = /</g;
    var x = />/g;
    var J = /\"/g;

    function E(an) {
        return an.replace(R, "&amp;").replace(W, "&lt;").replace(x, "&gt;").replace(J, "&quot;")
    }
    function q(an) {
        return an.replace(R, "&amp;").replace(W, "&lt;").replace(x, "&gt;")
    }
    var c = /&lt;/g;
    var C = /&gt;/g;
    var b = /&apos;/g;
    var h = /&quot;/g;
    var am = /&amp;/g;
    var I = /&nbsp;/g;

    function s(aq) {
        var at = aq.indexOf("&");
        if (at < 0) {
            return aq
        }
        for (--at;
        (at = aq.indexOf("&#", at + 1)) >= 0;) {
            var an = aq.indexOf(";", at);
            if (an >= 0) {
                var ap = aq.substring(at + 3, an);
                var ar = 10;
                if (ap && ap.charAt(0) === "x") {
                    ap = ap.substring(1);
                    ar = 16
                }
                var ao = parseInt(ap, ar);
                if (!isNaN(ao)) {
                    aq = (aq.substring(0, at) + String.fromCharCode(ao) + aq.substring(an + 1))
                }
            }
        }
        return aq.replace(c, "<").replace(C, ">").replace(b, "'").replace(h, '"').replace(I, " ").replace(am, "&")
    }
    function Q(an) {
        return "XMP" === an.tagName
    }
    var Y = /[\r\n]/g;

    function z(ap, ao) {
        if ("PRE" === ap.tagName) {
            return true
        }
        if (!Y.test(ao)) {
            return true
        }
        var an = "";
        if (ap.currentStyle) {
            an = ap.currentStyle.whiteSpace
        } else {
            if (window.getComputedStyle) {
                an = window.getComputedStyle(ap, null).whiteSpace
            }
        }
        return !an || an === "pre"
    }
    function aj(ar, ap) {
        switch (ar.nodeType) {
        case 1:
            var ao = ar.tagName.toLowerCase();
            ap.push("<", ao);
            for (var aq = 0; aq < ar.attributes.length; ++aq) {
                var an = ar.attributes[aq];
                if (!an.specified) {
                    continue
                }
                ap.push(" ");
                aj(an, ap)
            }
            ap.push(">");
            for (var at = ar.firstChild; at; at = at.nextSibling) {
                aj(at, ap)
            }
            if (ar.firstChild || !/^(?:br|link|img)$/.test(ao)) {
                ap.push("</", ao, ">")
            }
            break;
        case 2:
            ap.push(ar.name.toLowerCase(), '="', E(ar.value), '"');
            break;
        case 3:
        case 4:
            ap.push(q(ar.nodeValue));
            break
        }
    }
    function n(au) {
        var ay = 0;
        var an = false;
        var ax = false;
        for (var aq = 0, ap = au.length; aq < ap; ++aq) {
            var az = au[aq];
            if (az.ignoreCase) {
                ax = true
            } else {
                if (/[a-z]/i.test(az.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
                    an = true;
                    ax = false;
                    break
                }
            }
        }
        function aw(aA) {
            if (aA.charAt(0) !== "\\") {
                return aA.charCodeAt(0)
            }
            switch (aA.charAt(1)) {
            case "b":
                return 8;
            case "t":
                return 9;
            case "n":
                return 10;
            case "v":
                return 11;
            case "f":
                return 12;
            case "r":
                return 13;
            case "u":
            case "x":
                return parseInt(aA.substring(2), 16) || aA.charCodeAt(1);
            case "0":
            case "1":
            case "2":
            case "3":
            case "4":
            case "5":
            case "6":
            case "7":
                return parseInt(aA.substring(1), 8);
            default:
                return aA.charCodeAt(1)
            }
        }
        function ao(aA) {
            if (aA < 32) {
                return (aA < 16 ? "\\x0" : "\\x") + aA.toString(16)
            }
            var aB = String.fromCharCode(aA);
            if (aB === "\\" || aB === "-" || aB === "[" || aB === "]") {
                aB = "\\" + aB
            }
            return aB
        }
        function at(aH) {
            var aL = aH.substring(1, aH.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g"));
            var aF = [];
            var aA = [];
            var aJ = aL[0] === "^";
            for (var aM = aJ ? 1 : 0, aE = aL.length; aM < aE; ++aM) {
                var aC = aL[aM];
                switch (aC) {
                case "\\B":
                case "\\b":
                case "\\D":
                case "\\d":
                case "\\S":
                case "\\s":
                case "\\W":
                case "\\w":
                    aF.push(aC);
                    continue
                }
                var aB = aw(aC);
                var aG;
                if (aM + 2 < aE && "-" === aL[aM + 1]) {
                    aG = aw(aL[aM + 2]);
                    aM += 2
                } else {
                    aG = aB
                }
                aA.push([aB, aG]);
                if (! (aG < 65 || aB > 122)) {
                    if (! (aG < 65 || aB > 90)) {
                        aA.push([Math.max(65, aB) | 32, Math.min(aG, 90) | 32])
                    }
                    if (! (aG < 97 || aB > 122)) {
                        aA.push([Math.max(97, aB) & ~32, Math.min(aG, 122) & ~32])
                    }
                }
            }
            aA.sort(function (aP, aO) {
                return (aP[0] - aO[0]) || (aO[1] - aP[1])
            });
            var aD = [];
            var aK = [NaN, NaN];
            for (var aM = 0; aM < aA.length; ++aM) {
                var aN = aA[aM];
                if (aN[0] <= aK[1] + 1) {
                    aK[1] = Math.max(aK[1], aN[1])
                } else {
                    aD.push(aK = aN)
                }
            }
            var aI = ["["];
            if (aJ) {
                aI.push("^")
            }
            aI.push.apply(aI, aF);
            for (var aM = 0; aM < aD.length; ++aM) {
                var aN = aD[aM];
                aI.push(ao(aN[0]));
                if (aN[1] > aN[0]) {
                    if (aN[1] + 1 > aN[0]) {
                        aI.push("-")
                    }
                    aI.push(ao(aN[1]))
                }
            }
            aI.push("]");
            return aI.join("")
        }
        function ar(aG) {
            var aE = aG.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g"));
            var aC = aE.length;
            var aI = [];
            for (var aF = 0, aH = 0; aF < aC; ++aF) {
                var aB = aE[aF];
                if (aB === "(") {
                    ++aH
                } else {
                    if ("\\" === aB.charAt(0)) {
                        var aA = +aB.substring(1);
                        if (aA && aA <= aH) {
                            aI[aA] = -1
                        }
                    }
                }
            }
            for (var aF = 1; aF < aI.length; ++aF) {
                if (-1 === aI[aF]) {
                    aI[aF] = ++ay
                }
            }
            for (var aF = 0, aH = 0; aF < aC; ++aF) {
                var aB = aE[aF];
                if (aB === "(") {
                    ++aH;
                    if (aI[aH] === undefined) {
                        aE[aF] = "(?:"
                    }
                } else {
                    if ("\\" === aB.charAt(0)) {
                        var aA = +aB.substring(1);
                        if (aA && aA <= aH) {
                            aE[aF] = "\\" + aI[aH]
                        }
                    }
                }
            }
            for (var aF = 0, aH = 0; aF < aC; ++aF) {
                if ("^" === aE[aF] && "^" !== aE[aF + 1]) {
                    aE[aF] = ""
                }
            }
            if (aG.ignoreCase && an) {
                for (var aF = 0; aF < aC; ++aF) {
                    var aB = aE[aF];
                    var aD = aB.charAt(0);
                    if (aB.length >= 2 && aD === "[") {
                        aE[aF] = at(aB)
                    } else {
                        if (aD !== "\\") {
                            aE[aF] = aB.replace(/[a-zA-Z]/g, function (aJ) {
                                var aK = aJ.charCodeAt(0);
                                return "[" + String.fromCharCode(aK & ~32, aK | 32) + "]"
                            })
                        }
                    }
                }
            }
            return aE.join("")
        }
        var av = [];
        for (var aq = 0, ap = au.length; aq < ap; ++aq) {
            var az = au[aq];
            if (az.global || az.multiline) {
                throw new Error("" + az)
            }
            av.push("(?:" + ar(az) + ")")
        }
        return new RegExp(av.join("|"), ax ? "gi" : "g")
    }
    var ai = null;

    function a(aq) {
        if (null === ai) {
            var ao = document.createElement("PRE");
            ao.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
            ai = !/</.test(ao.innerHTML)
        }
        if (ai) {
            var ap = aq.innerHTML;
            if (Q(aq)) {
                ap = q(ap)
            } else {
                if (!z(aq, ap)) {
                    ap = ap.replace(/(<br\s*\/?>)[\r\n]+/g, "$1").replace(/(?:[\r\n]+[ \t]*)+/g, " ")
                }
            }
            return ap
        }
        var an = [];
        for (var ar = aq.firstChild; ar; ar = ar.nextSibling) {
            aj(ar, an)
        }
        return an.join("")
    }
    function ad(ap) {
        var an = "                ";
        var ao = 0;
        return function (au) {
            var ar = null;
            var ax = 0;
            for (var at = 0, aw = au.length; at < aw; ++at) {
                var av = au.charAt(at);
                switch (av) {
                case "\t":
                    if (!ar) {
                        ar = []
                    }
                    ar.push(au.substring(ax, at));
                    var aq = ap - (ao % ap);
                    ao += aq;
                    for (; aq >= 0; aq -= an.length) {
                        ar.push(an.substring(0, aq))
                    }
                    ax = at + 1;
                    break;
                case "\n":
                    ao = 0;
                    break;
                default:
                    ++ao
                }
            }
            if (!ar) {
                return au
            }
            ar.push(au.substring(ax));
            return ar.join("")
        }
    }
    var P = new RegExp("[^<]+|<!--[\\s\\S]*?-->|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<", "g");
    var u = /^<\!--/;
    var S = /^<!\[CDATA\[/;
    var t = /^<br\b/i;
    var f = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;

    function B(aA) {
        var aw = aA.match(P);
        var az = [];
        var aq = 0;
        var an = [];
        if (aw) {
            for (var av = 0, ap = aw.length; av < ap; ++av) {
                var ax = aw[av];
                if (ax.length > 1 && ax.charAt(0) === "<") {
                    if (u.test(ax)) {
                        continue
                    }
                    if (S.test(ax)) {
                        az.push(ax.substring(9, ax.length - 3));
                        aq += ax.length - 12
                    } else {
                        if (t.test(ax)) {
                            az.push("\n");
                            ++aq
                        } else {
                            if (ax.indexOf(ag) >= 0 && aa(ax)) {
                                var ao = ax.match(f)[2];
                                var au = 1;
                                var at;
                                end_tag_loop: for (at = av + 1; at < ap; ++at) {
                                    var ay = aw[at].match(f);
                                    if (ay && ay[2] === ao) {
                                        if (ay[1] === "/") {
                                            if (--au === 0) {
                                                break end_tag_loop
                                            }
                                        } else {
                                            ++au
                                        }
                                    }
                                }
                                if (at < ap) {
                                    an.push(aq, aw.slice(av, at + 1).join(""));
                                    av = at
                                } else {
                                    an.push(aq, ax)
                                }
                            } else {
                                an.push(aq, ax)
                            }
                        }
                    }
                } else {
                    var ar = s(ax);
                    az.push(ar);
                    aq += ar.length
                }
            }
        }
        return {
            source: az.join(""),
            tags: an
        }
    }
    function aa(an) {
        return !!an.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)
    }
    function M(an, ap, ar, ao) {
        if (!ap) {
            return
        }
        var aq = {
            source: ap,
            basePos: an
        };
        ar(aq);
        ao.push.apply(ao, aq.decorations)
    }
    function i(ap, ao) {
        var an = {};
        var aq;
        (function () {
            var aA = ap.concat(ao);
            var aE = [];
            var aD = {};
            for (var ay = 0, aw = aA.length; ay < aw; ++ay) {
                var av = aA[ay];
                var az = av[3];
                if (az) {
                    for (var aB = az.length; --aB >= 0;) {
                        an[az.charAt(aB)] = av
                    }
                }
                var aC = av[1];
                var ax = "" + aC;
                if (!aD.hasOwnProperty(ax)) {
                    aE.push(aC);
                    aD[ax] = null
                }
            }
            aE.push(/[\0-\uffff]/);
            aq = n(aE)
        })();
        var au = ao.length;
        var at = /\S/;
        var ar = function (aE) {
            var aw = aE.source,
                av = aE.basePos;
            var aA = [av, U];
            var aC = 0;
            var aK = aw.match(aq) || [];
            var aG = {};
            for (var aB = 0, aN = aK.length; aB < aN; ++aB) {
                var aD = aK[aB];
                var aM = aG[aD];
                var aF = void 0;
                var aJ;
                if (typeof aM === "string") {
                    aJ = false
                } else {
                    var ax = an[aD.charAt(0)];
                    if (ax) {
                        aF = aD.match(ax[1]);
                        aM = ax[0]
                    } else {
                        for (var aL = 0; aL < au; ++aL) {
                            ax = ao[aL];
                            aF = aD.match(ax[1]);
                            if (aF) {
                                aM = ax[0];
                                break
                            }
                        }
                        if (!aF) {
                            aM = U
                        }
                    }
                    aJ = aM.length >= 5 && "lang-" === aM.substring(0, 5);
                    if (aJ && !(aF && typeof aF[1] === "string")) {
                        aJ = false;
                        aM = ab
                    }
                    if (!aJ) {
                        aG[aD] = aM
                    }
                }
                var ay = aC;
                aC += aD.length;
                if (!aJ) {
                    aA.push(av + ay, aM)
                } else {
                    var aI = aF[1];
                    var aH = aD.indexOf(aI);
                    var az = aH + aI.length;
                    if (aF[2]) {
                        az = aD.length - aF[2].length;
                        aH = az - aI.length
                    }
                    var aO = aM.substring(5);
                    M(av + ay, aD.substring(0, aH), ar, aA);
                    M(av + ay + aH, aI, w(aO, aI), aA);
                    M(av + ay + az, aD.substring(az), ar, aA)
                }
            }
            aE.decorations = aA
        };
        return ar
    }
    function k(ao) {
        var aq = [],
            an = [];
        if (ao.tripleQuotedStrings) {
            aq.push([N, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""])
        } else {
            if (ao.multiLineStrings) {
                aq.push([N, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"])
            } else {
                aq.push([N, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"])
            }
        }
        if (ao.verbatimStrings) {
            an.push([N, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null])
        }
        if (ao.hashComments) {
            if (ao.cStyleComments) {
                aq.push([m, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
                an.push([N, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null])
            } else {
                aq.push([m, /^#[^\r\n]*/, null, "#"])
            }
        }
        if (ao.cStyleComments) {
            an.push([m, /^\/\/[^\r\n]*/, null]);
            an.push([m, /^\/\*[\s\S]*?(?:\*\/|$)/, null])
        }
        if (ao.regexLiterals) {
            var ar = ("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");
            an.push(["lang-regex", new RegExp("^" + af + "(" + ar + ")")])
        }
        var ap = ao.keywords.replace(/^\s+|\s+$/g, "");
        if (ap.length) {
            an.push([K, new RegExp("^(?:" + ap.replace(/\s+/g, "|") + ")\\b"), null])
        }
        aq.push([U, /^\s+/, null, " \r\n\t\xA0"]);
        an.push([V, /^@[a-z_$][a-z_$@0-9]*/i, null], [ah, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [U, /^[a-z_$][a-z_$@0-9]*/i, null], [V, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [ae, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
        return i(aq, an)
    }
    var ac = k({
        keywords: L,
        hashComments: true,
        cStyleComments: true,
        multiLineStrings: true,
        regexLiterals: true
    });

    function O(ar) {
        var az = ar.source;
        var aq = ar.extractedTags;
        var ap = ar.decorations;
        var aw = [];
        var au = 0;
        var aE = null;
        var ax = null;
        var ao = 0;
        var aD = 0;
        var aF = ad(window.PR_TAB_WIDTH);
        var aB = /([\r\n ]) /g;
        var at = /(^| ) /gm;
        var aA = /\r\n?|\n/g;
        var av = /[ \r\n]$/;
        var an = true;

        function ay(aG) {
            if (aG > au) {
                if (aE && aE !== ax) {
                    aw.push("</span>");
                    aE = null
                }
                if (!aE && ax) {
                    aE = ax;
                    aw.push('<span class="', aE, '">')
                }
                var aH = q(aF(az.substring(au, aG))).replace(an ? at : aB, "$1&nbsp;");
                an = av.test(aH);
                var aI = window._pr_isIE6() ? "&nbsp;<br />" : "<br />";
                aw.push(aH.replace(aA, aI));
                au = aG
            }
        }
        while (true) {
            var aC;
            if (ao < aq.length) {
                if (aD < ap.length) {
                    aC = aq[ao] <= ap[aD]
                } else {
                    aC = true
                }
            } else {
                aC = false
            }
            if (aC) {
                ay(aq[ao]);
                if (aE) {
                    aw.push("</span>");
                    aE = null
                }
                aw.push(aq[ao + 1]);
                ao += 2
            } else {
                if (aD < ap.length) {
                    ay(ap[aD]);
                    ax = ap[aD + 1];
                    aD += 2
                } else {
                    break
                }
            }
        }
        ay(az.length);
        if (aE) {
            aw.push("</span>")
        }
        ar.prettyPrintedHtml = aw.join("")
    }
    var A = {};

    function e(ap, aq) {
        for (var an = aq.length; --an >= 0;) {
            var ao = aq[an];
            if (!A.hasOwnProperty(ao)) {
                A[ao] = ap
            } else {
                if ("console" in window) {
                    console.warn("cannot override language handler %s", ao)
                }
            }
        }
    }
    function w(ao, an) {
        if (! (ao && A.hasOwnProperty(ao))) {
            ao = /^\s*</.test(an) ? "default-markup" : "default-code"
        }
        return A[ao]
    }
    e(ac, ["default-code"]);
    e(i([], [
        [U, /^[^<?]+/],
        [T, /^<!\w[^>]*(?:>|$)/],
        [m, /^<\!--[\s\S]*?(?:-\->|$)/],
        ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/],
        ["lang-", /^<%([\s\S]+?)(?:%>|$)/],
        [ae, /^(?:<[%?]|[%?]>)/],
        ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
        ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
        ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
        ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]
    ]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
    e(i([
        [U, /^[\s]+/, null, " \t\r\n"],
        [r, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]
    ], [
        [p, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
        [ak, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
        ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
        [ae, /^[=<>\/]+/],
        ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i],
        ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i],
        ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i],
        ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i],
        ["lang-css", /^style\s*=\s*\'([^\']+)\'/i],
        ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]
    ]), ["in.tag"]);
    e(i([], [
        [r, /^[\s\S]+/]
    ]), ["uq.val"]);
    e(k({
        keywords: o,
        hashComments: true,
        cStyleComments: true
    }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
    e(k({
        keywords: "null true false"
    }), ["json"]);
    e(k({
        keywords: al,
        hashComments: true,
        cStyleComments: true,
        verbatimStrings: true
    }), ["cs"]);
    e(k({
        keywords: G,
        cStyleComments: true
    }), ["java"]);
    e(k({
        keywords: X,
        hashComments: true,
        multiLineStrings: true
    }), ["bsh", "csh", "sh"]);
    e(k({
        keywords: Z,
        hashComments: true,
        multiLineStrings: true,
        tripleQuotedStrings: true
    }), ["cv", "py"]);
    e(k({
        keywords: y,
        hashComments: true,
        multiLineStrings: true,
        regexLiterals: true
    }), ["perl", "pl", "pm"]);
    e(k({
        keywords: j,
        hashComments: true,
        multiLineStrings: true,
        regexLiterals: true
    }), ["rb"]);
    e(k({
        keywords: F,
        cStyleComments: true,
        regexLiterals: true
    }), ["js"]);
    e(i([], [
        [N, /^[\s\S]+/]
    ]), ["regex"]);

    function g(ap) {
        var ar = ap.sourceCodeHtml;
        var ao = ap.langExtension;
        ap.prettyPrintedHtml = ar;
        try {
            var at = B(ar);
            var an = at.source;
            ap.source = an;
            ap.basePos = 0;
            ap.extractedTags = at.tags;
            w(ao, an)(ap);
            O(ap)
        } catch(aq) {
            if ("console" in window) {
                console.log(aq);
                console.trace()
            }
        }
    }
    function H(ap, ao) {
        var an = {
            sourceCodeHtml: ap,
            langExtension: ao
        };
        g(an);
        return an.prettyPrintedHtml
    }
    function d(aA) {
        var az = window._pr_isIE6();
        var at = az === 6 ? "\r\n" : "\r";
        var ax = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")];
        var ao = [];
        for (var aw = 0; aw < ax.length; ++aw) {
            for (var av = 0, aq = ax[aw].length; av < aq; ++av) {
                ao.push(ax[aw][av])
            }
        }
        ax = null;
        var ar = Date;
        if (!ar.now) {
            ar = {
                now: function () {
                    return (new Date).getTime()
                }
            }
        }
        var au = 0;
        var an;

        function ap() {
            var aB = (window.PR_SHOULD_USE_CONTINUATION ? ar.now() + 250 : Infinity);
            for (; au < ao.length && ar.now() < aB; au++) {
                var aD = ao[au];
                if (aD.className && aD.className.indexOf("prettyprint") >= 0) {
                    var aC = aD.className.match(/\blang-(\w+)\b/);
                    if (aC) {
                        aC = aC[1]
                    }
                    var aG = false;
                    for (var aF = aD.parentNode; aF; aF = aF.parentNode) {
                        if ((aF.tagName === "pre" || aF.tagName === "code" || aF.tagName === "xmp") && aF.className && aF.className.indexOf("prettyprint") >= 0) {
                            aG = true;
                            break
                        }
                    }
                    if (!aG) {
                        var aE = a(aD);
                        aE = aE.replace(/(?:\r\n?|\n)$/, "");
                        an = {
                            sourceCodeHtml: aE,
                            langExtension: aC,
                            sourceNode: aD
                        };
                        g(an);
                        ay()
                    }
                }
            }
            if (au < ao.length) {
                setTimeout(ap, 250)
            } else {
                if (aA) {
                    aA()
                }
            }
        }
        function ay() {
            var aI = an.prettyPrintedHtml;
            if (!aI) {
                return
            }
            var aE = an.sourceNode;
            if (!Q(aE)) {
                aE.innerHTML = aI
            } else {
                var aB = document.createElement("PRE");
                for (var aD = 0; aD < aE.attributes.length; ++aD) {
                    var aJ = aE.attributes[aD];
                    if (aJ.specified) {
                        var aG = aJ.name.toLowerCase();
                        if (aG === "class") {
                            aB.className = aJ.value
                        } else {
                            aB.setAttribute(aJ.name, aJ.value)
                        }
                    }
                }
                aB.innerHTML = aI;
                aE.parentNode.replaceChild(aB, aE);
                aE = aB
            }
            if (az && aE.tagName === "PRE") {
                var aF = aE.getElementsByTagName("br");
                for (var aC = aF.length; --aC >= 0;) {
                    var aH = aF[aC];
                    aH.parentNode.replaceChild(document.createTextNode(at), aH)
                }
            }
        }
        ap()
    }
    window.PR_normalizedHtml = aj;
    window.prettyPrintOne = H;
    window.prettyPrint = d;
    window.PR = {
        combinePrefixPatterns: n,
        createSimpleLexer: i,
        registerLangHandler: e,
        sourceDecorator: k,
        PR_ATTRIB_NAME: ak,
        PR_ATTRIB_VALUE: r,
        PR_COMMENT: m,
        PR_DECLARATION: T,
        PR_KEYWORD: K,
        PR_LITERAL: V,
        PR_NOCODE: ag,
        PR_PLAIN: U,
        PR_PUNCTUATION: ae,
        PR_SOURCE: ab,
        PR_STRING: N,
        PR_TAG: p,
        PR_TYPE: ah
    }
})();
jQuery.expr[":"].regex = function (g, d, c) {
    var h = c[3].split(","),
        b = /^(data|css):/,
        a = {
        method: h[0].match(b) ? h[0].split(":")[0] : "attr",
        property: h.shift().replace(b, "")
    },
        f = "ig",
        e = new RegExp(h.join("").replace(/^\s+|\s+$/g, ""), f);
    return e.test(jQuery(g)[a.method](a.property))
};
