var ssla

function buildSSLA () {
    ssla = function(t) {
        function e(r) {
            if (i[r])
                return i[r].exports;
            var n = i[r] = {
                exports: {},
                id: r,
                loaded: !1
            };
            return t[r].call(n.exports, n, n.exports, e),
            n.loaded = !0,
            n.exports
        }
        var i = {};
        return e.m = t,
        e.c = i,
        e.p = "",
        e(0)
    }([function(t, e, i) {
        "use strict";
        function r() {
            e.ssla.registerPlugin("scorm", u),
            e.ssla.start()
        }
        function n(t) {
            "next" === t ? u.loadScoByIndex(u.currentScoIndex + 1) : "previous" === t ? u.loadScoByIndex(u.currentScoIndex - 1) : "exit" === t && (window.location.href = "blank_unloading.htm")
        }
        function s(t) {
            u.loadScoByIdentifier(t)
        }
        function o() {
            u.endPreviousSco()
        }
        var a = i(1)
          , c = i(22);
        e.start = r,
        e.navigate = n,
        e.navigateByIdentifier = s,
        e.finish = o;
        var u = new a.Scorm2004Plugin;
        e.ssla = new c.SSLA
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(2)
          , s = i(6)
          , o = i(8);
        e.UrlVarService = o.UrlVarService;
        var a = i(9)
          , c = function(t) {
            function e() {
                t.apply(this, arguments),
                this.API = null,
                this.API_1484_11 = null
            }
            return r(e, t),
            e.prototype.initializeApi = function(t) {
                if ("1.2" === this.manifest.schemaVersionMain) {
                    var e = this.scosData.scos[t.identifier];
                    e.set("cmi.core.student_id", this.config.studentId()),
                    e.set("cmi.core.student_name", this.config.studentName()),
                    e.set("cmi.launch_data", t.dataFromLms),
                    e.set("cmi.student_data.mastery_score", t.masteryScore),
                    e.set("cmi.student_data.max_time_allowed", t.maxTimeAllowed),
                    e.set("cmi.student_data.time_limit_action", t.timeLimitAction),
                    e.set("cmi.core.credit", this.config.getCredit()),
                    e.set("cmi.core.mode", this.config.getMode()),
                    this.API = new n.Scorm12Api(t.identifier,this.scosData.scos[t.identifier],this.apiEvents,this.config),
                    this.API.addSaveCallback(this.storage.save, this.storage),
                    window.API = this.API
                } else if ("2004" === this.manifest.schemaVersionMain) {
                    var e = this.scosData.scos[t.identifier];
                    e.set("cmi.learner_id", this.config.studentId()),
                    e.set("cmi.learner_name", this.config.studentName()),
                    e.set("cmi.launch_data", t.dataFromLms),
                    e.set("cmi.max_time_allowed", t.maxTimeAllowed),
                    e.set("cmi.time_limit_action", t.timeLimitAction),
                    e.set("cmi.credit", this.config.getCredit()),
                    e.set("cmi.mode", this.config.getMode()),
                    this.API_1484_11 = new s.Scorm2004Api(t.identifier,this.scosData.scos[t.identifier],this.apiEvents,this.config),
                    this.API_1484_11.addSaveCallback(this.storage.save, this.storage),
                    window.API_1484_11 = this.API_1484_11
                } else
                    alert("Manifest schema version unrecognized: " + this.manifest.schemaVersionMain)
            }
            ,
            e.prototype.endPreviousSco = function() {
                this.currentSco && ("1.2" === this.manifest.schemaVersionMain ? this.API.LMSFinish("") : "2004" === this.manifest.schemaVersionMain && this.API_1484_11.Terminate(""))
            }
            ,
            e.prototype.initializeScosData = function() {
                var t;
                if ("1.2" === this.manifest.schemaVersionMain)
                    for (this.scosData = new n.AllScos12Data,
                    t = 0; t < this.manifest.scoInOrderTraversal.length; t++)
                        this.scosData.scos[this.manifest.scoInOrderTraversal[t].identifier] = new n.Sco12Data;
                else if ("2004" === this.manifest.schemaVersionMain)
                    for (this.scosData = new s.AllScos2004Data,
                    t = 0; t < this.manifest.scoInOrderTraversal.length; t++)
                        this.scosData.scos[this.manifest.scoInOrderTraversal[t].identifier] = new s.Sco2004Data
            }
            ,
            e
        }(a.ScormPlugin);
        e.Scorm2004Plugin = c
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(3)
          , s = i(5)
          , o = s.ScoVar
          , a = "false"
          , c = "true"
          , u = function(t) {
            function e() {
                t.apply(this, arguments),
                this.interactionCount = 0,
                this.objectiveCount = 0,
                this.interactionObjectiveCount = {},
                this.correctResponsesCount = {}
            }
            return r(e, t),
            e.prototype.fillDefaults = function() {
                this.data["cmi.core.lesson_status"] = new o("not attempted"),
                this.data["cmi.suspend_data"] = new o(""),
                this.data["cmi.core.lesson_location"] = new o(""),
                this.data["cmi.core.total_time"] = new o("0000:00:00"),
                this.data["cmi.core.entry"] = new o("ab-initio"),
                this.data["cmi.core.score.raw"] = new o(""),
                this.data["cmi.core.score.min"] = new o(""),
                this.data["cmi.core.score.max"] = new o(""),
                this.data["cmi.comments"] = new o(""),
                this.data["cmi.comments_from_lms"] = new o("No comment"),
                this.data["cmi.student_preference.audio"] = new o(""),
                this.data["cmi.student_preference.language"] = new o(""),
                this.data["cmi.student_preference.speed"] = new o(""),
                this.data["cmi.student_preference.text"] = new o(""),
                this.data["cmi.core.student_name"] = new o(""),
                this.data["cmi.core.student_id"] = new o(""),
                this.data["cmi.launch_data"] = new o(""),
                this.data["cmi.student_data.mastery_score"] = new o(""),
                this.data["cmi.student_data.max_time_allowed"] = new o(""),
                this.data["cmi.student_data.time_limit_action"] = new o(""),
                this.data["cmi.core.credit"] = new o("credit"),
                this.data["cmi.core.lesson_mode"] = new o("normal")
            }
            ,
            e.prototype.getScore = function() {
                return this.data["cmi.core.score.raw"].get()
            }
            ,
            e.prototype.getStatus = function() {
                return this.data["cmi.core.lesson_status"].get()
            }
            ,
            e.prototype.populateMaxes = function() {
                var t, e;
                for (this.interactionCount = this.getMaxIndex("cmi.interactions.") + 1,
                this.updateInteractionCountDme(),
                this.objectiveCount = this.getMaxIndex("cmi.objectives.") + 1,
                this.updateObjectiveCountDme(),
                t = 0; t < this.interactionCount; t++)
                    e = "cmi.interactions." + t + ".objectives.",
                    this.interactionObjectiveCount[t] = this.getMaxIndex(e) + 1,
                    this.updateInteractionObjectiveCountDme(t);
                for (t = 0; t < this.interactionCount; t++)
                    e = "cmi.interactions." + t + ".correct_responses.",
                    this.correctResponsesCount[t] = this.getMaxIndex(e) + 1,
                    this.updateCorrectResponsesCountDme(t)
            }
            ,
            e.prototype.set = function(e, i) {
                t.prototype.set.call(this, e, i);
                var r = e.split(".");
                "interactions" === r[1] ? (this.interactionCount = Math.max(Number(r[2]) + 1, this.interactionCount),
                this.updateInteractionCountDme(),
                "objectives" === r[3] ? (this.interactionObjectiveCount[r[2]] = Math.max(Number(r[4]) + 1, this.interactionObjectiveCount[r[2]]),
                this.updateInteractionObjectiveCountDme(Number(r[2]))) : this.updateInteractionObjectiveCountDme(Number(r[2])),
                "correct_responses" === r[3] ? (this.correctResponsesCount[r[2]] = Math.max(Number(r[4]) + 1, this.correctResponsesCount[r[2]]),
                this.updateCorrectResponsesCountDme(Number(r[2]))) : this.updateCorrectResponsesCountDme(Number(r[2]))) : "objectives" === r[1] && (this.objectiveCount = Math.max(Number(r[2]) + 1, this.objectiveCount),
                this.updateObjectiveCountDme())
            }
            ,
            e.prototype.updateInteractionCountDme = function() {
                this.data["cmi.interactions._count"] = new o(this.interactionCount)
            }
            ,
            e.prototype.updateObjectiveCountDme = function() {
                this.data["cmi.objectives._count"] = new o(this.objectiveCount)
            }
            ,
            e.prototype.updateInteractionObjectiveCountDme = function(t) {
                this.interactionObjectiveCount[t] || (this.interactionObjectiveCount[t] = 0),
                this.data["cmi.interactions." + t + ".objectives._count"] = new o(this.interactionObjectiveCount[t])
            }
            ,
            e.prototype.updateCorrectResponsesCountDme = function(t) {
                this.correctResponsesCount[t] || (this.correctResponsesCount[t] = 0),
                this.data["cmi.interactions." + t + ".correct_responses._count"] = new o(this.correctResponsesCount[t])
            }
            ,
            e
        }(s.ScoData);
        e.Sco12Data = u;
        var l = function(t) {
            function e() {
                t.apply(this, arguments)
            }
            return r(e, t),
            e.prototype.makeNewScoData = function() {
                return new u
            }
            ,
            e
        }(s.AllScosData);
        e.AllScos12Data = l;
        var h = function() {
            function t(t, e, i, r) {
                this.error = "0",
                this.events = null,
                this.saveCallbacks = [],
                this.scoName = t,
                this.sco = e,
                this.dataModel = new n.Scorm12DataModel,
                this.events = i,
                this.config = r,
                this.sco.start = !1,
                this.sco.end = !1
            }
            return t.prototype.storeTime = function(t) {
                if (t) {
                    var e = t.split(":")
                      , i = this.sco.get("cmi.core.total_time")
                      , r = i.split(":")
                      , n = 0
                      , s = Number(r[2]) + Number(e[2]);
                    s > 60 && (n = Math.floor(s / 60),
                    s -= 60 * n);
                    var o = Number(r[1]) + Number(e[1]) + n;
                    n = 0,
                    o > 60 && (n = Math.floor(o / 60),
                    o -= 60 * n);
                    var a = Number(r[0]) + Number(e[0]) + n;
                    a > 9999 && (a = 9999);
                    var c = 2
                      , u = this.padTime(a.toString(), c)
                      , l = this.padTime(o.toString(), c);
                    (r[2].indexOf(".") > -1 || e[2].indexOf(".") > -1) && (c = 5);
                    var h = this.padTime(s.toString(), c)
                      , d = u + ":" + l + ":" + h;
                    this.sco.set("cmi.core.total_time", d)
                }
            }
            ,
            t.prototype.padTime = function(t, e) {
                var i = "0000";
                if ("" === t)
                    return i.substr(0, e);
                if (t.length < e) {
                    var r = e - t.length;
                    return t = i.substr(0, r) + t
                }
                return t
            }
            ,
            t.prototype.addSaveCallback = function(t, e) {
                this.saveCallbacks.push([t, e])
            }
            ,
            t.prototype.callSave = function(t, e) {
                var i;
                for (i = 0; i < this.saveCallbacks.length; i++)
                    this.saveCallbacks[i][0].call(this.saveCallbacks[i][1], "", {
                        eventType: t,
                        scoName: this.scoName,
                        sco: this.sco,
                        forceSync: e
                    })
            }
            ,
            t.prototype.initialize = function(t) {
                return "" !== t ? (this.error = "201",
                a) : this.sco.start ? (this.error = "101",
                a) : this.sco.end ? (this.error = "101",
                a) : (this.sco.start = !0,
                this.error = "0",
                c)
            }
            ,
            t.prototype.finish = function(t) {
                if ("" !== t)
                    return this.error = "201",
                    a;
                if (!this.sco.start)
                    return this.error = "301",
                    a;
                if (this.sco.end)
                    return this.error = "301",
                    a;
                var e = this.sco.get("cmi.student_data.mastery_score");
                if ("" !== e) {
                    var i = this.sco.get("cmi.core.score.raw");
                    "" !== i && (parseInt(i, 10) >= parseInt(e, 10) ? this.sco.set("cmi.core.lesson_status", "passed") : this.sco.set("cmi.core.lesson_status", "failed"))
                }
                var r = this.sco.get("cmi.core.session_time");
                return this.storeTime(r),
                "suspend" === this.sco.get("cmi.core.exit") ? this.sco.set("cmi.core.entry", "resume") : this.sco.set("cmi.core.entry", ""),
                this.sco.end = !0,
                this.error = "0",
                this.callSave("finish", !0),
                c
            }
            ,
            t.prototype.getValue = function(t) {
                if (!this.sco.start)
                    return this.error = "301",
                    "";
                if (this.sco.end)
                    return this.error = "301",
                    "";
                if (void 0 === t || null === t)
                    return this.error = "201",
                    a;
                t = String(t);
                var e = this.dataModel.matchElement(t);
                return e ? "W" === e.d ? (this.error = "404",
                "") : (this.error = "0",
                "Fixed" === e.t ? e.v : this.sco.get(t)) : (this.error = "201",
                "")
            }
            ,
            t.prototype.setValue = function(t, e) {
                if (!this.sco.start)
                    return this.error = "301",
                    a;
                if (this.sco.end)
                    return this.error = "301",
                    a;
                if (void 0 === t || null === t)
                    return this.error = "201",
                    a;
                t = String(t),
                void 0 !== e && null !== e || (e = ""),
                e = String(e);
                var i = this.dataModel.matchElement(t);
                if (!i)
                    return this.error = "201",
                    a;
                if ("R" === i.d)
                    return this.error = "403",
                    a;
                "cmi.comments" === t && (e = this.sco.get("cmi.comments") + e);
                var r, n = "" + e;
                if ("CMIDecimal" === i.t)
                    r = this.dataModel.validateDecimal(n, i.min, i.max);
                else if ("CMIFeedback" === i.t)
                    r = this.dataModel.validateFeedback(n);
                else if ("CMIIdentifier" === i.t)
                    r = this.dataModel.validateIdentifier(n);
                else if ("CMIInteger" === i.t)
                    r = this.dataModel.validateIntegerUnsigned(n, i.min, i.max);
                else if ("CMISInteger" === i.t)
                    r = this.dataModel.validateIntegerSigned(n, i.min, i.max);
                else if ("OneOf" === i.t)
                    r = this.dataModel.validateOneOf(i.c, n);
                else if ("CMIResult" === i.t)
                    r = this.dataModel.validateResult(n);
                else if ("CMIString" === i.t)
                    r = this.dataModel.validateString(n, i.l);
                else if ("CMITime" === i.t)
                    r = this.dataModel.validateTime(n);
                else {

                    if ("CMITimespan" !== i.t)
                        return console.log("Unrecognized data validation type.", i.t),
                        this.error = "101",
                        a;
                    r = this.dataModel.validateTimespan(n)
                }
                if (!r)
                    return this.error = "405",
                    a;
                var s = t.split(".");
                if ("interactions" === s[1]) {
                    if (Number(s[2]) > this.sco.interactionCount)
                        return this.error = "201",
                        a;
                    if ("objectives" === s[3] && Number(s[4]) > this.sco.interactionObjectiveCount[s[2]])
                        return this.error = "201",
                        a;
                    if ("correct_responses" === s[3] && Number(s[4]) > this.sco.correctResponsesCount[s[2]])
                        return this.error = "201",
                        a
                }
                return "objectives" === s[1] && Number(s[2]) > this.sco.objectiveCount ? (this.error = "201",
                a) : (this.error = "0",
                this.sco.set(t, n),
                "cmi.core.lesson_status" === t && this.events.statusChange.dispatch(n),
                this.config.saveDataOnSetValue() && this.callSave("setValue", !1),
                c)
            }
            ,
            t.prototype.commit = function(t) {
                return "" !== t ? (this.error = "201",
                a) : this.sco.start ? this.sco.end ? (this.error = "301",
                a) : (this.error = "0",
                this.config.saveDataOnCommit() && this.callSave("commit", !1),
                c) : (this.error = "301",
                a)
            }
            ,
            t.prototype.getLastError = function() {
                return this.error
            }
            ,
            t.prototype.getErrorString = function(t) {
                var e = {
                    0: "No error",
                    101: "General Exception",
                    201: "Invalid argument error",
                    202: "Element cannot have children",
                    203: "Element not an array.",
                    301: "Not initialized",
                    401: "Not implemented error",
                    402: "Invalid set value, element is a keyword",
                    403: "Element is read only",
                    404: "Element is write only",
                    405: "Incorrect Data Type"
                };
                return e[t] ? e[t] : ""
            }
            ,
            t.prototype.getDiagnostic = function(t) {
                return this.error
            }
            ,
            t.prototype.LMSInitialize = function(t) {
                var e;
                return this.events.preInitialize.dispatch("LMSInitialize", [t]),
                e = this.initialize(t),
                this.events.postInitialize.dispatch("LMSInitialize", [t], e, this.error),
                e
            }
            ,
            t.prototype.LMSFinish = function(t) {
                var e;
                return this.events.preFinish.dispatch("LMSFinish", [t]),
                e = this.finish(t),
                this.events.postFinish.dispatch("LMSFinish", [t], e, this.error),
                e
            }
            ,
            t.prototype.LMSGetValue = function(t) {
                var e;
                return this.events.preGetValue.dispatch("LMSGetValue", [t]),
                e = this.getValue(t),
                this.events.postGetValue.dispatch("LMSGetValue", [t], e, this.error),
                e
            }
            ,
            t.prototype.LMSSetValue = function(t, e) {
                var i;
                return this.events.preSetValue.dispatch("LMSSetValue", [t, e]),
                i = this.setValue(t, e),
                this.events.postSetValue.dispatch("LMSSetValue", [t, e], i, this.error),
                i
            }
            ,
            t.prototype.LMSCommit = function(t) {
                var e;
                return this.events.preCommit.dispatch("LMSCommit", [t]),
                e = this.commit(t),
                this.events.postCommit.dispatch("LMSCommit", [t], e, this.error),
                e
            }
            ,
            t.prototype.LMSGetLastError = function() {
                var t;
                return this.events.preGetLastError.dispatch("LMSGetLastError", []),
                t = this.getLastError(),
                this.events.postGetLastError.dispatch("LMSGetLastError", [], t, this.error),
                t
            }
            ,
            t.prototype.LMSGetErrorString = function(t) {
                var e;
                return this.events.preGetErrorString.dispatch("LMSGetErrorString", [t]),
                e = this.getErrorString(t),
                this.events.postGetLastError.dispatch("LMSGetErrorString", [t], e, this.error),
                e
            }
            ,
            t.prototype.LMSGetDiagnostic = function(t) {
                var e;
                return this.events.preGetDiagnostic.dispatch("LMSGetDiagnostic", [t]),
                e = this.getDiagnostic(t),
                this.events.postGetDiagnostic.dispatch("LMSGetDiagnostic", [t], e, this.error),
                e
            }
            ,
            t
        }();
        e.Scorm12Api = h
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(4)
          , s = function(t) {
            function e() {
                t.apply(this, arguments),
                this.statusChoices = ["passed", "completed", "failed", "incomplete", "browsed"],
                this.objStatusChoices = ["not attempted", "passed", "completed", "failed", "incomplete", "browsed"],
                this.validElements = {
                    "cmi.comments_from_lms": {
                        d: "R",
                        t: "CMIString",
                        l: 4096
                    },
                    "cmi.comments": {
                        d: "RW",
                        t: "CMIString",
                        l: 4096
                    },
                    "cmi.core._children": {
                        d: "R",
                        t: "Fixed",
                        v: "student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time"
                    },
                    "cmi.core.credit": {
                        d: "R",
                        t: "OneOf",
                        c: ["credit", "no-credit"]
                    },
                    "cmi.core.entry": {
                        d: "R",
                        t: "OneOf",
                        c: ["", "ab-initio", "resume"]
                    },
                    "cmi.core.exit": {
                        d: "W",
                        t: "OneOf",
                        c: ["", "time-out", "logout", "suspend"]
                    },
                    "cmi.core.lesson_location": {
                        d: "RW",
                        t: "CMIString",
                        l: 255
                    },
                    "cmi.core.lesson_mode": {
                        d: "R",
                        t: "OneOf",
                        c: ["browse", "normal", "review"]
                    },
                    "cmi.core.lesson_status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.statusChoices
                    },
                    "cmi.core.score._children": {
                        d: "R",
                        t: "Fixed",
                        v: "raw,min,max"
                    },
                    "cmi.core.score.max": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.core.score.min": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.core.score.raw": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.core.session_time": {
                        d: "W",
                        t: "CMITimespan"
                    },
                    "cmi.core.student_id": {
                        d: "R",
                        t: "CMIString",
                        l: 255
                    },
                    "cmi.core.student_name": {
                        d: "R",
                        t: "CMIString",
                        l: 255
                    },
                    "cmi.core.total_time": {
                        d: "R",
                        t: "CMITimespan"
                    },
                    "cmi.launch_data": {
                        d: "R",
                        t: "CMIString",
                        l: 4096
                    },
                    "cmi.student_data._children": {
                        d: "R",
                        t: "Fixed",
                        v: "mastery_score,max_time_allowed,time_limit_action"
                    },
                    "cmi.student_data.mastery_score": {
                        d: "R",
                        t: "Score"
                    },
                    "cmi.student_data.max_time_allowed": {
                        d: "R",
                        t: "CMITimespan"
                    },
                    "cmi.student_data.time_limit_action": {
                        d: "R",
                        t: "OneOf",
                        c: ["exit,message", "exit,no message", "continue,message", "continue,no message"]
                    },
                    "cmi.student_preference._children": {
                        d: "R",
                        t: "Fixed",
                        v: "audio,language,speed,text"
                    },
                    "cmi.student_preference.audio": {
                        d: "RW",
                        t: "CMISInteger",
                        min: -1,
                        max: 100
                    },
                    "cmi.student_preference.language": {
                        d: "RW",
                        t: "CMIString",
                        l: 255
                    },
                    "cmi.student_preference.speed": {
                        d: "RW",
                        t: "CMISInteger",
                        min: -100,
                        max: 100
                    },
                    "cmi.student_preference.text": {
                        d: "RW",
                        t: "CMISInteger",
                        min: -1,
                        max: 1
                    },
                    "cmi.suspend_data": {
                        d: "RW",
                        t: "CMIString",
                        l: 4096
                    },
                    "cmi.interactions._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id,objectives,time,type,correct_responses,weighting,student_response,result,latency"
                    },
                    "cmi.interactions._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi.objectives._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id,score,status"
                    },
                    "cmi.objectives._count": {
                        d: "R",
                        t: "CMIInteger"
                    }
                },
                this.validRegexElements = {
                    "cmi\\.interactions.\\d+\\.id": {
                        d: "W",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.interactions.\\d+\\.time": {
                        d: "W",
                        t: "CMITime"
                    },
                    "cmi\\.interactions.\\d+\\.type": {
                        d: "W",
                        t: "OneOf",
                        c: ["true-false", "choice", "fill-in", "matching", "performance", "sequencing", "likert", "numeric"]
                    },
                    "cmi\\.interactions.\\d+\\.weighting": {
                        d: "W",
                        t: "CMIDecimal"
                    },
                    "cmi\\.interactions.\\d+\\.student_response": {
                        d: "W",
                        t: "CMIFeedback"
                    },
                    "cmi\\.interactions.\\d+\\.result": {
                        d: "W",
                        t: "CMIResult"
                    },
                    "cmi\\.interactions.\\d+\\.latency": {
                        d: "W",
                        t: "CMITimespan"
                    },
                    "cmi\\.interactions.\\d+\\.objectives\\._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi\\.interactions.\\d+\\.objectives\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id"
                    },
                    "cmi\\.interactions.\\d+\\.objectives.\\d+\\.id": {
                        d: "W",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses\\._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "pattern"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses.\\d+\\.pattern": {
                        d: "W",
                        t: "CMIFeedback"
                    },
                    "cmi\\.objectives.\\d+\\.id": {
                        d: "RW",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.objectives.\\d+\\.score\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "raw,min,max"
                    },
                    "cmi\\.objectives.\\d+\\.score\\.raw": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.score\\.max": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.score\\.min": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.objStatusChoices
                    }
                }
            }
            return r(e, t),
            e.prototype.validateResult = function(t) {
                var e = t.match(/^correct$|^wrong$|^unanticipated$|^neutral$|^([0-9]{0,3})?(\.[0-9]{1,2})?$/);
                return !(!e || !e.length)
            }
            ,
            e.prototype.validateTime = function(t) {
                var e = t.match(/^([0-2]{1}[0-9]{1}):([0-5]{1}[0-9]{1}):([0-5]{1}[0-9]{1})(\.[0-9]{1,2})?$/);
                return !(!e || !e.length)
            }
            ,
            e.prototype.validateTimespan = function(t) {
                var e = t.match(/^([0-9]{2,4}):([0-9]{2}):([0-9]{2})(\.[0-9]{1,2})?$/);
                return !(!e || !e.length)
            }
            ,
            e
        }(n.ScormBaseDataModel);
        e.Scorm12DataModel = s
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t() {}
            return t.prototype.matchElement = function(t) {
                if (this.validElements[t])
                    return this.validElements[t];
                for (var e = Object.keys(this.validRegexElements), i = 0; i < e.length; i++)
                    if (t.match(new RegExp("^" + e[i] + "$")))
                        return this.validRegexElements[e[i]];
                return null
            }
            ,
            t.prototype.validateDecimal = function(t, e, i) {
                var r = parseInt(t, 10);
                return !isNaN(r) && (!(void 0 !== typeof e && r < e) && !(void 0 !== typeof i && r > i))
            }
            ,
            t.prototype.validateFeedback = function(t) {
                var e = t.match(/^.{0,255}/);
                return !(!e || !e.length)
            }
            ,
            t.prototype.validateIdentifier = function(t) {
                var e = t.match(/^\w{1,255}$/);
                return !(!e || !e.length)
            }
            ,
            t.prototype.validateIntegerSigned = function(t, e, i) {
                var r = parseInt(t, 10);
                return !isNaN(r) && (!(r <= -32768 || r >= 32768) && (!(void 0 !== typeof e && r < e) && !(void 0 !== typeof i && r > i)))
            }
            ,
            t.prototype.validateIntegerUnsigned = function(t, e, i) {
                var r = parseInt(t, 10);
                return !isNaN(r) && (!(r <= 0 || r >= 65536) && (!(void 0 !== typeof e && r < e) && !(void 0 !== typeof i && r > i)))
            }
            ,
            t.prototype.validateOneOf = function(t, e) {
                var i;
                for (i = 0; i < t.length; i++)
                    if (t[i] === e)
                        return !0;
                return !1
            }
            ,
            t.prototype.validateString = function(t, e) {
                return t.length <= e
            }
            ,
            t
        }();
        e.ScormBaseDataModel = i
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t(t) {
                void 0 === t && (t = ""),
                this._value = "",
                this.dirty = !1,
                this.wasSet = !1,
                this._value = t
            }
            return t.prototype.get = function() {
                return this._value
            }
            ,
            t.prototype.set = function(t) {
                void 0 !== t && null !== t || (t = ""),
                "number" != typeof t && (t = String(t)),
                this._value !== t && (this.dirty = !0),
                this._value = t,
                this.wasSet = !0
            }
            ,
            t.prototype.isDirty = function() {
                return this.dirty
            }
            ,
            t.prototype.isSet = function() {
                return this.wasSet
            }
            ,
            t
        }();
        e.ScoVar = i;
        var r = function() {
            function t() {
                this.start = !1,
                this.end = !1,
                this.dirty = !1,
                this.wasSet = !1,
                this.start = !1,
                this.end = !1,
                this.data = {},
                this.fillDefaults(),
                this.populateMaxes()
            }
            return t.prototype.fillDefaults = function() {}
            ,
            t.prototype.getMaxIndex = function(t) {
                var e, i, r, n = t.length, s = -1, o = this.keys();
                for (e = 0; e < o.length; e++)
                    o[e].substring(0, n) === t && (i = o[e].substring(n).split("."),
                    r = Number(i[0]),
                    isNaN(r) || (s = Math.max(r, s)));
                return s
            }
            ,
            t.prototype.exportData = function() {
                var t, e = {}, i = {
                    status: this.getStatus(),
                    score: this.getScore(),
                    sessionTime: "-1",
                    data: e
                };
                for (t in this.data)
                    this.data.hasOwnProperty(t) && (e[t] = this.data[t].get());
                return i
            }
            ,
            t.prototype.importData = function(t) {
                var e;
                for (e in t.data)
                    t.data.hasOwnProperty(e) && (this.data[e] = new i(t.data[e]));
                this.populateMaxes()
            }
            ,
            t.prototype.get = function(t) {
                return this.data[t] ? this.data[t].get() : ""
            }
            ,
            t.prototype.set = function(t, e) {
                this.data[t] || (this.data[t] = new i),
                this.data[t].set(e),
                this.dirty = this.dirty || this.data[t].isDirty(),
                this.wasSet = !0
            }
            ,
            t.prototype.isDirty = function() {
                return this.dirty
            }
            ,
            t.prototype.isSet = function() {
                return this.wasSet
            }
            ,
            t.prototype.keys = function() {
                return Object.keys(this.data)
            }
            ,
            t
        }();
        e.ScoData = r;
        var n = function() {
            function t() {
                this.scos = {},
                this.currentScoId = null
            }
            return t.prototype.exportData = function() {
                var t, e = {
                    status: "",
                    sessionTime: "",
                    currentSco: this.currentScoId,
                    scos: {}
                }, i = "", r = "";
                for (t in this.scos)
                    this.scos.hasOwnProperty(t) && (e.scos[t] = this.scos[t].exportData(),
                    r = this.scos[t].getStatus(),
                    "" !== r && ("" === i ? i = r : "passed" !== i && "completed" !== i || "failed" !== r && "incomplete" !== r && "not attempted" !== r || (i = r)));
                return e.status = i,
                e
            }
            ,
            t.prototype.importData = function(t) {
                var e;
                this.currentScoId = t.currentSco;
                for (e in t.scos)
                    t.scos.hasOwnProperty(e) && (this.scos[e] = this.makeNewScoData(),
                    this.scos[e].importData(t.scos[e]))
            }
            ,
            t
        }();
        e.AllScosData = n
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(7)
          , s = i(5)
          , o = s.ScoVar
          , a = "false"
          , c = "true"
          , u = function(t) {
            function e() {
                t.apply(this, arguments),
                this.interactionCount = 0,
                this.objectiveCount = 0,
                this.interactionObjectiveCount = {},
                this.correctResponsesCount = {}
            }
            return r(e, t),
            e.prototype.fillDefaults = function() {
                this.data["cmi.completion_status"] = new o("not attempted"),
                this.data["cmi.success_status"] = new o("unknown"),
                this.data["cmi.suspend_data"] = new o(""),
                this.data["cmi.location"] = new o(""),
                this.data["cmi.total_time"] = new o("0000:00:00"),
                this.data["cmi.entry"] = new o("ab-initio"),
                this.data["cmi.score.scaled"] = new o(""),
                this.data["cmi.score.raw"] = new o(""),
                this.data["cmi.score.min"] = new o(""),
                this.data["cmi.score.max"] = new o(""),
                this.data["cmi.learner_preference.audio_level"] = new o("0"),
                this.data["cmi.learner_preference.language"] = new o(""),
                this.data["cmi.learner_preference.delivery_speed"] = new o("0"),
                this.data["cmi.learner_preference.audio_captioning"] = new o("0"),
                this.data["cmi.learner_name"] = new o(""),
                this.data["cmi.learner_id"] = new o(""),
                this.data["cmi.launch_data"] = new o(""),
                this.data["cmi.max_time_allowed"] = new o(""),
                this.data["cmi.time_limit_action"] = new o(""),
                this.data["cmi.credit"] = new o("credit"),
                this.data["cmi.mode"] = new o("normal")
            }
            ,
            e.prototype.getScore = function() {
                var t = this.data["cmi.score.raw"].get();
                return "" === t && (t = this.data["cmi.score.scaled"].get()),
                t
            }
            ,
            e.prototype.getStatus = function() {
                var t = this.data["cmi.success_status"].get()
                  , e = this.data["cmi.completion_status"].get();
                return "incomplete" === e ? e : "passed" === t || "failed" === t ? t : e
            }
            ,
            e.prototype.populateMaxes = function() {
                var t, e;
                for (this.interactionCount = this.getMaxIndex("cmi.interactions.") + 1,
                this.updateInteractionCountDme(),
                this.objectiveCount = this.getMaxIndex("cmi.objectives.") + 1,
                this.updateObjectiveCountDme(),
                t = 0; t < this.interactionCount; t++)
                    e = "cmi.interactions." + t + ".objectives.",
                    this.interactionObjectiveCount[t] = this.getMaxIndex(e) + 1,
                    this.updateInteractionObjectiveCountDme(t);
                for (t = 0; t < this.interactionCount; t++)
                    e = "cmi.interactions." + t + ".correct_responses.",
                    this.correctResponsesCount[t] = this.getMaxIndex(e) + 1,
                    this.updateCorrectResponsesCountDme(t)
            }
            ,
            e.prototype.set = function(e, i) {
                t.prototype.set.call(this, e, i);
                var r = e.split(".");
                "interactions" === r[1] ? (this.interactionCount = Math.max(Number(r[2]) + 1, this.interactionCount),
                this.updateInteractionCountDme(),
                "objectives" === r[3] ? (this.interactionObjectiveCount[r[2]] = Math.max(Number(r[4]) + 1, this.interactionObjectiveCount[r[2]]),
                this.updateInteractionObjectiveCountDme(Number(r[2]))) : this.updateInteractionObjectiveCountDme(Number(r[2])),
                "correct_responses" === r[3] ? (this.correctResponsesCount[r[2]] = Math.max(Number(r[4]) + 1, this.correctResponsesCount[r[2]]),
                this.updateCorrectResponsesCountDme(Number(r[2]))) : this.updateCorrectResponsesCountDme(Number(r[2]))) : "objectives" === r[1] && (this.objectiveCount = Math.max(Number(r[2]) + 1, this.objectiveCount),
                this.updateObjectiveCountDme())
            }
            ,
            e.prototype.updateInteractionCountDme = function() {
                this.data["cmi.interactions._count"] = new o(this.interactionCount)
            }
            ,
            e.prototype.updateObjectiveCountDme = function() {
                this.data["cmi.objectives._count"] = new o(this.objectiveCount)
            }
            ,
            e.prototype.updateInteractionObjectiveCountDme = function(t) {
                this.interactionObjectiveCount[t] || (this.interactionObjectiveCount[t] = 0),
                this.data["cmi.interactions." + t + ".objectives._count"] = new o(this.interactionObjectiveCount[t])
            }
            ,
            e.prototype.updateCorrectResponsesCountDme = function(t) {
                this.correctResponsesCount[t] || (this.correctResponsesCount[t] = 0),
                this.data["cmi.interactions." + t + ".correct_responses._count"] = new o(this.correctResponsesCount[t])
            }
            ,
            e
        }(s.ScoData);
        e.Sco2004Data = u;
        var l = function(t) {
            function e() {
                t.apply(this, arguments)
            }
            return r(e, t),
            e.prototype.makeNewScoData = function() {
                return new u
            }
            ,
            e
        }(s.AllScosData);
        e.AllScos2004Data = l;
        var h = function() {
            function t(t, e, i, r) {
                this.error = "0",
                this.events = null,
                this.saveCallbacks = [],
                this.scoName = t,
                this.sco = e,
                this.dataModel = new n.Scorm2004DataModel,
                this.events = i,
                this.config = r,
                this.sco.start = !1,
                this.sco.end = !1
            }
            return t.prototype.storeTime = function(t) {
                if (t) {
                    var e = t.split(":")
                      , i = this.sco.get("cmi.total_time")
                      , r = i.split(":")
                      , n = 0
                      , s = Number(r[2]) + Number(e[2]);
                    s > 60 && (n = Math.floor(s / 60),
                    s -= 60 * n);
                    var o = Number(r[1]) + Number(e[1]) + n;
                    n = 0,
                    o > 60 && (n = Math.floor(o / 60),
                    o -= 60 * n);
                    var a = Number(r[0]) + Number(e[0]) + n;
                    a > 9999 && (a = 9999);
                    var c = 2
                      , u = this.padTime(a.toString(), c)
                      , l = this.padTime(o.toString(), c);
                    (r[2].indexOf(".") > -1 || e[2].indexOf(".") > -1) && (c = 5);
                    var h = this.padTime(s.toString(), c)
                      , d = u + ":" + l + ":" + h;
                    this.sco.set("cmi.total_time", d)
                }
            }
            ,
            t.prototype.padTime = function(t, e) {
                var i = "0000";
                if ("" === t)
                    return i.substr(0, e);
                if (t.length < e) {
                    var r = e - t.length;
                    return t = i.substr(0, r) + t
                }
                return t
            }
            ,
            t.prototype.addSaveCallback = function(t, e) {
                this.saveCallbacks.push([t, e])
            }
            ,
            t.prototype.callSave = function(t, e) {
                var i;
                for (i = 0; i < this.saveCallbacks.length; i++)
                    this.saveCallbacks[i][0].call(this.saveCallbacks[i][1], "", {
                        eventType: t,
                        scoName: this.scoName,
                        sco: this.sco,
                        forceSync: e
                    })
            }
            ,
            t.prototype.initialize = function(t) {
                return "" !== t ? (this.error = "201",
                a) : this.sco.end ? (this.error = "104",
                a) : this.sco.start ? (this.error = "103",
                a) : (this.sco.start = !0,
                this.error = "0",
                c)
            }
            ,
            t.prototype.finish = function(t) {
                if ("" !== t)
                    return this.error = "201",
                    a;
                if (!this.sco.start)
                    return this.error = "112",
                    a;
                if (this.sco.end)
                    return this.error = "113",
                    a;
                var e = this.sco.get("cmi.session_time");
                return this.storeTime(e),
                "suspend" === this.sco.get("cmi.exit") ? this.sco.set("cmi.entry", "resume") : this.sco.set("cmi.entry", ""),
                this.sco.end = !0,
                this.error = "0",
                this.callSave("finish", !0),
                c
            }
            ,
            t.prototype.getValue = function(t) {
                if (!this.sco.start)
                    return this.error = "122",
                    "";
                if (this.sco.end)
                    return this.error = "123",
                    "";
                if (void 0 === t || null === t)
                    return this.error = "301",
                    a;
                t = String(t);
                var e = this.dataModel.matchElement(t);
                return e ? "W" === e.d ? (this.error = "405",
                "") : (this.error = "0",
                "Fixed" === e.t ? e.v : this.sco.get(t)) : (this.error = "401",
                "")
            }
            ,
            t.prototype.setValue = function(t, e) {
                if (!this.sco.start)
                    return this.error = "132",
                    a;
                if (this.sco.end)
                    return this.error = "133",
                    a;
                if (void 0 === t || null === t)
                    return this.error = "351",
                    a;
                t = String(t),
                void 0 !== e && null !== e || (e = ""),
                e = String(e);
                var i = this.dataModel.matchElement(t);
                if (!i)
                    return this.error = "401",
                    a;
                if ("R" === i.d)
                    return this.error = "404",
                    a;
                var r, n = "" + e;
                if ("CMIDecimal" === i.t)
                    r = this.dataModel.validateDecimal(n, i.min, i.max);
                else if ("CMIFeedback" === i.t)
                    r = this.dataModel.validateFeedback(n);
                else if ("CMIIdentifier" === i.t)
                    r = this.dataModel.validateIdentifier(n);
                else if ("CMIInteger" === i.t)
                    r = this.dataModel.validateIntegerUnsigned(n, i.min, i.max);
                else if ("CMISInteger" === i.t)
                    r = this.dataModel.validateIntegerSigned(n, i.min, i.max);
                else if ("OneOf" === i.t)
                    r = this.dataModel.validateOneOf(i.c, n);
                else if ("CMIResult" === i.t)
                    r = this.dataModel.validateResult(n);
                else if ("CMIString" === i.t)
                    r = this.dataModel.validateString(n, i.l);
                else if ("CMITime" === i.t)
                    r = this.dataModel.validateTime(n);
                else {
                    if ("CMITimespan" !== i.t)
                        return console.log("Unrecognized data validation type.", i.t),
                        this.error = "351",
                        a;
                    r = this.dataModel.validateTimespan(n)
                }
                if (!r)
                    return this.error = "406",
                    a;
                var s = t.split(".");
                if ("interactions" === s[1]) {
                    if (Number(s[2]) > this.sco.interactionCount)
                        return this.error = "408",
                        a;
                    if ("objectives" === s[3] && Number(s[4]) > this.sco.interactionObjectiveCount[s[2]])
                        return this.error = "408",
                        a;
                    if ("correct_responses" === s[3] && Number(s[4]) > this.sco.correctResponsesCount[s[2]])
                        return this.error = "408",
                        a
                }
                return "objectives" === s[1] && Number(s[2]) > this.sco.objectiveCount ? (this.error = "408",
                a) : (this.error = "0",
                this.sco.set(t, n),
                "cmi.completion_status" !== t && "cmi.lesson_status" !== t || this.events.statusChange.dispatch(n),
                this.config.saveDataOnSetValue() && this.callSave("setValue", !1),
                c)
            }
            ,
            t.prototype.commit = function(t) {
                return "" !== t ? (this.error = "201",
                a) : this.sco.start ? this.sco.end ? (this.error = "143",
                a) : (this.error = "0",
                this.config.saveDataOnCommit() && this.callSave("commit", !1),
                c) : (this.error = "142",
                a)
            }
            ,
            t.prototype.getLastError = function() {
                return this.error
            }
            ,
            t.prototype.getErrorString = function(t) {
                var e = {
                    0: "No error",
                    101: "General Exception",
                    102: "General Initialization Failure",
                    103: "Already Initialized",
                    104: "Content Instance Terminated",
                    111: "General Termination Failure",
                    112: "Termination Before Initialization",
                    113: "Termination After Termination",
                    122: "Retrieve Data Before Initialization",
                    123: "Retrieve Data After Termination",
                    132: "Store Data Before Initialization",
                    133: "Store Data After Termination",
                    142: "Commit Before Initialization",
                    143: "Commit After Termination",
                    201: "General Argument Error",
                    301: "General Get Failure",
                    351: "General Set Failure",
                    391: "General Commit Failure",
                    401: "Undefined Data Model Element",
                    402: "Unimplemented Data Model Element",
                    403: "Data Model Element Value Not Initialized",
                    404: "Data Model Element Is Read Only",
                    405: "Data Model Element Is Write Only",
                    406: "Data Model Element Type Mismatch",
                    407: "Data Model Element Value Out Of Range",
                    408: "Data Model Dependency Not Established"
                };
                return e[t] ? e[t] : ""
            }
            ,
            t.prototype.getDiagnostic = function(t) {
                return this.error
            }
            ,
            t.prototype.Initialize = function(t) {
                var e;
                return this.events.preInitialize.dispatch("Initialize", [t]),
                e = this.initialize(t),
                this.events.postInitialize.dispatch("Initialize", [t], e, this.error),
                e
            }
            ,
            t.prototype.Terminate = function(t) {
                var e;
                return this.events.preFinish.dispatch("Terminate", [t]),
                e = this.finish(t),
                this.events.postFinish.dispatch("Terminate", [t], e, this.error),
                e
            }
            ,
            t.prototype.GetValue = function(t) {
                var e;
                return this.events.preGetValue.dispatch("GetValue", [t]),
                e = this.getValue(t),
                this.events.postGetValue.dispatch("GetValue", [t], e, this.error),
                e
            }
            ,
            t.prototype.SetValue = function(t, e) {
                var i;
                return this.events.preSetValue.dispatch("SetValue", [t, e]),
                i = this.setValue(t, e),
                this.events.postSetValue.dispatch("SetValue", [t, e], i, this.error),
                i
            }
            ,
            t.prototype.Commit = function(t) {
                var e;
                return this.events.preCommit.dispatch("Commit", [t]),
                e = this.commit(t),
                this.events.postCommit.dispatch("Commit", [t], e, this.error),
                e
            }
            ,
            t.prototype.GetLastError = function() {
                var t;
                return this.events.preGetLastError.dispatch("GetLastError", []),
                t = this.getLastError(),
                this.events.postGetLastError.dispatch("GetLastError", [], t, this.error),
                t
            }
            ,
            t.prototype.GetErrorString = function(t) {
                var e;
                return this.events.preGetErrorString.dispatch("GetErrorString", [t]),
                e = this.getErrorString(t),
                this.events.postGetLastError.dispatch("GetErrorString", [t], e, this.error),
                e
            }
            ,
            t.prototype.GetDiagnostic = function(t) {
                var e;
                return this.events.preGetDiagnostic.dispatch("GetDiagnostic", [t]),
                e = this.getDiagnostic(t),
                this.events.postGetDiagnostic.dispatch("GetDiagnostic", [t], e, this.error),
                e
            }
            ,
            t
        }();
        e.Scorm2004Api = h
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(4)
          , s = function(t) {
            function e() {
                t.apply(this, arguments),
                this.successStatusChoices = ["passed", "failed", "unknown"],
                this.completionStatusChoices = ["not attempted", "completed", "incomplete", "unknown"],
                this.validElements = {
                    "cmi._version": {
                        d: "R",
                        t: "Fixed",
                        v: "2004 4th Edition"
                    },
                    "cmi.completion_status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.completionStatusChoices
                    },
                    "cmi.completion_threshold": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 1
                    },
                    "cmi.credit": {
                        d: "R",
                        t: "OneOf",
                        c: ["credit", "no-credit"]
                    },
                    "cmi.entry": {
                        d: "R",
                        t: "OneOf",
                        c: ["", "ab-initio", "resume"]
                    },
                    "cmi.exit": {
                        d: "W",
                        t: "OneOf",
                        c: ["", "time-out", "logout", "suspend", "normal"]
                    },
                    "cmi.interactions._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description"
                    },
                    "cmi.interactions._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi.objectives._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id,score,success_status,completion_status,description,progress_measure"
                    },
                    "cmi.objectives._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi.launch_data": {
                        d: "R",
                        t: "CMIString",
                        l: 4e3
                    },
                    "cmi.learner_id": {
                        d: "R",
                        t: "CMIString",
                        l: 4e3
                    },
                    "cmi.learner_name": {
                        d: "R",
                        t: "CMIString",
                        l: 250
                    },
                    "cmi.learner_preference._children": {
                        d: "R",
                        t: "Fixed",
                        v: "audio_level,language,delivery_speed,audio_captioning"
                    },
                    "cmi.learner_preference.audio_level": {
                        d: "RW",
                        t: "CMIDecimal"
                    },
                    "cmi.learner_preference.language": {
                        d: "RW",
                        t: "CMIString",
                        l: 250
                    },
                    "cmi.learner_preference.delivery_speed": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0
                    },
                    "cmi.learner_preference.audio_captioning": {
                        d: "RW",
                        t: "OneOf",
                        c: ["-1", "0", "1"]
                    },
                    "cmi.location": {
                        d: "RW",
                        t: "CMIString",
                        l: 1e3
                    },
                    "cmi.max_time_allowed": {
                        d: "R",
                        t: "CMITimespan"
                    },
                    "cmi.mode": {
                        d: "R",
                        t: "OneOf",
                        c: ["browse", "normal", "review"]
                    },
                    "cmi.progress_measure": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 1
                    },
                    "cmi.scaled_passing_score": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: -1,
                        max: 1
                    },
                    "cmi.score._children": {
                        d: "R",
                        t: "Fixed",
                        v: "scaled,raw,min,max"
                    },
                    "cmi.score.scaled": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: -1,
                        max: 1
                    },
                    "cmi.score.max": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.score.min": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.score.raw": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi.session_time": {
                        d: "W",
                        t: "CMITimespan"
                    },
                    "cmi.success_status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.successStatusChoices
                    },
                    "cmi.suspend_data": {
                        d: "RW",
                        t: "CMIString",
                        l: 64e3
                    },
                    "cmi.time_limit_action": {
                        d: "R",
                        t: "OneOf",
                        c: ["exit,message", "exit,no message", "continue,message", "continue,no message"]
                    },
                    "cmi.total_time": {
                        d: "R",
                        t: "CMITimespan"
                    },
                    "cmi._children": {
                        d: "R",
                        t: "Fixed",
                        v: "_version,completion_status,completion_threshold,credit,entry,exit,interactions,objectives,launch_data,learner_id,learner_name,learner_preference,location,max_time_allowed,mode,progress_meausre,scaled_passing_score,score,session_time,success_status,suspend_data,time_limit_action,total_time"
                    },
                    "cmi.comments_from_learner._children": {
                        d: "R",
                        t: "Fixed",
                        v: "comment,location.timestamp"
                    },
                    "cmi.comments_from_learner._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi.comments_from_lms._children": {
                        d: "R",
                        t: "Fixed",
                        v: "comment,location.timestamp"
                    },
                    "cmi.comments_from_lms._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "adl.nav.request": {
                        d: "R",
                        t: "Fixed",
                        v: ""
                    },
                    "adl.nav.request_valid.continue": {
                        d: "R",
                        t: "Fixed",
                        v: "true"
                    },
                    "adl.nav.request_valid.previous": {
                        d: "R",
                        t: "Fixed",
                        v: "true"
                    }
                },
                this.validRegexElements = {
                    "cmi\\.comments_from_learner.\\d+\\.comment": {
                        d: "RW",
                        t: "CMIString",
                        l: 4e3
                    },
                    "cmi\\.comments_from_learner.\\d+\\.location": {
                        d: "RW",
                        t: "CMIString",
                        l: 250
                    },
                    "cmi\\.comments_from_learner.\\d+\\.timestamp": {
                        d: "RW",
                        t: "CMITimespan"
                    },
                    "cmi\\.comments_from_lms.\\d+\\.comment": {
                        d: "R",
                        t: "CMIString",
                        l: 4e3
                    },
                    "cmi\\.comments_from_lms.\\d+\\.location": {
                        d: "R",
                        t: "CMIString",
                        l: 250
                    },
                    "cmi\\.comments_from_lms.\\d+\\.timestamp": {
                        d: "R",
                        t: "CMITimespan"
                    },
                    "cmi\\.interactions.\\d+\\.id": {
                        d: "W",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.interactions.\\d+\\.type": {
                        d: "W",
                        t: "OneOf",
                        c: ["true-false", "choice", "fill-in", "long-fill-in", "matching", "performance", "sequencing", "likert", "numeric", "other"]
                    },
                    "cmi\\.interactions.\\d+\\.timestamp": {
                        d: "W",
                        t: "CMITime2004"
                    },
                    "cmi\\.interactions.\\d+\\.weighting": {
                        d: "W",
                        t: "CMIDecimal"
                    },
                    "cmi\\.interactions.\\d+\\.learner_response": {
                        d: "W",
                        t: "CMIFeedback"
                    },
                    "cmi\\.interactions.\\d+\\.result": {
                        d: "W",
                        t: "CMIResult"
                    },
                    "cmi\\.interactions.\\d+\\.latency": {
                        d: "W",
                        t: "CMITimespan"
                    },
                    "cmi\\.interactions.\\d+\\.description": {
                        d: "W",
                        t: "CMIString",
                        l: 250
                    },
                    "cmi\\.interactions.\\d+\\.objectives\\._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi\\.interactions.\\d+\\.objectives\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "id"
                    },
                    "cmi\\.interactions.\\d+\\.objectives.\\d+\\.id": {
                        d: "W",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses\\._count": {
                        d: "R",
                        t: "CMIInteger"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "pattern"
                    },
                    "cmi\\.interactions.\\d+\\.correct_responses.\\d+\\.pattern": {
                        d: "W",
                        t: "CMIFeedback"
                    },
                    "cmi\\.objectives.\\d+\\.id": {
                        d: "RW",
                        t: "CMIIdentifier"
                    },
                    "cmi\\.objectives.\\d+\\.score\\._children": {
                        d: "R",
                        t: "Fixed",
                        v: "scaled,raw,min,max"
                    },
                    "cmi\\.objectives.\\d+\\.score\\.scaled": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: -1,
                        max: 1
                    },
                    "cmi\\.objectives.\\d+\\.score\\.raw": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.score\\.max": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.score\\.min": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 100
                    },
                    "cmi\\.objectives.\\d+\\.success_status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.successStatusChoices
                    },
                    "cmi\\.objectives.\\d+\\.completion_status": {
                        d: "RW",
                        t: "OneOf",
                        c: this.completionStatusChoices
                    },
                    "cmi\\.objectives.\\d+\\.progress_measure": {
                        d: "RW",
                        t: "CMIDecimal",
                        min: 0,
                        max: 1
                    },
                    "cmi\\.objectives.\\d+\\.description": {
                        d: "RW",
                        t: "CMIString",
                        l: 250
                    },
                    "adl.nav.request_valid.choice\\..+": {
                        d: "R",
                        t: "Fixed",
                        v: "true"
                    }
                }
            }
            return r(e, t),
            e.prototype.validateResult = function(t) {
                var e = t.match(/^correct$|^incorrect$|^unanticipated$|^neutral$|^([0-9]{0,3})?(\.[0-9]{1,7})?$/);
                return !(!e || !e.length)
            }
            ,
            e.prototype.validateTime = function(t) {
                var e = t.match(/^([0-2]{1}[0-9]{1}):([0-5]{1}[0-9]{1}):([0-5]{1}[0-9]{1})(\.[0-9]{1,2})?$/);
                return !(!e || !e.length)
            }
            ,
            e.prototype.validateTimespan = function(t) {
                var e = t.match(/^([0-9]{2,4}):([0-9]{2}):([0-9]{2})(\.[0-9]{1,2})?$/);
                return !(!e || !e.length)
            }
            ,
            e
        }(n.ScormBaseDataModel);
        e.Scorm2004DataModel = s
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t() {}
            return t.get = function(e) {
                if (!t.parsed) {
                    //var i = window.location.search.substring(1)
                    var i = window.hLink
                      , r = void 0
                      , n = void 0;
                    for (t.parsed = {},
                    r = i.split("&"),
                    n = 0; n < r.length; n++) {
                        var s = r[n].split("=");
                        "" !== s[0] && (s.length > 1 ? t.parsed[decodeURIComponent(s[0])] = decodeURIComponent(s[1]) : t.parsed[decodeURIComponent(s[0])] = "")
                    }
                }
                return e in t.parsed ? t.parsed[e] : ""
            }
            ,
            t.parsed = null,
            t
        }();
        e.UrlVarService = i
    }
    , function(t, e, i) {
        "use strict";
        var r = this && this.__extends || function(t, e) {
            function i() {
                this.constructor = t
            }
            for (var r in e)
                e.hasOwnProperty(r) && (t[r] = e[r]);
            t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype,
            new i)
        }
          , n = i(10)
          , s = i(13)
          , o = i(14)
          , a = i(15)
          , c = i(17)
          , u = i(19)
          , l = i(11)
          , h = i(8);
        e.UrlVarService = h.UrlVarService;
        var d = i(20)
          , p = i(16)
          , m = i(21)
          , f = function(t) {
            function e() {
                t.call(this),
                this.apiEvents = null,
                this.config = null,
                this.currentScoIndex = 0,
                this.currentSco = null,
                this.scosData = null,
                this.toc = null,
                this.apiEvents = new c.SSLAApiEvents,
                this.apiEvents.statusChange.add(this.updateManifestSelectability, this),
                this.scormLog = new u.ScormLog(this.apiEvents)
            }
            return r(e, t),
            e.prototype.loadSco = function(t, e) {
                this.endPreviousSco(),
                this.updateManifestSelectability(),
                this.initializeApi(t),
                this.currentScoIndex = e,
                this.currentSco = t,
                this.toc.currentScoId = this.currentSco.identifier,
                this.scosData.currentScoId = this.currentSco.identifier;
                var i = this.manifest.scoLaunchUrl(t);
                d.openSco(s.join([this.config.courseDirectory(), i]), this.config),
                document.getElementById("prev").disabled = 0 === this.currentScoIndex,
                document.getElementById("next").disabled = this.manifest.navigableScoInOrderTraversal.length <= this.currentScoIndex + 1,
                this.apiEvents.statusChange.dispatch("")
            }
            ,
            e.prototype.loadScoByIndex = function(t) {
                if (!(t < 0 || this.manifest.navigableScoInOrderTraversal.length <= t)) {
                    var e = this.manifest.navigableScoInOrderTraversal[t];
                    this.loadSco(e, t)
                }
            }
            ,
            e.prototype.loadScoByIdentifier = function(t) {
                var e, i = this.manifest.scosByIdentifiers[t], r = -1;
                for (e = 0; e < this.manifest.navigableScoInOrderTraversal.length; e++)
                    if (this.manifest.navigableScoInOrderTraversal[e].identifier == i.identifier) {
                        r = e;
                        break
                    }
                r === -1 && alert("SCO not found."),
                this.loadSco(i, r)
            }
            ,
            e.prototype.clearManifestAiccScriptParsers = function() {
                for (var t = this.manifest.navigableScoInOrderTraversal, e = 0; e < t.length; e++) {
                    var i = t[e];
                    i.aiccScriptParser = null
                }
            }
            ,
            e.prototype.performLayoutUpdate = function() {
                null != this.config.layoutUpdater() ? this.config.layoutUpdater()(this) : this.standardLayoutUpdater()
            }
            ,
            e.prototype.setupNavigationType = function() {
                var t = this.config.navigationType()
                  , e = this.manifest.navigableScoInOrderTraversal;
                if ("" == t)
                    ;
                else if (this.clearManifestAiccScriptParsers(),
                "lockstep" == t)
                    for (var i = 1; i < e.length; i++) {
                        var r = e[i]
                          , n = new l.AiccScript;
                        n.parse(e[i - 1].identifier),
                        r.aiccScriptParser = n
                    }
                else if ("examaftercontent" == t) {
                    for (var r = e[e.length - 1], s = [], i = 0; i < e.length - 1; i++)
                        s.push(e[i].identifier);
                    var n = new l.AiccScript;
                    n.parse(s.join("&")),
                    r.aiccScriptParser = n
                } else if ("onlyonce" == t)
                    for (var i = 0; i < e.length; i++) {
                        var r = e[i]
                          , n = new l.AiccScript;
                        n.parse(r.identifier + "=n"),
                        r.aiccScriptParser = n
                    }
                else
                    alert("Unrecognized nagivationType: " + t)
            }
            ,
            e.prototype.standardLayoutUpdater = function() {
                if (1 == this.manifest.navigableScoInOrderTraversal.length) {
                    var t = document.body;
                    p.DomRender.removeClass(t, "hide-menu"),
                    p.DomRender.removeClass(t, "hide-toc"),
                    "HIDE_ALL" != this.config.singleScoView() && "HIDE_NAV_BUTTONS" != this.config.singleScoView() || p.DomRender.addClass(t, "hide-menu"),
                    "HIDE_ALL" != this.config.singleScoView() && "HIDE_TREE" != this.config.singleScoView() || p.DomRender.addClass(t, "hide-toc")
                }
            }
            ,
            e.prototype.updateManifestSelectability = function() {
                for (var t = 0; t < this.manifest.navigableScoInOrderTraversal.length; t++) {
                    var e = this.manifest.navigableScoInOrderTraversal[t];
                    null != e.aiccScriptParser && (e.isSelectable = e.aiccScriptParser.evaluate(null, this.scosData)),
                    this.toc.updateSelectability(e)
                }
            }
            ,
            e.prototype.onceLoaded = function() {
                var t;
                for (t in this.scosData.scos)
                    this.toc.updateActivityStatus(t, this.scosData.scos[t].getStatus());
                this.updateManifestSelectability(),
                this.config.returnToLastScoOnLaunch() && "" != this.scosData.currentScoId ? this.loadScoByIdentifier(this.scosData.currentScoId) : this.config.autoLaunchFirstSco() && this.loadScoByIndex(0),
                window.DATA = this.scosData
            }
            ,
            e.prototype.start = function() {
                var t, e, i, r = document.getElementById("frame-here");
                return r.innerHTML = '<iframe id="jca_course_player" name="jca_course_player" frameborder="0" width="100%" height="100%" ng-source="\'blank.htm\'" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>',
                this.manifest = new n.Manifest,
                (t = this.manifest.loadManifestFromXmlDom(this.ctd.scormContents)) ? (e = this.manifest.processManifest()) ? (this.setupNavigationType(),
                this.initializeScosData(),
                this.toc = new a.TableOfContents(this.config,this.apiEvents),
                i = this.toc.render(this.manifest.resourcesByIdentifierRef, this.manifest.itemTree),
                document.getElementById("toc").innerHTML = i,
                this.performLayoutUpdate(),
                this.config.storageAdapter() ? this.storage = new (this.config.storageAdapter())(this.config,this.scosData) : this.storage = new o.AllInOneStorage(this.config,this.scosData),
                void this.storage.load({
                    callback: this.onceLoaded.bind(this)
                })) : void alert("The manifest did not parse correctly.  Reason: " + this.manifest.lastError) : void alert("The manifest (imsmanifest.xml) was not found or is unavailable.  Please check your settings and try again.  Reason: " + this.manifest.lastError)
            }
            ,
            e
        }(m.SSLAPlugin);
        e.ScormPlugin = f
    }
    , function(t, e, i) {
        "use strict";
        var r = i(11)
          , n = function() {
            function t() {}
            return t
        }();
        e.Resource = n;
        var s = function() {
            function t() {
                this.isSelectable = !0,
                this.isVisible = !0,
                this.parameters = "",
                this.aiccScriptParser = null
            }
            return t
        }();
        e.ScoNavItem = s;
        var o = function() {
            function t() {}
            return t.prototype.checkManifestProperty = function(t, e) {
                var i;
                if (t.hasOwnProperty(e) && 1 === t[e].length)
                    return !0;
                for (i in t)
                    if (t.hasOwnProperty(i) && i.toLowerCase() === e.toLowerCase())
                        return 1 === t[i].length;
                return !1
            }
            ,
            t.prototype.getManifestProperty = function(t, e) {
                var i;
                if (t.hasOwnProperty(e) && 1 === t[e].length)
                    return "[object Object]" == Object.prototype.toString.call(t[e][0]) ? t[e][0]["#text"][0].replace(/^\s+|\s+$/gm, "") : t[e][0].replace(/^\s+|\s+$/gm, "");
                for (i in t)
                    if (t.hasOwnProperty(i) && i.toLowerCase() === e.toLowerCase())
                        return t[i][0].replace(/^\s+|\s+$/gm, "")
            }
            ,
            t.prototype.buildResources = function(t) {
                var e, i, r;
                if (this.resources = [],
                this.resourcesByIdentifierRef = {},
                t.length > 0 && t[0].hasOwnProperty("resource"))
                    for (e = 0; e < t[0].resource.length; e++)
                        i = t[0].resource[e],
                        r = {},
                        this.resources.push(r),
                        this.checkManifestProperty(i, "identifier") && (r.identifier = this.getManifestProperty(i, "identifier"),
                        this.resourcesByIdentifierRef[r.identifier] = r),
                        this.checkManifestProperty(i, "href") && (r.href = this.getManifestProperty(i, "href"))
            }
            ,
            t.prototype.isSco = function(t) {
                return !!t.identifierRef
            }
            ,
            t.prototype._buildScoTree = function(t) {
                var e, i = new s;
                if (this.checkManifestProperty(t, "identifier") && (i.identifier = this.getManifestProperty(t, "identifier"),
                this.scosByIdentifiers[i.identifier] = i),
                this.checkManifestProperty(t, "identifierref") && (i.identifierRef = this.getManifestProperty(t, "identifierref"),
                this.scosByIdentifierRefs[i.identifierRef] = i),
                this.checkManifestProperty(t, "title") && (i.title = this.getManifestProperty(t, "title")),
                this.checkManifestProperty(t, "isvisible") && (i.isVisible = "false" !== this.getManifestProperty(t, "isvisible")),
                this.checkManifestProperty(t, "adlcp:datafromlms") && (i.dataFromLms = this.getManifestProperty(t, "adlcp:datafromlms")),
                this.checkManifestProperty(t, "adlcp:masteryscore") && (i.masteryScore = this.getManifestProperty(t, "adlcp:masteryscore")),
                this.checkManifestProperty(t, "adlcp:timelimitaction") && (i.timeLimitAction = this.getManifestProperty(t, "adlcp:timelimitaction")),
                this.checkManifestProperty(t, "adlcp:maxtimeallowed") && (i.maxTimeAllowed = this.getManifestProperty(t, "adlcp:maxtimeallowed")),
                this.checkManifestProperty(t, "adlcp:prerequisites") && (i.prerequisites = this.getManifestProperty(t, "adlcp:prerequisites"),
                t.hasOwnProperty("adlcp:prerequisites") && 1 === t["adlcp:prerequisites"].length && "[object Object]" == Object.prototype.toString.call(t["adlcp:prerequisites"][0]) && t["adlcp:prerequisites"][0].hasOwnProperty("type") && "aicc_script" == t["adlcp:prerequisites"][0].type)) {
                    var n = new r.AiccScript
                      , o = n.parse(i.prerequisites);
                    o && (i.aiccScriptParser = n)
                }
                if (this.isSco(i) && (this.scoInOrderTraversal.push(i),
                i.isVisible && this.navigableScoInOrderTraversal.push(i),
                this.firstScoId || (this.firstScoId = i.identifier)),
                i.children = [],
                t.hasOwnProperty("item") && t.item.length > 0)
                    for (e = 0; e < t.item.length; e++)
                        i.children.push(this._buildScoTree(t.item[e]));
                return i
            }
            ,
            t.prototype.buildScoTree = function(t) {
                this.scosByIdentifiers = {},
                this.scosByIdentifierRefs = {},
                this.firstScoId = null,
                this.scoInOrderTraversal = [],
                this.navigableScoInOrderTraversal = [],
                this.itemTree = this._buildScoTree(t)
            }
            ,
            t.prototype.loadManifestFromXmlDom = function(t) {
                var e = new ParseXMLToObject.ParseXML;
                return e.setOutputArrayAll(),
                this.rawManifest = e.parseDocument(t.documentElement),
                !!this.rawManifest || (this.lastError = "Unable to load manifest.",
                !1)
            }
            ,
            t.prototype.processManifest = function() {
                var t = 0;
                if (this.processSchemaVersion(this.rawManifest),
                "1.2" !== this.schemaVersionMain && "2004" !== this.schemaVersionMain)
                    return this.lastError = "Unsupported schemaversion: " + this.schemaVersionMain,
                    !1;
                if (!this.rawManifest.hasOwnProperty("manifest") || 0 == this.rawManifest.manifest.length)
                    return this.lastError = "Invalid imsmanifest.xml, must be started with <manifest> tag",
                    !1;
                if (this.rawManifest.manifest[0].hasOwnProperty("organizations") && this.rawManifest.manifest[0].organizations.length > 0 && this.rawManifest.manifest[0].organizations[0].hasOwnProperty("organization")) {
                    if (t = this.rawManifest.manifest[0].organizations[0].organization.length,
                    t > 1)
                        return this.lastError = "imsmanifest.xml parser does not currently support more than 1 <organization>.",
                        !1;
                    if (1 != t)
                        return this.lastError = "imsmanifest.xml parser only found 0 <organization>s.",
                        !1;
                    this.buildScoTree(this.rawManifest.manifest[0].organizations[0].organization[0])
                }
                return this.rawManifest.manifest[0].hasOwnProperty("resources") && this.buildResources(this.rawManifest.manifest[0].resources),
                !0
            }
            ,
            t.prototype.scoLaunchUrl = function(t) {
                var e = this.resourcesByIdentifierRef[t.identifierRef].href;
                return "" !== t.parameters && (e += "?" + t.parameters),
                e
            }
            ,
            t.prototype.processSchemaVersion = function(t) {
                var e = this.findSchemaVersion(this.rawManifest);
                "1.2" == e ? this.schemaVersionMain = "1.2" : "CAM 1.3" === e ? (this.schemaVersionMain = "2004",
                this.schemaVersionSub = "2") : "2004 3rd Edition" === e ? (this.schemaVersionMain = "2004",
                this.schemaVersionSub = "3") : "2004 4th Edition" === e ? (this.schemaVersionMain = "2004",
                this.schemaVersionSub = "4") : this.traverseForProperty(this.rawManifest, "adlcp:scormtype") ? this.schemaVersionMain = "1.2" : this.traverseForProperty(this.rawManifest, "adlcp:scormType") && (this.schemaVersionMain = "2004",
                this.schemaVersionSub = "3")
            }
            ,
            t.prototype.traverseForProperty = function(t, e) {
                var i, r;
                for (var n in t)
                    if (t.hasOwnProperty(n)) {
                        if (n === e)
                            return t[n][0];
                        if ("[object Array]" === Object.prototype.toString.call(t[n])) {
                            for (i = 0; i < t[n].length; i++)
                                if (r = this.traverseForProperty(t[n][i], e))
                                    return r
                        } else if ("object" == typeof t[n] && (r = this.traverseForProperty(t[n], e)))
                            return r
                    }
                return null
            }
            ,
            t.prototype.findSchemaVersion = function(t) {
                var e, i;
                for (var r in t)
                    if (t.hasOwnProperty(r)) {
                        if ("schemaversion" === r.toLowerCase() && "[object Array]" === Object.prototype.toString.call(t[r]) && t[r].length > 0)
                            return t[r][0];
                        if ("[object Array]" === Object.prototype.toString.call(t[r])) {
                            for (e = 0; e < t[r].length; e++)
                                if (i = this.findSchemaVersion(t[r][e]))
                                    return i
                        } else if ("object" == typeof t[r] && (i = this.findSchemaVersion(t[r])))
                            return i
                    }
                return null
            }
            ,
            t
        }();
        e.Manifest = o
    }
    , function(t, e, i) {
        "use strict";
        var r = i(12)
          , n = function() {
            function t() {
                this.tree = null
            }
            return t.prototype.parse = function(t) {
                try {
                    this.tree = r.parse(t)
                } catch (t) {
                    return console.log("exception", t),
                    !1
                }
                return !0
            }
            ,
            t.prototype.lookupContext = function(t, e) {
                return t.scos[e] ? t.scos[e].getStatus() : (alert("Context unavailable for SCO: " + e),
                "")
            }
            ,
            t.prototype.evaluate = function(t, e) {
                if (null == t && (t = this.tree),
                "[object String]" == Object.prototype.toString.call(t)) {
                    var i = this.lookupContext(e, t);
                    return "passed" == i || "completed" == i
                }
                if ("&" == t.op)
                    return this.evaluate(t.left, e) && this.evaluate(t.right, e);
                if ("|" == t.op)
                    return this.evaluate(t.left, e) || this.evaluate(t.right, e);
                if ("=" == t.op)
                    return this.lookupContext(e, t.left) == t.right;
                if ("<>" == t.op)
                    return this.lookupContext(e, t.left) != t.right;
                if ("~" == t.op)
                    return !this.evaluate(t.left, e);
                if ("set" == t.op) {
                    for (var r = 0, n = 0; n < t.set.length; n++)
                        this.evaluate(t.set[n], e) && (r += 1);
                    return t.times ? r >= t.times : r == t.set.length
                }
                return alert("Unrecognized operator: " + t.op),
                !1
            }
            ,
            t
        }();
        e.AiccScript = n
    }
    , function(t, e) {
        t.exports = function() {
            "use strict";
            function t(t, e) {
                function i() {
                    this.constructor = t
                }
                i.prototype = e.prototype,
                t.prototype = new i
            }
            function e(t, i, r, n) {
                this.message = t,
                this.expected = i,
                this.found = r,
                this.location = n,
                this.name = "SyntaxError",
                "function" == typeof Error.captureStackTrace && Error.captureStackTrace(this, e)
            }
            function i(t) {
                function i() {
                    return t.substring(Bt, Ut)
                }
                function r(e) {
                    var i, r, n = $t[e];
                    if (n)
                        return n;
                    for (i = e - 1; !$t[i]; )
                        i--;
                    for (n = $t[i],
                    n = {
                        line: n.line,
                        column: n.column,
                        seenCR: n.seenCR
                    }; i < e; )
                        r = t.charAt(i),
                        "\n" === r ? (n.seenCR || n.line++,
                        n.column = 1,
                        n.seenCR = !1) : "\r" === r || "\u2028" === r || "\u2029" === r ? (n.line++,
                        n.column = 1,
                        n.seenCR = !0) : (n.column++,
                        n.seenCR = !1),
                        i++;
                    return $t[e] = n,
                    n
                }
                function n(t, e) {
                    var i = r(t)
                      , n = r(e);
                    return {
                        start: {
                            offset: t,
                            line: i.line,
                            column: i.column
                        },
                        end: {
                            offset: e,
                            line: n.line,
                            column: n.column
                        }
                    }
                }
                function s(t) {
                    Ut < qt || (Ut > qt && (qt = Ut,
                    Ht = []),
                    Ht.push(t))
                }
                function o(t, i, r, n) {
                    function s(t) {
                        var e = 1;
                        for (t.sort(function(t, e) {
                            return t.description < e.description ? -1 : t.description > e.description ? 1 : 0
                        }); e < t.length; )
                            t[e - 1] === t[e] ? t.splice(e, 1) : e++
                    }
                    function o(t, e) {
                        function i(t) {
                            function e(t) {
                                return t.charCodeAt(0).toString(16).toUpperCase()
                            }
                            return t.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(t) {
                                return "\\x0" + e(t)
                            }).replace(/[\x10-\x1F\x80-\xFF]/g, function(t) {
                                return "\\x" + e(t)
                            }).replace(/[\u0100-\u0FFF]/g, function(t) {
                                return "\\u0" + e(t)
                            }).replace(/[\u1000-\uFFFF]/g, function(t) {
                                return "\\u" + e(t)
                            })
                        }
                        var r, n, s, o = new Array(t.length);
                        for (s = 0; s < t.length; s++)
                            o[s] = t[s].description;
                        return r = t.length > 1 ? o.slice(0, -1).join(", ") + " or " + o[t.length - 1] : o[0],
                        n = e ? '"' + i(e) + '"' : "end of input",
                        "Expected " + r + " but " + n + " found."
                    }
                    return null !== i && s(i),
                    new e(null !== t ? t : o(i, r),i,r,n)
                }
                function a() {
                    var t;
                    return t = c()
                }
                function c() {
                    var t, e, i, r, n;
                    for (t = Ut,
                    e = [],
                    i = Ut,
                    r = u(),
                    r !== _ ? (n = S(),
                    n !== _ ? (r = [r, n],
                    i = r) : (Ut = i,
                    i = _)) : (Ut = i,
                    i = _); i !== _; )
                        e.push(i),
                        i = Ut,
                        r = u(),
                        r !== _ ? (n = S(),
                        n !== _ ? (r = [r, n],
                        i = r) : (Ut = i,
                        i = _)) : (Ut = i,
                        i = _);
                    return e !== _ ? (i = I(),
                    i !== _ ? (r = u(),
                    r !== _ ? (Bt = t,
                    e = R(e, r),
                    t = e) : (Ut = t,
                    t = _)) : (Ut = t,
                    t = _)) : (Ut = t,
                    t = _),
                    t
                }
                function u() {
                    var t;
                    return t = h(),
                    t === _ && (t = d(),
                    t === _ && (t = l(),
                    t === _ && (t = m(),
                    t === _ && (t = p(),
                    t === _ && (t = y()))))),
                    t
                }
                function l() {
                    var e, i, r, n, o, a;
                    return e = Ut,
                    40 === t.charCodeAt(Ut) ? (i = O,
                    Ut++) : (i = _,
                    0 === Xt && s(A)),
                    i !== _ ? (r = I(),
                    r !== _ ? (n = c(),
                    n !== _ ? (o = I(),
                    o !== _ ? (41 === t.charCodeAt(Ut) ? (a = E,
                    Ut++) : (a = _,
                    0 === Xt && s(j)),
                    a !== _ ? (Bt = e,
                    i = T(n),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function h() {
                    var e, i, r, n, o, a;
                    return e = Ut,
                    i = y(),
                    i !== _ ? (r = I(),
                    r !== _ ? (61 === t.charCodeAt(Ut) ? (n = P,
                    Ut++) : (n = _,
                    0 === Xt && s(L)),
                    n !== _ ? (o = I(),
                    o !== _ ? (a = C(),
                    a !== _ ? (Bt = e,
                    i = k(i, a),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function d() {
                    var e, i, r, n, o, a;
                    return e = Ut,
                    i = y(),
                    i !== _ ? (r = I(),
                    r !== _ ? (t.substr(Ut, 2) === V ? (n = V,
                    Ut += 2) : (n = _,
                    0 === Xt && s(F)),
                    n !== _ ? (o = I(),
                    o !== _ ? (a = C(),
                    a !== _ ? (Bt = e,
                    i = N(i, a),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function p() {
                    var e, i, r, n;
                    return e = Ut,
                    126 === t.charCodeAt(Ut) ? (i = W,
                    Ut++) : (i = _,
                    0 === Xt && s(G)),
                    i !== _ ? (r = I(),
                    r !== _ ? (n = u(),
                    n !== _ ? (Bt = e,
                    i = z(n),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function m() {
                    var t, e, i;
                    return t = Ut,
                    e = f(),
                    e === _ && (e = null),
                    e !== _ ? (i = v(),
                    i !== _ ? (Bt = t,
                    e = U(e, i),
                    t = e) : (Ut = t,
                    t = _)) : (Ut = t,
                    t = _),
                    t
                }
                function f() {
                    var e, i, r, n, o;
                    return e = Ut,
                    i = g(),
                    i !== _ ? (r = I(),
                    r !== _ ? (42 === t.charCodeAt(Ut) ? (n = B,
                    Ut++) : (n = _,
                    0 === Xt && s($)),
                    n !== _ ? (o = I(),
                    o !== _ ? (Bt = e,
                    i = q(i),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function v() {
                    var e, i, r, n, o, a, c, u, l, p;
                    if (e = Ut,
                    123 === t.charCodeAt(Ut) ? (i = H,
                    Ut++) : (i = _,
                    0 === Xt && s(X)),
                    i !== _)
                        if (r = I(),
                        r !== _)
                            if (n = h(),
                            n === _ && (n = d(),
                            n === _ && (n = y())),
                            n !== _)
                                if (o = I(),
                                o !== _) {
                                    for (a = [],
                                    c = Ut,
                                    44 === t.charCodeAt(Ut) ? (u = Z,
                                    Ut++) : (u = _,
                                    0 === Xt && s(Y)),
                                    u !== _ ? (l = I(),
                                    l !== _ ? (p = h(),
                                    p === _ && (p = d(),
                                    p === _ && (p = y())),
                                    p !== _ ? (u = [u, l, p],
                                    c = u) : (Ut = c,
                                    c = _)) : (Ut = c,
                                    c = _)) : (Ut = c,
                                    c = _); c !== _; )
                                        a.push(c),
                                        c = Ut,
                                        44 === t.charCodeAt(Ut) ? (u = Z,
                                        Ut++) : (u = _,
                                        0 === Xt && s(Y)),
                                        u !== _ ? (l = I(),
                                        l !== _ ? (p = h(),
                                        p === _ && (p = d(),
                                        p === _ && (p = y())),
                                        p !== _ ? (u = [u, l, p],
                                        c = u) : (Ut = c,
                                        c = _)) : (Ut = c,
                                        c = _)) : (Ut = c,
                                        c = _);
                                    a !== _ ? (c = I(),
                                    c !== _ ? (125 === t.charCodeAt(Ut) ? (u = J,
                                    Ut++) : (u = _,
                                    0 === Xt && s(K)),
                                    u !== _ ? (Bt = e,
                                    i = Q(n, a),
                                    e = i) : (Ut = e,
                                    e = _)) : (Ut = e,
                                    e = _)) : (Ut = e,
                                    e = _)
                                } else
                                    Ut = e,
                                    e = _;
                            else
                                Ut = e,
                                e = _;
                        else
                            Ut = e,
                            e = _;
                    else
                        Ut = e,
                        e = _;
                    return e
                }
                function g() {
                    var e, i, r;
                    if (e = Ut,
                    i = [],
                    tt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                    Ut++) : (r = _,
                    0 === Xt && s(et)),
                    r !== _)
                        for (; r !== _; )
                            i.push(r),
                            tt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                            Ut++) : (r = _,
                            0 === Xt && s(et));
                    else
                        i = _;
                    return i !== _ && (Bt = e,
                    i = it()),
                    e = i
                }
                function y() {
                    var e, i, r;
                    if (e = Ut,
                    i = [],
                    rt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                    Ut++) : (r = _,
                    0 === Xt && s(nt)),
                    r !== _)
                        for (; r !== _; )
                            i.push(r),
                            rt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                            Ut++) : (r = _,
                            0 === Xt && s(nt));
                    else
                        i = _;
                    return e = i !== _ ? t.substring(e, Ut) : i
                }
                function S() {
                    var e, i, r, n;
                    return e = Ut,
                    i = I(),
                    i !== _ ? (38 === t.charCodeAt(Ut) ? (r = st,
                    Ut++) : (r = _,
                    0 === Xt && s(ot)),
                    r === _ && (124 === t.charCodeAt(Ut) ? (r = at,
                    Ut++) : (r = _,
                    0 === Xt && s(ct))),
                    r !== _ ? (n = I(),
                    n !== _ ? (Bt = e,
                    i = ut(r),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e
                }
                function C() {
                    var e, i, r;
                    return e = Ut,
                    t.substr(Ut, 1).toLowerCase() === lt ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(ht)),
                    i !== _ ? (t.substr(Ut, 5).toLowerCase() === dt ? (r = t.substr(Ut, 5),
                    Ut += 5) : (r = _,
                    0 === Xt && s(pt)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = mt(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e === _ && (e = Ut,
                    t.substr(Ut, 1).toLowerCase() === ft ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(vt)),
                    i !== _ ? (t.substr(Ut, 8).toLowerCase() === gt ? (r = t.substr(Ut, 8),
                    Ut += 8) : (r = _,
                    0 === Xt && s(yt)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = St(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e === _ && (e = Ut,
                    t.substr(Ut, 1).toLowerCase() === Ct ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(It)),
                    i !== _ ? (t.substr(Ut, 5).toLowerCase() === bt ? (r = t.substr(Ut, 5),
                    Ut += 5) : (r = _,
                    0 === Xt && s(Mt)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = wt(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e === _ && (e = Ut,
                    t.substr(Ut, 1).toLowerCase() === _t ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(xt)),
                    i !== _ ? (t.substr(Ut, 9).toLowerCase() === Dt ? (r = t.substr(Ut, 9),
                    Ut += 9) : (r = _,
                    0 === Xt && s(Rt)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = Ot(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e === _ && (e = Ut,
                    t.substr(Ut, 1).toLowerCase() === At ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(Et)),
                    i !== _ ? (t.substr(Ut, 6).toLowerCase() === jt ? (r = t.substr(Ut, 6),
                    Ut += 6) : (r = _,
                    0 === Xt && s(Tt)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = Pt(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _),
                    e === _ && (e = Ut,
                    t.substr(Ut, 1).toLowerCase() === Lt ? (i = t.charAt(Ut),
                    Ut++) : (i = _,
                    0 === Xt && s(kt)),
                    i !== _ ? (t.substr(Ut, 12).toLowerCase() === Vt ? (r = t.substr(Ut, 12),
                    Ut += 12) : (r = _,
                    0 === Xt && s(Ft)),
                    r === _ && (r = null),
                    r !== _ ? (Bt = e,
                    i = Nt(),
                    e = i) : (Ut = e,
                    e = _)) : (Ut = e,
                    e = _)))))),
                    e
                }
                function I() {
                    var e, i, r;
                    for (Xt++,
                    e = Ut,
                    i = [],
                    Gt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                    Ut++) : (r = _,
                    0 === Xt && s(zt)); r !== _; )
                        i.push(r),
                        Gt.test(t.charAt(Ut)) ? (r = t.charAt(Ut),
                        Ut++) : (r = _,
                        0 === Xt && s(zt));
                    return e = i !== _ ? t.substring(e, Ut) : i,
                    Xt--,
                    e === _ && (i = _,
                    0 === Xt && s(Wt)),
                    e
                }
                function b(t, e) {
                    if (!t.length)
                        return e;
                    var i = t.pop();
                    return {
                        left: b(t, i[0]),
                        op: i[1],
                        right: e
                    }
                }
                var M, w = arguments.length > 1 ? arguments[1] : {}, _ = {}, x = {
                    Program: a
                }, D = a, R = function(t, e) {
                    return b(t, e)
                }, O = "(", A = {
                    type: "literal",
                    value: "(",
                    description: '"("'
                }, E = ")", j = {
                    type: "literal",
                    value: ")",
                    description: '")"'
                }, T = function(t) {
                    return t
                }, P = "=", L = {
                    type: "literal",
                    value: "=",
                    description: '"="'
                }, k = function(t, e) {
                    return {
                        left: t,
                        op: "=",
                        right: e
                    }
                }, V = "<>", F = {
                    type: "literal",
                    value: "<>",
                    description: '"<>"'
                }, N = function(t, e) {
                    return {
                        left: t,
                        op: "<>",
                        right: e
                    }
                }, W = "~", G = {
                    type: "literal",
                    value: "~",
                    description: '"~"'
                }, z = function(t) {
                    return {
                        op: "~",
                        left: t
                    }
                }, U = function(t, e) {
                    return {
                        op: "set",
                        times: t,
                        set: e
                    }
                }, B = "*", $ = {
                    type: "literal",
                    value: "*",
                    description: '"*"'
                }, q = function(t) {
                    return t
                }, H = "{", X = {
                    type: "literal",
                    value: "{",
                    description: '"{"'
                }, Z = ",", Y = {
                    type: "literal",
                    value: ",",
                    description: '","'
                }, J = "}", K = {
                    type: "literal",
                    value: "}",
                    description: '"}"'
                }, Q = function(t, e) {
                    var i = 0
                      , r = [t];
                    for (i = 0; i < e.length; i++)
                        r.push(e[i][2]);
                    return r
                }, tt = /^[0-9]/, et = {
                    type: "class",
                    value: "[0-9]",
                    description: "[0-9]"
                }, it = function() {
                    return parseInt(i(), 10)
                }, rt = /^[a-zA-Z0-9]/, nt = {
                    type: "class",
                    value: "[a-zA-Z0-9]",
                    description: "[a-zA-Z0-9]"
                }, st = "&", ot = {
                    type: "literal",
                    value: "&",
                    description: '"&"'
                }, at = "|", ct = {
                    type: "literal",
                    value: "|",
                    description: '"|"'
                }, ut = function(t) {
                    return t
                }, lt = "p", ht = {
                    type: "literal",
                    value: "p",
                    description: '"p"'
                }, dt = "assed", pt = {
                    type: "literal",
                    value: "assed",
                    description: '"assed"'
                }, mt = function() {
                    return "passed"
                }, ft = "c", vt = {
                    type: "literal",
                    value: "c",
                    description: '"c"'
                }, gt = "ompleted", yt = {
                    type: "literal",
                    value: "ompleted",
                    description: '"ompleted"'
                }, St = function() {
                    return "completed"
                }, Ct = "f", It = {
                    type: "literal",
                    value: "f",
                    description: '"f"'
                }, bt = "ailed", Mt = {
                    type: "literal",
                    value: "ailed",
                    description: '"ailed"'
                }, wt = function() {
                    return "failed"
                }, _t = "i", xt = {
                    type: "literal",
                    value: "i",
                    description: '"i"'
                }, Dt = "ncomplete", Rt = {
                    type: "literal",
                    value: "ncomplete",
                    description: '"ncomplete"'
                }, Ot = function() {
                    return "incomplete"
                }, At = "b", Et = {
                    type: "literal",
                    value: "b",
                    description: '"b"'
                }, jt = "rowsed", Tt = {
                    type: "literal",
                    value: "rowsed",
                    description: '"rowsed"'
                }, Pt = function() {
                    return "browsed"
                }, Lt = "n", kt = {
                    type: "literal",
                    value: "n",
                    description: '"n"'
                }, Vt = "ot attempted", Ft = {
                    type: "literal",
                    value: "ot attempted",
                    description: '"ot attempted"'
                }, Nt = function() {
                    return "not attempted"
                }, Wt = {
                    type: "other",
                    description: "whitespace"
                }, Gt = /^[ \t\n\r]/, zt = {
                    type: "class",
                    value: "[ \\t\\n\\r]",
                    description: "[ \\t\\n\\r]"
                }, Ut = 0, Bt = 0, $t = [{
                    line: 1,
                    column: 1,
                    seenCR: !1
                }], qt = 0, Ht = [], Xt = 0;
                if ("startRule"in w) {
                    if (!(w.startRule in x))
                        throw new Error("Can't start parsing from rule \"" + w.startRule + '".');
                    D = x[w.startRule]
                }
                if (M = D(),
                M !== _ && Ut === t.length)
                    return M;
                throw M !== _ && Ut < t.length && s({
                    type: "end",
                    description: "end of input"
                }),
                o(null, Ht, qt < t.length ? t.charAt(qt) : null, qt < t.length ? n(qt, qt + 1) : n(qt, qt))
            }
            return t(e, Error),
            {
                SyntaxError: e,
                parse: i
            }
        }()
    }
    , function(t, e) {
        "use strict";
        function i(t, e) {
            void 0 === e && (e = "/");
            var i = 0
              , r = ""
              , n = e || "/"
              , s = new RegExp(n + "{1,}","g");
            for (i = 0; i < t.length; i++)
                "" !== t[i] && ("" !== r && (r += e),
                r += t[i]);
            return r;//r.replace(s, n) //this line is removing the '//' from the https://
        }
        e.join = i
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t(t, e) {
                this.cachedData = null,
                this.config = t,
                this.allScos = e
            }
            return t.prototype.load = function(t) {
				console.log('Load');
				console.log(t);
                var e = this;
                this.cachedData ? (e.allScos.importData(e.cachedData),
                t.callback(!0)) : reqwest({
                    url: this.config.getDataUrl(),
                    method: this.config.getDataAjaxMethod(),
                    headers: this.config.getDataHeaders(),
                    type: "json",
                    async: !0,
                    crossOrigin: !0,
                    withCredentials: !0,
                    data: {
                        activityId: this.config.courseId(),
                        studentId: this.config.studentId(),
                        timestamp: (new Date).getTime()
                    },
                    success: function(i) {
                        ("undefined" == typeof i || !i || "responseText"in i || "responseXML"in i) && (i = {}),
                        e.cachedData = i,
                        e.allScos.importData(e.cachedData),
                        t.callback(!0)
                    },
                    error: function(e, i, r) {
                        alert("error in get ajax" + e + "," + i + "," + r),
                        t.callback(!1)
                    }
                })
            }
            ,
            t.prototype.save = function(t, e) {
				console.log('Save');
				console.log(t);
				console.log(e);
                var i = !0;
                e || (e = {}),
                e.forceSync && (i = !1),
                e.eventType || (e.eventType = "save"),
                e.scoName || (e.scoName = ""),
                reqwest({
                    url: this.config.setDataUrl(),
                    method: this.config.setDataAjaxMethod(),
                    headers: this.config.setDataHeaders(),
                    async: i,
                    crossOrigin: !0,
                    withCredentials: !0,
                    data: {
                        action: e.eventType,
                        currentSco: e.scoName,
                        data: JSON.stringify(this.allScos.exportData()),
                        activityId: this.config.courseId(),
                        studentId: this.config.studentId(),
                        timestamp: (new Date).getTime()
                    },
                    success: function(t) {},
                    error: function(t) {
                        alert("There was an error saving your data: " + t)
                    }
                })
            }
            ,
            t
        }();
        e.AllInOneStorage = i
    }
    , function(t, e, i) {
        "use strict";
        var r = i(16)
          , n = function() {
            function t(t, e) {
                this.config = t,
                this.events = e,
                this.events.statusChange.add(this.statusChanged, this)
            }
            return t.prototype.render = function(t, e) {
                return this._render(t, e)
            }
            ,
            t.prototype.updateCurrentActivity = function(t) {
                var e, i = "toc-" + t, n = Array.prototype.slice.call(document.getElementById("toc").getElementsByClassName("current"));
                for (e = 0; e < n.length; e++)
                    r.DomRender.removeClass(n[e], "current");
                var s = document.getElementById(i);
                r.DomRender.addClass(s, "current")
            }
            ,
            t.prototype.updateActivityStatus = function(t, e) {
                var i = "toc-" + t
                  , n = "";
                if ("" !== e) {
                    switch (e) {
                    case "completed":
                    case "browsed":
                        n = "completed";
                        break;
                    case "incomplete":
                        n = "incomplete";
                        break;
                    case "unknown":
                        n = "unknown";
                        break;
                    case "passed":
                        n = "completed";
                        break;
                    case "failed":
                        n = "failed";
                        break;
                    case "not attempted":
                    case void 0:
                        n = "not_attempted"
                    }
                    if (n && document.getElementById(i)) {
                        var s = document.getElementById(i);
                        r.DomRender.removeClass(s, "completed"),
                        r.DomRender.removeClass(s, "browsed"),
                        r.DomRender.removeClass(s, "incomplete"),
                        r.DomRender.removeClass(s, "unknown"),
                        r.DomRender.removeClass(s, "passed"),
                        r.DomRender.removeClass(s, "failed"),
                        r.DomRender.removeClass(s, "not_attempted"),
                        r.DomRender.addClass(s, n)
                    }
                }
            }
            ,
            t.prototype.updateSelectability = function(t) {
                var e = document.getElementById("toc-" + t.identifier);
                t.isSelectable ? r.DomRender.removeClass(e, "disable") : r.DomRender.addClass(e, "disable")
            }
            ,
            t.prototype.statusChanged = function(t) {
                this.updateActivityStatus(this.currentScoId, t),
                this.updateCurrentActivity(this.currentScoId)
            }
            ,
            t.prototype._render = function(t, e) {
                var i, r = "<ul>", n = "", s = "", o = "", a = !1;
                for (e.hasOwnProperty("identifierRef") && t.hasOwnProperty(e.identifierRef) && (n = t[e.identifierRef].href,
                a = !0),
                e.hasOwnProperty("identifier") && (s = e.identifier),
                r += '<li id="toc-' + s + '">',
                n && a ? (o = " onclick=\"ssla.navigateByIdentifier('" + e.identifier + "'); return false;\"",
                r += '<a href="#" ' + o + ">" + e.title + "</a>") : r += '<div style="font-weight: bold">' + e.title + "</div>",
                i = 0; i < e.children.length; i++)
                    r += this._render(t, e.children[i]);
                return r += "</li>",
                r += "</ul>"
            }
            ,
            t
        }();
        e.TableOfContents = n
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t() {}
            return t.hasClass = function(t, e) {
                return t.className.match(new RegExp("(\\s|^)" + e + "(\\s|$)"));
            }
            ,
            t.addClass = function(t, e) {
                this.hasClass(t, e) || (t.className += " " + e)
            }
            ,
            t.removeClass = function(t, e) {
                if (this.hasClass(t, e)) {
                    var i = new RegExp("(\\s|^)" + e + "(\\s|$)");
                    t.className = t.className.replace(i, " ")
                }
            }
            ,
            t
        }();
        e.DomRender = i
    }
    , function(t, e, i) {
        "use strict";
        var r = i(18)
          , n = function() {
            function t() {
                this.preInitialize = new r.Signal,
                this.postInitialize = new r.Signal,
                this.preFinish = new r.Signal,
                this.postFinish = new r.Signal,
                this.preCommit = new r.Signal,
                this.postCommit = new r.Signal,
                this.preGetValue = new r.Signal,
                this.postGetValue = new r.Signal,
                this.preSetValue = new r.Signal,
                this.postSetValue = new r.Signal,
                this.preGetLastError = new r.Signal,
                this.postGetLastError = new r.Signal,
                this.preGetErrorString = new r.Signal,
                this.postGetErrorString = new r.Signal,
                this.preGetDiagnostic = new r.Signal,
                this.postGetDiagnostic = new r.Signal,
                this.statusChange = new r.Signal
            }
            return t
        }();
        e.SSLAApiEvents = n
    }
    , function(t, e) {
        t.exports = signals
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t(t, e, i, r, n) {
                this.sco = t,
                this.fn = e,
                this.args = i,
                this.ret = r,
                this.error = n,
                this.startTime = (new Date).getTime()
            }
            return t.prototype.end = function() {
                this.endTime = (new Date).getTime()
            }
            ,
            t
        }()
          , r = function() {
            function t(t) {
                this.currentStatement = null,
                this.events = t,
                this.statements = [],
                this.registerEvents()
            }
            return t.prototype.add = function(t, e, i, r) {
                this.start(t, e),
                this.finish(i, r)
            }
            ,
            t.prototype.pre = function(t, e) {
                this.start(t, e)
            }
            ,
            t.prototype.post = function(t, e, i, r) {
                this.finish(i, r)
            }
            ,
            t.prototype.registerEvents = function() {
                this.events.preInitialize.add(this.pre, this),
                this.events.postInitialize.add(this.post, this),
                this.events.preFinish.add(this.pre, this),
                this.events.postFinish.add(this.post, this),
                this.events.preCommit.add(this.pre, this),
                this.events.postCommit.add(this.post, this),
                this.events.preGetValue.add(this.pre, this),
                this.events.postGetValue.add(this.post, this),
                this.events.preSetValue.add(this.pre, this),
                this.events.postSetValue.add(this.post, this),
                this.events.preGetLastError.add(this.pre, this),
                this.events.postGetLastError.add(this.post, this),
                this.events.preGetErrorString.add(this.pre, this),
                this.events.postGetErrorString.add(this.post, this),
                this.events.preGetDiagnostic.add(this.pre, this),
                this.events.postGetDiagnostic.add(this.post, this)
            }
            ,
            t.prototype.setSco = function(t) {
                this.currentSco = t
            }
            ,
            t.prototype.start = function(t, e) {
                this.currentStatement = new i(this.currentSco,t,e),
                this.statements.push(this.currentStatement)
            }
            ,
            t.prototype.finish = function(t, e) {
                this.currentStatement.end(),
                this.currentStatement = null
            }
            ,
            t
        }();
        e.ScormLog = r
    }
    , function(t, e) {
        "use strict";
        function i(t, e, i) {
            var r;
            return r = window.open(t, e, "status=1,toolbar=1,scrollbars=1,resizable=1,alwaysRaised=1"),
            null == r || "undefined" == typeof r || r.focus(),
            r
        }
        function r(t, e) {
            return i(t, "sco_win", e)
        }
        function n() {
            return r(l, u.popupWindowParams())
        }
        function s() {
            return a(),
            n()
        }
        function o(t) {
            var e = setInterval(function() {
                try {
                    jca_course_player.document.getElementById("content").innerHTML = t,
                    clearInterval(e)
                } catch (t) {}
            }, 10)
        }
        function a() {
            o("Your course has been opened in a popup.  When you have completed your course, please press exit or close this window.")
        }
        function c(t, e) {
            var i;
            u = e,
            l = t,
            "popup" == u.openContentIn() ? (i = n(),
            i ? a() : o('Your course window did not pop open correctly.<br>  <a onclick="parent.ssla.popupManually()" href="#">Click here to open the course.</a>')) : jca_course_player.document.location.replace(l)
        }
        var u, l;
        e.popupManually = s,
        e.openSco = c
    }
    , function(t, e) {
        "use strict";
        var i = function() {
            function t() {
                this.config = null,
                this.ctd = null
            }
            return t
        }();
        e.SSLAPlugin = i
    }
    , function(t, e, i) {
        "use strict";
        var r = i(23)
          , n = i(8);
        e.UrlVarService = n.UrlVarService;
        var s = i(24)
          , o = i(20);
        e.popupManually = o.popupManually;
        var a = i(25)
          , c = function() {
            function t() {
                this.config = null,
                this.ctd = null,
                this.plugins = {},
                this.version = a.VERSION,
                this.config = new r.SSLAConfiguration,
                this.ctd = new s.CourseTypeDetector
            }
            return t.prototype.initCourseType = function(t) {
                "scorm" === t ? this.plugins.scorm ? this.plugins.scorm.start() : alert("No SCORM plugin installed.  Please contact administrative support.") : "xapi" === t ? this.plugins.xapi ? this.plugins.xapi.start() : alert("No XAPI plugin installed.  Please contact administrative support.") : "aicc" === t ? this.plugins.aicc ? this.plugins.aicc.start() : alert("No AICC plugin installed.  Please contact administrative support.") : alert("Could not find any manifest file for supported course types in the specified folder.  Please check the directory containing your course and try again.\nCourse types supported by this build: " + Object.keys(this.plugins).join(",") + "\n")
            }
            ,
            t.prototype.registerPlugin = function(t, e) {
                this.plugins[t] = e,
                e.config = this.config,
                e.ctd = this.ctd
            }
            ,
            t.prototype.start = function() {
                this.ctd.identify(this.config, this.plugins, this.initCourseType.bind(this))
            }
            ,
            t
        }();
        e.SSLA = c
    }
    , function(t, e, i) {
        "use strict";
        var r = i(13)
          , n = i(8)
          , s = function() {
            function t() {}
            return t.prototype.autoLaunchFirstSco = function() {
                return !0
            }
            ,
            t.prototype.courseBaseHtmlPath = function() {
                return ""
            }
            ,
            t.prototype.courseId = function() {
                return n.UrlVarService.get("courseId")
            }
            ,
				
                    t.prototype.courseDirectory = function () {
                        return "/" === n.UrlVarService.get("courseDirectory").charAt(0) ? n.UrlVarService.get("courseDirectory") :
                            function (e) {
                                return (e.indexOf('https:/') > -1 || e.indexOf('http:/') > -1) && (e.indexOf('//') !== 6 || e.indexOf('//') !== 5) ? e.replace(':/', '://') : e;
                            }(r.join([this.courseBaseHtmlPath(), n.UrlVarService.get("courseDirectory")]));
                    }
				  
            ,
            t.prototype.getCredit = function() {
                return n.UrlVarService.get("credit")
            }
            ,
            t.prototype.getDataAjaxMethod = function() {
                return "POST"
            }
            ,
            t.prototype.getDataHeaders = function() {
                return {}
            }
            ,
            t.prototype.getDataUrl = function() {
                return "/trackAllInOne/get"
            }
            ,
            t.prototype.getMode = function() {
                return n.UrlVarService.get("mode")
            }
            ,
            t.prototype.layoutUpdater = function() {
                return null
            }
            ,
            t.prototype.navigationType = function() {
                return ""
            }
            ,
            t.prototype.openContentIn = function() {
                return "browser"
            }
            ,
            t.prototype.popupWindowParams = function() {
                return ""
            }
            ,
            t.prototype.returnToLastScoOnLaunch = function() {
                return !1
            }
            ,
            t.prototype.saveDataOnCommit = function() {
                return !0
            }
            ,
            t.prototype.saveDataOnSetValue = function() {
                return !1
            }
            ,
            t.prototype.scormManifestFilename = function() {
                return "imsmanifest.xml"
            }
            ,
            t.prototype.setDataAjaxMethod = function() {
                return "POST"
            }
            ,
            t.prototype.setDataHeaders = function() {
                return {}
            }
            ,
            t.prototype.setDataUrl = function() {
                return "/trackAllInOne/set"
            }
            ,
            t.prototype.singleScoView = function() {
                return ""
            }
            ,
            t.prototype.storageAdapter = function() {
                return null
            }
            ,
            t.prototype.studentId = function() {
                return n.UrlVarService.get("studentId")
            }
            ,
            t.prototype.studentName = function() {
                return n.UrlVarService.get("studentName")
            }
            ,
            t.prototype.xapiEndpoint = function() {
                return ""
            }
            ,
            t.prototype.xapiManifestFilename = function() {
                return "tincan.xml"
            }
            ,
            t.prototype.xapiRegistration = function() {
                return ""
            }
            ,
            t
        }()
          , o = function() {
            function t() {
                this.internalConfig = new s
            }
            return t.prototype.isFunction = function(t) {
                return !!(t && t.constructor && t.call && t.apply)
            }
            ,
            t.prototype.fromExt = function(t) {
                return "undefined" != typeof window.sslaConfig && "undefined" != typeof window.sslaConfig[t] ? this.isFunction(window.sslaConfig[t]) ? window.sslaConfig[t]() : window.sslaConfig[t] : this.internalConfig[t]()
            }
            ,
            t.prototype.autoLaunchFirstSco = function() {
                return this.fromExt("autoLaunchFirstSco")
            }
            ,
            t.prototype.courseBaseHtmlPath = function() {
                return this.fromExt("courseBaseHtmlPath")
            }
            ,
            t.prototype.courseId = function() {
                return this.fromExt("courseId")
            }
            ,
            t.prototype.courseDirectory = function() {
                return this.fromExt("courseDirectory")
            }
            ,
            t.prototype.getCredit = function() {
                return this.fromExt("getCredit")
            }
            ,
            t.prototype.getDataAjaxMethod = function() {
                return this.fromExt("getDataAjaxMethod")
            }
            ,
            t.prototype.getDataHeaders = function() {
                return this.fromExt("getDataHeaders")
            }
            ,
            t.prototype.getDataUrl = function() {
                return this.fromExt("getDataUrl")
            }
            ,
            t.prototype.getMode = function() {
                return this.fromExt("getMode")
            }
            ,
            t.prototype.layoutUpdater = function() {
                return this.fromExt("layoutUpdater")
            }
            ,
            t.prototype.navigationType = function() {
                return this.fromExt("navigationType")
            }
            ,
            t.prototype.openContentIn = function() {
                return this.fromExt("openContentIn")
            }
            ,
            t.prototype.popupWindowParams = function() {
                return this.fromExt("popupWindowParams")
            }
            ,
            t.prototype.returnToLastScoOnLaunch = function() {
                return this.fromExt("returnToLastScoOnLaunch")
            }
            ,
            t.prototype.saveDataOnCommit = function() {
                return this.fromExt("saveDataOnCommit")
            }
            ,
            t.prototype.saveDataOnSetValue = function() {
                return this.fromExt("saveDataOnSetValue")
            }
            ,
            t.prototype.scormManifestFilename = function() {
                return this.fromExt("scormManifestFilename")
            }
            ,
            t.prototype.setDataAjaxMethod = function() {
                return this.fromExt("setDataAjaxMethod")
            }
            ,
            t.prototype.setDataHeaders = function() {
                return this.fromExt("setDataHeaders")
            }
            ,
            t.prototype.setDataUrl = function() {
                return this.fromExt("setDataUrl")
            }
            ,
            t.prototype.singleScoView = function() {
                return this.fromExt("singleScoView")
            }
            ,
            t.prototype.storageAdapter = function() {
                return this.fromExt("storageAdapter")
            }
            ,
            t.prototype.studentId = function() {
                return this.fromExt("studentId")
            }
            ,
            t.prototype.studentName = function() {
                return this.fromExt("studentName")
            }
            ,
            t.prototype.xapiEndpoint = function() {
                return this.fromExt("xapiEndpoint")
            }
            ,
            t.prototype.xapiManifestFilename = function() {
                return this.fromExt("xapiManifestFilename")
            }
            ,
            t.prototype.xapiRegistration = function() {
                return this.fromExt("xapiRegistration")
            }
            ,
            t
        }();
        e.SSLAConfiguration = o
    }
    , function(t, e, i) {
        "use strict";
        var r = i(13)
          , n = function() {
            function t() {
                this.callbackAttempted = !1,
                this.checkedAICC = !1,
                this.checkedSCORM = !1,
                this.checkedXAPI = !1,
                this.isAICC = !1,
                this.isSCORM = !1,
                this.isXAPI = !1
            }
            return t.prototype.attemptAICC = function(t, e) {
                this.checkedAICC = !0,
                this.finishIfAllChecked()
            }
            ,
            t.prototype.attemptXAPI = function(t, e) {
                var i = this;
                reqwest({
                    url: r.join([t, e]),
                    type: "xml"
                }).then(function(t) {
                    i.isXAPI = !0,
                    i.xapiContents = t
                }).always(function(t) {
                    i.checkedXAPI = !0,
                    i.finishIfAllChecked()
                })
            }
            ,
            t.prototype.attemptSCORM = function(t, e) {
                var i = this;
                reqwest({
                    url: r.join([t, e]),
                    type: "xml"
                }).then(function(t) {
                    i.isSCORM = !0,
                    i.scormContents = t
                }).always(function(t) {
                    i.checkedSCORM = !0,
                    i.finishIfAllChecked()
                })
            }
            ,
            t.prototype.finishIfAllChecked = function() {
                this.callbackAttempted || (this.isSCORM ? (this.callbackAttempted = !0,
                this.callbackOnDecision("scorm")) : this.isXAPI ? (this.callbackAttempted = !0,
                this.callbackOnDecision("xapi")) : this.isAICC ? (this.callbackAttempted = !0,
                this.callbackOnDecision("aicc")) : this.checkedSCORM && this.checkedXAPI && this.checkedAICC && this.callbackOnDecision(""))
            }
            ,
            t.prototype.identify = function(t, e, i) {
                this.callbackOnDecision = i,
                e.aicc ? this.attemptAICC(t.courseDirectory(), "") : this.checkedAICC = !0,
                e.scorm ? this.attemptSCORM(t.courseDirectory(), t.scormManifestFilename()) : this.checkedSCORM = !0,
                e.xapi ? this.attemptXAPI(t.courseDirectory(), t.xapiManifestFilename()) : this.checkedXAPI = !0
            }
            ,
            t
        }();
        e.CourseTypeDetector = n
    }
    , function(t, e) {
        "use strict";
        e.VERSION = "3.1.0"
    }
    ]);    
}

//# sourceMappingURL=ssla.min.js.map
buildSSLA();

var resetSsla = function(){
    delete ssla;
    buildSSLA();
}