Advertisement
Guest User

Untitled

a guest
Jan 30th, 2017
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.40 KB | None | 0 0
  1. function(e) {
  2. if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
  3. else if ("function" == typeof define && define.amd) define([], e);
  4. else {
  5. var t;
  6. t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, t.qwest = e()
  7. }
  8. }(function() {
  9. var e;
  10. return function t(e, n, a) {
  11. function o(r, c) {
  12. if (!n[r]) {
  13. if (!e[r]) {
  14. var s = "function" == typeof require && require;
  15. if (!c && s) return s(r, !0);
  16. if (i) return i(r, !0);
  17. var u = new Error("Cannot find module '" + r + "'");
  18. throw u.code = "MODULE_NOT_FOUND", u
  19. }
  20. var l = n[r] = {
  21. exports: {}
  22. };
  23. e[r][0].call(l.exports, function(t) {
  24. var n = e[r][1][t];
  25. return o(n ? n : t)
  26. }, l, l.exports, t, e, n, a)
  27. }
  28. return n[r].exports
  29. }
  30. for (var i = "function" == typeof require && require, r = 0; r < a.length; r++) o(a[r]);
  31. return o
  32. }({
  33. 1: [function(t, n, a) {
  34. ! function(t) {
  35. "use strict";
  36. var a = function(e) {
  37. var t = function(e, t, n) {
  38. n = "function" == typeof n ? n() : null === n ? "" : void 0 === n ? "" : n, e[e.length] = encodeURIComponent(t) + "=" + encodeURIComponent(n)
  39. },
  40. n = function(e, a, o) {
  41. var i, r, c;
  42. if ("[object Array]" === Object.prototype.toString.call(a))
  43. for (i = 0, r = a.length; r > i; i++) n(e + "[" + ("object" == typeof a[i] ? i : "") + "]", a[i], o);
  44. else if (a && "[object Object]" === a.toString())
  45. for (c in a) a.hasOwnProperty(c) && (e ? n(e + "[" + c + "]", a[c], o, t) : n(c, a[c], o, t));
  46. else if (e) t(o, e, a);
  47. else
  48. for (c in a) t(o, c, a[c]);
  49. return o
  50. };
  51. return n("", e, []).join("&").replace(/%20/g, "+")
  52. };
  53. "object" == typeof n && "object" == typeof n.exports ? n.exports = a : "function" == typeof e && e.amd ? e([], function() {
  54. return a
  55. }) : t.param = a
  56. }(this)
  57. }, {}],
  58. 2: [function(e, t, n) {
  59. ! function(e) {
  60. function t(e) {
  61. return "function" == typeof e
  62. }
  63.  
  64. function n(e) {
  65. return "object" == typeof e
  66. }
  67.  
  68. function a(e) {
  69. "undefined" != typeof setImmediate ? setImmediate(e) : "undefined" != typeof process && process.nextTick ? process.nextTick(e) : setTimeout(e, 0)
  70. }
  71. var o;
  72. e[0][e[1]] = function i(e) {
  73. var r, c = [],
  74. s = [],
  75. u = function(e, t) {
  76. return null == r && null != e && (r = e, c = t, s.length && a(function() {
  77. for (var e = 0; e < s.length; e++) s[e]()
  78. })), r
  79. };
  80. return u.then = function(u, l) {
  81. var d = i(e),
  82. f = function() {
  83. function e(a) {
  84. var i, r = 0;
  85. try {
  86. if (a && (n(a) || t(a)) && t(i = a.then)) {
  87. if (a === d) throw new TypeError;
  88. i.call(a, function() {
  89. r++ || e.apply(o, arguments)
  90. }, function(e) {
  91. r++ || d(!1, [e])
  92. })
  93. } else d(!0, arguments)
  94. } catch (c) {
  95. r++ || d(!1, [c])
  96. }
  97. }
  98. try {
  99. var a = r ? u : l;
  100. t(a) ? e(a.apply(o, c || [])) : d(r, c)
  101. } catch (i) {
  102. d(!1, [i])
  103. }
  104. };
  105. return null != r ? a(f) : s.push(f), d
  106. }, e && (u = e(u)), u
  107. }
  108. }("undefined" == typeof t ? [window, "pinkySwear"] : [t, "exports"])
  109. }, {}],
  110. qwest: [function(e, t, n) {
  111. t.exports = function() {
  112. var t = "undefined" != typeof window ? window : self,
  113. n = e("pinkyswear"),
  114. a = e("jquery-param"),
  115. o = {},
  116. i = "json",
  117. r = "post",
  118. c = null,
  119. s = 0,
  120. u = [],
  121. l = t.XMLHttpRequest ? function() {
  122. return new t.XMLHttpRequest
  123. } : function() {
  124. return new ActiveXObject("Microsoft.XMLHTTP")
  125. },
  126. d = "" === l().responseType,
  127. f = function(e, f, p, m, g) {
  128. e = e.toUpperCase(), p = p || null, m = m || {};
  129. for (var h in o)
  130. if (!(h in m))
  131. if ("object" == typeof o[h] && "object" == typeof m[h])
  132. for (var v in o[h]) m[h][v] = o[h][v];
  133. else m[h] = o[h];
  134. var y, w, b, T, M, x = !1,
  135. k = !1,
  136. L = !1,
  137. q = 0,
  138. _ = {},
  139. E = {
  140. text: "*/*",
  141. xml: "text/xml",
  142. json: "application/json",
  143. post: "application/x-www-form-urlencoded",
  144. document: "text/html"
  145. },
  146. C = {
  147. text: "*/*",
  148. xml: "application/xml; q=1.0, text/xml; q=0.8, */*; q=0.1",
  149. json: "application/json; q=1.0, text/*; q=0.8, */*; q=0.1"
  150. },
  151. D = !1,
  152. j = n(function(n) {
  153. return n.abort = function() {
  154. L || (w && 4 != w.readyState && w.abort(), D && (--s, D = !1), L = !0)
  155. }, n.send = function() {
  156. if (!D) {
  157. if (s == c) return void u.push(n);
  158. if (L) return void(u.length && u.shift().send());
  159. 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)
  160. for (var a in _) _[a] && w.setRequestHeader(a, _[a]);
  161. if (d && "auto" != m.responseType) try {
  162. w.responseType = m.responseType, x = w.responseType == m.responseType
  163. } catch (o) {}
  164. d || k ? (w.onload = P, w.onerror = S, k && (w.onprogress = function() {})) : w.onreadystatechange = function() {
  165. 4 == w.readyState && P()
  166. }, 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() {
  167. w.send("GET" != e ? p : null)
  168. }, 0) : w.send("GET" != e ? p : null)
  169. }
  170. }, n
  171. }),
  172. P = function() {
  173. var e;
  174. if (D = !1, clearTimeout(b), u.length && u.shift().send(), !L) {
  175. --s;
  176. try {
  177. if (x) {
  178. if ("response" in w && null === w.response) throw "The request response is empty";
  179. M = w.response
  180. } else {
  181. if (e = m.responseType, "auto" == e)
  182. if (k) e = i;
  183. else {
  184. var n = w.getResponseHeader("Content-Type") || "";
  185. e = n.indexOf(E.json) > -1 ? "json" : n.indexOf(E.xml) > -1 ? "xml" : "text"
  186. }
  187. switch (e) {
  188. case "json":
  189. if (w.responseText.length) try {
  190. M = "JSON" in t ? JSON.parse(w.responseText) : new Function("return (" + w.responseText + ")")()
  191. } catch (a) {
  192. throw "Error while parsing JSON body : " + a
  193. }
  194. break;
  195. case "xml":
  196. try {
  197. t.DOMParser ? M = (new DOMParser).parseFromString(w.responseText, "text/xml") : (M = new ActiveXObject("Microsoft.XMLDOM"), M.async = "false", M.loadXML(w.responseText))
  198. } catch (a) {
  199. M = void 0
  200. }
  201. if (!M || !M.documentElement || M.getElementsByTagName("parsererror").length) throw "Invalid XML";
  202. break;
  203. default:
  204. M = w.responseText
  205. }
  206. }
  207. if ("status" in w && !/^2|1223/.test(w.status)) throw w.status + " (" + w.statusText + ")";
  208. j(!0, [w, M])
  209. } catch (a) {
  210. j(!1, [a, w, M])
  211. }
  212. }
  213. },
  214. S = function(e) {
  215. L || (e = "string" == typeof e ? e : "Connection aborted", j.abort(), j(!1, [new Error(e), w, null]))
  216. },
  217. A = function() {
  218. L || (m.attempts && ++q == m.attempts ? S("Timeout (" + f + ")") : (w.abort(), D = !1, j.send()))
  219. };
  220. 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) {
  221. case "json":
  222. p = JSON.stringify(p);
  223. break;
  224. case "post":
  225. p = a(p)
  226. }
  227. if (m.headers) {
  228. var O = function(e, t, n) {
  229. return t + n.toUpperCase()
  230. };
  231. for (T in m.headers) _[T.replace(/(^|-)([^-])/g, O)] = m.headers[T]
  232. }
  233. 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
  234. },
  235. p = function(e) {
  236. var t = [],
  237. a = 0,
  238. o = [];
  239. return n(function(n) {
  240. var i = -1,
  241. r = function(e) {
  242. return function(r, c, s, u) {
  243. var l = ++i;
  244. return ++a, t.push(f(e, n.base + r, c, s, u).then(function(e, t) {
  245. o[l] = arguments, --a || n(!0, 1 == o.length ? o[0] : [o])
  246. }, function() {
  247. n(!1, arguments)
  248. })), n
  249. }
  250. };
  251. n.get = r("GET"), n.post = r("POST"), n.put = r("PUT"), n["delete"] = r("DELETE"), n["catch"] = function(e) {
  252. return n.then(null, e)
  253. }, n.complete = function(e) {
  254. var t = function() {
  255. e()
  256. };
  257. return n.then(t, t)
  258. }, n.map = function(e, t, n, a, o) {
  259. return r(e.toUpperCase()).call(this, t, n, a, o)
  260. };
  261. for (var c in e) c in n || (n[c] = e[c]);
  262. return n.send = function() {
  263. for (var e = 0, a = t.length; a > e; ++e) t[e].send();
  264. return n
  265. }, n.abort = function() {
  266. for (var e = 0, a = t.length; a > e; ++e) t[e].abort();
  267. return n
  268. }, n
  269. })
  270. },
  271. m = {
  272. base: "",
  273. get: function() {
  274. return p(m).get.apply(this, arguments)
  275. },
  276. post: function() {
  277. return p(m).post.apply(this, arguments)
  278. },
  279. put: function() {
  280. return p(m).put.apply(this, arguments)
  281. },
  282. "delete": function() {
  283. return p(m)["delete"].apply(this, arguments)
  284. },
  285. map: function() {
  286. return p(m).map.apply(this, arguments)
  287. },
  288. xhr2: d,
  289. limit: function(e) {
  290. return c = e, m
  291. },
  292. setDefaultOptions: function(e) {
  293. return o = e, m
  294. },
  295. setDefaultXdrResponseType: function(e) {
  296. return i = e.toLowerCase(), m
  297. },
  298. setDefaultDataType: function(e) {
  299. return r = e.toLowerCase(), m
  300. },
  301. getOpenRequests: function() {
  302. return s
  303. }
  304. };
  305. return m
  306. }()
  307. }, {
  308. "jquery-param": 1,
  309. pinkyswear: 2
  310. }]
  311. }, {}, [1, 2])("qwest")
  312. });
  313. try {
  314. var ce = new window.CustomEvent("test");
  315. if (ce.preventDefault(), ce.defaultPrevented !== !0) throw new Error("Could not prevent default")
  316. } catch (e) {
  317. var CustomEvent = function(e, t) {
  318. var n, a;
  319. return t = t || {
  320. bubbles: !1,
  321. cancelable: !1,
  322. detail: void 0
  323. }, n = document.createEvent("CustomEvent"), n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), a = n.preventDefault, n.preventDefault = function() {
  324. a.call(this);
  325. try {
  326. Object.defineProperty(this, "defaultPrevented", {
  327. get: function() {
  328. return !0
  329. }
  330. })
  331. } catch (e) {
  332. this.defaultPrevented = !0
  333. }
  334. }, n
  335. };
  336. CustomEvent.prototype = window.Event.prototype, window.CustomEvent = CustomEvent
  337. }! function(e) {
  338. function t(e, t) {
  339. return e.filter(function(e) {
  340. return 0 === t.filter(function(t) {
  341. return t.id === e.id
  342. }).length
  343. })
  344. }
  345.  
  346. function n(t) {
  347. t.forEach(function(t) {
  348. var n = document.querySelector('[data-announcement-item-id="' + t.id + '"]');
  349. e.util.fade(n, "out", 500, function() {
  350. n.parentNode.removeChild(n)
  351. })
  352. })
  353. }
  354.  
  355. function a(t, n) {
  356. var a, i = document.querySelector(".announcement-content"),
  357. r = e.announcementManager.data;
  358. t.forEach(function(t, c) {
  359. var s = document.querySelector('[data-announcement-item-id="' + t.id + '"]');
  360. s ? (a = r.filter(function(e) {
  361. return e.id === t.id
  362. })[0], a.text[e.announcementManager.locale] !== t.text[n] && e.util.fade(s, "out", 500, function() {
  363. s.innerHTML = t.text[n], e.util.fade(s, "in", 500)
  364. })) : (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() {
  365. e.util.fade(s, "in", 500)
  366. }))
  367. })
  368. }
  369.  
  370. function o(e, t) {
  371. return ['<div class="announcement-item" data-announcement-item-id="', e.id, '">', e.text[t], "</div>"].join("")
  372. }
  373.  
  374. function i() {
  375. var o = e.queueData.content.announcements,
  376. i = e.langManager.locale;
  377. if (0 !== o.length || 0 !== e.announcementManager.data.length) {
  378. var r = t(e.announcementManager.data, o);
  379. r.length > 0 && n(r), a(o, i), e.announcementManager.data = o, e.announcementManager.locale = i
  380. }
  381. }
  382. e.announcementManager = {
  383. data: [],
  384. locale: "",
  385. renderAnnouncements: i
  386. }
  387. }(window.PL),
  388. function() {
  389. "document" in self && ("classList" in document.createElement("_") && (!document.createElementNS || "classList" in document.createElementNS("http://www.w3.org/2000/svg", "g")) ? ! function() {
  390. "use strict";
  391. var e = document.createElement("_");
  392. if (e.classList.add("c1", "c2"), !e.classList.contains("c2")) {
  393. var t = function(e) {
  394. var t = DOMTokenList.prototype[e];
  395. DOMTokenList.prototype[e] = function(e) {
  396. var n, a = arguments.length;
  397. for (n = 0; n < a; n++) e = arguments[n], t.call(this, e)
  398. }
  399. };
  400. t("add"), t("remove")
  401. }
  402. if (e.classList.toggle("c3", !1), e.classList.contains("c3")) {
  403. var n = DOMTokenList.prototype.toggle;
  404. DOMTokenList.prototype.toggle = function(e, t) {
  405. return 1 in arguments && !this.contains(e) == !t ? t : n.call(this, e)
  406. }
  407. }
  408. e = null
  409. }() : ! function(e) {
  410. "use strict";
  411. if ("Element" in e) {
  412. var t = "classList",
  413. n = "prototype",
  414. a = e.Element[n],
  415. o = Object,
  416. i = String[n].trim || function() {
  417. return this.replace(/^\s+|\s+$/g, "")
  418. },
  419. r = Array[n].indexOf || function(e) {
  420. for (var t = 0, n = this.length; t < n; t++)
  421. if (t in this && this[t] === e) return t;
  422. return -1
  423. },
  424. c = function(e, t) {
  425. this.name = e, this.code = DOMException[e], this.message = t
  426. },
  427. s = function(e, t) {
  428. if ("" === t) throw new c("SYNTAX_ERR", "An invalid or illegal string was specified");
  429. if (/\s/.test(t)) throw new c("INVALID_CHARACTER_ERR", "String contains an invalid character");
  430. return r.call(e, t)
  431. },
  432. u = function(e) {
  433. 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]);
  434. this._updateClassName = function() {
  435. e.setAttribute("class", this.toString())
  436. }
  437. },
  438. l = u[n] = [],
  439. d = function() {
  440. return new u(this)
  441. };
  442. if (c[n] = Error[n], l.item = function(e) {
  443. return this[e] || null
  444. }, l.contains = function(e) {
  445. return e += "", s(this, e) !== -1
  446. }, l.add = function() {
  447. var e, t = arguments,
  448. n = 0,
  449. a = t.length,
  450. o = !1;
  451. do e = t[n] + "", s(this, e) === -1 && (this.push(e), o = !0); while (++n < a);
  452. o && this._updateClassName()
  453. }, l.remove = function() {
  454. var e, t, n = arguments,
  455. a = 0,
  456. o = n.length,
  457. i = !1;
  458. do
  459. for (e = n[a] + "", t = s(this, e); t !== -1;) this.splice(t, 1), i = !0, t = s(this, e); while (++a < o);
  460. i && this._updateClassName()
  461. }, l.toggle = function(e, t) {
  462. e += "";
  463. var n = this.contains(e),
  464. a = n ? t !== !0 && "remove" : t !== !1 && "add";
  465. return a && this[a](e), t === !0 || t === !1 ? t : !n
  466. }, l.toString = function() {
  467. return this.join(" ")
  468. }, o.defineProperty) {
  469. var f = {
  470. get: d,
  471. enumerable: !0,
  472. configurable: !0
  473. };
  474. try {
  475. o.defineProperty(a, t, f)
  476. } catch (p) {
  477. p.number === -2146823252 && (f.enumerable = !1, o.defineProperty(a, t, f))
  478. }
  479. } else o[n].__defineGetter__ && a.__defineGetter__(t, d)
  480. }
  481. }(self))
  482. }(),
  483. function(e, t) {
  484. 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))
  485. }(navigator.userAgent || navigator.vendor || window.opera, window.PL),
  486. function(e) {
  487. function t() {
  488. var e = {};
  489. return window.location.search.replace(/([^?=&]+)(=([^&]*))?/g, function(t, n, a, o) {
  490. e[n] = o
  491. }), e
  492. }
  493.  
  494. function n(e) {
  495. return delete e.event_id, delete e.point_of_sale_id, delete e.token, e
  496. }
  497.  
  498. function a(e) {
  499. var t, n = "";
  500. for (t in e) n += "&" + t + "=" + e[t];
  501. return n
  502. }
  503.  
  504. function o(e) {
  505. var o, i = n(t());
  506. i = r(i), o = a(i), e += o, document.location.href = e
  507. }
  508. e.foManager = {
  509. loadFrontoffice: o
  510. };
  511. var i = function(e) {
  512. var t = {};
  513. return e.replace(/([^#&]+)/g, function(e) {
  514. var n = e.split(/=(.+)?/),
  515. a = n[0],
  516. o = n[1];
  517. t[a] = o
  518. }), t
  519. },
  520. r = function(e) {
  521. var t = i(window.location.hash);
  522. return e.pld = t.pld, e
  523. }
  524. }(window.PL),
  525. function(e) {
  526. function t(e, t) {
  527. _gaq.push(["paylogic._trackTiming", "Permanent Queue", "AJAX update", e, t, 20])
  528. }
  529.  
  530. function n(t) {
  531. o.forEach(function(n) {
  532. _gaq.push([n + "._trackPageview", (e.eventName || "default") + "/" + t])
  533. })
  534. }
  535.  
  536. function a() {
  537. o.forEach(function(e) {
  538. _gaq.push([e + "._trackEvent", "Permanent Queue", "Ping"])
  539. })
  540. }
  541. var o = [];
  542. e.gaManager = {
  543. sendGAPage: n,
  544. sendGATiming: t
  545. }, 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")
  546. }(window.PL),
  547. function(e) {
  548. function t() {
  549. n(a.value), document.dispatchEvent(new CustomEvent("lang-changed"))
  550. }
  551.  
  552. function n(t) {
  553. e.langManager.locale = t, a && a.value !== t && (a.value = t)
  554. }
  555. var a = document.querySelector("#lang");
  556. a && a.addEventListener("change", t), e.langManager = {
  557. setLocale: n,
  558. locale: null
  559. }
  560. }(window.PL),
  561. function(e) {
  562. function t(t, n) {
  563. var a = n[t];
  564. return a[e.langManager.locale] || a[n.enabled_languages[0]]
  565. }
  566.  
  567. function n(e) {
  568. return !e || (new Date).getTime() >= new Date(e).getTime()
  569. }
  570.  
  571. function a() {
  572. var a = e.queueData.content,
  573. o = e.langManager.locale,
  574. s = "not_started",
  575. u = t("not_started_page", a);
  576. 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() {
  577. c.innerHTML = u, document.dispatchEvent(new CustomEvent("page-changed")), e.util.fade(c, "in", 500)
  578. }), i = s, r = o)
  579. }
  580.  
  581. function o() {
  582. i = "loading", c.innerHTML = '<h2 class="loading">Loading…</h2>', e.util.fade(c, "in", 500)
  583. }
  584. var i = null,
  585. r = null,
  586. c = document.querySelector(".template-content");
  587. e.pageManager = {
  588. renderPage: a,
  589. loadingMessage: o
  590. }
  591. }(window.PL),
  592. function(e) {
  593. function t(e) {
  594. var t = e && e.match(/^.*(?:youtu.be\/|v\/|e\/|u\/\w+\/|embed\/|v=)([^#&?]*).*/);
  595. if (t) return t[1]
  596. }
  597.  
  598. function n() {
  599. var e = document.querySelectorAll(".yt-player-control"),
  600. t = document.querySelector("#un-mute"),
  601. n = document.querySelector("#pause-play");
  602. t.checked = !1, t.addEventListener("change", o), n.checked = !1, n.addEventListener("change", i), Array.prototype.forEach.call(e, function(e) {
  603. e.classList.remove("hide")
  604. })
  605. }
  606.  
  607. function a() {
  608. c.getPlayerState() === window.YT.PlayerState.CUED && c.playVideo(), c.setVolume(5), n(), r(), window.addEventListener("resize", r)
  609. }
  610.  
  611. function o(e) {
  612. var t = e.target.checked;
  613. t ? c.mute() : c.unMute()
  614. }
  615.  
  616. function i(e) {
  617. var t = e.target.checked;
  618. t ? c.pauseVideo() : c.playVideo()
  619. }
  620.  
  621. function r() {
  622. var e, t = {},
  623. n = {},
  624. a = document.querySelector(".bg-media"),
  625. o = document.querySelector(".bg-media iframe");
  626. 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"
  627. }
  628. var c;
  629. window.onYouTubeIframeAPIReady = function() {
  630. var n = t(e.media.youtube_url);
  631. n && !e.isMobileBrowser && (c = new window.YT.Player("bgMediaFrame", {
  632. width: "100%",
  633. height: "100%",
  634. playerVars: {
  635. autoplay: 1,
  636. controls: 0,
  637. loop: 1,
  638. showinfo: 0,
  639. rel: 0,
  640. playlist: n
  641. },
  642. videoId: n,
  643. events: {
  644. onReady: a
  645. }
  646. }))
  647. }
  648. }(window.PL),
  649. function(e) {
  650. function t() {
  651. var t, i = document.createDocumentFragment();
  652. if (e.media.images && 0 !== e.media.images.length && (!e.media.youtube_url || e.isMobileBrowser)) {
  653. 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);
  654. document.querySelector(".bg-media").appendChild(i), n(), o = setInterval(a, r), a()
  655. }
  656. }
  657.  
  658. function n(t) {
  659. var a = new Image;
  660. t = t || 0, t !== e.media.images.length && (a.src = e.media.images[t], a.addEventListener("load", function() {
  661. var e = c[t];
  662. e.style.backgroundImage = ["url(", this.src, ")"].join(""), e.classList.add("loaded"), t++, n(t)
  663. }))
  664. }
  665.  
  666. function a() {
  667. var t = document.querySelector(".bg-slide.active");
  668. 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)))
  669. }
  670. var o, i = 0,
  671. r = 8e3,
  672. c = [];
  673. t()
  674. }(window.PL),
  675. function(e) {
  676. function t(e) {
  677. var t;
  678. clearTimeout(d), e && (t = new Date(e).getTime() - (new Date).getTime(), t > 0 && (d = setTimeout(c, t)))
  679. }
  680.  
  681. function n(e) {
  682. var t = new Date;
  683. f = e, t.setMinutes(t.getMinutes() + 10), document.cookie = "token=" + e + "; expires=" + t.toUTCString(), a() || (document.cookie = "token=" + e)
  684. }
  685.  
  686. function a() {
  687. for (var e = document.cookie.split(";"), t = 0, n = e.length; t < n; t++) {
  688. var a = e[t],
  689. o = a.substr(0, a.indexOf("="));
  690. if ("token" == o.replace(/ /g, "")) return a.substr(a.indexOf("=") + 1)
  691. }
  692. return f
  693. }
  694.  
  695. function o() {
  696. var t = a(),
  697. n = {
  698. now: (new Date).getTime()
  699. };
  700. t && (n.token = t), e.queueData || (l = setTimeout(e.pageManager.loadingMessage, 1500)), qwest.get(e.refreshUrl, n).then(function(e, t) {
  701. clearTimeout(l);
  702. try {
  703. s(t, i(n.now))
  704. } catch (a) {
  705. r(12e4), console.error(a)
  706. }
  707. })["catch"](function() {
  708. e.gaManager.sendGATiming(i(n.now), "failed"), r()
  709. })
  710. }
  711.  
  712. function i(e) {
  713. return (new Date).getTime() - e
  714. }
  715.  
  716. function r(e) {
  717. clearTimeout(u), u = setTimeout(o, e || 2e4 * Math.random())
  718. }
  719.  
  720. function c() {
  721. e.pageManager.renderPage(), e.announcementManager.renderAnnouncements()
  722. }
  723.  
  724. function s(a, o) {
  725. 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())))
  726. }
  727. var u = null,
  728. l = null,
  729. d = null,
  730. f = null;
  731. qwest.setDefaultOptions({
  732. responseType: "json",
  733. timeout: 6e4,
  734. cache: !0
  735. }), u = setTimeout(o, Math.random()), document.addEventListener("lang-changed", c), document.addEventListener("page-changed", function() {
  736. e.gaManager.sendGAPage(e.queueData.content.active_page_name)
  737. })
  738. }(window.PL),
  739. function(e) {
  740. function t(e, t, n, a) {
  741. function o() {
  742. 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))
  743. }
  744. var i = "in" === t,
  745. r = i ? 0 : 1,
  746. c = 16,
  747. s = c / n;
  748. i && (e.style.display = "block", e.style.opacity = r);
  749. var u = setInterval(o, c)
  750. }
  751. e.util = {
  752. fade: t
  753. }
  754. }(window.PL);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement