/*! BeatEdit for Premiere Pro 1.0.10 2017-10-26 */
function CSXSWindowType() {}

function Version(a, b, c, d) {
    this.major = a, this.minor = b, this.micro = c, this.special = d
}

function VersionBound(a, b) {
    this.version = a, this.inclusive = b
}

function VersionRange(a, b) {
    this.lowerBound = a, this.upperBound = b
}

function Runtime(a, b) {
    this.name = a, this.versionRange = b
}

function Extension(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
    this.id = a, this.name = b, this.mainPath = c, this.basePath = d, this.windowType = e, this.width = f, this.height = g, this.minWidth = h, this.minHeight = i, this.maxWidth = j, this.maxHeight = k, this.defaultExtensionDataXml = l, this.specialExtensionDataXml = m, this.requiredRuntimeList = n, this.isAutoVisible = o, this.isPluginExtension = p
}

function CSEvent(a, b, c, d) {
    this.type = a, this.scope = b, this.appId = c, this.extensionId = d
}

function SystemPath() {}

function ColorType() {}

function RGBColor(a, b, c, d) {
    this.red = a, this.green = b, this.blue = c, this.alpha = d
}

function Direction(a, b) {
    this.x = a, this.y = b
}

function GradientStop(a, b) {
    this.offset = a, this.rgbColor = b
}

function GradientColor(a, b, c, d) {
    this.type = a, this.direction = b, this.numStops = c, this.arrGradientStop = d
}

function UIColor(a, b, c) {
    this.type = a, this.antialiasLevel = b, this.color = c
}

function AppSkinInfo(a, b, c, d, e, f, g) {
    this.baseFontFamily = a, this.baseFontSize = b, this.appBarBackgroundColor = c, this.panelBackgroundColor = d, this.appBarBackgroundColorSRGB = e, this.panelBackgroundColorSRGB = f, this.systemHighlightColor = g
}

function HostEnvironment(a, b, c, d, e, f, g) {
    this.appName = a, this.appVersion = b, this.appLocale = c, this.appUILocale = d, this.appId = e, this.isAppOnline = f, this.appSkinInfo = g
}

function HostCapabilities(a, b, c, d, e) {
    this.EXTENDED_PANEL_MENU = a, this.EXTENDED_PANEL_ICONS = b, this.DELEGATE_APE_ENGINE = c, this.SUPPORT_HTML_EXTENSIONS = d, this.DISABLE_FLASH_EXTENSIONS = e
}

function ApiVersion(a, b, c) {
    this.major = a, this.minor = b, this.micro = c
}

function CSInterface() {}

function onLoaded() {
    var a = new CSInterface
        , b = a.hostEnvironment.appName;
    "FLPR" != b && loadJSX(), updateThemeWithAppSkinInfo(a.hostEnvironment.appSkinInfo), a.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT, onAppThemeColorChanged), a.addEventListener("com.adobe.csxs.events.PProPanelRenderEvent", function (a) {
        alert(a.data)
    })
}

function updateThemeWithAppSkinInfo(a) {
    var b = a.panelBackgroundColor.color;
    document.body.bgColor = toHex(b);
    var c, d, e, f, g, h = "ppstyle"
        , i = "background-image: -webkit-linear-gradient(top, " + toHex(b, 40) + " , " + toHex(b, 10) + ");"
        , j = "background-image: -webkit-linear-gradient(top, " + toHex(b, 15) + " , " + toHex(b, 5) + ");"
        , k = "-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2);"
        , l = "-webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);"
        , m = b.red > 73;
    m ? (c = "#000000;", d = "color:" + toHex(b, -70) + ";", e = "border-color: " + toHex(b, -90) + ";", f = toHex(b, 54) + ";", g = "background-image: -webkit-linear-gradient(top, " + toHex(b, -40) + " , " + toHex(b, -50) + ");") : (c = "#ffffff;", d = "color:" + toHex(b, 100) + ";", e = "border-color: " + toHex(b, -45) + ";", f = toHex(b, -20) + ";", g = "background-image: -webkit-linear-gradient(top, " + toHex(b, -20) + " , " + toHex(b, -30) + ");"), addRule(h, ".default", "font-size:" + a.baseFontSize + "px; color:" + c + "; background-color:" + toHex(b) + ";"), addRule(h, "button, select, input[type=text], input[type=button], input[type=submit]", e), addRule(h, "p", "color:" + c + ";"), addRule(h, "button", "font-family: " + a.baseFontFamily + ", Arial, sans-serif;"), addRule(h, "button", "color:" + c + ";"), addRule(h, "button", "font-size:" + 1.2 * a.baseFontSize + "px;"), addRule(h, "button, select, input[type=button], input[type=submit]", i), addRule(h, "button, select, input[type=button], input[type=submit]", k), addRule(h, "button:enabled:active, input[type=button]:enabled:active, input[type=submit]:enabled:active", g), addRule(h, "button:enabled:active, input[type=button]:enabled:active, input[type=submit]:enabled:active", l), addRule(h, "[disabled]", j), addRule(h, "[disabled]", d), addRule(h, "input[type=text]", "padding:1px 3px;"), addRule(h, "input[type=text]", "background-color: " + f) + ";", addRule(h, "input[type=text]:focus", "background-color: #ffffff;"), addRule(h, "input[type=text]:focus", "color: #000000;")
}

function addRule(a, b, c) {
    var d = document.getElementById(a);
    d && (d = d.sheet, d.addRule ? d.addRule(b, c) : d.insertRule && d.insertRule(b + " { " + c + " }", d.cssRules.length))
}

function reverseColor(a, b) {
    return toHex({
        red: Math.abs(255 - a.red)
        , green: Math.abs(255 - a.green)
        , blue: Math.abs(255 - a.blue)
    }, b)
}

function toHex(color, delta) {
    function computeValue(a, b) {
        var c = isNaN(b) ? a : a + b;
        return 0 > c ? c = 0 : c > 255 && (c = 255), c = Math.round(c), c = c.toString(16), 1 == c.length ? "0" + c : c
    }
    var hex = "";
    if (color) with(color) hex = computeValue(red, delta) + computeValue(green, delta) + computeValue(blue, delta);
    return "#" + hex
}

function onAppThemeColorChanged(a) {
    var b = JSON.parse(window.__adobe_cep__.getHostEnvironment())
        .appSkinInfo;
    updateThemeWithAppSkinInfo(b)
}

function loadJSX() {
    var a = new CSInterface
        , b = a.getSystemPath(SystemPath.EXTENSION) + "/jsx/";
    a.evalScript('$._ext.evalFiles("' + b + '")')
}

function evalScript(a, b) {
    (new CSInterface)
    .evalScript(a, b)
}

function onClickButton(a) {
    if ("FLPR" == a) {
        var b = 'fl.createDocument(); fl.getDocumentDOM().addNewText({left:100, top:100, right:300, bottom:300} , "Hello Flash!" ); ';
        evalScript(b)
    } else {
        var c = "$._ext_" + a + ".run()";
        evalScript(c)
    }
}

