Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! function(e) {
- if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
- else if ("function" == typeof define && define.amd) define([], e);
- else {
- var t;
- t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.qwest = e()
- }
- }(function() {
- var e;
- return function t(e, n, a) {
- function o(r, c) {
- if (!n[r]) {
- if (!e[r]) {
- var s = "function" == typeof require && require;
- if (!c && s) return s(r, !0);
- if (i) return i(r, !0);
- var u = new Error("Cannot find module '" + r + "'");
- throw u.code = "MODULE_NOT_FOUND", u
- }
- var l = n[r] = {
- exports: {}
- };
- e[r][0].call(l.exports, function(t) {
- var n = e[r][1][t];
- return o(n ? n : t)
- }, l, l.exports, t, e, n, a)
- }
- return n[r].exports
- }
- for (var i = "function" == typeof require && require, r = 0; r < a.length; r++) o(a[r]);
- return o
- }({
- 1: [function(t, n, a) {
- ! function(t) {
- "use strict";
- var a = function(e) {
- var t = function(e, t, n) {
- n = "function" == typeof n ? n() : null === n ? "" : void 0 === n ? "" : n, e[e.length] = encodeURIComponent(t) + "=" + encodeURIComponent(n)
- },
- n = function(e, a, o) {
- var i, r, c;
- if ("[object Array]" === Object.prototype.toString.call(a))
- for (i = 0, r = a.length; r > i; i++) n(e + "[" + ("object" == typeof a[i] ? i : "") + "]", a[i], o);
- else if (a && "[object Object]" === a.toString())
- for (c in a) a.hasOwnProperty(c) && (e ? n(e + "[" + c + "]", a[c], o, t) : n(c, a[c], o, t));
- else if (e) t(o, e, a);
- else
- for (c in a) t(o, c, a[c]);
- return o
- };
- return n("", e, []).join("&").replace(/%20/g, "+")
- };
- "object" == typeof n && "object" == typeof n.exports ? n.exports = a : "function" == typeof e && e.amd ? e([], function() {
- return a
- }) : t.param = a
- }(this)
- }, {}],
- 2: [function(e, t, n) {
- ! function(e) {
- function t(e) {
- return "function" == typeof e
- }
- function n(e) {
- return "object" == typeof e
- }
- function a(e) {
- "undefined" != typeof setImmediate ? setImmediate(e) : "undefined" != typeof process && process.nextTick ? process.nextTick(e) : setTimeout(e, 0)
- }
- var o;
- e[0][e[1]] = function i(e) {
- var r, c = [],
- s = [],
- u = function(e, t) {
- return null == r && null != e && (r = e, c = t, s.length && a(function() {
- for (var e = 0; e < s.length; e++) s[e]()
- })), r
- };
- return u.then = function(u, l) {
- var d = i(e),
- f = function() {
- function e(a) {
- var i, r = 0;
- try {
- if (a && (n(a) || t(a)) && t(i = a.then)) {
- if (a === d) throw new TypeError;
- i.call(a, function() {
- r++ || e.apply(o, arguments)
- }, function(e) {
- r++ || d(!1, [e])
- })
- } else d(!0, arguments)
- } catch (c) {
- r++ || d(!1, [c])
- }
- }
- try {
- var a = r ? u : l;
- t(a) ? e(a.apply(o, c || [])) : d(r, c)
- } catch (i) {
- d(!1, [i])
- }
- };
- return null != r ? a(f) : s.push(f), d
- }, e && (u = e(u)), u
- }
- }("undefined" == typeof t ? [window, "pinkySwear"] : [t, "exports"])
- }, {}],
- qwest: [function(e, t, n) {
- t.exports = function() {
- var t = "undefined" != typeof window ? window : self,
- n = e("pinkyswear"),
- a = e("jquery-param"),
- o = {},
- i = "json",
- r = "post",
- c = null,
- s = 0,
- u = [],
- l = t.XMLHttpRequest ? function() {
- return new t.XMLHttpRequest
- } : function() {
- return new ActiveXObject("Microsoft.XMLHTTP")
- },
- d = "" === l().responseType,
- f = function(e, f, p, m, g) {
- e = e.toUpperCase(), p = p || null, m = m || {};
- for (var h in o)
- if (!(h in m))
- if ("object" == typeof o[h] && "object" == typeof m[h])
- for (var v in o[h]) m[h][v] = o[h][v];
- else m[h] = o[h];
- var y, w, b, T, M, x = !1,
- k = !1,
- L = !1,
- q = 0,
- _ = {},
- E = {
- text: "*/*",
- xml: "text/xml",
- json: "application/json",
- post: "application/x-www-form-urlencoded",
- document: "text/html"
- },
- C = {
- text: "*/*",
- xml: "application/xml; q=1.0, text/xml; q=0.8, */*; q=0.1",
- json: "application/json; q=1.0, text/*; q=0.8, */*; q=0.1"
- },
- D = !1,
- j = n(function(n) {
- return n.abort = function() {
- L || (w && 4 != w.readyState && w.abort(), D && (--s, D = !1), L = !0)
- }, n.send = function() {
- if (!D) {
- if (s == c) return void u.push(n);
- if (L) return void(u.length && u.shift().send());
- if (++s, D = !0, w = l(), y && ("withCredentials" in w || !t.XDomainRequest || (w = new XDomainRequest, k = !0, "GET" != e && "POST" != e && (e = "POST"))), k ? w.open(e, f) : (w.open(e, f, m.async, m.user, m.password), d && m.async && (w.withCredentials = m.withCredentials)), !k)
- for (var a in _) _[a] && w.setRequestHeader(a, _[a]);
- if (d && "auto" != m.responseType) try {
- w.responseType = m.responseType, x = w.responseType == m.responseType
- } catch (o) {}
- d || k ? (w.onload = P, w.onerror = S, k && (w.onprogress = function() {})) : w.onreadystatechange = function() {
- 4 == w.readyState && P()
- }, m.async ? "timeout" in w ? (w.timeout = m.timeout, w.ontimeout = A) : b = setTimeout(A, m.timeout) : k && (w.ontimeout = function() {}), "auto" != m.responseType && "overrideMimeType" in w && w.overrideMimeType(E[m.responseType]), g && g(w), k ? setTimeout(function() {
- w.send("GET" != e ? p : null)
- }, 0) : w.send("GET" != e ? p : null)
- }
- }, n
- }),
- P = function() {
- var e;
- if (D = !1, clearTimeout(b), u.length && u.shift().send(), !L) {
- --s;
- try {
- if (x) {
- if ("response" in w && null === w.response) throw "The request response is empty";
- M = w.response
- } else {
- if (e = m.responseType, "auto" == e)
- if (k) e = i;
- else {
- var n = w.getResponseHeader("Content-Type") || "";
- e = n.indexOf(E.json) > -1 ? "json" : n.indexOf(E.xml) > -1 ? "xml" : "text"
- }
- switch (e) {
- case "json":
- if (w.responseText.length) try {
- M = "JSON" in t ? JSON.parse(w.responseText) : new Function("return (" + w.responseText + ")")()
- } catch (a) {
- throw "Error while parsing JSON body : " + a
- }
- break;
- case "xml":
- try {
- t.DOMParser ? M = (new DOMParser).parseFromString(w.responseText, "text/xml") : (M = new ActiveXObject("Microsoft.XMLDOM"), M.async = "false", M.loadXML(w.responseText))
- } catch (a) {
- M = void 0
- }
- if (!M || !M.documentElement || M.getElementsByTagName("parsererror").length) throw "Invalid XML";
- break;
- default:
- M = w.responseText
- }
- }
- if ("status" in w && !/^2|1223/.test(w.status)) throw w.status + " (" + w.statusText + ")";
- j(!0, [w, M])
- } catch (a) {
- j(!1, [a, w, M])
- }
- }
- },
- S = function(e) {
- L || (e = "string" == typeof e ? e : "Connection aborted", j.abort(), j(!1, [new Error(e), w, null]))
- },
- A = function() {
- L || (m.attempts && ++q == m.attempts ? S("Timeout (" + f + ")") : (w.abort(), D = !1, j.send()))
- };
- if (m.async = !("async" in m) || !!m.async, m.cache = "cache" in m && !!m.cache, m.dataType = "dataType" in m ? m.dataType.toLowerCase() : r, m.responseType = "responseType" in m ? m.responseType.toLowerCase() : "auto", m.user = m.user || "", m.password = m.password || "", m.withCredentials = !!m.withCredentials, m.timeout = "timeout" in m ? parseInt(m.timeout, 10) : 3e4, m.attempts = "attempts" in m ? parseInt(m.attempts, 10) : 1, T = f.match(/\/\/(.+?)\//), y = T && !!T[1] && T[1] != location.host, "ArrayBuffer" in t && p instanceof ArrayBuffer ? m.dataType = "arraybuffer" : "Blob" in t && p instanceof Blob ? m.dataType = "blob" : "Document" in t && p instanceof Document ? m.dataType = "document" : "FormData" in t && p instanceof FormData && (m.dataType = "formdata"), null !== p) switch (m.dataType) {
- case "json":
- p = JSON.stringify(p);
- break;
- case "post":
- p = a(p)
- }
- if (m.headers) {
- var O = function(e, t, n) {
- return t + n.toUpperCase()
- };
- for (T in m.headers) _[T.replace(/(^|-)([^-])/g, O)] = m.headers[T]
- }
- return "Content-Type" in _ || "GET" == e || m.dataType in E && E[m.dataType] && (_["Content-Type"] = E[m.dataType]), _.Accept || (_.Accept = m.responseType in C ? C[m.responseType] : "*/*"), y || "X-Requested-With" in _ || (_["X-Requested-With"] = "XMLHttpRequest"), m.cache || "Cache-Control" in _ || (_["Cache-Control"] = "no-cache"), "GET" == e && p && "string" == typeof p && (f += (/\?/.test(f) ? "&" : "?") + p), m.async && j.send(), j
- },
- p = function(e) {
- var t = [],
- a = 0,
- o = [];
- return n(function(n) {
- var i = -1,
- r = function(e) {
- return function(r, c, s, u) {
- var l = ++i;
- return ++a, t.push(f(e, n.base + r, c, s, u).then(function(e, t) {
- o[l] = arguments, --a || n(!0, 1 == o.length ? o[0] : [o])
- }, function() {
- n(!1, arguments)
- })), n
- }
- };
- n.get = r("GET"), n.post = r("POST"), n.put = r("PUT"), n["delete"] = r("DELETE"), n["catch"] = function(e) {
- return n.then(null, e)
- }, n.complete = function(e) {
- var t = function() {
- e()
- };
- return n.then(t, t)
- }, n.map = function(e, t, n, a, o) {
- return r(e.toUpperCase()).call(this, t, n, a, o)
- };
- for (var c in e) c in n || (n[c] = e[c]);
- return n.send = function() {
- for (var e = 0, a = t.length; a > e; ++e) t[e].send();
- return n
- }, n.abort = function() {
- for (var e = 0, a = t.length; a > e; ++e) t[e].abort();
- return n
- }, n
- })
- },
- m = {
- base: "",
- get: function() {
- return p(m).get.apply(this, arguments)
- },
- post: function() {
- return p(m).post.apply(this, arguments)
- },
- put: function() {
- return p(m).put.apply(this, arguments)
- },
- "delete": function() {
- return p(m)["delete"].apply(this, arguments)
- },
- map: function() {
- return p(m).map.apply(this, arguments)
- },
- xhr2: d,
- limit: function(e) {
- return c = e, m
- },
- setDefaultOptions: function(e) {
- return o = e, m
- },
- setDefaultXdrResponseType: function(e) {
- return i = e.toLowerCase(), m
- },
- setDefaultDataType: function(e) {
- return r = e.toLowerCase(), m
- },
- getOpenRequests: function() {
- return s
- }
- };
- return m
- }()
- }, {
- "jquery-param": 1,
- pinkyswear: 2
- }]
- }, {}, [1, 2])("qwest")
- });
- try {
- var ce = new window.CustomEvent("test");
- if (ce.preventDefault(), ce.defaultPrevented !== !0) throw new Error("Could not prevent default")
- } catch (e) {
- var CustomEvent = function(e, t) {
- var n, a;
- return t = t || {
- bubbles: !1,
- cancelable: !1,
- detail: void 0
- }, n = document.createEvent("CustomEvent"), n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), a = n.preventDefault, n.preventDefault = function() {
- a.call(this);
- try {
- Object.defineProperty(this, "defaultPrevented", {
- get: function() {
- return !0
- }
- })
- } catch (e) {
- this.defaultPrevented = !0
- }
- }, n
- };
- CustomEvent.prototype = window.Event.prototype, window.CustomEvent = CustomEvent
- }! function(e) {
- function t(e, t) {
- return e.filter(function(e) {
- return 0 === t.filter(function(t) {
- return t.id === e.id
- }).length
- })
- }
- function n(t) {
- t.forEach(function(t) {
- var n = document.querySelector('[data-announcement-item-id="' + t.id + '"]');
- e.util.fade(n, "out", 500, function() {
- n.parentNode.removeChild(n)
- })
- })
- }
- function a(t, n) {
- var a, i = document.querySelector(".announcement-content"),
- r = e.announcementManager.data;
- t.forEach(function(t, c) {
- var s = document.querySelector('[data-announcement-item-id="' + t.id + '"]');
- s ? (a = r.filter(function(e) {
- return e.id === t.id
- })[0], a.text[e.announcementManager.locale] !== t.text[n] && e.util.fade(s, "out", 500, function() {
- s.innerHTML = t.text[n], e.util.fade(s, "in", 500)
- })) : (s = o(t, n), s = 0 === c ? i.insertAdjacentHTML("afterbegin", s) : i.querySelector(".announcement-item:nth-child(" + c + ")").insertAdjacentHTML("afterend", s), s = document.querySelector('[data-announcement-item-id="' + t.id + '"]'), e.util.fade(s, "out", 500, function() {
- e.util.fade(s, "in", 500)
- }))
- })
- }
- function o(e, t) {
- return ['<div class="announcement-item" data-announcement-item-id="', e.id, '">', e.text[t], "</div>"].join("")
- }
- function i() {
- var o = e.queueData.content.announcements,
- i = e.langManager.locale;
- if (0 !== o.length || 0 !== e.announcementManager.data.length) {
- var r = t(e.announcementManager.data, o);
- r.length > 0 && n(r), a(o, i), e.announcementManager.data = o, e.announcementManager.locale = i
- }
- }
- e.announcementManager = {
- data: [],
- locale: "",
- renderAnnouncements: i
- }
- }(window.PL),
- function() {
- "document" in self && ("classList" in document.createElement("_") && (!document.createElementNS || "classList" in document.createElementNS("http://www.w3.org/2000/svg", "g")) ? ! function() {
- "use strict";
- var e = document.createElement("_");
- if (e.classList.add("c1", "c2"), !e.classList.contains("c2")) {
- var t = function(e) {
- var t = DOMTokenList.prototype[e];
- DOMTokenList.prototype[e] = function(e) {
- var n, a = arguments.length;
- for (n = 0; n < a; n++) e = arguments[n], t.call(this, e)
- }
- };
- t("add"), t("remove")
- }
- if (e.classList.toggle("c3", !1), e.classList.contains("c3")) {
- var n = DOMTokenList.prototype.toggle;
- DOMTokenList.prototype.toggle = function(e, t) {
- return 1 in arguments && !this.contains(e) == !t ? t : n.call(this, e)
- }
- }
- e = null
- }() : ! function(e) {
- "use strict";
- if ("Element" in e) {
- var t = "classList",
- n = "prototype",
- a = e.Element[n],
- o = Object,
- i = String[n].trim || function() {
- return this.replace(/^\s+|\s+$/g, "")
- },
- r = Array[n].indexOf || function(e) {
- for (var t = 0, n = this.length; t < n; t++)
- if (t in this && this[t] === e) return t;
- return -1
- },
- c = function(e, t) {
- this.name = e, this.code = DOMException[e], this.message = t
- },
- s = function(e, t) {
- if ("" === t) throw new c("SYNTAX_ERR", "An invalid or illegal string was specified");
- if (/\s/.test(t)) throw new c("INVALID_CHARACTER_ERR", "String contains an invalid character");
- return r.call(e, t)
- },
- u = function(e) {
- for (var t = i.call(e.getAttribute("class") || ""), n = t ? t.split(/\s+/) : [], a = 0, o = n.length; a < o; a++) this.push(n[a]);
- this._updateClassName = function() {
- e.setAttribute("class", this.toString())
- }
- },
- l = u[n] = [],
- d = function() {
- return new u(this)
- };
- if (c[n] = Error[n], l.item = function(e) {
- return this[e] || null
- }, l.contains = function(e) {
- return e += "", s(this, e) !== -1
- }, l.add = function() {
- var e, t = arguments,
- n = 0,
- a = t.length,
- o = !1;
- do e = t[n] + "", s(this, e) === -1 && (this.push(e), o = !0); while (++n < a);
- o && this._updateClassName()
- }, l.remove = function() {
- var e, t, n = arguments,
- a = 0,
- o = n.length,
- i = !1;
- do
- for (e = n[a] + "", t = s(this, e); t !== -1;) this.splice(t, 1), i = !0, t = s(this, e); while (++a < o);
- i && this._updateClassName()
- }, l.toggle = function(e, t) {
- e += "";
- var n = this.contains(e),
- a = n ? t !== !0 && "remove" : t !== !1 && "add";
- return a && this[a](e), t === !0 || t === !1 ? t : !n
- }, l.toString = function() {
- return this.join(" ")
- }, o.defineProperty) {
- var f = {
- get: d,
- enumerable: !0,
- configurable: !0
- };
- try {
- o.defineProperty(a, t, f)
- } catch (p) {
- p.number === -2146823252 && (f.enumerable = !1, o.defineProperty(a, t, f))
- }
- } else o[n].__defineGetter__ && a.__defineGetter__(t, d)
- }
- }(self))
- }(),
- function(e, t) {
- t.isMobileBrowser = /(android|bb\d+|meego).+mobile|android|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0, 4))
- }(navigator.userAgent || navigator.vendor || window.opera, window.PL),
- function(e) {
- function t() {
- var e = {};
- return window.location.search.replace(/([^?=&]+)(=([^&]*))?/g, function(t, n, a, o) {
- e[n] = o
- }), e
- }
- function n(e) {
- return delete e.event_id, delete e.point_of_sale_id, delete e.token, e
- }
- function a(e) {
- var t, n = "";
- for (t in e) n += "&" + t + "=" + e[t];
- return n
- }
- function o(e) {
- var o, i = n(t());
- i = r(i), o = a(i), e += o, document.location.href = e
- }
- e.foManager = {
- loadFrontoffice: o
- };
- var i = function(e) {
- var t = {};
- return e.replace(/([^#&]+)/g, function(e) {
- var n = e.split(/=(.+)?/),
- a = n[0],
- o = n[1];
- t[a] = o
- }), t
- },
- r = function(e) {
- var t = i(window.location.hash);
- return e.pld = t.pld, e
- }
- }(window.PL),
- function(e) {
- function t(e, t) {
- _gaq.push(["paylogic._trackTiming", "Permanent Queue", "AJAX update", e, t, 20])
- }
- function n(t) {
- o.forEach(function(n) {
- _gaq.push([n + "._trackPageview", (e.eventName || "default") + "/" + t])
- })
- }
- function a() {
- o.forEach(function(e) {
- _gaq.push([e + "._trackEvent", "Permanent Queue", "Ping"])
- })
- }
- var o = [];
- e.gaManager = {
- sendGAPage: n,
- sendGATiming: t
- }, e.analytics.paylogic_tracker_id && (o.push("paylogic"), _gaq.push(["paylogic._setAccount", e.analytics.paylogic_tracker_id])), e.analytics.event_tracker_id && (o.push("event"), _gaq.push(["event._setAccount", e.analytics.event_tracker_id])), setInterval(a, 3e5), n("landing")
- }(window.PL),
- function(e) {
- function t() {
- n(a.value), document.dispatchEvent(new CustomEvent("lang-changed"))
- }
- function n(t) {
- e.langManager.locale = t, a && a.value !== t && (a.value = t)
- }
- var a = document.querySelector("#lang");
- a && a.addEventListener("change", t), e.langManager = {
- setLocale: n,
- locale: null
- }
- }(window.PL),
- function(e) {
- function t(t, n) {
- var a = n[t];
- return a[e.langManager.locale] || a[n.enabled_languages[0]]
- }
- function n(e) {
- return !e || (new Date).getTime() >= new Date(e).getTime()
- }
- function a() {
- var a = e.queueData.content,
- o = e.langManager.locale,
- s = "not_started",
- u = t("not_started_page", a);
- n(e.queueData.start_date) && (s = a.active_page_name, u = t("active_page", a)), s === i && o === r || (e.util.fade(c, "out", i ? 500 : 0, function() {
- c.innerHTML = u, document.dispatchEvent(new CustomEvent("page-changed")), e.util.fade(c, "in", 500)
- }), i = s, r = o)
- }
- function o() {
- i = "loading", c.innerHTML = '<h2 class="loading">Loading…</h2>', e.util.fade(c, "in", 500)
- }
- var i = null,
- r = null,
- c = document.querySelector(".template-content");
- e.pageManager = {
- renderPage: a,
- loadingMessage: o
- }
- }(window.PL),
- function(e) {
- function t(e) {
- var t = e && e.match(/^.*(?:youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/);
- if (t) return t[1]
- }
- function n() {
- var e = document.querySelectorAll(".yt-player-control"),
- t = document.querySelector("#un-mute"),
- n = document.querySelector("#pause-play");
- t.checked = !1, t.addEventListener("change", o), n.checked = !1, n.addEventListener("change", i), Array.prototype.forEach.call(e, function(e) {
- e.classList.remove("hide")
- })
- }
- function a() {
- c.getPlayerState() === window.YT.PlayerState.CUED && c.playVideo(), c.setVolume(5), n(), r(), window.addEventListener("resize", r)
- }
- function o(e) {
- var t = e.target.checked;
- t ? c.mute() : c.unMute()
- }
- function i(e) {
- var t = e.target.checked;
- t ? c.pauseVideo() : c.playVideo()
- }
- function r() {
- var e, t = {},
- n = {},
- a = document.querySelector(".bg-media"),
- o = document.querySelector(".bg-media iframe");
- t.width = a.offsetWidth, t.height = a.offsetHeight, n.width = t.width, n.height = Math.ceil(Math.ceil(t.width * (9 / 16))), n.marginTop = -((n.height - t.height) / 2), n.marginLeft = 0, e = n.height < t.height, e && (n.height = t.height, n.width = Math.floor(Math.floor(t.height * (16 / 9))), n.marginTop = 0, n.marginLeft = -((n.width - t.width) / 2)), o.style.width = n.width + "px", o.style.height = n.height + "px", o.style.marginTop = n.marginTop + "px", o.style.marginLeft = n.marginLeft + "px"
- }
- var c;
- window.onYouTubeIframeAPIReady = function() {
- var n = t(e.media.youtube_url);
- n && !e.isMobileBrowser && (c = new window.YT.Player("bgMediaFrame", {
- width: "100%",
- height: "100%",
- playerVars: {
- autoplay: 1,
- controls: 0,
- loop: 1,
- showinfo: 0,
- rel: 0,
- playlist: n
- },
- videoId: n,
- events: {
- onReady: a
- }
- }))
- }
- }(window.PL),
- function(e) {
- function t() {
- var t, i = document.createDocumentFragment();
- if (e.media.images && 0 !== e.media.images.length && (!e.media.youtube_url || e.isMobileBrowser)) {
- for (var s = 0, u = e.media.images.length; s < u; s++) t = document.createElement("div"), t.classList.add("bg-slide"), i.appendChild(t), c.push(t);
- document.querySelector(".bg-media").appendChild(i), n(), o = setInterval(a, r), a()
- }
- }
- function n(t) {
- var a = new Image;
- t = t || 0, t !== e.media.images.length && (a.src = e.media.images[t], a.addEventListener("load", function() {
- var e = c[t];
- e.style.backgroundImage = ["url(", this.src, ")"].join(""), e.classList.add("loaded"), t++, n(t)
- }))
- }
- function a() {
- var t = document.querySelector(".bg-slide.active");
- return t && t.classList.toggle("active"), c[i].classList.toggle("active"), 1 === e.media.images.length ? void clearInterval(o) : (i++, void(i === e.media.images.length && (i = 0)))
- }
- var o, i = 0,
- r = 8e3,
- c = [];
- t()
- }(window.PL),
- function(e) {
- function t(e) {
- var t;
- clearTimeout(d), e && (t = new Date(e).getTime() - (new Date).getTime(), t > 0 && (d = setTimeout(c, t)))
- }
- function n(e) {
- var t = new Date;
- f = e, t.setMinutes(t.getMinutes() + 10), document.cookie = "token=" + e + "; expires=" + t.toUTCString(), a() || (document.cookie = "token=" + e)
- }
- function a() {
- for (var e = document.cookie.split(";"), t = 0, n = e.length; t < n; t++) {
- var a = e[t],
- o = a.substr(0, a.indexOf("="));
- if ("token" == o.replace(/ /g, "")) return a.substr(a.indexOf("=") + 1)
- }
- return f
- }
- function o() {
- var t = a(),
- n = {
- now: (new Date).getTime()
- };
- t && (n.token = t), e.queueData || (l = setTimeout(e.pageManager.loadingMessage, 1500)), qwest.get(e.refreshUrl, n).then(function(e, t) {
- clearTimeout(l);
- try {
- s(t, i(n.now))
- } catch (a) {
- r(12e4), console.error(a)
- }
- })["catch"](function() {
- e.gaManager.sendGATiming(i(n.now), "failed"), r()
- })
- }
- function i(e) {
- return (new Date).getTime() - e
- }
- function r(e) {
- clearTimeout(u), u = setTimeout(o, e || 2e4 * Math.random())
- }
- function c() {
- e.pageManager.renderPage(), e.announcementManager.renderAnnouncements()
- }
- function s(a, o) {
- 0 === Object.keys(a).length ? (e.gaManager.sendGATiming(o, "no data"), r()) : (e.queueData = a, a.redirect ? (n(""), e.gaManager.sendGATiming(o, "redirect"), e.foManager.loadFrontoffice(a.redirect)) : (n(a.token || ""), t(a.start_date), e.gaManager.sendGATiming(o, "success"), null === e.langManager.locale && e.langManager.setLocale(a.content.locale), c(), r(a.refresh_seconds ? 1e3 * a.refresh_seconds : 3e4 + 6e4 * Math.random())))
- }
- var u = null,
- l = null,
- d = null,
- f = null;
- qwest.setDefaultOptions({
- responseType: "json",
- timeout: 6e4,
- cache: !0
- }), u = setTimeout(o, Math.random()), document.addEventListener("lang-changed", c), document.addEventListener("page-changed", function() {
- e.gaManager.sendGAPage(e.queueData.content.active_page_name)
- })
- }(window.PL),
- function(e) {
- function t(e, t, n, a) {
- function o() {
- r = i ? r + s : r - s, e.style.opacity = r, r <= 0 && (e.style.display = "none"), (r <= 0 || r >= 1) && (clearInterval(u), a && a.call(this))
- }
- var i = "in" === t,
- r = i ? 0 : 1,
- c = 16,
- s = c / n;
- i && (e.style.display = "block", e.style.opacity = r);
- var u = setInterval(o, c)
- }
- e.util = {
- fade: t
- }
- }(window.PL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement