/* tslint:disable */
// Use strict on rest of code
"use strict";
var screensizekey = '';
window.onerror = function myErrorHandler(errorMsg, url, lineNumber) {
    window.App_LogInfo("Unhandled error occured: " + errorMsg);
    return false;
};
function getParameterByName(name, url = null) {
    try {
        if (!url)
            url = window.location.href;
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
        if (!results)
            return null;
        if (!results[2])
            return '';
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }
    catch (err) {
        window.App_LogError("getParameterByName: " + err);
    }
}
var platform = "JS";
var simpleplayeriframe0 = document.getElementById('simpleplayeriframe0');
var simpleplayeriframe1 = document.getElementById('simpleplayeriframe1');
var iframecontainer0 = document.getElementById('iframecontainer0');
var iframecontainer1 = document.getElementById('iframecontainer1');
var clickiframe = document.getElementById('clickiframe');
var clickcontainer = document.getElementById('clickcontainer');
var clickoverlay = document.getElementById('clickoverlay');
var baseUrl = getParameterByName('baseurl');
var pairCode = getParameterByName('paircode');
var signalRUrl = getParameterByName('signalrurl');
if (!signalRUrl)
    signalRUrl = "https://signalr.exposer.no";
var showniframeIndex = 0;
var iframe;
var oldiframe;
var iframecontainer;
var oldiframecontainer;
var iframeelement;
var oldiframeelement;
function screenSize(width, height, ScreenOrientation, Overscan) {
    try {
        var windowwidth = document.documentElement.clientWidth;
        var windowheight = document.documentElement.clientHeight;
        var overscan = '';
        if (Overscan) {
            if (Overscan.length > 3) {
                overscan = Overscan[0] + '-' + Overscan[1] + '-' + Overscan[2] + '-' + Overscan[3];
                windowwidth = windowwidth - Overscan[0] - Overscan[2];
                windowheight = windowheight - Overscan[1] - Overscan[3];
                iframecontainer0.style.left = Overscan[0] + 'px';
                iframecontainer0.style.top = Overscan[1] + 'px';
                iframecontainer0.style.right = Overscan[2] + 'px';
                iframecontainer0.style.bottom = Overscan[3] + 'px';
                iframecontainer1.style.left = Overscan[0] + 'px';
                iframecontainer1.style.top = Overscan[1] + 'px';
                iframecontainer1.style.right = Overscan[2] + 'px';
                iframecontainer1.style.bottom = Overscan[3] + 'px';
                clickcontainer.style.left = Overscan[0] + 'px';
                clickcontainer.style.top = Overscan[1] + 'px';
                clickcontainer.style.right = Overscan[2] + 'px';
                clickcontainer.style.bottom = Overscan[3] + 'px';
            }
        }
        var newscreensizekey = width + '-' + height + '-' + ScreenOrientation + '-' + windowwidth + '-' + windowheight + '-' + overscan;
        if (newscreensizekey === screensizekey)
            return;
        screensizekey = newscreensizekey;
        window.App_LogInfo("Resize: " + newscreensizekey);
        var maxwidth = width;
        var maxheight = height;
        var orientation = parseInt(ScreenOrientation);
        if (orientation == 0) {
            var scale = Math.min(windowwidth / maxwidth);
            simpleplayeriframe0.style.margin = "0px";
            simpleplayeriframe1.style.margin = "0px";
            clickiframe.style.margin = "0px";
        }
        if (orientation == 90) {
            var scale = Math.min(windowwidth / maxheight);
            simpleplayeriframe0.style.margin = '0px 0px 0px ' + windowwidth + 'px';
            simpleplayeriframe1.style.margin = '0px 0px 0px ' + windowwidth + 'px';
            clickiframe.style.margin = '0px 0px 0px ' + windowwidth + 'px';
        }
        if (orientation == 180) {
            var scale = Math.min(windowwidth / maxwidth);
            simpleplayeriframe0.style.margin = windowheight + 'px 0px 0px ' + windowheight + 'px';
            simpleplayeriframe1.style.margin = windowheight + 'px 0px 0px ' + windowheight + 'px';
            clickiframe.style.margin = windowheight + 'px 0px 0px ' + windowheight + 'px';
        }
        if (orientation == 270) {
            var scale = Math.min(windowwidth / maxheight);
            simpleplayeriframe0.style.margin = windowheight + 'px 0px 0px 0px';
            simpleplayeriframe1.style.margin = windowheight + 'px 0px 0px 0px';
            clickiframe.style.margin = windowheight + 'px 0px 0px 0px';
        }
        simpleplayeriframe0.style.width = maxwidth + 'px';
        simpleplayeriframe0.style.height = maxheight + 'px';
        simpleplayeriframe1.style.width = maxwidth + 'px';
        simpleplayeriframe1.style.height = maxheight + 'px';
        simpleplayeriframe0.style.transform = 'rotate(' + orientation + 'deg) scale(' + scale + ', ' + scale + ')';
        simpleplayeriframe1.style.transform = 'rotate(' + orientation + 'deg) scale(' + scale + ', ' + scale + ')';
        clickiframe.style.width = maxwidth + 'px';
        clickiframe.style.height = maxheight + 'px';
        clickiframe.style.transform = 'rotate(' + orientation + 'deg) scale(' + scale + ', ' + scale + ')';
    }
    catch (err) {
        window.App_LogError("screenSize: " + err);
    }
}
function showSlide(html, quick = false) {
    return new Promise((resolve, reject) => {
        try {
            var iframe = simpleplayeriframe0;
            var oldiframe = simpleplayeriframe1;
            if (showniframeIndex == 0)
                iframe = simpleplayeriframe1;
            if (showniframeIndex == 0)
                oldiframe = simpleplayeriframe0;
            var iframecontainer = iframecontainer0;
            var oldiframecontainer = iframecontainer1;
            if (showniframeIndex == 0)
                iframecontainer = iframecontainer1;
            if (showniframeIndex == 0)
                oldiframecontainer = iframecontainer0;
            var iframeelement = iframe;
            var oldiframeelement = oldiframe;
            var blob = new Blob([html], { type: 'text/html' });
            var newurl = window.URL.createObjectURL(blob);
            iframe.src = newurl;
            showniframeIndex += 1;
            if (showniframeIndex == 2)
                showniframeIndex = 0;
            if (iframecontainer.style.visibility == 'hidden')
                iframecontainer.style.visibility = 'visible';
            if (oldiframecontainer.style.visibility == 'hidden')
                oldiframecontainer.style.visibility = 'visible';
            if (quick) {
                iframeelement.className = 'quickfade';
                oldiframeelement.className = 'quickfade';
            }
            else {
                iframeelement.className = 'crossfade';
                oldiframeelement.className = 'crossfade';
            }
            iframeelement.style.opacity = '1';
            oldiframeelement.style.opacity = '0';
            setTimeout(function () {
                oldiframeelement.src = 'about:blank';
            }, 1200);
            resolve(true);
            return;
            /*            }, waitdealay);*/
        }
        catch (err) {
            window.App_LogError("showNextSlide: " + err);
            resolve(null);
            return;
        }
    });
}
//
// Overlay click
//
var clickSlideHTML;
var clickSlideDuration = 0;
var isClickSlide = false;
var ClickSlideTimeout;
function setClickSlide(html, duration) {
    try {
        clickSlideHTML = html;
        clickSlideDuration = duration;
        if (clickSlideDuration < 1000)
            clickSlideDuration = duration * 1000;
        if (clickSlideDuration < 4000)
            clickSlideDuration = 4000;
        if (clickSlideHTML && !isClickSlide) {
            clickoverlay.style.display = 'block';
        }
    }
    catch (err) {
        window.App_LogError("setClickSlide: " + err);
    }
}
function deactivateClickSlide() {
    try {
        if (isClickSlide) {
            isClickSlide = false;
            window.App_LogInfo("Click slide deactivated");
            clickoverlay.style.display = 'block';
            clickcontainer.style.display = "none";
            clearTimeout(ClickSlideTimeout);
            clickiframe.src = 'about:blank';
        }
    }
    catch (err) {
        window.App_LogError("deactivateClickSlide: " + err);
    }
}
function activateClickSlide() {
    try {
        if (clickSlideHTML && !isClickSlide) {
            isClickSlide = true;
            window.App_LogInfo("Activating click slide " + clickSlideDuration);
            var iframecontentdocument = clickiframe.contentDocument;
            clickiframe.src = 'about:blank';
            iframecontentdocument.open();
            iframecontentdocument.write(clickSlideHTML);
            iframecontentdocument.close();
            iframecontentdocument.addEventListener('onblur', function () {
                resetClickSlide();
            });
            iframecontentdocument.addEventListener('focus', function () {
                resetClickSlide();
            });
            iframecontentdocument.addEventListener('keydown', function () {
                resetClickSlide();
            });
            iframecontentdocument.addEventListener('click', function () {
                resetClickSlide();
            });
            clickcontainer.style.display = "block";
            // Hide click overlay, as we actually need to be able to click
            clickoverlay.style.display = 'none';
            clearTimeout(ClickSlideTimeout);
            ClickSlideTimeout = setTimeout(function () {
                deactivateClickSlide();
            }, clickSlideDuration);
        }
    }
    catch (err) {
        window.App_LogError("activateClickSlide: " + err);
    }
}
function resetClickSlide() {
    try {
        if (isClickSlide) {
            window.App_LogInfo("Expanding length of click slide");
            clearTimeout(ClickSlideTimeout);
            ClickSlideTimeout = setTimeout(function () {
                deactivateClickSlide();
            }, clickSlideDuration);
        }
    }
    catch (err) {
        window.App_LogError("activateClickSlide: " + err);
    }
}
;
document.onkeypress = resetClickSlide;
window.onmessage = function (e) {
    if (e.data == 'parentactivity') {
        resetClickSlide();
    }
    else {
        window.App_LogInfo(e.data);
    }
};
document.getElementById("clickoverlay").addEventListener("click", function () {
    activateClickSlide();
});
window.App_Init(pairCode);
/////* tslint:disable */
////module more
////{
////  export var LZString = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _f: String.fromCharCode, compressToBase64: function (r) { if (null == r) return ""; var e, t, a, o, i, n, s, c = "", h = 0; for (r = LZString.compress(r); h < 2 * r.length;)h % 2 == 0 ? (e = r.charCodeAt(h / 2) >> 8, t = 255 & r.charCodeAt(h / 2), a = h / 2 + 1 < r.length ? r.charCodeAt(h / 2 + 1) >> 8 : NaN) : (e = 255 & r.charCodeAt((h - 1) / 2), (h + 1) / 2 < r.length ? (t = r.charCodeAt((h + 1) / 2) >> 8, a = 255 & r.charCodeAt((h + 1) / 2)) : t = a = NaN), h += 3, o = e >> 2, i = (3 & e) << 4 | t >> 4, n = (15 & t) << 2 | a >> 6, s = 63 & a, isNaN(t) ? n = s = 64 : isNaN(a) && (s = 64), c = c + LZString._keyStr.charAt(o) + LZString._keyStr.charAt(i) + LZString._keyStr.charAt(n) + LZString._keyStr.charAt(s); return c }, decompressFromBase64: function (r) { if (null == r) return ""; var e, t, a, o, i, n, s, c, h = "", p = 0, f = 0, l = LZString._f; for (r = r.replace(/[^A-Za-z0-9\+\/\=]/g, ""); f < r.length;)i = LZString._keyStr.indexOf(r.charAt(f++)), n = LZString._keyStr.indexOf(r.charAt(f++)), s = LZString._keyStr.indexOf(r.charAt(f++)), c = LZString._keyStr.indexOf(r.charAt(f++)), t = i << 2 | n >> 4, a = (15 & n) << 4 | s >> 2, o = (3 & s) << 6 | c, p % 2 == 0 ? (e = t << 8, 64 != s && (h += l(e | a)), 64 != c && (e = o << 8)) : (h += l(e | t), 64 != s && (e = a << 8), 64 != c && (h += l(e | o))), p += 3; return LZString.decompress(h) }, compressToUTF16: function (r) { if (null == r) return ""; var e, t, a, o = "", i = 0, n = LZString._f; for (r = LZString.compress(r), e = 0; e < r.length; e++)switch (t = r.charCodeAt(e), i++) { case 0: o += n((t >> 1) + 32), a = (1 & t) << 14; break; case 1: o += n(a + (t >> 2) + 32), a = (3 & t) << 13; break; case 2: o += n(a + (t >> 3) + 32), a = (7 & t) << 12; break; case 3: o += n(a + (t >> 4) + 32), a = (15 & t) << 11; break; case 4: o += n(a + (t >> 5) + 32), a = (31 & t) << 10; break; case 5: o += n(a + (t >> 6) + 32), a = (63 & t) << 9; break; case 6: o += n(a + (t >> 7) + 32), a = (127 & t) << 8; break; case 7: o += n(a + (t >> 8) + 32), a = (255 & t) << 7; break; case 8: o += n(a + (t >> 9) + 32), a = (511 & t) << 6; break; case 9: o += n(a + (t >> 10) + 32), a = (1023 & t) << 5; break; case 10: o += n(a + (t >> 11) + 32), a = (2047 & t) << 4; break; case 11: o += n(a + (t >> 12) + 32), a = (4095 & t) << 3; break; case 12: o += n(a + (t >> 13) + 32), a = (8191 & t) << 2; break; case 13: o += n(a + (t >> 14) + 32), a = (16383 & t) << 1; break; case 14: o += n(a + (t >> 15) + 32, (32767 & t) + 32), i = 0 }return o + n(a + 32) }, decompressFromUTF16: function (r) { if (null == r) return ""; for (var e, t, a = "", o = 0, i = 0, n = LZString._f; i < r.length;) { switch (t = r.charCodeAt(i) - 32, o++) { case 0: e = t << 1; break; case 1: a += n(e | t >> 14), e = (16383 & t) << 2; break; case 2: a += n(e | t >> 13), e = (8191 & t) << 3; break; case 3: a += n(e | t >> 12), e = (4095 & t) << 4; break; case 4: a += n(e | t >> 11), e = (2047 & t) << 5; break; case 5: a += n(e | t >> 10), e = (1023 & t) << 6; break; case 6: a += n(e | t >> 9), e = (511 & t) << 7; break; case 7: a += n(e | t >> 8), e = (255 & t) << 8; break; case 8: a += n(e | t >> 7), e = (127 & t) << 9; break; case 9: a += n(e | t >> 6), e = (63 & t) << 10; break; case 10: a += n(e | t >> 5), e = (31 & t) << 11; break; case 11: a += n(e | t >> 4), e = (15 & t) << 12; break; case 12: a += n(e | t >> 3), e = (7 & t) << 13; break; case 13: a += n(e | t >> 2), e = (3 & t) << 14; break; case 14: a += n(e | t >> 1), e = (1 & t) << 15; break; case 15: a += n(e | t), o = 0 }i++ } return LZString.decompress(a) }, compress: function (r) { if (null == r) return ""; var e, t, a, o = {}, i = {}, n = "", s = "", c = "", h = 2, p = 3, f = 2, l = "", k = 0, d = 0, b = LZString._f; for (a = 0; a < r.length; a += 1)if (n = r.charAt(a), Object.prototype.hasOwnProperty.call(o, n) || (o[n] = p++ , i[n] = !0), s = c + n, Object.prototype.hasOwnProperty.call(o, s)) c = s; else { if (Object.prototype.hasOwnProperty.call(i, c)) { if (c.charCodeAt(0) < 256) { for (e = 0; f > e; e++)k <<= 1, 15 == d ? (d = 0, l += b(k), k = 0) : d++; for (t = c.charCodeAt(0), e = 0; 8 > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1 } else { for (t = 1, e = 0; f > e; e++)k = k << 1 | t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t = 0; for (t = c.charCodeAt(0), e = 0; 16 > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1 } h-- , 0 == h && (h = Math.pow(2, f), f++), delete i[c] } else for (t = o[c], e = 0; f > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1; h-- , 0 == h && (h = Math.pow(2, f), f++), o[s] = p++ , c = String(n) } if ("" !== c) { if (Object.prototype.hasOwnProperty.call(i, c)) { if (c.charCodeAt(0) < 256) { for (e = 0; f > e; e++)k <<= 1, 15 == d ? (d = 0, l += b(k), k = 0) : d++; for (t = c.charCodeAt(0), e = 0; 8 > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1 } else { for (t = 1, e = 0; f > e; e++)k = k << 1 | t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t = 0; for (t = c.charCodeAt(0), e = 0; 16 > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1 } h-- , 0 == h && (h = Math.pow(2, f), f++), delete i[c] } else for (t = o[c], e = 0; f > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1; h-- , 0 == h && (h = Math.pow(2, f), f++) } for (t = 2, e = 0; f > e; e++)k = k << 1 | 1 & t, 15 == d ? (d = 0, l += b(k), k = 0) : d++ , t >>= 1; for (; ;) { if (k <<= 1, 15 == d) { l += b(k); break } d++ } return l }, decompress: function (r) { if (null == r) return ""; if ("" == r) return null; var e, t, a, o, i, n, s, c, h = [], p = 4, f = 4, l = 3, k = "", d = "", b = LZString._f, g = { string: r, val: r.charCodeAt(0), position: 32768, index: 1 }; for (t = 0; 3 > t; t += 1)h[t] = t; for (o = 0, n = Math.pow(2, 2), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; switch (e = o) { case 0: for (o = 0, n = Math.pow(2, 8), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; c = b(o); break; case 1: for (o = 0, n = Math.pow(2, 16), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; c = b(o); break; case 2: return "" }for (h[3] = c, a = d = c; ;) { if (g.index > g.string.length) return ""; for (o = 0, n = Math.pow(2, l), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; switch (c = o) { case 0: for (o = 0, n = Math.pow(2, 8), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; h[f++] = b(o), c = f - 1, p--; break; case 1: for (o = 0, n = Math.pow(2, 16), s = 1; s != n;)i = g.val & g.position, g.position >>= 1, 0 == g.position && (g.position = 32768, g.val = g.string.charCodeAt(g.index++)), o |= (i > 0 ? 1 : 0) * s, s <<= 1; h[f++] = b(o), c = f - 1, p--; break; case 2: return d }if (0 == p && (p = Math.pow(2, l), l++), h[c]) k = h[c]; else { if (c !== f) return null; k = a + a.charAt(0) } d += k, h[f++] = a + k.charAt(0), p-- , a = k, 0 == p && (p = Math.pow(2, l), l++) } } };
////  /* Exposer logo */
////  export var logosvg = '<svg xmlns="http://www.w3.org/2000/svg" width="227" height="58" viewBox="0 0 227.5 57.7"><style>.a{fill:#FFF;}</style><g opacity="0.1"><path d="M222.7 24.8V22.3h-0.9v-0.5h2.4v0.5h-0.9v2.5H222.7z" class="a"/><path d="M224.6 24.8v-3h0.9l0.5 2 0.5-2h0.9v3h-0.6V22.5l-0.6 2.3h-0.6l-0.6-2.3v2.3H224.6z" class="a"/><path d="M154.6 21.7c-2.8 0-5.2 1-7.2 3 -2 2-3 4.4-3 7.2 0 2.8 1 5.2 3 7.2 2 2 4.4 3 7.2 3s5.2-1 7.2-3c2-2 3-4.4 3-7.2 0-2.8-1-5.2-3-7.2C159.8 22.7 157.4 21.7 154.6 21.7zM159.4 36.7c-1.3 1.3-2.9 2-4.8 2 -1.9 0-3.5-0.6-4.8-2 -1.3-1.3-2-3-2-4.8 0-1.9 0.6-3.5 2-4.8 1.4-1.4 3-2 4.8-2 1.9 0 3.5 0.7 4.8 2 1.3 1.3 2 2.9 2 4.8C161.4 33.8 160.8 35.4 159.4 36.7z" class="a"/><path d="M177.7 30.2h-5.1c-0.7 0-1.3-0.3-1.8-0.8 -0.5-0.5-0.7-1.1-0.7-1.8 0-0.3 0.1-0.7 0.2-1 0.1-0.3 0.3-0.6 0.5-0.8 0.3-0.3 0.5-0.4 0.8-0.6 0.3-0.1 0.6-0.2 0.9-0.2 0 0 2.6 0 2.6 0v-3.4c0 0-2.6 0-2.6 0 -1.6 0-3 0.6-4.1 1.8 -1.1 1.2-1.7 2.6-1.7 4.2 0 1.7 0.6 3.1 1.7 4.2 1.1 1.1 2.6 1.7 4.2 1.7h5.1c0.7 0 1.3 0.3 1.8 0.8 0.5 0.5 0.8 1.1 0.8 1.8 0 0.4-0.1 0.7-0.2 1 -0.1 0.3-0.3 0.6-0.5 0.8 -0.2 0.2-0.5 0.4-0.8 0.5 -0.3 0.1-0.5 0.2-0.8 0.2 -0.1 0-2.7 0-2.7 0v3.4c0.1 0 2.7 0 2.8 0 1.6-0.1 2.9-0.6 4-1.7 1.2-1.2 1.8-2.6 1.8-4.2 0-1.6-0.6-3-1.8-4.2C180.7 30.8 179.3 30.2 177.7 30.2z" class="a"/><polygon points="86.4 21.7 86.4 21.7 86.4 37.1 86.4 42.1 86.4 42.1 86.4 42.1 100 42.1 100 38.7 89.8 38.7 89.8 38.7 89.8 37.1 89.8 32.1 89.8 33.6 100 33.6 100 30.2 89.8 30.2 89.8 30.2 89.8 25.1 89.8 25.1 100 25.1 100 21.7 86.4 21.7 " class="a"/><polygon points="186.4 21.7 186.4 21.7 186.4 37.1 186.4 42.1 186.4 42.1 186.4 42.1 200 42.1 200 38.7 189.8 38.7 189.8 38.7 189.8 37.1 189.8 33.5 189.8 33.5 200 33.5 200 30.1 189.8 30.1 189.8 30.1 189.8 25.1 189.8 25.1 200 25.1 200 21.7 186.4 21.7 " class="a"/><path d="M218.7 31.9c1.2-1.2 1.7-2.6 1.7-4.2 0-1.6-0.6-3-1.7-4.2 -1.1-1.1-2.5-1.7-4.1-1.8 0 0-10.1 0-10.2 0v3.4c0 0 10.2 0 10.2 0 0.3 0 0.6 0.1 0.9 0.2 0.3 0.1 0.6 0.3 0.8 0.6 0.2 0.2 0.4 0.5 0.5 0.8 0.1 0.3 0.2 0.6 0.2 1 0 0.7-0.2 1.3-0.7 1.8 -0.5 0.5-1.1 0.8-1.8 0.8h-10.1v0.1 3.3 8.6h3.4v-8.6h4.9l3.4 8.6h3.4l-3.5-8.8C217 33.2 217.9 32.7 218.7 31.9z" class="a"/><path d="M136.6 21.7c0 0-10.1 0-10.2 0v3.4c0 0 10.2 0 10.2 0 0.3 0 0.6 0.1 0.9 0.2 0.3 0.1 0.6 0.3 0.8 0.6 0.2 0.2 0.4 0.5 0.5 0.8 0.1 0.3 0.2 0.6 0.2 1 0 0.7-0.2 1.3-0.7 1.8 -0.5 0.5-1.1 0.8-1.8 0.8h-10.1v0.1 3.3 8.6h3.4v-8.6h6.6c1.7 0 3.1-0.6 4.2-1.7 1.2-1.2 1.7-2.6 1.7-4.2 0-1.6-0.6-3-1.7-4.2C139.6 22.3 138.3 21.7 136.6 21.7z" class="a"/><polygon points="103.1 42.1 107.4 42.1 113.6 34.2 111.3 31.7 " class="a"/><polygon points="119.1 21.7 113.2 29.2 113.2 29.2 107.4 21.7 103.1 21.7 111.1 31.9 111.1 31.9 111 32 113.2 34.7 113.2 34.7 113.2 34.7 113.2 34.7 113.2 34.7 119.1 42.1 123.4 42.1 115.4 31.9 115.4 31.9 115.4 31.9 115.4 31.9 123.4 21.7 " class="a"/><path d="M129.1 52.5h-0.3c-0.1 0-0.1 0-0.1-0.1 0.1-0.2 0.4-1 0.9-2.5 0.5-1.4 0.8-2.3 0.9-2.4 0-0.1 0.1-0.1 0.2-0.1h0.3c0.1 0 0.1 0 0.1 0.1l-1.8 4.9C129.3 52.5 129.2 52.5 129.1 52.5z" class="a"/><path d="M134.6 52.5h-0.4c-0.1 0-0.1 0-0.1-0.1v-4.9c0-0.1 0-0.1 0.1-0.1h1.9c0.4 0 0.7 0.1 0.9 0.3 0.2 0.2 0.3 0.5 0.3 0.9v0.9c0 0.4-0.1 0.7-0.3 0.9 -0.2 0.2-0.5 0.3-0.9 0.3h-1.3c-0.1 0-0.1 0-0.1 0.1v1.7C134.8 52.5 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1v4C161.9 52 161.9 52 161.9 52z" class="a"/><path d="M167.8 52.4v-4.9c0-0.1 0-0.1 0.1-0.1h1.9c0.4 0 0.7 0.1 0.9 0.3 0.2 0.2 0.3 0.5 0.3 0.9v0.4c0 0.5-0.2 0.8-0.7 0.9 0.2 0 0.4 0.1 0.5 0.3 0.1 0.2 0.2 0.4 0.2 0.6v0.5c0 0.4-0.1 0.7-0.3 0.9 -0.2 0.2-0.5 0.3-0.9 0.3h-1.9C167.8 52.5 167.8 52.5 167.8 52.4zM168.4 49.7h1.2c0.5 0 0.7-0.2 0.7-0.7v-0.4c0-0.5-0.2-0.7-0.7-0.7h-1.3c-0.1 0-0.1 0-0.1 0.1v1.6C168.4 49.6 168.4 49.7 168.4 49.7zM168.4 52h1.3c0.5 0 0.7-0.2 0.7-0.7v-0.5c0-0.5-0.2-0.7-0.7-0.7h-1.3c-0.1 0-0.1 0-0.1 0.1v1.7C168.4 52 168.4 52 168.4 52z" class="a"/><path d="M173.7 52.5h-0.4c-0.1 0-0.1 0-0.1-0.1v-1.8l-1.5-3.1c0 0 0-0.1 0-0.1 0 0 0 0 0.1 0h0.4c0.1 0 0.1 0 0.1 0.1l1.1 2.4h0l1.1-2.4c0-0.1 0.1-0.1 0.1-0.1h0.5c0.1 0 0.1 0 0.1 0.1l-1.5 3.1v1.8C173.8 52.5 173.8 52.5 173.7 52.5z" class="a"/><path d="M178.2 52.4v-4.9c0-0.1 0-0.1 0.1-0.1h2c0.4 0 0.7 0.1 0.9 0.3 0.2 0.2 0.3 0.5 0.3 0.9v2.8c0 0.4-0.1 0.7-0.3 0.9 -0.2 0.2-0.5 0.3-0.9 0.3h-2C178.3 52.5 178.2 52.5 178.2 52.4zM178.9 52h1.4c0.5 0 0.7-0.2 0.7-0.7v-2.7c0-0.5-0.2-0.7-0.7-0.7h-1.3c-0.1 0-0.1 0-0.1 0.1v4C178.8 52 178.9 52 178.9 52z" class="a"/><path d="M185.3 52.5h-2.5c-0.1 0-0.1 0-0.1-0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-0.1v-0.3c0-0.1 0-0.1 0.1-0.1h2.9c0.1 0 0.1 0 0.1 0.1v0.3c0 0.1 0 0.1-0.1 0.1h-1.1c-0.1 0-0.1 0-0.1 0.1v4.5C192.4 52.5 192.4 52.5 192.3 52.5z" class="a"/><path d="M195.1 47.5v4.9c0 0.1 0 0.1-0.1 0.1h-0.4c-0.1 0-0.1 0-0.1-0.1v-4.9c0-0.1 0-0.1 0.1-0.1h0.4C195 47.4 195.1 47.4 195.1 47.5z" class="a"/><path d="M196.9 52.5h-0.4c-0.1 0-0.1 0-0.1-0.1v-4.9c0-0.1 0-0.1 0.1-0.1h0.3c0.1 0 0.1 0 0.1 0.1l2.2 3.9h0v-3.8c0-0.1 0-0.1 0.1-0.1h0.4c0.1 0 0.1 0 0.1 0.1v4.9c0 0.1 0 0.1-0.1 0.1h-0.3c-0.1 0-0.1 0-0.2-0.1l-2.2-3.9h0v3.8C197 52.5 196.9 52.5 196.9 52.5z" class="a"/><path d="M203.7 52.5h-2.5c-0.1 0-0.1 0-0.1-0.1v-4.9c0-0.1 0-0.1 0.1-0.1h2.5c0.1 0 0.1 0 0.1 0.1v0.3c0 0.1 0 0.1-0.1 0.1h-2c-0.1 0-0.1 0-0.1 0.1v1.6c0 0 0 0.1 0.1 0.1h1.7c0.1 0 0.1 0 0.1 0.1v0.3c0 0.1 0 0.1-0.1 0.1h-1.7c-0.1 0-0.1 0-0.1 0.1v1.7c0 0 0 0.1 0.1 0.1h2c0.1 0 0.1 0 0.1 0.1v0.3C203.8 52.5 203.8 52.5 203.7 52.5z" class="a"/><path d="M206.2 52.5h-0.4c-0.1 0-0.1 0-0.1-0.1v-4.5c0 0 0-0.1-0.1-0.1h-1.1c-0.1 0-0.1 0-0.1-0.1v-0.3c0-0.1 0-0.1 0.1-0.1h2.9c0.1 0 0.1 0 0.1 0.1v0.3c0 0.1 0 0.1-0.1 0.1h-1.1c-0.1 0-0.1 0-0.1 0.1v4.5C206.3 52.5 206.2 52.5 206.2 52.5z" class="a"/><circle cx="22.5" cy="32.5" r="22.5" fill="#FF0001"/><circle cx="42" cy="28.9" r="28.9" fill="#0FF"/></g></svg>';
////  export class ExposerSlide {
////    public UDID : string;
////    public PairCode : string;
////    public SlideIndex : number;
////    public NextSlideIndex : number;
////    public DelayToNext : number;
////    public IsPaired : boolean;
////    public isClickSlide : boolean;
////    public Cacheable: boolean;
////    public HTML : string;
////  }
////  export class ExposerLogItem {
////      constructor(date, app, type, value) {
////        this.Date = date;
////        this.App = app;
////        this.Type = type;
////        this.Value = value;
////    }
////    public Date: Date;
////    public App: number;
////    public Type: number;
////    public Value: string;
////  }
////  export class ClientCommand {
////    constructor(id, title) {
////      this.ID = id;
////      this.Title = title;
////    }
////    public ID : string;
////    public Title : string;
////  }
////  export function getParameterByName(name, url = null) {
////    try {
////        if (!url) url = window.location.href;
////        name = name.replace(/[\[\]]/g, "\\$&");
////        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
////            results = regex.exec(url);
////        if (!results) return null;
////        if (!results[2]) return '';
////        return decodeURIComponent(results[2].replace(/\+/g, " "));
////    }
////    catch (err) {
////        LogError('getParameterByName: ' + err);
////    }    
////  }
////  export function b64EncodeUnicode(str) {
////    try {    
////      return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
////          return String.fromCharCode(parseInt(p1, 16))
////      }));
////    }
////    catch (err) {
////      LogError('b64EncodeUnicode: ' + err);
////      return "";
////    }    
////  }
////  export function b64DecodeUnicode(str) {
////    try {
////      return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) {
////          return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
////      }).join(''));
////    }
////    catch (err) {
////      return "";
////    }    
////  }
////  export function getLoadingSlide(pairCode) : ExposerSlide {
////      var slide = new ExposerSlide();
////      slide.UDID = "";
////      slide.PairCode =  pairCode;
////      slide.DelayToNext = 15000;
////      slide.SlideIndex = 0;
////      slide.NextSlideIndex = 0;
////      slide.IsPaired = true;
////      slide.HTML = b64EncodeUnicode(loadingHTML(pairCode));
////      return slide;
////  }
////  export function loadingHTML(text) : string
////  {
////    try {
////      return '<html> \
////  <head> \
////  <style> \
////  </style> \
////  </head> \
////  <body style="background-color:#000000;"> \
////    <div style="position:relative; height:140px; top: 50%; text-align:center; margin:-70px auto 0px auto;"> \
////        <span style="display:block; height:56px;">' + logosvg + '</span> \
////        <span style="display:block; padding-top:15px; color:#666; font-family:Arial;">' + text + '</span> \
////        <span style="display:block; padding-top:15px;"> \
////            <svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="24px" height="24px" viewBox="0 0 128 128" xml:space="preserve"><g><path d="M78.75 16.18V1.56a64.1 64.1 0 0 1 47.7 47.7H111.8a49.98 49.98 0 0 0-33.07-33.08zM16.43 49.25H1.8a64.1 64.1 0 0 1 47.7-47.7V16.2a49.98 49.98 0 0 0-33.07 33.07zm33.07 62.32v14.62A64.1 64.1 0 0 1 1.8 78.5h14.63a49.98 49.98 0 0 0 33.07 33.07zm62.32-33.07h14.62a64.1 64.1 0 0 1-47.7 47.7v-14.63a49.98 49.98 0 0 0 33.08-33.07z" fill="#333333" fill-opacity="1"/><animateTransform attributeName="transform" type="rotate" from="0 64 64" to="-90 64 64" dur="1800ms" repeatCount="indefinite"></animateTransform></g></svg> \
////        </span> \
////    </div> \
////  </body> \
////  </html>';
////    }
////    catch (err) {
////      LogError("loadingHTML: " + err);
////    }
////  }
////  //
////  // Logging
////  //
////  var logarray: more.ExposerLogItem[] = [];
////  export function LogConsole(info : more.ExposerLogItem) {
////      var datestamp = ((info.Date.getHours() < 10) ? "0" : "") + info.Date.getHours() + ":" +
////          ((info.Date.getMinutes() < 10) ? "0" : "") + info.Date.getMinutes() + ":" +
////          ((info.Date.getSeconds() < 10) ? "0" : "") + info.Date.getSeconds();
////      var logItem = datestamp + " [JSCLIENT] " + info.Value;
////      if (info.Type == 1) {
////          console.error(logItem);
////      }
////      else {
////          console.log(logItem);
////      }
////  }
////    export function LogServer(info : more.ExposerLogItem) {
////        if (logarray == null)
////            logarray = [];
////      logarray.push(info)
////        if (signalRState == 1) {
////            var oldLogs = logarray;
////            logarray = [];
////            for (let i = 0; i < oldLogs.length; i++) {
////                connection.invoke("Logging", pairCode, oldLogs[i]);
////            }
////        }
////    }
////  export function Log(message) {
////      var item = new more.ExposerLogItem(new Date(), 1, 0, message);
////    LogServer(item);
////    LogConsole(item);
////  }
////  export function LogError(message) {
////      var item = new more.ExposerLogItem(new Date(), 1, 1, message);
////      LogServer(item);
////      LogConsole(item);
////  }
////    export function LogDebug(message) {
////        var item = new more.ExposerLogItem(new Date(), 1, 2, message);
////        LogServer(item);
////        LogConsole(item);
////    }
////  window.onerror = function myErrorHandler(errorMsg, url, lineNumber) {
////      LogError("UNHANDLEDERROR: " + errorMsg + " (" + lineNumber + ")");
////      return false;
////  }
//////
////// Set local stored slide
//////
////export function setLocalSlide(index, data)
////{
////    try {
////        var json = JSON.stringify(data);
////        localStorage.setItem("slide" + index, LZString.compress(json));
////    }
////    catch (err) {
////        Log("setSlide: " + err);
////    }
////}
//////
////// Get locally stored slide
//////
////export function getLocalSlide(pairCode, index) {
////    if (typeof (Storage) !== "undefined") {
////        try {
////            for (var i = index; i < 20; i++) 
////            {
////                var json = localStorage.getItem("slide" + i);
////                if (json) {
////                    json = LZString.decompress(json);
////                    var newslide = JSON.parse(json);
////                    if (newslide && newslide.PairCode != pairCode)
////                      return null;
////                    return newslide;
////                }
////            }
////            for (var i2 = 0; i < index; i++) 
////            {
////                var json = localStorage.getItem("slide" + i2);
////                if (json) {
////                    json = LZString.decompress(json);
////                    var newslide = JSON.parse(json);
////                    return newslide;
////                }
////            }
////            return null;
////        }
////        catch (err) {
////            LogError("getLocalSlide:" + err);
////        }
////    }
////}
////  //
////  // Generate a report about how much local storage is in use
////  //
////  export function localStorageReport()
////  {
////      try {
////          var localstoragecontent = '';
////          var _lsTotal = 0;
////          var _xLen;
////          var _x;
////          var first = true;
////          for (_x in localStorage) {
////              _xLen = ((localStorage[_x].length + _x.length) * 2);
////              if (_xLen > 0) {
////                  var name = _x.substr(0, 50);
////                  switch(name)
////                  {
////                      case "getItem": break;
////                      case "setItem": break;
////                      case "removeItem": break;
////                      case "clear": break;
////                      case "key": break;
////                      default:
////                          if (!first) localstoragecontent += ', ';
////                          first = false;
////                          _lsTotal += _xLen;
////                          localstoragecontent += name + " = " + (_xLen / 1024).toFixed(2) + " KB";
////                          break;
////                  }
////              }
////          }
////          localstoragecontent = "Total = " + (_lsTotal / 1024).toFixed(2) + " KB, " + localstoragecontent;
////          //LogInternal(7, "localStorage", localstoragecontent);
////      }
////      catch (err) {
////          LogError("localStorage:" + err);
////      }
////  }
////}
//# sourceMappingURL=main.js.map