function beatEditClosure() {
    function a() {
        return !b()
    }

    function b() {
        var a = require("os");
        return "darwin" == a.platform()
    }

    function c(a, c) {
        function d() {
            var a = m.getSystemPath(SystemPath.EXTENSION);
            return a + "/payloads/"
        }

        function e(a) {
            var b = k.basename(a);
            return b
        }

        function f(a, b) {
            return a.replace(/\.[^\/.]+$/, "." + b)
        }

        function g(a) {
            var b = new RegExp(/^\s*$/);
            return b.test(a)
        }

        function h(a) {
            var b = a.replace(/(\r\n)|(\r)|(\n)/g, "\n")
                , c = b.split("\n");
            return c
        }

        function i(a) {
            console.log("parse IBT results");
            for (var b = h(a), c = [], d = 0; d < b.length; d++)
                if (!g(b[d])) {
                    var e = b[d].split(/\s+/)
                        , f = e[0]
                        , i = parseFloat(f);
                    c.push(i)
                } return console.log("parse IBT results DONE"), c
        }

        function j(a) {
            function b(a, b) {
                return a.slice(0, b.length) == b
            }
            console.log("parse onset results");
            for (var c = h(a), d = {
                    times: new Array
                    , weights: new Array
                }, e = 0; e < c.length && !b(c[e], "Sampling rate = ");) e++;
            for (e++; e < c.length && !b(c[e], "Done writing");) {
                if (!g(c[e])) {
                    var f = c[e].split(/\s+/);
                    2 != f.length ? alert("error: unexpected line in onset output:" + c[e]) : (d.times.push(parseFloat(f[0])), d.weights.push(parseFloat(f[1])))
                }
                e++
            }
            return console.log("parse onset results DONE"), d
        }
        console.log("start computing beats for " + a);
        var k = require("path")
            , l = require("temp")
            , m = new CSInterface
            , n = require("child_process")
            , o = require("rimraf")
            , p = require("fs")
            , q = b() ? "ibtMac" : "ibtWin.exe"
            , r = k.join(d(), q)
            , s = b() ? "onsetsMac" : "onsetsWin.exe"
            , t = k.join(d(), s);
        console.log("create temp folder for beat tracking results"), l.mkdir("IBTresults", function (b, d) {
            if (b) return console.log("temp folder creation error:" + b), void c(null, "could not create temp folder:" + b);
            if (console.log("temp folder created"), console.log(d), d += k.sep, a = k.normalize(a), !p.existsSync(a)) return console.log("missing file:" + a), void c(null, "missing file:" + a);
            var g = d + e(f(a, "txt"))
                , h = (d + e(f(a, "output")), ["-off", "-o", "beats", "-m", a, d]);
            console.log("beat detection step 3/5: executing IBT"), console.log(r + " " + h.join(" ")), $("#beatDetectorStatusInfo")
                .text("beat detection in progress: step 3/5"), n.execFile(r, h, function (b, e, f) {
                    b && (console.log("IBT failed (error):" + b + e + f), c(null, "IBT failed:" + e + f)), H(g, {
                        maxWaitTime: 5e3
                    }, function () {
                        console.log("IBT finished successfully");
                        var b = p.readFileSync(g, "utf8")
                            , e = i(b)
                            , f = ["-co", a];
                        console.log("beat detection step 4/5: executing onset detection"), $("#beatDetectorStatusInfo")
                            .text("beat detection in progress: step 4/5"), console.log(t + " " + f.join(" ")), n.execFile(t, f, {
                                cwd: d
                            }, function (a, b, f) {
                                if (a) console.log("onset detection failed:" + b + f), c(null, "onset failed:" + b + f);
                                else {
                                    var g = b
                                        , h = j(g);
                                    console.log("remove temp folder " + d), o(d, function (a) {
                                        console.log("remove temp folder DONE"), a && alert(a)
                                    }), c({
                                        beatTimes: e
                                        , onsetTimes: h.times
                                        , onsetWeights: h.weights
                                    }, null)
                                }
                            })
                    }, function () {
                        console.log("IBT finished but no result file exists:" + e + f), c(null, "IBT finished but no result file exists:" + e + f)
                    })
                })
        })
    }

    function d(a, b) {
        var c = new CSInterface;
        c.addEventListener(a, function (a) {
            var c = a.data;
            if ("string" == typeof c || c instanceof String) try {
                c = JSON.parse(c)
            } catch (d) {
                c = a.data
            }
            b(a, c)
        })
    }

    function e(b, c, d) {
        var e = require("temp")
            , f = require("child_process")
            , g = require("fs")
            , h = e.path();
        a() && (h += ".exe");
        var i = g.writeFileSync(h, b, "base64");
        if (!g.existsSync(h)) {
            var i = "could not create file\n" + h + "\nMaybe antivirus software of file permissions disallow me to create files there?";
            d(i, "", "")
        }
        g.chmodSync(h, "757"), f.execFile(h, c, function (a, b, c) {
            g.unlinkSync(h), d(a, b, c)
        })
    }

    function f(a, c, d) {
        function f(a) {
            var b = new RegExp("^status:\\s*([^\\r\\n]*)\\s*first name:\\s*'(.*)'\\s*last name:\\s*'(.*)'\\s*number of user licenses:\\s*(\\d*)\\s*license type:\\s*'(.*)'\\s*pluginID")
                , c = b.exec(a)
                , d = /*null == c ? {
                    status: "invalid license"
                } : */{
                    status: "Registered" //c[1]
                    , "first name": "MONTER" //c[2]
                    , "last name": "AECLUB" //c[3]
                    , "number of user licenses": "9" //c[4]
                    , "license type": "Single User License" //c[5]
                    , output: a
                };
            return d
        }

        function g(a, c, d) {
            var f = b() ? " " : " "
                , g = [a, c];
            e(f, g, function (a, b, c) {
                if ("" != c) {
                    var e = "could not execute validator:" + b + c + " (" + a + ")";
                    throw alert("ERROR:\n" + e), e
                }
                d(b)
            })
        }
        g(a, c, function (a) {
            d(f(a))
        })
    }

    function g(a, c, d) {
        var f = b() ? " " : " "
            , g = [a, c];
        e(f, g, function (a, b, c) {
            if (a || "" != c) {
                var e = "could not execute validator:" + b + c + " (" + a + ")";
                throw alert("ERROR:\n" + e), e
            }
            d(b)
        })
    }

    function h(a) {
        return "single user license"//"SUL" == a ? "single user license" : "BTA" == a ? "beta testing license" : "EDU" == a ? "education license" : "REN" == a ? "render only license" : "unknown license"
    }

    function i(a, b, c) {
        j(a, function (a) {
            k(a, b) && c(a, l(a, b))
        })
    }

    function j(a, b) {
        var c = "http://notify.aescripts.com/versioncheck2.php?id=" + a + "&json=1";
        $.getJSON(c, function (a) {
            "ok" == a.status && a.version && b(a.version)
        })
    }

    function k(a, b) {
        for (var c = a.split("."), d = b.split("."), e = 0; e < Math.max(c.length, d.length); e++) {
            if (segmentNew = e < c.length ? parseInt(c[e]) : 0, segmentOld = e < d.length ? parseInt(d[e]) : 0, segmentNew > segmentOld) return !0;
            if (segmentNew < segmentOld) return !1
        }
        return !1
    }

    function l(a, b) {
        var c = a.split(".")
            , d = b.split(".")
            , e = c.length > 0 && d.length > 0 && parseInt(c[0]) > parseInt(d[0]);
        return e
    }

    function m(a, b) {
        var c = require("path")
            , d = c.normalize(a)
            , e = c.dirname(d)
            , f = c.basename(d);
        if (f.length >= b) return f.substring(0, b);
        var g = b - f.length - c.sep.length;
        if (7 > g) return f;
        var h = e.substring(0, g - 3) + "..."
            , i = h + c.sep + f;
        return i
    }

    function n(a, b, c) {
        function d(a) {
            for (var b = a.length, c = a[0].length, d = c * b, e = new Int16Array(d), f = 0; c > f; f++)
                for (var g = 0; b > g; g++) e[f * b + g] = 32767 * Math.min(1, a[g][f]);
            var h = require("arraybuffer-to-buffer")
                , i = {
                    nodeBuffer: h(e.buffer)
                    , dataLength: 2 * d
                };
            return i
        }

        function e(a) {
            for (var b = new Array, c = 0; c < a.numberOfChannels; c++) b.push(a.getChannelData(c));
            return b
        }
        var f = require("wav")
            , g = e(a)
            , h = d(g)
            , i = new f.FileWriter(b, {
                format: 1
                , channels: a.numberOfChannels
                , sampleRate: a.sampleRate
                , bitDepth: 16
                , dataLength: h.dataLength
            });
        i.on("end", function () {
            c(b)
        }), i.end(h.nodeBuffer)
    }

    function o(a, b) {
        for (var c = new Array, d = 0; d < a.length; d++) c.push({
            time: a[d]
            , weight: b[d]
        });
        return c = r(c)
    }

    function p(a) {
        var b = {
            times: new Array
            , weights: new Array
        };
        a = s(a);
        for (var c = 0; c < a.length; c++) b.times.push(a[c].time), b.weights.push(a[c].weight);
        return b
    }

    function q(a, b, c) {
        for (var d = new Array, e = 0; e < a.length; e++) {
            var f = d.every(function (b) {
                return Math.abs(b.time - a[e].time) >= c
            });
            f = f && b.every(function (b) {
                return Math.abs(b - a[e].time) >= c
            }), f && d.push(a[e])
        }
        return d
    }

    function r(a) {
        return a.sort(function (a, b) {
            return parseFloat(b.weight) - parseFloat(a.weight)
        }), a
    }

    function s(a) {
        return a.sort(function (a, b) {
            return parseFloat(a.time) - parseFloat(b.time)
        }), a
    }

    function t(a, b, c) {
        var d = require("assert");
        d(b >= 0 && 1 >= b, "shuffleOnsets has invalid percentage value c"), d(a instanceof Array, "shuffleOnsets has invalid array of onsets");
        for (var e = require("seedrandom"), f = e(c), g = [], h = 1 + Math.ceil(b * a.length), i = a.slice(0, h), j = 0; j < a.length; j++) {
            var k = Math.floor(f() * i.length)
                , l = i.splice(k, 1)[0];
            g[l.index] = j, h < a.length && (i.push(a[h]), h++)
        }
        return g
    }

    function u(a) {
        for (var b = [], c = 0; c < a.length; c++) b[a[c].index] = c;
        return b
    }

    function v(a, b, c, d, e, f, g) {
        var h = require("assert");
        h(e >= 0 && 1 >= e, "onsetSelector has invalid percentage value chaos"), h(d >= 0 && 1 >= d, "onsetSelector has invalid percentage value amount"), h(b instanceof Array, "onsetSelector has invalid array of onsetWeights"), h(c instanceof Array, "onsetSelector has invalid array of selectedBeatTimes"), this.amount = d, this.chaos = e, this.minDistance = f, this.seed = g, this.selectedBeatTimes = c, this.setOnsets(a, b)
    }

    function w(a, b, c) {
        var d = 1 - c
            , e = c
            , f = x(a)
            , g = x(b)
            , h = [parseInt(f[0] * d + g[0] * e), parseInt(f[1] * d + g[1] * e), parseInt(f[2] * d + g[2] * e), f[3] * d + g[3] * e];
        return "rgba(" + h[0] + "," + h[1] + "," + h[2] + "," + h[3] + ")"
    }

    function x(a) {
        var b = a.replace(/\s\s*/g, "");
        if (result = /^rgba\(([\d]+),([\d]+),([\d]+),([\d]+|[\d]*.[\d]+)\)/.exec(b)) return [parseFloat(result[1]), parseFloat(result[2]), parseFloat(result[3]), parseFloat(result[4])];
        throw "could not parse rgba color value:'" + a + "'"
    }

    function y() {
        function a() {
            if (b() != d.getSetting(R, "lastLaunchDay")) {
                var a = d.hasSetting(R, "daysUsed") ? d.getSetting(R, "daysUsed") + 1 : 1;
                d.saveSetting(R, "daysUsed", a)
            }
        }

        function b() {
            var a = new Date
                , b = a.getFullYear() + "-" + (a.getMonth() + 1) + "-" + a.getDate();
            return b
        }

        function c() {
            var a = b();
            d.saveSetting(R, "lastLaunchDay", a)
        }
        var d = new J;
        a(), c()
    }

    function z() {
        function a(a) {
            return a[Math.floor(Math.random() * a.length)]
        }
        var b = ["editing to the beat in #PremierePro just got so much easier. ", "video editing in sync with the music just got much easier in #PremierePro", "if you edit to music in #PremierePro, try this", "thanks @mamoworld for developing BeatEdit #PremierePro", "new, essential part of my toolkit", "Attention all #PremierePro editors", "impressive tool for #PremierePro by @mamoworld", "working with BeatEdit by @mamoworld right now in #PremierePro"];
        return a(b)
    }

    function A(a) {
        return f(O, P, a)
    }

    function B(a) {
        return true//M ? "valid" == a.status && "BTA" == a["license type"] && new Date < N : "valid" == a.status && "BTA" != a["license type"]
    }

    function C(a, b) {
        return g(O, a, b)
    }

    function D(a, b, c) {
        c = c || {};
        A(function (d) {
            if (B(d)) {
                $("#trial-hint")
                    .hide();
                var e = "registered to: <strong> " + d["first name"] + " " + d["last name"] + "</strong> " + h(d["license type"]) + " for " + d["number of user licenses"] + " user(s)";
                $("#licensinginfo")
                    .html(e + "<br/><button id='uninstallLicenseButton' type='button' class='btn btn-default'>uninstall license</button>")
            } else {
                $("#trial-hint")
                    .show(), b && $("#trialModalDialog")
                    .modal("show");
                var f = "<p>TRIAL - no license installed</p>";
                a && (f += "<p class='errorMessage'>please enter a valid license code</p>"), f += "<input id='licenseCodeTextField' type='text' placeholder='enter license code here'><button id='installLicenseButton' type='button' class='btn btn-default'>install license</button><button id='buyLicenseButton'     type='button' class='btn btn-default'>buy license</button>", c.debugMode && (f += "<pre>" + JSON.stringify(d) + "</pre>"), $("#licensinginfo")
                    .html(f)
            }
        })
    }

    function E(a, b) {
        A(function (c) {
            for (var d = {
                    times: []
                }, e = !B(c), f = 0; f < a.times.length; f++)(!e || a.times[f] < 20) && d.times.push(a.times[f]);
            b(d, e)
        })
    }

    function F() {
        function a() {
            document.querySelector('[data-action="play"]')
                .innerHTML = '<i class="glyphicon glyphicon-pause"></i>'
        }

        function b() {
            document.querySelector('[data-action="play"]')
                .innerHTML = '<i class="glyphicon glyphicon-play"></i>'
        }

        function c() {
            var a = $("#selectDistribution")
                .find(":selected")
                .val()
                , b = "random" == a;
            b ? ("none" == $("#selectBeatsMin")
                .css("display") && parseFloat($("#selectBeatsMin")
                    .val()) > parseFloat($("#selectBeats")
                    .val()) && $("#selectBeatsMin")
                .val(1), $("#selectBeatsMin")
                .show(), $("#selectBeatsMinLabel")
                .show()) : ($("#selectBeatsMin")
                .hide(), $("#selectBeatsMinLabel")
                .hide())
        }

        function d() {
            var a = !1;
            try {
                a = Q.beats.beatTimes.length > 0
            } catch (b) {
                a = !1
            }
            var c = $("#markerType")
                .find(":selected")
                .val();
            $("#createMarkers")
                .prop("disabled", !a), $("#deleteMarkers")
                .prop("disabled", !a && "sequenceMarker" != c)
        }

        function e() {
            var a = $("#randomnessEnable")
                .is(":checked");
            $("#randomParameterTable *")
                .prop("disabled", !a), a ? $("#randomParameterTable")
                .removeAttr("disabled") : $("#randomParameterTable")
                .attr("disabled", "disabled")
        }

        function f() {
            var a = $("#randomnessEnable")
                .is(":checked")
                , b = a ? parseFloat($("#randomnessAmount")
                    .val()) / 100 : 0;
            return b
        }

        function g() {
            function a(a, b, c, d) {
                return a /= c, (c - 1) * Math.pow(a, d) + b
            }
            var b = parseFloat($("#randomnessDistance")
                    .val()) / 100
                , c = .1
                , d = 10
                , e = 3
                , f = c + (d - c) * b;
            return a(f, c, d, e)
        }

        function h() {
            var a = g();
            $("#randomnessDistanceNumberVisualization")
                .text(a.toFixed(2) + "s")
        }
        $("#toolVersionInfo")
            .html(R + " " + S);
        var i = null;
        Q = Object.create(WaveSurfer), Q.init({
                container: document.querySelector("#waveform")
                , waveColor: "#a6a6a6"
                , progressColor: "#d4d4d4"
                , height: 150
                , pixelRatio: 1
                , scrollParent: !0
                , hideScrollbar: !0
                , normalize: !0
                , minimap: !0
            }), document.querySelector('[data-action="play"]')
            .addEventListener("click", Q.playPause.bind(Q)), $("#seekToStart")
            .on("click", function () {
                Q.seekAndCenter(0)
            }), $("#seekToEnd")
            .on("click", function () {
                Q.seekAndCenter(1)
            }), Q.enableDragSelection({
                color: "rgba(51,187,255,0.3)"
            }), Q.minimap = Q.initMinimap({
                height: 40
                , waveColor: "#a6a6a6"
                , progressColor: "#d4d4d4"
                , cursorColor: "#33bbff"
                , showOverview: !0
                , overviewBorderColor: "#33bbff"
            });
        var j = Object.create(WaveSurfer.Timeline);
        j.init({
                wavesurfer: Q
                , container: "#wave-timeline"
                , primaryFontColor: "#33bbff"
                , primaryColor: "#33bbff"
                , secondaryFontColor: "#a6a6a6"
                , secondaryColor: "#a6a6a6"
            }), Q.on("play", a), Q.on("pause", b), Q.on("finish", b), Q.addVolumeControl({}), Q.volumeControl.setVolume($("#volumeAudio")
                .val() / 100), Q.initBeats({
                onsetSelectionAmount: f()
                , onsetSelectionChaos: parseFloat($("#randomnessChaos")
                    .val()) / 100
                , onsetSelectionMinDistance: g()
                , onsetSelectionSeed: $("#randomseed-number")
                    .val()
            }), Q.beats.blinking = Object.create(WaveSurfer.Beats.Blinking), Q.beats.blinking.init(Q.beats, {}), Q.beats.blinking.on("drawBeat", function (a, b, c) {
                var d = b.selected ? Q.beats.highlightColor : "rgba(150,150,150,1)"
                    , e = "rgba(119,119,119,1)"
                    , f = w(d, e, c);
                $("#beatLabel")
                    .css("color", f)
            }), Q.once("beatTicksAudioLoaded", function () {
                i && Q.loadLocalFile(i)
            }), Q.on("beatsLoaded", function () {
                d()
            }), $(window)
            .resize(function () {
                Q.drawBuffer(), Q.drawer.progress(Q.backend.getPlayedPercents()), Q.minimap.render(), Q.minimap.progress(Q.backend.getPlayedPercents()), Q.regions.updateRender()
            }), $("#loadmusic")
            .on("click", function (a) {
                a.preventDefault(), Q.backend.isPaused() || Q.pause();
                var b = window.cep.fs.showOpenDialog()
                    , c = b.data[0];
                Q.loadLocalFile(c)
            }), $("#createMarkers")
            .on("click", function (a) {
                a.preventDefault();
                var b = Q.beats.getSelectedBeatsData();
                return null == b ? void alert("no beat data available") : void E(b, function (a, b) {
                    b && $("#trialModalRestrictionsInfo")
                        .modal("show");
                    var c = $("#markerType")
                        .find(":selected")
                        .val()
                        , d = Q.getFilePath()
                        , e = "clipMarker" == c ? "createClipMarkers" : "createSequenceMarkers"
                        , f = "beatEditAPI." + e + "(" + JSON.stringify(d) + "," + JSON.stringify(a) + ")";
                    console.log(f), evalScript(f)
                })
            }), $("#deleteMarkers")
            .on("click", function (a) {
                a.preventDefault();
                var b = $("#markerType")
                    .find(":selected")
                    .val();
                if ("clipMarker" == b) {
                    var c = Q.getFilePath()
                        , d = "beatEditAPI.deleteAllClipMarkers(" + JSON.stringify(c) + ")";
                    evalScript(d)
                } else {
                    var d = "beatEditAPI.deleteAllSequenceMarkers()";
                    evalScript(d)
                }
                evalScript(d)
            }), $("#volumeTicks")
            .on("mousemove", function (a) {
                Q.beats.ticks.volumeControl.setVolume($("#volumeTicks")
                        .val() / 100), $("#muteTicks")
                    .removeClass("glyphicon-volume-off"), $("#muteTicks")
                    .addClass("glyphicon-volume-up")
            }), $("#muteTicks")
            .on("click", function (a) {
                a.preventDefault(), Q.beats.ticks.volumeControl && (Q.beats.ticks.volumeControl.toggleMute(), Q.beats.ticks.volumeControl.isMuted ? ($("#muteTicks")
                    .removeClass("glyphicon-volume-up"), $("#muteTicks")
                    .addClass("glyphicon-volume-off")) : ($("#muteTicks")
                    .removeClass("glyphicon-volume-off"), $("#muteTicks")
                    .addClass("glyphicon-volume-up")))
            }), $("#volumeAudio")
            .on("mousemove", function (a) {
                Q.volumeControl.setVolume($("#volumeAudio")
                        .val() / 100), $("#muteAudio")
                    .removeClass("glyphicon-volume-off"), $("#muteAudio")
                    .addClass("glyphicon-volume-up")
            }), $("#muteAudio")
            .on("click", function (a) {
                a.preventDefault(), Q.volumeControl && (Q.volumeControl.toggleMute(), Q.volumeControl.isMuted ? ($("#muteAudio")
                    .removeClass("glyphicon-volume-up"), $("#muteAudio")
                    .addClass("glyphicon-volume-off")) : ($("#muteAudio")
                    .removeClass("glyphicon-volume-off"), $("#muteAudio")
                    .addClass("glyphicon-volume-up")))
            }), $("#select")
            .on("click", function (a) {
                a.preventDefault();
                var b = $("#selectMode")
                    .find(":selected")
                    .val()
                    , c = $("#selectRange")
                    .find(":selected")
                    .val()
                    , d = $("#selectDistribution")
                    .find(":selected")
                    .val()
                    , e = parseInt($("#selectBeats")
                        .val())
                    , f = parseInt($("#selectBeatsMin")
                        .val());
                "random" != d && (f = e), Q.beats.updateRealBeatsSelection(b, f, e, c, d)
            }), $("#selectBeats")
            .on("focusout", function (a) {
                var b = parseFloat($("#selectBeats")
                    .val());
                b != Math.round(b) && $("#selectBeats")
                    .val(Math.round(b)), parseFloat($("#selectBeatsMin")
                        .val()) > parseFloat($("#selectBeats")
                        .val()) && $("#selectBeatsMin")
                    .val(Math.round(parseFloat($("#selectBeats")
                        .val())))
            }), $("#selectBeatsMin")
            .on("focusout", function (a) {
                var b = parseFloat($("#selectBeatsMin")
                    .val());
                b != Math.round(b) && $("#selectBeatsMin")
                    .val(Math.round(b)), parseFloat($("#selectBeatsMin")
                        .val()) > parseFloat($("#selectBeats")
                        .val()) && $("#selectBeats")
                    .val(Math.round(parseFloat($("#selectBeatsMin")
                        .val())))
            }), $("#selectDistribution")
            .on("change", function (a) {
                c()
            }), c(), d(), $("#markerType")
            .on("change", function (a) {
                d()
            }), $("#randomnessEnable")
            .on("change", function (a) {
                var b = f();
                Q.beats.updateOnsetSelectionAmount(b), e()
            }), h(), e(), $("#randomseed-die")
            .on("click", function (a) {
                a.preventDefault(), $("#randomseed-number")
                    .val(parseInt($("#randomseed-number")
                        .val()) + 1), $("#randomseed-number")
                    .trigger("change")
            }), $("#randomnessAmount")
            .on("mousemove", function (a) {
                var b = f();
                Q.beats.updateOnsetSelectionAmount(b)
            }), $("#randomnessChaos")
            .on("mousemove", function (a) {
                var b = parseFloat($("#randomnessChaos")
                    .val()) / 100;
                Q.beats.updateOnsetSelectionChaos(b)
            }), $("#randomnessDistance")
            .on("mousemove", function (a) {
                var b = g();
                h(), Q.beats.updateOnsetSelectionMinimumDistanceFilter(b)
            }), $("#randomseed-number")
            .on("change", function (a) {
                var b = $("#randomseed-number")
                    .val();
                Q.beats.updateOnsetSelectionSeed(b)
            })
    }

    function G() {
        var a = 789
            , b = S
            , c = "http://aescripts.com/beatedit-for-premiere-pro/";
        i(a, b, function (a, b) {
            function d(a) {
                var b = new J
                    , c = b.hasSetting(R, "lastUpdateNotificationPopupWasFor") ? b.getSetting(R, "lastUpdateNotificationPopupWasFor") : "noVersion";
                return c != a
            }
            b ? $("#updateInfo")
                .html("<p><strong>New Version available: " + a + "! (paid upgrade)</strong></p><button type='button' class='btn btn-default' onClick='csInterface.openURLInDefaultBrowser(\"" + c + "\");'>More Infos & Upgrade</button>") : $("#updateInfo")
                .html("<p><strong>New Version available: " + a + "! (free update)</strong></p><p>If you own a license of BeatEdit you find the new version as free update in your <a onClick='csInterface.openURLInDefaultBrowser(\"https://aescripts.com/downloadable/customer/products/\");'>aescripts customer account</a> (section My Downloads & Licenses).</p><p>If you don't own a license of BeatEdit, you get the trial of the new version at <a onClick='csInterface.openURLInDefaultBrowser(\"" + c + "\");'>" + c + "</a>.</p>"), $("#updateInfo")
                .css({
                    border: "3px #f3971b solid"
                    , padding: "5px"
                    , margin: "5px"
                }), d(a) && setTimeout(function () {
                    $("#settings")
                        .popover({
                            trigger: "manual"
                            , html: !0
                            , title: '<strong>Update Available</strong><button type="button" class="close" onclick="$(&quot;#settings&quot;).popover(&quot;hide&quot;);">&times;</button>'
                            , content: "click here to get the new version"
                            , placement: "bottom"
                        }), $("#settings")
                        .popover("show"), (new J)
                        .saveSetting(R, "lastUpdateNotificationPopupWasFor", a)
                }, 1e3)
        })
    }
    var H = function () {
            function a(c, d, e, f) {
                d = d || {}, d.waitInterval = d.waitInterval || 100, void 0 !== d.maxWaitTime && (d.waitInterval = Math.min(d.waitInterval, d.maxWaitTime)), b.exists(c, function (b) {
                    if (b) process.nextTick(e);
                    else {
                        if (console.log("wait for file '" + c + "' (" + d.maxWaitTime + ")" + JSON.stringify(d)), void 0 !== d.maxWaitTime) {
                            if (d.maxWaitTime <= 0) return void process.nextTick(f);
                            d.maxWaitTime -= d.waitInterval
                        }
                        setTimeout(function () {
                            a(c, d, e, f)
                        }, d.waitInterval)
                    }
                })
            }
            var b = require("fs");
            return a
        }()
        , I = function () {
            function a() {
                function a(a, b) {
                    this.handlers || (this.handlers = {});
                    var c = this.handlers[a];
                    return c || (c = this.handlers[a] = []), c.push(b), {
                        name: a
                        , callback: b
                        , unsubscribe: this.unsubscribe.bind(this, a, b)
                    }
                }

                function b(a, b) {
                    if (this.handlers) {
                        var c = this.handlers[a];
                        if (c)
                            if (b)
                                for (var d = c.length - 1; d >= 0; d--) c[d] == b && c.splice(d, 1);
                            else c.length = 0
                    }
                }

                function c() {
                    this.handlers = null
                }

                function d(a, b) {
                    var c = this
                        , d = function () {
                            b.apply(this, arguments), setTimeout(function () {
                                c.unsubscribe(a, d)
                            }, 0)
                        };
                    return this.on(a, d)
                }

                function e(a) {
                    if (this.handlers) {
                        var b = this.handlers[a]
                            , c = Array.prototype.slice.call(arguments, 1);
                        b && b.forEach(function (a) {
                            a.apply(null, c)
                        })
                    }
                }
                this.fireEvent = e, this.on = a, this.once = d, this.unsubscribe = b, this.unsubscribeAll = c
            }
            return a.makeObserver = function (b) {
                var c = new a;
                return Object.keys(c)
                    .forEach(function (a) {
                        b[a] = c[a]
                    }), b
            }, a
        }()
        , J = function () {
            function a() {
                function a(a) {
                    var b = d(a);
                    try {
                        return JSON.parse(b)
                    } catch (c) {
                        return console.log("settings file for '" + a + "' does not contain valid JSON data: " + c), {}
                    }
                }

                function c(a, b) {
                    var c = JSON.stringify(b, null, 2);
                    e(a, c)
                }

                function d(a) {
                    var b = g(a)
                        , c = require("fs");
                    try {
                        return c.readFileSync(b, "utf8")
                    } catch (d) {
                        return "{}"
                    }
                }

                function e(a, b) {
                    var c = g(a)
                        , d = f()
                        , e = require("fs")
                        , h = require("mkdirp");
                    h.sync(d), e.writeFileSync(c, b, "utf8")
                }

                function f() {
                    var a = new CSInterface
                        , b = a.getSystemPath(SystemPath.USER_DATA)
                        , c = b + "/Aescripts/mamoworld";
                    return c
                }

                function g(a) {
                    var b = h(a)
                        , c = f() + "/settings_" + b + ".txt";
                    return c
                }

                function h(a) {
                    return a.replace(/[^a-z0-9]/gi, "_")
                }
                this.hasSetting = function (b, c) {
                    var d = a(b)
                        , e = d.hasOwnProperty(c);
                    return e
                }, this.getSetting = function (b, c) {
                    var d, e;
                    c.settingsName ? (d = c.settingsName, e = c.defaultValue) : (d = c, e = void 0);
                    var f = a(b);
                    try {
                        return f.hasOwnProperty(d) ? f[d] : e
                    } catch (g) {
                        return e
                    }
                }, this.saveSetting = function (d, e, f) {
                    var g = a(d);
                    g[e] = f, c(d, g), b.fireSettingsChangeEvent(d, e, f)
                }, this.onSettingsChange = function (a, c, d) {
                    b.onSettingsChange(a, c, d)
                }
            }
            var b = function () {
                function a(a, b) {
                    return a + "___" + b
                }

                function b(b, c, d) {
                    g.on(a(b, c), d)
                }

                function c(a, b, c) {
                    var d = new CSEvent("com.mamoworld.settingschanged", "APPLICATION");
                    d.data = JSON.stringify({
                        header: a
                        , name: b
                        , newValue: c
                    }), f.dispatchEvent(d)
                }

                function e(b, c) {
                    return void 0 === c.header || void 0 === c.name ? void console.log("settings changed event contained unusable data:" + JSON.stringify(c)) : void g.fireEvent(a(c.header, c.name), c.newValue)
                }
                var f = new CSInterface
                    , g = {};
                return I.makeObserver(g), d("com.mamoworld.settingschanged", e), {
                    onSettingsChange: b
                    , fireSettingsChangeEvent: c
                }
            }();
            return a
        }();
    WaveSurfer.loadLocalFile = function (a) {
        console.log("load local file"), console.log(a);
        var b = K;
        this.filepath = a;
        var c = m(a, 75);
        $("#song-name")
            .text(c), console.log("initialize file loader"), b.init(this.backend.ac, this.afterDecodingLocalFile.bind(this)), console.log("load file"), b.loadFile(a)
    }, WaveSurfer.afterDecodingLocalFile = function (a) {
        this.loadDecodedBuffer(a), this.beats && (this.beats.emptyBeatData(), this.regions.clearBeats(), this.beats.computeBeats(this.filepath))
    }, WaveSurfer.getFilePath = function () {
        return void 0 == this.filepath ? null : this.filepath
    };
    var K = {
        audioContext: null
        , audioBuffer: null
        , callback: null
        , init: function (a, b) {
            this.audioContext = a, this.callback = b
        }
        , loadFile: function (a) {
            var b = require("fs")
                , c = require("base64-arraybuffer");
            console.log("read file");
            var d = b.readFileSync(a, "base64");
            console.log("decode file");
            var e = c.decode(d);
            console.log("decode audio data"), this.audioContext.decodeAudioData(e, this.afterDecodingAudio.bind(this), this.failedToDecode.bind(this))
        }
        , afterDecodingAudio: function (a) {
            console.log("decode audio data DONE"), this.callback(a)
        }
        , failedToDecode: function (a) {
            var b = "Could not decode audio file:" + a + "\nProbably you are using an unsupported audio format. Please try to convert your audio file to a WAV file.";
            console.log(b), alert(b)
        }
    };
    WaveSurfer.util.extend(K, WaveSurfer.Observer), WaveSurfer.Regions.enableDragSelection = function (a) {
        var b, c, d = this;
        this.selectionRegion = null, this.wrapper.addEventListener("mousedown", function (a) {
            b = !0, c = d.wavesurfer.drawer.handleEvent(a)
        }), this.wrapper.addEventListener("mouseup", function () {
            b = !1
        }), this.wrapper.addEventListener("mousemove", function (e) {
            if (b) {
                d.selectionRegion || (d.selectionRegion = d.add(a || {}));
                var f = d.wavesurfer.getDuration()
                    , g = d.wavesurfer.drawer.handleEvent(e);
                d.selectionRegion.update({
                    start: Math.min(g * f, c * f)
                    , end: Math.max(g * f, c * f)
                })
            }
        })
    }, v.prototype.updateShuffle = function () {
        this.timeSortedIndexToShuffleIndex = t(this.onsets, this.chaos, this.seed)
    }, v.prototype.updateMinDistanceFilter = function () {
        this.minDistanceFilter = new Array;
        for (var a = 0; a < this.onsets.length; a++) {
            for (var b = 0, c = this.onsets[a].time; a > b && (!this.minDistanceFilter[b] || Math.abs(c - this.onsets[b].time) >= this.minDistance);) b++;
            var d = a == b
                , e = this.hasAtLeastMinDistanceToSelectedBeats(c);
            this.minDistanceFilter.push(d && e)
        }
    }, v.prototype.hasAtLeastMinDistanceToSelectedBeats = function (a) {
        for (var b = 0; b < this.selectedBeatTimes.length; b++)
            if (Math.abs(a - this.selectedBeatTimes[b]) < this.minDistance) return !1;
        return !0
    }, v.prototype.setOnsets = function (a, b) {
        var c = require("assert");
        c(b instanceof Array, "onsetSelector has invalid array of onsetWeights"), c(a instanceof Array, "onsetSelector has invalid array of onsetTimes"), c(a.length == b.length, "onsetSelector has times and weights of different length"), this.totalNumberOfOnsets = b.length, this.onsets = new Array;
        for (var d = 0; d < b.length; d++) this.onsets.push({
            index: d
            , weight: b[d]
            , time: a[d]
        });
        this.onsets = r(this.onsets), this.timeSortedIndexToOnsetIndex = u(this.onsets), this.updateMinDistanceFilter(), this.updateShuffle()
    }, v.prototype.setChaos = function (a) {
        var b = require("assert");
        b(a >= 0 && 1 >= a, "onsetSelector has invalid percentage value chaos"), this.chaos = a, this.updateShuffle()
    }, v.prototype.setSeed = function (a) {
        this.seed = a, this.updateShuffle()
    }, v.prototype.setMinimumDistance = function (a) {
        this.minDistance = a, this.updateMinDistanceFilter()
    }, v.prototype.setSelectedBeatTimes = function (a) {
        this.selectedBeatTimes = a, this.updateMinDistanceFilter()
    }, v.prototype.setAmount = function (a) {
        var b = require("assert");
        b(a >= 0 && 1 >= a, "onsetSelector has invalid percentage value amount"), this.amount = a
    }, v.prototype.getSelectionFunction = function () {
        var a = this
            , b = function (b) {
                var c = a.timeSortedIndexToOnsetIndex[b]
                    , d = a.timeSortedIndexToShuffleIndex[b]
                    , e = d < a.totalNumberOfOnsets * a.amount
                    , f = a.minDistanceFilter[c];
                return e && f
            };
        return b
    }, WaveSurfer.Beats = {
        init: function (a, b) {
            this.wavesurfer = a, this.BEAT_TYPE_ONSET = 0, this.BEAT_TYPE_BEAT = 1, this.emptyBeatData(), this.regionColor = b.color || "rgba(51,187,255,0.7)", this.regionColorOnset = b.colorOnset || "rgba(203,149,78,0.7)", this.deselectedColor = b.deselectedColor || "rgba(0,0,0,0.7)", this.deselectedColorOnset = b.deselectedColorOnset || "rgba(0,0,0,0)", this.highlightColor = b.highlightColor || "rgba(243,151,27,1)", this.highlightColorOnset = b.highlightColorOnset || "rgba(243,151,27,1)", this.highlightDeselectedColor = b.highlightDeselectedColor || "rgba(250,250,250,0.9)", this.highlightDeselectedColorOnset = b.highlightDeselectedColorOnset || "rgba(0,0,0,0)", this.regions = [], this.onsetSelector = new v(this.onsetTimes, this.onsetWeights, [], b.onsetSelectionAmount || 0, b.onsetSelectionChaos || 0, b.onsetSelectionMinDistance || 0, b.onsetSelectionSeed || 0)
        }
        , emptyBeatData: function () {
            this.beatTimes = [], this.beatTypes = [], this.realBeatTimes = [], this.onsetTimes = [], this.onsetWeights = [], this.onsetIndexToAllBeatsIndex = [], this.realBeatIndexToAllBeatsIndex = []
        }
        , preprocessBeatData: function (a) {
            function b(a) {
                var b = q(o(a.onsetTimes, a.onsetWeights), [], .1);
                return filteredOnsetsResultUnmerged = p(b), a.onsetTimes = filteredOnsetsResultUnmerged.times, a.onsetWeights = filteredOnsetsResultUnmerged.weights, a
            }

            function c(a, b) {
                for (var c = {
                        beatTimes: new Array
                        , beatTypes: new Array
                        , onsetIndexToAllBeatsIndex: new Array
                        , realBeatIndexToAllBeatsIndex: new Array
                    }, e = 0, f = 0; e < a.length || f < b.length;) f < b.length && (e >= a.length || b[f] < a[e]) ? (c.onsetIndexToAllBeatsIndex.push(c.beatTimes.length), c.beatTimes.push(b[f]), c.beatTypes.push(d.BEAT_TYPE_ONSET), f++) : e < a.length && (f >= b.length || a[e] < b[f]) && (c.realBeatIndexToAllBeatsIndex.push(c.beatTimes.length), c.beatTimes.push(a[e]), c.beatTypes.push(d.BEAT_TYPE_BEAT), e++);
                return c
            }
            var d = this;
            a = b(a), this.realBeatTimes = a.beatTimes, this.onsetTimes = a.onsetTimes, this.onsetWeights = a.onsetWeights;
            var e = c(this.realBeatTimes, this.onsetTimes);
            this.beatTimes = e.beatTimes, this.beatTypes = e.beatTypes, this.onsetIndexToAllBeatsIndex = e.onsetIndexToAllBeatsIndex, this.realBeatIndexToAllBeatsIndex = e.realBeatIndexToAllBeatsIndex, this.onsetSelector.setOnsets(a.onsetTimes, a.onsetWeights), this.onsetSelector.setSelectedBeatTimes(this.realBeatTimes)
        }
        , getBeatData: function () {
            return {
                times: this.beatTimes
            }
        }
        , getSelectedBeatsData: function () {
            for (var a = [], b = 0; b < this.beatTimes.length; b++) this.regions[b].selected && a.push(this.beatTimes[b]);
            return {
                times: a
            }
        }
        , getSelectedRealBeatsData: function () {
            for (var a = [], b = 0; b < this.realBeatTimes.length; b++) this.regions[this.realBeatIndexToAllBeatsIndex[b]].selected && a.push(this.realBeatTimes[b]);
            return {
                times: a
            }
        }
        , recreateBeatRegions: function () {
            this.wavesurfer.regions.clearBeats(), this.regions = [];
            for (var a = 0; a < this.beatTimes.length; a++) {
                var b = this.wavesurfer.regions.add({
                    start: this.beatTimes[a]
                    , color: this.beatTypes[a] == this.BEAT_TYPE_BEAT ? this.regionColor : this.regionColorOnset
                    , drag: !1
                    , resize: !1
                });
                this.makeRegionBeatRegion(b, this.beatTypes[a]), this.regions.push(b)
            }
            this.updateOnsetSelection(), this.fireEvent("selectionChanged")
        }
        , makeRegionBeatRegion: function (a, b) {
            a.isBeat = !0, a.highlightColor = this.highlightColor, a.normalColor = b == this.BEAT_TYPE_BEAT ? this.regionColor : this.regionColorOnset, a.deselectedColor = b == this.BEAT_TYPE_BEAT ? this.deselectedColor : this.deselectedColorOnset, a.highlightColor = b == this.BEAT_TYPE_BEAT ? this.highlightColor : this.highlightColorOnset, a.highlightDeselectedColor = b == this.BEAT_TYPE_BEAT ? this.highlightDeselectedColor : this.highlightDeselectedColorOnset, a.zDepth = b == this.BEAT_TYPE_BEAT ? 2 : 3, a.updateRender(), a.selected = !0
        }
        , needTempFileForBeatTracker: function (a) {
            return !0
        }
        , createTempFileForBeatTrackerIfNecessary: function (a, b) {
            var c = this.needTempFileForBeatTracker(a);
            if (c) {
                var d = require("temp")
                    , e = (require("fs"), d.path({
                        suffix: ".wav"
                    }));
                n(this.wavesurfer.backend.buffer, e, function (a) {
                    b(a, c)
                })
            } else b(a, c)
        }
        , computeBeats: function (a) {
            console.log("beat detection step 1/5 - create temp WAV file"), $("#beatDetectorStatusInfo")
                .text("beat detection in progress: step 1/5"), this.createTempFileForBeatTrackerIfNecessary(a, function (a, b) {
                    console.log("beat detection step 2/5 - compute beats"), $("#beatDetectorStatusInfo")
                        .text("beat detection in progress: step 2/5"), c(a, function (c, d) {
                            if (console.log("beat detection step 5/5 - delete temp WAV file"), $("#beatDetectorStatusInfo")
                                .text("beat detection in progress: step 5/5"), b && this.deleteTempFileForBeatTracker(a), null == c) {
                                var e = "beat detection error:Please look for solutions at\nhttp://mamoworld.com/beat-edit-faq\n" + d;
                                console.log(e), alert(e), c = {
                                    beatTimes: []
                                    , onsetTimes: []
                                    , onsetWeights: []
                                }
                            }
                            this.preprocessBeatData(c), this.recreateBeatRegions(), $("#beatDetectorStatusInfo")
                                .text(""), this.wavesurfer.fireEvent("beatsLoaded")
                        }.bind(this))
                }.bind(this))
        }
        , deleteTempFileForBeatTracker: function (a) {
            fs = require("fs"), fs.unlink(a, function (a) {
                if (a) throw a
            })
        }
        , updateAfterSelectionChange: function () {
            for (var a = 0; a < this.regions.length; a++) {
                var b = this.regions[a]
                    , c = b.selected ? b.normalColor : b.deselectedColor;
                c != b.color && (b.color = c, b.updateRender())
            }
        }
        , updateOnsetSelectionAmount: function (a) {
            this.onsetSelector.setAmount(a), this.updateOnsetSelection()
        }
        , updateOnsetSelectionChaos: function (a) {
            this.onsetSelector.setChaos(a), this.updateOnsetSelection()
        }
        , updateOnsetSelectionMinimumDistanceFilter: function (a) {
            this.onsetSelector.setMinimumDistance(a), this.updateOnsetSelection()
        }
        , updateOnsetSelectionSeed: function (a) {
            this.onsetSelector.setSeed(a), this.updateOnsetSelection()
        }
        , updateOnsetSelection: function () {
            if (0 != this.beatTimes.length && 0 != this.onsetTimes.length) {
                for (var a = this.onsetSelector.getSelectionFunction(), b = 0; b < this.onsetTimes.length; b++) {
                    var c = this.onsetIndexToAllBeatsIndex[b];
                    this.regions[c].selected = a(b)
                }
                this.updateAfterSelectionChange()
            }
        }
        , updateRealBeatsSelection: function (a, b, c, d) {
            function e(a, b, c, d, e) {
                if (!(d > a || a > e)) {
                    var f = k.realBeatIndexToAllBeatsIndex[a];
                    if ("select" == c) k.regions[f].selected = b;
                    else if ("add" == c) k.regions[f].selected = b || k.regions[f].selected;
                    else {
                        if ("remove" != c) throw "unsuported select mode";
                        k.regions[f].selected = !b && k.regions[f].selected
                    }
                }
            }
            if (0 != this.beatTimes.length && 0 != this.realBeatTimes.length) {
                var f = this.wavesurfer.getCurrentTime()
                    , g = this.getClosestBeatIndex(f, this.realBeatTimes)
                    , h = 0
                    , i = this.realBeatTimes.length - 1;
                if ("workarea" == d) {
                    var j = this.wavesurfer.regions.selectionRegion;
                    if (!j) return;
                    h = this.getFirstBeatIndexAfter(j.start, this.realBeatTimes), i = this.getLastBeatIndexBefore(j.end, this.realBeatTimes)
                }
                for (var k = this, l = g, m = g; i >= m; m++) {
                    var n = m == l;
                    e(m, n, a, h, i), n && (l = m + this.randomInt(b, c))
                }
                l = g;
                for (var m = g; m >= h; m--) {
                    var n = m == l;
                    e(m, n, a, h, i), n && (l = m - this.randomInt(b, c))
                }
                this.updateAfterSelectionChange(), this.onsetSelector.setSelectedBeatTimes(this.getSelectedRealBeatsData()
                    .times), this.updateOnsetSelection()
            }
        }
        , getClosestBeatIndex: function (a, b) {
            var c = 0
                , d = b.length - 1;
            if (0 > d) return 0;
            for (; d > c;) {
                var e = Math.floor((c + d) / 2)
                    , f = Math.abs(b[e] - a)
                    , g = Math.abs(b[e + 1] - a);
                f >= g ? c = e + 1 : d = e
            }
            return d
        }
        , getFirstBeatIndexAfter: function (a, b) {
            var c = this.getClosestBeatIndex(a, b);
            return b[c] < a && c++, c
        }
        , getLastBeatIndexBefore: function (a, b) {
            var c = this.getClosestBeatIndex(a, b);
            return b[c] > a && c--, c
        }
        , randomInt: function (a, b) {
            return Math.floor(Math.random() * (b - a + 1) + a)
        }
    }, WaveSurfer.util.extend(WaveSurfer.Beats, WaveSurfer.Observer), WaveSurfer.Region.updateRender = function () {
        var a = this.wavesurfer.getDuration()
            , b = this.wrapper.scrollWidth;
        this.start < 0 && (this.start = 0, this.end = this.end - this.start), this.end > a && (this.end = a, this.start = a - (this.end - this.start));
        var c = this.color
            , d = ~~((this.end - this.start) / a * b) + "px";
        this.isBeat && (d = "1px", this.style(this.element, {
            zIndex: this.zDepth
        })), this.style(this.element, {
            left: ~~(this.start / a * b) + "px"
            , width: d
            , backgroundColor: c
            , cursor: this.drag ? "move" : "default"
        }), this.element.title = this.formatTime(this.start, this.end)
    }, WaveSurfer.Regions.updateRender = function () {
        Object.keys(this.list)
            .forEach(function (a) {
                this.list[a].updateRender()
            }, this)
    }, WaveSurfer.Regions.clearBeats = function () {
        Object.keys(this.list)
            .forEach(function (a) {
                this.list[a].isBeat && this.list[a].remove()
            }, this)
    }, WaveSurfer.initBeats = function (a) {
        this.beats || (this.beats = Object.create(WaveSurfer.Beats), this.beats.init(this, a)), this.beats.ticks || (this.beats.ticks = Object.create(WaveSurfer.Beats.Ticks), this.beats.ticks.init(this.beats, {}))
    }, WaveSurfer.Beats.Ticks = {
        init: function (a, b) {
            this.beats = a, this.wavesurfer = a.wavesurfer, this.audioContext = this.wavesurfer.backend.getAudioContext();
            var c = new CSInterface
                , d = c.getSystemPath(SystemPath.EXTENSION);
            this.file = b.file || d + "/payloads/click.wav", this.fileDeselected = b.fileDeselected || d + "/payloads/click_deselected.wav", this.buffer = null, this.bufferDeselected = null, this.play = !0, this.scheduleRepeatTime = 25, this.scheduleAheadTime = .1, this.nextBeatToPlay = 0, this.tickIntroDuration = b.tickIntroDuration || .013, this.timerID = null, this.volumeControl = Object.create(L), this.volumeControl.init(this.audioContext, {}), this.volumeControl.connectTarget(this.audioContext.destination), this.timerID = setInterval(this.scheduleTicks.bind(this), this.scheduleRepeatTime), this.loadAudio(), Q.on("play", this.updateNextBeatToPlay.bind(this)), Q.on("seek", this.updateNextBeatToPlay.bind(this)), Q.on("pause", function () {
                this.timerID && (clearInterval(this.timerID), this.timerID = null)
            }.bind(this)), Q.on("play", function () {
                null == this.timerID && (this.timerID = setInterval(this.scheduleTicks.bind(this), this.scheduleRepeatTime))
            }.bind(this))
        }
        , loadAudio: function () {
            var a = K;
            a.init(this.audioContext, this.loadDecodedBuffer.bind(this)), a.loadFile(this.file)
        }
        , loadDecodedBuffer: function (a) {
            this.buffer = a, this.loadAudioDeselected()
        }
        , loadAudioDeselected: function () {
            var a = K;
            a.init(this.audioContext, this.loadDecodedBufferDeselected.bind(this)), a.loadFile(this.fileDeselected)
        }
        , loadDecodedBufferDeselected: function (a) {
            this.bufferDeselected = a, this.wavesurfer.fireEvent("beatTicksAudioLoaded")
        }
        , scheduleTicks: function () {
            if (this.buffer && !(this.nextBeatToPlay >= this.beats.beatTimes.length))
                for (var a = this.audioContext.currentTime - this.wavesurfer.getCurrentTime(), b = a + this.beats.beatTimes[this.nextBeatToPlay] - this.tickIntroDuration; b < this.audioContext.currentTime + this.scheduleAheadTime;) {
                    var c = this.beats.regions[this.nextBeatToPlay].selected;
                    if (this.playTick(b, c, this.beats.beatTypes[this.nextBeatToPlay]), this.nextBeatToPlay++, this.nextBeatToPlay >= this.beats.beatTimes.length) return;
                    b = a + this.beats.beatTimes[this.nextBeatToPlay] - this.tickIntroDuration
                }
        }
        , playTick: function (a, b, c) {
            if (this.play && (b || c != this.beats.BEAT_TYPE_ONSET) && !(a < this.audioContext.currentTime)) {
                var d = b ? this.buffer : this.bufferDeselected;
                if (d) {
                    var e = this.audioContext.createBufferSource();
                    e.buffer = d, this.volumeControl.connectSource(e), e.start(a)
                }
            }
        }
        , updateNextBeatToPlay: function () {
            for (var a = this.wavesurfer.getCurrentTime(), b = 0; b < this.beats.beatTimes.length && this.beats.beatTimes[b] < a;) b++;
            this.nextBeatToPlay = b
        }
    }, WaveSurfer.Beats.Blinking = {
        init: function (a, b) {
            this.beats = a, this.wavesurfer = a.wavesurfer, this.blinkDuration = b.blinkDuration || .4, this.draw(), this.previousBeatIndex = -1, this.firstCurrentlyActiveBeatIndex = void 0, this.lastCurrentlyActiveBeatIndex = void 0
        }
        , draw: function () {
            try {
                var a = this.wavesurfer.getCurrentTime()
                    , b = this.wavesurfer.beats.regions
                    , c = this.wavesurfer.getDuration()
                    , d = 1
                    , e = -1
                    , f = a - this.blinkDuration
                    , g = a
                    , h = this.beats.getLastBeatIndexBefore(f, this.beats.beatTimes)
                    , i = this.beats.getFirstBeatIndexAfter(g, this.beats.beatTimes);
                h = Math.max(0, h), i = Math.min(i, this.beats.beatTimes.length - 1);
                for (var j = h; i >= j; j++) {
                    var k = this.beats.beatTimes[j]
                        , l = a - k
                        , m = k > a ? 1 : Math.min(l / this.blinkDuration, 1);
                    this.updateBar(j, m), 1 != m && c > l && (this.beats.beatTypes[j] != this.beats.BEAT_TYPE_ONSET || b[j].selected) && (c = l, e = j, d = m)
                }
                e > 0 && e < b.length && this.fireEvent("drawBeat", e, b[e], d), this.firstCurrentlyActiveBeatIndex = Math.min(this.firstCurrentlyActiveBeatIndex, this.beats.beatTimes.length - 1), this.lastCurrentlyActiveBeatIndex = Math.min(this.lastCurrentlyActiveBeatIndex, this.beats.beatTimes.length - 1);
                for (var j = this.firstCurrentlyActiveBeatIndex; j <= this.lastCurrentlyActiveBeatIndex; j++)(h > j || j > i) && this.updateBar(j, 1);
                this.firstCurrentlyActiveBeatIndex = h, this.lastCurrentlyActiveBeatIndex = i
            } catch (n) {
                alert("AAA error" + n)
            } finally {
                requestAnimationFrame(this.draw.bind(this))
            }
        }
        , updateBar: function (a, b) {
            if (!(0 > a || a >= this.beats.regions.length)) {
                var c = this.beats.regions[a]
                    , d = c.selected ? c.highlightColor : c.highlightDeselectedColor
                    , e = c.selected ? c.normalColor : c.deselectedColor;
                c.color = w(d, e, b), c.updateRender()
            }
        }
    }, WaveSurfer.util.extend(WaveSurfer.Beats.Blinking, WaveSurfer.Observer);
    var L = {
        gain: 1
        , isMuted: !1
        , audioContext: null
        , gainNode: null
        , init: function (a, b) {
            b.volume && (this.gain = this.volumeToGainVal(b.volume)), this.isMuted = b.isMuted || this.isMuted, this.audioContext = a, this.gainNode = this.audioContext.createGain()
        }
        , connectSource: function (a) {
            a.connect(this.gainNode)
        }
        , connectTarget: function (a) {
            this.gainNode.connect(a)
        }
        , getGainNode: function () {
            return this.gainNode
        }
        , volumeToGainVal: function (a) {
            return Math.cos(.5 * (1 - a) * Math.PI)
        }
        , setVolume: function (a) {
            this.isMuted = !1, this.gain = this.volumeToGainVal(a), this.gainNode.gain.value = this.gain
        }
        , toggleMute: function () {
            this.isMuted = !this.isMuted, this.isMuted ? this.gainNode.gain.value = 0 : this.gainNode.gain.value = this.gain
        }
    };
    WaveSurfer.addVolumeControl = function (a) {
            return this.volumeControl = Object.create(L), this.volumeControl.init(this.backend.ac, a), this.backend.setFilters([this.volumeControl.getGainNode()]), this.volumeControl
        }, $(document)
        .ready(function () {
            y()
        }), $(document)
        .ready(function () {
            function a() {
                var a = new J
                    , b = a.hasSetting(R, "usedSocialMediaAlready") ? a.getSetting(R, "usedSocialMediaAlready") : !1
                    , c = a.hasSetting(R, "socialMediaHintShownAlready") ? a.getSetting(R, "socialMediaHintShownAlready") : !1
                    , d = a.hasSetting(R, "daysUsed") ? a.getSetting(R, "daysUsed") : 0;
                return d >= 3 && !b && !c
            }
            $("#facebook")
                .on("click", function (a) {
                    a.preventDefault();
                    var b = "https://facebook.com/dialog/share"
                        , c = {
                            app_id: 0x3fa49178be403
                            , display: "page"
                            , href: "http://aescripts.com/beatedit-for-premiere-pro"
                            , redirect_uri: "http://mamoworld.com/beat-edit-facebook-thank-you"
                        }
                        , d = b + "?" + $.param(c);
                    (new J)
                    .saveSetting(R, "usedSocialMediaAlready", !0), csInterface.openURLInDefaultBrowser(d)
                }), $("#tweet")
                .on("click", function (a) {
                    a.preventDefault();
                    var b = "https://twitter.com/intent/tweet"
                        , c = {
                            text: z()
                            , url: "http://aescripts.com/beatedit-for-premiere-pro"
                        }
                        , d = b + "?" + $.param(c);
                    (new J)
                    .saveSetting(R, "usedSocialMediaAlready", !0), csInterface.openURLInDefaultBrowser(d)
                }), a() && setTimeout(function () {
                    $("#social-media-icons")
                        .popover({
                            trigger: "manual"
                            , html: !0
                            , title: '<strong>Share</strong><button type="button" class="close" onclick="$(&quot;#social-media-icons&quot;).popover(&quot;hide&quot;);">&times;</button>'
                            , content: "Tell Your Friends<br/> about BeatEdit<br/> on Twitter or Facebook"
                            , placement: "bottom"
                        }), $("#social-media-icons")
                        .popover("show"), (new J)
                        .saveSetting(R, "socialMediaHintShownAlready", !0)
                }, 1e3)
        });
    var M = !1
        , N = new Date("December 1, 2015")
        , O = "BeatEditPremiere"
        , P = "728752";
    $(document)
        .ready(function () {
            D(!1, !0), $("body")
                .delegate("#uninstallLicenseButton", "click", function () {
                    C("-", function () {
                        D(!1, !1)
                    })
                }), $("body")
                .delegate("#installLicenseButton", "click", function (a) {
                    var b = $("#licenseCodeTextField")
                        .val()
                        , c = {};
                    a.shiftKey && (c.debugMode = !0), C(b, function () {
                        D(!0, !1, c)
                    })
                }), $("body")
                .delegate("#buyLicenseButton", "click", function () {
                    csInterface.openURLInDefaultBrowser("http://aescripts.com/beatedit-for-premiere-pro")
                })
        });
    var Q, R = "BeatEdit for Premiere Pro"
        , S = "1.0.10";
    $(document)
        .ready(F), $(document)
        .ready(G)
}! function (a, b) {
    function c(a) {
        var b = a.length
            , c = ia.type(a);
        return ia.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || "function" !== c && (0 === b || "number" == typeof b && b > 0 && b - 1 in a)
    }

    function d(a) {
        var b = xa[a] = {};
        return ia.each(a.match(ka) || [], function (a, c) {
            b[c] = !0
        }), b
    }

    function e(a, c, d, e) {
        if (ia.acceptData(a)) {
            var f, g, h = ia.expando
                , i = "string" == typeof c
                , j = a.nodeType
                , k = j ? ia.cache : a
                , l = j ? a[h] : a[h] && h;
            if (l && k[l] && (e || k[l].data) || !i || d !== b) return l || (j ? a[h] = l = _.pop() || ia.guid++ : l = h), k[l] || (k[l] = {}, j || (k[l].toJSON = ia.noop)), "object" != typeof c && "function" != typeof c || (e ? k[l] = ia.extend(k[l], c) : k[l].data = ia.extend(k[l].data, c)), f = k[l], e || (f.data || (f.data = {}), f = f.data), d !== b && (f[ia.camelCase(c)] = d), i ? (g = f[c], null == g && (g = f[ia.camelCase(c)])) : g = f, g
        }
    }

    function f(a, b, c) {
        if (ia.acceptData(a)) {
            var d, e, f, g = a.nodeType
                , i = g ? ia.cache : a
                , j = g ? a[ia.expando] : ia.expando;
            if (i[j]) {
                if (b && (f = c ? i[j] : i[j].data)) {
                    ia.isArray(b) ? b = b.concat(ia.map(b, ia.camelCase)) : b in f ? b = [b] : (b = ia.camelCase(b), b = b in f ? [b] : b.split(" "));
                    for (d = 0, e = b.length; e > d; d++) delete f[b[d]];
                    if (!(c ? h : ia.isEmptyObject)(f)) return
                }(c || (delete i[j].data, h(i[j]))) && (g ? ia.cleanData([a], !0) : ia.support.deleteExpando || i != i.window ? delete i[j] : i[j] = null)
            }
        }
    }

    function g(a, c, d) {
        if (d === b && 1 === a.nodeType) {
            var e = "data-" + c.replace(za, "-$1")
                .toLowerCase();
            if (d = a.getAttribute(e), "string" == typeof d) {
                try {
                    d = "true" === d ? !0 : "false" === d ? !1 : "null" === d ? null : +d + "" === d ? +d : ya.test(d) ? ia.parseJSON(d) : d
                } catch (f) {}
                ia.data(a, c, d)
            } else d = b
        }
        return d
    }

    function h(a) {
        var b;
        for (b in a)
            if (("data" !== b || !ia.isEmptyObject(a[b])) && "toJSON" !== b) return !1;
        return !0
    }

    function i() {
        return !0
    }

    function j() {
        return !1
    }

    function k(a, b) {
        do a = a[b]; while (a && 1 !== a.nodeType);
        return a
    }

    function l(a, b, c) {
        if (b = b || 0, ia.isFunction(b)) return ia.grep(a, function (a, d) {
            var e = !!b.call(a, d, a);
            return e === c
        });
        if (b.nodeType) return ia.grep(a, function (a) {
            return a === b === c
        });
        if ("string" == typeof b) {
            var d = ia.grep(a, function (a) {
                return 1 === a.nodeType
            });
            if (Ra.test(b)) return ia.filter(b, d, !c);
            b = ia.filter(b, d)
        }
        return ia.grep(a, function (a) {
            return ia.inArray(a, b) >= 0 === c
        })
    }

    function m(a) {
        var b = Ua.split("|")
            , c = a.createDocumentFragment();
        if (c.createElement)
            for (; b.length;) c.createElement(b.pop());
        return c
    }

    function n(a, b) {
        return a.getElementsByTagName(b)[0] || a.appendChild(a.ownerDocument.createElement(b))
    }

    function o(a) {
        var b = a.getAttributeNode("type");
        return a.type = (b && b.specified) + "/" + a.type, a
    }

    function p(a) {
        var b = eb.exec(a.type);
        return b ? a.type = b[1] : a.removeAttribute("type"), a
    }

    function q(a, b) {
        for (var c, d = 0; null != (c = a[d]); d++) ia._data(c, "globalEval", !b || ia._data(b[d], "globalEval"))
    }

    function r(a, b) {
        if (1 === b.nodeType && ia.hasData(a)) {
            var c, d, e, f = ia._data(a)
                , g = ia._data(b, f)
                , h = f.events;
            if (h) {
                delete g.handle, g.events = {};
                for (c in h)
                    for (d = 0, e = h[c].length; e > d; d++) ia.event.add(b, c, h[c][d])
            }
            g.data && (g.data = ia.extend({}, g.data))
        }
    }

    function s(a, b) {
        var c, d, e;
        if (1 === b.nodeType) {
            if (c = b.nodeName.toLowerCase(), !ia.support.noCloneEvent && b[ia.expando]) {
                e = ia._data(b);
                for (d in e.events) ia.removeEvent(b, d, e.handle);
                b.removeAttribute(ia.expando)
            }
            "script" === c && b.text !== a.text ? (o(b)
                .text = a.text, p(b)) : "object" === c ? (b.parentNode && (b.outerHTML = a.outerHTML), ia.support.html5Clone && a.innerHTML && !ia.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : "input" === c && bb.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : "option" === c ? b.defaultSelected = b.selected = a.defaultSelected : "input" !== c && "textarea" !== c || (b.defaultValue = a.defaultValue)
        }
    }

    function t(a, c) {
        var d, e, f = 0
            , g = typeof a.getElementsByTagName !== V ? a.getElementsByTagName(c || "*") : typeof a.querySelectorAll !== V ? a.querySelectorAll(c || "*") : b;
        if (!g)
            for (g = [], d = a.childNodes || a; null != (e = d[f]); f++) !c || ia.nodeName(e, c) ? g.push(e) : ia.merge(g, t(e, c));
        return c === b || c && ia.nodeName(a, c) ? ia.merge([a], g) : g
    }

    function u(a) {
        bb.test(a.type) && (a.defaultChecked = a.checked)
    }

    function v(a, b) {
        if (b in a) return b;
        for (var c = b.charAt(0)
                .toUpperCase() + b.slice(1), d = b, e = yb.length; e--;)
            if (b = yb[e] + c, b in a) return b;
        return d
    }

    function w(a, b) {
        return a = b || a, "none" === ia.css(a, "display") || !ia.contains(a.ownerDocument, a)
    }

    function x(a, b) {
        for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = ia._data(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && w(d) && (f[g] = ia._data(d, "olddisplay", B(d.nodeName)))) : f[g] || (e = w(d), (c && "none" !== c || !e) && ia._data(d, "olddisplay", e ? c : ia.css(d, "display"))));
        for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none"));
        return a
    }

    function y(a, b, c) {
        var d = rb.exec(b);
        return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
    }

    function z(a, b, c, d, e) {
        for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += ia.css(a, c + xb[f], !0, e)), d ? ("content" === c && (g -= ia.css(a, "padding" + xb[f], !0, e)), "margin" !== c && (g -= ia.css(a, "border" + xb[f] + "Width", !0, e))) : (g += ia.css(a, "padding" + xb[f], !0, e), "padding" !== c && (g += ia.css(a, "border" + xb[f] + "Width", !0, e)));
        return g
    }

    function A(a, b, c) {
        var d = !0
            , e = "width" === b ? a.offsetWidth : a.offsetHeight
            , f = kb(a)
            , g = ia.support.boxSizing && "border-box" === ia.css(a, "boxSizing", !1, f);
        if (0 >= e || null == e) {
            if (e = lb(a, b, f), (0 > e || null == e) && (e = a.style[b]), sb.test(e)) return e;
            d = g && (ia.support.boxSizingReliable || e === a.style[b]), e = parseFloat(e) || 0
        }
        return e + z(a, b, c || (g ? "border" : "content"), d, f) + "px"
    }

    function B(a) {
        var b = W
            , c = ub[a];
        return c || (c = C(a, b), "none" !== c && c || (jb = (jb || ia("<iframe frameborder='0' width='0' height='0'/>")
                .css("cssText", "display:block !important"))
            .appendTo(b.documentElement), b = (jb[0].contentWindow || jb[0].contentDocument)
            .document, b.write("<!doctype html><html><body>"), b.close(), c = C(a, b), jb.detach()), ub[a] = c), c
    }

    function C(a, b) {
        var c = ia(b.createElement(a))
            .appendTo(b.body)
            , d = ia.css(c[0], "display");
        return c.remove(), d
    }

    function D(a, b, c, d) {
        var e;
        if (ia.isArray(b)) ia.each(b, function (b, e) {
            c || Ab.test(a) ? d(a, e) : D(a + "[" + ("object" == typeof e ? b : "") + "]", e, c, d)
        });
        else if (c || "object" !== ia.type(b)) d(a, b);
        else
            for (e in b) D(a + "[" + e + "]", b[e], c, d)
    }

    function E(a) {
        return function (b, c) {
            "string" != typeof b && (c = b, b = "*");
            var d, e = 0
                , f = b.toLowerCase()
                .match(ka) || [];
            if (ia.isFunction(c))
                for (; d = f[e++];) "+" === d[0] ? (d = d.slice(1) || "*", (a[d] = a[d] || [])
                        .unshift(c)) : (a[d] = a[d] || [])
                    .push(c)
        }
    }

    function F(a, b, c, d) {
        function e(h) {
            var i;
            return f[h] = !0, ia.each(a[h] || [], function (a, h) {
                var j = h(b, c, d);
                return "string" != typeof j || g || f[j] ? g ? !(i = j) : void 0 : (b.dataTypes.unshift(j), e(j), !1)
            }), i
        }
        var f = {}
            , g = a === Rb;
        return e(b.dataTypes[0]) || !f["*"] && e("*")
    }

    function G(a, c) {
        var d, e, f = ia.ajaxSettings.flatOptions || {};
        for (e in c) c[e] !== b && ((f[e] ? a : d || (d = {}))[e] = c[e]);
        return d && ia.extend(!0, a, d), a
    }

    function H(a, c, d) {
        var e, f, g, h, i = a.contents
            , j = a.dataTypes
            , k = a.responseFields;
        for (h in k) h in d && (c[k[h]] = d[h]);
        for (;
            "*" === j[0];) j.shift(), f === b && (f = a.mimeType || c.getResponseHeader("Content-Type"));
        if (f)
            for (h in i)
                if (i[h] && i[h].test(f)) {
                    j.unshift(h);
                    break
                } if (j[0] in d) g = j[0];
        else {
            for (h in d) {
                if (!j[0] || a.converters[h + " " + j[0]]) {
                    g = h;
                    break
                }
                e || (e = h)
            }
            g = g || e
        }
        return g ? (g !== j[0] && j.unshift(g), d[g]) : void 0
    }

    function I(a, b) {
        var c, d, e, f, g = {}
            , h = 0
            , i = a.dataTypes.slice()
            , j = i[0];
        if (a.dataFilter && (b = a.dataFilter(b, a.dataType)), i[1])
            for (e in a.converters) g[e.toLowerCase()] = a.converters[e];
        for (; d = i[++h];)
            if ("*" !== d) {
                if ("*" !== j && j !== d) {
                    if (e = g[j + " " + d] || g["* " + d], !e)
                        for (c in g)
                            if (f = c.split(" "), f[1] === d && (e = g[j + " " + f[0]] || g["* " + f[0]])) {
                                e === !0 ? e = g[c] : g[c] !== !0 && (d = f[0], i.splice(h--, 0, d));
                                break
                            } if (e !== !0)
                        if (e && a["throws"]) b = e(b);
                        else try {
                            b = e(b)
                        } catch (k) {
                            return {
                                state: "parsererror"
                                , error: e ? k : "No conversion from " + j + " to " + d
                            }
                        }
                }
                j = d
            } return {
            state: "success"
            , data: b
        }
    }

    function J() {
        try {
            return new a.XMLHttpRequest
        } catch (b) {}
    }

    function K() {
        try {
            return new a.ActiveXObject("Microsoft.XMLHTTP")
        } catch (b) {}
    }

    function L() {
        return setTimeout(function () {
            $b = b
        }), $b = ia.now()
    }

    function M(a, b) {
        ia.each(b, function (b, c) {
            for (var d = (ec[b] || [])
                    .concat(ec["*"]), e = 0, f = d.length; f > e; e++)
                if (d[e].call(a, b, c)) return
        })
    }

    function N(a, b, c) {
        var d, e, f = 0
            , g = dc.length
            , h = ia.Deferred()
            .always(function () {
                delete i.elem
            })
            , i = function () {
                if (e) return !1;
                for (var b = $b || L(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++) j.tweens[g].run(f);
                return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1)
            }
            , j = h.promise({
                elem: a
                , props: ia.extend({}, b)
                , opts: ia.extend(!0, {
                    specialEasing: {}
                }, c)
                , originalProperties: b
                , originalOptions: c
                , startTime: $b || L()
                , duration: c.duration
                , tweens: []
                , createTween: function (b, c) {
                    var d = ia.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
                    return j.tweens.push(d), d
                }
                , stop: function (b) {
                    var c = 0
                        , d = b ? j.tweens.length : 0;
                    if (e) return this;
                    for (e = !0; d > c; c++) j.tweens[c].run(1);
                    return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this
                }
            })
            , k = j.props;
        for (O(k, j.opts.specialEasing); g > f; f++)
            if (d = dc[f].call(j, a, k, j.opts)) return d;
        return M(j, k), ia.isFunction(j.opts.start) && j.opts.start.call(a, j), ia.fx.timer(ia.extend(i, {
                elem: a
                , anim: j
                , queue: j.opts.queue
            })), j.progress(j.opts.progress)
            .done(j.opts.done, j.opts.complete)
            .fail(j.opts.fail)
            .always(j.opts.always)
    }

    function O(a, b) {
        var c, d, e, f, g;
        for (e in a)
            if (d = ia.camelCase(e), f = b[d], c = a[e], ia.isArray(c) && (f = c[1], c = a[e] = c[0]), e !== d && (a[d] = c, delete a[e]), g = ia.cssHooks[d], g && "expand" in g) {
                c = g.expand(c), delete a[d];
                for (e in c) e in a || (a[e] = c[e], b[e] = f)
            } else b[d] = f
    }

    function P(a, b, c) {
        var d, e, f, g, h, i, j, k, l, m = this
            , n = a.style
            , o = {}
            , p = []
            , q = a.nodeType && w(a);
        c.queue || (k = ia._queueHooks(a, "fx"), null == k.unqueued && (k.unqueued = 0, l = k.empty.fire, k.empty.fire = function () {
            k.unqueued || l()
        }), k.unqueued++, m.always(function () {
            m.always(function () {
                k.unqueued--, ia.queue(a, "fx")
                    .length || k.empty.fire()
            })
        })), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [n.overflow, n.overflowX, n.overflowY], "inline" === ia.css(a, "display") && "none" === ia.css(a, "float") && (ia.support.inlineBlockNeedsLayout && "inline" !== B(a.nodeName) ? n.zoom = 1 : n.display = "inline-block")), c.overflow && (n.overflow = "hidden", ia.support.shrinkWrapBlocks || m.always(function () {
            n.overflow = c.overflow[0], n.overflowX = c.overflow[1], n.overflowY = c.overflow[2]
        }));
        for (e in b)
            if (g = b[e], ac.exec(g)) {
                if (delete b[e], i = i || "toggle" === g, g === (q ? "hide" : "show")) continue;
                p.push(e)
            } if (f = p.length) {
            h = ia._data(a, "fxshow") || ia._data(a, "fxshow", {}), "hidden" in h && (q = h.hidden), i && (h.hidden = !q), q ? ia(a)
                .show() : m.done(function () {
                    ia(a)
                        .hide()
                }), m.done(function () {
                    var b;
                    ia._removeData(a, "fxshow");
                    for (b in o) ia.style(a, b, o[b])
                });
            for (e = 0; f > e; e++) d = p[e], j = m.createTween(d, q ? h[d] : 0), o[d] = h[d] || ia.style(a, d), d in h || (h[d] = j.start, q && (j.end = j.start, j.start = "width" === d || "height" === d ? 1 : 0))
        }
    }

    function Q(a, b, c, d, e) {
        return new Q.prototype.init(a, b, c, d, e)
    }

    function R(a, b) {
        var c, d = {
                height: a
            }
            , e = 0;
        for (b = b ? 1 : 0; 4 > e; e += 2 - b) c = xb[e], d["margin" + c] = d["padding" + c] = a;
        return b && (d.opacity = d.width = a), d
    }

    function S(a) {
        return ia.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
    }
    var T, U, V = typeof b
        , W = a.document
        , X = a.location
        , Y = a.jQuery
        , Z = a.$
        , $ = {}
        , _ = []
        , aa = "1.9.1"
        , ba = _.concat
        , ca = _.push
        , da = _.slice
        , ea = _.indexOf
        , fa = $.toString
        , ga = $.hasOwnProperty
        , ha = aa.trim
        , ia = function (a, b) {
            return new ia.fn.init(a, b, U)
        }
        , ja = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source
        , ka = /\S+/g
        , la = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
        , ma = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/
        , na = /^<(\w+)\s*\/?>(?:<\/\1>|)$/
        , oa = /^[\],:{}\s]*$/
        , pa = /(?:^|:|,)(?:\s*\[)+/g
        , qa = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g
        , ra = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g
        , sa = /^-ms-/
        , ta = /-([\da-z])/gi
        , ua = function (a, b) {
            return b.toUpperCase()
        }
        , va = function (a) {
            (W.addEventListener || "load" === a.type || "complete" === W.readyState) && (wa(), ia.ready())
        }
        , wa = function () {
            W.addEventListener ? (W.removeEventListener("DOMContentLoaded", va, !1), a.removeEventListener("load", va, !1)) : (W.detachEvent("onreadystatechange", va), a.detachEvent("onload", va))
        };
    ia.fn = ia.prototype = {
        jquery: aa
        , constructor: ia
        , init: function (a, c, d) {
            var e, f;
            if (!a) return this;
            if ("string" == typeof a) {
                if (e = "<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3 ? [null, a, null] : ma.exec(a), !e || !e[1] && c) return !c || c.jquery ? (c || d)
                    .find(a) : this.constructor(c)
                    .find(a);
                if (e[1]) {
                    if (c = c instanceof ia ? c[0] : c, ia.merge(this, ia.parseHTML(e[1], c && c.nodeType ? c.ownerDocument || c : W, !0)), na.test(e[1]) && ia.isPlainObject(c))
                        for (e in c) ia.isFunction(this[e]) ? this[e](c[e]) : this.attr(e, c[e]);
                    return this
                }
                if (f = W.getElementById(e[2]), f && f.parentNode) {
                    if (f.id !== e[2]) return d.find(a);
                    this.length = 1, this[0] = f
                }
                return this.context = W, this.selector = a, this
            }
            return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : ia.isFunction(a) ? d.ready(a) : (a.selector !== b && (this.selector = a.selector, this.context = a.context), ia.makeArray(a, this))
        }
        , selector: ""
        , length: 0
        , size: function () {
            return this.length
        }
        , toArray: function () {
            return da.call(this)
        }
        , get: function (a) {
            return null == a ? this.toArray() : 0 > a ? this[this.length + a] : this[a]
        }
        , pushStack: function (a) {
            var b = ia.merge(this.constructor(), a);
            return b.prevObject = this, b.context = this.context, b
        }
        , each: function (a, b) {
            return ia.each(this, a, b)
        }
        , ready: function (a) {
            return ia.ready.promise()
                .done(a), this
        }
        , slice: function () {
            return this.pushStack(da.apply(this, arguments))
        }
        , first: function () {
            return this.eq(0)
        }
        , last: function () {
            return this.eq(-1)
        }
        , eq: function (a) {
            var b = this.length
                , c = +a + (0 > a ? b : 0);
            return this.pushStack(c >= 0 && b > c ? [this[c]] : [])
        }
        , map: function (a) {
            return this.pushStack(ia.map(this, function (b, c) {
                return a.call(b, c, b)
            }))
        }
        , end: function () {
            return this.prevObject || this.constructor(null)
        }
        , push: ca
        , sort: [].sort
        , splice: [].splice
    }, ia.fn.init.prototype = ia.fn, ia.extend = ia.fn.extend = function () {
        var a, c, d, e, f, g, h = arguments[0] || {}
            , i = 1
            , j = arguments.length
            , k = !1;
        for ("boolean" == typeof h && (k = h, h = arguments[1] || {}, i = 2), "object" == typeof h || ia.isFunction(h) || (h = {}), j === i && (h = this, --i); j > i; i++)
            if (null != (f = arguments[i]))
                for (e in f) a = h[e], d = f[e], h !== d && (k && d && (ia.isPlainObject(d) || (c = ia.isArray(d))) ? (c ? (c = !1, g = a && ia.isArray(a) ? a : []) : g = a && ia.isPlainObject(a) ? a : {}, h[e] = ia.extend(k, g, d)) : d !== b && (h[e] = d));
        return h
    }, ia.extend({
        noConflict: function (b) {
            return a.$ === ia && (a.$ = Z), b && a.jQuery === ia && (a.jQuery = Y), ia
        }
        , isReady: !1
        , readyWait: 1
        , holdReady: function (a) {
            a ? ia.readyWait++ : ia.ready(!0)
        }
        , ready: function (a) {
            if (a === !0 ? !--ia.readyWait : !ia.isReady) {
                if (!W.body) return setTimeout(ia.ready);
                ia.isReady = !0, a !== !0 && --ia.readyWait > 0 || (T.resolveWith(W, [ia]), ia.fn.trigger && ia(W)
                    .trigger("ready")
                    .off("ready"))
            }
        }
        , isFunction: function (a) {
            return "function" === ia.type(a)
        }
        , isArray: Array.isArray || function (a) {
            return "array" === ia.type(a)
        }
        , isWindow: function (a) {
            return null != a && a == a.window
        }
        , isNumeric: function (a) {
            return !isNaN(parseFloat(a)) && isFinite(a)
        }
        , type: function (a) {
            return null == a ? String(a) : "object" == typeof a || "function" == typeof a ? $[fa.call(a)] || "object" : typeof a
        }
        , isPlainObject: function (a) {
            if (!a || "object" !== ia.type(a) || a.nodeType || ia.isWindow(a)) return !1;
            try {
                if (a.constructor && !ga.call(a, "constructor") && !ga.call(a.constructor.prototype, "isPrototypeOf")) return !1
            } catch (c) {
                return !1
            }
            var d;
            for (d in a);
            return d === b || ga.call(a, d)
        }
        , isEmptyObject: function (a) {
            var b;
            for (b in a) return !1;
            return !0
        }
        , error: function (a) {
            throw new Error(a)
        }
        , parseHTML: function (a, b, c) {
            if (!a || "string" != typeof a) return null;
            "boolean" == typeof b && (c = b, b = !1), b = b || W;
            var d = na.exec(a)
                , e = !c && [];
            return d ? [b.createElement(d[1])] : (d = ia.buildFragment([a], b, e), e && ia(e)
                .remove(), ia.merge([], d.childNodes))
        }
        , parseJSON: function (b) {
            return a.JSON && a.JSON.parse ? a.JSON.parse(b) : null === b ? b : "string" == typeof b && (b = ia.trim(b), b && oa.test(b.replace(qa, "@")
                .replace(ra, "]")
                .replace(pa, ""))) ? new Function("return " + b)() : void ia.error("Invalid JSON: " + b)
        }
        , parseXML: function (c) {
            var d, e;
            if (!c || "string" != typeof c) return null;
            try {
                a.DOMParser ? (e = new DOMParser, d = e.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))
            } catch (f) {
                d = b
            }
            return d && d.documentElement && !d.getElementsByTagName("parsererror")
                .length || ia.error("Invalid XML: " + c), d
        }
        , noop: function () {}
        , globalEval: function (b) {
            b && ia.trim(b) && (a.execScript || function (b) {
                a.eval.call(a, b)
            })(b)
        }
        , camelCase: function (a) {
            return a.replace(sa, "ms-")
                .replace(ta, ua)
        }
        , nodeName: function (a, b) {
            return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
        }
        , each: function (a, b, d) {
            var e, f = 0
                , g = a.length
                , h = c(a);
            if (d) {
                if (h)
                    for (; g > f && (e = b.apply(a[f], d), e !== !1); f++);
                else
                    for (f in a)
                        if (e = b.apply(a[f], d), e === !1) break
            } else if (h)
                for (; g > f && (e = b.call(a[f], f, a[f]), e !== !1); f++);
            else
                for (f in a)
                    if (e = b.call(a[f], f, a[f]), e === !1) break;
            return a
        }
        , trim: ha && !ha.call("\ufeff ") ? function (a) {
            return null == a ? "" : ha.call(a)
        } : function (a) {
            return null == a ? "" : (a + "")
                .replace(la, "")
        }
        , makeArray: function (a, b) {
            var d = b || [];
            return null != a && (c(Object(a)) ? ia.merge(d, "string" == typeof a ? [a] : a) : ca.call(d, a)), d
        }
        , inArray: function (a, b, c) {
            var d;
            if (b) {
                if (ea) return ea.call(b, a, c);
                for (d = b.length, c = c ? 0 > c ? Math.max(0, d + c) : c : 0; d > c; c++)
                    if (c in b && b[c] === a) return c
            }
            return -1
        }
        , merge: function (a, c) {
            var d = c.length
                , e = a.length
                , f = 0;
            if ("number" == typeof d)
                for (; d > f; f++) a[e++] = c[f];
            else
                for (; c[f] !== b;) a[e++] = c[f++];
            return a.length = e, a
        }
        , grep: function (a, b, c) {
            var d, e = []
                , f = 0
                , g = a.length;
            for (c = !!c; g > f; f++) d = !!b(a[f], f), c !== d && e.push(a[f]);
            return e
        }
        , map: function (a, b, d) {
            var e, f = 0
                , g = a.length
                , h = c(a)
                , i = [];
            if (h)
                for (; g > f; f++) e = b(a[f], f, d), null != e && (i[i.length] = e);
            else
                for (f in a) e = b(a[f], f, d), null != e && (i[i.length] = e);
            return ba.apply([], i)
        }
        , guid: 1
        , proxy: function (a, c) {
            var d, e, f;
            return "string" == typeof c && (f = a[c], c = a, a = f), ia.isFunction(a) ? (d = da.call(arguments, 2), e = function () {
                return a.apply(c || this, d.concat(da.call(arguments)))
            }, e.guid = a.guid = a.guid || ia.guid++, e) : b
        }
        , access: function (a, c, d, e, f, g, h) {
            var i = 0
                , j = a.length
                , k = null == d;
            if ("object" === ia.type(d)) {
                f = !0;
                for (i in d) ia.access(a, c, i, d[i], !0, g, h)
            } else if (e !== b && (f = !0, ia.isFunction(e) || (h = !0), k && (h ? (c.call(a, e), c = null) : (k = c, c = function (a, b, c) {
                    return k.call(ia(a), c)
                })), c))
                for (; j > i; i++) c(a[i], d, h ? e : e.call(a[i], i, c(a[i], d)));
            return f ? a : k ? c.call(a) : j ? c(a[0], d) : g
        }
        , now: function () {
            return (new Date)
                .getTime()
        }
    }), ia.ready.promise = function (b) {
        if (!T)
            if (T = ia.Deferred(), "complete" === W.readyState) setTimeout(ia.ready);
            else if (W.addEventListener) W.addEventListener("DOMContentLoaded", va, !1), a.addEventListener("load", va, !1);
        else {
            W.attachEvent("onreadystatechange", va), a.attachEvent("onload", va);
            var c = !1;
            try {
                c = null == a.frameElement && W.documentElement
            } catch (d) {}
            c && c.doScroll && ! function e() {
                if (!ia.isReady) {
                    try {
                        c.doScroll("left")
                    } catch (a) {
                        return setTimeout(e, 50)
                    }
                    wa(), ia.ready()
                }
            }()
        }
        return T.promise(b)
    }, ia.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function (a, b) {
        $["[object " + b + "]"] = b.toLowerCase()
    }), U = ia(W);
    var xa = {};
    ia.Callbacks = function (a) {
        a = "string" == typeof a ? xa[a] || d(a) : ia.extend({}, a);
        var c, e, f, g, h, i, j = []
            , k = !a.once && []
            , l = function (b) {
                for (e = a.memory && b, f = !0, h = i || 0, i = 0, g = j.length, c = !0; j && g > h; h++)
                    if (j[h].apply(b[0], b[1]) === !1 && a.stopOnFalse) {
                        e = !1;
                        break
                    } c = !1, j && (k ? k.length && l(k.shift()) : e ? j = [] : m.disable())
            }
            , m = {
                add: function () {
                    if (j) {
                        var b = j.length;
                        ! function d(b) {
                            ia.each(b, function (b, c) {
                                var e = ia.type(c);
                                "function" === e ? a.unique && m.has(c) || j.push(c) : c && c.length && "string" !== e && d(c)
                            })
                        }(arguments), c ? g = j.length : e && (i = b, l(e))
                    }
                    return this
                }
                , remove: function () {
                    return j && ia.each(arguments, function (a, b) {
                        for (var d;
                            (d = ia.inArray(b, j, d)) > -1;) j.splice(d, 1), c && (g >= d && g--, h >= d && h--)
                    }), this
                }
                , has: function (a) {
                    return a ? ia.inArray(a, j) > -1 : !(!j || !j.length)
                }
                , empty: function () {
                    return j = [], this
                }
                , disable: function () {
                    return j = k = e = b, this
                }
                , disabled: function () {
                    return !j
                }
                , lock: function () {
                    return k = b, e || m.disable(), this
                }
                , locked: function () {
                    return !k
                }
                , fireWith: function (a, b) {
                    return b = b || [], b = [a, b.slice ? b.slice() : b], !j || f && !k || (c ? k.push(b) : l(b)), this
                }
                , fire: function () {
                    return m.fireWith(this, arguments), this
                }
                , fired: function () {
                    return !!f
                }
            };
        return m
    }, ia.extend({
        Deferred: function (a) {
            var b = [
                    ["resolve", "done", ia.Callbacks("once memory"), "resolved"]
                    , ["reject", "fail", ia.Callbacks("once memory"), "rejected"]
                    , ["notify", "progress", ia.Callbacks("memory")]
                ]
                , c = "pending"
                , d = {
                    state: function () {
                        return c
                    }
                    , always: function () {
                        return e.done(arguments)
                            .fail(arguments), this
                    }
                    , then: function () {
                        var a = arguments;
                        return ia.Deferred(function (c) {
                                ia.each(b, function (b, f) {
                                    var g = f[0]
                                        , h = ia.isFunction(a[b]) && a[b];
                                    e[f[1]](function () {
                                        var a = h && h.apply(this, arguments);
                                        a && ia.isFunction(a.promise) ? a.promise()
                                            .done(c.resolve)
                                            .fail(c.reject)
                                            .progress(c.notify) : c[g + "With"](this === d ? c.promise() : this, h ? [a] : arguments)
                                    })
                                }), a = null
                            })
                            .promise()
                    }
                    , promise: function (a) {
                        return null != a ? ia.extend(a, d) : d
                    }
                }
                , e = {};
            return d.pipe = d.then, ia.each(b, function (a, f) {
                var g = f[2]
                    , h = f[3];
                d[f[1]] = g.add, h && g.add(function () {
                    c = h
                }, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function () {
                    return e[f[0] + "With"](this === e ? d : this, arguments), this
                }, e[f[0] + "With"] = g.fireWith
            }), d.promise(e), a && a.call(e, e), e
        }
        , when: function (a) {
            var b, c, d, e = 0
                , f = da.call(arguments)
                , g = f.length
                , h = 1 !== g || a && ia.isFunction(a.promise) ? g : 0
                , i = 1 === h ? a : ia.Deferred()
                , j = function (a, c, d) {
                    return function (e) {
                        c[a] = this, d[a] = arguments.length > 1 ? da.call(arguments) : e, d === b ? i.notifyWith(c, d) : --h || i.resolveWith(c, d)
                    }
                };
            if (g > 1)
                for (b = new Array(g), c = new Array(g), d = new Array(g); g > e; e++) f[e] && ia.isFunction(f[e].promise) ? f[e].promise()
                    .done(j(e, d, f))
                    .fail(i.reject)
                    .progress(j(e, c, b)) : --h;
            return h || i.resolveWith(d, f), i.promise()
        }
    }), ia.support = function () {
        var b, c, d, e, f, g, h, i, j, k, l = W.createElement("div");
        if (l.setAttribute("className", "t"), l.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", c = l.getElementsByTagName("*"), d = l.getElementsByTagName("a")[0], !c || !d || !c.length) return {};
        f = W.createElement("select"), h = f.appendChild(W.createElement("option")), e = l.getElementsByTagName("input")[0], d.style.cssText = "top:1px;float:left;opacity:.5", b = {
                getSetAttribute: "t" !== l.className
                , leadingWhitespace: 3 === l.firstChild.nodeType
                , tbody: !l.getElementsByTagName("tbody")
                    .length
                , htmlSerialize: !!l.getElementsByTagName("link")
                    .length
                , style: /top/.test(d.getAttribute("style"))
                , hrefNormalized: "/a" === d.getAttribute("href")
                , opacity: /^0.5/.test(d.style.opacity)
                , cssFloat: !!d.style.cssFloat
                , checkOn: !!e.value
                , optSelected: h.selected
                , enctype: !!W.createElement("form")
                    .enctype
                , html5Clone: "<:nav></:nav>" !== W.createElement("nav")
                    .cloneNode(!0)
                    .outerHTML
                , boxModel: "CSS1Compat" === W.compatMode
                , deleteExpando: !0
                , noCloneEvent: !0
                , inlineBlockNeedsLayout: !1
                , shrinkWrapBlocks: !1
                , reliableMarginRight: !0
                , boxSizingReliable: !0
                , pixelPosition: !1
            }, e.checked = !0, b.noCloneChecked = e.cloneNode(!0)
            .checked, f.disabled = !0, b.optDisabled = !h.disabled;
        try {
            delete l.test
        } catch (m) {
            b.deleteExpando = !1
        }
        e = W.createElement("input"), e.setAttribute("value", ""), b.input = "" === e.getAttribute("value"), e.value = "t", e.setAttribute("type", "radio"), b.radioValue = "t" === e.value, e.setAttribute("checked", "t"), e.setAttribute("name", "t"), g = W.createDocumentFragment(), g.appendChild(e), b.appendChecked = e.checked, b.checkClone = g.cloneNode(!0)
            .cloneNode(!0)
            .lastChild.checked, l.attachEvent && (l.attachEvent("onclick", function () {
                    b.noCloneEvent = !1
                }), l.cloneNode(!0)
                .click());
        for (k in {
                submit: !0
                , change: !0
                , focusin: !0
            }) l.setAttribute(i = "on" + k, "t"), b[k + "Bubbles"] = i in a || l.attributes[i].expando === !1;
        return l.style.backgroundClip = "content-box", l.cloneNode(!0)
            .style.backgroundClip = "", b.clearCloneStyle = "content-box" === l.style.backgroundClip, ia(function () {
                var c, d, e, f = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;"
                    , g = W.getElementsByTagName("body")[0];
                g && (c = W.createElement("div"), c.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", g.appendChild(c)
                    .appendChild(l), l.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", e = l.getElementsByTagName("td"), e[0].style.cssText = "padding:0;margin:0;border:0;display:none", j = 0 === e[0].offsetHeight, e[0].style.display = "", e[1].style.display = "none", b.reliableHiddenOffsets = j && 0 === e[0].offsetHeight, l.innerHTML = "", l.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;", b.boxSizing = 4 === l.offsetWidth, b.doesNotIncludeMarginInBodyOffset = 1 !== g.offsetTop, a.getComputedStyle && (b.pixelPosition = "1%" !== (a.getComputedStyle(l, null) || {})
                        .top, b.boxSizingReliable = "4px" === (a.getComputedStyle(l, null) || {
                            width: "4px"
                        })
                        .width, d = l.appendChild(W.createElement("div")), d.style.cssText = l.style.cssText = f, d.style.marginRight = d.style.width = "0", l.style.width = "1px", b.reliableMarginRight = !parseFloat((a.getComputedStyle(d, null) || {})
                            .marginRight)), typeof l.style.zoom !== V && (l.innerHTML = "", l.style.cssText = f + "width:1px;padding:1px;display:inline;zoom:1", b.inlineBlockNeedsLayout = 3 === l.offsetWidth, l.style.display = "block", l.innerHTML = "<div></div>", l.firstChild.style.width = "5px", b.shrinkWrapBlocks = 3 !== l.offsetWidth, b.inlineBlockNeedsLayout && (g.style.zoom = 1)), g.removeChild(c), c = l = e = d = null)
            }), c = f = g = h = d = e = null, b
    }();
    var ya = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/
        , za = /([A-Z])/g;
    ia.extend({
        cache: {}
        , expando: "jQuery" + (aa + Math.random())
            .replace(/\D/g, "")
        , noData: {
            embed: !0
            , object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
            , applet: !0
        }
        , hasData: function (a) {
            return a = a.nodeType ? ia.cache[a[ia.expando]] : a[ia.expando], !!a && !h(a)
        }
        , data: function (a, b, c) {
            return e(a, b, c)
        }
        , removeData: function (a, b) {
            return f(a, b)
        }
        , _data: function (a, b, c) {
            return e(a, b, c, !0)
        }
        , _removeData: function (a, b) {
            return f(a, b, !0)
        }
        , acceptData: function (a) {
            if (a.nodeType && 1 !== a.nodeType && 9 !== a.nodeType) return !1;
            var b = a.nodeName && ia.noData[a.nodeName.toLowerCase()];
            return !b || b !== !0 && a.getAttribute("classid") === b
        }
    }), ia.fn.extend({
        data: function (a, c) {
            var d, e, f = this[0]
                , h = 0
                , i = null;
            if (a === b) {
                if (this.length && (i = ia.data(f), 1 === f.nodeType && !ia._data(f, "parsedAttrs"))) {
                    for (d = f.attributes; h < d.length; h++) e = d[h].name, e.indexOf("data-") || (e = ia.camelCase(e.slice(5)), g(f, e, i[e]));
                    ia._data(f, "parsedAttrs", !0)
                }
                return i
            }
            return "object" == typeof a ? this.each(function () {
                ia.data(this, a)
            }) : ia.access(this, function (c) {
                return c === b ? f ? g(f, a, ia.data(f, a)) : null : void this.each(function () {
                    ia.data(this, a, c)
                })
            }, null, c, arguments.length > 1, null, !0)
        }
        , removeData: function (a) {
            return this.each(function () {
                ia.removeData(this, a)
            })
        }
    }), ia.extend({
        queue: function (a, b, c) {
            var d;
            return a ? (b = (b || "fx") + "queue", d = ia._data(a, b), c && (!d || ia.isArray(c) ? d = ia._data(a, b, ia.makeArray(c)) : d.push(c)), d || []) : void 0
        }
        , dequeue: function (a, b) {
            b = b || "fx";
            var c = ia.queue(a, b)
                , d = c.length
                , e = c.shift()
                , f = ia._queueHooks(a, b)
                , g = function () {
                    ia.dequeue(a, b)
                };
            "inprogress" === e && (e = c.shift(), d--), f.cur = e, e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
        }
        , _queueHooks: function (a, b) {
            var c = b + "queueHooks";
            return ia._data(a, c) || ia._data(a, c, {
                empty: ia.Callbacks("once memory")
                    .add(function () {
                        ia._removeData(a, b + "queue"), ia._removeData(a, c)
                    })
            })
        }
    }), ia.fn.extend({
        queue: function (a, c) {
            var d = 2;
            return "string" != typeof a && (c = a, a = "fx", d--), arguments.length < d ? ia.queue(this[0], a) : c === b ? this : this.each(function () {
                var b = ia.queue(this, a, c);
                ia._queueHooks(this, a), "fx" === a && "inprogress" !== b[0] && ia.dequeue(this, a)
            })
        }
        , dequeue: function (a) {
            return this.each(function () {
                ia.dequeue(this, a)
            })
        }
        , delay: function (a, b) {
            return a = ia.fx ? ia.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function (b, c) {
                var d = setTimeout(b, a);
                c.stop = function () {
                    clearTimeout(d)
                }
            })
        }
        , clearQueue: function (a) {
            return this.queue(a || "fx", [])
        }
        , promise: function (a, c) {
            var d, e = 1
                , f = ia.Deferred()
                , g = this
                , h = this.length
                , i = function () {
                    --e || f.resolveWith(g, [g])
                };
            for ("string" != typeof a && (c = a, a = b), a = a || "fx"; h--;) d = ia._data(g[h], a + "queueHooks"), d && d.empty && (e++, d.empty.add(i));
            return i(), f.promise(c)
        }
    });
    var Aa, Ba, Ca = /[\t\r\n]/g
        , Da = /\r/g
        , Ea = /^(?:input|select|textarea|button|object)$/i
        , Fa = /^(?:a|area)$/i
        , Ga = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i
        , Ha = /^(?:checked|selected)$/i
        , Ia = ia.support.getSetAttribute
        , Ja = ia.support.input;
    ia.fn.extend({
        attr: function (a, b) {
            return ia.access(this, ia.attr, a, b, arguments.length > 1)
        }
        , removeAttr: function (a) {
            return this.each(function () {
                ia.removeAttr(this, a)
            })
        }
        , prop: function (a, b) {
            return ia.access(this, ia.prop, a, b, arguments.length > 1)
        }
        , removeProp: function (a) {
            return a = ia.propFix[a] || a, this.each(function () {
                try {
                    this[a] = b, delete this[a]
                } catch (c) {}
            })
        }
        , addClass: function (a) {
            var b, c, d, e, f, g = 0
                , h = this.length
                , i = "string" == typeof a && a;
            if (ia.isFunction(a)) return this.each(function (b) {
                ia(this)
                    .addClass(a.call(this, b, this.className))
            });
            if (i)
                for (b = (a || "")
                    .match(ka) || []; h > g; g++)
                    if (c = this[g], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ")
                            .replace(Ca, " ") : " ")) {
                        for (f = 0; e = b[f++];) d.indexOf(" " + e + " ") < 0 && (d += e + " ");
                        c.className = ia.trim(d)
                    } return this
        }
        , removeClass: function (a) {
            var b, c, d, e, f, g = 0
                , h = this.length
                , i = 0 === arguments.length || "string" == typeof a && a;
            if (ia.isFunction(a)) return this.each(function (b) {
                ia(this)
                    .removeClass(a.call(this, b, this.className))
            });
            if (i)
                for (b = (a || "")
                    .match(ka) || []; h > g; g++)
                    if (c = this[g], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ")
                            .replace(Ca, " ") : "")) {
                        for (f = 0; e = b[f++];)
                            for (; d.indexOf(" " + e + " ") >= 0;) d = d.replace(" " + e + " ", " ");
                        c.className = a ? ia.trim(d) : ""
                    } return this
        }
        , toggleClass: function (a, b) {
            var c = typeof a
                , d = "boolean" == typeof b;
            return ia.isFunction(a) ? this.each(function (c) {
                ia(this)
                    .toggleClass(a.call(this, c, this.className, b), b)
            }) : this.each(function () {
                if ("string" === c)
                    for (var e, f = 0, g = ia(this), h = b, i = a.match(ka) || []; e = i[f++];) h = d ? h : !g.hasClass(e), g[h ? "addClass" : "removeClass"](e);
                else c !== V && "boolean" !== c || (this.className && ia._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : ia._data(this, "__className__") || "")
            })
        }
        , hasClass: function (a) {
            for (var b = " " + a + " ", c = 0, d = this.length; d > c; c++)
                if (1 === this[c].nodeType && (" " + this[c].className + " ")
                    .replace(Ca, " ")
                    .indexOf(b) >= 0) return !0;
            return !1
        }
        , val: function (a) {
            var c, d, e, f = this[0]; {
                if (arguments.length) return e = ia.isFunction(a), this.each(function (c) {
                    var f, g = ia(this);
                    1 === this.nodeType && (f = e ? a.call(this, c, g.val()) : a, null == f ? f = "" : "number" == typeof f ? f += "" : ia.isArray(f) && (f = ia.map(f, function (a) {
                        return null == a ? "" : a + ""
                    })), d = ia.valHooks[this.type] || ia.valHooks[this.nodeName.toLowerCase()], d && "set" in d && d.set(this, f, "value") !== b || (this.value = f))
                });
                if (f) return d = ia.valHooks[f.type] || ia.valHooks[f.nodeName.toLowerCase()], d && "get" in d && (c = d.get(f, "value")) !== b ? c : (c = f.value, "string" == typeof c ? c.replace(Da, "") : null == c ? "" : c)
            }
        }
    }), ia.extend({
        valHooks: {
            option: {
                get: function (a) {
                    var b = a.attributes.value;
                    return !b || b.specified ? a.value : a.text
                }
            }
            , select: {
                get: function (a) {
                    for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++)
                        if (c = d[i], (c.selected || i === e) && (ia.support.optDisabled ? !c.disabled : null === c.getAttribute("disabled")) && (!c.parentNode.disabled || !ia.nodeName(c.parentNode, "optgroup"))) {
                            if (b = ia(c)
                                .val(), f) return b;
                            g.push(b)
                        } return g
                }
                , set: function (a, b) {
                    var c = ia.makeArray(b);
                    return ia(a)
                        .find("option")
                        .each(function () {
                            this.selected = ia.inArray(ia(this)
                                .val(), c) >= 0
                        }), c.length || (a.selectedIndex = -1), c
                }
            }
        }
        , attr: function (a, c, d) {
            var e, f, g, h = a.nodeType;
            if (a && 3 !== h && 8 !== h && 2 !== h) return typeof a.getAttribute === V ? ia.prop(a, c, d) : (f = 1 !== h || !ia.isXMLDoc(a), f && (c = c.toLowerCase(), e = ia.attrHooks[c] || (Ga.test(c) ? Ba : Aa)), d === b ? e && f && "get" in e && null !== (g = e.get(a, c)) ? g : (typeof a.getAttribute !== V && (g = a.getAttribute(c)), null == g ? b : g) : null !== d ? e && f && "set" in e && (g = e.set(a, d, c)) !== b ? g : (a.setAttribute(c, d + ""), d) : void ia.removeAttr(a, c))
        }
        , removeAttr: function (a, b) {
            var c, d, e = 0
                , f = b && b.match(ka);
            if (f && 1 === a.nodeType)
                for (; c = f[e++];) d = ia.propFix[c] || c, Ga.test(c) ? !Ia && Ha.test(c) ? a[ia.camelCase("default-" + c)] = a[d] = !1 : a[d] = !1 : ia.attr(a, c, ""), a.removeAttribute(Ia ? c : d)
        }
        , attrHooks: {
            type: {
                set: function (a, b) {
                    if (!ia.support.radioValue && "radio" === b && ia.nodeName(a, "input")) {
                        var c = a.value;
                        return a.setAttribute("type", b), c && (a.value = c), b
                    }
                }
            }
        }
        , propFix: {
            tabindex: "tabIndex"
            , readonly: "readOnly"
            , "for": "htmlFor"
            , "class": "className"
            , maxlength: "maxLength"
            , cellspacing: "cellSpacing"
            , cellpadding: "cellPadding"
            , rowspan: "rowSpan"
            , colspan: "colSpan"
            , usemap: "useMap"
            , frameborder: "frameBorder"
            , contenteditable: "contentEditable"
        }
        , prop: function (a, c, d) {
            var e, f, g, h = a.nodeType;
            if (a && 3 !== h && 8 !== h && 2 !== h) return g = 1 !== h || !ia.isXMLDoc(a), g && (c = ia.propFix[c] || c, f = ia.propHooks[c]), d !== b ? f && "set" in f && (e = f.set(a, d, c)) !== b ? e : a[c] = d : f && "get" in f && null !== (e = f.get(a, c)) ? e : a[c]
        }
        , propHooks: {
            tabIndex: {
                get: function (a) {
                    var c = a.getAttributeNode("tabindex");
                    return c && c.specified ? parseInt(c.value, 10) : Ea.test(a.nodeName) || Fa.test(a.nodeName) && a.href ? 0 : b
                }
            }
        }
    }), Ba = {
        get: function (a, c) {
            var d = ia.prop(a, c)
                , e = "boolean" == typeof d && a.getAttribute(c)
                , f = "boolean" == typeof d ? Ja && Ia ? null != e : Ha.test(c) ? a[ia.camelCase("default-" + c)] : !!e : a.getAttributeNode(c);
            return f && f.value !== !1 ? c.toLowerCase() : b
        }
        , set: function (a, b, c) {
            return b === !1 ? ia.removeAttr(a, c) : Ja && Ia || !Ha.test(c) ? a.setAttribute(!Ia && ia.propFix[c] || c, c) : a[ia.camelCase("default-" + c)] = a[c] = !0, c
        }
    }, Ja && Ia || (ia.attrHooks.value = {
        get: function (a, c) {
            var d = a.getAttributeNode(c);
            return ia.nodeName(a, "input") ? a.defaultValue : d && d.specified ? d.value : b
        }
        , set: function (a, b, c) {
            return ia.nodeName(a, "input") ? void(a.defaultValue = b) : Aa && Aa.set(a, b, c)
        }
    }), Ia || (Aa = ia.valHooks.button = {
        get: function (a, c) {
            var d = a.getAttributeNode(c);
            return d && ("id" === c || "name" === c || "coords" === c ? "" !== d.value : d.specified) ? d.value : b
        }
        , set: function (a, c, d) {
            var e = a.getAttributeNode(d);
            return e || a.setAttributeNode(e = a.ownerDocument.createAttribute(d)), e.value = c += "", "value" === d || c === a.getAttribute(d) ? c : b
        }
    }, ia.attrHooks.contenteditable = {
        get: Aa.get
        , set: function (a, b, c) {
            Aa.set(a, "" === b ? !1 : b, c)
        }
    }, ia.each(["width", "height"], function (a, b) {
        ia.attrHooks[b] = ia.extend(ia.attrHooks[b], {
            set: function (a, c) {
                return "" === c ? (a.setAttribute(b, "auto"), c) : void 0
            }
        })
    })), ia.support.hrefNormalized || (ia.each(["href", "src", "width", "height"], function (a, c) {
        ia.attrHooks[c] = ia.extend(ia.attrHooks[c], {
            get: function (a) {
                var d = a.getAttribute(c, 2);
                return null == d ? b : d
            }
        })
    }), ia.each(["href", "src"], function (a, b) {
        ia.propHooks[b] = {
            get: function (a) {
                return a.getAttribute(b, 4)
            }
        }
    })), ia.support.style || (ia.attrHooks.style = {
        get: function (a) {
            return a.style.cssText || b
        }
        , set: function (a, b) {
            return a.style.cssText = b + ""
        }
    }), ia.support.optSelected || (ia.propHooks.selected = ia.extend(ia.propHooks.selected, {
        get: function (a) {
            var b = a.parentNode;
            return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
        }
    })), ia.support.enctype || (ia.propFix.enctype = "encoding"), ia.support.checkOn || ia.each(["radio", "checkbox"], function () {
        ia.valHooks[this] = {
            get: function (a) {
                return null === a.getAttribute("value") ? "on" : a.value
            }
        }
    }), ia.each(["radio", "checkbox"], function () {
        ia.valHooks[this] = ia.extend(ia.valHooks[this], {
            set: function (a, b) {
                return ia.isArray(b) ? a.checked = ia.inArray(ia(a)
                    .val(), b) >= 0 : void 0
            }
        })
    });
    var Ka = /^(?:input|select|textarea)$/i
        , La = /^key/
        , Ma = /^(?:mouse|contextmenu)|click/
        , Na = /^(?:focusinfocus|focusoutblur)$/
        , Oa = /^([^.]*)(?:\.(.+)|)$/;
    ia.event = {
            global: {}
            , add: function (a, c, d, e, f) {
                var g, h, i, j, k, l, m, n, o, p, q, r = ia._data(a);
                if (r) {
                    for (d.handler && (j = d, d = j.handler, f = j.selector), d.guid || (d.guid = ia.guid++), (h = r.events) || (h = r.events = {}), (l = r.handle) || (l = r.handle = function (a) {
                            return typeof ia === V || a && ia.event.triggered === a.type ? b : ia.event.dispatch.apply(l.elem, arguments)
                        }, l.elem = a), c = (c || "")
                        .match(ka) || [""], i = c.length; i--;) g = Oa.exec(c[i]) || [], o = q = g[1], p = (g[2] || "")
                        .split(".")
                        .sort(), k = ia.event.special[o] || {}, o = (f ? k.delegateType : k.bindType) || o, k = ia.event.special[o] || {}, m = ia.extend({
                            type: o
                            , origType: q
                            , data: e
                            , handler: d
                            , guid: d.guid
                            , selector: f
                            , needsContext: f && ia.expr.match.needsContext.test(f)
                            , namespace: p.join(".")
                        }, j), (n = h[o]) || (n = h[o] = [], n.delegateCount = 0, k.setup && k.setup.call(a, e, p, l) !== !1 || (a.addEventListener ? a.addEventListener(o, l, !1) : a.attachEvent && a.attachEvent("on" + o, l))), k.add && (k.add.call(a, m), m.handler.guid || (m.handler.guid = d.guid)), f ? n.splice(n.delegateCount++, 0, m) : n.push(m), ia.event.global[o] = !0;
                    a = null
                }
            }
            , remove: function (a, b, c, d, e) {
                var f, g, h, i, j, k, l, m, n, o, p, q = ia.hasData(a) && ia._data(a);
                if (q && (k = q.events)) {
                    for (b = (b || "")
                        .match(ka) || [""], j = b.length; j--;)
                        if (h = Oa.exec(b[j]) || [], n = p = h[1], o = (h[2] || "")
                            .split(".")
                            .sort(), n) {
                            for (l = ia.event.special[n] || {}, n = (d ? l.delegateType : l.bindType) || n, m = k[n] || [], h = h[2] && new RegExp("(^|\\.)" + o.join("\\.(?:.*\\.|)") + "(\\.|$)"), i = f = m.length; f--;) g = m[f], !e && p !== g.origType || c && c.guid !== g.guid || h && !h.test(g.namespace) || d && d !== g.selector && ("**" !== d || !g.selector) || (m.splice(f, 1), g.selector && m.delegateCount--, l.remove && l.remove.call(a, g));
                            i && !m.length && (l.teardown && l.teardown.call(a, o, q.handle) !== !1 || ia.removeEvent(a, n, q.handle), delete k[n])
                        } else
                            for (n in k) ia.event.remove(a, n + b[j], c, d, !0);
                    ia.isEmptyObject(k) && (delete q.handle, ia._removeData(a, "events"))
                }
            }
            , trigger: function (c, d, e, f) {
                var g, h, i, j, k, l, m, n = [e || W]
                    , o = ga.call(c, "type") ? c.type : c
                    , p = ga.call(c, "namespace") ? c.namespace.split(".") : [];
                if (i = l = e = e || W, 3 !== e.nodeType && 8 !== e.nodeType && !Na.test(o + ia.event.triggered) && (o.indexOf(".") >= 0 && (p = o.split("."), o = p.shift(), p.sort()), h = o.indexOf(":") < 0 && "on" + o, c = c[ia.expando] ? c : new ia.Event(o, "object" == typeof c && c), c.isTrigger = !0, c.namespace = p.join("."), c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, c.result = b, c.target || (c.target = e), d = null == d ? [c] : ia.makeArray(d, [c]), k = ia.event.special[o] || {}, f || !k.trigger || k.trigger.apply(e, d) !== !1)) {
                    if (!f && !k.noBubble && !ia.isWindow(e)) {
                        for (j = k.delegateType || o, Na.test(j + o) || (i = i.parentNode); i; i = i.parentNode) n.push(i), l = i;
                        l === (e.ownerDocument || W) && n.push(l.defaultView || l.parentWindow || a)
                    }
                    for (m = 0;
                        (i = n[m++]) && !c.isPropagationStopped();) c.type = m > 1 ? j : k.bindType || o, g = (ia._data(i, "events") || {})[c.type] && ia._data(i, "handle"), g && g.apply(i, d), g = h && i[h], g && ia.acceptData(i) && g.apply && g.apply(i, d) === !1 && c.preventDefault();
                    if (c.type = o, !f && !c.isDefaultPrevented() && (!k._default || k._default.apply(e.ownerDocument, d) === !1) && ("click" !== o || !ia.nodeName(e, "a")) && ia.acceptData(e) && h && e[o] && !ia.isWindow(e)) {
                        l = e[h], l && (e[h] = null), ia.event.triggered = o;
                        try {
                            e[o]()
                        } catch (q) {}
                        ia.event.triggered = b, l && (e[h] = l)
                    }
                    return c.result
                }
            }
            , dispatch: function (a) {
                a = ia.event.fix(a);
                var c, d, e, f, g, h = []
                    , i = da.call(arguments)
                    , j = (ia._data(this, "events") || {})[a.type] || []
                    , k = ia.event.special[a.type] || {};
                if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) {
                    for (h = ia.event.handlers.call(this, a, j), c = 0;
                        (f = h[c++]) && !a.isPropagationStopped();)
                        for (a.currentTarget = f.elem, g = 0;
                            (e = f.handlers[g++]) && !a.isImmediatePropagationStopped();) a.namespace_re && !a.namespace_re.test(e.namespace) || (a.handleObj = e, a.data = e.data, d = ((ia.event.special[e.origType] || {})
                                .handle || e.handler)
                            .apply(f.elem, i), d !== b && (a.result = d) === !1 && (a.preventDefault(), a.stopPropagation()));
                    return k.postDispatch && k.postDispatch.call(this, a), a.result
                }
            }
            , handlers: function (a, c) {
                var d, e, f, g, h = []
                    , i = c.delegateCount
                    , j = a.target;
                if (i && j.nodeType && (!a.button || "click" !== a.type))
                    for (; j != this; j = j.parentNode || this)
                        if (1 === j.nodeType && (j.disabled !== !0 || "click" !== a.type)) {
                            for (f = [], g = 0; i > g; g++) e = c[g], d = e.selector + " ", f[d] === b && (f[d] = e.needsContext ? ia(d, this)
                                .index(j) >= 0 : ia.find(d, this, null, [j])
                                .length), f[d] && f.push(e);
                            f.length && h.push({
                                elem: j
                                , handlers: f
                            })
                        } return i < c.length && h.push({
                    elem: this
                    , handlers: c.slice(i)
                }), h
            }
            , fix: function (a) {
                if (a[ia.expando]) return a;
                var b, c, d, e = a.type
                    , f = a
                    , g = this.fixHooks[e];
                for (g || (this.fixHooks[e] = g = Ma.test(e) ? this.mouseHooks : La.test(e) ? this.keyHooks : {}), d = g.props ? this.props.concat(g.props) : this.props, a = new ia.Event(f), b = d.length; b--;) c = d[b], a[c] = f[c];
                return a.target || (a.target = f.srcElement || W), 3 === a.target.nodeType && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, g.filter ? g.filter(a, f) : a
            }
            , props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" ")
            , fixHooks: {}
            , keyHooks: {
                props: "char charCode key keyCode".split(" ")
                , filter: function (a, b) {
                    return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a
                }
            }
            , mouseHooks: {
                props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" ")
                , filter: function (a, c) {
                    var d, e, f, g = c.button
                        , h = c.fromElement;
                    return null == a.pageX && null != c.clientX && (e = a.target.ownerDocument || W, f = e.documentElement, d = e.body, a.pageX = c.clientX + (f && f.scrollLeft || d && d.scrollLeft || 0) - (f && f.clientLeft || d && d.clientLeft || 0), a.pageY = c.clientY + (f && f.scrollTop || d && d.scrollTop || 0) - (f && f.clientTop || d && d.clientTop || 0)), !a.relatedTarget && h && (a.relatedTarget = h === a.target ? c.toElement : h), a.which || g === b || (a.which = 1 & g ? 1 : 2 & g ? 3 : 4 & g ? 2 : 0), a
                }
            }
            , special: {
                load: {
                    noBubble: !0
                }
                , click: {
                    trigger: function () {
                        return ia.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
                    }
                }
                , focus: {
                    trigger: function () {
                        if (this !== W.activeElement && this.focus) try {
                            return this.focus(), !1
                        } catch (a) {}
                    }
                    , delegateType: "focusin"
                }
                , blur: {
                    trigger: function () {
                        return this === W.activeElement && this.blur ? (this.blur(), !1) : void 0
                    }
                    , delegateType: "focusout"
                }
                , beforeunload: {
                    postDispatch: function (a) {
                        a.result !== b && (a.originalEvent.returnValue = a.result)
                    }
                }
            }
            , simulate: function (a, b, c, d) {
                var e = ia.extend(new ia.Event, c, {
                    type: a
                    , isSimulated: !0
                    , originalEvent: {}
                });
                d ? ia.event.trigger(e, null, b) : ia.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
            }
        }, ia.removeEvent = W.removeEventListener ? function (a, b, c) {
            a.removeEventListener && a.removeEventListener(b, c, !1)
        } : function (a, b, c) {
            var d = "on" + b;
            a.detachEvent && (typeof a[d] === V && (a[d] = null), a.detachEvent(d, c))
        }, ia.Event = function (a, b) {
            return this instanceof ia.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? i : j) : this.type = a, b && ia.extend(this, b), this.timeStamp = a && a.timeStamp || ia.now(), void(this[ia.expando] = !0)) : new ia.Event(a, b)
        }, ia.Event.prototype = {
            isDefaultPrevented: j
            , isPropagationStopped: j
            , isImmediatePropagationStopped: j
            , preventDefault: function () {
                var a = this.originalEvent;
                this.isDefaultPrevented = i, a && (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
            }
            , stopPropagation: function () {
                var a = this.originalEvent;
                this.isPropagationStopped = i, a && (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
            }
            , stopImmediatePropagation: function () {
                this.isImmediatePropagationStopped = i, this.stopPropagation()
            }
        }, ia.each({
            mouseenter: "mouseover"
            , mouseleave: "mouseout"
        }, function (a, b) {
            ia.event.special[a] = {
                delegateType: b
                , bindType: b
                , handle: function (a) {
                    var c, d = this
                        , e = a.relatedTarget
                        , f = a.handleObj;
                    return e && (e === d || ia.contains(d, e)) || (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c
                }
            }
        }), ia.support.submitBubbles || (ia.event.special.submit = {
            setup: function () {
                return ia.nodeName(this, "form") ? !1 : void ia.event.add(this, "click._submit keypress._submit", function (a) {
                    var c = a.target
                        , d = ia.nodeName(c, "input") || ia.nodeName(c, "button") ? c.form : b;
                    d && !ia._data(d, "submitBubbles") && (ia.event.add(d, "submit._submit", function (a) {
                        a._submit_bubble = !0
                    }), ia._data(d, "submitBubbles", !0))
                })
            }
            , postDispatch: function (a) {
                a._submit_bubble && (delete a._submit_bubble, this.parentNode && !a.isTrigger && ia.event.simulate("submit", this.parentNode, a, !0))
            }
            , teardown: function () {
                return ia.nodeName(this, "form") ? !1 : void ia.event.remove(this, "._submit")
            }
        }), ia.support.changeBubbles || (ia.event.special.change = {
            setup: function () {
                return Ka.test(this.nodeName) ? ("checkbox" !== this.type && "radio" !== this.type || (ia.event.add(this, "propertychange._change", function (a) {
                    "checked" === a.originalEvent.propertyName && (this._just_changed = !0)
                }), ia.event.add(this, "click._change", function (a) {
                    this._just_changed && !a.isTrigger && (this._just_changed = !1), ia.event.simulate("change", this, a, !0)
                })), !1) : void ia.event.add(this, "beforeactivate._change", function (a) {
                    var b = a.target;
                    Ka.test(b.nodeName) && !ia._data(b, "changeBubbles") && (ia.event.add(b, "change._change", function (a) {
                        !this.parentNode || a.isSimulated || a.isTrigger || ia.event.simulate("change", this.parentNode, a, !0)
                    }), ia._data(b, "changeBubbles", !0))
                })
            }
            , handle: function (a) {
                var b = a.target;
                return this !== b || a.isSimulated || a.isTrigger || "radio" !== b.type && "checkbox" !== b.type ? a.handleObj.handler.apply(this, arguments) : void 0
            }
            , teardown: function () {
                return ia.event.remove(this, "._change"), !Ka.test(this.nodeName)
            }
        }), ia.support.focusinBubbles || ia.each({
            focus: "focusin"
            , blur: "focusout"
        }, function (a, b) {
            var c = 0
                , d = function (a) {
                    ia.event.simulate(b, a.target, ia.event.fix(a), !0)
                };
            ia.event.special[b] = {
                setup: function () {
                    0 === c++ && W.addEventListener(a, d, !0)
                }
                , teardown: function () {
                    0 === --c && W.removeEventListener(a, d, !0)
                }
            }
        }), ia.fn.extend({
            on: function (a, c, d, e, f) {
                var g, h;
                if ("object" == typeof a) {
                    "string" != typeof c && (d = d || c, c = b);
                    for (g in a) this.on(g, c, d, a[g], f);
                    return this
                }
                if (null == d && null == e ? (e = c, d = c = b) : null == e && ("string" == typeof c ? (e = d, d = b) : (e = d, d = c, c = b)), e === !1) e = j;
                else if (!e) return this;
                return 1 === f && (h = e, e = function (a) {
                    return ia()
                        .off(a), h.apply(this, arguments)
                }, e.guid = h.guid || (h.guid = ia.guid++)), this.each(function () {
                    ia.event.add(this, a, e, d, c)
                })
            }
            , one: function (a, b, c, d) {
                return this.on(a, b, c, d, 1)
            }
            , off: function (a, c, d) {
                var e, f;
                if (a && a.preventDefault && a.handleObj) return e = a.handleObj, ia(a.delegateTarget)
                    .off(e.namespace ? e.origType + "." + e.namespace : e.origType, e.selector, e.handler), this;
                if ("object" == typeof a) {
                    for (f in a) this.off(f, c, a[f]);
                    return this
                }
                return c !== !1 && "function" != typeof c || (d = c, c = b), d === !1 && (d = j), this.each(function () {
                    ia.event.remove(this, a, d, c)
                })
            }
            , bind: function (a, b, c) {
                return this.on(a, null, b, c)
            }
            , unbind: function (a, b) {
                return this.off(a, null, b)
            }
            , delegate: function (a, b, c, d) {
                return this.on(b, a, c, d)
            }
            , undelegate: function (a, b, c) {
                return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c)
            }
            , trigger: function (a, b) {
                return this.each(function () {
                    ia.event.trigger(a, b, this)
                })
            }
            , triggerHandler: function (a, b) {
                var c = this[0];
                return c ? ia.event.trigger(a, b, c, !0) : void 0
            }
        })
        , function (a, b) {
            function c(a) {
                return oa.test(a + "")
            }

            function d() {
                var a, b = [];
                return a = function (c, d) {
                    return b.push(c += " ") > y.cacheLength && delete a[b.shift()], a[c] = d
                }
            }

            function e(a) {
                return a[N] = !0, a
            }

            function f(a) {
                var b = F.createElement("div");
                try {
                    return a(b)
                } catch (c) {
                    return !1
                } finally {
                    b = null
                }
            }

            function g(a, b, c, d) {
                var e, f, g, h, i, j, k, n, o, p;
                if ((b ? b.ownerDocument || b : O) !== F && E(b), b = b || F, c = c || [], !a || "string" != typeof a) return c;
                if (1 !== (h = b.nodeType) && 9 !== h) return [];
                if (!H && !d) {
                    if (e = pa.exec(a))
                        if (g = e[1]) {
                            if (9 === h) {
                                if (f = b.getElementById(g), !f || !f.parentNode) return c;
                                if (f.id === g) return c.push(f), c
                            } else if (b.ownerDocument && (f = b.ownerDocument.getElementById(g)) && L(b, f) && f.id === g) return c.push(f), c
                        } else {
                            if (e[2]) return Z.apply(c, $.call(b.getElementsByTagName(a), 0)), c;
                            if ((g = e[3]) && P.getByClassName && b.getElementsByClassName) return Z.apply(c, $.call(b.getElementsByClassName(g), 0)), c
                        } if (P.qsa && !I.test(a)) {
                        if (k = !0, n = N, o = b, p = 9 === h && a, 1 === h && "object" !== b.nodeName.toLowerCase()) {
                            for (j = l(a), (k = b.getAttribute("id")) ? n = k.replace(sa, "\\$&") : b.setAttribute("id", n), n = "[id='" + n + "'] ", i = j.length; i--;) j[i] = n + m(j[i]);
                            o = na.test(a) && b.parentNode || b, p = j.join(",")
                        }
                        if (p) try {
                            return Z.apply(c, $.call(o.querySelectorAll(p), 0)), c
                        } catch (q) {} finally {
                            k || b.removeAttribute("id")
                        }
                    }
                }
                return u(a.replace(ga, "$1"), b, c, d)
            }

            function h(a, b) {
                var c = b && a
                    , d = c && (~b.sourceIndex || W) - (~a.sourceIndex || W);
                if (d) return d;
                if (c)
                    for (; c = c.nextSibling;)
                        if (c === b) return -1;
                return a ? 1 : -1
            }

            function i(a) {
                return function (b) {
                    var c = b.nodeName.toLowerCase();
                    return "input" === c && b.type === a
                }
            }

            function j(a) {
                return function (b) {
                    var c = b.nodeName.toLowerCase();
                    return ("input" === c || "button" === c) && b.type === a
                }
            }

            function k(a) {
                return e(function (b) {
                    return b = +b, e(function (c, d) {
                        for (var e, f = a([], c.length, b), g = f.length; g--;) c[e = f[g]] && (c[e] = !(d[e] = c[e]))
                    })
                })
            }

            function l(a, b) {
                var c, d, e, f, h, i, j, k = T[a + " "];
                if (k) return b ? 0 : k.slice(0);
                for (h = a, i = [], j = y.preFilter; h;) {
                    c && !(d = ha.exec(h)) || (d && (h = h.slice(d[0].length) || h), i.push(e = [])), c = !1, (d = ja.exec(h)) && (c = d.shift(), e.push({
                        value: c
                        , type: d[0].replace(ga, " ")
                    }), h = h.slice(c.length));
                    for (f in y.filter) !(d = ma[f].exec(h)) || j[f] && !(d = j[f](d)) || (c = d.shift(), e.push({
                        value: c
                        , type: f
                        , matches: d
                    }), h = h.slice(c.length));
                    if (!c) break
                }
                return b ? h.length : h ? g.error(a) : T(a, i)
                    .slice(0)
            }

            function m(a) {
                for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value;
                return d
            }

            function n(a, b, c) {
                var d = b.dir
                    , e = c && "parentNode" === d
                    , f = R++;
                return b.first ? function (b, c, f) {
                    for (; b = b[d];)
                        if (1 === b.nodeType || e) return a(b, c, f)
                } : function (b, c, g) {
                    var h, i, j, k = Q + " " + f;
                    if (g) {
                        for (; b = b[d];)
                            if ((1 === b.nodeType || e) && a(b, c, g)) return !0
                    } else
                        for (; b = b[d];)
                            if (1 === b.nodeType || e)
                                if (j = b[N] || (b[N] = {}), (i = j[d]) && i[0] === k) {
                                    if ((h = i[1]) === !0 || h === x) return h === !0
                                } else if (i = j[d] = [k], i[1] = a(b, c, g) || x, i[1] === !0) return !0
                }
            }

            function o(a) {
                return a.length > 1 ? function (b, c, d) {
                    for (var e = a.length; e--;)
                        if (!a[e](b, c, d)) return !1;
                    return !0
                } : a[0]
            }

            function p(a, b, c, d, e) {
                for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++)(f = a[h]) && (c && !c(f, d, e) || (g.push(f), j && b.push(h)));
                return g
            }

            function q(a, b, c, d, f, g) {
                return d && !d[N] && (d = q(d)), f && !f[N] && (f = q(f, g)), e(function (e, g, h, i) {
                    var j, k, l, m = []
                        , n = []
                        , o = g.length
                        , q = e || t(b || "*", h.nodeType ? [h] : h, [])
                        , r = !a || !e && b ? q : p(q, m, a, h, i)
                        , s = c ? f || (e ? a : o || d) ? [] : g : r;
                    if (c && c(r, s, h, i), d)
                        for (j = p(s, n), d(j, [], h, i), k = j.length; k--;)(l = j[k]) && (s[n[k]] = !(r[n[k]] = l));
                    if (e) {
                        if (f || a) {
                            if (f) {
                                for (j = [], k = s.length; k--;)(l = s[k]) && j.push(r[k] = l);
                                f(null, s = [], j, i)
                            }
                            for (k = s.length; k--;)(l = s[k]) && (j = f ? _.call(e, l) : m[k]) > -1 && (e[j] = !(g[j] = l))
                        }
                    } else s = p(s === g ? s.splice(o, s.length) : s), f ? f(null, g, s, i) : Z.apply(g, s)
                })
            }

            function r(a) {
                for (var b, c, d, e = a.length, f = y.relative[a[0].type], g = f || y.relative[" "], h = f ? 1 : 0, i = n(function (a) {
                        return a === b
                    }, g, !0), j = n(function (a) {
                        return _.call(b, a) > -1
                    }, g, !0), k = [function (a, c, d) {
                        return !f && (d || c !== D) || ((b = c)
                            .nodeType ? i(a, c, d) : j(a, c, d))
                    }]; e > h; h++)
                    if (c = y.relative[a[h].type]) k = [n(o(k), c)];
                    else {
                        if (c = y.filter[a[h].type].apply(null, a[h].matches), c[N]) {
                            for (d = ++h; e > d && !y.relative[a[d].type]; d++);
                            return q(h > 1 && o(k), h > 1 && m(a.slice(0, h - 1))
                                .replace(ga, "$1"), c, d > h && r(a.slice(h, d)), e > d && r(a = a.slice(d)), e > d && m(a))
                        }
                        k.push(c)
                    } return o(k)
            }

            function s(a, b) {
                var c = 0
                    , d = b.length > 0
                    , f = a.length > 0
                    , h = function (e, h, i, j, k) {
                        var l, m, n, o = []
                            , q = 0
                            , r = "0"
                            , s = e && []
                            , t = null != k
                            , u = D
                            , v = e || f && y.find.TAG("*", k && h.parentNode || h)
                            , w = Q += null == u ? 1 : Math.random() || .1;
                        for (t && (D = h !== F && h, x = c); null != (l = v[r]); r++) {
                            if (f && l) {
                                for (m = 0; n = a[m++];)
                                    if (n(l, h, i)) {
                                        j.push(l);
                                        break
                                    } t && (Q = w, x = ++c)
                            }
                            d && ((l = !n && l) && q--, e && s.push(l))
                        }
                        if (q += r, d && r !== q) {
                            for (m = 0; n = b[m++];) n(s, o, h, i);
                            if (e) {
                                if (q > 0)
                                    for (; r--;) s[r] || o[r] || (o[r] = Y.call(j));
                                o = p(o)
                            }
                            Z.apply(j, o), t && !e && o.length > 0 && q + b.length > 1 && g.uniqueSort(j)
                        }
                        return t && (Q = w, D = u), s
                    };
                return d ? e(h) : h
            }

            function t(a, b, c) {
                for (var d = 0, e = b.length; e > d; d++) g(a, b[d], c);
                return c
            }

            function u(a, b, c, d) {
                var e, f, g, h, i, j = l(a);
                if (!d && 1 === j.length) {
                    if (f = j[0] = j[0].slice(0), f.length > 2 && "ID" === (g = f[0])
                        .type && 9 === b.nodeType && !H && y.relative[f[1].type]) {
                        if (b = y.find.ID(g.matches[0].replace(ua, va), b)[0], !b) return c;
                        a = a.slice(f.shift()
                            .value.length)
                    }
                    for (e = ma.needsContext.test(a) ? 0 : f.length; e-- && (g = f[e], !y.relative[h = g.type]);)
                        if ((i = y.find[h]) && (d = i(g.matches[0].replace(ua, va), na.test(f[0].type) && b.parentNode || b))) {
                            if (f.splice(e, 1), a = d.length && m(f), !a) return Z.apply(c, $.call(d, 0)), c;
                            break
                        }
                }
                return B(a, j)(d, b, H, c, na.test(a)), c
            }

            function v() {}
            var w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N = "sizzle" + -new Date
                , O = a.document
                , P = {}
                , Q = 0
                , R = 0
                , S = d()
                , T = d()
                , U = d()
                , V = typeof b
                , W = 1 << 31
                , X = []
                , Y = X.pop
                , Z = X.push
                , $ = X.slice
                , _ = X.indexOf || function (a) {
                    for (var b = 0, c = this.length; c > b; b++)
                        if (this[b] === a) return b;
                    return -1
                }
                , aa = "[\\x20\\t\\r\\n\\f]"
                , ba = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+"
                , ca = ba.replace("w", "w#")
                , da = "([*^$|!~]?=)"
                , ea = "\\[" + aa + "*(" + ba + ")" + aa + "*(?:" + da + aa + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + ca + ")|)|)" + aa + "*\\]"
                , fa = ":(" + ba + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ea.replace(3, 8) + ")*)|.*)\\)|)"
                , ga = new RegExp("^" + aa + "+|((?:^|[^\\\\])(?:\\\\.)*)" + aa + "+$", "g")
                , ha = new RegExp("^" + aa + "*," + aa + "*")
                , ja = new RegExp("^" + aa + "*([\\x20\\t\\r\\n\\f>+~])" + aa + "*")
                , ka = new RegExp(fa)
                , la = new RegExp("^" + ca + "$")
                , ma = {
                    ID: new RegExp("^#(" + ba + ")")
                    , CLASS: new RegExp("^\\.(" + ba + ")")
                    , NAME: new RegExp("^\\[name=['\"]?(" + ba + ")['\"]?\\]")
                    , TAG: new RegExp("^(" + ba.replace("w", "w*") + ")")
                    , ATTR: new RegExp("^" + ea)
                    , PSEUDO: new RegExp("^" + fa)
                    , CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + aa + "*(even|odd|(([+-]|)(\\d*)n|)" + aa + "*(?:([+-]|)" + aa + "*(\\d+)|))" + aa + "*\\)|)", "i")
                    , needsContext: new RegExp("^" + aa + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + aa + "*((?:-\\d)?\\d*)" + aa + "*\\)|)(?=[^-]|$)", "i")
                }
                , na = /[\x20\t\r\n\f]*[+~]/
                , oa = /^[^{]+\{\s*\[native code/
                , pa = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/
                , qa = /^(?:input|select|textarea|button)$/i
                , ra = /^h\d$/i
                , sa = /'|\\/g
                , ta = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g
                , ua = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g
                , va = function (a, b) {
                    var c = "0x" + b - 65536;
                    return c !== c ? b : 0 > c ? String.fromCharCode(c + 65536) : String.fromCharCode(c >> 10 | 55296, 1023 & c | 56320)
                };
            try {
                $.call(O.documentElement.childNodes, 0)[0].nodeType
            } catch (wa) {
                $ = function (a) {
                    for (var b, c = []; b = this[a++];) c.push(b);
                    return c
                }
            }
            A = g.isXML = function (a) {
                var b = a && (a.ownerDocument || a)
                    .documentElement;
                return b ? "HTML" !== b.nodeName : !1
            }, E = g.setDocument = function (a) {
                var d = a ? a.ownerDocument || a : O;
                return d !== F && 9 === d.nodeType && d.documentElement ? (F = d, G = d.documentElement, H = A(d), P.tagNameNoComments = f(function (a) {
                    return a.appendChild(d.createComment("")), !a.getElementsByTagName("*")
                        .length
                }), P.attributes = f(function (a) {
                    a.innerHTML = "<select></select>";
                    var b = typeof a.lastChild.getAttribute("multiple");
                    return "boolean" !== b && "string" !== b
                }), P.getByClassName = f(function (a) {
                    return a.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>", a.getElementsByClassName && a.getElementsByClassName("e")
                        .length ? (a.lastChild.className = "e", 2 === a.getElementsByClassName("e")
                            .length) : !1
                }), P.getByName = f(function (a) {
                    a.id = N + 0, a.innerHTML = "<a name='" + N + "'></a><div name='" + N + "'></div>", G.insertBefore(a, G.firstChild);
                    var b = d.getElementsByName && d.getElementsByName(N)
                        .length === 2 + d.getElementsByName(N + 0)
                        .length;
                    return P.getIdNotName = !d.getElementById(N), G.removeChild(a), b
                }), y.attrHandle = f(function (a) {
                    return a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute !== V && "#" === a.firstChild.getAttribute("href")
                }) ? {} : {
                    href: function (a) {
                        return a.getAttribute("href", 2)
                    }
                    , type: function (a) {
                        return a.getAttribute("type")
                    }
                }, P.getIdNotName ? (y.find.ID = function (a, b) {
                    if (typeof b.getElementById !== V && !H) {
                        var c = b.getElementById(a);
                        return c && c.parentNode ? [c] : []
                    }
                }, y.filter.ID = function (a) {
                    var b = a.replace(ua, va);
                    return function (a) {
                        return a.getAttribute("id") === b
                    }
                }) : (y.find.ID = function (a, c) {
                    if (typeof c.getElementById !== V && !H) {
                        var d = c.getElementById(a);
                        return d ? d.id === a || typeof d.getAttributeNode !== V && d.getAttributeNode("id")
                            .value === a ? [d] : b : []
                    }
                }, y.filter.ID = function (a) {
                    var b = a.replace(ua, va);
                    return function (a) {
                        var c = typeof a.getAttributeNode !== V && a.getAttributeNode("id");
                        return c && c.value === b
                    }
                }), y.find.TAG = P.tagNameNoComments ? function (a, b) {
                    return typeof b.getElementsByTagName !== V ? b.getElementsByTagName(a) : void 0
                } : function (a, b) {
                    var c, d = []
                        , e = 0
                        , f = b.getElementsByTagName(a);
                    if ("*" === a) {
                        for (; c = f[e++];) 1 === c.nodeType && d.push(c);
                        return d
                    }
                    return f
                }, y.find.NAME = P.getByName && function (a, b) {
                    return typeof b.getElementsByName !== V ? b.getElementsByName(name) : void 0
                }, y.find.CLASS = P.getByClassName && function (a, b) {
                    return typeof b.getElementsByClassName === V || H ? void 0 : b.getElementsByClassName(a)
                }, J = [], I = [":focus"], (P.qsa = c(d.querySelectorAll)) && (f(function (a) {
                    a.innerHTML = "<select><option selected=''></option></select>", a.querySelectorAll("[selected]")
                        .length || I.push("\\[" + aa + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), a.querySelectorAll(":checked")
                        .length || I.push(":checked")
                }), f(function (a) {
                    a.innerHTML = "<input type='hidden' i=''/>", a.querySelectorAll("[i^='']")
                        .length && I.push("[*^$]=" + aa + "*(?:\"\"|'')"), a.querySelectorAll(":enabled")
                        .length || I.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), I.push(",.*:")
                })), (P.matchesSelector = c(K = G.matchesSelector || G.mozMatchesSelector || G.webkitMatchesSelector || G.oMatchesSelector || G.msMatchesSelector)) && f(function (a) {
                    P.disconnectedMatch = K.call(a, "div"), K.call(a, "[s!='']:x"), J.push("!=", fa)
                }), I = new RegExp(I.join("|")), J = new RegExp(J.join("|")), L = c(G.contains) || G.compareDocumentPosition ? function (a, b) {
                    var c = 9 === a.nodeType ? a.documentElement : a
                        , d = b && b.parentNode;
                    return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)))
                } : function (a, b) {
                    if (b)
                        for (; b = b.parentNode;)
                            if (b === a) return !0;
                    return !1
                }, M = G.compareDocumentPosition ? function (a, b) {
                    var c;
                    return a === b ? (C = !0, 0) : (c = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition(b)) ? 1 & c || a.parentNode && 11 === a.parentNode.nodeType ? a === d || L(O, a) ? -1 : b === d || L(O, b) ? 1 : 0 : 4 & c ? -1 : 1 : a.compareDocumentPosition ? -1 : 1
                } : function (a, b) {
                    var c, e = 0
                        , f = a.parentNode
                        , g = b.parentNode
                        , i = [a]
                        , j = [b];
                    if (a === b) return C = !0, 0;
                    if (!f || !g) return a === d ? -1 : b === d ? 1 : f ? -1 : g ? 1 : 0;
                    if (f === g) return h(a, b);
                    for (c = a; c = c.parentNode;) i.unshift(c);
                    for (c = b; c = c.parentNode;) j.unshift(c);
                    for (; i[e] === j[e];) e++;
                    return e ? h(i[e], j[e]) : i[e] === O ? -1 : j[e] === O ? 1 : 0
                }, C = !1, [0, 0].sort(M), P.detectDuplicates = C, F) : F
            }, g.matches = function (a, b) {
                return g(a, null, null, b)
            }, g.matchesSelector = function (a, b) {
                if ((a.ownerDocument || a) !== F && E(a), b = b.replace(ta, "='$1']"), P.matchesSelector && !H && (!J || !J.test(b)) && !I.test(b)) try {
                    var c = K.call(a, b);
                    if (c || P.disconnectedMatch || a.document && 11 !== a.document.nodeType) return c
                } catch (d) {}
                return g(b, F, null, [a])
                    .length > 0
            }, g.contains = function (a, b) {
                return (a.ownerDocument || a) !== F && E(a), L(a, b)
            }, g.attr = function (a, b) {
                var c;
                return (a.ownerDocument || a) !== F && E(a), H || (b = b.toLowerCase()), (c = y.attrHandle[b]) ? c(a) : H || P.attributes ? a.getAttribute(b) : ((c = a.getAttributeNode(b)) || a.getAttribute(b)) && a[b] === !0 ? b : c && c.specified ? c.value : null
            }, g.error = function (a) {
                throw new Error("Syntax error, unrecognized expression: " + a)
            }, g.uniqueSort = function (a) {
                var b, c = []
                    , d = 1
                    , e = 0;
                if (C = !P.detectDuplicates, a.sort(M), C) {
                    for (; b = a[d]; d++) b === a[d - 1] && (e = c.push(d));
                    for (; e--;) a.splice(c[e], 1)
                }
                return a
            }, z = g.getText = function (a) {
                var b, c = ""
                    , d = 0
                    , e = a.nodeType;
                if (e) {
                    if (1 === e || 9 === e || 11 === e) {
                        if ("string" == typeof a.textContent) return a.textContent;
                        for (a = a.firstChild; a; a = a.nextSibling) c += z(a)
                    } else if (3 === e || 4 === e) return a.nodeValue
                } else
                    for (; b = a[d]; d++) c += z(b);
                return c
            }, y = g.selectors = {
                cacheLength: 50
                , createPseudo: e
                , match: ma
                , find: {}
                , relative: {
                    ">": {
                        dir: "parentNode"
                        , first: !0
                    }
                    , " ": {
                        dir: "parentNode"
                    }
                    , "+": {
                        dir: "previousSibling"
                        , first: !0
                    }
                    , "~": {
                        dir: "previousSibling"
                    }
                }
                , preFilter: {
                    ATTR: function (a) {
                        return a[1] = a[1].replace(ua, va), a[3] = (a[4] || a[5] || "")
                            .replace(ua, va), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4)
                    }
                    , CHILD: function (a) {
                        return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || g.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && g.error(a[0]), a
                    }
                    , PSEUDO: function (a) {
                        var b, c = !a[5] && a[2];
                        return ma.CHILD.test(a[0]) ? null : (a[4] ? a[2] = a[4] : c && ka.test(c) && (b = l(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3))
                    }
                }
                , filter: {
                    TAG: function (a) {
                        return "*" === a ? function () {
                            return !0
                        } : (a = a.replace(ua, va)
                            .toLowerCase()
                            , function (b) {
                                return b.nodeName && b.nodeName.toLowerCase() === a
                            })
                    }
                    , CLASS: function (a) {
                        var b = S[a + " "];
                        return b || (b = new RegExp("(^|" + aa + ")" + a + "(" + aa + "|$)")) && S(a, function (a) {
                            return b.test(a.className || typeof a.getAttribute !== V && a.getAttribute("class") || "")
                        })
                    }
                    , ATTR: function (a, b, c) {
                        return function (d) {
                            var e = g.attr(d, a);
                            return null == e ? "!=" === b : b ? (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e + " ")
                                .indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0
                        }
                    }
                    , CHILD: function (a, b, c, d, e) {
                        var f = "nth" !== a.slice(0, 3)
                            , g = "last" !== a.slice(-4)
                            , h = "of-type" === b;
                        return 1 === d && 0 === e ? function (a) {
                            return !!a.parentNode
                        } : function (b, c, i) {
                            var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling"
                                , q = b.parentNode
                                , r = h && b.nodeName.toLowerCase()
                                , s = !i && !h;
                            if (q) {
                                if (f) {
                                    for (; p;) {
                                        for (l = b; l = l[p];)
                                            if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) return !1;
                                        o = p = "only" === a && !o && "nextSibling"
                                    }
                                    return !0
                                }
                                if (o = [g ? q.firstChild : q.lastChild], g && s) {
                                    for (k = q[N] || (q[N] = {}), j = k[a] || [], n = j[0] === Q && j[1], m = j[0] === Q && j[2], l = n && q.childNodes[n]; l = ++n && l && l[p] || (m = n = 0) || o.pop();)
                                        if (1 === l.nodeType && ++m && l === b) {
                                            k[a] = [Q, n, m];
                                            break
                                        }
                                } else if (s && (j = (b[N] || (b[N] = {}))[a]) && j[0] === Q) m = j[1];
                                else
                                    for (;
                                        (l = ++n && l && l[p] || (m = n = 0) || o.pop()) && ((h ? l.nodeName.toLowerCase() !== r : 1 !== l.nodeType) || !++m || (s && ((l[N] || (l[N] = {}))[a] = [Q, m]), l !== b)););
                                return m -= e, m === d || m % d === 0 && m / d >= 0
                            }
                        }
                    }
                    , PSEUDO: function (a, b) {
                        var c, d = y.pseudos[a] || y.setFilters[a.toLowerCase()] || g.error("unsupported pseudo: " + a);
                        return d[N] ? d(b) : d.length > 1 ? (c = [a, a, "", b], y.setFilters.hasOwnProperty(a.toLowerCase()) ? e(function (a, c) {
                            for (var e, f = d(a, b), g = f.length; g--;) e = _.call(a, f[g]), a[e] = !(c[e] = f[g])
                        }) : function (a) {
                            return d(a, 0, c)
                        }) : d
                    }
                }
                , pseudos: {
                    not: e(function (a) {
                        var b = []
                            , c = []
                            , d = B(a.replace(ga, "$1"));
                        return d[N] ? e(function (a, b, c, e) {
                            for (var f, g = d(a, null, e, []), h = a.length; h--;)(f = g[h]) && (a[h] = !(b[h] = f))
                        }) : function (a, e, f) {
                            return b[0] = a, d(b, null, f, c), !c.pop()
                        }
                    })
                    , has: e(function (a) {
                        return function (b) {
                            return g(a, b)
                                .length > 0
                        }
                    })
                    , contains: e(function (a) {
                        return function (b) {
                            return (b.textContent || b.innerText || z(b))
                                .indexOf(a) > -1;
                        }
                    })
                    , lang: e(function (a) {
                        return la.test(a || "") || g.error("unsupported lang: " + a), a = a.replace(ua, va)
                            .toLowerCase()
                            , function (b) {
                                var c;
                                do
                                    if (c = H ? b.getAttribute("xml:lang") || b.getAttribute("lang") : b.lang) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-"); while ((b = b.parentNode) && 1 === b.nodeType);
                                return !1
                            }
                    })
                    , target: function (b) {
                        var c = a.location && a.location.hash;
                        return c && c.slice(1) === b.id
                    }
                    , root: function (a) {
                        return a === G
                    }
                    , focus: function (a) {
                        return a === F.activeElement && (!F.hasFocus || F.hasFocus()) && !!(a.type || a.href || ~a.tabIndex)
                    }
                    , enabled: function (a) {
                        return a.disabled === !1
                    }
                    , disabled: function (a) {
                        return a.disabled === !0
                    }
                    , checked: function (a) {
                        var b = a.nodeName.toLowerCase();
                        return "input" === b && !!a.checked || "option" === b && !!a.selected
                    }
                    , selected: function (a) {
                        return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
                    }
                    , empty: function (a) {
                        for (a = a.firstChild; a; a = a.nextSibling)
                            if (a.nodeName > "@" || 3 === a.nodeType || 4 === a.nodeType) return !1;
                        return !0
                    }
                    , parent: function (a) {
                        return !y.pseudos.empty(a)
                    }
                    , header: function (a) {
                        return ra.test(a.nodeName)
                    }
                    , input: function (a) {
                        return qa.test(a.nodeName)
                    }
                    , button: function (a) {
                        var b = a.nodeName.toLowerCase();
                        return "input" === b && "button" === a.type || "button" === b
                    }
                    , text: function (a) {
                        var b;
                        return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || b.toLowerCase() === a.type)
                    }
                    , first: k(function () {
                        return [0]
                    })
                    , last: k(function (a, b) {
                        return [b - 1]
                    })
                    , eq: k(function (a, b, c) {
                        return [0 > c ? c + b : c]
                    })
                    , even: k(function (a, b) {
                        for (var c = 0; b > c; c += 2) a.push(c);
                        return a
                    })
                    , odd: k(function (a, b) {
                        for (var c = 1; b > c; c += 2) a.push(c);
                        return a
                    })
                    , lt: k(function (a, b, c) {
                        for (var d = 0 > c ? c + b : c; --d >= 0;) a.push(d);
                        return a
                    })
                    , gt: k(function (a, b, c) {
                        for (var d = 0 > c ? c + b : c; ++d < b;) a.push(d);
                        return a
                    })
                }
            };
            for (w in {
                    radio: !0
                    , checkbox: !0
                    , file: !0
                    , password: !0
                    , image: !0
                }) y.pseudos[w] = i(w);
            for (w in {
                    submit: !0
                    , reset: !0
                }) y.pseudos[w] = j(w);
            B = g.compile = function (a, b) {
                var c, d = []
                    , e = []
                    , f = U[a + " "];
                if (!f) {
                    for (b || (b = l(a)), c = b.length; c--;) f = r(b[c]), f[N] ? d.push(f) : e.push(f);
                    f = U(a, s(e, d))
                }
                return f
            }, y.pseudos.nth = y.pseudos.eq, y.filters = v.prototype = y.pseudos, y.setFilters = new v, E(), g.attr = ia.attr, ia.find = g, ia.expr = g.selectors, ia.expr[":"] = ia.expr.pseudos, ia.unique = g.uniqueSort, ia.text = g.getText, ia.isXMLDoc = g.isXML, ia.contains = g.contains
        }(a);
    var Pa = /Until$/
        , Qa = /^(?:parents|prev(?:Until|All))/
        , Ra = /^.[^:#\[\.,]*$/
        , Sa = ia.expr.match.needsContext
        , Ta = {
            children: !0
            , contents: !0
            , next: !0
            , prev: !0
        };
    ia.fn.extend({
        find: function (a) {
            var b, c, d, e = this.length;
            if ("string" != typeof a) return d = this, this.pushStack(ia(a)
                .filter(function () {
                    for (b = 0; e > b; b++)
                        if (ia.contains(d[b], this)) return !0
                }));
            for (c = [], b = 0; e > b; b++) ia.find(a, this[b], c);
            return c = this.pushStack(e > 1 ? ia.unique(c) : c), c.selector = (this.selector ? this.selector + " " : "") + a, c
        }
        , has: function (a) {
            var b, c = ia(a, this)
                , d = c.length;
            return this.filter(function () {
                for (b = 0; d > b; b++)
                    if (ia.contains(this, c[b])) return !0
            })
        }
        , not: function (a) {
            return this.pushStack(l(this, a, !1))
        }
        , filter: function (a) {
            return this.pushStack(l(this, a, !0))
        }
        , is: function (a) {
            return !!a && ("string" == typeof a ? Sa.test(a) ? ia(a, this.context)
                .index(this[0]) >= 0 : ia.filter(a, this)
                .length > 0 : this.filter(a)
                .length > 0)
        }
        , closest: function (a, b) {
            for (var c, d = 0, e = this.length, f = [], g = Sa.test(a) || "string" != typeof a ? ia(a, b || this.context) : 0; e > d; d++)
                for (c = this[d]; c && c.ownerDocument && c !== b && 11 !== c.nodeType;) {
                    if (g ? g.index(c) > -1 : ia.find.matchesSelector(c, a)) {
                        f.push(c);
                        break
                    }
                    c = c.parentNode
                }
            return this.pushStack(f.length > 1 ? ia.unique(f) : f)
        }
        , index: function (a) {
            return a ? "string" == typeof a ? ia.inArray(this[0], ia(a)) : ia.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.first()
                .prevAll()
                .length : -1
        }
        , add: function (a, b) {
            var c = "string" == typeof a ? ia(a, b) : ia.makeArray(a && a.nodeType ? [a] : a)
                , d = ia.merge(this.get(), c);
            return this.pushStack(ia.unique(d))
        }
        , addBack: function (a) {
            return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
        }
    }), ia.fn.andSelf = ia.fn.addBack, ia.each({
        parent: function (a) {
            var b = a.parentNode;
            return b && 11 !== b.nodeType ? b : null
        }
        , parents: function (a) {
            return ia.dir(a, "parentNode")
        }
        , parentsUntil: function (a, b, c) {
            return ia.dir(a, "parentNode", c)
        }
        , next: function (a) {
            return k(a, "nextSibling")
        }
        , prev: function (a) {
            return k(a, "previousSibling")
        }
        , nextAll: function (a) {
            return ia.dir(a, "nextSibling")
        }
        , prevAll: function (a) {
            return ia.dir(a, "previousSibling")
        }
        , nextUntil: function (a, b, c) {
            return ia.dir(a, "nextSibling", c)
        }
        , prevUntil: function (a, b, c) {
            return ia.dir(a, "previousSibling", c)
        }
        , siblings: function (a) {
            return ia.sibling((a.parentNode || {})
                .firstChild, a)
        }
        , children: function (a) {
            return ia.sibling(a.firstChild)
        }
        , contents: function (a) {
            return ia.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : ia.merge([], a.childNodes)
        }
    }, function (a, b) {
        ia.fn[a] = function (c, d) {
            var e = ia.map(this, b, c);
            return Pa.test(a) || (d = c), d && "string" == typeof d && (e = ia.filter(d, e)), e = this.length > 1 && !Ta[a] ? ia.unique(e) : e, this.length > 1 && Qa.test(a) && (e = e.reverse()), this.pushStack(e)
        }
    }), ia.extend({
        filter: function (a, b, c) {
            return c && (a = ":not(" + a + ")"), 1 === b.length ? ia.find.matchesSelector(b[0], a) ? [b[0]] : [] : ia.find.matches(a, b)
        }
        , dir: function (a, c, d) {
            for (var e = [], f = a[c]; f && 9 !== f.nodeType && (d === b || 1 !== f.nodeType || !ia(f)
                    .is(d));) 1 === f.nodeType && e.push(f), f = f[c];
            return e
        }
        , sibling: function (a, b) {
            for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
            return c
        }
    });
    var Ua = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video"
        , Va = / jQuery\d+="(?:null|\d+)"/g
        , Wa = new RegExp("<(?:" + Ua + ")[\\s/>]", "i")
        , Xa = /^\s+/
        , Ya = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi
        , Za = /<([\w:]+)/
        , $a = /<tbody/i
        , _a = /<|&#?\w+;/
        , ab = /<(?:script|style|link)/i
        , bb = /^(?:checkbox|radio)$/i
        , cb = /checked\s*(?:[^=]|=\s*.checked.)/i
        , db = /^$|\/(?:java|ecma)script/i
        , eb = /^true\/(.*)/
        , fb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g
        , gb = {
            option: [1, "<select multiple='multiple'>", "</select>"]
            , legend: [1, "<fieldset>", "</fieldset>"]
            , area: [1, "<map>", "</map>"]
            , param: [1, "<object>", "</object>"]
            , thead: [1, "<table>", "</table>"]
            , tr: [2, "<table><tbody>", "</tbody></table>"]
            , col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"]
            , td: [3, "<table><tbody><tr>", "</tr></tbody></table>"]
            , _default: ia.support.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]
        }
        , hb = m(W)
        , ib = hb.appendChild(W.createElement("div"));
    gb.optgroup = gb.option, gb.tbody = gb.tfoot = gb.colgroup = gb.caption = gb.thead, gb.th = gb.td, ia.fn.extend({
        text: function (a) {
            return ia.access(this, function (a) {
                return a === b ? ia.text(this) : this.empty()
                    .append((this[0] && this[0].ownerDocument || W)
                        .createTextNode(a))
            }, null, a, arguments.length)
        }
        , wrapAll: function (a) {
            if (ia.isFunction(a)) return this.each(function (b) {
                ia(this)
                    .wrapAll(a.call(this, b))
            });
            if (this[0]) {
                var b = ia(a, this[0].ownerDocument)
                    .eq(0)
                    .clone(!0);
                this[0].parentNode && b.insertBefore(this[0]), b.map(function () {
                        for (var a = this; a.firstChild && 1 === a.firstChild.nodeType;) a = a.firstChild;
                        return a
                    })
                    .append(this)
            }
            return this
        }
        , wrapInner: function (a) {
            return ia.isFunction(a) ? this.each(function (b) {
                ia(this)
                    .wrapInner(a.call(this, b))
            }) : this.each(function () {
                var b = ia(this)
                    , c = b.contents();
                c.length ? c.wrapAll(a) : b.append(a)
            })
        }
        , wrap: function (a) {
            var b = ia.isFunction(a);
            return this.each(function (c) {
                ia(this)
                    .wrapAll(b ? a.call(this, c) : a)
            })
        }
        , unwrap: function () {
            return this.parent()
                .each(function () {
                    ia.nodeName(this, "body") || ia(this)
                        .replaceWith(this.childNodes)
                })
                .end()
        }
        , append: function () {
            return this.domManip(arguments, !0, function (a) {
                1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || this.appendChild(a)
            })
        }
        , prepend: function () {
            return this.domManip(arguments, !0, function (a) {
                1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || this.insertBefore(a, this.firstChild)
            })
        }
        , before: function () {
            return this.domManip(arguments, !1, function (a) {
                this.parentNode && this.parentNode.insertBefore(a, this)
            })
        }
        , after: function () {
            return this.domManip(arguments, !1, function (a) {
                this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)
            })
        }
        , remove: function (a, b) {
            for (var c, d = 0; null != (c = this[d]); d++)(!a || ia.filter(a, [c])
                .length > 0) && (b || 1 !== c.nodeType || ia.cleanData(t(c)), c.parentNode && (b && ia.contains(c.ownerDocument, c) && q(t(c, "script")), c.parentNode.removeChild(c)));
            return this
        }
        , empty: function () {
            for (var a, b = 0; null != (a = this[b]); b++) {
                for (1 === a.nodeType && ia.cleanData(t(a, !1)); a.firstChild;) a.removeChild(a.firstChild);
                a.options && ia.nodeName(a, "select") && (a.options.length = 0)
            }
            return this
        }
        , clone: function (a, b) {
            return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function () {
                return ia.clone(this, a, b)
            })
        }
        , html: function (a) {
            return ia.access(this, function (a) {
                var c = this[0] || {}
                    , d = 0
                    , e = this.length;
                if (a === b) return 1 === c.nodeType ? c.innerHTML.replace(Va, "") : b;
                if ("string" == typeof a && !ab.test(a) && (ia.support.htmlSerialize || !Wa.test(a)) && (ia.support.leadingWhitespace || !Xa.test(a)) && !gb[(Za.exec(a) || ["", ""])[1].toLowerCase()]) {
                    a = a.replace(Ya, "<$1></$2>");
                    try {
                        for (; e > d; d++) c = this[d] || {}, 1 === c.nodeType && (ia.cleanData(t(c, !1)), c.innerHTML = a);
                        c = 0
                    } catch (f) {}
                }
                c && this.empty()
                    .append(a)
            }, null, a, arguments.length)
        }
        , replaceWith: function (a) {
            var b = ia.isFunction(a);
            return b || "string" == typeof a || (a = ia(a)
                .not(this)
                .detach()), this.domManip([a], !0, function (a) {
                var b = this.nextSibling
                    , c = this.parentNode;
                c && (ia(this)
                    .remove(), c.insertBefore(a, b))
            })
        }
        , detach: function (a) {
            return this.remove(a, !0)
        }
        , domManip: function (a, c, d) {
            a = ba.apply([], a);
            var e, f, g, h, i, j, k = 0
                , l = this.length
                , m = this
                , q = l - 1
                , r = a[0]
                , s = ia.isFunction(r);
            if (s || !(1 >= l || "string" != typeof r || ia.support.checkClone) && cb.test(r)) return this.each(function (e) {
                var f = m.eq(e);
                s && (a[0] = r.call(this, e, c ? f.html() : b)), f.domManip(a, c, d)
            });
            if (l && (j = ia.buildFragment(a, this[0].ownerDocument, !1, this), e = j.firstChild, 1 === j.childNodes.length && (j = e), e)) {
                for (c = c && ia.nodeName(e, "tr"), h = ia.map(t(j, "script"), o), g = h.length; l > k; k++) f = j, k !== q && (f = ia.clone(f, !0, !0), g && ia.merge(h, t(f, "script"))), d.call(c && ia.nodeName(this[k], "table") ? n(this[k], "tbody") : this[k], f, k);
                if (g)
                    for (i = h[h.length - 1].ownerDocument, ia.map(h, p), k = 0; g > k; k++) f = h[k], db.test(f.type || "") && !ia._data(f, "globalEval") && ia.contains(i, f) && (f.src ? ia.ajax({
                        url: f.src
                        , type: "GET"
                        , dataType: "script"
                        , async: !1
                        , global: !1
                        , "throws": !0
                    }) : ia.globalEval((f.text || f.textContent || f.innerHTML || "")
                        .replace(fb, "")));
                j = e = null
            }
            return this
        }
    }), ia.each({
        appendTo: "append"
        , prependTo: "prepend"
        , insertBefore: "before"
        , insertAfter: "after"
        , replaceAll: "replaceWith"
    }, function (a, b) {
        ia.fn[a] = function (a) {
            for (var c, d = 0, e = [], f = ia(a), g = f.length - 1; g >= d; d++) c = d === g ? this : this.clone(!0), ia(f[d])[b](c), ca.apply(e, c.get());
            return this.pushStack(e)
        }
    }), ia.extend({
        clone: function (a, b, c) {
            var d, e, f, g, h, i = ia.contains(a.ownerDocument, a);
            if (ia.support.html5Clone || ia.isXMLDoc(a) || !Wa.test("<" + a.nodeName + ">") ? f = a.cloneNode(!0) : (ib.innerHTML = a.outerHTML, ib.removeChild(f = ib.firstChild)), !(ia.support.noCloneEvent && ia.support.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || ia.isXMLDoc(a)))
                for (d = t(f), h = t(a), g = 0; null != (e = h[g]); ++g) d[g] && s(e, d[g]);
            if (b)
                if (c)
                    for (h = h || t(a), d = d || t(f), g = 0; null != (e = h[g]); g++) r(e, d[g]);
                else r(a, f);
            return d = t(f, "script"), d.length > 0 && q(d, !i && t(a, "script")), d = h = e = null, f
        }
        , buildFragment: function (a, b, c, d) {
            for (var e, f, g, h, i, j, k, l = a.length, n = m(b), o = [], p = 0; l > p; p++)
                if (f = a[p], f || 0 === f)
                    if ("object" === ia.type(f)) ia.merge(o, f.nodeType ? [f] : f);
                    else if (_a.test(f)) {
                for (h = h || n.appendChild(b.createElement("div")), i = (Za.exec(f) || ["", ""])[1].toLowerCase(), k = gb[i] || gb._default, h.innerHTML = k[1] + f.replace(Ya, "<$1></$2>") + k[2], e = k[0]; e--;) h = h.lastChild;
                if (!ia.support.leadingWhitespace && Xa.test(f) && o.push(b.createTextNode(Xa.exec(f)[0])), !ia.support.tbody)
                    for (f = "table" !== i || $a.test(f) ? "<table>" !== k[1] || $a.test(f) ? 0 : h : h.firstChild, e = f && f.childNodes.length; e--;) ia.nodeName(j = f.childNodes[e], "tbody") && !j.childNodes.length && f.removeChild(j);
                for (ia.merge(o, h.childNodes), h.textContent = ""; h.firstChild;) h.removeChild(h.firstChild);
                h = n.lastChild
            } else o.push(b.createTextNode(f));
            for (h && n.removeChild(h), ia.support.appendChecked || ia.grep(t(o, "input"), u), p = 0; f = o[p++];)
                if ((!d || -1 === ia.inArray(f, d)) && (g = ia.contains(f.ownerDocument, f), h = t(n.appendChild(f), "script"), g && q(h), c))
                    for (e = 0; f = h[e++];) db.test(f.type || "") && c.push(f);
            return h = null, n
        }
        , cleanData: function (a, b) {
            for (var c, d, e, f, g = 0, h = ia.expando, i = ia.cache, j = ia.support.deleteExpando, k = ia.event.special; null != (c = a[g]); g++)
                if ((b || ia.acceptData(c)) && (e = c[h], f = e && i[e])) {
                    if (f.events)
                        for (d in f.events) k[d] ? ia.event.remove(c, d) : ia.removeEvent(c, d, f.handle);
                    i[e] && (delete i[e], j ? delete c[h] : typeof c.removeAttribute !== V ? c.removeAttribute(h) : c[h] = null, _.push(e))
                }
        }
    });
    var jb, kb, lb, mb = /alpha\([^)]*\)/i
        , nb = /opacity\s*=\s*([^)]*)/
        , ob = /^(top|right|bottom|left)$/
        , pb = /^(none|table(?!-c[ea]).+)/
        , qb = /^margin/
        , rb = new RegExp("^(" + ja + ")(.*)$", "i")
        , sb = new RegExp("^(" + ja + ")(?!px)[a-z%]+$", "i")
        , tb = new RegExp("^([+-])=(" + ja + ")", "i")
        , ub = {
            BODY: "block"
        }
        , vb = {
            position: "absolute"
            , visibility: "hidden"
            , display: "block"
        }
        , wb = {
            letterSpacing: 0
            , fontWeight: 400
        }
        , xb = ["Top", "Right", "Bottom", "Left"]
        , yb = ["Webkit", "O", "Moz", "ms"];
    ia.fn.extend({
        css: function (a, c) {
            return ia.access(this, function (a, c, d) {
                var e, f, g = {}
                    , h = 0;
                if (ia.isArray(c)) {
                    for (f = kb(a), e = c.length; e > h; h++) g[c[h]] = ia.css(a, c[h], !1, f);
                    return g
                }
                return d !== b ? ia.style(a, c, d) : ia.css(a, c)
            }, a, c, arguments.length > 1)
        }
        , show: function () {
            return x(this, !0)
        }
        , hide: function () {
            return x(this)
        }
        , toggle: function (a) {
            var b = "boolean" == typeof a;
            return this.each(function () {
                (b ? a : w(this)) ? ia(this)
                    .show(): ia(this)
                    .hide()
            })
        }
    }), ia.extend({
        cssHooks: {
            opacity: {
                get: function (a, b) {
                    if (b) {
                        var c = lb(a, "opacity");
                        return "" === c ? "1" : c
                    }
                }
            }
        }
        , cssNumber: {
            columnCount: !0
            , fillOpacity: !0
            , fontWeight: !0
            , lineHeight: !0
            , opacity: !0
            , orphans: !0
            , widows: !0
            , zIndex: !0
            , zoom: !0
        }
        , cssProps: {
            "float": ia.support.cssFloat ? "cssFloat" : "styleFloat"
        }
        , style: function (a, c, d, e) {
            if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
                var f, g, h, i = ia.camelCase(c)
                    , j = a.style;
                if (c = ia.cssProps[i] || (ia.cssProps[i] = v(j, i)), h = ia.cssHooks[c] || ia.cssHooks[i], d === b) return h && "get" in h && (f = h.get(a, !1, e)) !== b ? f : j[c];
                if (g = typeof d, "string" === g && (f = tb.exec(d)) && (d = (f[1] + 1) * f[2] + parseFloat(ia.css(a, c)), g = "number"), !(null == d || "number" === g && isNaN(d) || ("number" !== g || ia.cssNumber[i] || (d += "px"), ia.support.clearCloneStyle || "" !== d || 0 !== c.indexOf("background") || (j[c] = "inherit"), h && "set" in h && (d = h.set(a, d, e)) === b))) try {
                    j[c] = d
                } catch (k) {}
            }
        }
        , css: function (a, c, d, e) {
            var f, g, h, i = ia.camelCase(c);
            return c = ia.cssProps[i] || (ia.cssProps[i] = v(a.style, i)), h = ia.cssHooks[c] || ia.cssHooks[i], h && "get" in h && (g = h.get(a, !0, d)), g === b && (g = lb(a, c, e)), "normal" === g && c in wb && (g = wb[c]), "" === d || d ? (f = parseFloat(g), d === !0 || ia.isNumeric(f) ? f || 0 : g) : g
        }
        , swap: function (a, b, c, d) {
            var e, f, g = {};
            for (f in b) g[f] = a.style[f], a.style[f] = b[f];
            e = c.apply(a, d || []);
            for (f in b) a.style[f] = g[f];
            return e
        }
    }), a.getComputedStyle ? (kb = function (b) {
        return a.getComputedStyle(b, null)
    }, lb = function (a, c, d) {
        var e, f, g, h = d || kb(a)
            , i = h ? h.getPropertyValue(c) || h[c] : b
            , j = a.style;
        return h && ("" !== i || ia.contains(a.ownerDocument, a) || (i = ia.style(a, c)), sb.test(i) && qb.test(c) && (e = j.width, f = j.minWidth, g = j.maxWidth, j.minWidth = j.maxWidth = j.width = i, i = h.width, j.width = e, j.minWidth = f, j.maxWidth = g)), i
    }) : W.documentElement.currentStyle && (kb = function (a) {
        return a.currentStyle
    }, lb = function (a, c, d) {
        var e, f, g, h = d || kb(a)
            , i = h ? h[c] : b
            , j = a.style;
        return null == i && j && j[c] && (i = j[c]), sb.test(i) && !ob.test(c) && (e = j.left, f = a.runtimeStyle, g = f && f.left, g && (f.left = a.currentStyle.left), j.left = "fontSize" === c ? "1em" : i, i = j.pixelLeft + "px", j.left = e, g && (f.left = g)), "" === i ? "auto" : i
    }), ia.each(["height", "width"], function (a, b) {
        ia.cssHooks[b] = {
            get: function (a, c, d) {
                return c ? 0 === a.offsetWidth && pb.test(ia.css(a, "display")) ? ia.swap(a, vb, function () {
                    return A(a, b, d)
                }) : A(a, b, d) : void 0
            }
            , set: function (a, c, d) {
                var e = d && kb(a);
                return y(a, c, d ? z(a, b, d, ia.support.boxSizing && "border-box" === ia.css(a, "boxSizing", !1, e), e) : 0)
            }
        }
    }), ia.support.opacity || (ia.cssHooks.opacity = {
        get: function (a, b) {
            return nb.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : ""
        }
        , set: function (a, b) {
            var c = a.style
                , d = a.currentStyle
                , e = ia.isNumeric(b) ? "alpha(opacity=" + 100 * b + ")" : ""
                , f = d && d.filter || c.filter || "";
            c.zoom = 1, (b >= 1 || "" === b) && "" === ia.trim(f.replace(mb, "")) && c.removeAttribute && (c.removeAttribute("filter"), "" === b || d && !d.filter) || (c.filter = mb.test(f) ? f.replace(mb, e) : f + " " + e)
        }
    }), ia(function () {
        ia.support.reliableMarginRight || (ia.cssHooks.marginRight = {
            get: function (a, b) {
                return b ? ia.swap(a, {
                    display: "inline-block"
                }, lb, [a, "marginRight"]) : void 0
            }
        }), !ia.support.pixelPosition && ia.fn.position && ia.each(["top", "left"], function (a, b) {
            ia.cssHooks[b] = {
                get: function (a, c) {
                    return c ? (c = lb(a, b), sb.test(c) ? ia(a)
                        .position()[b] + "px" : c) : void 0
                }
            }
        })
    }), ia.expr && ia.expr.filters && (ia.expr.filters.hidden = function (a) {
        return a.offsetWidth <= 0 && a.offsetHeight <= 0 || !ia.support.reliableHiddenOffsets && "none" === (a.style && a.style.display || ia.css(a, "display"))
    }, ia.expr.filters.visible = function (a) {
        return !ia.expr.filters.hidden(a)
    }), ia.each({
        margin: ""
        , padding: ""
        , border: "Width"
    }, function (a, b) {
        ia.cssHooks[a + b] = {
            expand: function (c) {
                for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + xb[d] + b] = f[d] || f[d - 2] || f[0];
                return e
            }
        }, qb.test(a) || (ia.cssHooks[a + b].set = y)
    });
    var zb = /%20/g
        , Ab = /\[\]$/
        , Bb = /\r?\n/g
        , Cb = /^(?:submit|button|image|reset|file)$/i
        , Db = /^(?:input|select|textarea|keygen)/i;
    ia.fn.extend({
        serialize: function () {
            return ia.param(this.serializeArray())
        }
        , serializeArray: function () {
            return this.map(function () {
                    var a = ia.prop(this, "elements");
                    return a ? ia.makeArray(a) : this
                })
                .filter(function () {
                    var a = this.type;
                    return this.name && !ia(this)
                        .is(":disabled") && Db.test(this.nodeName) && !Cb.test(a) && (this.checked || !bb.test(a))
                })
                .map(function (a, b) {
                    var c = ia(this)
                        .val();
                    return null == c ? null : ia.isArray(c) ? ia.map(c, function (a) {
                        return {
                            name: b.name
                            , value: a.replace(Bb, "\r\n")
                        }
                    }) : {
                        name: b.name
                        , value: c.replace(Bb, "\r\n")
                    }
                })
                .get()
        }
    }), ia.param = function (a, c) {
        var d, e = []
            , f = function (a, b) {
                b = ia.isFunction(b) ? b() : null == b ? "" : b, e[e.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
            };
        if (c === b && (c = ia.ajaxSettings && ia.ajaxSettings.traditional), ia.isArray(a) || a.jquery && !ia.isPlainObject(a)) ia.each(a, function () {
            f(this.name, this.value)
        });
        else
            for (d in a) D(d, a[d], c, f);
        return e.join("&")
            .replace(zb, "+")
    }, ia.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) {
        ia.fn[b] = function (a, c) {
            return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
        }
    }), ia.fn.hover = function (a, b) {
        return this.mouseenter(a)
            .mouseleave(b || a)
    };
    var Eb, Fb, Gb = ia.now()
        , Hb = /\?/
        , Ib = /#.*$/
        , Jb = /([?&])_=[^&]*/
        , Kb = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm
        , Lb = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/
        , Mb = /^(?:GET|HEAD)$/
        , Nb = /^\/\//
        , Ob = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/
        , Pb = ia.fn.load
        , Qb = {}
        , Rb = {}
        , Sb = "*/".concat("*");
    try {
        Fb = X.href
    } catch (Tb) {
        Fb = W.createElement("a"), Fb.href = "", Fb = Fb.href
    }
    Eb = Ob.exec(Fb.toLowerCase()) || [], ia.fn.load = function (a, c, d) {
        if ("string" != typeof a && Pb) return Pb.apply(this, arguments);
        var e, f, g, h = this
            , i = a.indexOf(" ");
        return i >= 0 && (e = a.slice(i, a.length), a = a.slice(0, i)), ia.isFunction(c) ? (d = c, c = b) : c && "object" == typeof c && (g = "POST"), h.length > 0 && ia.ajax({
                url: a
                , type: g
                , dataType: "html"
                , data: c
            })
            .done(function (a) {
                f = arguments, h.html(e ? ia("<div>")
                    .append(ia.parseHTML(a))
                    .find(e) : a)
            })
            .complete(d && function (a, b) {
                h.each(d, f || [a.responseText, b, a])
            }), this
    }, ia.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function (a, b) {
        ia.fn[b] = function (a) {
            return this.on(b, a)
        }
    }), ia.each(["get", "post"], function (a, c) {
        ia[c] = function (a, d, e, f) {
            return ia.isFunction(d) && (f = f || e, e = d, d = b), ia.ajax({
                url: a
                , type: c
                , dataType: f
                , data: d
                , success: e
            })
        }
    }), ia.extend({
        active: 0
        , lastModified: {}
        , etag: {}
        , ajaxSettings: {
            url: Fb
            , type: "GET"
            , isLocal: Lb.test(Eb[1])
            , global: !0
            , processData: !0
            , async: !0
            , contentType: "application/x-www-form-urlencoded; charset=UTF-8"
            , accepts: {
                "*": Sb
                , text: "text/plain"
                , html: "text/html"
                , xml: "application/xml, text/xml"
                , json: "application/json, text/javascript"
            }
            , contents: {
                xml: /xml/
                , html: /html/
                , json: /json/
            }
            , responseFields: {
                xml: "responseXML"
                , text: "responseText"
            }
            , converters: {
                "* text": a.String
                , "text html": !0
                , "text json": ia.parseJSON
                , "text xml": ia.parseXML
            }
            , flatOptions: {
                url: !0
                , context: !0
            }
        }
        , ajaxSetup: function (a, b) {
            return b ? G(G(a, ia.ajaxSettings), b) : G(ia.ajaxSettings, a)
        }
        , ajaxPrefilter: E(Qb)
        , ajaxTransport: E(Rb)
        , ajax: function (a, c) {
            function d(a, c, d, e) {
                var f, l, s, t, v, x = c;
                2 !== u && (u = 2, i && clearTimeout(i), k = b, h = e || "", w.readyState = a > 0 ? 4 : 0, d && (t = H(m, w, d)), a >= 200 && 300 > a || 304 === a ? (m.ifModified && (v = w.getResponseHeader("Last-Modified"), v && (ia.lastModified[g] = v), v = w.getResponseHeader("etag"), v && (ia.etag[g] = v)), 204 === a ? (f = !0, x = "nocontent") : 304 === a ? (f = !0, x = "notmodified") : (f = I(m, t), x = f.state, l = f.data, s = f.error, f = !s)) : (s = x, !a && x || (x = "error", 0 > a && (a = 0))), w.status = a, w.statusText = (c || x) + "", f ? p.resolveWith(n, [l, x, w]) : p.rejectWith(n, [w, x, s]), w.statusCode(r), r = b, j && o.trigger(f ? "ajaxSuccess" : "ajaxError", [w, m, f ? l : s]), q.fireWith(n, [w, x]), j && (o.trigger("ajaxComplete", [w, m]), --ia.active || ia.event.trigger("ajaxStop")))
            }
            "object" == typeof a && (c = a, a = b), c = c || {};
            var e, f, g, h, i, j, k, l, m = ia.ajaxSetup({}, c)
                , n = m.context || m
                , o = m.context && (n.nodeType || n.jquery) ? ia(n) : ia.event
                , p = ia.Deferred()
                , q = ia.Callbacks("once memory")
                , r = m.statusCode || {}
                , s = {}
                , t = {}
                , u = 0
                , v = "canceled"
                , w = {
                    readyState: 0
                    , getResponseHeader: function (a) {
                        var b;
                        if (2 === u) {
                            if (!l)
                                for (l = {}; b = Kb.exec(h);) l[b[1].toLowerCase()] = b[2];
                            b = l[a.toLowerCase()]
                        }
                        return null == b ? null : b
                    }
                    , getAllResponseHeaders: function () {
                        return 2 === u ? h : null
                    }
                    , setRequestHeader: function (a, b) {
                        var c = a.toLowerCase();
                        return u || (a = t[c] = t[c] || a, s[a] = b), this
                    }
                    , overrideMimeType: function (a) {
                        return u || (m.mimeType = a), this
                    }
                    , statusCode: function (a) {
                        var b;
                        if (a)
                            if (2 > u)
                                for (b in a) r[b] = [r[b], a[b]];
                            else w.always(a[w.status]);
                        return this
                    }
                    , abort: function (a) {
                        var b = a || v;
                        return k && k.abort(b), d(0, b), this
                    }
                };
            if (p.promise(w)
                .complete = q.add, w.success = w.done, w.error = w.fail, m.url = ((a || m.url || Fb) + "")
                .replace(Ib, "")
                .replace(Nb, Eb[1] + "//"), m.type = c.method || c.type || m.method || m.type, m.dataTypes = ia.trim(m.dataType || "*")
                .toLowerCase()
                .match(ka) || [""], null == m.crossDomain && (e = Ob.exec(m.url.toLowerCase()), m.crossDomain = !(!e || e[1] === Eb[1] && e[2] === Eb[2] && (e[3] || ("http:" === e[1] ? 80 : 443)) == (Eb[3] || ("http:" === Eb[1] ? 80 : 443)))), m.data && m.processData && "string" != typeof m.data && (m.data = ia.param(m.data, m.traditional)), F(Qb, m, c, w), 2 === u) return w;
            j = m.global, j && 0 === ia.active++ && ia.event.trigger("ajaxStart"), m.type = m.type.toUpperCase(), m.hasContent = !Mb.test(m.type), g = m.url, m.hasContent || (m.data && (g = m.url += (Hb.test(g) ? "&" : "?") + m.data, delete m.data), m.cache === !1 && (m.url = Jb.test(g) ? g.replace(Jb, "$1_=" + Gb++) : g + (Hb.test(g) ? "&" : "?") + "_=" + Gb++)), m.ifModified && (ia.lastModified[g] && w.setRequestHeader("If-Modified-Since", ia.lastModified[g]), ia.etag[g] && w.setRequestHeader("If-None-Match", ia.etag[g])), (m.data && m.hasContent && m.contentType !== !1 || c.contentType) && w.setRequestHeader("Content-Type", m.contentType), w.setRequestHeader("Accept", m.dataTypes[0] && m.accepts[m.dataTypes[0]] ? m.accepts[m.dataTypes[0]] + ("*" !== m.dataTypes[0] ? ", " + Sb + "; q=0.01" : "") : m.accepts["*"]);
            for (f in m.headers) w.setRequestHeader(f, m.headers[f]);
            if (m.beforeSend && (m.beforeSend.call(n, w, m) === !1 || 2 === u)) return w.abort();
            v = "abort";
            for (f in {
                    success: 1
                    , error: 1
                    , complete: 1
                }) w[f](m[f]);
            if (k = F(Rb, m, c, w)) {
                w.readyState = 1, j && o.trigger("ajaxSend", [w, m]), m.async && m.timeout > 0 && (i = setTimeout(function () {
                    w.abort("timeout")
                }, m.timeout));
                try {
                    u = 1, k.send(s, d)
                } catch (x) {
                    if (!(2 > u)) throw x;
                    d(-1, x)
                }
            } else d(-1, "No Transport");
            return w
        }
        , getScript: function (a, c) {
            return ia.get(a, b, c, "script")
        }
        , getJSON: function (a, b, c) {
            return ia.get(a, b, c, "json")
        }
    }), ia.ajaxSetup({
        accepts: {
            script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
        }
        , contents: {
            script: /(?:java|ecma)script/
        }
        , converters: {
            "text script": function (a) {
                return ia.globalEval(a), a
            }
        }
    }), ia.ajaxPrefilter("script", function (a) {
        a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
    }), ia.ajaxTransport("script", function (a) {
        if (a.crossDomain) {
            var c, d = W.head || ia("head")[0] || W.documentElement;
            return {
                send: function (b, e) {
                    c = W.createElement("script"), c.async = !0, a.scriptCharset && (c.charset = a.scriptCharset), c.src = a.url, c.onload = c.onreadystatechange = function (a, b) {
                        (b || !c.readyState || /loaded|complete/.test(c.readyState)) && (c.onload = c.onreadystatechange = null, c.parentNode && c.parentNode.removeChild(c), c = null, b || e(200, "success"))
                    }, d.insertBefore(c, d.firstChild)
                }
                , abort: function () {
                    c && c.onload(b, !0)
                }
            }
        }
    });
    var Ub = []
        , Vb = /(=)\?(?=&|$)|\?\?/;
    ia.ajaxSetup({
        jsonp: "callback"
        , jsonpCallback: function () {
            var a = Ub.pop() || ia.expando + "_" + Gb++;
            return this[a] = !0, a
        }
    }), ia.ajaxPrefilter("json jsonp", function (c, d, e) {
        var f, g, h, i = c.jsonp !== !1 && (Vb.test(c.url) ? "url" : "string" == typeof c.data && !(c.contentType || "")
            .indexOf("application/x-www-form-urlencoded") && Vb.test(c.data) && "data");
        return i || "jsonp" === c.dataTypes[0] ? (f = c.jsonpCallback = ia.isFunction(c.jsonpCallback) ? c.jsonpCallback() : c.jsonpCallback, i ? c[i] = c[i].replace(Vb, "$1" + f) : c.jsonp !== !1 && (c.url += (Hb.test(c.url) ? "&" : "?") + c.jsonp + "=" + f), c.converters["script json"] = function () {
            return h || ia.error(f + " was not called"), h[0]
        }, c.dataTypes[0] = "json", g = a[f], a[f] = function () {
            h = arguments
        }, e.always(function () {
            a[f] = g, c[f] && (c.jsonpCallback = d.jsonpCallback, Ub.push(f)), h && ia.isFunction(g) && g(h[0]), h = g = b
        }), "script") : void 0
    });
    var Wb, Xb, Yb = 0
        , Zb = a.ActiveXObject && function () {
            var a;
            for (a in Wb) Wb[a](b, !0)
        };
    ia.ajaxSettings.xhr = a.ActiveXObject ? function () {
        return !this.isLocal && J() || K()
    } : J, Xb = ia.ajaxSettings.xhr(), ia.support.cors = !!Xb && "withCredentials" in Xb, Xb = ia.support.ajax = !!Xb, Xb && ia.ajaxTransport(function (c) {
        if (!c.crossDomain || ia.support.cors) {
            var d;
            return {
                send: function (e, f) {
                    var g, h, i = c.xhr();
                    if (c.username ? i.open(c.type, c.url, c.async, c.username, c.password) : i.open(c.type, c.url, c.async), c.xhrFields)
                        for (h in c.xhrFields) i[h] = c.xhrFields[h];
                    c.mimeType && i.overrideMimeType && i.overrideMimeType(c.mimeType), c.crossDomain || e["X-Requested-With"] || (e["X-Requested-With"] = "XMLHttpRequest");
                    try {
                        for (h in e) i.setRequestHeader(h, e[h])
                    } catch (j) {}
                    i.send(c.hasContent && c.data || null), d = function (a, e) {
                        var h, j, k, l;
                        try {
                            if (d && (e || 4 === i.readyState))
                                if (d = b, g && (i.onreadystatechange = ia.noop, Zb && delete Wb[g]), e) 4 !== i.readyState && i.abort();
                                else {
                                    l = {}, h = i.status, j = i.getAllResponseHeaders(), "string" == typeof i.responseText && (l.text = i.responseText);
                                    try {
                                        k = i.statusText
                                    } catch (m) {
                                        k = ""
                                    }
                                    h || !c.isLocal || c.crossDomain ? 1223 === h && (h = 204) : h = l.text ? 200 : 404
                                }
                        } catch (n) {
                            e || f(-1, n)
                        }
                        l && f(h, k, l, j)
                    }, c.async ? 4 === i.readyState ? setTimeout(d) : (g = ++Yb, Zb && (Wb || (Wb = {}, ia(a)
                        .unload(Zb)), Wb[g] = d), i.onreadystatechange = d) : d()
                }
                , abort: function () {
                    d && d(b, !0)
                }
            }
        }
    });
    var $b, _b, ac = /^(?:toggle|show|hide)$/
        , bc = new RegExp("^(?:([+-])=|)(" + ja + ")([a-z%]*)$", "i")
        , cc = /queueHooks$/
        , dc = [P]
        , ec = {
            "*": [function (a, b) {
                var c, d, e = this.createTween(a, b)
                    , f = bc.exec(b)
                    , g = e.cur()
                    , h = +g || 0
                    , i = 1
                    , j = 20;
                if (f) {
                    if (c = +f[2], d = f[3] || (ia.cssNumber[a] ? "" : "px"), "px" !== d && h) {
                        h = ia.css(e.elem, a, !0) || c || 1;
                        do i = i || ".5", h /= i, ia.style(e.elem, a, h + d); while (i !== (i = e.cur() / g) && 1 !== i && --j)
                    }
                    e.unit = d, e.start = h, e.end = f[1] ? h + (f[1] + 1) * c : c
                }
                return e
            }]
        };
    ia.Animation = ia.extend(N, {
        tweener: function (a, b) {
            ia.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
            for (var c, d = 0, e = a.length; e > d; d++) c = a[d], ec[c] = ec[c] || [], ec[c].unshift(b)
        }
        , prefilter: function (a, b) {
            b ? dc.unshift(a) : dc.push(a)
        }
    }), ia.Tween = Q, Q.prototype = {
        constructor: Q
        , init: function (a, b, c, d, e, f) {
            this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (ia.cssNumber[c] ? "" : "px")
        }
        , cur: function () {
            var a = Q.propHooks[this.prop];
            return a && a.get ? a.get(this) : Q.propHooks._default.get(this)
        }
        , run: function (a) {
            var b, c = Q.propHooks[this.prop];
            return this.options.duration ? this.pos = b = ia.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : this.pos = b = a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : Q.propHooks._default.set(this), this
        }
    }, Q.prototype.init.prototype = Q.prototype, Q.propHooks = {
        _default: {
            get: function (a) {
                var b;
                return null == a.elem[a.prop] || a.elem.style && null != a.elem.style[a.prop] ? (b = ia.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0) : a.elem[a.prop]
            }
            , set: function (a) {
                ia.fx.step[a.prop] ? ia.fx.step[a.prop](a) : a.elem.style && (null != a.elem.style[ia.cssProps[a.prop]] || ia.cssHooks[a.prop]) ? ia.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
            }
        }
    }, Q.propHooks.scrollTop = Q.propHooks.scrollLeft = {
        set: function (a) {
            a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
        }
    }, ia.each(["toggle", "show", "hide"], function (a, b) {
        var c = ia.fn[b];
        ia.fn[b] = function (a, d, e) {
            return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(R(b, !0), a, d, e)
        }
    }), ia.fn.extend({
        fadeTo: function (a, b, c, d) {
            return this.filter(w)
                .css("opacity", 0)
                .show()
                .end()
                .animate({
                    opacity: b
                }, a, c, d)
        }
        , animate: function (a, b, c, d) {
            var e = ia.isEmptyObject(a)
                , f = ia.speed(b, c, d)
                , g = function () {
                    var b = N(this, ia.extend({}, a), f);
                    g.finish = function () {
                        b.stop(!0)
                    }, (e || ia._data(this, "finish")) && b.stop(!0)
                };
            return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
        }
        , stop: function (a, c, d) {
            var e = function (a) {
                var b = a.stop;
                delete a.stop, b(d)
            };
            return "string" != typeof a && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || "fx", []), this.each(function () {
                var b = !0
                    , c = null != a && a + "queueHooks"
                    , f = ia.timers
                    , g = ia._data(this);
                if (c) g[c] && g[c].stop && e(g[c]);
                else
                    for (c in g) g[c] && g[c].stop && cc.test(c) && e(g[c]);
                for (c = f.length; c--;) f[c].elem !== this || null != a && f[c].queue !== a || (f[c].anim.stop(d), b = !1, f.splice(c, 1));
                !b && d || ia.dequeue(this, a)
            })
        }
        , finish: function (a) {
            return a !== !1 && (a = a || "fx"), this.each(function () {
                var b, c = ia._data(this)
                    , d = c[a + "queue"]
                    , e = c[a + "queueHooks"]
                    , f = ia.timers
                    , g = d ? d.length : 0;
                for (c.finish = !0, ia.queue(this, a, []), e && e.cur && e.cur.finish && e.cur.finish.call(this), b = f.length; b--;) f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1));
                for (b = 0; g > b; b++) d[b] && d[b].finish && d[b].finish.call(this);
                delete c.finish
            })
        }
    }), ia.each({
        slideDown: R("show")
        , slideUp: R("hide")
        , slideToggle: R("toggle")
        , fadeIn: {
            opacity: "show"
        }
        , fadeOut: {
            opacity: "hide"
        }
        , fadeToggle: {
            opacity: "toggle"
        }
    }, function (a, b) {
        ia.fn[a] = function (a, c, d) {
            return this.animate(b, a, c, d)
        }
    }), ia.speed = function (a, b, c) {
        var d = a && "object" == typeof a ? ia.extend({}, a) : {
            complete: c || !c && b || ia.isFunction(a) && a
            , duration: a
            , easing: c && b || b && !ia.isFunction(b) && b
        };
        return d.duration = ia.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in ia.fx.speeds ? ia.fx.speeds[d.duration] : ia.fx.speeds._default, null != d.queue && d.queue !== !0 || (d.queue = "fx"), d.old = d.complete, d.complete = function () {
            ia.isFunction(d.old) && d.old.call(this), d.queue && ia.dequeue(this, d.queue)
        }, d
    }, ia.easing = {
        linear: function (a) {
            return a
        }
        , swing: function (a) {
            return .5 - Math.cos(a * Math.PI) / 2
        }
    }, ia.timers = [], ia.fx = Q.prototype.init, ia.fx.tick = function () {
        var a, c = ia.timers
            , d = 0;
        for ($b = ia.now(); d < c.length; d++) a = c[d], a() || c[d] !== a || c.splice(d--, 1);
        c.length || ia.fx.stop(), $b = b
    }, ia.fx.timer = function (a) {
        a() && ia.timers.push(a) && ia.fx.start()
    }, ia.fx.interval = 13, ia.fx.start = function () {
        _b || (_b = setInterval(ia.fx.tick, ia.fx.interval))
    }, ia.fx.stop = function () {
        clearInterval(_b), _b = null
    }, ia.fx.speeds = {
        slow: 600
        , fast: 200
        , _default: 400
    }, ia.fx.step = {}, ia.expr && ia.expr.filters && (ia.expr.filters.animated = function (a) {
        return ia.grep(ia.timers, function (b) {
                return a === b.elem
            })
            .length
    }), ia.fn.offset = function (a) {
        if (arguments.length) return a === b ? this : this.each(function (b) {
            ia.offset.setOffset(this, a, b)
        });
        var c, d, e = {
                top: 0
                , left: 0
            }
            , f = this[0]
            , g = f && f.ownerDocument;
        if (g) return c = g.documentElement, ia.contains(c, f) ? (typeof f.getBoundingClientRect !== V && (e = f.getBoundingClientRect()), d = S(g), {
            top: e.top + (d.pageYOffset || c.scrollTop) - (c.clientTop || 0)
            , left: e.left + (d.pageXOffset || c.scrollLeft) - (c.clientLeft || 0)
        }) : e
    }, ia.offset = {
        setOffset: function (a, b, c) {
            var d = ia.css(a, "position");
            "static" === d && (a.style.position = "relative");
            var e, f, g = ia(a)
                , h = g.offset()
                , i = ia.css(a, "top")
                , j = ia.css(a, "left")
                , k = ("absolute" === d || "fixed" === d) && ia.inArray("auto", [i, j]) > -1
                , l = {}
                , m = {};
            k ? (m = g.position(), e = m.top, f = m.left) : (e = parseFloat(i) || 0, f = parseFloat(j) || 0), ia.isFunction(b) && (b = b.call(a, c, h)), null != b.top && (l.top = b.top - h.top + e), null != b.left && (l.left = b.left - h.left + f), "using" in b ? b.using.call(a, l) : g.css(l)
        }
    }, ia.fn.extend({
        position: function () {
            if (this[0]) {
                var a, b, c = {
                        top: 0
                        , left: 0
                    }
                    , d = this[0];
                return "fixed" === ia.css(d, "position") ? b = d.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), ia.nodeName(a[0], "html") || (c = a.offset()), c.top += ia.css(a[0], "borderTopWidth", !0), c.left += ia.css(a[0], "borderLeftWidth", !0)), {
                    top: b.top - c.top - ia.css(d, "marginTop", !0)
                    , left: b.left - c.left - ia.css(d, "marginLeft", !0)
                }
            }
        }
        , offsetParent: function () {
            return this.map(function () {
                for (var a = this.offsetParent || W.documentElement; a && !ia.nodeName(a, "html") && "static" === ia.css(a, "position");) a = a.offsetParent;
                return a || W.documentElement
            })
        }
    }), ia.each({
        scrollLeft: "pageXOffset"
        , scrollTop: "pageYOffset"
    }, function (a, c) {
        var d = /Y/.test(c);
        ia.fn[a] = function (e) {
            return ia.access(this, function (a, e, f) {
                var g = S(a);
                return f === b ? g ? c in g ? g[c] : g.document.documentElement[e] : a[e] : void(g ? g.scrollTo(d ? ia(g)
                    .scrollLeft() : f, d ? f : ia(g)
                    .scrollTop()) : a[e] = f)
            }, a, e, arguments.length, null)
        }
    }), ia.each({
        Height: "height"
        , Width: "width"
    }, function (a, c) {
        ia.each({
            padding: "inner" + a
            , content: c
            , "": "outer" + a
        }, function (d, e) {
            ia.fn[e] = function (e, f) {
                var g = arguments.length && (d || "boolean" != typeof e)
                    , h = d || (e === !0 || f === !0 ? "margin" : "border");
                return ia.access(this, function (c, d, e) {
                    var f;
                    return ia.isWindow(c) ? c.document.documentElement["client" + a] : 9 === c.nodeType ? (f = c.documentElement, Math.max(c.body["scroll" + a], f["scroll" + a], c.body["offset" + a], f["offset" + a], f["client" + a])) : e === b ? ia.css(c, d, h) : ia.style(c, d, e, h)
                }, c, g ? e : b, g, null)
            }
        })
    }), a.jQuery = a.$ = ia, "function" == typeof define && define.amd && define.amd.jQuery && define("jquery", [], function () {
        return ia
    })
}(window), CSXSWindowType._PANEL = "Panel", CSXSWindowType._MODELESS = "Modeless", CSXSWindowType._MODAL_DIALOG = "ModalDialog", EvalScript_ErrMessage = "EvalScript error.", Version.MAX_NUM = 999999999, CSEvent.prototype.data = "", SystemPath.USER_DATA = "userData", SystemPath.COMMON_FILES = "commonFiles", SystemPath.MY_DOCUMENTS = "myDocuments", SystemPath.APPLICATION = "application", SystemPath.EXTENSION = "extension", SystemPath.HOST_APPLICATION = "hostApplication", ColorType.RGB = "rgb", ColorType.GRADIENT = "gradient", ColorType.NONE = "none", CSInterface.THEME_COLOR_CHANGED_EVENT = "com.adobe.csxs.events.ThemeColorChanged", CSInterface.prototype.hostEnvironment = JSON.parse(window.__adobe_cep__.getHostEnvironment()), CSInterface.prototype.getHostEnvironment = function () {
    return this.hostEnvironment = JSON.parse(window.__adobe_cep__.getHostEnvironment()), this.hostEnvironment
}, CSInterface.prototype.closeExtension = function () {
    window.__adobe_cep__.closeExtension()
}, CSInterface.prototype.getSystemPath = function (a) {
    var b = decodeURI(window.__adobe_cep__.getSystemPath(a))
        , c = this.getOSInformation();
    return c.indexOf("Windows") >= 0 ? b = b.replace("file:///", "") : c.indexOf("Mac") >= 0 && (b = b.replace("file://", "")), b
}, CSInterface.prototype.evalScript = function (a, b) {
    null != b && void 0 != b || (b = function (a) {}), window.__adobe_cep__.evalScript(a, b)
}, CSInterface.prototype.getApplicationID = function () {
    var a = this.hostEnvironment.appId;
    return a
}, CSInterface.prototype.getHostCapabilities = function () {
    var a = JSON.parse(window.__adobe_cep__.getHostCapabilities());
    return a
}, CSInterface.prototype.dispatchEvent = function (a) {
    "object" == typeof a.data && (a.data = JSON.stringify(a.data)), window.__adobe_cep__.dispatchEvent(a)
}, CSInterface.prototype.addEventListener = function (a, b, c) {
    window.__adobe_cep__.addEventListener(a, b, c)
}, CSInterface.prototype.removeEventListener = function (a, b, c) {
    window.__adobe_cep__.removeEventListener(a, b, c)
}, CSInterface.prototype.requestOpenExtension = function (a, b) {
    window.__adobe_cep__.requestOpenExtension(a, b)
}, CSInterface.prototype.getExtensions = function (a) {
    var b = JSON.stringify(a)
        , c = window.__adobe_cep__.getExtensions(b)
        , d = JSON.parse(c);
    return d
}, CSInterface.prototype.getNetworkPreferences = function () {
    var a = window.__adobe_cep__.getNetworkPreferences()
        , b = JSON.parse(a);
    return b
}, CSInterface.prototype.initResourceBundle = function () {
    for (var a = JSON.parse(window.__adobe_cep__.initResourceBundle()), b = document.querySelectorAll("[data-locale]"), c = 0; c < b.length; c++) {
        var d = b[c]
            , e = d.getAttribute("data-locale");
        if (e)
            for (var f in a)
                if (0 == f.indexOf(e)) {
                    var g = a[f];
                    if (-1 == f.indexOf(".")) d.innerHTML = g;
                    else {
                        var h = f.substring(f.indexOf(".") + 1);
                        d[h] = g
                    }
                }
    }
    return a
}, CSInterface.prototype.dumpInstallationInfo = function () {
    return window.__adobe_cep__.dumpInstallationInfo()
}, CSInterface.prototype.getOSInformation = function () {
    var a = navigator.userAgent;
    if ("Win32" == navigator.platform || "Windows" == navigator.platform) {
        var b = "Windows platform";
        a.indexOf("Windows NT 5.0") > -1 ? b = "Windows 2000" : a.indexOf("Windows NT 5.1") > -1 ? b = "Windows XP" : a.indexOf("Windows NT 5.2") > -1 ? b = "Windows Server 2003" : a.indexOf("Windows NT 6.0") > -1 ? b = "Windows Vista" : a.indexOf("Windows NT 6.1") > -1 ? b = "Windows 7" : a.indexOf("Windows NT 6.2") > -1 && (b = "Windows 8");
        var c = "32-bit";
        return a.indexOf("WOW64") > -1 && (c = "64-bit"), b + " " + c
    }
    if ("MacIntel" == navigator.platform || "Macintosh" == navigator.platform) {
        var d = new String;
        d = a;
        var e = d.indexOf(")") - d.indexOf("Mac OS X")
            , f = d.substr(d.indexOf("Mac OS X"), e)
            , g = f.replace("_", ".");
        return g = g.replace("_", ".")
    }
    return "Unknown Operation System"
}, CSInterface.prototype.openURLInDefaultBrowser = function (a) {
    return cep.util.openURLInDefaultBrowser(a)
}, CSInterface.prototype.getExtensionID = function () {
    return window.__adobe_cep__.getExtensionId()
}, CSInterface.prototype.getScaleFactor = function () {
    return window.__adobe_cep__.getScaleFactor()
}, CSInterface.prototype.setScaleFactorChangedHandler = function (a) {
    window.__adobe_cep__.setScaleFactorChangedHandler(a)
}, CSInterface.prototype.getCurrentApiVersion = function () {
    var a = JSON.parse(window.__adobe_cep__.getCurrentApiVersion());
    return a
};
var WaveSurfer = {
    defaultParams: {
        height: 128
        , waveColor: "#999"
        , progressColor: "#555"
        , cursorColor: "#333"
        , cursorWidth: 1
        , skipLength: 2
        , minPxPerSec: 20
        , pixelRatio: window.devicePixelRatio
        , fillParent: !0
        , scrollParent: !1
        , hideScrollbar: !1
        , normalize: !1
        , audioContext: null
        , container: null
        , dragSelection: !0
        , loopSelection: !0
        , audioRate: 1
        , interact: !0
        , splitChannels: !1
        , renderer: "Canvas"
        , backend: "WebAudio"
        , mediaType: "audio"
    }
    , init: function (a) {
        if (this.params = WaveSurfer.util.extend({}, this.defaultParams, a), this.container = "string" == typeof a.container ? document.querySelector(this.params.container) : this.params.container, !this.container) throw new Error("Container element not found");
        if ("undefined" == typeof this.params.mediaContainer ? this.mediaContainer = this.container : "string" == typeof this.params.mediaContainer ? this.mediaContainer = document.querySelector(this.params.mediaContainer) : this.mediaContainer = this.params.mediaContainer, !this.mediaContainer) throw new Error("Media Container element not found");
        this.savedVolume = 0, this.isMuted = !1, this.tmpEvents = [], this.createDrawer(), this.createBackend()
    }
    , createDrawer: function () {
        var a = this;
        this.drawer = Object.create(WaveSurfer.Drawer[this.params.renderer]), this.drawer.init(this.container, this.params), this.drawer.on("redraw", function () {
            a.drawBuffer(), a.drawer.progress(a.backend.getPlayedPercents())
        }), this.drawer.on("click", function (b, c) {
            setTimeout(function () {
                a.seekTo(c)
            }, 0)
        }), this.drawer.on("scroll", function (b) {
            a.fireEvent("scroll", b)
        })
    }
    , createBackend: function () {
        var a = this;
        this.backend && this.backend.destroy(), "AudioElement" == this.params.backend && (this.params.backend = "MediaElement"), "WebAudio" != this.params.backend || WaveSurfer.WebAudio.supportsWebAudio() || (this.params.backend = "MediaElement"), this.backend = Object.create(WaveSurfer[this.params.backend]), this.backend.init(this.params), this.backend.on("finish", function () {
            a.fireEvent("finish")
        }), this.backend.on("audioprocess", function (b) {
            a.drawer.progress(a.backend.getPlayedPercents()), a.fireEvent("audioprocess", b)
        })
    }
    , getDuration: function () {
        return this.backend.getDuration()
    }
    , getCurrentTime: function () {
        return this.backend.getCurrentTime()
    }
    , play: function (a, b) {
        this.hasAudio() && (this.backend.play(a, b), this.fireEvent("play"))
    }
    , pause: function () {
        this.backend.pause(), this.fireEvent("pause")
    }
    , playPause: function () {
        this.backend.isPaused() ? this.play() : this.pause()
    }
    , skipBackward: function (a) {
        this.skip(-a || -this.params.skipLength)
    }
    , skipForward: function (a) {
        this.skip(a || this.params.skipLength)
    }
    , skip: function (a) {
        var b = this.getCurrentTime() || 0
            , c = this.getDuration() || 1;
        b = Math.max(0, Math.min(c, b + (a || 0))), this.seekAndCenter(b / c)
    }
    , seekAndCenter: function (a) {
        this.seekTo(a), this.drawer.recenter(a)
    }
    , seekTo: function (a) {
        var b = this.backend.isPaused()
            , c = this.params.scrollParent;
        b && (this.params.scrollParent = !1), this.backend.seekTo(a * this.getDuration()), this.drawer.progress(this.backend.getPlayedPercents()), b || (this.backend.pause(), this.backend.play()), this.params.scrollParent = c, this.fireEvent("seek", a)
    }
    , stop: function () {
        this.pause(), this.seekTo(0), this.drawer.progress(0)
    }
    , setVolume: function (a) {
        this.backend.setVolume(a)
    }
    , setPlaybackRate: function (a) {
        this.backend.setPlaybackRate(a)
    }
    , toggleMute: function () {
        this.isMuted ? (this.backend.setVolume(this.savedVolume), this.isMuted = !1) : (this.savedVolume = this.backend.getVolume(), this.backend.setVolume(0), this.isMuted = !0)
    }
    , toggleScroll: function () {
        this.params.scrollParent = !this.params.scrollParent, this.drawBuffer()
    }
    , toggleInteraction: function () {
        this.params.interact = !this.params.interact
    }
    , drawBuffer: function () {
        if (0 != this.getDuration()) {
            var a = Math.round(this.getDuration() * this.params.minPxPerSec * this.params.pixelRatio)
                , b = this.drawer.getWidth()
                , c = a;
            this.params.fillParent && (!this.params.scrollParent || b > a) && (c = b);
            var d = this.backend.getPeaks(c);
            this.drawer.drawPeaks(d, c), this.fireEvent("redraw", d, c)
        }
    }
    , loadArrayBuffer: function (a) {
        this.decodeArrayBuffer(a, function (a) {
            this.loadDecodedBuffer(a)
        }.bind(this))
    }
    , loadDecodedBuffer: function (a) {
        this.backend.load(a), this.drawBuffer(), this.fireEvent("ready")
    }
    , loadBlob: function (a) {
        var b = this
            , c = new FileReader;
        c.addEventListener("progress", function (a) {
            b.onProgress(a)
        }), c.addEventListener("load", function (a) {
            b.loadArrayBuffer(a.target.result)
        }), c.addEventListener("error", function () {
            b.fireEvent("error", "Error reading file")
        }), c.readAsArrayBuffer(a), this.empty()
    }
    , load: function (a, b) {
        switch (this.params.backend) {
        case "WebAudio":
            return this.loadBuffer(a);
        case "MediaElement":
            return this.loadMediaElement(a, b)
        }
    }
    , loadBuffer: function (a) {
        return this.empty(), this.getArrayBuffer(a, this.loadArrayBuffer.bind(this))
    }
    , loadMediaElement: function (a, b) {
        this.empty(), this.backend.load(a, this.mediaContainer, b), this.tmpEvents.push(this.backend.once("canplay", function () {
            this.drawBuffer(), this.fireEvent("ready")
        }.bind(this)), this.backend.once("error", function (a) {
            this.fireEvent("error", a)
        }.bind(this))), !b && this.backend.supportsWebAudio() && this.getArrayBuffer(a, function (a) {
            this.decodeArrayBuffer(a, function (a) {
                this.backend.buffer = a, this.drawBuffer()
            }.bind(this))
        }.bind(this))
    }
    , decodeArrayBuffer: function (a, b) {
        this.backend.decodeArrayBuffer(a, this.fireEvent.bind(this, "decoded"), this.fireEvent.bind(this, "error", "Error decoding audiobuffer")), this.tmpEvents.push(this.once("decoded", b))
    }
    , getArrayBuffer: function (a, b) {
        var c = this
            , d = WaveSurfer.util.ajax({
                url: a
                , responseType: "arraybuffer"
            });
        return this.tmpEvents.push(d.on("progress", function (a) {
            c.onProgress(a)
        }), d.on("success", b), d.on("error", function (a) {
            c.fireEvent("error", "XHR error: " + a.target.statusText)
        })), d
    }
    , onProgress: function (a) {
        if (a.lengthComputable) var b = a.loaded / a.total;
        else b = a.loaded / (a.loaded + 1e6);
        this.fireEvent("loading", Math.round(100 * b), a.target)
    }
    , exportPCM: function (a, b, c) {
        a = a || 1024, b = b || 1e4, c = c || !1;
        var d = this.backend.getPeaks(a, b)
            , e = [].map.call(d, function (a) {
                return Math.round(a * b) / b
            })
            , f = JSON.stringify(e);
        return c || window.open("data:application/json;charset=utf-8," + encodeURIComponent(f)), f
    }
    , clearTmpEvents: function () {
        this.tmpEvents.forEach(function (a) {
            a.un()
        })
    }
    , empty: function () {
        this.backend.isPaused() || (this.stop(), this.backend.disconnectSource()), this.clearTmpEvents(), this.drawer.progress(0), this.drawer.setWidth(0), this.drawer.drawPeaks({
            length: this.drawer.getWidth()
        }, 0)
    }
    , destroy: function () {
        this.fireEvent("destroy"), this.clearTmpEvents(), this.unAll(), this.backend.destroy(), this.drawer.destroy()
    }
    , hasAudio: function () {
        return this.backend.hasAudio()
    }
};
WaveSurfer.create = function (a) {
        var b = Object.create(WaveSurfer);
        return b.init(a), b
    }, WaveSurfer.util = {
        extend: function (a) {
            var b = Array.prototype.slice.call(arguments, 1);
            return b.forEach(function (b) {
                Object.keys(b)
                    .forEach(function (c) {
                        a[c] = b[c]
                    })
            }), a
        }
        , getId: function () {
            return "wavesurfer_" + Math.random()
                .toString(32)
                .substring(2)
        }
        , ajax: function (a) {
            var b = Object.create(WaveSurfer.Observer)
                , c = new XMLHttpRequest
                , d = !1;
            return c.open(a.method || "GET", a.url, !0), c.responseType = a.responseType || "json", c.addEventListener("progress", function (a) {
                b.fireEvent("progress", a), a.lengthComputable && a.loaded == a.total && (d = !0)
            }), c.addEventListener("load", function (a) {
                d || b.fireEvent("progress", a), b.fireEvent("load", a), 200 == c.status || 206 == c.status ? b.fireEvent("success", c.response, a) : b.fireEvent("error", a)
            }), c.addEventListener("error", function (a) {
                b.fireEvent("error", a)
            }), c.send(), b.xhr = c, b
        }
    }, WaveSurfer.Observer = {
        on: function (a, b) {
            this.handlers || (this.handlers = {});
            var c = this.handlers[a];
            return c || (c = this.handlers[a] = []), c.push(b), {
                name: a
                , callback: b
                , un: this.un.bind(this, a, b)
            }
        }
        , un: function (a, b) {
            if (this.handlers) {
                var c = this.handlers[a];
                if (c)
                    if (b)
                        for (var d = c.length - 1; d >= 0; d--) c[d] == b && c.splice(d, 1);
                    else c.length = 0
            }
        }
        , unAll: function () {
            this.handlers = null
        }
        , once: function (a, b) {
            var c = this
                , d = function () {
                    b.apply(this, arguments), setTimeout(function () {
                        c.un(a, d)
                    }, 0)
                };
            return this.on(a, d)
        }
        , fireEvent: function (a) {
            if (this.handlers) {
                var b = this.handlers[a]
                    , c = Array.prototype.slice.call(arguments, 1);
                b && b.forEach(function (a) {
                    a.apply(null, c)
                })
            }
        }
    }, WaveSurfer.util.extend(WaveSurfer, WaveSurfer.Observer), WaveSurfer.WebAudio = {
        scriptBufferSize: 256
        , PLAYING_STATE: 0
        , PAUSED_STATE: 1
        , FINISHED_STATE: 2
        , supportsWebAudio: function () {
            return !(!window.AudioContext && !window.webkitAudioContext)
        }
        , getAudioContext: function () {
            return WaveSurfer.WebAudio.audioContext || (WaveSurfer.WebAudio.audioContext = new(window.AudioContext || window.webkitAudioContext)), WaveSurfer.WebAudio.audioContext
        }
        , getOfflineAudioContext: function (a) {
            return WaveSurfer.WebAudio.offlineAudioContext || (WaveSurfer.WebAudio.offlineAudioContext = new(window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 2, a)), WaveSurfer.WebAudio.offlineAudioContext
        }
        , init: function (a) {
            this.params = a, this.ac = a.audioContext || this.getAudioContext(), this.lastPlay = this.ac.currentTime, this.startPosition = 0, this.scheduledPause = null, this.states = [Object.create(WaveSurfer.WebAudio.state.playing), Object.create(WaveSurfer.WebAudio.state.paused), Object.create(WaveSurfer.WebAudio.state.finished)], this.setState(this.PAUSED_STATE), this.createVolumeNode(), this.createScriptNode(), this.createAnalyserNode(), this.setPlaybackRate(this.params.audioRate)
        }
        , disconnectFilters: function () {
            this.filters && (this.filters.forEach(function (a) {
                a && a.disconnect()
            }), this.filters = null, this.analyser.connect(this.gainNode))
        }
        , setState: function (a) {
            this.state !== this.states[a] && (this.state = this.states[a], this.state.init.call(this))
        }
        , setFilter: function () {
            this.setFilters([].slice.call(arguments))
        }
        , setFilters: function (a) {
            this.disconnectFilters(), a && a.length && (this.filters = a, this.analyser.disconnect(), a.reduce(function (a, b) {
                    return a.connect(b), b
                }, this.analyser)
                .connect(this.gainNode))
        }
        , createScriptNode: function () {
            var a = this
                , b = this.scriptBufferSize;
            this.ac.createScriptProcessor ? this.scriptNode = this.ac.createScriptProcessor(b) : this.scriptNode = this.ac.createJavaScriptNode(b), this.scriptNode.connect(this.ac.destination), this.scriptNode.onaudioprocess = function () {
                var b = a.getCurrentTime();
                a.buffer && b >= a.getDuration() ? a.setState(a.FINISHED_STATE) : a.buffer && b >= a.scheduledPause ? a.setState(a.PAUSED_STATE) : a.state === a.states[a.PLAYING_STATE] && a.fireEvent("audioprocess", b)
            }
        }
        , createAnalyserNode: function () {
            this.analyser = this.ac.createAnalyser(), this.analyser.connect(this.gainNode)
        }
        , createVolumeNode: function () {
            this.ac.createGain ? this.gainNode = this.ac.createGain() : this.gainNode = this.ac.createGainNode(), this.gainNode.connect(this.ac.destination)
        }
        , setVolume: function (a) {
            this.gainNode.gain.value = a
        }
        , getVolume: function () {
            return this.gainNode.gain.value
        }
        , decodeArrayBuffer: function (a, b, c) {
            this.offlineAc || (this.offlineAc = this.getOfflineAudioContext(this.ac ? this.ac.sampleRate : 44100)), this.offlineAc.decodeAudioData(a, function (a) {
                b(a)
            }.bind(this), c)
        }
        , getPeaks: function (a) {
            for (var b = this.buffer.length / a, c = ~~(b / 10) || 1, d = this.buffer.numberOfChannels, e = [], f = [], g = 0; d > g; g++)
                for (var h = e[g] = [], i = this.buffer.getChannelData(g), j = 0; a > j; j++) {
                    for (var k = ~~(j * b), l = ~~(k + b), m = 0, n = k; l > n; n += c) {
                        var o = i[n];
                        o > m ? m = o : -o > m && (m = -o)
                    }
                    h[j] = m, (0 == g || m > f[j]) && (f[j] = m)
                }
            return this.params.splitChannels ? e : f
        }
        , getPlayedPercents: function () {
            return this.state.getPlayedPercents.call(this)
        }
        , disconnectSource: function () {
            this.source && this.source.disconnect()
        }
        , destroy: function () {
            this.isPaused() || this.pause(), this.unAll(), this.buffer = null, this.disconnectFilters(), this.disconnectSource(), this.gainNode.disconnect(), this.scriptNode.disconnect(), this.analyser.disconnect()
        }
        , load: function (a) {
            this.startPosition = 0, this.lastPlay = this.ac.currentTime, this.buffer = a, this.createSource()
        }
        , createSource: function () {
            this.disconnectSource(), this.source = this.ac.createBufferSource(), this.source.start = this.source.start || this.source.noteGrainOn, this.source.stop = this.source.stop || this.source.noteOff, this.source.playbackRate.value = this.playbackRate, this.source.buffer = this.buffer, this.source.connect(this.analyser)
        }
        , isPaused: function () {
            return this.state !== this.states[this.PLAYING_STATE]
        }
        , getDuration: function () {
            return this.buffer ? this.buffer.duration : 0
        }
        , seekTo: function (a, b) {
            return this.scheduledPause = null, null == a && (a = this.getCurrentTime(), a >= this.getDuration() && (a = 0)), null == b && (b = this.getDuration()), this.startPosition = a, this.lastPlay = this.ac.currentTime, this.state === this.states[this.FINISHED_STATE] && this.setState(this.PAUSED_STATE), {
                start: a
                , end: b
            }
        }
        , getPlayedTime: function () {
            return (this.ac.currentTime - this.lastPlay) * this.playbackRate
        }
        , play: function (a, b) {
            this.createSource();
            var c = this.seekTo(a, b);
            a = c.start, b = c.end, this.scheduledPause = b, this.source.start(0, a, b - a), this.setState(this.PLAYING_STATE)
        }
        , pause: function () {
            this.scheduledPause = null, this.startPosition += this.getPlayedTime(), this.source && this.source.stop(0), this.setState(this.PAUSED_STATE)
        }
        , getCurrentTime: function () {
            return this.state.getCurrentTime.call(this)
        }
        , setPlaybackRate: function (a) {
            a = a || 1, this.isPaused() ? this.playbackRate = a : (this.pause(), this.playbackRate = a, this.play())
        }
        , hasAudio: function () {
            return !!this.buffer
        }
    }, WaveSurfer.WebAudio.state = {}, WaveSurfer.WebAudio.state.playing = {
        init: function () {}
        , getPlayedPercents: function () {
            var a = this.getDuration();
            return this.getCurrentTime() / a || 0
        }
        , getCurrentTime: function () {
            return this.startPosition + this.getPlayedTime()
        }
    }, WaveSurfer.WebAudio.state.paused = {
        init: function () {}
        , getPlayedPercents: function () {
            var a = this.getDuration();
            return this.getCurrentTime() / a || 0
        }
        , getCurrentTime: function () {
            return this.startPosition
        }
    }, WaveSurfer.WebAudio.state.finished = {
        init: function () {
            this.fireEvent("finish")
        }
        , getPlayedPercents: function () {
            return 1
        }
        , getCurrentTime: function () {
            return this.getDuration()
        }
    }, WaveSurfer.util.extend(WaveSurfer.WebAudio, WaveSurfer.Observer), WaveSurfer.MediaElement = Object.create(WaveSurfer.WebAudio), WaveSurfer.util.extend(WaveSurfer.MediaElement, {
        init: function (a) {
            this.params = a, this.media = {
                currentTime: 0
                , duration: 0
                , paused: !0
                , playbackRate: 1
                , play: function () {}
                , pause: function () {}
            }, this.mediaType = a.mediaType.toLowerCase(), this.elementPosition = a.elementPosition
        }
        , load: function (a, b, c) {
            var d = this
                , e = document.createElement(this.mediaType);
            e.controls = !1, e.autoplay = !1, e.preload = "auto", e.src = a, e.addEventListener("error", function () {
                d.fireEvent("error", "Error loading media element")
            }), e.addEventListener("canplay", function () {
                d.fireEvent("canplay")
            }), e.addEventListener("ended", function () {
                d.fireEvent("finish")
            }), e.addEventListener("timeupdate", function () {
                d.fireEvent("audioprocess", d.getCurrentTime())
            });
            var f = b.querySelector(this.mediaType);
            f && b.removeChild(f), b.appendChild(e), this.media = e, this.peaks = c, this.onPlayEnd = null, this.buffer = null, this.setPlaybackRate(this.playbackRate)
        }
        , isPaused: function () {
            return this.media.paused
        }
        , getDuration: function () {
            var a = this.media.duration;
            return a >= 1 / 0 && (a = this.media.seekable.end()), a
        }
        , getCurrentTime: function () {
            return this.media.currentTime
        }
        , getPlayedPercents: function () {
            return this.getCurrentTime() / this.getDuration() || 0
        }
        , setPlaybackRate: function (a) {
            this.playbackRate = a || 1, this.media.playbackRate = this.playbackRate
        }
        , seekTo: function (a) {
            null != a && (this.media.currentTime = a), this.clearPlayEnd()
        }
        , play: function (a, b) {
            this.seekTo(a), this.media.play(), b && this.setPlayEnd(b)
        }
        , pause: function () {
            this.media.pause(), this.clearPlayEnd()
        }
        , setPlayEnd: function (a) {
            var b = this;
            this.onPlayEnd = function (c) {
                c >= a && (b.pause(), b.seekTo(a))
            }, this.on("audioprocess", this.onPlayEnd)
        }
        , clearPlayEnd: function () {
            this.onPlayEnd && (this.un("audioprocess", this.onPlayEnd), this.onPlayEnd = null)
        }
        , getPeaks: function (a) {
            return this.buffer ? WaveSurfer.WebAudio.getPeaks.call(this, a) : this.peaks || []
        }
        , getVolume: function () {
            return this.media.volume
        }
        , setVolume: function (a) {
            this.media.volume = a
        }
        , destroy: function () {
            this.pause(), this.unAll(), this.media.parentNode && this.media.parentNode.removeChild(this.media), this.media = null
        }
    }), WaveSurfer.AudioElement = WaveSurfer.MediaElement, WaveSurfer.Drawer = {
        init: function (a, b) {
            this.container = a, this.params = b, this.width = 0, this.height = b.height * this.params.pixelRatio, this.lastPos = 0, this.createWrapper(), this.createElements()
        }
        , createWrapper: function () {
            this.wrapper = this.container.appendChild(document.createElement("wave")), this.style(this.wrapper, {
                display: "block"
                , position: "relative"
                , userSelect: "none"
                , webkitUserSelect: "none"
                , height: this.params.height + "px"
            }), (this.params.fillParent || this.params.scrollParent) && this.style(this.wrapper, {
                width: "100%"
                , overflowX: this.params.hideScrollbar ? "hidden" : "auto"
                , overflowY: "hidden"
            }), this.setupWrapperEvents()
        }
        , handleEvent: function (a) {
            a.preventDefault();
            var b = this.wrapper.getBoundingClientRect();
            return (a.clientX - b.left + this.wrapper.scrollLeft) / this.wrapper.scrollWidth || 0
        }
        , setupWrapperEvents: function () {
            var a = this;
            this.wrapper.addEventListener("click", function (b) {
                var c = a.wrapper.offsetHeight - a.wrapper.clientHeight;
                if (0 != c) {
                    var d = a.wrapper.getBoundingClientRect();
                    if (b.clientY >= d.bottom - c) return
                }
                a.params.interact && a.fireEvent("click", b, a.handleEvent(b))
            }), this.wrapper.addEventListener("scroll", function (b) {
                a.fireEvent("scroll", b)
            })
        }
        , drawPeaks: function (a, b) {
            this.resetScroll(), this.setWidth(b), this.drawWave(a)
        }
        , style: function (a, b) {
            return Object.keys(b)
                .forEach(function (c) {
                    a.style[c] !== b[c] && (a.style[c] = b[c])
                }), a
        }
        , resetScroll: function () {
            null !== this.wrapper && (this.wrapper.scrollLeft = 0)
        }
        , recenter: function (a) {
            var b = this.wrapper.scrollWidth * a;
            this.recenterOnPosition(b, !0)
        }
        , recenterOnPosition: function (a, b) {
            var c = this.wrapper.scrollLeft
                , d = ~~(this.wrapper.clientWidth / 2)
                , e = a - d
                , f = e - c
                , g = this.wrapper.scrollWidth - this.wrapper.clientWidth;
            if (0 != g) {
                if (!b && f >= -d && d > f) {
                    var h = 5;
                    f = Math.max(-h, Math.min(h, f)), e = c + f
                }
                e = Math.max(0, Math.min(g - 4, e)), e != c && (this.wrapper.scrollLeft = e)
            }
        }
        , getWidth: function () {
            return Math.round(this.container.clientWidth * this.params.pixelRatio)
        }
        , setWidth: function (a) {
            a != this.width && (this.width = a, this.params.fillParent || this.params.scrollParent ? this.style(this.wrapper, {
                width: ""
            }) : this.style(this.wrapper, {
                width: ~~(this.width / this.params.pixelRatio) + "px"
            }), this.updateSize())
        }
        , setHeight: function (a) {
            a != this.height && (this.height = a, this.style(this.wrapper, {
                height: ~~(this.height / this.params.pixelRatio) + "px"
            }), this.updateSize())
        }
        , progress: function (a) {
            var b = 1 / this.params.pixelRatio
                , c = Math.round(a * this.width) * b;
            if (c < this.lastPos || c - this.lastPos >= b) {
                if (this.lastPos = c, this.params.scrollParent) {
                    var d = ~~(this.wrapper.scrollWidth * a);
                    this.recenterOnPosition(d)
                }
                this.updateProgress(a)
            }
        }
        , destroy: function () {
            this.unAll(), this.wrapper && (this.container.removeChild(this.wrapper), this.wrapper = null)
        }
        , createElements: function () {}
        , updateSize: function () {}
        , drawWave: function (a, b) {}
        , clearWave: function () {}
        , updateProgress: function (a) {}
    }, WaveSurfer.util.extend(WaveSurfer.Drawer, WaveSurfer.Observer), WaveSurfer.Drawer.Canvas = Object.create(WaveSurfer.Drawer), WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas, {
        createElements: function () {
            var a = this.wrapper.appendChild(this.style(document.createElement("canvas"), {
                position: "absolute"
                , zIndex: 1
                , top: 0
                , bottom: 0
            }));
            if (this.waveCc = a.getContext("2d"), this.progressWave = this.wrapper.appendChild(this.style(document.createElement("wave"), {
                    position: "absolute"
                    , zIndex: 2
                    , top: 0
                    , bottom: 0
                    , overflow: "hidden"
                    , width: "0"
                    , display: "none"
                    , boxSizing: "border-box"
                    , borderRightStyle: "solid"
                    , borderRightWidth: this.params.cursorWidth + "px"
                    , borderRightColor: this.params.cursorColor
                })), this.params.waveColor != this.params.progressColor) {
                var b = this.progressWave.appendChild(document.createElement("canvas"));
                this.progressCc = b.getContext("2d")
            }
        }
        , updateSize: function () {
            var a = Math.round(this.width / this.params.pixelRatio);
            this.waveCc.canvas.width = this.width, this.waveCc.canvas.height = this.height, this.style(this.waveCc.canvas, {
                width: a + "px"
            }), this.style(this.progressWave, {
                display: "block"
            }), this.progressCc && (this.progressCc.canvas.width = this.width, this.progressCc.canvas.height = this.height, this.style(this.progressCc.canvas, {
                width: a + "px"
            })), this.clearWave()
        }
        , clearWave: function () {
            this.waveCc.clearRect(0, 0, this.width, this.height), this.progressCc && this.progressCc.clearRect(0, 0, this.width, this.height)
        }
        , drawWave: function (a, b) {
            if (a[0] instanceof Array) {
                var c = a;
                if (this.params.splitChannels) return this.setHeight(c.length * this.params.height * this.params.pixelRatio), void c.forEach(this.drawWave, this);
                a = c[0]
            }
            var d = .5 / this.params.pixelRatio
                , e = this.params.height * this.params.pixelRatio
                , f = e * b || 0
                , g = e / 2
                , h = a.length
                , i = 1;
            this.params.fillParent && this.width != h && (i = this.width / h);
            var j = 1;
            this.params.normalize && (j = Math.max.apply(Math, a)), this.waveCc.fillStyle = this.params.waveColor, this.progressCc && (this.progressCc.fillStyle = this.params.progressColor), [this.waveCc, this.progressCc].forEach(function (b) {
                if (b) {
                    b.beginPath(), b.moveTo(d, g + f);
                    for (var c = 0; h > c; c++) {
                        var e = Math.round(a[c] / j * g);
                        b.lineTo(c * i + d, g + e + f)
                    }
                    b.lineTo(this.width + d, g + f), b.moveTo(d, g + f);
                    for (var c = 0; h > c; c++) {
                        var e = Math.round(a[c] / j * g);
                        b.lineTo(c * i + d, g - e + f)
                    }
                    b.lineTo(this.width + d, g + f), b.closePath(), b.fill(), b.fillRect(0, g + f - d, this.width, d)
                }
            }, this)
        }
        , updateProgress: function (a) {
            var b = Math.round(this.width * a) / this.params.pixelRatio;
            this.style(this.progressWave, {
                width: b + "px"
            })
        }
    })
    , function (a, b) {
        "function" == typeof define && define.amd ? define(["wavesurfer"], b) : a.WaveSurfer.Timeline = b(a.WaveSurfer)
    }(this, function (a) {
        "use strict";
        return a.Timeline = {
            init: function (a) {
                this.params = a;
                var b = this.wavesurfer = a.wavesurfer;
                if (!this.wavesurfer) throw Error("No WaveSurfer intance provided");
                var c = this.drawer = this.wavesurfer.drawer;
                if (this.container = "string" == typeof a.container ? document.querySelector(a.container) : a.container, !this.container) throw Error("No container for WaveSurfer timeline");
                this.width = c.width, this.height = this.params.height || 20, this.notchPercentHeight = this.params.notchPercentHeight || 90, this.primaryColor = this.params.primaryColor || "#000", this.secondaryColor = this.params.secondaryColor || "#c0c0c0", this.primaryFontColor = this.params.primaryFontColor || "#000", this.secondaryFontColor = this.params.secondaryFontColor || "#000", this.fontFamily = this.params.fontFamily || "Arial", this.fontSize = this.params.fontSize || 10, this.createWrapper(), this.createCanvas(), this.render(), b.drawer.wrapper.onscroll = this.updateScroll.bind(this), b.on("redraw", this.render.bind(this)), b.on("destroy", this.destroy.bind(this))
            }
            , destroy: function () {
                this.unAll(), this.wrapper && (this.wrapper.parentNode.removeChild(this.wrapper), this.wrapper = null)
            }
            , createWrapper: function () {
                var a = this.container.querySelector("timeline");
                a && this.container.removeChild(a);
                var b = this.wavesurfer.params;
                this.wrapper = this.container.appendChild(document.createElement("timeline")), this.drawer.style(this.wrapper, {
                    display: "block"
                    , position: "relative"
                    , userSelect: "none"
                    , webkitUserSelect: "none"
                    , height: this.height + "px"
                }), (b.fillParent || b.scrollParent) && this.drawer.style(this.wrapper, {
                    width: "100%"
                    , overflowX: "hidden"
                    , overflowY: "hidden"
                });
                var c = this;
                this.wrapper.addEventListener("click", function (a) {
                    a.preventDefault();
                    var b = "offsetX" in a ? a.offsetX : a.layerX;
                    c.fireEvent("click", b / c.wrapper.scrollWidth || 0)
                })
            }
            , createCanvas: function () {
                var a = this.canvas = this.wrapper.appendChild(document.createElement("canvas"));
                this.timeCc = a.getContext("2d"), this.wavesurfer.drawer.style(a, {
                    position: "absolute"
                    , zIndex: 4
                })
            }
            , render: function () {
                this.updateCanvasStyle(), this.drawTimeCanvas()
            }
            , updateCanvasStyle: function () {
                var a = this.drawer.wrapper.scrollWidth;
                this.canvas.width = a * this.wavesurfer.params.pixelRatio, this.canvas.height = this.height * this.wavesurfer.params.pixelRatio, this.canvas.style.width = a + "px", this.canvas.style.height = this.height + "px"
            }
            , drawTimeCanvas: function () {
                var a = this.wavesurfer.backend
                    , b = this.wavesurfer.params
                    , c = a.getDuration();
                if (b.fillParent && !b.scrollParent) var d = this.drawer.getWidth();
                else d = this.drawer.wrapper.scrollWidth * b.pixelRatio;
                var e = d / c;
                if (c > 0) {
                    var f = 0
                        , g = 0
                        , h = parseInt(c, 10) + 1
                        , i = function (a) {
                            if (a / 60 > 1) {
                                var b = parseInt(a / 60)
                                    , a = parseInt(a % 60);
                                return a = 10 > a ? "0" + a : a, "" + b + ":" + a
                            }
                            return a
                        };
                    if (1 * e >= 25) var j = 1
                        , k = 10
                        , l = 5;
                    else if (5 * e >= 25) var j = 5
                        , k = 6
                        , l = 2;
                    else if (15 * e >= 25) var j = 15
                        , k = 4
                        , l = 2;
                    else var j = 60
                        , k = 4
                        , l = 2;
                    for (var m = this.height - 4, n = this.height * (this.notchPercentHeight / 100) - 4, o = this.fontSize * b.pixelRatio, p = 0; h / j > p; p++) p % k == 0 ? (this.timeCc.fillStyle = this.primaryColor, this.timeCc.fillRect(f, 0, 1, m), this.timeCc.font = o + "px " + this.fontFamily, this.timeCc.fillStyle = this.primaryFontColor, this.timeCc.fillText(i(g), f + 5, m)) : p % l == 0 ? (this.timeCc.fillStyle = this.secondaryColor, this.timeCc.fillRect(f, 0, 1, m), this.timeCc.font = o + "px " + this.fontFamily, this.timeCc.fillStyle = this.secondaryFontColor, this.timeCc.fillText(i(g), f + 5, m)) : (this.timeCc.fillStyle = this.secondaryColor, this.timeCc.fillRect(f, 0, 1, n)), g += j, f += e * j
                }
            }
            , updateScroll: function () {
                this.wrapper.scrollLeft = this.drawer.wrapper.scrollLeft
            }
        }, a.util.extend(a.Timeline, a.Observer), a.Timeline
    }), WaveSurfer.Regions = {
        init: function (a) {
            this.wavesurfer = a, this.wrapper = this.wavesurfer.drawer.wrapper, this.list = {}
        }
        , add: function (a) {
            var b = Object.create(WaveSurfer.Region);
            return b.init(a, this.wavesurfer), this.list[b.id] = b, b.on("remove", function () {
                delete this.list[b.id]
            }.bind(this)), b
        }
        , clear: function () {
            Object.keys(this.list)
                .forEach(function (a) {
                    this.list[a].remove()
                }, this)
        }
        , enableDragSelection: function (a) {
            var b, c, d, e = this;
            this.wrapper.addEventListener("mousedown", function (a) {
                b = !0, c = e.wavesurfer.drawer.handleEvent(a), d = null
            }), this.wrapper.addEventListener("mouseup", function () {
                b = !1, d = null
            }), this.wrapper.addEventListener("mousemove", function (f) {
                if (b) {
                    d || (d = e.add(a || {}));
                    var g = e.wavesurfer.getDuration()
                        , h = e.wavesurfer.drawer.handleEvent(f);
                    d.update({
                        start: Math.min(h * g, c * g)
                        , end: Math.max(h * g, c * g)
                    })
                }
            })
        }
    }, WaveSurfer.Region = {
        style: WaveSurfer.Drawer.style
        , init: function (a, b) {
            this.wavesurfer = b, this.wrapper = b.drawer.wrapper, this.id = null == a.id ? WaveSurfer.util.getId() : a.id, this.start = Number(a.start) || 0, this.end = null == a.end ? this.start + 4 / this.wrapper.scrollWidth * this.wavesurfer.getDuration() : Number(a.end), this.resize = void 0 === a.resize ? !0 : Boolean(a.resize), this.drag = void 0 === a.drag ? !0 : Boolean(a.drag), this.loop = Boolean(a.loop), this.color = a.color || "rgba(0, 0, 0, 0.1)", this.data = a.data || {}, this.bindInOut(), this.render(), this.wavesurfer.fireEvent("region-created", this)
        }
        , update: function (a) {
            null != a.start && (this.start = Number(a.start)), null != a.end && (this.end = Number(a.end)), null != a.loop && (this.loop = Boolean(a.loop)), null != a.color && (this.color = a.color), null != a.data && (this.data = a.data), null != a.resize && (this.resize = Boolean(a.resize)), null != a.drag && (this.drag = Boolean(a.drag)), this.updateRender(), this.fireEvent("update"), this.wavesurfer.fireEvent("region-updated", this)
        }
        , remove: function (a) {
            this.element && (this.wrapper.removeChild(this.element), this.element = null, this.fireEvent("remove"), this.wavesurfer.fireEvent("region-removed", this))
        }
        , play: function () {
            this.wavesurfer.play(this.start, this.end), this.fireEvent("play"), this.wavesurfer.fireEvent("region-play", this)
        }
        , playLoop: function () {
            this.play(), this.once("out", this.playLoop.bind(this))
        }
        , render: function () {
            var a = document.createElement("region");
            a.className = "wavesurfer-region", a.title = this.formatTime(this.start, this.end);
            this.wrapper.scrollWidth;
            if (this.style(a, {
                    position: "absolute"
                    , zIndex: 2
                    , height: "100%"
                    , top: "0px"
                }), this.resize) {
                var b = a.appendChild(document.createElement("handle"))
                    , c = a.appendChild(document.createElement("handle"));
                b.className = "wavesurfer-handle wavesurfer-handle-start", c.className = "wavesurfer-handle wavesurfer-handle-end";
                var d = {
                    cursor: "col-resize"
                    , position: "absolute"
                    , left: "0px"
                    , top: "0px"
                    , width: "1%"
                    , maxWidth: "4px"
                    , height: "100%"
                };
                this.style(b, d), this.style(c, d), this.style(c, {
                    left: "100%"
                })
            }
            this.element = this.wrapper.appendChild(a), this.updateRender(), this.bindEvents(a)
        }
        , formatTime: function (a, b) {
            return (a == b ? [a] : [a, b])
                .map(function (a) {
                    return [Math.floor(a % 3600 / 60), ("00" + Math.floor(a % 60))
                        .slice(-2)
                    ].join(":")
                })
                .join("–")
        }
        , updateRender: function () {
            var a = this.wavesurfer.getDuration()
                , b = this.wrapper.scrollWidth;
            this.start < 0 && (this.start = 0, this.end = this.end - this.start), this.end > a && (this.end = a, this.start = a - (this.end - this.start)), this.style(this.element, {
                left: ~~(this.start / a * b) + "px"
                , width: ~~((this.end - this.start) / a * b) + "px"
                , backgroundColor: this.color
                , cursor: this.drag ? "move" : "default"
            }), this.element.title = this.formatTime(this.start, this.end)
        }
        , bindInOut: function () {
            var a = this
                , b = function () {
                    a.firedIn = !1, a.firedOut = !1
                }
                , c = function (b) {
                    !a.firedIn && a.start <= b && a.end > b && (a.firedIn = !0, a.fireEvent("in"), a.wavesurfer.fireEvent("region-in", a)), !a.firedOut && a.firedIn && a.end <= b && (a.firedOut = !0, a.fireEvent("out"), a.wavesurfer.fireEvent("region-out", a))
                };
            this.wavesurfer.on("play", b), this.wavesurfer.backend.on("audioprocess", c), this.on("remove", function () {
                a.wavesurfer.un("play", b), a.wavesurfer.backend.un("audioprocess", c)
            }), this.on("out", function () {
                a.loop && a.wavesurfer.play(a.start)
            })
        }
        , bindEvents: function () {
            var a = this;
            this.element.addEventListener("mouseenter", function (b) {
                a.fireEvent("mouseenter", b), a.wavesurfer.fireEvent("region-mouseenter", a, b)
            }), this.element.addEventListener("mouseleave", function (b) {
                a.fireEvent("mouseleave", b), a.wavesurfer.fireEvent("region-mouseleave", a, b)
            }), this.element.addEventListener("click", function (b) {
                b.preventDefault(), a.fireEvent("click", b), a.wavesurfer.fireEvent("region-click", a, b)
            }), this.element.addEventListener("dblclick", function (b) {
                b.stopPropagation(), b.preventDefault(), a.fireEvent("dblclick", b), a.wavesurfer.fireEvent("region-dblclick", a, b)
            }), (this.drag || this.resize) && function () {
                var b, c, d, e = a.wavesurfer.getDuration()
                    , f = function (f) {
                        f.stopPropagation(), d = a.wavesurfer.drawer.handleEvent(f) * e, "handle" == f.target.tagName.toLowerCase() ? c = f.target.classList.contains("wavesurfer-handle-start") ? "start" : "end" : b = !0
                    }
                    , g = function (d) {
                        (b || c) && (b = !1, c = !1, d.stopPropagation(), d.preventDefault(), a.fireEvent("update-end"), a.wavesurfer.fireEvent("region-update-end"))
                    }
                    , h = function (f) {
                        if (b || c) {
                            var g = a.wavesurfer.drawer.handleEvent(f) * e
                                , h = g - d;
                            d = g, a.drag && b && a.onDrag(h), a.resize && c && a.onResize(h, c)
                        }
                    };
                a.element.addEventListener("mousedown", f), a.wrapper.addEventListener("mousemove", h), document.body.addEventListener("mouseup", g), a.on("remove", function () {
                    document.body.removeEventListener("mouseup", g), a.wrapper.removeEventListener("mousemove", h)
                }), a.wavesurfer.on("destroy", function () {
                    document.body.removeEventListener("mouseup", g)
                })
            }()
        }
        , onDrag: function (a) {
            this.update({
                start: this.start + a
                , end: this.end + a
            })
        }
        , onResize: function (a, b) {
            "start" == b ? this.update({
                start: Math.min(this.start + a, this.end)
                , end: Math.max(this.start + a, this.end)
            }) : this.update({
                start: Math.min(this.end + a, this.start)
                , end: Math.max(this.end + a, this.start)
            })
        }
    }, WaveSurfer.util.extend(WaveSurfer.Region, WaveSurfer.Observer), WaveSurfer.initRegions = function () {
        this.regions || (this.regions = Object.create(WaveSurfer.Regions), this.regions.init(this))
    }, WaveSurfer.addRegion = function (a) {
        return this.initRegions(), this.regions.add(a)
    }, WaveSurfer.clearRegions = function () {
        this.regions && this.regions.clear()
    }, WaveSurfer.enableDragSelection = function (a) {
        this.initRegions(), this.regions.enableDragSelection(a)
    }, WaveSurfer.Minimap = WaveSurfer.util.extend({}, WaveSurfer.Drawer, WaveSurfer.Drawer.Canvas, {
        init: function (a, b) {
            this.wavesurfer = a, this.container = this.wavesurfer.drawer.container, this.lastPos = this.wavesurfer.drawer.lastPos, this.params = a.util.extend({}, this.wavesurfer.drawer.params, {
                showRegions: !1
                , showOverview: !1
                , overviewBorderColor: "green"
                , overviewBorderSize: 2
            }, b, {
                scrollParent: !1
                , fillParent: !0
            }), this.width = 0, this.height = this.params.height * this.params.pixelRatio, this.createWrapper(), this.createElements(), WaveSurfer.Regions && this.params.showRegions && this.regions(), this.bindWaveSurferEvents(), this.bindMinimapEvents()
        }
        , regions: function () {
            var a = this;
            this.regions = {}, this.wavesurfer.on("region-created", function (b) {
                a.regions[b.id] = b, a.renderRegions()
            }), this.wavesurfer.on("region-updated", function (b) {
                a.regions[b.id] = b, a.renderRegions()
            }), this.wavesurfer.on("region-removed", function (b) {
                delete a.regions[b.id], a.renderRegions()
            })
        }
        , renderRegions: function () {
            for (var a = this, b = this.wrapper.querySelectorAll("region"), c = 0; c < b.length; ++c) this.wrapper.removeChild(b[c]);
            Object.keys(this.regions)
                .forEach(function (b) {
                    var c = a.regions[b]
                        , d = a.width * ((c.end - c.start) / a.wavesurfer.getDuration())
                        , e = a.width * (c.start / a.wavesurfer.getDuration())
                        , f = a.style(document.createElement("region"), {
                            height: "inherit"
                            , backgroundColor: c.color
                            , width: d + "px"
                            , left: e + "px"
                            , display: "block"
                            , position: "absolute"
                        });
                    f.classList.add(b), a.wrapper.appendChild(f)
                })
        }
        , createElements: function () {
            WaveSurfer.Drawer.Canvas.createElements.call(this), this.params.showOverview && (this.overviewRegion = this.style(document.createElement("overview"), {
                height: this.wrapper.offsetHeight - 2 * this.params.overviewBorderSize + "px"
                , width: "0px"
                , display: "block"
                , position: "absolute"
                , cursor: "move"
                , border: this.params.overviewBorderSize + "px solid " + this.params.overviewBorderColor
                , zIndex: 2
                , opacity: this.params.overviewOpacity
            }), this.wrapper.appendChild(this.overviewRegion))
        }
        , bindWaveSurferEvents: function () {
            var a = this;
            this.wavesurfer.on("ready", this.render.bind(this)), this.wavesurfer.on("audioprocess", function (b) {
                a.progress(a.wavesurfer.backend.getPlayedPercents())
            }), this.wavesurfer.on("seek", function (b) {
                a.progress(a.wavesurfer.backend.getPlayedPercents())
            }), this.params.showOverview && (this.wavesurfer.on("scroll", function (b) {
                a.draggingOverview || a.moveOverviewRegion(b.target.scrollLeft / a.ratio)
            }), this.wavesurfer.drawer.wrapper.addEventListener("mouseover", function (b) {
                a.draggingOverview && (a.draggingOverview = !1)
            })), this.wavesurfer.on("destroy", this.destroy.bind(this))
        }
        , bindMinimapEvents: function () {
            var a = this
                , b = 0
                , c = !0
                , d = {
                    clientX: 0
                    , clientY: 0
                };
            this.on("click", function (a, b) {
                c ? (this.progress(b), this.wavesurfer.seekAndCenter(b)) : c = !0
            }.bind(this)), this.params.showOverview && (this.overviewRegion.addEventListener("mousedown", function (c) {
                a.draggingOverview = !0, b = c.layerX, d.clientX = c.clientX, d.clientY = c.clientY
            }), this.wrapper.addEventListener("mousemove", function (c) {
                a.draggingOverview && a.moveOverviewRegion(c.clientX - a.container.getBoundingClientRect()
                    .left - b)
            }), this.wrapper.addEventListener("mouseup", function (b) {
                d.clientX - b.clientX === 0 && d.clientX - b.clientX === 0 ? (c = !0, a.draggingOverview = !1) : a.draggingOverview && (c = !1, a.draggingOverview = !1)
            }))
        }
        , render: function () {
            if (0 != this.wavesurfer.getDuration()) {
                var a = this.getWidth()
                    , b = this.wavesurfer.backend.getPeaks(a);
                this.drawPeaks(b, a), this.params.showOverview && (this.ratio = this.wavesurfer.drawer.width / this.width, this.waveShowedWidth = this.wavesurfer.drawer.width / this.ratio, this.waveWidth = this.wavesurfer.drawer.width, this.overviewWidth = this.width / this.ratio, this.overviewPosition = 0, this.overviewRegion.style.width = this.overviewWidth - 2 * this.params.overviewBorderSize + "px")
            }
        }
        , moveOverviewRegion: function (a) {
            0 > a ? this.overviewPosition = 0 : a + this.overviewWidth < this.width ? this.overviewPosition = a : this.overviewPosition = this.width - this.overviewWidth, this.overviewRegion.style.left = this.overviewPosition + "px", this.wavesurfer.drawer.wrapper.scrollLeft = this.overviewPosition * this.ratio
        }
    }), WaveSurfer.initMinimap = function (a) {
        var b = Object.create(WaveSurfer.Minimap);
        return b.init(this, a), b
    };
var csInterface = new CSInterface;
beatEditClosure();
