Bundle-098ee8bf.js

JavaScript Guest 51 Views Size: 3.91 MB Posted on: Oct 25, 25 @ 2:35 AM
  1. /* Twinkle Signature v1 x5vEYyL4FVKNMpJUxvWPWrsKD3HHiXi4rrSeD6WKfwiy05unBaFQgZonltVBC3ISMjSJKPz/QRmRFg1l20PVAA== *//*!
  2.  *   Version: master_4700144_3b16ab85_warsaw_all_prod
  3.  *   Build #: 4700144
  4.  *  Revision: 3b16ab85
  5.  *    Branch: master
  6.  *   Channel: warsaw
  7.  *  Platform: all
  8.  *    Locale: en-us
  9.  * Timestamp: 2023-09-21 07:55:53 UTC
  10.  */ !function(e) {
  11. var t = {};
  12. function n(r) {
  13. if (t[r]) return t[r].exports;
  14. var o = t[r] = {
  15. i: r,
  16. l: !1,
  17. exports: {}
  18. };
  19. return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;
  20. }
  21. n.m = e, n.c = t, n.d = function(e, t, r) {
  22. n.o(e, t) || Object.defineProperty(e, t, {
  23. enumerable: !0,
  24. get: r
  25. });
  26. }, n.r = function(e) {
  27. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  28. value: "Module"
  29. }), Object.defineProperty(e, "__esModule", {
  30. value: !0
  31. });
  32. }, n.t = function(e, t) {
  33. if (1 & t && (e = n(e)), 8 & t) return e;
  34. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  35. var r = Object.create(null);
  36. if (n.r(r), Object.defineProperty(r, "default", {
  37. enumerable: !0,
  38. value: e
  39. }), 2 & t && "string" != typeof e) for (var o in e) n.d(r, o, function(t) {
  40. return e[t];
  41. }.bind(null, o));
  42. return r;
  43. }, n.n = function(e) {
  44. var t = e && e.__esModule ? function t() {
  45. return e.default;
  46. } : function t() {
  47. return e;
  48. };
  49. return n.d(t, "a", t), t;
  50. }, n.o = function(e, t) {
  51. return Object.prototype.hasOwnProperty.call(e, t);
  52. }, n.p = "", n(n.s = 678);
  53. }([ function(e, t, n) {
  54. "use strict";
  55. n.r(t), n.d(t, "__extends", function() {
  56. return o;
  57. }), n.d(t, "__assign", function() {
  58. return i;
  59. }), n.d(t, "__rest", function() {
  60. return a;
  61. }), n.d(t, "__decorate", function() {
  62. return s;
  63. }), n.d(t, "__param", function() {
  64. return u;
  65. }), n.d(t, "__metadata", function() {
  66. return l;
  67. }), n.d(t, "__awaiter", function() {
  68. return c;
  69. }), n.d(t, "__generator", function() {
  70. return p;
  71. }), n.d(t, "__exportStar", function() {
  72. return d;
  73. }), n.d(t, "__values", function() {
  74. return f;
  75. }), n.d(t, "__read", function() {
  76. return m;
  77. }), n.d(t, "__spread", function() {
  78. return h;
  79. }), n.d(t, "__await", function() {
  80. return g;
  81. }), n.d(t, "__asyncGenerator", function() {
  82. return y;
  83. }), n.d(t, "__asyncDelegator", function() {
  84. return S;
  85. }), n.d(t, "__asyncValues", function() {
  86. return v;
  87. });
  88. /*! *****************************************************************************
  89. Copyright (c) Microsoft Corporation. All rights reserved.
  90. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  91. this file except in compliance with the License. You may obtain a copy of the
  92. License at http://www.apache.org/licenses/LICENSE-2.0
  93.  
  94. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  95. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  96. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  97. MERCHANTABLITY OR NON-INFRINGEMENT.
  98.  
  99. See the Apache Version 2.0 License for specific language governing permissions
  100. and limitations under the License.
  101. ***************************************************************************** */
  102. var r = Object.setPrototypeOf || {
  103. __proto__: []
  104. } instanceof Array && function(e, t) {
  105. e.__proto__ = t;
  106. } || function(e, t) {
  107. for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
  108. };
  109. function o(e, t) {
  110. function __() {
  111. this.constructor = e;
  112. }
  113. r(e, t), e.prototype = null === t ? Object.create(t) : (__.prototype = t.prototype,
  114. new __());
  115. }
  116. var i = Object.assign || function e(t) {
  117. for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
  118. return t;
  119. };
  120. function a(e, t) {
  121. var n = {};
  122. for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  123. if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
  124. var o = 0;
  125. for (r = Object.getOwnPropertySymbols(e); o < r.length; o++) t.indexOf(r[o]) < 0 && (n[r[o]] = e[r[o]]);
  126. }
  127. return n;
  128. }
  129. function s(e, t, n, r) {
  130. var o, i = arguments.length, a = i < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, n) : r;
  131. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, n, r); else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
  132. return i > 3 && a && Object.defineProperty(t, n, a), a;
  133. }
  134. function u(e, t) {
  135. return function(n, r) {
  136. t(n, r, e);
  137. };
  138. }
  139. function l(e, t) {
  140. if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(e, t);
  141. }
  142. function c(e, t, n, r) {
  143. return new (n || (n = Promise))(function(o, i) {
  144. function a(e) {
  145. try {
  146. u(r.next(e));
  147. } catch (e) {
  148. i(e);
  149. }
  150. }
  151. function s(e) {
  152. try {
  153. u(r.throw(e));
  154. } catch (e) {
  155. i(e);
  156. }
  157. }
  158. function u(e) {
  159. e.done ? o(e.value) : new n(function(t) {
  160. t(e.value);
  161. }).then(a, s);
  162. }
  163. u((r = r.apply(e, t || [])).next());
  164. });
  165. }
  166. function p(e, t) {
  167. var n, r, o, i, a = {
  168. label: 0,
  169. sent: function() {
  170. if (1 & o[0]) throw o[1];
  171. return o[1];
  172. },
  173. trys: [],
  174. ops: []
  175. };
  176. return i = {
  177. next: s(0),
  178. throw: s(1),
  179. return: s(2)
  180. }, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
  181. return this;
  182. }), i;
  183. function s(i) {
  184. return function(s) {
  185. return function u(i) {
  186. if (n) throw new TypeError("Generator is already executing.");
  187. for (;a; ) try {
  188. if (n = 1, r && (o = r[2 & i[0] ? "return" : i[0] ? "throw" : "next"]) && !(o = o.call(r, i[1])).done) return o;
  189. switch (r = 0, o && (i = [ 0, o.value ]), i[0]) {
  190. case 0:
  191. case 1:
  192. o = i;
  193. break;
  194.  
  195. case 4:
  196. return a.label++, {
  197. value: i[1],
  198. done: !1
  199. };
  200.  
  201. case 5:
  202. a.label++, r = i[1], i = [ 0 ];
  203. continue;
  204.  
  205. case 7:
  206. i = a.ops.pop(), a.trys.pop();
  207. continue;
  208.  
  209. default:
  210. if (!(o = (o = a.trys).length > 0 && o[o.length - 1]) && (6 === i[0] || 2 === i[0])) {
  211. a = 0;
  212. continue;
  213. }
  214. if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
  215. a.label = i[1];
  216. break;
  217. }
  218. if (6 === i[0] && a.label < o[1]) {
  219. a.label = o[1], o = i;
  220. break;
  221. }
  222. if (o && a.label < o[2]) {
  223. a.label = o[2], a.ops.push(i);
  224. break;
  225. }
  226. o[2] && a.ops.pop(), a.trys.pop();
  227. continue;
  228. }
  229. i = t.call(e, a);
  230. } catch (e) {
  231. i = [ 6, e ], r = 0;
  232. } finally {
  233. n = o = 0;
  234. }
  235. if (5 & i[0]) throw i[1];
  236. return {
  237. value: i[0] ? i[1] : void 0,
  238. done: !0
  239. };
  240. }([ i, s ]);
  241. };
  242. }
  243. }
  244. function d(e, t) {
  245. for (var n in e) t.hasOwnProperty(n) || (t[n] = e[n]);
  246. }
  247. function f(e) {
  248. var t = "function" == typeof Symbol && e[Symbol.iterator], n = 0;
  249. return t ? t.call(e) : {
  250. next: function() {
  251. return e && n >= e.length && (e = void 0), {
  252. value: e && e[n++],
  253. done: !e
  254. };
  255. }
  256. };
  257. }
  258. function m(e, t) {
  259. var n = "function" == typeof Symbol && e[Symbol.iterator];
  260. if (!n) return e;
  261. var r, o, i = n.call(e), a = [];
  262. try {
  263. for (;(void 0 === t || t-- > 0) && !(r = i.next()).done; ) a.push(r.value);
  264. } catch (e) {
  265. o = {
  266. error: e
  267. };
  268. } finally {
  269. try {
  270. r && !r.done && (n = i.return) && n.call(i);
  271. } finally {
  272. if (o) throw o.error;
  273. }
  274. }
  275. return a;
  276. }
  277. function h() {
  278. for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(m(arguments[t]));
  279. return e;
  280. }
  281. function g(e) {
  282. return this instanceof g ? (this.v = e, this) : new g(e);
  283. }
  284. function y(e, t, n) {
  285. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  286. var r, o = n.apply(e, t || []), i = [];
  287. return r = {}, a("next"), a("throw"), a("return"), r[Symbol.asyncIterator] = function() {
  288. return this;
  289. }, r;
  290. function a(e) {
  291. o[e] && (r[e] = function(t) {
  292. return new Promise(function(n, r) {
  293. i.push([ e, t, n, r ]) > 1 || s(e, t);
  294. });
  295. });
  296. }
  297. function s(e, t) {
  298. try {
  299. !function n(e) {
  300. e.value instanceof g ? Promise.resolve(e.value.v).then(u, l) : c(i[0][2], e);
  301. }(o[e](t));
  302. } catch (e) {
  303. c(i[0][3], e);
  304. }
  305. }
  306. function u(e) {
  307. s("next", e);
  308. }
  309. function l(e) {
  310. s("throw", e);
  311. }
  312. function c(e, t) {
  313. e(t), i.shift(), i.length && s(i[0][0], i[0][1]);
  314. }
  315. }
  316. function S(e) {
  317. var t, n;
  318. return t = {}, r("next"), r("throw", function(e) {
  319. throw e;
  320. }), r("return"), t[Symbol.iterator] = function() {
  321. return this;
  322. }, t;
  323. function r(r, o) {
  324. e[r] && (t[r] = function(t) {
  325. return (n = !n) ? {
  326. value: g(e[r](t)),
  327. done: "return" === r
  328. } : o ? o(t) : t;
  329. });
  330. }
  331. }
  332. function v(e) {
  333. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  334. var t = e[Symbol.asyncIterator];
  335. return t ? t.call(e) : f(e);
  336. }
  337. }, function(e, t, n) {
  338. "use strict";
  339. e.exports = n(857);
  340. }, function(e, t, n) {
  341. "use strict";
  342. n.r(t), function(e, r) {
  343. n.d(t, "$mobx", function() {
  344. return Xn;
  345. }), n.d(t, "IDerivationState", function() {
  346. return _e;
  347. }), n.d(t, "ObservableMap", function() {
  348. return An;
  349. }), n.d(t, "ObservableSet", function() {
  350. return On;
  351. }), n.d(t, "Reaction", function() {
  352. return Ye;
  353. }), n.d(t, "_allowStateChanges", function() {
  354. return me;
  355. }), n.d(t, "_allowStateChangesInsideComputed", function() {
  356. return ye;
  357. }), n.d(t, "_getAdministration", function() {
  358. return jn;
  359. }), n.d(t, "_getGlobalState", function() {
  360. return Be;
  361. }), n.d(t, "_interceptReads", function() {
  362. return Lt;
  363. }), n.d(t, "_isComputingDerivation", function() {
  364. return we;
  365. }), n.d(t, "_resetGlobalState", function() {
  366. return je;
  367. }), n.d(t, "action", function() {
  368. return pt;
  369. }), n.d(t, "autorun", function() {
  370. return ht;
  371. }), n.d(t, "comparer", function() {
  372. return G;
  373. }), n.d(t, "computed", function() {
  374. return ce;
  375. }), n.d(t, "configure", function() {
  376. return Et;
  377. }), n.d(t, "createAtom", function() {
  378. return N;
  379. }), n.d(t, "decorate", function() {
  380. return Ct;
  381. }), n.d(t, "entries", function() {
  382. return Vt;
  383. }), n.d(t, "extendObservable", function() {
  384. return At;
  385. }), n.d(t, "extendShallowObservable", function() {
  386. return It;
  387. }), n.d(t, "flow", function() {
  388. return kt;
  389. }), n.d(t, "get", function() {
  390. return Xt;
  391. }), n.d(t, "getAtom", function() {
  392. return Bn;
  393. }), n.d(t, "getDebugName", function() {
  394. return Hn;
  395. }), n.d(t, "getDependencyTree", function() {
  396. return wt;
  397. }), n.d(t, "getObserverTree", function() {
  398. return Rt;
  399. }), n.d(t, "has", function() {
  400. return Kt;
  401. }), n.d(t, "intercept", function() {
  402. return Dt;
  403. }), n.d(t, "isAction", function() {
  404. return ft;
  405. }), n.d(t, "isArrayLike", function() {
  406. return E;
  407. }), n.d(t, "isBoxedObservable", function() {
  408. return ve;
  409. }), n.d(t, "isComputed", function() {
  410. return Ft;
  411. }), n.d(t, "isComputedProp", function() {
  412. return Gt;
  413. }), n.d(t, "isObservable", function() {
  414. return Bt;
  415. }), n.d(t, "isObservableArray", function() {
  416. return Cn;
  417. }), n.d(t, "isObservableMap", function() {
  418. return Pn;
  419. }), n.d(t, "isObservableObject", function() {
  420. return Un;
  421. }), n.d(t, "isObservableProp", function() {
  422. return jt;
  423. }), n.d(t, "isObservableSet", function() {
  424. return xn;
  425. }), n.d(t, "keys", function() {
  426. return Ht;
  427. }), n.d(t, "observable", function() {
  428. return ie;
  429. }), n.d(t, "observe", function() {
  430. return Yt;
  431. }), n.d(t, "onBecomeObserved", function() {
  432. return bt;
  433. }), n.d(t, "onBecomeUnobserved", function() {
  434. return _t;
  435. }), n.d(t, "onReactionError", function() {
  436. return Je;
  437. }), n.d(t, "reaction", function() {
  438. return vt;
  439. }), n.d(t, "remove", function() {
  440. return qt;
  441. }), n.d(t, "runInAction", function() {
  442. return dt;
  443. }), n.d(t, "set", function() {
  444. return Wt;
  445. }), n.d(t, "spy", function() {
  446. return ut;
  447. }), n.d(t, "toJS", function() {
  448. return Zt;
  449. }), n.d(t, "trace", function() {
  450. return $t;
  451. }), n.d(t, "transaction", function() {
  452. return en;
  453. }), n.d(t, "untracked", function() {
  454. return xe;
  455. }), n.d(t, "values", function() {
  456. return zt;
  457. }), n.d(t, "when", function() {
  458. return tn;
  459. });
  460. /*! *****************************************************************************
  461. Copyright (c) Microsoft Corporation. All rights reserved.
  462. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  463. this file except in compliance with the License. You may obtain a copy of the
  464. License at http://www.apache.org/licenses/LICENSE-2.0
  465.  
  466. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  467. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  468. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  469. MERCHANTABLITY OR NON-INFRINGEMENT.
  470.  
  471. See the Apache Version 2.0 License for specific language governing permissions
  472. and limitations under the License.
  473. ***************************************************************************** */
  474. var o = function(e, t) {
  475. return (o = Object.setPrototypeOf || {
  476. __proto__: []
  477. } instanceof Array && function(e, t) {
  478. e.__proto__ = t;
  479. } || function(e, t) {
  480. for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
  481. })(e, t);
  482. };
  483. function i(e, t) {
  484. function __() {
  485. this.constructor = e;
  486. }
  487. o(e, t), e.prototype = null === t ? Object.create(t) : (__.prototype = t.prototype,
  488. new __());
  489. }
  490. var a = function() {
  491. return (a = Object.assign || function e(t) {
  492. for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
  493. return t;
  494. }).apply(this, arguments);
  495. };
  496. function s(e, t) {
  497. var n = "function" == typeof Symbol && e[Symbol.iterator];
  498. if (!n) return e;
  499. var r, o, i = n.call(e), a = [];
  500. try {
  501. for (;(void 0 === t || t-- > 0) && !(r = i.next()).done; ) a.push(r.value);
  502. } catch (e) {
  503. o = {
  504. error: e
  505. };
  506. } finally {
  507. try {
  508. r && !r.done && (n = i.return) && n.call(i);
  509. } finally {
  510. if (o) throw o.error;
  511. }
  512. }
  513. return a;
  514. }
  515. function u() {
  516. for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(s(arguments[t]));
  517. return e;
  518. }
  519. var l = "An invariant failed, however the error is obfuscated because this is an production build.", c = [];
  520. Object.freeze(c);
  521. var p = {};
  522. function d() {
  523. return "undefined" != typeof window ? window : e;
  524. }
  525. function f() {
  526. return ++Ue.mobxGuid;
  527. }
  528. function m(e) {
  529. throw h(!1, e), "X";
  530. }
  531. function h(e, t) {
  532. if (!e) throw new Error("[mobx] " + (t || l));
  533. }
  534. Object.freeze(p);
  535. function g(e) {
  536. var t = !1;
  537. return function() {
  538. if (!t) return t = !0, e.apply(this, arguments);
  539. };
  540. }
  541. var y = function() {};
  542. function S(e) {
  543. return null !== e && "object" == typeof e;
  544. }
  545. function v(e) {
  546. if (null === e || "object" != typeof e) return !1;
  547. var t = Object.getPrototypeOf(e);
  548. return t === Object.prototype || null === t;
  549. }
  550. function b(e, t, n) {
  551. Object.defineProperty(e, t, {
  552. enumerable: !1,
  553. writable: !0,
  554. configurable: !0,
  555. value: n
  556. });
  557. }
  558. function _(e, t, n) {
  559. Object.defineProperty(e, t, {
  560. enumerable: !1,
  561. writable: !1,
  562. configurable: !0,
  563. value: n
  564. });
  565. }
  566. function T(e, t) {
  567. var n = "isMobX" + e;
  568. return t.prototype[n] = !0, function(e) {
  569. return S(e) && !0 === e[n];
  570. };
  571. }
  572. function E(e) {
  573. return Array.isArray(e) || Cn(e);
  574. }
  575. function C(e) {
  576. return void 0 !== d().Map && e instanceof d().Map;
  577. }
  578. function I(e) {
  579. return e instanceof Set;
  580. }
  581. function A(e) {
  582. for (var t = []; ;) {
  583. var n = e.next();
  584. if (n.done) break;
  585. t.push(n.value);
  586. }
  587. return t;
  588. }
  589. function w() {
  590. return "function" == typeof Symbol && Symbol.toPrimitive || "@@toPrimitive";
  591. }
  592. function P(e) {
  593. return null === e ? null : "object" == typeof e ? "" + e : e;
  594. }
  595. function R() {
  596. return "function" == typeof Symbol && Symbol.iterator || "@@iterator";
  597. }
  598. function O(e, t) {
  599. _(e, R(), t);
  600. }
  601. function x(e) {
  602. return e[R()] = M, e;
  603. }
  604. function k() {
  605. return "function" == typeof Symbol && Symbol.toStringTag || "@@toStringTag";
  606. }
  607. function M() {
  608. return this;
  609. }
  610. var L = function() {
  611. function e(e) {
  612. void 0 === e && (e = "Atom@" + f()), this.name = e, this.isPendingUnobservation = !1,
  613. this.isBeingObserved = !1, this.observers = [], this.observersIndexes = {}, this.diffValue = 0,
  614. this.lastAccessedBy = 0, this.lowestObserverState = _e.NOT_TRACKING;
  615. }
  616. return e.prototype.onBecomeUnobserved = function() {}, e.prototype.onBecomeObserved = function() {},
  617. e.prototype.reportObserved = function() {
  618. return Ke(this);
  619. }, e.prototype.reportChanged = function() {
  620. We(), function e(t) {
  621. if (t.lowestObserverState === _e.STALE) return;
  622. t.lowestObserverState = _e.STALE;
  623. var n = t.observers, r = n.length;
  624. for (;r--; ) {
  625. var o = n[r];
  626. o.dependenciesState === _e.UP_TO_DATE && (o.isTracing !== Te.NONE && Xe(o, t), o.onBecomeStale()),
  627. o.dependenciesState = _e.STALE;
  628. }
  629. }(this), qe();
  630. }, e.prototype.toString = function() {
  631. return this.name;
  632. }, e;
  633. }(), D = T("Atom", L);
  634. function N(e, t, n) {
  635. void 0 === t && (t = y), void 0 === n && (n = y);
  636. var r = new L(e);
  637. return bt(r, t), _t(r, n), r;
  638. }
  639. function F(e, t) {
  640. return e === t;
  641. }
  642. var G = {
  643. identity: F,
  644. structural: function U(e, t) {
  645. return Vn(e, t);
  646. },
  647. default: function B(e, t) {
  648. return function n(e, t) {
  649. return "number" == typeof e && "number" == typeof t && isNaN(e) && isNaN(t);
  650. }(e, t) || F(e, t);
  651. }
  652. }, j = {}, H = {};
  653. function z(e) {
  654. if (!0 !== e.__mobxDidRunLazyInitializers) {
  655. var t = e.__mobxDecorators;
  656. if (t) for (var n in b(e, "__mobxDidRunLazyInitializers", !0), t) {
  657. var r = t[n];
  658. r.propertyCreator(e, r.prop, r.descriptor, r.decoratorTarget, r.decoratorArguments);
  659. }
  660. }
  661. }
  662. function V(e, t) {
  663. return function n() {
  664. var r, o = function n(o, i, s, u) {
  665. if (!0 === u) return t(o, i, s, o, r), null;
  666. if (!Object.prototype.hasOwnProperty.call(o, "__mobxDecorators")) {
  667. var l = o.__mobxDecorators;
  668. b(o, "__mobxDecorators", a({}, l));
  669. }
  670. return o.__mobxDecorators[i] = {
  671. prop: i,
  672. propertyCreator: t,
  673. descriptor: s,
  674. decoratorTarget: o,
  675. decoratorArguments: r
  676. }, function c(e, t) {
  677. var n = t ? j : H;
  678. return n[e] || (n[e] = {
  679. configurable: !0,
  680. enumerable: t,
  681. get: function() {
  682. return z(this), this[e];
  683. },
  684. set: function(t) {
  685. z(this), this[e] = t;
  686. }
  687. });
  688. }(i, e);
  689. };
  690. return function i(e) {
  691. return (2 === e.length || 3 === e.length) && "string" == typeof e[1] || 4 === e.length && !0 === e[3];
  692. }(arguments) ? (r = c, o.apply(null, arguments)) : (r = Array.prototype.slice.call(arguments),
  693. o);
  694. };
  695. }
  696. function W(e, t, n) {
  697. return Bt(e) ? e : Array.isArray(e) ? ie.array(e, {
  698. name: n
  699. }) : v(e) ? ie.object(e, void 0, {
  700. name: n
  701. }) : C(e) ? ie.map(e, {
  702. name: n
  703. }) : I(e) ? ie.set(e, {
  704. name: n
  705. }) : e;
  706. }
  707. function q(e) {
  708. return e;
  709. }
  710. function K(e) {
  711. var t = V(!0, function(t, n, r, o, i) {
  712. Ln(t, n, r ? r.initializer ? r.initializer.call(t) : r.value : void 0, e);
  713. }), n = (void 0 !== r && r.env, t);
  714. return n.enhancer = e, n;
  715. }
  716. var X = {
  717. deep: !0,
  718. name: void 0,
  719. defaultDecorator: void 0
  720. }, Y = {
  721. deep: !1,
  722. name: void 0,
  723. defaultDecorator: void 0
  724. };
  725. function J(e) {
  726. return null == e ? X : "string" == typeof e ? {
  727. name: e,
  728. deep: !0
  729. } : e;
  730. }
  731. function Q(e) {
  732. return e.defaultDecorator ? e.defaultDecorator.enhancer : !1 === e.deep ? q : W;
  733. }
  734. Object.freeze(X), Object.freeze(Y);
  735. var Z = K(W), $ = K(function ee(e, t, n) {
  736. return null == e ? e : Un(e) || Cn(e) || Pn(e) || xn(e) ? e : Array.isArray(e) ? ie.array(e, {
  737. name: n,
  738. deep: !1
  739. }) : v(e) ? ie.object(e, void 0, {
  740. name: n,
  741. deep: !1
  742. }) : C(e) ? ie.map(e, {
  743. name: n,
  744. deep: !1
  745. }) : I(e) ? ie.set(e, {
  746. name: n,
  747. deep: !1
  748. }) : m(!1);
  749. }), te = K(q), ne = K(function re(e, t, n) {
  750. return Vn(e, t) ? t : e;
  751. });
  752. var oe = {
  753. box: function(e, t) {
  754. arguments.length > 2 && se("box");
  755. var n = J(t);
  756. return new Se(e, Q(n), n.name, !0, n.equals);
  757. },
  758. shallowBox: function(e, t) {
  759. return arguments.length > 2 && se("shallowBox"), ie.box(e, {
  760. name: t,
  761. deep: !1
  762. });
  763. },
  764. array: function(e, t) {
  765. arguments.length > 2 && se("array");
  766. var n = J(t);
  767. return new yn(e, Q(n), n.name);
  768. },
  769. shallowArray: function(e, t) {
  770. return arguments.length > 2 && se("shallowArray"), ie.array(e, {
  771. name: t,
  772. deep: !1
  773. });
  774. },
  775. map: function(e, t) {
  776. arguments.length > 2 && se("map");
  777. var n = J(t);
  778. return new An(e, Q(n), n.name);
  779. },
  780. shallowMap: function(e, t) {
  781. return arguments.length > 2 && se("shallowMap"), ie.map(e, {
  782. name: t,
  783. deep: !1
  784. });
  785. },
  786. set: function(e, t) {
  787. arguments.length > 2 && se("set");
  788. var n = J(t);
  789. return new On(e, Q(n), n.name);
  790. },
  791. object: function(e, t, n) {
  792. return "string" == typeof arguments[1] && se("object"), At({}, e, t, J(n));
  793. },
  794. shallowObject: function(e, t) {
  795. return "string" == typeof arguments[1] && se("shallowObject"), ie.object(e, {}, {
  796. name: t,
  797. deep: !1
  798. });
  799. },
  800. ref: te,
  801. shallow: $,
  802. deep: Z,
  803. struct: ne
  804. }, ie = function ae(e, t, n) {
  805. if ("string" == typeof arguments[1]) return Z.apply(null, arguments);
  806. if (Bt(e)) return e;
  807. var r = v(e) ? ie.object(e, t, n) : Array.isArray(e) ? ie.array(e, t) : C(e) ? ie.map(e, t) : I(e) ? ie.set(e, t) : e;
  808. if (r !== e) return r;
  809. m(!1);
  810. };
  811. function se(e) {
  812. m("Expected one or two arguments to observable." + e + ". Did you accidentally try to use observable." + e + " as decorator?");
  813. }
  814. Object.keys(oe).forEach(function(e) {
  815. return ie[e] = oe[e];
  816. });
  817. var ue = V(!1, function(e, t, n, r, o) {
  818. var i = n.get, s = n.set, u = o[0] || {};
  819. !function l(e, t, n) {
  820. var r = Mn(e);
  821. n.name = r.name + "." + t, n.context = e, r.values[t] = new be(n), Object.defineProperty(e, t, function o(e) {
  822. return Nn[e] || (Nn[e] = {
  823. configurable: Ue.computedConfigurable,
  824. enumerable: !1,
  825. get: function() {
  826. return Fn(this).read(this, e);
  827. },
  828. set: function(t) {
  829. Fn(this).write(this, e, t);
  830. }
  831. });
  832. }(t));
  833. }(e, t, a({
  834. get: i,
  835. set: s
  836. }, u));
  837. }), le = ue({
  838. equals: G.structural
  839. }), ce = function e(t, n, r) {
  840. if ("string" == typeof n) return ue.apply(null, arguments);
  841. if (null !== t && "object" == typeof t && 1 === arguments.length) return ue.apply(null, arguments);
  842. var o = "object" == typeof n ? n : {};
  843. return o.get = t, o.set = "function" == typeof n ? n : o.set, o.name = o.name || t.name || "",
  844. new be(o);
  845. };
  846. function pe(e, t) {
  847. var n = function() {
  848. return de(e, t, this, arguments);
  849. };
  850. return n.isMobxAction = !0, n;
  851. }
  852. function de(e, t, n, r) {
  853. var o = function i(e, t, n, r) {
  854. var o = rt() && !!e, i = 0;
  855. if (o) {
  856. i = Date.now();
  857. var a = r && r.length || 0, s = new Array(a);
  858. if (a > 0) for (var u = 0; u < a; u++) s[u] = r[u];
  859. it({
  860. type: "action",
  861. name: e,
  862. object: n,
  863. arguments: s
  864. });
  865. }
  866. var l = ke();
  867. We();
  868. var c = he(!0);
  869. return {
  870. prevDerivation: l,
  871. prevAllowStateChanges: c,
  872. notifySpy: o,
  873. startTime: i
  874. };
  875. }(e, 0, n, r), a = !0;
  876. try {
  877. var s = t.apply(n, r);
  878. return a = !1, s;
  879. } finally {
  880. a ? (Ue.suppressReactionErrors = a, fe(o), Ue.suppressReactionErrors = !1) : fe(o);
  881. }
  882. }
  883. function fe(e) {
  884. ge(e.prevAllowStateChanges), qe(), Me(e.prevDerivation), e.notifySpy && st({
  885. time: Date.now() - e.startTime
  886. });
  887. }
  888. function me(e, t) {
  889. var n, r = he(e);
  890. try {
  891. n = t();
  892. } finally {
  893. ge(r);
  894. }
  895. return n;
  896. }
  897. function he(e) {
  898. var t = Ue.allowStateChanges;
  899. return Ue.allowStateChanges = e, t;
  900. }
  901. function ge(e) {
  902. Ue.allowStateChanges = e;
  903. }
  904. function ye(e) {
  905. var t, n = Ue.computationDepth;
  906. Ue.computationDepth = 0;
  907. try {
  908. t = e();
  909. } finally {
  910. Ue.computationDepth = n;
  911. }
  912. return t;
  913. }
  914. ce.struct = le;
  915. var Se = function(e) {
  916. function t(t, n, r, o, i) {
  917. void 0 === r && (r = "ObservableValue@" + f()), void 0 === o && (o = !0), void 0 === i && (i = G.default);
  918. var a = e.call(this, r) || this;
  919. return a.enhancer = n, a.name = r, a.equals = i, a.hasUnreportedChange = !1, a.value = n(t, void 0, r),
  920. o && rt() && ot({
  921. type: "create",
  922. name: a.name,
  923. newValue: "" + a.value
  924. }), a;
  925. }
  926. return i(t, e), t.prototype.dehanceValue = function(e) {
  927. return void 0 !== this.dehancer ? this.dehancer(e) : e;
  928. }, t.prototype.set = function(e) {
  929. var t = this.value;
  930. if ((e = this.prepareNewValue(e)) !== Ue.UNCHANGED) {
  931. var n = rt();
  932. n && it({
  933. type: "update",
  934. name: this.name,
  935. newValue: e,
  936. oldValue: t
  937. }), this.setNewValue(e), n && st();
  938. }
  939. }, t.prototype.prepareNewValue = function(e) {
  940. if (Pe(this), rn(this)) {
  941. var t = an(this, {
  942. object: this,
  943. type: "update",
  944. newValue: e
  945. });
  946. if (!t) return Ue.UNCHANGED;
  947. e = t.newValue;
  948. }
  949. return e = this.enhancer(e, this.value, this.name), this.equals(this.value, e) ? Ue.UNCHANGED : e;
  950. }, t.prototype.setNewValue = function(e) {
  951. var t = this.value;
  952. this.value = e, this.reportChanged(), sn(this) && ln(this, {
  953. type: "update",
  954. object: this,
  955. newValue: e,
  956. oldValue: t
  957. });
  958. }, t.prototype.get = function() {
  959. return this.reportObserved(), this.dehanceValue(this.value);
  960. }, t.prototype.intercept = function(e) {
  961. return on(this, e);
  962. }, t.prototype.observe = function(e, t) {
  963. return t && e({
  964. object: this,
  965. type: "update",
  966. newValue: this.value,
  967. oldValue: void 0
  968. }), un(this, e);
  969. }, t.prototype.toJSON = function() {
  970. return this.get();
  971. }, t.prototype.toString = function() {
  972. return this.name + "[" + this.value + "]";
  973. }, t.prototype.valueOf = function() {
  974. return P(this.get());
  975. }, t;
  976. }(L);
  977. Se.prototype[w()] = Se.prototype.valueOf;
  978. var ve = T("ObservableValue", Se), be = function() {
  979. function e(e) {
  980. this.dependenciesState = _e.NOT_TRACKING, this.observing = [], this.newObserving = null,
  981. this.isBeingObserved = !1, this.isPendingUnobservation = !1, this.observers = [],
  982. this.observersIndexes = {}, this.diffValue = 0, this.runId = 0, this.lastAccessedBy = 0,
  983. this.lowestObserverState = _e.UP_TO_DATE, this.unboundDepsCount = 0, this.__mapid = "#" + f(),
  984. this.value = new Ce(null), this.isComputing = !1, this.isRunningSetter = !1, this.isTracing = Te.NONE,
  985. this.derivation = e.get, this.name = e.name || "ComputedValue@" + f(), e.set && (this.setter = pe(this.name + "-setter", e.set)),
  986. this.equals = e.equals || (e.compareStructural || e.struct ? G.structural : G.default),
  987. this.scope = e.context, this.requiresReaction = !!e.requiresReaction, this.keepAlive = !!e.keepAlive;
  988. }
  989. return e.prototype.onBecomeStale = function() {
  990. !function e(t) {
  991. if (t.lowestObserverState !== _e.UP_TO_DATE) return;
  992. t.lowestObserverState = _e.POSSIBLY_STALE;
  993. var n = t.observers, r = n.length;
  994. for (;r--; ) {
  995. var o = n[r];
  996. o.dependenciesState === _e.UP_TO_DATE && (o.dependenciesState = _e.POSSIBLY_STALE,
  997. o.isTracing !== Te.NONE && Xe(o, t), o.onBecomeStale());
  998. }
  999. }(this);
  1000. }, e.prototype.onBecomeUnobserved = function() {}, e.prototype.onBecomeObserved = function() {},
  1001. e.prototype.get = function() {
  1002. this.isComputing && m("Cycle detected in computation " + this.name + ": " + this.derivation),
  1003. 0 !== Ue.inBatch || 0 !== this.observers.length || this.keepAlive ? (Ke(this), Ae(this) && this.trackAndCompute() && function e(t) {
  1004. if (t.lowestObserverState === _e.STALE) return;
  1005. t.lowestObserverState = _e.STALE;
  1006. var n = t.observers, r = n.length;
  1007. for (;r--; ) {
  1008. var o = n[r];
  1009. o.dependenciesState === _e.POSSIBLY_STALE ? o.dependenciesState = _e.STALE : o.dependenciesState === _e.UP_TO_DATE && (t.lowestObserverState = _e.UP_TO_DATE);
  1010. }
  1011. }(this)) : Ae(this) && (this.warnAboutUntrackedRead(), We(), this.value = this.computeValue(!1),
  1012. qe());
  1013. var t = this.value;
  1014. if (Ie(t)) throw t.cause;
  1015. return t;
  1016. }, e.prototype.peek = function() {
  1017. var e = this.computeValue(!1);
  1018. if (Ie(e)) throw e.cause;
  1019. return e;
  1020. }, e.prototype.set = function(e) {
  1021. if (this.setter) {
  1022. h(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),
  1023. this.isRunningSetter = !0;
  1024. try {
  1025. this.setter.call(this.scope, e);
  1026. } finally {
  1027. this.isRunningSetter = !1;
  1028. }
  1029. } else h(!1, !1);
  1030. }, e.prototype.trackAndCompute = function() {
  1031. rt() && ot({
  1032. object: this.scope,
  1033. type: "compute",
  1034. name: this.name
  1035. });
  1036. var e = this.value, t = this.dependenciesState === _e.NOT_TRACKING, n = this.computeValue(!0), r = t || Ie(e) || Ie(n) || !this.equals(e, n);
  1037. return r && (this.value = n), r;
  1038. }, e.prototype.computeValue = function(e) {
  1039. var t;
  1040. if (this.isComputing = !0, Ue.computationDepth++, e) t = Re(this, this.derivation, this.scope); else if (!0 === Ue.disableErrorBoundaries) t = this.derivation.call(this.scope); else try {
  1041. t = this.derivation.call(this.scope);
  1042. } catch (e) {
  1043. t = new Ce(e);
  1044. }
  1045. return Ue.computationDepth--, this.isComputing = !1, t;
  1046. }, e.prototype.suspend = function() {
  1047. this.keepAlive || (Oe(this), this.value = void 0);
  1048. }, e.prototype.observe = function(e, t) {
  1049. var n = this, r = !0, o = void 0;
  1050. return ht(function() {
  1051. var i = n.get();
  1052. if (!r || t) {
  1053. var a = ke();
  1054. e({
  1055. type: "update",
  1056. object: n,
  1057. newValue: i,
  1058. oldValue: o
  1059. }), Me(a);
  1060. }
  1061. r = !1, o = i;
  1062. });
  1063. }, e.prototype.warnAboutUntrackedRead = function() {
  1064. }, e.prototype.toJSON = function() {
  1065. return this.get();
  1066. }, e.prototype.toString = function() {
  1067. return this.name + "[" + this.derivation.toString() + "]";
  1068. }, e.prototype.valueOf = function() {
  1069. return P(this.get());
  1070. }, e;
  1071. }();
  1072. be.prototype[w()] = be.prototype.valueOf;
  1073. var _e, Te, Ee = T("ComputedValue", be);
  1074. !function(e) {
  1075. e[e.NOT_TRACKING = -1] = "NOT_TRACKING", e[e.UP_TO_DATE = 0] = "UP_TO_DATE", e[e.POSSIBLY_STALE = 1] = "POSSIBLY_STALE",
  1076. e[e.STALE = 2] = "STALE";
  1077. }(_e || (_e = {})), function(e) {
  1078. e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
  1079. }(Te || (Te = {}));
  1080. var Ce = function() {
  1081. return function e(t) {
  1082. this.cause = t;
  1083. };
  1084. }();
  1085. function Ie(e) {
  1086. return e instanceof Ce;
  1087. }
  1088. function Ae(e) {
  1089. switch (e.dependenciesState) {
  1090. case _e.UP_TO_DATE:
  1091. return !1;
  1092.  
  1093. case _e.NOT_TRACKING:
  1094. case _e.STALE:
  1095. return !0;
  1096.  
  1097. case _e.POSSIBLY_STALE:
  1098. for (var t = ke(), n = e.observing, r = n.length, o = 0; o < r; o++) {
  1099. var i = n[o];
  1100. if (Ee(i)) {
  1101. if (Ue.disableErrorBoundaries) i.get(); else try {
  1102. i.get();
  1103. } catch (e) {
  1104. return Me(t), !0;
  1105. }
  1106. if (e.dependenciesState === _e.STALE) return Me(t), !0;
  1107. }
  1108. }
  1109. return Le(e), Me(t), !1;
  1110. }
  1111. }
  1112. function we() {
  1113. return null !== Ue.trackingDerivation;
  1114. }
  1115. function Pe(e) {
  1116. var t = e.observers.length > 0;
  1117. Ue.computationDepth > 0 && t && m(!1), Ue.allowStateChanges || !t && "strict" !== Ue.enforceActions || m(!1);
  1118. }
  1119. function Re(e, t, n) {
  1120. Le(e), e.newObserving = new Array(e.observing.length + 100), e.unboundDepsCount = 0,
  1121. e.runId = ++Ue.runId;
  1122. var r, o = Ue.trackingDerivation;
  1123. if (Ue.trackingDerivation = e, !0 === Ue.disableErrorBoundaries) r = t.call(n); else try {
  1124. r = t.call(n);
  1125. } catch (e) {
  1126. r = new Ce(e);
  1127. }
  1128. return Ue.trackingDerivation = o, function i(e) {
  1129. for (var t = e.observing, n = e.observing = e.newObserving, r = _e.UP_TO_DATE, o = 0, i = e.unboundDepsCount, a = 0; a < i; a++) {
  1130. var s = n[a];
  1131. 0 === s.diffValue && (s.diffValue = 1, o !== a && (n[o] = s), o++), s.dependenciesState > r && (r = s.dependenciesState);
  1132. }
  1133. n.length = o, e.newObserving = null, i = t.length;
  1134. for (;i--; ) {
  1135. var s = t[i];
  1136. 0 === s.diffValue && ze(s, e), s.diffValue = 0;
  1137. }
  1138. for (;o--; ) {
  1139. var s = n[o];
  1140. 1 === s.diffValue && (s.diffValue = 0, He(s, e));
  1141. }
  1142. r !== _e.UP_TO_DATE && (e.dependenciesState = r, e.onBecomeStale());
  1143. }(e), r;
  1144. }
  1145. function Oe(e) {
  1146. var t = e.observing;
  1147. e.observing = [];
  1148. for (var n = t.length; n--; ) ze(t[n], e);
  1149. e.dependenciesState = _e.NOT_TRACKING;
  1150. }
  1151. function xe(e) {
  1152. var t = ke(), n = e();
  1153. return Me(t), n;
  1154. }
  1155. function ke() {
  1156. var e = Ue.trackingDerivation;
  1157. return Ue.trackingDerivation = null, e;
  1158. }
  1159. function Me(e) {
  1160. Ue.trackingDerivation = e;
  1161. }
  1162. function Le(e) {
  1163. if (e.dependenciesState !== _e.UP_TO_DATE) {
  1164. e.dependenciesState = _e.UP_TO_DATE;
  1165. for (var t = e.observing, n = t.length; n--; ) t[n].lowestObserverState = _e.UP_TO_DATE;
  1166. }
  1167. }
  1168. var De = [ "mobxGuid", "spyListeners", "enforceActions", "computedRequiresReaction", "disableErrorBoundaries", "runId", "UNCHANGED" ], Ne = function() {
  1169. return function e() {
  1170. this.version = 5, this.UNCHANGED = {}, this.trackingDerivation = null, this.computationDepth = 0,
  1171. this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [],
  1172. this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0,
  1173. this.enforceActions = !1, this.spyListeners = [], this.globalReactionErrorHandlers = [],
  1174. this.computedRequiresReaction = !1, this.computedConfigurable = !1, this.disableErrorBoundaries = !1,
  1175. this.suppressReactionErrors = !1;
  1176. };
  1177. }(), Fe = !0, Ge = !1, Ue = function() {
  1178. var e = d();
  1179. return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Fe = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Ne().version && (Fe = !1),
  1180. Fe ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}),
  1181. e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new Ne()) : (setTimeout(function() {
  1182. Ge || m("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`");
  1183. }, 1), new Ne());
  1184. }();
  1185. function Be() {
  1186. return Ue;
  1187. }
  1188. function je() {
  1189. var e = new Ne();
  1190. for (var t in e) -1 === De.indexOf(t) && (Ue[t] = e[t]);
  1191. Ue.allowStateChanges = !Ue.enforceActions;
  1192. }
  1193. function He(e, t) {
  1194. var n = e.observers.length;
  1195. n && (e.observersIndexes[t.__mapid] = n), e.observers[n] = t, e.lowestObserverState > t.dependenciesState && (e.lowestObserverState = t.dependenciesState);
  1196. }
  1197. function ze(e, t) {
  1198. if (1 === e.observers.length) e.observers.length = 0, Ve(e); else {
  1199. var n = e.observers, r = e.observersIndexes, o = n.pop();
  1200. if (o !== t) {
  1201. var i = r[t.__mapid] || 0;
  1202. i ? r[o.__mapid] = i : delete r[o.__mapid], n[i] = o;
  1203. }
  1204. delete r[t.__mapid];
  1205. }
  1206. }
  1207. function Ve(e) {
  1208. !1 === e.isPendingUnobservation && (e.isPendingUnobservation = !0, Ue.pendingUnobservations.push(e));
  1209. }
  1210. function We() {
  1211. Ue.inBatch++;
  1212. }
  1213. function qe() {
  1214. if (0 == --Ue.inBatch) {
  1215. $e();
  1216. for (var e = Ue.pendingUnobservations, t = 0; t < e.length; t++) {
  1217. var n = e[t];
  1218. n.isPendingUnobservation = !1, 0 === n.observers.length && (n.isBeingObserved && (n.isBeingObserved = !1,
  1219. n.onBecomeUnobserved()), n instanceof be && n.suspend());
  1220. }
  1221. Ue.pendingUnobservations = [];
  1222. }
  1223. }
  1224. function Ke(e) {
  1225. var t = Ue.trackingDerivation;
  1226. return null !== t ? (t.runId !== e.lastAccessedBy && (e.lastAccessedBy = t.runId,
  1227. t.newObserving[t.unboundDepsCount++] = e, e.isBeingObserved || (e.isBeingObserved = !0,
  1228. e.onBecomeObserved())), !0) : (0 === e.observers.length && Ue.inBatch > 0 && Ve(e),
  1229. !1);
  1230. }
  1231. function Xe(e, t) {
  1232. if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"),
  1233. e.isTracing === Te.BREAK) {
  1234. var n = [];
  1235. !function e(t, n, r) {
  1236. if (n.length >= 1e3) return void n.push("(and many more)");
  1237. n.push("" + new Array(r).join("\t") + t.name);
  1238. t.dependencies && t.dependencies.forEach(function(t) {
  1239. return e(t, n, r + 1);
  1240. });
  1241. }(wt(e), n, 1), new Function("debugger;\n/*\nTracing '" + e.name + "'\n\nYou are entering this break point because derivation '" + e.name + "' is being traced and '" + t.name + "' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n" + (e instanceof be ? e.derivation.toString().replace(/[*]\//g, "/") : "") + "\n\nThe dependencies for this derivation are:\n\n" + n.join("\n") + "\n*/\n    ")();
  1242. }
  1243. }
  1244. var Ye = function() {
  1245. function e(e, t, n) {
  1246. void 0 === e && (e = "Reaction@" + f()), this.name = e, this.onInvalidate = t, this.errorHandler = n,
  1247. this.observing = [], this.newObserving = [], this.dependenciesState = _e.NOT_TRACKING,
  1248. this.diffValue = 0, this.runId = 0, this.unboundDepsCount = 0, this.__mapid = "#" + f(),
  1249. this.isDisposed = !1, this._isScheduled = !1, this._isTrackPending = !1, this._isRunning = !1,
  1250. this.isTracing = Te.NONE;
  1251. }
  1252. return e.prototype.onBecomeStale = function() {
  1253. this.schedule();
  1254. }, e.prototype.schedule = function() {
  1255. this._isScheduled || (this._isScheduled = !0, Ue.pendingReactions.push(this), $e());
  1256. }, e.prototype.isScheduled = function() {
  1257. return this._isScheduled;
  1258. }, e.prototype.runReaction = function() {
  1259. if (!this.isDisposed) {
  1260. if (We(), this._isScheduled = !1, Ae(this)) {
  1261. this._isTrackPending = !0;
  1262. try {
  1263. this.onInvalidate(), this._isTrackPending && rt() && ot({
  1264. name: this.name,
  1265. type: "scheduled-reaction"
  1266. });
  1267. } catch (e) {
  1268. this.reportExceptionInDerivation(e);
  1269. }
  1270. }
  1271. qe();
  1272. }
  1273. }, e.prototype.track = function(e) {
  1274. We();
  1275. var t, n = rt();
  1276. n && (t = Date.now(), it({
  1277. name: this.name,
  1278. type: "reaction"
  1279. })), this._isRunning = !0;
  1280. var r = Re(this, e, void 0);
  1281. this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && Oe(this), Ie(r) && this.reportExceptionInDerivation(r.cause),
  1282. n && st({
  1283. time: Date.now() - t
  1284. }), qe();
  1285. }, e.prototype.reportExceptionInDerivation = function(e) {
  1286. var t = this;
  1287. if (this.errorHandler) this.errorHandler(e, this); else {
  1288. if (Ue.disableErrorBoundaries) throw e;
  1289. var n = "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'";
  1290. Ue.suppressReactionErrors ? console.warn("[mobx] (error in reaction '" + this.name + "' suppressed, fix error of causing action below)") : console.error(n, e),
  1291. rt() && ot({
  1292. type: "error",
  1293. name: this.name,
  1294. message: n,
  1295. error: "" + e
  1296. }), Ue.globalReactionErrorHandlers.forEach(function(n) {
  1297. return n(e, t);
  1298. });
  1299. }
  1300. }, e.prototype.dispose = function() {
  1301. this.isDisposed || (this.isDisposed = !0, this._isRunning || (We(), Oe(this), qe()));
  1302. }, e.prototype.getDisposer = function() {
  1303. var e = this.dispose.bind(this);
  1304. return e.$mobx = this, e;
  1305. }, e.prototype.toString = function() {
  1306. return "Reaction[" + this.name + "]";
  1307. }, e.prototype.trace = function(e) {
  1308. void 0 === e && (e = !1), $t(this, e);
  1309. }, e;
  1310. }();
  1311. function Je(e) {
  1312. return Ue.globalReactionErrorHandlers.push(e), function() {
  1313. var t = Ue.globalReactionErrorHandlers.indexOf(e);
  1314. t >= 0 && Ue.globalReactionErrorHandlers.splice(t, 1);
  1315. };
  1316. }
  1317. var Qe = 100, Ze = function(e) {
  1318. return e();
  1319. };
  1320. function $e() {
  1321. Ue.inBatch > 0 || Ue.isRunningReactions || Ze(et);
  1322. }
  1323. function et() {
  1324. Ue.isRunningReactions = !0;
  1325. for (var e = Ue.pendingReactions, t = 0; e.length > 0; ) {
  1326. ++t === Qe && (console.error("Reaction doesn't converge to a stable state after " + Qe + " iterations. Probably there is a cycle in the reactive function: " + e[0]),
  1327. e.splice(0));
  1328. for (var n = e.splice(0), r = 0, o = n.length; r < o; r++) n[r].runReaction();
  1329. }
  1330. Ue.isRunningReactions = !1;
  1331. }
  1332. var tt = T("Reaction", Ye);
  1333. function nt(e) {
  1334. var t = Ze;
  1335. Ze = function(n) {
  1336. return e(function() {
  1337. return t(n);
  1338. });
  1339. };
  1340. }
  1341. function rt() {
  1342. return !!Ue.spyListeners.length;
  1343. }
  1344. function ot(e) {
  1345. if (Ue.spyListeners.length) for (var t = Ue.spyListeners, n = 0, r = t.length; n < r; n++) t[n](e);
  1346. }
  1347. function it(e) {
  1348. ot(a({}, e, {
  1349. spyReportStart: !0
  1350. }));
  1351. }
  1352. var at = {
  1353. spyReportEnd: !0
  1354. };
  1355. function st(e) {
  1356. ot(e ? a({}, e, {
  1357. spyReportEnd: !0
  1358. }) : at);
  1359. }
  1360. function ut(e) {
  1361. return Ue.spyListeners.push(e), g(function() {
  1362. Ue.spyListeners = Ue.spyListeners.filter(function(t) {
  1363. return t !== e;
  1364. });
  1365. });
  1366. }
  1367. function lt() {
  1368. m(!1);
  1369. }
  1370. function ct(e) {
  1371. return function(t, n, r) {
  1372. if (r) {
  1373. if (r.value) return {
  1374. value: pe(e, r.value),
  1375. enumerable: !1,
  1376. configurable: !0,
  1377. writable: !0
  1378. };
  1379. var o = r.initializer;
  1380. return {
  1381. enumerable: !1,
  1382. configurable: !0,
  1383. writable: !0,
  1384. initializer: function() {
  1385. return pe(e, o.call(this));
  1386. }
  1387. };
  1388. }
  1389. return function i(e) {
  1390. return function(t, n, r) {
  1391. Object.defineProperty(t, n, {
  1392. configurable: !0,
  1393. enumerable: !1,
  1394. get: function() {},
  1395. set: function(t) {
  1396. b(this, n, pt(e, t));
  1397. }
  1398. });
  1399. };
  1400. }(e).apply(this, arguments);
  1401. };
  1402. }
  1403. var pt = function e(t, n, r, o) {
  1404. return 1 === arguments.length && "function" == typeof t ? pe(t.name || "<unnamed action>", t) : 2 === arguments.length && "function" == typeof n ? pe(t, n) : 1 === arguments.length && "string" == typeof t ? ct(t) : !0 !== o ? ct(n).apply(null, arguments) : void (t[n] = pe(t.name || n, r.value));
  1405. };
  1406. function dt(e, t) {
  1407. return de("string" == typeof e ? e : e.name || "<unnamed action>", "function" == typeof e ? e : t, this, void 0);
  1408. }
  1409. function ft(e) {
  1410. return "function" == typeof e && !0 === e.isMobxAction;
  1411. }
  1412. function mt(e, t, n) {
  1413. b(e, t, pe(t, n.bind(e)));
  1414. }
  1415. function ht(e, t) {
  1416. void 0 === t && (t = p);
  1417. var n, r = t && t.name || e.name || "Autorun@" + f();
  1418. if (!t.scheduler && !t.delay) n = new Ye(r, function() {
  1419. this.track(a);
  1420. }, t.onError); else {
  1421. var o = St(t), i = !1;
  1422. n = new Ye(r, function() {
  1423. i || (i = !0, o(function() {
  1424. i = !1, n.isDisposed || n.track(a);
  1425. }));
  1426. }, t.onError);
  1427. }
  1428. function a() {
  1429. e(n);
  1430. }
  1431. return n.schedule(), n.getDisposer();
  1432. }
  1433. pt.bound = function gt(e, t, n, r) {
  1434. return !0 === r ? (mt(e, t, n.value), null) : n ? {
  1435. configurable: !0,
  1436. enumerable: !1,
  1437. get: function() {
  1438. return mt(this, t, n.value || n.initializer.call(this)), this[t];
  1439. },
  1440. set: lt
  1441. } : {
  1442. enumerable: !1,
  1443. configurable: !0,
  1444. set: function(e) {
  1445. mt(this, t, e);
  1446. },
  1447. get: function() {}
  1448. };
  1449. };
  1450. var yt = function(e) {
  1451. return e();
  1452. };
  1453. function St(e) {
  1454. return e.scheduler ? e.scheduler : e.delay ? function(t) {
  1455. return setTimeout(t, e.delay);
  1456. } : yt;
  1457. }
  1458. function vt(e, t, n) {
  1459. void 0 === n && (n = p), "boolean" == typeof n && (n = {
  1460. fireImmediately: n
  1461. });
  1462. var r, o = n.name || "Reaction@" + f(), i = pt(o, n.onError ? function a(e, t) {
  1463. return function() {
  1464. try {
  1465. return t.apply(this, arguments);
  1466. } catch (t) {
  1467. e.call(this, t);
  1468. }
  1469. };
  1470. }(n.onError, t) : t), s = !n.scheduler && !n.delay, u = St(n), l = !0, c = !1, d = n.compareStructural ? G.structural : n.equals || G.default, m = new Ye(o, function() {
  1471. l || s ? h() : c || (c = !0, u(h));
  1472. }, n.onError);
  1473. function h() {
  1474. if (c = !1, !m.isDisposed) {
  1475. var t = !1;
  1476. m.track(function() {
  1477. var n = e(m);
  1478. t = l || !d(r, n), r = n;
  1479. }), l && n.fireImmediately && i(r, m), l || !0 !== t || i(r, m), l && (l = !1);
  1480. }
  1481. }
  1482. return m.schedule(), m.getDisposer();
  1483. }
  1484. function bt(e, t, n) {
  1485. return Tt("onBecomeObserved", e, t, n);
  1486. }
  1487. function _t(e, t, n) {
  1488. return Tt("onBecomeUnobserved", e, t, n);
  1489. }
  1490. function Tt(e, t, n, r) {
  1491. var o = "string" == typeof n ? Bn(t, n) : Bn(t), i = "string" == typeof n ? r : n, a = o[e];
  1492. return "function" != typeof a ? m(!1) : (o[e] = function() {
  1493. a.call(this), i.call(this);
  1494. }, function() {
  1495. o[e] = a;
  1496. });
  1497. }
  1498. function Et(e) {
  1499. var t = e.enforceActions, n = e.computedRequiresReaction, r = e.computedConfigurable, o = e.disableErrorBoundaries, i = e.arrayBuffer, a = e.reactionScheduler;
  1500. if (!0 === e.isolateGlobalState && function s() {
  1501. (Ue.pendingReactions.length || Ue.inBatch || Ue.isRunningReactions) && m("isolateGlobalState should be called before MobX is running any reactions"),
  1502. Ge = !0, Fe && (0 == --d().__mobxInstanceCount && (d().__mobxGlobals = void 0),
  1503. Ue = new Ne());
  1504. }(), void 0 !== t) {
  1505. var u = void 0;
  1506. switch (t) {
  1507. case !0:
  1508. case "observed":
  1509. u = !0;
  1510. break;
  1511.  
  1512. case !1:
  1513. case "never":
  1514. u = !1;
  1515. break;
  1516.  
  1517. case "strict":
  1518. case "always":
  1519. u = "strict";
  1520. break;
  1521.  
  1522. default:
  1523. m("Invalid value for 'enforceActions': '" + t + "', expected 'never', 'always' or 'observed'");
  1524. }
  1525. Ue.enforceActions = u, Ue.allowStateChanges = !0 !== u && "strict" !== u;
  1526. }
  1527. void 0 !== n && (Ue.computedRequiresReaction = !!n), void 0 !== r && (Ue.computedConfigurable = !!r),
  1528. void 0 !== o && (!0 === o && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),
  1529. Ue.disableErrorBoundaries = !!o), "number" == typeof i && Tn(i), a && nt(a);
  1530. }
  1531. function Ct(e, t) {
  1532. var n = "function" == typeof e ? e.prototype : e, r = function(e) {
  1533. var r = t[e];
  1534. Array.isArray(r) || (r = [ r ]);
  1535. var o = Object.getOwnPropertyDescriptor(n, e), i = r.reduce(function(t, r) {
  1536. return r(n, e, t);
  1537. }, o);
  1538. i && Object.defineProperty(n, e, i);
  1539. };
  1540. for (var o in t) r(o);
  1541. return e;
  1542. }
  1543. function It(e, t, n) {
  1544. return At(e, t, n, Y);
  1545. }
  1546. function At(e, t, n, r) {
  1547. var o = (r = J(r)).defaultDecorator || (!1 === r.deep ? te : Z);
  1548. z(e), Mn(e, r.name, o.enhancer), We();
  1549. try {
  1550. for (var i in t) {
  1551. var a = Object.getOwnPropertyDescriptor(t, i);
  1552. 0;
  1553. var s = (n && i in n ? n[i] : a.get ? ue : o)(e, i, a, !0);
  1554. s && Object.defineProperty(e, i, s);
  1555. }
  1556. } finally {
  1557. qe();
  1558. }
  1559. return e;
  1560. }
  1561. function wt(e, t) {
  1562. return Pt(Bn(e, t));
  1563. }
  1564. function Pt(e) {
  1565. var t = {
  1566. name: e.name
  1567. };
  1568. return e.observing && e.observing.length > 0 && (t.dependencies = function n(e) {
  1569. var t = [];
  1570. return e.forEach(function(e) {
  1571. -1 === t.indexOf(e) && t.push(e);
  1572. }), t;
  1573. }(e.observing).map(Pt)), t;
  1574. }
  1575. function Rt(e, t) {
  1576. return Ot(Bn(e, t));
  1577. }
  1578. function Ot(e) {
  1579. var t = {
  1580. name: e.name
  1581. };
  1582. return function n(e) {
  1583. return e.observers && e.observers.length > 0;
  1584. }(e) && (t.observers = function r(e) {
  1585. return e.observers;
  1586. }(e).map(Ot)), t;
  1587. }
  1588. var xt = 0;
  1589. function kt(e) {
  1590. 1 !== arguments.length && m("Flow expects one 1 argument and cannot be used as decorator");
  1591. var t = e.name || "<unnamed flow>";
  1592. return function() {
  1593. var n, r = arguments, o = ++xt, i = pt(t + " - runid: " + o + " - init", e).apply(this, r), a = void 0, s = new Promise(function(e, r) {
  1594. var s = 0;
  1595. function u(e) {
  1596. var n;
  1597. a = void 0;
  1598. try {
  1599. n = pt(t + " - runid: " + o + " - yield " + s++, i.next).call(i, e);
  1600. } catch (e) {
  1601. return r(e);
  1602. }
  1603. c(n);
  1604. }
  1605. function l(e) {
  1606. var n;
  1607. a = void 0;
  1608. try {
  1609. n = pt(t + " - runid: " + o + " - yield " + s++, i.throw).call(i, e);
  1610. } catch (e) {
  1611. return r(e);
  1612. }
  1613. c(n);
  1614. }
  1615. function c(t) {
  1616. if (!t || "function" != typeof t.then) return t.done ? e(t.value) : (a = Promise.resolve(t.value)).then(u, l);
  1617. t.then(c, r);
  1618. }
  1619. n = r, u(void 0);
  1620. });
  1621. return s.cancel = pt(t + " - runid: " + o + " - cancel", function() {
  1622. try {
  1623. a && Mt(a);
  1624. var e = i.return(), t = Promise.resolve(e.value);
  1625. t.then(y, y), Mt(t), n(new Error("FLOW_CANCELLED"));
  1626. } catch (e) {
  1627. n(e);
  1628. }
  1629. }), s;
  1630. };
  1631. }
  1632. function Mt(e) {
  1633. "function" == typeof e.cancel && e.cancel();
  1634. }
  1635. function Lt(e, t, n) {
  1636. var r;
  1637. if (Pn(e) || Cn(e) || ve(e)) r = jn(e); else {
  1638. if (!Un(e)) return m(!1);
  1639. if ("string" != typeof t) return m(!1);
  1640. r = jn(e, t);
  1641. }
  1642. return void 0 !== r.dehancer ? m(!1) : (r.dehancer = "function" == typeof t ? t : n,
  1643. function() {
  1644. r.dehancer = void 0;
  1645. });
  1646. }
  1647. function Dt(e, t, n) {
  1648. return "function" == typeof n ? function r(e, t, n) {
  1649. return jn(e, t).intercept(n);
  1650. }(e, t, n) : function o(e, t) {
  1651. return jn(e).intercept(t);
  1652. }(e, t);
  1653. }
  1654. function Nt(e, t) {
  1655. if (null == e) return !1;
  1656. if (void 0 !== t) {
  1657. if (!1 === Un(e)) return !1;
  1658. if (!e.$mobx.values[t]) return !1;
  1659. var n = Bn(e, t);
  1660. return Ee(n);
  1661. }
  1662. return Ee(e);
  1663. }
  1664. function Ft(e) {
  1665. return arguments.length > 1 ? m(!1) : Nt(e);
  1666. }
  1667. function Gt(e, t) {
  1668. return "string" != typeof t ? m(!1) : Nt(e, t);
  1669. }
  1670. function Ut(e, t) {
  1671. if (null == e) return !1;
  1672. if (void 0 !== t) {
  1673. if (Un(e)) {
  1674. var n = e.$mobx;
  1675. return n.values && !!n.values[t];
  1676. }
  1677. return !1;
  1678. }
  1679. return Un(e) || !!e.$mobx || D(e) || tt(e) || Ee(e);
  1680. }
  1681. function Bt(e) {
  1682. return 1 !== arguments.length && m(!1), Ut(e);
  1683. }
  1684. function jt(e, t) {
  1685. return "string" != typeof t ? m(!1) : Ut(e, t);
  1686. }
  1687. function Ht(e) {
  1688. return Un(e) ? e.$mobx.getKeys() : Pn(e) ? e._keys.slice() : xn(e) ? A(e.keys()) : Cn(e) ? e.map(function(e, t) {
  1689. return t;
  1690. }) : m(!1);
  1691. }
  1692. function zt(e) {
  1693. return Un(e) ? Ht(e).map(function(t) {
  1694. return e[t];
  1695. }) : Pn(e) ? Ht(e).map(function(t) {
  1696. return e.get(t);
  1697. }) : xn(e) ? A(e.values()) : Cn(e) ? e.slice() : m(!1);
  1698. }
  1699. function Vt(e) {
  1700. return Un(e) ? Ht(e).map(function(t) {
  1701. return [ t, e[t] ];
  1702. }) : Pn(e) ? Ht(e).map(function(t) {
  1703. return [ t, e.get(t) ];
  1704. }) : xn(e) ? A(e.entries()) : Cn(e) ? e.map(function(e, t) {
  1705. return [ t, e ];
  1706. }) : m(!1);
  1707. }
  1708. function Wt(e, t, n) {
  1709. if (2 !== arguments.length || xn(e)) if (Un(e)) {
  1710. var r = e.$mobx;
  1711. r.values[t] ? r.write(e, t, n) : Ln(e, t, n, r.defaultEnhancer);
  1712. } else if (Pn(e)) e.set(t, n); else if (xn(e)) e.add(t); else {
  1713. if (!Cn(e)) return m(!1);
  1714. "number" != typeof t && (t = parseInt(t, 10)), h(t >= 0, "Not a valid index: '" + t + "'"),
  1715. We(), t >= e.length && (e.length = t + 1), e[t] = n, qe();
  1716. } else {
  1717. We();
  1718. var o = t;
  1719. try {
  1720. for (var i in o) Wt(e, i, o[i]);
  1721. } finally {
  1722. qe();
  1723. }
  1724. }
  1725. }
  1726. function qt(e, t) {
  1727. if (Un(e)) e.$mobx.remove(t); else if (Pn(e)) e.delete(t); else if (xn(e)) e.delete(t); else {
  1728. if (!Cn(e)) return m(!1);
  1729. "number" != typeof t && (t = parseInt(t, 10)), h(t >= 0, "Not a valid index: '" + t + "'"),
  1730. e.splice(t, 1);
  1731. }
  1732. }
  1733. function Kt(e, t) {
  1734. if (Un(e)) {
  1735. var n = jn(e);
  1736. return n.getKeys(), !!n.values[t];
  1737. }
  1738. return Pn(e) ? e.has(t) : xn(e) ? e.has(t) : Cn(e) ? t >= 0 && t < e.length : m(!1);
  1739. }
  1740. function Xt(e, t) {
  1741. if (Kt(e, t)) return Un(e) ? e[t] : Pn(e) ? e.get(t) : Cn(e) ? e[t] : m(!1);
  1742. }
  1743. function Yt(e, t, n, r) {
  1744. return "function" == typeof n ? function o(e, t, n, r) {
  1745. return jn(e, t).observe(n, r);
  1746. }(e, t, n, r) : function i(e, t, n) {
  1747. return jn(e).observe(t, n);
  1748. }(e, t, n);
  1749. }
  1750. var Jt = {
  1751. detectCycles: !0,
  1752. exportMapsAsObjects: !0,
  1753. recurseEverything: !1
  1754. };
  1755. function Qt(e, t, n, r) {
  1756. return r.detectCycles && e.set(t, n), n;
  1757. }
  1758. function Zt(e, t) {
  1759. var n;
  1760. return "boolean" == typeof t && (t = {
  1761. detectCycles: t
  1762. }), t || (t = Jt), t.detectCycles = void 0 === t.detectCycles ? !0 === t.recurseEverything : !0 === t.detectCycles,
  1763. t.detectCycles && (n = new Map()), function e(t, n, r) {
  1764. if (!n.recurseEverything && !Bt(t)) return t;
  1765. if ("object" != typeof t) return t;
  1766. if (null === t) return null;
  1767. if (t instanceof Date) return t;
  1768. if (ve(t)) return e(t.get(), n, r);
  1769. if (Bt(t) && Ht(t), !0 === n.detectCycles && null !== t && r.has(t)) return r.get(t);
  1770. if (Cn(t) || Array.isArray(t)) {
  1771. var o = Qt(r, t, [], n), i = t.map(function(t) {
  1772. return e(t, n, r);
  1773. });
  1774. o.length = i.length;
  1775. for (var a = 0, s = i.length; a < s; a++) o[a] = i[a];
  1776. return o;
  1777. }
  1778. if (xn(t) || Object.getPrototypeOf(t) === Set.prototype) {
  1779. if (!1 === n.exportMapsAsObjects) {
  1780. var u = Qt(r, t, new Set(), n);
  1781. return t.forEach(function(t) {
  1782. u.add(e(t, n, r));
  1783. }), u;
  1784. }
  1785. var l = Qt(r, t, [], n);
  1786. return t.forEach(function(t) {
  1787. l.push(e(t, n, r));
  1788. }), l;
  1789. }
  1790. if (Pn(t) || Object.getPrototypeOf(t) === Map.prototype) {
  1791. if (!1 === n.exportMapsAsObjects) {
  1792. var c = Qt(r, t, new Map(), n);
  1793. return t.forEach(function(t, o) {
  1794. c.set(o, e(t, n, r));
  1795. }), c;
  1796. }
  1797. var p = Qt(r, t, {}, n);
  1798. return t.forEach(function(t, o) {
  1799. p[o] = e(t, n, r);
  1800. }), p;
  1801. }
  1802. var d = Qt(r, t, {}, n);
  1803. for (var f in t) d[f] = e(t[f], n, r);
  1804. return d;
  1805. }(e, t, n);
  1806. }
  1807. function $t() {
  1808. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  1809. var n = !1;
  1810. "boolean" == typeof e[e.length - 1] && (n = e.pop());
  1811. var r = function o(e) {
  1812. switch (e.length) {
  1813. case 0:
  1814. return Ue.trackingDerivation;
  1815.  
  1816. case 1:
  1817. return Bn(e[0]);
  1818.  
  1819. case 2:
  1820. return Bn(e[0], e[1]);
  1821. }
  1822. }(e);
  1823. if (!r) return m(!1);
  1824. r.isTracing === Te.NONE && console.log("[mobx.trace] '" + r.name + "' tracing enabled"),
  1825. r.isTracing = n ? Te.BREAK : Te.LOG;
  1826. }
  1827. function en(e, t) {
  1828. void 0 === t && (t = void 0), We();
  1829. try {
  1830. return e.apply(t);
  1831. } finally {
  1832. qe();
  1833. }
  1834. }
  1835. function tn(e, t, n) {
  1836. return 1 === arguments.length || t && "object" == typeof t ? function r(e, t) {
  1837. 0;
  1838. var n, r = new Promise(function(r, o) {
  1839. var i = nn(e, r, a({}, t, {
  1840. onError: o
  1841. }));
  1842. n = function() {
  1843. i(), o("WHEN_CANCELLED");
  1844. };
  1845. });
  1846. return r.cancel = n, r;
  1847. }(e, t) : nn(e, t, n || {});
  1848. }
  1849. function nn(e, t, n) {
  1850. var r;
  1851. "number" == typeof n.timeout && (r = setTimeout(function() {
  1852. if (!i.$mobx.isDisposed) {
  1853. i();
  1854. var e = new Error("WHEN_TIMEOUT");
  1855. if (!n.onError) throw e;
  1856. n.onError(e);
  1857. }
  1858. }, n.timeout)), n.name = n.name || "When@" + f();
  1859. var o = pe(n.name + "-effect", t), i = ht(function(t) {
  1860. e() && (t.dispose(), r && clearTimeout(r), o());
  1861. }, n);
  1862. return i;
  1863. }
  1864. function rn(e) {
  1865. return void 0 !== e.interceptors && e.interceptors.length > 0;
  1866. }
  1867. function on(e, t) {
  1868. var n = e.interceptors || (e.interceptors = []);
  1869. return n.push(t), g(function() {
  1870. var e = n.indexOf(t);
  1871. -1 !== e && n.splice(e, 1);
  1872. });
  1873. }
  1874. function an(e, t) {
  1875. var n = ke();
  1876. try {
  1877. var r = e.interceptors;
  1878. if (r) for (var o = 0, i = r.length; o < i && (h(!(t = r[o](t)) || t.type, "Intercept handlers should return nothing or a change object"),
  1879. t); o++) ;
  1880. return t;
  1881. } finally {
  1882. Me(n);
  1883. }
  1884. }
  1885. function sn(e) {
  1886. return void 0 !== e.changeListeners && e.changeListeners.length > 0;
  1887. }
  1888. function un(e, t) {
  1889. var n = e.changeListeners || (e.changeListeners = []);
  1890. return n.push(t), g(function() {
  1891. var e = n.indexOf(t);
  1892. -1 !== e && n.splice(e, 1);
  1893. });
  1894. }
  1895. function ln(e, t) {
  1896. var n = ke(), r = e.changeListeners;
  1897. if (r) {
  1898. for (var o = 0, i = (r = r.slice()).length; o < i; o++) r[o](t);
  1899. Me(n);
  1900. }
  1901. }
  1902. var cn, pn, dn = (cn = !1, pn = {}, Object.defineProperty(pn, "0", {
  1903. set: function() {
  1904. cn = !0;
  1905. }
  1906. }), Object.create(pn)[0] = 1, !1 === cn), fn = 0, mn = function() {
  1907. return function e() {};
  1908. }();
  1909. !function hn(e, t) {
  1910. void 0 !== Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : void 0 !== e.prototype.__proto__ ? e.prototype.__proto__ = t : e.prototype = t;
  1911. }(mn, Array.prototype), Object.isFrozen(Array) && [ "constructor", "push", "shift", "concat", "pop", "unshift", "replace", "find", "findIndex", "splice", "reverse", "sort" ].forEach(function(e) {
  1912. Object.defineProperty(mn.prototype, e, {
  1913. configurable: !0,
  1914. writable: !0,
  1915. value: Array.prototype[e]
  1916. });
  1917. });
  1918. var gn = function() {
  1919. function e(e, t, n, r) {
  1920. this.array = n, this.owned = r, this.values = [], this.lastKnownLength = 0, this.atom = new L(e || "ObservableArray@" + f()),
  1921. this.enhancer = function(n, r) {
  1922. return t(n, r, e + "[..]");
  1923. };
  1924. }
  1925. return e.prototype.dehanceValue = function(e) {
  1926. return void 0 !== this.dehancer ? this.dehancer(e) : e;
  1927. }, e.prototype.dehanceValues = function(e) {
  1928. return void 0 !== this.dehancer && e.length > 0 ? e.map(this.dehancer) : e;
  1929. }, e.prototype.intercept = function(e) {
  1930. return on(this, e);
  1931. }, e.prototype.observe = function(e, t) {
  1932. return void 0 === t && (t = !1), t && e({
  1933. object: this.array,
  1934. type: "splice",
  1935. index: 0,
  1936. added: this.values.slice(),
  1937. addedCount: this.values.length,
  1938. removed: [],
  1939. removedCount: 0
  1940. }), un(this, e);
  1941. }, e.prototype.getArrayLength = function() {
  1942. return this.atom.reportObserved(), this.values.length;
  1943. }, e.prototype.setArrayLength = function(e) {
  1944. if ("number" != typeof e || e < 0) throw new Error("[mobx.array] Out of range: " + e);
  1945. var t = this.values.length;
  1946. if (e !== t) if (e > t) {
  1947. for (var n = new Array(e - t), r = 0; r < e - t; r++) n[r] = void 0;
  1948. this.spliceWithArray(t, 0, n);
  1949. } else this.spliceWithArray(e, t - e);
  1950. }, e.prototype.updateArrayLength = function(e, t) {
  1951. if (e !== this.lastKnownLength) throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");
  1952. this.lastKnownLength += t, t > 0 && e + t + 1 > fn && Tn(e + t + 1);
  1953. }, e.prototype.spliceWithArray = function(e, t, n) {
  1954. var r = this;
  1955. Pe(this.atom);
  1956. var o = this.values.length;
  1957. if (void 0 === e ? e = 0 : e > o ? e = o : e < 0 && (e = Math.max(0, o + e)), t = 1 === arguments.length ? o - e : null == t ? 0 : Math.max(0, Math.min(t, o - e)),
  1958. void 0 === n && (n = c), rn(this)) {
  1959. var i = an(this, {
  1960. object: this.array,
  1961. type: "splice",
  1962. index: e,
  1963. removedCount: t,
  1964. added: n
  1965. });
  1966. if (!i) return c;
  1967. t = i.removedCount, n = i.added;
  1968. }
  1969. var a = (n = 0 === n.length ? n : n.map(function(e) {
  1970. return r.enhancer(e, void 0);
  1971. })).length - t;
  1972. this.updateArrayLength(o, a);
  1973. var s = this.spliceItemsIntoValues(e, t, n);
  1974. return 0 === t && 0 === n.length || this.notifyArraySplice(e, n, s), this.dehanceValues(s);
  1975. }, e.prototype.spliceItemsIntoValues = function(e, t, n) {
  1976. var r;
  1977. if (n.length < 1e4) return (r = this.values).splice.apply(r, u([ e, t ], n));
  1978. var o = this.values.slice(e, e + t);
  1979. return this.values = this.values.slice(0, e).concat(n, this.values.slice(e + t)),
  1980. o;
  1981. }, e.prototype.notifyArrayChildUpdate = function(e, t, n) {
  1982. var r = !this.owned && rt(), o = sn(this), i = o || r ? {
  1983. object: this.array,
  1984. type: "update",
  1985. index: e,
  1986. newValue: t,
  1987. oldValue: n
  1988. } : null;
  1989. r && it(a({}, i, {
  1990. name: this.atom.name
  1991. })), this.atom.reportChanged(), o && ln(this, i), r && st();
  1992. }, e.prototype.notifyArraySplice = function(e, t, n) {
  1993. var r = !this.owned && rt(), o = sn(this), i = o || r ? {
  1994. object: this.array,
  1995. type: "splice",
  1996. index: e,
  1997. removed: n,
  1998. added: t,
  1999. removedCount: n.length,
  2000. addedCount: t.length
  2001. } : null;
  2002. r && it(a({}, i, {
  2003. name: this.atom.name
  2004. })), this.atom.reportChanged(), o && ln(this, i), r && st();
  2005. }, e;
  2006. }(), yn = function(e) {
  2007. function t(t, n, r, o) {
  2008. void 0 === r && (r = "ObservableArray@" + f()), void 0 === o && (o = !1);
  2009. var i = e.call(this) || this, a = new gn(r, n, i, o);
  2010. if (_(i, "$mobx", a), t && t.length) {
  2011. var s = he(!0);
  2012. i.spliceWithArray(0, 0, t), ge(s);
  2013. }
  2014. return dn && Object.defineProperty(a.array, "0", vn), i;
  2015. }
  2016. return i(t, e), t.prototype.intercept = function(e) {
  2017. return this.$mobx.intercept(e);
  2018. }, t.prototype.observe = function(e, t) {
  2019. return void 0 === t && (t = !1), this.$mobx.observe(e, t);
  2020. }, t.prototype.clear = function() {
  2021. return this.splice(0);
  2022. }, t.prototype.concat = function() {
  2023. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  2024. return this.$mobx.atom.reportObserved(), Array.prototype.concat.apply(this.peek(), e.map(function(e) {
  2025. return Cn(e) ? e.peek() : e;
  2026. }));
  2027. }, t.prototype.replace = function(e) {
  2028. return this.$mobx.spliceWithArray(0, this.$mobx.values.length, e);
  2029. }, t.prototype.toJS = function() {
  2030. return this.slice();
  2031. }, t.prototype.toJSON = function() {
  2032. return this.toJS();
  2033. }, t.prototype.peek = function() {
  2034. return this.$mobx.atom.reportObserved(), this.$mobx.dehanceValues(this.$mobx.values);
  2035. }, t.prototype.find = function(e, t, n) {
  2036. void 0 === n && (n = 0), arguments.length;
  2037. var r = this.findIndex.apply(this, arguments);
  2038. return -1 === r ? void 0 : this.get(r);
  2039. }, t.prototype.findIndex = function(e, t, n) {
  2040. void 0 === n && (n = 0), arguments.length;
  2041. for (var r = this.peek(), o = r.length, i = n; i < o; i++) if (e.call(t, r[i], i, this)) return i;
  2042. return -1;
  2043. }, t.prototype.splice = function(e, t) {
  2044. for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r];
  2045. switch (arguments.length) {
  2046. case 0:
  2047. return [];
  2048.  
  2049. case 1:
  2050. return this.$mobx.spliceWithArray(e);
  2051.  
  2052. case 2:
  2053. return this.$mobx.spliceWithArray(e, t);
  2054. }
  2055. return this.$mobx.spliceWithArray(e, t, n);
  2056. }, t.prototype.spliceWithArray = function(e, t, n) {
  2057. return this.$mobx.spliceWithArray(e, t, n);
  2058. }, t.prototype.push = function() {
  2059. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  2060. var n = this.$mobx;
  2061. return n.spliceWithArray(n.values.length, 0, e), n.values.length;
  2062. }, t.prototype.pop = function() {
  2063. return this.splice(Math.max(this.$mobx.values.length - 1, 0), 1)[0];
  2064. }, t.prototype.shift = function() {
  2065. return this.splice(0, 1)[0];
  2066. }, t.prototype.unshift = function() {
  2067. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  2068. var n = this.$mobx;
  2069. return n.spliceWithArray(0, 0, e), n.values.length;
  2070. }, t.prototype.reverse = function() {
  2071. var e = this.slice();
  2072. return e.reverse.apply(e, arguments);
  2073. }, t.prototype.sort = function(e) {
  2074. var t = this.slice();
  2075. return t.sort.apply(t, arguments);
  2076. }, t.prototype.remove = function(e) {
  2077. var t = this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);
  2078. return t > -1 && (this.splice(t, 1), !0);
  2079. }, t.prototype.move = function(e, t) {
  2080. function n(e) {
  2081. if (e < 0) throw new Error("[mobx.array] Index out of bounds: " + e + " is negative");
  2082. var t = this.$mobx.values.length;
  2083. if (e >= t) throw new Error("[mobx.array] Index out of bounds: " + e + " is not smaller than " + t);
  2084. }
  2085. if (n.call(this, e), n.call(this, t), e !== t) {
  2086. var r, o = this.$mobx.values;
  2087. r = e < t ? u(o.slice(0, e), o.slice(e + 1, t + 1), [ o[e] ], o.slice(t + 1)) : u(o.slice(0, t), [ o[e] ], o.slice(t, e), o.slice(e + 1)),
  2088. this.replace(r);
  2089. }
  2090. }, t.prototype.get = function(e) {
  2091. var t = this.$mobx;
  2092. if (t) {
  2093. if (e < t.values.length) return t.atom.reportObserved(), t.dehanceValue(t.values[e]);
  2094. console.warn("[mobx.array] Attempt to read an array index (" + e + ") that is out of bounds (" + t.values.length + "). Please check length first. Out of bound indices will not be tracked by MobX");
  2095. }
  2096. }, t.prototype.set = function(e, t) {
  2097. var n = this.$mobx, r = n.values;
  2098. if (e < r.length) {
  2099. Pe(n.atom);
  2100. var o = r[e];
  2101. if (rn(n)) {
  2102. var i = an(n, {
  2103. type: "update",
  2104. object: this,
  2105. index: e,
  2106. newValue: t
  2107. });
  2108. if (!i) return;
  2109. t = i.newValue;
  2110. }
  2111. (t = n.enhancer(t, o)) !== o && (r[e] = t, n.notifyArrayChildUpdate(e, t, o));
  2112. } else {
  2113. if (e !== r.length) throw new Error("[mobx.array] Index out of bounds, " + e + " is larger than " + r.length);
  2114. n.spliceWithArray(e, 0, [ t ]);
  2115. }
  2116. }, t;
  2117. }(mn);
  2118. O(yn.prototype, function() {
  2119. this.$mobx.atom.reportObserved();
  2120. var e = this, t = 0;
  2121. return x({
  2122. next: function() {
  2123. return t < e.length ? {
  2124. value: e[t++],
  2125. done: !1
  2126. } : {
  2127. done: !0,
  2128. value: void 0
  2129. };
  2130. }
  2131. });
  2132. }), Object.defineProperty(yn.prototype, "length", {
  2133. enumerable: !1,
  2134. configurable: !0,
  2135. get: function() {
  2136. return this.$mobx.getArrayLength();
  2137. },
  2138. set: function(e) {
  2139. this.$mobx.setArrayLength(e);
  2140. }
  2141. }), b(yn.prototype, k(), "Array"), [ "every", "filter", "forEach", "indexOf", "join", "lastIndexOf", "map", "reduce", "reduceRight", "slice", "some", "toString", "toLocaleString" ].forEach(function(e) {
  2142. var t = Array.prototype[e];
  2143. h("function" == typeof t, "Base function not defined on Array prototype: '" + e + "'"),
  2144. b(yn.prototype, e, function() {
  2145. return t.apply(this.peek(), arguments);
  2146. });
  2147. }), function Sn(e, t) {
  2148. for (var n = 0; n < t.length; n++) b(e, t[n], e[t[n]]);
  2149. }(yn.prototype, [ "constructor", "intercept", "observe", "clear", "concat", "get", "replace", "toJS", "toJSON", "peek", "find", "findIndex", "splice", "spliceWithArray", "push", "pop", "set", "shift", "unshift", "reverse", "sort", "remove", "move", "toString", "toLocaleString" ]);
  2150. var vn = bn(0);
  2151. function bn(e) {
  2152. return {
  2153. enumerable: !1,
  2154. configurable: !1,
  2155. get: function() {
  2156. return this.get(e);
  2157. },
  2158. set: function(t) {
  2159. this.set(e, t);
  2160. }
  2161. };
  2162. }
  2163. function _n(e) {
  2164. Object.defineProperty(yn.prototype, "" + e, bn(e));
  2165. }
  2166. function Tn(e) {
  2167. for (var t = fn; t < e; t++) _n(t);
  2168. fn = e;
  2169. }
  2170. Tn(1e3);
  2171. var En = T("ObservableArrayAdministration", gn);
  2172. function Cn(e) {
  2173. return S(e) && En(e.$mobx);
  2174. }
  2175. var In = {}, An = function() {
  2176. function e(e, t, n) {
  2177. if (void 0 === t && (t = W), void 0 === n && (n = "ObservableMap@" + f()), this.enhancer = t,
  2178. this.name = n, this.$mobx = In, this._keys = new yn(void 0, q, this.name + ".keys()", !0),
  2179. "function" != typeof Map) throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");
  2180. this._data = new Map(), this._hasMap = new Map(), this.merge(e);
  2181. }
  2182. return e.prototype._has = function(e) {
  2183. return this._data.has(e);
  2184. }, e.prototype.has = function(e) {
  2185. var t = this;
  2186. if (!Ue.trackingDerivation) return this._has(e);
  2187. var n = this._hasMap.get(e);
  2188. if (!n) {
  2189. var r = n = new Se(this._has(e), q, this.name + "." + wn(e) + "?", !1);
  2190. this._hasMap.set(e, r), _t(r, function() {
  2191. return t._hasMap.delete(e);
  2192. });
  2193. }
  2194. return n.get();
  2195. }, e.prototype.set = function(e, t) {
  2196. var n = this._has(e);
  2197. if (rn(this)) {
  2198. var r = an(this, {
  2199. type: n ? "update" : "add",
  2200. object: this,
  2201. newValue: t,
  2202. name: e
  2203. });
  2204. if (!r) return this;
  2205. t = r.newValue;
  2206. }
  2207. return n ? this._updateValue(e, t) : this._addValue(e, t), this;
  2208. }, e.prototype.delete = function(e) {
  2209. var t = this;
  2210. if (rn(this) && !(o = an(this, {
  2211. type: "delete",
  2212. object: this,
  2213. name: e
  2214. }))) return !1;
  2215. if (this._has(e)) {
  2216. var n = rt(), r = sn(this), o = r || n ? {
  2217. type: "delete",
  2218. object: this,
  2219. oldValue: this._data.get(e).value,
  2220. name: e
  2221. } : null;
  2222. return n && it(a({}, o, {
  2223. name: this.name,
  2224. key: e
  2225. })), en(function() {
  2226. t._keys.remove(e), t._updateHasMapEntry(e, !1), t._data.get(e).setNewValue(void 0),
  2227. t._data.delete(e);
  2228. }), r && ln(this, o), n && st(), !0;
  2229. }
  2230. return !1;
  2231. }, e.prototype._updateHasMapEntry = function(e, t) {
  2232. var n = this._hasMap.get(e);
  2233. n && n.setNewValue(t);
  2234. }, e.prototype._updateValue = function(e, t) {
  2235. var n = this._data.get(e);
  2236. if ((t = n.prepareNewValue(t)) !== Ue.UNCHANGED) {
  2237. var r = rt(), o = sn(this), i = o || r ? {
  2238. type: "update",
  2239. object: this,
  2240. oldValue: n.value,
  2241. name: e,
  2242. newValue: t
  2243. } : null;
  2244. r && it(a({}, i, {
  2245. name: this.name,
  2246. key: e
  2247. })), n.setNewValue(t), o && ln(this, i), r && st();
  2248. }
  2249. }, e.prototype._addValue = function(e, t) {
  2250. var n = this;
  2251. en(function() {
  2252. var r = new Se(t, n.enhancer, n.name + "." + wn(e), !1);
  2253. n._data.set(e, r), t = r.value, n._updateHasMapEntry(e, !0), n._keys.push(e);
  2254. });
  2255. var r = rt(), o = sn(this), i = o || r ? {
  2256. type: "add",
  2257. object: this,
  2258. name: e,
  2259. newValue: t
  2260. } : null;
  2261. r && it(a({}, i, {
  2262. name: this.name,
  2263. key: e
  2264. })), o && ln(this, i), r && st();
  2265. }, e.prototype.get = function(e) {
  2266. return this.has(e) ? this.dehanceValue(this._data.get(e).get()) : this.dehanceValue(void 0);
  2267. }, e.prototype.dehanceValue = function(e) {
  2268. return void 0 !== this.dehancer ? this.dehancer(e) : e;
  2269. }, e.prototype.keys = function() {
  2270. return this._keys[R()]();
  2271. }, e.prototype.values = function() {
  2272. var e = this, t = 0;
  2273. return x({
  2274. next: function() {
  2275. return t < e._keys.length ? {
  2276. value: e.get(e._keys[t++]),
  2277. done: !1
  2278. } : {
  2279. value: void 0,
  2280. done: !0
  2281. };
  2282. }
  2283. });
  2284. }, e.prototype.entries = function() {
  2285. var e = this, t = 0;
  2286. return x({
  2287. next: function() {
  2288. if (t < e._keys.length) {
  2289. var n = e._keys[t++];
  2290. return {
  2291. value: [ n, e.get(n) ],
  2292. done: !1
  2293. };
  2294. }
  2295. return {
  2296. done: !0
  2297. };
  2298. }
  2299. });
  2300. }, e.prototype.forEach = function(e, t) {
  2301. var n = this;
  2302. this._keys.forEach(function(r) {
  2303. return e.call(t, n.get(r), r, n);
  2304. });
  2305. }, e.prototype.merge = function(e) {
  2306. var t = this;
  2307. return Pn(e) && (e = e.toJS()), en(function() {
  2308. v(e) ? Object.keys(e).forEach(function(n) {
  2309. return t.set(n, e[n]);
  2310. }) : Array.isArray(e) ? e.forEach(function(e) {
  2311. var n = s(e, 2), r = n[0], o = n[1];
  2312. return t.set(r, o);
  2313. }) : C(e) ? e.constructor !== Map ? m("Cannot initialize from classes that inherit from Map: " + e.constructor.name) : e.forEach(function(e, n) {
  2314. return t.set(n, e);
  2315. }) : null != e && m("Cannot initialize map from " + e);
  2316. }), this;
  2317. }, e.prototype.clear = function() {
  2318. var e = this;
  2319. en(function() {
  2320. xe(function() {
  2321. e._keys.slice().forEach(function(t) {
  2322. return e.delete(t);
  2323. });
  2324. });
  2325. });
  2326. }, e.prototype.replace = function(e) {
  2327. var t = this;
  2328. return en(function() {
  2329. var n = function r(e) {
  2330. return v(e) ? Object.keys(e) : Array.isArray(e) ? e.map(function(e) {
  2331. return s(e, 1)[0];
  2332. }) : C(e) || Pn(e) ? A(e.keys()) : m("Cannot get keys from '" + e + "'");
  2333. }(e);
  2334. t._keys.filter(function(e) {
  2335. return -1 === n.indexOf(e);
  2336. }).forEach(function(e) {
  2337. return t.delete(e);
  2338. }), t.merge(e);
  2339. }), this;
  2340. }, Object.defineProperty(e.prototype, "size", {
  2341. get: function() {
  2342. return this._keys.length;
  2343. },
  2344. enumerable: !0,
  2345. configurable: !0
  2346. }), e.prototype.toPOJO = function() {
  2347. var e = this, t = {};
  2348. return this._keys.forEach(function(n) {
  2349. return t["symbol" == typeof n ? n : wn(n)] = e.get(n);
  2350. }), t;
  2351. }, e.prototype.toJS = function() {
  2352. var e = this, t = new Map();
  2353. return this._keys.forEach(function(n) {
  2354. return t.set(n, e.get(n));
  2355. }), t;
  2356. }, e.prototype.toJSON = function() {
  2357. return this.toPOJO();
  2358. }, e.prototype.toString = function() {
  2359. var e = this;
  2360. return this.name + "[{ " + this._keys.map(function(t) {
  2361. return wn(t) + ": " + e.get(t);
  2362. }).join(", ") + " }]";
  2363. }, e.prototype.observe = function(e, t) {
  2364. return un(this, e);
  2365. }, e.prototype.intercept = function(e) {
  2366. return on(this, e);
  2367. }, e;
  2368. }();
  2369. function wn(e) {
  2370. return e && e.toString ? e.toString() : new String(e).toString();
  2371. }
  2372. O(An.prototype, function() {
  2373. return this.entries();
  2374. }), _(An.prototype, k(), "Map");
  2375. var Pn = T("ObservableMap", An), Rn = {}, On = function() {
  2376. function e(e, t, n) {
  2377. if (void 0 === t && (t = W), void 0 === n && (n = "ObservableSet@" + f()), this.name = n,
  2378. this.$mobx = Rn, this._data = new Set(), this._atom = N(this.name), "function" != typeof Set) throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");
  2379. this.enhancer = function(e, r) {
  2380. return t(e, r, n);
  2381. }, e && this.replace(e);
  2382. }
  2383. return e.prototype.dehanceValue = function(e) {
  2384. return void 0 !== this.dehancer ? this.dehancer(e) : e;
  2385. }, e.prototype.clear = function() {
  2386. var e = this;
  2387. en(function() {
  2388. xe(function() {
  2389. e._data.forEach(function(t) {
  2390. e.delete(t);
  2391. });
  2392. });
  2393. });
  2394. }, e.prototype.forEach = function(e, t) {
  2395. var n = this;
  2396. this._data.forEach(function(r) {
  2397. e.call(t, r, r, n);
  2398. });
  2399. }, Object.defineProperty(e.prototype, "size", {
  2400. get: function() {
  2401. return this._atom.reportObserved(), this._data.size;
  2402. },
  2403. enumerable: !0,
  2404. configurable: !0
  2405. }), e.prototype.add = function(e) {
  2406. var t = this;
  2407. if ((Pe(this._atom), rn(this)) && !(o = an(this, {
  2408. type: "add",
  2409. object: this,
  2410. newValue: e
  2411. }))) return this;
  2412. if (!this.has(e)) {
  2413. en(function() {
  2414. t._data.add(t.enhancer(e, void 0)), t._atom.reportChanged();
  2415. });
  2416. var n = rt(), r = sn(this), o = r || n ? {
  2417. type: "add",
  2418. object: this,
  2419. newValue: e
  2420. } : null;
  2421. 0, r && ln(this, o);
  2422. }
  2423. return this;
  2424. }, e.prototype.delete = function(e) {
  2425. var t = this;
  2426. if (rn(this) && !(o = an(this, {
  2427. type: "delete",
  2428. object: this,
  2429. oldValue: e
  2430. }))) return !1;
  2431. if (this.has(e)) {
  2432. var n = rt(), r = sn(this), o = r || n ? {
  2433. type: "delete",
  2434. object: this,
  2435. oldValue: e
  2436. } : null;
  2437. return en(function() {
  2438. t._atom.reportChanged(), t._data.delete(e);
  2439. }), r && ln(this, o), !0;
  2440. }
  2441. return !1;
  2442. }, e.prototype.has = function(e) {
  2443. return this._atom.reportObserved(), this._data.has(this.dehanceValue(e));
  2444. }, e.prototype.entries = function() {
  2445. var e = 0, t = A(this.keys()), n = A(this.values());
  2446. return x({
  2447. next: function() {
  2448. var r = e;
  2449. return e += 1, r < n.length ? {
  2450. value: [ t[r], n[r] ],
  2451. done: !1
  2452. } : {
  2453. done: !0
  2454. };
  2455. }
  2456. });
  2457. }, e.prototype.keys = function() {
  2458. return this.values();
  2459. }, e.prototype.values = function() {
  2460. this._atom.reportObserved();
  2461. var e, t = this, n = 0;
  2462. return void 0 !== this._data.values ? e = A(this._data.values()) : (e = [], this._data.forEach(function(t) {
  2463. return e.push(t);
  2464. })), x({
  2465. next: function() {
  2466. return n < e.length ? {
  2467. value: t.dehanceValue(e[n++]),
  2468. done: !1
  2469. } : {
  2470. done: !0
  2471. };
  2472. }
  2473. });
  2474. }, e.prototype.replace = function(e) {
  2475. var t = this;
  2476. return xn(e) && (e = e.toJS()), en(function() {
  2477. Array.isArray(e) ? (t.clear(), e.forEach(function(e) {
  2478. return t.add(e);
  2479. })) : I(e) ? (t.clear(), e.forEach(function(e) {
  2480. return t.add(e);
  2481. })) : null != e && m("Cannot initialize set from " + e);
  2482. }), this;
  2483. }, e.prototype.observe = function(e, t) {
  2484. return un(this, e);
  2485. }, e.prototype.intercept = function(e) {
  2486. return on(this, e);
  2487. }, e.prototype.toJS = function() {
  2488. return new Set(this);
  2489. }, e.prototype.toString = function() {
  2490. return this.name + "[ " + A(this.keys()).join(", ") + " ]";
  2491. }, e;
  2492. }();
  2493. O(On.prototype, function() {
  2494. return this.values();
  2495. }), _(On.prototype, k(), "Set");
  2496. var xn = T("ObservableSet", On), kn = function() {
  2497. function e(e, t, n) {
  2498. this.target = e, this.name = t, this.defaultEnhancer = n, this.values = {};
  2499. }
  2500. return e.prototype.read = function(e, t) {
  2501. if (this.target === e || (this.illegalAccess(e, t), this.values[t])) return this.values[t].get();
  2502. }, e.prototype.write = function(e, t, n) {
  2503. var r = this.target;
  2504. r !== e && this.illegalAccess(e, t);
  2505. var o = this.values[t];
  2506. if (o instanceof be) o.set(n); else {
  2507. if (rn(this)) {
  2508. if (!(u = an(this, {
  2509. type: "update",
  2510. object: r,
  2511. name: t,
  2512. newValue: n
  2513. }))) return;
  2514. n = u.newValue;
  2515. }
  2516. if ((n = o.prepareNewValue(n)) !== Ue.UNCHANGED) {
  2517. var i = sn(this), s = rt(), u = i || s ? {
  2518. type: "update",
  2519. object: r,
  2520. oldValue: o.value,
  2521. name: t,
  2522. newValue: n
  2523. } : null;
  2524. s && it(a({}, u, {
  2525. name: this.name,
  2526. key: t
  2527. })), o.setNewValue(n), i && ln(this, u), s && st();
  2528. }
  2529. }
  2530. }, e.prototype.remove = function(e) {
  2531. if (this.values[e]) {
  2532. var t = this.target;
  2533. if (rn(this)) if (!(i = an(this, {
  2534. object: t,
  2535. name: e,
  2536. type: "remove"
  2537. }))) return;
  2538. try {
  2539. We();
  2540. var n = sn(this), r = rt(), o = this.values[e].get();
  2541. this.keys && this.keys.remove(e), delete this.values[e], delete this.target[e];
  2542. var i = n || r ? {
  2543. type: "remove",
  2544. object: t,
  2545. oldValue: o,
  2546. name: e
  2547. } : null;
  2548. r && it(a({}, i, {
  2549. name: this.name,
  2550. key: e
  2551. })), n && ln(this, i), r && st();
  2552. } finally {
  2553. qe();
  2554. }
  2555. }
  2556. }, e.prototype.illegalAccess = function(e, t) {
  2557. console.warn("Property '" + t + "' of '" + e + "' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner");
  2558. }, e.prototype.observe = function(e, t) {
  2559. return un(this, e);
  2560. }, e.prototype.intercept = function(e) {
  2561. return on(this, e);
  2562. }, e.prototype.getKeys = function() {
  2563. var e = this;
  2564. return void 0 === this.keys && (this.keys = new yn(Object.keys(this.values).filter(function(t) {
  2565. return e.values[t] instanceof Se;
  2566. }), q, "keys(" + this.name + ")", !0)), this.keys.slice();
  2567. }, e;
  2568. }();
  2569. function Mn(e, t, n) {
  2570. void 0 === t && (t = ""), void 0 === n && (n = W);
  2571. var r = e.$mobx;
  2572. return r || (v(e) || (t = (e.constructor.name || "ObservableObject") + "@" + f()),
  2573. t || (t = "ObservableObject@" + f()), _(e, "$mobx", r = new kn(e, t, n)), r);
  2574. }
  2575. function Ln(e, t, n, r) {
  2576. var o = Mn(e);
  2577. if (rn(o)) {
  2578. var i = an(o, {
  2579. object: e,
  2580. name: t,
  2581. type: "add",
  2582. newValue: n
  2583. });
  2584. if (!i) return;
  2585. n = i.newValue;
  2586. }
  2587. n = (o.values[t] = new Se(n, r, o.name + "." + t, !1)).value, Object.defineProperty(e, t, function s(e) {
  2588. return Dn[e] || (Dn[e] = {
  2589. configurable: !0,
  2590. enumerable: !0,
  2591. get: function() {
  2592. return this.$mobx.read(this, e);
  2593. },
  2594. set: function(t) {
  2595. this.$mobx.write(this, e, t);
  2596. }
  2597. });
  2598. }(t)), o.keys && o.keys.push(t), function u(e, t, n, r) {
  2599. var o = sn(e), i = rt(), s = o || i ? {
  2600. type: "add",
  2601. object: t,
  2602. name: n,
  2603. newValue: r
  2604. } : null;
  2605. i && it(a({}, s, {
  2606. name: e.name,
  2607. key: n
  2608. }));
  2609. o && ln(e, s);
  2610. i && st();
  2611. }(o, e, t, n);
  2612. }
  2613. var Dn = Object.create(null), Nn = Object.create(null);
  2614. function Fn(e) {
  2615. var t = e.$mobx;
  2616. return t || (z(e), e.$mobx);
  2617. }
  2618. var Gn = T("ObservableObjectAdministration", kn);
  2619. function Un(e) {
  2620. return !!S(e) && (z(e), Gn(e.$mobx));
  2621. }
  2622. function Bn(e, t) {
  2623. if ("object" == typeof e && null !== e) {
  2624. if (Cn(e)) return void 0 !== t && m(!1), e.$mobx.atom;
  2625. if (xn(e)) return e.$mobx;
  2626. if (Pn(e)) {
  2627. var n = e;
  2628. return void 0 === t ? Bn(n._keys) : ((r = n._data.get(t) || n._hasMap.get(t)) || m(!1),
  2629. r);
  2630. }
  2631. var r;
  2632. if (z(e), t && !e.$mobx && e[t], Un(e)) return t ? ((r = e.$mobx.values[t]) || m(!1),
  2633. r) : m(!1);
  2634. if (D(e) || Ee(e) || tt(e)) return e;
  2635. } else if ("function" == typeof e && tt(e.$mobx)) return e.$mobx;
  2636. return m(!1);
  2637. }
  2638. function jn(e, t) {
  2639. return e || m("Expecting some object"), void 0 !== t ? jn(Bn(e, t)) : D(e) || Ee(e) || tt(e) ? e : Pn(e) || xn(e) ? e : (z(e),
  2640. e.$mobx ? e.$mobx : void m(!1));
  2641. }
  2642. function Hn(e, t) {
  2643. return (void 0 !== t ? Bn(e, t) : Un(e) || Pn(e) || xn(e) ? jn(e) : Bn(e)).name;
  2644. }
  2645. var zn = Object.prototype.toString;
  2646. function Vn(e, t) {
  2647. return Wn(e, t);
  2648. }
  2649. function Wn(e, t, n, r) {
  2650. if (e === t) return 0 !== e || 1 / e == 1 / t;
  2651. if (null == e || null == t) return !1;
  2652. if (e != e) return t != t;
  2653. var o = typeof e;
  2654. return ("function" === o || "object" === o || "object" == typeof t) && function i(e, t, n, r) {
  2655. e = qn(e), t = qn(t);
  2656. var o = zn.call(e);
  2657. if (o !== zn.call(t)) return !1;
  2658. switch (o) {
  2659. case "[object RegExp]":
  2660. case "[object String]":
  2661. return "" + e == "" + t;
  2662.  
  2663. case "[object Number]":
  2664. return +e != +e ? +t != +t : 0 == +e ? 1 / +e == 1 / t : +e == +t;
  2665.  
  2666. case "[object Date]":
  2667. case "[object Boolean]":
  2668. return +e == +t;
  2669.  
  2670. case "[object Symbol]":
  2671. return "undefined" != typeof Symbol && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
  2672. }
  2673. var i = "[object Array]" === o;
  2674. if (!i) {
  2675. if ("object" != typeof e || "object" != typeof t) return !1;
  2676. var a = e.constructor, s = t.constructor;
  2677. if (a !== s && !("function" == typeof a && a instanceof a && "function" == typeof s && s instanceof s) && "constructor" in e && "constructor" in t) return !1;
  2678. }
  2679. r = r || [];
  2680. var u = (n = n || []).length;
  2681. for (;u--; ) if (n[u] === e) return r[u] === t;
  2682. if (n.push(e), r.push(t), i) {
  2683. if ((u = e.length) !== t.length) return !1;
  2684. for (;u--; ) if (!Wn(e[u], t[u], n, r)) return !1;
  2685. } else {
  2686. var l = Object.keys(e), c = void 0;
  2687. if (u = l.length, Object.keys(t).length !== u) return !1;
  2688. for (;u--; ) if (c = l[u], !Kn(t, c) || !Wn(e[c], t[c], n, r)) return !1;
  2689. }
  2690. return n.pop(), r.pop(), !0;
  2691. }(e, t, n, r);
  2692. }
  2693. function qn(e) {
  2694. return Cn(e) ? e.peek() : C(e) || Pn(e) ? A(e.entries()) : I(e) || xn(e) ? A(e.entries()) : e;
  2695. }
  2696. function Kn(e, t) {
  2697. return Object.prototype.hasOwnProperty.call(e, t);
  2698. }
  2699. var Xn = "$mobx";
  2700. "object" == typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
  2701. spy: ut,
  2702. extras: {
  2703. getDebugName: Hn
  2704. },
  2705. $mobx: Xn
  2706. });
  2707. }.call(this, n(179), n(339));
  2708. }, function(e, t, n) {
  2709. "use strict";
  2710. Object.defineProperty(t, "__esModule", {
  2711. value: !0
  2712. });
  2713. var r = n(366);
  2714. e.exports = r.translate;
  2715. }, function(e, t, n) {
  2716. !function(e, t, n) {
  2717. "use strict";
  2718. var r = "default" in n ? n.default : n, o = void 0, i = {
  2719. childContextTypes: !0,
  2720. contextTypes: !0,
  2721. defaultProps: !0,
  2722. displayName: !0,
  2723. getDefaultProps: !0,
  2724. getDerivedStateFromProps: !0,
  2725. mixins: !0,
  2726. propTypes: !0,
  2727. type: !0
  2728. }, a = {
  2729. name: !0,
  2730. length: !0,
  2731. prototype: !0,
  2732. caller: !0,
  2733. callee: !0,
  2734. arguments: !0,
  2735. arity: !0
  2736. }, s = Object.defineProperty, u = Object.getOwnPropertyNames, l = Object.getOwnPropertySymbols, c = Object.getOwnPropertyDescriptor, p = Object.getPrototypeOf, d = p && p(Object), f = function e(t, n, r) {
  2737. if ("string" != typeof n) {
  2738. if (d) {
  2739. var o = p(n);
  2740. o && o !== d && e(t, o, r);
  2741. }
  2742. var f = u(n);
  2743. l && (f = f.concat(l(n)));
  2744. for (var m = 0; m < f.length; ++m) {
  2745. var h = f[m];
  2746. if (!(i[h] || a[h] || r && r[h])) {
  2747. var g = c(n, h);
  2748. try {
  2749. s(t, h, g);
  2750. } catch (e) {}
  2751. }
  2752. }
  2753. return t;
  2754. }
  2755. return t;
  2756. }, m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
  2757. return typeof e;
  2758. } : function(e) {
  2759. return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
  2760. }, h = (function() {
  2761. function e(e) {
  2762. this.value = e;
  2763. }
  2764. function t(t) {
  2765. var n, r;
  2766. function o(n, r) {
  2767. try {
  2768. var a = t[n](r), s = a.value;
  2769. s instanceof e ? Promise.resolve(s.value).then(function(e) {
  2770. o("next", e);
  2771. }, function(e) {
  2772. o("throw", e);
  2773. }) : i(a.done ? "return" : "normal", a.value);
  2774. } catch (e) {
  2775. i("throw", e);
  2776. }
  2777. }
  2778. function i(e, t) {
  2779. switch (e) {
  2780. case "return":
  2781. n.resolve({
  2782. value: t,
  2783. done: !0
  2784. });
  2785. break;
  2786.  
  2787. case "throw":
  2788. n.reject(t);
  2789. break;
  2790.  
  2791. default:
  2792. n.resolve({
  2793. value: t,
  2794. done: !1
  2795. });
  2796. }
  2797. (n = n.next) ? o(n.key, n.arg) : r = null;
  2798. }
  2799. this._invoke = function a(e, t) {
  2800. return new Promise(function(i, a) {
  2801. var s = {
  2802. key: e,
  2803. arg: t,
  2804. resolve: i,
  2805. reject: a,
  2806. next: null
  2807. };
  2808. r ? r = r.next = s : (n = r = s, o(e, t));
  2809. });
  2810. }, "function" != typeof t.return && (this.return = void 0);
  2811. }
  2812. "function" == typeof Symbol && Symbol.asyncIterator && (t.prototype[Symbol.asyncIterator] = function() {
  2813. return this;
  2814. }), t.prototype.next = function(e) {
  2815. return this._invoke("next", e);
  2816. }, t.prototype.throw = function(e) {
  2817. return this._invoke("throw", e);
  2818. }, t.prototype.return = function(e) {
  2819. return this._invoke("return", e);
  2820. };
  2821. }(), function(e, t) {
  2822. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
  2823. }), g = function() {
  2824. function e(e, t) {
  2825. for (var n = 0; n < t.length; n++) {
  2826. var r = t[n];
  2827. r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
  2828. Object.defineProperty(e, r.key, r);
  2829. }
  2830. }
  2831. return function(t, n, r) {
  2832. return n && e(t.prototype, n), r && e(t, r), t;
  2833. };
  2834. }(), y = function(e, t) {
  2835. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  2836. e.prototype = Object.create(t && t.prototype, {
  2837. constructor: {
  2838. value: e,
  2839. enumerable: !1,
  2840. writable: !0,
  2841. configurable: !0
  2842. }
  2843. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
  2844. }, S = function(e, t) {
  2845. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  2846. return !t || "object" != typeof t && "function" != typeof t ? e : t;
  2847. }, v = function() {
  2848. function e() {
  2849. h(this, e), this.listeners = [];
  2850. }
  2851. return g(e, [ {
  2852. key: "on",
  2853. value: function e(t) {
  2854. var n = this;
  2855. return this.listeners.push(t), function() {
  2856. var e = n.listeners.indexOf(t);
  2857. -1 !== e && n.listeners.splice(e, 1);
  2858. };
  2859. }
  2860. }, {
  2861. key: "emit",
  2862. value: function e(t) {
  2863. this.listeners.forEach(function(e) {
  2864. return e(t);
  2865. });
  2866. }
  2867. } ]), e;
  2868. }();
  2869. function b(e) {
  2870. function n(n, r, o, i, a, s) {
  2871. for (var u = arguments.length, l = Array(u > 6 ? u - 6 : 0), c = 6; c < u; c++) l[c - 6] = arguments[c];
  2872. return t.untracked(function() {
  2873. if (i = i || "<<anonymous>>", s = s || o, null == r[o]) {
  2874. if (n) {
  2875. var t = null === r[o] ? "null" : "undefined";
  2876. return new Error("The " + a + " `" + s + "` is marked as required in `" + i + "`, but its value is `" + t + "`.");
  2877. }
  2878. return null;
  2879. }
  2880. return e.apply(void 0, [ r, o, i, a, s ].concat(l));
  2881. });
  2882. }
  2883. var r = n.bind(null, !1);
  2884. return r.isRequired = n.bind(null, !0), r;
  2885. }
  2886. function _(e) {
  2887. var t = void 0 === e ? "undefined" : m(e);
  2888. return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : function n(e, t) {
  2889. return "symbol" === e || ("Symbol" === t["@@toStringTag"] || "function" == typeof Symbol && t instanceof Symbol);
  2890. }(t, e) ? "symbol" : t;
  2891. }
  2892. function T(e, n) {
  2893. return b(function(r, o, i, a, s) {
  2894. return t.untracked(function() {
  2895. if (e && _(r[o]) === n.toLowerCase()) return null;
  2896. var a = void 0;
  2897. switch (n) {
  2898. case "Array":
  2899. a = t.isObservableArray;
  2900. break;
  2901.  
  2902. case "Object":
  2903. a = t.isObservableObject;
  2904. break;
  2905.  
  2906. case "Map":
  2907. a = t.isObservableMap;
  2908. break;
  2909.  
  2910. default:
  2911. throw new Error("Unexpected mobxType: " + n);
  2912. }
  2913. var u = r[o];
  2914. if (!a(u)) {
  2915. var l = function c(e) {
  2916. var t = _(e);
  2917. if ("object" === t) {
  2918. if (e instanceof Date) return "date";
  2919. if (e instanceof RegExp) return "regexp";
  2920. }
  2921. return t;
  2922. }(u), p = e ? " or javascript `" + n.toLowerCase() + "`" : "";
  2923. return new Error("Invalid prop `" + s + "` of type `" + l + "` supplied to `" + i + "`, expected `mobx.Observable" + n + "`" + p + ".");
  2924. }
  2925. return null;
  2926. });
  2927. });
  2928. }
  2929. function E(e, n) {
  2930. return b(function(r, o, i, a, s) {
  2931. for (var u = arguments.length, l = Array(u > 5 ? u - 5 : 0), c = 5; c < u; c++) l[c - 5] = arguments[c];
  2932. return t.untracked(function() {
  2933. if ("function" != typeof n) return new Error("Property `" + s + "` of component `" + i + "` has invalid PropType notation.");
  2934. var t = T(e, "Array")(r, o, i);
  2935. if (t instanceof Error) return t;
  2936. for (var u = r[o], c = 0; c < u.length; c++) if ((t = n.apply(void 0, [ u, c, i, a, s + "[" + c + "]" ].concat(l))) instanceof Error) return t;
  2937. return null;
  2938. });
  2939. });
  2940. }
  2941. var C = T(!1, "Array"), I = E.bind(null, !1), A = T(!1, "Map"), w = T(!1, "Object"), P = T(!0, "Array"), R = E.bind(null, !0), O = T(!0, "Object"), x = Object.freeze({
  2942. observableArray: C,
  2943. observableArrayOf: I,
  2944. observableMap: A,
  2945. observableObject: w,
  2946. arrayOrObservableArray: P,
  2947. arrayOrObservableArrayOf: R,
  2948. objectOrObservableObject: O
  2949. }), k = {
  2950. mobxStores: O
  2951. };
  2952. Object.seal(k);
  2953. var M = {
  2954. contextTypes: {
  2955. get: function e() {
  2956. return k;
  2957. },
  2958. set: function e(t) {
  2959. console.warn("Mobx Injector: you are trying to attach `contextTypes` on an component decorated with `inject` (or `observer`) HOC. Please specify the contextTypes on the wrapped component instead. It is accessible through the `wrappedComponent`");
  2960. },
  2961. configurable: !0,
  2962. enumerable: !1
  2963. },
  2964. isMobxInjector: {
  2965. value: !0,
  2966. writable: !0,
  2967. configurable: !0,
  2968. enumerable: !0
  2969. }
  2970. };
  2971. function L(e, t, r) {
  2972. var o, i, a = "inject-" + (t.displayName || t.name || t.constructor && t.constructor.name || "Unknown");
  2973. r && (a += "-with-" + r);
  2974. var s = (i = o = function(r) {
  2975. function o() {
  2976. var e, t, n;
  2977. h(this, o);
  2978. for (var r = arguments.length, i = Array(r), a = 0; a < r; a++) i[a] = arguments[a];
  2979. return n = S(this, (e = o.__proto__ || Object.getPrototypeOf(o)).call.apply(e, [ this ].concat(i))),
  2980. t = n, n.storeRef = function(e) {
  2981. n.wrappedInstance = e;
  2982. }, S(n, t);
  2983. }
  2984. return y(o, r), g(o, [ {
  2985. key: "render",
  2986. value: function r() {
  2987. var o = {};
  2988. for (var i in this.props) this.props.hasOwnProperty(i) && (o[i] = this.props[i]);
  2989. var a = e(this.context.mobxStores || {}, o, this.context) || {};
  2990. for (var s in a) o[s] = a[s];
  2991. return function u(e) {
  2992. return !(e.prototype && e.prototype.render);
  2993. }(t) || (o.ref = this.storeRef), n.createElement(t, o);
  2994. }
  2995. } ]), o;
  2996. }(n.Component), o.displayName = a, i);
  2997. return f(s, t), s.wrappedComponent = t, Object.defineProperties(s, M), s;
  2998. }
  2999. function D() {
  3000. var e = void 0;
  3001. if ("function" == typeof arguments[0]) return e = arguments[0], function(t) {
  3002. var n = L(e, t);
  3003. return n.isMobxInjector = !1, (n = te(n)).isMobxInjector = !0, n;
  3004. };
  3005. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  3006. return e = function r(e) {
  3007. return function(t, n) {
  3008. return e.forEach(function(e) {
  3009. if (!(e in n)) {
  3010. if (!(e in t)) throw new Error("MobX injector: Store '" + e + "' is not available! Make sure it is provided by some Provider");
  3011. n[e] = t[e];
  3012. }
  3013. }), n;
  3014. };
  3015. }(t), function(n) {
  3016. return L(e, n, t.join("-"));
  3017. };
  3018. }
  3019. var N = t.$mobx || "$mobx", F = !1, G = !1, U = !1, B = "undefined" != typeof WeakMap ? new WeakMap() : void 0, j = new v(), H = {};
  3020. function z(e) {
  3021. return H[e] || (H[e] = function t(e) {
  3022. return "function" == typeof Symbol ? Symbol(e) : "$mobxReactProp$" + e + Math.random();
  3023. }(e)), H[e];
  3024. }
  3025. var V = z("skipRender"), W = z("isForcingUpdate");
  3026. function q(e, t, n) {
  3027. Object.hasOwnProperty.call(e, t) ? e[t] = n : Object.defineProperty(e, t, {
  3028. enumerable: !1,
  3029. configurable: !0,
  3030. writable: !0,
  3031. value: n
  3032. });
  3033. }
  3034. function K(e) {
  3035. if (o) try {
  3036. return o(e);
  3037. } catch (e) {
  3038. return null;
  3039. }
  3040. return null;
  3041. }
  3042. function X(e) {
  3043. var t = K(e);
  3044. t && B && B.set(t, e), j.emit({
  3045. event: "render",
  3046. renderTime: e.__$mobRenderEnd - e.__$mobRenderStart,
  3047. totalTime: Date.now() - e.__$mobRenderStart,
  3048. component: e,
  3049. node: t
  3050. });
  3051. }
  3052. function Y() {
  3053. if ("undefined" == typeof WeakMap) throw new Error("[mobx-react] tracking components is not supported in this browser.");
  3054. F || (F = !0);
  3055. }
  3056. var J = new v();
  3057. function Q(e, t) {
  3058. if (Z(e, t)) return !0;
  3059. if ("object" !== (void 0 === e ? "undefined" : m(e)) || null === e || "object" !== (void 0 === t ? "undefined" : m(t)) || null === t) return !1;
  3060. var n = Object.keys(e), r = Object.keys(t);
  3061. if (n.length !== r.length) return !1;
  3062. for (var o = 0; o < n.length; o++) if (!hasOwnProperty.call(t, n[o]) || !Z(e[n[o]], t[n[o]])) return !1;
  3063. return !0;
  3064. }
  3065. function Z(e, t) {
  3066. return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t;
  3067. }
  3068. var $ = {
  3069. componentWillUnmount: function e() {
  3070. if (!0 !== G && (this.render[N] && this.render[N].dispose(), this.__$mobxIsUnmounted = !0,
  3071. F)) {
  3072. var t = K(this);
  3073. t && B && B.delete(t), j.emit({
  3074. event: "destroy",
  3075. component: this,
  3076. node: t
  3077. });
  3078. }
  3079. },
  3080. componentDidMount: function e() {
  3081. F && X(this);
  3082. },
  3083. componentDidUpdate: function e() {
  3084. F && X(this);
  3085. },
  3086. shouldComponentUpdate: function e(t, n) {
  3087. return G && console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),
  3088. this.state !== n || !Q(this.props, t);
  3089. }
  3090. };
  3091. function ee(e, n) {
  3092. var r = z(n + " value holder"), o = z(n + " atom holder");
  3093. function i() {
  3094. return this[o] || q(this, o, t.createAtom("reactive " + n)), this[o];
  3095. }
  3096. Object.defineProperty(e, n, {
  3097. configurable: !0,
  3098. enumerable: !0,
  3099. get: function e() {
  3100. return i.call(this).reportObserved(), this[r];
  3101. },
  3102. set: function e(t) {
  3103. this[W] || Q(this[r], t) ? q(this, r, t) : (q(this, r, t), q(this, V, !0), i.call(this).reportChanged(),
  3104. q(this, V, !1));
  3105. }
  3106. });
  3107. }
  3108. function te(e, r) {
  3109. if ("string" == typeof e) throw new Error("Store names should be provided as array");
  3110. if (Array.isArray(e)) return U || (U = !0, console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')),
  3111. r ? D.apply(null, e)(te(r)) : function(t) {
  3112. return te(e, t);
  3113. };
  3114. var o = e;
  3115. if (!0 === o.isMobxInjector && console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),
  3116. o.__proto__ === n.PureComponent && console.warn("Mobx observer: You are using 'observer' on React.PureComponent. These two achieve two opposite goals and should not be used together"),
  3117. !("function" != typeof o || o.prototype && o.prototype.render || o.isReactClass || n.Component.isPrototypeOf(o))) {
  3118. var i, a, s = te((a = i = function(e) {
  3119. function t() {
  3120. return h(this, t), S(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
  3121. }
  3122. return y(t, e), g(t, [ {
  3123. key: "render",
  3124. value: function e() {
  3125. return o.call(this, this.props, this.context);
  3126. }
  3127. } ]), t;
  3128. }(n.Component), i.displayName = o.displayName || o.name, i.contextTypes = o.contextTypes,
  3129. i.propTypes = o.propTypes, i.defaultProps = o.defaultProps, a));
  3130. return f(s, o), s;
  3131. }
  3132. if (!o) throw new Error("Please pass a valid component to 'observer'");
  3133. var u = o.prototype || o;
  3134. !function l(e) {
  3135. [ "componentDidMount", "componentWillUnmount", "componentDidUpdate" ].forEach(function(t) {
  3136. !function n(e, t) {
  3137. var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], r = e[t], o = $[t], i = r ? !0 === n ? function() {
  3138. o.apply(this, arguments), r.apply(this, arguments);
  3139. } : function() {
  3140. r.apply(this, arguments), o.apply(this, arguments);
  3141. } : o;
  3142. e[t] = i;
  3143. }(e, t);
  3144. }), e.shouldComponentUpdate ? e.shouldComponentUpdate !== $.shouldComponentUpdate && console.warn("Use `shouldComponentUpdate` in an `observer` based component breaks the behavior of `observer` and might lead to unexpected results. Manually implementing `sCU` should not be needed when using mobx-react.") : e.shouldComponentUpdate = $.shouldComponentUpdate;
  3145. }(u), o.isMobXReactObserver = !0, ee(u, "props"), ee(u, "state");
  3146. var c = u.render;
  3147. return u.render = function() {
  3148. return function e(r) {
  3149. var o = this;
  3150. if (!0 === G) return r.call(this);
  3151. function i() {
  3152. var e = this;
  3153. l = !1;
  3154. var n = void 0, r = void 0;
  3155. if (c.track(function() {
  3156. F && (e.__$mobRenderStart = Date.now());
  3157. try {
  3158. r = t._allowStateChanges(!1, u);
  3159. } catch (e) {
  3160. n = e;
  3161. }
  3162. F && (e.__$mobRenderEnd = Date.now());
  3163. }), n) throw J.emit(n), n;
  3164. return r;
  3165. }
  3166. var a = this.displayName || this.name || this.constructor && (this.constructor.displayName || this.constructor.name) || "<component>", s = this._reactInternalInstance && this._reactInternalInstance._rootNodeID || this._reactInternalInstance && this._reactInternalInstance._debugID || this._reactInternalFiber && this._reactInternalFiber._debugID;
  3167. q(this, V, !1), q(this, W, !1);
  3168. var u = r.bind(this), l = !1, c = new t.Reaction(a + "#" + s + ".render()", function() {
  3169. if (!l && (l = !0, "function" == typeof o.componentWillReact && o.componentWillReact(),
  3170. !0 !== o.__$mobxIsUnmounted)) {
  3171. var e = !0;
  3172. try {
  3173. q(o, W, !0), o[V] || n.Component.prototype.forceUpdate.call(o), e = !1;
  3174. } finally {
  3175. q(o, W, !1), e && c.dispose();
  3176. }
  3177. }
  3178. });
  3179. return c.reactComponent = this, i[N] = c, this.render = i, i.call(this);
  3180. }.call(this, c);
  3181. }, o;
  3182. }
  3183. var ne = te(function(e) {
  3184. var t = e.children, n = e.inject, o = e.render, i = t || o;
  3185. if (void 0 === i) return null;
  3186. if (!n) return i();
  3187. console.warn("<Observer inject=.../> is no longer supported. Please use inject on the enclosing component instead");
  3188. var a = D(n)(i);
  3189. return r.createElement(a, null);
  3190. });
  3191. ne.displayName = "Observer";
  3192. var re, oe, ie = function e(t, n, r, o, i) {
  3193. var a = "children" === n ? "render" : "children";
  3194. return "function" == typeof t[n] && "function" == typeof t[a] ? new Error("Invalid prop,do not use children and render in the same time in`" + r) : "function" != typeof t[n] && "function" != typeof t[a] ? new Error("Invalid prop `" + i + "` of type `" + m(t[n]) + "` supplied to `" + r + "`, expected `function`.") : void 0;
  3195. };
  3196. function ae() {
  3197. var e = this.constructor.getDerivedStateFromProps(this.props, this.state);
  3198. null != e && this.setState(e);
  3199. }
  3200. function se(e) {
  3201. this.setState(function t(n) {
  3202. var r = this.constructor.getDerivedStateFromProps(e, n);
  3203. return null != r ? r : null;
  3204. }.bind(this));
  3205. }
  3206. function ue(e, t) {
  3207. try {
  3208. var n = this.props, r = this.state;
  3209. this.props = e, this.state = t, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(n, r);
  3210. } finally {
  3211. this.props = n, this.state = r;
  3212. }
  3213. }
  3214. ne.propTypes = {
  3215. render: ie,
  3216. children: ie
  3217. }, ae.__suppressDeprecationWarning = !0, se.__suppressDeprecationWarning = !0, ue.__suppressDeprecationWarning = !0;
  3218. var le = {
  3219. children: !0,
  3220. key: !0,
  3221. ref: !0
  3222. }, ce = (oe = re = function(e) {
  3223. function t(e, n) {
  3224. h(this, t);
  3225. var r = S(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, n));
  3226. return r.state = {}, pe(e, r.state), r;
  3227. }
  3228. return y(t, e), g(t, [ {
  3229. key: "render",
  3230. value: function e() {
  3231. return n.Children.only(this.props.children);
  3232. }
  3233. }, {
  3234. key: "getChildContext",
  3235. value: function e() {
  3236. var t = {};
  3237. return pe(this.context.mobxStores, t), pe(this.props, t), {
  3238. mobxStores: t
  3239. };
  3240. }
  3241. } ], [ {
  3242. key: "getDerivedStateFromProps",
  3243. value: function e(t, n) {
  3244. if (!t) return null;
  3245. if (!n) return t;
  3246. if (Object.keys(t).filter(de).length !== Object.keys(n).filter(de).length && console.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),
  3247. !t.suppressChangedStoreWarning) for (var r in t) de(r) && n[r] !== t[r] && console.warn("MobX Provider: Provided store '" + r + "' has changed. Please avoid replacing stores as the change might not propagate to all children");
  3248. return t;
  3249. }
  3250. } ]), t;
  3251. }(n.Component), re.contextTypes = {
  3252. mobxStores: O
  3253. }, re.childContextTypes = {
  3254. mobxStores: O.isRequired
  3255. }, oe);
  3256. function pe(e, t) {
  3257. if (e) for (var n in e) de(n) && (t[n] = e[n]);
  3258. }
  3259. function de(e) {
  3260. return !le[e] && "suppressChangedStoreWarning" !== e;
  3261. }
  3262. if (function fe(e) {
  3263. var t = e.prototype;
  3264. if (!t || !t.isReactComponent) throw new Error("Can only polyfill class components");
  3265. if ("function" != typeof e.getDerivedStateFromProps && "function" != typeof t.getSnapshotBeforeUpdate) return e;
  3266. var n = null, r = null, o = null;
  3267. if ("function" == typeof t.componentWillMount ? n = "componentWillMount" : "function" == typeof t.UNSAFE_componentWillMount && (n = "UNSAFE_componentWillMount"),
  3268. "function" == typeof t.componentWillReceiveProps ? r = "componentWillReceiveProps" : "function" == typeof t.UNSAFE_componentWillReceiveProps && (r = "UNSAFE_componentWillReceiveProps"),
  3269. "function" == typeof t.componentWillUpdate ? o = "componentWillUpdate" : "function" == typeof t.UNSAFE_componentWillUpdate && (o = "UNSAFE_componentWillUpdate"),
  3270. null !== n || null !== r || null !== o) {
  3271. var i = e.displayName || e.name, a = "function" == typeof e.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
  3272. throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n" + i + " uses " + a + " but also contains the following legacy lifecycles:" + (null !== n ? "\n  " + n : "") + (null !== r ? "\n  " + r : "") + (null !== o ? "\n  " + o : "") + "\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks");
  3273. }
  3274. if ("function" == typeof e.getDerivedStateFromProps && (t.componentWillMount = ae,
  3275. t.componentWillReceiveProps = se), "function" == typeof t.getSnapshotBeforeUpdate) {
  3276. if ("function" != typeof t.componentDidUpdate) throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
  3277. t.componentWillUpdate = ue;
  3278. var s = t.componentDidUpdate;
  3279. t.componentDidUpdate = function e(t, n, r) {
  3280. var o = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : r;
  3281. s.call(this, t, n, o);
  3282. };
  3283. }
  3284. return e;
  3285. }(ce), !n.Component) throw new Error("mobx-react requires React to be available");
  3286. if (!t.spy) throw new Error("mobx-react requires mobx to be available");
  3287. if ("object" === ("undefined" == typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ ? "undefined" : m(__MOBX_DEVTOOLS_GLOBAL_HOOK__))) {
  3288. var me = {
  3289. spy: t.spy,
  3290. extras: {
  3291. getDebugName: t.getDebugName
  3292. }
  3293. }, he = {
  3294. renderReporter: j,
  3295. componentByNodeRegistry: B,
  3296. componentByNodeRegistery: B,
  3297. trackComponents: Y
  3298. };
  3299. __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(he, me);
  3300. }
  3301. e.propTypes = x, e.PropTypes = x, e.onError = function e(t) {
  3302. return J.on(t);
  3303. }, e.observer = te, e.Observer = ne, e.renderReporter = j, e.componentByNodeRegistery = B,
  3304. e.componentByNodeRegistry = B, e.trackComponents = Y, e.useStaticRendering = function ge(e) {
  3305. G = e;
  3306. }, e.Provider = ce, e.inject = D, Object.defineProperty(e, "__esModule", {
  3307. value: !0
  3308. });
  3309. }(t, n(2), n(1));
  3310. }, function(e, t, n) {
  3311. "use strict";
  3312. (function(e) {
  3313. Object.defineProperty(t, "__esModule", {
  3314. value: !0
  3315. });
  3316. var r = n(0), o = n(53), i = n(82), a = n(92), s = (n(491), n(36));
  3317. if (a.globalScope.__styleClassInitialized) throw new Error("The StyleClass module has already been loaded.\nThis is most likely due to importing from '../twinkle' instead of 'twinkle'.\nIt can usually be found by checking the stacktrace below.\nOtherwise, run 'yarn ast-inspector' in /client");
  3318. a.globalScope.__styleClassInitialized = !0;
  3319. var u = i.options.enableDevWarnings ? "Missing debug name. If you see this, it means the transformer is broken, or the call was made in another type of file. In that case, you need to pass it manually." : "Missing debug name";
  3320. function l(e) {
  3321. return e && e.pushObjectsTo;
  3322. }
  3323. t.isStyleClass = l, t.countUsage = function c(e) {
  3324. e && t.usageCounter.SurfaceStyle++;
  3325. }, t.usageCounter = {};
  3326. var p = function() {
  3327. function e() {
  3328. 0;
  3329. }
  3330. return e.prototype.getNumericStyle = function(e, t) {
  3331. var n = this.getStyleValue(e);
  3332. return "number" != typeof n || isNaN(n) ? t : n;
  3333. }, e;
  3334. }();
  3335. t.StyleClass = p;
  3336. var d = function(e) {
  3337. function t() {
  3338. return null !== e && e.apply(this, arguments) || this;
  3339. }
  3340. return r.__extends(t, e), t.prototype.getStyleValue = function(e, t) {
  3341. var n = this.getStyle()[e];
  3342. return void 0 === n ? t : n;
  3343. }, t.prototype.getNumericStyle = function(e, t) {
  3344. var n = this.getStyle()[e];
  3345. return "number" == typeof n ? n : t;
  3346. }, t;
  3347. }(p);
  3348. t.NonMergedStyleClass = d;
  3349. var f = 1;
  3350. t.staticStyles = {};
  3351. var m = {}, h = s.getBuildInfo().hasGetStyle(), g = {}, y = function(e) {
  3352. function n(n, r) {
  3353. var o = e.call(this) || this;
  3354. return o.style = r, o.kind = "StaticStyle", o.isSentToNative = !1, o.id = f++, t.staticStyles[o.id + ""] = o,
  3355. o;
  3356. }
  3357. return r.__extends(n, e), n.create = function(e, t) {
  3358. return new n(t, e);
  3359. }, n.hoist = function(e) {
  3360. throw new Error("Not hoisted, are the custom transformers broken?");
  3361. }, n.prototype.resetHooks = function() {
  3362. this.style = this.getStyle(), this.hookedStyle = void 0, this.isSentToNative = !1;
  3363. }, n.prototype.PRIVATE_style = function() {
  3364. return this.hookedStyle ? this.hookedStyle : this.hookStyle();
  3365. }, n.prototype.getStyle = function() {
  3366. return h && this.style === g ? o.nativeApi.getStyle(this.id) || g : this.style;
  3367. }, n.prototype.hookStyle = function() {
  3368. return this.hookedStyle = i.options.styleHook(this.debugName, this.style), this.hookedStyle;
  3369. }, n.prototype.sendToNative = function() {
  3370. o.nativeApi.createStyle(this.hookedStyle, this.id), this.isSentToNative = !0, h && (this.hookedStyle = g,
  3371. this.style = g);
  3372. }, n.prototype.pushObjectsTo = function(e, n) {
  3373. t.usageCounter[this.kind]++, this.hookedStyle || this.hookStyle(), n && !this.isSentToNative && this.sendToNative(),
  3374. e.push(this.id);
  3375. }, n.wrapLegacyStyle = function(e, t) {
  3376. if (!t) throw new Error(u);
  3377. if (m[t]) {
  3378. if (i.options.enableDevWarnings) throw new Error("You cannot call StaticStyle.wrapLegacyStyle twice for the same style: " + t);
  3379. return m[t];
  3380. }
  3381. return m[t] = n.create(e, t);
  3382. }, n.wrapLegacyStyleSheet = function(e, t) {
  3383. if (!t) throw new Error(u);
  3384. var r = {};
  3385. return Object.keys(e).forEach(function(o) {
  3386. r[o] = n.wrapLegacyStyle(e[o], t + "_" + o);
  3387. }), r;
  3388. }, n;
  3389. }(d);
  3390. function S(e, n, r) {
  3391. return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), e === t.emptyStyle ? n : n === t.emptyStyle ? e : new T(e, n, r);
  3392. }
  3393. t.StaticStyle = y, t.emptyStyle = new y("EmptyStyle", {}), t.emptyStyle.pushObjectsTo = function() {},
  3394. t.merge2 = S, t.merge3 = function v(e, n, r, o) {
  3395. return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), void 0 === r && (r = t.emptyStyle),
  3396. new E(e, n, r, o);
  3397. }, t.merge4 = function b(e, n, r, o, i) {
  3398. return void 0 === e && (e = t.emptyStyle), void 0 === n && (n = t.emptyStyle), void 0 === r && (r = t.emptyStyle),
  3399. void 0 === o && (o = t.emptyStyle), new C(e, n, r, o, i);
  3400. };
  3401. var _ = function(e) {
  3402. function n(t, n) {
  3403. var r = e.call(this) || this;
  3404. return r.style = n, r.kind = "DynamicStyle", r;
  3405. }
  3406. return r.__extends(n, e), n.prototype.getStyle = function() {
  3407. return this.style;
  3408. }, n.create = function(e, t) {
  3409. return new n(t, e);
  3410. }, n.prototype.pushObjectsTo = function(e, n) {
  3411. t.usageCounter[this.kind]++, e.push(i.options.styleHook(this.debugName, this.style));
  3412. }, n.maybeLegacyStyle = function(e, r) {
  3413. if (!r) throw new Error(u);
  3414. if (e) {
  3415. if (Array.isArray(e)) {
  3416. for (var o = void 0, i = 0, a = e; i < a.length; i++) {
  3417. var s = a[i], c = n.maybeLegacyStyle(s, r);
  3418. o = o ? S(o, c) : c;
  3419. }
  3420. return o || t.emptyStyle;
  3421. }
  3422. return l(e) ? e : n.wrapLegacyStyle(e, r);
  3423. }
  3424. return t.emptyStyle;
  3425. }, n.wrapLegacyStyle = function(e, r) {
  3426. return e ? n.create(e, r) : t.emptyStyle;
  3427. }, n;
  3428. }(d);
  3429. t.DynamicStyle = _;
  3430. var T = function(e) {
  3431. function t(t, n, r) {
  3432. var o = e.call(this) || this;
  3433. return o.style1 = t, o.style2 = n, o.kind = "MergeStyle2", o;
  3434. }
  3435. return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) {
  3436. this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t);
  3437. }, t.prototype.getStyleValue = function(e, t) {
  3438. var n = this.style2.getStyleValue(e);
  3439. return void 0 !== n ? n : this.style1.getStyleValue(e);
  3440. }, t;
  3441. }(p);
  3442. t.MergeStyle2 = T;
  3443. var E = function(e) {
  3444. function t(t, n, r, o) {
  3445. var i = e.call(this) || this;
  3446. return i.style1 = t, i.style2 = n, i.style3 = r, i.kind = "MergeStyle3", i;
  3447. }
  3448. return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) {
  3449. this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t), this.style3.pushObjectsTo(e, t);
  3450. }, t.prototype.getStyleValue = function(e, t) {
  3451. var n = this.style3.getStyleValue(e);
  3452. if (void 0 !== n) return n;
  3453. var r = this.style2.getStyleValue(e);
  3454. return void 0 !== r ? r : this.style1.getStyleValue(e);
  3455. }, t;
  3456. }(p);
  3457. t.MergeStyle3 = E;
  3458. var C = function(e) {
  3459. function t(t, n, r, o, i) {
  3460. var a = e.call(this) || this;
  3461. return a.style1 = t, a.style2 = n, a.style3 = r, a.style4 = o, a.kind = "MergeStyle4",
  3462. a;
  3463. }
  3464. return r.__extends(t, e), t.prototype.pushObjectsTo = function(e, t) {
  3465. this.style1.pushObjectsTo(e, t), this.style2.pushObjectsTo(e, t), this.style3.pushObjectsTo(e, t),
  3466. this.style4.pushObjectsTo(e, t);
  3467. }, t.prototype.getStyleValue = function(e, t) {
  3468. var n = this.style4.getStyleValue(e);
  3469. if (void 0 !== n) return n;
  3470. var r = this.style3.getStyleValue(e);
  3471. if (void 0 !== r) return r;
  3472. var o = this.style2.getStyleValue(e);
  3473. return void 0 !== o ? o : this.style1.getStyleValue(e);
  3474. }, t;
  3475. }(p);
  3476. t.MergeStyle4 = C;
  3477. }).call(this, n(15));
  3478. }, function(e, t, n) {
  3479. "use strict";
  3480. Object.defineProperty(t, "__esModule", {
  3481. value: !0
  3482. });
  3483. var r = n(1), o = n(77), i = n(21), a = n(5), s = n(29), u = n(368), l = n(20), c = n(18), p = n(19);
  3484. function d(e, t) {
  3485. var n, r = u.useColorStyle(), o = l.isArabicLanguage() ? c.CommonStyles.arabicLetterSpacing : a.emptyStyle;
  3486. return e.color && (n = a.DynamicStyle.create({
  3487. color: e.color
  3488. }, "6fa32af1:52:21")), a.merge4(t.fontStyle(e.size || i.TextSize.M), n || r, a.DynamicStyle.maybeLegacyStyle(e.style, "6fa32af1:57:45"), o);
  3489. }
  3490. function f(e) {
  3491. switch (e) {
  3492. case s.TextType.LIGHT:
  3493. case s.TextType.HEADER_LIGHT:
  3494. return s.TextType.LIGHT;
  3495.  
  3496. case s.TextType.NORMAL:
  3497. case s.TextType.HEADER_NORMAL:
  3498. return s.TextType.NORMAL;
  3499.  
  3500. case s.TextType.EMPHASIS:
  3501. return s.TextType.EMPHASIS;
  3502.  
  3503. default:
  3504. return s.TextType.NORMAL;
  3505. }
  3506. }
  3507. t.Text = o.observer(function e(t) {
  3508. var n = p.useTheme().getFonts(), o = d(t, t.font || t.type && n[t.type] || n[f(t.type)] || n.normal);
  3509. return r.createElement("surface", {
  3510. onClick: t.onClick,
  3511. onMouseEnter: t.onMouseEnter,
  3512. onMouseDown: t.onMouseDown,
  3513. text: t.value,
  3514. style: o
  3515. });
  3516. }), t.useTextStyle = d, t.textToHeaderType = function m(e) {
  3517. switch (e) {
  3518. case s.TextType.NORMAL:
  3519. case s.TextType.HEADER_NORMAL:
  3520. case s.TextType.EMPHASIS:
  3521. return s.TextType.HEADER_NORMAL;
  3522.  
  3523. case s.TextType.LIGHT:
  3524. case s.TextType.HEADER_LIGHT:
  3525. return s.TextType.HEADER_LIGHT;
  3526.  
  3527. default:
  3528. return s.TextType.HEADER_NORMAL;
  3529. }
  3530. }, t.headerToTextType = f;
  3531. }, function(e, t, n) {
  3532. "use strict";
  3533. Object.defineProperty(t, "__esModule", {
  3534. value: !0
  3535. });
  3536. var r = n(0), o = n(1), i = n(5), a = n(5), s = n(9);
  3537. function u(e, n) {
  3538. void 0 === n && (n = t.COMPRESSED);
  3539. var r = n ? 50 : 62, o = n ? 8 : 10;
  3540. return Math.floor(r * e + o * (e - 1));
  3541. }
  3542. function l(e, n) {
  3543. void 0 === n && (n = t.COMPRESSED);
  3544. var r = n ? 8 : 10;
  3545. return Math.floor(e * r);
  3546. }
  3547. t.COMPRESSED = s.SpartaGlobals.bundleIsPC && !0, t.GUTTER = t.COMPRESSED ? 8 : 10,
  3548. t.COLUMNS = 24, t.getWidth = u, t.getHeight = l, t.spacer = function c(e, n) {
  3549. return void 0 === e && (e = 1), void 0 === n && (n = t.COMPRESSED), (n ? 8 : 10) * e;
  3550. };
  3551. var p = a.StaticStyle.wrapLegacyStyleSheet({
  3552. row: {
  3553. margin: [ 0, 0, t.GUTTER, 0 ],
  3554. flexDirection: "row",
  3555. flexWrap: "nowrap"
  3556. },
  3557. colWithGutter: {
  3558. margin: [ 0, t.GUTTER, 0, 0 ],
  3559. flexDirection: "column",
  3560. flexWrap: "nowrap"
  3561. },
  3562. colWithoutGutter: {
  3563. margin: [ 0, 0, 0, 0 ],
  3564. flexDirection: "column",
  3565. flexWrap: "nowrap"
  3566. },
  3567. rowElementSpacing: {
  3568. flewDirection: "row",
  3569. justifyContent: "space-between"
  3570. }
  3571. }, "fe76dcdf:44:15"), d = {}, f = {};
  3572. t.Row = function m(e) {
  3573. var t = e.height ? i.DynamicStyle.create(function n(e) {
  3574. var t = d[e];
  3575. return t || (t = d[e] = {
  3576. height: l(e)
  3577. }), t;
  3578. }(e.height), "fe76dcdf:93:39") : a.emptyStyle;
  3579. return o.createElement("surface", r.__assign({
  3580. style: i.merge3(p.row, t, i.DynamicStyle.maybeLegacyStyle(e.style, "fe76dcdf:96:51"))
  3581. }, e.surfaceProps || {}), e.children);
  3582. }, t.Col = function h(e) {
  3583. var t = e.width ? i.DynamicStyle.create(function n(e) {
  3584. var t = f[e];
  3585. return t || (t = f[e] = {
  3586. width: u(e)
  3587. }), t;
  3588. }(e.width), "fe76dcdf:111:37") : a.emptyStyle, r = !i.isStyleClass(e.style) && e.style && e.style.width ? p.colWithGutter : p.colWithoutGutter;
  3589. return o.createElement("surface", {
  3590. style: i.merge3(r, t, i.DynamicStyle.maybeLegacyStyle(e.style, "fe76dcdf:115:50"))
  3591. }, e.children);
  3592. };
  3593. }, function(e, t, n) {
  3594. "use strict";
  3595. Object.defineProperty(t, "__esModule", {
  3596. value: !0
  3597. });
  3598. var r = n(71);
  3599. t.SpartaContext = r.createContext("Sparta");
  3600. }, function(e, t, n) {
  3601. "use strict";
  3602. (function(e) {
  3603. Object.defineProperty(t, "__esModule", {
  3604. value: !0
  3605. });
  3606. var r = n(36).getBuildInfo();
  3607. e.get("SpartaGlobals").info("Running " + r.buildConfig + " on " + r.platform);
  3608. var o = r.isPC ? "PC" : r.isPS4 ? "PS4" : r.isXboxOne ? "XBOXONE" : "UNKNOWN", i = "PC" === o, a = "PS4" === o, s = "XBOXONE" === o, u = !i, l = o;
  3609. t.SpartaGlobals = {
  3610. bundleIsPC: i,
  3611. bundleIsPS4: a,
  3612. bundleIsXBOXONE: s,
  3613. bundleIsConsole: u,
  3614. bundlePlatform: l
  3615. };
  3616. }).call(this, n(15));
  3617. }, function(e, t, n) {
  3618. "use strict";
  3619. Object.defineProperty(t, "__esModule", {
  3620. value: !0
  3621. });
  3622. var r = n(292), o = n(53), i = 0, a = 0;
  3623. function s(e, t) {
  3624. var n = {};
  3625. return e.forEach(function(e) {
  3626. n[t(e)] = e;
  3627. }), n;
  3628. }
  3629. function u(e, t) {
  3630. var n = e.slice();
  3631. return n.sort(function(e, n) {
  3632. return e[t] > n[t] ? 1 : -1;
  3633. }), n;
  3634. }
  3635. var l = function() {
  3636. function e() {}
  3637. return e.byFBAction = function(t) {
  3638. return e._byFBAction[t];
  3639. }, e.Accept = new r.Key("Accept", 13, 5, [ "OK", "TwinkleAccept" ], i++, a++, !1),
  3640. e.Decline = new r.Key("Decline", 27, 7, [ "Back", "TwinkleDecline" ], i++, a++, !1),
  3641. e.Option1 = new r.Key("Option1", 88, 6, [ "View", "TwinkleOption1" ], i++, a++, !1),
  3642. e.Option2 = new r.Key("Option2", 89, 4, [ "Edit", "TwinkleOption2" ], i++, a++, !1),
  3643. e.Option3 = new r.Key("Option3", 45, 10, [ "LThumb", "TwinkleOption3" ], i++, a++, !1),
  3644. e.Option4 = new r.Key("Option4", 46, 11, [ "RThumb", "TwinkleOption4" ], i++, a++, !1),
  3645. e.Previous = new r.Key("Previous", 33, 16, [ "TabLeft", "TwinklePrevious" ], i++, a++, !1),
  3646. e.Next = new r.Key("Next", 34, 17, [ "TabRight", "TwinkleNext" ], i++, a++, !1),
  3647. e.Home = new r.Key("Home", 36, 14, [ "MenuTriggerLeft", "TwinkleHome" ], i++, a++, !1),
  3648. e.End = new r.Key("End", 35, 15, [ "MenuTriggerRight", "TwinkleEnd" ], i++, a++, !1),
  3649. e.Up = new r.Key("Up", 38, 0, [ "NavigateUp", "TwinkleUp" ], i++, a++, !0), e.Down = new r.Key("Down", 40, 1, [ "NavigateDown", "TwinkleDown" ], i++, a++, !0),
  3650. e.Left = new r.Key("Left", 37, 2, [ "NavigateLeft", "TwinkleLeft" ], i++, a++, !0),
  3651. e.Right = new r.Key("Right", 39, 3, [ "NavigateRight", "TwinkleRight" ], i++, a++, !0),
  3652. e.Select = new r.Key("Select", 8, 13, [ "Deactivate", "TwinkleSelect" ], i++, a++, !1),
  3653. e.ScrollUp = new r.Key("ScrollUp", 47, 29, [ "NavigateRUp", "TwinkleScrollUp" ], i++, a++, !0),
  3654. e.ScrollDown = new r.Key("ScrollDown", 48, 30, [ "NavigateRDown", "TwinkleScrollDown" ], i++, a++, !0),
  3655. e.Start = new r.Key("Start", 32, 12, [ "Start", "TwinkleStart" ], i++, a++, !1),
  3656. e.list = [ e.Accept, e.Decline, e.Option1, e.Option2, e.Option3, e.Option4, e.Previous, e.Next, e.Home, e.End, e.Up, e.Down, e.Left, e.Right, e.Select, e.ScrollUp, e.ScrollDown, e.Start ],
  3657. e._byFBAction = [ s(e.list, function(e) {
  3658. return e.fbAction[0];
  3659. }), s(e.list, function(e) {
  3660. return e.fbAction[1];
  3661. }) ], e.byKeyCode = s(e.list, function(e) {
  3662. return "" + e.keyCode;
  3663. }), e.byPadCode = s(e.list, function(e) {
  3664. return "" + e.padCode;
  3665. }), e.prioritized = u(e.list, "priority"), e.ordered = u(e.list, "order"), e;
  3666. }();
  3667. if (t.Keys = l, o.nativeApi.isEnterOnCircle()) {
  3668. var c = l.Accept;
  3669. l.Accept = l.Decline, l.Decline = c;
  3670. }
  3671. }, function(e, t, n) {
  3672. "use strict";
  3673. Object.defineProperty(t, "__esModule", {
  3674. value: !0
  3675. });
  3676. var r = function() {
  3677. function e(e, t) {
  3678. this.label = e.label, this.action = e.action, this.holdAction = e.holdAction, this.releaseAction = e.releaseAction,
  3679. this.key = e.key, this.visible = e.visible, this.fontStyle = e.fontStyle, this.blockInputFor = "number" == typeof e.blockInputFor ? e.blockInputFor : 0,
  3680. this.icon = e.icon, this.lowPriority = e.lowPriority, this.debugName = e.debugName;
  3681. }
  3682. return e.prototype.equals = function(e) {
  3683. return this === e || this.label === e.label && this.action === e.action && this.holdAction === e.holdAction && this.releaseAction === e.releaseAction && this.key === e.key && this.visible === e.visible && this.blockInputFor === e.blockInputFor && this.fontStyle === e.fontStyle && this.icon === e.icon && this.lowPriority === e.lowPriority;
  3684. }, e.prototype.extend = function(t) {
  3685. return new e({
  3686. key: t.key || this.key,
  3687. label: t.label || this.label,
  3688. action: t.action || this.action,
  3689. holdAction: t.holdAction || this.holdAction,
  3690. releaseAction: t.releaseAction || this.releaseAction,
  3691. visible: "boolean" == typeof t.visible ? t.visible : this.visible,
  3692. blockInputFor: t.blockInputFor && t.blockInputFor > 0 ? t.blockInputFor : this.blockInputFor,
  3693. fontStyle: t.fontStyle || this.fontStyle,
  3694. lowPriority: t.lowPriority || this.lowPriority,
  3695. debugName: t.debugName ? t.debugName + "_extended" : void 0
  3696. });
  3697. }, e;
  3698. }();
  3699. function o(e) {
  3700. return Boolean(e.action && e.label);
  3701. }
  3702. t.Input = r, t.isInputWithAction = o, t.filterInputWithAction = function i(e) {
  3703. return e.filter(o);
  3704. };
  3705. }, function(e, t, n) {
  3706. "use strict";
  3707. (function(e) {
  3708. Object.defineProperty(t, "__esModule", {
  3709. value: !0
  3710. });
  3711. var r = n(0), o = n(2), i = n(5), a = n(17);
  3712. t.bbOfflineUrl = a.bbOfflineUrl, t.bbUrl = a.bbUrl;
  3713. var s = n(7), u = n(21), l = n(29), c = n(24), p = n(105), d = n(492), f = n(493), m = n(14), h = n(9), g = n(291), y = n(41), S = n(10), v = "Missing debug name";
  3714. function b(e, t, n) {
  3715. var r = o.observable.box(n, {
  3716. deep: !1
  3717. });
  3718. Object.defineProperty(e, t, {
  3719. enumerable: !0,
  3720. configurable: !0,
  3721. get: function() {
  3722. var e = r.get();
  3723. return C.is(e) ? e.getHotReloadableValue() : e;
  3724. },
  3725. set: function(e) {
  3726. r.set(e);
  3727. }
  3728. });
  3729. }
  3730. function _(e) {
  3731. Object.keys(e).forEach(function(t) {
  3732. try {
  3733. var n = e[t];
  3734. C.is(n) && n.getCacheableValue(), b(e, t, e[t]);
  3735. } catch (n) {
  3736. throw console.error("Error setting up attribute " + t + " in " + e.name), n;
  3737. }
  3738. });
  3739. }
  3740. function T(e) {
  3741. Object.keys(e).forEach(function(t) {
  3742. var n = e[t];
  3743. C.is(n) && (e[t] = n.getCacheableValue());
  3744. });
  3745. }
  3746. t.templateFiles = {}, t.Constants = {
  3747. isPC: h.SpartaGlobals.bundleIsPC,
  3748. isPS4: h.SpartaGlobals.bundleIsPS4,
  3749. isXBOXONE: h.SpartaGlobals.bundleIsXBOXONE,
  3750. useConsoleMenu: p.useConsoleMenu,
  3751. CompressedDisabled: h.SpartaGlobals.bundleIsPC && !1,
  3752. LINE_HEIGHTS: u.LINE_HEIGHTS,
  3753. ELLIPSIS_OFFSET: d.ELLIPSIS_OFFSET,
  3754. TextSize: u.TextSize,
  3755. TextType: l.TextType,
  3756. CardSize: g.CardSize,
  3757. OldCardSize: y.CardSize,
  3758. Keys: S.Keys,
  3759. tweenOptions: {
  3760. presets: m.Animation.presets,
  3761. default: m.Animation.defaultTweenOptions
  3762. }
  3763. }, t.Grid = {
  3764. getWidth: s.getWidth,
  3765. getHeight: s.getHeight,
  3766. GUTTER: s.GUTTER,
  3767. COLUMNS: s.COLUMNS,
  3768. COMPRESSED: s.COMPRESSED,
  3769. spacer: s.spacer
  3770. }, t.LayoutBounds = {
  3771. header: c.header,
  3772. footer: c.footer,
  3773. content: c.content,
  3774. tallContent: c.tallContent,
  3775. screen: c.screen,
  3776. background: c.background,
  3777. fadeAreaTop: c.fadeAreaTop,
  3778. fadeAreaBottom: c.fadeAreaBottom,
  3779. safeZone: c.safeZone,
  3780. dangerZoneSize: c.dangerZoneSize,
  3781. tabs: c.tabs,
  3782. mainMenu: c.mainMenu,
  3783. input: c.input,
  3784. logo: c.logo,
  3785. userBar: c.userBar,
  3786. startScreenLogo: c.startScreenLogo
  3787. }, t.withDefault = function E(e, t) {
  3788. return void 0 === e ? t : e;
  3789. }, t.makeAttributeObservable = b, t.makeTemplateHotReloadable = _, t.makeTemplateCached = T;
  3790. var C = function() {
  3791. function e() {}
  3792. return e.is = function(e) {
  3793. return e && e.getHotReloadableValue && e.getCacheableValue;
  3794. }, e;
  3795. }(), I = function() {
  3796. return function e(t) {
  3797. this.func = t;
  3798. var n = this;
  3799. this.reaction = new o.Reaction("mobx cache", function() {
  3800. this.track(function() {
  3801. n.cachedValue = t();
  3802. });
  3803. }), this.reaction.runReaction();
  3804. };
  3805. }(), A = function(e) {
  3806. function t(t, n) {
  3807. var r = e.call(this) || this;
  3808. return r.getter = t, r.debugId = n, r;
  3809. }
  3810. return r.__extends(t, e), t.prototype.getHotReloadableValue = function() {
  3811. var e = this;
  3812. return this.cache || (this.cache = new I(function() {
  3813. return e.getCacheableValue();
  3814. })), this.cache.cachedValue;
  3815. }, t.prototype.getCacheableValue = function() {
  3816. return this.getter();
  3817. }, t;
  3818. }(C);
  3819. t.WrappedGetter = A;
  3820. var w = function(e) {
  3821. function t(t, n) {
  3822. var r = e.call(this) || this;
  3823. return r.getter = t, r.debugId = n, r;
  3824. }
  3825. return r.__extends(t, e), t.prototype.getHotReloadableValue = function() {
  3826. var e = this;
  3827. return this.cache || (this.cache = new I(function() {
  3828. return e.getCacheableValue();
  3829. })), this.cache.cachedValue;
  3830. }, t.prototype.getCacheableValue = function() {
  3831. return {
  3832. events: this.getter(),
  3833. debugName: this.debugId
  3834. };
  3835. }, t;
  3836. }(C);
  3837. t.TimelineWrapper = w;
  3838. var P = function(e) {
  3839. function t(t, n) {
  3840. var r = e.call(this) || this;
  3841. return r.baseFunc = t, r.conditional = n, r;
  3842. }
  3843. return r.__extends(t, e), t.prototype.getHotReloadableValue = function() {
  3844. var e = this;
  3845. return this.cache || (this.cache = new I(function() {
  3846. return e.baseFunc();
  3847. })), this.getMerged(this.cache.cachedValue);
  3848. }, t.prototype.getCacheableValue = function() {
  3849. return this.getMerged(this.baseFunc());
  3850. }, t.prototype.getMerged = function(e) {
  3851. var t = this;
  3852. return function(n) {
  3853. return new i.MergeStyle2(e, t.conditional(n));
  3854. };
  3855. }, t;
  3856. }(C);
  3857. t.StyleFuncWrapper = P, t.multistyle = function R(e) {
  3858. return new L(e);
  3859. }, t.multistyle2 = function O(e) {
  3860. return new L(e);
  3861. }, t.multistyle3 = function x(e) {
  3862. return new L(e);
  3863. }, t.multistyle4 = function k(e) {
  3864. return new L(e);
  3865. }, t.multistyle5 = function M(e) {
  3866. return new L(e);
  3867. };
  3868. var L = function(e) {
  3869. function t(t) {
  3870. var n = e.call(this) || this;
  3871. return n.conditional = t, n.cache = {}, n;
  3872. }
  3873. return r.__extends(t, e), t.prototype.wrapInCache = function(e) {
  3874. var t = this.cache;
  3875. return function(n, r, o, i, a) {
  3876. var s = n + "" + r + o + i + a, u = t[s];
  3877. return u || (u = t[s] = e(n, r, o, i, a)), u;
  3878. };
  3879. }, t.prototype.getHotReloadableValue = function() {
  3880. var e = this;
  3881. return this.wrapInCache(function(t, n, r, i, a) {
  3882. var s;
  3883. return new o.Reaction("multistyle cache", function() {
  3884. this.track(function() {
  3885. delete e.cache[t + "" + n + r + i + a], s = e.conditional(t, n, r, i, a);
  3886. });
  3887. }).runReaction(), s;
  3888. });
  3889. }, t.prototype.getCacheableValue = function() {
  3890. return this.wrapInCache(this.conditional);
  3891. }, t;
  3892. }(C);
  3893. function D(e, t) {
  3894. return new A(e, t || "wrap");
  3895. }
  3896. t.timeline = function N(e, t) {
  3897. if (!t) throw new Error(v);
  3898. return new w(e, t);
  3899. }, t.tween = function F(e, t, n, r, o, i, a, s) {
  3900. return void 0 === s && (s = []), new f.ChainedTween(e, t, n, r, o, i, a, s);
  3901. }, t.sleep = function G(e, t) {
  3902. return void 0 === t && (t = []), new f.ChainedSleep(e, t);
  3903. }, t.trigger = function U(e, t) {
  3904. return new f.TriggerEvent(e, t);
  3905. }, t.tweenSwitch = m.Animation.tweenSwitch, t.wrap = D, t.template = function B(e) {
  3906. return e;
  3907. }, t.merge = function j(e, t, n) {
  3908. return new i.MergeStyle2(e, t, n);
  3909. }, t.value = function H(e, t) {
  3910. if (!t) throw new Error(v);
  3911. return new A(e, t);
  3912. }, t.valuefunc = function z(e) {
  3913. return e;
  3914. }, t.frames = function V(e) {
  3915. return e / 60 * 1e3;
  3916. }, t.dynamicStyle = function W(e, t) {
  3917. if (!t) throw new Error(v);
  3918. return i.DynamicStyle.create(e, t);
  3919. };
  3920. var q = !1;
  3921. t.enableHotReload = function K(e) {
  3922. q = e;
  3923. }, t.isHotReloadingEnabled = function X() {
  3924. return q;
  3925. }, t.Template = function Y(e) {
  3926. var n = {};
  3927. return t.templateFiles[e] = n, {
  3928. wrap: D,
  3929. style: function(e) {
  3930. n[e.name] = e, q ? _(e) : T(e);
  3931. }
  3932. };
  3933. }, t.TemplateUpdate = function J(n) {
  3934. return e.log("Reloading template " + n), {
  3935. wrap: D,
  3936. style: function(e) {
  3937. var r = t.templateFiles[n];
  3938. if (!r) throw new Error("Could not find template file: " + n);
  3939. var o = r[e.name];
  3940. if (!o) throw new Error("Could not find template: " + e.name);
  3941. return Object.keys(e).forEach(function(t) {
  3942. var n = e[t];
  3943. o[t] ? o[t] = n : b(o, t, n);
  3944. }), o;
  3945. }
  3946. };
  3947. }, t.style = function Q(e, t) {
  3948. if (!t) throw new Error(v);
  3949. return i.StaticStyle.create(e, t);
  3950. }, t.stylefunc = function Z(e, t) {
  3951. return new P(e, t);
  3952. };
  3953. }).call(this, n(15));
  3954. }, function(e, t, n) {
  3955. "use strict";
  3956. Object.defineProperty(t, "__esModule", {
  3957. value: !0
  3958. });
  3959. var r = n(909), o = n(501), i = n(502), a = n(910), s = n(911), u = n(912), l = n(913), c = n(504), p = n(925), d = n(926), f = n(927), m = n(251), h = n(928), g = n(929), y = n(113), S = n(930), v = n(931), b = n(512), _ = n(513), T = n(934), E = n(935), C = n(936), I = n(937), A = n(940), w = n(941), P = n(942), R = n(943), O = n(944), x = n(945), k = n(946), M = n(27), L = n(948), D = n(949), N = n(952), F = n(387), G = n(956), U = n(960), B = n(521), j = n(522), H = n(380), z = n(65), V = n(961), W = n(151), q = n(969), K = n(62), X = n(970), Y = n(971), J = n(391), Q = n(972), Z = n(524), $ = n(973), ee = n(974), te = n(515), ne = n(975), re = n(976), oe = n(977), ie = n(978), ae = n(146), se = n(979), ue = n(980), le = n(983), ce = n(984), pe = n(985), de = n(986), fe = n(988), me = n(989), he = n(990), ge = n(991), ye = n(992), Se = n(993), ve = n(994), be = n(526), _e = n(995), Te = n(997), Ee = n(289), Ce = n(998), Ie = n(1e3), Ae = n(1002), we = n(1004), Pe = n(1006), Re = n(1008), Oe = n(1010), xe = n(1012), ke = n(36), Me = n(395), Le = n(57), De = n(1013), Ne = n(28), Fe = n(1014), Ge = n(255), Ue = n(1018), Be = n(1020), je = n(1021), He = n(1022), ze = n(1025), Ve = n(1026), We = n(1028), qe = n(1029), Ke = n(1030), Xe = n(1048), Ye = n(1049), Je = n(1050), Qe = n(219), Ze = n(150), $e = n(1055), et = n(1056), tt = n(1057), nt = n(1058), rt = n(1059), ot = n(124);
  3960. t.gatewayState = new m.GatewayState(), t.settingsStore = new o.SettingsStore(K.frostbite, y.coreEventStore, t.gatewayState),
  3961. t.gameStore = new r.GameStore(), t.routeStore = new a.RouteStore(), t.locationStore = new i.LocationStore(t.routeStore, Ne.focusSystem),
  3962. t.nativePropertiesStore = new S.NativePropertiesStore(t.gameStore), t.hostingGameStore = new P.HostingGameStore(t.nativePropertiesStore);
  3963. var it = new De.OriginAccountFlow(K.frostbite, function() {
  3964. return t.hostingGameStore.game;
  3965. });
  3966. t.presenceStateStore = new b.PresenceStateStore(it), t.userStore = new f.UserStore(),
  3967. t.onlineState = new p.OnlineState(function() {
  3968. return ke.getBuildInfo();
  3969. }, t.gatewayState, t.userStore, t.presenceStateStore), t.spartaActivatedStore = new R.SpartaActivatedStore(K.frostbite, t.hostingGameStore, W.gameDataStore, t.onlineState),
  3970. t.gameStateStoreLoader = new O.GameStateStoreLoader(t.nativePropertiesStore), t.partyStoreLoader = new ce.PartyStoreLoader(t.nativePropertiesStore),
  3971. t.layoutVisibilityStore = new v.LayoutVisibilityStore(K.frostbite, t.gameStateStoreLoader, t.spartaActivatedStore),
  3972. t.popupStore = new N.PopupStore(t.spartaActivatedStore, t.gameStateStoreLoader, t.layoutVisibilityStore),
  3973. t.layoutStateStore = new s.LayoutStateStore(t.nativePropertiesStore, t.locationStore, t.routeStore, t.settingsStore, t.popupStore),
  3974. t.entitlementStore = new k.EntitlementStore(L.createClient(M.request)), t.freemiumStore = new w.FreemiumStore(t.settingsStore, t.layoutStateStore, t.gameStore, t.partyStoreLoader, function(e) {
  3975. return t.entitlementStore.hasPremiumAccess(e);
  3976. }), t.medalStore = new x.MedalStore(function() {
  3977. return t.settingsStore.getServerAdjustedTimestamp();
  3978. }, function(e) {
  3979. return t.gameStore.getGame(e);
  3980. }), t.matchmakingManager = new B.MatchmakingManager(t.gameStore), t.crosslaunchManager = new F.CrosslaunchManager(t.entitlementStore, t.gameStore),
  3981. t.serverDetailsStore = new de.ServerDetailsStore(pe.createServerDetailsClient(M.request)),
  3982. t.expansionStore = new Ce.ExpansionStore(Ie.expansionClient);
  3983. var at = function() {
  3984. return function e(n) {
  3985. var r = this;
  3986. this.twinkle = n, this.gatewayState = t.gatewayState, this.nowStore = new se.NowStore(),
  3987. this.localeState = ae.localeState, this.gameStore = t.gameStore, this.routeStore = t.routeStore,
  3988. this.locationStore = t.locationStore, this.nativePropertiesStore = t.nativePropertiesStore,
  3989. this.hostingGameStore = t.hostingGameStore, this.spartaActivatedStore = t.spartaActivatedStore,
  3990. this.menuItemMarkerSyncAnimation = new $e.MenuItemMarkerSyncAnimation(), this.gameStateStoreLoader = t.gameStateStoreLoader,
  3991. this.partyStoreLoader = t.partyStoreLoader, this.popupStore = t.popupStore, this.layoutStateStore = t.layoutStateStore,
  3992. this.storeAvailabilityStore = Me.storeAvailabilityStore, this.gaStore = new ne.GAStore(Ue.uuidPromise, Ue.gaClients),
  3993. this.pinStore = new Be.PinStore(Ue.uuidPromise, je.createClients(M.request), this.nativePropertiesStore, this.locationStore),
  3994. this.backgroundMusicStore = new l.BackgroundMusicStore(this.nativePropertiesStore, this.twinkle),
  3995. this.shortcutKitsStore = new u.ShortcutKitsStore(), this.resumablePurchasesStore = new Q.ResumablePurchasesStore(J.getResumablePurchasesClient, J.completePendingPurchaseClient),
  3996. this.inputPatternStore = new g.InputPatternStore(), this.inputStore = new h.InputStore(Ne.focusSystem, this.inputPatternStore),
  3997. this.inputRouter = new X.InputRouter(this.nativePropertiesStore, this.twinkle.inputHandler, this.twinkle.buildInfo, this.twinkle.frostbite, this.twinkle.focus, this.inputStore),
  3998. this.presenceStateStore = t.presenceStateStore, this.layoutVisibilityStore = t.layoutVisibilityStore,
  3999. this.protocolVersionStore = A.createProtocolVersionStore(this.gameStore, this.nativePropertiesStore),
  4000. this.userStore = t.userStore, this.onlineState = t.onlineState, this.careerStore = new G.CareerStore(Ye.createCareerClient(M.request), this.onlineState, this.gameStateStoreLoader),
  4001. this.friendStore = new d.FriendStore(this.userStore, this.onlineState), this.settingsStore = t.settingsStore,
  4002. this.feedStore = new C.FeedStore(this.friendStore, this.gameStore, this.partyStoreLoader, this.protocolVersionStore, this.onlineState),
  4003. this.platoons = new Ke.PlatoonsInstance(this.settingsStore, this.onlineState, this.nativePropertiesStore, this.gameStore),
  4004. this.titleState = new be.TitleState(), this.entitlementStore = t.entitlementStore,
  4005. this.freemiumStore = t.freemiumStore, this.telemetry = new Qe.TelemetryStore(this.gaStore, this.pinStore, this.entitlementStore, this.nativePropertiesStore, this.locationStore, this.freemiumStore, this.settingsStore, this.presenceStateStore, this.onlineState, Ze.telemetryStoreLoader, this.twinkle.buildInfo),
  4006. this.pingSiteStore = new et.PingSiteStore(tt.createPingSiteClient(M.request), this.gatewayState, this.gameStore),
  4007. this.recommendationStore = new _.RecommendationStore(T.createRecommendationTrackingClient(M.request), re.createClient(M.request), re.createPreviewClient(M.request), this.nativePropertiesStore, this.feedStore, this.telemetry, this.platoons, this.pingSiteStore),
  4008. this.serverCountStore = new I.ServerCountStore(this.recommendationStore, this.protocolVersionStore),
  4009. this.popupManager = new Le.PopupManager(this.twinkle, this.spartaActivatedStore, this.inputStore, this.telemetry),
  4010. this.medalStore = t.medalStore, this.gamePushNotifications = new j.GamePushNotifications(y.coreEventStore, this.gatewayState),
  4011. this.matchmakingManager = t.matchmakingManager, this.crosslaunchManager = t.crosslaunchManager,
  4012. this.gameJoinNoticeState = new D.GameJoinNoticeState(this.matchmakingManager), this.installStateStore = new E.InstallStateStore(this.twinkle.frostbite, this.nativePropertiesStore),
  4013. this.joinFlowLoader = new V.JoinFlowLoader({
  4014. twinkle: this.twinkle,
  4015. nativePropertiesStore: this.nativePropertiesStore,
  4016. matchmakingManager: this.matchmakingManager,
  4017. presenceStateStore: this.presenceStateStore,
  4018. gameStateStoreLoader: this.gameStateStoreLoader,
  4019. partyStoreLoader: this.partyStoreLoader,
  4020. freemiumStore: this.freemiumStore,
  4021. crosslaunchManager: this.crosslaunchManager,
  4022. installStateStore: this.installStateStore,
  4023. gamePushNotifications: this.gamePushNotifications,
  4024. popupManager: this.popupManager,
  4025. canPlayAsCommander: function(e) {
  4026. return r.careerStore.canPlayAsCommander(e);
  4027. },
  4028. hasPremiumAccess: function(e) {
  4029. return t.entitlementStore.hasPremiumAccess(e);
  4030. }
  4031. }), this.gameViewComponentStore = new U.GameViewComponentStore(this.matchmakingManager, this.gameStateStoreLoader, this.gameStore),
  4032. this.gameViewCountdownWidgetStore = new qe.GameViewCountdownWidgetStore(this.gameStateStoreLoader),
  4033. this.gameDataStore = W.gameDataStore, this.blackFadeState = new q.BlackFadeState(),
  4034. this.socialState = new H.SocialState(this.twinkle, this.inputRouter, this.friendStore, this.onlineState, this.gameDataStore, this.presenceStateStore, this.gameStateStoreLoader, this.partyStoreLoader, this.matchmakingManager, this.entitlementStore, this.nativePropertiesStore, this.installStateStore, this.popupManager, z.supportsSpectating, this.blackFadeState, this.layoutStateStore),
  4035. this.comCenterState = new c.ComCenterState(this.inputRouter, this.layoutVisibilityStore, this.gameStateStoreLoader, this.partyStoreLoader, this.friendStore, this.presenceStateStore, this.installStateStore, this.nativePropertiesStore, this.socialState),
  4036. this.offersStore = new ue.OffersStore(le.createClient(M.firstPartyRequest), this.localeState),
  4037. this.ps4StoreIconStore = new Y.PS4StoreIconStore(this.layoutVisibilityStore, this.gameStateStoreLoader, this.layoutStateStore, this.socialState, this.popupManager, this.blackFadeState, this.twinkle.frostbite, this.twinkle.buildInfo),
  4038. this.coreEventStore = y.coreEventStore, this.countdownState = new oe.CountdownState(this.nowStore),
  4039. this.backgroundStore = new ie.BackgroundStore(this.nativePropertiesStore, this.onlineState, this.coreEventStore, M.request),
  4040. this.serverFilterOptionsStore = new ee.ServerFilterOptionsStore(new Z.GameDataServerFilterOptionsStore(this.gameStore, this.gameDataStore), new $.PopulatedServerFilterOptionsStore()),
  4041. this.serverFilterStore = new te.ServerFilterStore(this.serverFilterOptionsStore, this.gameStore, this.pingSiteStore, this.onlineState),
  4042. this.serversSortStore = new he.ServersSortStore(), this.serversStore = new me.ServersStore(this.twinkle, fe.createServersClient(M.request), this.protocolVersionStore, this.gameStore, this.serverFilterStore),
  4043. this.bookmarkedServersStore = new ge.BookmarkedServersStore(ve.createBookmarkedServersClient(M.request)),
  4044. this.serverHistoryStore = new Se.ServerHistoryStore(ye.createServerHistoryClient(t.onlineState)),
  4045. this.serverDetailsStore = t.serverDetailsStore, this.bundleUpdateStore = Ee.bundleUpdateStore,
  4046. this.noticeStore = new _e.NoticeStore(Te.createNoticeClient(M.request), this.gameStore, this.bundleUpdateStore, this.gameStateStoreLoader),
  4047. this.premiumFriendsStore = new Ae.PremiumFriendsStore(we.premiumFriendsClient),
  4048. this.expansionStore = t.expansionStore, this.viewState = new Pe.ViewState(this.layoutStateStore, new Pe.ViewComponentState("0", null), new Pe.ViewComponentState("1", null), new Pe.ViewComponentState("2", null), new Pe.ViewComponentState("3", null)),
  4049. this.takeoverStore = new Re.TakeoverStore(Oe.takeoverClients, this.nativePropertiesStore, this.settingsStore),
  4050. this.subscriptionStatusStore = new xe.SubscriptionStatusStore(xe.createSubscriptionStatusClient(M.request), this.twinkle, this.onlineState),
  4051. this.originAccountFlow = it, this.startScreenStore = new Fe.StartScreenStore({
  4052. twinkle: this.twinkle,
  4053. spartaActivatedStore: this.spartaActivatedStore,
  4054. hostingGameStore: this.hostingGameStore,
  4055. blackFadeState: this.blackFadeState,
  4056. onlineState: this.onlineState,
  4057. takeoverStore: this.takeoverStore,
  4058. bundleUpdateStore: this.bundleUpdateStore,
  4059. originAccountFlow: this.originAccountFlow,
  4060. popupManager: this.popupManager,
  4061. installStateStore: this.installStateStore,
  4062. tryShowLegal: function() {
  4063. return Ge.tryShowLegal();
  4064. }
  4065. }), this.gameMixStore = new He.GameMixStore(He.createClient(M.request), this.gameDataStore, this.protocolVersionStore),
  4066. this.gameHintStore = new Xe.GameHintStore(), this.serverPresenceStore = new ze.ServerPresenceStore(this.onlineState, this.friendStore, this.userStore, this.gameStateStoreLoader, this.gamePushNotifications, ze.createFetchServerPresenceClient(M.request)),
  4067. this.userStateStore = new Ve.UserStateStore(We.createUserStateClients(M.request)),
  4068. this.savedFiltersStore = new Je.SavedFiltersStore(), this.environmentInfoStore = new nt.EnvironmentInfoStore(rt.createClient(M.request)),
  4069. this.copyStore = new ot.CopyStore(this.localeState, this.coreEventStore, this.twinkle.buildInfo),
  4070. this.telemetry.setupTelemetryForAdvancedSearch(this.serversStore, this.serverFilterStore);
  4071. };
  4072. }();
  4073. t.CoreStores = at;
  4074. }, function(e, t, n) {
  4075. "use strict";
  4076. (function(e) {
  4077. Object.defineProperty(t, "__esModule", {
  4078. value: !0
  4079. });
  4080. var r = n(0), o = n(1), i = n(871), a = n(23), s = n(5), u = n(70), l = n(76), c = n(9), p = 0, d = {
  4081. easing: a.Easing.CubicInOut,
  4082. duration: 22 / 60 * 1e3
  4083. }, f = {
  4084. transition: r.__assign({}, d, {
  4085. duration: d.duration / 1.5
  4086. }),
  4087. trickleUp: {
  4088. values: {
  4089. opacity: {
  4090. from: 0,
  4091. to: 1
  4092. },
  4093. translateY: {
  4094. from: 80,
  4095. to: 0
  4096. }
  4097. },
  4098. options: d
  4099. },
  4100. slideRight: {
  4101. values: {
  4102. opacity: {
  4103. from: 0,
  4104. to: 1
  4105. },
  4106. translateX: {
  4107. from: -91,
  4108. to: 0
  4109. }
  4110. },
  4111. options: r.__assign({}, d, {
  4112. delay: 500
  4113. })
  4114. },
  4115. list: {
  4116. enter: {
  4117. duration: d.duration / 4
  4118. },
  4119. leave: {
  4120. duration: d.duration / 2
  4121. },
  4122. scroll: {
  4123. easing: a.Easing.Linear,
  4124. duration: d.duration / 4
  4125. }
  4126. },
  4127. text: {
  4128. scroll: {
  4129. duration: d.duration / 2,
  4130. easing: a.Easing.CubicOut
  4131. }
  4132. },
  4133. focusables: {
  4134. enter: {
  4135. default: {
  4136. duration: c.SpartaGlobals.bundleIsPC ? d.duration / 4 : d.duration / 2.5
  4137. },
  4138. fast: {
  4139. easing: a.Easing.SineInOut,
  4140. duration: d.duration / 4
  4141. },
  4142. slow: {
  4143. duration: d.duration / 2
  4144. }
  4145. },
  4146. leave: {
  4147. easing: a.Easing.SineInOut,
  4148. duration: d.duration / 2
  4149. }
  4150. },
  4151. press: {
  4152. duration: c.SpartaGlobals.bundleIsPC ? d.duration / 10 : d.duration / 5
  4153. }
  4154. }, m = function() {
  4155. function e() {}
  4156. return e.number = {
  4157. subtract: function(e, t) {
  4158. return e - t;
  4159. },
  4160. magnitude: function(e) {
  4161. return Math.abs(e);
  4162. }
  4163. }, e.vector = {
  4164. subtract: function(e, t) {
  4165. e = i.ensureVector(e), t = i.ensureVector(t);
  4166. for (var n = Math.max(e.length, t.length), r = [ 0, 0, 0, 0 ], o = 0; o < n; o++) r[o] = (e[o] || 0) - (t[o] || 0);
  4167. return r;
  4168. },
  4169. magnitude: function(e) {
  4170. var t = (e = i.ensureVector(e)).reduce(function(e, t) {
  4171. return Math.abs(e) + Math.pow(t, 2);
  4172. }, 0);
  4173. return Math.sqrt(t);
  4174. }
  4175. }, e;
  4176. }(), h = function() {
  4177. function t() {}
  4178. return t.calculateSpeed = function(e, t, n) {
  4179. void 0 === n && (n = d.duration);
  4180. var r = 0;
  4181. return "number" == typeof e && "number" == typeof t ? r = m.number.magnitude(m.number.subtract(t, e)) : Array.isArray(e) && Array.isArray(t) && (r = m.vector.magnitude(m.vector.subtract(t, e))),
  4182. r / (n || 1);
  4183. }, t.tweenBetween = function(e, n) {
  4184. return r.__assign({}, d, {
  4185. to: n,
  4186. from: e,
  4187. speed: t.calculateSpeed(e, n),
  4188. duration: null
  4189. });
  4190. }, t.tweenSwitchStyle = function(e, n, r, o, i, a, u) {
  4191. void 0 === i && (i = !1), void 0 === a && (a = {}), void 0 === u && (u = {});
  4192. var l = {};
  4193. return l[n] = t.tweenSwitch(r, o, i, a, u), s.DynamicStyle.wrapLegacyStyle(l, e);
  4194. }, t.tweenSwitch = function(n, o, i, a, s) {
  4195. void 0 === i && (i = !1), void 0 === a && (a = {}), void 0 === s && (s = {});
  4196. var u = i ? a : s, l = r.__assign({}, d, u), c = t.calculateSpeed(n, o, l.duration);
  4197. return c <= 0 ? ("string" == typeof n && "string" == typeof o || e.warn("Performing Animation.tweenSwitch with negative or 0 speed"),
  4198. r.__assign({}, l, {
  4199. to: i ? o : n
  4200. })) : r.__assign({}, l, {
  4201. to: i ? o : n,
  4202. speed: c,
  4203. duration: null
  4204. });
  4205. }, t.tweenTo = function(e, t) {
  4206. return r.__assign({}, d, {
  4207. to: e
  4208. }, t);
  4209. }, t.tween = function(e, t, n) {
  4210. return new l.Tween(e + "_" + p++, t, r.__assign({}, d, n));
  4211. }, t.lazyTween = function(e, t, n, o) {
  4212. var i = new l.LazyTween(t + "_" + p++, n, function() {
  4213. return o ? r.__assign({}, d, o()) : d;
  4214. });
  4215. return u.addLifecycleHook(e, "componentWillUnmount", function() {
  4216. return i.destroy();
  4217. }), i;
  4218. }, t.componentTween = function(e, t, n, o) {
  4219. var i = new l.Tween(t + "_" + p++, n, r.__assign({}, d, o));
  4220. return u.addLifecycleHook(e, "componentWillUnmount", function() {
  4221. return i.destroy();
  4222. }), i;
  4223. }, t.defaultTweenOptions = d, t.presets = f, t;
  4224. }();
  4225. t.Animation = h, t.useTween = function g(e, t, n) {
  4226. var i = o.useState(function() {
  4227. return new l.Tween(e + "_hook_" + p++, t, r.__assign({}, d, n));
  4228. })[0];
  4229. return o.useEffect(function() {
  4230. return function() {
  4231. return i.destroy();
  4232. };
  4233. }, []), i;
  4234. };
  4235. }).call(this, n(15));
  4236. }, function(e, t, n) {
  4237. "use strict";
  4238. Object.defineProperty(t, "__esModule", {
  4239. value: !0
  4240. });
  4241. var r = n(129);
  4242. e.exports = r.__Logger;
  4243. }, function(e, t, n) {
  4244. var r = n(56), o = n(51), i = n(111), a = n(102), s = n(159), u = function(e, t, n) {
  4245. var l, c, p, d, f = e & u.F, m = e & u.G, h = e & u.S, g = e & u.P, y = e & u.B, S = m ? r : h ? r[t] || (r[t] = {}) : (r[t] || {}).prototype, v = m ? o : o[t] || (o[t] = {}), b = v.prototype || (v.prototype = {});
  4246. for (l in m && (n = t), n) p = ((c = !f && S && void 0 !== S[l]) ? S : n)[l], d = y && c ? s(p, r) : g && "function" == typeof p ? s(Function.call, p) : p,
  4247. S && a(S, l, p, e & u.U), v[l] != p && i(v, l, d), g && b[l] != p && (b[l] = p);
  4248. };
  4249. r.core = o, u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128,
  4250. e.exports = u;
  4251. }, function(e, t, n) {
  4252. "use strict";
  4253. (function(e) {
  4254. Object.defineProperty(t, "__esModule", {
  4255. value: !0
  4256. });
  4257. var r = n(489);
  4258. n(53), e.get("bbUrl");
  4259. t.bbUrl = function bbUrl(e) {
  4260. return r.onlinePrefix, r.onlinePrefix + e;
  4261. }, t.bbOfflineUrl = function bbOfflineUrl(e) {
  4262. return r.offlinePrefix, r.offlinePrefix + e;
  4263. };
  4264. }).call(this, n(15));
  4265. }, function(e, t, n) {
  4266. "use strict";
  4267. Object.defineProperty(t, "__esModule", {
  4268. value: !0
  4269. });
  4270. var r = n(0), o = n(12), i = o.Template("UIStyles"), a = function() {
  4271. function e() {}
  4272. return e.children = o.wrap(function() {
  4273. return o.style({
  4274. flex: 1,
  4275. zOffset: 2
  4276. }, "036349e9:19:33");
  4277. }), e.glow = o.wrap(function() {
  4278. return o.style({
  4279. position: "absolute",
  4280. bottom: -9,
  4281. left: -9,
  4282. right: -9,
  4283. top: -9,
  4284. zOffset: 1,
  4285. texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/card-border-blur-42d30442.png"),
  4286. textureMode: "fill",
  4287. textureBorder: [ 12, 12, 12, 12 ]
  4288. }, "036349e9:26:29");
  4289. }), e = r.__decorate([ i.style ], e);
  4290. }();
  4291. t.PressableStyles = a;
  4292. var s = function() {
  4293. function e() {}
  4294. return e.box = o.wrap(function() {
  4295. return o.style({
  4296. height: o.Grid.getHeight(21),
  4297. padding: [ 10, 10, 10, 10 ]
  4298. }, "036349e9:43:28");
  4299. }), e.infoText = o.wrap(function() {
  4300. return o.style({
  4301. textAlignForRTL: "left",
  4302. opacity: .66
  4303. }, "036349e9:50:33");
  4304. }), e.text = o.wrap(function() {
  4305. return o.style({
  4306. textAlignForRTL: "left"
  4307. }, "036349e9:57:29");
  4308. }), e.smallImage = o.wrap(function() {
  4309. return o.style({
  4310. height: 64
  4311. }, "036349e9:63:35");
  4312. }), e.dock = o.wrap(function() {
  4313. return o.style({
  4314. position: "absolute",
  4315. top: 0,
  4316. left: 0,
  4317. right: 0,
  4318. bottom: 0
  4319. }, "036349e9:69:29");
  4320. }), e = r.__decorate([ i.style ], e);
  4321. }();
  4322. t.HighlightCardStyles = s;
  4323. var u = function() {
  4324. function e() {}
  4325. return e.container = o.wrap(function() {
  4326. return o.style({
  4327. marginRight: o.Grid.GUTTER,
  4328. marginBottom: o.Grid.GUTTER
  4329. }, "036349e9:82:34");
  4330. }), e.children = o.wrap(function() {
  4331. return o.style({
  4332. justifyContent: "flex-end"
  4333. }, "036349e9:89:33");
  4334. }), e = r.__decorate([ i.style ], e);
  4335. }();
  4336. t.CardStyles = u;
  4337. var l = function() {
  4338. function e() {}
  4339. var t;
  4340. return t = e, e.defaultAvatar = o.value(function() {
  4341. return o.bbOfflineUrl("/sparta/assets/ui/avatars/default-76365f9d.jpg");
  4342. }, "036349e9:98:27"), e.defaultSize = o.value(function() {
  4343. return o.Grid.getHeight(4);
  4344. }, "036349e9:99:25"), e.indicatorWidth = o.value(function() {
  4345. return 2;
  4346. }, "036349e9:100:28"), e.indicatorSpacing = o.value(function() {
  4347. return 2;
  4348. }, "036349e9:101:30"), e.bgColor = o.value(function() {
  4349. return {
  4350. Joinable: "#02A0E2",
  4351. Playing: "#02A0E2",
  4352. Online: "#007F00",
  4353. Away: "#DC453E",
  4354. Offline: "#B3B3B3",
  4355. Default: "#00000000"
  4356. };
  4357. }, "036349e9:103:21"), e.container = o.stylefunc(function() {
  4358. return o.style({
  4359. position: "relative",
  4360. textureMode: "cover",
  4361. textureAtlas: "AvatarAtlas"
  4362. }, "036349e9:113:14");
  4363. }, function(e) {
  4364. return o.dynamicStyle({
  4365. texture: e.texture,
  4366. width: e.size,
  4367. height: e.size,
  4368. marginLeft: e.showPresence ? t.indicatorSpacing + t.indicatorSpacing : void 0
  4369. }, "036349e9:119:77");
  4370. }), e.presence = o.multistyle(function(e) {
  4371. return o.style({
  4372. zOffset: 1,
  4373. width: t.indicatorWidth,
  4374. position: "absolute",
  4375. top: 0,
  4376. bottom: 0,
  4377. left: -(t.indicatorWidth + t.indicatorSpacing),
  4378. backgroundColor: t.bgColor[e]
  4379. }, "036349e9:130:82");
  4380. }), e = t = r.__decorate([ i.style ], e);
  4381. }();
  4382. t.AvatarStyles = l;
  4383. var c = function() {
  4384. function e() {}
  4385. return e.avatar = o.wrap(function() {
  4386. return o.style({
  4387. backgroundColor: [ 0, 0, 0, 124 ],
  4388. marginRight: o.Grid.GUTTER / 2
  4389. }, "036349e9:145:31");
  4390. }), e.avatarContainer = o.wrap(function() {
  4391. return o.style({
  4392. flexDirection: "row",
  4393. flexWrap: "wrap",
  4394. zOffset: 51,
  4395. marginBottom: o.Grid.GUTTER
  4396. }, "036349e9:152:40");
  4397. }), e = r.__decorate([ i.style ], e);
  4398. }();
  4399. t.PlayCardStyles = c;
  4400. var p = function() {
  4401. function e() {}
  4402. return e.margin = o.value(function() {
  4403. return [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ];
  4404. }, "036349e9:164:20"), e.container = o.stylefunc(function() {
  4405. return o.style({
  4406. flex: 1,
  4407. alignItems: "center",
  4408. justifyContent: "center",
  4409. paddingBottom: o.Grid.getHeight(2)
  4410. }, "036349e9:167:14");
  4411. }, function(e) {
  4412. return o.dynamicStyle({
  4413. height: e.centerVertically ? o.LayoutBounds.content.height : void 0
  4414. }, "036349e9:178:49");
  4415. }), e.text = o.stylefunc(function() {
  4416. return o.style({
  4417. marginBottom: o.Grid.spacer(),
  4418. textAlign: "center",
  4419. textAlignForRTL: "center",
  4420. textLetterSpacing: 2
  4421. }, "036349e9:185:14");
  4422. }, function(e) {
  4423. return o.dynamicStyle({
  4424. width: e.textWidth || o.Grid.getWidth(24)
  4425. }, "036349e9:192:41");
  4426. }), e.subText = o.stylefunc(function() {
  4427. return o.style({
  4428. margin: [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ],
  4429. textAlign: "center",
  4430. textAlignForRTL: "center",
  4431. opacity: .66
  4432. }, "036349e9:199:14");
  4433. }, function(e) {
  4434. return o.dynamicStyle({
  4435. width: e.textWidth || o.Grid.getWidth(24)
  4436. }, "036349e9:206:41");
  4437. }), e.subTextType = o.value(function() {
  4438. return o.Constants.TextType.NORMAL;
  4439. }, "036349e9:212:25"), e.btn = o.wrap(function() {
  4440. return o.style({
  4441. margin: [ o.Grid.spacer(2), 0, o.Grid.spacer(), 0 ],
  4442. width: o.Grid.getWidth(4)
  4443. }, "036349e9:214:28");
  4444. }), e = r.__decorate([ i.style ], e);
  4445. }();
  4446. t.EmptyStateStyles = p;
  4447. var d = function() {
  4448. function e() {}
  4449. return e.blendModeAdditive = o.wrap(function() {
  4450. return o.style({
  4451. blendMode: "gpu-blend-mode",
  4452. gpuBlendColorOp: "add",
  4453. gpuBlendAlphaOp: "add",
  4454. gpuBlendSourceColor: "one",
  4455. gpuBlendDestColor: "one",
  4456. gpuBlendSourceAlpha: "zero",
  4457. gpuBlendDestAlpha: "one"
  4458. }, "036349e9:225:42");
  4459. }), e.flexRow = o.wrap(function() {
  4460. return o.style({
  4461. flexDirection: "row"
  4462. }, "036349e9:236:32");
  4463. }), e.flexColumn = o.wrap(function() {
  4464. return o.style({
  4465. flexDirection: "column"
  4466. }, "036349e9:237:35");
  4467. }), e.flex0 = i.wrap(function() {
  4468. return o.style({
  4469. flex: 0
  4470. }, "036349e9:238:19");
  4471. }), e.flex1 = i.wrap(function() {
  4472. return o.style({
  4473. flex: 1
  4474. }, "036349e9:239:19");
  4475. }), e.flex4 = i.wrap(function() {
  4476. return o.style({
  4477. flex: 4
  4478. }, "036349e9:240:19");
  4479. }), e.flex5 = i.wrap(function() {
  4480. return o.style({
  4481. flex: 5
  4482. }, "036349e9:241:19");
  4483. }), e.flex7 = i.wrap(function() {
  4484. return o.style({
  4485. flex: 7
  4486. }, "036349e9:242:19");
  4487. }), e.justifyContentFlexStart = o.wrap(function() {
  4488. return o.style({
  4489. justifyContent: "flex-start"
  4490. }, "036349e9:243:48");
  4491. }), e.justifyContentFlexEnd = o.wrap(function() {
  4492. return o.style({
  4493. justifyContent: "flex-end"
  4494. }, "036349e9:244:46");
  4495. }), e.justifyContentCenter = o.wrap(function() {
  4496. return o.style({
  4497. justifyContent: "center"
  4498. }, "036349e9:245:45");
  4499. }), e.justifyContentSpaceBetween = o.wrap(function() {
  4500. return o.style({
  4501. justifyContent: "space-between"
  4502. }, "036349e9:246:51");
  4503. }), e.noLocalBounds = o.wrap(function() {
  4504. return o.style({
  4505. localBounds: !1
  4506. }, "036349e9:247:38");
  4507. }), e.disableMouseEvents = o.wrap(function() {
  4508. return o.style({
  4509. enableMouseEvents: !1
  4510. }, "036349e9:248:43");
  4511. }), e.mouseEvents = o.multistyle(function(e) {
  4512. return o.style({
  4513. enableMouseEvents: e
  4514. }, "036349e9:249:58");
  4515. }), e.leftAlignTextRTL = o.wrap(function() {
  4516. return o.style({
  4517. textAlignForRTL: "left"
  4518. }, "036349e9:250:41");
  4519. }), e.rightAlignTextRTL = o.wrap(function() {
  4520. return o.style({
  4521. textAlignForRTL: "right"
  4522. }, "036349e9:251:42");
  4523. }), e.alignItemsCenter = o.wrap(function() {
  4524. return o.style({
  4525. alignItems: "center"
  4526. }, "036349e9:252:41");
  4527. }), e.alignItemsFlexEnd = o.wrap(function() {
  4528. return o.style({
  4529. alignItems: "flex-end"
  4530. }, "036349e9:253:42");
  4531. }), e.alignSelfCenter = o.wrap(function() {
  4532. return o.style({
  4533. alignSelf: "center"
  4534. }, "036349e9:254:40");
  4535. }), e.spaceBetweenContent = o.wrap(function() {
  4536. return o.style({
  4537. justifyContent: "space-between"
  4538. }, "036349e9:255:44");
  4539. }), e.flexWrap = o.wrap(function() {
  4540. return o.style({
  4541. flexWrap: "wrap"
  4542. }, "036349e9:256:33");
  4543. }), e.whitespaceNoWrap = o.wrap(function() {
  4544. return o.style({
  4545. whiteSpace: "nowrap"
  4546. }, "036349e9:257:41");
  4547. }), e.textureModeCover = o.wrap(function() {
  4548. return o.style({
  4549. textureMode: "cover"
  4550. }, "036349e9:258:41");
  4551. }), e.textureModeContain = o.wrap(function() {
  4552. return o.style({
  4553. textureMode: "contain"
  4554. }, "036349e9:259:43");
  4555. }), e.textureModeFill = o.wrap(function() {
  4556. return o.style({
  4557. textureMode: "fill"
  4558. }, "036349e9:260:40");
  4559. }), e.textureModeNone = o.wrap(function() {
  4560. return o.style({
  4561. textureMode: "none"
  4562. }, "036349e9:261:40");
  4563. }), e.textureScale = o.multistyle(function(e) {
  4564. return o.style({
  4565. textureScale: e
  4566. }, "036349e9:262:73");
  4567. }), e.textAlignCenter = o.wrap(function() {
  4568. return o.style({
  4569. textAlign: "center",
  4570. textAlignForRTL: "center"
  4571. }, "036349e9:263:40");
  4572. }), e.textAlignRight = i.wrap(function() {
  4573. return o.style({
  4574. textAlign: "right"
  4575. }, "036349e9:264:28");
  4576. }), e.textAlignLeft = i.wrap(function() {
  4577. return o.style({
  4578. textAlign: "left",
  4579. textAlignForRTL: "left"
  4580. }, "036349e9:265:27");
  4581. }), e.zOffset = o.multistyle(function(e) {
  4582. return o.style({
  4583. zOffset: e
  4584. }, "036349e9:266:64");
  4585. }), e.opacity = o.multistyle(function(e) {
  4586. return o.style({
  4587. opacity: e
  4588. }, "036349e9:267:71");
  4589. }), e.textLetterSpacing = o.multistyle(function(e) {
  4590. return o.style({
  4591. textLetterSpacing: e
  4592. }, "036349e9:268:76");
  4593. }), e.color = o.multistyle(function(e) {
  4594. return o.style({
  4595. color: e
  4596. }, "036349e9:269:86");
  4597. }), e.bgColor = o.multistyle(function(e) {
  4598. return o.style({
  4599. backgroundColor: e
  4600. }, "036349e9:271:120");
  4601. }), e.grayScale = o.multistyle(function(e) {
  4602. return o.style({
  4603. grayScale: e
  4604. }, "036349e9:274:48");
  4605. }), e.dockBottom = o.wrap(function() {
  4606. return o.style({
  4607. position: "absolute",
  4608. left: 0,
  4609. bottom: 0,
  4610. right: 0
  4611. }, "036349e9:275:35");
  4612. }), e.dock = o.wrap(function() {
  4613. return o.style({
  4614. position: "absolute",
  4615. top: 0,
  4616. right: 0,
  4617. bottom: 0,
  4618. left: 0
  4619. }, "036349e9:276:29");
  4620. }), e.lastCard = o.wrap(function() {
  4621. return o.style({
  4622. marginRight: 0
  4623. }, "036349e9:277:33");
  4624. }), e.removeLastCardMargin = i.wrap(function() {
  4625. return o.style({
  4626. marginRight: -o.Grid.spacer(),
  4627. alignSelf: "flex-start"
  4628. }, "036349e9:278:34");
  4629. }), e.layer = i.wrap(function() {
  4630. return o.style({
  4631. layer: !0
  4632. }, "036349e9:279:19");
  4633. }), e.layerClip = i.wrap(function() {
  4634. return o.style({
  4635. layer: !0,
  4636. layerClip: !0
  4637. }, "036349e9:280:23");
  4638. }), e.arabicLetterSpacing = i.wrap(function() {
  4639. return o.style({
  4640. textLetterSpacing: .4
  4641. }, "036349e9:281:33");
  4642. }), e.cleanStrokes = i.wrap(function() {
  4643. return o.style({
  4644. textSoftness: 2,
  4645. textEdgeOffset: 0
  4646. }, "036349e9:282:26");
  4647. }), e.headerText = i.wrap(function() {
  4648. return o.style({
  4649. position: "absolute",
  4650. left: o.LayoutBounds.header.left,
  4651. top: o.LayoutBounds.header.top,
  4652. height: o.LayoutBounds.header.height,
  4653. backgroundColor: "#ff0000"
  4654. }, "036349e9:283:24");
  4655. }), e.hScroller = o.stylefunc(function() {
  4656. return o.style({
  4657. flexDirection: "row",
  4658. width: o.Grid.getWidth(24)
  4659. }, "036349e9:292:14");
  4660. }, function(e) {
  4661. return o.dynamicStyle({
  4662. height: o.Grid.getHeight(e.height)
  4663. }, "036349e9:297:37");
  4664. }), e = r.__decorate([ i.style ], e);
  4665. }();
  4666. t.CommonStyles = d;
  4667. var f = function() {
  4668. function e() {}
  4669. return e.container = o.multistyle(function(e) {
  4670. return o.style({
  4671. flexDirection: "row",
  4672. height: e,
  4673. padding: 0,
  4674. borderRadius: [ 0, 0, 0, 0 ]
  4675. }, "036349e9:306:63");
  4676. }), e.defaultBarColorStyle = o.wrap(function() {
  4677. return o.style({
  4678. backgroundColor: "#ff9900"
  4679. }, "036349e9:315:45");
  4680. }), e.defaultBgColorStyle = o.wrap(function() {
  4681. return o.style({
  4682. backgroundColor: "#00000066"
  4683. }, "036349e9:321:44");
  4684. }), e = r.__decorate([ i.style ], e);
  4685. }();
  4686. t.ProgressBarStyles = f;
  4687. var m = function() {
  4688. function e() {}
  4689. return e.text = o.multistyle(function(e) {
  4690. return void 0 === e && (e = !1), o.style({
  4691. zOffset: 1,
  4692. flex: 1,
  4693. marginLeft: e ? void 0 : o.Grid.spacer(1),
  4694. marginRight: e ? o.Grid.spacer(1) : void 0
  4695. }, "036349e9:330:60");
  4696. }), e = r.__decorate([ i.style ], e);
  4697. }();
  4698. t.FilterOptionStyles = m;
  4699. var h = function() {
  4700. function e() {}
  4701. return e.small = o.value(function() {
  4702. return 16;
  4703. }, "036349e9:342:19"), e.medium = o.value(function() {
  4704. return 26;
  4705. }, "036349e9:343:20"), e.large = o.value(function() {
  4706. return 50;
  4707. }, "036349e9:344:19"), e.size = o.multistyle(function(e) {
  4708. return o.style({
  4709. width: e,
  4710. height: e
  4711. }, "036349e9:345:53");
  4712. }), e.spriteAnimation = o.wrap(function() {
  4713. return o.style({
  4714. spriteAnimation: {
  4715. spriteSheet: o.bbOfflineUrl("/sparta/assets/ui/sprites/spinner-9900576b.png"),
  4716. fps: 60,
  4717. frameWidth: 102,
  4718. frameHeight: 102,
  4719. totalFrames: 87,
  4720. looping: !0
  4721. }
  4722. }, "036349e9:352:40");
  4723. }), e.center = o.wrap(function() {
  4724. return o.style({
  4725. flex: 1,
  4726. justifyContent: "center",
  4727. alignItems: "center"
  4728. }, "036349e9:365:31");
  4729. }), e = r.__decorate([ i.style ], e);
  4730. }();
  4731. t.SpinnerStyles = h;
  4732. var g = function() {
  4733. function e() {}
  4734. var t;
  4735. return t = e, e.height = o.value(function() {
  4736. return o.Grid.getHeight(12);
  4737. }, "036349e9:376:20"), e.width = o.value(function() {
  4738. return o.Grid.getWidth(5);
  4739. }, "036349e9:377:19"), e.container = i.wrap(function() {
  4740. return o.style({
  4741. height: t.height,
  4742. width: t.width,
  4743. marginRight: o.Grid.spacer(1)
  4744. }, "036349e9:379:23");
  4745. }), e = t = r.__decorate([ i.style ], e);
  4746. }();
  4747. t.HomeWidgetStyles = g;
  4748. var y = function() {
  4749. function e() {}
  4750. return e.container = i.wrap(function() {
  4751. return o.style({
  4752. alignItems: "center",
  4753. justifyContent: "flex-start",
  4754. flexDirection: "row"
  4755. }, "036349e9:388:23");
  4756. }), e.labelElement = i.wrap(function() {
  4757. return o.style({
  4758. flex: 1,
  4759. flexWrap: "wrap"
  4760. }, "036349e9:394:26");
  4761. }), e = r.__decorate([ i.style ], e);
  4762. }();
  4763. t.LabeledIconStyles = y;
  4764. var S = function() {
  4765. function e() {}
  4766. return e.TRANSPARENT = o.value(function() {
  4767. return "#00000000";
  4768. }, "036349e9:403:25"), e.BLACK = o.value(function() {
  4769. return "#000000";
  4770. }, "036349e9:406:19"), e.BLACK_20 = o.value(function() {
  4771. return "#00000033";
  4772. }, "036349e9:407:22"), e.BLACK_30 = o.value(function() {
  4773. return "#0000004D";
  4774. }, "036349e9:408:22"), e.BLACK_40 = o.value(function() {
  4775. return "#00000066";
  4776. }, "036349e9:409:22"), e.BLACK_50 = o.value(function() {
  4777. return "#00000080";
  4778. }, "036349e9:410:22"), e.BLACK_60 = o.value(function() {
  4779. return "#00000099";
  4780. }, "036349e9:411:22"), e.BLACK_70 = o.value(function() {
  4781. return "#000000B3";
  4782. }, "036349e9:412:22"), e.BLACK_80 = o.value(function() {
  4783. return "#000000CC";
  4784. }, "036349e9:413:22"), e.BLACK_90 = o.value(function() {
  4785. return "#000000E6";
  4786. }, "036349e9:414:22"), e.WHITE = o.value(function() {
  4787. return "#FFFFFF";
  4788. }, "036349e9:417:19"), e.WHITE_20 = o.value(function() {
  4789. return "#FFFFFF20";
  4790. }, "036349e9:418:22"), e.WHITE_33 = o.value(function() {
  4791. return "#FFFFFF33";
  4792. }, "036349e9:419:22"), e.WHITE_40 = o.value(function() {
  4793. return "#FFFFFF66";
  4794. }, "036349e9:420:22"), e.WHITE_50 = o.value(function() {
  4795. return "#FFFFFF80";
  4796. }, "036349e9:421:22"), e.WHITE_60 = o.value(function() {
  4797. return "#FFFFFF99";
  4798. }, "036349e9:422:22"), e.WHITE_80 = o.value(function() {
  4799. return "#FFFFFF80";
  4800. }, "036349e9:423:22"), e.WHITE_90 = o.value(function() {
  4801. return "#FFFFFFE6";
  4802. }, "036349e9:424:22"), e.LIGHT_GRAY = o.value(function() {
  4803. return "#999999";
  4804. }, "036349e9:427:24"), e.GRAY = o.value(function() {
  4805. return "#666666";
  4806. }, "036349e9:428:18"), e.ORANGE = o.value(function() {
  4807. return "#ED582C";
  4808. }, "036349e9:431:20"), e = r.__decorate([ i.style ], e);
  4809. }();
  4810. t.CommonColors = S;
  4811. var v = function() {
  4812. function e() {}
  4813. return e.completedText = i.wrap(function() {
  4814. return o.style({
  4815. color: "#ff9900"
  4816. }, "036349e9:436:27");
  4817. }), e.customLabel = i.wrap(function() {
  4818. return o.style({
  4819. color: "#d9d91d"
  4820. }, "036349e9:437:25");
  4821. }), e = r.__decorate([ i.style ], e);
  4822. }();
  4823. t.GameColorStyles = v;
  4824. var b = function() {
  4825. function e() {}
  4826. return e.completedText = i.wrap(function() {
  4827. return o.style({}, "036349e9:442:27");
  4828. }), e.customLabel = i.wrap(function() {
  4829. return o.style({}, "036349e9:443:25");
  4830. }), e = r.__decorate([ i.style ], e);
  4831. }();
  4832. t.EmptyGameColorStyles = b;
  4833. }, function(e, t, n) {
  4834. "use strict";
  4835. Object.defineProperty(t, "__esModule", {
  4836. value: !0
  4837. });
  4838. var r = n(1), o = n(2), i = n(71);
  4839. t.ThemeContext = i.createContext("Theme"), t.useTheme = function a() {
  4840. return o.untracked(t.ThemeContext.use());
  4841. }, t.ThemeProvider = function s(e) {
  4842. var n = r.useState(function() {
  4843. return o.observable.box(e.theme);
  4844. })[0];
  4845. r.useEffect(o.action(function() {
  4846. n.set(e.theme);
  4847. }), [ e.theme ]);
  4848. var i = r.useCallback(function() {
  4849. return n.get();
  4850. }, [ e.theme ]);
  4851. return r.createElement(t.ThemeContext.Provider, {
  4852. value: i
  4853. }, e.children);
  4854. };
  4855. }, function(e, t, n) {
  4856. "use strict";
  4857. Object.defineProperty(t, "__esModule", {
  4858. value: !0
  4859. });
  4860. var r = n(0), o = n(1), i = n(146), a = n(166), s = n(5);
  4861. function u(e) {
  4862. return void 0 === e && (e = !1), e ? i.localeState.gameLocale === a.Locale.ARABIC : i.localeState.displayLocale === a.Locale.ARABIC;
  4863. }
  4864. function l() {
  4865. return i.localeState.displayLocale === a.Locale.JAPANESE;
  4866. }
  4867. function c() {
  4868. return i.localeState.displayLocale === a.Locale.CHINESE_TRADITIONAL;
  4869. }
  4870. function p() {
  4871. return i.localeState.displayLocale === a.Locale.CHINESE_SIMPLIFIED;
  4872. }
  4873. function d() {
  4874. return i.localeState.displayLocale === a.Locale.KOREAN;
  4875. }
  4876. t.isRTLLanguage = u, t.localeRearrange = function f(e, t) {
  4877. return void 0 === t && (t = !1), e && !u(t) ? e : e.reverse();
  4878. }, t.LocaleRearrange = function m(e) {
  4879. var t = e.children, n = e.forceUserLocale, i = r.__rest(e, [ "children", "forceUserLocale" ]);
  4880. return o.createElement("surface", r.__assign({}, i), Array.isArray(t) && u(n) ? t.slice().reverse() : t);
  4881. }, t.localeLetterSpacing = function h(e) {
  4882. return u() && e && (e.textLetterSpacing = 0), s.DynamicStyle.wrapLegacyStyle(e, "d6fcadaf:35:11");
  4883. }, t.isArabicLanguage = function g() {
  4884. return i.localeState.displayLocale === a.Locale.ARABIC;
  4885. }, t.isItalianLanguage = function y() {
  4886. return i.localeState.displayLocale === a.Locale.ITALIAN;
  4887. }, t.isRussianLanguage = function S() {
  4888. return i.localeState.displayLocale === a.Locale.RUSSIAN;
  4889. }, t.isFrenchLanguage = function v() {
  4890. return i.localeState.displayLocale === a.Locale.FRENCH;
  4891. }, t.isJapaneseLanguage = l, t.isTradChineseLanguage = c, t.isSimpChineseLanguage = p,
  4892. t.isKoreanLanguage = d, t.isAsianLanguage = function b() {
  4893. return d() || p() || l() || c();
  4894. };
  4895. }, function(e, t, n) {
  4896. "use strict";
  4897. Object.defineProperty(t, "__esModule", {
  4898. value: !0
  4899. });
  4900. var r = n(9);
  4901. t.TextSize = {
  4902. XXXXL: "XXXXL",
  4903. XXXL: "XXXL",
  4904. XXL: "XXL",
  4905. XL: "XL",
  4906. L: "L",
  4907. M: "M",
  4908. S: "S",
  4909. XS: "XS",
  4910. XXS: "XXS"
  4911. }, t.PC_LINE_HEIGHTS = {
  4912. XXXXL: 92,
  4913. XXXL: 92,
  4914. XXL: 92,
  4915. XL: 62,
  4916. L: 42,
  4917. M: 32,
  4918. S: 22,
  4919. XS: 18,
  4920. XXS: 14
  4921. }, t.CONSOLE_LINE_HEIGHTS = {
  4922. XXXXL: 100,
  4923. XXXL: 100,
  4924. XXL: 100,
  4925. XL: 70,
  4926. L: 50,
  4927. M: 40,
  4928. S: 30,
  4929. XS: 25,
  4930. XXS: 20
  4931. }, t.RIME_LINE_HEIGHTS = {
  4932. XXXXL: 130,
  4933. XXXL: 130,
  4934. XXL: 89,
  4935. XL: 74,
  4936. L: 54,
  4937. M: 40,
  4938. S: 32,
  4939. XS: 24,
  4940. XXS: 20
  4941. }, t.LINE_HEIGHTS = r.SpartaGlobals.bundleIsPC ? t.PC_LINE_HEIGHTS : t.CONSOLE_LINE_HEIGHTS;
  4942. }, function(e, t, n) {
  4943. "use strict";
  4944. Object.defineProperty(t, "__esModule", {
  4945. value: !0
  4946. });
  4947. var r = n(45);
  4948. t.quitSparta = r.createTypedAction(), t.gotoLocation = r.createTypedAction(), t.updateLocation = r.createTypedAction(),
  4949. t.setNavigationEnabled = r.createTypedAction(), t.setClientVideoRecordingEnabled = r.createTypedAction();
  4950. }, function(e, t, n) {
  4951. "use strict";
  4952. Object.defineProperty(t, "__esModule", {
  4953. value: !0
  4954. }), function(e) {
  4955. e.InsertMarkup = "INSERT_MARKUP", e.MoveExisting = "MOVE_EXISTING", e.RemoveNode = "REMOVE_NODE";
  4956. }(t.SurfaceChildOperationType || (t.SurfaceChildOperationType = {})), function(e) {
  4957. e.Linear = "Linear", e.QuadraticIn = "QuadraticIn", e.QuadraticOut = "QuadraticOut",
  4958. e.QuadraticInOut = "QuadraticInOut", e.CubicIn = "CubicIn", e.CubicOut = "CubicOut",
  4959. e.CubicInOut = "CubicInOut", e.CubicOutBack = "CubicOutBack", e.SineIn = "SineIn",
  4960. e.SineOut = "SineOut", e.SineInOut = "SineInOut", e.Bezier = "Bezier";
  4961. }(t.Easing || (t.Easing = {})), function(e) {
  4962. e[e.GET = 0] = "GET", e[e.POST = 1] = "POST";
  4963. }(t.HttpMethod || (t.HttpMethod = {})), function(e) {
  4964. e[e.onMouseDown = 0] = "onMouseDown", e[e.onMouseUp = 1] = "onMouseUp", e[e.onClick = 2] = "onClick",
  4965. e[e.onDoubleClick = 3] = "onDoubleClick", e[e.onMouseScroll = 4] = "onMouseScroll",
  4966. e[e.onMouseEnter = 5] = "onMouseEnter", e[e.onMouseLeave = 6] = "onMouseLeave";
  4967. }(t.MouseEventType || (t.MouseEventType = {})), function(e) {
  4968. e[e.onBoundsChanged = 7] = "onBoundsChanged";
  4969. }(t.OtherEventType || (t.OtherEventType = {})), function(e) {
  4970. e[e.None = -1] = "None", e[e.Primary = 0] = "Primary", e[e.Secondary = 1] = "Secondary",
  4971. e[e.Wheel = 2] = "Wheel", e[e.Back = 3] = "Back", e[e.Forward = 4] = "Forward";
  4972. }(t.MouseButton || (t.MouseButton = {})), function(e) {
  4973. e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.NO_FILESYSTEM = -2] = "NO_FILESYSTEM",
  4974. e[e.KEY_NOT_FOUND = -3] = "KEY_NOT_FOUND", e[e.FAILED_FILE_INFO = -4] = "FAILED_FILE_INFO";
  4975. }(t.GetItemResult || (t.GetItemResult = {})), function(e) {
  4976. e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.FILE_DELETE_FAILURE = -2] = "FILE_DELETE_FAILURE";
  4977. }(t.RemoveKeyResult || (t.RemoveKeyResult = {})), function(e) {
  4978. e[e.OK = 0] = "OK", e[e.KEY_INVALID = -1] = "KEY_INVALID", e[e.KEY_TOO_LONG = -2] = "KEY_TOO_LONG",
  4979. e[e.NO_FILESYSTEM = -3] = "NO_FILESYSTEM", e[e.FILE_CREATION_FAILURE = -4] = "FILE_CREATION_FAILURE";
  4980. }(t.StoreItemResult || (t.StoreItemResult = {})), function(e) {
  4981. e[e.OK = 0] = "OK", e[e.FILE_SYSTEM_ERROR = -1] = "FILE_SYSTEM_ERROR", e[e.DELETE_ERROR = -2] = "DELETE_ERROR";
  4982. }(t.ClearResult || (t.ClearResult = {})), function(e) {
  4983. e[e.staticAtlas = 0] = "staticAtlas", e[e.singleTexture = 1] = "singleTexture",
  4984. e[e.dynamicAtlas = 2] = "dynamicAtlas", e[e.invalid = 3] = "invalid";
  4985. }(t.TextureAtlas || (t.TextureAtlas = {})), function(e) {
  4986. e.Controller = "controller", e.Keyboard = "keyboard", e.Mouse = "mouse";
  4987. }(t.LastUsedInputMethod || (t.LastUsedInputMethod = {})), function(e) {
  4988. e[e.DEFAULT = 0] = "DEFAULT", e[e.FIXED = 1] = "FIXED", e[e.WINDOW_FACTOR = 2] = "WINDOW_FACTOR",
  4989. e[e.CONTAINER_FACTOR = 3] = "CONTAINER_FACTOR";
  4990. }(t.DebugUiWidthInfo || (t.DebugUiWidthInfo = {}));
  4991. }, function(e, t, n) {
  4992. "use strict";
  4993. Object.defineProperty(t, "__esModule", {
  4994. value: !0
  4995. });
  4996. var r = n(130), o = n(7), i = n(367), a = n(105);
  4997. t.dangerZoneSize = i.dangerZoneSize, t.safeZone = i.safeZone, t.screen = i.screen,
  4998. t.background = i.screen;
  4999. var s = {
  5000. breadcrumbs: o.getHeight(o.COMPRESSED ? 4 : 3),
  5001. header: o.getHeight(o.COMPRESSED ? 5 : 4),
  5002. headerBottomMargin: o.getHeight(o.COMPRESSED ? 4 : 3),
  5003. tabs: o.getHeight(o.COMPRESSED ? 4 : 3),
  5004. fadeTop: o.getHeight(o.COMPRESSED ? 4 : 3),
  5005. fadeBottom: o.getHeight(o.COMPRESSED ? 0 : 3),
  5006. footerTopMargin: o.getHeight(o.COMPRESSED ? 0 : 1),
  5007. footer: o.getHeight(o.COMPRESSED ? 0 : 5),
  5008. tallContent: o.getHeight(o.COMPRESSED ? 14 : 10)
  5009. }, u = (o.COMPRESSED ? t.dangerZoneSize.height : 0) + t.safeZone.height - s.breadcrumbs - s.header - s.headerBottomMargin - s.tabs - s.fadeTop - s.fadeBottom - s.footerTopMargin - s.footer;
  5010. t.header = new r.Bounds(t.safeZone.left, t.safeZone.top, t.safeZone.width, s.breadcrumbs + s.header),
  5011. t.tabs = new r.Bounds(t.safeZone.left, t.header.bottom + s.headerBottomMargin, o.getWidth(o.COLUMNS), s.tabs),
  5012. t.fadeAreaTop = new r.Bounds(t.safeZone.left, t.tabs.bottom, o.getWidth(o.COLUMNS), s.fadeTop),
  5013. t.footer = new r.Bounds(t.safeZone.left, t.safeZone.bottom - s.footer, t.safeZone.width, s.footer),
  5014. t.input = t.footer, t.fadeAreaBottom = new r.Bounds(t.safeZone.left, t.footer.top - s.footerTopMargin - s.fadeBottom, t.safeZone.width, s.fadeBottom),
  5015. t.content = new r.Bounds(t.safeZone.left, t.fadeAreaTop.bottom, o.getWidth(o.COLUMNS), u),
  5016. t.tallContent = new r.Bounds(t.safeZone.left, t.content.top, t.safeZone.width, s.tallContent);
  5017. var l = Math.ceil(t.screen.width * (997 / 1920)), c = Math.ceil(t.screen.height * (273 / 1080)), p = o.COMPRESSED ? 189 : 277, d = o.COMPRESSED ? 63 : 76, f = o.getWidth(9), m = o.COMPRESSED ? o.getHeight(5) : t.footer.height, h = a.useConsoleMenu ? o.getWidth(7) + t.dangerZoneSize.width : i.sideOffset;
  5018. t.startScreenLogo = new r.Bounds(Math.floor(t.screen.width / 2 - l / 2), Math.floor(t.screen.height / 2.3 - c / 2), l, c),
  5019. t.mainMenu = new r.Bounds(t.screen.left - h, t.screen.top, h, t.screen.height),
  5020. t.logo = new r.Bounds(t.header.right - p, t.header.top, p, d), t.comCenterWidth = o.COMPRESSED ? o.getWidth(6) - 4 * o.GUTTER : o.getWidth(8) + t.dangerZoneSize.width,
  5021. t.userBar = o.COMPRESSED ? new r.Bounds(t.safeZone.right - f, t.content.bottom - m, f, m) : new r.Bounds(t.footer.right - f, t.footer.bottom - m, f, m);
  5022. }, function(e, t, n) {
  5023. "use strict";
  5024. Object.defineProperty(t, "__esModule", {
  5025. value: !0
  5026. });
  5027. var r = n(1), o = n(2), i = n(71), a = n(8), s = n(370), u = n(147), l = 0, c = 0, p = i.createModernContext("ParentInput");
  5028. var d = 0, f = function() {
  5029. function e(e, t, n, r, o, i, a) {
  5030. this.inputStore = t, this.parentManager = n, this.getInput = r, this.viewComponentState = o,
  5031. this.tabSlotItem = i, this.inputOptions = a, this._allowIsolation = !0, this.hasRegisteredInputs = !1,
  5032. this.unmounted = !1, this.debugName = e + "_" + d++;
  5033. var s = !1 !== this.inputOptions.group;
  5034. this.isOwnInputGroup = s || !n || !n.inputOptions.passDownId, this.inputGroupId = this.isOwnInputGroup || !n ? this.debugName + "_" + l++ : n.inputGroupId,
  5035. this.registrationId = this.debugName + "_" + c++;
  5036. }
  5037. return Object.defineProperty(e.prototype, "isActive", {
  5038. get: function() {
  5039. return !this.viewComponentState || !!this.viewComponentState.isActive && (!this.tabSlotItem || this.tabSlotItem.isActive);
  5040. },
  5041. enumerable: !0,
  5042. configurable: !0
  5043. }), e.prototype.onUnmount = function() {
  5044. this.unmounted = !0, this.disposeReaction && this.disposeReaction(), this.hasRegisteredInputs && (this.hasRegisteredInputs = !1,
  5045. this.inputStore.unregister(this.registrationId, this.inputGroupId));
  5046. }, e.prototype.updateInput = function(e) {
  5047. if (!this.unmounted) {
  5048. void 0 === e && (e = this.getInput());
  5049. var t = e ? Array.isArray(e) ? e : [ e ] : [];
  5050. !this.isActive || this.hasRegisteredInputs && 0 === t.length ? (this.hasRegisteredInputs = !1,
  5051. this.inputStore.unregister(this.registrationId, this.inputGroupId)) : t.length > 0 && (this.hasRegisteredInputs = !0,
  5052. this.inputStore.register(this.registrationId, this.inputGroupId, t));
  5053. }
  5054. }, e.prototype.updateReaction = function() {
  5055. var e = this;
  5056. this.unmounted || (this.disposeReaction && this.disposeReaction(), this.disposeReaction = o.reaction(function() {
  5057. return {
  5058. isActive: e.isActive,
  5059. inputs: e.getInput()
  5060. };
  5061. }, function(t) {
  5062. var n = t.inputs;
  5063. return e.updateInput(n);
  5064. }, {
  5065. fireImmediately: !0
  5066. }));
  5067. }, e.prototype.allowIsolation = function(e) {
  5068. this._allowIsolation = e;
  5069. var t = this.parentManager;
  5070. t && t.allowIsolation(e);
  5071. }, e.prototype.isIsolationAllowed = function() {
  5072. if (this.inputOptions.ignoreParentIsolation) return this._allowIsolation;
  5073. if (!this._allowIsolation) return !1;
  5074. var e = this.parentManager;
  5075. return !e || e.isIsolationAllowed();
  5076. }, e.prototype.isolateInputGroup = function() {
  5077. if (this.isIsolationAllowed()) {
  5078. if (this.isOwnInputGroup) {
  5079. var e = this.parentManager;
  5080. e && e.allowIsolation(!1);
  5081. }
  5082. this.inputStore.isolateGroup(this.inputGroupId);
  5083. }
  5084. }, e.prototype.releaseInputGroup = function() {
  5085. if (this._allowIsolation) {
  5086. if (this.isOwnInputGroup) {
  5087. var e = this.parentManager;
  5088. e && e.allowIsolation(!0);
  5089. }
  5090. this.inputStore.releaseGroup(this.inputGroupId);
  5091. }
  5092. }, e;
  5093. }();
  5094. t.InputManager = f, t.InputRegistration = r.forwardRef(function e(t, n) {
  5095. var o = function i(e, t, n, o, l, c) {
  5096. var d = p.useMaybe(), m = s.ViewSlotContext.useMaybe(), h = u.TabSlotItemContext.useMaybe(), g = a.SpartaContext.use(), y = r.useState(function() {
  5097. return new f(e, g.stores.inputStore, d, t, m, h, {
  5098. group: o,
  5099. ignoreParentIsolation: l,
  5100. passDownId: c
  5101. });
  5102. })[0];
  5103. return r.useEffect(function() {
  5104. return function() {
  5105. y.onUnmount();
  5106. };
  5107. }, [ y ]), r.useImperativeHandle(n, function() {
  5108. return y;
  5109. }, [ y ]), r.useEffect(function() {
  5110. y.viewComponentState = m, y.tabSlotItem = h, y.getInput = t, y.updateReaction();
  5111. }), y;
  5112. }(t.debugName, t.getInput, n, !!t.group, !!t.ignoreParentIsolation, void 0 === t.passDownId || t.passDownId);
  5113. return r.createElement(p.Provider, {
  5114. value: o
  5115. }, t.children);
  5116. });
  5117. }, function(e, t, n) {
  5118. "use strict";
  5119. Object.defineProperty(t, "__esModule", {
  5120. value: !0
  5121. });
  5122. var r = n(45);
  5123. t.display = r.createTypedAction(), t.close = r.createTypedAction(), t.closeAll = r.createTypedAction(),
  5124. t.closeGroup = r.createTypedAction();
  5125. }, function(e, t, n) {
  5126. "use strict";
  5127. (function(e) {
  5128. Object.defineProperty(t, "__esModule", {
  5129. value: !0
  5130. });
  5131. var r = n(0), o = n(510), i = n(251), a = n(45), s = n(299), u = n(121), l = n(209), c = n(369), p = n(92), d = n(23);
  5132. t.onSuccess = a.createTypedAction(), t.onError = a.createTypedAction();
  5133. var f, m = e.get("GatewayClient");
  5134. !function(e) {
  5135. e.Request = "request", e.Response = "response", e.ResponseError = "response error";
  5136. }(f || (f = {}));
  5137. var h = function() {
  5138. function e() {
  5139. this.warning = "Attempt to use an unconfigured GatewayClient, please wait for nativeClientReadyMessage";
  5140. }
  5141. return e.prototype.warningFormat = function(e) {
  5142. return this.warning + " (" + e + ")";
  5143. }, e.prototype.request = function(e, t, n) {
  5144. var r = this.warningFormat(e);
  5145. return m.error(r), Promise.reject(new Error(r));
  5146. }, e.prototype.firstPartyRequest = function(e, t, n) {
  5147. var r = this.warningFormat(e);
  5148. return m.error(r), Promise.reject(new Error(r));
  5149. }, e.prototype.connect = function() {
  5150. m.error(this.warningFormat("connect"));
  5151. }, e.prototype.disconnect = function() {
  5152. m.error(this.warningFormat("disconnect"));
  5153. }, e;
  5154. }();
  5155. t.NullGatewayClient = h;
  5156. var g = new h();
  5157. t.connectWhenReady = function y() {
  5158. m.info("Native Client and Presence Ready, connecting..."), t.connect();
  5159. }, t.connect = function() {
  5160. return g.connect();
  5161. }, t.disconnect = function() {
  5162. return g.disconnect();
  5163. }, t.request = function(e, t, n) {
  5164. return void 0 === n && (n = !0), g.request(e, t, n);
  5165. }, t.firstPartyRequest = function(e, t, n) {
  5166. return void 0 === n && (n = !0), g.firstPartyRequest(e, t, n);
  5167. };
  5168. var S = function() {
  5169. function e(e, t, n, r, o, i, a) {
  5170. this.frostbite = e, this.buildInfo = t, this.store = r, this.getAuthCode = o, this.getFirstPartyTokens = i,
  5171. m.info("GatewayClient configured: " + n.gatewayHost), this.authProps = n.authProps,
  5172. this.baseUrl = n.gatewayHost + "/jsonrpc/" + t.bundlePlatform.toLowerCase() + "/api",
  5173. this.httpRequest = a || l.httpRequest, this.headers = {
  5174. "X-ClientVersion": "master_4700144_3b16ab85_warsaw_all_prod",
  5175. "X-DbId": t.fbDatabaseId,
  5176. "X-Sparta-Info": [ "tenancyRootEnv=" + n.gatewayTenancyRootEnv, "tenancyBlazeEnv=" + n.gatewayTenancyBlazeEnv ].join("; ")
  5177. }, t.patchVersion && (this.headers["X-PatchVersion"] = t.patchVersion), t.codeChangeList && (this.headers["X-CodeCL"] = t.codeChangeList),
  5178. t.dataChangeList && (this.headers["X-DataCL"] = t.dataChangeList), t.saveGameVersion && (this.headers["X-SaveGameVersion"] = t.saveGameVersion),
  5179. n.hostingGameId && (this.headers["X-HostingGameId"] = n.hostingGameId), n.region && (this.headers["X-Region"] = n.region);
  5180. }
  5181. return e.prototype.connect = function() {
  5182. this.store.canConnect ? (this.store.setSessionState(i.GatewaySessionState.connecting),
  5183. this.useSession()) : m.error("Cannot connect in this state");
  5184. }, e.prototype.disconnect = function() {
  5185. this.sessionPromise = null, this.endFirstPartyTokenRenewal(), this.store.dropSession();
  5186. }, e.prototype.useSession = function() {
  5187. var e = this;
  5188. if (null != this.sessionPromise) return this.sessionPromise;
  5189. if (null != this.store.session) return this.sessionPromise = Promise.resolve(this.store.session.sessionId),
  5190. this.sessionPromise;
  5191. if (this.store.sessionState !== i.GatewaySessionState.connecting) return Promise.reject(new Error("Making gateway request without a gateway session"));
  5192. var t = this.getAuthCode().then(function(t) {
  5193. return e.requestSession(t);
  5194. }).then(function(t) {
  5195. return e.store.receiveSession(new o.GatewaySession(t.personaId, t.sessionId, t.envId, t.parameters)),
  5196. t.sessionId;
  5197. }).catch(function(n) {
  5198. throw e.sessionPromise === t ? (m.error("Failed to create session:", n.message),
  5199. e.sessionPromise = void 0, e.store.setSessionState(i.GatewaySessionState.failed)) : m.error("Failed to create session, but this is an old session which was dropped:", n.message),
  5200. n;
  5201. });
  5202. return this.sessionPromise = t, this.sessionPromise;
  5203. }, e.prototype.requestSession = function(e) {
  5204. return this.gatewayRequest(null, "Authentication.getEnvIdViaAuthCode", r.__assign({
  5205. authCode: e
  5206. }, this.authProps)).then(function(t) {
  5207. var n = t.sessionId;
  5208. if (!n) throw new Error('Bad response from gateway "getEnvIdViaAuthCode" using auth code ' + e + ': No session id received (response.sessionId == "' + n + '")');
  5209. return t;
  5210. }, function(e) {
  5211. throw m.error("Authentication.getEnvIdViaAuthCode failed:", e.code, e.message),
  5212. e;
  5213. });
  5214. }, e.prototype.request = function(e, t, n) {
  5215. var r = this;
  5216. return void 0 === n && (n = !0), this.store.sessionState === i.GatewaySessionState.failed ? Promise.reject(new Error("GatewayClient offline, call GatewayClient.connect to go online - " + e)) : this.useSession().then(function(n) {
  5217. return r.gatewayRequest(n, e, t);
  5218. }).catch(function(o) {
  5219. if (o.code === u.GatewayErrorCodes.INVALID_SESSION) {
  5220. if (r.sessionPromise && r.store.sessionState === i.GatewaySessionState.established && (r.sessionPromise = void 0,
  5221. r.store.setSessionState(i.GatewaySessionState.connecting)), n) return r.request(e, t, !1);
  5222. throw o;
  5223. }
  5224. throw o;
  5225. });
  5226. }, e.prototype.logRequestOrResponse = function(e, t, n, r, o, i) {
  5227. if (this.buildInfo && ("debug" === this.buildInfo.buildConfig || "release" === this.buildInfo.buildConfig || "final" === this.buildInfo.buildConfig)) {
  5228. var a, s = c.start();
  5229. switch (e) {
  5230. case f.ResponseError:
  5231. a = m.error;
  5232. break;
  5233.  
  5234. case f.Request:
  5235. case f.Response:
  5236. a = m.debug;
  5237. break;
  5238.  
  5239. default:
  5240. m.warn("Missing logger type for " + e), a = m.info;
  5241. }
  5242. a("[Gateway JSONRPC] " + e + " --\x3e method: " + t + ", id: " + n + ", headers:", p.globalScope.isJSC ? "{" + Object.keys(r).map(function(e) {
  5243. return e + ": " + r[e];
  5244. }).join(", ") + "}" : r, ", data:", p.globalScope.isJSC ? JSON.stringify(o) : o),
  5245. null == o && a("WARNING: empty data returned from: " + t + " requestId: " + n),
  5246. p.globalScope.isJSC || e !== f.Response || m.log(t, i, o);
  5247. var u = e.split(/\s+/).join("-");
  5248. c.end("JSONRPC-" + u, s);
  5249. }
  5250. }, e.prototype.gatewayRequest = function(e, n, o) {
  5251. var i = this, a = {
  5252. jsonrpc: "2.0",
  5253. method: n,
  5254. params: o || {},
  5255. id: s.createUUID()
  5256. }, c = r.__assign({}, this.headers);
  5257. e && "" !== e ? c["X-GatewaySession"] = e : c["X-Guest"] = "no-session-id";
  5258. var p = {
  5259. methodName: n,
  5260. params: o || {}
  5261. }, m = this;
  5262. return new Promise(function(e, r) {
  5263. i.logRequestOrResponse(f.Request, n, a.id, c, a);
  5264. var s = Object.keys(c).map(function(e) {
  5265. return e + ": " + c[e];
  5266. }).join("\r\n");
  5267. i.httpRequest(d.HttpMethod.POST, i.baseUrl + "?" + n, a, s, !0, function(i, s, c) {
  5268. var d = l.parseHeaders(c);
  5269. if (i && !s.error) m.logRequestOrResponse(f.Response, n, a.id, d, s.result, o),
  5270. t.onSuccess(s.result, p), e(s.result); else {
  5271. p.traceId = d["X-GatewayTraceId"], m.logRequestOrResponse(f.ResponseError, n, a.id, d, s.error || s.result),
  5272. t.onError(s.error, p);
  5273. var h = s.error ? new u.GatewayRequestError(s.error.message, s.error.code, p) : new u.GatewayRequestError("Unspecified error", 0, p);
  5274. r(h);
  5275. }
  5276. });
  5277. });
  5278. }, e.prototype.renewFirstPartyTokens = function() {
  5279. var e = this;
  5280. return this.renewFirstPartyTokensPromise ? this.renewFirstPartyTokensPromise : (this.renewFirstPartyTokensPromise = this.request("Inventory.getFirstPartyServices").then(function(t) {
  5281. return e.getFirstPartyTokens(e.frostbite, t);
  5282. }).then(function(t) {
  5283. return e.request("Inventory.registerFirstPartyTokens", {
  5284. tokens: t
  5285. });
  5286. }).then(function() {
  5287. return e.endFirstPartyTokenRenewal();
  5288. }).catch(function(t) {
  5289. throw m.error(t), e.endFirstPartyTokenRenewal(), t;
  5290. }), this.renewFirstPartyTokensPromise);
  5291. }, e.prototype.endFirstPartyTokenRenewal = function() {
  5292. this.renewFirstPartyTokensPromise = void 0;
  5293. }, e.prototype.firstPartyRequest = function(e, t, n) {
  5294. var r = this;
  5295. return void 0 === n && (n = !0), this.request(e, t).catch(function(o) {
  5296. if (o.code !== u.GatewayErrorCodes.FIRST_PARTY_TOKEN_EXPIRED) throw o;
  5297. if (n) return r.renewFirstPartyTokens().then(function() {
  5298. return r.firstPartyRequest(e, t, !1);
  5299. });
  5300. });
  5301. }, e;
  5302. }();
  5303. t.GatewayClient = S, t.setInstance = function v(e) {
  5304. g = e;
  5305. };
  5306. }).call(this, n(15));
  5307. }, function(e, t, n) {
  5308. "use strict";
  5309. Object.defineProperty(t, "__esModule", {
  5310. value: !0
  5311. });
  5312. var r = n(882);
  5313. t.focusSystem = new r.FocusSystem();
  5314. }, function(e, t, n) {
  5315. "use strict";
  5316. Object.defineProperty(t, "__esModule", {
  5317. value: !0
  5318. }), function(e) {
  5319. e.NORMAL = "normal", e.EMPHASIS = "emphasis", e.LIGHT = "light", e.HEADER_LIGHT = "headerLight",
  5320. e.HEADER_NORMAL = "headerNormal";
  5321. }(t.TextType || (t.TextType = {}));
  5322. }, function(e, t, n) {
  5323. "use strict";
  5324. (function(e) {
  5325. Object.defineProperty(t, "__esModule", {
  5326. value: !0
  5327. });
  5328. var r = n(0), o = n(2), i = n(933), a = function() {
  5329. function t(e) {
  5330. this.paramsUsedToFetch = new WeakMap(), this.fragments = o.observable.map([], {
  5331. deep: !1
  5332. }), this.fragmentTtl = -1, this.fragmentFailstateTtl = 1e4, e && (void 0 !== e.fragmentTtl && (this.fragmentTtl = e.fragmentTtl),
  5333. void 0 !== e.fragmentFailstateTtl && (this.fragmentFailstateTtl = e.fragmentFailstateTtl));
  5334. }
  5335. return t.prototype.saveParamsAndFetch = function(e, t) {
  5336. this.paramsUsedToFetch.set(e, t), this.fetch(e, t);
  5337. }, t.prototype.setFragment = function(e, t) {
  5338. t.parentStore = this, this.fragments.set(e, t), this.deleteSurplusFragments();
  5339. }, t.prototype.deleteFragment = function(e) {
  5340. var t = this.fragments.get(e);
  5341. t && (t.parentStore = void 0), this.fragments.delete(e);
  5342. }, t.prototype.clearFragments = function() {
  5343. this.fragments.forEach(function(e) {
  5344. e.parentStore = void 0;
  5345. }), this.fragments.clear();
  5346. }, t.prototype.resetFragment = function(e) {
  5347. var t = this.fragments.get(e);
  5348. t && t.reset();
  5349. }, t.prototype.deleteSurplusFragments = function() {
  5350. var e = this;
  5351. this.fragmentLimit && this.fragments.size > this.fragmentLimit && o.values(this.fragments).slice().sort(function(e, t) {
  5352. var n = t.lastAccessed - e.lastAccessed;
  5353. return 0 !== n ? n : e.created > t.created ? 1 : -1;
  5354. }).slice(this.fragmentLimit).forEach(function(t) {
  5355. return e.deleteFragment(t.id);
  5356. });
  5357. }, t.prototype.expireFragment = function(e) {
  5358. var t = this.getFragment(e);
  5359. return !(!t || t.isLoading || t.hasExpired) && (t.expire(), !0);
  5360. }, t.prototype.expireFragments = function() {
  5361. var e = this;
  5362. this.fragments.forEach(function(t) {
  5363. return e.expireFragment(t.id);
  5364. });
  5365. }, t.prototype.refreshFragments = function(e) {
  5366. var t = this;
  5367. this.fragments.forEach(function(n) {
  5368. return t.refreshFragment(n.id, e);
  5369. });
  5370. }, t.prototype.refreshFragment = function(e, t) {
  5371. var n = this.getFragment(e);
  5372. return this.saveParamsAndFetch(n, t || this.paramsUsedToFetch.get(n)), n;
  5373. }, t.prototype.createEmptyFragment = function(e) {
  5374. return new i.Fragment(e, void 0, {
  5375. ttl: this.fragmentTtl,
  5376. failstateTtl: this.fragmentFailstateTtl,
  5377. valueMapper: this.valueMapper,
  5378. parentStore: this
  5379. });
  5380. }, t.prototype.getFragment = function(e) {
  5381. var t = this.fragments.get(e);
  5382. return t || (t = this.createEmptyFragment(e), this.setFragment(e, t)), t.updateLastAccessed(),
  5383. t;
  5384. }, t.prototype.fetchFragment = function(t, n) {
  5385. var r = this;
  5386. e(o.action(function() {
  5387. t.needsFetch && r.saveParamsAndFetch(t, n);
  5388. }));
  5389. }, t.prototype.getOrFetchFragment = function(e, t) {
  5390. var n = this.getFragment(e);
  5391. return n.needsFetch && this.fetchFragment(n, t), n;
  5392. }, t.prototype.hasFragment = function(e) {
  5393. return this.fragments.has(e);
  5394. }, r.__decorate([ o.action ], t.prototype, "setFragment", null), r.__decorate([ o.action ], t.prototype, "deleteFragment", null),
  5395. r.__decorate([ o.action ], t.prototype, "clearFragments", null), r.__decorate([ o.action ], t.prototype, "refreshFragment", null),
  5396. t;
  5397. }();
  5398. t.FragmentStore = a;
  5399. }).call(this, n(277).setImmediate);
  5400. }, function(e, t, n) {
  5401. "use strict";
  5402. (function(e) {
  5403. Object.defineProperty(t, "__esModule", {
  5404. value: !0
  5405. });
  5406. var r = n(0), o = n(2), i = n(386);
  5407. function a(e, t) {
  5408. var n = JSON.stringify(t);
  5409. return e.currentRequests.list.filter(function(e) {
  5410. return JSON.stringify(e.params) === n;
  5411. }).length > 0;
  5412. }
  5413. function s(e, t, n, r) {
  5414. return t === l.ERROR;
  5415. }
  5416. var u = function() {
  5417. function e(e, t) {
  5418. this.endpoint = e, this.resultHandlers = [], this.currentRequests = new c(this),
  5419. this.config = r.__assign({}, t);
  5420. }
  5421. return e.prototype.clearHandlers = function() {
  5422. this.resultHandlers = [], this.config.requirementDeterminators = [];
  5423. }, e.prototype.withThrottling = function(e, t) {
  5424. return this.config.throttleTimeout = e, t && t.throttleDeterminator && (this.config.throttleDeterminator = t.throttleDeterminator),
  5425. this;
  5426. }, e.prototype.withRetries = function(e, t, n) {
  5427. return this.config.maxRetries = e, this.config.retryTimeout = t, n && (n.retryDeterminator && (this.config.retryDeterminator = n.retryDeterminator),
  5428. n.retryParams && (this.config.retryParams = n.retryParams)), this;
  5429. }, e.prototype.withRequestPerformer = function(e) {
  5430. return this.config.requestPerformer = e, this;
  5431. }, e.prototype.addResultHandler = function(e) {
  5432. var t = this;
  5433. return this.resultHandlers.push(e), function() {
  5434. var n = t.resultHandlers.indexOf(e);
  5435. t.resultHandlers.splice(n, 1);
  5436. };
  5437. }, e.prototype.handleResult = function(e) {
  5438. return this.resultHandlers.forEach(function(t) {
  5439. t(e);
  5440. }), e;
  5441. }, e.prototype.addRequirement = function(e) {
  5442. var t = this.config.requirementDeterminators || [];
  5443. return t.push(e), this.config.requirementDeterminators = t, function() {
  5444. var n = t.indexOf(e);
  5445. t.splice(n, 1);
  5446. };
  5447. }, e.prototype.checkRequirements = function(e) {
  5448. var t = this, n = this.config.requirementDeterminators || [];
  5449. if (0 === n.length) return !0;
  5450. var r = !0;
  5451. return n.forEach(function(n) {
  5452. if (!r) return !1;
  5453. r = n(t, e);
  5454. }), r;
  5455. }, e.prototype.request = function(e) {
  5456. if (!this.checkRequirements(e)) {
  5457. var t = new f(l.UNSATISFIED);
  5458. return this.handleResult(t);
  5459. }
  5460. if (this.config.throttleTimeout) {
  5461. var n = this.config.throttleDeterminator || a;
  5462. if (this.currentRequests.list.length > 0 && n && n(this, e)) {
  5463. var r = new f(l.THROTTLED);
  5464. return this.handleResult(r);
  5465. }
  5466. }
  5467. var o = new d(this, e, this.config.requestPerformer), i = new f(l.PENDING, o);
  5468. return this.config.throttleTimeout && this.currentRequests.add(o), this.handleResult(i);
  5469. }, e;
  5470. }();
  5471. t.Client = u;
  5472. var l, c = function() {
  5473. function e(e) {
  5474. this.client = e, this.list = [];
  5475. }
  5476. return e.prototype.add = function(e) {
  5477. var t = this, n = this.client.config.throttleTimeout || 0;
  5478. n > 0 && (this.list.push(e), setTimeout(function() {
  5479. var n = t.list.indexOf(e);
  5480. n > -1 && t.list.splice(n, 1);
  5481. }, n));
  5482. }, e;
  5483. }();
  5484. !function(e) {
  5485. e[e.THROTTLED = 0] = "THROTTLED", e[e.UNSATISFIED = 1] = "UNSATISFIED", e[e.PENDING = 2] = "PENDING",
  5486. e[e.RETRYING = 3] = "RETRYING", e[e.SUCCESS = 4] = "SUCCESS", e[e.ERROR = 5] = "ERROR";
  5487. }(l = t.RequestState || (t.RequestState = {}));
  5488. var p = [ l.THROTTLED, l.UNSATISFIED, l.ERROR, l.SUCCESS ], d = function() {
  5489. function e(e, t, n) {
  5490. this.client = e, this.performer = n, this.status = l.PENDING, this.attempt = 1,
  5491. this.params = t, this.performRequest(t);
  5492. }
  5493. return e.prototype.performRequest = function(e, t) {
  5494. var n = this;
  5495. void 0 === t && (t = 1), this.params = e, this.attempt = t, this.update(l.PENDING),
  5496. this.performer(this.client.endpoint, e).then(function(e) {
  5497. return n.shouldRetry(l.SUCCESS, e, void 0) || n.update(l.SUCCESS, e), null;
  5498. }).catch(function(e) {
  5499. n.shouldRetry(l.ERROR, void 0, e) || n.update(l.ERROR, void 0, e);
  5500. });
  5501. }, e.prototype.update = function(e, t, n) {
  5502. this.status = e, this.response = t, this.error = n;
  5503. }, e.prototype.shouldRetry = function(e, t, n) {
  5504. var r = this, o = this.client.config;
  5505. if (o.maxRetries && this.attempt <= o.maxRetries) {
  5506. var i = o.retryDeterminator || s;
  5507. if (i && i(this, e, t, n)) {
  5508. var a = o.retryParams ? o.retryParams(this) : this.params;
  5509. return setTimeout(function() {
  5510. r.performRequest(a, r.attempt + 1);
  5511. }, o.retryTimeout || 0), this.update(l.RETRYING), !0;
  5512. }
  5513. }
  5514. }, r.__decorate([ o.observable ], e.prototype, "status", void 0), r.__decorate([ o.action ], e.prototype, "update", null),
  5515. e;
  5516. }();
  5517. t.Request = d;
  5518. var f = function() {
  5519. function t(e, t) {
  5520. this.initialStatus = e, this.request = t, this.disposers = [];
  5521. }
  5522. return Object.defineProperty(t.prototype, "status", {
  5523. get: function() {
  5524. return this.request ? this.request.status : this.initialStatus;
  5525. },
  5526. enumerable: !0,
  5527. configurable: !0
  5528. }), Object.defineProperty(t.prototype, "error", {
  5529. get: function() {
  5530. return this.request ? this.request.error : null;
  5531. },
  5532. enumerable: !0,
  5533. configurable: !0
  5534. }), Object.defineProperty(t.prototype, "response", {
  5535. get: function() {
  5536. return this.request ? this.request.response : null;
  5537. },
  5538. enumerable: !0,
  5539. configurable: !0
  5540. }), Object.defineProperty(t.prototype, "isComplete", {
  5541. get: function() {
  5542. switch (this.status) {
  5543. case l.PENDING:
  5544. case l.RETRYING:
  5545. return !1;
  5546.  
  5547. case l.UNSATISFIED:
  5548. case l.THROTTLED:
  5549. case l.SUCCESS:
  5550. case l.ERROR:
  5551. return !0;
  5552.  
  5553. default:
  5554. throw i.unexhaustiveSwitch(this.status);
  5555. }
  5556. },
  5557. enumerable: !0,
  5558. configurable: !0
  5559. }), t.prototype.dispose = function() {
  5560. this.disposers.forEach(function(e) {
  5561. e();
  5562. });
  5563. }, t.prototype.onStatusChange = function(t, n, r) {
  5564. var i = this;
  5565. void 0 === r && (r = !1), "function" == typeof n && this.disposers.push(o.reaction(function() {
  5566. return i.status;
  5567. }, function(o) {
  5568. o === t && (n(), r && e(function() {
  5569. return i.dispose();
  5570. }));
  5571. }, {
  5572. fireImmediately: !0
  5573. }));
  5574. }, t.prototype.onThrottled = function(e) {
  5575. return this.onStatusChange(l.THROTTLED, function() {
  5576. return e();
  5577. }, !0), this;
  5578. }, t.prototype.onPending = function(e) {
  5579. return this.onStatusChange(l.PENDING, function() {
  5580. return e();
  5581. }), this;
  5582. }, t.prototype.onUnsatisfied = function(e) {
  5583. return this.onStatusChange(l.UNSATISFIED, function() {
  5584. return e();
  5585. }, !0), this;
  5586. }, t.prototype.onRetrying = function(e) {
  5587. return this.onStatusChange(l.RETRYING, function() {
  5588. return e();
  5589. }), this;
  5590. }, t.prototype.onSuccess = function(e) {
  5591. var t = this;
  5592. return this.onStatusChange(l.SUCCESS, function() {
  5593. return e(t.response);
  5594. }, !0), this;
  5595. }, t.prototype.onError = function(e) {
  5596. var t = this;
  5597. return this.onStatusChange(l.ERROR, function() {
  5598. return e(t.error || new Error("An unknown error occured."));
  5599. }, !0), this;
  5600. }, t.prototype.onFinished = function(t) {
  5601. var n = this;
  5602. p.forEach(function(r) {
  5603. n.onStatusChange(r, function() {
  5604. e(function() {
  5605. return t();
  5606. });
  5607. });
  5608. });
  5609. }, t.prototype.toPromise = function() {
  5610. var e = this;
  5611. return new Promise(function(t) {
  5612. e.onFinished(t);
  5613. });
  5614. }, r.__decorate([ o.computed ], t.prototype, "status", null), r.__decorate([ o.computed ], t.prototype, "isComplete", null),
  5615. t;
  5616. }();
  5617. t.Result = f;
  5618. }).call(this, n(277).setImmediate);
  5619. }, function(e, t, n) {
  5620. "use strict";
  5621. Object.defineProperty(t, "__esModule", {
  5622. value: !0
  5623. });
  5624. var r = n(36);
  5625. t.tunguskaGameId = r.getBuildInfo().isCTE() ? "bf1cte" : "tunguska", t.tunguskaConquestAssaultMaps = [ "mp_beachhead", "mp_harbor", "mp_naval", "mp_offensive", "mp_river" ];
  5626. }, function(e, t, n) {
  5627. "use strict";
  5628. (function(__) {
  5629. Object.defineProperty(t, "__esModule", {
  5630. value: !0
  5631. });
  5632. var e = n(0), r = n(1), o = n(69), i = n(5), a = n(130), s = n(4), u = n(2), l = n(14), c = n(10), p = n(7), d = n(25), f = n(11), m = n(18), h = n(5), g = n(28), y = n(37), S = n(148), v = function() {
  5633. function e(e, t) {
  5634. void 0 === e && (e = 0), void 0 === t && (t = 0), this.localX = e, this.localY = t;
  5635. }
  5636. return Object.defineProperty(e.prototype, "x", {
  5637. get: function() {
  5638. return this.localX;
  5639. },
  5640. enumerable: !0,
  5641. configurable: !0
  5642. }), Object.defineProperty(e.prototype, "y", {
  5643. get: function() {
  5644. return this.localY;
  5645. },
  5646. enumerable: !0,
  5647. configurable: !0
  5648. }), e;
  5649. }(), b = function() {
  5650. function t() {
  5651. var e = this;
  5652. this.scrollOffset = new v(), this.containerBounds = new a.Bounds(), this.contentBounds = new a.Bounds(),
  5653. this.isHovered = !1, this.focusAncestor = g.focusSystem.createAncestor(o.autoId("scrollcontainer")),
  5654. this.scrolledOnOldBoundsY = 0, this.scrolledOnOldBoundsX = 0, this.setHovered = function() {
  5655. e.isHovered = !0;
  5656. }, this.unsetHovered = function() {
  5657. e.isHovered = !1;
  5658. };
  5659. }
  5660. return Object.defineProperty(t.prototype, "canScrollUp", {
  5661. get: function() {
  5662. return this.scrollOffset.y > 0;
  5663. },
  5664. enumerable: !0,
  5665. configurable: !0
  5666. }), Object.defineProperty(t.prototype, "canScrollLeft", {
  5667. get: function() {
  5668. return this.scrollOffset.x > 0;
  5669. },
  5670. enumerable: !0,
  5671. configurable: !0
  5672. }), Object.defineProperty(t.prototype, "canScrollDown", {
  5673. get: function() {
  5674. return this.scrollOffset.y < this.maxScrollOffset.y;
  5675. },
  5676. enumerable: !0,
  5677. configurable: !0
  5678. }), Object.defineProperty(t.prototype, "canScrollRight", {
  5679. get: function() {
  5680. return this.scrollOffset.x < this.maxScrollOffset.x;
  5681. },
  5682. enumerable: !0,
  5683. configurable: !0
  5684. }), Object.defineProperty(t.prototype, "canScroll", {
  5685. get: function() {
  5686. return this.contentBounds.width > this.containerBounds.width || this.contentBounds.height > this.containerBounds.height;
  5687. },
  5688. enumerable: !0,
  5689. configurable: !0
  5690. }), Object.defineProperty(t.prototype, "maxScrollOffset", {
  5691. get: function() {
  5692. return new v(Math.max(this.contentBounds.width - this.containerBounds.width, 0), Math.max(this.contentBounds.height - this.containerBounds.height, 0));
  5693. },
  5694. enumerable: !0,
  5695. configurable: !0
  5696. }), Object.defineProperty(t.prototype, "viewportBounds", {
  5697. get: function() {
  5698. return new a.Bounds(this.scrollOffset.x, this.scrollOffset.y, this.containerBounds.width, this.containerBounds.height);
  5699. },
  5700. enumerable: !0,
  5701. configurable: !0
  5702. }), Object.defineProperty(t.prototype, "scrollbarOffset", {
  5703. get: function() {
  5704. var e = this.scrollOffset.y / this.contentBounds.height;
  5705. return new v(0, e * this.containerBounds.height);
  5706. },
  5707. enumerable: !0,
  5708. configurable: !0
  5709. }), Object.defineProperty(t.prototype, "scrollbarHeight", {
  5710. get: function() {
  5711. return 0 === this.contentBounds.height ? 0 : this.containerBounds.height / this.contentBounds.height * this.containerBounds.height;
  5712. },
  5713. enumerable: !0,
  5714. configurable: !0
  5715. }), t.prototype.scrollInDirection = function(e, t, n) {
  5716. void 0 === n && (n = 100);
  5717. var r = this.scrollOffset.x + e * n, o = this.scrollOffset.y + t * n;
  5718. this.setScrollOffset(r, o);
  5719. }, t.prototype.scrollToBounds = function(e) {
  5720. var t = this.viewportBounds, n = 0, r = 0;
  5721. e.top < t.top ? n = e.top - t.top : e.bottom > t.bottom && (n = e.bottom - t.bottom),
  5722. e.left < t.left ? r = e.left - t.left : e.right > t.right && (r = e.right - t.right),
  5723. this.setScrollOffset(this.scrollOffset.x + r + this.scrolledOnOldBoundsX, this.scrollOffset.y + n + this.scrolledOnOldBoundsY),
  5724. this.scrolledOnOldBoundsY = -n, this.scrolledOnOldBoundsX = -r;
  5725. }, t.prototype.setScrollOffset = function(e, t) {
  5726. var n = Math.max(Math.min(e, this.maxScrollOffset.x), 0), r = Math.max(Math.min(t, this.maxScrollOffset.y), 0);
  5727. this.scrollOffset.x === n && this.scrollOffset.y === r || (this.scrollOffset = new v(n, r));
  5728. }, t.prototype.setContainerBounds = function(e) {
  5729. e.equals(this.containerBounds, !1) || (this.containerBounds = e, this.setScrollOffset(this.scrollOffset.x, this.scrollOffset.y));
  5730. }, t.prototype.setContentBounds = function(e) {
  5731. e.equals(this.contentBounds, !1) || (this.contentBounds = e, this.scrolledOnOldBoundsY = 0,
  5732. this.scrolledOnOldBoundsX = 0, this.setScrollOffset(this.scrollOffset.x, this.scrollOffset.y));
  5733. }, t.prototype.getLocalBounds = function(e) {
  5734. return e.offset(this.containerBounds.x - this.scrollOffset.x, this.containerBounds.y - this.scrollOffset.y);
  5735. }, Object.defineProperty(t.prototype, "smartSoftClipModifier", {
  5736. get: function() {
  5737. if (!this.canScroll) return [ 0, 0, 0, 0 ];
  5738. var e = this.scrollOffset, t = this.maxScrollOffset, n = [ 1, 1, 1, 1 ];
  5739. return 0 === e.x ? n[3] = 0 : e.x === t.x && (n[1] = 0), 0 === e.y ? n[0] = 0 : e.y === t.y && (n[2] = 0),
  5740. n;
  5741. },
  5742. enumerable: !0,
  5743. configurable: !0
  5744. }), e.__decorate([ u.observable ], t.prototype, "scrollOffset", void 0), e.__decorate([ u.observable ], t.prototype, "containerBounds", void 0),
  5745. e.__decorate([ u.observable ], t.prototype, "contentBounds", void 0), e.__decorate([ u.observable ], t.prototype, "isHovered", void 0),
  5746. e.__decorate([ u.computed ], t.prototype, "canScrollUp", null), e.__decorate([ u.computed ], t.prototype, "canScrollLeft", null),
  5747. e.__decorate([ u.computed ], t.prototype, "canScrollDown", null), e.__decorate([ u.computed ], t.prototype, "canScrollRight", null),
  5748. e.__decorate([ u.computed ], t.prototype, "canScroll", null), e.__decorate([ u.computed ], t.prototype, "maxScrollOffset", null),
  5749. e.__decorate([ u.computed ], t.prototype, "viewportBounds", null), e.__decorate([ u.computed ], t.prototype, "scrollbarOffset", null),
  5750. e.__decorate([ u.computed ], t.prototype, "scrollbarHeight", null), e.__decorate([ u.action ], t.prototype, "scrollInDirection", null),
  5751. e.__decorate([ u.action ], t.prototype, "scrollToBounds", null), e.__decorate([ u.action ], t.prototype, "setScrollOffset", null),
  5752. e.__decorate([ u.action ], t.prototype, "setContainerBounds", null), e.__decorate([ u.action ], t.prototype, "setContentBounds", null),
  5753. e.__decorate([ u.action ], t.prototype, "setHovered", void 0), e.__decorate([ u.action ], t.prototype, "unsetHovered", void 0),
  5754. e.__decorate([ u.computed ], t.prototype, "smartSoftClipModifier", null), t;
  5755. }();
  5756. t.ScrollerState = b;
  5757. var _ = function(t) {
  5758. function n(e, n) {
  5759. var r = t.call(this, e, n) || this;
  5760. return r.canScroll = !1, r.getInput = function() {
  5761. var e = (r.scrollerState.canScrollUp || r.scrollerState.canScrollDown) && g.focusSystem.controllerMode;
  5762. if (e && ("auto" === r.props.controller ? e = r.scrollerState.focusAncestor.hasFocusedChild : r.props.controller || (e = !1)),
  5763. e) return [ new f.Input({
  5764. action: function() {
  5765. return r.scrollInDirection(0, -1);
  5766. },
  5767. key: c.Keys.ScrollUp,
  5768. visible: !1
  5769. }), new f.Input({
  5770. action: function() {
  5771. return r.scrollInDirection(0, 1);
  5772. },
  5773. key: c.Keys.ScrollDown,
  5774. label: __("ID_SPARTA_ACTION_SCROLL")
  5775. }) ];
  5776. }, r.onBounds = function(e) {
  5777. r.scrollerState.setContainerBounds(a.Bounds.fromRaw(e));
  5778. }, r.updateContentBounds = function(e) {
  5779. var t;
  5780. if (e instanceof a.Bounds ? t = e : (Math.abs(e.height - r.scrollerState.contentBounds.height) <= 1 && (e.height = r.scrollerState.contentBounds.height),
  5781. t = a.Bounds.fromRaw(e)), !r.props.noHorizontalScroll) {
  5782. var n = P(r.scrollerState.focusAncestor.children);
  5783. n.width > t.width && (t = new a.Bounds(t.x, t.y, n.width, t.height, t.localX, t.localY));
  5784. }
  5785. r.scrollerState.setContentBounds(t);
  5786. }, r.onMouseScroll = function(e) {
  5787. r.scrollInDirection(0, e.scroll > 0 ? -1 : 1), r.props.onMouseScroll && r.props.onMouseScroll(e),
  5788. e.stopPropagation();
  5789. }, r.shouldTween = function() {
  5790. return void 0 !== r.props.tween ? r.props.tween : g.focusSystem.controllerMode;
  5791. }, r.scrollerState = e.scrollerState || new b(), r.reaction(function() {
  5792. return r.scrollerState.focusAncestor.children.filter(function(e) {
  5793. return e.bounds;
  5794. }).length;
  5795. }, function() {
  5796. return r.updateContentBounds(r.scrollerState.contentBounds);
  5797. }), r.reaction(function() {
  5798. return r.scrollerState.canScrollUp || r.scrollerState.canScrollDown;
  5799. }, function(e) {
  5800. e === r.canScroll || r.props.noVerticalScroll || r.setCanScroll(e);
  5801. }, {
  5802. fireImmediately: !0
  5803. }), r;
  5804. }
  5805. return e.__extends(n, t), n.prototype.componentDidMount = function() {
  5806. var e = this;
  5807. this.reaction(function() {
  5808. return e.scrollerState.focusAncestor.focusedChild;
  5809. }, function(t) {
  5810. return e.onFocusChildChanged(t);
  5811. }, {
  5812. fireImmediately: !0
  5813. });
  5814. }, n.prototype.componentWillUnmount = function() {
  5815. this.scrollerState.focusAncestor.destroy();
  5816. }, n.prototype.setCanScroll = function(e) {
  5817. this.canScroll = e;
  5818. }, n.prototype.getNearestEdgeVector = function(e) {
  5819. var t = P(this.scrollerState.focusAncestor.children);
  5820. if (w(e.left, t.left) && this.scrollerState.canScrollLeft) return new v(0, this.scrollerState.scrollOffset.y);
  5821. if (w(e.right, t.right) && this.scrollerState.canScrollRight) {
  5822. var n = this.props.noHorizontalScroll ? 0 : this.scrollerState.maxScrollOffset.x;
  5823. return new v(n, this.scrollerState.scrollOffset.y);
  5824. }
  5825. if (w(e.top, t.top) && this.scrollerState.canScrollUp) return new v(this.scrollerState.scrollOffset.x, 0);
  5826. if (w(e.bottom, t.bottom) && this.scrollerState.canScrollDown) {
  5827. var r = this.props.noVerticalScroll ? 0 : this.scrollerState.maxScrollOffset.y;
  5828. return new v(this.scrollerState.scrollOffset.x, r);
  5829. }
  5830. }, n.prototype.shouldScrollToFocus = function() {
  5831. if (g.focusSystem.lastFocusSource === y.FocusSource.Auto) return !1;
  5832. var e = void 0 !== this.props.focus ? this.props.focus : g.focusSystem.controllerMode;
  5833. return !0 === e || "key" === e && g.focusSystem.lastFocusSource === y.FocusSource.Spatial;
  5834. }, n.prototype.onFocusChildChanged = function(e) {
  5835. if (e && this.shouldScrollToFocus()) {
  5836. var t = e.getBounds();
  5837. if (!t) return;
  5838. var n = this.getNearestEdgeVector(t);
  5839. n ? this.scrollTo(n.x, n.y) : this.scrollToBounds(t);
  5840. }
  5841. }, n.prototype.scrollInDirection = function(e, t) {
  5842. this.scrollerState.scrollInDirection(e, t);
  5843. }, n.prototype.scrollToElement = function(e) {
  5844. e.bounds && this.scrollerState.scrollToBounds(this.scrollerState.getLocalBounds(e.bounds));
  5845. }, n.prototype.scrollToBounds = function(e) {
  5846. this.scrollerState.scrollToBounds(this.scrollerState.getLocalBounds(e));
  5847. }, n.prototype.scrollTo = function(e, t) {
  5848. this.scrollerState.setScrollOffset(e, t);
  5849. }, n.prototype.render = function() {
  5850. var e, t, n = this.props.style;
  5851. return !n || Array.isArray(n) || i.isStyleClass(n) || (e = n.maxWidth, t = n.maxHeight),
  5852. r.createElement(d.InputRegistration, {
  5853. debugName: "44db0545:521:43",
  5854. getInput: this.getInput
  5855. }, r.createElement("surface", {
  5856. style: this.props.style,
  5857. onBounds: this.onBounds
  5858. }, r.createElement(A, {
  5859. scrollerState: this.scrollerState,
  5860. clipMargin: this.props.clipMargin,
  5861. softClip: this.props.softClip,
  5862. maxWidth: e,
  5863. maxHeight: t,
  5864. onMouseScroll: this.onMouseScroll,
  5865. onMouseEnter: this.scrollerState.setHovered,
  5866. onMouseLeave: this.scrollerState.unsetHovered
  5867. }, r.createElement(T, {
  5868. shouldTween: this.shouldTween,
  5869. onBoundsChanged: this.updateContentBounds,
  5870. scrollerState: this.scrollerState
  5871. }, this.props.children)), this.canScroll && r.createElement(C, {
  5872. shouldTween: this.shouldTween,
  5873. scrollerState: this.scrollerState,
  5874. position: this.props.scrollbarPosition,
  5875. enabled: this.props.scrollbar
  5876. }), this.props.overlay));
  5877. }, n.defaultProps = {
  5878. controller: "auto",
  5879. noVerticalScroll: !1
  5880. }, e.__decorate([ u.observable ], n.prototype, "canScroll", void 0), e.__decorate([ u.action ], n.prototype, "setCanScroll", null),
  5881. n = e.__decorate([ s.observer ], n);
  5882. }(r.Component);
  5883. t.Scroller = _;
  5884. var T = function(t) {
  5885. function n() {
  5886. var e = null !== t && t.apply(this, arguments) || this;
  5887. return e.translateX = l.Animation.componentTween(e, "44db0545:570:56", 0, l.Animation.presets.list.scroll),
  5888. e.translateY = l.Animation.componentTween(e, "44db0545:571:56", 0, l.Animation.presets.list.scroll),
  5889. e;
  5890. }
  5891. return e.__extends(n, t), n.prototype.componentDidMount = function() {
  5892. var e = this;
  5893. this.reaction(function() {
  5894. return e.props.scrollerState.scrollOffset;
  5895. }, function(t) {
  5896. return e.updateTweens(t);
  5897. }, {
  5898. fireImmediately: !0
  5899. });
  5900. }, n.prototype.updateTweens = function(e) {
  5901. this.props.shouldTween() ? (this.translateX.to(-e.x), this.translateY.to(-e.y)) : (this.translateX.set(-e.x),
  5902. this.translateY.set(-e.y));
  5903. }, n.prototype.render = function() {
  5904. var t = h.merge2(this.translateX.getStyleClass("translateX"), this.translateY.getStyleClass("translateY"));
  5905. return r.createElement("surface", e.__assign({
  5906. style: t
  5907. }, this.props.scrollerState.focusAncestor.hooks, {
  5908. onBounds: this.props.onBoundsChanged
  5909. }), this.props.children);
  5910. }, n;
  5911. }(r.Component), E = h.StaticStyle.wrapLegacyStyleSheet({
  5912. scrollbarContainer: {
  5913. position: "absolute",
  5914. top: 0,
  5915. bottom: 0,
  5916. width: 2
  5917. },
  5918. inside: {
  5919. right: 0
  5920. },
  5921. outside: {
  5922. right: -p.GUTTER
  5923. },
  5924. scrollIndicator: {
  5925. position: "absolute",
  5926. top: 0,
  5927. right: 0,
  5928. left: 0,
  5929. backgroundColor: "#ffffffa6"
  5930. }
  5931. }, "44db0545:607:15"), C = function(t) {
  5932. function n() {
  5933. var e = null !== t && t.apply(this, arguments) || this;
  5934. return e.twinkle = S.TwinkleContext.getFromComponent(e), e.shouldKeepScrollbarVisible = !1,
  5935. e.translateTween = l.Animation.componentTween(e, "44db0545:651:60", 0, l.Animation.presets.list.scroll),
  5936. e.heightTween = l.Animation.componentTween(e, "44db0545:652:57", 0), e.opacityTween = l.Animation.componentTween(e, "44db0545:653:58", 0),
  5937. e;
  5938. }
  5939. return e.__extends(n, t), n.prototype.componentDidMount = function() {
  5940. var e = this;
  5941. this.reaction(function() {
  5942. return e.props.scrollerState.scrollbarOffset;
  5943. }, function(t) {
  5944. return e.updateTweens(t);
  5945. }, {
  5946. fireImmediately: !0
  5947. }), this.reaction(function() {
  5948. return e.props.scrollerState.scrollbarHeight;
  5949. }, function(t) {
  5950. e.heightTween.set(t), e.opacityTween.to(e.visible ? 1 : 0), e.keepScrollbarVisibleFor(1e3);
  5951. }, {
  5952. fireImmediately: !0
  5953. }), this.reaction(function() {
  5954. return e.visible;
  5955. }, function(t) {
  5956. e.opacityTween.to(t ? 1 : 0);
  5957. }, {
  5958. fireImmediately: !0
  5959. });
  5960. }, n.prototype.shouldComponentUpdate = function(e) {
  5961. return !1;
  5962. }, n.prototype.updateTweens = function(e) {
  5963. this.props.shouldTween && this.props.shouldTween() ? this.translateTween.to(e.y > 0 && isFinite(e.y) ? e.y : 0) : this.translateTween.set(e.y > 0 && isFinite(e.y) ? e.y : 0),
  5964. this.twinkle.buildInfo.isConsole && this.keepScrollbarVisibleFor(1e3);
  5965. }, n.prototype.keepScrollbarVisibleFor = function(e) {
  5966. var t = this;
  5967. this.shouldKeepScrollbarVisible = !0, clearTimeout(this.keepScrollbarVisibleTimeout),
  5968. this.keepScrollbarVisibleTimeout = setTimeout(u.action(function() {
  5969. t.shouldKeepScrollbarVisible = !1;
  5970. }), e);
  5971. }, Object.defineProperty(n.prototype, "visible", {
  5972. get: function() {
  5973. return !(!this.props.scrollerState.canScrollUp && !this.props.scrollerState.canScrollDown) && (!(!this.shouldKeepScrollbarVisible || !1 === this.props.enabled) || ("auto" === this.props.enabled ? this.props.scrollerState.focusAncestor.hasFocusedChild || this.props.scrollerState.isHovered : !0 === this.props.enabled));
  5974. },
  5975. enumerable: !0,
  5976. configurable: !0
  5977. }), n.prototype.render = function() {
  5978. var e = h.merge3(E.scrollbarContainer, (this.props.position, E.outside), this.opacityTween.getStyleClass("opacity")), t = h.merge3(E.scrollIndicator, this.heightTween.getStyleClass("height"), this.translateTween.getStyleClass("translateY"));
  5979. return r.createElement("surface", {
  5980. style: e
  5981. }, r.createElement("surface", {
  5982. style: t
  5983. }));
  5984. }, n.contextTypes = S.TwinkleContext.contextTypes, n.defaultProps = {
  5985. enabled: "auto",
  5986. position: "outside",
  5987. shouldTween: function() {
  5988. return g.focusSystem.controllerMode;
  5989. }
  5990. }, e.__decorate([ u.observable ], n.prototype, "shouldKeepScrollbarVisible", void 0),
  5991. e.__decorate([ u.action ], n.prototype, "keepScrollbarVisibleFor", null), e.__decorate([ u.computed ], n.prototype, "visible", null),
  5992. n;
  5993. }(r.Component);
  5994. t.Scrollbar = C;
  5995. var I = h.StaticStyle.create({
  5996. flex: 1,
  5997. flexDirection: "row",
  5998. layer: !0,
  5999. layerClip: !0
  6000. }, "44db0545:789:37"), A = function(t) {
  6001. function n() {
  6002. var e = null !== t && t.apply(this, arguments) || this;
  6003. return e.softClipTweens = [ l.Animation.componentTween(e, "44db0545:759:39", 0), l.Animation.componentTween(e, "44db0545:760:39", 0), l.Animation.componentTween(e, "44db0545:761:39", 0), l.Animation.componentTween(e, "44db0545:762:39", 0) ],
  6004. e;
  6005. }
  6006. return e.__extends(n, t), n.prototype.componentWillMount = function() {
  6007. var e = this;
  6008. this.reaction(function() {
  6009. return e.props.scrollerState.smartSoftClipModifier;
  6010. }, function() {
  6011. return e.updateSoftClip();
  6012. }, {
  6013. fireImmediately: !0
  6014. });
  6015. }, n.prototype.componentDidUpdate = function() {
  6016. this.updateSoftClip();
  6017. }, n.prototype.updateSoftClip = function() {
  6018. var e = this, t = this.props.softClip || [ 0, 0, 0, 0 ];
  6019. this.props.scrollerState.smartSoftClipModifier.map(function(n, r) {
  6020. return e.softClipTweens[r].set(Math.max(n * t[r], 0));
  6021. });
  6022. }, n.prototype.render = function() {
  6023. var e = this.props, t = e.clipMargin, n = e.maxWidth, o = e.maxHeight, i = h.merge3(I, h.merge4(this.softClipTweens[0].getStyleClass("layerSoftClipTop"), this.softClipTweens[1].getStyleClass("layerSoftClipRight"), this.softClipTweens[2].getStyleClass("layerSoftClipBottom"), this.softClipTweens[3].getStyleClass("layerSoftClipLeft")), h.DynamicStyle.create({
  6024. maxWidth: n,
  6025. maxHeight: o,
  6026. margin: t ? t.map(function(e) {
  6027. return -e;
  6028. }) : void 0,
  6029. padding: t
  6030. }, "44db0545:801:15"));
  6031. return r.createElement("surface", {
  6032. style: i,
  6033. onMouseScroll: this.props.onMouseScroll,
  6034. onMouseEnter: this.props.onMouseEnter,
  6035. onMouseLeave: this.props.onMouseLeave
  6036. }, r.createElement("surface", {
  6037. style: m.CommonStyles.flex1
  6038. }, this.props.children));
  6039. }, n = e.__decorate([ s.observer ], n);
  6040. }(r.Component);
  6041. function w(e, t, n) {
  6042. return void 0 === n && (n = 5), Math.abs(e - t) <= n;
  6043. }
  6044. function P(e) {
  6045. var t = e.map(function(e) {
  6046. return e.bounds;
  6047. }), n = Number.MAX_VALUE, r = Number.MAX_VALUE, o = -Number.MAX_VALUE, i = -Number.MAX_VALUE;
  6048. return t.forEach(function(e) {
  6049. e && (e.left < n && (n = e.left), e.top < r && (r = e.top), e.right > o && (o = e.right),
  6050. e.bottom > i && (i = e.bottom));
  6051. }), new a.Bounds(n, r, o - n, i - r);
  6052. }
  6053. }).call(this, n(3));
  6054. }, function(e, t, n) {
  6055. "use strict";
  6056. Object.defineProperty(t, "__esModule", {
  6057. value: !0
  6058. });
  6059. var r = n(0), o = n(1), i = n(4), a = n(7), s = n(33), u = n(24), l = n(495), c = n(295), p = n(5), d = n(9), f = n(19), m = function(e) {
  6060. function t() {
  6061. var t = null !== e && e.apply(this, arguments) || this;
  6062. return t.getTheme = f.ThemeContext.getFromComponent(t), t.scroller = o.createRef(),
  6063. t;
  6064. }
  6065. return r.__extends(t, e), t.prototype.scrollTo = function(e, t) {
  6066. this.scroller.current && this.scroller.current.scrollTo(e, t);
  6067. }, Object.defineProperty(t.prototype, "style", {
  6068. get: function() {
  6069. return this.getTheme().legacyTemplate;
  6070. },
  6071. enumerable: !0,
  6072. configurable: !0
  6073. }), t.prototype.renderHeader = function() {
  6074. if (this.props.header) {
  6075. var e = this.props.shortHeader ? this.style.shortHeader : this.style.header;
  6076. return o.createElement("surface", {
  6077. style: p.merge2(e, this.props.headerStyle || p.emptyStyle)
  6078. }, this.props.header, this.props.showDivider && o.createElement(c.Divider, {
  6079. style: this.style.divider
  6080. }));
  6081. }
  6082. }, t.prototype.renderAboveContent = function() {
  6083. if (this.props.aboveContent) return o.createElement("surface", {
  6084. style: this.style.aboveContent
  6085. }, this.props.aboveContent);
  6086. }, t.prototype.renderBelowContent = function() {
  6087. if (this.props.belowContent) return o.createElement("surface", {
  6088. style: this.style.belowContent
  6089. }, this.props.belowContent);
  6090. }, t.prototype.render = function() {
  6091. var e = this.style, t = this.props.wideContent && a.COMPRESSED ? u.safeZone.width : u.content.width;
  6092. return this.props.scrollContent && a.COMPRESSED && this.props.verticalIndicator && this.props.wideContent && (t -= a.GUTTER),
  6093. o.createElement("surface", {
  6094. style: e.container
  6095. }, (this.props.debugGrid || e.debugGrid, null), this.renderHeader(), this.renderAboveContent(), o.createElement("surface", {
  6096. style: e.contentWrapper(this.props.tallContent)
  6097. }, this.props.scrollContent ? o.createElement(s.Scroller, {
  6098. ref: this.scroller,
  6099. style: e.scroller({
  6100. width: t
  6101. }),
  6102. controller: this.props.scrollListener,
  6103. softClip: e.softClipping,
  6104. focus: this.props.scrollToFocus,
  6105. scrollbar: !!this.props.verticalIndicator && "auto",
  6106. noHorizontalScroll: this.props.noHorizontalScroll
  6107. }, this.props.children) : o.createElement(l.Clipper, {
  6108. width: t,
  6109. height: u.content.height,
  6110. clipContent: this.props.clipContent,
  6111. clipPadding: e.clipPadding,
  6112. softClip: e.softClipping
  6113. }, this.props.children)), this.renderBelowContent());
  6114. }, t.defaultProps = {
  6115. tallContent: a.COMPRESSED,
  6116. scrollContent: d.SpartaGlobals.bundleIsPC,
  6117. scrollToFocus: d.SpartaGlobals.bundleIsConsole,
  6118. clipContent: !1,
  6119. shortHeader: !1,
  6120. debugGrid: !1,
  6121. wideContent: !1,
  6122. verticalIndicator: a.COMPRESSED
  6123. }, t.contextTypes = f.ThemeContext.contextTypes, t = r.__decorate([ i.observer ], t);
  6124. }(o.Component);
  6125. t.Template = m;
  6126. }, function(e, t, n) {
  6127. "use strict";
  6128. (function(e) {
  6129. Object.defineProperty(t, "__esModule", {
  6130. value: !0
  6131. });
  6132. var r = n(0), o = n(1), i = n(4), a = n(5), s = n(19), u = function(t) {
  6133. function n(e, n) {
  6134. var r = t.call(this, e, n) || this;
  6135. return r.getTheme = s.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta,
  6136. r.setSurfaceId = function(e) {
  6137. r.surfaceId = e, r.surfaceId && !1 === r.props.wait && r.sparta.twinkle.nativeApi.playSpriteAnimation(r.surfaceId, !0);
  6138. }, r.timeout = 0, !1 !== e.wait && (r.waitTimeout = setTimeout(function() {
  6139. r.surfaceId && r.sparta.twinkle.nativeApi.playSpriteAnimation(r.surfaceId, !0);
  6140. }, r.props.wait ? r.props.wait : 500)), r;
  6141. }
  6142. return r.__extends(n, t), n.prototype.componentDidMount = function() {
  6143. var t = this;
  6144. this.timeout = setTimeout(function() {
  6145. var n = "Spinner component " + t.surfaceId + " has been mounted for 15+ seconds, stuck in an endless loading state?";
  6146. e.warn(n);
  6147. }, 15e3);
  6148. }, n.prototype.componentWillUnmount = function() {
  6149. clearTimeout(this.timeout), clearTimeout(this.waitTimeout);
  6150. }, n.prototype.render = function() {
  6151. var e = this.props, t = e.style, n = e.large, r = e.small, i = this.getTheme().spinner, s = i.medium;
  6152. n ? s = i.large : r && (s = i.small);
  6153. var u = a.merge3(i.size(s), i.spriteAnimation, t || a.emptyStyle);
  6154. return o.createElement("surface", {
  6155. style: u,
  6156. onSurfaceId: this.setSurfaceId
  6157. });
  6158. }, n.contextTypes = s.ThemeContext.contextTypes, n = r.__decorate([ i.observer ], n);
  6159. }(o.Component);
  6160. t.Spinner = u;
  6161. var l = function(e) {
  6162. function t() {
  6163. var t = null !== e && e.apply(this, arguments) || this;
  6164. return t.getTheme = s.ThemeContext.getFromComponent(t), t;
  6165. }
  6166. return r.__extends(t, e), t.prototype.render = function() {
  6167. var e = this.getTheme().spinner;
  6168. return o.createElement("surface", {
  6169. style: e.center
  6170. }, o.createElement(u, r.__assign({}, this.props)));
  6171. }, t.contextTypes = s.ThemeContext.contextTypes, t = r.__decorate([ i.observer ], t);
  6172. }(o.Component);
  6173. t.CenteredSpinner = l;
  6174. }).call(this, n(15));
  6175. }, function(e, t, n) {
  6176. "use strict";
  6177. Object.defineProperty(t, "__esModule", {
  6178. value: !0
  6179. });
  6180. var r, o = n(53), i = function() {
  6181. function e(e, t, n, r, o, i, a, s, u, l, c, p) {
  6182. this.platform = e, this.buildConfig = t, this.scriptEngine = n, this.fbBranchName = r,
  6183. this.fbDatabaseId = o, this.features = i, this.functions = a, this.surfaceProps = s,
  6184. this.codeChangeList = u, this.dataChangeList = l, this.saveGameVersion = c, this.patchVersion = p;
  6185. }
  6186. return e.prototype.isFeatureSupported = function(e) {
  6187. var t = this.features[e];
  6188. return !!t && t.enabled;
  6189. }, e.prototype.isFunctionSupported = function(e) {
  6190. return !!this.functions[e];
  6191. }, e.prototype.isAlpha = function() {
  6192. return -1 !== this.fbDatabaseId.indexOf("Alpha") || -1 !== this.fbBranchName.indexOf("Alpha");
  6193. }, e.prototype.isBeta = function() {
  6194. return -1 !== this.fbDatabaseId.indexOf("Beta") || -1 !== this.fbBranchName.indexOf("Beta");
  6195. }, e.prototype.isCTE = function() {
  6196. return -1 !== this.fbDatabaseId.indexOf("CTE");
  6197. }, e.prototype.isEventBuild = function() {
  6198. return -1 !== this.fbDatabaseId.indexOf("Events");
  6199. }, e.prototype.isRetail = function() {
  6200. return "retail" === this.buildConfig;
  6201. }, e.prototype.hasTextureFadeIn = function() {
  6202. return this.surfaceProps.hasOwnProperty("textureFadeInTime");
  6203. }, e.prototype.hasMutableDefaultSurface = function() {
  6204. return this.hasTextureFadeIn();
  6205. }, e.prototype.isEndUserBuild = function() {
  6206. return "final" !== this.buildConfig && "performance" !== this.buildConfig && "release" !== this.buildConfig && "debug" !== this.buildConfig;
  6207. }, e.prototype.getSurfaceProps = function() {
  6208. var e = Object.keys(this.surfaceProps);
  6209. return 0 === e.length ? [ "enable", "zIndex", "zOffset", "blendMode", "layer", "layerOpacity", "layerBlur", "layerBlurStrength", "layerBlurTintColor", "layerBlurSamples", "layerBlurPass", "layerClip", "layerSoftClip", "layerGrabBackground", "layerClearColor", "layerGrayScale", "layerStereoPostProcess", "layerStereoPostProcessIntensity", "layerStereoPostProcessColorShift", "layerStereoPostProcessScanlines", "layerStereoPostProcessDistort", "localBounds", "focusable", "events", "opacity", "selfOpacity", "backgroundColor", "borderColor", "color", "grayScale", "text", "textEdgeOffset", "textSoftness", "textLetterSpacing", "textLineSpacing", "enableMouseEvents", "texture", "video", "textureMode", "textureAlign", "textureOffset", "textureOffsetX", "textureOffsetY", "textureScale", "textureRotateZ", "textureBorder", "texture1", "video1", "texture1Mode", "texture1Align", "texture1Offset", "texture1OffsetX", "texture1OffsetY", "texture1Scale", "texture1RotateZ", "texture1Border", "texture2", "video2", "texture2Mode", "texture2Align", "texture2Offset", "texture2OffsetX", "texture2OffsetY", "texture2Scale", "texture2RotateZ", "texture2Border", "texture3", "video3", "texture3Mode", "texture3Align", "texture3Offset", "texture3OffsetX", "texture3OffsetY", "texture3Scale", "texture3RotateZ", "texture3Border", "width", "height", "minWidth", "maxWidth", "minHeight", "maxHeight", "flex", "flexWrap", "flexDirection", "fontFamily", "fontSize", "justifyContent", "alignContent", "alignItems", "alignSelf", "textAlign", "wordWrap", "whiteSpace", "position", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "left", "top", "right", "bottom", "translate", "translateX", "translateY", "translateZ", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "scaleX", "scaleY", "borderSize", "shaderUrl", "shaderProgram", "shaderSurfaceUv", "spriteAnimation", "borderRadius" ] : ([ "texture", "texture1", "texture2", "texture3", "spriteAnimation" ].forEach(function(t) {
  6210. -1 === e.indexOf(t) && e.push(t);
  6211. }), e);
  6212. }, e.prototype.isRemoteEngine = function() {
  6213. return "remote" === this.scriptEngine;
  6214. }, e.prototype.hasBatchedRemoteCalls = function() {
  6215. return this.isRemoteEngine() && this.isFeatureSupported("BatchedRemoteCalls");
  6216. }, e.prototype.hasLoadAssetRequest = function() {
  6217. return this.isFeatureSupported("LoadAssetRequest");
  6218. }, e.prototype.hasConsoleCalls = function() {
  6219. return this.isFeatureSupported("ConsoleCalls");
  6220. }, e.prototype.hasDebugHttp = function() {
  6221. return this.isFeatureSupported("DebugHttp");
  6222. }, e.prototype.hasGetStyle = function() {
  6223. return this.isFunctionSupported("getStyle");
  6224. }, e.prototype.hasVerifyCodeSignature = function() {
  6225. return this.isFeatureSupported("VerifyCodeSignature");
  6226. }, e.prototype.hasUseTextureUrl = function() {
  6227. return this.isFeatureSupported("UseTextureUrl");
  6228. }, e.prototype.hasJsStartSync = function() {
  6229. return this.isFeatureSupported("JsStartSync");
  6230. }, e.prototype.hasJsCreateAtlas = function() {
  6231. return this.isFeatureSupported("JsCreateAtlas");
  6232. }, e.prototype.hasAudioBus = function() {
  6233. return this.isFeatureSupported("AudioBus");
  6234. }, e.prototype.hasVideoSaveCacheOnDisk = function() {
  6235. return this.isFeatureSupported("VideoSaveCacheOnDisk");
  6236. }, e.prototype.hasScreenshotFiles = function() {
  6237. return this.isFeatureSupported("ScreenshotFiles");
  6238. }, e.prototype.hasVideoRenderWorld = function() {
  6239. return this.isFeatureSupported("VideoRenderWorld");
  6240. }, e.prototype.hasSetGlyphSamplesSync = function() {
  6241. return this.isFeatureSupported("SetGlyphSamplesSync");
  6242. }, e.prototype.hasSetGlyphTextureSizeSync = function() {
  6243. return this.isFeatureSupported("SetGlyphTextureSizeSync");
  6244. }, e.prototype.hasSetFullscreenResampleSync = function() {
  6245. return this.isFeatureSupported("SetFullscreenResampleSync");
  6246. }, e.prototype.hasSurfaceDebugHighlight = function() {
  6247. return this.isFeatureSupported("SurfaceDebugHighlight");
  6248. }, e.prototype.hasOpenUrl = function() {
  6249. return this.isFeatureSupported("OpenUrl");
  6250. }, Object.defineProperty(e.prototype, "isPC", {
  6251. get: function() {
  6252. return "win64" === this.platform;
  6253. },
  6254. enumerable: !0,
  6255. configurable: !0
  6256. }), Object.defineProperty(e.prototype, "isXboxOne", {
  6257. get: function() {
  6258. return "xboxone" === this.platform;
  6259. },
  6260. enumerable: !0,
  6261. configurable: !0
  6262. }), Object.defineProperty(e.prototype, "isConsole", {
  6263. get: function() {
  6264. return !this.isPC;
  6265. },
  6266. enumerable: !0,
  6267. configurable: !0
  6268. }), Object.defineProperty(e.prototype, "bundlePlatform", {
  6269. get: function() {
  6270. return this.isPC ? "PC" : this.isPS4 ? "PS4" : this.isXboxOne ? "XBOXONE" : "UNKNOWN";
  6271. },
  6272. enumerable: !0,
  6273. configurable: !0
  6274. }), Object.defineProperty(e.prototype, "isPS4", {
  6275. get: function() {
  6276. return "ps4" === this.platform;
  6277. },
  6278. enumerable: !0,
  6279. configurable: !0
  6280. }), e.prototype.hasSDF = function() {
  6281. return this.hasConsoleCalls();
  6282. }, e;
  6283. }();
  6284. function a() {
  6285. if (!r) try {
  6286. var e = o.nativeApi.getBuildInfoSync(), t = e.features, n = e.platform, a = e.buildConfig, s = e.scriptEngine, u = e.branchName || "", l = e.databaseId || "", c = e.functions || {}, p = e.surfaceProps || {}, d = e.codeChangeList, f = e.dataChangeList, m = e.saveGameVersion, h = e.patchVersion;
  6287. r = new i(n, a, s, u, l, t, c, p, d, f, m, h);
  6288. } catch (e) {
  6289. r = new i("unknown", "unknown", "unknown", "unknown", "unknown", {}, {}, {}, void 0, void 0, void 0, void 0);
  6290. }
  6291. return r;
  6292. }
  6293. t.BuildInfo = i, t.getBuildInfo = a, t.platformTranslation = function s(e, t, n) {
  6294. return r || a(), r.isPS4 ? n : r.isXboxOne ? t : e;
  6295. };
  6296. }, function(e, t, n) {
  6297. "use strict";
  6298. Object.defineProperty(t, "__esModule", {
  6299. value: !0
  6300. }), function(e) {
  6301. e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e[e.Up = 2] = "Up", e[e.Down = 3] = "Down";
  6302. }(t.Direction || (t.Direction = {})), function(e) {
  6303. e[e.HORIZONTAL = 1] = "HORIZONTAL", e[e.VERTICAL = 2] = "VERTICAL", e[e.WRAP_AROUND = 4] = "WRAP_AROUND",
  6304. e[e.EDGE_STOP = 8] = "EDGE_STOP", e[e.REMEMBER_LAST_FOCUSED_MEMBER = 16] = "REMEMBER_LAST_FOCUSED_MEMBER",
  6305. e[e.PREFER_FIRST_MEMBER_OVER_TARGET = 32] = "PREFER_FIRST_MEMBER_OVER_TARGET";
  6306. }(t.GroupBehavior || (t.GroupBehavior = {})), function(e) {
  6307. e[e.STOP = 0] = "STOP", e[e.FALLTHROUGH = 1] = "FALLTHROUGH", e[e.HIT = 2] = "HIT";
  6308. }(t.NavigationResultType || (t.NavigationResultType = {})), function(e) {
  6309. e[e.Spatial = 0] = "Spatial", e[e.Mouse = 1] = "Mouse", e[e.Auto = 2] = "Auto";
  6310. }(t.FocusSource || (t.FocusSource = {}));
  6311. }, function(e, t, n) {
  6312. "use strict";
  6313. Object.defineProperty(t, "__esModule", {
  6314. value: !0
  6315. });
  6316. var r = n(1), o = n(916), i = n(6), a = n(9), s = 0;
  6317. var u = function() {
  6318. return function e(t) {
  6319. var n = this;
  6320. this.showCloseButton = !1, this.createdDate = new Date(), this.id = t.id || "popup" + s++,
  6321. this.group = t.group || "default", this.content = function u(e) {
  6322. return "string" == typeof e ? r.createElement(i.Text, {
  6323. value: e
  6324. }) : e;
  6325. }(t.content), this.createButtons = void 0 !== t.createButtons ? t.createButtons : a.SpartaGlobals.bundleIsPC,
  6326. this.fullScreen = void 0 !== t.fullScreen && t.fullScreen, this.onTop = void 0 !== t.onTop && t.onTop,
  6327. this.onClose = t.onClose, this.onOpen = t.onOpen, this.containContent = void 0 === t.containContent || t.containContent,
  6328. this.centerContent = void 0 === t.centerContent || t.centerContent, this.backgroundColor = t.backgroundColor,
  6329. this.requireOnline = t.requireOnline, this.disableBlur = t.disableBlur, this.buttonStyle = t.buttonStyle,
  6330. this.useInputStore = t.useInputStore || !1, this.leftAlignInputs = void 0 !== t.leftAlignInputs && t.leftAlignInputs,
  6331. this.priority = "number" == typeof t.priority ? t.priority : 0, this.stackable = void 0 !== t.stackable && t.stackable,
  6332. this.instantShow = void 0 !== t.instantShow && t.instantShow, this.closePopupOnAction = void 0 === t.closePopupOnAction || t.closePopupOnAction,
  6333. t.contentHandleInputRegistration && (this.contentHandleInputRegistration = t.contentHandleInputRegistration);
  6334. var l = t.inputs || [];
  6335. this.inputs = l.map(function(e) {
  6336. return new o.PopupInput(Object.assign({}, e, {
  6337. popup: n
  6338. }));
  6339. });
  6340. var c = t.content;
  6341. "string" != typeof c && "string" != typeof c.type && (this.showCloseButton = function p(e) {
  6342. return !!e.showCloseButton;
  6343. }(c.type));
  6344. };
  6345. }();
  6346. t.Popup = u;
  6347. }, function(e, t, n) {
  6348. "use strict";
  6349. (function(__) {
  6350. Object.defineProperty(t, "__esModule", {
  6351. value: !0
  6352. });
  6353. var e = n(0), r = n(1), o = n(14), i = n(25), a = n(11), s = n(10), u = n(4), l = n(6), c = n(73), p = n(5), d = n(21), f = n(29), m = n(70), h = n(37), g = n(19), y = function(t) {
  6354. function n(e, n) {
  6355. var r = t.call(this, e, n) || this;
  6356. return r.getTheme = g.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta,
  6357. r.getInput = function() {
  6358. var e = [];
  6359. return r.props.noFocus && r.props.highlight && e.push(new a.Input({
  6360. label: r.props.inputLabel ? r.props.inputLabel : __("ID_SPARTA_ACTION_SELECT"),
  6361. action: r.props.action,
  6362. key: s.Keys.Accept,
  6363. blockInputFor: r.props.blockInputFor
  6364. })), e;
  6365. }, r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, e.name), r.props.disableAutoFocus || (r.focusItem.autoFocusCandidate = !0),
  6366. m.onComponentUpdate(r, function(e) {
  6367. r.focusItem.setActive("fabddbc4:82:38", !e.disabled);
  6368. }), r;
  6369. }
  6370. return e.__extends(n, t), n.prototype.componentWillMount = function() {
  6371. var e = this.getTheme().button;
  6372. this.bgColorTween = o.Animation.tween("fabddbc4:88:45", e.backgroundColor, {
  6373. duration: e.tweenDuration
  6374. }), this.bgOverlayTween = o.Animation.tween("fabddbc4:91:47", e.backgroundOverlayColor, {
  6375. duration: e.tweenDuration
  6376. }), this.showOnHoverTween = o.Animation.tween("fabddbc4:94:49", 0, {
  6377. duration: e.tweenDuration
  6378. }), this.hideOnHoverTween = o.Animation.tween("fabddbc4:95:49", 1, {
  6379. duration: e.tweenDuration
  6380. });
  6381. }, n.prototype.componentDidMount = function() {
  6382. var e = this;
  6383. this.reaction(function() {
  6384. return [ e.focusItem.isFocused, e.focusItem.isHovered ];
  6385. }, function(t) {
  6386. var n = t[0], r = t[1];
  6387. if (!e.showOnHoverTween.isDestroyed() && !e.hideOnHoverTween.isDestroyed()) {
  6388. var o = !e.props.noFocus && !e.props.disabled;
  6389. e.toggleHighlight(n && o, r && o);
  6390. }
  6391. }, {
  6392. fireImmediately: !0
  6393. }), this.props.stealFocus && this.sparta.twinkle.focus.setAsFocused(this.focusItem, h.FocusSource.Auto, !0);
  6394. }, n.prototype.componentWillUnmount = function() {
  6395. this.bgColorTween.destroy(), this.bgOverlayTween.destroy(), this.showOnHoverTween.destroy(),
  6396. this.hideOnHoverTween.destroy();
  6397. }, n.prototype.componentWillReceiveProps = function(e) {
  6398. this.props.noFocus && void 0 !== e.highlight && this.props.highlight !== e.highlight && this.toggleHighlight(e.highlight);
  6399. }, n.prototype.toggleHighlight = function(e, t) {
  6400. var n = this.getTheme().button, r = t ? n.backgroundHoverColor : e ? n.backgroundFocusColor : n.backgroundColor, i = t ? n.backgroundOverlayHoverColor : e ? n.backgroundOverlayFocusColor : n.backgroundOverlayColor, a = e || t, s = a ? 1 : 0, u = a ? 0 : 1;
  6401. n.tweenDuration ? (this.bgColorTween.to(r), this.bgOverlayTween.to(i), this.showOnHoverTween.to(s),
  6402. this.hideOnHoverTween.to(u)) : this.sparta.twinkle.focus.controllerMode ? (this.bgColorTween.to(r, o.Animation.presets.focusables.enter.default),
  6403. this.bgOverlayTween.to(i, o.Animation.presets.focusables.enter.default), this.showOnHoverTween.to(s, o.Animation.presets.focusables.enter.default),
  6404. this.hideOnHoverTween.to(u, o.Animation.presets.focusables.enter.default)) : (this.bgColorTween.set(r),
  6405. this.bgOverlayTween.set(i), this.showOnHoverTween.set(s), this.hideOnHoverTween.set(u));
  6406. }, n.prototype.getContent = function() {
  6407. return this.props.content ? {
  6408. disabled: this.props.content.disabled,
  6409. normal: r.createElement("surface", {
  6410. style: this.hideOnHoverTween.getStyleClass("opacity")
  6411. }, this.props.content.normal),
  6412. hover: r.createElement("surface", {
  6413. style: this.showOnHoverTween.getStyleClass("opacity")
  6414. }, this.props.content.hover)
  6415. } : this.props.icon ? this.getIcons() : this.props.text ? this.getTexts() : {
  6416. disabled: void 0,
  6417. normal: void 0,
  6418. hover: void 0
  6419. };
  6420. }, n.prototype.getTexts = function() {
  6421. var e = this.getTheme().button, t = this.props, n = t.textSize, o = t.textType, i = t.textStyle, a = this.props.text && this.props.upperCase ? this.props.text.toUpperCase() : this.props.text || "";
  6422. return {
  6423. disabled: r.createElement(l.Text, {
  6424. value: a,
  6425. size: n,
  6426. key: "disabled",
  6427. type: o,
  6428. style: p.merge2(e.text(!1, !1), i)
  6429. }),
  6430. normal: r.createElement(l.Text, {
  6431. value: a,
  6432. size: n,
  6433. key: "normal",
  6434. type: o,
  6435. style: p.merge3(e.text(!1, !1), this.hideOnHoverTween.getStyleClass("opacity"), i)
  6436. }),
  6437. hover: r.createElement(l.Text, {
  6438. value: a,
  6439. size: n,
  6440. key: "hover",
  6441. type: e.boldHoverText ? f.TextType.EMPHASIS : o,
  6442. style: p.merge3(e.text(!0, this.focusItem.isHovered), this.showOnHoverTween.getStyleClass("opacity"), i)
  6443. })
  6444. };
  6445. }, n.prototype.getIcons = function() {
  6446. var e = this.getTheme().button, t = this.props, n = t.icon, o = t.size;
  6447. return n ? {
  6448. disabled: r.createElement("surface", {
  6449. style: e.icon({
  6450. texture: n.normal,
  6451. size: o,
  6452. disabled: !0
  6453. })
  6454. }),
  6455. normal: r.createElement("surface", {
  6456. style: p.merge2(e.icon({
  6457. texture: n.normal,
  6458. size: o
  6459. }), this.hideOnHoverTween.getStyleClass("opacity"))
  6460. }),
  6461. hover: r.createElement("surface", {
  6462. style: p.merge2(e.icon({
  6463. texture: n.hover,
  6464. size: o,
  6465. hover: !0
  6466. }), this.showOnHoverTween.getStyleClass("opacity"))
  6467. })
  6468. } : {
  6469. disabled: void 0,
  6470. normal: void 0,
  6471. hover: void 0
  6472. };
  6473. }, n.prototype.render = function() {
  6474. var t = this.getTheme(), n = t.components.HoverSFX, o = t.button, u = this.props, d = u.text, f = u.inputLabel, m = u.action, h = u.disabled, g = u.style, y = u.blockInputFor, S = u.upperCase, v = u.fitContent, b = u.noFocus, _ = this.getContent(), T = p.merge2(o.button(h), p.DynamicStyle.maybeLegacyStyle(g, "fabddbc4:294:60")), E = this.bgColorTween.getStyleClass("backgroundColor"), C = this.bgOverlayTween.getStyleClass("backgroundColor");
  6475. if (h) return r.createElement(i.InputRegistration, {
  6476. debugName: "fabddbc4:301:47",
  6477. getInput: this.getInput
  6478. }, r.createElement(n, {
  6479. focusItem: this.focusItem
  6480. }, r.createElement("surface", e.__assign({
  6481. style: T
  6482. }, this.focusItem.hooks), r.createElement("surface", {
  6483. style: p.merge2(o.background, E)
  6484. }), r.createElement("surface", {
  6485. style: o.border
  6486. }), r.createElement("surface", {
  6487. style: o.textContainer(v)
  6488. }, _.disabled))));
  6489. if (b) return r.createElement(i.InputRegistration, {
  6490. debugName: "fabddbc4:313:47",
  6491. getInput: this.getInput
  6492. }, r.createElement(n, {
  6493. focusItem: this.focusItem
  6494. }, r.createElement("surface", {
  6495. style: T
  6496. }, r.createElement("surface", {
  6497. style: p.merge2(o.background, E)
  6498. }), r.createElement("surface", {
  6499. style: o.border
  6500. }), r.createElement("surface", {
  6501. style: o.textContainer(v)
  6502. }, _.hover), r.createElement("surface", {
  6503. style: o.textContainer(v)
  6504. }, _.normal))));
  6505. var I = m ? new a.Input({
  6506. label: f || __("ID_SPARTA_ACTION_SELECT"),
  6507. action: m,
  6508. key: s.Keys.Accept,
  6509. blockInputFor: y
  6510. }) : void 0, A = v && r.createElement(l.Text, {
  6511. value: d && S ? d.toUpperCase() : d,
  6512. size: this.props.textSize,
  6513. style: o.boxFiller
  6514. });
  6515. return r.createElement(i.InputRegistration, {
  6516. debugName: "fabddbc4:343:47",
  6517. getInput: this.getInput
  6518. }, r.createElement(n, {
  6519. focusItem: this.focusItem
  6520. }, r.createElement(c.Pressable, {
  6521. input: I,
  6522. glow: o.borderGlow,
  6523. style: T,
  6524. focusItem: this.focusItem
  6525. }, r.createElement("surface", {
  6526. style: p.merge2(o.background, E)
  6527. }), r.createElement("surface", {
  6528. style: p.merge2(o.backgroundOverlay, C)
  6529. }), r.createElement("surface", {
  6530. style: o.border
  6531. }), A, r.createElement("surface", {
  6532. style: o.textContainer(v)
  6533. }, _.hover), r.createElement("surface", {
  6534. style: o.textContainer(v)
  6535. }, _.normal))));
  6536. }, n.contextTypes = g.ThemeContext.contextTypes, n.defaultProps = {
  6537. noFocus: !1,
  6538. blockInputFor: 500,
  6539. textSize: d.TextSize.S,
  6540. textType: f.TextType.NORMAL,
  6541. text: " ",
  6542. upperCase: !0
  6543. }, n = e.__decorate([ u.observer ], n);
  6544. }(r.Component);
  6545. t.Button = y;
  6546. }).call(this, n(3));
  6547. }, function(e, t, n) {
  6548. "use strict";
  6549. (function(__) {
  6550. Object.defineProperty(t, "__esModule", {
  6551. value: !0
  6552. });
  6553. var e = n(0), r = n(1), o = n(4), i = n(77), a = n(5), s = n(37), u = n(11), l = n(10), c = n(6), p = n(21), d = n(19), f = function(t) {
  6554. function n(e, n) {
  6555. var r = t.call(this, e, n) || this;
  6556. return r.getTheme = d.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta,
  6557. r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, e.name), r.focusItem.autoFocusCandidate = !e.disableAutoFocus,
  6558. r.input = new u.Input({
  6559. label: __("ID_SPARTA_ACTION_SELECT", !0),
  6560. action: function() {
  6561. return r.props.action && r.props.action();
  6562. },
  6563. key: l.Keys.Accept,
  6564. blockInputFor: e.blockInputFor
  6565. }), r.sparta.stores.inputStore.bindInputToFocusItem(function() {
  6566. return r.props.disabled ? void 0 : r.input;
  6567. }, r.focusItem), r;
  6568. }
  6569. return e.__extends(n, t), n.prototype.componentDidMount = function() {
  6570. this.props.stealFocus && this.sparta.twinkle.focus.setAsFocused(this.focusItem, s.FocusSource.Auto, !0);
  6571. }, n.prototype.render = function() {
  6572. var t = this.props, n = t.text, o = t.disabled, i = t.style, s = t.upperCase, u = t.textSize, l = t.children, p = t.textStyle, d = this.focusItem.isFocused, f = this.focusItem.isHovered, h = this.focusItem.isPressed, g = this.getTheme(), y = g.components.HoverSFX, S = g.button2;
  6573. return r.createElement(y, {
  6574. focusItem: this.focusItem
  6575. }, r.createElement("surface", e.__assign({
  6576. style: a.merge2(S.button(o, d, f, h), i)
  6577. }, this.focusItem.hooks), S.showGlow && r.createElement(m, {
  6578. focusItem: this.focusItem
  6579. }), S.showBorder && r.createElement("surface", {
  6580. style: S.border
  6581. }), S.showOverlay && r.createElement("surface", {
  6582. style: S.overlay(o, d, f, h)
  6583. }), l && l({
  6584. disabled: o,
  6585. isFocused: d,
  6586. isHovered: f,
  6587. isPressed: h
  6588. }), n ? r.createElement(c.Text, {
  6589. value: s ? n.toUpperCase() : n,
  6590. size: u,
  6591. type: S.textType,
  6592. style: a.merge2(S.text(o, d, f, h), p)
  6593. }) : r.createElement("surface", null)));
  6594. }, n.contextTypes = d.ThemeContext.contextTypes, n.defaultProps = {
  6595. blockInputFor: 500,
  6596. disabled: !1,
  6597. upperCase: !0,
  6598. text: " ",
  6599. textSize: p.TextSize.S
  6600. }, n = e.__decorate([ o.observer ], n);
  6601. }(r.Component);
  6602. t.Button = f;
  6603. var m = i.observer(function e(t) {
  6604. var n = t.focusItem, o = d.useTheme().button2;
  6605. return r.createElement("surface", {
  6606. style: o.glow(n.isFocusedOrHovered)
  6607. });
  6608. });
  6609. }).call(this, n(3));
  6610. }, function(e, t, n) {
  6611. "use strict";
  6612. Object.defineProperty(t, "__esModule", {
  6613. value: !0
  6614. });
  6615. var r, o = n(9);
  6616. !function(e) {
  6617. e.SSL = "SSL", e.XL = "XL", e.L = "L", e.SSM = "SSM", e.M = "M", e.S = "S", e.SW = "SW";
  6618. }(t.CardSize || (t.CardSize = {})), function(e) {
  6619. e.S = "S";
  6620. }(r || (r = {}));
  6621. t.CARD_WIDTH = o.SpartaGlobals.bundleIsPC ? {
  6622. cells: {
  6623. SSL: 9.6,
  6624. XL: 6,
  6625. L: 8,
  6626. SSM: 4.8,
  6627. M: 4,
  6628. S: 5,
  6629. SW: 5.75
  6630. },
  6631. parts: {
  6632. S: 8
  6633. }
  6634. } : {
  6635. cells: {
  6636. SSL: 12,
  6637. XL: 6,
  6638. L: 10,
  6639. SSM: 6,
  6640. M: 5,
  6641. S: 4,
  6642. SW: 5.75
  6643. },
  6644. parts: {
  6645. S: 8
  6646. }
  6647. }, t.CARD_HEIGHT = o.SpartaGlobals.bundleIsPC ? {
  6648. cells: {
  6649. SSL: 43.5,
  6650. XL: 55,
  6651. L: 35.5,
  6652. SSM: 43.5,
  6653. M: 35.5,
  6654. S: 22,
  6655. SW: 22
  6656. },
  6657. parts: {
  6658. S: 3.55
  6659. }
  6660. } : {
  6661. cells: {
  6662. SSL: 55,
  6663. XL: 55,
  6664. L: 45,
  6665. SSM: 55,
  6666. M: 45,
  6667. S: 34,
  6668. SW: 22
  6669. },
  6670. parts: {
  6671. S: 3.4
  6672. }
  6673. };
  6674. }, function(e, t) {
  6675. e.exports = function(e) {
  6676. try {
  6677. return !!e();
  6678. } catch (e) {
  6679. return !0;
  6680. }
  6681. };
  6682. }, function(e, t, n) {
  6683. "use strict";
  6684. Object.defineProperty(t, "__esModule", {
  6685. value: !0
  6686. });
  6687. var r = n(45);
  6688. t.stopGame = r.createTypedAction(), t.joinServer = r.createTypedAction(), t.joinLanServer = r.createTypedAction(),
  6689. t.joinFriend = r.createTypedAction(), t.joinMatchmakingResult = r.createTypedAction(),
  6690. t.handleJoinReady = r.createTypedAction(), t.refreshInstalledGames = r.createTypedAction(),
  6691. t.setInstalledExpansions = r.createTypedAction(), t.joinedServer = r.createTypedAction(),
  6692. t.leftServer = r.createTypedAction(), t.sendServerInvite = r.createTypedAction(),
  6693. t.activateEor = r.createTypedAction(), t.enterSpecificGameMode = r.createTypedAction();
  6694. }, function(e, t) {
  6695. e.exports = function(e) {
  6696. return "object" == typeof e ? null !== e : "function" == typeof e;
  6697. };
  6698. }, function(e, t, n) {
  6699. "use strict";
  6700. Object.defineProperty(t, "__esModule", {
  6701. value: !0
  6702. });
  6703. var r = n(365), o = n(70);
  6704. t.createTypedAction = function i() {
  6705. var e = new r.Publisher(), t = function() {
  6706. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  6707. e.publish.apply(e, t);
  6708. };
  6709. return t.listen = e.listen.bind(e), t.subscribeTo = function(t, n) {
  6710. o.addLifecycleHook(t, "componentWillUnmount", e.listen(n));
  6711. }, t;
  6712. };
  6713. }, function(e, t, n) {
  6714. "use strict";
  6715. Object.defineProperty(t, "__esModule", {
  6716. value: !0
  6717. });
  6718. var r = n(955);
  6719. function o(e) {
  6720. return r.requesterClient(e);
  6721. }
  6722. function i() {
  6723. r.instances.forEach(function(e) {
  6724. return e.reset();
  6725. });
  6726. }
  6727. t.createClient = o, t.resetClients = i, t.requester = {
  6728. createClient: o,
  6729. resetClients: i
  6730. };
  6731. }, function(e, t, n) {
  6732. "use strict";
  6733. Object.defineProperty(t, "__esModule", {
  6734. value: !0
  6735. });
  6736. var r = n(45), o = n(132), i = n(172);
  6737. t.getCampaignEpisodes = r.createTypedAction(), t.selectCurrentMedal = r.createTypedAction(),
  6738. t.getCurrentMedals = r.createTypedAction(), t.gameShowOptions = r.createTypedAction(),
  6739. t.gameShowCredits = r.createTypedAction(), t.joinGame = r.createTypedAction(), t.enterOperations = r.createTypedAction(),
  6740. t.enterCampaign = r.createTypedAction(), t.quitCampaign = r.createTypedAction(),
  6741. t.fetchEorData = r.createTypedAction(), t.updateUnrankedEorData = r.createTypedAction(),
  6742. t.endOfRoundCountdownCompleted = r.createTypedAction(), t.showLoadout = r.createTypedAction(),
  6743. t.viewBlueprint = r.createTypedAction(), t.claimBlueprint = r.createTypedAction(),
  6744. t.scrapItem = r.createTypedAction(), t.scrapDuplicateItems = r.createTypedAction(),
  6745. t.getBattlepackScrapExchange = r.createTypedAction(), t.buyBattlepackScrapExchange = r.createTypedAction(),
  6746. t.showCodex = r.createTypedAction(), t.showReportEmblemFromGame = r.createTypedAction(),
  6747. t.receivedPlayerList = i.frostbiteListenable("tunguska.getPlayerListResponse"),
  6748. t.getPlayerList = o.frostbiteAction("tunguska.getPlayerList");
  6749. }, function(e, t, n) {
  6750. "use strict";
  6751. (function(__) {
  6752. Object.defineProperty(t, "__esModule", {
  6753. value: !0
  6754. });
  6755. var e = n(1), r = n(6), o = n(25), i = n(11), a = n(10), s = n(40), u = n(5), l = n(29), c = n(19), p = n(8);
  6756. t.EmptyState = function d(t) {
  6757. var n = t.text, d = t.subText, f = t.centerVertically, m = t.textWidth, h = t.retryAction, g = t.style, y = t.children, S = p.SpartaContext.use(), v = c.useTheme().emptyState, b = e.useCallback(function() {
  6758. if (h && S.twinkle.focus.controllerMode) return new i.Input({
  6759. visible: !0,
  6760. label: __("ID_SPARTA_ACTION_RETRY"),
  6761. action: h,
  6762. key: a.Keys.Accept
  6763. });
  6764. }, [ h ]);
  6765. return e.createElement(o.InputRegistration, {
  6766. debugName: "05d480a2:49:39",
  6767. getInput: b
  6768. }, e.createElement("surface", {
  6769. style: u.merge2(v.container({
  6770. centerVertically: f
  6771. }), g)
  6772. }, n ? e.createElement(r.Text, {
  6773. value: n.toUpperCase(),
  6774. size: "M",
  6775. type: l.TextType.NORMAL,
  6776. style: v.text({
  6777. textWidth: m
  6778. })
  6779. }) : null, d ? e.createElement(r.Text, {
  6780. value: d,
  6781. size: "S",
  6782. style: v.subText({
  6783. textWidth: m
  6784. }),
  6785. type: v.subTextType
  6786. }) : null, h && S.twinkle.buildInfo.isPC && e.createElement(s.Button, {
  6787. name: "05d480a2:70:35",
  6788. text: __("ID_SPARTA_ACTION_RETRY"),
  6789. action: h,
  6790. style: v.btn
  6791. }), y));
  6792. };
  6793. }).call(this, n(3));
  6794. }, function(e, t, n) {
  6795. "use strict";
  6796. Object.defineProperty(t, "__esModule", {
  6797. value: !0
  6798. }), function(e) {
  6799. e[e.None = 0] = "None", e[e.FrontEnd = 1] = "FrontEnd", e[e.LoadingScreen = 2] = "LoadingScreen",
  6800. e[e.InGameMenu = 3] = "InGameMenu", e[e.EndOfRound = 4] = "EndOfRound";
  6801. }(t.NavigationStates || (t.NavigationStates = {}));
  6802. }, function(e, t, n) {
  6803. "use strict";
  6804. Object.defineProperty(t, "__esModule", {
  6805. value: !0
  6806. });
  6807. var r = n(45);
  6808. t.show = r.createTypedAction(), t.hide = r.createTypedAction(), t.route = r.createTypedAction(),
  6809. t.browseWhileWaiting = r.createTypedAction();
  6810. }, function(e, t) {
  6811. var n = e.exports = {
  6812. version: "2.5.3"
  6813. };
  6814. "number" == typeof __e && (__e = n);
  6815. }, function(e, t, n) {
  6816. var r = n(44);
  6817. e.exports = function(e) {
  6818. if (!r(e)) throw TypeError(e + " is not an object!");
  6819. return e;
  6820. };
  6821. }, function(e, t, n) {
  6822. "use strict";
  6823. Object.defineProperty(t, "__esModule", {
  6824. value: !0
  6825. });
  6826. var r, o = n(859), i = n(485), a = n(486), s = n(860), u = n(862), l = n(92);
  6827. if (l.globalScope.TwinkleNative) r = new i.InprocDelegate(); else if (l.globalScope.__TEST__) r = new a.MockDelegate(); else {
  6828. var c = new u.RemoteEngine();
  6829. r = new o.RemoteDelegate(c);
  6830. }
  6831. t.nativeApi = new s.NativeAPI(r), r instanceof o.RemoteDelegate ? r.remoteEngine.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi) : r instanceof i.InprocDelegate ? l.globalScope.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi) : r instanceof a.MockDelegate && (r.onScriptCalls = t.nativeApi.onScriptCalls.bind(t.nativeApi));
  6832. }, function(e, t, n) {
  6833. "use strict";
  6834. (function(__) {
  6835. Object.defineProperty(t, "__esModule", {
  6836. value: !0
  6837. });
  6838. var e = n(0), r = n(1), o = n(11), i = n(26), a = n(38), s = n(69), u = n(10), l = n(7), c = n(6), p = n(40), d = n(115), f = n(20), m = n(35), h = n(5), g = n(2), y = n(383), S = n(150), v = n(19), b = n(212), _ = function(t) {
  6839. function n() {
  6840. var e = null !== t && t.apply(this, arguments) || this;
  6841. return e.getTheme = v.ThemeContext.getFromComponent(e), e;
  6842. }
  6843. return e.__extends(n, t), n.prototype.render = function() {
  6844. var e = this.props, t = this.getTheme().popup, n = t.message, o = [];
  6845. return e.title && o.push(r.createElement(c.Text, {
  6846. key: "title",
  6847. value: e.title.toUpperCase(),
  6848. size: t.titleTextSize,
  6849. type: t.titleTextType,
  6850. style: t.header
  6851. })), e.image ? o.push(r.createElement("surface", {
  6852. key: "image",
  6853. style: h.merge2(h.DynamicStyle.create({
  6854. texture: e.image
  6855. }, "8ade4bb3:53:52"), t.image)
  6856. })) : e.customContent && o.push(e.customContent), e.switchTitleAndImage && (o = o.reverse()),
  6857. r.createElement("surface", {
  6858. style: t.container
  6859. }, o, r.createElement(c.Text, {
  6860. value: e.message,
  6861. style: n,
  6862. size: t.messageTextSize,
  6863. type: t.messageTextType
  6864. }));
  6865. }, n.contextTypes = v.ThemeContext.contextTypes, n;
  6866. }(r.Component);
  6867. function T(e, n, r, i) {
  6868. return void 0 === i && (i = 500), new o.Input({
  6869. label: r || t.buttonLabels.confirm(),
  6870. key: n,
  6871. blockInputFor: i,
  6872. action: e
  6873. });
  6874. }
  6875. function E(e, n, r, o, i) {
  6876. return void 0 === i && (i = 0), f.localeRearrange([ T(e, u.Keys.Accept, r || t.buttonLabels.confirm(), i), T(n, u.Keys.Decline, o || t.buttonLabels.deny()) ], !0);
  6877. }
  6878. t.MessageContent = _, t.buttonLabels = {
  6879. confirm: function() {
  6880. return __("ID_SPARTA_ACTION_OK", !0);
  6881. },
  6882. deny: function() {
  6883. return __("ID_SPARTA_ACTION_CANCEL", !0);
  6884. },
  6885. continue: function() {
  6886. return __("ID_SPARTA_ACTION_CONTINUE", !0);
  6887. }
  6888. }, t.createInput = T;
  6889. var C = function() {
  6890. return function e(t, n) {
  6891. this.action = t, this.label = n;
  6892. };
  6893. }();
  6894. function I(e, n, o, s, l, c) {
  6895. return void 0 === l && (l = !1), new Promise(function(p) {
  6896. i.display(new a.Popup({
  6897. content: r.createElement(_, {
  6898. message: e,
  6899. title: n,
  6900. image: o,
  6901. switchTitleAndImage: l
  6902. }),
  6903. inputs: [ T(p, u.Keys.Accept, t.buttonLabels.confirm()), T(s.action, s.key, s.label) ],
  6904. createButtons: !0,
  6905. onTop: !0,
  6906. buttonStyle: c
  6907. }));
  6908. });
  6909. }
  6910. function A(t, n, o, s, u, l, c) {
  6911. return void 0 === u && (u = null), void 0 === l && (l = {}), void 0 === c && (c = {}),
  6912. new Promise(function(p, d) {
  6913. var f = u ? {
  6914. id: u
  6915. } : {}, m = c.blockInputFor ? c.blockInputFor : 500;
  6916. i.display(new a.Popup(e.__assign({
  6917. content: r.createElement(_, {
  6918. message: t,
  6919. title: n
  6920. }),
  6921. inputs: E(function() {
  6922. return p(!0);
  6923. }, function() {
  6924. return p(!1);
  6925. }, o, s, m),
  6926. createButtons: !0,
  6927. onTop: !0
  6928. }, l, f)));
  6929. });
  6930. }
  6931. t.UserError = C, t.getMessageContent = function w(e, t) {
  6932. return r.createElement(_, {
  6933. message: e,
  6934. title: t
  6935. });
  6936. }, t.errorWithImageAndOption = function P(e, t, n, r, o, i, a) {
  6937. return void 0 === i && (i = !1), S.telemetryStoreLoader.get().trackUserFacingError(e),
  6938. I(t, n, r, o, i, a);
  6939. }, t.alertWithImageAndOption = I, t.alertWithInputs = function R(e, t, n, o) {
  6940. return new Promise(function(s) {
  6941. i.display(new a.Popup({
  6942. content: r.createElement(_, {
  6943. message: e,
  6944. title: t
  6945. }),
  6946. inputs: n.map(function(e) {
  6947. return T(function() {
  6948. s(e.key), e.action && e.action();
  6949. }, e.key, e.label, e.blockInputFor);
  6950. }),
  6951. createButtons: !0,
  6952. onTop: !0,
  6953. buttonStyle: h.merge2(y.PopupStyles.buttonFlexible, o)
  6954. }));
  6955. });
  6956. }, t.loading = function O(t, n, o) {
  6957. return new Promise(function(s) {
  6958. var u = t ? {
  6959. id: t
  6960. } : {};
  6961. i.display(new a.Popup(e.__assign({
  6962. content: r.createElement(_, {
  6963. message: o || "",
  6964. title: n,
  6965. customContent: r.createElement(m.Spinner, {
  6966. key: "spinner",
  6967. style: y.PopupStyles.spinner,
  6968. large: !0
  6969. }),
  6970. switchTitleAndImage: !0
  6971. }),
  6972. onClose: s,
  6973. onTop: !0
  6974. }, u)));
  6975. });
  6976. }, t.displayLoadingUntilDefined = function x(e, t, n) {
  6977. var o, u, l = s.autoId("when_loading"), c = !1, p = function() {
  6978. c || (c = !0, i.close(l));
  6979. };
  6980. return i.display(new a.Popup({
  6981. content: r.createElement(_, {
  6982. message: n.message || "",
  6983. title: n.title,
  6984. customContent: r.createElement(m.Spinner, {
  6985. key: "spinner",
  6986. style: y.PopupStyles.spinner,
  6987. large: !0
  6988. }),
  6989. switchTitleAndImage: !0
  6990. }),
  6991. onTop: !0,
  6992. id: l,
  6993. onOpen: function() {
  6994. u = setTimeout(function() {
  6995. p(), o(), n.onTimeout();
  6996. }, n.timeout), o = g.reaction(function() {
  6997. return e();
  6998. }, function(e) {
  6999. void 0 !== e && (p(), o(), clearTimeout(u), t(e));
  7000. }, {
  7001. name: l,
  7002. fireImmediately: !0
  7003. });
  7004. }
  7005. })), function() {
  7006. p(), o && o(), u && clearTimeout(u);
  7007. };
  7008. }, t.spartaConfirm = A, t.legacyConfirm = function k(t, n, r, o, i, a, s) {
  7009. return void 0 === i && (i = null), void 0 === a && (a = {}), void 0 === s && (s = {}),
  7010. e.__awaiter(this, void 0, Promise, function() {
  7011. return e.__generator(this, function(e) {
  7012. switch (e.label) {
  7013. case 0:
  7014. return [ 4, A(t, n, r, o, i, a, s) ];
  7015.  
  7016. case 1:
  7017. if (!e.sent()) throw new Error("confirm onDeny callback triggered");
  7018. return [ 2 ];
  7019. }
  7020. });
  7021. });
  7022. };
  7023. var M = h.StaticStyle.create({
  7024. marginBottom: l.GUTTER
  7025. }, "8ade4bb3:483:28"), L = function(n) {
  7026. function o(e, o) {
  7027. var a = n.call(this, e, o) || this;
  7028. return a.getTheme = v.ThemeContext.getFromComponent(a), a.sparta = a.getTheme().sparta,
  7029. a.inputField = r.createRef(), a.getInput = function() {
  7030. return [ T(a.onCancel, u.Keys.Decline, t.buttonLabels.deny()) ];
  7031. }, a.onOk = function() {
  7032. a.inputField.current && a.props.onOk(a.inputField.current.state.value), a.props.popupInfo && i.close(a.props.popupInfo.id);
  7033. }, a.onOkClicked = function() {
  7034. a.props.onOkValidate && a.inputField.current ? a.props.onOkValidate(a.inputField.current.state.value).then(function() {
  7035. return a.onOk();
  7036. }).catch(function(e) {
  7037. console.error(e), a.setState({
  7038. isValid: !1,
  7039. validationMessage: e
  7040. });
  7041. }) : a.onOk();
  7042. }, a.onCancel = function() {
  7043. a.props.popupInfo && i.close(a.props.popupInfo.id), a.props.onCancel();
  7044. }, a.onTypingInput = function(e) {
  7045. if (!a.sparta.twinkle.buildInfo.isConsole) {
  7046. var t = a.isTypingValid(e);
  7047. a.state.isValid !== t && a.setState({
  7048. isValid: t
  7049. });
  7050. }
  7051. }, a.state = {
  7052. isValid: !0,
  7053. validationMessage: null
  7054. }, a;
  7055. }
  7056. return e.__extends(o, n), o.prototype.isTypingValid = function(e) {
  7057. var t = this.props, n = t.minLength, r = t.maxLength, o = t.onTypingValidate, i = e.trim(), a = i.length >= n && i.length <= r;
  7058. return a && o ? o(i) : a;
  7059. }, o.prototype.renderButtons = function() {
  7060. var e = this.sparta.twinkle.buildInfo, n = this.getTheme().popup;
  7061. return r.createElement("surface", {
  7062. style: n.promptButtonContainer
  7063. }, r.createElement(p.Button, {
  7064. name: "8ade4bb3:444:27",
  7065. text: this.props.confirmLabel || t.buttonLabels.confirm(),
  7066. style: n.promptButton,
  7067. textSize: n.buttonTextSize,
  7068. action: this.onOkClicked,
  7069. disabled: !this.state.isValid && e.isPC
  7070. }), e.isPC ? r.createElement(p.Button, {
  7071. name: "8ade4bb3:453:31",
  7072. text: this.props.denyLabel || t.buttonLabels.deny(),
  7073. style: n.promptButton,
  7074. textSize: n.buttonTextSize,
  7075. action: this.onCancel
  7076. }) : null);
  7077. }, o.prototype.render = function() {
  7078. var e = this.getTheme().popup, t = this.renderButtons();
  7079. return r.createElement("surface", {
  7080. style: e.container
  7081. }, this.props.title ? r.createElement(c.Text, {
  7082. value: this.props.title.toUpperCase(),
  7083. size: e.titleTextSize,
  7084. type: e.titleTextType,
  7085. style: e.header
  7086. }) : null, r.createElement(c.Text, {
  7087. value: this.state.validationMessage || this.props.defaultMessage,
  7088. size: e.messageTextSize,
  7089. type: e.messageTextType,
  7090. style: M
  7091. }), r.createElement(d.InputField, {
  7092. size: e.inputFieldTextSize,
  7093. key: "field",
  7094. ref: this.inputField,
  7095. title: this.props.title || "",
  7096. description: this.props.title || "",
  7097. style: e.input,
  7098. type: this.props.inputType,
  7099. maxLength: this.props.maxLength,
  7100. isInvalid: !this.state.isValid,
  7101. onValueChanged: this.onTypingInput,
  7102. deactivateOnBlur: !1,
  7103. editKey: u.Keys.Accept
  7104. }), t);
  7105. }, o.contextTypes = v.ThemeContext.contextTypes, o.defaultProps = {
  7106. defaultMessage: ""
  7107. }, o;
  7108. }(b.PopupComponent);
  7109. t.prompt = function D(t, n, o, s, u) {
  7110. return void 0 === u && (u = {}), new Promise(function(l, c) {
  7111. i.display(new a.Popup(e.__assign({
  7112. id: "prompt",
  7113. onTop: !0,
  7114. content: r.createElement(L, {
  7115. title: t,
  7116. minLength: n,
  7117. maxLength: o,
  7118. inputType: s.inputType,
  7119. defaultMessage: s.message,
  7120. onTypingValidate: s.onTypingValidate,
  7121. onOkValidate: s.onOkValidate,
  7122. confirmLabel: s.confirmLabel,
  7123. denyLabel: s.denyLabel,
  7124. onOk: l,
  7125. onCancel: function() {
  7126. return c(new Error("Prompt onCancel callback triggered"));
  7127. }
  7128. })
  7129. }, u)));
  7130. });
  7131. };
  7132. }).call(this, n(3));
  7133. }, function(e, t, n) {
  7134. "use strict";
  7135. Object.defineProperty(t, "__esModule", {
  7136. value: !0
  7137. });
  7138. var r = n(45);
  7139. t.showLocalUserSelectionUI = r.createTypedAction(), t.getOnlinePrivileges = r.createTypedAction(),
  7140. t.showUserProfile = r.createTypedAction(), t.setUGCAccessLevel = r.createTypedAction(),
  7141. t.refreshCareer = r.createTypedAction(), t.onSignInChange = r.createTypedAction();
  7142. }, function(e, t) {
  7143. var n = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
  7144. "number" == typeof __g && (__g = n);
  7145. }, function(e, t, n) {
  7146. "use strict";
  7147. Object.defineProperty(t, "__esModule", {
  7148. value: !0
  7149. });
  7150. var r, o = n(0), i = n(2), a = n(378), s = n(49), u = n(54), l = n(38), c = n(26), p = n(10);
  7151. !function(e) {
  7152. e.Info = "Info";
  7153. }(r = t.ToastImageRef || (t.ToastImageRef = {}));
  7154. var d = function() {
  7155. function e(e, t, n, r) {
  7156. this.twinkle = e, this.spartaActivatedStore = t, this.inputStore = n, this.telemetry = r,
  7157. this.numOpenRIMEPopups = 0, this.onAlertDismissed = a.frostbiteListenable(this.twinkle.frostbite, "sparta.onPopupDismissed"),
  7158. this.showToastNotification = a.frostbiteAction(this.twinkle.frostbite, "sparta.showToastNotification"),
  7159. this.showInteractiveToastNotification = a.frostbiteActionWithResponse(this.twinkle.frostbite, "sparta.showToastNotification", "sparta.showToastNotificationResponse");
  7160. }
  7161. return e.prototype.showAlert = function(e) {
  7162. e.subtitle || delete e.subtitle, this.twinkle.frostbite.sendMessage("sparta.showPopup", e);
  7163. }, e.prototype.resetIfLoading = function(e) {
  7164. var t = this;
  7165. return i.when(function() {
  7166. return t.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || t.spartaActivatedStore.navigationState === s.NavigationStates.EndOfRound;
  7167. }, e);
  7168. }, e.standardAlert = function(e, t, n, r) {
  7169. void 0 === r && (r = {}), c.display(new l.Popup(o.__assign({
  7170. content: u.getMessageContent(e, t),
  7171. inputs: [ u.createInput(n, p.Keys.Accept, u.buttonLabels.confirm()) ],
  7172. createButtons: !0,
  7173. onTop: !0
  7174. }, r)));
  7175. }, e.standardAlertWithOption = function(e, t, n, r, o) {
  7176. var i = [];
  7177. n.useConfirmInput && i.push(u.createInput(r, p.Keys.Accept, u.buttonLabels.confirm()));
  7178. var a = n.customInput;
  7179. a && i.push(u.createInput(a.action, a.key, a.label)), c.display(new l.Popup({
  7180. content: u.getMessageContent(e, t),
  7181. inputs: i,
  7182. createButtons: !0,
  7183. onTop: !0,
  7184. id: o
  7185. }));
  7186. }, e.prototype.alert = function(t, n, r, o, i) {
  7187. void 0 === o && (o = {}), this.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || (this.spartaActivatedStore.navigationState,
  7188. s.NavigationStates.EndOfRound), e.standardAlert(t, n, r, o);
  7189. }, e.prototype.confirmWithError = function(e, t, n, r, o, i, a, s, u, l) {
  7190. this.telemetry.trackUserFacingError(e), this.confirm(t, n, r, o, i, a, s, u, l);
  7191. }, e.prototype.alertWithError = function(e, t, n, r, o) {
  7192. this.telemetry.trackUserFacingError(e), this.alert(t, n, r, void 0, o);
  7193. }, e.prototype.toasterWithError = function(e, t, n) {
  7194. this.telemetry.trackUserFacingError(e), this.showToastNotification({
  7195. title: n.toUpperCase(),
  7196. message: t,
  7197. imageRef: r.Info,
  7198. durationMs: 3e3
  7199. });
  7200. }, e.prototype.confirm = function(e, t, n, r, o, i, a, l, c) {
  7201. this.spartaActivatedStore.navigationState === s.NavigationStates.LoadingScreen || (this.spartaActivatedStore.navigationState,
  7202. s.NavigationStates.EndOfRound), u.legacyConfirm(e, t, n, r, l).then(function() {
  7203. o && o();
  7204. }).catch(function() {
  7205. i && i();
  7206. });
  7207. }, e.prototype.confirmPromise = function(e, t, n, r, o, i) {
  7208. var a = this;
  7209. return new Promise(function(s, u) {
  7210. a.confirm(e, t, n, r, function() {
  7211. return s(!0);
  7212. }, function() {
  7213. return s(!1);
  7214. }, function() {
  7215. return u(new Error("Popup was removed because the navigationState changed"));
  7216. }, o, i);
  7217. });
  7218. }, e.prototype.confirmWithErrorPromise = function(e, t, n, r, o, i, a) {
  7219. var s = this;
  7220. return new Promise(function(u, l) {
  7221. s.confirmWithError(e, t, n, r, o, function() {
  7222. return u(!0);
  7223. }, function() {
  7224. return u(!1);
  7225. }, function() {
  7226. return l(new Error("Popup was removed because the navigationState changed"));
  7227. }, i, a);
  7228. });
  7229. }, o.__decorate([ i.observable ], e.prototype, "numOpenRIMEPopups", void 0), o.__decorate([ i.action ], e.prototype, "alert", null),
  7230. o.__decorate([ i.action ], e.prototype, "confirm", null), e;
  7231. }();
  7232. t.PopupManager = d;
  7233. }, function(e, t, n) {
  7234. "use strict";
  7235. Object.defineProperty(t, "__esModule", {
  7236. value: !0
  7237. });
  7238. var r = n(45);
  7239. t.setFilterOptions = r.createTypedAction(), t.fetchServerCounts = r.createTypedAction(),
  7240. t.trackFilterJoin = r.createTypedAction(), t.toggleBookmark = r.createTypedAction(),
  7241. t.serverBookmarkingFailed = r.createTypedAction(), t.refreshBookmarks = r.createTypedAction(),
  7242. t.refreshHistory = r.createTypedAction(), t.refreshRentedServers = r.createTypedAction(),
  7243. t.requestPings = r.createTypedAction();
  7244. }, function(e, t, n) {
  7245. "use strict";
  7246. Object.defineProperty(t, "__esModule", {
  7247. value: !0
  7248. });
  7249. var r = n(0), o = n(1), i = n(4), a = n(148), s = n(70), u = n(919), l = function(e) {
  7250. function t(t, n) {
  7251. var r = e.call(this, t, n) || this;
  7252. return r.twinkle = a.TwinkleContext.getFromComponent(r), r.focusItem = r.twinkle.focus.create(r, r.props.id),
  7253. r.focusItem.autoFocusCandidate = !!t.autoFocusCandidate, t.group && t.group.addMember(r.focusItem, t.groupIndex),
  7254. r.reaction(function() {
  7255. return r.focusItem.bounds;
  7256. }, function(e) {
  7257. "function" == typeof r.props.onBounds && e && r.props.onBounds(e);
  7258. }, {
  7259. fireImmediately: !0
  7260. }), s.onComponentDidUpdate(r, function(e) {
  7261. void 0 !== e.focusOnHover && (r.focusItem.focusOnHover = e.focusOnHover), r.focusItem.setActive("Focusable.tsx", "boolean" != typeof e.isActive || e.isActive);
  7262. }), r;
  7263. }
  7264. return r.__extends(t, e), t.prototype.componentDidMount = function() {
  7265. var e = this;
  7266. this.focusItem.onFocus(function() {
  7267. "function" == typeof e.props.onFocus && e.props.onFocus(e.props.groupIndex);
  7268. }), this.focusItem.onBlur(function() {
  7269. "function" == typeof e.props.onBlur && e.props.onBlur(e.props.groupIndex);
  7270. }), this.focusItem.onHover(function() {
  7271. "function" == typeof e.props.onHover && e.props.onHover(e.props.groupIndex);
  7272. }), this.focusItem.onLeave(function() {
  7273. "function" == typeof e.props.onLeave && e.props.onLeave(e.props.groupIndex);
  7274. });
  7275. }, t.prototype.render = function() {
  7276. return this.props.children(this.focusItem) || null;
  7277. }, t.contextTypes = a.TwinkleContext.contextTypes, t = r.__decorate([ i.observer ], t);
  7278. }(o.Component);
  7279. t.Focusable = l, t.useFocusItem = function c(e) {
  7280. var t = a.useTwinkle().focus, n = o.useState(function() {
  7281. return t.createFocusItem(e);
  7282. })[0];
  7283. return o.useEffect(function() {
  7284. return function() {
  7285. return n.destroy();
  7286. };
  7287. }, [ n ]), n;
  7288. }, t.useFocusGroup = function p(e) {
  7289. var t = a.useTwinkle().focus, n = o.useState(function() {
  7290. return t.createStaticGroup(e);
  7291. })[0];
  7292. return o.useEffect(function() {
  7293. return function() {
  7294. return n.destroy();
  7295. };
  7296. }, [ n ]), n;
  7297. };
  7298. var d = function(e) {
  7299. return e.destroy();
  7300. };
  7301. t.useMaybeFocusItem = function f(e, t) {
  7302. var n = a.useTwinkle().focus, r = o.useCallback(function() {
  7303. return n.createFocusItem(e);
  7304. }, [ e ]);
  7305. return u.useValueOrCreateDefault(r, d, t);
  7306. };
  7307. }, function(e, t, n) {
  7308. "use strict";
  7309. Object.defineProperty(t, "__esModule", {
  7310. value: !0
  7311. });
  7312. var r = n(0), o = n(12), i = o.Template("LayoutStyles"), a = function() {
  7313. function e() {}
  7314. return e.viewportSafety = o.value(function() {
  7315. return -2001;
  7316. }, "540caa5d:21:28"), e.background = o.value(function() {
  7317. return -1e3;
  7318. }, "540caa5d:22:24"), e.backgroundEdges = o.value(function() {
  7319. return 1001;
  7320. }, "540caa5d:23:29"), e.content = o.value(function() {
  7321. return 1e3;
  7322. }, "540caa5d:24:21"), e.logo = o.value(function() {
  7323. return 1200;
  7324. }, "540caa5d:25:18"), e.header = o.value(function() {
  7325. return 1200;
  7326. }, "540caa5d:26:20"), e.viewContainer = o.value(function() {
  7327. return 1e4;
  7328. }, "540caa5d:27:27"), e.gameView = o.value(function() {
  7329. return 15e3;
  7330. }, "540caa5d:28:22"), e.gameJoinNotice = o.value(function() {
  7331. return 19999;
  7332. }, "540caa5d:29:28"), e.tint = o.value(function() {
  7333. return 2e4;
  7334. }, "540caa5d:30:18"), e.comCenter = o.value(function() {
  7335. return 40001;
  7336. }, "540caa5d:31:23"), e.mainMenu = o.value(function() {
  7337. return 5e4;
  7338. }, "540caa5d:32:22"), e.socialOverlay = o.value(function() {
  7339. return 5e4;
  7340. }, "540caa5d:33:27"), e.startScreen = o.value(function() {
  7341. return 9e4;
  7342. }, "540caa5d:34:25"), e.contextMenu = o.value(function() {
  7343. return 9e4;
  7344. }, "540caa5d:35:25"), e.popups = o.value(function() {
  7345. return 1e5;
  7346. }, "540caa5d:36:20"), e.popupCloseButton = o.value(function() {
  7347. return 100001;
  7348. }, "540caa5d:37:30"), e.inputs = o.value(function() {
  7349. return 2e5;
  7350. }, "540caa5d:38:20"), e.watermark = o.value(function() {
  7351. return 2e5;
  7352. }, "540caa5d:39:23"), e.blackFade = o.value(function() {
  7353. return 1e6;
  7354. }, "540caa5d:40:23"), e.outroTakeover = o.value(function() {
  7355. return 1000001;
  7356. }, "540caa5d:41:27"), e.socialWidget = o.value(function() {
  7357. return 1000002;
  7358. }, "540caa5d:42:26"), e = r.__decorate([ i.style ], e);
  7359. }();
  7360. t.OffsetStyles = a;
  7361. var s = function() {
  7362. function e() {}
  7363. return e.topContent = o.wrap(function() {
  7364. return o.style({
  7365. marginTop: o.Constants.isPC ? o.Grid.getHeight(36) : o.Grid.getHeight(12)
  7366. }, "540caa5d:47:35");
  7367. }), e.heading = o.wrap(function() {
  7368. return o.style({
  7369. height: o.Constants.LINE_HEIGHTS.L,
  7370. width: o.Grid.getWidth(24),
  7371. alignSelf: "center"
  7372. }, "540caa5d:53:32");
  7373. }), e.headingInner = o.wrap(function() {
  7374. return o.style({
  7375. flexDirection: "row",
  7376. alignItems: "center",
  7377. alignSelf: "center"
  7378. }, "540caa5d:61:37");
  7379. }), e.message = o.wrap(function() {
  7380. return o.style({
  7381. textLetterSpacing: 4,
  7382. alignSelf: "center"
  7383. }, "540caa5d:69:32");
  7384. }), e = r.__decorate([ i.style ], e);
  7385. }();
  7386. t.OverviewHeadingStyles = s;
  7387. var u = function() {
  7388. function e() {}
  7389. var t;
  7390. return t = e, e.eaLogo = o.value(function() {
  7391. return o.bbOfflineUrl("/sparta/jsclient/builds/assets/logo-ea-300d3ce5.png");
  7392. }, "540caa5d:79:20"), e.diceLogo = o.value(function() {
  7393. return o.bbOfflineUrl("/sparta/jsclient/builds/assets/logo-dice-c4e44205.png");
  7394. }, "540caa5d:80:22"), e.progressStyle = o.wrap(function() {
  7395. return o.style({
  7396. position: "absolute",
  7397. width: o.LayoutBounds.screen.width,
  7398. left: o.LayoutBounds.screen.left,
  7399. top: o.LayoutBounds.startScreenLogo.bottom + o.Grid.getHeight(4, !1),
  7400. flexDirection: "column",
  7401. alignItems: "center",
  7402. justifyContent: "flex-start",
  7403. zOffset: 20
  7404. }, "540caa5d:82:38");
  7405. }), e.backdrop = o.wrap(function() {
  7406. return o.style({
  7407. padding: [ o.Grid.spacer(2), o.Grid.spacer(3), o.Grid.spacer(2), o.Grid.spacer(3) ],
  7408. backgroundColor: "#00000099",
  7409. color: "#ffffff",
  7410. height: o.Constants.isPC ? o.Grid.getHeight(6) : o.Grid.getHeight(5),
  7411. alignItems: "center",
  7412. justifyContent: "center"
  7413. }, "540caa5d:95:33");
  7414. }), e.betaDisclaimer = o.wrap(function() {
  7415. return o.style({
  7416. width: o.LayoutBounds.startScreenLogo.width,
  7417. color: "#ffffff",
  7418. textAlign: "center",
  7419. textAlignForRTL: "center"
  7420. }, "540caa5d:106:39");
  7421. }), e.betaDisclaimerContainer = o.wrap(function() {
  7422. return o.style({
  7423. marginTop: o.Grid.spacer(8),
  7424. padding: o.Grid.spacer(),
  7425. backgroundColor: "#00000050"
  7426. }, "540caa5d:115:48");
  7427. }), e.bottomBarContainer = o.wrap(function() {
  7428. return o.style({
  7429. zOffset: 3,
  7430. position: "absolute",
  7431. bottom: o.LayoutBounds.dangerZoneSize.height,
  7432. left: o.LayoutBounds.dangerZoneSize.width,
  7433. right: o.LayoutBounds.dangerZoneSize.width,
  7434. flexDirection: "row",
  7435. alignItems: "center"
  7436. }, "540caa5d:123:43");
  7437. }), e.ea = i.wrap(function() {
  7438. return o.style({
  7439. texture: t.eaLogo,
  7440. textureMode: "contain",
  7441. backgroundColor: "#ffffff",
  7442. marginRight: 20,
  7443. height: 50,
  7444. width: 50
  7445. }, "540caa5d:135:16");
  7446. }), e.dice = i.wrap(function() {
  7447. return o.style({
  7448. texture: t.diceLogo,
  7449. textureAlignX: 0,
  7450. textureMode: "contain",
  7451. backgroundColor: "#ffffff",
  7452. flex: 1,
  7453. height: 18,
  7454. width: 74
  7455. }, "540caa5d:144:18");
  7456. }), e.copyright = i.wrap(function() {
  7457. return o.style({
  7458. color: "#ffffff"
  7459. }, "540caa5d:154:23");
  7460. }), e = t = r.__decorate([ i.style ], e);
  7461. }();
  7462. t.StartScreenStyles = u;
  7463. var l = function() {
  7464. function e() {}
  7465. return e.container = o.multistyle(function(e) {
  7466. return o.style({
  7467. zOffset: a.content,
  7468. position: "absolute",
  7469. left: o.LayoutBounds.screen.left,
  7470. top: o.LayoutBounds.screen.top,
  7471. width: o.LayoutBounds.screen.width,
  7472. height: o.LayoutBounds.screen.height,
  7473. opacity: o.tweenSwitch(0, 1, e),
  7474. enableMouseEvents: e
  7475. }, "540caa5d:161:58");
  7476. }), e = r.__decorate([ i.style ], e);
  7477. }();
  7478. t.ContentStyles = l;
  7479. var c = function() {
  7480. function e() {}
  7481. var t;
  7482. return t = e, e.itemHeight = o.value(function() {
  7483. return o.Grid.getHeight(8);
  7484. }, "540caa5d:177:24"), e.itemContentHeight = o.value(function() {
  7485. return t.itemHeight - o.Grid.spacer(2);
  7486. }, "540caa5d:178:31"), e.itemLabelBlurred = i.wrap(function() {
  7487. return o.style({
  7488. color: "#5f6165"
  7489. }, "540caa5d:180:30");
  7490. }), e.itemDisabled = i.wrap(function() {
  7491. return o.style({
  7492. opacity: .3
  7493. }, "540caa5d:184:26");
  7494. }), e.disabledItem = i.wrap(function() {
  7495. return o.style({
  7496. layer: !0,
  7497. layerGrabBackground: !1,
  7498. layerGrayScale: 1
  7499. }, "540caa5d:188:26");
  7500. }), e.itemLabel = o.multistyle(function(e) {
  7501. return o.style({
  7502. color: e ? "#000000" : "#5f6165"
  7503. }, "540caa5d:194:58");
  7504. }), e.itemLabelFiller = i.wrap(function() {
  7505. return o.style({
  7506. opacity: 0,
  7507. height: 1,
  7508. marginBottom: -1
  7509. }, "540caa5d:200:29");
  7510. }), e.item = i.wrap(function() {
  7511. return o.style({
  7512. zOffset: 10,
  7513. height: t.itemHeight,
  7514. flexDirection: "row",
  7515. padding: [ o.Grid.spacer(), 0, o.Grid.spacer(), 0 ]
  7516. }, "540caa5d:206:18");
  7517. }), e.menu = i.wrap(function() {
  7518. return o.style({
  7519. zOffset: a.mainMenu,
  7520. position: "absolute",
  7521. right: o.LayoutBounds.screen.width,
  7522. backgroundColor: "#ffffff",
  7523. justifyContent: "center",
  7524. alignItems: "flex-end"
  7525. }, "540caa5d:213:18");
  7526. }), e.menuTransition = o.value(function() {
  7527. return o.Constants.isPC ? {
  7528. duration: 22 / 60 * 1e3 / 1.5
  7529. } : {};
  7530. }, "540caa5d:223:28"), e.menuWrapper = o.multistyle(function(e) {
  7531. return o.style({
  7532. enableMouseEvents: e,
  7533. opacity: o.Constants.isPC ? o.tweenSwitch(0, 1, e, t.menuTransition, t.menuTransition) : 1,
  7534. translateX: o.tweenSwitch(0, o.LayoutBounds.mainMenu.width, e, t.menuTransition, t.menuTransition)
  7535. }, "540caa5d:225:60");
  7536. }), e.wrapper = o.multistyle(function(e) {
  7537. return o.style({
  7538. paddingTop: o.LayoutBounds.dangerZoneSize.height,
  7539. paddingBottom: o.LayoutBounds.dangerZoneSize.height,
  7540. height: o.LayoutBounds.mainMenu.height,
  7541. width: (e ? o.Grid.spacer(3) : 0) + o.LayoutBounds.mainMenu.width - o.LayoutBounds.dangerZoneSize.width
  7542. }, "540caa5d:243:51");
  7543. }), e.itemsPC = i.wrap(function() {
  7544. return o.style({
  7545. height: 10.5 * t.itemHeight
  7546. }, "540caa5d:251:21");
  7547. }), e.itemsConsole = i.wrap(function() {
  7548. return o.style({
  7549. height: 9.5 * t.itemHeight
  7550. }, "540caa5d:254:26");
  7551. }), e.logo = i.wrap(function() {
  7552. return o.style({
  7553. width: 261,
  7554. height: 50,
  7555. marginBottom: o.Grid.getHeight(5.5),
  7556. textureMode: "contain",
  7557. textureAlign: [ 0, .5 ],
  7558. texture: o.bbOfflineUrl("/sparta/assets/layout/logos/logo-gray-on-white-e3651836.png")
  7559. }, "540caa5d:258:18");
  7560. }), e.activeIndicator = i.wrap(function() {
  7561. return o.style({
  7562. position: "absolute",
  7563. right: 0,
  7564. zOffset: 100,
  7565. top: o.Grid.spacer(),
  7566. width: o.Grid.spacer(),
  7567. height: t.itemContentHeight,
  7568. backgroundColor: [ 255, 153, 0, 255 ]
  7569. }, "540caa5d:267:29");
  7570. }), e.betaIcon = i.wrap(function() {
  7571. return o.style({
  7572. texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/beta_small-05316fb7.png"),
  7573. width: 60,
  7574. height: 24,
  7575. marginLeft: 3 * o.Grid.GUTTER
  7576. }, "540caa5d:277:22");
  7577. }), e.labelIcon = i.wrap(function() {
  7578. return o.style({
  7579. flex: 1,
  7580. marginRight: o.Grid.spacer(4)
  7581. }, "540caa5d:284:23");
  7582. }), e = t = r.__decorate([ i.style ], e);
  7583. }();
  7584. t.MainMenuStyles = c;
  7585. var p = function() {
  7586. function e() {}
  7587. return e.base = i.wrap(function() {
  7588. return o.style({
  7589. zOffset: a.tint,
  7590. position: "absolute"
  7591. }, "540caa5d:292:18");
  7592. }), e.tint = o.multistyle2(function(e, t) {
  7593. return o.style({
  7594. layer: !0,
  7595. layerBlur: 1,
  7596. layerBlurStrength: 5,
  7597. layerGrabBackground: !0,
  7598. backgroundColor: o.tweenSwitch("#000000cc", "#00000088", t),
  7599. layerOpacity: o.tweenSwitch(0, 1, e),
  7600. enableMouseEvents: e
  7601. }, "540caa5d:297:72");
  7602. }), e = r.__decorate([ i.style ], e);
  7603. }();
  7604. t.TintStyles = p;
  7605. var d = function() {
  7606. function e() {}
  7607. var t;
  7608. return t = e, e.uppercaseText = o.value(function() {
  7609. return !0;
  7610. }, "540caa5d:312:27"), e.textType = o.value(function() {
  7611. return o.Constants.TextType.EMPHASIS;
  7612. }, "540caa5d:313:22"), e.supportLineBreak = o.value(function() {
  7613. return !1;
  7614. }, "540caa5d:314:30"), e.displayIcon = o.value(function() {
  7615. return {
  7616. 0: !0,
  7617. 1: !0,
  7618. 2: !0,
  7619. 3: !0,
  7620. 4: !0,
  7621. 5: !1
  7622. };
  7623. }, "540caa5d:316:25"), e.displayTimeLeft = o.value(function() {
  7624. return {
  7625. 0: !1,
  7626. 1: !1,
  7627. 2: !1,
  7628. 3: !1,
  7629. 4: !1,
  7630. 5: !1
  7631. };
  7632. }, "540caa5d:325:29"), e.color = o.value(function() {
  7633. return {
  7634. 0: "#ffad32",
  7635. 1: "#a6f59c",
  7636. 2: "#89f0ff",
  7637. 3: "#ffad32",
  7638. 4: "#f69a9a",
  7639. 5: void 0
  7640. };
  7641. }, "540caa5d:334:19"), e.container = i.wrap(function() {
  7642. return o.style({
  7643. flexDirection: "row",
  7644. alignItems: "center",
  7645. alignSelf: "center"
  7646. }, "540caa5d:343:23");
  7647. }), e.iconContainer = o.multistyle(function(e) {
  7648. return o.style({
  7649. zOffset: 1,
  7650. width: 24,
  7651. height: 24,
  7652. marginRight: o.Grid.spacer(2)
  7653. }, "540caa5d:349:81");
  7654. }), e.icon = o.multistyle(function(e) {
  7655. return o.style({
  7656. zOffset: 2,
  7657. texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/notice-white-fc04f4ac.png"),
  7658. width: 24,
  7659. height: 24,
  7660. color: t.color[e]
  7661. }, "540caa5d:358:72");
  7662. }), e.text = o.multistyle(function(e) {
  7663. return o.style({
  7664. zOffset: 2,
  7665. color: t.color[e],
  7666. textAlignForRTL: "left"
  7667. }, "540caa5d:368:72");
  7668. }), e.countdown = i.wrap(function() {
  7669. return o.style({
  7670. zOffset: 2,
  7671. opacity: .8,
  7672. textAlignForRTL: "left"
  7673. }, "540caa5d:376:23");
  7674. }), e = t = r.__decorate([ i.style ], e);
  7675. }();
  7676. t.NoticeStyles = d;
  7677. var f = function() {
  7678. function e() {}
  7679. return e.mainMenuWidth = o.value(function() {
  7680. return o.LayoutBounds.mainMenu.width;
  7681. }, "540caa5d:385:27"), e.transitionOptions = o.value(function() {
  7682. return o.Constants.isPC ? o.Constants.tweenOptions.presets.transition : o.Constants.tweenOptions.default;
  7683. }, "540caa5d:386:31"), e.viewport = i.wrap(function() {
  7684. return o.style({
  7685. zOffset: a.viewContainer,
  7686. position: "absolute",
  7687. left: o.LayoutBounds.screen.left,
  7688. top: o.LayoutBounds.screen.top,
  7689. width: o.LayoutBounds.screen.width,
  7690. height: o.LayoutBounds.screen.height
  7691. }, "540caa5d:390:22");
  7692. }), e = r.__decorate([ i.style ], e);
  7693. }();
  7694. t.ViewContainerStyles = f;
  7695. var m = function() {
  7696. function e() {}
  7697. return e.black = o.multistyle(function(e) {
  7698. return o.style({
  7699. position: "absolute",
  7700. top: 0,
  7701. right: 0,
  7702. bottom: 0,
  7703. left: 0,
  7704. zOffset: a.blackFade,
  7705. backgroundColor: "#000000",
  7706. enableMouseEvents: e
  7707. }, "540caa5d:402:62");
  7708. }), e = r.__decorate([ i.style ], e);
  7709. }();
  7710. t.BlackFadeStyles = m;
  7711. var h = function() {
  7712. function e() {}
  7713. return e.rankBadge = i.wrap(function() {
  7714. return o.style({
  7715. position: "absolute",
  7716. top: o.Constants.isPC ? -33 : -27
  7717. }, "540caa5d:418:23");
  7718. }), e = r.__decorate([ i.style ], e);
  7719. }();
  7720. t.LogoStyles = h;
  7721. }, function(e, t, n) {
  7722. var r = n(343)("wks"), o = n(180), i = n(56).Symbol, a = "function" == typeof i;
  7723. (e.exports = function(e) {
  7724. return r[e] || (r[e] = a && i[e] || (a ? i : o)("Symbol." + e));
  7725. }).store = r;
  7726. }, function(e, t, n) {
  7727. "use strict";
  7728. Object.defineProperty(t, "__esModule", {
  7729. value: !0
  7730. });
  7731. var r = n(120), o = n(82), i = n(53), a = n(369), s = n(129).__Logger.get("Frostbite"), u = {}, l = new Set([ "sparta.audioMessage" ]);
  7732. t.frostbite = {
  7733. sendMessage: function(e, n) {
  7734. (void 0 === n && (n = null), o.options.enableLogging) && (l.has(e) ? s.debug("Frostbite event (send):", e, n) : s.info("Frostbite event (send):", e, n),
  7735. t.frostbite.getMessageListener("frostbiteMessageSent").trigger(e, n));
  7736. i.nativeApi.sendMessage(e, n);
  7737. },
  7738. getMessageListener: function(e) {
  7739. return u[e] || (u[e] = new r.TwinkleEvent());
  7740. },
  7741. registerMessageListener: function(e, t) {
  7742. return this.getMessageListener(e).listen(function() {
  7743. for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
  7744. t && t.apply(t, e);
  7745. });
  7746. }
  7747. }, i.nativeApi.onFrostbiteMessage = function(e, n) {
  7748. var r = a.start(), i = u[e];
  7749. o.options.enableLogging && (i && i.callbacks.length ? l.has(e) ? s.debug("Frostbite event (receive):", e, n) : s.info("Frostbite event (receive):", e, n) : o.options.enableDevWarnings && s.warn("Unhandled Frostbite Event received! Is this a legacy message or did you forget to add a listener? :", e, n),
  7750. t.frostbite.getMessageListener("frostbiteMessageReceived").trigger(e, n));
  7751. if (i) try {
  7752. i.trigger(e, n);
  7753. } catch (t) {
  7754. throw t.message = "Failed to handle frostbite message " + e + ":" + t.message, t;
  7755. }
  7756. a.end("msg-" + e, r);
  7757. };
  7758. }, function(e, t, n) {
  7759. "use strict";
  7760. (function(__) {
  7761. Object.defineProperty(t, "__esModule", {
  7762. value: !0
  7763. });
  7764. var e = n(146);
  7765. function r(t) {
  7766. var n = e.localeState.gameLocaleOrDefault;
  7767. if ("number" != typeof t || void 0 === u[n]) return "";
  7768. var r = t.toFixed(2), o = u[n].decimal;
  7769. return r.replace(".", o);
  7770. }
  7771. function o(t) {
  7772. if (void 0 === t) return "";
  7773. var n = e.localeState.gameLocaleOrDefault, r = t.toString().split("."), o = u[n];
  7774. return r[0] = r[0].replace(/\B(?=(\d{3})+(?!\d))/g, o.thousand), r.join(o.decimal);
  7775. }
  7776. t.formatNumber = function i(e) {
  7777. return isNaN(e) ? "0" : o(Math.round(10 * e) / 10);
  7778. }, t.formatRatio = r, t.formatRatioBetweenNumbers = function a(e, t) {
  7779. return "number" != typeof e || "number" != typeof t ? "" : r(e / Math.max(t, 1));
  7780. }, t.formatThousands = o, t.formatDecimals = function s(t, n) {
  7781. var r = 2, o = 100, i = e.localeState.gameLocaleOrDefault, a = u[i], s = function(e) {
  7782. return void 0 === u[i] ? e : e.replace(".", a.decimal);
  7783. };
  7784. return isNaN(t) ? s("0.00") : ((n && !isNaN(n) || 0 === n) && (r = n, o = Math.pow(10, n)),
  7785. s((Math.round(t * o) / o).toFixed(r)));
  7786. }, t.formatDateDifference = function(e, t, n) {
  7787. void 0 === n && (n = !1);
  7788. var r = t / 1e3, o = Math.floor(r / 86400);
  7789. r -= 86400 * o;
  7790. var i = Math.floor(r / 3600) % 24;
  7791. r -= 3600 * i;
  7792. var a = Math.floor(r / 60) % 60, s = __("ID_SPARTA_NUM_DAY");
  7793. (o > 1 || 0 === o) && (s = __("ID_SPARTA_NUM_DAYS"));
  7794. var u = __("ID_SPARTA_NUM_HOUR");
  7795. (i > 1 || 0 === i) && (u = __("ID_SPARTA_NUM_HOURS"));
  7796. var l = __("ID_SPARTA_NUM_MINUTE");
  7797. (a > 1 || 0 === a) && (l = __("ID_SPARTA_NUM_MINUTES")), s = s.replace("[DAYS]", o + ""),
  7798. u = u.replace("[HOURS]", i + ""), l = l.replace("[MINUTES]", a + "");
  7799. var c = "", p = "", d = "";
  7800. return o > 0 ? (c = s, n || (p = u)) : i > 0 ? (p = u, n || (d = l)) : d = l, e.replace("[NUMDAYS]", c).replace("[NUMHOURS]", p).replace("[NUMMINUTES]", d).replace(/\s+/g, " ").trim();
  7801. }, t.formatDateDifferenceShort = function(e, t) {
  7802. var n = t / 1e3, r = Math.floor(n / 604800);
  7803. n -= 86400 * r * 7;
  7804. var o = Math.floor(n / 86400);
  7805. n -= 86400 * o;
  7806. var i = Math.floor(n / 3600) % 24;
  7807. n -= 3600 * i;
  7808. var a = Math.floor(n / 60) % 60;
  7809. n -= 60 * a;
  7810. var s = Math.floor(n), u = __("ID_SPARTA_NUM_WEEKS_SHORT").replace("[WEEK]", String(r)), l = __("ID_SPARTA_NUM_DAYS_SHORT").replace("[DAYS]", String(o)), c = __("ID_SPARTA_NUM_HOURS_SHORT").replace("[HOURS]", String(i)), p = __("ID_SPARTA_NUM_MINUTES_SHORT").replace("[MINUTES]", String(a)), d = __("ID_SPARTA_NUM_SECONDS_SHORT").replace("[SECONDS]", String(s)), f = "", m = "", h = "", g = "", y = "";
  7811. return r ? (f = u, o && (m = l)) : o ? (m = l, h = c) : i ? (h = c, g = p) : a ? (g = p,
  7812. y = d) : y = d, e.replace("[NUMWEEKS]", f).replace("[NUMDAYS]", m).replace("[NUMHOURS]", h).replace("[NUMMINUTES]", g).replace("[NUMSECONDS]", y).replace(/\s+/g, " ");
  7813. };
  7814. var u = {
  7815. "ar-sa": {
  7816. decimal: ".",
  7817. thousand: ","
  7818. },
  7819. "cs-cz": {
  7820. decimal: ".",
  7821. thousand: ","
  7822. },
  7823. "de-de": {
  7824. decimal: ",",
  7825. thousand: "."
  7826. },
  7827. "en-us": {
  7828. decimal: ".",
  7829. thousand: ","
  7830. },
  7831. "es-es": {
  7832. decimal: ",",
  7833. thousand: " "
  7834. },
  7835. "es-mx": {
  7836. decimal: ".",
  7837. thousand: " "
  7838. },
  7839. "fr-fr": {
  7840. decimal: ",",
  7841. thousand: " "
  7842. },
  7843. "it-it": {
  7844. decimal: ",",
  7845. thousand: "."
  7846. },
  7847. "ja-jp": {
  7848. decimal: ".",
  7849. thousand: ","
  7850. },
  7851. "ko-kr": {
  7852. decimal: ".",
  7853. thousand: ","
  7854. },
  7855. "pl-pl": {
  7856. decimal: ",",
  7857. thousand: " "
  7858. },
  7859. "pt-br": {
  7860. decimal: ",",
  7861. thousand: "."
  7862. },
  7863. "ru-ru": {
  7864. decimal: ",",
  7865. thousand: " "
  7866. },
  7867. "tr-tr": {
  7868. decimal: ",",
  7869. thousand: "."
  7870. },
  7871. "zh-cn": {
  7872. decimal: ".",
  7873. thousand: ","
  7874. },
  7875. "zh-tw": {
  7876. decimal: ".",
  7877. thousand: ","
  7878. }
  7879. };
  7880. }).call(this, n(3));
  7881. }, function(e, t, n) {
  7882. "use strict";
  7883. Object.defineProperty(t, "__esModule", {
  7884. value: !0
  7885. });
  7886. var r, o = n(0), i = n(1), a = n(2), s = n(4), u = n(14), l = n(6), c = n(20), p = n(1114), d = n(18), f = n(5), m = n(148), h = n(23);
  7887. !function(e) {
  7888. e.Left = "left", e.Right = "right";
  7889. }(r = t.Direction || (t.Direction = {}));
  7890. var g = function(e) {
  7891. function t() {
  7892. var t = null !== e && e.apply(this, arguments) || this;
  7893. return t.translateX = u.Animation.componentTween(t, "38e8cd1c:42:56", t.origin),
  7894. t.loopTimeout = 0, t.shuttleTimeout = 0, t.delayTimeout = 0, t.animationStarted = !1,
  7895. t.autoShuttleId = 0, t.currentShuttleId = -1, t;
  7896. }
  7897. return o.__extends(t, e), Object.defineProperty(t.prototype, "origin", {
  7898. get: function() {
  7899. return this.props.direction === r.Right || this.props.rtl ? 0 : this.props.getOuterWidth() - this.props.getInnerWidth();
  7900. },
  7901. enumerable: !0,
  7902. configurable: !0
  7903. }), t.prototype.componentDidMount = function() {
  7904. var e = this;
  7905. this.reaction(function() {
  7906. return [ e.shouldScroll, e.props.getInnerWidth(), e.props.getOuterWidth() ];
  7907. }, function() {
  7908. e.componentDidUpdate();
  7909. }, {
  7910. fireImmediately: !0
  7911. });
  7912. }, t.prototype.componentWillUnmount = function() {
  7913. clearTimeout(this.delayTimeout), clearTimeout(this.loopTimeout), clearTimeout(this.shuttleTimeout);
  7914. }, t.prototype.componentDidUpdate = function() {
  7915. var e = this;
  7916. this.props.getInnerWidth() && this.props.getOuterWidth() && (this.props.delay ? (clearTimeout(this.delayTimeout),
  7917. this.delayTimeout = setTimeout(function() {
  7918. return e.update();
  7919. }, this.props.delay)) : this.update());
  7920. }, Object.defineProperty(t.prototype, "shouldScroll", {
  7921. get: function() {
  7922. return this.props.scroll || this.props.focusItem && this.props.focusItem.isFocusedOrHovered;
  7923. },
  7924. enumerable: !0,
  7925. configurable: !0
  7926. }), t.prototype.getDistance = function(e) {
  7927. return this.props.loop ? e : Math.max(0, e - this.props.getOuterWidth());
  7928. }, t.prototype.update = function() {
  7929. var e = this.props.getOuterWidth(), t = this.props.getInnerWidth(), n = this.getDistance(t);
  7930. clearTimeout(this.loopTimeout), clearTimeout(this.shuttleTimeout), this.reset(),
  7931. t > 0 && e > 0 && e < t ? this.props.loop ? this.loop(n, !0) : this.shouldScroll && (this.props.direction !== r.Right || this.props.rtl || (n = -n),
  7932. this.autoShuttleId++, this.currentShuttleId = this.autoShuttleId, this.scroll(0, n, this.currentShuttleId)) : this.translateX.set(0);
  7933. }, t.prototype.loop = function(e, t) {
  7934. var n = this;
  7935. void 0 === t && (t = !1), this.animationStarted || (this.animationStarted = !0,
  7936. this.props.onScrollChange(!0));
  7937. var o = +this.props.speed.toFixed(3), i = this.props.direction === r.Left || this.props.rtl, a = i ? e : -e, s = i ? -this.props.getOuterWidth() : this.props.getOuterWidth(), u = t ? 0 : s, l = (i ? a - u : u - a) / (10 * o * 60) * 1e3, c = {
  7938. duration: l,
  7939. speed: null,
  7940. easing: h.Easing.Linear
  7941. };
  7942. this.translateX.set(u), this.translateX.to(a, c), this.loopTimeout = setTimeout(function() {
  7943. n.props.loop && (n.translateX.set(s), n.loop(e));
  7944. }, l);
  7945. }, t.prototype.scroll = function(e, t, n) {
  7946. var r = this;
  7947. if (!this.props.shuttle || this.currentShuttleId === n) {
  7948. this.animationStarted || (this.animationStarted = !0, this.props.onScrollChange(!0));
  7949. var o = {
  7950. duration: null,
  7951. speed: this.props.speed,
  7952. easing: h.Easing.Linear
  7953. };
  7954. this.translateX.to(t, o, function() {
  7955. r.props.shuttle && r.currentShuttleId === n && (r.shuttleTimeout = setTimeout(function() {
  7956. r.scroll(t, e, n);
  7957. }, 500));
  7958. });
  7959. }
  7960. }, t.prototype.reset = function() {
  7961. var e = this;
  7962. if (this.animationStarted && !this.props.loop && !this.shouldScroll) {
  7963. var t = {
  7964. duration: null,
  7965. speed: this.props.speed,
  7966. easing: h.Easing.Linear
  7967. };
  7968. this.translateX.to(this.origin, t, function() {
  7969. e.props.onScrollChange(!1);
  7970. }), this.animationStarted = !1, this.currentShuttleId = -1;
  7971. }
  7972. }, t.prototype.render = function() {
  7973. return i.createElement("surface", {
  7974. style: f.merge2(this.translateX.getStyleClass("translateX"), d.CommonStyles.disableMouseEvents),
  7975. onBounds: this.props.onBoundsChanged
  7976. }, this.props.children);
  7977. }, o.__decorate([ a.computed ], t.prototype, "shouldScroll", null), t = o.__decorate([ s.observer ], t);
  7978. }(i.Component), y = function(e) {
  7979. function t() {
  7980. var t = null !== e && e.apply(this, arguments) || this;
  7981. return t.twinkle = m.TwinkleContext.getFromComponent(t), t.outerWidth = 0, t.innerWidth = 0,
  7982. t.isAnimated = !1, t.updateOuterBounds = a.action(function(e) {
  7983. n.isSizeEqual(t.outerWidth, e.width) || (t.outerWidth = e.width);
  7984. }), t.updateInnerBounds = a.action(function(e) {
  7985. n.isSizeEqual(t.innerWidth, e.width) || (t.innerWidth = e.width);
  7986. }), t.onScrollChange = a.action(function(e) {
  7987. t.isAnimated = e;
  7988. }), t.getOuterWidth = function() {
  7989. return t.props.width || t.outerWidth;
  7990. }, t.getInnerWidth = function() {
  7991. return t.innerWidth;
  7992. }, t;
  7993. }
  7994. var n;
  7995. return o.__extends(t, e), n = t, Object.defineProperty(t.prototype, "hasOverflow", {
  7996. get: function() {
  7997. var e = this.getOuterWidth(), t = this.getInnerWidth();
  7998. return t > 0 && e > 0 && e < t || !1;
  7999. },
  8000. enumerable: !0,
  8001. configurable: !0
  8002. }), t.isSizeEqual = function(e, t) {
  8003. if (e && t) {
  8004. return Math.abs(e - t) < 2 && Math.abs(e - t) < 2;
  8005. }
  8006. return !1;
  8007. }, t.prototype.wrapWithEllipsis = function(e, t) {
  8008. return this.props.showEllipsis && this.hasOverflow ? i.createElement("surface", {
  8009. style: f.merge3(e, this.props.style, p.MarqueeStyles.containerMargin)
  8010. }, i.createElement(S, {
  8011. focusItem: this.props.focusItem,
  8012. scroll: this.props.scroll
  8013. }), t) : t;
  8014. }, t.prototype.render = function() {
  8015. var e, t = this.props.scrollTo === r.Left || this.props.rtl, n = this.hasOverflow || this.isAnimated;
  8016. e = this.props.width ? f.DynamicStyle.create({
  8017. width: this.props.width
  8018. }, "38e8cd1c:306:25") : f.emptyStyle;
  8019. var o = f.merge4(e, p.MarqueeStyles.marquee(n), t ? d.CommonStyles.justifyContentFlexEnd : f.emptyStyle, f.merge2(this.props.style, n ? this.props.overflowStyle : f.emptyStyle));
  8020. return this.wrapWithEllipsis(e, i.createElement("surface", {
  8021. style: o,
  8022. onBounds: this.updateOuterBounds
  8023. }, i.createElement(g, {
  8024. scroll: this.props.scroll,
  8025. focusItem: this.props.focusItem,
  8026. loop: this.props.loop,
  8027. delay: this.props.delay,
  8028. direction: this.props.scrollTo,
  8029. getInnerWidth: this.getInnerWidth,
  8030. getOuterWidth: this.getOuterWidth,
  8031. speed: this.props.speed,
  8032. onScrollChange: this.onScrollChange,
  8033. onBoundsChanged: this.updateInnerBounds,
  8034. shuttle: this.props.shuttle && this.twinkle.buildInfo.isFeatureSupported("TweenerAttachTweenFinishedFix"),
  8035. rtl: this.props.rtl
  8036. }, this.props.children)));
  8037. }, t.contextTypes = m.TwinkleContext.contextTypes, t.defaultProps = {
  8038. scroll: !1,
  8039. scrollTo: r.Right,
  8040. loop: !1,
  8041. showEllipsis: !1,
  8042. speed: .1,
  8043. rtl: !1
  8044. }, o.__decorate([ a.observable ], t.prototype, "outerWidth", void 0), o.__decorate([ a.observable ], t.prototype, "innerWidth", void 0),
  8045. o.__decorate([ a.observable ], t.prototype, "isAnimated", void 0), o.__decorate([ a.computed ], t.prototype, "hasOverflow", null),
  8046. t = n = o.__decorate([ s.observer ], t);
  8047. }(i.Component);
  8048. t.Marquee = y;
  8049. var S = function(e) {
  8050. function t() {
  8051. var t = null !== e && e.apply(this, arguments) || this;
  8052. return t.opacityTween = u.Animation.componentTween(t, "38e8cd1c:351:50", 0), t;
  8053. }
  8054. return o.__extends(t, e), t.prototype.componentDidMount = function() {
  8055. var e = this;
  8056. this.reaction(function() {
  8057. return e.props.scroll || e.props.focusItem && (e.props.focusItem.isFocused || e.props.focusItem.isHovered);
  8058. }, function(t) {
  8059. e.opacityTween.to(t ? 0 : 1);
  8060. }, {
  8061. fireImmediately: !0
  8062. });
  8063. }, t.prototype.render = function() {
  8064. var e = f.merge2(p.MarqueeStyles.ellipsis(c.isRTLLanguage()), this.opacityTween.getStyleClass("opacity"));
  8065. return i.createElement(l.Text, {
  8066. value: "...",
  8067. style: e
  8068. });
  8069. }, t = o.__decorate([ s.observer ], t);
  8070. }(i.Component);
  8071. }, function(e, t, n) {
  8072. "use strict";
  8073. Object.defineProperty(t, "__esModule", {
  8074. value: !0
  8075. });
  8076. var r = n(2), o = n(13), i = n(13), a = n(518);
  8077. function s(e) {
  8078. var t = i.nativePropertiesStore.getHostingGameId();
  8079. if (!t) throw new Error("Cannot check hosting game before it is set!");
  8080. return t === e;
  8081. }
  8082. t.isHostingGame = s, t.routeIsHostingGame = r.computed(function() {
  8083. return s(o.layoutStateStore.current.config.gameId);
  8084. }), t.supportsSpectating = function u(e) {
  8085. var t = i.gameStore.getGame(e);
  8086. return !!(t && t.serverConfig.supportedRoles && t.serverConfig.supportedRoles.indexOf("spectator") > -1) && (!t.serverConfig.hasSpectatorFeatureFlag || (t.serverConfig.spectatorFeatureFlag ? t.serverConfig.spectatorFeatureFlag.isEnabled() : a.gameFeatureFlags.spectator.isEnabled()));
  8087. }, t.supportsCommander = function l(e) {
  8088. var t = i.gameStore.getGame(e);
  8089. return t && t.serverConfig.supportedRoles && t.serverConfig.supportedRoles.indexOf("commander") > -1;
  8090. };
  8091. }, function(e, t, n) {
  8092. var r = n(52), o = n(450), i = n(160), a = Object.defineProperty;
  8093. t.f = n(81) ? Object.defineProperty : function e(t, n, s) {
  8094. if (r(t), n = i(n, !0), r(s), o) try {
  8095. return a(t, n, s);
  8096. } catch (e) {}
  8097. if ("get" in s || "set" in s) throw TypeError("Accessors not supported!");
  8098. return "value" in s && (t[n] = s.value), t;
  8099. };
  8100. }, function(e, t, n) {
  8101. "use strict";
  8102. var r;
  8103. Object.defineProperty(t, "__esModule", {
  8104. value: !0
  8105. });
  8106. var o = n(891), i = n(892), a = n(82), s = n(36), u = n(144), l = n(893), c = n(53), p = n(129), d = n(70), f = p.__Logger.get("TextureHandler");
  8107. t.GAME_SCREEN_TEXTURE = "GAME_SCREEN_TEXTURE", t.STATIC_ATLAS = "STATIC_ATLAS",
  8108. t.SINGLE_TEXTURE = "SINGLE_TEXTURE", t.DYNAMIC_ATLAS = "DYNAMIC_ATLAS", t.twinkleAtlasIds = {
  8109. StaticAtlas: 0,
  8110. SingleTexture: 1,
  8111. DynamicAtlas: 2
  8112. }, t.atlasToId = ((r = {})[t.STATIC_ATLAS] = t.twinkleAtlasIds.StaticAtlas, r[t.SINGLE_TEXTURE] = t.twinkleAtlasIds.SingleTexture,
  8113. r[t.DYNAMIC_ATLAS] = t.twinkleAtlasIds.DynamicAtlas, r);
  8114. var m = function() {
  8115. function e(e) {
  8116. var t = this;
  8117. this.unmounted = !1, this.unloaders = [], this.textures = [], e && d.addLifecycleHook(e, "componentWillUnmount", function() {
  8118. t.destroy();
  8119. });
  8120. }
  8121. return e.prototype.isLoaded = function() {
  8122. return this.textures.length > 0 && this.textures.every(function(e) {
  8123. return e.isLoaded();
  8124. });
  8125. }, e.prototype.onLoaded = function(e) {
  8126. if (this.isLoaded()) e(); else var t = this.textures.length, n = this.textures.map(function(r) {
  8127. return r.onLoaded(function() {
  8128. 0 === --t && (n && n.forEach(function(e) {
  8129. return e();
  8130. }), e());
  8131. });
  8132. });
  8133. }, e.prototype.preload = function(e, n) {
  8134. var r = this;
  8135. if (this.unmounted) throw new Error("Trying to preload on an unmounted component");
  8136. var o = t.textureHandler.getOrCreateTexture(a.options.urlHook(e), n);
  8137. this.textures.push(o), t.textureHandler.keepAlive.increaseRefCount(o);
  8138. var i = !1, s = function() {
  8139. if (!i) {
  8140. i = !0;
  8141. var e = r.textures.indexOf(o);
  8142. r.textures.splice(e, 1), t.textureHandler.keepAlive.decreaseRefCount(o);
  8143. }
  8144. };
  8145. return this.unloaders.push(s), s;
  8146. }, e.prototype.unloadAll = function() {
  8147. this.unloaders.forEach(function(e) {
  8148. return e();
  8149. }), this.unloaders.length = 0;
  8150. }, e.prototype.destroy = function() {
  8151. this.unmounted = !0, this.unloadAll();
  8152. }, e;
  8153. }();
  8154. t.TexturePreloader = m;
  8155. var h = function() {
  8156. function e() {
  8157. var e = this;
  8158. this.keyToTexture = {}, this.keepAlive = new l.TextureKeepAlive(), this.getPendingTextures = function() {
  8159. return e.getTextures().filter(function(e) {
  8160. return !e.isLoaded();
  8161. });
  8162. };
  8163. }
  8164. return e.backwardsCompatibleAtlas = function(e, n) {
  8165. if ("string" == typeof n) return s.getBuildInfo().hasJsCreateAtlas() ? n : "SpartaCommonAtlas" === n ? t.DYNAMIC_ATLAS : t.SINGLE_TEXTURE;
  8166. if ("number" == typeof n) {
  8167. if (n === t.twinkleAtlasIds.StaticAtlas) return t.STATIC_ATLAS;
  8168. if (n === t.twinkleAtlasIds.SingleTexture) return t.SINGLE_TEXTURE;
  8169. if (n === t.twinkleAtlasIds.DynamicAtlas) return t.DYNAMIC_ATLAS;
  8170. } else if (void 0 === n) return t.SINGLE_TEXTURE;
  8171. throw new Error("Got invalid atlas " + n + " for url " + e);
  8172. }, e.prototype.unmount = function(e) {
  8173. this.keepAlive.unmount(e), o.TextureFadeIn.unmount(e);
  8174. }, e.prototype.createPreloader = function(e) {
  8175. return new m(e);
  8176. }, e.prototype.getTextures = function() {
  8177. var e = this;
  8178. return Object.keys(this.keyToTexture).map(function(t) {
  8179. return e.keyToTexture[t];
  8180. });
  8181. }, e.prototype.loadDefaultTexture = function(e, t, n) {
  8182. c.nativeApi.loadDefaultTexture(e, a.options.urlHook(t), n);
  8183. }, e.prototype.getTexture = function(t, n) {
  8184. var r = i.Texture.toReference(t, e.backwardsCompatibleAtlas(t, n));
  8185. return this.keyToTexture[r.key];
  8186. }, e.prototype.getOrCreateTexture = function(t, n) {
  8187. var r = i.Texture.toReference(t, e.backwardsCompatibleAtlas(t, n)), o = this.keyToTexture[r.key];
  8188. return o || (o = this.keyToTexture[r.key] = new i.Texture(r)), o;
  8189. }, e.prototype.getAtlas = function(n, r, o) {
  8190. return r === t.GAME_SCREEN_TEXTURE ? t.SINGLE_TEXTURE : "" !== r ? e.backwardsCompatibleAtlas(r, o) : void f.error("Trying to load empty string as texture in surface. " + n);
  8191. }, e.prototype.handle = function(e, n, r, i) {
  8192. if (n === t.GAME_SCREEN_TEXTURE) return t.SINGLE_TEXTURE;
  8193. if ("" !== n) {
  8194. var a = this.getOrCreateTexture(n, r);
  8195. return a.isLoaded() || a.loading(), i && (this.keepAlive.handle(e, a, i), o.TextureFadeIn.handle(e, a, i)),
  8196. a.reference.atlas;
  8197. }
  8198. f.error("Trying to load empty string as texture in surface: " + e._rootNodeID);
  8199. }, e.prototype.update = function(e, n, r) {
  8200. "string" == typeof n.texture && (n.texture = a.options.urlHook(n.texture), n.textureAtlas = this.handle(e, n.texture, n.textureAtlas, r ? void 0 : n)),
  8201. "string" == typeof n.texture1 && (n.texture1 = a.options.urlHook(n.texture1), n.texture1Atlas = this.handle(e, n.texture1, n.texture1Atlas)),
  8202. "string" == typeof n.texture2 && (n.texture2 = a.options.urlHook(n.texture2), n.texture2Atlas = this.handle(e, n.texture2, n.texture2Atlas)),
  8203. "string" == typeof n.texture3 && (n.texture3 = a.options.urlHook(n.texture3), n.texture3Atlas = this.handle(e, n.texture3, n.texture3Atlas)),
  8204. n.spriteAnimation && "string" == typeof n.spriteAnimation.spriteSheet && (n.spriteAnimation.spriteSheet = a.options.urlHook(n.spriteAnimation.spriteSheet),
  8205. n.spriteAnimation.spriteSheetAtlas = this.handle(e, n.spriteAnimation.spriteSheet, t.SINGLE_TEXTURE)),
  8206. delete n.isPreloader;
  8207. }, e.prototype.onTextureUnloaded = function(e, n) {
  8208. if (e !== t.GAME_SCREEN_TEXTURE) {
  8209. var r = this.getTexture(e, n);
  8210. r ? r.unloaded() : f.warn("Got unload for unknown texture:", e, n);
  8211. }
  8212. }, e.prototype.onTextureLoaded = function(e, n, r, o, i) {
  8213. e !== t.GAME_SCREEN_TEXTURE && (this.getOrCreateTexture(e, n).loaded(r), u.onTextureLoaded.trigger());
  8214. }, e.prototype.waitForReady = function(e, t, n) {
  8215. return void 0 === t && (t = 5e3), new Promise(function(r) {
  8216. var o, i;
  8217. 0 !== n().length ? (i = u.onTextureLoaded.listen(function() {
  8218. 0 === n().length && a(!0);
  8219. }), o = setTimeout(function() {
  8220. f.warn(e + " timed out waiting " + t + "ms for all textures to be ready.", "Textures still loading:", n().map(function(e) {
  8221. return e.reference.url;
  8222. })), a(!1);
  8223. }, t)) : r(!0);
  8224. function a(e) {
  8225. i(), clearTimeout(o), r(e);
  8226. }
  8227. });
  8228. }, e;
  8229. }();
  8230. t.TextureHandler = h, t.textureHandler = new h(), c.nativeApi.onTextureLoaded = t.textureHandler.onTextureLoaded.bind(t.textureHandler),
  8231. c.nativeApi.onTextureUnloaded = t.textureHandler.onTextureUnloaded.bind(t.textureHandler);
  8232. }, function(e, t, n) {
  8233. "use strict";
  8234. Object.defineProperty(t, "__esModule", {
  8235. value: !0
  8236. });
  8237. var r = n(0), o = n(2), i = n(326), a = n(13), s = n(154), u = n(43);
  8238. !function(e) {
  8239. e[e.highlights = 0] = "highlights", e[e.personal = 1] = "personal", e[e.scoreboard = 2] = "scoreboard",
  8240. e[e.squad = 3] = "squad", e[e.feedback = 4] = "feedback", e[e.operations = 5] = "operations",
  8241. e[e.stats = 6] = "stats";
  8242. }(t.EorPages || (t.EorPages = {})), t.isEorPayload = function l(e, t) {
  8243. return "EOR_UPDATE" === t;
  8244. };
  8245. var c = function() {
  8246. function e() {
  8247. var e = this;
  8248. this.data = void 0, this.unrankedData = void 0, this.battlePacksData = void 0, this.scrapsData = void 0,
  8249. this.error = void 0, this.isActive = !1, this.fallbackMapName = "", this.fallbackGameMode = "",
  8250. this.nextLevelName = void 0, this.nextGameMode = void 0, this.loadingScreenReady = !1,
  8251. this.quitInProgress = !1, this.viewedPages = [], this.gameReadyToQuit = !1, this.reportedPlayers = [],
  8252. this.unrankedGame = !1, this.readyToShowNextInfo = !1, this.surveySeen = !1, this.surveyComplete = !1,
  8253. this.mustQuitAfterUpdate = !1, this.hasReceivedNextRoundInfo = !1, this.mustQuitAfterUpdateDisposer = o.reaction(function() {
  8254. return e.mustQuitAfterUpdate;
  8255. }, function(t) {
  8256. t && (e.setMustQuitAfterUpdate(!1), s.toggleQuittingOverlay(!1));
  8257. }), u.stopGame.listen(function() {
  8258. e.data && e.clearEndOfRoundData();
  8259. });
  8260. }
  8261. return e.prototype.initializeEor = function() {
  8262. this.loadingScreenReady = !1;
  8263. }, e.prototype.setEndOfRoundData = function(e) {
  8264. this.data = e;
  8265. }, e.prototype.setError = function(e) {
  8266. this.error = e;
  8267. }, e.prototype.clearEndOfRoundData = function(e) {
  8268. this.viewedPages = [], this.reportedPlayers = [], this.data = void 0, this.unrankedData = void 0,
  8269. this.error = void 0, this.gameReadyToQuit = !1, this.surveySeen = !1, this.battlePacksData && this.battlePacksData.gameReportId !== e && (this.battlePacksData = void 0),
  8270. this.fallbackGameMode = "", this.fallbackMapName = "", this.nextGameMode = void 0,
  8271. this.nextLevelName = void 0, this.readyToShowNextInfo = !1, this.hasReceivedNextRoundInfo = !1,
  8272. this.surveyComplete = !1;
  8273. }, Object.defineProperty(e.prototype, "battlePacks", {
  8274. get: function() {
  8275. return this.data && this.data.battlePacks || this.battlePacksData;
  8276. },
  8277. enumerable: !0,
  8278. configurable: !0
  8279. }), Object.defineProperty(e.prototype, "scraps", {
  8280. get: function() {
  8281. return this.data && this.data.scraps && this.data.scraps.totalAmount > 0 ? this.data.scraps : this.scrapsData && this.scrapsData.totalAmount > 0 ? this.scrapsData : new i.EndOfRoundScraps(0, 0, 0);
  8282. },
  8283. enumerable: !0,
  8284. configurable: !0
  8285. }), e.prototype.setBattlepacks = function(e) {
  8286. this.battlePacksData = e;
  8287. }, e.prototype.setScraps = function(e) {
  8288. this.scrapsData = e;
  8289. }, e.prototype.setFallbackMapName = function(e) {
  8290. this.fallbackMapName = e;
  8291. }, e.prototype.setFallbackGameMode = function(e) {
  8292. this.fallbackGameMode = e;
  8293. }, e.prototype.setQuitProgress = function(e) {
  8294. this.quitInProgress = e;
  8295. }, e.prototype.setGameReadyToQuit = function(e) {
  8296. this.gameReadyToQuit = e;
  8297. }, e.prototype.setReadyToShowNextInfo = function() {
  8298. this.readyToShowNextInfo = !0;
  8299. }, e.prototype.setLoadingState = function(e) {
  8300. var t = this, n = e.levelName || "";
  8301. -1 === n.toLowerCase().indexOf("frontend") ? (n && "" !== n && (this.nextLevelName = function r(e) {
  8302. var t = e.lastIndexOf("/");
  8303. return t > -1 ? e.substring(t + 1) : void 0;
  8304. }(n)), e.gameMode && "" !== e.gameMode && (this.nextGameMode = e.gameMode && e.gameMode.replace(/[_0-9]+$/, "")),
  8305. this.loadingScreenReady = !0, this.hasReceivedNextRoundInfo || (this.hasReceivedNextRoundInfo = !0,
  8306. setTimeout(function() {
  8307. t.setReadyToShowNextInfo();
  8308. }, 1e3))) : (this.nextLevelName = void 0, this.nextGameMode = void 0);
  8309. }, e.prototype.clearViewedPages = function() {
  8310. this.viewedPages = [];
  8311. }, e.prototype.viewPage = function(e) {
  8312. this.isViewed(e) || this.viewedPages.push(e);
  8313. }, e.prototype.reportPlayer = function(e) {
  8314. this.isReported(e) || this.reportedPlayers.push(e);
  8315. }, e.prototype.setUnrankedGame = function(e) {
  8316. this.unrankedGame = e;
  8317. }, e.prototype.setSurveySeen = function() {
  8318. this.surveySeen = !0;
  8319. }, e.prototype.setUnRankedData = function(e) {
  8320. this.unrankedData = e;
  8321. }, e.prototype.setSurveyComplete = function(e) {
  8322. this.surveyComplete = e;
  8323. }, e.prototype.setMustQuitAfterUpdate = function(e) {
  8324. this.mustQuitAfterUpdate = e;
  8325. }, e.prototype.isViewed = function(e) {
  8326. return this.viewedPages.indexOf(e) >= 0;
  8327. }, e.prototype.isReported = function(e) {
  8328. return this.reportedPlayers.indexOf(e) >= 0;
  8329. }, r.__decorate([ o.observable ], e.prototype, "data", void 0), r.__decorate([ o.observable ], e.prototype, "unrankedData", void 0),
  8330. r.__decorate([ o.observable ], e.prototype, "battlePacksData", void 0), r.__decorate([ o.observable ], e.prototype, "scrapsData", void 0),
  8331. r.__decorate([ o.observable ], e.prototype, "error", void 0), r.__decorate([ o.observable ], e.prototype, "isActive", void 0),
  8332. r.__decorate([ o.observable ], e.prototype, "fallbackMapName", void 0), r.__decorate([ o.observable ], e.prototype, "fallbackGameMode", void 0),
  8333. r.__decorate([ o.observable ], e.prototype, "nextLevelName", void 0), r.__decorate([ o.observable ], e.prototype, "nextGameMode", void 0),
  8334. r.__decorate([ o.observable ], e.prototype, "loadingScreenReady", void 0), r.__decorate([ o.observable ], e.prototype, "quitInProgress", void 0),
  8335. r.__decorate([ o.observable ], e.prototype, "viewedPages", void 0), r.__decorate([ o.observable ], e.prototype, "gameReadyToQuit", void 0),
  8336. r.__decorate([ o.observable ], e.prototype, "reportedPlayers", void 0), r.__decorate([ o.observable ], e.prototype, "unrankedGame", void 0),
  8337. r.__decorate([ o.observable ], e.prototype, "readyToShowNextInfo", void 0), r.__decorate([ o.observable ], e.prototype, "surveySeen", void 0),
  8338. r.__decorate([ o.observable ], e.prototype, "surveyComplete", void 0), r.__decorate([ o.observable ], e.prototype, "mustQuitAfterUpdate", void 0),
  8339. r.__decorate([ o.action ], e.prototype, "initializeEor", null), r.__decorate([ o.action ], e.prototype, "setEndOfRoundData", null),
  8340. r.__decorate([ o.action ], e.prototype, "setError", null), r.__decorate([ o.action ], e.prototype, "clearEndOfRoundData", null),
  8341. r.__decorate([ o.computed ], e.prototype, "battlePacks", null), r.__decorate([ o.computed ], e.prototype, "scraps", null),
  8342. r.__decorate([ o.action ], e.prototype, "setBattlepacks", null), r.__decorate([ o.action ], e.prototype, "setScraps", null),
  8343. r.__decorate([ o.action ], e.prototype, "setFallbackMapName", null), r.__decorate([ o.action ], e.prototype, "setFallbackGameMode", null),
  8344. r.__decorate([ o.action ], e.prototype, "setQuitProgress", null), r.__decorate([ o.action ], e.prototype, "setGameReadyToQuit", null),
  8345. r.__decorate([ o.action ], e.prototype, "setReadyToShowNextInfo", null), r.__decorate([ o.action ], e.prototype, "setLoadingState", null),
  8346. r.__decorate([ o.action ], e.prototype, "clearViewedPages", null), r.__decorate([ o.action ], e.prototype, "viewPage", null),
  8347. r.__decorate([ o.action ], e.prototype, "reportPlayer", null), r.__decorate([ o.action ], e.prototype, "setUnrankedGame", null),
  8348. r.__decorate([ o.action ], e.prototype, "setSurveySeen", null), r.__decorate([ o.action ], e.prototype, "setUnRankedData", null),
  8349. r.__decorate([ o.action ], e.prototype, "setSurveyComplete", null), r.__decorate([ o.action ], e.prototype, "setMustQuitAfterUpdate", null),
  8350. e;
  8351. }();
  8352. t.TunguskaEndOfRoundStore = c, t.tunguskaEndOfRoundStore = new c(), a.gameStateStoreLoader.onLoad(function(e) {
  8353. o.reaction(function() {
  8354. return e.hasLoadedLevel;
  8355. }, function(e) {
  8356. return t.tunguskaEndOfRoundStore.setGameReadyToQuit(e);
  8357. });
  8358. });
  8359. }, function(e, t, n) {
  8360. "use strict";
  8361. Object.defineProperty(t, "__esModule", {
  8362. value: !0
  8363. }), n(1), n(0), n(858), n(863), n(864);
  8364. var r = n(82), o = n(53);
  8365. t.loadFont = function(e, t) {
  8366. r.options.urlHook && (t = r.options.urlHook(t)), o.nativeApi.loadFont(e, t);
  8367. };
  8368. var i = 0;
  8369. t.autoId = function a(e) {
  8370. return e + "_" + i++;
  8371. };
  8372. }, function(e, t, n) {
  8373. "use strict";
  8374. Object.defineProperty(t, "__esModule", {
  8375. value: !0
  8376. });
  8377. var r = n(1), o = n(2);
  8378. function i(e, t, n) {
  8379. var r = e._lifecycleHooks || (e._lifecycleHooks = {}), i = !!r[t], a = r[t] || (r[t] = []);
  8380. if (a.push(n), !i) {
  8381. var s = e[t];
  8382. e[t] = function() {
  8383. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  8384. o.transaction(function() {
  8385. s && s.apply(e, t), a.forEach(function(e) {
  8386. return e.apply(void 0, t);
  8387. });
  8388. });
  8389. };
  8390. }
  8391. return function() {
  8392. var e = a.indexOf(n);
  8393. e > -1 && a.splice(e, 1);
  8394. };
  8395. }
  8396. t.addReactHelperFunctions = function a() {
  8397. r.Component.prototype.reaction = function e(t, n, r) {
  8398. i(this, "componentWillUnmount", o.reaction(t, n, r));
  8399. }, r.Component.prototype.autorun = function e(t) {
  8400. i(this, "componentWillUnmount", o.autorun(t));
  8401. }, r.Component.prototype.when = function e(t, n, r) {
  8402. i(this, "componentWillUnmount", o.when(t, n, r));
  8403. };
  8404. }, t.onComponentUpdate = function s(e, t) {
  8405. i(e, "componentWillMount", function() {
  8406. t(e.props, e.state);
  8407. }), i(e, "componentWillUpdate", function(e, n) {
  8408. t(e, n);
  8409. });
  8410. }, t.onComponentDidUpdate = function u(e, t) {
  8411. i(e, "componentDidMount", function() {
  8412. t(e.props, e.state);
  8413. }), i(e, "componentDidUpdate", function() {
  8414. t(e.props, e.state);
  8415. });
  8416. }, t.addLifecycleHook = i;
  8417. }, function(e, t, n) {
  8418. "use strict";
  8419. Object.defineProperty(t, "__esModule", {
  8420. value: !0
  8421. });
  8422. var r = n(0), o = n(1), i = n(873), a = n(77), s = 0;
  8423. function u(e, t) {
  8424. var n = o.useContext(t);
  8425. if (void 0 === n) throw new Error("Cannot find " + e + " in context");
  8426. return n;
  8427. }
  8428. function l(e, t) {
  8429. var n = o.createContext(t);
  8430. function r() {
  8431. return u(e, n);
  8432. }
  8433. function i(e) {
  8434. var t = r();
  8435. return a.useObserver(function() {
  8436. return e.children(t);
  8437. }, i.displayName);
  8438. }
  8439. return i.displayName = e + "Consumer", {
  8440. Provider: n.Provider,
  8441. Consumer: i,
  8442. contextType: n,
  8443. use: r,
  8444. useMaybe: function s() {
  8445. return o.useContext(n);
  8446. }
  8447. };
  8448. }
  8449. t.useDefinedContext = u, t.createModernContext = l, t.createContext = function c(e, t) {
  8450. var n = l(e, t), a = e + s++;
  8451. function u(e) {
  8452. var t;
  8453. return (t = {})["contextValue_" + a] = e, t;
  8454. }
  8455. var c = u(i.any);
  8456. function p(n) {
  8457. if (void 0 === n.context) throw new Error(e + ": No context found in " + (n.displayName || n.name));
  8458. var r;
  8459. return n.constructor.contextType ? r = n.context : n.constructor.contextTypes && (r = n.context["contextValue_" + a]),
  8460. void 0 === r ? t : r;
  8461. }
  8462. var d = function(t) {
  8463. function i() {
  8464. return null !== t && t.apply(this, arguments) || this;
  8465. }
  8466. return r.__extends(i, t), i.prototype.getChildContext = function() {
  8467. return u(this.props.value);
  8468. }, i.prototype.render = function() {
  8469. return o.createElement(n.Provider, {
  8470. value: this.props.value
  8471. }, this.props.children || null);
  8472. }, i.displayName = e + "Provider", i.childContextTypes = c, i;
  8473. }(o.Component);
  8474. return r.__assign({}, n, {
  8475. Provider: d,
  8476. contextTypes: c,
  8477. getFromComponent: function f(t) {
  8478. var n = p(t);
  8479. if (void 0 === n) throw new Error(e + ": value not found in context");
  8480. return n;
  8481. },
  8482. findFromComponent: p,
  8483. getContextObject: u
  8484. });
  8485. };
  8486. }, function(e, t, n) {
  8487. "use strict";
  8488. (function(e) {
  8489. Object.defineProperty(t, "__esModule", {
  8490. value: !0
  8491. });
  8492. var r, o, i = n(0), a = n(2), s = e.get("GameViewState");
  8493. !function(e) {
  8494. e.NONE = "none", e.EOR = "eor", e.OPERATIONS_PRE_EOR = "operationspreeor", e.BATTLEPLAN_PRE_EOR = "battleplanpreeor",
  8495. e.PLAYING = "playing", e.LOADING = "loading";
  8496. }(r = t.GameViewRoute || (t.GameViewRoute = {})), function(e) {
  8497. e.NONE = "none", e.DEFAULT = "default", e.RSP_ADMIN = "rspadmin", e.SERVER_DETAILS = "serverdetails",
  8498. e.SERVER_BANS = "serverbans", e.BATTLEPACKS = "battlepacks", e.SURVEY = "survey",
  8499. e.MEDALS = "medals", e.MISSIONS = "missions", e.HELP = "help", e.TOW = "tow";
  8500. }(o = t.GameViewSubRoute || (t.GameViewSubRoute = {}));
  8501. var u = function() {
  8502. function e() {
  8503. this.route = o.NONE, this.subRoute = o.NONE, this.previousRoute = r.NONE, this.previousSubRoute = o.NONE,
  8504. this.isVisible = !1;
  8505. }
  8506. return e.prototype.setVisible = function(e) {
  8507. s.debug("setVisible", e), this.isVisible = e, e || (this.route = r.NONE, this.subRoute = o.NONE);
  8508. }, e.prototype.setRoute = function(e) {
  8509. s.debug("setRoute", e), this.previousRoute = this.route, this.route = e;
  8510. }, e.prototype.setSubRoute = function(e) {
  8511. s.debug("setSubRoute", e), this.previousSubRoute = this.subRoute, this.subRoute = e;
  8512. }, e.prototype.clearPreviousRoutes = function() {
  8513. this.previousRoute = r.NONE, this.previousSubRoute = o.NONE;
  8514. }, e.prototype.isRoute = function(e) {
  8515. return this.route === e;
  8516. }, e.prototype.hasSubRoute = function() {
  8517. return this.subRoute !== o.NONE;
  8518. }, e.prototype.hasRoute = function() {
  8519. return this.route !== r.NONE;
  8520. }, i.__decorate([ a.observable ], e.prototype, "route", void 0), i.__decorate([ a.observable ], e.prototype, "subRoute", void 0),
  8521. i.__decorate([ a.observable ], e.prototype, "previousRoute", void 0), i.__decorate([ a.observable ], e.prototype, "previousSubRoute", void 0),
  8522. i.__decorate([ a.observable ], e.prototype, "isVisible", void 0), i.__decorate([ a.action ], e.prototype, "setVisible", null),
  8523. i.__decorate([ a.action ], e.prototype, "setRoute", null), i.__decorate([ a.action ], e.prototype, "setSubRoute", null),
  8524. i.__decorate([ a.action ], e.prototype, "clearPreviousRoutes", null), e;
  8525. }();
  8526. t.GameViewState = u;
  8527. }).call(this, n(15));
  8528. }, function(e, t, n) {
  8529. "use strict";
  8530. (function(e, __) {
  8531. Object.defineProperty(t, "__esModule", {
  8532. value: !0
  8533. });
  8534. var r = n(0), o = n(1), i = n(25), a = n(11), s = n(95), u = n(14), l = n(10), c = n(4), p = n(18), d = n(5), f = n(28), m = n(70), h = n(23), g = n(76);
  8535. function y(e, t) {
  8536. return e && t ? function() {
  8537. for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
  8538. if (!(n && n.length && n[0].isRepeat)) {
  8539. var o = e.apply(void 0, n);
  8540. o instanceof Promise ? o.then(t) : t.apply(void 0, n);
  8541. }
  8542. } : e || t;
  8543. }
  8544. var S = function(e) {
  8545. function t() {
  8546. var t = null !== e && e.apply(this, arguments) || this;
  8547. return t.glowTween = u.Animation.componentTween(t, "e6be625a:40:47", 0), t;
  8548. }
  8549. return r.__extends(t, e), t.prototype.componentDidMount = function() {
  8550. var e = this;
  8551. this.reaction(function() {
  8552. return e.props.focusItem.isFocusedOrHovered;
  8553. }, function(t) {
  8554. e.glowTween.set(t ? .2 : 0);
  8555. }, {
  8556. fireImmediately: !0
  8557. });
  8558. }, t.prototype.shouldComponentUpdate = function() {
  8559. return !1;
  8560. }, t.prototype.render = function() {
  8561. return o.createElement("surface", {
  8562. style: d.merge2(p.PressableStyles.glow, this.glowTween.getStyleClass("opacity"))
  8563. });
  8564. }, t;
  8565. }(o.Component), v = function(t) {
  8566. function n(e, n) {
  8567. var r = t.call(this, e, n) || this;
  8568. if (r.failedEnterPlay = !1, r.tweens = {
  8569. scaleX: u.Animation.componentTween(r, "e6be625a:106:47", 1),
  8570. scaleY: u.Animation.componentTween(r, "e6be625a:107:47", 1)
  8571. }, r.pressInOptions = {
  8572. easing: h.Easing.Linear,
  8573. duration: u.Animation.presets.press.duration
  8574. }, r.pressOutOptions = {
  8575. easing: h.Easing.CubicOut,
  8576. duration: u.Animation.presets.press.duration
  8577. }, r.inputManager = null, r.onInputManager = function(e) {
  8578. r.inputManager = e;
  8579. }, r.getInput = function() {
  8580. if (r.props.focusItem.isFocused) return r.mutatedInput;
  8581. }, r.playEnter = function() {
  8582. if (r.props.scaleValues) if (r.props.scale && 1 === r.props.scaleValues.scaleX.to && 1 === r.props.scaleValues.scaleY.to) r.failedEnterPlay = !0; else if (r.props.scale && r.props.scaleInOptions) return r.playAnimation(r.props.scaleValues, "to", r.props.scaleInOptions);
  8583. }, r.playLeave = function() {
  8584. if (r.props.scale && r.props.scaleValues && r.props.scaleOutOptions) return r.playAnimation(r.props.scaleValues, "from", r.props.scaleOutOptions);
  8585. }, !e.focusItem) throw new Error("No focus item passed to <Pressable>");
  8586. r.triggerInput = s.debounce(function() {
  8587. r.mutatedInput.length && r.mutatedInput.forEach(function(e) {
  8588. return e.action && e.action();
  8589. });
  8590. }, 250, !0, !1), r.updateAnimationSettings();
  8591. var o = e.focusItem;
  8592. return m.onComponentUpdate(r, function(e) {
  8593. o.setActive("e6be625a:138:33", !e.disabled);
  8594. }), r;
  8595. }
  8596. return r.__extends(n, t), n.prototype.componentDidMount = function() {
  8597. var e = this;
  8598. this.mutateInput(this.props.input), this.props.disableFocusInputUpdate || this.reaction(function() {
  8599. return f.focusSystem.controllerMode && e.props.focusItem.isFocused;
  8600. }, function(t) {
  8601. t && e.inputManager && e.inputManager.updateInput();
  8602. }, {
  8603. fireImmediately: !0
  8604. }), this.updateAnimationSettings();
  8605. var t = this.props.focusItem;
  8606. this.eventListeners = [ t.onClick.listen(this.triggerInput), t.onFocusOrHover(this.playEnter), t.onBlurOrLeave(this.playLeave) ];
  8607. }, n.prototype.componentWillReceiveProps = function(e) {
  8608. this.mutateInput(e.input);
  8609. }, n.prototype.componentDidUpdate = function(e) {
  8610. this.failedEnterPlay && (this.failedEnterPlay = !1, this.playEnter()), this.updateAnimationSettings();
  8611. }, n.prototype.componentWillUnmount = function() {
  8612. for (this._animating && e.error("Un-mounting Pressable that is currently animating!"); this.eventListeners.length; ) {
  8613. var t = this.eventListeners.pop();
  8614. t && t();
  8615. }
  8616. }, n.prototype.updateAnimationSettings = function() {
  8617. this.props.scaleValues && this.props.pressScale && (this.pressAnimation = {
  8618. scaleX: {
  8619. from: this.props.scale ? this.props.scaleValues.scaleX.to : 1,
  8620. to: this.props.scale ? this.props.pressScale : 1
  8621. },
  8622. scaleY: {
  8623. from: this.props.scale ? this.props.scaleValues.scaleY.to : 1,
  8624. to: this.props.scale ? this.props.pressScale : 1
  8625. }
  8626. });
  8627. }, n.prototype.mutateInput = function(e) {
  8628. var t = this;
  8629. switch (e && (e = Array.isArray(e) ? e : [ e ]), e && 0 !== e.length || (e = [],
  8630. this.props.useDefaultInput && e.push(new a.Input({
  8631. label: __("ID_SPARTA_ACTION_SELECT"),
  8632. key: l.Keys.Accept
  8633. }))), this.props.triggerMode) {
  8634. case "before":
  8635. this.mutatedInput = e.map(function(e) {
  8636. return e.extend({
  8637. action: y(e.action, function() {
  8638. return t.playPress();
  8639. })
  8640. });
  8641. });
  8642. break;
  8643.  
  8644. case "between":
  8645. this.mutatedInput = e.map(function(e) {
  8646. var n = e.action;
  8647. return e.extend({
  8648. action: y(function() {
  8649. return t.playPressDown();
  8650. }, function() {
  8651. return n && n(), t.playReleaseUp();
  8652. })
  8653. });
  8654. });
  8655. break;
  8656.  
  8657. case "after":
  8658. this.mutatedInput = e.map(function(e) {
  8659. return e.extend({
  8660. action: y(function() {
  8661. return t.playPress();
  8662. }, e.action)
  8663. });
  8664. });
  8665. }
  8666. }, n.prototype.playPressDown = function() {
  8667. return this.playAnimation(this.pressAnimation, "to", this.pressInOptions);
  8668. }, n.prototype.playReleaseUp = function() {
  8669. if (this.props.focusItem.isFocusedOrHovered) return this.playAnimation(this.pressAnimation, "from", this.pressOutOptions);
  8670. }, n.prototype.playPress = function() {
  8671. var e = this;
  8672. if (!this.props.disabled) return this.playPressDown().then(function() {
  8673. return e.playReleaseUp();
  8674. });
  8675. }, n.prototype.playAnimation = function(e, t, n) {
  8676. var r = this;
  8677. this._animating = !0;
  8678. var o = Object.keys(e).map(function(o) {
  8679. return r.tweens[o].isDestroyed() ? Promise.resolve() : r.tweens[o].promiseTo(e[o][t], n);
  8680. });
  8681. return Promise.all(o).then(function() {
  8682. r._animating = !1;
  8683. });
  8684. }, n.prototype.render = function() {
  8685. var e = g.Tween.getStyleClass("e6be625a:324:48", this.tweens), t = d.merge2(e, this.props.style || d.emptyStyle), n = d.merge2(p.PressableStyles.children, this.props.childrenStyle || d.emptyStyle);
  8686. return o.createElement(i.InputRegistration, {
  8687. debugName: "e6be625a:329:43",
  8688. getInput: this.getInput,
  8689. ref: this.onInputManager
  8690. }, o.createElement("surface", r.__assign({
  8691. style: t
  8692. }, this.props.focusItem.hooks), this.props.glow && o.createElement(S, {
  8693. focusItem: this.props.focusItem
  8694. }), o.createElement("surface", {
  8695. style: n
  8696. }, this.props.children)));
  8697. }, n.defaultProps = {
  8698. glow: !1,
  8699. scale: !1,
  8700. scaleValues: {
  8701. scaleX: {
  8702. from: 1,
  8703. to: 1.057
  8704. },
  8705. scaleY: {
  8706. from: 1,
  8707. to: 1.057
  8708. }
  8709. },
  8710. useDefaultInput: !1,
  8711. scaleInOptions: u.Animation.presets.focusables.enter.default,
  8712. scaleOutOptions: u.Animation.presets.focusables.leave,
  8713. triggerMode: "between",
  8714. pressScale: .965,
  8715. disabled: !1,
  8716. disableFocusInputUpdate: !1
  8717. }, n = r.__decorate([ c.observer ], n);
  8718. }(o.Component);
  8719. t.Pressable = v;
  8720. }).call(this, n(15), n(3));
  8721. }, function(e, t, n) {
  8722. "use strict";
  8723. Object.defineProperty(t, "__esModule", {
  8724. value: !0
  8725. });
  8726. var r = n(0), o = n(1), i = n(2), a = n(4), s = n(48), u = n(35), l = n(8);
  8727. function c(e) {
  8728. return e.isReady && !e.failstate;
  8729. }
  8730. var p = function(e) {
  8731. function t() {
  8732. var t = null !== e && e.apply(this, arguments) || this;
  8733. return t.sparta = l.SpartaContext.getFromComponent(t), t;
  8734. }
  8735. return r.__extends(t, e), t.prototype.componentDidMount = function() {
  8736. var e = this, t = this.sparta.stores.presenceStateStore.isReady;
  8737. this.reaction(function() {
  8738. return e.sparta.stores.presenceStateStore.isReady;
  8739. }, function(n) {
  8740. if (n && n !== t) {
  8741. var r = e.props.load;
  8742. r.failstate && !r.isLoading && r.expire();
  8743. }
  8744. t = n;
  8745. });
  8746. }, Object.defineProperty(t.prototype, "isSuccessConditionMet", {
  8747. get: function() {
  8748. return !this.props.successCondition || this.props.successCondition(this.props.load);
  8749. },
  8750. enumerable: !0,
  8751. configurable: !0
  8752. }), t.prototype.render = function() {
  8753. var e = this.props, t = e.load;
  8754. if (c(t) && this.isSuccessConditionMet) return e.children(t.value);
  8755. if (!e.disableLoadingState && t.isLoading) return o.createElement(s.EmptyState, {
  8756. centerVertically: !0,
  8757. style: this.props.emptyStyle
  8758. }, o.createElement(u.Spinner, {
  8759. large: !0
  8760. }));
  8761. if (t.isReady && (t.failstate || !this.isSuccessConditionMet)) {
  8762. if (function n(e) {
  8763. return e.hasOwnProperty("defaultValues");
  8764. }(e)) return e.children(e.defaultValues);
  8765. if (function r(e) {
  8766. return e.hasOwnProperty("errorMessage");
  8767. }(e)) return o.createElement(s.EmptyState, {
  8768. centerVertically: !0,
  8769. text: e.errorMessage,
  8770. subText: "function" == typeof e.errorSubText ? e.errorSubText() : e.errorSubText,
  8771. style: e.emptyStyle
  8772. });
  8773. }
  8774. return null;
  8775. }, t.contextTypes = l.SpartaContext.contextTypes, r.__decorate([ i.computed ], t.prototype, "isSuccessConditionMet", null),
  8776. t = r.__decorate([ a.observer ], t);
  8777. }(o.Component);
  8778. t.FragmentLoader = p;
  8779. var d = function() {
  8780. function e() {
  8781. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  8782. this.fragments = e;
  8783. }
  8784. return Object.defineProperty(e.prototype, "id", {
  8785. get: function() {
  8786. return this.fragments.map(function(e) {
  8787. return e.id;
  8788. }).join(":");
  8789. },
  8790. enumerable: !0,
  8791. configurable: !0
  8792. }), Object.defineProperty(e.prototype, "value", {
  8793. get: function() {
  8794. return this.fragments.every(c) ? this.fragments.map(function(e) {
  8795. return e.value;
  8796. }) : null;
  8797. },
  8798. enumerable: !0,
  8799. configurable: !0
  8800. }), Object.defineProperty(e.prototype, "isLoading", {
  8801. get: function() {
  8802. return this.fragments.some(function(e) {
  8803. return e.isLoading;
  8804. });
  8805. },
  8806. enumerable: !0,
  8807. configurable: !0
  8808. }), Object.defineProperty(e.prototype, "isReady", {
  8809. get: function() {
  8810. return this.fragments.every(function(e) {
  8811. return e.isReady;
  8812. });
  8813. },
  8814. enumerable: !0,
  8815. configurable: !0
  8816. }), Object.defineProperty(e.prototype, "failstate", {
  8817. get: function() {
  8818. for (var e = 0, t = this.fragments; e < t.length; e++) {
  8819. var n = t[e];
  8820. if (n.failstate) return n.failstate;
  8821. }
  8822. },
  8823. enumerable: !0,
  8824. configurable: !0
  8825. }), Object.defineProperty(e.prototype, "fragmentInFailstate", {
  8826. get: function() {
  8827. for (var e = 0, t = this.fragments; e < t.length; e++) {
  8828. var n = t[e];
  8829. if (n.failstate) return n;
  8830. }
  8831. },
  8832. enumerable: !0,
  8833. configurable: !0
  8834. }), Object.defineProperty(e.prototype, "needsFetch", {
  8835. get: function() {
  8836. return this.fragments.some(function(e) {
  8837. return e.needsFetch;
  8838. });
  8839. },
  8840. enumerable: !0,
  8841. configurable: !0
  8842. }), Object.defineProperty(e.prototype, "hasExpired", {
  8843. get: function() {
  8844. return this.fragments.some(function(e) {
  8845. return e.hasExpired;
  8846. });
  8847. },
  8848. enumerable: !0,
  8849. configurable: !0
  8850. }), e.prototype.expire = function() {
  8851. this.fragments.forEach(function(e) {
  8852. return e.expire();
  8853. });
  8854. }, r.__decorate([ i.computed ], e.prototype, "value", null), r.__decorate([ i.computed ], e.prototype, "isLoading", null),
  8855. r.__decorate([ i.computed ], e.prototype, "isReady", null), e;
  8856. }();
  8857. t.FragmentList = d;
  8858. }, function(e, t, n) {
  8859. "use strict";
  8860. Object.defineProperty(t, "__esModule", {
  8861. value: !0
  8862. });
  8863. var r = n(71);
  8864. t.TunguskaContext = r.createContext("Tunguska");
  8865. }, function(e, t, n) {
  8866. "use strict";
  8867. Object.defineProperty(t, "__esModule", {
  8868. value: !0
  8869. });
  8870. var r, o = n(0), i = n(2), a = n(36), s = n(82), u = n(288), l = n(53), c = n(5), p = {};
  8871. !function(e) {
  8872. e[e.finished = 0] = "finished";
  8873. }(r || (r = {}));
  8874. var d = a.getBuildInfo().isFeatureSupported("TweenerAttachTweenFinishedFix");
  8875. function f() {
  8876. return {};
  8877. }
  8878. function m(e) {
  8879. if (!a.getBuildInfo().isRetail()) throw new Error(e);
  8880. }
  8881. function h(e) {
  8882. return "string" == typeof e ? "#" === e.substr(0, 1) : "number" == typeof e ? isFinite(e) : void 0 === e || "object" == typeof e && (null === e || Array.isArray(e) && 4 === e.length);
  8883. }
  8884. t.emptyTweenOptions = f;
  8885. var g = function() {
  8886. function e(e, t, n) {
  8887. void 0 === n && (n = {});
  8888. var r = this;
  8889. this.id = e, this.initialValue = t, this.defaultOptions = n, this._isDestroyed = !1,
  8890. this.runCallback = function() {
  8891. var e = r.callback;
  8892. e && (r.callback = void 0, e());
  8893. }, this.previousInstruction = {
  8894. to: t,
  8895. options: n
  8896. }, p[e] = this, l.nativeApi.createTween(e, void 0 !== t ? t : null);
  8897. }
  8898. return e.destroyTweens = function(e) {
  8899. Object.keys(e).forEach(function(t) {
  8900. e[t].destroy();
  8901. });
  8902. }, e.instructionsEquals = function(t, n) {
  8903. return t.from === n.from && t.to === n.to && e.optionsEquals(t.options, n.options);
  8904. }, e.optionsEquals = function(e, t) {
  8905. return e.duration === t.duration && e.speed === t.speed && e.easing === t.easing && e.delay === t.delay;
  8906. }, e.getStyles = function(t) {
  8907. var n = {};
  8908. return Object.keys(t).forEach(function(r) {
  8909. var o = t[r];
  8910. n[r] = o instanceof e ? o.getStyle() : e.getStyles(o || {});
  8911. }), n;
  8912. }, e.getStyleClass = function(t, n) {
  8913. var r;
  8914. return Object.keys(n).forEach(function(t) {
  8915. var o = n[t];
  8916. if (o instanceof e) {
  8917. var i = o.getStyleClass(t);
  8918. r = r ? c.merge2(r, i) : i;
  8919. } else if (s.options.enableDevWarnings) throw new Error("Tween.getStyleClass called with non-tween (property: " + t + ")");
  8920. }), r || c.emptyStyle;
  8921. }, e.prototype.onTweenStatus = function(e) {
  8922. e === r.finished && this.runCallback();
  8923. }, e.prototype.isDestroyed = function() {
  8924. return this._isDestroyed;
  8925. }, e.prototype.destroy = function() {
  8926. this.cancelAutorun && this.cancelAutorun(), this._isDestroyed = !0, delete p[this.id],
  8927. l.nativeApi.destroyTween(this.id);
  8928. }, e.getTotalDuration = function(e) {
  8929. var t = e.loopCount || 0;
  8930. if (t < 0) return -1;
  8931. var n = e.duration || 0, r = (e.delay || 0) + n;
  8932. return t > 0 && (r += (n + (e.loopDelay || 0)) * t), r;
  8933. }, e.prototype.instruct = function(t, n) {
  8934. if (this._isDestroyed) return n && n(), void (s.options.enableDevWarnings && m("Tween.transition: Trying to update destroyed Tween with id " + this.id));
  8935. if (this.cancelAutorun && this.cancelAutorun(), void 0 === t.from && e.instructionsEquals(this.previousInstruction, t)) n && n(); else {
  8936. if (this.runCallback(), n && (this.callback = n, !d)) {
  8937. var r = e.getTotalDuration(t.options);
  8938. r >= 0 && setTimeout(this.runCallback, r);
  8939. }
  8940. t = function o(e) {
  8941. if (h(e.from) || (e = Object.assign({}, e, {
  8942. from: null
  8943. }), m("Infinity or NaN passed in Tween from value")), h(e.to) || (e = Object.assign({}, e, {
  8944. to: null
  8945. }), m("Infinity or NaN passed in Tween to value")), e.options && null != e.options.duration && !isFinite(e.options.duration)) {
  8946. var t = Object.assign({}, e.options, {
  8947. duration: null
  8948. });
  8949. e = Object.assign({}, e, {
  8950. options: t
  8951. }), m("Infinity or NaN passed in Tween duration value");
  8952. }
  8953. return e;
  8954. }(t), this.previousInstruction = t, u.tweenBatcher.batch.push({
  8955. tween: this,
  8956. instruction: t
  8957. }), 0 === u.tweenBatcher.depth && u.tweenBatcher.flush(l.nativeApi);
  8958. }
  8959. }, e.prototype.transition = function(e, t, n, r) {
  8960. this.instruct({
  8961. from: e,
  8962. to: t,
  8963. options: o.__assign({}, this.defaultOptions, n)
  8964. }, r);
  8965. }, e.prototype.promiseTransition = function(e, t, n) {
  8966. var r = this;
  8967. return new Promise(function(o) {
  8968. r.transition(e, t, n, o);
  8969. });
  8970. }, e.prototype.autorun = function(e) {
  8971. var t = this;
  8972. this.cancelAutorun && this.cancelAutorun(), this.cancelAutorun = i.autorun(function() {
  8973. return e(t);
  8974. });
  8975. }, e.prototype.to = function(e, t, n) {
  8976. this.transition(void 0, e, t, n);
  8977. }, e.prototype.promiseTo = function(e, t) {
  8978. var n = this;
  8979. return new Promise(function(r) {
  8980. n.to(e, t, r);
  8981. });
  8982. }, e.prototype.set = function(e) {
  8983. this.transition(e, e, {
  8984. speed: null,
  8985. duration: 1
  8986. });
  8987. }, e.prototype.get = function() {
  8988. return this._isDestroyed ? (s.options.enableDevWarnings && m("Tween.get: Trying to get a value for destroyed Tween with id " + this.id),
  8989. 0) : l.nativeApi.getTweenValueSync(this.id);
  8990. }, e.prototype.getStyle = function() {
  8991. return this.id;
  8992. }, e.prototype.getStyleClass = function(e) {
  8993. var t, n = ((t = {})[e] = this.id, t);
  8994. return c.DynamicStyle.create(n, "Tween-" + this.id + "-" + e);
  8995. }, e;
  8996. }();
  8997. t.Tween = g, l.nativeApi.onTweenStatus = d ? function(e, t) {
  8998. var n = p[e];
  8999. n && n.onTweenStatus(t);
  9000. } : function() {};
  9001. var y = function() {
  9002. function e(e, t, n) {
  9003. this.id = e, this.initialValue = t, this.options = n;
  9004. }
  9005. return e.prototype.ensureTween = function(e) {
  9006. return this.tween ? e(this.tween) : e(this.createTween(this.initialValue()));
  9007. }, e.prototype.createTween = function(e) {
  9008. return this.tween = new g(this.id, this.initialValue(), this.options ? this.options() : void 0),
  9009. this.tween;
  9010. }, e.prototype.to = function(e) {
  9011. return this.ensureTween(function(t) {
  9012. return t.to(e);
  9013. });
  9014. }, e.prototype.promiseTo = function(e) {
  9015. return this.ensureTween(function(t) {
  9016. return t.promiseTo(e);
  9017. });
  9018. }, e.prototype.set = function(e) {
  9019. return this.createTween(e);
  9020. }, e.prototype.destroy = function() {
  9021. this.tween && this.tween.destroy();
  9022. }, e.prototype.getStyle = function() {
  9023. return this.ensureTween(function(e) {
  9024. return e.getStyle();
  9025. });
  9026. }, e.prototype.getStyleClass = function(e) {
  9027. return this.ensureTween(function(t) {
  9028. return t.getStyleClass(e);
  9029. });
  9030. }, e;
  9031. }();
  9032. t.LazyTween = y;
  9033. }, function(e, t, n) {
  9034. "use strict";
  9035. n.r(t), n.d(t, "useObservable", function() {
  9036. return i;
  9037. }), n.d(t, "useComputed", function() {
  9038. return a;
  9039. }), n.d(t, "useDisposable", function() {
  9040. return u;
  9041. }), n.d(t, "isUsingStaticRendering", function() {
  9042. return p;
  9043. }), n.d(t, "useStaticRendering", function() {
  9044. return c;
  9045. }), n.d(t, "observer", function() {
  9046. return S;
  9047. }), n.d(t, "useObserver", function() {
  9048. return y;
  9049. }), n.d(t, "Observer", function() {
  9050. return b;
  9051. }), n.d(t, "useForceUpdate", function() {
  9052. return h;
  9053. });
  9054. var r = n(2), o = n(1);
  9055. if (!o.useState) throw new Error("mobx-react-lite requires React with Hooks support");
  9056. if (!r.spy) throw new Error("mobx-react-lite requires mobx at least version 4 to be available");
  9057. function i(e) {
  9058. var t = Object(o.useRef)(null);
  9059. return t.current || (t.current = Object(r.observable)(e)), t.current;
  9060. }
  9061. function a(e, t) {
  9062. return void 0 === t && (t = []), Object(o.useMemo)(function() {
  9063. return Object(r.computed)(e);
  9064. }, t).get();
  9065. }
  9066. var s = function() {};
  9067. function u(e, t) {
  9068. void 0 === t && (t = []);
  9069. var n = Object(o.useRef)(null), r = Object(o.useRef)(!1);
  9070. function i(t) {
  9071. if (r.current) return s;
  9072. if (!n.current) {
  9073. var o = e();
  9074. if ("function" != typeof o) {
  9075. var i = new Error("generated disposer must be a function");
  9076. return console.error(i), s;
  9077. }
  9078. n.current = o;
  9079. }
  9080. return function() {
  9081. n.current && (n.current(), n.current = null), t && (r.current = !0);
  9082. };
  9083. }
  9084. return Object(o.useEffect)(function() {
  9085. return i(!1);
  9086. }, t), i(!0);
  9087. }
  9088. var l = !1;
  9089. function c(e) {
  9090. l = e;
  9091. }
  9092. function p() {
  9093. return l;
  9094. }
  9095. /*! *****************************************************************************
  9096. Copyright (c) Microsoft Corporation. All rights reserved.
  9097. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  9098. this file except in compliance with the License. You may obtain a copy of the
  9099. License at http://www.apache.org/licenses/LICENSE-2.0
  9100.  
  9101. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  9102. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  9103. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9104. MERCHANTABLITY OR NON-INFRINGEMENT.
  9105.  
  9106. See the Apache Version 2.0 License for specific language governing permissions
  9107. and limitations under the License.
  9108. ***************************************************************************** */ var d = function() {
  9109. return (d = Object.assign || function e(t) {
  9110. for (var n, r = 1, o = arguments.length; r < o; r++) for (var i in n = arguments[r]) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
  9111. return t;
  9112. }).apply(this, arguments);
  9113. };
  9114. function f(e) {
  9115. return e.current ? Object(r.getDependencyTree)(e.current) : "<unknown>";
  9116. }
  9117. var m = [];
  9118. function h() {
  9119. var e = function t(e, n) {
  9120. var r = "function" == typeof Symbol && e[Symbol.iterator];
  9121. if (!r) return e;
  9122. var o, i, a = r.call(e), s = [];
  9123. try {
  9124. for (;(void 0 === n || n-- > 0) && !(o = a.next()).done; ) s.push(o.value);
  9125. } catch (e) {
  9126. i = {
  9127. error: e
  9128. };
  9129. } finally {
  9130. try {
  9131. o && !o.done && (r = a.return) && r.call(a);
  9132. } finally {
  9133. if (i) throw i.error;
  9134. }
  9135. }
  9136. return s;
  9137. }(Object(o.useState)(0), 2)[1];
  9138. return Object(o.useCallback)(function() {
  9139. e(function(e) {
  9140. return e + 1;
  9141. });
  9142. }, []);
  9143. }
  9144. var g = {};
  9145. function y(e, t, n) {
  9146. if (void 0 === t && (t = "observed"), void 0 === n && (n = g), p()) return e();
  9147. var i, a, s = (n.useForceUpdate || h)(), u = Object(o.useRef)(null);
  9148. if (u.current || (u.current = new r.Reaction("observer(" + t + ")", function() {
  9149. s();
  9150. })), Object(o.useDebugValue)(u, f), function l(e) {
  9151. Object(o.useEffect)(function() {
  9152. return e;
  9153. }, m);
  9154. }(function() {
  9155. u.current.dispose();
  9156. }), u.current.track(function() {
  9157. try {
  9158. i = e();
  9159. } catch (e) {
  9160. a = e;
  9161. }
  9162. }), a) throw u.current.dispose(), a;
  9163. return i;
  9164. }
  9165. function S(e, t) {
  9166. if (p()) return e;
  9167. var n, r = d({
  9168. forwardRef: !1
  9169. }, t), i = e.displayName || e.name, a = function(t, n) {
  9170. return y(function() {
  9171. return e(t, n);
  9172. }, i);
  9173. };
  9174. return a.displayName = i, n = r.forwardRef ? Object(o.memo)(Object(o.forwardRef)(a)) : Object(o.memo)(a),
  9175. function s(e, t) {
  9176. Object.keys(e).forEach(function(n) {
  9177. e.hasOwnProperty(n) && !v[n] && Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(e, n));
  9178. });
  9179. }(e, n), n.displayName = i, n;
  9180. }
  9181. var v = {
  9182. $$typeof: !0,
  9183. render: !0,
  9184. compare: !0,
  9185. type: !0
  9186. };
  9187. function b(e) {
  9188. var t = e.children, n = e.render, r = t || n;
  9189. return "function" != typeof r ? null : y(r);
  9190. }
  9191. function _(e, t, n, r, o) {
  9192. var i = "children" === t ? "render" : "children", a = "function" == typeof e[t], s = "function" == typeof e[i];
  9193. return a && s ? new Error("MobX Observer: Do not use children and render in the same time in`" + n) : a || s ? null : new Error("Invalid prop `" + o + "` of type `" + typeof e[t] + "` supplied to `" + n + "`, expected `function`.");
  9194. }
  9195. b.propTypes = {
  9196. children: _,
  9197. render: _
  9198. }, b.displayName = "Observer";
  9199. }, function(e, t, n) {
  9200. "use strict";
  9201. Object.defineProperty(t, "__esModule", {
  9202. value: !0
  9203. });
  9204. var r = n(310), o = n(987), i = new r.GameExpansion({
  9205. name: "DEFAULT",
  9206. mask: 1,
  9207. license: "",
  9208. prettyName: ""
  9209. }), a = [ "OFFICIAL", "RANKED", "UNRANKED", "PRIVATE" ], s = function() {
  9210. function e(t) {
  9211. void 0 === t && (t = {});
  9212. var n = this;
  9213. this.region = t.region || "", this.country = t.country || "", this.game = t.game || "",
  9214. this.gameId = t.gameId ? t.gameId + "" : "", this.platform = t.platform || "", this.guid = t.guid || "",
  9215. this.protocolVersion = t.protocolVersion || "", this.mapMode = t.mapMode || "",
  9216. this.mapModePretty = t.mapModePretty || "", this.mapVariant = t.mapVariant, this.mapName = t.mapName || "",
  9217. this.mapNamePretty = t.mapNamePretty || "", this.mapImageUrl = t.mapImageUrl || "",
  9218. this.name = t.name ? t.name.trim() : "", this.description = t.description || "",
  9219. this.ranked = t.ranked || !1, this.preset = t.preset || "", this.serverType = e.isCorrectServerType(t.serverType) ? t.serverType : "OFFICIAL",
  9220. this.tickRate = t.tickRate || -1, this.ip = t.ip || "", this.pingSiteAlias = t.pingSiteAlias || "",
  9221. this.passwordProtected = t.passwordProtected || !1, this.custom = t.custom || !1,
  9222. this.isFavorite = t.isFavorite || !1, this.mapExpansion = t.mapExpansion || i, this.isActive = void 0 === t.isActive || t.isActive,
  9223. this.experience = t.experience || "", this.operationIndex = t.operationIndex, this.forceJoin = t.forceJoin,
  9224. this.imageUrl = t.imageUrl, this.mixId = t.mixId, this.serverMode = t.serverMode,
  9225. this.playgroundId = t.playgroundId, this.overallGameMode = t.overallGameMode, t.owner ? (this.owner = t.owner,
  9226. this.ownerId = t.owner.ownerId) : this.ownerId = t.ownerId, this.expansions = Array.isArray(t.expansions) ? t.expansions.map(function(e) {
  9227. return new r.GameExpansion(e);
  9228. }) : [];
  9229. var a = t.slots || {};
  9230. this.slots = {
  9231. soldier: new o.GameServerSlot(a.soldier || a.Soldier),
  9232. commander: new o.GameServerSlot(a.commander || a.Commander),
  9233. queue: new o.GameServerSlot(a.queue || a.Queue),
  9234. spectator: new o.GameServerSlot(a.spectator || a.Spectator)
  9235. }, this.expansionMask = 0, this.expansions && this.expansions.forEach(function(e) {
  9236. n.expansionMask += e.mask;
  9237. }), this.rsp = t.rsp;
  9238. }
  9239. return e.fromBackend = function(t) {
  9240. return new e(t);
  9241. }, e.prototype.hasAvailableSlotsForRole = function(e) {
  9242. var t = this.slots[e];
  9243. return t && t.current < t.max;
  9244. }, e.prototype.isRoleSupported = function(e) {
  9245. var t = this.slots[e];
  9246. return t && t.max > 0;
  9247. }, Object.defineProperty(e.prototype, "isCompetitive", {
  9248. get: function() {
  9249. return !!this.serverMode && "CMP" === this.serverMode.slice(0, 3);
  9250. },
  9251. enumerable: !0,
  9252. configurable: !0
  9253. }), Object.defineProperty(e.prototype, "isClosedCompetitive", {
  9254. get: function() {
  9255. return this.isCompetitive && "CMPSTANDARD" !== this.serverMode;
  9256. },
  9257. enumerable: !0,
  9258. configurable: !0
  9259. }), e.isCorrectServerType = function(e) {
  9260. return !!e && a.indexOf(e) > -1;
  9261. }, Object.defineProperty(e.prototype, "isTournament", {
  9262. get: function() {
  9263. return !!this.serverMode && "MPTOURNAMENT" === this.serverMode;
  9264. },
  9265. enumerable: !0,
  9266. configurable: !0
  9267. }), e;
  9268. }();
  9269. t.GameServer = s;
  9270. }, function(e, t, n) {
  9271. "use strict";
  9272. (function(__) {
  9273. Object.defineProperty(t, "__esModule", {
  9274. value: !0
  9275. });
  9276. var e = n(0), r = n(1), o = n(405), i = n(2), a = n(4), s = n(77), u = n(11), l = n(10), c = n(6), p = n(64), d = n(21), f = n(211), m = n(5), h = n(29), g = n(8), y = n(25), S = n(37), v = n(19), b = n(71), _ = n(552), T = n(59), E = n(261);
  9277. t.ListFocusGroupContext = b.createModernContext("ListFocusGroup");
  9278. var C = function(n) {
  9279. function o(e, t) {
  9280. var r = n.call(this, e, t) || this;
  9281. return r.sparta = g.SpartaContext.getFromComponent(r), e.focusGroup || null === e.focusGroup ? r.focusGroup = e.focusGroup : r.focusGroup = r.sparta.twinkle.focus.createComponentGroup(r, "list", S.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | S.GroupBehavior.VERTICAL),
  9282. r;
  9283. }
  9284. return e.__extends(o, n), o.prototype.render = function() {
  9285. return r.createElement("surface", {
  9286. style: this.props.style
  9287. }, r.createElement(t.ListFocusGroupContext.Provider, {
  9288. value: this.focusGroup
  9289. }, this.props.children));
  9290. }, o.contextTypes = g.SpartaContext.contextTypes, o = e.__decorate([ a.observer ], o);
  9291. }(r.Component);
  9292. t.List = C, t.ListItemBackground = s.observer(function e(t) {
  9293. var n = v.useTheme(), o = s.useComputed(function() {
  9294. return t.selectionState.activeItemIndex === t.index && !t.disableActiveIndicator;
  9295. }, [ t ]), i = n.list, a = t.faded, u = void 0 !== a && a, l = t.focusItem, c = !!l && l.isFocused, p = !!l && l.isHovered, d = !!l && l.isPressed;
  9296. return r.createElement("surface", {
  9297. style: i.backgroundContainer(u, o, c, p, d)
  9298. }, r.createElement("surface", {
  9299. style: i.backgroundOverlay(u, o, c, p, d)
  9300. }));
  9301. });
  9302. var I = function(t) {
  9303. function n() {
  9304. var e = null !== t && t.apply(this, arguments) || this;
  9305. return e.getTheme = v.ThemeContext.getFromComponent(e), e.opacityTween = f.TweenStyle.create("de2e38e8:120:38", e, "opacity", function() {
  9306. return e.getTheme();
  9307. }, function(t, n) {
  9308. t.set(e.isActive ? 1 : 0);
  9309. }), e;
  9310. }
  9311. return e.__extends(n, t), Object.defineProperty(n.prototype, "isActive", {
  9312. get: function() {
  9313. return this.props.selectionState.activeItemIndex === this.props.index;
  9314. },
  9315. enumerable: !0,
  9316. configurable: !0
  9317. }), n.prototype.render = function() {
  9318. var e = this.getTheme().list;
  9319. return r.createElement("surface", {
  9320. key: "activeIndicator",
  9321. style: m.merge2(e.activeIndicator, this.opacityTween)
  9322. });
  9323. }, n.contextTypes = v.ThemeContext.contextTypes, e.__decorate([ i.computed ], n.prototype, "isActive", null),
  9324. n = e.__decorate([ a.observer ], n);
  9325. }(r.Component);
  9326. function A() {
  9327. return t.ListItemContext.use();
  9328. }
  9329. t.ListItemContext = b.createModernContext("ListItem"), t.useListItemContext = A;
  9330. var w = function(n) {
  9331. function o(e, t) {
  9332. var r = n.call(this, e, t) || this;
  9333. return r.getInput = function() {
  9334. if (r.focusItem.isFocused && r.sparta.twinkle.focus.controllerMode) return r.input;
  9335. }, r.sparta = r.props.theme.sparta, r.focusItem = e.focusItem, r.focusItem.autoFocusCandidate = !0,
  9336. r.focusItem.onClick.listen(function() {
  9337. [].concat(r.input).forEach(function(e) {
  9338. e.action && e.action();
  9339. });
  9340. }), e.focusGroup && e.focusGroup.addMember(r.focusItem, r.props.index), r;
  9341. }
  9342. return e.__extends(o, n), Object.defineProperty(o.prototype, "input", {
  9343. get: function() {
  9344. var e = this;
  9345. return this.props.input ? this.props.input : (this.defaultInput || (this.defaultInput = new u.Input({
  9346. label: __("ID_SPARTA_ACTION_SELECT"),
  9347. key: l.Keys.Accept,
  9348. action: _.withDoubleClickHandler(this.sparta.twinkle.buildInfo.isPC, this.props.inputAction, function() {
  9349. e.props.onDoubleClick && e.props.onDoubleClick(e.props.index);
  9350. })
  9351. })), this.defaultInput);
  9352. },
  9353. enumerable: !0,
  9354. configurable: !0
  9355. }), Object.defineProperty(o.prototype, "getItemContextState", {
  9356. get: function() {
  9357. return {
  9358. index: this.props.index,
  9359. focusItem: this.focusItem,
  9360. selectionState: this.props.selectionState,
  9361. disableActiveIndicator: !!this.props.disableActiveIndicator,
  9362. faded: !!this.props.faded
  9363. };
  9364. },
  9365. enumerable: !0,
  9366. configurable: !0
  9367. }), o.prototype.render = function() {
  9368. var n = this.props, o = n.children, i = n.selectionState, a = n.index, s = n.theme, u = n.style, l = n.faded, c = void 0 !== l && l, p = this.focusItem, d = s.components.HoverSFX, f = s.list;
  9369. return r.createElement(y.InputRegistration, {
  9370. debugName: "de2e38e8:252:43",
  9371. getInput: this.getInput
  9372. }, r.createElement(t.ListItemContext.Provider, {
  9373. value: this.getItemContextState
  9374. }, r.createElement(d, {
  9375. focusItem: this.focusItem
  9376. }, r.createElement("surface", e.__assign({
  9377. style: m.merge2(f.container(c), u)
  9378. }, p.hooks), f.showSeparator && 0 === a && r.createElement("surface", {
  9379. style: f.separator
  9380. }), r.createElement(t.ListItemBackground, {
  9381. focusItem: this.focusItem,
  9382. selectionState: i,
  9383. index: a,
  9384. faded: this.props.faded,
  9385. disableActiveIndicator: this.props.disableActiveIndicator
  9386. }), !this.props.disableActiveIndicator && f.showActiveIndicator && r.createElement(I, {
  9387. focusItem: this.focusItem,
  9388. selectionState: i,
  9389. index: a
  9390. }), "function" == typeof o ? o(p, f.itemContent) : r.createElement("surface", {
  9391. style: f.itemContent
  9392. }, o), f.showSeparator && r.createElement("surface", {
  9393. style: f.separator
  9394. })))));
  9395. }, e.__decorate([ i.computed ], o.prototype, "getItemContextState", null), o = e.__decorate([ a.observer ], o);
  9396. }(r.Component);
  9397. function P(e) {
  9398. var n = v.useTheme(), r = t.ListFocusGroupContext.use();
  9399. return {
  9400. theme: n,
  9401. focusItem: T.useMaybeFocusItem(e.debugName, e.focusItem),
  9402. focusGroup: r
  9403. };
  9404. }
  9405. function R() {}
  9406. t.BaseListItem = w, t.ListItem = s.observer(function t(n) {
  9407. var o = P(n), i = o.theme, a = o.focusItem, s = o.focusGroup, u = r.useCallback(function(e) {
  9408. e || a.setFocused(S.FocusSource.Mouse, !0), n.selectionState.setActiveItem(n.index);
  9409. }, [ a, n.selectionState, n.index ]);
  9410. return r.createElement(w, e.__assign({}, n, {
  9411. focusItem: a,
  9412. theme: i,
  9413. focusGroup: s,
  9414. inputAction: u
  9415. }));
  9416. }), t.ListItemAutoActive = s.observer(function t(n) {
  9417. var o = P(n), a = o.theme, s = o.focusItem, u = o.focusGroup;
  9418. return r.useEffect(function() {
  9419. return i.reaction(function() {
  9420. return s.isFocusedOrHovered;
  9421. }, function(e) {
  9422. var t = n.selectionState, r = n.index;
  9423. e ? t.setActiveItem(r) : t.keepLastSelection || t.activeItemIndex !== r || t.setActiveItem(-1);
  9424. }, {
  9425. fireImmediately: !0
  9426. });
  9427. }, [ s, n.selectionState, n.index ]), r.createElement(w, e.__assign({}, n, {
  9428. focusItem: s,
  9429. theme: a,
  9430. focusGroup: u,
  9431. inputAction: R
  9432. }));
  9433. }), t.ListItemLabel = s.observer(function e(t) {
  9434. var n = v.useTheme(), o = A(), i = t.value, a = t.right, s = void 0 !== a && a, u = t.flex, l = void 0 === u ? 1 : u, c = t.textSize, d = t.color, f = t.rtl, m = t.noMarquee, h = n.list.label(s, l), g = r.createElement(O, {
  9435. value: i,
  9436. textSize: c,
  9437. color: d,
  9438. font: t.font
  9439. });
  9440. return m ? r.createElement("surface", {
  9441. style: h
  9442. }, g) : r.createElement(p.Marquee, {
  9443. style: h,
  9444. focusItem: o.focusItem,
  9445. speed: s ? .3 : void 0,
  9446. delay: s ? 0 : 100,
  9447. scrollTo: s ? p.Direction.Left : p.Direction.Right,
  9448. rtl: f
  9449. }, g);
  9450. });
  9451. var O = s.observer(function e(t) {
  9452. var n = v.useTheme(), o = A(), i = s.useComputed(function() {
  9453. return !o.disableActiveIndicator && o.selectionState.activeItemIndex === o.index;
  9454. }, [ o ]), a = t.textSize, u = void 0 === a ? d.TextSize.S : a, l = n.list, p = o.focusItem, f = t.color, g = o.faded, y = p.isFocused, S = p.isHovered, b = p.isPressed, _ = m.merge2(l.labelText, f ? l.labelTextDynamicColor({
  9455. faded: g,
  9456. active: i,
  9457. focused: y,
  9458. hovered: S,
  9459. pressed: b,
  9460. color: f
  9461. }) : l.labelTextColor(g, i, y, S, b));
  9462. return r.createElement(c.Text, {
  9463. size: u,
  9464. style: _,
  9465. value: t.value,
  9466. type: h.TextType.LIGHT,
  9467. font: t.font
  9468. });
  9469. });
  9470. t.ListItemIcon = s.observer(function e(t) {
  9471. var n = v.useTheme(), o = A(), i = s.useComputed(function() {
  9472. return !o.disableActiveIndicator && o.selectionState.activeItemIndex === o.index;
  9473. }, [ o ]), a = n.list, u = o.focusItem, l = t.color, c = o.faded, p = u.isFocused, d = u.isHovered, f = u.isPressed, h = m.merge2(a.icon({
  9474. size: t.size,
  9475. texture: t.src
  9476. }), l ? a.labelTextDynamicColor({
  9477. faded: c,
  9478. active: i,
  9479. focused: p,
  9480. hovered: d,
  9481. pressed: f,
  9482. color: l
  9483. }) : a.labelTextColor(c, i, p, d, f));
  9484. return r.createElement("surface", {
  9485. style: h
  9486. });
  9487. }), t.ListHeader = s.observer(function e(t) {
  9488. var n = v.useTheme().list;
  9489. return r.createElement("surface", {
  9490. style: n.container(!1)
  9491. }, r.createElement("surface", {
  9492. style: n.headerContent
  9493. }, r.createElement(c.Text, {
  9494. size: "S",
  9495. type: h.TextType.EMPHASIS,
  9496. style: n.headerText,
  9497. value: t.value.toUpperCase()
  9498. })), r.createElement("surface", {
  9499. style: n.separator
  9500. }));
  9501. }), t.ListItemContextMenu = s.observer(function e(t) {
  9502. var n = t.menuItems, i = t.style, a = g.SpartaContext.use(), s = v.useTheme(), c = r.useRef(!1), p = r.useState(!1), d = p[0], f = p[1], h = A(), S = h.focusItem, b = h.faded, _ = r.useCallback(function() {
  9503. var e = S.bounds;
  9504. e && (c.current = !0, f(!0), o.display({
  9505. menuItems: E.toContextMenuItems("function" == typeof n ? n() : n),
  9506. position: {
  9507. x: e.right - a.uiState.viewportPosition.left,
  9508. y: e.bottom - a.uiState.viewportPosition.top
  9509. },
  9510. align: E.Alignment.Right,
  9511. onClose: function() {
  9512. c.current && (c.current = !1, f(!1));
  9513. },
  9514. customWidth: e.width,
  9515. theme: s
  9516. }));
  9517. }, [ S, n ]);
  9518. r.useEffect(function() {
  9519. var e = S.onClick.listen(_);
  9520. return function() {
  9521. e(), c.current && (c.current = !1, o.hide());
  9522. };
  9523. }, [ S, _ ]);
  9524. var T = r.useCallback(function() {
  9525. return a.twinkle.focus.controllerMode && S.isFocused ? new u.Input({
  9526. key: l.Keys.Accept,
  9527. label: __("ID_SPARTA_ACTION_SELECT"),
  9528. action: _
  9529. }) : d ? new u.Input({
  9530. key: l.Keys.Decline,
  9531. label: __("ID_SPARTA_ACTION_CLOSE"),
  9532. action: o.hide
  9533. }) : void 0;
  9534. }, [ d, _ ]), C = S.isFocused, I = S.isHovered, w = S.isPressed, P = s.list, R = P.labelTextColor(b, !1, C, I, w);
  9535. return r.createElement(y.InputRegistration, {
  9536. debugName: "de2e38e8:606:39",
  9537. getInput: T
  9538. }, r.createElement("surface", {
  9539. style: m.merge3(P.dots, R, i)
  9540. }));
  9541. });
  9542. }).call(this, n(3));
  9543. }, function(e, t, n) {
  9544. "use strict";
  9545. Object.defineProperty(t, "__esModule", {
  9546. value: !0
  9547. });
  9548. var r = n(98);
  9549. t.tunguskaFeatureFlags = r.featureFlags.register({
  9550. tunguskaAssignmentsPauseMenu: new r.FeatureFlag({}),
  9551. tunguskaAssignments: new r.FeatureFlag({}),
  9552. tunguskaCTEAssignments: new r.FeatureFlag({}),
  9553. tunguskaCustomizeFrontend: new r.FeatureFlag({}),
  9554. tunguskaRSP: new r.FeatureFlag({}),
  9555. tunguskaPremiumPassPagePrio: new r.FeatureFlag({}),
  9556. tunguskaCTERegister: new r.FeatureFlag({}),
  9557. tunguskaICERegister: new r.FeatureFlag({}),
  9558. tunguskaCTESpectator: new r.FeatureFlag({}),
  9559. ingameBattlepackVideos: new r.FeatureFlag({}),
  9560. disableBattlepackVideos: new r.FeatureFlag({}),
  9561. eorPersonalTabForFreemium: new r.FeatureFlag({}),
  9562. bf1CteEorFeedback: new r.FeatureFlag({}),
  9563. tunguskaEorFeedback: new r.FeatureFlag({}),
  9564. tunguskaCTEShowInstallMessage: new r.FeatureFlag({}),
  9565. ingameBattlepacks: new r.FeatureFlag({}),
  9566. simultaneousMedals: new r.FeatureFlag({}),
  9567. tunguskaConquestAssaultEnabled: new r.FeatureFlag({}),
  9568. tunguskaConquestAssaultTutorials: new r.FeatureFlag({}),
  9569. tunguskaEndOfRoundBattleplan: new r.FeatureFlag({}),
  9570. tunguskaEndOfRoundBattleplanClaimButton: new r.FeatureFlag({})
  9571. });
  9572. }, function(e, t, n) {
  9573. e.exports = !n(42)(function() {
  9574. return 7 != Object.defineProperty({}, "a", {
  9575. get: function() {
  9576. return 7;
  9577. }
  9578. }).a;
  9579. });
  9580. }, function(e, t, n) {
  9581. "use strict";
  9582. Object.defineProperty(t, "__esModule", {
  9583. value: !0
  9584. });
  9585. var r = function() {
  9586. return function e() {
  9587. this.defaultTextStyle = void 0, this.useNativeStyles = !1, this.useNativeTextureFadeIn = !1,
  9588. this.enableMouse = !0, this.enableDevWarnings = !0, this.enableLogging = !0, this.onErrorCallback = function() {
  9589. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  9590. }, this.urlHook = function(e) {
  9591. return e;
  9592. }, this.styleHook = function(e, t) {
  9593. return t;
  9594. }, this.batchCallTransformer = function(e) {
  9595. return e;
  9596. };
  9597. };
  9598. }();
  9599. t.Options = r, t.options = new r();
  9600. }, function(e, t, n) {
  9601. "use strict";
  9602. Object.defineProperty(t, "__esModule", {
  9603. value: !0
  9604. });
  9605. var r, o = n(0), i = n(168), a = n(386), s = n(2), u = n(938), l = n(515);
  9606. !function(e) {
  9607. e.ON = "on", e.OFF = "off";
  9608. }(r = t.FilterValue || (t.FilterValue = {})), function(e) {
  9609. e.EOR = "end-of-round";
  9610. }(t.MatchmakingContext || (t.MatchmakingContext = {}));
  9611. var c = function() {
  9612. return function e() {};
  9613. }();
  9614. function p(e, t) {
  9615. var n = s.observable.map();
  9616. return e && Object.keys(e).forEach(function(r) {
  9617. n.set(r, e[r]), t && l.withOriginal(r, t, function(t) {
  9618. n.set(t.filterKey, e[r]);
  9619. });
  9620. }), n;
  9621. }
  9622. t.FilterCategory = c;
  9623. var d = function(e) {
  9624. function t(t, n, r) {
  9625. var o = e.call(this) || this;
  9626. return o.name = t, o.values = p(n, r), o.optionsCategory = r, o;
  9627. }
  9628. return o.__extends(t, e), t;
  9629. }(c);
  9630. t.CheckBoxFilterCategory = d;
  9631. var f = function(e) {
  9632. function t(t, n, r) {
  9633. var o = e.call(this) || this;
  9634. return o.name = t, o.values = p(n), o.optionsCategory = r, o;
  9635. }
  9636. return o.__extends(t, e), t;
  9637. }(c);
  9638. t.OnOffFilterCategory = f;
  9639. var m = function(e) {
  9640. function t(t, n, r) {
  9641. var o = e.call(this) || this;
  9642. return o.name = t, o.values = p(n), o.optionsCategory = r, o;
  9643. }
  9644. return o.__extends(t, e), t;
  9645. }(c);
  9646. t.RangeFilterCategory = m;
  9647. var h, g = function(e) {
  9648. function t(t, n, r) {
  9649. var o = e.call(this) || this;
  9650. return o.name = t, o.values = p(n), o.optionsCategory = r, o;
  9651. }
  9652. return o.__extends(t, e), t;
  9653. }(c);
  9654. function y(e) {
  9655. switch (e) {
  9656. case r.ON:
  9657. return r.OFF;
  9658.  
  9659. case r.OFF:
  9660. return;
  9661.  
  9662. default:
  9663. return r.ON;
  9664. }
  9665. }
  9666. function S(e) {
  9667. if (e instanceof i.BoolFilterOptionsCategory) return e;
  9668. }
  9669. function v(e) {
  9670. if (e instanceof i.IntFilterOptionsCategory) return e;
  9671. }
  9672. function b(e) {
  9673. if (e instanceof i.ScalesFilterOptionsCategory) return e;
  9674. }
  9675. t.ScalesFilterCategory = g, t.getNextOnOrOffValue = y, function(e) {
  9676. e.Maps = "maps", e.GameModes = "gameModes", e.Slots = "slots", e.ServerType = "serverType",
  9677. e.Regions = "regions", e.PingSites = "pingSites", e.Presets = "presets", e.TickRates = "tickRates",
  9678. e.GameSizes = "gameSizes", e.Advanced = "advanced", e.Rules = "rules", e.Kits = "kits",
  9679. e.Vehicles = "vehicles", e.WeaponClasses = "weaponClasses", e.Misc = "misc", e.Scales = "scales",
  9680. e.Experiences = "experiences", e.Mixes = "mixes", e.Difficulties = "difficulties",
  9681. e.ServerMode = "serverMode";
  9682. }(h = t.FilterCategoryName || (t.FilterCategoryName = {})), t.FilterCategoryNames = [ h.Maps, h.GameModes, h.Slots, h.ServerType, h.Regions, h.PingSites, h.Presets, h.TickRates, h.GameSizes, h.Advanced, h.Rules, h.Kits, h.Vehicles, h.WeaponClasses, h.Misc, h.Scales, h.Experiences, h.Mixes, h.Difficulties, h.ServerMode ],
  9683. t.ServerFilterNameField = "name";
  9684. var _ = function() {
  9685. function e(e, t) {
  9686. void 0 === t && (t = {}), this.filterOptions = t, this.name = s.observable({
  9687. name: ""
  9688. }), this.version = e.version || 6, this.categories = {
  9689. maps: new d(h.Maps, e.maps, S(t.maps)),
  9690. gameModes: new d(h.GameModes, e.gameModes, S(t.gameModes)),
  9691. vehicles: new f(h.Vehicles, e.vehicles, S(t.vehicles)),
  9692. weaponClasses: new f(h.WeaponClasses, e.weaponClasses, S(t.weaponClasses)),
  9693. slots: new d(h.Slots, this.prepareSlotsDict(e.slots), S(t.slots)),
  9694. serverType: new d(h.ServerType, e.serverType, S(t.serverType)),
  9695. regions: new d(h.Regions, e.regions, S(t.regions)),
  9696. pingSites: new d(h.PingSites, e.pingSites, S(t.pingSites)),
  9697. kits: new f(h.Kits, e.kits, S(t.kits)),
  9698. presets: new d(h.Presets, e.presets, S(t.presets)),
  9699. misc: new f(h.Misc, e.misc, S(t.misc)),
  9700. scales: new g(h.Scales, e.scales, b(t.scales)),
  9701. advanced: new f(h.Advanced, e.advanced, S(t.advanced)),
  9702. rules: new m(h.Rules, e.rules, v(t.rules)),
  9703. tickRates: new d(h.TickRates, e.tickRates, S(t.tickRates)),
  9704. gameSizes: new d(h.GameSizes, e.gameSizes, S(t.gameSizes)),
  9705. experiences: new d(h.Experiences, e.experiences, S(t.experiences)),
  9706. mixes: new d(h.Mixes, e.mixes, S(t.mixes)),
  9707. difficulties: new d(h.Difficulties, e.difficulties, S(t.difficulties)),
  9708. serverMode: new f(h.ServerMode, e.serverMode, S(t.serverMode))
  9709. }, "string" == typeof e.name ? this.name.name = e.name : e.name && e.name.name && (this.name.name = e.name.name),
  9710. this.id = e.id || 0, this.filterName = e.filterName || "", this.role = e.role, this.mapRotation = e.mapRotation,
  9711. this.modeRotation = e.modeRotation, this.operationIndex = e.operationIndex, this.playground = e.playground,
  9712. this.isEORMM = e.isEORMM, this.matchmakingContext = e.matchmakingContext;
  9713. }
  9714. return e.prototype.prepareSlotsDict = function(e) {
  9715. var t = {};
  9716. return e && Object.keys(e).forEach(function(n) {
  9717. var r = e[n];
  9718. void 0 !== r && (t[n] = r);
  9719. }), t;
  9720. }, e.prototype.getCategory = function(e) {
  9721. return this.categories[e];
  9722. }, e.prototype.serialize = function() {
  9723. return u.formatFilter(Object.assign({
  9724. version: this.version,
  9725. name: this.name.name,
  9726. role: this.role,
  9727. passwordProtected: this.name.name ? void 0 : "off",
  9728. mapRotation: this.mapRotation,
  9729. modeRotation: this.modeRotation,
  9730. operationIndex: this.operationIndex,
  9731. playground: this.playground,
  9732. isEORMM: this.isEORMM,
  9733. matchmakingContext: this.matchmakingContext
  9734. }, a.mapValues(this.categories, function(e) {
  9735. return e.values.toJSON();
  9736. })));
  9737. }, Object.defineProperty(e.prototype, "json", {
  9738. get: function() {
  9739. return JSON.stringify(this.serialize());
  9740. },
  9741. enumerable: !0,
  9742. configurable: !0
  9743. }), e.prototype.toggleAll = function(e) {
  9744. var t = this.getCategory(e);
  9745. if (!t || !t.optionsCategory) return this;
  9746. var n, o = t.optionsCategory.options.concat(t.optionsCategory.clonedOptions).map(function(e) {
  9747. return e.filterKey;
  9748. });
  9749. if (t instanceof d) {
  9750. var i = o.every(function(e) {
  9751. return t.values.get(e) === r.ON;
  9752. });
  9753. o.forEach(function(e) {
  9754. return t.values.set(e, i ? void 0 : r.ON);
  9755. });
  9756. }
  9757. t instanceof f && (n = o.every(function(e) {
  9758. return t.values.get(e) === r.ON;
  9759. }) ? r.OFF : o.every(function(e) {
  9760. return t.values.get(e) === r.OFF;
  9761. }) ? void 0 : r.ON, o.every(function(e) {
  9762. return t.values.get(e) === n;
  9763. }) || o.forEach(function(e) {
  9764. return t.values.set(e, n);
  9765. }));
  9766. }, e.prototype.invertCategory = function(e) {
  9767. var t = this.getCategory(e);
  9768. if (!t || !t.optionsCategory) return this;
  9769. t.optionsCategory.options.concat(t.optionsCategory.clonedOptions).map(function(e) {
  9770. return e.filterKey;
  9771. }).forEach(function(e) {
  9772. null == t.values.get(e) ? t.values.set(e, r.ON) : t.values.delete(e);
  9773. });
  9774. }, e.prototype.setName = function(e) {
  9775. this.name.name = e;
  9776. }, e.prototype.toggleFilterCondition = function(e, t) {
  9777. var n, o = this.getCategory(e), i = o.values.get(t), a = this.categories.mixes;
  9778. if (a.values.size > 0 && e !== h.Slots && e !== h.Regions && a.values.clear(), o instanceof d && (i === r.ON ? o.values.delete(t) : o.values.set(t, r.ON)),
  9779. o instanceof f && o.values.set(t, y(i)), o instanceof m && o.optionsCategory) {
  9780. var s = void 0, u = o.optionsCategory.options.find(function(e) {
  9781. return e.filterKey === t;
  9782. });
  9783. if (!u) return;
  9784. null == i && "number" == typeof u.defaultValue && (s = [ u.defaultValue, u.defaultValue ]),
  9785. o.values.set(t, s);
  9786. }
  9787. if (o instanceof g && o.optionsCategory) {
  9788. var l = o.optionsCategory.options.find(function(e) {
  9789. return e.filterKey === t;
  9790. });
  9791. if (!l) return;
  9792. var c = Object.keys(l.options).sort(function(e, t) {
  9793. return l.options[e] - l.options[t];
  9794. }), p = c.filter(function(e) {
  9795. return o.values.get(e) === r.ON;
  9796. }), S = p.length > 0 ? p[0] : null, v = S ? ((n = {})[S] = l.options[S], n) : null, b = -1, _ = void 0;
  9797. v && (_ = Object.keys(v)[0], b = c.indexOf(_));
  9798. var T = b + 1;
  9799. if (T < c.length) {
  9800. var E = c[T];
  9801. _ && o.values.delete(_), o.values.set(E, r.ON);
  9802. } else c.forEach(function(e) {
  9803. return o.values.delete(e);
  9804. });
  9805. }
  9806. }, e.prototype.resetFilterId = function() {
  9807. (this.id || this.filterName) && (this.id = 0, this.filterName = void 0);
  9808. }, o.__decorate([ s.observable ], e.prototype, "version", void 0), o.__decorate([ s.observable ], e.prototype, "categories", void 0),
  9809. o.__decorate([ s.observable ], e.prototype, "name", void 0), o.__decorate([ s.observable ], e.prototype, "id", void 0),
  9810. o.__decorate([ s.observable ], e.prototype, "filterName", void 0), o.__decorate([ s.observable ], e.prototype, "role", void 0),
  9811. o.__decorate([ s.observable ], e.prototype, "mapRotation", void 0), o.__decorate([ s.observable ], e.prototype, "modeRotation", void 0),
  9812. o.__decorate([ s.observable ], e.prototype, "operationIndex", void 0), o.__decorate([ s.observable ], e.prototype, "playground", void 0),
  9813. o.__decorate([ s.observable ], e.prototype, "isEORMM", void 0), o.__decorate([ s.observable ], e.prototype, "matchmakingContext", void 0),
  9814. o.__decorate([ s.computed ], e.prototype, "json", null), o.__decorate([ s.action ], e.prototype, "toggleAll", null),
  9815. o.__decorate([ s.action ], e.prototype, "invertCategory", null), o.__decorate([ s.action ], e.prototype, "setName", null),
  9816. o.__decorate([ s.action ], e.prototype, "toggleFilterCondition", null), o.__decorate([ s.action ], e.prototype, "resetFilterId", null),
  9817. e;
  9818. }();
  9819. t.GameFilter = _;
  9820. }, function(e, t, n) {
  9821. "use strict";
  9822. Object.defineProperty(t, "__esModule", {
  9823. value: !0
  9824. });
  9825. var r, o = n(0), i = n(1), a = n(18), s = n(5);
  9826. !function(e) {
  9827. e[e.S = 4] = "S", e[e.M = 8] = "M", e[e.L = 16] = "L", e[e.XL = 20] = "XL";
  9828. }(r || (r = {}));
  9829. var u = function(e) {
  9830. function t() {
  9831. return null !== e && e.apply(this, arguments) || this;
  9832. }
  9833. return o.__extends(t, e), t.prototype.render = function() {
  9834. var e = Math.max(0, Math.min(this.props.completed, 1)), t = 1 - e, n = s.DynamicStyle.create({
  9835. flex: e
  9836. }, "b2b45145:29:26"), o = s.DynamicStyle.create({
  9837. flex: t
  9838. }, "b2b45145:30:30"), u = r[this.props.height || "M"], l = this.props.bgColorStyle || a.ProgressBarStyles.defaultBgColorStyle, c = this.props.barColorStyle || a.ProgressBarStyles.defaultBarColorStyle;
  9839. return i.createElement("surface", {
  9840. style: s.merge3(a.ProgressBarStyles.container(u), this.props.style, l)
  9841. }, e > 0 && i.createElement("surface", {
  9842. style: s.merge3(n, a.CommonStyles.zOffset(1), c)
  9843. }), t > 0 && i.createElement("surface", {
  9844. style: o
  9845. }));
  9846. }, t;
  9847. }(i.Component);
  9848. t.ProgressBar = u;
  9849. }, function(e, t, n) {
  9850. "use strict";
  9851. (function(e) {
  9852. Object.defineProperty(t, "__esModule", {
  9853. value: !0
  9854. });
  9855. var r = n(27), o = n(2), i = n(46), a = n(47), s = n(65), u = n(32), l = n(87), c = n(31), p = n(269), d = n(587), f = n(588), m = n(199), h = n(427), g = n(13), y = n(150), S = e.get("TunguskaBattlepackClients"), v = function(e, t, n, r) {
  9856. var o = {
  9857. transactionSource: e,
  9858. transactionType: "item_purchase_scraps",
  9859. transactionCode: "drain",
  9860. itemId: t,
  9861. price: n,
  9862. balance: r,
  9863. currency: "scraps",
  9864. status: "complete",
  9865. revenueModel: "virtual"
  9866. };
  9867. y.telemetryStoreLoader.get().trackTransaction(o);
  9868. };
  9869. t.buyScrapExchangeOffer = i.requester.createClient({
  9870. requestOn: [ a.buyBattlepackScrapExchange ],
  9871. throttle: 500,
  9872. request: function(e, t, n) {
  9873. return new Promise(function(o, i) {
  9874. r.request("ScrapExchange.buyItemForScraps", {
  9875. game: "tunguska",
  9876. item: e
  9877. }).then(function(r) {
  9878. o(r || void 0), v("scrap_store", e, t, n - t), y.telemetryStoreLoader.get().gaStore.trackEvent("ScrapExchange", "Buy", "Success");
  9879. }).catch(function(e) {
  9880. i(e), y.telemetryStoreLoader.get().gaStore.trackEvent("ScrapExchange", "Buy", "Failure");
  9881. });
  9882. });
  9883. },
  9884. parse: function(e) {
  9885. return e;
  9886. },
  9887. update: function(e) {
  9888. this.publish(e);
  9889. }
  9890. }), t.getScrapExchangeOffers = i.requester.createClient({
  9891. requestOn: [ a.getBattlepackScrapExchange ],
  9892. throttle: 500,
  9893. request: function() {
  9894. return r.request("ScrapExchange.getOffers", {
  9895. game: "tunguska"
  9896. });
  9897. },
  9898. parse: function(e) {
  9899. return e;
  9900. },
  9901. update: function(e) {
  9902. l.tunguskaBattlepackScrapExchangeStore.setRevision(e), this.publish(e);
  9903. }
  9904. }), t.claimBlueprint = i.requester.createClient({
  9905. requestOn: [ a.claimBlueprint ],
  9906. throttle: 2e3,
  9907. shouldPerformRequest: function() {
  9908. return !0;
  9909. },
  9910. request: function(e) {
  9911. return r.request("Battlepack.open", {
  9912. game: u.tunguskaGameId,
  9913. withVoucher: e
  9914. });
  9915. },
  9916. parse: function(e) {
  9917. return e;
  9918. },
  9919. onRequestError: function(e, t) {
  9920. this.publish(new Error("Request error when attempting to claim blueprint"), t);
  9921. },
  9922. update: function(e, t, n) {
  9923. e ? this.publish(null, e) : this.publish(new Error("Failed to claim blueprint"));
  9924. }
  9925. }), t.scrap = i.requester.createClient({
  9926. requestOn: [ a.scrapItem ],
  9927. throttle: 500,
  9928. shouldPerformRequest: function() {
  9929. return !0;
  9930. },
  9931. request: function(e) {
  9932. return r.request("Battlepack.scrapItem", {
  9933. game: u.tunguskaGameId,
  9934. item: e.key
  9935. });
  9936. },
  9937. parse: function(e) {
  9938. return e;
  9939. },
  9940. onRequestError: function(e, t) {
  9941. this.publish(new Error("Request error when attempting to scrap item"), t);
  9942. },
  9943. update: function(e, t, n) {
  9944. e ? (n.quantity -= 1, this.publish(null, n)) : this.publish(new Error("Failed to scrap item"), n),
  9945. a.getBattlepackScrapExchange();
  9946. }
  9947. }), t.scrapDuplicates = i.requester.createClient({
  9948. requestOn: [ a.scrapDuplicateItems ],
  9949. throttle: 500,
  9950. shouldPerformRequest: function() {
  9951. return !0;
  9952. },
  9953. request: function() {
  9954. return r.request("Battlepack.scrapDuplicateItems", {
  9955. game: u.tunguskaGameId
  9956. });
  9957. },
  9958. parse: function(e) {
  9959. return e;
  9960. },
  9961. onRequestError: function(e) {
  9962. this.publish(new Error("Request error when attempting to scrap item"));
  9963. },
  9964. update: function(e, t) {
  9965. e ? this.publish(e) : this.publish(new Error("Failed to scrap item"));
  9966. }
  9967. }), t.handleStalePurchases = i.requester.createClient({
  9968. throttle: 2e4,
  9969. shouldPerformRequest: function() {
  9970. return !0;
  9971. },
  9972. request: function() {
  9973. return new Promise(function(e, t) {
  9974. r.firstPartyRequest("Inventory.getPurchases", {
  9975. games: [ u.tunguskaGameId ],
  9976. categories: [ "battlepacks" ]
  9977. }).then(function(n) {
  9978. if (!n || !n.purchases) return t();
  9979. var o = Promise.resolve({});
  9980. n.purchases.forEach(function(e) {
  9981. 0 === e.state.value ? o = o.then(function() {
  9982. return new Promise(function(t, n) {
  9983. r.firstPartyRequest("Inventory.startPurchase", {
  9984. game: e.game,
  9985. productId: "",
  9986. data: e.data,
  9987. pinData: null,
  9988. deviceIdType: "machash",
  9989. deviceId: y.telemetryStoreLoader.map(function(e) {
  9990. return e.pinStore.uuid;
  9991. })
  9992. }).then(function(o) {
  9993. if (!o || !o.purchaseId) return n();
  9994. r.firstPartyRequest("Inventory.completePurchase", {
  9995. game: e.game,
  9996. productId: "",
  9997. purchaseId: o.purchaseId,
  9998. result: "completed",
  9999. pinData: null,
  10000. deviceIdType: "machash",
  10001. deviceId: y.telemetryStoreLoader.map(function(e) {
  10002. return e.pinStore.uuid;
  10003. })
  10004. }).then(t, n);
  10005. }, n);
  10006. });
  10007. }) : 1 === e.state.value && (o = o.then(function() {
  10008. return r.firstPartyRequest("Inventory.completePurchase", {
  10009. game: e.game,
  10010. productId: "",
  10011. purchaseId: e.purchaseId,
  10012. result: "completed",
  10013. pinData: null,
  10014. deviceIdType: "machash",
  10015. deviceId: y.telemetryStoreLoader.map(function(e) {
  10016. return e.pinStore.uuid;
  10017. })
  10018. });
  10019. }));
  10020. });
  10021. var i = n.purchases.length > 0;
  10022. o.then(function() {
  10023. e(i), i && h.tunguskaBattlepackUnopenedStore.refetch(u.tunguskaGameId);
  10024. }).catch(function(e) {
  10025. S.error(e);
  10026. });
  10027. }, t);
  10028. });
  10029. },
  10030. parse: function(e) {
  10031. return e;
  10032. },
  10033. update: function(e) {
  10034. this.publish(e);
  10035. }
  10036. }), t.getPuzzleCategories = new c.Client("Battlepack.getPuzzleCategories", {
  10037. requestPerformer: r.request
  10038. }), t.getFullInventory = new c.Client("Battlepack.listFullInventory", {
  10039. requestPerformer: r.request
  10040. }), t.getUnopened = new c.Client("Battlepack.listBattlepackVouchers", {
  10041. requestPerformer: r.request
  10042. }), t.getSummary = new c.Client("Battlepack.getSummary", {
  10043. requestPerformer: r.request
  10044. }), t.getBattlepackWidget = new c.Client("Battlepack.getWidgetData", {
  10045. requestPerformer: r.request
  10046. }), t.getBattlepackOffers = new c.Client("Battlepack.getBattlepackOffers", {
  10047. requestPerformer: r.firstPartyRequest
  10048. }), t.getPurchasablePacks = new c.Client("Battlepack.getAllPurchasablePacks", {
  10049. requestPerformer: r.request
  10050. }), t.openBattlepack = new c.Client("Battlepack.open", {
  10051. requestPerformer: r.request
  10052. }), t.buyForScraps = new c.Client("Battlepack.buyForScraps", {
  10053. requestPerformer: r.request
  10054. }), t.buyForScraps.addResultHandler(function(e) {
  10055. e.onSuccess(function() {
  10056. if (e.response && e.request) {
  10057. var t = e.request.params;
  10058. v("battlepack_store", t.pack, t.price, t.balance - t.price);
  10059. }
  10060. });
  10061. }), t.initialFetch = i.requester.createClient({
  10062. throttle: 1e3,
  10063. shouldPerformRequest: function() {
  10064. return s.isHostingGame(u.tunguskaGameId) && !0;
  10065. },
  10066. request: function() {
  10067. return new Promise(function(e) {
  10068. t.handleStalePurchases.trigger(), e();
  10069. });
  10070. },
  10071. parse: function(e) {
  10072. return e;
  10073. },
  10074. update: function(e) {
  10075. this.publish(e);
  10076. }
  10077. }), t.expireTunguskaBattlepackFragments = function(e) {
  10078. o.when(function() {
  10079. return g.onlineState.isOnlineBlazeAndGateway;
  10080. }, function() {
  10081. S.info("The fragments has been expired"), f.battlepackWidgetStore.expireFragment(u.tunguskaGameId),
  10082. e ? (m.tunguskaBattlepackSummaryStore.expireFragment(u.tunguskaGameId), h.tunguskaBattlepackUnopenedStore.expireFragment(u.tunguskaGameId),
  10083. p.tunguskaBattlepackInventoryStore.expireFragment(u.tunguskaGameId)) : (m.tunguskaBattlepackSummaryStore.refetch(u.tunguskaGameId),
  10084. h.tunguskaBattlepackUnopenedStore.refetch(u.tunguskaGameId), p.tunguskaBattlepackInventoryStore.refetch(u.tunguskaGameId),
  10085. d.tunguskaBattlepackPuzzleCategoriesStore.refetch(u.tunguskaGameId));
  10086. });
  10087. }, t.buyForScraps.addResultHandler(function(e) {
  10088. e.onSuccess(function() {
  10089. return t.expireTunguskaBattlepackFragments();
  10090. });
  10091. }), t.openBattlepack.addResultHandler(function(e) {
  10092. e.onSuccess(function() {
  10093. return t.expireTunguskaBattlepackFragments();
  10094. });
  10095. }), t.scrap.listen(function() {
  10096. t.expireTunguskaBattlepackFragments();
  10097. }), t.scrapDuplicates.listen(function() {
  10098. t.expireTunguskaBattlepackFragments();
  10099. }), t.buyScrapExchangeOffer.listen(function() {
  10100. t.expireTunguskaBattlepackFragments();
  10101. }), t.claimBlueprint.listen(function() {
  10102. t.expireTunguskaBattlepackFragments();
  10103. });
  10104. var b = [ t.scrap, t.claimBlueprint, t.buyScrapExchangeOffer, t.getScrapExchangeOffers, t.scrapDuplicates ];
  10105. t.startListening = function _() {
  10106. b.forEach(function(e) {
  10107. return e.startListening();
  10108. });
  10109. }, t.stopListening = function T() {
  10110. b.forEach(function(e) {
  10111. return e.stopListening();
  10112. });
  10113. };
  10114. }).call(this, n(15));
  10115. }, function(e, t, n) {
  10116. "use strict";
  10117. Object.defineProperty(t, "__esModule", {
  10118. value: !0
  10119. });
  10120. var r = n(0), o = n(2), i = function() {
  10121. function e(e) {
  10122. void 0 === e && (e = !1), this.keepLastSelection = e, this.activeItemIndex = 0;
  10123. }
  10124. return e.prototype.setActiveItem = function(e) {
  10125. this.activeItemIndex = e;
  10126. }, r.__decorate([ o.observable ], e.prototype, "activeItemIndex", void 0), r.__decorate([ o.action ], e.prototype, "setActiveItem", null),
  10127. e;
  10128. }();
  10129. t.ListSelectionState = i;
  10130. }, function(e, t, n) {
  10131. "use strict";
  10132. Object.defineProperty(t, "__esModule", {
  10133. value: !0
  10134. });
  10135. var r = n(0), o = n(418), i = n(1215), a = n(1216), s = n(1217), u = n(1218), l = n(1219), c = n(1221), p = n(1223), d = n(47), f = n(382), m = n(13), h = n(1224), g = n(1226), y = n(1228), S = n(32), v = n(1229), b = n(1234), _ = n(576), T = n(1235), E = n(1239), C = n(1240);
  10136. t.tunguskaVoipState = new f.VoipState(m.settingsStore), t.tunguskaBattlepackScrapExchangeStore = new s.TunguskaBattlepackScrapExchangeStore(),
  10137. t.teamsStore = new u.TeamsStore(d.receivedPlayerList), t.tunguskaMissionsStore = new l.TunguskaMissionsStore(c.missionsClients),
  10138. t.tunguskaAssignmentsSelectState = new a.TunguskaAssignmentsSelectState(), t.tunguskaAssignmentsStore = new o.TunguskaAssignmentsStore(S.tunguskaGameId, h.tunguskaAssignmentsClients),
  10139. t.tunguskaTrackedAssignmentStore = new i.TunguskaTrackedAssignmentStore(h.tunguskaAssignmentsClients, y.tunguskaIngameAssignmentProgressClient, t.tunguskaAssignmentsStore, m.spartaActivatedStore, m.onlineState),
  10140. t.tunguskaOperationsCampaignStore = new p.TunguskaOperationsCampaignStore(S.tunguskaGameId, g.tunguskaOperationsCampaignClient);
  10141. var I = function(e) {
  10142. function n(n, r) {
  10143. var o = e.call(this, n) || this;
  10144. return o.tunguskaEndOfRoundStore = r, o.tunguskaVoipState = t.tunguskaVoipState,
  10145. o.tunguskaBattlepackScrapExchangeStore = t.tunguskaBattlepackScrapExchangeStore,
  10146. o.teamsStore = t.teamsStore, o.tunguskaMissionsStore = t.tunguskaMissionsStore,
  10147. o.tunguskaAssignmentsSelectState = t.tunguskaAssignmentsSelectState, o.tunguskaAssignmentsStore = t.tunguskaAssignmentsStore,
  10148. o.tunguskaTrackedAssignmentStore = t.tunguskaTrackedAssignmentStore, o.tunguskaOperationsCampaignStore = t.tunguskaOperationsCampaignStore,
  10149. o.tunguskaEndOfRoundBattleplanStore = new b.TunguskaEndOfRoundBattleplanStore(o.tunguskaEndOfRoundStore),
  10150. o.quickmatchState = new v.QuickmatchState(o.sparta, o.sparta.stores.gameStore, o.sparta.stores.nativePropertiesStore, S.tunguskaGameId),
  10151. o.gameServerDetailsStore = T.createGameServerDetailsStore(o.sparta.gatewayClient, o.sparta.stores.gameDataStore, o.sparta.stores.presenceStateStore),
  10152. o.emblemState = new E.EmblemState(o.sparta.twinkle.buildInfo, C.createEmblemClients(o.sparta.gatewayClient.request), !0),
  10153. o;
  10154. }
  10155. return r.__extends(n, e), n;
  10156. }(_.GameStores);
  10157. t.TunguskaStores = I;
  10158. }, function(e, t, n) {
  10159. var r = n(141), o = Math.min;
  10160. e.exports = function(e) {
  10161. return e > 0 ? o(r(e), 9007199254740991) : 0;
  10162. };
  10163. }, function(e, t, n) {
  10164. "use strict";
  10165. Object.defineProperty(t, "__esModule", {
  10166. value: !0
  10167. });
  10168. var r = n(0), o = n(1016);
  10169. function i(e, t) {
  10170. var n;
  10171. return (n = function(n) {
  10172. function o(e, r) {
  10173. var o = n.call(this, e, r) || this;
  10174. return o._isMounted = !0, o._storeUnsubscribes = [], o.state || (o.state = {}),
  10175. t && o.subscribeToStores(t, !1), o;
  10176. }
  10177. return r.__extends(o, n), o.prototype.componentWillUnmount = function() {
  10178. e.prototype.componentWillUnmount && e.prototype.componentWillUnmount.call(this),
  10179. this._isMounted = !1, this.unsubscribeFromStores();
  10180. }, o.prototype.subscribeToStores = function(e, t) {
  10181. var n = this;
  10182. void 0 === t && (t = !0);
  10183. var o = !1, i = {};
  10184. return Object.keys(e).forEach(function(t) {
  10185. var r = e[t];
  10186. r && ("function" == typeof r.getState && (i[t] = r.getState.apply(r), o = !0), n._storeUnsubscribes.push(r.listen(n.onStoreChange.bind(n, t))));
  10187. }), o && (t ? this.setState(i) : this.state = r.__assign({}, this.state, i)), i;
  10188. }, o.prototype.unsubscribeFromStores = function() {
  10189. this._storeUnsubscribes.forEach(function(e) {
  10190. return e();
  10191. }), this._storeUnsubscribes = [];
  10192. }, o.prototype.onStoreChange = function(e, t) {
  10193. if (this._isMounted) {
  10194. var n = {};
  10195. n[e] = t, this.setState(n);
  10196. }
  10197. }, o;
  10198. }(e)).displayName = o.getDisplayName(e), n.contextTypes = e.contextTypes, n;
  10199. }
  10200. t.subscribeToStores = function a(e) {
  10201. return function(t) {
  10202. return i(t, e);
  10203. };
  10204. }, t.storeSubscriber = i;
  10205. }, function(e, t, n) {
  10206. "use strict";
  10207. Object.defineProperty(t, "__esModule", {
  10208. value: !0
  10209. });
  10210. var r = n(0), o = n(2), i = n(528), a = n(24), s = n(5), u = n(144), l = n(14), c = function() {
  10211. function e() {
  10212. this.left = 0, this.top = 0, this.width = 0, this.height = 0;
  10213. }
  10214. return r.__decorate([ o.observable ], e.prototype, "left", void 0), r.__decorate([ o.observable ], e.prototype, "top", void 0),
  10215. r.__decorate([ o.observable ], e.prototype, "width", void 0), r.__decorate([ o.observable ], e.prototype, "height", void 0),
  10216. e;
  10217. }(), p = function() {
  10218. return function e() {
  10219. this.extra = new i.ExtraElements("UIState"), this.tweenTranslateY = l.Animation.tween("89a21824:17:46", 0);
  10220. };
  10221. }(), d = function() {
  10222. function e() {
  10223. this.window = new c(), this.layout = new p();
  10224. }
  10225. return Object.defineProperty(e.prototype, "viewportScale", {
  10226. get: function() {
  10227. var e = this.window.width / a.screen.style.width, t = this.window.height / a.screen.style.height, n = Math.min(e, t);
  10228. return {
  10229. scaleX: n,
  10230. scaleY: n
  10231. };
  10232. },
  10233. enumerable: !0,
  10234. configurable: !0
  10235. }), Object.defineProperty(e.prototype, "viewportScaleStyle", {
  10236. get: function() {
  10237. return s.DynamicStyle.wrapLegacyStyle(this.viewportScale, "89a21824:35:15");
  10238. },
  10239. enumerable: !0,
  10240. configurable: !0
  10241. }), Object.defineProperty(e.prototype, "viewportPosition", {
  10242. get: function() {
  10243. return {
  10244. left: this.window.width / 2 - a.screen.style.width / 2 + a.screen.style.left,
  10245. top: this.window.height / 2 - a.screen.style.height / 2 + a.screen.style.top
  10246. };
  10247. },
  10248. enumerable: !0,
  10249. configurable: !0
  10250. }), Object.defineProperty(e.prototype, "viewportPositionStyle", {
  10251. get: function() {
  10252. return s.DynamicStyle.wrapLegacyStyle(this.viewportPosition, "89a21824:49:15");
  10253. },
  10254. enumerable: !0,
  10255. configurable: !0
  10256. }), Object.defineProperty(e.prototype, "viewportWindowStyle", {
  10257. get: function() {
  10258. return s.DynamicStyle.wrapLegacyStyle({
  10259. left: this.window.left,
  10260. top: this.window.top,
  10261. width: this.window.width,
  10262. height: this.window.height
  10263. }, "89a21824:55:15");
  10264. },
  10265. enumerable: !0,
  10266. configurable: !0
  10267. }), Object.defineProperty(e.prototype, "viewportSizeStyle", {
  10268. get: function() {
  10269. return s.DynamicStyle.wrapLegacyStyle({
  10270. width: this.window.width,
  10271. height: this.window.height
  10272. }, "89a21824:66:15");
  10273. },
  10274. enumerable: !0,
  10275. configurable: !0
  10276. }), e.prototype.setWindowSize = function(e, t) {
  10277. this.window.width = e, this.window.height = t;
  10278. }, r.__decorate([ o.computed ], e.prototype, "viewportScale", null), r.__decorate([ o.computed ], e.prototype, "viewportScaleStyle", null),
  10279. r.__decorate([ o.computed ], e.prototype, "viewportPosition", null), r.__decorate([ o.computed ], e.prototype, "viewportPositionStyle", null),
  10280. r.__decorate([ o.computed ], e.prototype, "viewportWindowStyle", null), r.__decorate([ o.computed ], e.prototype, "viewportSizeStyle", null),
  10281. r.__decorate([ o.action ], e.prototype, "setWindowSize", null), e;
  10282. }();
  10283. t.UIState = d, t.uiState = new d(), u.onWindowSizeChanged.listen(function(e, n) {
  10284. t.uiState.setWindowSize(e, n);
  10285. });
  10286. }, function(e, t, n) {
  10287. "use strict";
  10288. Object.defineProperty(t, "__esModule", {
  10289. value: !0
  10290. });
  10291. var r = n(0), o = n(1), i = n(69), a = n(4), s = n(2), u = n(136), l = n(41), c = n(6), p = n(7), d = n(14), f = n(565), m = n(20), h = n(5), g = n(29), y = n(8), S = h.StaticStyle.wrapLegacyStyleSheet({
  10292. heading: {
  10293. opacity: .8,
  10294. marginBottom: p.GUTTER
  10295. },
  10296. iconContainer: {
  10297. position: "absolute",
  10298. top: 0,
  10299. right: 0,
  10300. bottom: 0,
  10301. left: 0,
  10302. alignItems: "center",
  10303. justifyContent: "center"
  10304. },
  10305. icon: {
  10306. textureMode: "contain",
  10307. textureAlign: [ .5, 1 ]
  10308. }
  10309. }, "4b10a21b:18:15"), v = function(e) {
  10310. function t() {
  10311. var t = null !== e && e.apply(this, arguments) || this;
  10312. return t.sparta = y.SpartaContext.getFromComponent(t), t.iconScaleTween = d.Animation.componentTween(t, "4b10a21b:126:52", 1),
  10313. t.iconGrayScaleTween = d.Animation.componentTween(t, "4b10a21b:127:56", 1), t.iconTween = d.Animation.componentTween(t, "4b10a21b:128:47", 1),
  10314. t.iconSizeTween = d.Animation.componentTween(t, "4b10a21b:129:51", 0), t.iconColorTween = d.Animation.componentTween(t, "4b10a21b:130:52", "#ffffff"),
  10315. t.mounted = !1, t.setCard = function(e) {
  10316. t.card = e;
  10317. }, t;
  10318. }
  10319. return r.__extends(t, e), Object.defineProperty(t.prototype, "iconSize", {
  10320. get: function() {
  10321. if (this.props.iconSize && this.card) {
  10322. var e = this.props.staticContentSize ? this.card.height : this.card.backgroundHeight;
  10323. if (e > 0) return Math.ceil(e * this.props.iconSize);
  10324. }
  10325. return 0;
  10326. },
  10327. enumerable: !0,
  10328. configurable: !0
  10329. }), t.prototype.componentWillMount = function() {
  10330. var e = this;
  10331. this.mounted = !0;
  10332. var t = this.props.debugName || i.autoId("basicCard");
  10333. this.focusItem = this.props.focusItem || this.sparta.twinkle.focus.create(this, t),
  10334. this.reaction(function() {
  10335. return e.focusItem.isFocusedOrHovered;
  10336. }, function() {
  10337. return e.updateTweens();
  10338. }, {
  10339. fireImmediately: !0
  10340. }), this.reaction(function() {
  10341. return e.iconSize;
  10342. }, function(t) {
  10343. e.iconSizeTween.set(t);
  10344. }, {
  10345. fireImmediately: !0
  10346. });
  10347. }, t.prototype.componentWillUnmount = function() {
  10348. this.mounted = !1;
  10349. }, t.prototype.componentDidUpdate = function() {
  10350. this.updateTweens();
  10351. }, t.prototype.updateTweens = function() {
  10352. if (this.mounted) {
  10353. var e = !1 !== this.props.enabled, t = 1, n = 0;
  10354. (this.props.useGrayScale || this.props.forceGrayScale) && (t = this.props.forceGrayScale || !e ? .5 : 1,
  10355. n = this.props.forceGrayScale || !e ? 1 : 0), this.props.activeIconColor && (this.focusItem.isFocusedOrHovered ? this.iconColorTween.to(this.props.activeIconColor, u.tweenInOptions) : this.iconColorTween.to("#ffffff", u.tweenOutOptions)),
  10356. this.iconTween.set(Math.min(1, t)), this.iconGrayScaleTween.to(n, u.tweenOutOptions),
  10357. this.sparta.twinkle.buildInfo.isConsole && this.iconScaleTween.to(1, u.tweenOutOptions);
  10358. }
  10359. }, t.prototype.renderTexts = function() {
  10360. var e = this.props, t = e.heading, n = e.description, r = e.layout, i = e.textHeight, a = "split" === r, s = this.props.headingType || g.TextType.NORMAL, u = h.DynamicStyle.create({
  10361. opacity: a ? .66 : 1,
  10362. textAlignForRTL: m.isRTLLanguage() ? "left" : "right"
  10363. }, "4b10a21b:204:26");
  10364. t && "string" == typeof t && (t = t.toUpperCase());
  10365. var l = h.DynamicStyle.create({
  10366. color: this.props.headingColor,
  10367. textAlignForRTL: m.isRTLLanguage() ? "left" : "right",
  10368. marginBottom: n ? S.heading.getStyleValue("marginBottom") : 0
  10369. }, "4b10a21b:213:29");
  10370. return o.createElement("surface", {
  10371. style: {
  10372. height: i
  10373. }
  10374. }, b(t, {
  10375. style: h.merge2(S.heading, l),
  10376. size: a ? "M" : "XS",
  10377. type: s
  10378. }), b(n, {
  10379. style: u,
  10380. size: a ? "XS" : "M"
  10381. }));
  10382. }, t.prototype.renderIcon = function(e, t) {
  10383. var n;
  10384. return n = this.props.iconShadow ? o.createElement(f.ShadowedTexture, {
  10385. src: e,
  10386. style: t
  10387. }) : o.createElement("surface", {
  10388. style: [ t, {
  10389. texture: e
  10390. } ]
  10391. }), o.createElement("surface", {
  10392. style: [ S.iconContainer, this.iconTween.getStyleClass("opacity") ]
  10393. }, n);
  10394. }, t.prototype.render = function() {
  10395. var e, t, n, i = this.props, a = (i.heading, i.description, i.activeIconColor, i.debugName,
  10396. i.textHeight, i.iconSize, i.headingColor, i.iconShadow, i.forceGrayScale, i.headingType,
  10397. i.children), s = i.bottom, l = i.enabled, c = i.layout, p = i.icon, d = r.__rest(i, [ "heading", "description", "activeIconColor", "debugName", "textHeight", "iconSize", "headingColor", "iconShadow", "forceGrayScale", "headingType", "children", "bottom", "enabled", "layout", "icon" ]), f = !1 !== l, m = this.renderTexts();
  10398. if ("split" === (void 0 !== c ? c : p ? "split" : "inline") ? e = m : t = m, s && (e = s,
  10399. t = m), p) {
  10400. var g = h.merge4(S.icon, this.iconSizeTween.getStyleClass("width"), this.iconSizeTween.getStyleClass("height"), h.merge4(this.iconScaleTween.getStyleClass("scaleX"), this.iconScaleTween.getStyleClass("scaleY"), this.iconColorTween.getStyleClass("color"), this.iconGrayScaleTween.getStyleClass("grayScale")));
  10401. n = this.renderIcon(p, g);
  10402. }
  10403. return o.createElement(u.Card, r.__assign({
  10404. ref: this.setCard
  10405. }, d, {
  10406. focusItem: this.focusItem,
  10407. enabled: f,
  10408. bottom: e
  10409. }), n, a, t);
  10410. }, t.contextTypes = y.SpartaContext.contextTypes, t.defaultProps = {
  10411. size: l.CardSize.SSM,
  10412. useGrayScale: !0,
  10413. forceGrayScale: !1,
  10414. iconSize: .75
  10415. }, r.__decorate([ s.observable ], t.prototype, "card", void 0), r.__decorate([ s.computed ], t.prototype, "iconSize", null),
  10416. r.__decorate([ s.action ], t.prototype, "setCard", void 0), t = r.__decorate([ a.observer ], t);
  10417. }(o.Component);
  10418. function b(e, t) {
  10419. return "string" == typeof e ? o.createElement(c.Text, r.__assign({
  10420. value: e
  10421. }, t)) : e;
  10422. }
  10423. t.BasicCard = v;
  10424. }, function(e, t, n) {
  10425. "use strict";
  10426. (function(e) {
  10427. Object.defineProperty(t, "__esModule", {
  10428. value: !0
  10429. }), t.globalScope = e;
  10430. }).call(this, n(179));
  10431. }, function(e, t, n) {
  10432. "use strict";
  10433. Object.defineProperty(t, "__esModule", {
  10434. value: !0
  10435. });
  10436. var r = n(82), o = n(53), i = 1, a = function() {
  10437. function e(e, t, n, r) {
  10438. void 0 === n && (n = !1), void 0 === r && (r = 1), this.id = e, this.url = t, this.loop = n,
  10439. this.volume = r, this.unload = this.stop;
  10440. }
  10441. return e.prototype.play = function() {
  10442. o.nativeApi.playSound(this.id, this.url, this.loop), o.nativeApi.setSoundVolume(this.id, this.volume);
  10443. }, e.prototype.playInAudioBus = function(e) {
  10444. o.nativeApi.playSoundAudioBus(this.id, this.url, this.loop, e), o.nativeApi.setSoundVolume(this.id, this.volume);
  10445. }, e.prototype.stop = function() {
  10446. o.nativeApi.stopSound(this.id);
  10447. }, e.prototype.stopWithFadeOut = function(e) {
  10448. void 0 === e && (e = 3e3), o.nativeApi.stopSoundWithFadeout(this.id, e);
  10449. }, e.prototype.setVolume = function(e) {
  10450. this.volume = e;
  10451. }, e.prototype.setLoop = function(e) {
  10452. this.loop = e;
  10453. }, e.load = function(t) {
  10454. return r.options.urlHook && (t = r.options.urlHook(t)), new e(i++, t);
  10455. }, e.stopAll = function() {
  10456. o.nativeApi.stopAllSounds();
  10457. }, e;
  10458. }();
  10459. t.Sound = a;
  10460. }, function(e, t, n) {
  10461. "use strict";
  10462. var r;
  10463. Object.defineProperty(t, "__esModule", {
  10464. value: !0
  10465. }), function(e) {
  10466. e.soldier = "soldier", e.spectator = "spectator", e.commander = "commander";
  10467. }(r = t.JoinRole || (t.JoinRole = {}));
  10468. var o = function() {
  10469. return function e(t, n) {
  10470. void 0 === t && (t = ""), void 0 === n && (n = 0), this.address = t, this.port = n;
  10471. };
  10472. }();
  10473. t.JoinLanServerOptions = o;
  10474. var i = function() {
  10475. function e(e, t, n) {
  10476. void 0 === t && (t = r.soldier), this.password = null, this.server = e, this.role = t,
  10477. n && (this.squad = n.squad, this.party = n.party, this.password = n.password, this.friend = n.friend,
  10478. this.platoonMember = n.platoonMember, this.platoonGuid = n.platoonGuid, this.matchmakingSession = n.matchmakingSession,
  10479. this.individualJoin = !!n.individualJoin, this.hasReservation = !!n.hasReservation);
  10480. }
  10481. return e.prototype.withPassword = function(t) {
  10482. var n = this, r = n.party, o = n.squad, i = n.friend, a = n.platoonMember, s = n.platoonGuid;
  10483. return new e(this.server, this.role, {
  10484. party: r,
  10485. squad: o,
  10486. friend: i,
  10487. platoonMember: a,
  10488. platoonGuid: s,
  10489. password: t
  10490. });
  10491. }, e.isMultiplayerServerOptions = function(t) {
  10492. return !!t && t instanceof e;
  10493. }, e;
  10494. }();
  10495. t.JoinMultiplayerServerOptions = i;
  10496. var a = function() {
  10497. return function e(t, n, o, i) {
  10498. void 0 === o && (o = r.soldier), this.friend = t, this.gameId = n, this.role = o,
  10499. this.server = i;
  10500. };
  10501. }();
  10502. t.JoinMultiplayerFriendOptions = a;
  10503. }, function(e, t, n) {
  10504. "use strict";
  10505. function r(e, t, n, r) {
  10506. var o;
  10507. return void 0 === n && (n = !0), void 0 === r && (r = !0), function() {
  10508. for (var i = this, a = [], s = 0; s < arguments.length; s++) a[s] = arguments[s];
  10509. n && !o ? (e.apply(this, a), o = setTimeout(function() {
  10510. o = null;
  10511. }, t)) : (o && clearTimeout(o), o = setTimeout(function() {
  10512. r && e.apply(i, a), o = null;
  10513. }, t));
  10514. };
  10515. }
  10516. Object.defineProperty(t, "__esModule", {
  10517. value: !0
  10518. }), t.debounce = r, t.debounced = function o(e) {
  10519. return function(t, n, o) {
  10520. if (!o) throw new Error("Failed to decorate " + n + " with debounced(" + e + "), missing property descriptor");
  10521. if ("function" != typeof o.value) throw new Error("Failed to decorate " + n + " with debounced(" + e + "), " + n + " is not a function");
  10522. o.value = r(o.value, e.duration, e.isLeading, e.isTailing);
  10523. };
  10524. };
  10525. }, function(e, t, n) {
  10526. "use strict";
  10527. Object.defineProperty(t, "__esModule", {
  10528. value: !0
  10529. });
  10530. var r = n(0), o = n(1), i = n(33), a = n(4), s = n(2), u = n(17), l = n(14), c = n(7), p = n(367), d = n(5), f = n(9), m = n(18), h = n(28), g = d.StaticStyle.create({
  10531. texture: u.bbOfflineUrl("/sparta/jsclient/builds/assets/right_white-8a3f8212.png")
  10532. }, "9817d95f:16:21");
  10533. t.sideSoftClip = f.SpartaGlobals.bundleIsConsole ? p.dangerZoneSize.width : c.getWidth(2.5);
  10534. var y = c.getWidth(1), S = d.StaticStyle.wrapLegacyStyleSheet({
  10535. arrow: {
  10536. zOffset: 1e3,
  10537. width: y,
  10538. height: y,
  10539. padding: [ c.GUTTER, 1.5 * c.GUTTER, c.GUTTER, 1.5 * c.GUTTER ],
  10540. position: "absolute"
  10541. },
  10542. arrowTexture: {
  10543. flex: 1,
  10544. textureAtlas: "SpartaCommonAtlas",
  10545. textureMode: "cover"
  10546. }
  10547. }, "9817d95f:22:15"), v = function(e) {
  10548. function t(t, n) {
  10549. var r = e.call(this, t, n) || this;
  10550. return r.shouldKeepArrowsVisible = !1, r.visiblityTween = l.Animation.tween("9817d95f:51:38", 0),
  10551. r.onMouseScroll = function(e) {
  10552. r.props.onMouseScroll(e);
  10553. }, r.focusItem = h.focusSystem.create(r, "arrow_" + t.direction + "-" + t.id), r.focusItem.onClick.listen(function() {
  10554. r.keepArrowsVisibleFor(1e3), r.props.onClick(t.direction);
  10555. }), r;
  10556. }
  10557. return r.__extends(t, e), t.prototype.componentWillUnmount = function() {
  10558. clearTimeout(this.keepArrowsVisibleTimeout), this.visiblityTween.destroy();
  10559. }, Object.defineProperty(t.prototype, "isVisible", {
  10560. get: function() {
  10561. var e = this.props.scrollerState[this.props.canScroll] || this.shouldKeepArrowsVisible;
  10562. return this.visiblityTween.to(e ? 1 : 0, e ? l.Animation.presets.focusables.enter.fast : l.Animation.presets.focusables.leave),
  10563. e;
  10564. },
  10565. enumerable: !0,
  10566. configurable: !0
  10567. }), t.prototype.keepArrowsVisibleFor = function(e) {
  10568. var t = this;
  10569. this.shouldKeepArrowsVisible = !0, this.keepArrowsVisibleTimeout = setTimeout(s.action(function() {
  10570. t.shouldKeepArrowsVisible = !1;
  10571. }), e);
  10572. }, t.prototype.render = function() {
  10573. var e = m.CommonStyles.textureScale("left" === this.props.direction ? [ -1, 1 ] : [ 1, 1 ]), t = m.CommonStyles.color(this.focusItem.isHovered ? "#000000" : "#ffffff"), n = d.DynamicStyle.create({
  10574. top: (this.props.scrollerState.containerBounds.height - y) / 2,
  10575. enableMouseEvents: this.isVisible,
  10576. backgroundColor: this.focusItem.isHovered ? "#ffffff" : "#00000055",
  10577. left: "left" === this.props.direction ? c.GUTTER - y / 2 : void 0,
  10578. right: "right" === this.props.direction ? -c.getWidth(1.5) : void 0
  10579. }, "9817d95f:100:27");
  10580. return o.createElement("surface", r.__assign({
  10581. style: d.merge3(S.arrow, this.visiblityTween.getStyleClass("opacity"), n)
  10582. }, this.focusItem.hooks, {
  10583. onMouseScroll: this.onMouseScroll
  10584. }), o.createElement("surface", {
  10585. style: d.merge4(S.arrowTexture, g, e, t)
  10586. }));
  10587. }, r.__decorate([ s.observable ], t.prototype, "shouldKeepArrowsVisible", void 0),
  10588. r.__decorate([ s.computed ], t.prototype, "isVisible", null), r.__decorate([ s.action ], t.prototype, "keepArrowsVisibleFor", null),
  10589. t = r.__decorate([ a.observer ], t);
  10590. }(o.Component), b = function(e) {
  10591. function n() {
  10592. var t = null !== e && e.apply(this, arguments) || this;
  10593. return t.scrollerState = new i.ScrollerState(), t.scroll = function(e) {
  10594. var n = _(t.scrollerState, e);
  10595. n && t.scrollerState.scrollToBounds(t.scrollerState.getLocalBounds(n));
  10596. }, t.onMouseScroll = function(e) {
  10597. t.props.mouseScroll && (t.scrollerState.canScrollLeft || t.scrollerState.canScrollRight) && (e.stopPropagation(),
  10598. t.scroll(e.scroll > 0 ? "left" : "right"));
  10599. }, t;
  10600. }
  10601. return r.__extends(n, e), n.prototype.renderArrows = function() {
  10602. return !h.focusSystem.controllerMode && [ o.createElement(v, {
  10603. key: "left",
  10604. scrollerState: this.scrollerState,
  10605. canScroll: "canScrollLeft",
  10606. direction: "left",
  10607. id: this.props.id,
  10608. onClick: this.scroll,
  10609. onMouseScroll: this.onMouseScroll
  10610. }), o.createElement(v, {
  10611. key: "right",
  10612. scrollerState: this.scrollerState,
  10613. canScroll: "canScrollRight",
  10614. direction: "right",
  10615. id: this.props.id,
  10616. onClick: this.scroll,
  10617. onMouseScroll: this.onMouseScroll
  10618. }) ];
  10619. }, n.prototype.render = function() {
  10620. var e = f.SpartaGlobals.bundleIsPC && this.props.width === c.getWidth(24) ? c.getWidth(23) : this.props.width, n = d.merge2(d.DynamicStyle.create({
  10621. width: e
  10622. }, "9817d95f:182:30"), d.DynamicStyle.maybeLegacyStyle(this.props.style, "9817d95f:182:59")), a = d.merge2(d.DynamicStyle.create({
  10623. flexWrap: "nowrap",
  10624. flexDirection: "row"
  10625. }, "9817d95f:183:35"), d.DynamicStyle.maybeLegacyStyle(this.props.innerStyle, "9817d95f:184:77"));
  10626. return o.createElement(i.Scroller, r.__assign({
  10627. tween: !0,
  10628. scrollbar: !1,
  10629. noVerticalScroll: !0,
  10630. scrollerState: this.scrollerState,
  10631. onMouseScroll: this.onMouseScroll,
  10632. softClip: [ 0, t.sideSoftClip, 0, this.props.clipLeft ? t.sideSoftClip : 0 ],
  10633. style: n,
  10634. clipMargin: [ 3 * c.GUTTER, t.sideSoftClip, 3 * c.GUTTER, f.SpartaGlobals.bundleIsPC ? this.props.clipLeft ? t.sideSoftClip : 5 * c.GUTTER : c.getWidth(this.props.clipLeft ? .5 : 2) ]
  10635. }, this.props.scrollerProps, {
  10636. overlay: f.SpartaGlobals.bundleIsPC && this.renderArrows()
  10637. }), o.createElement("surface", {
  10638. style: a
  10639. }, this.props.children));
  10640. }, n.defaultProps = {
  10641. mouseScroll: !0
  10642. }, n = r.__decorate([ a.observer ], n);
  10643. }(o.Component);
  10644. function _(e, t) {
  10645. return h.focusSystem.withBounds(function() {
  10646. var n = e.focusAncestor.children.map(function(e) {
  10647. return e.getBounds();
  10648. }).filter(function(e) {
  10649. return !!e;
  10650. }), r = e.containerBounds.left, o = e.containerBounds.right, i = Number.MAX_VALUE, a = [], s = [];
  10651. "left" === t ? (a = n.map(function(e) {
  10652. return e && e.right < r ? r - e.right : i;
  10653. }), s = n.map(function(e) {
  10654. return e && e.right > r && e.left < r ? r - e.left : i;
  10655. })) : (a = n.map(function(e) {
  10656. return e && e.left > o ? e.left - o : i;
  10657. }), s = n.map(function(e) {
  10658. return e && e.left < o && e.right > o ? e.right - o : i;
  10659. }));
  10660. var u = T(a), l = T(s);
  10661. return u && u.delta !== i ? n[u.index] : l && l.delta !== i ? n[l.index] : void 0;
  10662. });
  10663. }
  10664. function T(e) {
  10665. return e.map(function(e, t) {
  10666. return {
  10667. delta: e,
  10668. index: t
  10669. };
  10670. }).sort(function(e, t) {
  10671. return e.delta > t.delta ? 1 : -1;
  10672. })[0];
  10673. }
  10674. t.CardCarousel = b, t.getBoundsForOverflowingChildInDirection = _;
  10675. }, function(e, t) {
  10676. var n = {}.hasOwnProperty;
  10677. e.exports = function(e, t) {
  10678. return n.call(e, t);
  10679. };
  10680. }, function(e, t, n) {
  10681. "use strict";
  10682. Object.defineProperty(t, "__esModule", {
  10683. value: !0
  10684. });
  10685. var r = n(0), o = function() {
  10686. function e(e) {
  10687. this.name = e.name || "";
  10688. }
  10689. return e.prototype.init = function(e, t) {
  10690. return "" === this.name && (this.name = e), this.flagStore = t, this;
  10691. }, e;
  10692. }(), i = function(e) {
  10693. function t() {
  10694. return null !== e && e.apply(this, arguments) || this;
  10695. }
  10696. return r.__extends(t, e), t.prototype.isEnabled = function() {
  10697. return this.flagStore.isFeatureEnabled(this.name);
  10698. }, t;
  10699. }(o);
  10700. t.FeatureFlag = i;
  10701. var a = function(e) {
  10702. function t() {
  10703. return null !== e && e.apply(this, arguments) || this;
  10704. }
  10705. return r.__extends(t, e), t.prototype.isEnabledFor = function(e) {
  10706. return this.flagStore.isFeatureEnabled(e.toLowerCase() + "_" + this.name);
  10707. }, t;
  10708. }(o);
  10709. t.GameFeatureFlag = a;
  10710. var s = function(e) {
  10711. function t() {
  10712. return null !== e && e.apply(this, arguments) || this;
  10713. }
  10714. return r.__extends(t, e), t.prototype.isEnabled = function() {
  10715. return this.flagStore.hasUGCAccess() && this.flagStore.isFeatureEnabled(this.name);
  10716. }, t;
  10717. }(o);
  10718. t.UGCRestrictedFeatureFlag = s;
  10719. var u = function() {
  10720. function e() {
  10721. this.flagsRegistered = {};
  10722. }
  10723. return e.prototype.isFeatureEnabled = function(e) {
  10724. return !!this.settingsStore && this.settingsStore.isFeatureEnabled(e);
  10725. }, e.prototype.hasUGCAccess = function() {
  10726. return !!this.settingsStore && (!!this.settingsStore.UGCAccessLevel && this.settingsStore.hasUGCAccess());
  10727. }, e.prototype.register = function(e) {
  10728. var t = this;
  10729. return Object.keys(e).forEach(function(n) {
  10730. var r = e[n];
  10731. if (r.init(n, t), t.flagsRegistered[r.name]) throw new Error("There is already a feature flag registered with the name '" + n + "'");
  10732. t.flagsRegistered[n] = r;
  10733. }), e;
  10734. }, e;
  10735. }();
  10736. t.featureFlags = new u();
  10737. }, function(e, t, n) {
  10738. "use strict";
  10739. Object.defineProperty(t, "__esModule", {
  10740. value: !0
  10741. });
  10742. var r = n(0), o = n(131), i = [ "logoUrl", "disableBackground", "backgroundDisableViewOffset", "backgroundSize", "backgroundUrl", "backgroundOverlayUrl", "backgroundOverlaySize", "backgroundVideoUrl", "backgroundVideoFirstFrame", "backgroundVideoTint", "backgroundMusicTrack", "backgroundColor", "backgroundMusicUrl", "backgroundSkyColor", "dynamicBackground", "requireOnline", "requireMpInstalled", "isBeta", "gameId", "disableHorizontalNavigation", "disableBreadcrumbs" ];
  10743. function a() {
  10744. return "";
  10745. }
  10746. var s = function() {
  10747. function e(t) {
  10748. this.requireMpInstalled = !1, this.enableMainMenu = !0, this.showHeader = !0, this.children = e.EmptyChildren,
  10749. this.getTitle = a, Object.assign(this, t);
  10750. }
  10751. return e.createChildrenWithInheritance = function(t) {
  10752. return t.children.map(function(n, a) {
  10753. var s = new e(r.__assign({}, n, {
  10754. parent: t
  10755. }));
  10756. return void 0 === s.priority && (s.priority = a), i.forEach(function(e) {
  10757. void 0 !== t[e] && void 0 === s[e] && (s[e] = t[e]);
  10758. }), s.location = new o.Location([ t.location.path, s.location.path ].filter(function(e) {
  10759. return !!e;
  10760. }).join("/")), s.children = e.createChildrenWithInheritance(s), s;
  10761. });
  10762. }, e.prototype.cascade = function() {
  10763. return new e(r.__assign({}, this, {
  10764. children: e.createChildrenWithInheritance(this)
  10765. }));
  10766. }, e.prototype.flatten = function() {
  10767. for (var e = [ this ], t = []; e.length; ) {
  10768. var n = e.pop();
  10769. n && (t.push(n), e.push.apply(e, n.children));
  10770. }
  10771. return t;
  10772. }, e.prototype.asSubMenuRoute = function() {
  10773. return new e({
  10774. getTitle: this.getSubtitle || a,
  10775. location: this.location,
  10776. priority: -1
  10777. });
  10778. }, e.EmptyChildren = [], e.Empty = new e({}), e;
  10779. }();
  10780. t.Route = s;
  10781. var u = function(e) {
  10782. function t(t, n) {
  10783. if (n.location = new o.Location(t), void 0 === n.visible) {
  10784. var r = !!n.getTitle;
  10785. n.visible = r;
  10786. }
  10787. return e.call(this, n) || this;
  10788. }
  10789. return r.__extends(t, e), t;
  10790. }(s);
  10791. t.RouteDeclaration = u;
  10792. }, function(e, t, n) {
  10793. "use strict";
  10794. Object.defineProperty(t, "__esModule", {
  10795. value: !0
  10796. }), function(e) {
  10797. e[e.None = 0] = "None", e[e.Joinable = 1] = "Joinable", e[e.Playing = 2] = "Playing",
  10798. e[e.Online = 3] = "Online", e[e.Away = 4] = "Away", e[e.Offline = 5] = "Offline";
  10799. }(t.UserPresenceStates || (t.UserPresenceStates = {}));
  10800. }, function(e, t, n) {
  10801. "use strict";
  10802. (function(e) {
  10803. Object.defineProperty(t, "__esModule", {
  10804. value: !0
  10805. });
  10806. var r, o, i = n(0), a = n(399), s = n(31), u = n(27), l = n(132), c = n(172), p = n(296), d = n(390), f = n(150), m = n(2), h = e.get("Purchase"), g = {
  10807. requestPerformer: u.firstPartyRequest
  10808. }, y = new s.Client("Inventory.startPurchase", g), S = new s.Client("Inventory.completePurchase", g), v = new s.Client("Economy.claimPromotions", g), b = l.frostbiteAction("sparta.commerceCheckout"), _ = c.frostbiteListenable("sparta.commerceStatusMessage");
  10809. !function(e) {
  10810. e.IDLE = "IDLE", e.STARTED = "STARTED", e.REGISTERED = "REGISTERED", e.RESUMED = "RESUMED",
  10811. e.CHECKOUT = "CHECKOUT", e.SUCCESS = "SUCCESS", e.ERROR = "ERROR", e.CANCELLED = "CANCELLED";
  10812. }(r = t.PurchaseFlowState || (t.PurchaseFlowState = {})), function(e) {
  10813. e.PURCHASE = "PURCHASE", e.CLAIM = "CLAIM";
  10814. }(o = t.PurchaseType || (t.PurchaseType = {}));
  10815. var T = [ r.SUCCESS, r.ERROR, r.CANCELLED ], E = 0, C = function() {
  10816. function e(e, t, n, o) {
  10817. var i, s = this;
  10818. this.offer = e, this.type = t, this.purchaseId = null, this.response = null, this.checkoutMessageBuffer = new d.SimpleBuffer(_),
  10819. this.purchaseData = n || e.rawData, this.listeners = new p.ScopedRegistry("PurchaseFlow.listeners"),
  10820. this.jobId = ++E, i = o ? [ this.getIdleState(), this.getStartedState(r.RESUMED), this.getResumedState(), this.getSuccessState(), this.getErrorState() ] : [ this.getIdleState(), this.getStartedState(r.REGISTERED), this.getRegisteredState(), this.getCheckoutState(), this.getSuccessState(), this.getErrorState(), this.getCancelledState() ],
  10821. this.state = new a.StateMachine("PurchaseFlow", r.IDLE, i, {
  10822. debug: !0
  10823. }), this.state.start();
  10824. var u = this.state.onStateChange(function(e) {
  10825. s.listeners.list(e.stateId.toString()).forEach(function(e) {
  10826. return e(s);
  10827. }), I.list(e.stateId.toString()).forEach(function(e) {
  10828. return e(s);
  10829. }), T.indexOf(e.stateId) >= 0 && (u(), s.listeners.disposeAll());
  10830. });
  10831. }
  10832. return e.start = function(t, n) {
  10833. return new e(t, o.PURCHASE, n);
  10834. }, e.claim = function(t, n) {
  10835. return new e(t, o.CLAIM, n);
  10836. }, e.resumeOrphaned = function(t, n, r) {
  10837. return new e(t, o.PURCHASE, n, r);
  10838. }, e.prototype.getIdleState = function() {
  10839. var e = this;
  10840. return {
  10841. id: r.IDLE,
  10842. transitions: [ r.STARTED ],
  10843. onEnter: function() {
  10844. setTimeout(function() {
  10845. e.state.transitionTo(r.STARTED);
  10846. }, 1);
  10847. }
  10848. };
  10849. }, e.prototype.getStartedState = function(e) {
  10850. var t = this;
  10851. return {
  10852. id: r.STARTED,
  10853. transitions: [ e, r.ERROR ],
  10854. onEnter: function() {
  10855. h.debug("Starting flow for", t.offer.type, t.offer.group), y.request({
  10856. game: t.offer.gameId,
  10857. productId: t.offer.offerId,
  10858. data: t.purchaseData,
  10859. pinData: t.offer.pinData,
  10860. deviceIdType: "machash",
  10861. deviceId: f.telemetryStoreLoader.map(function(e) {
  10862. return e.pinStore.uuid;
  10863. })
  10864. }).onSuccess(function(n) {
  10865. t.purchaseId = n.purchaseId, t.state.transitionTo(e);
  10866. }).onError(function(e) {
  10867. t.error = e, t.state.transitionTo(r.ERROR);
  10868. });
  10869. }
  10870. };
  10871. }, e.prototype.getRegisteredState = function() {
  10872. var e = this;
  10873. return {
  10874. id: r.REGISTERED,
  10875. transitions: [ r.CHECKOUT ],
  10876. requirement: function() {
  10877. return !!e.purchaseId;
  10878. },
  10879. onEnter: function() {
  10880. b({
  10881. offerId: e.offer.productId,
  10882. crossTitleCheckout: "game" === e.offer.type,
  10883. owned: !!e.offer.owned,
  10884. jobId: e.jobId
  10885. }), e.state.transitionTo(r.CHECKOUT);
  10886. }
  10887. };
  10888. }, e.prototype.getResumedState = function() {
  10889. var e = this;
  10890. return {
  10891. id: r.RESUMED,
  10892. transitions: [ r.SUCCESS, r.ERROR ],
  10893. requirement: function() {
  10894. return !!e.purchaseId;
  10895. },
  10896. onEnter: function() {
  10897. e.purchaseId ? (e.checkoutResult = "completed", S.request({
  10898. game: e.offer.gameId,
  10899. productId: e.offer.offerId,
  10900. purchaseId: e.purchaseId,
  10901. pinData: e.offer.pinData,
  10902. result: e.checkoutResult,
  10903. deviceIdType: "machash",
  10904. deviceId: f.telemetryStoreLoader.map(function(e) {
  10905. return e.pinStore.uuid;
  10906. })
  10907. }).onSuccess(function(t) {
  10908. e.response = t, e.state.transitionTo(r.SUCCESS);
  10909. }).onError(function(t) {
  10910. e.error = t, e.state.transitionTo(r.ERROR);
  10911. })) : h.error("Missing purchaseId, this should never happen");
  10912. }
  10913. };
  10914. }, e.prototype.getCheckoutState = function() {
  10915. var e = this;
  10916. return {
  10917. id: r.CHECKOUT,
  10918. transitions: [ r.SUCCESS, r.ERROR, r.CANCELLED ],
  10919. requirement: function() {
  10920. return !!e.purchaseId;
  10921. },
  10922. onEnter: function() {
  10923. e.checkoutMessageBuffer.read(function(t) {
  10924. e.purchaseId ? t.jobId === e.jobId && (e.checkoutResult = "error", t.status === t.CHECKOUT_COMPLETED ? e.checkoutResult = "completed" : t.status === t.CHECKOUT_CANCELLED ? e.checkoutResult = "cancelled" : t.status === t.CHECKOUT_FAILURE ? e.checkoutResult = "error" : t.status === t.CHECKOUT_OIG_DISABLED && (e.checkoutResult = "disabled"),
  10925. S.request({
  10926. game: e.offer.gameId,
  10927. productId: e.offer.offerId,
  10928. purchaseId: e.purchaseId,
  10929. pinData: e.offer.pinData,
  10930. result: e.checkoutResult,
  10931. deviceIdType: "machash",
  10932. deviceId: f.telemetryStoreLoader.map(function(e) {
  10933. return e.pinStore.uuid;
  10934. })
  10935. }).onSuccess(function(n) {
  10936. e.response = n, t.status === t.CHECKOUT_COMPLETED ? e.state.transitionTo(r.SUCCESS) : t.status === t.CHECKOUT_CANCELLED ? e.state.transitionTo(r.CANCELLED) : (e.error = t,
  10937. e.state.transitionTo(r.ERROR));
  10938. }).onError(function(t) {
  10939. e.error = t, e.state.transitionTo(r.ERROR);
  10940. })) : h.error("Missing purchaseId, this should never happen");
  10941. });
  10942. },
  10943. onLeave: function() {
  10944. e.checkoutMessageBuffer.dispose();
  10945. }
  10946. };
  10947. }, e.prototype.getSuccessState = function() {
  10948. var e = this;
  10949. return {
  10950. id: r.SUCCESS,
  10951. transitions: [],
  10952. onEnter: function() {
  10953. v.request({
  10954. game: e.offer.gameId
  10955. });
  10956. }
  10957. };
  10958. }, e.prototype.getErrorState = function() {
  10959. var e = this;
  10960. return {
  10961. id: r.ERROR,
  10962. transitions: [],
  10963. requirement: function() {
  10964. return e.error;
  10965. }
  10966. };
  10967. }, e.prototype.getCancelledState = function() {
  10968. return {
  10969. id: r.CANCELLED,
  10970. transitions: []
  10971. };
  10972. }, e.prototype.onFinished = function(e) {
  10973. var t = this, n = T.map(function(n) {
  10974. return t.listeners.add(e, n.toString());
  10975. });
  10976. return function() {
  10977. return n.forEach(function(e) {
  10978. return e();
  10979. });
  10980. };
  10981. }, e.prototype.listen = function(e, t) {
  10982. return this.listeners.add(t, e.toString());
  10983. }, e.onStart = function(t) {
  10984. return e.listen(r.STARTED, t);
  10985. }, e.onFinished = function(e) {
  10986. var t = T.map(function(t) {
  10987. return I.add(e, t.toString());
  10988. });
  10989. return function() {
  10990. return t.forEach(function(e) {
  10991. return e();
  10992. });
  10993. };
  10994. }, e.listen = function(e, t) {
  10995. return I.add(t, e.toString());
  10996. }, i.__decorate([ m.observable ], e, "inProgress", void 0), e;
  10997. }();
  10998. t.PurchaseFlow = C;
  10999. var I = new p.ScopedRegistry("PurchaseFlow.globalListeners");
  11000. C.onStart(function(e) {
  11001. m.runInAction(function() {
  11002. C.inProgress = e;
  11003. });
  11004. }), C.onFinished(function() {
  11005. m.runInAction(function() {
  11006. C.inProgress = null;
  11007. });
  11008. });
  11009. }).call(this, n(15));
  11010. }, function(e, t, n) {
  11011. var r = n(56), o = n(111), i = n(97), a = n(180)("src"), s = Function.toString, u = ("" + s).split("toString");
  11012. n(51).inspectSource = function(e) {
  11013. return s.call(e);
  11014. }, (e.exports = function(e, t, n, s) {
  11015. var l = "function" == typeof n;
  11016. l && (i(n, "name") || o(n, "name", t)), e[t] !== n && (l && (i(n, a) || o(n, a, e[t] ? "" + e[t] : u.join(String(t)))),
  11017. e === r ? e[t] = n : s ? e[t] ? e[t] = n : o(e, t, n) : (delete e[t], o(e, t, n)));
  11018. })(Function.prototype, "toString", function e() {
  11019. return "function" == typeof this && this[a] || s.call(this);
  11020. });
  11021. }, function(e, t, n) {
  11022. var r = n(237), o = n(163);
  11023. e.exports = function(e) {
  11024. return r(o(e));
  11025. };
  11026. }, function(e, t, n) {
  11027. var r = n(16), o = n(42), i = n(163), a = /"/g, s = function(e, t, n, r) {
  11028. var o = String(i(e)), s = "<" + t;
  11029. return "" !== n && (s += " " + n + '="' + String(r).replace(a, "&quot;") + '"'),
  11030. s + ">" + o + "</" + t + ">";
  11031. };
  11032. e.exports = function(e, t) {
  11033. var n = {};
  11034. n[e] = t(s), r(r.P + r.F * o(function() {
  11035. var t = ""[e]('"');
  11036. return t !== t.toLowerCase() || t.split('"').length > 3;
  11037. }), "String", n);
  11038. };
  11039. }, function(e, t, n) {
  11040. "use strict";
  11041. Object.defineProperty(t, "__esModule", {
  11042. value: !0
  11043. });
  11044. var r = n(9);
  11045. t.useConsoleMenu = r.SpartaGlobals.bundleIsConsole || !1;
  11046. }, function(e, t, n) {
  11047. "use strict";
  11048. var r;
  11049. Object.defineProperty(t, "__esModule", {
  11050. value: !0
  11051. }), function(e) {
  11052. e.IDLE = "IDLE", e.NEGOTIATING = "NEGOTIATING", e.PREFLIGHT = "PREFLIGHT", e.VALIDATING_SQUAD = "VALIDATING_SQUAD",
  11053. e.STARTING_TO_SQUAD_UP = "STARTING_TO_SQUAD_UP", e.FINDING_SQUAD = "FINDING_SQUAD",
  11054. e.BACKFILLING_SQUAD = "BACKFILLING_SQUAD", e.SQUAD_FOUND = "SQUAD_FOUND", e.WAITING_FOR_LEADER = "WAITING_FOR_LEADER",
  11055. e.STARTING = "STARTING", e.WAITING = "WAITING", e.GAME_FOUND = "GAME_FOUND", e.SUCCESS = "SUCCESS",
  11056. e.ERROR = "ERROR", e.CANCELING = "CANCELING", e.RETRYING = "RETRYING", e.CANCELED = "CANCELED";
  11057. }(r = t.MatchmakingState || (t.MatchmakingState = {})), t.stringIsMatchmakingState = function o(e) {
  11058. return Object.keys(r).indexOf(e) >= 0;
  11059. }, t.MATCHMAKING_FINISHED_STATES = [ r.CANCELED, r.ERROR, r.SUCCESS ];
  11060. var i = function() {
  11061. return function e(t, n, r, o, i, a) {
  11062. void 0 === o && (o = !1), this.title = t, this.description = n, this.debugMessage = r,
  11063. this.silent = o, this.code = i, this.blazeStatus = a;
  11064. };
  11065. }();
  11066. t.MatchmakingError = i, function(e) {
  11067. e[e.mp = 0] = "mp", e[e.coop = 1] = "coop", e[e.royale = 2] = "royale";
  11068. }(t.MatchmakingSessionType || (t.MatchmakingSessionType = {}));
  11069. }, function(e, t, n) {
  11070. "use strict";
  11071. (function(__) {
  11072. Object.defineProperty(t, "__esModule", {
  11073. value: !0
  11074. });
  11075. var e = n(13), r = n(54), o = n(10), i = n(11), a = n(22), s = n(7), u = n(954), l = n(115), c = n(387), p = n(5), d = n(57), f = n(150), m = n(36);
  11076. t.showStopMatchmaking = function h(e) {
  11077. return r.legacyConfirm(__("ID_SPARTA_GAMESTATE_STOP_QUICKMATCH", !0), __("ID_SPARTA_GAMESTATE_STOP_MATCHMAKING_TITLE", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "quitMatchmaking" + e);
  11078. }, t.showLeaveQueue = function g() {
  11079. return r.legacyConfirm(__("ID_SPARTA_GAMESTATE_LEAVE_QUEUE", !0), __("ID_SPARTA_MATCHMAKING_LEAVE_QUEUE", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "leaveQueue");
  11080. }, t.showPartyLeaderRestriction = function y() {
  11081. var e = m.platformTranslation(__("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_PC", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_XB1", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_PS4", !0)), t = m.platformTranslation(__("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_PC", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_XB1", !0), __("ID_SPARTA_USER_PARTY_WARNING_NOT_LEADER_TITLE_PS4", !0));
  11082. return r.legacyConfirm(e, t, __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "proceedNotPartyLeader");
  11083. };
  11084. var S = p.StaticStyle.create({
  11085. width: s.getWidth(4.5)
  11086. }, "684acb14:134:14");
  11087. t.showNotInHostingGame = function v(t, n) {
  11088. void 0 === t && (t = "gamePopups");
  11089. var s = e.nativePropertiesStore.getHostingGame(), u = e.layoutStateStore.current.config.gameId || "", l = e.gameStore.getGame(u), p = __("ID_SPARTA_RIME_NO_ACCESS", !0).replace("[[game]]", s.displayName());
  11090. function m() {
  11091. var e = new r.UserError(t, (void 0 !== n ? n + ":" : "") + "RIME_NO_ACCESS");
  11092. f.telemetryStoreLoader.get().trackUserFacingError(e), d.PopupManager.standardAlert(p);
  11093. }
  11094. if (l) {
  11095. var h = e.entitlementStore.ownsGame(l.gameId), g = e.crosslaunchManager.setting === c.CrosslaunchManager.SettingOptions.Full;
  11096. if (!h || g) {
  11097. var y = __(h ? "ID_SPARTA_RIME_NO_ACCESS_LAUNCH_GAME" : "ID_SPARTA_RIME_NO_ACCESS_BUY_GAME", !0), v = l.displayName(), b = {
  11098. title: p,
  11099. details: __("ID_SPARTA_RIME_NO_ACCESS_SWITCH_GAME", !0).replace("[[game]]", v),
  11100. label: y.replace("[[game]]", v),
  11101. image: l.boxShot || ""
  11102. }, _ = new r.UserError(t, (void 0 !== n ? n + ":" : "") + (h ? "RIME_NO_ACCESS_LAUNCH_GAME" : "RIME_NO_ACCESS_BUY_GAME"));
  11103. r.errorWithImageAndOption(_, b.details, b.title, b.image, new i.Input({
  11104. action: function() {
  11105. h ? e.crosslaunchManager.continueCrosslaunch(l.gameId, {}) : a.gotoLocation(l.storeConfig.route + "?tab=game");
  11106. },
  11107. key: o.Keys.Option2,
  11108. label: b.label
  11109. }), !0, S).then(function() {});
  11110. } else m();
  11111. } else m();
  11112. }, t.showMissingGame = function b(t, n, s) {
  11113. void 0 === n && (n = "gamePopups");
  11114. var u = e.gameStore.getGame(t), l = u ? u.displayName() : "", c = {
  11115. title: __("ID_SPARTA_COMMERCE_UNOWNED_GAME", !0).replace("[[game]]", l.toUpperCase()),
  11116. details: __("ID_SPARTA_COMMERCE_UNOWNED_GAME_DESC", !0).replace("[[game]]", l),
  11117. label: __("ID_SPARTA_COMMERCE_UNOWNED_GAME_GET", !0),
  11118. image: u && u.boxShot || ""
  11119. }, p = new r.UserError(n, (void 0 !== s ? s + ":" : "") + "COMMERCE_UNOWNED_GAME_GET");
  11120. return r.errorWithImageAndOption(p, c.details, c.title, c.image, new i.Input({
  11121. action: function() {
  11122. return a.gotoLocation(u ? u.startRoute + "/store/list?tab=game" : "");
  11123. },
  11124. key: o.Keys.Option2,
  11125. label: c.label
  11126. }), !0);
  11127. }, t.showNotSupportedRole = function _(e, t) {
  11128. var n = "";
  11129. switch (t) {
  11130. case "spectator":
  11131. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_SPECTATOR", !0);
  11132. break;
  11133.  
  11134. case "commander":
  11135. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_COMMANDER", !0);
  11136. break;
  11137.  
  11138. case "soldier":
  11139. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED_SOLDIER", !0);
  11140. break;
  11141.  
  11142. default:
  11143. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_SUPPORTED", !0).replace("[[role]]", t);
  11144. }
  11145. e.alert(n, __("ID_SPARTA_ONLINE_JOIN_FAILED_TITLE", !0));
  11146. }, t.showPartyContentMissing = function T() {
  11147. return r.legacyConfirm(__("ID_SPARTA_USER_PARTY_MISSING_CONTENT_MESSAGE", !0), __("ID_SPARTA_USER_PARTY_MISSING_CONTENT_TITLE", !0), __("ID_SPARTA_ACTION_CONTINUE", !0), __("ID_SPARTA_ACTION_CANCEL", !0), "missingContent");
  11148. }, t.showPasswordPrompt = function E(e) {
  11149. return r.prompt(__("ID_SPARTA_ONLINE_JOIN_PASSWORD_PROTECTED"), 1, 36, {
  11150. onOkValidate: function(t) {
  11151. return new Promise(function(n, r) {
  11152. t.trim().length < 1 && r(__("ID_SPARTA_ONLINE_JOIN_ENTER_VALID_PASSWORD")), u.ServerVerifyPasswordClient.triggerAsPromise(e, t).then(function(e) {
  11153. e.gameId, e.verified ? n(t) : r(__("ID_SPARTA_ONLINE_JOIN_INVALID_PASSWORD"));
  11154. });
  11155. });
  11156. },
  11157. inputType: l.CharacterType.Password,
  11158. message: __("ID_SPARTA_ONLINE_JOIN_ENTER_PASSWORD")
  11159. });
  11160. }, t.showTooFewSlotsOnServer = function C() {
  11161. return r.legacyConfirm(__("ID_SPARTA_USER_PARTY_TOO_FEW_SLOTS_MESSAGE", !0), __("ID_SPARTA_USER_PARTY_TOO_FEW_SLOTS_TITLE", !0), __("ID_SPARTA_ACTION_CONTINUE", !0), __("ID_SPARTA_ACTION_CANCEL", !0), "fewSlots");
  11162. };
  11163. }).call(this, n(3));
  11164. }, function(e, t, n) {
  11165. "use strict";
  11166. Object.defineProperty(t, "__esModule", {
  11167. value: !0
  11168. });
  11169. var r = n(45);
  11170. t.onJoinMultiplayerServerResult = r.createTypedAction(), t.onMultiplayerServerDisconnection = r.createTypedAction(),
  11171. t.onJoinMultiplayerFailed = r.createTypedAction(), t.onLeaveServerQueue = r.createTypedAction();
  11172. }, function(e, t, n) {
  11173. "use strict";
  11174. Object.defineProperty(t, "__esModule", {
  11175. value: !0
  11176. });
  11177. var r = n(0), o = n(1), i = n(11), a = n(25), s = n(298), u = function(e) {
  11178. function t() {
  11179. var t = null !== e && e.apply(this, arguments) || this;
  11180. return t.visualButton = o.createRef(), t.getInput = function() {
  11181. if (t.props.action || t.props.holdAction || t.props.releaseAction) return new i.Input({
  11182. visible: !1,
  11183. key: t.props.inputKey,
  11184. action: t.props.action,
  11185. holdAction: t.props.holdAction,
  11186. releaseAction: t.props.releaseAction,
  11187. blockInputFor: t.props.blockInputFor || 0
  11188. });
  11189. }, t;
  11190. }
  11191. return r.__extends(t, e), t.prototype.render = function() {
  11192. var e = this.props, t = e.inputKey, n = e.useConsoleStyle, r = e.iconSize, i = e.large, u = e.inverted, l = e.style, c = e.styleSheetOverride, p = e.label, d = e.labelDecoration, f = e.fontStyle, m = e.icon, h = e.animatedLabeledIcon;
  11193. return o.createElement(a.InputRegistration, {
  11194. debugName: "2f3756ac:46:43",
  11195. getInput: this.getInput
  11196. }, o.createElement(s.VisualButton, {
  11197. inputKey: t,
  11198. useConsoleStyle: n,
  11199. iconSize: r,
  11200. large: i,
  11201. inverted: u,
  11202. style: l,
  11203. styleSheetOverride: c,
  11204. label: p,
  11205. labelDecoration: d,
  11206. fontStyle: f,
  11207. icon: m,
  11208. ref: this.visualButton,
  11209. animatedLabeledIcon: h
  11210. }));
  11211. }, t;
  11212. }(o.Component);
  11213. t.InputButton = u;
  11214. }, function(e, t, n) {
  11215. "use strict";
  11216. Object.defineProperty(t, "__esModule", {
  11217. value: !0
  11218. });
  11219. var r = n(45);
  11220. t.getArticles = r.createTypedAction(), t.getArticleDetail = r.createTypedAction(),
  11221. t.saveArticleMetrics = r.createTypedAction(), t.resetArticleDetailState = r.createTypedAction(),
  11222. t.getContactChannels = r.createTypedAction(), t.updateLocation = r.createTypedAction(),
  11223. t.updateSource = r.createTypedAction(), t.updateCategories = r.createTypedAction(),
  11224. t.updateArticleId = r.createTypedAction(), t.updateSelectedCategory = r.createTypedAction(),
  11225. t.resetContextDetails = r.createTypedAction(), t.updateContactDetails = r.createTypedAction(),
  11226. t.createCase = r.createTypedAction(), t.updateSelectedChannel = r.createTypedAction(),
  11227. t.resetCaseDetailState = r.createTypedAction(), t.resetChannelDetailState = r.createTypedAction();
  11228. }, function(e, t, n) {
  11229. var r = n(66), o = n(161);
  11230. e.exports = n(81) ? function(e, t, n) {
  11231. return r.f(e, t, o(1, n));
  11232. } : function(e, t, n) {
  11233. return e[t] = n, e;
  11234. };
  11235. }, function(e, t, n) {
  11236. var r = n(163);
  11237. e.exports = function(e) {
  11238. return Object(r(e));
  11239. };
  11240. }, function(e, t, n) {
  11241. "use strict";
  11242. Object.defineProperty(t, "__esModule", {
  11243. value: !0
  11244. });
  11245. var r = n(0), o = n(2), i = n(120), a = function() {
  11246. function e() {
  11247. this.allModulesLoaded = !1, this.firstPartyConnectedMessage = null, this.nativeClientSettingsMessage = null,
  11248. this.nativeClientReadyMessage = null, this.blazeConfigReadyMessage = null, this.spartaErrorEvent = new i.TwinkleTypedEvent();
  11249. }
  11250. return e.prototype.onAllModulesLoaded = function() {
  11251. this.allModulesLoaded = !0;
  11252. }, e.prototype.onFirstPartyConnectedMessage = function(e) {
  11253. this.firstPartyConnectedMessage = e;
  11254. }, e.prototype.onNativeClientReadyMessage = function(e) {
  11255. this.nativeClientReadyMessage = e;
  11256. }, e.prototype.onBlazeConfigReadyMessage = function(e) {
  11257. this.blazeConfigReadyMessage = e;
  11258. }, e.prototype.onNativeClientSettingsMessage = function(e) {
  11259. this.nativeClientSettingsMessage = e;
  11260. }, e.prototype.spartaErrorMessage = function(e, t, n) {
  11261. this.spartaErrorEvent.trigger({
  11262. message: e,
  11263. title: t,
  11264. closeCallback: n
  11265. });
  11266. }, r.__decorate([ o.observable ], e.prototype, "allModulesLoaded", void 0), r.__decorate([ o.observable ], e.prototype, "firstPartyConnectedMessage", void 0),
  11267. r.__decorate([ o.observable ], e.prototype, "nativeClientSettingsMessage", void 0),
  11268. r.__decorate([ o.observable ], e.prototype, "nativeClientReadyMessage", void 0),
  11269. r.__decorate([ o.observable ], e.prototype, "blazeConfigReadyMessage", void 0),
  11270. r.__decorate([ o.action ], e.prototype, "onAllModulesLoaded", null), r.__decorate([ o.action ], e.prototype, "onFirstPartyConnectedMessage", null),
  11271. r.__decorate([ o.action ], e.prototype, "onNativeClientReadyMessage", null), r.__decorate([ o.action ], e.prototype, "onBlazeConfigReadyMessage", null),
  11272. r.__decorate([ o.action ], e.prototype, "onNativeClientSettingsMessage", null),
  11273. e;
  11274. }();
  11275. t.CoreEventStore = a, t.coreEventStore = new a();
  11276. }, function(e, t, n) {
  11277. "use strict";
  11278. Object.defineProperty(t, "__esModule", {
  11279. value: !0
  11280. });
  11281. var r = n(45);
  11282. t.playEffect = r.createTypedAction(), t.playTrack = r.createTypedAction(), t.stopTrack = r.createTypedAction();
  11283. }, function(e, t, n) {
  11284. "use strict";
  11285. (function(__) {
  11286. Object.defineProperty(t, "__esModule", {
  11287. value: !0
  11288. });
  11289. var e, r = n(0), o = n(1), i = n(4), a = n(25), s = n(14), u = n(11), l = n(22), c = n(10), p = n(6), d = n(917), f = n(918), m = n(21), h = n(5), g = n(5), y = n(18), S = n(9), v = n(23), b = n(19), _ = n(29), T = /[\u0020-\u007E\u00A0-\u017F\u0192\u01FA-\u01FF\u20AC\u2122\u2012\u2013\u2014\u2018\u2019\u201C\u201D\u0410-\u042F\u0490\u0406\u0402\u0452\u0403\u0453\u0456\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\u040B\u045B\u040C\u045C\u0455\u040E\u045E\u040F\u045F\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E]/, E = h.StaticStyle.create({
  11290. position: "absolute",
  11291. top: 0,
  11292. right: 0,
  11293. bottom: 0,
  11294. left: 0,
  11295. paddingLeft: 10,
  11296. flexDirection: "row",
  11297. zOffset: 10
  11298. }, "a81a1502:32:20");
  11299. function C(e, t, n) {
  11300. return e < t ? t : e > n ? n : e;
  11301. }
  11302. !function(e) {
  11303. e[e.LatinFull = 1] = "LatinFull", e[e.Numeric = 2] = "Numeric", e[e.Alphabet = 4] = "Alphabet",
  11304. e[e.Gamertag = 8] = "Gamertag", e[e.Password = 16] = "Password", e[e.AlphabetSpace = 32] = "AlphabetSpace";
  11305. }(e = t.CharacterType || (t.CharacterType = {})), t.keepBetween = C;
  11306. var I = function(t) {
  11307. function n(e, n) {
  11308. var r = t.call(this, e, n) || this;
  11309. r.getTheme = b.ThemeContext.getFromComponent(r), r.sparta = r.getTheme().sparta,
  11310. r.inputManager = null, r.onInputManager = function(e) {
  11311. r.inputManager = e;
  11312. }, r.getInput = function() {
  11313. return !r.props.useVirtualKeyboard && r.state.isActive ? [ new u.Input({
  11314. label: __("ID_SPARTA_ACTION_CANCEL"),
  11315. action: r.deactivate,
  11316. key: r.props.cancelKey
  11317. }) ] : r.focusItem.isFocusedOrHovered ? [ new u.Input({
  11318. label: __("ID_SPARTA_ACTION_SELECT"),
  11319. action: r.props.useVirtualKeyboard ? r.showVirtualKeyboard : r.activate,
  11320. key: r.props.editKey
  11321. }) ] : void 0;
  11322. }, r.onKeyDown = function(e) {
  11323. switch (e) {
  11324. case 9:
  11325. r.onTab();
  11326. break;
  11327.  
  11328. case 13:
  11329. S.SpartaGlobals.bundleIsPC && (r.props.onEnter ? r.props.onEnter() : r.insertValue("\n"));
  11330. break;
  11331.  
  11332. case 27:
  11333. r.props.useVirtualKeyboard || r.deactivate();
  11334. break;
  11335.  
  11336. case 37:
  11337. r.offsetCursor(-1);
  11338. break;
  11339.  
  11340. case 39:
  11341. r.offsetCursor(1);
  11342. break;
  11343.  
  11344. case 8:
  11345. r.deleteOffset(-1);
  11346. break;
  11347.  
  11348. case 46:
  11349. r.deleteOffset(1);
  11350. break;
  11351.  
  11352. case 35:
  11353. r.offsetCursor(r.value.length);
  11354. break;
  11355.  
  11356. case 36:
  11357. r.offsetCursor(-r.value.length);
  11358. break;
  11359.  
  11360. case 65:
  11361. r.isControlDown && r.setState({
  11362. cursorStart: 0,
  11363. cursorEnd: r.value.length
  11364. });
  11365. break;
  11366.  
  11367. case 67:
  11368. r.isControlDown && r.onCopy();
  11369. break;
  11370.  
  11371. case 88:
  11372. r.isControlDown && r.onCut();
  11373. break;
  11374.  
  11375. case 86:
  11376. r.isControlDown && r.onPaste();
  11377. }
  11378. }, r.onModifierKeyDown = function(e) {
  11379. switch (e) {
  11380. case 160:
  11381. r.isShiftDown = !0;
  11382. break;
  11383.  
  11384. case 162:
  11385. r.isControlDown = !0;
  11386. break;
  11387.  
  11388. case 164:
  11389. r.isAltDown = !0;
  11390. }
  11391. }, r.onModifierKeyUp = function(e) {
  11392. switch (e) {
  11393. case 160:
  11394. r.isShiftDown = !1;
  11395. break;
  11396.  
  11397. case 162:
  11398. r.isControlDown = !1;
  11399. break;
  11400.  
  11401. case 164:
  11402. r.isAltDown = !1;
  11403. }
  11404. }, r.onClick = function() {
  11405. r.state.isActive || r.activate();
  11406. }, r.onCharacterClicked = function(e) {
  11407. r.state.isActive ? r.setState({
  11408. cursorStart: e,
  11409. cursorEnd: e
  11410. }) : r.activate();
  11411. }, r.onCharacterMouseEnter = function(e, t) {
  11412. r.state.isActive && r.isMouseDown && (t.stopPropagation(), r.setState({
  11413. cursorEnd: e
  11414. }));
  11415. }, r.onCharacterMouseDown = function(e) {
  11416. if (r.state.isActive) {
  11417. switch (r.isMouseDown = !0, r.multiClickTimer ? (clearTimeout(r.multiClickTimer),
  11418. r.numClicks += 1) : r.numClicks = 1, r.numClicks) {
  11419. case 1:
  11420. r.setState({
  11421. cursorStart: e,
  11422. cursorEnd: e
  11423. });
  11424. break;
  11425.  
  11426. case 2:
  11427. var t = r.value.lastIndexOf(" ", e) + 1, n = r.value.indexOf(" ", e);
  11428. -1 === n && (n = r.value.length), r.setState({
  11429. cursorStart: t,
  11430. cursorEnd: n
  11431. });
  11432. break;
  11433.  
  11434. case 3:
  11435. r.setState({
  11436. cursorStart: 0,
  11437. cursorEnd: r.value.length
  11438. });
  11439. }
  11440. r.multiClickTimer = setTimeout(function() {
  11441. return r.multiClickTimer = 0;
  11442. }, 300);
  11443. }
  11444. }, r.deactivate = function() {
  11445. r.state.isActive && (r.props.useCursor && (r.inputManager && r.inputManager.releaseInputGroup(),
  11446. l.setNavigationEnabled(!0), clearInterval(r.cursorVisibilityInterval), r.cursorOpacity.set(0)),
  11447. r.unsubscribeFromEvents(), r.setState({
  11448. isActive: !1,
  11449. cursorStart: r.value.length,
  11450. cursorEnd: r.value.length
  11451. }), r.props.onDeactivate && r.props.onDeactivate());
  11452. }, r.activate = function() {
  11453. r.props.disabled || (r.state.isActive ? r.offsetCursor(r.value.length) : (r.props.useCursor && (r.inputManager && r.inputManager.isolateInputGroup(),
  11454. l.setNavigationEnabled(!1), clearInterval(r.cursorVisibilityInterval), r.cursorVisibilityInterval = setInterval(r.toggleCursorVisibility, 500),
  11455. r.cursorOpacity.set(1)), r.subscribeToEvents(), r.setState({
  11456. isActive: !0
  11457. }), r.props.onActivate && r.props.onActivate()));
  11458. }, r.toggleCursorVisibility = function() {
  11459. r.cursorOpacity.set(r.cursorOpacity.previousInstruction.to ? 0 : 1);
  11460. }, r.showVirtualKeyboard = function() {
  11461. var e = r.sparta.twinkle, t = e.inputHandler, n = e.frostbite;
  11462. if (r.props.disabled) return !1;
  11463. r.props.useVirtualKeyboard && r.eventSubscriptions.length < 1 && r.eventSubscriptions.push(t.onTypingInput.listen(function(e, t, n) {
  11464. t && r.replaceValue(n);
  11465. })), n.sendMessage("sparta.toggleVirtualKeyboard", {
  11466. show: !0,
  11467. title: r.props.title || "",
  11468. description: r.props.description || "",
  11469. defaultText: r.value,
  11470. maxTextLength: r.props.maxLength,
  11471. characterType: r.props.type
  11472. });
  11473. };
  11474. var o = e.initialValue || e.value || "";
  11475. return r.state = {
  11476. value: o,
  11477. cursorStart: o.length,
  11478. cursorEnd: o.length
  11479. }, r.focusItem = r.props.focusItem || r.sparta.twinkle.focus.create(r, r.props.debugName || "inputfield"),
  11480. r.focusItem.autoFocusCandidate = void 0 === e.autoFocusCandidate || e.autoFocusCandidate,
  11481. r.props.useVirtualKeyboard ? (r.focusItem.onFocus(r.activate), r.focusItem.onBlur(r.deactivate)) : (r.focusItem.onFocus(function() {
  11482. r.inputManager && r.inputManager.isolateInputGroup(), r.inputManager && r.inputManager.updateInput();
  11483. }), r.focusItem.onBlur(function() {
  11484. r.inputManager && r.inputManager.releaseInputGroup();
  11485. })), r.eventSubscriptions = [], r.modifierKeySubscriptions = [], r.cursorOpacity = s.Animation.tween("a81a1502:196:46", 0),
  11486. r;
  11487. }
  11488. var I;
  11489. return r.__extends(n, t), I = n, Object.defineProperty(n.prototype, "value", {
  11490. get: function() {
  11491. return void 0 !== this.props.value ? this.props.value : this.state.value;
  11492. },
  11493. enumerable: !0,
  11494. configurable: !0
  11495. }), n.prototype.getFocusItem = function() {
  11496. return this.focusItem;
  11497. }, n.prototype.componentWillReceiveProps = function(e) {
  11498. if (e.initialValue !== this.props.initialValue) {
  11499. var t = e.initialValue || "";
  11500. this.setState({
  11501. value: t,
  11502. cursorStart: t.length,
  11503. cursorEnd: t.length
  11504. });
  11505. }
  11506. }, n.prototype.componentDidMount = function() {
  11507. I.mountedInstances.push(this), this.subscribeToModifierEvents();
  11508. }, n.prototype.componentWillUnmount = function() {
  11509. I.mountedInstances.splice(I.mountedInstances.indexOf(this), 1), this.deactivate(),
  11510. this.cursorOpacity.destroy(), this.unsubscribeFromModifierEvents();
  11511. }, n.prototype.onTab = function() {
  11512. var e = I.mountedInstances.indexOf(this), t = e + (this.isShiftDown ? -1 : 1);
  11513. t < 0 ? t = I.mountedInstances.length - 1 : t > I.mountedInstances.length - 1 && (t = 0),
  11514. t !== e && (this.deactivate(), I.mountedInstances[t].activate());
  11515. }, n.prototype.onCopy = function() {
  11516. if (0 !== this.selectionSize()) {
  11517. var e = this.value.substring(this.cursorMin(), this.cursorMax());
  11518. this.sparta.twinkle.nativeApi.setClipboardText(e);
  11519. }
  11520. }, n.prototype.onCut = function() {
  11521. this.onCopy(), this.splice(this.cursorMin(), this.selectionSize());
  11522. }, n.prototype.onPaste = function() {
  11523. var e = this.sparta.twinkle.nativeApi.getClipboardText();
  11524. "string" == typeof e && this.insertValue(e);
  11525. }, n.prototype.cursorMin = function() {
  11526. return Math.min(this.state.cursorStart, this.state.cursorEnd);
  11527. }, n.prototype.cursorMax = function() {
  11528. return Math.max(this.state.cursorStart, this.state.cursorEnd);
  11529. }, n.prototype.selectionSize = function() {
  11530. return this.cursorMax() - this.cursorMin();
  11531. }, n.prototype.subscribeToEvents = function() {
  11532. var e = this;
  11533. this.unsubscribeFromEvents();
  11534. var t = this.sparta.twinkle, n = t.inputHandler, r = t.frostbite;
  11535. this.props.useVirtualKeyboard || (this.eventSubscriptions.push(n.onMouseEventBeforePropagation.listen(function(t) {
  11536. return e.deactivateOnClickOutside(t);
  11537. })), this.eventSubscriptions.push(n.onKeyDown.listen(this.onKeyDown)), this.eventSubscriptions.push(n.onTypingInput.listen(function(t, n, r) {
  11538. return e.insertValue(r);
  11539. })), r.sendMessage("sparta.toggleVirtualKeyboard", {
  11540. show: !0
  11541. }), this.eventSubscriptions.push(function() {
  11542. r.sendMessage("sparta.toggleVirtualKeyboard", {
  11543. show: !1
  11544. });
  11545. }), this.eventSubscriptions.push(n.onMouseEventAfterPropagation.listen(function(t) {
  11546. e.isMouseDown && t.button === v.MouseButton.Primary && t.event === v.MouseEventType.onMouseUp && (e.isMouseDown = !1);
  11547. })));
  11548. }, n.prototype.subscribeToModifierEvents = function() {
  11549. this.unsubscribeFromModifierEvents();
  11550. var e = this.sparta.twinkle.inputHandler;
  11551. this.modifierKeySubscriptions.push(e.onKeyUp.listen(this.onModifierKeyUp)), this.modifierKeySubscriptions.push(e.onKeyDown.listen(this.onModifierKeyDown));
  11552. }, n.prototype.unsubscribeFromEvents = function() {
  11553. this.eventSubscriptions.forEach(function(e) {
  11554. return e();
  11555. }), this.eventSubscriptions = [];
  11556. }, n.prototype.unsubscribeFromModifierEvents = function() {
  11557. this.modifierKeySubscriptions.forEach(function(e) {
  11558. return e();
  11559. }), this.modifierKeySubscriptions = [];
  11560. }, n.prototype.deactivateOnClickOutside = function(e) {
  11561. var t = this;
  11562. if (e.event === v.MouseEventType.onClick && e.button <= v.MouseButton.Wheel) {
  11563. if (this.focusItem.surfaceId) {
  11564. var n = this.focusItem.getSurfaceElement();
  11565. if (n && e.surfaces.some(function(e) {
  11566. var r = t.sparta.twinkle.reconciler.getSurfaceById(e.surfaceId);
  11567. return !!r && n.isDescendantOf(r);
  11568. })) return;
  11569. }
  11570. this.deactivate();
  11571. }
  11572. }, n.prototype.insertValue = function(e) {
  11573. var t = this, n = e.split("").filter(function(e) {
  11574. return T.test(e) || S.SpartaGlobals.bundleIsPC && t.props.multiline && "\n" === e;
  11575. }).join("");
  11576. n && this.splice(this.cursorMin(), this.selectionSize(), n);
  11577. }, n.prototype.replaceValue = function(e) {
  11578. var t = e.split("").filter(function(e) {
  11579. return T.test(e);
  11580. }).join("");
  11581. this.setState({
  11582. value: t,
  11583. cursorStart: t.length,
  11584. cursorEnd: t.length
  11585. }), this.props.onValueChanged && this.props.onValueChanged(e);
  11586. }, n.prototype.splice = function(e, t, n) {
  11587. var r;
  11588. e < 0 && (r = e + t, e = 0, t = r > 0 ? r : 0), (r = e + t) > this.value.length && (e >= this.value.length ? (e = this.value.length,
  11589. t = 0) : t = this.value.length - e);
  11590. var o = this.value.split("");
  11591. if (n && n.length > 0 && "number" == typeof this.props.maxLength) {
  11592. var i = this.props.maxLength - (o.length - t);
  11593. n = n.substring(0, i);
  11594. } else n = "";
  11595. o.splice(e, t, n);
  11596. var a = o.join(""), s = C(e + n.length, 0, a.length);
  11597. this.setState({
  11598. value: a,
  11599. cursorStart: s,
  11600. cursorEnd: s
  11601. }), this.props.onValueChanged && this.props.onValueChanged(a);
  11602. }, n.prototype.deleteOffset = function(e) {
  11603. var t = this.selectionSize();
  11604. if (t) this.splice(this.cursorMin(), t); else if (e > 0) this.splice(this.state.cursorStart, e); else if (e < 0) {
  11605. var n = Math.abs(e);
  11606. this.splice(this.state.cursorStart - n, n);
  11607. }
  11608. }, n.prototype.offsetCursor = function(e) {
  11609. if (!e) return this.value.length;
  11610. var t;
  11611. if (this.isShiftDown || this.isMouseDown) t = C(this.state.cursorEnd + e, 0, this.value.length),
  11612. this.setState({
  11613. cursorEnd: t
  11614. }); else {
  11615. var n = e < 0 ? this.cursorMin() : this.cursorMax();
  11616. t = this.selectionSize() ? n : C(n + e, 0, this.value.length), this.setState({
  11617. cursorStart: t,
  11618. cursorEnd: t
  11619. });
  11620. }
  11621. }, n.prototype.renderPaddingChar = function(e, t, n) {
  11622. var r = "padding-char-" + n;
  11623. return " " === e ? o.createElement(p.Text, {
  11624. key: r,
  11625. value: "_",
  11626. style: t,
  11627. size: this.props.size,
  11628. type: _.TextType.LIGHT
  11629. }) : o.createElement(p.Text, {
  11630. key: r,
  11631. value: e,
  11632. style: t,
  11633. size: this.props.size,
  11634. type: _.TextType.LIGHT
  11635. });
  11636. }, n.prototype.render = function() {
  11637. var t, n = this, r = this.value;
  11638. if (this.props.type === e.Password && (r = "*".repeat(this.value.length)), this.props.multiline) return o.createElement(a.InputRegistration, {
  11639. debugName: "a81a1502:750:47",
  11640. getInput: this.getInput,
  11641. group: S.SpartaGlobals.bundleIsPC
  11642. }, o.createElement(f.TextArea, {
  11643. onClick: this.onClick,
  11644. onCharacterClicked: this.onCharacterClicked,
  11645. onCharacterMouseEnter: this.onCharacterMouseEnter,
  11646. onCharacterMouseDown: this.onCharacterMouseDown,
  11647. selectionStart: this.cursorMin(),
  11648. focusItem: this.focusItem,
  11649. selectionEnd: this.cursorMax(),
  11650. style: this.props.style,
  11651. size: this.props.size,
  11652. isActive: this.state.isActive,
  11653. disabled: this.props.disabled,
  11654. isInvalid: this.props.isInvalid,
  11655. placeholder: this.props.placeholder,
  11656. useCursor: this.props.useCursor,
  11657. value: r
  11658. }));
  11659. if (this.props.useCursor && 0 === this.selectionSize()) {
  11660. var i = r.substr(0, this.state.cursorStart), s = this.getTheme().getFonts(), u = (s.light || s.normal).fontStyle(this.props.size || m.TextSize.M).getStyleValue("textLetterSpacing") || 0, l = g.DynamicStyle.create(u > 0 ? {
  11661. paddingLeft: u,
  11662. opacity: 0
  11663. } : {
  11664. opacity: 0
  11665. }, "a81a1502:783:30"), c = Array.from(i).map(function(e, t) {
  11666. return n.renderPaddingChar(e, l, t);
  11667. });
  11668. t = o.createElement("surface", {
  11669. style: E
  11670. }, c, o.createElement(p.Text, {
  11671. type: _.TextType.LIGHT,
  11672. value: "|",
  11673. size: this.props.size,
  11674. style: h.merge2(y.CommonStyles.color("#ffffff"), this.cursorOpacity.getStyleClass("opacity"))
  11675. }));
  11676. }
  11677. return o.createElement(a.InputRegistration, {
  11678. debugName: "a81a1502:806:43",
  11679. getInput: this.getInput,
  11680. group: S.SpartaGlobals.bundleIsPC
  11681. }, o.createElement(d.TextField, {
  11682. onClick: this.onClick,
  11683. onCharacterClicked: this.onCharacterClicked,
  11684. onCharacterMouseEnter: this.onCharacterMouseEnter,
  11685. onCharacterMouseDown: this.onCharacterMouseDown,
  11686. selectionStart: this.cursorMin(),
  11687. focusItem: this.focusItem,
  11688. selectionEnd: this.cursorMax(),
  11689. style: g.DynamicStyle.maybeLegacyStyle(this.props.style, "a81a1502:815:28"),
  11690. size: this.props.size,
  11691. isActive: this.state.isActive,
  11692. disabled: this.props.disabled,
  11693. isInvalid: this.props.isInvalid,
  11694. placeholder: this.props.placeholder,
  11695. value: r
  11696. }, t));
  11697. }, n.contextTypes = b.ThemeContext.contextTypes, n.defaultProps = {
  11698. type: e.LatinFull,
  11699. title: "",
  11700. maxLength: 255,
  11701. useVirtualKeyboard: S.SpartaGlobals.bundleIsConsole,
  11702. useCursor: S.SpartaGlobals.bundleIsPC,
  11703. initialValue: "",
  11704. size: m.TextSize.M,
  11705. isInvalid: !1,
  11706. deactivateOnBlur: !0,
  11707. disabled: !1,
  11708. cancelKey: c.Keys.Decline,
  11709. multiline: !1
  11710. }, n.mountedInstances = [], n = I = r.__decorate([ i.observer ], n);
  11711. }(o.Component);
  11712. t.InputField = I;
  11713. }).call(this, n(3));
  11714. }, function(e, t, n) {
  11715. "use strict";
  11716. Object.defineProperty(t, "__esModule", {
  11717. value: !0
  11718. });
  11719. var r = function() {
  11720. return function e(t) {
  11721. this.unlocked = !1, this.valueAcquired = 0, this.valueNeeded = 0, this.percentage = 0,
  11722. t && (this.valueAcquired = t.valueAcquired || 0, this.valueNeeded = t.valueNeeded || 0,
  11723. this.unlocked = !!t.unlocked), this.unlocked ? this.percentage = 1 : this.valueAcquired >= 0 && this.valueNeeded > 0 && (this.percentage = Math.min(this.valueAcquired / this.valueNeeded, 1));
  11724. };
  11725. }();
  11726. t.Progression = r;
  11727. }, function(e, t, n) {
  11728. "use strict";
  11729. Object.defineProperty(t, "__esModule", {
  11730. value: !0
  11731. });
  11732. var r = n(0), o = n(1), i = n(4), a = n(14), s = n(6), u = n(21), l = n(17).bbOfflineUrl("/sparta/jsclient/builds/assets/icon-scraps-white2-l-bb954c75.png"), c = n(20), p = n(23);
  11733. t.ScrapIcon = function(e) {
  11734. var t = e.color, n = e.iconSize;
  11735. return o.createElement("surface", {
  11736. key: "asset",
  11737. style: {
  11738. texture: l,
  11739. color: t,
  11740. textureMode: "contain",
  11741. width: n,
  11742. height: n,
  11743. marginLeft: 4,
  11744. marginRight: 4
  11745. }
  11746. });
  11747. };
  11748. var d = function(e) {
  11749. function n(t) {
  11750. var n = e.call(this, t) || this;
  11751. return n.scaleTween = a.Animation.tween("4519789d:50:34", 1), n.state = {
  11752. animatedValue: t.animated ? t.value : null
  11753. }, n;
  11754. }
  11755. return r.__extends(n, e), n.prototype.componentWillReceiveProps = function(e) {
  11756. var t = this;
  11757. e.animated && (e.value > this.props.value ? this.scaleTween.to(2, {
  11758. delay: 1800,
  11759. duration: 100,
  11760. easing: p.Easing.CubicIn
  11761. }, function() {
  11762. t.scaleTween.isDestroyed() || t.setState({
  11763. animatedValue: e.value
  11764. }, function() {
  11765. t.scaleTween.to(1, {
  11766. duration: 500,
  11767. easing: p.Easing.CubicOut
  11768. });
  11769. });
  11770. }) : this.setState({
  11771. animatedValue: e.value
  11772. }));
  11773. }, n.prototype.componentWillUnmount = function() {
  11774. this.scaleTween.destroy();
  11775. }, n.prototype.render = function() {
  11776. var e = this.props.color || (this.props.dark ? "#000000" : "#ffffff"), n = this.props.size ? u.LINE_HEIGHTS[this.props.size] : u.LINE_HEIGHTS.M, r = !!this.props.prefix && o.createElement(s.Text, {
  11777. value: this.props.prefix.trim() + " ",
  11778. key: "prefix",
  11779. color: e,
  11780. size: this.props.size,
  11781. style: {
  11782. marginRight: 8
  11783. }
  11784. }), i = !!this.props.suffix && o.createElement(s.Text, {
  11785. value: " " + this.props.suffix.trim(),
  11786. key: "suffix",
  11787. color: e,
  11788. size: this.props.size,
  11789. style: {
  11790. marginLeft: 8
  11791. }
  11792. }), a = (this.props.animated ? this.state.animatedValue : this.props.value) || 0;
  11793. return o.createElement("surface", {
  11794. style: [ {
  11795. flexDirection: "row"
  11796. }, this.props.style ]
  11797. }, c.localeRearrange([ r, [ o.createElement(t.ScrapIcon, {
  11798. key: "icon",
  11799. color: e,
  11800. iconSize: n
  11801. }), o.createElement(s.Text, {
  11802. key: "value",
  11803. value: "" + a,
  11804. color: e,
  11805. size: this.props.size,
  11806. style: {
  11807. scaleX: this.scaleTween.getStyle(),
  11808. scaleY: this.scaleTween.getStyle()
  11809. }
  11810. }) ], i ]));
  11811. }, n = r.__decorate([ i.observer ], n);
  11812. }(o.Component);
  11813. t.TunguskaBattlepackScraps = d;
  11814. }, function(e, t, n) {
  11815. "use strict";
  11816. (function(__) {
  11817. Object.defineProperty(t, "__esModule", {
  11818. value: !0
  11819. });
  11820. var e = n(17);
  11821. t.standard = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_white_flare-a3a0b83b.png"),
  11822. t.special = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_white_flare-a3a0b83b.png"),
  11823. t.distinguished = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_blue_flare-3f82da1b.png"),
  11824. t.legendary = e.bbOfflineUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_orange_flare-68d1e160.png"),
  11825. t.mixed = e.bbUrl("/gamedata/tunguska/UI/Assets/Rarity/medium_orange_flare-68d1e160.png");
  11826. var r = "fb://Sparta/UI/Movies/tunguskapack_enhanced_2", o = "fb://Sparta/UI/Movies/tunguskapack_superior_3";
  11827. t.videos = {
  11828. 0: [ "fb://Sparta/UI/Movies/tunguskapack_standard_1", "fb://Sparta/UI/Movies/tunguskapack_standard_2", "fb://Sparta/UI/Movies/tunguskapack_standard_3" ],
  11829. 1: [ r, r, "fb://Sparta/UI/Movies/tunguskapack_enhanced_3" ],
  11830. 2: [ o, o, o ]
  11831. }, t.level = {
  11832. 0: t.special,
  11833. 1: t.distinguished,
  11834. 2: t.legendary,
  11835. 3: t.mixed
  11836. }, t.fade = {
  11837. 0: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-white-grid-6df9d5a2.png"),
  11838. 1: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-blue-grid-0712865c.png"),
  11839. 2: e.bbUrl("/sparta/assets/tunguska/battlepacks/flare-orange-grid-55edbcfe.png"),
  11840. width: 206,
  11841. height: 170
  11842. }, t.flare = {
  11843. 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-white-9297467d.jpg"),
  11844. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-blue-7e706f88.jpg"),
  11845. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-orange-0b2a170f.jpg"),
  11846. 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-orange-0b2a170f.jpg"),
  11847. width: 408,
  11848. height: 1e3
  11849. }, t.sideFlare = {
  11850. 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-white-46ef71e7.jpg"),
  11851. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-blue-627243c1.jpg"),
  11852. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-orange-84ff029e.jpg"),
  11853. 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/flare-side-orange-84ff029e.jpg"),
  11854. width: 1782,
  11855. height: 922
  11856. }, t.bottomGlow = {
  11857. 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-white-db827b5b.jpg"),
  11858. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-blue-c1f2b771.jpg"),
  11859. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-orange-1e65fd65.jpg"),
  11860. 3: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/bottom-flare-orange-1e65fd65.jpg"),
  11861. width: 1e3,
  11862. height: 455
  11863. }, t.circleTexture = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/CircleBoom-d69f3cbb.png");
  11864. var i = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_TankSkin-e5669d14.wav");
  11865. t.openingAudio = {
  11866. DEFAULT: i,
  11867. VEHICLE: i,
  11868. WEAPON: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_WeaponSkin_WHITE_Small_WITH_TAIL_STE-a70cab95.wav"),
  11869. NUGGET: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/Battlepack_WeaponSkin_BLUE_Medium_WITH_TAIL_STE-1e40f11e.wav")
  11870. }, t.backgroundEnd = e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/opening/endframe-8d869f8a.jpg"),
  11871. t.openingFrames = {
  11872. 0: {
  11873. frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f1-5290508a.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f2-50222f29.dds") ],
  11874. 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_0-39f4d8f9.dds"),
  11875. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_1-b21130e3.dds"),
  11876. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/standard_f3_2-e9f7c6bd.dds")
  11877. },
  11878. 1: {
  11879. frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f1-c606bf16.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f2-1a493088.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f3-fb397a41.dds") ],
  11880. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f4_1-b21ed798.dds"),
  11881. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/enhanced_f4_2-fcce5e8b.dds")
  11882. },
  11883. 2: {
  11884. frames: [ e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f1-9eca1ab6.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f2-59efaf46.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f3-533da6a1.dds"), e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f4-fc815f1c.dds") ],
  11885. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/superior_f5_2-50caedf7.dds")
  11886. }
  11887. }, t.frameSounds = {
  11888. 0: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_standard-024d5c78.wav"),
  11889. 1: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_enhanced-ded90293.wav"),
  11890. 2: e.bbOfflineUrl("/sparta/assets/tunguska/battlepacks/frames/tunguska_battlepack_open_superior-b25bc55e.wav")
  11891. }, t.rgb = {
  11892. 0: "#ffffffee",
  11893. 1: "#6baee5",
  11894. 2: "#d48311",
  11895. 3: "#d48311"
  11896. }, t.getName = function a(e) {
  11897. switch (e) {
  11898. case 0:
  11899. return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_SPECIAL");
  11900.  
  11901. case 1:
  11902. return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_DISTINGUISHED");
  11903.  
  11904. case 2:
  11905. case 3:
  11906. return __("ID_SPARTA_TUNGUSKA_BATTLEPACKS_RARITY_LEGENDARY");
  11907.  
  11908. default:
  11909. return "";
  11910. }
  11911. };
  11912. }).call(this, n(3));
  11913. }, function(e, t, n) {
  11914. "use strict";
  11915. var r = n(42);
  11916. e.exports = function(e, t) {
  11917. return !!e && r(function() {
  11918. t ? e.call(null, function() {}, 1) : e.call(null);
  11919. });
  11920. };
  11921. }, function(e, t, n) {
  11922. "use strict";
  11923. Object.defineProperty(t, "__esModule", {
  11924. value: !0
  11925. });
  11926. var r = function() {
  11927. function e() {
  11928. this.callbacks = [];
  11929. }
  11930. return e.prototype.listen = function(e) {
  11931. var t = this;
  11932. return this.callbacks.push(e), function() {
  11933. var n = t.callbacks.indexOf(e);
  11934. n > -1 && t.callbacks.splice(n, 1);
  11935. };
  11936. }, e.prototype.listenOnce = function(e) {
  11937. var t = this.listen(function() {
  11938. for (var n = [], r = 0; r < arguments.length; r++) n[r] = arguments[r];
  11939. t(), e.apply(void 0, n);
  11940. });
  11941. return t;
  11942. }, e.prototype.trigger = function() {
  11943. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  11944. for (var n = 0, r = this.callbacks.slice(); n < r.length; n++) {
  11945. r[n].apply(null, e);
  11946. }
  11947. }, e.prototype.destroy = function() {
  11948. this.callbacks.length = 0;
  11949. }, e;
  11950. }();
  11951. t.TwinkleEvent = r;
  11952. var o = function() {
  11953. function e() {
  11954. this.callbacks = [];
  11955. }
  11956. return e.prototype.listen = function(e) {
  11957. var t = this;
  11958. return this.callbacks.push(e), function() {
  11959. var n = t.callbacks.indexOf(e);
  11960. n > -1 && t.callbacks.splice(n, 1);
  11961. };
  11962. }, e.prototype.listenOnce = function(e) {
  11963. var t = this.listen(function() {
  11964. t(), e();
  11965. });
  11966. return t;
  11967. }, e.prototype.trigger = function() {
  11968. for (var e = 0, t = this.callbacks.slice(); e < t.length; e++) {
  11969. (0, t[e])();
  11970. }
  11971. }, e.prototype.destroy = function() {
  11972. this.callbacks.length = 0;
  11973. }, e;
  11974. }();
  11975. t.TwinkleSignal = o;
  11976. var i = function() {
  11977. function e() {
  11978. this.callbacks = [];
  11979. }
  11980. return e.prototype.listen = function(e) {
  11981. var t = this;
  11982. return this.callbacks.push(e), function() {
  11983. var n = t.callbacks.indexOf(e);
  11984. n > -1 && t.callbacks.splice(n, 1);
  11985. };
  11986. }, e.prototype.listenOnce = function(e) {
  11987. var t = this.listen(function(n) {
  11988. t(), e(n);
  11989. });
  11990. return t;
  11991. }, e.prototype.trigger = function(e) {
  11992. for (var t = 0, n = this.callbacks.slice(); t < n.length; t++) {
  11993. (0, n[t])(e);
  11994. }
  11995. }, e.prototype.destroy = function() {
  11996. this.callbacks.length = 0;
  11997. }, e;
  11998. }();
  11999. t.TwinkleTypedEvent = i;
  12000. var a = function() {
  12001. function e() {
  12002. this.callbacks = [];
  12003. }
  12004. return e.prototype.listen = function(e) {
  12005. var t = this;
  12006. return this.callbacks.push(e), function() {
  12007. var n = t.callbacks.indexOf(e);
  12008. n > -1 && t.callbacks.splice(n, 1);
  12009. };
  12010. }, e.prototype.listenOnce = function(e) {
  12011. var t = this.listen(function(n, r) {
  12012. t(), e(n, r);
  12013. });
  12014. return t;
  12015. }, e.prototype.trigger = function(e, t) {
  12016. for (var n = 0, r = this.callbacks.slice(); n < r.length; n++) {
  12017. (0, r[n])(e, t);
  12018. }
  12019. }, e.prototype.destroy = function() {
  12020. this.callbacks.length = 0;
  12021. }, e;
  12022. }();
  12023. t.TwinkleTypedEvent2 = a;
  12024. var s = function() {
  12025. function e() {
  12026. this.callbacks = [];
  12027. }
  12028. return e.prototype.listen = function(e) {
  12029. var t = this;
  12030. return this.callbacks.push(e), function() {
  12031. var n = t.callbacks.indexOf(e);
  12032. n > -1 && t.callbacks.splice(n, 1);
  12033. };
  12034. }, e.prototype.listenOnce = function(e) {
  12035. var t = this.listen(function(n, r, o) {
  12036. t(), e(n, r, o);
  12037. });
  12038. return t;
  12039. }, e.prototype.trigger = function(e, t, n) {
  12040. for (var r = 0, o = this.callbacks.slice(); r < o.length; r++) {
  12041. (0, o[r])(e, t, n);
  12042. }
  12043. }, e.prototype.destroy = function() {
  12044. this.callbacks.length = 0;
  12045. }, e;
  12046. }();
  12047. t.TwinkleTypedEvent3 = s;
  12048. }, function(e, t, n) {
  12049. "use strict";
  12050. Object.defineProperty(t, "__esModule", {
  12051. value: !0
  12052. });
  12053. var r = n(0);
  12054. !function(e) {
  12055. e[e.NONE = 0] = "NONE", e[e.INVALID_SESSION = -32501] = "INVALID_SESSION", e[e.AUTHENTICATION_FAILED = -32502] = "AUTHENTICATION_FAILED",
  12056. e[e.FIRST_PARTY_TOKEN_INVALID = -22300] = "FIRST_PARTY_TOKEN_INVALID", e[e.FIRST_PARTY_TOKEN_EXPIRED = -22301] = "FIRST_PARTY_TOKEN_EXPIRED",
  12057. e[e.KILLSWITCH_SERVICE_DISABLED = -32800] = "KILLSWITCH_SERVICE_DISABLED", e[e.KILLSWITCH_SERVICE_RATE_LIMITED = -32801] = "KILLSWITCH_SERVICE_RATE_LIMITED",
  12058. e[e.GAME_NOT_SUPPORTED = -32802] = "GAME_NOT_SUPPORTED", e[e.SERVICE_NOT_AVAILABLE = -32804] = "SERVICE_NOT_AVAILABLE",
  12059. e[e.MAXIMUM_BOOKMARKS_REACHED = -32805] = "MAXIMUM_BOOKMARKS_REACHED", e[e.MISSING_PINGSITES = -34601] = "MISSING_PINGSITES",
  12060. e[e.MM_ALREADY_IN_PROGRESS = -34602] = "MM_ALREADY_IN_PROGRESS", e[e.BLAZE_ERROR = -34600] = "BLAZE_ERROR";
  12061. }(t.GatewayErrorCodes || (t.GatewayErrorCodes = {}));
  12062. var o = function(e) {
  12063. function t(n, r, o) {
  12064. var i = e.call(this, n) || this;
  12065. return i.message = n, i.code = r, i.requestInfo = o, i.name = "GatewayRequestError",
  12066. i.stack = "", Object.setPrototypeOf(i, t.prototype), i;
  12067. }
  12068. return r.__extends(t, e), t.is = function(e) {
  12069. return "GatewayRequestError" === e.name;
  12070. }, t;
  12071. }(Error);
  12072. t.GatewayRequestError = o;
  12073. }, function(e, t, n) {
  12074. "use strict";
  12075. Object.defineProperty(t, "__esModule", {
  12076. value: !0
  12077. }), function(e) {
  12078. e[e.Highlight = 1] = "Highlight", e[e.Select = 2] = "Select", e[e.Expand = 3] = "Expand",
  12079. e[e.Collapse = 4] = "Collapse";
  12080. }(t.AudioEffect || (t.AudioEffect = {})), function(e) {
  12081. e[e.Effect = 1] = "Effect", e[e.Track = 2] = "Track";
  12082. }(t.AudioType || (t.AudioType = {})), function(e) {
  12083. e[e.Play = 1] = "Play", e[e.Stop = 2] = "Stop";
  12084. }(t.AudioAction || (t.AudioAction = {}));
  12085. }, function(e, t, n) {
  12086. "use strict";
  12087. (function(__) {
  12088. Object.defineProperty(t, "__esModule", {
  12089. value: !0
  12090. });
  12091. var e = n(1);
  12092. function r(e) {
  12093. return function(t) {
  12094. return "string" != typeof t && (t = String(t)), e(t);
  12095. };
  12096. }
  12097. t.isStateless = function o(t) {
  12098. var n = t.type;
  12099. return "string" == typeof n || !(n.prototype instanceof e.Component);
  12100. }, t.formatPercent = r(function(e) {
  12101. return __("ID_SPARTA_FORMAT_PERCENT").replace("[[value]]", e);
  12102. }), t.formatSeconds = r(function(e) {
  12103. return __("ID_SPARTA_FORMAT_SECONDS").replace("[[value]]", e);
  12104. }), t.formatMinutes = r(function(e) {
  12105. return __("ID_SPARTA_FORMAT_MINUTES").replace("[[value]]", e);
  12106. }), t.isDefined = function i(e) {
  12107. return null != e;
  12108. }, t.useHasTimePassed = function a(t) {
  12109. var n = e.useState(!!t && t.getTime() <= Date.now()), r = n[0], o = n[1];
  12110. return e.useEffect(function() {
  12111. if (t) {
  12112. var e = setTimeout(function() {
  12113. return o(!0);
  12114. }, t.getTime() - Date.now());
  12115. return function() {
  12116. return clearTimeout(e);
  12117. };
  12118. }
  12119. }, [ t ]), r;
  12120. };
  12121. }).call(this, n(3));
  12122. }, function(e, t, n) {
  12123. "use strict";
  12124. (function(e) {
  12125. Object.defineProperty(t, "__esModule", {
  12126. value: !0
  12127. });
  12128. var r = n(145), o = n(1060), i = n(2), a = e.get("CopyStore"), s = function() {
  12129. function e(e, t, n) {
  12130. var o = this;
  12131. this.localeState = e, this.coreEventStore = t, this.buildInfo = n, this.copy = {},
  12132. this.apiEnv = "live", this.threeLetterCountry = "usa", r.onReady.listen(function() {
  12133. i.when(function() {
  12134. return e.isReady && !!t.nativeClientReadyMessage;
  12135. }, function() {
  12136. o.setApiEnv(), o.setCountryAndCopy();
  12137. });
  12138. });
  12139. }
  12140. return e.prototype.setCountryAndCopy = function() {
  12141. var e = this;
  12142. o.getJson({
  12143. url: "https://api1.origin.com/ecommerce2/ipToStoreFront",
  12144. headers: "Accept: application/json",
  12145. retry: 5,
  12146. success: function(t) {
  12147. e.threeLetterCountry = t.country || "usa", e.retrieveCopy();
  12148. },
  12149. failure: function() {
  12150. e.retrieveCopy();
  12151. }
  12152. });
  12153. }, e.prototype.retrieveCopy = function() {
  12154. var e = this, t = "https://data1.origin.com/{apiEnv}/odc/messaging/sparta/{platform}.{locale}.{country}.xjson".replace("{apiEnv}", this.apiEnv).replace("{platform}", this.buildInfo.bundlePlatform.toLowerCase()).replace("{locale}", this.locale).replace("{country}", this.threeLetterCountry);
  12155. a.debug("fetching copy from", t), o.getJson({
  12156. url: t,
  12157. retry: 3,
  12158. success: function(t) {
  12159. e.copy = t, e.retrieveUrlData();
  12160. }
  12161. });
  12162. }, e.prototype.retrieveUrlData = function() {
  12163. var e = this, t = u(this.copy, "settings.url.accessTos", "");
  12164. t = t.replace("{country}", this.threeLetterCountry).replace("{lang}", this.getLanguage());
  12165. var n = u(this.copy, "settings.url.accessTosData", ""), r = u(this.copy, "settings.url.accessTosPrepend", ""), i = u(this.copy, "settings.url.accessTosDate", "");
  12166. "" !== i && (i = new Date(i).toLocaleDateString()), "" !== n ? (n = (n = r + n).replace("%accessTosDate%", i),
  12167. l(this.copy, "settings.url.accessTosData", this.sanitizeUrlData(n))) : "" !== t && o.get({
  12168. url: t,
  12169. retry: 3,
  12170. success: function(t) {
  12171. n = (n = r + t).replace("%accessTosDate%", i), l(e.copy, "settings.url.accessTosData", e.sanitizeUrlData(n));
  12172. }
  12173. });
  12174. }, e.prototype.sanitizeUrlData = function(e) {
  12175. return (e = (e = (e = (e = e.replace(new RegExp("<br>", "g"), "\n")).replace(new RegExp("\n\n", "g"), "\n")).trim()).replace(new RegExp(/<.*?>/g), "")).split(/\n/);
  12176. }, e.prototype.strReplace = function(e, t, n) {
  12177. return "string" != typeof e || "string" != typeof n ? e : e = (e = e.replace(t.toLowerCase(), n)).replace(t.toUpperCase(), n.toUpperCase());
  12178. }, e.prototype.updateCopyRecurse = function(e, t, n) {
  12179. for (var r = "%" + t + "%", o = Object.keys(e), i = 0; i < o.length; i++) {
  12180. var a = o[i];
  12181. "string" == typeof e[a] ? e[a] = this.strReplace(e[a], r, n) : "object" == typeof e[a] && (e[a] = this.updateCopyRecurse(e[a], t, n));
  12182. }
  12183. return e;
  12184. }, e.prototype.getCopyPage = function(e, t) {
  12185. if ("object" != typeof this.copy) return {};
  12186. if ("object" != typeof this.copy[e]) return {};
  12187. var n = this.copy[e];
  12188. if ("object" == typeof t) for (var r = Object.keys(t), o = 0; o < r.length; o++) n = this.updateCopyRecurse(n, r[o], t[r[o]]);
  12189. return n;
  12190. }, e.prototype.getLanguage = function() {
  12191. var e = this.locale.substr(0, 2);
  12192. return -1 === [ "de", "es", "fr", "it", "ja", "ko", "pl", "pt", "ru", "zh" ].indexOf(e) && (e = "en"),
  12193. e;
  12194. }, e.prototype.setApiEnv = function() {
  12195. var e = this.coreEventStore.nativeClientReadyMessage, t = e && e.nativeClientInformation.env.onlineEnvironment;
  12196. this.apiEnv = "OnlineEnvironment_Production" === t ? "live" : "preview";
  12197. }, Object.defineProperty(e.prototype, "locale", {
  12198. get: function() {
  12199. var e = this.localeState.displayLocale;
  12200. return "en" === e.substr(0, 2) ? "en-us" : e;
  12201. },
  12202. enumerable: !0,
  12203. configurable: !0
  12204. }), e;
  12205. }();
  12206. function u(e, t, n) {
  12207. return t.split(".").reduce(function(e, t) {
  12208. return null == e ? e : e[t];
  12209. }, e) || n;
  12210. }
  12211. function l(e, t, n) {
  12212. for (var r = t.split("."), o = 0; o < r.length; o++) {
  12213. var i = r[o];
  12214. if (o === r.length - 1) {
  12215. e[i] = n;
  12216. break;
  12217. }
  12218. if (null !== e[i] && void 0 !== e[i] || (e[i] = {}), "object" != typeof e[i]) break;
  12219. e = e[i];
  12220. }
  12221. }
  12222. t.CopyStore = s, t.getCopyProperty = u, t.setCopyProperty = l;
  12223. }).call(this, n(15));
  12224. }, function(e, t, n) {
  12225. "use strict";
  12226. Object.defineProperty(t, "__esModule", {
  12227. value: !0
  12228. });
  12229. var r = n(0), o = n(1), i = n(2), a = n(4), s = n(48), u = n(35), l = n(8), c = function(e) {
  12230. function t() {
  12231. var t = null !== e && e.apply(this, arguments) || this;
  12232. return t.sparta = l.SpartaContext.getFromComponent(t), t;
  12233. }
  12234. return r.__extends(t, e), t.prototype.expireFailedFragmentsOnReconnect = function() {
  12235. var e = this, t = this.sparta.stores.presenceStateStore.isReady;
  12236. this.reaction(function() {
  12237. return e.sparta.stores.presenceStateStore.isReady;
  12238. }, function(n) {
  12239. n && n !== t && e.fragments.forEach(function(e) {
  12240. e.failstate && !e.isLoading && e.expire();
  12241. }), t = n;
  12242. });
  12243. }, t.prototype.componentWillMount = function() {
  12244. this.expireFailedFragmentsOnReconnect();
  12245. }, Object.defineProperty(t.prototype, "fragments", {
  12246. get: function() {
  12247. return Array.isArray(this.props.load) ? this.props.load : [ this.props.load ];
  12248. },
  12249. enumerable: !0,
  12250. configurable: !0
  12251. }), Object.defineProperty(t.prototype, "isSuccessful", {
  12252. get: function() {
  12253. return this.fragments.every(function(e) {
  12254. return !!e.value;
  12255. });
  12256. },
  12257. enumerable: !0,
  12258. configurable: !0
  12259. }), Object.defineProperty(t.prototype, "hasSomeLoading", {
  12260. get: function() {
  12261. return !this.props.disableLoadingState && this.fragments.some(function(e) {
  12262. return e.isLoading;
  12263. });
  12264. },
  12265. enumerable: !0,
  12266. configurable: !0
  12267. }), Object.defineProperty(t.prototype, "hasSomeErrors", {
  12268. get: function() {
  12269. return this.fragments.some(function(e) {
  12270. return e.isReady && !e.value;
  12271. });
  12272. },
  12273. enumerable: !0,
  12274. configurable: !0
  12275. }), t.prototype.render = function() {
  12276. var e;
  12277. if (this.isSuccessful) {
  12278. var t = this.fragments.map(function(e) {
  12279. return e.value;
  12280. });
  12281. return (e = this.props).children.apply(e, t);
  12282. }
  12283. return this.hasSomeLoading ? o.createElement(s.EmptyState, null, o.createElement(u.Spinner, {
  12284. large: !0
  12285. })) : this.hasSomeErrors ? o.createElement("surface", null) : null;
  12286. }, t.contextTypes = l.SpartaContext.contextTypes, r.__decorate([ i.computed ], t.prototype, "fragments", null),
  12287. r.__decorate([ i.computed ], t.prototype, "isSuccessful", null), r.__decorate([ i.computed ], t.prototype, "hasSomeLoading", null),
  12288. r.__decorate([ i.computed ], t.prototype, "hasSomeErrors", null), t = r.__decorate([ a.observer ], t);
  12289. }(o.Component);
  12290. t.OptimisticFragmentLoader = c;
  12291. }, function(e, t, n) {
  12292. var r = n(279), o = n(161), i = n(103), a = n(160), s = n(97), u = n(450), l = Object.getOwnPropertyDescriptor;
  12293. t.f = n(81) ? l : function e(t, n) {
  12294. if (t = i(t), n = a(n, !0), u) try {
  12295. return l(t, n);
  12296. } catch (e) {}
  12297. if (s(t, n)) return o(!r.f.call(t, n), t[n]);
  12298. };
  12299. }, function(e, t, n) {
  12300. var r = n(159), o = n(237), i = n(112), a = n(88), s = n(710);
  12301. e.exports = function(e, t) {
  12302. var n = 1 == e, u = 2 == e, l = 3 == e, c = 4 == e, p = 6 == e, d = 5 == e || p, f = t || s;
  12303. return function(t, s, m) {
  12304. for (var h, g, y = i(t), S = o(y), v = r(s, m, 3), b = a(S.length), _ = 0, T = n ? f(t, b) : u ? f(t, 0) : void 0; b > _; _++) if ((d || _ in S) && (g = v(h = S[_], _, y),
  12305. e)) if (n) T[_] = g; else if (g) switch (e) {
  12306. case 3:
  12307. return !0;
  12308.  
  12309. case 5:
  12310. return h;
  12311.  
  12312. case 6:
  12313. return _;
  12314.  
  12315. case 2:
  12316. T.push(h);
  12317. } else if (c) return !1;
  12318. return p ? -1 : l || c ? c : T;
  12319. };
  12320. };
  12321. }, function(e, t, n) {
  12322. var r = n(16), o = n(51), i = n(42);
  12323. e.exports = function(e, t) {
  12324. var n = (o.Object || {})[e] || Object[e], a = {};
  12325. a[e] = t(n), r(r.S + r.F * i(function() {
  12326. n(1);
  12327. }), "Object", a);
  12328. };
  12329. }, function(e, t, n) {
  12330. "use strict";
  12331. Object.defineProperty(t, "__esModule", {
  12332. value: !0
  12333. });
  12334. var r = n(92), o = n(36), i = {}, a = r.globalScope.TwinkleNative ? void 0 : console, s = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.log, u = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.info, l = r.globalScope.TwinkleNative ? S.bind(void 0, 4) : console.warn, c = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.error, p = r.globalScope.TwinkleNative ? S.bind(void 0, 2) : console.debug || u, d = 0;
  12335. var f = {}, m = function() {
  12336. function e() {
  12337. for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
  12338. this.context = e, this.log = h("log", e), this.info = h("info", e), this.warn = h("warn", e),
  12339. this.error = h("error", e), this.debug = h("debug", e);
  12340. }
  12341. return Object.defineProperty(e, "default", {
  12342. get: function() {
  12343. return e.get();
  12344. },
  12345. enumerable: !0,
  12346. configurable: !0
  12347. }), e.prototype.extend = function() {
  12348. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  12349. var r = this.context.concat(t);
  12350. return e.get.apply(e, r);
  12351. }, e.get = function() {
  12352. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  12353. var r = t.join("_");
  12354. return i[r] || (i[r] = new (e.bind.apply(e, [ void 0 ].concat(t)))());
  12355. }, Object.defineProperty(e, "log", {
  12356. get: function() {
  12357. return e.default.log;
  12358. },
  12359. enumerable: !0,
  12360. configurable: !0
  12361. }), Object.defineProperty(e, "info", {
  12362. get: function() {
  12363. return e.default.info;
  12364. },
  12365. enumerable: !0,
  12366. configurable: !0
  12367. }), Object.defineProperty(e, "warn", {
  12368. get: function() {
  12369. return e.default.warn;
  12370. },
  12371. enumerable: !0,
  12372. configurable: !0
  12373. }), Object.defineProperty(e, "error", {
  12374. get: function() {
  12375. return e.default.error;
  12376. },
  12377. enumerable: !0,
  12378. configurable: !0
  12379. }), Object.defineProperty(e, "debug", {
  12380. get: function() {
  12381. return e.default.debug;
  12382. },
  12383. enumerable: !0,
  12384. configurable: !0
  12385. }), e;
  12386. }();
  12387. function h(e, t) {
  12388. var n, o = [];
  12389. if (r.globalScope.isJSC) {
  12390. var i = t.join(":") + " →";
  12391. o.push(i);
  12392. } else {
  12393. i = "%c" + t.join(":");
  12394. i += Array(Math.max(52 - i.length, 2)).join(" ") + "→", f[t[0]] || (f[t[0]] = function m() {
  12395. return d += .618033988749895, 360 * (d %= 1);
  12396. }());
  12397. var h = "color: hsl(" + f[t[0]] + ",99%,40%); font-weight: bold";
  12398. o.push(i, h);
  12399. }
  12400. return (n = function g(e) {
  12401. switch (e) {
  12402. case "log":
  12403. return s;
  12404.  
  12405. case "info":
  12406. return u;
  12407.  
  12408. case "warn":
  12409. return l;
  12410.  
  12411. case "error":
  12412. return c;
  12413.  
  12414. case "debug":
  12415. return p;
  12416.  
  12417. default:
  12418. throw Error("Unknown Logger emitter type: " + e);
  12419. }
  12420. }(e)).bind.apply(n, [ a ].concat(o));
  12421. }
  12422. t.__Logger = m;
  12423. var g = 1e4, y = o.getBuildInfo().isEndUserBuild();
  12424. function S(e) {
  12425. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  12426. if (!y) {
  12427. var o = t[0];
  12428. try {
  12429. t.length > 1 ? o = JSON.stringify(t) : "string" != typeof o && (o = JSON.stringify(o));
  12430. } catch (e) {
  12431. o = "ERROR: Could not log object. JSON.stringify failed. " + e;
  12432. }
  12433. "string" == typeof o && o.length > g ? r.globalScope.TwinkleNative.handleCall("log", [ e, "[Following log message was cut in JS to " + g + " characters, original messsage was " + o.length + " characters] " + o.slice(0, g) ]) : r.globalScope.TwinkleNative.handleCall("log", [ e, o ]);
  12434. }
  12435. }
  12436. }, function(e, t, n) {
  12437. "use strict";
  12438. Object.defineProperty(t, "__esModule", {
  12439. value: !0
  12440. });
  12441. var r = n(870), o = n(5), i = function() {
  12442. function e(e, t, n, o, i, a) {
  12443. void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = 0), void 0 === o && (o = 0),
  12444. this.x = e, this.y = t, this.width = n, this.height = o, this.localX = i, this.localY = a,
  12445. this.top = t, this.right = e + n, this.bottom = t + o, this.left = e, this.center = new r.Point(this.left + (this.right - this.left) / 2, this.top + (this.bottom - this.top) / 2),
  12446. this.style = {
  12447. left: this.left,
  12448. top: this.top,
  12449. width: this.width,
  12450. height: this.height
  12451. };
  12452. }
  12453. return e.prototype.getStyleClass = function(e) {
  12454. return o.DynamicStyle.wrapLegacyStyle(this.style, e);
  12455. }, e.fromRaw = function(t) {
  12456. return new e(t.x, t.y, t.width, t.height, t.localX, t.localY);
  12457. }, e.prototype.equals = function(e, t) {
  12458. void 0 === t && (t = !0);
  12459. var n = !0;
  12460. return t && (n = this.localX === e.localX && this.localY === e.localY), this.x === e.x && this.y === e.y && this.width === e.width && this.height === e.height && n;
  12461. }, e.prototype.empty = function() {
  12462. return 0 === this.width && 0 === this.height;
  12463. }, e.prototype.intersects = function(e) {
  12464. return e.x < this.x + this.width && this.x < e.x + e.width && e.y < this.y + this.height && this.y <= e.y + e.height;
  12465. }, e.prototype.offset = function(t, n) {
  12466. return void 0 === t && (t = 0), void 0 === n && (n = 0), new e(this.x - t, this.y - n, this.width, this.height);
  12467. }, e.prototype.subtract = function(t) {
  12468. var n = this.right, r = this.left, o = this.top, i = this.bottom;
  12469. return t && (n = t.left < this.right && t.left > this.left ? t.left : this.right,
  12470. r = t.right > this.left && t.right < this.right ? t.right : this.left, o = t.bottom > this.top && t.bottom < this.bottom ? t.bottom : this.top,
  12471. i = t.top < this.bottom && t.top > this.top ? t.top : this.bottom), new e(r, o, n - r, i - o);
  12472. }, e.prototype.edgeDistance = function(e) {
  12473. var t = this.edgePoint(this.center.angle(e.center)), n = e.edgePoint(e.center.angle(this.center));
  12474. return t.distance(n);
  12475. }, e.prototype.edgeDistanceSquared = function(e) {
  12476. var t = this.edgePoint(this.center.angle(e.center)), n = e.edgePoint(e.center.angle(this.center));
  12477. return t.squaredDistance(n);
  12478. }, e.prototype.centerDistanceSquared = function(e) {
  12479. var t = this.center, n = e.center;
  12480. return t.squaredDistance(n);
  12481. }, e.prototype.edgePoint = function(e) {
  12482. var t = Math.cos(e), n = Math.sin(e), o = Math.abs(t), i = Math.abs(n), a = this.width / 2 * i <= this.height / 2 * o ? this.width / 2 / (o || 1) : this.height / 2 / (i || 1);
  12483. return new r.Point(this.center.x + t * a, this.center.y + n * a);
  12484. }, e;
  12485. }();
  12486. t.Bounds = i;
  12487. }, function(e, t, n) {
  12488. "use strict";
  12489. Object.defineProperty(t, "__esModule", {
  12490. value: !0
  12491. });
  12492. var r = n(0), o = n(371), i = n(488), a = function() {
  12493. function e(t, n) {
  12494. t = "string" == typeof t ? e.parse(t) : e.parse(t.path, t.args), this.path = t.path,
  12495. this.args = t.args || e.defaultArgs, this.cause = n;
  12496. }
  12497. return Object.defineProperty(e.prototype, "section", {
  12498. get: function() {
  12499. return e.determineSection(this.path);
  12500. },
  12501. enumerable: !0,
  12502. configurable: !0
  12503. }), Object.defineProperty(e.prototype, "queryString", {
  12504. get: function() {
  12505. return o.stringify(this.args);
  12506. },
  12507. enumerable: !0,
  12508. configurable: !0
  12509. }), Object.defineProperty(e.prototype, "url", {
  12510. get: function() {
  12511. return this.queryString ? this.path + "?" + this.queryString : this.path;
  12512. },
  12513. enumerable: !0,
  12514. configurable: !0
  12515. }), e.prototype.equals = function(e) {
  12516. return e.path === this.path && i.isEqual(e.args, this.args);
  12517. }, e.prototype.extend = function(t, n) {
  12518. return new e({
  12519. path: this.path,
  12520. args: r.__assign({}, this.args, t)
  12521. }, n || this.cause);
  12522. }, e.prototype.toString = function() {
  12523. return this.url;
  12524. }, e.indexOfBestMatch = function(e, t, n) {
  12525. for (var r = n ? this.testFullMatch : this.testPartialMatch, o = -1, i = Number.MAX_VALUE, a = 0; a < e.length; a++) {
  12526. var s = e[a];
  12527. if (r(t, s)) {
  12528. var u = Math.abs(s.path.length - t.path.length);
  12529. u < i && (o = a, i = u);
  12530. }
  12531. }
  12532. return -1 === o && t.path.length > 0 && (o = 0), o;
  12533. }, e.testFullMatch = function(e, t) {
  12534. return e.path === t.path;
  12535. }, e.testPartialMatch = function(e, t) {
  12536. return e.path.startsWith(t.path);
  12537. }, e.determineSection = function(e) {
  12538. "#/" === e.substr(0, 2) && (e = e.substr(2)), "/" === e[0] && (e = e.substr(1));
  12539. var t = e.indexOf("/", 1);
  12540. return -1 !== t ? e.substr(0, t) : e;
  12541. }, e.parse = function(e, t) {
  12542. var n, i, a = e.indexOf("?");
  12543. if (-1 === a) n = e, i = r.__assign({}, t); else {
  12544. var s = e.substr(a + 1);
  12545. n = e.substr(0, a), i = r.__assign({}, o.parse(s), t);
  12546. }
  12547. return {
  12548. path: n,
  12549. args: i
  12550. };
  12551. }, e.defaultArgs = {}, e;
  12552. }();
  12553. t.Location = a;
  12554. }, function(e, t, n) {
  12555. "use strict";
  12556. Object.defineProperty(t, "__esModule", {
  12557. value: !0
  12558. });
  12559. var r = n(62);
  12560. t.frostbiteAction = function o(e) {
  12561. return function(t) {
  12562. r.frostbite.sendMessage.call(this, e, t);
  12563. };
  12564. };
  12565. }, function(e, t, n) {
  12566. "use strict";
  12567. (function(__) {
  12568. Object.defineProperty(t, "__esModule", {
  12569. value: !0
  12570. });
  12571. var e = n(0), r = n(2), o = n(402), i = n(537), a = n(538);
  12572. t.defaultPlatoonEmblem = "[BB_PREFIX]/sparta/jsclient/builds/assets/platoon_emblem_default_grey-e370d35d.png";
  12573. var s = function() {
  12574. function n(n) {
  12575. var r = e.__assign({}, n);
  12576. r.displayMembers && (r.displayMembers = r.displayMembers.map(function(e) {
  12577. return o.PlatoonMember.fromBackend(r.guid, e);
  12578. })), r.emblem || (r.emblem = t.defaultPlatoonEmblem), r.description || (r.description = ""),
  12579. this.name = r.name, this.emblem = r.emblem, this.size = r.size, this.guid = r.guid,
  12580. this.description = r.description, this.tag = r.tag, this.verified = r.verified,
  12581. this.creatorId = r.creatorId, this.dateCreated = r.dateCreated, this.joinConfig = r.joinConfig,
  12582. this.displayMembers = r.displayMembers;
  12583. }
  12584. return n.fromBackend = function(e) {
  12585. return e ? new n(e) : null;
  12586. }, n.fromDummyData = function(e) {
  12587. return new n(e);
  12588. }, n.prototype.setTag = function(e) {
  12589. this.tag = e;
  12590. }, n.prototype.getTag = function() {
  12591. return this.tag ? i.formatTag(this.tag) : "";
  12592. }, n.prototype.setGuid = function(e) {
  12593. this.guid = e;
  12594. }, n.prototype.setName = function(e) {
  12595. this.name = e;
  12596. }, n.prototype.getName = function() {
  12597. return i.formatName(this.name);
  12598. }, n.prototype.setDescription = function(e) {
  12599. this.description = e;
  12600. }, n.prototype.setEmblem = function(e) {
  12601. this.emblem = e;
  12602. }, Object.defineProperty(n.prototype, "accessType", {
  12603. get: function() {
  12604. return a.joinConfigToAccessType(this.joinConfig);
  12605. },
  12606. enumerable: !0,
  12607. configurable: !0
  12608. }), e.__decorate([ r.observable ], n.prototype, "name", void 0), e.__decorate([ r.observable ], n.prototype, "emblem", void 0),
  12609. e.__decorate([ r.observable ], n.prototype, "size", void 0), e.__decorate([ r.observable ], n.prototype, "guid", void 0),
  12610. e.__decorate([ r.observable ], n.prototype, "description", void 0), e.__decorate([ r.observable ], n.prototype, "tag", void 0),
  12611. e.__decorate([ r.observable ], n.prototype, "verified", void 0), e.__decorate([ r.observable ], n.prototype, "creatorId", void 0),
  12612. e.__decorate([ r.observable ], n.prototype, "dateCreated", void 0), e.__decorate([ r.observable ], n.prototype, "joinConfig", void 0),
  12613. e.__decorate([ r.observable ], n.prototype, "displayMembers", void 0), e.__decorate([ r.action ], n.prototype, "setTag", null),
  12614. e.__decorate([ r.action ], n.prototype, "setGuid", null), e.__decorate([ r.action ], n.prototype, "setName", null),
  12615. e.__decorate([ r.action ], n.prototype, "setDescription", null), e.__decorate([ r.action ], n.prototype, "setEmblem", null),
  12616. e.__decorate([ r.computed ], n.prototype, "accessType", null), n;
  12617. }();
  12618. t.Platoon = s;
  12619. var u = function() {
  12620. function e(e) {
  12621. this.displayMembers = [], this.guid = e.guid, this.name = e.name, this.tag = e.tag,
  12622. this.size = e.size, this.emblem = e.emblem || t.defaultPlatoonEmblem, this.verified = e.verified,
  12623. this.displayMembers = e.displayMembers ? e.displayMembers.map(function(t) {
  12624. return o.PlatoonMember.fromBackend(e.guid, t);
  12625. }) : [];
  12626. }
  12627. return e.fromBackend = function(t) {
  12628. return new e(t);
  12629. }, e.prototype.getTag = function() {
  12630. return this.tag ? i.formatTag(this.tag) : "";
  12631. }, e.prototype.getName = function() {
  12632. return this.name ? this.name : __("ID_SHARED_PLATOONS_NAME_HIDDEN").toUpperCase();
  12633. }, e;
  12634. }();
  12635. t.LightPlatoon = u;
  12636. }).call(this, n(3));
  12637. }, function(e, t, n) {
  12638. "use strict";
  12639. Object.defineProperty(t, "__esModule", {
  12640. value: !0
  12641. });
  12642. var r = n(9), o = n(37), i = n(28);
  12643. t.quicklinksGroup = i.focusSystem.createStaticGroup("quicklinks"), t.comcenterGroup = i.focusSystem.createStaticGroup("comcenter"),
  12644. t.mainmenuGroup = i.focusSystem.createStaticGroup("mainmenu"), t.minimainmenuGroup = i.focusSystem.createStaticGroup("minimainmenu"),
  12645. t.topmenuGroup = i.focusSystem.createStaticGroup("topmenu"), t.contextMenuGroup = i.focusSystem.createStaticGroup("contextmenu"),
  12646. t.scoreboardTeamLeftGroup = i.focusSystem.createStaticGroup("teamleft"), t.scoreboardTeamRightGroup = i.focusSystem.createStaticGroup("teamright"),
  12647. t.battlepackWinnersGroup = i.focusSystem.createStaticGroup("battlepackwinners"),
  12648. t.handleIfNotTheSameGroup = function(e, t) {
  12649. return function(n, r) {
  12650. var a = i.focusSystem.findNextItem(n, r);
  12651. return a && a.group === e ? {
  12652. result: o.NavigationResultType.HIT,
  12653. toItem: a
  12654. } : t(n, r);
  12655. };
  12656. }, t.stopIfNotTheSameGroup = function(e) {
  12657. return t.handleIfNotTheSameGroup(e, function(e, t) {
  12658. return {
  12659. result: o.NavigationResultType.STOP
  12660. };
  12661. });
  12662. }, t.comcenterGroup.handleDirection(o.Direction.Up, t.stopIfNotTheSameGroup(t.comcenterGroup)),
  12663. t.comcenterGroup.handleDirection(o.Direction.Down, t.stopIfNotTheSameGroup(t.comcenterGroup)),
  12664. t.quicklinksGroup.behavior = o.GroupBehavior.HORIZONTAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET,
  12665. t.quicklinksGroup.handleDirection(o.Direction.Right, t.handleIfNotTheSameGroup(t.quicklinksGroup, function(e, n) {
  12666. return t.comcenterGroup.navigateToGroup(e, n);
  12667. })), t.quicklinksGroup.handleDirection(o.Direction.Left, t.handleIfNotTheSameGroup(t.quicklinksGroup, function(e, n) {
  12668. return r.SpartaGlobals.bundleIsPC ? t.minimainmenuGroup.navigateToGroup(e, n) : t.mainmenuGroup.navigateToGroup(e, n);
  12669. })), t.mainmenuGroup.behavior = o.GroupBehavior.VERTICAL, t.mainmenuGroup.handleDirection(o.Direction.Left, function(e, t) {
  12670. return {
  12671. result: o.NavigationResultType.STOP
  12672. };
  12673. }), t.minimainmenuGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.WRAP_AROUND,
  12674. t.minimainmenuGroup.handleDirection(o.Direction.Left, function(e, t) {
  12675. return {
  12676. result: o.NavigationResultType.STOP
  12677. };
  12678. }), t.contextMenuGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET,
  12679. t.contextMenuGroup.handleDirection(o.Direction.Left, function(e, t) {
  12680. return {
  12681. result: o.NavigationResultType.STOP
  12682. };
  12683. }), t.contextMenuGroup.handleDirection(o.Direction.Right, function(e, t) {
  12684. return {
  12685. result: o.NavigationResultType.STOP
  12686. };
  12687. }), t.contextMenuGroup.handleDirection(o.Direction.Up, t.stopIfNotTheSameGroup(t.contextMenuGroup)),
  12688. t.contextMenuGroup.handleDirection(o.Direction.Down, t.stopIfNotTheSameGroup(t.contextMenuGroup)),
  12689. t.scoreboardTeamLeftGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET,
  12690. t.scoreboardTeamRightGroup.behavior = o.GroupBehavior.VERTICAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET,
  12691. t.battlepackWinnersGroup.behavior = o.GroupBehavior.HORIZONTAL | o.GroupBehavior.REMEMBER_LAST_FOCUSED_MEMBER | o.GroupBehavior.PREFER_FIRST_MEMBER_OVER_TARGET;
  12692. }, function(e, t, n) {
  12693. "use strict";
  12694. Object.defineProperty(t, "__esModule", {
  12695. value: !0
  12696. });
  12697. var r = n(45);
  12698. t.joinMultiplayerServer = r.createTypedAction(), t.joinLanServer = r.createTypedAction(),
  12699. t.joinMultiplayerFriend = r.createTypedAction(), t.continueSinglePlayer = r.createTypedAction();
  12700. }, function(e, t, n) {
  12701. "use strict";
  12702. (function(__) {
  12703. Object.defineProperty(t, "__esModule", {
  12704. value: !0
  12705. });
  12706. var e = n(0), r = n(1), o = n(69), i = n(67), a = n(4), s = n(2), u = n(17), l = n(14), c = n(73), p = n(7), d = n(1161), f = n(10), m = n(41), h = n(11), g = n(18), y = n(5), S = n(8), v = n(368), b = {
  12707. position: "absolute",
  12708. top: 0,
  12709. right: 0,
  12710. bottom: 0,
  12711. left: 0
  12712. }, _ = y.StaticStyle.wrapLegacyStyle(b, "3132c7f8:137:18"), T = y.StaticStyle.wrapLegacyStyle({
  12713. position: "absolute",
  12714. top: 0,
  12715. right: 0,
  12716. left: 0
  12717. }, "3132c7f8:138:21");
  12718. t.tweenInOptions = l.Animation.presets.focusables.enter.fast, t.tweenOutOptions = l.Animation.presets.focusables.leave;
  12719. var E = p.GUTTER, C = y.StaticStyle.wrapLegacyStyleSheet({
  12720. top: {
  12721. flex: 1
  12722. },
  12723. layer: {
  12724. layer: !0,
  12725. layerClip: !0
  12726. },
  12727. backgroundShade: {
  12728. zOffset: 1,
  12729. textureMode: "fill",
  12730. texture: u.bbOfflineUrl("/sparta/jsclient/builds/assets/card-gradient-active-news-abc6b204.png")
  12731. },
  12732. content: e.__assign({}, b, {
  12733. flex: 1,
  12734. zOffset: 3,
  12735. padding: 3 * p.GUTTER
  12736. }),
  12737. highlight: {
  12738. zOffset: 2,
  12739. justifyContent: "flex-end"
  12740. },
  12741. bottom: {
  12742. padding: 3 * p.GUTTER
  12743. },
  12744. blind: {
  12745. position: "absolute",
  12746. bottom: 0,
  12747. left: 0,
  12748. right: 0
  12749. },
  12750. overlay: e.__assign({}, b, {
  12751. enableMouseEvents: !1,
  12752. zOffset: 4
  12753. }),
  12754. dimmer: e.__assign({}, b, {
  12755. enableMouseEvents: !1,
  12756. backgroundColor: "#000000",
  12757. zOffset: 5
  12758. })
  12759. }, "3132c7f8:143:15"), I = y.StaticStyle.create({
  12760. flex: 1,
  12761. justifyContent: "flex-end"
  12762. }, "3132c7f8:628:45"), A = function(n) {
  12763. function u(e, t) {
  12764. var r = n.call(this, e, t) || this;
  12765. return r.sparta = S.SpartaContext.getFromComponent(r), r.backgroundUrls = s.observable.array(),
  12766. r.width = 0, r.height = 0, r.foldHeight = 0, r.bottomHeight = 0, r.isActiveOverride = !1,
  12767. r.cardOpacityTween = l.Animation.componentTween(r, "3132c7f8:228:54", .01), r.contentTextColorTween = l.Animation.componentTween(r, "3132c7f8:229:59", "#ffffff"),
  12768. r.bottomTextColorTween = l.Animation.componentTween(r, "3132c7f8:230:58", "#ffffff"),
  12769. r.highlightColorTween = l.Animation.componentTween(r, "3132c7f8:232:14", r.props.inactiveHighlightColor ? r.props.inactiveHighlightColor : "#00000085"),
  12770. r.contentTopTween = l.Animation.componentTween(r, "3132c7f8:236:53", 0), r.blindHeightTween = l.Animation.componentTween(r, "3132c7f8:237:54", 0),
  12771. r.backgroundHeightTween = l.Animation.componentTween(r, "3132c7f8:238:59", 0), r.foldBottomTween = l.Animation.componentTween(r, "3132c7f8:239:53", 0),
  12772. r.highlightHeightTween = l.Animation.componentTween(r, "3132c7f8:241:58", 0), r.foldSeparatorTween = l.Animation.componentTween(r, "3132c7f8:242:56", 0),
  12773. r.dimmerTween = l.Animation.componentTween(r, "3132c7f8:243:49", 0), r.textureOffsetYTween = l.Animation.componentTween(r, "3132c7f8:244:57", 0),
  12774. r.textureScaleTween = l.Animation.componentTween(r, "3132c7f8:246:14", r.props.backgroundScale ? r.props.backgroundScale : 1),
  12775. r.getInput = function() {
  12776. return r.props.input ? (Array.isArray(r.props.input) ? r.props.input : [ r.props.input ]).map(function(e) {
  12777. return e.extend({
  12778. action: r.wrapCause(e.action),
  12779. holdAction: r.wrapCause(e.holdAction),
  12780. releaseAction: r.wrapCause(e.releaseAction)
  12781. });
  12782. }) : r.props.onPress ? new h.Input({
  12783. label: __("ID_SPARTA_ACTION_SELECT"),
  12784. action: r.wrapCause(r.props.onPress),
  12785. blockInputFor: 500,
  12786. key: f.Keys.Accept
  12787. }) : void 0;
  12788. }, r.onBottomBounds = s.action("Card onBottomBounds", function(e) {
  12789. r.bottomHeight = e.height;
  12790. }), r.onFoldBounds = s.action("Card onFoldBounds", function(e) {
  12791. r.foldHeight = e.height;
  12792. }), r.getActiveOverride = function() {
  12793. return r.isActiveOverride;
  12794. }, r.focusItem = e.focusItem || r.sparta.twinkle.focus.create(r, o.autoId("card")),
  12795. r.focusItem.onFocus(function() {
  12796. r.props.onFocus && r.props.onFocus();
  12797. }), r.focusItem.onBlur(function() {
  12798. r.props.onBlur && r.props.onBlur();
  12799. }), r.setBackground(e.background), r.updateActiveOverride(e.forcedActive, e.enabled),
  12800. r.setSize(e.size, e.style), r;
  12801. }
  12802. return e.__extends(u, n), Object.defineProperty(u.prototype, "isActive", {
  12803. get: function() {
  12804. return this.isActiveOverride || this.focusItem.isFocused || this.focusItem.isHovered;
  12805. },
  12806. enumerable: !0,
  12807. configurable: !0
  12808. }), Object.defineProperty(u.prototype, "scaleValues", {
  12809. get: function() {
  12810. var e = 2 * p.GUTTER;
  12811. return {
  12812. scaleX: {
  12813. from: 1,
  12814. to: 0 === this.width ? 1 : (this.width + e) / this.width
  12815. },
  12816. scaleY: {
  12817. from: 1,
  12818. to: 0 === this.height ? 1 : (this.height + e) / this.height
  12819. }
  12820. };
  12821. },
  12822. enumerable: !0,
  12823. configurable: !0
  12824. }), Object.defineProperty(u.prototype, "backgroundHeight", {
  12825. get: function() {
  12826. return this.height - this.bottomHeight;
  12827. },
  12828. enumerable: !0,
  12829. configurable: !0
  12830. }), Object.defineProperty(u.prototype, "hasBackground", {
  12831. get: function() {
  12832. return !(!this.backgroundUrls.length && void 0 === this.props.backgroundVideo);
  12833. },
  12834. enumerable: !0,
  12835. configurable: !0
  12836. }), u.prototype.componentDidMount = function() {
  12837. var e = this;
  12838. this.reaction(function() {
  12839. return [ e.isActive, e.hasBackground, e.foldHeight, e.backgroundHeight ];
  12840. }, function() {
  12841. return e.updateTweens();
  12842. }, {
  12843. fireImmediately: !0
  12844. }), null !== this.focusItem.bounds ? this.cardOpacityTween.to(1, l.Animation.defaultTweenOptions) : this.when(function() {
  12845. return null !== e.focusItem.bounds;
  12846. }, function() {
  12847. return e.cardOpacityTween.to(1, l.Animation.defaultTweenOptions);
  12848. });
  12849. }, u.prototype.componentWillReceiveProps = function(e) {
  12850. this.setBackground(e.background), this.updateActiveOverride(e.forcedActive, e.enabled),
  12851. this.setSize(e.size, e.style);
  12852. }, u.prototype.componentDidUpdate = function() {
  12853. this.updateTweens();
  12854. }, u.prototype.updateActiveOverride = function(e, t) {
  12855. this.isActiveOverride = !!t && !!e;
  12856. }, u.prototype.wrapCause = function(e) {
  12857. var t = this;
  12858. if (e) return function() {
  12859. t.sparta.stores.locationStore.injectLocationCause("cardInteraction"), e(), t.sparta.stores.locationStore.injectLocationCause(void 0);
  12860. };
  12861. }, u.prototype.setBackground = function(e) {
  12862. "string" == typeof e ? this.backgroundUrls.replace(e.length > 0 ? [ e ] : []) : this.backgroundUrls.replace(e || []);
  12863. }, u.prototype.setSize = function(e, t) {
  12864. if (e) {
  12865. var n = Math.ceil(p.getWidth(m.CARD_WIDTH.cells[e])), r = Math.ceil(p.getHeight(m.CARD_HEIGHT.cells[e]));
  12866. if (t) {
  12867. var o = y.isStyleClass(t) ? t : y.DynamicStyle.create(t, "3132c7f8:405:65");
  12868. o.getNumericStyle && (o.getNumericStyle("width", 0) && (n = o.getNumericStyle("width", 0)),
  12869. o.getNumericStyle("height", 0) && (r = o.getNumericStyle("height", 0)));
  12870. }
  12871. "number" == typeof n && "number" == typeof r && (this.width = n, this.height = r);
  12872. }
  12873. }, u.prototype.updateTweens = function() {
  12874. var e = this.props.backgroundStyle, n = (e ? e.textureScale : void 0) || this.props.backgroundScale;
  12875. if ("number" == typeof n) {
  12876. if (this.backgroundUrls.length > 1 && (n += .1), this.isActive) {
  12877. this.contentTextColorTween.to(this.hasBackground ? "#ffffff" : "#000000", t.tweenInOptions),
  12878. this.bottomTextColorTween.to("#000000", t.tweenInOptions), this.foldBottomTween.to(0, t.tweenInOptions),
  12879. this.textureOffsetYTween.to(-p.GUTTER, t.tweenInOptions);
  12880. var r = this.sparta.twinkle.buildInfo.isConsole ? .05 : 0;
  12881. if (this.textureScaleTween.to(n + r, t.tweenInOptions), this.highlightHeightTween.to(this.hasBackground ? E : 0, t.tweenInOptions),
  12882. this.props.removeFoldSeparator && this.props.fold ? (this.contentTopTween.to(-(this.foldHeight - 2 * p.GUTTER) / 2, t.tweenInOptions),
  12883. this.foldSeparatorTween.to(2 * p.GUTTER, t.tweenInOptions)) : this.props.fold && this.contentTopTween.to(-this.foldHeight / 2, t.tweenInOptions),
  12884. this.sparta.twinkle.buildInfo.isConsole) {
  12885. var o = this.foldHeight + this.bottomHeight || E;
  12886. this.blindHeightTween.to(this.hasBackground ? o : this.height, t.tweenInOptions);
  12887. } else {
  12888. var i = this.props.activeHighlightColor;
  12889. i && this.highlightColorTween.to(i, t.tweenInOptions);
  12890. }
  12891. } else {
  12892. this.contentTextColorTween.to("#ffffff", t.tweenOutOptions), this.bottomTextColorTween.to("#ffffff", t.tweenOutOptions),
  12893. this.foldBottomTween.to(-this.foldHeight, t.tweenOutOptions), this.textureOffsetYTween.to(0, t.tweenOutOptions),
  12894. this.textureScaleTween.to(n, t.tweenOutOptions), this.highlightHeightTween.to(0, t.tweenOutOptions),
  12895. this.foldSeparatorTween.to(0, t.tweenOutOptions), this.contentTopTween.to(0, t.tweenOutOptions);
  12896. var a = this.props.inactiveHighlightColor;
  12897. a && this.highlightColorTween.to(a, t.tweenOutOptions), this.sparta.twinkle.buildInfo.isConsole && this.blindHeightTween.to(0, t.tweenOutOptions);
  12898. }
  12899. this.backgroundHeightTween.set(this.backgroundHeight), this.dimmerTween.to(this.props.enabled ? 0 : .5, this.props.enabled ? t.tweenInOptions : t.tweenOutOptions);
  12900. }
  12901. }, u.prototype.renderBackground = function() {
  12902. var e = this.backgroundUrls.length > 1, t = y.merge2(T, this.backgroundHeightTween.getStyleClass("height")), n = y.merge4(g.CommonStyles.textureModeCover, this.textureOffsetYTween.getStyleClass("textureOffsetY"), y.merge2(this.textureScaleTween.getStyleClass("textureScaleX"), this.textureScaleTween.getStyleClass("textureScaleY")), y.merge2(g.CommonStyles.grayScale(this.props.useGrayScale && !this.props.enabled ? 1 : 0), y.DynamicStyle.create({
  12903. textureAtlas: this.props.textureAtlas
  12904. }, "3132c7f8:513:96")));
  12905. if (e) return r.createElement(d.TextureCrossfade, {
  12906. style: t,
  12907. textures: this.backgroundUrls,
  12908. textureStyle: n
  12909. });
  12910. var o = y.merge3(t, n, y.DynamicStyle.maybeLegacyStyle({
  12911. texture: this.backgroundUrls.length ? this.backgroundUrls[0] : void 0
  12912. }, "3132c7f8:527:26"));
  12913. return void 0 !== this.props.backgroundVideo ? r.createElement(w, {
  12914. style: o,
  12915. getActiveOverride: this.getActiveOverride,
  12916. focusItem: this.focusItem,
  12917. source: this.props.backgroundVideo,
  12918. option: this.props.backgroundVideoOption
  12919. }) : r.createElement("surface", {
  12920. style: o
  12921. });
  12922. }, u.prototype.render = function() {
  12923. var e = this.props.fold && r.createElement("surface", {
  12924. style: {
  12925. marginBottom: this.foldBottomTween.getStyle()
  12926. },
  12927. onBounds: this.onFoldBounds
  12928. }, this.props.fold), t = this.props.bottom && r.createElement("surface", {
  12929. style: [ C.bottom, this.foldSeparatorTween.getStyleClass("translateY") ],
  12930. onBounds: this.onBottomBounds
  12931. }, this.props.bottom), n = this.hasBackground && this.props.backgroundShade && r.createElement("surface", {
  12932. style: [ this.backgroundHeightTween.getStyleClass("height"), T, C.backgroundShade ]
  12933. }), o = this.props.overlay && r.createElement("surface", {
  12934. style: C.overlay
  12935. }, this.props.overlay), i = this.sparta.twinkle.buildInfo.isConsole && r.createElement("surface", {
  12936. style: [ C.blind, this.blindHeightTween.getStyleClass("height"), {
  12937. backgroundColor: this.props.activeHighlightColor
  12938. } ]
  12939. }), a = [ C.top ], s = void 0, u = void 0;
  12940. if (this.props.staticContentSize) {
  12941. var l = this.height * (this.props.contentSize || 1);
  12942. a = [ C.top, _, y.DynamicStyle.wrapLegacyStyle({
  12943. height: l
  12944. }, "3132c7f8:587:47") ], s = y.merge2(y.DynamicStyle.create({
  12945. height: l
  12946. }, "3132c7f8:588:35"), this.contentTopTween.getStyleClass("top")), u = g.CardStyles.children;
  12947. }
  12948. this.hasBackground && Array.isArray(a) && a.push(C.layer);
  12949. var d = this.props.size;
  12950. if (!d) return null;
  12951. var f = {
  12952. width: p.getWidth(m.CARD_WIDTH.cells[d]),
  12953. height: p.getHeight(m.CARD_HEIGHT.cells[d]),
  12954. opacity: this.cardOpacityTween.getStyle(),
  12955. backgroundColor: this.highlightColorTween.getStyle(),
  12956. layer: !!e || void 0,
  12957. layerClip: !!e || void 0
  12958. }, h = y.merge3(y.DynamicStyle.wrapLegacyStyle(f, "3132c7f8:607:36"), g.CardStyles.container, y.DynamicStyle.maybeLegacyStyle(this.props.style, "3132c7f8:609:34"));
  12959. return r.createElement(c.Pressable, {
  12960. focusItem: this.focusItem,
  12961. input: this.getInput(),
  12962. scale: this.sparta.twinkle.buildInfo.isConsole && !this.props.dontScale,
  12963. scaleValues: this.scaleValues,
  12964. triggerMode: this.props.triggerMode,
  12965. childrenStyle: u,
  12966. style: h
  12967. }, r.createElement("surface", {
  12968. style: a
  12969. }, this.renderBackground(), n, r.createElement(v.ColorContext.Provider, {
  12970. value: this.contentTextColorTween.getStyleClass("color")
  12971. }, r.createElement("surface", {
  12972. style: [ C.content, s ]
  12973. }, r.createElement("surface", {
  12974. style: I
  12975. }, "object" == typeof this.props.children ? this.props.children : null)))), r.createElement(v.ColorContext.Provider, {
  12976. value: this.bottomTextColorTween.getStyleClass("color")
  12977. }, r.createElement("surface", {
  12978. style: [ C.highlight, this.highlightHeightTween.getStyleClass("minHeight") ]
  12979. }, t, e)), i, o, r.createElement("surface", {
  12980. style: [ C.dimmer, this.dimmerTween.getStyleClass("opacity") ]
  12981. }));
  12982. }, u.contextTypes = S.SpartaContext.contextTypes, u.defaultProps = {
  12983. size: m.CardSize.M,
  12984. enabled: !0,
  12985. backgroundScale: 1,
  12986. backgroundStyle: {},
  12987. backgroundShade: !0,
  12988. backgroundVideoOption: "focus",
  12989. activeHighlightColor: "#ffffff",
  12990. inactiveHighlightColor: "#00000085",
  12991. textureAtlas: i.SINGLE_TEXTURE
  12992. }, e.__decorate([ s.observable ], u.prototype, "width", void 0), e.__decorate([ s.observable ], u.prototype, "height", void 0),
  12993. e.__decorate([ s.observable ], u.prototype, "foldHeight", void 0), e.__decorate([ s.observable ], u.prototype, "bottomHeight", void 0),
  12994. e.__decorate([ s.observable ], u.prototype, "isActiveOverride", void 0), e.__decorate([ s.computed ], u.prototype, "isActive", null),
  12995. e.__decorate([ s.computed ], u.prototype, "scaleValues", null), e.__decorate([ s.computed ], u.prototype, "backgroundHeight", null),
  12996. e.__decorate([ s.computed ], u.prototype, "hasBackground", null), e.__decorate([ s.action ], u.prototype, "updateActiveOverride", null),
  12997. e.__decorate([ s.action ], u.prototype, "setBackground", null), e.__decorate([ s.action ], u.prototype, "setSize", null),
  12998. u = e.__decorate([ a.observer ], u);
  12999. }(r.Component);
  13000. t.Card = A;
  13001. var w = function(t) {
  13002. function n() {
  13003. var e = null !== t && t.apply(this, arguments) || this;
  13004. return e.sparta = S.SpartaContext.getFromComponent(e), e.isPlaying = !1, e;
  13005. }
  13006. return e.__extends(n, t), n.prototype.componentWillMount = function() {
  13007. var e = this;
  13008. this.updateVideo(this.props.source);
  13009. var t = this.sparta.twinkle.focus;
  13010. this.reaction(function() {
  13011. return e.props.getActiveOverride() || e.props.focusItem.isFocused && !t.hoveredItem && t.controllerMode || e.props.focusItem.isHovered;
  13012. }, function(t) {
  13013. t ? e.play() : e.video.isFullScreen || e.stop();
  13014. });
  13015. }, n.prototype.componentWillUpdate = function(e) {
  13016. this.reactToChanges(this.props, e);
  13017. }, n.prototype.componentWillUnmount = function() {
  13018. this.stop();
  13019. }, n.prototype.reactToChanges = function(e, t) {
  13020. t.source !== e.source && (this.stop(), this.updateVideo(t.source));
  13021. }, n.prototype.updateVideo = function(e) {
  13022. this.video = "string" == typeof e ? this.sparta.twinkle.video.loadVideo(e) : e,
  13023. this.video.setVolume(0), "auto" === this.props.option && this.play();
  13024. }, n.prototype.play = function() {
  13025. this.video && !this.isPlaying && (this.isPlaying = !0, this.video.play());
  13026. }, n.prototype.stop = function() {
  13027. this.video && (this.isPlaying = !1, this.video.stop());
  13028. }, n.prototype.render = function() {
  13029. var e = {
  13030. video: this.isPlaying ? this.video.id : void 0
  13031. }, t = Array.isArray(this.props.style) ? this.props.style.concat(e) : [ this.props.style, e ];
  13032. return r.createElement("surface", {
  13033. style: t
  13034. });
  13035. }, n.contextTypes = S.SpartaContext.contextTypes, e.__decorate([ s.observable ], n.prototype, "video", void 0),
  13036. e.__decorate([ s.observable ], n.prototype, "isPlaying", void 0), e.__decorate([ s.action ], n.prototype, "updateVideo", null),
  13037. e.__decorate([ s.action ], n.prototype, "play", null), e.__decorate([ s.action ], n.prototype, "stop", null),
  13038. n = e.__decorate([ a.observer ], n);
  13039. }(r.Component);
  13040. }).call(this, n(3));
  13041. }, function(e, t, n) {
  13042. "use strict";
  13043. (function(__) {
  13044. Object.defineProperty(t, "__esModule", {
  13045. value: !0
  13046. });
  13047. var e = n(0), r = n(1), o = n(6), i = n(4), a = n(8), s = n(2), u = function(t) {
  13048. function n(e, n) {
  13049. var r = t.call(this, e, n) || this;
  13050. return r.sparta = a.SpartaContext.getFromComponent(r), r.nowStore = r.sparta.stores.nowStore,
  13051. r.when(function() {
  13052. return r.timeLeft <= 0;
  13053. }, function() {
  13054. r.props.onDone && r.props.onDone();
  13055. }), r;
  13056. }
  13057. return e.__extends(n, t), Object.defineProperty(n.prototype, "timeLeft", {
  13058. get: function() {
  13059. var e = this.props, t = e.targetTime, n = e.timeDelta, r = this.nowStore.seconds;
  13060. return "function" == typeof n ? n() : "number" == typeof t ? t - 1e3 * r : 0;
  13061. },
  13062. enumerable: !0,
  13063. configurable: !0
  13064. }), Object.defineProperty(n.prototype, "text", {
  13065. get: function() {
  13066. var e = this.props, t = e.format, n = e.doneText, r = this.timeLeft;
  13067. return r > 0 || !n ? t(r) : n;
  13068. },
  13069. enumerable: !0,
  13070. configurable: !0
  13071. }), n.prototype.render = function() {
  13072. return r.createElement(o.Text, {
  13073. value: this.text,
  13074. type: this.props.type,
  13075. size: this.props.size,
  13076. color: this.props.color,
  13077. style: this.props.style
  13078. });
  13079. }, n.defaultProps = {
  13080. format: c
  13081. }, n.contextTypes = a.SpartaContext.contextTypes, e.__decorate([ s.computed ], n.prototype, "timeLeft", null),
  13082. e.__decorate([ s.computed ], n.prototype, "text", null), n = e.__decorate([ i.observer ], n);
  13083. }(r.Component);
  13084. function l(e) {
  13085. return e < 10 ? "0" + e : e;
  13086. }
  13087. function c(e) {
  13088. if (e < 0) return "00:00:00";
  13089. e = Math.floor(e / 1e3);
  13090. var t = Math.floor(e / 3600);
  13091. if (t > 24) {
  13092. var n = Math.round(t / 24);
  13093. return __(n > 1 ? "ID_SPARTA_NUM_DAYS" : "ID_SPARTA_NUM_DAY").replace("[DAYS]", n + "");
  13094. }
  13095. var r = Math.floor(e / 60) % 60, o = e % 60;
  13096. return l(t) + ":" + l(r) + ":" + l(o);
  13097. }
  13098. t.Countdown = u, t.simpleTimeFormat = c;
  13099. }).call(this, n(3));
  13100. }, function(e, t, n) {
  13101. "use strict";
  13102. Object.defineProperty(t, "__esModule", {
  13103. value: !0
  13104. });
  13105. var r = n(0), o = n(1), i = n(5), a = n(19), s = function(e) {
  13106. function t() {
  13107. var t = null !== e && e.apply(this, arguments) || this;
  13108. return t.getTheme = a.ThemeContext.getFromComponent(t), t;
  13109. }
  13110. return r.__extends(t, e), t.prototype.render = function() {
  13111. var e = this.props, t = e.value, n = e.style, r = this.getTheme().checkbox;
  13112. return o.createElement("surface", {
  13113. style: i.merge2(r.checkbox(t), n)
  13114. });
  13115. }, t.contextTypes = a.ThemeContext.contextTypes, t;
  13116. }(o.Component);
  13117. t.Checkbox = s;
  13118. }, function(e, t, n) {
  13119. "use strict";
  13120. (function(e) {
  13121. Object.defineProperty(t, "__esModule", {
  13122. value: !0
  13123. });
  13124. var r = n(0), o = n(110), i = n(190), a = n(13), s = n(2), u = function(t) {
  13125. function n() {
  13126. var n = t.call(this, {}) || this, i = e.get("WWCE SupportStore");
  13127. return o.updateSource.listen(function(e) {
  13128. i.debug("source", e), n.setState(r.__assign({}, n.getState(), {
  13129. source: e
  13130. }));
  13131. }), a.gameStateStoreLoader.onLoad(function(e) {
  13132. var t = a.nativePropertiesStore.hostingGame;
  13133. s.reaction(function() {
  13134. return {
  13135. isMultiplayer: e.isMultiplayer,
  13136. isOnPlayableLevel: e.isOnPlayableLevel
  13137. };
  13138. }, function(o) {
  13139. var a, s = o.isOnPlayableLevel, u = o.isMultiplayer;
  13140. t && t.getInGameHelpContext ? a = t.getInGameHelpContext(s, u) : a = s ? u ? "mp_" + (e.server ? e.server.mapName : "").replace("mp_", "") : "sp_" + (e.levelName || "").split("/")[2] : "";
  13141. i.debug("contextForInGame", a.toLowerCase()), n.setState(r.__assign({}, n.getState(), {
  13142. contextForInGame: a.toLowerCase()
  13143. }));
  13144. });
  13145. }), o.updateCategories.listen(function(e) {
  13146. i.debug("categories", e.map(function(e) {
  13147. return e.name;
  13148. })), n.setState(r.__assign({}, n.getState(), {
  13149. categories: e
  13150. }));
  13151. }), o.updateSelectedCategory.listen(function(e) {
  13152. i.debug("selectedCategory", e), n.setState(r.__assign({}, n.getState(), {
  13153. selectedCategory: e
  13154. }));
  13155. }), o.updateArticleId.listen(function(e) {
  13156. i.debug("articleId", e), n.setState(r.__assign({}, n.getState(), {
  13157. articleId: e
  13158. }));
  13159. }), o.updateLocation.listen(function(e) {
  13160. i.debug("userLocation", e), n.setState(r.__assign({}, n.getState(), {
  13161. userLocation: e
  13162. }));
  13163. }), o.updateContactDetails.listen(function(e, t) {
  13164. i.debug("countryCode", e, "phoneNumber", t), n.setState(r.__assign({}, n.getState(), {
  13165. countryCode: e,
  13166. phoneNumber: t
  13167. }));
  13168. }), o.updateSelectedChannel.listen(function(e) {
  13169. i.debug("selectedChannel", e && e.name), n.setState(r.__assign({}, n.getState(), {
  13170. selectedChannel: e
  13171. }));
  13172. }), o.resetContextDetails.listen(function() {
  13173. i.debug("source", void 0), n.setState(r.__assign({}, n.getState(), {
  13174. source: void 0
  13175. }));
  13176. }), n;
  13177. }
  13178. return r.__extends(n, t), n;
  13179. }(i.Store);
  13180. t.WwceSupportStore = new u();
  13181. }).call(this, n(15));
  13182. }, function(e, t) {
  13183. e.exports = function(e) {
  13184. if ("function" != typeof e) throw TypeError(e + " is not a function!");
  13185. return e;
  13186. };
  13187. }, function(e, t) {
  13188. var n = Math.ceil, r = Math.floor;
  13189. e.exports = function(e) {
  13190. return isNaN(e = +e) ? 0 : (e > 0 ? r : n)(e);
  13191. };
  13192. }, function(e, t, n) {
  13193. var r = n(52), o = n(453), i = n(344), a = n(342)("IE_PROTO"), s = function() {}, u = function() {
  13194. var e, t = n(451)("iframe"), r = i.length;
  13195. for (t.style.display = "none", n(454).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(),
  13196. e.write("<script>document.F=Object<\/script>"), e.close(), u = e.F; r--; ) delete u.prototype[i[r]];
  13197. return u();
  13198. };
  13199. e.exports = Object.create || function e(t, n) {
  13200. var i;
  13201. return null !== t ? (s.prototype = r(t), i = new s(), s.prototype = null, i[a] = t) : i = u(),
  13202. void 0 === n ? i : o(i, n);
  13203. };
  13204. }, function(e, t, n) {
  13205. "use strict";
  13206. if (n(81)) {
  13207. var r = n(241), o = n(56), i = n(42), a = n(16), s = n(287), u = n(362), l = n(159), c = n(245), p = n(161), d = n(111), f = n(244), m = n(141), h = n(88), g = n(482), y = n(182), S = n(160), v = n(97), b = n(239), _ = n(44), T = n(112), E = n(345), C = n(142), I = n(164), A = n(184).f, w = n(238), P = n(180), R = n(61), O = n(127), x = n(341), k = n(483), M = n(283), L = n(183), D = n(350), N = n(243), F = n(351), G = n(465), U = n(66), B = n(126), j = U.f, H = B.f, z = o.RangeError, V = o.TypeError, W = o.Uint8Array, q = Array.prototype, K = u.ArrayBuffer, X = u.DataView, Y = O(0), J = O(2), Q = O(3), Z = O(4), $ = O(5), ee = O(6), te = x(!0), ne = x(!1), re = M.values, oe = M.keys, ie = M.entries, ae = q.lastIndexOf, se = q.reduce, ue = q.reduceRight, le = q.join, ce = q.sort, pe = q.slice, de = q.toString, fe = q.toLocaleString, me = R("iterator"), he = R("toStringTag"), ge = P("typed_constructor"), ye = P("def_constructor"), Se = s.CONSTR, ve = s.TYPED, be = s.VIEW, _e = O(1, function(e, t) {
  13208. return Ae(k(e, e[ye]), t);
  13209. }), Te = i(function() {
  13210. return 1 === new W(new Uint16Array([ 1 ]).buffer)[0];
  13211. }), Ee = !!W && !!W.prototype.set && i(function() {
  13212. new W(1).set({});
  13213. }), Ce = function(e, t) {
  13214. var n = m(e);
  13215. if (n < 0 || n % t) throw z("Wrong offset!");
  13216. return n;
  13217. }, Ie = function(e) {
  13218. if (_(e) && ve in e) return e;
  13219. throw V(e + " is not a typed array!");
  13220. }, Ae = function(e, t) {
  13221. if (!(_(e) && ge in e)) throw V("It is not a typed array constructor!");
  13222. return new e(t);
  13223. }, we = function(e, t) {
  13224. return Pe(k(e, e[ye]), t);
  13225. }, Pe = function(e, t) {
  13226. for (var n = 0, r = t.length, o = Ae(e, r); r > n; ) o[n] = t[n++];
  13227. return o;
  13228. }, Re = function(e, t, n) {
  13229. j(e, t, {
  13230. get: function() {
  13231. return this._d[n];
  13232. }
  13233. });
  13234. }, Oe = function e(t) {
  13235. var n, r, o, i, a, s, u = T(t), c = arguments.length, p = c > 1 ? arguments[1] : void 0, d = void 0 !== p, f = w(u);
  13236. if (null != f && !E(f)) {
  13237. for (s = f.call(u), o = [], n = 0; !(a = s.next()).done; n++) o.push(a.value);
  13238. u = o;
  13239. }
  13240. for (d && c > 2 && (p = l(p, arguments[2], 2)), n = 0, r = h(u.length), i = Ae(this, r); r > n; n++) i[n] = d ? p(u[n], n) : u[n];
  13241. return i;
  13242. }, xe = function e() {
  13243. for (var t = 0, n = arguments.length, r = Ae(this, n); n > t; ) r[t] = arguments[t++];
  13244. return r;
  13245. }, ke = !!W && i(function() {
  13246. fe.call(new W(1));
  13247. }), Me = function e() {
  13248. return fe.apply(ke ? pe.call(Ie(this)) : Ie(this), arguments);
  13249. }, Le = {
  13250. copyWithin: function e(t, n) {
  13251. return G.call(Ie(this), t, n, arguments.length > 2 ? arguments[2] : void 0);
  13252. },
  13253. every: function e(t) {
  13254. return Z(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13255. },
  13256. fill: function e(t) {
  13257. return F.apply(Ie(this), arguments);
  13258. },
  13259. filter: function e(t) {
  13260. return we(this, J(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0));
  13261. },
  13262. find: function e(t) {
  13263. return $(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13264. },
  13265. findIndex: function e(t) {
  13266. return ee(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13267. },
  13268. forEach: function e(t) {
  13269. Y(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13270. },
  13271. indexOf: function e(t) {
  13272. return ne(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13273. },
  13274. includes: function e(t) {
  13275. return te(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13276. },
  13277. join: function e(t) {
  13278. return le.apply(Ie(this), arguments);
  13279. },
  13280. lastIndexOf: function e(t) {
  13281. return ae.apply(Ie(this), arguments);
  13282. },
  13283. map: function e(t) {
  13284. return _e(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13285. },
  13286. reduce: function e(t) {
  13287. return se.apply(Ie(this), arguments);
  13288. },
  13289. reduceRight: function e(t) {
  13290. return ue.apply(Ie(this), arguments);
  13291. },
  13292. reverse: function e() {
  13293. for (var t, n = Ie(this).length, r = Math.floor(n / 2), o = 0; o < r; ) t = this[o],
  13294. this[o++] = this[--n], this[n] = t;
  13295. return this;
  13296. },
  13297. some: function e(t) {
  13298. return Q(Ie(this), t, arguments.length > 1 ? arguments[1] : void 0);
  13299. },
  13300. sort: function e(t) {
  13301. return ce.call(Ie(this), t);
  13302. },
  13303. subarray: function e(t, n) {
  13304. var r = Ie(this), o = r.length, i = y(t, o);
  13305. return new (k(r, r[ye]))(r.buffer, r.byteOffset + i * r.BYTES_PER_ELEMENT, h((void 0 === n ? o : y(n, o)) - i));
  13306. }
  13307. }, De = function e(t, n) {
  13308. return we(this, pe.call(Ie(this), t, n));
  13309. }, Ne = function e(t) {
  13310. Ie(this);
  13311. var n = Ce(arguments[1], 1), r = this.length, o = T(t), i = h(o.length), a = 0;
  13312. if (i + n > r) throw z("Wrong length!");
  13313. for (;a < i; ) this[n + a] = o[a++];
  13314. }, Fe = {
  13315. entries: function e() {
  13316. return ie.call(Ie(this));
  13317. },
  13318. keys: function e() {
  13319. return oe.call(Ie(this));
  13320. },
  13321. values: function e() {
  13322. return re.call(Ie(this));
  13323. }
  13324. }, Ge = function(e, t) {
  13325. return _(e) && e[ve] && "symbol" != typeof t && t in e && String(+t) == String(t);
  13326. }, Ue = function e(t, n) {
  13327. return Ge(t, n = S(n, !0)) ? p(2, t[n]) : H(t, n);
  13328. }, Be = function e(t, n, r) {
  13329. return !(Ge(t, n = S(n, !0)) && _(r) && v(r, "value")) || v(r, "get") || v(r, "set") || r.configurable || v(r, "writable") && !r.writable || v(r, "enumerable") && !r.enumerable ? j(t, n, r) : (t[n] = r.value,
  13330. t);
  13331. };
  13332. Se || (B.f = Ue, U.f = Be), a(a.S + a.F * !Se, "Object", {
  13333. getOwnPropertyDescriptor: Ue,
  13334. defineProperty: Be
  13335. }), i(function() {
  13336. de.call({});
  13337. }) && (de = fe = function e() {
  13338. return le.call(this);
  13339. });
  13340. var je = f({}, Le);
  13341. f(je, Fe), d(je, me, Fe.values), f(je, {
  13342. slice: De,
  13343. set: Ne,
  13344. constructor: function() {},
  13345. toString: de,
  13346. toLocaleString: Me
  13347. }), Re(je, "buffer", "b"), Re(je, "byteOffset", "o"), Re(je, "byteLength", "l"),
  13348. Re(je, "length", "e"), j(je, he, {
  13349. get: function() {
  13350. return this[ve];
  13351. }
  13352. }), e.exports = function(e, t, n, u) {
  13353. var l = e + ((u = !!u) ? "Clamped" : "") + "Array", p = "get" + e, f = "set" + e, m = o[l], y = m || {}, S = m && I(m), v = !m || !s.ABV, T = {}, E = m && m.prototype, w = function(e, n) {
  13354. j(e, n, {
  13355. get: function() {
  13356. return function(e, n) {
  13357. var r = e._d;
  13358. return r.v[p](n * t + r.o, Te);
  13359. }(this, n);
  13360. },
  13361. set: function(e) {
  13362. return function(e, n, r) {
  13363. var o = e._d;
  13364. u && (r = (r = Math.round(r)) < 0 ? 0 : r > 255 ? 255 : 255 & r), o.v[f](n * t + o.o, r, Te);
  13365. }(this, n, e);
  13366. },
  13367. enumerable: !0
  13368. });
  13369. };
  13370. v ? (m = n(function(e, n, r, o) {
  13371. c(e, m, l, "_d");
  13372. var i, a, s, u, p = 0, f = 0;
  13373. if (_(n)) {
  13374. if (!(n instanceof K || "ArrayBuffer" == (u = b(n)) || "SharedArrayBuffer" == u)) return ve in n ? Pe(m, n) : Oe.call(m, n);
  13375. i = n, f = Ce(r, t);
  13376. var y = n.byteLength;
  13377. if (void 0 === o) {
  13378. if (y % t) throw z("Wrong length!");
  13379. if ((a = y - f) < 0) throw z("Wrong length!");
  13380. } else if ((a = h(o) * t) + f > y) throw z("Wrong length!");
  13381. s = a / t;
  13382. } else s = g(n), i = new K(a = s * t);
  13383. for (d(e, "_d", {
  13384. b: i,
  13385. o: f,
  13386. l: a,
  13387. e: s,
  13388. v: new X(i)
  13389. }); p < s; ) w(e, p++);
  13390. }), E = m.prototype = C(je), d(E, "constructor", m)) : i(function() {
  13391. m(1);
  13392. }) && i(function() {
  13393. new m(-1);
  13394. }) && D(function(e) {
  13395. new m(), new m(null), new m(1.5), new m(e);
  13396. }, !0) || (m = n(function(e, n, r, o) {
  13397. var i;
  13398. return c(e, m, l), _(n) ? n instanceof K || "ArrayBuffer" == (i = b(n)) || "SharedArrayBuffer" == i ? void 0 !== o ? new y(n, Ce(r, t), o) : void 0 !== r ? new y(n, Ce(r, t)) : new y(n) : ve in n ? Pe(m, n) : Oe.call(m, n) : new y(g(n));
  13399. }), Y(S !== Function.prototype ? A(y).concat(A(S)) : A(y), function(e) {
  13400. e in m || d(m, e, y[e]);
  13401. }), m.prototype = E, r || (E.constructor = m));
  13402. var P = E[me], R = !!P && ("values" == P.name || null == P.name), O = Fe.values;
  13403. d(m, ge, !0), d(E, ve, l), d(E, be, !0), d(E, ye, m), (u ? new m(1)[he] == l : he in E) || j(E, he, {
  13404. get: function() {
  13405. return l;
  13406. }
  13407. }), T[l] = m, a(a.G + a.W + a.F * (m != y), T), a(a.S, l, {
  13408. BYTES_PER_ELEMENT: t
  13409. }), a(a.S + a.F * i(function() {
  13410. y.of.call(m, 1);
  13411. }), l, {
  13412. from: Oe,
  13413. of: xe
  13414. }), "BYTES_PER_ELEMENT" in E || d(E, "BYTES_PER_ELEMENT", t), a(a.P, l, Le), N(l),
  13415. a(a.P + a.F * Ee, l, {
  13416. set: Ne
  13417. }), a(a.P + a.F * !R, l, Fe), r || E.toString == de || (E.toString = de), a(a.P + a.F * i(function() {
  13418. new m(1).slice();
  13419. }), l, {
  13420. slice: De
  13421. }), a(a.P + a.F * (i(function() {
  13422. return [ 1, 2 ].toLocaleString() != new m([ 1, 2 ]).toLocaleString();
  13423. }) || !i(function() {
  13424. E.toLocaleString.call([ 1, 2 ]);
  13425. })), l, {
  13426. toLocaleString: Me
  13427. }), L[l] = R ? P : O, r || R || d(E, me, O);
  13428. };
  13429. } else e.exports = function() {};
  13430. }, function(e, t, n) {
  13431. "use strict";
  13432. Object.defineProperty(t, "__esModule", {
  13433. value: !0
  13434. });
  13435. var r = n(120);
  13436. t.onTextureLoaded = new r.TwinkleSignal(), t.beginScriptCalls = new r.TwinkleSignal(),
  13437. t.endScriptCalls = new r.TwinkleSignal(), t.onWindowSizeChanged = new r.TwinkleTypedEvent2(),
  13438. t.onAssetLoaded = new r.TwinkleTypedEvent2(), t.onVideoStopped = new r.TwinkleTypedEvent(),
  13439. t.onVideoLooped = new r.TwinkleTypedEvent(), t.onVideoStartPlaying = new r.TwinkleTypedEvent(),
  13440. t.onManifestDownloaded = new r.TwinkleTypedEvent(), t.onManifestAssetsDownloadStarted = new r.TwinkleTypedEvent(),
  13441. t.onManifestDownloadUpdate = new r.TwinkleTypedEvent(), t.onManifestAssetsDownloadCompleted = new r.TwinkleTypedEvent();
  13442. }, function(e, t, n) {
  13443. "use strict";
  13444. Object.defineProperty(t, "__esModule", {
  13445. value: !0
  13446. });
  13447. var r = n(45);
  13448. t.onReady = r.createTypedAction(), t.onDisconnected = r.createTypedAction();
  13449. }, function(e, t, n) {
  13450. "use strict";
  13451. (function(e) {
  13452. Object.defineProperty(t, "__esModule", {
  13453. value: !0
  13454. });
  13455. var r = n(0), o = n(2), i = n(186), a = n(879), s = n(166), u = n(880), l = n(246), c = n(9), p = n(62), d = n(144), f = n(69), m = e.get("FontState"), h = function() {
  13456. function t(e) {
  13457. this.locales = o.observable.array(), this.gameLocale = null, this.registeredFonts = o.observable.array(),
  13458. this.displayLocale = s.Locale.ENGLISH, this.fallback = !1, this.translationsAreDone = !1,
  13459. this.isReady = !1, this.fallbackCache = !1, this.accountInfoPSN = new a.AccountInfoPSN(e);
  13460. }
  13461. return t.prototype.withTranslations = function(e) {
  13462. var t = this;
  13463. this.translationsAreDone ? e() : o.when(function() {
  13464. return t.translationsAreDone;
  13465. }, e);
  13466. }, t.prototype.promiseTranslations = function() {
  13467. var e = this;
  13468. return new Promise(function(t) {
  13469. e.withTranslations(t);
  13470. });
  13471. }, t.prototype.initialize = function(e, t, n, r) {
  13472. var a = this;
  13473. o.observe(this.accountInfoPSN, "language", function(e) {
  13474. var t = i.psnAccountLanguageToSpartaLocale(e.newValue);
  13475. a.updateFontsForLocale(t);
  13476. }), o.reaction(function() {
  13477. return t.ready;
  13478. }, function(n) {
  13479. if (n) {
  13480. var i = t.locale, s = t.region, l = t.hostingGame;
  13481. if (!i || !s || !l) throw new Error("Missing locale, region or hostingGame (" + i + ", " + s + ", " + l);
  13482. var c = a.getSupportedRegion(s), p = a.getSupportedLocale(i, c, l);
  13483. a.localeSupport = u.getLocaleSupport(e.getRegisteredGames(), c, p, l), a.setInitialLocales(p, t.commerceLocale || p, a.localeSupport.requiresFallback),
  13484. a.localeSupport.requiresFallback && r.onLoad(function(e) {
  13485. o.reaction(function() {
  13486. return e.isGameViewVisible;
  13487. }, function(e) {
  13488. e ? (a.fallbackCache = a.fallback, a.fallback = !1) : a.fallback = a.fallbackCache;
  13489. });
  13490. }), a.isReady = !0;
  13491. }
  13492. }), o.reaction(function() {
  13493. return n.location.section;
  13494. }, function(e) {
  13495. var t = !!a.localeSupport && a.localeSupport.sectionNeedsFallback(e);
  13496. a.setFallbackAndSection({
  13497. section: e,
  13498. fallback: !!a.needsFallback && t
  13499. });
  13500. }, {
  13501. fireImmediately: !0
  13502. });
  13503. }, t.prototype.setInitialLocales = function(e, t, n) {
  13504. this.gameLocale = e.toLowerCase(), this.displayLocale = this.gameLocale, this.commerceLocale = t.toLowerCase(),
  13505. this.needsFallback = n;
  13506. }, t.prototype.updateFontsForLocale = function(e) {
  13507. var t = this;
  13508. return new Promise(function(n, r) {
  13509. if (e && i.fontConfig.hasOwnProperty(e) ? -1 === t.locales.indexOf(e) && t.locales.push(e) : m.warn("Locale not found in fontConfig. Falling back to en-us. Got locale: " + e),
  13510. t.commerceLocale) {
  13511. var o = i.commerceLocaleToRegionFontLocale(t.commerceLocale);
  13512. o && -1 === t.locales.indexOf(o) && t.locales.push(o);
  13513. }
  13514. var a = t.getFontsToLoad();
  13515. 0 === a.length && n(), t.loadFonts(a);
  13516. var s = setTimeout(function() {
  13517. if (!a.every(function(e) {
  13518. return e.loaded;
  13519. })) {
  13520. var e = a.filter(function(e) {
  13521. return !e.loaded;
  13522. }).map(function(e) {
  13523. return e.name;
  13524. });
  13525. m.warn("These fonts could not be loaded in time:", e);
  13526. }
  13527. clearTimeout(s), n();
  13528. }, 3e4), u = d.onAssetLoaded.listen(function(e, t) {
  13529. var o = !1;
  13530. a.every(function(n, i) {
  13531. var s = n.url.replace("http://offline.twinkle", "");
  13532. return -1 === e.indexOf(s) || (o = !0, t ? a[i].loaded = !0 : (u(), r()), !1);
  13533. }), o && a.every(function(e) {
  13534. return e.loaded;
  13535. }) && (clearTimeout(s), u(), n());
  13536. });
  13537. });
  13538. }, Object.defineProperty(t.prototype, "gameLocaleOrDefault", {
  13539. get: function() {
  13540. return this.gameLocale || "en-us";
  13541. },
  13542. enumerable: !0,
  13543. configurable: !0
  13544. }), t.prototype.getSupportedRegion = function(e) {
  13545. return l.isRegion(e) ? e : l.Region.NA;
  13546. }, t.prototype.getSupportedLocale = function(t, n, r) {
  13547. if ("en-us" === t) return "en-us";
  13548. var o = r.locales[n.toLowerCase()];
  13549. return o ? ("zh-cn" === t && -1 === o.indexOf(t) && (t = s.Locale.CHINESE_TRADITIONAL),
  13550. -1 === o.indexOf(t) ? (e.get("LocaleState").error("Missing locale in list of supported locales (locale: '" + t + "', platform: '" + c.SpartaGlobals.bundlePlatform + "', region: '" + n + "', game '" + r.displayName() + "')"),
  13551. s.Locale.ENGLISH) : t) : (e.get("LocaleState").error("Missing region in list of supported locales (region: '" + n + "', game: '" + r.displayName() + "'"),
  13552. s.Locale.ENGLISH);
  13553. }, t.prototype.getFontsToLoad = function() {
  13554. var e = this, t = [];
  13555. return this.locales.forEach(function(n) {
  13556. var r = i.fontConfig[n];
  13557. if (r) {
  13558. var o = function(n) {
  13559. if (!r.hasOwnProperty(n)) return "continue";
  13560. var o = r[n];
  13561. if (!o) return "continue";
  13562. Object.keys(o).forEach(function(n) {
  13563. var r = o[n];
  13564. r && e.isFontNotRegistered(r) && (e.registeredFonts.push(r.fontName), t.push({
  13565. name: r.fontName,
  13566. url: r.fontUrl,
  13567. loaded: !1
  13568. }));
  13569. });
  13570. };
  13571. for (var a in r) o(a);
  13572. }
  13573. }), t;
  13574. }, t.prototype.loadFonts = function(e) {
  13575. e.forEach(g);
  13576. }, t.prototype.isFontNotRegistered = function(e) {
  13577. return -1 === this.registeredFonts.indexOf(e.fontName);
  13578. }, t.prototype.setFallbackAndSection = function(e) {
  13579. this.section = e.section, this.fallback = e.fallback, this.displayLocale = e.fallback ? s.Locale.ENGLISH : this.gameLocaleOrDefault;
  13580. }, t.prototype.markTranslationsAsDone = function() {
  13581. this.translationsAreDone = !0;
  13582. }, r.__decorate([ o.observable ], t.prototype, "gameLocale", void 0), r.__decorate([ o.observable ], t.prototype, "commerceLocale", void 0),
  13583. r.__decorate([ o.observable ], t.prototype, "displayLocale", void 0), r.__decorate([ o.observable ], t.prototype, "needsFallback", void 0),
  13584. r.__decorate([ o.observable ], t.prototype, "section", void 0), r.__decorate([ o.observable ], t.prototype, "fallback", void 0),
  13585. r.__decorate([ o.observable ], t.prototype, "translationsAreDone", void 0), r.__decorate([ o.observable ], t.prototype, "isReady", void 0),
  13586. r.__decorate([ o.action ], t.prototype, "setInitialLocales", null), r.__decorate([ o.action ], t.prototype, "updateFontsForLocale", null),
  13587. r.__decorate([ o.computed ], t.prototype, "gameLocaleOrDefault", null), r.__decorate([ o.action ], t.prototype, "getFontsToLoad", null),
  13588. r.__decorate([ o.action ], t.prototype, "setFallbackAndSection", null), r.__decorate([ o.action ], t.prototype, "markTranslationsAsDone", null),
  13589. t;
  13590. }();
  13591. function g(e) {
  13592. f.loadFont(e.name, e.url);
  13593. }
  13594. t.LocaleState = h, t.localeState = new h(p.frostbite);
  13595. }).call(this, n(15));
  13596. }, function(e, t, n) {
  13597. "use strict";
  13598. Object.defineProperty(t, "__esModule", {
  13599. value: !0
  13600. });
  13601. var r = n(0), o = n(1), i = n(371), a = n(22), s = n(131), u = n(2), l = n(210), c = n(14), p = n(34), d = n(4), f = n(77), m = n(888), h = n(5), g = n(496), y = n(71), S = n(370), v = function() {
  13602. return function e(t, n) {
  13603. this.index = t, this.tab = n;
  13604. };
  13605. }(), b = function(e) {
  13606. function t(t, n) {
  13607. var r = e.call(this, t) || this;
  13608. return r.content = null, r.setContent(n), r;
  13609. }
  13610. return r.__extends(t, e), t.prototype.setContent = function(e) {
  13611. this.content = e;
  13612. }, t.prototype.contentEquals = function(e) {
  13613. return !!this.content && this.content.index === e.index;
  13614. }, r.__decorate([ u.observable ], t.prototype, "content", void 0), r.__decorate([ u.action ], t.prototype, "setContent", null),
  13615. t;
  13616. }(l.ItemState);
  13617. t.TabSlotItem = b;
  13618. var _ = function(e) {
  13619. function t(t, n) {
  13620. for (var r = [], o = 2; o < arguments.length; o++) r[o - 2] = arguments[o];
  13621. var i = e.apply(this, [ n ].concat(r)) || this;
  13622. return i.viewComponentState = t, i;
  13623. }
  13624. return r.__extends(t, e), Object.defineProperty(t.prototype, "leftToRight", {
  13625. get: function() {
  13626. return !!(this.previous && this.current && this.previous.content && this.current.content) && this.previous.content.index > this.current.content.index;
  13627. },
  13628. enumerable: !0,
  13629. configurable: !0
  13630. }), Object.defineProperty(t.prototype, "activeTabIndex", {
  13631. get: function() {
  13632. return this.current && this.current.content ? this.current.content.index : 0;
  13633. },
  13634. enumerable: !0,
  13635. configurable: !0
  13636. }), Object.defineProperty(t.prototype, "activeTab", {
  13637. get: function() {
  13638. return this.current && this.current.content && this.current.content.tab;
  13639. },
  13640. enumerable: !0,
  13641. configurable: !0
  13642. }), Object.defineProperty(t.prototype, "location", {
  13643. get: function() {
  13644. return this.viewComponentState && this.viewComponentState.aggregate && this.viewComponentState.aggregate.location;
  13645. },
  13646. enumerable: !0,
  13647. configurable: !0
  13648. }), t.prototype.setActiveTab = function(e, t, n) {
  13649. if (!(this.activeTab && this.activeTabIndex === e || e >= t.length)) {
  13650. var o = t[e];
  13651. n && this.location ? this.location.args && this.location.args.tab !== o.id ? (this.previousLocation = this.location,
  13652. a.updateLocation(new s.Location({
  13653. path: this.location.path,
  13654. args: r.__assign({}, this.location.args, {
  13655. tab: o.id
  13656. })
  13657. }))) : this.activeTab || this.switchToItem(new v(e, o)) : this.switchToItem(new v(e, o));
  13658. }
  13659. }, t.prototype.goBackToPreviousTab = function() {
  13660. var e = this.previous, t = this.previousLocation;
  13661. return !(!t || !e) && (a.updateLocation(t), e.content && this.switchToItem(e.content),
  13662. !0);
  13663. }, r.__decorate([ u.computed ], t.prototype, "leftToRight", null), r.__decorate([ u.computed ], t.prototype, "activeTabIndex", null),
  13664. r.__decorate([ u.computed ], t.prototype, "activeTab", null), r.__decorate([ u.computed ], t.prototype, "location", null),
  13665. r.__decorate([ u.action ], t.prototype, "setActiveTab", null), t;
  13666. }(l.EnterLeaveState);
  13667. t.TabSlotItemContext = y.createModernContext("TabSlotItem");
  13668. var T = function(e) {
  13669. function n() {
  13670. var t = null !== e && e.apply(this, arguments) || this;
  13671. return t.tweens = {
  13672. translateX: c.Animation.componentTween(t, "TabslotTranslateX", 0),
  13673. opacity: c.Animation.componentTween(t, "opacity", 1)
  13674. }, t;
  13675. }
  13676. return r.__extends(n, e), n.prototype.componentDidMount = function() {
  13677. var e = this;
  13678. this.reaction(function() {
  13679. return e.props.item.currentState;
  13680. }, function() {
  13681. var t = e.props.item;
  13682. e.handleSlideOutOrIn(t.previousState, t.currentState);
  13683. });
  13684. }, n.prototype.handleSlideOutOrIn = function(e, t) {
  13685. var n = this, r = u.untracked(function() {
  13686. return n.props.tabbedTemplate.leftToRight;
  13687. }) ? -1 : 1;
  13688. if (t === l.EnterLeaveStates.LEAVING && (this.tweens.translateX.to(-1920 * r), this.tweens.opacity.to(0)),
  13689. t === l.EnterLeaveStates.ENTERING && (e !== l.EnterLeaveStates.IDLE ? (this.tweens.translateX.to(0),
  13690. this.tweens.opacity.to(1)) : (this.tweens.translateX.transition(1920 * r, 0), this.tweens.opacity.transition(0, 1))),
  13691. t === l.EnterLeaveStates.ACTIVE) {
  13692. var o = this.tab;
  13693. o && o.onSelect && o.onSelect();
  13694. }
  13695. }, Object.defineProperty(n.prototype, "tab", {
  13696. get: function() {
  13697. return this.props.item.content && this.props.item.content.tab;
  13698. },
  13699. enumerable: !0,
  13700. configurable: !0
  13701. }), n.prototype.render = function() {
  13702. var e, n = this.tab;
  13703. if (!n || !this.props.item.isVisible) return null;
  13704. if (n.render) e = n.render(); else if (n.component) {
  13705. var i = n.component;
  13706. e = o.createElement(i, r.__assign({
  13707. key: n.id
  13708. }, n.props));
  13709. }
  13710. var a = h.merge3(g.TabbedTemplateStyle.tabContent(this.props.topGutter), this.tweens.translateX.getStyleClass("translateX"), this.tweens.opacity.getStyleClass("opacity"));
  13711. return o.createElement(t.TabSlotItemContext.Provider, {
  13712. value: this.props.item
  13713. }, o.createElement("surface", {
  13714. style: a
  13715. }, e));
  13716. }, n = r.__decorate([ d.observer ], n);
  13717. }(o.Component), E = f.observer(function e(t) {
  13718. var n = t.tabbedTemplate, r = t.tabs, i = t.header, a = t.alwaysShowTabMenu, s = void 0 === a || a, u = o.useCallback(function(e) {
  13719. n.setActiveTab(e, r, !0);
  13720. }, [ n, r ]), l = null;
  13721. if (i) l = i; else {
  13722. var c = n.activeTab;
  13723. c && c.renderHeader && (l = c.renderHeader());
  13724. }
  13725. return o.createElement("surface", {
  13726. style: g.TabbedTemplateStyle.header
  13727. }, r.length > 1 || s ? o.createElement(m.TabMenu, {
  13728. tabs: r,
  13729. enableInput: !0,
  13730. activeTabIndex: n.activeTabIndex,
  13731. onTabSelect: u
  13732. }) : o.createElement("surface", null), o.createElement("surface", {
  13733. style: g.TabbedTemplateStyle.contentHeader(!!l)
  13734. }, l));
  13735. });
  13736. t.TabbedTemplateContext = y.createModernContext("TabbedTemplateState");
  13737. var C = function(e) {
  13738. function n(t, n) {
  13739. var r = e.call(this, t, n) || this;
  13740. r.isInitialLocationChange = !0;
  13741. var o, i = S.ViewSlotContext.findFromComponent(r);
  13742. return o = i && i.aggregate ? r.getTabIndexFromLocation(i.aggregate.location) : t.defaultTab || 0,
  13743. r.tabbedTemplate = new (_.bind.apply(_, [ void 0, i || null, new v(o, null) ].concat(t.tabs.map(function(e, t) {
  13744. return new b("slot" + t, null);
  13745. }))))(), i || r.handleTabSelected(r.tabbedTemplate.activeTabIndex), r;
  13746. }
  13747. return r.__extends(n, e), n.prototype.componentDidMount = function() {
  13748. var e = this;
  13749. this.reaction(function() {
  13750. return e.tabbedTemplate.location;
  13751. }, function(t) {
  13752. t && e.handleLocationChanged(t);
  13753. }, {
  13754. fireImmediately: !0
  13755. });
  13756. }, n.prototype.handleLocationChanged = function(e) {
  13757. var t = this.getTabIndexFromLocation(e);
  13758. this.handleTabSelected(t, this.isInitialLocationChange), this.isInitialLocationChange && (this.isInitialLocationChange = !1);
  13759. }, n.prototype.handleTabSelected = function(e, t) {
  13760. void 0 === t && (t = !0), this.tabbedTemplate.setActiveTab(e, this.props.tabs, t);
  13761. }, n.prototype.navigateTo = function(e) {
  13762. var t = this.props.tabs.findIndex(function(t) {
  13763. return t.id === e;
  13764. });
  13765. t > -1 && this.handleTabSelected(t);
  13766. }, n.prototype.getTabIndexFromLocation = function(e) {
  13767. var t = 0;
  13768. if (e && e.args && e.args.tab) {
  13769. var n = this.props.tabs.findIndex(function(t) {
  13770. return t.id === e.args.tab;
  13771. });
  13772. n > -1 && (t = n);
  13773. } else "number" == typeof this.props.defaultTab && (t = this.props.defaultTab);
  13774. return t;
  13775. }, n.prototype.render = function() {
  13776. var e = this, n = this.tabbedTemplate.items.map(function(t) {
  13777. return o.createElement(T, {
  13778. key: t.name,
  13779. topGutter: e.props.topGutter,
  13780. item: t,
  13781. tabbedTemplate: e.tabbedTemplate
  13782. });
  13783. }), r = o.createElement(E, {
  13784. tabbedTemplate: this.tabbedTemplate,
  13785. tabs: this.props.tabs,
  13786. header: this.props.header,
  13787. alwaysShowTabMenu: this.props.alwaysShowTabMenu
  13788. });
  13789. return o.createElement(p.Template, {
  13790. tallContent: !0,
  13791. wideContent: this.props.wideContent,
  13792. scrollContent: this.props.scrollContent,
  13793. scrollToFocus: this.props.scrollToFocus,
  13794. header: r,
  13795. shortHeader: this.props.shortHeader,
  13796. showDivider: this.props.showDivider
  13797. }, o.createElement(t.TabbedTemplateContext.Provider, {
  13798. value: this.tabbedTemplate
  13799. }, n));
  13800. }, n.contextTypes = S.ViewSlotContext.contextTypes, n.defaultProps = {
  13801. scrollContent: !1,
  13802. scrollToFocus: !1,
  13803. shortHeader: !1,
  13804. topGutter: !0
  13805. }, n;
  13806. }(o.Component);
  13807. t.TabbedTemplate = C, t.getTabIndexFromRoute = function I(e, t) {
  13808. try {
  13809. var n = i.parse(i.extract(t)), r = "string" == typeof n.tab ? e.findIndex(function(e) {
  13810. return e.id === n.tab;
  13811. }) : 0;
  13812. return -1 === r && (r = 0), r;
  13813. } catch (e) {
  13814. return 0;
  13815. }
  13816. };
  13817. }, function(e, t, n) {
  13818. "use strict";
  13819. Object.defineProperty(t, "__esModule", {
  13820. value: !0
  13821. });
  13822. var r = n(71);
  13823. t.TwinkleContext = r.createContext("Twinkle"), t.useTwinkle = function o() {
  13824. return t.TwinkleContext.use();
  13825. };
  13826. }, function(e, t, n) {
  13827. "use strict";
  13828. Object.defineProperty(t, "__esModule", {
  13829. value: !0
  13830. });
  13831. var r = n(0), o = n(9);
  13832. function i(e) {
  13833. return "0" === e ? null : e;
  13834. }
  13835. var a = function() {
  13836. function e(e) {
  13837. void 0 === e && (e = {}), e.sceNpId && (this.sceNpId = "" + e.sceNpId), e.xUid && "0" !== e.xUid && (this.xUid = "" + e.xUid),
  13838. e.nucleusId && "0" !== e.nucleusId && (this.nucleusId = "" + e.nucleusId), e.personaId && "0" !== e.personaId && (this.personaId = "" + e.personaId),
  13839. e.personaName && (this.personaName = "" + e.personaName);
  13840. }
  13841. return e.update = function(t, n) {
  13842. return void 0 === t && (t = {}), void 0 === n && (n = {}), new e({
  13843. sceNpId: n.sceNpId || t.sceNpId,
  13844. xUid: i(n.xUid) || t.xUid,
  13845. nucleusId: i(n.nucleusId) || t.nucleusId,
  13846. personaId: i(n.personaId) || t.personaId,
  13847. personaName: n.personaName || t.personaName
  13848. });
  13849. }, e.prototype.getPlatformId = function() {
  13850. return e.getPlatformId(this);
  13851. }, e.getPlatformId = function(e) {
  13852. return o.SpartaGlobals.bundleIsPS4 && e.sceNpId ? e.sceNpId : o.SpartaGlobals.bundleIsXBOXONE && e.xUid ? i(e.xUid) : o.SpartaGlobals.bundleIsPC && e.nucleusId ? i(e.nucleusId) : void 0;
  13853. }, e.fromPlatformId = function(t, n) {
  13854. if (o.SpartaGlobals.bundleIsPS4) return new e(r.__assign({}, n, {
  13855. sceNpId: t
  13856. }));
  13857. if (o.SpartaGlobals.bundleIsXBOXONE) return new e(r.__assign({}, n, {
  13858. xUid: t
  13859. }));
  13860. if (o.SpartaGlobals.bundleIsPC) return new e(r.__assign({}, n, {
  13861. nucleusId: t
  13862. }));
  13863. throw Error("Unknown platform");
  13864. }, e.prototype.equals = function(e) {
  13865. return e ? !(!this.sceNpId || !e.sceNpId || this.sceNpId !== e.sceNpId) || (!(!this.xUid || !e.xUid || this.xUid !== e.xUid) || (!(!this.nucleusId || !e.nucleusId || this.nucleusId !== e.nucleusId) || (!(!this.personaId || !e.personaId || this.personaId !== e.personaId) || !(!this.personaName || !e.personaName || this.personaName !== e.personaName)))) : this.isNull();
  13866. }, e.prototype.isNull = function() {
  13867. var e = this.getPlatformId();
  13868. return !e || "0" === e;
  13869. }, e;
  13870. }();
  13871. t.SpartaUserId = a, t.getSpartaPersonaPlatformId = function s(e) {
  13872. return e.platformId;
  13873. };
  13874. }, function(e, t, n) {
  13875. "use strict";
  13876. Object.defineProperty(t, "__esModule", {
  13877. value: !0
  13878. });
  13879. var r = n(0), o = function(e) {
  13880. function t() {
  13881. var t = null !== e && e.apply(this, arguments) || this;
  13882. return t.name = "TelemetryStore", t;
  13883. }
  13884. return r.__extends(t, e), t;
  13885. }(n(249).StoreLoader);
  13886. t.TelemetryStoreLoader = o, t.telemetryStoreLoader = new o();
  13887. }, function(e, t, n) {
  13888. "use strict";
  13889. Object.defineProperty(t, "__esModule", {
  13890. value: !0
  13891. });
  13892. var r = n(966), o = n(968);
  13893. t.gameDataStore = new o.GameDataStore(r.gameDataClient);
  13894. }, function(e, t, n) {
  13895. "use strict";
  13896. (function(__) {
  13897. Object.defineProperty(t, "__esModule", {
  13898. value: !0
  13899. });
  13900. var e = n(0), r = n(1), o = n(69), i = n(4), a = n(2), s = n(136), u = n(64), l = n(6), c = n(7), p = n(222), d = n(10), f = n(25), m = n(21), h = n(41), g = n(11), y = n(20), S = n(1163), v = n(223), b = n(319), _ = n(1164), T = n(18), E = n(5), C = n(409), I = n(29), A = n(8), w = E.StaticStyle.wrapLegacyStyleSheet({
  13901. heading: {
  13902. position: "absolute",
  13903. top: 0,
  13904. bottom: 0,
  13905. left: 0,
  13906. right: 0,
  13907. flex: 1,
  13908. justifyContent: "flex-end",
  13909. zOffset: 51
  13910. },
  13911. premiumTreatment: {
  13912. position: "absolute",
  13913. top: -c.GUTTER,
  13914. right: -c.GUTTER
  13915. },
  13916. headingText: {
  13917. zOffset: 51
  13918. },
  13919. type: {
  13920. opacity: .8
  13921. },
  13922. custom: {
  13923. color: b.customTextColor,
  13924. marginBottom: c.GUTTER
  13925. },
  13926. text: {
  13927. textLineSpacing: m.LINE_HEIGHTS.S
  13928. },
  13929. secondaryText: {
  13930. textLineSpacing: m.LINE_HEIGHTS.S,
  13931. opacity: .65
  13932. },
  13933. textRTL: {
  13934. textAlignForRTL: "left"
  13935. },
  13936. infoZone: {
  13937. height: c.getHeight(13),
  13938. zOffset: 51
  13939. },
  13940. joinButton: {
  13941. marginTop: 1.5 * c.GUTTER,
  13942. marginBottom: 1.5 * c.GUTTER,
  13943. flexDirection: "row",
  13944. textAlign: "center",
  13945. textAlignForRTL: "center"
  13946. },
  13947. hrLine: {
  13948. height: 1,
  13949. flexDirection: "row",
  13950. backgroundColor: "#0000001a"
  13951. },
  13952. contextMenu: {
  13953. zOffset: 52,
  13954. width: c.spacer(6),
  13955. height: c.spacer(4),
  13956. padding: c.spacer(2),
  13957. margin: -c.spacer(3),
  13958. marginLeft: 3,
  13959. marginRight: -c.spacer(2)
  13960. },
  13961. contextMenuRTL: {
  13962. zOffset: 52,
  13963. width: c.spacer(6),
  13964. height: c.spacer(4),
  13965. padding: c.spacer(2),
  13966. margin: -c.spacer(3),
  13967. marginRight: 3,
  13968. marginLeft: -c.spacer(2)
  13969. },
  13970. bottomRowContainer: {
  13971. alignItems: "center",
  13972. justifyContent: "space-between",
  13973. flexDirection: "row",
  13974. marginTop: c.GUTTER
  13975. },
  13976. platoonEmblem: {
  13977. width: c.getWidth(2),
  13978. height: c.getWidth(2),
  13979. zOffset: 51,
  13980. alignSelf: "flex-end"
  13981. },
  13982. gameLogo: {
  13983. position: "absolute",
  13984. top: 0,
  13985. left: 0,
  13986. textureMode: "contain",
  13987. textureAlign: [ 0, 0 ],
  13988. width: c.getWidth(2),
  13989. height: c.getHeight(4)
  13990. },
  13991. earlyAccess: {
  13992. marginLeft: c.GUTTER,
  13993. marginRight: c.GUTTER
  13994. },
  13995. headerRow: {
  13996. flex: 1,
  13997. flexDirection: "row",
  13998. justifyContent: "space-between"
  13999. },
  14000. headerColumnLeft: {
  14001. flex: 1,
  14002. flexDirection: "column",
  14003. justifyContent: "flex-end"
  14004. },
  14005. headerColumnRight: {
  14006. justifyContent: "flex-end"
  14007. }
  14008. }, "17d3e621:35:15"), P = function(t) {
  14009. function n(e, n) {
  14010. var i = t.call(this, e, n) || this;
  14011. return i.sparta = A.SpartaContext.getFromComponent(i), i.isContextMenuOpen = !1,
  14012. i.contextMenu = r.createRef(), i.getInput = function() {
  14013. if (i.isContextMenuOpen) return new g.Input({
  14014. label: __("ID_SPARTA_ACTION_CLOSE"),
  14015. key: d.Keys.Decline,
  14016. action: function() {
  14017. i.contextMenu.current && i.contextMenu.current.close();
  14018. }
  14019. });
  14020. }, i.getCardBounds = function() {
  14021. var e = i.focusItem.bounds;
  14022. return {
  14023. x: e ? e.x : 0,
  14024. y: e ? e.y + e.height : 0
  14025. };
  14026. }, i.onOpenOrClose = a.action(function(e) {
  14027. return i.isContextMenuOpen = e;
  14028. }), i.focusItem = e.focusItem || i.sparta.twinkle.focus.create(i, o.autoId("playCard")),
  14029. i;
  14030. }
  14031. return e.__extends(n, t), Object.defineProperty(n.prototype, "currentGameId", {
  14032. get: function() {
  14033. return this.sparta.stores.layoutStateStore.current.config.gameId;
  14034. },
  14035. enumerable: !0,
  14036. configurable: !0
  14037. }), n.prototype.renderInfoZone = function() {
  14038. var e = y.isRTLLanguage(), t = e ? u.Direction.Left : u.Direction.Right, n = e ? E.DynamicStyle.wrapLegacyStyle({
  14039. textLineSpacing: m.LINE_HEIGHTS.S + c.GUTTER / 2
  14040. }, "17d3e621:224:14") : E.emptyStyle, o = !!this.props.modes && r.createElement(l.Text, {
  14041. value: this.props.modes,
  14042. style: E.merge2(w.text, n),
  14043. type: I.TextType.EMPHASIS,
  14044. size: "S"
  14045. }), i = !!this.props.maps && r.createElement(l.Text, {
  14046. value: this.props.maps,
  14047. style: w.text,
  14048. type: I.TextType.EMPHASIS,
  14049. size: "S"
  14050. }), a = !!this.props.expansion && r.createElement(v.PremiumTreatment, {
  14051. expansion: this.props.expansion,
  14052. textStyle: E.merge2(w.text, T.CommonStyles.flex1),
  14053. fontSize: "S",
  14054. showEarlyAccess: !0
  14055. });
  14056. return r.createElement(u.Marquee, {
  14057. scroll: this.isContextMenuOpen,
  14058. focusItem: this.focusItem,
  14059. scrollTo: t,
  14060. rtl: e,
  14061. style: T.CommonStyles.flex1,
  14062. shuttle: !0
  14063. }, r.createElement("surface", {
  14064. style: e ? T.CommonStyles.alignItemsFlexEnd : E.emptyStyle
  14065. }, o, i, a));
  14066. }, n.prototype.renderFriendNames = function(e) {
  14067. return 1 === e.length ? __("ID_SPARTA_GENERIC_PLAYING_ONE_USER").replace("[[x]]", R(e[0].displayName)) : 2 === e.length ? __("ID_SPARTA_GENERIC_PLAYING_TWO_USERS").replace("[[x]]", R(e[0].displayName)).replace("[[y]]", R(e[1].displayName)) : __("ID_SPARTA_GENERIC_PLAYING_MORE_USERS").replace("[[x]]", R(e[0].displayName)).replace("[[y]]", R(e[1].displayName)).replace("[[z]]", (e.length - 2).toString());
  14068. }, n.prototype.renderFriendAvatars = function(e) {
  14069. var t = e.map(function(e, t) {
  14070. return r.createElement(p.Avatar, {
  14071. user: e,
  14072. key: t,
  14073. size: 57,
  14074. style: T.PlayCardStyles.avatar
  14075. });
  14076. });
  14077. return r.createElement("surface", {
  14078. style: T.PlayCardStyles.avatarContainer
  14079. }, t);
  14080. }, n.prototype.renderHeading = function() {
  14081. var e = this.props.heading ? this.props.heading.toUpperCase() : "", t = (this.props.friends ? this.props.friends : []).slice(0, 3), n = t.length > 0 && this.renderFriendAvatars(t);
  14082. t.length > 0 && (e += (e ? " - " : "") + this.renderFriendNames(t));
  14083. var o = !!this.props.platoon && r.createElement(S.PlatoonEmblem, {
  14084. emblem: this.props.platoon.emblem,
  14085. style: w.platoonEmblem
  14086. }), i = this.props.custom && r.createElement(l.Text, {
  14087. value: __("ID_SPARTA_SERVER_TYPE_CUSTOM_GAME"),
  14088. size: "XS",
  14089. style: E.merge2(w.custom, w.textRTL)
  14090. }), a = E.DynamicStyle.wrapLegacyStyle({
  14091. color: this.props.headingColor
  14092. }, "17d3e621:315:27"), s = !!e && r.createElement(l.Text, {
  14093. value: e,
  14094. type: I.TextType.EMPHASIS,
  14095. size: "XS",
  14096. style: E.merge3(w.type, a, w.headingText)
  14097. }), c = this.props.game && this.sparta.stores.gameStore.getGame(this.props.game), p = c && !this.currentGameId ? r.createElement("surface", {
  14098. style: [ w.gameLogo, {
  14099. texture: c.logoConfig.logoUrl
  14100. } ]
  14101. }) : null, d = this.props.expansion ? r.createElement(v.PremiumTreatment, {
  14102. showP: !0,
  14103. expansion: this.props.expansion,
  14104. containerStyle: w.premiumTreatment
  14105. }) : null, f = y.isRTLLanguage() ? u.Direction.Left : u.Direction.Right;
  14106. return o ? r.createElement("surface", {
  14107. style: w.heading
  14108. }, d, p, r.createElement("surface", {
  14109. style: w.headerRow
  14110. }, r.createElement("surface", {
  14111. style: w.headerColumnLeft
  14112. }, n, i, r.createElement(u.Marquee, {
  14113. showEllipsis: !0,
  14114. focusItem: this.focusItem,
  14115. scrollTo: f,
  14116. shuttle: !0
  14117. }, s)), r.createElement("surface", {
  14118. style: w.headerColumnRight
  14119. }, o))) : r.createElement("surface", {
  14120. style: w.heading
  14121. }, d, p, n, i, r.createElement(u.Marquee, {
  14122. showEllipsis: !0,
  14123. focusItem: this.focusItem,
  14124. scrollTo: f,
  14125. shuttle: !0
  14126. }, s));
  14127. }, n.prototype.renderBottom = function() {
  14128. var e = this.focusItem.isFocusedOrHovered || this.isContextMenuOpen, t = this.props.size, n = y.isRTLLanguage();
  14129. if (!t) return r.createElement("surface", null);
  14130. var o = this.props.contextMenu && r.createElement(C.ContextMenuButton, {
  14131. key: "contextMenuButton",
  14132. ref: this.contextMenu,
  14133. dark: e,
  14134. position: this.getCardBounds,
  14135. menuItems: this.props.contextMenu.menuItems,
  14136. style: n ? w.contextMenuRTL : w.contextMenu,
  14137. onOpenOrClose: this.onOpenOrClose,
  14138. menuWidth: c.getWidth(h.CARD_WIDTH.cells[t])
  14139. }), i = !!this.props.counterId && r.createElement(_.ServerCount, {
  14140. key: "serverCount",
  14141. style: E.merge2(w.secondaryText, E.DynamicStyle.wrapLegacyStyle({
  14142. zOffset: 1
  14143. }, "17d3e621:394:52")),
  14144. size: "XS",
  14145. counterId: this.props.counterId
  14146. }), a = n ? u.Direction.Left : u.Direction.Right, s = !!this.props.playersInfo && r.createElement(u.Marquee, {
  14147. key: "playersInfoMarquee",
  14148. scroll: this.isContextMenuOpen,
  14149. focusItem: this.focusItem,
  14150. scrollTo: a,
  14151. style: T.CommonStyles.flex1,
  14152. shuttle: !0
  14153. }, r.createElement("surface", {
  14154. style: T.CommonStyles.flexRow
  14155. }, r.createElement(l.Text, {
  14156. value: this.props.playersInfo,
  14157. style: E.merge2(w.text, T.CommonStyles.flex1),
  14158. size: "S"
  14159. }))), p = !!this.props.extraInfo && r.createElement(u.Marquee, {
  14160. key: "extraInfoMarquee",
  14161. scroll: this.isContextMenuOpen,
  14162. focusItem: this.focusItem,
  14163. scrollTo: a,
  14164. style: T.CommonStyles.flex1,
  14165. shuttle: !0
  14166. }, r.createElement("surface", {
  14167. style: T.CommonStyles.flexRow
  14168. }, r.createElement(l.Text, {
  14169. value: this.props.extraInfo,
  14170. style: E.merge2(w.secondaryText, T.CommonStyles.flex1),
  14171. size: m.TextSize.XS
  14172. }))), d = !!this.props.filters && r.createElement(l.Text, {
  14173. size: "XS",
  14174. value: this.props.filters,
  14175. style: w.secondaryText
  14176. });
  14177. return r.createElement("surface", null, this.renderInfoZone(), d, r.createElement("surface", {
  14178. style: w.bottomRowContainer
  14179. }, y.localeRearrange([ s, i, p, o ])));
  14180. }, n.prototype.renderFold = function() {
  14181. return !!this.props.joinButtonName && r.createElement("surface", null, r.createElement("surface", {
  14182. style: w.hrLine
  14183. }), r.createElement(l.Text, {
  14184. value: this.props.joinButtonName,
  14185. style: w.joinButton,
  14186. type: I.TextType.EMPHASIS,
  14187. size: "S"
  14188. }));
  14189. }, n.prototype.render = function() {
  14190. var t = this.props, n = (t.heading, t.friends, t.platoon, t.modes, t.maps, t.playersInfo,
  14191. t.filters, t.custom, t.joinButtonName, t.headingColor, t.contextMenu, t.game, t.counterId,
  14192. t.expansion, t.children), o = e.__rest(t, [ "heading", "friends", "platoon", "modes", "maps", "playersInfo", "filters", "custom", "joinButtonName", "headingColor", "contextMenu", "game", "counterId", "expansion", "children" ]);
  14193. return r.createElement(f.InputRegistration, {
  14194. debugName: "17d3e621:488:43",
  14195. getInput: this.getInput
  14196. }, r.createElement(s.Card, e.__assign({}, o, {
  14197. forcedActive: this.isContextMenuOpen,
  14198. focusItem: this.focusItem,
  14199. bottom: this.renderBottom(),
  14200. fold: this.renderFold()
  14201. }), this.renderHeading(), n));
  14202. }, n.contextTypes = A.SpartaContext.contextTypes, n.defaultProps = {
  14203. size: h.CardSize.M,
  14204. friends: [],
  14205. custom: !1
  14206. }, e.__decorate([ a.observable ], n.prototype, "isContextMenuOpen", void 0), e.__decorate([ a.computed ], n.prototype, "currentGameId", null),
  14207. n = e.__decorate([ i.observer ], n);
  14208. }(r.Component);
  14209. function R(e) {
  14210. return e.replace(/\s/g, " ");
  14211. }
  14212. t.PlayCard = P;
  14213. }).call(this, n(3));
  14214. }, function(e, t, n) {
  14215. "use strict";
  14216. Object.defineProperty(t, "__esModule", {
  14217. value: !0
  14218. });
  14219. var r = n(1), o = n(8), i = n(509);
  14220. t.PS4StoreContent = function a(e) {
  14221. var t = i.PopupContext.use(), n = o.SpartaContext.use(), a = n.stores, s = n.twinkle;
  14222. return r.useEffect(function() {
  14223. if (s.buildInfo.isPS4) {
  14224. var e = t ? a.ps4StoreIconStore.popup : a.ps4StoreIconStore.content;
  14225. return e.add(), function() {
  14226. return e.remove();
  14227. };
  14228. }
  14229. }, [ t ]), e.children || null;
  14230. };
  14231. }, function(e, t, n) {
  14232. "use strict";
  14233. (function(__) {
  14234. Object.defineProperty(t, "__esModule", {
  14235. value: !0
  14236. });
  14237. var e = n(50), r = n(43), o = n(191), i = n(26), a = n(10), s = n(68), u = n(54), l = n(198), c = n(11), p = n(13), d = n(57), f = n(62);
  14238. function m(t) {
  14239. var n = new Promise(function(t) {
  14240. e.hide(), t();
  14241. });
  14242. p.layoutVisibilityStore.setVisibilities({
  14243. all: !1
  14244. }, function() {
  14245. return n.then(t);
  14246. }, 1);
  14247. }
  14248. function h(e, t) {
  14249. t.withBlackFade ? function n(e, t) {
  14250. e.fadeUntil(function() {
  14251. return o.changeGameViewContentVisibility(!1), new Promise(function(e) {
  14252. return g(t, e);
  14253. });
  14254. });
  14255. }(e, t) : g(t);
  14256. }
  14257. function g(t, n) {
  14258. void 0 === n && (n = function() {}), m(function() {
  14259. t.changeRoute && e.route(t.changeRoute), p.gameStateStoreLoader.get().setWaitingForUserActionToPlay(!1),
  14260. f.frostbite.sendMessage("sparta.gameResume"), n();
  14261. });
  14262. }
  14263. t.delayedCrossFadeOptions = {
  14264. in: {
  14265. duration: 700
  14266. },
  14267. out: {
  14268. duration: 500,
  14269. delay: 700
  14270. }
  14271. }, t.delayedCrossFadeDuration = t.delayedCrossFadeOptions.in.duration + t.delayedCrossFadeOptions.out.duration + t.delayedCrossFadeOptions.out.delay,
  14272. t.hideSparta = m, t.goToGame = function y(e, t) {
  14273. void 0 === t && (t = {}), t.showGameReadyPopup ? u.legacyConfirm(__("ID_SPARTA_TUNGUSKA_PLAYING_JOIN_NOW", !0), __("ID_SPARTA_TUNGUSKA_PLAYING_GAME_READY", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_NO", !0), "gotoGame").then(function() {
  14274. h(e, t);
  14275. }) : h(e, t);
  14276. }, t.quitWithConfirm = function S(e) {
  14277. e && u.legacyConfirm(__("ID_SPARTA_TUNGUSKA_CAMPAIGN_MENU_EXIT_PROMPT", !0), __("ID_SPARTA_TUNGUSKA_CAMPAIGN_MENU_EXIT_TITLE", !0), __("ID_SPARTA_ACTION_YES", !0), __("ID_SPARTA_ACTION_CANCEL", !0), "leaveServer").then(function() {
  14278. return e();
  14279. });
  14280. }, t.toggleQuittingOverlay = function v(e, t) {
  14281. e ? (s.tunguskaEndOfRoundStore.setQuitProgress(!0), d.PopupManager.standardAlertWithOption("", __("ID_SPARTA_GAMESTATE_END_OF_ROUND_STATUS_QUITTING"), {
  14282. useConfirmInput: !1,
  14283. customInput: new c.Input({
  14284. action: function() {
  14285. return s.tunguskaEndOfRoundStore.setQuitProgress(!1);
  14286. },
  14287. key: a.Keys.Decline,
  14288. label: __("ID_SPARTA_ACTION_CANCEL")
  14289. })
  14290. }, void 0, "quitprogresspopup")) : (s.tunguskaEndOfRoundStore.setQuitProgress(!1),
  14291. i.close("quitprogresspopup"), l.nextRoundCountDown.stop(), r.stopGame({}), t && t());
  14292. };
  14293. }).call(this, n(3));
  14294. }, function(e, t, n) {
  14295. "use strict";
  14296. (function(__) {
  14297. Object.defineProperty(t, "__esModule", {
  14298. value: !0
  14299. });
  14300. var e = n(0), r = n(1), o = n(4), i = n(14), a = n(7), s = n(84), u = n(6), l = n(17), c = n(10), p = n(11), d = n(214), f = n(310), m = n(5), h = n(1349), g = n(9), y = n(28), S = n(70), v = n(8), b = {
  14301. in: {
  14302. duration: i.Animation.defaultTweenOptions.duration / 2
  14303. },
  14304. out: {
  14305. duration: i.Animation.defaultTweenOptions.duration / 4
  14306. }
  14307. }, _ = m.StaticStyle.create({
  14308. position: "absolute",
  14309. right: 5,
  14310. bottom: 6,
  14311. opacity: .3,
  14312. width: a.getHeight(2),
  14313. height: a.getHeight(2),
  14314. texture: l.bbOfflineUrl("/sparta/assets/career/icon-lock-white-27283301.png")
  14315. }, "406882d2:48:21");
  14316. t.LockIcon = function(e) {
  14317. var t = e.isSelected, n = e.activeColor, o = e.inactiveColor;
  14318. return r.createElement("surface", {
  14319. style: [ _, {
  14320. color: t ? n : o
  14321. } ]
  14322. });
  14323. }, t.LockIcon.displayName = "LockIcon";
  14324. var T = m.StaticStyle.create({
  14325. flexDirection: "row",
  14326. alignItems: "center",
  14327. position: "absolute",
  14328. right: 5,
  14329. bottom: 6,
  14330. zOffset: 10
  14331. }, "406882d2:351:28"), E = function(n) {
  14332. function _(e, t) {
  14333. var r = n.call(this, e, t) || this;
  14334. return r.sparta = v.SpartaContext.getFromComponent(r), r.focusItem = r.props.focusItem || y.focusSystem.create(r, "awardimage"),
  14335. S.onComponentUpdate(r, function(e) {
  14336. r.focusItem.id = "awarditem_" + e.awardCode, e.input ? r.sparta.stores.inputStore.bindInputToFocusItem(e.input, r.focusItem) : e.onFocus && g.SpartaGlobals.bundleIsPC && r.sparta.stores.inputStore.bindInputToFocusItem(new p.Input({
  14337. action: function() {
  14338. return e.onFocus && e.onFocus(r.props.item, r.props.index);
  14339. },
  14340. label: __("ID_SPARTA_ACTION_SELECT"),
  14341. key: c.Keys.Accept
  14342. }), r.focusItem);
  14343. }), r.props.onFocus && r.focusItem.onFocus(function() {
  14344. y.focusSystem.controllerMode && r.props.onFocus && r.props.onFocus(r.props.item, r.props.index);
  14345. }), r;
  14346. }
  14347. return e.__extends(_, n), Object.defineProperty(_.prototype, "width", {
  14348. get: function() {
  14349. var e = this.props, t = e.style;
  14350. return e.width || (t ? t.getNumericStyle("width", 0) : 0);
  14351. },
  14352. enumerable: !0,
  14353. configurable: !0
  14354. }), _.prototype.renderAward = function(e) {
  14355. var t = m.merge4(h.AwardItemStyle.award, m.DynamicStyle.create({
  14356. color: e ? this.props.activeColor : this.props.inactiveColor,
  14357. width: this.width,
  14358. texture: this.props.awardImage,
  14359. textureAtlas: this.props.atlas,
  14360. textureScale: "rectangle" === this.props.imageType ? .5 : "normal" === this.props.imageType ? 1.2 : void 0
  14361. }, "406882d2:165:34"), this.props.unlocked ? h.AwardItemStyle.unlockedImage : m.emptyStyle, m.DynamicStyle.maybeLegacyStyle(this.props.imageStyle, "406882d2:174:77")), n = h.AwardItemStyle.multiplier(e, void 0 !== this.props.expansion), o = 0;
  14362. return this.props.hideAwardCount || (o = this.props.awardCount ? this.props.awardCount : Math.floor(this.props.dependencyAcquired / this.props.dependencyNeeded)),
  14363. r.createElement("surface", {
  14364. style: h.AwardItemStyle.positionWrapper
  14365. }, r.createElement("surface", {
  14366. style: t
  14367. }), o > 0 && r.createElement(u.Text, {
  14368. value: "x" + o,
  14369. type: "emphasis",
  14370. size: "S",
  14371. style: n
  14372. }));
  14373. }, _.prototype.renderDependency = function(e, t, n) {
  14374. var o = [ h.AwardItemStyle.dependency, {
  14375. texture: e,
  14376. width: this.width
  14377. }, this.props.unlocked ? h.AwardItemStyle.unlockedImage : void 0 ], i = h.AwardItemStyle.multiplier(n, !1);
  14378. return r.createElement("surface", {
  14379. key: "dependency" + t,
  14380. style: h.AwardItemStyle.positionWrapper
  14381. }, r.createElement("surface", {
  14382. style: o
  14383. }), r.createElement(u.Text, {
  14384. value: "x" + this.props.dependencyAcquired,
  14385. size: "XS",
  14386. type: "emphasis",
  14387. style: i
  14388. }));
  14389. }, _.prototype.renderDependencies = function(e) {
  14390. if (!this.props.dependencies) return null;
  14391. for (var t = [], n = 0; n <= this.props.dependencies.length; n++) {
  14392. var o = this.props.dependencies[n];
  14393. o && o.images && o.images.Small && t.push(this.renderDependency(o.images.Small, n, e));
  14394. }
  14395. return r.createElement("surface", null, this.renderSeparator(e), t);
  14396. }, _.prototype.renderSeparator = function(e) {
  14397. return r.createElement("surface", {
  14398. style: h.AwardItemStyle.dependencySeparator(e)
  14399. });
  14400. }, _.prototype.renderProgressBar = function(e) {
  14401. var t = m.emptyStyle;
  14402. return this.props.style && this.width && "number" == typeof this.width && (t = m.DynamicStyle.create({
  14403. width: this.width
  14404. }, "406882d2:242:25")), r.createElement(s.ProgressBar, {
  14405. height: "S",
  14406. completed: e,
  14407. style: m.merge2(h.AwardItemStyle.progressBar, t),
  14408. bgColorStyle: m.DynamicStyle.create({
  14409. backgroundColor: this.props.progressionBackground
  14410. }, "406882d2:249:31")
  14411. });
  14412. }, _.prototype.renderStars = function(e) {
  14413. var t = this.props.star;
  14414. if (!t) return r.createElement("surface", null);
  14415. var n = 100 === t.timesAquired, o = n && !e ? "#ff9900" : e ? "#000000" : "#ffffff", i = m.DynamicStyle.create({
  14416. color: o
  14417. }, "406882d2:264:27"), a = n ? 100 : t.timesAquired;
  14418. return r.createElement("surface", {
  14419. style: h.AwardItemStyle.starContainer
  14420. }, r.createElement("surface", {
  14421. style: [ h.AwardItemStyle.star, i ]
  14422. }), r.createElement(u.Text, {
  14423. style: m.merge2(h.AwardItemStyle.starNumber, i),
  14424. value: "" + a,
  14425. size: "XS"
  14426. }));
  14427. }, _.prototype.renderCheckmark = function(e, t) {
  14428. void 0 === e && (e = this.props.checked);
  14429. var n = m.merge2(h.AwardItemStyle.checkmark, m.DynamicStyle.create({
  14430. color: t ? "#000000" : "#ffffff",
  14431. opacity: i.Animation.tweenSwitch(0, 1, e, b.in, b.out)
  14432. }, "406882d2:277:38"));
  14433. return r.createElement("surface", {
  14434. style: n
  14435. });
  14436. }, _.prototype.renderDependencyIcon = function() {
  14437. var e = this.sparta.stores, t = e.gameStore, n = e.expansionStore, o = e.entitlementStore, i = t.getGame(this.props.gameId), a = i && i.expansionAssets && i.expansionAssets.icons, s = i && i.premiumConfig && i.premiumConfig.premiumIconUrl, u = this.props, c = u.expansion, p = u.icon, m = void 0, y = c && c instanceof f.GameExpansion ? c.license : c;
  14438. if (y && a && a[y]) m = a[y]; else if ("string" == typeof c) {
  14439. var S = n.get(this.props.gameId, g.SpartaGlobals.bundlePlatform);
  14440. if (!S.isLoading && S.value) {
  14441. var v = S.value.getXpack(c);
  14442. !v || o.hasExpansionAccess(this.props.gameId, v.name) || (m = s);
  14443. }
  14444. } else switch (p) {
  14445. case d.DepType.Rank:
  14446. m = l.bbUrl("/sparta/jsclient/builds/assets/icon-rank-dd34db7c.png");
  14447. break;
  14448.  
  14449. case d.DepType.Previous:
  14450. m = l.bbUrl("/sparta/jsclient/builds/assets/icon-prerequisite-62c37f63.png");
  14451. break;
  14452.  
  14453. case d.DepType.Premium:
  14454. m = l.bbUrl("/sparta/jsclient/builds/assets/icon-p-shield-a91bad20.png");
  14455. break;
  14456.  
  14457. default:
  14458. m = void 0;
  14459. }
  14460. return r.createElement("surface", {
  14461. style: [ h.AwardItemStyle.expansionIcon, {
  14462. texture: m || void 0,
  14463. opacity: this.props.unlocked ? 1 : .5
  14464. } ]
  14465. });
  14466. }, _.prototype.renderLockIcon = function(e) {
  14467. var n = this.props.gating;
  14468. return !n || n.canBeEquipped ? null : n.canBeBought ? r.createElement("surface", {
  14469. style: T
  14470. }, r.createElement(u.Text, {
  14471. size: "XXS",
  14472. value: n.price + "",
  14473. color: e ? "#000000" : void 0
  14474. }), r.createElement("surface", {
  14475. style: m.DynamicStyle.create({
  14476. marginLeft: 5,
  14477. width: a.getHeight(2),
  14478. height: a.getHeight(2),
  14479. color: e ? this.props.activeColor : this.props.inactiveColor,
  14480. texture: l.bbUrl("/sparta/assets/career/icon-warbonds-8de69417.png")
  14481. }, "406882d2:363:32")
  14482. })) : r.createElement(t.LockIcon, {
  14483. isSelected: e,
  14484. activeColor: this.props.activeColor,
  14485. inactiveColor: this.props.inactiveColor
  14486. });
  14487. }, Object.defineProperty(_.prototype, "bounds", {
  14488. get: function() {
  14489. return this.focusItem.bounds;
  14490. },
  14491. enumerable: !0,
  14492. configurable: !0
  14493. }), _.prototype.render = function() {
  14494. var t, n = this.props.itemState.active, o = this.focusItem.isFocusedOrHovered, i = h.AwardItemStyle.card(o, n);
  14495. this.props.showLockIcon && !this.props.unlocked && (t = this.renderLockIcon(o));
  14496. var a = void 0 !== this.props.progressPercent ? this.renderProgressBar(this.props.progressPercent) : void 0;
  14497. return r.createElement("surface", e.__assign({
  14498. style: [ h.AwardItemStyle.box, this.props.style ]
  14499. }, this.focusItem.hooks), r.createElement("surface", {
  14500. style: i
  14501. }, this.renderAward(o), this.props.dependencies && this.props.dependencies.length > 0 ? this.renderDependencies(o) : null, this.props.gameId ? this.renderDependencyIcon() : null, this.renderStars(o), this.renderCheckmark(this.props.checked, o), t), a);
  14502. }, _.contextTypes = v.SpartaContext.contextTypes, _.defaultProps = {
  14503. checked: !1,
  14504. stages: [],
  14505. dependencies: [],
  14506. dependencyAcquired: 0,
  14507. dependencyNeeded: 1,
  14508. progressionBackground: "#FFFFFF99"
  14509. }, _ = e.__decorate([ o.observer ], _);
  14510. }(r.Component);
  14511. t.AwardItem = E;
  14512. }).call(this, n(3));
  14513. }, function(e, t, n) {
  14514. "use strict";
  14515. (function(__) {
  14516. Object.defineProperty(t, "__esModule", {
  14517. value: !0
  14518. });
  14519. var e = n(0), r = n(13), o = n(2), i = n(65), a = n(107), s = n(57), u = function() {
  14520. function t() {
  14521. this.isMatchmaking = !1;
  14522. }
  14523. return Object.defineProperty(t.prototype, "isQueued", {
  14524. get: function() {
  14525. return r.gameStateStoreLoader.get().queue && r.gameStateStoreLoader.get().queue.isPending;
  14526. },
  14527. enumerable: !0,
  14528. configurable: !0
  14529. }), Object.defineProperty(t.prototype, "hasServer", {
  14530. get: function() {
  14531. return !!r.gameStateStoreLoader.get().server;
  14532. },
  14533. enumerable: !0,
  14534. configurable: !0
  14535. }), Object.defineProperty(t.prototype, "isInJoinFlow", {
  14536. get: function() {
  14537. return this.isMatchmaking || this.isQueued || this.hasServer;
  14538. },
  14539. enumerable: !0,
  14540. configurable: !0
  14541. }), e.__decorate([ o.observable ], t.prototype, "isMatchmaking", void 0), e.__decorate([ o.computed ], t.prototype, "isQueued", null),
  14542. e.__decorate([ o.computed ], t.prototype, "hasServer", null), e.__decorate([ o.computed ], t.prototype, "isInJoinFlow", null),
  14543. t;
  14544. }();
  14545. function l(e, n, r, o) {
  14546. i.isHostingGame(e) ? t.rimeTransitionState.isMatchmaking ? function u() {
  14547. return s.PopupManager.standardAlert(__("ID_SPARTA_RIME_NO_ACCESS_MATCHMAKING", !0));
  14548. }() : t.rimeTransitionState.isQueued ? function l() {
  14549. return s.PopupManager.standardAlert(__("ID_SPARTA_RIME_NO_ACCESS_QUEUED", !0));
  14550. }() : t.rimeTransitionState.hasServer ? console.warn("RIME screen requested while joining a server, ignored") : n() : a.showNotInHostingGame(r, o);
  14551. }
  14552. t.rimeTransitionState = new u(), r.matchmakingManager.onStart(o.action(function() {
  14553. t.rimeTransitionState.isMatchmaking = !0;
  14554. })), r.matchmakingManager.onFinished(o.action(function() {
  14555. t.rimeTransitionState.isMatchmaking = !1;
  14556. })), t.requiresHostingGame = function c(e, t, n, r) {
  14557. i.isHostingGame(e) ? t() : a.showNotInHostingGame(n || "requiresHostingGame", r);
  14558. }, t.requiresRime = function p(e, t, n, r) {
  14559. l(e, t, n || "requiresRime", r);
  14560. };
  14561. }).call(this, n(3));
  14562. }, function(e, t, n) {
  14563. "use strict";
  14564. Object.defineProperty(t, "__esModule", {
  14565. value: !0
  14566. });
  14567. var r = n(45);
  14568. t.showOptions = r.createTypedAction(), t.showCredits = r.createTypedAction(), t.showBattlepacks = r.createTypedAction(),
  14569. t.showCampaign = r.createTypedAction(), t.showSquadJoin = r.createTypedAction(),
  14570. t.joinGame = r.createTypedAction(), t.purchaseRSP = r.createTypedAction(), t.playTestRange = r.createTypedAction();
  14571. }, function(e, t, n) {
  14572. "use strict";
  14573. Object.defineProperty(t, "__esModule", {
  14574. value: !0
  14575. });
  14576. var r = n(0), o = n(12), i = n(18), a = n(541), s = n(544), u = n(23), l = o.Template("BattleplanStyles"), c = function() {
  14577. function e() {}
  14578. var t;
  14579. return t = e, e.height = o.value(function() {
  14580. return o.Grid.getHeight(18);
  14581. }, "57daaf7b:27:20"), e.heightTall = o.value(function() {
  14582. return o.Grid.getHeight(40);
  14583. }, "57daaf7b:28:24"), e.width = o.value(function() {
  14584. return o.Grid.getWidth(5);
  14585. }, "57daaf7b:29:19"), e.rewardContainer = l.wrap(function() {
  14586. return o.style({
  14587. height: t.height,
  14588. width: t.width,
  14589. marginBottom: o.Grid.spacer()
  14590. }, "57daaf7b:31:29");
  14591. }), e.offerContainer = l.wrap(function() {
  14592. return o.style({
  14593. width: t.width,
  14594. height: t.heightTall,
  14595. marginTop: o.Grid.spacer(3),
  14596. marginBottom: o.Grid.spacer(4)
  14597. }, "57daaf7b:37:28");
  14598. }), e.contentContainer = o.wrap(function() {
  14599. return o.merge(i.CommonStyles.dock, o.style({
  14600. padding: o.Grid.spacer(2),
  14601. flexDirection: "row",
  14602. justifyContent: "flex-end",
  14603. alignItems: "center"
  14604. }, "57daaf7b:46:31"));
  14605. }), e.textContainer = l.wrap(function() {
  14606. return o.style({
  14607. flex: 1,
  14608. flexDirection: "column",
  14609. justifyContent: "flex-end",
  14610. alignItems: "center",
  14611. alignSelf: "flex-end"
  14612. }, "57daaf7b:56:27");
  14613. }), e.text = l.wrap(function() {
  14614. return o.style({
  14615. flex: 1,
  14616. textAlign: "center",
  14617. textAlignForRTL: "center",
  14618. alignSelf: "flex-end",
  14619. zOffset: 5
  14620. }, "57daaf7b:64:18");
  14621. }), e.amountText = l.wrap(function() {
  14622. return o.style({
  14623. position: "absolute",
  14624. top: o.Grid.spacer(2),
  14625. left: o.Grid.spacer(2),
  14626. zOffset: 5
  14627. }, "57daaf7b:72:24");
  14628. }), e.locked = l.wrap(function() {
  14629. return o.style({
  14630. opacity: .33
  14631. }, "57daaf7b:79:20");
  14632. }), e.imageBlur = l.wrap(function() {
  14633. return o.style({
  14634. textureAlign: [ .5, .5 ],
  14635. layer: !0,
  14636. layerBlur: .5,
  14637. layerGrayScale: 1,
  14638. layerBlurPass: 1
  14639. }, "57daaf7b:83:23");
  14640. }), e.imageReward = o.stylefunc(function() {
  14641. return o.merge(i.CommonStyles.dock, o.style({
  14642. textureMode: "contain",
  14643. textureAlign: [ .5, .4 ],
  14644. textureScale: [ .65, .65 ],
  14645. zOffset: 2
  14646. }, "57daaf7b:94:35"));
  14647. }, function(e) {
  14648. return o.dynamicStyle({
  14649. texture: e.texture || void 0
  14650. }, "57daaf7b:102:39");
  14651. }), e.imageRewardFill = o.stylefunc(function() {
  14652. return o.merge(i.CommonStyles.dock, o.style({
  14653. textureMode: "cover",
  14654. zOffset: 2
  14655. }, "57daaf7b:111:35"));
  14656. }, function(e) {
  14657. return o.dynamicStyle({
  14658. texture: e.texture || void 0
  14659. }, "57daaf7b:117:39");
  14660. }), e.imageOffer = o.stylefunc(function() {
  14661. return o.merge(i.CommonStyles.dock, o.style({
  14662. textureMode: "contain",
  14663. zOffset: 2,
  14664. width: t.width - o.Grid.spacer(4),
  14665. height: o.Grid.getHeight(20),
  14666. margin: o.Grid.spacer(2)
  14667. }, "57daaf7b:126:35"));
  14668. }, function(e) {
  14669. return o.dynamicStyle({
  14670. texture: e.texture || void 0
  14671. }, "57daaf7b:135:39");
  14672. }), e.focused = l.wrap(function() {
  14673. return o.style({
  14674. height: o.Grid.spacer(.5),
  14675. position: "absolute",
  14676. bottom: 0,
  14677. left: 0,
  14678. right: 0,
  14679. zOffset: 5,
  14680. backgroundColor: "#ffffff"
  14681. }, "57daaf7b:141:21");
  14682. }), e.premiumIcon = o.stylefunc(function() {
  14683. return o.style({
  14684. position: "absolute",
  14685. top: o.Grid.spacer(2),
  14686. right: o.Grid.spacer(2),
  14687. textureMode: "contain",
  14688. height: 21,
  14689. width: 21,
  14690. zOffset: 5
  14691. }, "57daaf7b:152:14");
  14692. }, function(e) {
  14693. return o.dynamicStyle({
  14694. texture: e.texture || void 0
  14695. }, "57daaf7b:162:39");
  14696. }), e.lock = o.wrap(function() {
  14697. return o.merge(t.locked, o.style({
  14698. position: "absolute",
  14699. top: o.Grid.spacer(2),
  14700. left: o.Grid.spacer(2),
  14701. textureMode: "contain",
  14702. height: 21,
  14703. width: 21,
  14704. texture: o.bbOfflineUrl("/sparta/assets/ui/icon-lock-white-1128e83b.png"),
  14705. zOffset: 5
  14706. }, "57daaf7b:170:43"));
  14707. }), e.offerTitle = l.wrap(function() {
  14708. return o.style({
  14709. textAlign: "center",
  14710. textAlignForRTL: "center",
  14711. alignSelf: "flex-start",
  14712. width: t.width - o.Grid.spacer(4),
  14713. zOffset: 5
  14714. }, "57daaf7b:184:24");
  14715. }), e.claimOfferText = o.wrap(function() {
  14716. return o.merge(t.offerTitle, o.style({
  14717. marginTop: o.Grid.spacer(),
  14718. color: "#ff9900"
  14719. }, "57daaf7b:194:47"));
  14720. }), e.claimText = l.wrap(function() {
  14721. return o.style({
  14722. position: "absolute",
  14723. top: o.Grid.spacer(2),
  14724. left: o.Grid.spacer(2),
  14725. zOffset: 5,
  14726. color: "#ff9900"
  14727. }, "57daaf7b:202:23");
  14728. }), e.claimSpinner = o.wrap(function() {
  14729. return o.merge(i.CommonStyles.dock, o.style({
  14730. height: t.height,
  14731. width: t.width,
  14732. alignItems: "center",
  14733. justifyContent: "center",
  14734. zOffset: 10,
  14735. backgroundColor: "#00000033"
  14736. }, "57daaf7b:212:31"));
  14737. }), e.hoverOverlay = o.wrap(function() {
  14738. return o.merge(i.CommonStyles.blendModeAdditive, o.style({
  14739. position: "absolute",
  14740. top: 0,
  14741. right: 0,
  14742. bottom: 0,
  14743. left: 0,
  14744. backgroundColor: "#00000000",
  14745. layer: !0,
  14746. layerGrabBackground: !0
  14747. }, "57daaf7b:226:44"));
  14748. }), e = t = r.__decorate([ l.style ], e);
  14749. }();
  14750. t.BattleplanRewardStyles = c;
  14751. var p = function() {
  14752. function e() {}
  14753. var t;
  14754. return t = e, e.progressBarSize = o.value(function() {
  14755. return o.Constants.TextSize.M;
  14756. }, "57daaf7b:243:29"), e.progressBarContainer = l.wrap(function() {
  14757. return o.style({
  14758. height: o.Grid.getHeight(6),
  14759. marginTop: o.Grid.spacer(2),
  14760. alignItems: "center"
  14761. }, "57daaf7b:245:34");
  14762. }), e.progressBar = l.wrap(function() {
  14763. return o.style({
  14764. width: c.width,
  14765. height: o.Grid.spacer(),
  14766. marginBottom: o.Grid.spacer()
  14767. }, "57daaf7b:251:25");
  14768. }), e.progressBarBg = l.wrap(function() {
  14769. return o.style({
  14770. backgroundColor: "#ffffff55"
  14771. }, "57daaf7b:257:27");
  14772. }), e.lockContainer = l.wrap(function() {
  14773. return o.style({
  14774. marginBottom: o.Grid.spacer(),
  14775. flexDirection: "row",
  14776. alignItems: "center",
  14777. height: o.Grid.getHeight(2)
  14778. }, "57daaf7b:261:27");
  14779. }), e.labelContainer = l.wrap(function() {
  14780. return o.style({
  14781. width: c.width,
  14782. marginBottom: o.Grid.spacer(),
  14783. flexDirection: "row",
  14784. alignItems: "center",
  14785. justifyContent: "flex-end",
  14786. height: o.Grid.getHeight(2)
  14787. }, "57daaf7b:268:28");
  14788. }), e.labelContainerFirst = o.wrap(function() {
  14789. return o.merge(t.labelContainer, o.style({
  14790. justifyContent: "space-between"
  14791. }, "57daaf7b:279:50"));
  14792. }), e.estimatedContainer = l.wrap(function() {
  14793. return o.style({
  14794. marginBottom: o.Grid.spacer(2),
  14795. flexDirection: "row",
  14796. alignItems: "center",
  14797. justifyContent: "flex-end",
  14798. height: o.Grid.getHeight(2),
  14799. width: c.width
  14800. }, "57daaf7b:286:32");
  14801. }), e.lock = l.wrap(function() {
  14802. return o.style({
  14803. textureMode: "contain",
  14804. marginRight: o.Grid.spacer(),
  14805. width: 21,
  14806. height: 21,
  14807. texture: o.bbOfflineUrl("/sparta/assets/ui/icon-lock-white-1128e83b.png")
  14808. }, "57daaf7b:295:18");
  14809. }), e.container = l.wrap(function() {
  14810. return o.style({
  14811. marginLeft: o.Grid.spacer()
  14812. }, "57daaf7b:303:23");
  14813. }), e = t = r.__decorate([ l.style ], e);
  14814. }();
  14815. t.BattleplanStageStyles = p;
  14816. var d = function() {
  14817. function e() {}
  14818. var t;
  14819. return t = e, e.countdown = l.wrap(function() {
  14820. return o.style({
  14821. position: "absolute",
  14822. top: s.TemplateStyles.dangerZone.top + s.TemplateStyles.passepartout.top + s.TemplateStyles.emptySpace.top + s.TemplateStyles.headerHeight,
  14823. height: o.Grid.spacer(5),
  14824. marginTop: -o.Grid.spacer(7),
  14825. right: s.TemplateStyles.dangerZone.right + s.TemplateStyles.passepartout.right,
  14826. alignItems: "flex-end",
  14827. justifyContent: "flex-end"
  14828. }, "57daaf7b:310:23");
  14829. }), e.content = l.wrap(function() {
  14830. return o.style({
  14831. marginBottom: o.Constants.isPC ? 0 : o.Grid.spacer(2.5),
  14832. marginRight: o.Constants.isPC ? -10 : 0
  14833. }, "57daaf7b:324:21");
  14834. }), e.subtitle = l.wrap(function() {
  14835. return o.style({
  14836. marginTop: o.Grid.spacer(.5),
  14837. color: "#ffffff",
  14838. opacity: .33
  14839. }, "57daaf7b:329:22");
  14840. }), e.stages = l.wrap(function() {
  14841. return o.style({
  14842. flexDirection: "row",
  14843. marginTop: o.Grid.spacer(3),
  14844. marginLeft: -o.Grid.spacer()
  14845. }, "57daaf7b:335:20");
  14846. }), e.separator = l.wrap(function() {
  14847. return o.style({
  14848. width: 8,
  14849. marginRight: o.Grid.getWidth(1) + o.Grid.spacer(),
  14850. marginLeft: o.Constants.isPC ? o.Grid.getWidth(1) : 4,
  14851. color: "#ffffff",
  14852. opacity: .33,
  14853. texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/vline-2e85d023.png")
  14854. }, "57daaf7b:341:23");
  14855. }), e.sideCol = l.wrap(function() {
  14856. return o.style({
  14857. marginRight: o.Constants.isPC ? 0 : o.Grid.getWidth(1),
  14858. marginBottom: -1
  14859. }, "57daaf7b:350:21");
  14860. }), e.sideColRight = o.wrap(function() {
  14861. return o.merge(t.sideCol, i.CommonStyles.alignItemsFlexEnd);
  14862. }), e = t = r.__decorate([ l.style ], e);
  14863. }();
  14864. t.BattleplanStyles = d;
  14865. var f = function() {
  14866. function e() {}
  14867. var t;
  14868. return t = e, e.logoSize = o.value(function() {
  14869. return 60;
  14870. }, "57daaf7b:360:22"), e.logoMarginY = o.value(function() {
  14871. return (i.HomeWidgetStyles.height - t.logoSize) / 2;
  14872. }, "57daaf7b:361:25"), e.container = l.wrap(function() {
  14873. return o.style({
  14874. width: i.HomeWidgetStyles.width,
  14875. height: i.HomeWidgetStyles.height,
  14876. flexDirection: "row",
  14877. alignItems: "center",
  14878. position: "absolute",
  14879. top: -o.Grid.spacer(3),
  14880. left: -o.Grid.spacer(3)
  14881. }, "57daaf7b:363:23");
  14882. }), e.logo = o.multistyle(function(e) {
  14883. return o.style({
  14884. margin: [ t.logoMarginY, o.Grid.spacer(e ? 2 : 1, !1), t.logoMarginY, o.Grid.spacer(e ? 1 : 2, !1) ],
  14885. width: t.logoSize,
  14886. height: t.logoSize,
  14887. textureMode: "contain",
  14888. texture: o.bbOfflineUrl("/sparta/jsclient/builds/assets/menu-icon-light-battle-87bbeafa.png")
  14889. }, "57daaf7b:373:49");
  14890. }), e.textContainer = o.multistyle(function(e) {
  14891. return o.style({
  14892. flex: 1,
  14893. marginRight: e ? void 0 : (i.HomeWidgetStyles.height - t.logoSize) / 2,
  14894. marginLeft: e ? (i.HomeWidgetStyles.height - t.logoSize) / 2 : void 0
  14895. }, "57daaf7b:388:58");
  14896. }), e.progressText = l.wrap(function() {
  14897. return o.style({
  14898. opacity: .66
  14899. }, "57daaf7b:396:26");
  14900. }), e = t = r.__decorate([ l.style ], e);
  14901. }();
  14902. t.BattleplanWidgetStyles = f;
  14903. var m = function() {
  14904. function e() {}
  14905. return e.container = l.wrap(function() {
  14906. return o.style({
  14907. width: o.LayoutBounds.content.width,
  14908. flexDirection: "column",
  14909. alignItems: "center"
  14910. }, "57daaf7b:403:23");
  14911. }), e.header = l.wrap(function() {
  14912. return o.style({
  14913. texture: o.bbOfflineUrl("/engagement/battleplan/battleplan-summary-bfv-logo-ce0daac2.png"),
  14914. width: 518,
  14915. height: 90,
  14916. textureMode: "contain",
  14917. marginBottom: o.Grid.spacer(5)
  14918. }, "57daaf7b:409:20");
  14919. }), e.description = l.wrap(function() {
  14920. return o.style({
  14921. width: o.Grid.getWidth(16),
  14922. color: "#ffffff",
  14923. textAlign: "center",
  14924. textAlignForRTL: "center",
  14925. opacity: .66,
  14926. marginBottom: o.Grid.spacer(5),
  14927. textLineSpacing: o.Constants.isPC ? 30 : 36
  14928. }, "57daaf7b:417:25");
  14929. }), e.button = l.wrap(function() {
  14930. return o.style({
  14931. width: o.Grid.getWidth(8),
  14932. height: o.Grid.getHeight(8),
  14933. marginBottom: o.Grid.spacer(5)
  14934. }, "57daaf7b:427:20");
  14935. }), e.gridHeader = l.wrap(function() {
  14936. return o.style({
  14937. marginTop: o.Grid.spacer(),
  14938. marginBottom: o.Grid.spacer(2)
  14939. }, "57daaf7b:433:24");
  14940. }), e.gridInfo = l.wrap(function() {
  14941. return o.style({
  14942. opacity: .66
  14943. }, "57daaf7b:438:22");
  14944. }), e.grid = o.multistyle(function(e) {
  14945. return o.style({
  14946. width: 3 * (c.width + o.Grid.spacer()),
  14947. justifyContent: e ? "flex-start" : "center",
  14948. flexDirection: "row",
  14949. flexWrap: "wrap"
  14950. }, "57daaf7b:442:55");
  14951. }), e.item = l.wrap(function() {
  14952. return o.style({
  14953. height: c.height,
  14954. width: c.width,
  14955. margin: o.Grid.spacer(.5)
  14956. }, "57daaf7b:451:18");
  14957. }), e.image = o.stylefunc(function() {
  14958. return o.style({
  14959. textureMode: "contain",
  14960. zOffset: 2,
  14961. width: o.Grid.getHeight(24),
  14962. height: o.Grid.getHeight(20),
  14963. margin: [ o.Grid.getHeight(2), 0, o.Grid.getHeight(2), 0 ]
  14964. }, "57daaf7b:458:14");
  14965. }, function(e) {
  14966. return o.dynamicStyle({
  14967. texture: e.texture || void 0
  14968. }, "57daaf7b:466:38");
  14969. }), e = r.__decorate([ l.style ], e);
  14970. }();
  14971. t.LootbagStyles = m;
  14972. var h = function() {
  14973. function e() {}
  14974. var t;
  14975. return t = e, e.container = l.wrap(function() {
  14976. return o.style({
  14977. justifyContent: "center",
  14978. alignItems: "center",
  14979. width: o.LayoutBounds.screen.width,
  14980. height: o.LayoutBounds.screen.height
  14981. }, "57daaf7b:475:23");
  14982. }), e.text = l.wrap(function() {
  14983. return o.style({
  14984. marginBottom: o.Grid.spacer(2),
  14985. width: o.Grid.getWidth(20),
  14986. textAlign: "center",
  14987. textAlignForRTL: "center",
  14988. zOffset: 3
  14989. }, "57daaf7b:482:18");
  14990. }), e.button = l.wrap(function() {
  14991. return o.style({
  14992. width: o.Grid.getWidth(6),
  14993. marginTop: 2 * o.Grid.GUTTER,
  14994. zOffset: 3
  14995. }, "57daaf7b:490:20");
  14996. }), e.imageReward = o.stylefunc(function() {
  14997. return o.style({
  14998. textureMode: "contain",
  14999. zOffset: 3,
  15000. width: 768,
  15001. marginTop: o.Grid.getHeight(4),
  15002. marginBottom: o.Grid.getHeight(4)
  15003. }, "57daaf7b:497:14");
  15004. }, function(e) {
  15005. return o.dynamicStyle({
  15006. texture: e.texture || void 0,
  15007. height: e.large ? 398 : 256
  15008. }, "57daaf7b:505:54");
  15009. }), e.imageOffer = o.stylefunc(function() {
  15010. return o.style({
  15011. textureMode: "contain",
  15012. zOffset: 3,
  15013. width: o.Grid.getHeight(20, !1),
  15014. height: 280,
  15015. marginTop: o.Grid.getHeight(4),
  15016. marginBottom: o.Grid.getHeight(4)
  15017. }, "57daaf7b:513:14");
  15018. }, function(e) {
  15019. return o.dynamicStyle({
  15020. texture: e.texture || void 0
  15021. }, "57daaf7b:522:38");
  15022. }), e.claimTimeline = o.timeline(function() {
  15023. return [ o.trigger(400, "playSound"), o.tween(500, "background", "opacity", 0, 1, 2e3, u.Easing.CubicOut), o.tween(700, "sideFlare", "opacity", 0, 1, 700, u.Easing.CubicOut), o.tween(500, "movingFlare", "opacity", 0, 1, 200, u.Easing.CubicOut), o.tween(500, "movingFlare", "translateX", -2500, 4420, 1e3, u.Easing.CubicInOut, [ o.tween(-200, "movingFlare", "opacity", 1, 0, 200, u.Easing.CubicOut) ]), o.tween(500, "image", "translateY", 50, 0, 500, u.Easing.CubicOut), o.tween(500, "image", "opacity", 0, 1, 500, u.Easing.CubicOut, [ o.tween(0, "bottomFlare", "opacity", 0, 1, 300, u.Easing.CubicOut), o.tween(0, "name", "translateY", 25, 0, 500, u.Easing.CubicOut), o.tween(0, "name", "opacity", 0, 1, 500, u.Easing.CubicOut), o.tween(0, "title", "translateY", 25, 0, 500, u.Easing.CubicOut), o.tween(0, "title", "opacity", 0, 1, 500, u.Easing.CubicOut, [ o.trigger(400, "activateButton"), o.tween(300, "button", "opacity", 0, 1, 500, u.Easing.CubicOut) ]) ]) ];
  15024. }, "57daaf7b:528:27"), e.claimSound = o.value(function() {
  15025. return o.bbOfflineUrl("/sparta/assets/layout/animations/reward_bp-bc6de377.wav");
  15026. }, "57daaf7b:553:24"), e.backgroundTexture = o.value(function() {
  15027. return o.bbOfflineUrl("/sparta/assets/layout/animations/bp_lights-157cd91d.jpg");
  15028. }, "57daaf7b:555:31"), e.movingFlareTexture = o.value(function() {
  15029. return o.bbOfflineUrl("/sparta/assets/layout/animations/player_flare-22159d30.jpg");
  15030. }, "57daaf7b:556:32"), e.sideFlareTexture = o.value(function() {
  15031. return o.bbOfflineUrl("/sparta/assets/layout/animations/flare-side-orange-bp-de741959.jpg");
  15032. }, "57daaf7b:557:30"), e.background = l.wrap(function() {
  15033. return o.style({
  15034. texture: t.backgroundTexture,
  15035. textureMode: "contain",
  15036. blendMode: "screen",
  15037. position: "absolute",
  15038. top: -300,
  15039. bottom: 0,
  15040. left: 0,
  15041. right: -300,
  15042. zOffset: 1
  15043. }, "57daaf7b:561:24");
  15044. }), e.movingFlare = l.wrap(function() {
  15045. return o.style({
  15046. texture: t.movingFlareTexture,
  15047. textureMode: "contain",
  15048. blendMode: "screen",
  15049. position: "absolute",
  15050. width: 2500,
  15051. height: 473,
  15052. left: -2500,
  15053. top: 303,
  15054. zOffset: 2
  15055. }, "57daaf7b:573:25");
  15056. }), e.sideFlare = l.wrap(function() {
  15057. return o.style({
  15058. texture: t.sideFlareTexture,
  15059. textureMode: "cover",
  15060. blendMode: "screen",
  15061. position: "absolute",
  15062. width: 2447,
  15063. height: 922,
  15064. left: -665,
  15065. top: 79,
  15066. zOffset: 2
  15067. }, "57daaf7b:585:23");
  15068. }), e = t = r.__decorate([ l.style ], e);
  15069. }();
  15070. t.BattleplanPopupStyles = h;
  15071. var g = function() {
  15072. function e() {}
  15073. var t;
  15074. return t = e, e.backgroundColor = o.value(function() {
  15075. return "#00000032";
  15076. }, "57daaf7b:600:29"), e.content = o.wrap(function() {
  15077. return o.merge(a.BaseBoxStyles.content, o.style({
  15078. backgroundColor: t.backgroundColor
  15079. }, "57daaf7b:604:35"));
  15080. }), e = t = r.__decorate([ l.style ], e);
  15081. }();
  15082. t.BattleplanDimmedBaseBoxStyles = g;
  15083. var y = function() {
  15084. function e() {}
  15085. var t;
  15086. return t = e, e.maxWidth = o.value(function() {
  15087. return o.Grid.getWidth(7);
  15088. }, "57daaf7b:614:22"), e.checkboxPaddedWidth = o.value(function() {
  15089. return 16 + o.Grid.spacer(2);
  15090. }, "57daaf7b:615:33"), e.container = o.multistyle(function(e) {
  15091. return o.style({
  15092. marginTop: o.Grid.spacer(1.5),
  15093. alignItems: e ? "flex-end" : "flex-start",
  15094. minWidth: o.Grid.getWidth(5),
  15095. maxWidth: t.maxWidth
  15096. }, "57daaf7b:617:54");
  15097. }), e.checkbox = o.multistyle(function(e) {
  15098. return o.style({
  15099. marginRight: e ? void 0 : o.Grid.spacer(2),
  15100. marginLeft: e ? o.Grid.spacer(2) : void 0
  15101. }, "57daaf7b:626:53");
  15102. }), e.title = l.wrap(function() {
  15103. return o.style({
  15104. maxWidth: t.maxWidth - t.checkboxPaddedWidth
  15105. }, "57daaf7b:633:19");
  15106. }), e.subtitle = o.multistyle(function(e) {
  15107. return o.style({
  15108. marginTop: o.Grid.spacer(.5),
  15109. marginLeft: e ? void 0 : t.checkboxPaddedWidth,
  15110. marginRight: e ? t.checkboxPaddedWidth : void 0,
  15111. color: "#ffffff",
  15112. opacity: .33
  15113. }, "57daaf7b:637:53");
  15114. }), e = t = r.__decorate([ l.style ], e);
  15115. }();
  15116. t.DailyTaskStyles = y;
  15117. }, function(e, t, n) {
  15118. var r = n(140);
  15119. e.exports = function(e, t, n) {
  15120. if (r(e), void 0 === t) return e;
  15121. switch (n) {
  15122. case 1:
  15123. return function(n) {
  15124. return e.call(t, n);
  15125. };
  15126.  
  15127. case 2:
  15128. return function(n, r) {
  15129. return e.call(t, n, r);
  15130. };
  15131.  
  15132. case 3:
  15133. return function(n, r, o) {
  15134. return e.call(t, n, r, o);
  15135. };
  15136. }
  15137. return function() {
  15138. return e.apply(t, arguments);
  15139. };
  15140. };
  15141. }, function(e, t, n) {
  15142. var r = n(44);
  15143. e.exports = function(e, t) {
  15144. if (!r(e)) return e;
  15145. var n, o;
  15146. if (t && "function" == typeof (n = e.toString) && !r(o = n.call(e))) return o;
  15147. if ("function" == typeof (n = e.valueOf) && !r(o = n.call(e))) return o;
  15148. if (!t && "function" == typeof (n = e.toString) && !r(o = n.call(e))) return o;
  15149. throw TypeError("Can't convert object to primitive value");
  15150. };
  15151. }, function(e, t) {
  15152. e.exports = function(e, t) {
  15153. return {
  15154. enumerable: !(1 & e),
  15155. configurable: !(2 & e),
  15156. writable: !(4 & e),
  15157. value: t
  15158. };
  15159. };
  15160. }, function(e, t, n) {
  15161. var r = n(452), o = n(344);
  15162. e.exports = Object.keys || function e(t) {
  15163. return r(t, o);
  15164. };
  15165. }, function(e, t) {
  15166. e.exports = function(e) {
  15167. if (null == e) throw TypeError("Can't call method on  " + e);
  15168. return e;
  15169. };
  15170. }, function(e, t, n) {
  15171. var r = n(97), o = n(112), i = n(342)("IE_PROTO"), a = Object.prototype;
  15172. e.exports = Object.getPrototypeOf || function(e) {
  15173. return e = o(e), r(e, i) ? e[i] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? a : null;
  15174. };
  15175. }, function(e, t, n) {
  15176. var r = n(180)("meta"), o = n(44), i = n(97), a = n(66).f, s = 0, u = Object.isExtensible || function() {
  15177. return !0;
  15178. }, l = !n(42)(function() {
  15179. return u(Object.preventExtensions({}));
  15180. }), c = function(e) {
  15181. a(e, r, {
  15182. value: {
  15183. i: "O" + ++s,
  15184. w: {}
  15185. }
  15186. });
  15187. }, p = e.exports = {
  15188. KEY: r,
  15189. NEED: !1,
  15190. fastKey: function(e, t) {
  15191. if (!o(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e;
  15192. if (!i(e, r)) {
  15193. if (!u(e)) return "F";
  15194. if (!t) return "E";
  15195. c(e);
  15196. }
  15197. return e[r].i;
  15198. },
  15199. getWeak: function(e, t) {
  15200. if (!i(e, r)) {
  15201. if (!u(e)) return !0;
  15202. if (!t) return !1;
  15203. c(e);
  15204. }
  15205. return e[r].w;
  15206. },
  15207. onFreeze: function(e) {
  15208. return l && p.NEED && u(e) && !i(e, r) && c(e), e;
  15209. }
  15210. };
  15211. }, function(e, t, n) {
  15212. "use strict";
  15213. Object.defineProperty(t, "__esModule", {
  15214. value: !0
  15215. }), function(e) {
  15216. e.ARABIC = "ar-sa", e.CHINESE_SIMPLIFIED = "zh-cn", e.CHINESE_TRADITIONAL = "zh-tw",
  15217. e.CZECH = "cs-cz", e.ENGLISH = "en-us", e.FRENCH = "fr-fr", e.GERMAN = "de-de",
  15218. e.ITALIAN = "it-it", e.JAPANESE = "ja-jp", e.KOREAN = "ko-kr", e.POLISH = "pl-pl",
  15219. e.PORTUGUESE_BRAZIL = "pt-br", e.RUSSIAN = "ru-ru", e.SPANISH = "es-es", e.SPANISH_MEXICO = "es-mx",
  15220. e.TURKISH = "tr-tr";
  15221. }(t.Locale || (t.Locale = {}));
  15222. }, function(e, t, n) {
  15223. "use strict";
  15224. var r, o, i;
  15225. Object.defineProperty(t, "__esModule", {
  15226. value: !0
  15227. }), function(e) {
  15228. e[e.none = 0] = "none", e[e.modeChanged = 1] = "modeChanged", e[e.disconnected = 2] = "disconnected",
  15229. e[e.backendDisconnected = 3] = "backendDisconnected", e[e.connecting = 4] = "connecting",
  15230. e[e.connectFailed = 5] = "connectFailed", e[e.connectionReady = 6] = "connectionReady",
  15231. e[e.onlineFlowDone = 7] = "onlineFlowDone", e[e.telemetryTokenReceived = 8] = "telemetryTokenReceived",
  15232. e[e.firstPartyConnected = 9] = "firstPartyConnected", e[e.firstPartyDisconnected = 10] = "firstPartyDisconnected",
  15233. e[e.pingValueResolved = 11] = "pingValueResolved", e[e.connectionMessage = 12] = "connectionMessage",
  15234. e[e.qualityOfServiceDone = 13] = "qualityOfServiceDone", e[e.loginAccountFailed = 14] = "loginAccountFailed";
  15235. }(r = t.ConnectionEventType || (t.ConnectionEventType = {})), function(e) {
  15236. e[e.none = 0] = "none", e[e.success = 1] = "success", e[e.authCodeFailed = 2] = "authCodeFailed",
  15237. e[e.connectionFailed = 3] = "connectionFailed", e[e.duplicateLogin = 4] = "duplicateLogin",
  15238. e[e.failure = 5] = "failure", e[e.invalidUser = 6] = "invalidUser", e[e.loginCancelled = 7] = "loginCancelled",
  15239. e[e.missingOnlineAccess = 8] = "missingOnlineAccess", e[e.needUserInteraction = 9] = "needUserInteraction",
  15240. e[e.networkDisconnect = 10] = "networkDisconnect", e[e.networkError = 11] = "networkError",
  15241. e[e.noMultiplayerPrivilege = 12] = "noMultiplayerPrivilege", e[e.originOffline = 13] = "originOffline",
  15242. e[e.originStartupFailed = 14] = "originStartupFailed", e[e.requiredUpdateExists = 15] = "requiredUpdateExists",
  15243. e[e.serverConfiguration = 16] = "serverConfiguration", e[e.serverDisconnect = 17] = "serverDisconnect",
  15244. e[e.serverNotFound = 18] = "serverNotFound", e[e.systemError = 19] = "systemError",
  15245. e[e.timeout = 20] = "timeout", e[e.tooYoung = 21] = "tooYoung", e[e.tooYoungForContent = 22] = "tooYoungForContent",
  15246. e[e.userLost = 23] = "userLost", e[e.originMandatoryUpdate = 24] = "originMandatoryUpdate",
  15247. e[e.noService = 25] = "noService", e[e.originNotLoggedIn = 26] = "originNotLoggedIn",
  15248. e[e.psuLimitExceeded = 27] = "psuLimitExceeded", e[e.accountBanned = 28] = "accountBanned",
  15249. e[e.gameClientVersionMissmatch = 29] = "gameClientVersionMissmatch";
  15250. }(o = t.ConnectionResultType || (t.ConnectionResultType = {})), function(e) {
  15251. e[e.none = 0] = "none", e[e.offline = 1] = "offline", e[e.silentOnline = 2] = "silentOnline",
  15252. e[e.online = 3] = "online";
  15253. }(i = t.PresenceModeType || (t.PresenceModeType = {}));
  15254. var a = function() {
  15255. function e(e) {
  15256. var t = void 0 === e ? {} : e, n = t.customMessage, a = void 0 === n ? "" : n, s = t.eventType, u = void 0 === s ? r.none : s, l = t.mode, c = void 0 === l ? i.none : l, p = t.resultType, d = void 0 === p ? o.none : p, f = t.isQoSReady, m = void 0 !== f && f;
  15257. this.customMessage = a, this.eventType = u, this.resultType = d, this.mode = c,
  15258. this.isQoSReady = m;
  15259. }
  15260. return e.prototype.toString = function() {
  15261. return [ [ "customMessage", this.customMessage ], [ "event", r[this.eventType] ], [ "result", o[this.resultType] ], [ "mode", i[this.mode] ] ].filter(function(e) {
  15262. return null != e[1] && "" !== e[1];
  15263. }).map(function(e) {
  15264. return e[0] + "=" + e[1];
  15265. }).join(", ");
  15266. }, e;
  15267. }();
  15268. t.PresenceStatusMessage = a;
  15269. }, function(e, t, n) {
  15270. "use strict";
  15271. Object.defineProperty(t, "__esModule", {
  15272. value: !0
  15273. });
  15274. var r = n(0);
  15275. !function(e) {
  15276. e.Bool = "bool", e.Scale = "scale", e.Int = "int";
  15277. }(t.FilterOptionType || (t.FilterOptionType = {}));
  15278. var o = function() {
  15279. return function e() {
  15280. this.clonedOptions = [];
  15281. };
  15282. }();
  15283. t.FilterOptionsCategory = o;
  15284. var i = function(e) {
  15285. function t(t, n) {
  15286. void 0 === n && (n = []);
  15287. var r = e.call(this) || this;
  15288. return r.options = t, r.clonedOptions = n, r;
  15289. }
  15290. return r.__extends(t, e), t;
  15291. }(o);
  15292. t.BoolFilterOptionsCategory = i;
  15293. var a = function(e) {
  15294. function t(t) {
  15295. var n = e.call(this) || this;
  15296. return n.options = t, n;
  15297. }
  15298. return r.__extends(t, e), t;
  15299. }(o);
  15300. t.ScalesFilterOptionsCategory = a;
  15301. var s = function(e) {
  15302. function t(t) {
  15303. var n = e.call(this) || this;
  15304. return n.options = t, n;
  15305. }
  15306. return r.__extends(t, e), t;
  15307. }(o);
  15308. t.IntFilterOptionsCategory = s;
  15309. }, function(e, t, n) {
  15310. "use strict";
  15311. var r, o;
  15312. Object.defineProperty(t, "__esModule", {
  15313. value: !0
  15314. }), function(e) {
  15315. e.Error = "error", e.GameEnd = "game_end", e.GameStart = "game_start", e.Login = "login",
  15316. e.Logout = "logout", e.Message = "message", e.MultiplayerJoin = "mp_match_join",
  15317. e.PageView = "page_view", e.SessionStart = "boot_start", e.Transaction = "transaction",
  15318. e.SpartaStart = "game_start", e.SpartaEnd = "game_end", e.Group = "group", e.Friends = "friends",
  15319. e.Challenge = "challenge", e.SocialMessage = "soc_message", e.Registration = "registration",
  15320. e.Milestone = "milestone", e.Survey = "survey", e.UiInteraction = "ui_interaction",
  15321. e.Search = "search";
  15322. }(t.PinEvents || (t.PinEvents = {})), function(e) {
  15323. e[e.Platform = 1] = "Platform", e[e.Game = 2] = "Game", e[e.Language = 3] = "Language",
  15324. e[e.Section = 4] = "Section", e[e.Environment = 5] = "Environment", e[e.BuildNumber = 6] = "BuildNumber",
  15325. e[e.UserSegments = 7] = "UserSegments", e[e.Platoons = 8] = "Platoons", e[e.PlatoonMember = 9] = "PlatoonMember",
  15326. e[e.LocationChangeCause = 10] = "LocationChangeCause", e[e.PremiumUser = 11] = "PremiumUser",
  15327. e[e.ABTestingBucket = 12] = "ABTestingBucket", e[e.CompletedAssignments = 13] = "CompletedAssignments";
  15328. }(r = t.Dimensions || (t.Dimensions = {})), function(e) {
  15329. e[e.RecommendationClick = 1] = "RecommendationClick", e[e.PlatoonCreated = 2] = "PlatoonCreated",
  15330. e[e.PlatoonJoined = 3] = "PlatoonJoined", e[e.PlatoonFirstJoin = 4] = "PlatoonFirstJoin",
  15331. e[e.PlatoonPlay = 5] = "PlatoonPlay", e[e.PlatoonFirstPlay = 6] = "PlatoonFirstPlay";
  15332. }(o = t.Metrics || (t.Metrics = {})), t.MetricsLookup = function i(e) {
  15333. return o[e];
  15334. }, t.DimensionsLookup = function a(e) {
  15335. return r[e];
  15336. };
  15337. }, function(e, t, n) {
  15338. "use strict";
  15339. (function(e, __) {
  15340. Object.defineProperty(t, "__esModule", {
  15341. value: !0
  15342. });
  15343. var r = n(0), o = n(2);
  15344. t.QueueStatus = {
  15345. None: "None",
  15346. Joined: "Joined",
  15347. Queued: "Queued",
  15348. Failed: "Failed",
  15349. Canceled: "Canceled"
  15350. };
  15351. var i = e.get("QueueInfo"), a = function() {
  15352. function e(e) {
  15353. void 0 === e && (e = {}), this.gameId = e.gameId, this.blazeGameId = e.blazeGameId,
  15354. this.status = e.status || t.QueueStatus.None, this.position = e.position ? e.position : -1;
  15355. }
  15356. return e.prototype.getPrettyStatus = function(e) {
  15357. return this.status !== t.QueueStatus.Queued ? "" : -1 === this.position ? __("ID_SPARTA_ONLINE_QUEUE_RESERVING_SLOT") : 0 === this.position && this.status === t.QueueStatus.Queued ? __("ID_SPARTA_ONLINE_QUEUED") : this.position && this.position > 0 && this.status === t.QueueStatus.Queued ? e ? __("ID_SPARTA_ONLINE_QUEUE_POSITION_PREMIUM").replace(/\[\[position]]/, "" + this.position) : __("ID_SPARTA_ONLINE_QUEUE_POSITION").replace(/\[\[position]]/, "" + this.position) : (console.warn("QueueInfo - Impossible to find a queue message, we should never enter this else"),
  15358. "");
  15359. }, Object.defineProperty(e.prototype, "isPending", {
  15360. get: function() {
  15361. return this.status === t.QueueStatus.Queued;
  15362. },
  15363. enumerable: !0,
  15364. configurable: !0
  15365. }), e.prototype.updateQueue = function(e) {
  15366. if (!this.blazeGameId || this.blazeGameId === e.gameId) {
  15367. this.blazeGameId = e.gameId;
  15368. var t = e.queueStatus;
  15369. t && (t.position && (this.position = t.position), t.status && (this.status = t.status.value)),
  15370. i.info("Updated queue status: " + this.status + " gameId=" + this.gameId + " position=" + this.position);
  15371. }
  15372. }, e.prototype.resetQueue = function(e) {
  15373. this.position = -1, this.gameId = e, this.blazeGameId = void 0, this.status = t.QueueStatus.None,
  15374. i.info("Reset queue status: " + this.status + " gameId=" + this.gameId + " position=" + this.position);
  15375. }, r.__decorate([ o.observable ], e.prototype, "gameId", void 0), r.__decorate([ o.observable ], e.prototype, "blazeGameId", void 0),
  15376. r.__decorate([ o.observable ], e.prototype, "status", void 0), r.__decorate([ o.observable ], e.prototype, "position", void 0),
  15377. r.__decorate([ o.computed ], e.prototype, "isPending", null), r.__decorate([ o.action ], e.prototype, "updateQueue", null),
  15378. r.__decorate([ o.action ], e.prototype, "resetQueue", null), e;
  15379. }();
  15380. t.QueueInfo = a;
  15381. }).call(this, n(15), n(3));
  15382. }, function(e, t, n) {
  15383. "use strict";
  15384. (function(__) {
  15385. Object.defineProperty(t, "__esModule", {
  15386. value: !0
  15387. });
  15388. var e, r, o = n(0), i = n(36);
  15389. !function(e) {
  15390. e[e.none = 0] = "none", e[e.unknownError = 1] = "unknownError", e[e.success = 2] = "success",
  15391. e[e.timeOut = 3] = "timeOut", e[e.gameNotFound = 4] = "gameNotFound", e[e.gameFull = 5] = "gameFull",
  15392. e[e.gameNotJoinable = 6] = "gameNotJoinable", e[e.invalidGameState = 7] = "invalidGameState",
  15393. e[e.wrongVersion = 8] = "wrongVersion", e[e.noServerFound = 9] = "noServerFound",
  15394. e[e.playerNotFound = 10] = "playerNotFound", e[e.failedReputationCheck = 11] = "failedReputationCheck",
  15395. e[e.banned = 12] = "banned", e[e.roleFull = 13] = "roleFull", e[e.roleNotAllowed = 14] = "roleNotAllowed",
  15396. e[e.roleCriteriaFailed = 15] = "roleCriteriaFailed", e[e.indirectJoinFail = 16] = "indirectJoinFail",
  15397. e[e.queued = 17] = "queued", e[e.rankCriteriaFailed = 18] = "rankCriteriaFailed",
  15398. e[e.noMultiplayerPrivilege = 19] = "noMultiplayerPrivilege", e[e.alreadyInSession = 20] = "alreadyInSession",
  15399. e[e.inviteExpired = 21] = "inviteExpired", e[e.tooYoung = 22] = "tooYoung", e[e.streamInstallInProgress = 23] = "streamInstallInProgress",
  15400. e[e.reservationAlreadyExists = 24] = "reservationAlreadyExists", e[e.noReservationFound = 25] = "noReservationFound",
  15401. e[e.notPartyLeader = 26] = "notPartyLeader", e[e.restrictedByTrial = 27] = "restrictedByTrial",
  15402. e[e.squadFull = 28] = "squadFull";
  15403. }(e = t.JoinResultType || (t.JoinResultType = {})), function(e) {
  15404. e[e.none = 0] = "none", e[e.joined = 1] = "joined", e[e.joinFailed = 2] = "joinFailed",
  15405. e[e.queued = 3] = "queued", e[e.disconnected = 4] = "disconnected", e[e.gameAttributeUpdated = 5] = "gameAttributeUpdated",
  15406. e[e.playerClaimingReservation = 6] = "playerClaimingReservation", e[e.otherPlayerJoined = 7] = "otherPlayerJoined",
  15407. e[e.otherPlayerLeft = 8] = "otherPlayerLeft";
  15408. }(r = t.JoinEventType || (t.JoinEventType = {}));
  15409. var a = {
  15410. GAMEMANAGER_ERR_INVALID_GAME_ID: e.noServerFound,
  15411. GAMEMANAGER_ERR_GAME_FULL: e.gameFull,
  15412. GAMEMANAGER_ERR_PARTICIPANT_SLOTS_FULL: e.gameFull,
  15413. GAMEMANAGER_ERR_ALREADY_GAME_MEMBER: e.alreadyInSession,
  15414. GAMEMANAGER_ERR_INVALID_GAME_STATE_ACTION: e.invalidGameState,
  15415. GAMEMANAGER_ERR_PLAYER_NOT_FOUND: e.playerNotFound,
  15416. GAMEMANAGER_ERR_PLAYER_BANNED: e.banned,
  15417. GAMEMANAGER_ERR_GAME_ENTRY_CRITERIA_FAILED: e.rankCriteriaFailed,
  15418. GAMEMANAGER_ERR_GAME_PROTOCOL_VERSION_MISMATCH: e.wrongVersion,
  15419. GAMEMANAGER_ERR_SPECTATOR_SLOTS_FULL: e.gameFull,
  15420. GAMEMANAGER_ERR_RESERVATION_ALREADY_EXISTS: e.reservationAlreadyExists,
  15421. GAMEMANAGER_ERR_ROLE_NOT_ALLOWED: e.roleNotAllowed,
  15422. GAMEMANAGER_ERR_ROLE_FULL: e.roleFull,
  15423. GAMEMANAGER_ERR_ROLE_CRITERIA_FAILED: e.roleCriteriaFailed,
  15424. GAMEMANAGER_ERR_FAILED_REPUTATION_CHECK: e.failedReputationCheck
  15425. };
  15426. t.getGatewayJoinError = function s(t) {
  15427. if ("string" == typeof t) {
  15428. var n = a[t];
  15429. if ("number" == typeof n) return n;
  15430. }
  15431. return e.unknownError;
  15432. };
  15433. var u = function(e) {
  15434. function t(n, r, o) {
  15435. var i = e.call(this, n) || this;
  15436. return i.debugMessage = n, i.alertOptions = r, i.customHandler = o, Object.setPrototypeOf(i, t.prototype),
  15437. i;
  15438. }
  15439. return o.__extends(t, e), t;
  15440. }(Error);
  15441. function l(t) {
  15442. var n = "";
  15443. switch (t) {
  15444. case e.success:
  15445. return;
  15446.  
  15447. case e.gameFull:
  15448. n = __("ID_SPARTA_ONLINE_JOIN_SERVER_FULL");
  15449. break;
  15450.  
  15451. case e.timeOut:
  15452. n = __("ID_SPARTA_ONLINE_JOIN_TIMEOUT");
  15453. break;
  15454.  
  15455. case e.gameNotFound:
  15456. n = __("ID_SPARTA_ONLINE_JOIN_GAME_NOT_FOUND");
  15457. break;
  15458.  
  15459. case e.gameNotJoinable:
  15460. n = __("ID_SPARTA_ONLINE_JOIN_SESSION_ALREADY_STARTED");
  15461. break;
  15462.  
  15463. case e.invalidGameState:
  15464. n = __("ID_SPARTA_ONLINE_JOIN_INVALID_GAME_STATE");
  15465. break;
  15466.  
  15467. case e.wrongVersion:
  15468. n = __("ID_SPARTA_ONLINE_DISCONNECT_WRONG_TITLEVERSION"), n += " " + __("ID_SPARTA_ONLINE_PRESENCE_MORE_INFO");
  15469. break;
  15470.  
  15471. case e.noServerFound:
  15472. n = __("ID_SPARTA_ONLINE_JOIN_SERVER_NOT_FOUND");
  15473. break;
  15474.  
  15475. case e.playerNotFound:
  15476. n = __("ID_SPARTA_ONLINE_JOIN_PLAYER_NOT_FOUND");
  15477. break;
  15478.  
  15479. case e.failedReputationCheck:
  15480. n = __("ID_SPARTA_ONLINE_JOIN_FAILED_REPUTATION_CHECK");
  15481. break;
  15482.  
  15483. case e.banned:
  15484. n = i.platformTranslation(__("ID_SPARTA_ONLINE_JOIN_BANNED_PC"), __("ID_SPARTA_ONLINE_JOIN_BANNED_XB1"), __("ID_SPARTA_ONLINE_JOIN_BANNED_PS4"));
  15485. break;
  15486.  
  15487. case e.roleFull:
  15488. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_FULL");
  15489. break;
  15490.  
  15491. case e.roleNotAllowed:
  15492. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_NOT_ALLOWED");
  15493. break;
  15494.  
  15495. case e.roleCriteriaFailed:
  15496. n = __("ID_SPARTA_ONLINE_JOIN_ROLE_CRITERIA_FAILED");
  15497. break;
  15498.  
  15499. case e.indirectJoinFail:
  15500. n = __("ID_SPARTA_ONLINE_JOIN_INDIRECT_JOIN_FAILED");
  15501. break;
  15502.  
  15503. case e.rankCriteriaFailed:
  15504. n = __("ID_SPARTA_ONLINE_JOIN_RANK_CRITERIA_FAILED");
  15505. break;
  15506.  
  15507. case e.noMultiplayerPrivilege:
  15508. n = __("ID_SPARTA_ONLINE_JOIN_NO_MULTIPLAYER_PRIVILEGE");
  15509. break;
  15510.  
  15511. case e.alreadyInSession:
  15512. n = __("ID_SPARTA_ONLINE_JOIN_ALREADY_IN_SESSION");
  15513. break;
  15514.  
  15515. case e.inviteExpired:
  15516. n = __("ID_SPARTA_ONLINE_JOIN_INVITATION_EXPIRED");
  15517. break;
  15518.  
  15519. case e.tooYoung:
  15520. n = __("ID_SPARTA_ONLINE_JOIN_TOO_YOUNG");
  15521. break;
  15522.  
  15523. case e.streamInstallInProgress:
  15524. n = __("ID_SPARTA_ONLINE_JOIN_STREAM_INSTALL_IN_PROGRESS");
  15525. break;
  15526.  
  15527. case e.notPartyLeader:
  15528. n = i.platformTranslation(__("ID_SPARTA_ONLINE_JOIN_NOT_PARTY_LEADER_PC"), __("ID_SPARTA_ONLINE_JOIN_NOT_PARTY_LEADER_XB1"), __("ID_SPARTA_ONLINE_JOIN_NOT_PARTY_LEADER_PS4"));
  15529. break;
  15530.  
  15531. case e.reservationAlreadyExists:
  15532. n = __("ID_SPARTA_ONLINE_JOIN_RESERVATION_ALREADY_EXISTS");
  15533. break;
  15534.  
  15535. case e.noReservationFound:
  15536. n = __("ID_SPARTA_ONLINE_JOIN_NO_RESERVATION_FOUND");
  15537. break;
  15538.  
  15539. case e.squadFull:
  15540. n = __("ID_SPARTA_CASABLANCA_SQUAD_JOIN_FULL");
  15541. break;
  15542.  
  15543. case e.unknownError:
  15544. default:
  15545. n = __("ID_SPARTA_ONLINE_JOIN_UNKNOWN_ERROR").replace("[[errorCode]]", t.toString());
  15546. }
  15547. return n;
  15548. }
  15549. t.JoinMultiplayerError = u, t.getHumanReadableMessage = l;
  15550. var c = function() {
  15551. function t(t) {
  15552. void 0 === t && (t = {}), this.gameId = t.gameId, this.blazeGameId = t.blazeGameId,
  15553. this.customMessage = t.customMessage, this.customTitle = t.customTitle, this.resultType = t.resultType || e.none,
  15554. this.eventType = t.eventType || r.none, this.alertInput = t.alertInput;
  15555. }
  15556. return t.prototype.toHumanReadable = function() {
  15557. return this.customMessage ? this.customMessage : l(this.resultType);
  15558. }, t.prototype.getTitle = function() {
  15559. return this.customTitle ? this.customTitle : __("ID_SPARTA_ONLINE_JOIN_FAILED_TITLE_UPPERCASE");
  15560. }, t;
  15561. }();
  15562. t.JoinMultiplayerServerResult = c;
  15563. }).call(this, n(3));
  15564. }, function(e, t, n) {
  15565. "use strict";
  15566. Object.defineProperty(t, "__esModule", {
  15567. value: !0
  15568. });
  15569. var r = n(62);
  15570. t.frostbiteListenable = function o(e) {
  15571. return {
  15572. listen: function(t) {
  15573. return r.frostbite.registerMessageListener(e, function(e, n) {
  15574. t(n);
  15575. });
  15576. }
  15577. };
  15578. };
  15579. }, function(e, t, n) {
  15580. "use strict";
  15581. Object.defineProperty(t, "__esModule", {
  15582. value: !0
  15583. });
  15584. var r = n(45);
  15585. t.purchasePsPlus = r.createTypedAction(), t.updateRSPTemplate = r.createTypedAction(),
  15586. t.getShortcutKitsByLicense = r.createTypedAction();
  15587. }, function(e, t, n) {
  15588. "use strict";
  15589. Object.defineProperty(t, "__esModule", {
  15590. value: !0
  15591. });
  15592. var r = n(0), o = n(2), i = n(982);
  15593. !function(e) {
  15594. e.RSP = "rsp", e.BATTLEPACKS = "battlepacks", e.GAME = "game", e.DELUXE = "deluxe",
  15595. e.PREMIUM = "premium", e.XPACKS = "xpacks", e.SHORTCUTS = "shortcuts", e.PREORDER = "pre-order",
  15596. e.BETA = "beta", e.CTE = "cte", e.ACCESS = "access", e.PROMOTIONS = "promotions",
  15597. e.CURRENCY = "currency";
  15598. }(t.OfferGroup || (t.OfferGroup = {}));
  15599. var a = function() {
  15600. function e(e, t) {
  15601. this.thriftOffer = e, this.gameId = t;
  15602. }
  15603. return Object.defineProperty(e.prototype, "id", {
  15604. get: function() {
  15605. return this.thriftOffer.ownership.id;
  15606. },
  15607. enumerable: !0,
  15608. configurable: !0
  15609. }), Object.defineProperty(e.prototype, "offerId", {
  15610. get: function() {
  15611. return this.thriftOffer.offerId;
  15612. },
  15613. enumerable: !0,
  15614. configurable: !0
  15615. }), Object.defineProperty(e.prototype, "productId", {
  15616. get: function() {
  15617. return this.thriftOffer.productId;
  15618. },
  15619. enumerable: !0,
  15620. configurable: !0
  15621. }), Object.defineProperty(e.prototype, "displayName", {
  15622. get: function() {
  15623. return this.thriftOffer.displayName;
  15624. },
  15625. enumerable: !0,
  15626. configurable: !0
  15627. }), Object.defineProperty(e.prototype, "state", {
  15628. get: function() {
  15629. return this.thriftOffer.state.name.toLowerCase();
  15630. },
  15631. enumerable: !0,
  15632. configurable: !0
  15633. }), Object.defineProperty(e.prototype, "rawData", {
  15634. get: function() {
  15635. return this.thriftOffer.data;
  15636. },
  15637. enumerable: !0,
  15638. configurable: !0
  15639. }), Object.defineProperty(e.prototype, "data", {
  15640. get: function() {
  15641. if (!this.thriftOffer.data) return {};
  15642. var e = this.thriftOffer.data.split(":"), t = e[0], n = e[1];
  15643. return t && n ? n.split(",").reduce(function(e, t) {
  15644. var n = t.split("="), r = n[0], o = n[1];
  15645. return r && o ? e[r.toLowerCase()] = o : e.type = r.toLowerCase(), e;
  15646. }, {}) : {};
  15647. },
  15648. enumerable: !0,
  15649. configurable: !0
  15650. }), Object.defineProperty(e.prototype, "pinData", {
  15651. get: function() {
  15652. return this.thriftOffer.pinData;
  15653. },
  15654. enumerable: !0,
  15655. configurable: !0
  15656. }), Object.defineProperty(e.prototype, "images", {
  15657. get: function() {
  15658. return this.thriftOffer.images.reduce(function(e, t) {
  15659. return e[t.type] = t.url, e;
  15660. }, {});
  15661. },
  15662. enumerable: !0,
  15663. configurable: !0
  15664. }), Object.defineProperty(e.prototype, "shortDesc", {
  15665. get: function() {
  15666. return this.thriftOffer.description.shortDesc;
  15667. },
  15668. enumerable: !0,
  15669. configurable: !0
  15670. }), Object.defineProperty(e.prototype, "longDesc", {
  15671. get: function() {
  15672. var e = this.thriftOffer.description.longDesc;
  15673. return e ? i.stripHTML(e) : "";
  15674. },
  15675. enumerable: !0,
  15676. configurable: !0
  15677. }), Object.defineProperty(e.prototype, "backgroundUrl", {
  15678. get: function() {
  15679. return this.images.card || this.images.offer || this.images.boxart;
  15680. },
  15681. enumerable: !0,
  15682. configurable: !0
  15683. }), Object.defineProperty(e.prototype, "owned", {
  15684. get: function() {
  15685. return this.thriftOffer.ownership.owned;
  15686. },
  15687. enumerable: !0,
  15688. configurable: !0
  15689. }), Object.defineProperty(e.prototype, "ownershipId", {
  15690. get: function() {
  15691. return this.thriftOffer.ownership.id;
  15692. },
  15693. enumerable: !0,
  15694. configurable: !0
  15695. }), Object.defineProperty(e.prototype, "licenses", {
  15696. get: function() {
  15697. return this.thriftOffer.meta.licenses ? this.thriftOffer.meta.licenses.split(",") : [];
  15698. },
  15699. enumerable: !0,
  15700. configurable: !0
  15701. }), Object.defineProperty(e.prototype, "meta", {
  15702. get: function() {
  15703. return this.thriftOffer.meta;
  15704. },
  15705. enumerable: !0,
  15706. configurable: !0
  15707. }), Object.defineProperty(e.prototype, "type", {
  15708. get: function() {
  15709. return this.thriftOffer.ownership.type.name.toLowerCase();
  15710. },
  15711. enumerable: !0,
  15712. configurable: !0
  15713. }), Object.defineProperty(e.prototype, "group", {
  15714. get: function() {
  15715. return this.thriftOffer.ownership.group;
  15716. },
  15717. enumerable: !0,
  15718. configurable: !0
  15719. }), Object.defineProperty(e.prototype, "isRepurchaseable", {
  15720. get: function() {
  15721. return "bundle" === this.type || "consumable" === this.type;
  15722. },
  15723. enumerable: !0,
  15724. configurable: !0
  15725. }), Object.defineProperty(e.prototype, "price", {
  15726. get: function() {
  15727. return this.thriftOffer.price;
  15728. },
  15729. enumerable: !0,
  15730. configurable: !0
  15731. }), Object.defineProperty(e.prototype, "listPrice", {
  15732. get: function() {
  15733. return this.thriftOffer.listPrice;
  15734. },
  15735. enumerable: !0,
  15736. configurable: !0
  15737. }), Object.defineProperty(e.prototype, "rebatePrice", {
  15738. get: function() {
  15739. return this.thriftOffer.rebatePrice;
  15740. },
  15741. enumerable: !0,
  15742. configurable: !0
  15743. }), Object.defineProperty(e.prototype, "isDiscounted", {
  15744. get: function() {
  15745. return !!this.listPrice && this.price !== this.listPrice;
  15746. },
  15747. enumerable: !0,
  15748. configurable: !0
  15749. }), r.__decorate([ o.computed ], e.prototype, "data", null), r.__decorate([ o.computed ], e.prototype, "images", null),
  15750. r.__decorate([ o.computed ], e.prototype, "longDesc", null), e;
  15751. }();
  15752. t.Offer = a;
  15753. }, function(e, t, n) {
  15754. "use strict";
  15755. Object.defineProperty(t, "__esModule", {
  15756. value: !0
  15757. }), t.milliseconds = function r(e) {
  15758. var t = e.seconds || 0;
  15759. return 60 * (e.minutes || 0) * 1e3 + 1e3 * t;
  15760. };
  15761. }, function(e, t, n) {
  15762. "use strict";
  15763. Object.defineProperty(t, "__esModule", {
  15764. value: !0
  15765. });
  15766. var r = n(1015), o = n(92);
  15767. function i(e) {
  15768. return o.globalScope.__storage[e];
  15769. }
  15770. function a(e, t) {
  15771. var n;
  15772. o.globalScope.__storage = r.update(o.globalScope.__storage, ((n = {})[e] = t, n));
  15773. }
  15774. o.globalScope.__storage = r.immutable({}), t.getStorage = i, t.setStorage = a;
  15775. var s = function() {
  15776. function e(e, t) {
  15777. this.id = e, o.globalScope.__storage.hasOwnProperty(e) || a(e, t || {});
  15778. }
  15779. return e.prototype.get = function(e) {
  15780. return this.getState()[e];
  15781. }, e.prototype.set = function(e, t) {
  15782. var n, o = this.getState(), i = r.update(o, ((n = {})[e] = t, n));
  15783. this.setState(i);
  15784. }, e.prototype.merge = function(e) {
  15785. var t = this.getState(), n = r.update(t, e);
  15786. this.setState(n);
  15787. }, e.prototype.setState = function(e) {
  15788. a(this.id, e);
  15789. }, e.prototype.getState = function() {
  15790. return i(this.id);
  15791. }, e;
  15792. }();
  15793. t.InternalStorage = s;
  15794. }, function(e, t, n) {
  15795. "use strict";
  15796. Object.defineProperty(t, "__esModule", {
  15797. value: !0
  15798. });
  15799. var r = n(0), o = n(1), i = n(194), a = function(e) {
  15800. function t() {
  15801. return null !== e && e.apply(this, arguments) || this;
  15802. }
  15803. return r.__extends(t, e), t.prototype.shouldComponentUpdate = function(e) {
  15804. return this.props.recommendation.imageSlots !== e.recommendation.imageSlots;
  15805. }, t.prototype.render = function() {
  15806. var e = this.props.recommendation.imageSlots;
  15807. if (!e) return null;
  15808. var t = [];
  15809. return e.topLeft && t.push(o.createElement("surface", {
  15810. key: "tl",
  15811. style: i.ImageSlotsStyles.topLeft({
  15812. texture: e.topLeft
  15813. })
  15814. })), e.topRight && t.push(o.createElement("surface", {
  15815. key: "tr",
  15816. style: i.ImageSlotsStyles.topRight({
  15817. texture: e.topRight
  15818. })
  15819. })), o.createElement("surface", {
  15820. style: i.ImageSlotsStyles.container
  15821. }, t);
  15822. }, t;
  15823. }(o.Component);
  15824. t.ImageSlots = a;
  15825. }, function(e, t, n) {
  15826. "use strict";
  15827. (function(__) {
  15828. Object.defineProperty(t, "__esModule", {
  15829. value: !0
  15830. });
  15831. var e = n(0), r = n(1), o = n(89), i = n(25), a = n(11), s = n(10), u = n(34), l = n(35), c = n(139), p = n(48), d = function(t) {
  15832. function n() {
  15833. var e = null !== t && t.apply(this, arguments) || this;
  15834. return e.getInput = function() {
  15835. var t = [];
  15836. return "InGame" === e.state.context.source && e.props.onBackClick && t.push(new a.Input({
  15837. label: __("ID_SPARTA_ACTION_BACK"),
  15838. action: function() {
  15839. return e.props.onBackClick();
  15840. },
  15841. key: s.Keys.Decline,
  15842. visible: !0
  15843. })), t;
  15844. }, e;
  15845. }
  15846. return e.__extends(n, t), n.prototype.render = function() {
  15847. if (this.props.loading) return r.createElement(i.InputRegistration, {
  15848. debugName: "9a41d23c:45:47",
  15849. getInput: this.getInput
  15850. }, r.createElement(p.EmptyState, {
  15851. centerVertically: !0
  15852. }, r.createElement(l.Spinner, {
  15853. large: !0
  15854. })));
  15855. var e = "InGame" === this.state.context.source ? r.createElement("surface", null, this.props.children) : r.createElement(u.Template, {
  15856. tallContent: !0
  15857. }, this.props.children);
  15858. return r.createElement(i.InputRegistration, {
  15859. debugName: "9a41d23c:61:43",
  15860. getInput: this.getInput
  15861. }, e);
  15862. }, n = e.__decorate([ o.subscribeToStores({
  15863. context: c.WwceSupportStore
  15864. }) ], n);
  15865. }(r.Component);
  15866. t.WwceSupportTemplate = d;
  15867. }).call(this, n(3));
  15868. }, function(e, t) {
  15869. var n;
  15870. n = function() {
  15871. return this;
  15872. }();
  15873. try {
  15874. n = n || Function("return this")() || (0, eval)("this");
  15875. } catch (e) {
  15876. "object" == typeof window && (n = window);
  15877. }
  15878. e.exports = n;
  15879. }, function(e, t) {
  15880. var n = 0, r = Math.random();
  15881. e.exports = function(e) {
  15882. return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++n + r).toString(36));
  15883. };
  15884. }, function(e, t) {
  15885. var n = {}.toString;
  15886. e.exports = function(e) {
  15887. return n.call(e).slice(8, -1);
  15888. };
  15889. }, function(e, t, n) {
  15890. var r = n(141), o = Math.max, i = Math.min;
  15891. e.exports = function(e, t) {
  15892. return (e = r(e)) < 0 ? o(e + t, 0) : i(e, t);
  15893. };
  15894. }, function(e, t) {
  15895. e.exports = {};
  15896. }, function(e, t, n) {
  15897. var r = n(452), o = n(344).concat("length", "prototype");
  15898. t.f = Object.getOwnPropertyNames || function e(t) {
  15899. return r(t, o);
  15900. };
  15901. }, function(e, t, n) {
  15902. "use strict";
  15903. var r = n(239), o = {};
  15904. o[n(61)("toStringTag")] = "z", o + "" != "[object z]" && n(102)(Object.prototype, "toString", function e() {
  15905. return "[object " + r(this) + "]";
  15906. }, !0);
  15907. }, function(e, t, n) {
  15908. "use strict";
  15909. Object.defineProperty(t, "__esModule", {
  15910. value: !0
  15911. });
  15912. var r = n(187), o = n(5);
  15913. t.fontConfig = function i() {
  15914. var e = {};
  15915. return Object.keys(r.defaultFonts).forEach(function(t) {
  15916. var n = r.defaultFonts[t];
  15917. n && (e[t] = {
  15918. generic: n
  15919. });
  15920. }), e;
  15921. }(), t.emptyFontConfig = {
  15922. generic: {
  15923. normal: {
  15924. fontName: "",
  15925. fontUrl: "",
  15926. fontStyle: function() {
  15927. return o.emptyStyle;
  15928. }
  15929. },
  15930. emphasis: {
  15931. fontName: "",
  15932. fontUrl: "",
  15933. fontStyle: function() {
  15934. return o.emptyStyle;
  15935. }
  15936. }
  15937. }
  15938. }, t.registerSectionFonts = function a(e, n) {
  15939. Object.keys(n).forEach(function(r) {
  15940. var o = t.fontConfig[r];
  15941. o && (o[e] = n[r]);
  15942. });
  15943. }, t.psnAccountLanguageToSpartaLocale = function s(e) {
  15944. var n = null;
  15945. for (var r in t.fontConfig) if (t.fontConfig.hasOwnProperty(r) && r.split("-")[0] === e) {
  15946. n = r;
  15947. break;
  15948. }
  15949. return n || console.warn("Could not find locale to use for PSN account language: " + e),
  15950. n;
  15951. }, t.commerceLocaleToRegionFontLocale = function u(e) {
  15952. for (var n = e.split("-")[1], r = 0, o = Object.keys(t.fontConfig); r < o.length; r++) {
  15953. var i = o[r];
  15954. if (i.split("-")[1] === n) return i;
  15955. }
  15956. };
  15957. }, function(e, t, n) {
  15958. "use strict";
  15959. Object.defineProperty(t, "__esModule", {
  15960. value: !0
  15961. });
  15962. var r = n(878);
  15963. t.PuristaFonts = {
  15964. normal: r.PuristaNormal,
  15965. emphasis: r.PuristaEmphasis
  15966. }, t.ARHeitiFonts = {
  15967. normal: r.ARHeiti,
  15968. emphasis: r.ARHeiti
  15969. }, t.BFTextRegularSCFonts = {
  15970. normal: r.BFTextRegularSC,
  15971. emphasis: r.BFTextRegularSC
  15972. }, t.DFPSougeitaiFonts = {
  15973. normal: r.DFPSougeitai,
  15974. emphasis: r.DFPSougeitai
  15975. }, t.AsiaJungGothicFonts = {
  15976. normal: r.AsiaJungGothic,
  15977. emphasis: r.AsiaJungGothic
  15978. }, t.FuturaMaxiFonts = {
  15979. normal: r.FuturaMaxiNormal,
  15980. emphasis: r.FuturaMaxiEmphasis
  15981. }, t.FuturaMaxiJPFonts = {
  15982. normal: r.FuturaMaxiJP,
  15983. emphasis: r.FuturaMaxiJP
  15984. }, t.FuturaMaxiTCFonts = {
  15985. normal: r.FuturaMaxiTC,
  15986. emphasis: r.FuturaMaxiTC
  15987. }, t.FuturaMaxiArabicFonts = {
  15988. normal: r.FuturaMaxiArabic,
  15989. emphasis: r.FuturaMaxiArabic
  15990. }, t.defaultFonts = {
  15991. "ar-sa": t.FuturaMaxiArabicFonts,
  15992. "cs-cz": t.PuristaFonts,
  15993. "de-de": t.PuristaFonts,
  15994. "en-us": t.PuristaFonts,
  15995. "es-es": t.PuristaFonts,
  15996. "es-mx": t.PuristaFonts,
  15997. "fr-fr": t.PuristaFonts,
  15998. "it-it": t.PuristaFonts,
  15999. "ja-jp": t.DFPSougeitaiFonts,
  16000. "ko-kr": t.AsiaJungGothicFonts,
  16001. "pl-pl": t.PuristaFonts,
  16002. "pt-br": t.PuristaFonts,
  16003. "ru-ru": t.FuturaMaxiFonts,
  16004. "tr-tr": t.PuristaFonts,
  16005. "zh-tw": t.ARHeitiFonts,
  16006. "zh-cn": t.BFTextRegularSCFonts,
  16007. "zh-sg": t.BFTextRegularSCFonts,
  16008. "zh-hk": t.ARHeitiFonts
  16009. };
  16010. }, function(e, t, n) {
  16011. "use strict";
  16012. Object.defineProperty(t, "__esModule", {
  16013. value: !0
  16014. });
  16015. var r = n(0), o = n(149), i = n(248), a = n(915), s = n(100), u = n(297), l = function() {
  16016. function e(e) {
  16017. void 0 === e && (e = {}), this.friendState = void 0 !== e.friendState ? a.parseFriendState(e.friendState) : void 0,
  16018. this.spartaUserId = new o.SpartaUserId(e.spartaUserId), this.avatarUrl = e.avatarUrl,
  16019. this.name = e.name || "", this.displayName = e.name || "", e.presence instanceof i.UserPresence && e.presence.userId ? this.presence = e.presence : this.presence = new i.UserPresence(r.__assign({}, e.presence, {
  16020. userId: this.id || void 0
  16021. }));
  16022. }
  16023. return Object.defineProperty(e.prototype, "id", {
  16024. get: function() {
  16025. return this.spartaUserId.getPlatformId();
  16026. },
  16027. enumerable: !0,
  16028. configurable: !0
  16029. }), Object.defineProperty(e.prototype, "personaId", {
  16030. get: function() {
  16031. return this.spartaUserId.personaId;
  16032. },
  16033. enumerable: !0,
  16034. configurable: !0
  16035. }), Object.defineProperty(e.prototype, "isFriend", {
  16036. get: function() {
  16037. return void 0 !== this.friendState;
  16038. },
  16039. enumerable: !0,
  16040. configurable: !0
  16041. }), Object.defineProperty(e.prototype, "isPlaying", {
  16042. get: function() {
  16043. return this.presence.state === s.UserPresenceStates.Playing || this.presence.state === s.UserPresenceStates.Joinable;
  16044. },
  16045. enumerable: !0,
  16046. configurable: !0
  16047. }), Object.defineProperty(e.prototype, "isJoinable", {
  16048. get: function() {
  16049. var e = this.presence.server;
  16050. if (e) {
  16051. var t = e.mapMode;
  16052. return !(u.gameModeIsOnboarding(t) || u.gameModeIsCoop(t) || u.gameModeIsRoyale(t));
  16053. }
  16054. return !1;
  16055. },
  16056. enumerable: !0,
  16057. configurable: !0
  16058. }), e.prototype.extend = function() {
  16059. for (var t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
  16060. return new e([ this ].concat(t).reduce(function(e, t) {
  16061. return Object.keys(t).forEach(function(n) {
  16062. var r = t[n];
  16063. void 0 !== r && "" !== r && (e[n] = r);
  16064. }), e;
  16065. }, {}));
  16066. }, e.prototype.updateFrom = function(t) {
  16067. var n = this, o = {}, i = !1;
  16068. return Object.keys(t).forEach(function(e) {
  16069. "spartaUserId" !== e && "presence" !== e && n.hasOwnProperty(e) && t[e] !== n[e] && (o[e] = t[e],
  16070. i = !0);
  16071. }), t.spartaUserId && (t.spartaUserId.personaId && this.spartaUserId.personaId !== t.spartaUserId.personaId || t.spartaUserId.personaName && this.spartaUserId.personaName !== t.spartaUserId.personaName) && (o.spartaUserId = t.spartaUserId,
  16072. i = !0), t.presence && (this.presence.equals(t.presence) || (o.presence = t.presence,
  16073. i = !0)), i ? new e(r.__assign({
  16074. friendState: this.friendState,
  16075. spartaUserId: this.spartaUserId,
  16076. avatarUrl: this.avatarUrl,
  16077. displayName: this.displayName,
  16078. name: this.name,
  16079. presence: this.presence
  16080. }, o)) : this;
  16081. }, e;
  16082. }();
  16083. t.User = l;
  16084. }, function(e, t, n) {
  16085. "use strict";
  16086. (function(e, __) {
  16087. Object.defineProperty(t, "__esModule", {
  16088. value: !0
  16089. });
  16090. var r = n(963), o = n(54), i = n(10), a = n(22), s = n(13), u = n(11), l = n(57);
  16091. function c(t, n, r) {
  16092. var l = s.gameStore.getGame(t), c = l && l.showMissingExpansionsPopupOverride;
  16093. if (c) return new Promise(function(o) {
  16094. e.info("Custom showMissingExpansionsPopupOverride called."), c(t, n, r) && e.info("Custom missing expansion Popup rendered."),
  16095. o();
  16096. });
  16097. var p = "";
  16098. n.length && (p = __("ID_SPARTA_ONLINE_JOIN_MISSING_EXPANSION_MESSAGE") + "\n\n" + n.map(function(e) {
  16099. return "- " + (e.prettyName || e.name);
  16100. }).join("\n")), r.length && (n.length && (p += "\n\n"), p = p + __("ID_SPARTA_ONLINE_JOIN_EXPANSION_NOT_INSTALLED") + "\n\n" + r.map(function(e) {
  16101. return "- " + (e.prettyName || e.name);
  16102. }).join("\n"));
  16103. var d = {
  16104. title: __("ID_SPARTA_ONLINE_JOIN_MISSING_EXPANSION_TITLE"),
  16105. details: p,
  16106. image: l && l.expansionAssets && l.expansionAssets.image,
  16107. label: __("ID_SPARTA_ACTION_GET_EXPANSIONS")
  16108. };
  16109. return o.alertWithImageAndOption(d.details, d.title, d.image || "", new u.Input({
  16110. action: function() {
  16111. a.gotoLocation(l ? l.storeConfig.route + "?tab=expansions" : "");
  16112. },
  16113. key: i.Keys.Option2,
  16114. label: d.label
  16115. }));
  16116. }
  16117. function p(e, t) {
  16118. var n = function o(e, t) {
  16119. return t.filter(function(t) {
  16120. return "DEFAULT" !== t.name && !s.entitlementStore.hasExpansionAccess(e, t.name);
  16121. });
  16122. }(e, t), i = function a(e, t) {
  16123. var n = r.installedExpansions.getMask(e);
  16124. return n ? t.filter(function(e) {
  16125. return !(e.mask & n);
  16126. }) : [];
  16127. }(e, t).filter(function(e) {
  16128. return !n.some(function(t) {
  16129. return t.license === e.license;
  16130. });
  16131. });
  16132. return [ n, i ];
  16133. }
  16134. t.showMissingExpansionsPopup = c, t.showNoPremiumAccessPopup = function d(e, t) {
  16135. var n = __("ID_SPARTA_ONLINE_JOIN_MISSING_PREMIUM_MESSAGE"), r = t.map(function(e) {
  16136. return "- " + e.prettyName;
  16137. }), o = s.gameStore.getGame(e);
  16138. l.PopupManager.standardAlertWithOption(n + "\n\n" + r.join("\n"), __("ID_SPARTA_ONLINE_JOIN_MISSING_PREMIUM_TITLE"), {
  16139. useConfirmInput: !0,
  16140. customInput: new u.Input({
  16141. action: function() {
  16142. a.gotoLocation(o ? o.storeConfig.route + "?tab=premium" : "");
  16143. },
  16144. key: i.Keys.Option2,
  16145. label: __("ID_SPARTA_ACTION_GET_PREMIUM_ACCESS")
  16146. })
  16147. });
  16148. }, t.validateExpansionAccess = function f(e, t, n) {
  16149. var o = s.gameStore.getGame(e);
  16150. if (o && o.validateExpansionAccessOverride) return o.validateExpansionAccessOverride(t, n);
  16151. if ("DEFAULT" === t.name) return !0;
  16152. var i = r.installedExpansions.getMask(e), a = s.entitlementStore.hasExpansionAccess(e, t.name);
  16153. return i ? a && !!(t.mask & i) : a;
  16154. }, t.getMissingExpansions = p, t.validateContentAccessToServerWithPopup = function m(e, t) {
  16155. var n = s.gameStore.getGame(e);
  16156. if (!n || !n.supportsExpansions) return !0;
  16157. var r = p(e, t), o = r[0], i = r[1];
  16158. return !o.length && !i.length || (c(e, o, i), !1);
  16159. };
  16160. }).call(this, n(15), n(3));
  16161. }, function(e, t, n) {
  16162. "use strict";
  16163. Object.defineProperty(t, "__esModule", {
  16164. value: !0
  16165. });
  16166. var r = n(0), o = n(365), i = n(176), a = n(92), s = function(e) {
  16167. function t(t, n) {
  16168. void 0 === n && (n = !1);
  16169. var r = e.call(this, n) || this;
  16170. return t && (r.previousPayload = [ t ]), r.scopeStores = {}, null != t && r.setState(t),
  16171. r;
  16172. }
  16173. return r.__extends(t, e), t.prototype.setState = function(e) {
  16174. e && "object" == typeof e && (e = e), this.state = e, this.publishPayload([ e ]);
  16175. var t = this.constructor.name;
  16176. a.globalScope.__storage && t && -1 === [ "JoinedStore", "Store" ].indexOf(t) && i.setStorage(t, e);
  16177. }, t.prototype.getState = function() {
  16178. return this.state;
  16179. }, t.prototype.scope = function(e) {
  16180. var t = this.scopeStores[e];
  16181. return t || (this.scopeStores[e] = this.transform(function n(e, t) {
  16182. for (var n = 0, r = e; n < r.length; n++) {
  16183. var o = r[n];
  16184. if (!t || !t.hasOwnProperty(o)) return;
  16185. t = t[o];
  16186. }
  16187. return t;
  16188. }.bind(null, [ e ])));
  16189. }, t.prototype.transform = function(e) {
  16190. return u(this, e);
  16191. }, t.prototype.connect = function(e) {
  16192. var t, n = this, r = function() {
  16193. !1 === e(n.getState()) && t.unsubscribe();
  16194. };
  16195. return t = this.subscribe(r), r(), t;
  16196. }, t.prototype.promise = function(e, t) {
  16197. var n = this;
  16198. return void 0 === e && (e = function() {}), void 0 === t && (t = function() {}),
  16199. new Promise(function(r, o) {
  16200. n.connect(function(n) {
  16201. return e(n) ? (r(), !1) : t(n) ? (o(), !1) : void 0;
  16202. });
  16203. });
  16204. }, t;
  16205. }(o.Publisher);
  16206. function u(e, t) {
  16207. var n = new s(t(e.getState()), !0);
  16208. return e.subscribe(function() {
  16209. n.setState(t(e.getState()));
  16210. }), n;
  16211. }
  16212. t.Store = s;
  16213. }, function(e, t, n) {
  16214. "use strict";
  16215. Object.defineProperty(t, "__esModule", {
  16216. value: !0
  16217. });
  16218. var r = n(45);
  16219. t.handleStartScreenClosed = r.createTypedAction(), t.changeGameViewContentVisibility = r.createTypedAction();
  16220. }, function(e, t, n) {
  16221. "use strict";
  16222. Object.defineProperty(t, "__esModule", {
  16223. value: !0
  16224. });
  16225. var r = n(190);
  16226. t.createStore = function o(e) {
  16227. var t = new r.Store();
  16228. for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
  16229. return t.init && t.init.apply(t), t;
  16230. };
  16231. }, function(e, t, n) {
  16232. "use strict";
  16233. Object.defineProperty(t, "__esModule", {
  16234. value: !0
  16235. });
  16236. var r = n(94);
  16237. t.createJoinOptions = function o(e, t, n, i, a) {
  16238. var s = i || {}, u = e.get(), l = u.party;
  16239. if (l && u.canGroupJoin && !a) if (u.isInSquadJoin) {
  16240. if (null == l.id) throw new Error("Attempting to squad join without a party id!");
  16241. s.squad = {
  16242. size: u.squadSize,
  16243. expansionMask: l.expansionMask,
  16244. id: l.id
  16245. };
  16246. } else s.party = u.getJoiningPartyOptions();
  16247. return new r.JoinMultiplayerServerOptions(t, n, s);
  16248. };
  16249. }, function(e, t, n) {
  16250. "use strict";
  16251. Object.defineProperty(t, "__esModule", {
  16252. value: !0
  16253. });
  16254. var r = n(0), o = n(12), i = n(543), a = o.Template("RecommendationStyles"), s = function() {
  16255. function e() {}
  16256. var t;
  16257. return t = e, e.cardPadding = o.value(function() {
  16258. return o.Grid.spacer(3);
  16259. }, "63645039:19:25"), e.iconSize = o.value(function() {
  16260. return o.Grid.spacer(4);
  16261. }, "63645039:20:22"), e.container = o.wrap(function() {
  16262. return o.style({
  16263. position: "absolute",
  16264. top: 0,
  16265. left: 0,
  16266. right: 0,
  16267. bottom: 0,
  16268. zOffset: 15,
  16269. enableMouseEvents: !1
  16270. }, "63645039:22:34");
  16271. }), e.topLeft = o.stylefunc(function() {
  16272. return o.style({
  16273. textureMode: "contain",
  16274. position: "absolute",
  16275. top: 0,
  16276. left: 0,
  16277. textureAlign: [ 0, 0 ],
  16278. height: o.Grid.getHeight(7),
  16279. width: o.Grid.getWidth(3)
  16280. }, "63645039:35:14");
  16281. }, function(e) {
  16282. return o.dynamicStyle({
  16283. texture: e.texture
  16284. }, "63645039:45:39");
  16285. }), e.topRight = o.stylefunc(function() {
  16286. return o.style({
  16287. textureMode: "contain",
  16288. position: "absolute",
  16289. top: 0,
  16290. right: 0,
  16291. height: t.iconSize,
  16292. width: t.iconSize,
  16293. textureAlign: [ 1, 0 ]
  16294. }, "63645039:52:14");
  16295. }, function(e) {
  16296. return o.dynamicStyle({
  16297. texture: e.texture
  16298. }, "63645039:62:39");
  16299. }), e = t = r.__decorate([ a.style ], e);
  16300. }();
  16301. t.ImageSlotsStyles = s;
  16302. var u = function() {
  16303. function e() {}
  16304. var t;
  16305. return t = e, e.textureAtlas = o.value(function() {
  16306. return "SpartaCommonAtlas";
  16307. }, "63645039:71:26"), e.playIconActive = o.value(function() {
  16308. return o.bbOfflineUrl("/sparta/jsclient/builds/assets/play_active-b7f2b328.png");
  16309. }, "63645039:72:28"), e.playIconInactive = o.value(function() {
  16310. return o.bbOfflineUrl("/sparta/jsclient/builds/assets/play-f2e293cf.png");
  16311. }, "63645039:73:30"), e.playIndicator = o.multistyle(function(e) {
  16312. return o.style({
  16313. zOffset: 5,
  16314. textureAtlas: t.textureAtlas,
  16315. textureMode: "none",
  16316. textureAlign: [ .5, .5 ],
  16317. texture: e ? t.playIconActive : t.playIconInactive
  16318. }, "63645039:75:67");
  16319. }), e.playIndicator2 = o.multistyle(function(e) {
  16320. return o.style({
  16321. zOffset: 5,
  16322. textureAtlas: t.textureAtlas,
  16323. textureMode: "none",
  16324. textureAlign: [ .5, .5 ],
  16325. height: .8 * o.Grid.getHeight(i.CardSizeStyles.height[e]),
  16326. texture: o.bbOfflineUrl("/sparta/assets/ui/icons/ui/play_icon-b2acef47.png")
  16327. }, "63645039:85:82");
  16328. }), e = t = r.__decorate([ a.style ], e);
  16329. }();
  16330. t.VideoRecommendationStyles = u;
  16331. var l = function() {
  16332. function e() {}
  16333. return e.priceTag = o.wrap(function() {
  16334. return o.style({
  16335. position: "absolute",
  16336. top: o.Grid.spacer(),
  16337. right: -o.Grid.spacer(3),
  16338. padding: o.Constants.isPC ? [ o.Grid.spacer(), o.Grid.spacer(2), o.Grid.spacer(), o.Grid.spacer(2) ] : [ o.Grid.spacer(2), o.Grid.spacer(4), o.Grid.spacer(2), o.Grid.spacer(4) ],
  16339. backgroundColor: "#000000C8"
  16340. }, "63645039:99:33");
  16341. }), e.discount = o.wrap(function() {
  16342. return o.style({
  16343. opacity: .33,
  16344. flexDirection: "column",
  16345. zOffset: 1
  16346. }, "63645039:111:33");
  16347. }), e.price = o.wrap(function() {
  16348. return o.style({
  16349. zOffset: 1
  16350. }, "63645039:119:30");
  16351. }), e.eyebrow = o.wrap(function() {
  16352. return o.style({
  16353. opacity: .8,
  16354. marginBottom: o.Grid.spacer()
  16355. }, "63645039:125:32");
  16356. }), e.timeLeft = o.wrap(function() {
  16357. return o.style({
  16358. opacity: .8,
  16359. marginTop: o.Grid.spacer()
  16360. }, "63645039:132:33");
  16361. }), e = r.__decorate([ a.style ], e);
  16362. }();
  16363. t.CommerceRecommendationStyles = l;
  16364. var c = function() {
  16365. function e() {}
  16366. return e.eyebrow = a.wrap(function() {
  16367. return o.style({
  16368. opacity: .8,
  16369. marginBottom: o.Grid.spacer()
  16370. }, "63645039:142:21");
  16371. }), e.notEyebrow = a.wrap(function() {
  16372. return o.style({
  16373. opacity: .8,
  16374. marginTop: o.Grid.spacer()
  16375. }, "63645039:147:24");
  16376. }), e.ribbon = a.wrap(function() {
  16377. return o.style({
  16378. position: "absolute",
  16379. top: o.Grid.spacer(),
  16380. right: -o.Grid.spacer(3),
  16381. padding: o.Constants.isPC ? [ o.Grid.spacer(), o.Grid.spacer(2), o.Grid.spacer(), o.Grid.spacer(2) ] : [ o.Grid.spacer(2), o.Grid.spacer(4), o.Grid.spacer(2), o.Grid.spacer(4) ],
  16382. backgroundColor: "#000000C8"
  16383. }, "63645039:152:20");
  16384. }), e.ribbonText = a.wrap(function() {
  16385. return o.style({
  16386. zOffset: 1,
  16387. color: "#ff9900"
  16388. }, "63645039:162:24");
  16389. }), e.container = o.multistyle(function(e) {
  16390. return o.style({
  16391. height: o.Grid.getHeight(i.CardSizeStyles.height[e] + 1),
  16392. width: o.Grid.getWidth(i.CardSizeStyles.width[e]),
  16393. marginRight: o.Grid.spacer(),
  16394. paddingBottom: o.Grid.spacer()
  16395. }, "63645039:167:77");
  16396. }), e.articleTitle = a.wrap(function() {
  16397. return o.style({
  16398. textLetterSpacing: 1
  16399. }, "63645039:176:26");
  16400. }), e.friendsContainer = o.multistyle(function(e) {
  16401. return o.style({
  16402. top: 0,
  16403. right: 0,
  16404. left: 0,
  16405. zOffset: 5,
  16406. alignItems: "flex-end",
  16407. justifyContent: "center",
  16408. flexDirection: "row",
  16409. height: o.Grid.getHeight(i.CardSizeStyles.imageSizes[e] + 2),
  16410. padding: o.Grid.spacer(2)
  16411. }, "63645039:180:84");
  16412. }), e.avatar = a.wrap(function() {
  16413. return o.style({
  16414. backgroundColor: [ 0, 0, 0, 124 ],
  16415. marginRight: o.Grid.spacer(1),
  16416. marginLeft: o.Grid.spacer(1)
  16417. }, "63645039:194:20");
  16418. }), e = r.__decorate([ a.style ], e);
  16419. }();
  16420. t.CommonRecommendationStyles = c;
  16421. }, function(e, t, n) {
  16422. "use strict";
  16423. Object.defineProperty(t, "__esModule", {
  16424. value: !0
  16425. });
  16426. var r = n(98), o = n(9);
  16427. t.commerceFeatureFlags = r.featureFlags.register({
  16428. subscriberAccess: new r.GameFeatureFlag({
  16429. name: "Access_" + o.SpartaGlobals.bundlePlatform.toLowerCase()
  16430. }),
  16431. subscriberAccessPDP: new r.GameFeatureFlag({
  16432. name: "AccessPDP_" + o.SpartaGlobals.bundlePlatform.toLowerCase()
  16433. }),
  16434. premierCTA: new r.GameFeatureFlag({}),
  16435. disableSubscribeAndSell: new r.GameFeatureFlag({})
  16436. });
  16437. }, function(e, t, n) {
  16438. "use strict";
  16439. Object.defineProperty(t, "__esModule", {
  16440. value: !0
  16441. });
  16442. var r = n(0), o = n(1), i = n(2), a = n(4), s = n(59), u = n(295), l = n(14), c = n(5), p = n(37), d = n(148), f = n(90);
  16443. var m = function(e) {
  16444. function t() {
  16445. return null !== e && e.apply(this, arguments) || this;
  16446. }
  16447. return r.__extends(t, e), t.prototype.render = function() {
  16448. return null;
  16449. }, t;
  16450. }(o.Component);
  16451. t.ItemScrollerItem = m;
  16452. var h = function(e) {
  16453. function t() {
  16454. var t = null !== e && e.apply(this, arguments) || this;
  16455. return t.twinkle = d.TwinkleContext.getFromComponent(t), t.keepVisible = !1, t.isHovered = !1,
  16456. t.isVisibleCache = !1, t.opacityTween = l.Animation.componentTween(t, "80649936:136:50", 0, l.Animation.presets.list.scroll),
  16457. t.topTween = l.Animation.componentTween(t, "80649936:137:46", 0), t.initialY = 0,
  16458. t.isInitialYSet = !1, t.indicatorLocalY = 0, t.onMouseDown = function(e) {
  16459. var n = e.surfaces[0], r = t.twinkle.reconciler.getSurfaceById(n.surfaceId);
  16460. if (r) {
  16461. var o = r.getBounds();
  16462. if (o) {
  16463. t.isInitialYSet || (t.isInitialYSet = !0, t.initialY = o.absY + 250);
  16464. var i = (t.props.scrollHeight - t.props.height) / (t.props.height - t.indicatorHeight), a = o.y + n.y;
  16465. t.props.visibleAreaTop;
  16466. t.twinkle.inputHandler.captureMouse(function(e, n) {
  16467. t.indicatorLocalY = o.absY;
  16468. var r = Math.round(n - a), s = (t.initialY + t.props.height) / f.uiState.window.height * i * r;
  16469. t.props.onDragScroll(s), s, a = n;
  16470. }, null);
  16471. }
  16472. }
  16473. }, t.onMouseEnter = i.action(function() {
  16474. return t.isHovered = !0;
  16475. }), t.onMouseLeave = i.action(function() {
  16476. return t.isHovered = !1;
  16477. }), t;
  16478. }
  16479. return r.__extends(t, e), t.prototype.componentDidMount = function() {
  16480. var e = this;
  16481. this.reaction(function() {
  16482. return {
  16483. isVisible: e.isVisible,
  16484. keepVisible: e.keepVisible
  16485. };
  16486. }, function(t) {
  16487. !1 === t.isVisible && !0 === e.isVisibleCache && e.twinkle.buildInfo.isConsole ? (e.keepScrollbarVisible(),
  16488. e.opacityTween.to(1)) : e.opacityTween.to(t.isVisible || t.keepVisible ? 1 : 0),
  16489. e.isVisibleCache = t.isVisible;
  16490. }), this.reaction(function() {
  16491. return e.props.getCurrentTop() / e.props.scrollHeight * e.props.height;
  16492. }, function(t) {
  16493. e.topTween.set(t);
  16494. });
  16495. }, t.prototype.componentWillUnmount = function() {
  16496. clearTimeout(this.keepVisibleTimeout);
  16497. }, t.prototype.keepScrollbarVisible = function() {
  16498. var e = this;
  16499. this.keepVisible = !0, clearTimeout(this.keepVisibleTimeout), this.keepVisibleTimeout = setTimeout(i.action(function() {
  16500. e.keepVisible = !1;
  16501. }), 1e3);
  16502. }, Object.defineProperty(t.prototype, "isVisible", {
  16503. get: function() {
  16504. var e = this.props, t = e.height, n = e.scrollHeight, r = (0, e.getCurrentWidth)();
  16505. return !(t >= n || 0 === r) && (this.props.focusGroup.hasFocusedMember || this.props.isHovered() || this.isHovered);
  16506. },
  16507. enumerable: !0,
  16508. configurable: !0
  16509. }), Object.defineProperty(t.prototype, "indicatorHeight", {
  16510. get: function() {
  16511. var e = this.props, t = e.height, n = (e.left, e.scrollHeight);
  16512. e.getCurrentWidth;
  16513. return t / n * t;
  16514. },
  16515. enumerable: !0,
  16516. configurable: !0
  16517. }), t.prototype.render = function() {
  16518. var e = this.props, t = e.height, n = (e.left, e.scrollHeight), r = ((0, e.getCurrentWidth)(),
  16519. t / n * t), i = c.merge3(c.DynamicStyle.wrapLegacyStyle({
  16520. position: "absolute",
  16521. width: this.twinkle.buildInfo.isPC ? 12 : 4,
  16522. zOffset: 10,
  16523. height: Math.max(10, r),
  16524. backgroundColor: "#ffffffa6"
  16525. }, "80649936:246:30"), this.topTween.getStyleClass("top"), this.opacityTween.getStyleClass("opacity")), a = {
  16526. position: "absolute",
  16527. height: this.props.height,
  16528. width: this.twinkle.buildInfo.isPC ? 12 : 4,
  16529. zOffset: 5,
  16530. backgroundColor: this.isHovered ? "#00000080" : "#00000020",
  16531. top: 0,
  16532. left: this.props.getCurrentWidth() - 16
  16533. };
  16534. return this.isVisible ? o.createElement("surface", {
  16535. style: a,
  16536. onMouseEnter: this.onMouseEnter,
  16537. onMouseLeave: this.onMouseLeave
  16538. }, o.createElement("surface", {
  16539. style: i,
  16540. onMouseDown: this.onMouseDown
  16541. })) : o.createElement("surface", null);
  16542. }, t.contextTypes = d.TwinkleContext.contextTypes, r.__decorate([ i.observable ], t.prototype, "keepVisible", void 0),
  16543. r.__decorate([ i.observable ], t.prototype, "isHovered", void 0), r.__decorate([ i.action ], t.prototype, "keepScrollbarVisible", null),
  16544. r.__decorate([ i.computed ], t.prototype, "isVisible", null), t = r.__decorate([ a.observer ], t);
  16545. }(o.Component);
  16546. t.Scrollbar = h;
  16547. var g = function(e) {
  16548. function t() {
  16549. return null !== e && e.apply(this, arguments) || this;
  16550. }
  16551. return r.__extends(t, e), t.prototype.render = function() {
  16552. for (var e, t = Array.isArray(this.props.children) ? this.props.children : [], n = [], r = 0, i = -1, a = 0; a < t.length; a++) {
  16553. var s = t[a];
  16554. if (s && !Array.isArray(s) && "object" == typeof s) {
  16555. var u = s.props;
  16556. u.initialFocus && (i = a), n.push({
  16557. top: r,
  16558. height: u.height,
  16559. debugName: u.debugName,
  16560. isFocusable: (e = u, !!e.hasOwnProperty("isFocusable") && u.isFocusable),
  16561. render: u.children
  16562. }), r += u.height;
  16563. }
  16564. }
  16565. return o.createElement(y, {
  16566. items: n,
  16567. focusGroup: this.props.focusGroup,
  16568. scrollHeight: r,
  16569. softClip: this.props.softClip,
  16570. scrollToIndex: i,
  16571. debugName: this.props.debugName,
  16572. onScroll: this.props.onScroll,
  16573. height: this.props.height
  16574. });
  16575. }, t;
  16576. }(o.Component);
  16577. t.ItemScroller = g;
  16578. var y = function(e) {
  16579. function t() {
  16580. var t = null !== e && e.apply(this, arguments) || this;
  16581. return t.twinkle = d.TwinkleContext.getFromComponent(t), t.visibleAreaTop = 0, t.visibleAreaWidth = 0,
  16582. t.isHovered = !1, t.groupNavigation = function(e, n) {
  16583. var r = t.getNextFocusIndex(e, n);
  16584. if (-1 === r) return n === p.Direction.Up && t.setVisibleAreaTop(0), {
  16585. result: p.NavigationResultType.STOP
  16586. };
  16587. var o = t.visibleAreaTop, i = o + t.props.height, a = t.props.items[r], s = a.top + a.height;
  16588. a.top < o ? t.setVisibleAreaTop(a.top) : s > i && t.setVisibleAreaTop(s - t.props.height);
  16589. var u = t.focusGroup.members[r];
  16590. return u ? {
  16591. result: p.NavigationResultType.HIT,
  16592. toItem: u
  16593. } : {
  16594. result: p.NavigationResultType.STOP
  16595. };
  16596. }, t.onBounds = function(e) {
  16597. return t.setVisibleAreaWidth(e.width);
  16598. }, t.onMouseEnter = i.action(function() {
  16599. return t.isHovered = !0;
  16600. }), t.onMouseLeave = i.action(function() {
  16601. return t.isHovered = !1;
  16602. }), t.getIsHovered = function() {
  16603. return t.isHovered;
  16604. }, t.getVisibleAreaWidth = function() {
  16605. return t.visibleAreaWidth;
  16606. }, t.getVisibleAreaTop = function() {
  16607. return t.visibleAreaTop;
  16608. }, t.onMouseScroll = function(e) {
  16609. t.props.scrollHeight > t.props.height && t.setVisibleAreaTop(t.visibleAreaTop + -100 * e.scroll);
  16610. }, t.onDragScroll = function(e) {
  16611. t.setVisibleAreaTop(t.visibleAreaTop + e);
  16612. }, t;
  16613. }
  16614. return r.__extends(t, e), t.prototype.setVisibleAreaTop = function(e) {
  16615. var t = this.props.scrollHeight - this.props.height;
  16616. this.visibleAreaTop = Math.max(0, Math.min(t, e)), this.props.onScroll && this.props.onScroll({
  16617. top: 0 === this.visibleAreaTop,
  16618. bottom: this.visibleAreaTop === t
  16619. });
  16620. }, t.prototype.setVisibleAreaWidth = function(e) {
  16621. this.visibleAreaWidth = e;
  16622. }, t.prototype.getNextFocusIndex = function(e, t) {
  16623. for (var n = this.focusGroup.members.indexOf(e), r = t === p.Direction.Down ? 0 : 1, o = this.focusGroup.members.length - (t === p.Direction.Down ? 2 : 1); n >= r && n <= o; ) if (n += t === p.Direction.Down ? 1 : -1,
  16624. this.focusGroup.members[n]) return n;
  16625. return -1;
  16626. }, t.prototype.componentWillMount = function() {
  16627. var e = this;
  16628. this.focusGroup = this.props.focusGroup || this.twinkle.focus.createComponentGroup(this, this.props.debugName),
  16629. this.focusGroup.handleDirection(p.Direction.Down, this.groupNavigation), this.focusGroup.handleDirection(p.Direction.Up, this.groupNavigation),
  16630. this.focusGroup.navigateToGroup = function() {
  16631. for (var t = e.visibleAreaTop, n = t + e.props.height, r = 0; r < e.props.items.length; r++) {
  16632. var o = e.props.items[r], i = o.top + o.height;
  16633. if (o.top > t && o.top < n || i > t && i < n) return {
  16634. result: p.NavigationResultType.HIT,
  16635. toItem: e.focusGroup.members[r]
  16636. };
  16637. }
  16638. return {
  16639. result: p.NavigationResultType.FALLTHROUGH
  16640. };
  16641. }, this.scrollToIndexItem();
  16642. }, t.prototype.componentDidMount = function() {
  16643. if (this.props.scrollToIndex >= 0 && this.focusGroup) {
  16644. var e = this.focusGroup.members[this.props.scrollToIndex];
  16645. e && e.setFocused(p.FocusSource.Auto, !0);
  16646. }
  16647. }, t.prototype.componentWillReceiveProps = function() {
  16648. this.props.scrollToIndex >= 0 ? this.scrollToIndexItem() : this.setVisibleAreaTop(0);
  16649. }, t.prototype.scrollToIndexItem = function() {
  16650. this.props.scrollToIndex >= 0 && this.focusGroup && this.setVisibleAreaTop(this.props.items[this.props.scrollToIndex].top);
  16651. }, t.prototype.renderItem = function(e, t) {
  16652. return e.isFocusable ? o.createElement(s.Focusable, {
  16653. id: e.debugName,
  16654. key: t,
  16655. group: this.focusGroup,
  16656. groupIndex: t
  16657. }, e.render) : e.render("item" + t);
  16658. }, t.prototype.render = function() {
  16659. for (var e = this.props.items, t = [], n = this.visibleAreaTop, r = n + this.props.height, i = -1, a = void 0, s = 0; s < e.length; s++) {
  16660. var u = e[s];
  16661. if (u.top + u.height >= n && u.top <= r) {
  16662. if (!a) if (i > -1) {
  16663. for (var l = i; l < s; l++) t.push(this.renderItem(e[l], l));
  16664. a = e[i];
  16665. } else a = u;
  16666. t.push(this.renderItem(u, s));
  16667. } else if (u.top >= r && (t.push(this.renderItem(u, s)), u.isFocusable)) break;
  16668. u.isFocusable && (i = s);
  16669. }
  16670. var c = a ? a.top - n : 0, p = {
  16671. height: this.props.height,
  16672. layer: !0,
  16673. layerClip: !0
  16674. };
  16675. if (this.props.softClip) {
  16676. var d = this.props.softClip.slice();
  16677. 0 === this.visibleAreaTop && (d[0] = 0), this.visibleAreaTop >= this.props.scrollHeight - this.props.height && (d[2] = 0),
  16678. p.layerSoftClip = d;
  16679. }
  16680. return o.createElement("surface", null, o.createElement("surface", {
  16681. style: p,
  16682. onMouseScroll: this.onMouseScroll,
  16683. onBounds: this.onBounds,
  16684. onMouseEnter: this.onMouseEnter,
  16685. onMouseLeave: this.onMouseLeave
  16686. }, o.createElement("surface", {
  16687. style: {
  16688. top: c
  16689. }
  16690. }, t)), o.createElement(h, {
  16691. focusGroup: this.focusGroup,
  16692. left: 4,
  16693. height: this.props.height,
  16694. scrollHeight: this.props.scrollHeight,
  16695. visibleAreaTop: n,
  16696. isHovered: this.getIsHovered,
  16697. getCurrentWidth: this.getVisibleAreaWidth,
  16698. getCurrentTop: this.getVisibleAreaTop,
  16699. onDragScroll: this.onDragScroll
  16700. }));
  16701. }, t.contextTypes = d.TwinkleContext.contextTypes, r.__decorate([ i.observable ], t.prototype, "visibleAreaTop", void 0),
  16702. r.__decorate([ i.observable ], t.prototype, "visibleAreaWidth", void 0), r.__decorate([ i.observable ], t.prototype, "isHovered", void 0),
  16703. r.__decorate([ i.action ], t.prototype, "setVisibleAreaTop", null), r.__decorate([ i.action ], t.prototype, "setVisibleAreaWidth", null),
  16704. t = r.__decorate([ a.observer ], t);
  16705. }(o.Component);
  16706. t.ItemScrollerInternal = y;
  16707. var S = function(e, t) {
  16708. return o.createElement(m, {
  16709. debugName: e,
  16710. key: e,
  16711. isNonFocusable: !0,
  16712. height: 1
  16713. }, function() {
  16714. return o.createElement(u.Divider, {
  16715. key: e,
  16716. spacing: t
  16717. });
  16718. });
  16719. };
  16720. t.withDividers = function(e, t, n, r) {
  16721. if (void 0 === e && (e = []), void 0 === t && (t = !0), void 0 === n && (n = !0),
  16722. void 0 === r && (r = void 0), 0 === e.length) return [];
  16723. var o = [];
  16724. t && o.push(S("divider:top", r));
  16725. var i = e.length;
  16726. return e.forEach(function(e, t) {
  16727. o.push(e), (t + 1 < i || n) && o.push(S("divider:" + (e.props.debugName || t), r));
  16728. }), o;
  16729. };
  16730. }, function(e, t, n) {
  16731. "use strict";
  16732. (function(e) {
  16733. Object.defineProperty(t, "__esModule", {
  16734. value: !0
  16735. });
  16736. var r, o, i = n(0), a = n(2), s = n(226), u = n(325), l = n(32), c = n(13), p = n(55), d = n(43), f = n(108), m = n(50), h = n(49), g = n(47), y = n(198), S = n(72), v = n(83), b = n(416), _ = n(27), T = n(106), E = n(57), C = n(62), I = e.get("TunguskaOperationFlowState");
  16737. !function(e) {
  16738. e[e.none = 0] = "none", e[e.globe = 1] = "globe", e[e.matchmaking = 2] = "matchmaking",
  16739. e[e.queued = 3] = "queued", e[e.joined = 4] = "joined", e[e.playing = 5] = "playing",
  16740. e[e.eor = 6] = "eor", e[e.error = 7] = "error";
  16741. }(r = t.OperationState || (t.OperationState = {})), function(e) {
  16742. e[e.success = 0] = "success", e[e.failure = 1] = "failure", e[e.timeout = 2] = "timeout",
  16743. e[e.canceled = 3] = "canceled";
  16744. }(o || (o = {}));
  16745. var A = function() {
  16746. function e() {
  16747. this.state = r.none, this.byPassGlobe = !1, this.index = -1, this.debug = !1;
  16748. }
  16749. return e.prototype.log = function(e) {
  16750. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  16751. this.debug && I.log.apply(I, [ e ].concat(t));
  16752. }, e.prototype.setGlobeByPassing = function(e) {
  16753. this.log("setGlobeByPassing to", e), this.byPassGlobe = e;
  16754. }, e.prototype.enter = function(e, t, n) {
  16755. var o = this;
  16756. void 0 === n && (n = null), this.state !== r.globe && (this.log("enter", this.state),
  16757. this.state = r.none, this.index = -1, n ? (n(), this.enterGlobe()) : t.get().checkGameState().then(function() {
  16758. e.flyToClouds(function() {
  16759. e.fadeOutFromWhite(200, function() {
  16760. c.layoutVisibilityStore.setVisibilities({
  16761. all: !1
  16762. }, function() {
  16763. e.setToSpace(), u.globeState.set("Disable", !0);
  16764. });
  16765. }), o.enterGlobe(), C.frostbite.sendMessage("game.enterOperations");
  16766. }, s.CloudTransitionSound.planet);
  16767. }).catch(function(e) {
  16768. t.get().handleChecksError(e);
  16769. }));
  16770. }, e.prototype.enterGlobe = function() {
  16771. this.log("enterGlobe", this.state), this.state = r.globe;
  16772. }, e.prototype.buildFilterForOperationIndex = function(e, t) {
  16773. var n, r = e.find(function(e) {
  16774. return "operationindex" === e.name;
  16775. }), o = r && r.values && r.values.length > 0 ? parseInt(r.values[0], 10) : -1, i = ((n = {})[t.toString()] = v.FilterValue.ON,
  16776. n);
  16777. return this.index = o, -1 === o ? (I.warn("sparta.startMatchmaking event triggered with no valid operationIndex.Falling back to any operation"),
  16778. this.buildFilterForAnyOperation()) : Promise.resolve({
  16779. operationIndex: o,
  16780. gameSizes: i
  16781. });
  16782. }, e.prototype.buildFilterForAnyOperation = function() {
  16783. return this.index = -1, new Promise(function(e, t) {
  16784. var n = {
  16785. game: l.tunguskaGameId,
  16786. gameModeKeys: [ "BT", "BTL" ],
  16787. hasFreemium: c.freemiumStore.canJoinWithFreemium
  16788. };
  16789. _.request("Quickmatch.getExperienceIDs", n).then(function(t) {
  16790. var n = {};
  16791. t.forEach(function(e) {
  16792. n[e] = v.FilterValue.ON;
  16793. }), e({
  16794. gameModes: {
  16795. Breakthrough: "on",
  16796. BreakthroughLarge: "on"
  16797. },
  16798. experiences: n
  16799. });
  16800. }).catch(function(e) {
  16801. t(e);
  16802. });
  16803. });
  16804. }, e.prototype.setMatchmaking = function() {
  16805. this.log("startMatchmaking", this.state), this.state = r.matchmaking;
  16806. }, e.prototype.startMatchmaking = function(e) {
  16807. this.setMatchmaking(), (e.settings.length > 0 ? this.buildFilterForOperationIndex(e.settings, e.gameSize) : this.buildFilterForAnyOperation()).then(function(e) {
  16808. c.matchmakingManager.start(l.tunguskaGameId, new v.GameFilter(Object.assign({}, b.QuickmatchData.baseFilter, e)));
  16809. });
  16810. }, e.prototype.failMatchmaking = function(e) {
  16811. this.log("failMatchmaking", this.state);
  16812. var t = "JoinFailed" === e.blazeSession.status ? o.failure : o.timeout;
  16813. C.frostbite.sendMessage("sparta.matchmakingResult", {
  16814. gameId: l.tunguskaGameId,
  16815. result: t
  16816. });
  16817. }, e.prototype.cancelMatchmaking = function(e) {
  16818. var t = this;
  16819. void 0 === e && (e = !1), e ? C.frostbite.sendMessage("sparta.matchmakingResult", {
  16820. gameId: l.tunguskaGameId,
  16821. result: o.canceled
  16822. }) : c.layoutVisibilityStore.setVisibilities({
  16823. all: !1
  16824. }, function() {
  16825. t.enterGlobe(), C.frostbite.sendMessage("sparta.matchmakingResult", {
  16826. gameId: l.tunguskaGameId,
  16827. result: o.canceled
  16828. });
  16829. });
  16830. }, e.prototype.startPlaying = function() {
  16831. this.log("startPlaying", this.state), this.state = r.playing;
  16832. }, e.prototype.queued = function() {
  16833. this.log("queued", this.state), this.state = r.queued;
  16834. }, e.prototype.join = function() {
  16835. this.log("join", this.state), this.state = r.joined;
  16836. }, e.prototype.endRound = function() {
  16837. this.log("endRound", this.state), this.state === r.playing && (this.state = r.eor);
  16838. }, e.prototype.error = function() {
  16839. this.log("error", this.state), this.state !== r.none && (this.state = r.error);
  16840. }, e.prototype.clear = function() {
  16841. this.log("clear"), this.state = r.none, this.index = -1, u.globeState.set("Sparta"),
  16842. this.setGlobeByPassing(!1);
  16843. }, Object.defineProperty(e.prototype, "isMatchmakingToAny", {
  16844. get: function() {
  16845. return this.state === r.matchmaking && -1 === this.index;
  16846. },
  16847. enumerable: !0,
  16848. configurable: !0
  16849. }), Object.defineProperty(e.prototype, "hideMatchmakingDetails", {
  16850. get: function() {
  16851. return this.state !== r.none && !this.isMatchmakingToAny;
  16852. },
  16853. enumerable: !0,
  16854. configurable: !0
  16855. }), e.prototype.handleMatchmakingError = function(e, n, r) {
  16856. c.presenceStateStore.isReady ? r.error instanceof T.MatchmakingError && E.PopupManager.standardAlert(r.error.description, r.error.title, function() {
  16857. c.layoutVisibilityStore.setVisibilities({
  16858. all: !1
  16859. }, function() {
  16860. t.operationFlow.enter(e, n, function() {
  16861. t.operationFlow.failMatchmaking(r);
  16862. });
  16863. });
  16864. }) : (t.operationFlow.failMatchmaking(r), c.layoutVisibilityStore.setVisibilities({
  16865. all: !0
  16866. }, function() {
  16867. t.operationFlow.clear(), e.landOnEarth(), r.error instanceof T.MatchmakingError && E.PopupManager.standardAlert(r.error.description, r.error.title);
  16868. }));
  16869. }, e.prototype.handleMatchmakingCancelled = function(e, n) {
  16870. var r = !(!n.cancelOptions || !n.cancelOptions.joinNewSession);
  16871. t.operationFlow.cancelMatchmaking(r), r ? (e.setToEarth(), t.operationFlow.clear(),
  16872. m.hide(), m.route(S.GameViewRoute.NONE)) : e.setToSpace();
  16873. }, i.__decorate([ a.observable ], e.prototype, "state", void 0), i.__decorate([ a.observable ], e.prototype, "byPassGlobe", void 0),
  16874. i.__decorate([ a.observable ], e.prototype, "index", void 0), i.__decorate([ a.action ], e.prototype, "setGlobeByPassing", null),
  16875. i.__decorate([ a.action ], e.prototype, "enter", null), i.__decorate([ a.action ], e.prototype, "enterGlobe", null),
  16876. i.__decorate([ a.action ], e.prototype, "buildFilterForOperationIndex", null), i.__decorate([ a.action ], e.prototype, "buildFilterForAnyOperation", null),
  16877. i.__decorate([ a.action ], e.prototype, "setMatchmaking", null), i.__decorate([ a.action ], e.prototype, "failMatchmaking", null),
  16878. i.__decorate([ a.action ], e.prototype, "startPlaying", null), i.__decorate([ a.action ], e.prototype, "queued", null),
  16879. i.__decorate([ a.action ], e.prototype, "join", null), i.__decorate([ a.action ], e.prototype, "endRound", null),
  16880. i.__decorate([ a.action ], e.prototype, "error", null), i.__decorate([ a.action ], e.prototype, "clear", null),
  16881. i.__decorate([ a.computed ], e.prototype, "isMatchmakingToAny", null), i.__decorate([ a.computed ], e.prototype, "hideMatchmakingDetails", null),
  16882. e;
  16883. }();
  16884. function w(e, n, o, i, a) {
  16885. var l = c.gameStateStoreLoader.get().gameMode, p = l && l.length > 0, d = p && l && l.indexOf("Breakthrough") >= 0;
  16886. if (t.operationFlow.state === r.none) {
  16887. if (!d) return;
  16888. t.operationFlow.join();
  16889. }
  16890. switch (n) {
  16891. case h.NavigationStates.LoadingScreen:
  16892. p && !d ? (t.operationFlow.clear(), y.nextRoundCountDown.stop(), m.route(S.GameViewRoute.LOADING),
  16893. m.show()) : t.operationFlow.state !== r.joined && t.operationFlow.state !== r.eor || c.layoutVisibilityStore.setVisibilities({
  16894. all: !1
  16895. }, function() {
  16896. m.route(S.GameViewRoute.PLAYING), m.hide(), t.operationFlow.startPlaying();
  16897. });
  16898. break;
  16899.  
  16900. case h.NavigationStates.InGameMenu:
  16901. t.operationFlow.state !== r.eor && m.route(S.GameViewRoute.PLAYING), a.hide(), e.state !== s.CloudTransitionState.earth && e.setToEarth();
  16902. break;
  16903.  
  16904. case h.NavigationStates.FrontEnd:
  16905. if (t.operationFlow.byPassGlobe) t.operationFlow.clear(); else if (t.operationFlow.state === r.globe) {
  16906. e.setToSpace(s.CloudTransitionState.clouds), u.globeState.set("Sparta"), m.hide(),
  16907. m.route(S.GameViewRoute.NONE);
  16908. var f = o.blockInput();
  16909. setTimeout(function() {
  16910. f(), e.landOnEarth(function() {
  16911. t.operationFlow.clear();
  16912. }, s.CloudTransitionSound.planet);
  16913. }, 600);
  16914. } else t.operationFlow.state === r.matchmaking ? (m.route(S.GameViewRoute.LOADING),
  16915. m.show()) : t.operationFlow.state === r.error ? (t.operationFlow.clear(), e.setToEarth()) : function g(e, n) {
  16916. c.presenceStateStore.isReady && !t.operationFlow.byPassGlobe && c.layoutVisibilityStore.setVisibilities({
  16917. all: !1
  16918. }, function() {
  16919. e.setToSpace(), t.operationFlow.enter(e, n, function() {
  16920. m.route("none"), C.frostbite.sendMessage("game.enterOperations");
  16921. });
  16922. });
  16923. }(e, i);
  16924. }
  16925. }
  16926. function P(e) {
  16927. t.operationFlow.state !== r.none && (c.spartaActivatedStore.navigationState === h.NavigationStates.FrontEnd ? (t.operationFlow.clear(),
  16928. e.setToEarth()) : t.operationFlow.error());
  16929. }
  16930. t.TunguskaOperationFlowState = A, t.operationFlow = new A(), t.startOperationFlow = function R(e, n, o, i) {
  16931. g.enterOperations.listen(function() {
  16932. t.operationFlow.enter(e, o);
  16933. }), d.enterSpecificGameMode.listen(function(n) {
  16934. "operations" === n && t.operationFlow.enter(e, o);
  16935. }), a.reaction(function() {
  16936. return c.gameStateStoreLoader.get().server;
  16937. }, function(e) {
  16938. if (e) {
  16939. var n = e.mapMode.indexOf("Breakthrough") >= 0;
  16940. t.operationFlow.state !== r.none && t.operationFlow.state !== r.queued || !n ? t.operationFlow.state === r.none || n || t.operationFlow.clear() : ("Queued" === c.gameStateStoreLoader.get().queue.status ? t.operationFlow.queued() : t.operationFlow.join(),
  16941. t.operationFlow.setGlobeByPassing(!0));
  16942. }
  16943. }), a.reaction(function() {
  16944. return c.gameStateStoreLoader.get().queue.status;
  16945. }, function(e) {
  16946. t.operationFlow.state === r.joined && "Queued" === e ? (t.operationFlow.queued(),
  16947. i.hide()) : t.operationFlow.state === r.queued && "Cancelled" === e && t.operationFlow.clear();
  16948. }), f.onJoinMultiplayerFailed.listen(function() {
  16949. t.operationFlow.state !== r.none && (i.hide(), t.operationFlow.clear());
  16950. }), f.onMultiplayerServerDisconnection.listen(function(n) {
  16951. n.shouldShowErrorMessage() && t.operationFlow.state !== r.none && (c.spartaActivatedStore.navigationState === h.NavigationStates.FrontEnd ? (t.operationFlow.clear(),
  16952. e.setToEarth()) : t.operationFlow.error());
  16953. }), a.reaction(function() {
  16954. return c.spartaActivatedStore.lastReceived;
  16955. }, function() {
  16956. c.spartaActivatedStore.isSpartaActive && w(e, c.spartaActivatedStore.navigationState, n, o, i);
  16957. }), p.onSignInChange.listen(function() {
  16958. P(e);
  16959. }), C.frostbite.registerMessageListener("sparta.durango.userSwitched", function() {
  16960. P(e);
  16961. }), a.reaction(function() {
  16962. return c.spartaActivatedStore.navigationState;
  16963. }, function(t) {
  16964. w(e, t, n, o, i);
  16965. });
  16966. };
  16967. }).call(this, n(15));
  16968. }, function(e, t, n) {
  16969. "use strict";
  16970. Object.defineProperty(t, "__esModule", {
  16971. value: !0
  16972. });
  16973. var r = n(0), o = n(2), i = function() {
  16974. function e() {
  16975. var e = this;
  16976. this.countdown = 0, this.startTime = 0, this.stop = o.action(function() {
  16977. e.countdown = 0;
  16978. });
  16979. }
  16980. return Object.defineProperty(e.prototype, "timeLeft", {
  16981. get: function() {
  16982. if (this.countdown > 0 && this.nowStore) {
  16983. var e = this.nowStore.seconds - this.startTime;
  16984. return this.countdown - e;
  16985. }
  16986. return 0;
  16987. },
  16988. enumerable: !0,
  16989. configurable: !0
  16990. }), Object.defineProperty(e.prototype, "active", {
  16991. get: function() {
  16992. return this.timeLeft > 0;
  16993. },
  16994. enumerable: !0,
  16995. configurable: !0
  16996. }), e.prototype.start = function(e, t, n) {
  16997. this.nowStore = e, this.startTime = e.seconds, this.countdown = Math.ceil(60 * t + n);
  16998. }, r.__decorate([ o.observable ], e.prototype, "countdown", void 0), r.__decorate([ o.observable ], e.prototype, "startTime", void 0),
  16999. r.__decorate([ o.computed ], e.prototype, "timeLeft", null), r.__decorate([ o.computed ], e.prototype, "active", null),
  17000. r.__decorate([ o.action ], e.prototype, "start", null), e;
  17001. }();
  17002. t.NextRoundCountDown = i, t.nextRoundCountDown = new i();
  17003. }, function(e, t, n) {
  17004. "use strict";
  17005. Object.defineProperty(t, "__esModule", {
  17006. value: !0
  17007. });
  17008. var r = n(0), o = n(30), i = n(1256), a = n(85), s = function(e) {
  17009. function t() {
  17010. var t = null !== e && e.apply(this, arguments) || this;
  17011. return t.fragmentTtl = 3e5, t;
  17012. }
  17013. return r.__extends(t, e), t.prototype.fetch = function(e, t) {
  17014. var n = a.getSummary.request(t);
  17015. e.useClientResult(n, i.BattlepackSummary.fromBackend);
  17016. }, t.prototype.get = function(e) {
  17017. return this.getOrFetchFragment(e, {
  17018. game: e
  17019. });
  17020. }, t.prototype.refetch = function(e) {
  17021. this.refreshFragment(e, {
  17022. game: e
  17023. });
  17024. }, t;
  17025. }(o.FragmentStore);
  17026. t.tunguskaBattlepackSummaryStore = new s();
  17027. }, function(e, t, n) {
  17028. "use strict";
  17029. (function(__) {
  17030. Object.defineProperty(t, "__esModule", {
  17031. value: !0
  17032. });
  17033. var e = n(0), r = n(1), o = n(4), i = n(2), a = n(11), s = n(10), u = n(7), l = n(6), c = n(21), p = n(384), d = n(73), f = n(64), m = n(20), h = n(13), g = n(5), y = n(18), S = n(29), v = n(28), b = g.StaticStyle.wrapLegacyStyleSheet({
  17034. background: {
  17035. position: "absolute",
  17036. bottom: 0,
  17037. left: 0,
  17038. right: 0,
  17039. top: 0,
  17040. backgroundColor: "#ffffff",
  17041. zOffset: 3
  17042. },
  17043. itemBase: {
  17044. paddingLeft: 2 * u.GUTTER,
  17045. paddingRight: 2 * u.GUTTER,
  17046. flex: 1,
  17047. zOffset: 3,
  17048. flexDirection: "row",
  17049. justifyContent: "space-between",
  17050. alignItems: "center",
  17051. backgroundColor: "#ffffff00",
  17052. height: u.getHeight(7)
  17053. },
  17054. itemActive: {
  17055. backgroundColor: "#ffffff33"
  17056. },
  17057. activeIndicator: {
  17058. position: "absolute",
  17059. left: 0,
  17060. top: 0,
  17061. bottom: 0,
  17062. width: 2,
  17063. backgroundColor: "#ffffff",
  17064. zOffset: 2
  17065. },
  17066. mutedText: {
  17067. opacity: .5
  17068. },
  17069. text: {
  17070. marginLeft: u.GUTTER / 2,
  17071. zOffset: 4
  17072. },
  17073. subLabel: {
  17074. marginTop: 3
  17075. }
  17076. }, "09dae019:25:15"), _ = g.StaticStyle.create({
  17077. marginLeft: u.GUTTER / 2,
  17078. zOffset: 4,
  17079. flex: 1
  17080. }, "09dae019:230:36"), T = function(t) {
  17081. function n() {
  17082. var e = null !== t && t.apply(this, arguments) || this;
  17083. return e.getInput = function() {
  17084. return e.props.input ? (Array.isArray(e.props.input) ? e.props.input : [ e.props.input ]).map(function(t) {
  17085. return t.extend({
  17086. action: e.wrapCause(t.action),
  17087. holdAction: e.wrapCause(t.holdAction),
  17088. releaseAction: e.wrapCause(t.releaseAction)
  17089. });
  17090. }) : e.props.onTrigger ? new a.Input({
  17091. label: e.props.inputLabel || __("ID_SPARTA_ACTION_SELECT"),
  17092. action: e.wrapCause(e.props.onTrigger),
  17093. blockInputFor: e.props.blockInputFor ? e.props.blockInputFor : 0,
  17094. key: s.Keys.Accept
  17095. }) : void 0;
  17096. }, e;
  17097. }
  17098. return e.__extends(n, t), n.prototype.componentWillMount = function() {
  17099. this.focusItem = this.props.focusItem || v.focusSystem.create(this, "listitem-" + this.props.label),
  17100. this.focusItem.autoFocusCandidate = !0;
  17101. }, Object.defineProperty(n.prototype, "isFocused", {
  17102. get: function() {
  17103. return this.focusItem.isHovered;
  17104. },
  17105. enumerable: !0,
  17106. configurable: !0
  17107. }), n.prototype.wrapCause = function(e) {
  17108. if (e) return function() {
  17109. h.locationStore.injectLocationCause("listItemInteraction"), e(), h.locationStore.injectLocationCause(void 0);
  17110. };
  17111. }, n.prototype.renderLabel = function(e, t) {
  17112. var n = g.merge3(b.text, this.props.muted ? b.mutedText : g.emptyStyle, g.DynamicStyle.create({
  17113. flex: this.props.labelFlex
  17114. }, "09dae019:166:62")), o = this.props.label || " ";
  17115. if ("function" == typeof o && (o = o(e, t, this.focusItem)), "string" == typeof o) {
  17116. var i = (this.isFocused || this.props.isActive && !0 === this.props.showActiveIndicator) && !this.props.muted ? S.TextType.EMPHASIS : S.TextType.NORMAL, a = t ? f.Direction.Left : f.Direction.Right, s = t ? y.CommonStyles.leftAlignTextRTL : y.CommonStyles.rightAlignTextRTL;
  17117. o = this.props.scrollLabel ? r.createElement(f.Marquee, {
  17118. style: n,
  17119. focusItem: this.focusItem,
  17120. scrollTo: a,
  17121. delay: 100
  17122. }, r.createElement(l.Text, {
  17123. value: this.props.upperCase ? o.toUpperCase() : o,
  17124. size: this.props.fontSize,
  17125. style: y.CommonStyles.flex1,
  17126. color: e,
  17127. type: i
  17128. })) : r.createElement(l.Text, {
  17129. value: this.props.upperCase ? o.toUpperCase() : o,
  17130. size: this.props.fontSize,
  17131. onClick: this.props.onLabelClick,
  17132. color: e,
  17133. type: i,
  17134. style: g.merge2(n, s)
  17135. });
  17136. }
  17137. var u = this.props.icon || (this.isFocused && !this.props.muted ? this.props.focusIcon : this.props.blurIcon);
  17138. if (u) {
  17139. var d = this.props.iconSize ? this.props.iconSize : this.props.fontSize || "M";
  17140. o = r.createElement(p.LabeledIcon, {
  17141. style: g.DynamicStyle.create({
  17142. zOffset: 4,
  17143. opacity: this.props.muted ? .5 : 1
  17144. }, "09dae019:214:28"),
  17145. iconSize: c.LINE_HEIGHTS[d],
  17146. icon: u,
  17147. label: o,
  17148. iconSpace: this.props.iconSpace
  17149. });
  17150. }
  17151. return o;
  17152. }, n.prototype.renderSubLabel = function(t, n) {
  17153. if (this.props.subLabel) {
  17154. var o = _;
  17155. this.props.muted && (o = g.merge2(o, b.mutedText));
  17156. var i = this.props.subLabel;
  17157. if ("function" == typeof this.props.subLabel && (i = this.props.subLabel()), "string" == typeof i) {
  17158. var a = i || " ";
  17159. return r.createElement(f.Marquee, {
  17160. style: o,
  17161. focusItem: this.focusItem,
  17162. scrollTo: n ? f.Direction.Right : f.Direction.Left,
  17163. speed: .3
  17164. }, r.createElement(l.Text, {
  17165. value: a,
  17166. size: "XS",
  17167. color: t,
  17168. style: b.subLabel
  17169. }));
  17170. }
  17171. return "function" != typeof i && i ? (i = r.cloneElement(i, e.__assign({}, i.props, {
  17172. focused: this.isFocused,
  17173. fontColor: this.props.fontColor,
  17174. isArabic: n
  17175. })), r.createElement("surface", {
  17176. onClick: this.props.onSubLabelClick,
  17177. style: {
  17178. zOffset: 4,
  17179. justifyContent: "flex-end"
  17180. }
  17181. }, i)) : void 0;
  17182. }
  17183. }, n.prototype.renderContent = function(e) {
  17184. var t = g.emptyStyle;
  17185. this.props.style instanceof g.StaticStyle && (t = g.DynamicStyle.create({
  17186. height: this.props.style.getNumericStyle("height", u.getHeight(7))
  17187. }, "09dae019:274:26"));
  17188. var n = g.merge3(b.itemBase, e ? b.itemActive : g.emptyStyle, t);
  17189. if (this.props.children) return r.createElement("surface", {
  17190. style: n
  17191. }, this.props.children);
  17192. var o = this.props.fontColor ? this.props.fontColor : "#ffffff", i = void 0 !== this.props.subLabelColor ? this.props.subLabelColor : o;
  17193. this.isFocused && !this.props.muted && (i = o = "#000000");
  17194. var a = e && r.createElement("surface", {
  17195. style: b.activeIndicator
  17196. }), s = !this.props.ignoreRTL && m.isRTLLanguage();
  17197. return r.createElement("surface", null, r.createElement(m.LocaleRearrange, {
  17198. style: n
  17199. }, this.renderLabel(o, s), this.renderSubLabel(i, s)), a);
  17200. }, n.prototype.render = function() {
  17201. var e = this.props.isActive && !this.isFocused && !0 === this.props.showActiveIndicator, t = y.CommonStyles.opacity(this.isFocused && !this.props.muted ? 1 : 0);
  17202. return r.createElement(d.Pressable, {
  17203. input: this.getInput(),
  17204. glow: !0,
  17205. style: this.props.style,
  17206. focusItem: this.focusItem,
  17207. useDefaultInput: !1
  17208. }, r.createElement("surface", {
  17209. style: g.merge2(b.background, t)
  17210. }), this.renderContent(e));
  17211. }, n.defaultProps = {
  17212. fontSize: "S",
  17213. labelFlex: 1,
  17214. upperCase: !0,
  17215. muted: !1
  17216. }, e.__decorate([ i.computed ], n.prototype, "isFocused", null), n = e.__decorate([ o.observer ], n);
  17217. }(r.Component);
  17218. t.ListItem = T;
  17219. }).call(this, n(3));
  17220. }, function(e, t, n) {
  17221. "use strict";
  17222. Object.defineProperty(t, "__esModule", {
  17223. value: !0
  17224. });
  17225. var r = n(0), o = n(1), i = n(13), a = n(4), s = n(24), u = n(14), l = n(7), c = n(191), p = n(226), d = n(1274), f = n(134), m = n(5), h = n(9), g = n(18), y = n(8), S = l.getHeight(11, !1), v = l.getHeight(7, !1), b = l.getHeight(h.SpartaGlobals.bundleIsPC ? 9 : 3, !1), _ = s.footer.top - s.dangerZoneSize.height - b, T = Math.max(1, (s.screen.height - _) / 2), E = v + b, C = {
  17226. duration: 100
  17227. }, I = {
  17228. duration: 50
  17229. }, A = {
  17230. header: {
  17231. rotate: {
  17232. duration: 200,
  17233. delay: 200
  17234. },
  17235. opacity: {
  17236. duration: 100,
  17237. delay: 200
  17238. }
  17239. },
  17240. inputBar: {
  17241. translation: {
  17242. duration: 150
  17243. },
  17244. opacity: {
  17245. duration: 100
  17246. }
  17247. }
  17248. }, w = m.StaticStyle.wrapLegacyStyleSheet({
  17249. container: r.__assign({
  17250. zOffset: 11e3
  17251. }, s.screen.style, {
  17252. position: "absolute"
  17253. }),
  17254. containerForeground: r.__assign({}, {
  17255. position: "absolute",
  17256. top: 0,
  17257. right: 0,
  17258. bottom: 0,
  17259. left: 0
  17260. }, {
  17261. zOffset: 20,
  17262. layer: !0,
  17263. layerGrabBackground: !1
  17264. }),
  17265. header: {
  17266. padding: [ s.dangerZoneSize.height, s.dangerZoneSize.width, s.dangerZoneSize.height, s.dangerZoneSize.width ],
  17267. flexDirection: "row",
  17268. zOffset: 1,
  17269. height: S,
  17270. justifyContent: "center",
  17271. pivot: [ 0, S / 4, 0 ],
  17272. alignItems: "center"
  17273. },
  17274. column: {
  17275. flex: 1,
  17276. justifyContent: "center",
  17277. zOffset: 1
  17278. },
  17279. content: {
  17280. justifyContent: "center",
  17281. flex: 1,
  17282. padding: [ Math.floor(s.dangerZoneSize.height / 2), s.dangerZoneSize.width, s.dangerZoneSize.height + E, s.dangerZoneSize.width ]
  17283. },
  17284. footer: {
  17285. position: "absolute",
  17286. width: s.footer.width,
  17287. left: s.footer.left,
  17288. height: s.userBar.height,
  17289. top: s.userBar.top - (h.SpartaGlobals.bundleIsPC ? l.spacer(3) : 0)
  17290. },
  17291. input: {
  17292. position: "absolute",
  17293. left: 0,
  17294. top: _,
  17295. height: v,
  17296. width: s.screen.width,
  17297. flexDirection: "row",
  17298. justifyContent: "space-between",
  17299. alignContent: "stretch",
  17300. alignItems: "flex-end",
  17301. marginLeft: 0,
  17302. marginRight: 0,
  17303. zOffset: 100050
  17304. },
  17305. borderContainerMiddle: {
  17306. flex: 1,
  17307. height: h.SpartaGlobals.bundleIsConsole ? 32 : l.getHeight(4, !1)
  17308. },
  17309. borderContainerRight: {
  17310. flex: 0,
  17311. width: s.dangerZoneSize.width,
  17312. height: h.SpartaGlobals.bundleIsConsole ? 32 : l.getHeight(4, !1)
  17313. },
  17314. borderContainerLeft: {
  17315. flex: 0,
  17316. width: s.dangerZoneSize.width,
  17317. height: h.SpartaGlobals.bundleIsConsole ? 32 : l.getHeight(4, !1)
  17318. },
  17319. rightButtons: {
  17320. flex: 0,
  17321. zOffset: 1,
  17322. alignItems: "center"
  17323. },
  17324. storeButtons: {
  17325. flex: 0
  17326. },
  17327. inputBorder: {
  17328. position: "absolute",
  17329. left: 0,
  17330. right: 0,
  17331. bottom: 0,
  17332. height: 2,
  17333. backgroundColor: "#e6e6e680"
  17334. }
  17335. }, "47e7007d:44:15"), P = function(e) {
  17336. function t() {
  17337. var t = null !== e && e.apply(this, arguments) || this;
  17338. return t.rotateTween = u.Animation.componentTween(t, "47e7007d:157:49", 90), t.opacityTween = u.Animation.componentTween(t, "47e7007d:158:50", 0),
  17339. t;
  17340. }
  17341. return r.__extends(t, e), t.prototype.animate = function(e) {
  17342. this.rotateTween && this.opacityTween && (e ? (this.rotateTween.to(0, A.header.rotate),
  17343. this.opacityTween.to(1, A.header.opacity)) : (this.rotateTween.to(90, I), this.opacityTween.to(0, I)));
  17344. }, t.prototype.render = function() {
  17345. var e = this.props.header, t = {
  17346. rotateX: this.rotateTween.getStyle(),
  17347. opacity: this.opacityTween.getStyle()
  17348. };
  17349. return o.createElement("surface", {
  17350. style: [ w.header, t ]
  17351. }, o.createElement("surface", {
  17352. style: [ {
  17353. alignItems: "flex-start"
  17354. }, w.column ]
  17355. }, e.left), o.createElement("surface", {
  17356. style: [ {
  17357. alignItems: "center"
  17358. }, w.column ]
  17359. }, e.middle), o.createElement("surface", {
  17360. style: [ {
  17361. alignItems: "flex-end"
  17362. }, w.column ]
  17363. }, e.right));
  17364. }, t;
  17365. }(o.Component), R = function(e) {
  17366. function t(t, n) {
  17367. var r = e.call(this, t, n) || this;
  17368. r.sparta = y.SpartaContext.getFromComponent(r), r.didMount = !1, r.containerBlurTween = u.Animation.componentTween(r, "47e7007d:217:63", 0, C),
  17369. r.defaultLayoutComponents = {
  17370. userBar: h.SpartaGlobals.bundleIsConsole,
  17371. comCenter: void 0
  17372. }, r.header = o.createRef(), r.focusAncestor = r.sparta.twinkle.focus.createAncestor("gameview"),
  17373. r.state = {
  17374. mouseEventsEnabled: !1
  17375. };
  17376. var a = r.props.disableFooterAnimation;
  17377. return r.opacityTween = u.Animation.componentTween(r, "47e7007d:240:59", a ? 1 : 0),
  17378. r.inputOpacityTween = u.Animation.componentTween(r, "47e7007d:241:64", a ? 1 : 0),
  17379. r.inputTranslateTween = u.Animation.componentTween(r, "47e7007d:242:66", a ? 0 : T),
  17380. r.rightButtonsOpacityTween = u.Animation.componentTween(r, "47e7007d:243:71", a ? 1 : 0),
  17381. r.reaction(function() {
  17382. return r.sparta.stores.comCenterState.focusAncestor.children;
  17383. }, function(e) {
  17384. r.focusAncestor.isolationExceptions.replace(e.concat(f.contextMenuGroup.definedMembers));
  17385. }, {
  17386. fireImmediately: !0
  17387. }), r.cancelQueryListener = r.sparta.twinkle.focus.onInvalidQuery.listen(function(e) {
  17388. i.gameStateStoreLoader.get().isGameViewVisible && e.setAsVisible(r.focusAncestor.children);
  17389. }), r;
  17390. }
  17391. return r.__extends(t, e), t.prototype.componentWillMount = function() {
  17392. var e = this, t = i.gameStateStoreLoader.get();
  17393. this.reaction(function() {
  17394. return t.isGameViewVisible;
  17395. }, function(t) {
  17396. e.configureVisibility(t);
  17397. }, {
  17398. fireImmediately: !0
  17399. });
  17400. }, t.prototype.runAnimations = function(e) {
  17401. if (this.didMount) {
  17402. var t = e || this.props.disableFooterAnimation ? 1 : 0, n = e || this.props.disableFooterAnimation ? 0 : T;
  17403. this.sparta.stores.comCenterState.isEnabled && this.sparta.stores.comCenterState.isExpanded ? (this.inputOpacityTween.set(t),
  17404. this.inputTranslateTween.set(n)) : (this.inputOpacityTween.to(t, e ? A.inputBar.opacity : I),
  17405. this.inputTranslateTween.to(n, e ? A.inputBar.translation : I)), e || this.props.disableFooterAnimation ? this.opacityTween.to(1) : this.opacityTween.to(0),
  17406. this.header.current && this.header.current.animate(e);
  17407. }
  17408. }, t.prototype.configureVisibility = function(e) {
  17409. this.opacityTween && (this.runAnimations(e), this.focusAncestor.setActive("gameViewVisibility", e),
  17410. e ? (this.focusAncestor.isolate(), this.sparta.twinkle.focus.recalculate(), i.layoutVisibilityStore.setVisibilities({
  17411. only: this.defaultLayoutComponents
  17412. })) : (this.focusAncestor.deisolate(), i.layoutVisibilityStore.setVisibilities({
  17413. only: !1
  17414. })), h.SpartaGlobals.bundleIsPC && this.state.mouseEventsEnabled !== e && this.setState({
  17415. mouseEventsEnabled: e
  17416. }));
  17417. }, t.prototype.componentDidMount = function() {
  17418. var e = this;
  17419. this.didMount = !0, this.reaction(function() {
  17420. return e.sparta.stores.comCenterState.isEnabled && e.sparta.stores.comCenterState.isExpanded;
  17421. }, function(t) {
  17422. e.rightButtonsOpacityTween.to(t ? 0 : 1, t ? I : C), h.SpartaGlobals.bundleIsConsole && e.containerBlurTween.to(t ? 1 : 0, t ? C : I);
  17423. }, {
  17424. fireImmediately: !0
  17425. }), i.gameStateStoreLoader.get().isGameViewVisible && this.configureVisibility(!0),
  17426. c.changeGameViewContentVisibility.subscribeTo(this, function(t) {
  17427. return e.configureVisibility(t);
  17428. });
  17429. }, t.prototype.componentWillUnmount = function() {
  17430. this.didMount = !1, this.focusAncestor.children.forEach(function(e) {
  17431. e.setActive("47e7007d:354:29", !1);
  17432. }), this.cancelQueryListener && this.cancelQueryListener(), this.configureVisibility(!1),
  17433. this.focusAncestor.destroy();
  17434. }, t.prototype.render = function() {
  17435. var e = this.sparta.stores.comCenterState, t = h.SpartaGlobals.bundleIsPC && !(e.isEnabled && e.isExpanded), n = h.SpartaGlobals.bundleIsConsole ? this.containerBlurTween.getStyleClass("layerBlur") : m.emptyStyle, a = m.merge4(this.inputOpacityTween.getStyleClass("opacity"), this.inputTranslateTween.getStyleClass("translateY"), g.CommonStyles.mouseEvents(this.state.mouseEventsEnabled && t), m.DynamicStyle.create({
  17436. layer: !!h.SpartaGlobals.bundleIsConsole || !t,
  17437. layerClip: !!h.SpartaGlobals.bundleIsConsole || !t
  17438. }, "47e7007d:381:96")), s = m.merge3(this.opacityTween.getStyleClass("opacity"), p.gameViewTweenY.getStyleClass("translateY"), g.CommonStyles.mouseEvents(this.state.mouseEventsEnabled)), u = this.props.header ? o.createElement(P, {
  17439. ref: this.header,
  17440. header: this.props.header,
  17441. key: "header"
  17442. }) : null, l = !this.props.rightButtons || i.layoutStateStore.hasVisiblePopups || e.isEnabled && e.isExpanded ? null : o.createElement(d.ButtonsGroup, {
  17443. style: m.merge2(w.rightButtons, this.rightButtonsOpacityTween.getStyleClass("opacity")),
  17444. custom: this.props.rightButtons
  17445. }), c = o.createElement("surface", {
  17446. style: [ w.input, a ],
  17447. key: "inputContent"
  17448. }, o.createElement("surface", {
  17449. style: w.borderContainerLeft
  17450. }, o.createElement("surface", {
  17451. style: w.inputBorder
  17452. })), o.createElement(d.ButtonsGroup, {
  17453. style: w.storeButtons,
  17454. overrideInputVisibility: !0
  17455. }), o.createElement("surface", {
  17456. style: w.borderContainerMiddle
  17457. }, o.createElement("surface", {
  17458. style: w.inputBorder
  17459. })), l, o.createElement("surface", {
  17460. style: w.borderContainerRight
  17461. }, o.createElement("surface", {
  17462. style: w.inputBorder
  17463. }))), f = o.createElement("surface", {
  17464. style: [ w.containerForeground, n, i.layoutStateStore.viewportScaleStyle ]
  17465. }, u, o.createElement("surface", {
  17466. style: w.content,
  17467. key: "content"
  17468. }, this.props.children));
  17469. return o.createElement("surface", r.__assign({
  17470. style: [ w.container, s ]
  17471. }, this.focusAncestor.hooks), f, !i.layoutStateStore.hasVisiblePopups && c, o.createElement("surface", {
  17472. style: w.footer,
  17473. key: "footer"
  17474. }, this.props.footer));
  17475. }, t.contextTypes = y.SpartaContext.contextTypes, t = r.__decorate([ a.observer ], t);
  17476. }(o.Component);
  17477. t.TunguskaGameViewRoute = R;
  17478. }, function(e, t, n) {
  17479. "use strict";
  17480. Object.defineProperty(t, "__esModule", {
  17481. value: !0
  17482. });
  17483. var r, o, i = n(0), a = n(1), s = n(4), u = n(1328), l = n(621);
  17484. !function(e) {
  17485. e[e.S = .5] = "S", e[e.M = .75] = "M", e[e.L = 1] = "L", e[e.XL = 2] = "XL", e[e.XXL = 4] = "XXL";
  17486. }(r || (r = {})), function(e) {
  17487. e.S = "Png180xANY", e.M = "Png300xANY", e.L = "Png1024xANY", e.XL = "Png1024xANY",
  17488. e.XXL = "Png1024xANY";
  17489. }(o || (o = {}));
  17490. var c = s.observer(function(e) {
  17491. var t = e.focusItem, n = e.scale, r = t && (t.isFocused || t.isHovered);
  17492. return a.createElement(l.PuzzlePieceIcon, {
  17493. scale: n,
  17494. color: r ? "#000000" : "#ffffff"
  17495. });
  17496. }), p = function(e) {
  17497. function t() {
  17498. return null !== e && e.apply(this, arguments) || this;
  17499. }
  17500. return i.__extends(t, e), t.prototype.render = function() {
  17501. var e, t = this.props, n = t.item, i = t.dimmed, s = t.focusItem, l = t.style, p = t.size, d = n.itemType.toUpperCase(), f = "BLUEPRINT" === d, m = r[p || "L"], h = o[p || "L"], g = n.images[h];
  17502. return s && (s.isFocused || s.isHovered) && "BOOST" === d && (e = "#000000"), a.createElement("surface", {
  17503. style: [ u.TunguskaBattlepackImage.container, l ]
  17504. }, a.createElement("surface", {
  17505. style: u.TunguskaBattlepackImage.itemTexture({
  17506. image: g,
  17507. dimmed: i,
  17508. color: e
  17509. })
  17510. }), f && a.createElement(c, {
  17511. scale: m,
  17512. focusItem: s
  17513. }));
  17514. }, t = i.__decorate([ s.observer ], t);
  17515. }(a.Component);
  17516. t.BattlepackImage = p;
  17517. }, function(e, t, n) {
  17518. "use strict";
  17519. Object.defineProperty(t, "__esModule", {
  17520. value: !0
  17521. });
  17522. var r = n(0), o = n(1), i = n(5), a = n(24), s = n(34), u = n(33), l = n(204), c = n(77), p = n(86), d = n(205), f = n(2), m = n(9);
  17523. function h(e, t) {
  17524. return t;
  17525. }
  17526. function g(e) {
  17527. return (e.items || []).filter(function(e) {
  17528. return !!e.progression && e.progression.unlocked;
  17529. }).length;
  17530. }
  17531. function y(e) {
  17532. var t = [];
  17533. return (e.items || []).forEach(function(e) {
  17534. t = t.concat(e.items || []);
  17535. }), t;
  17536. }
  17537. t.getCategoryUnlockStatus = function S(e, t) {
  17538. if (!e) return {
  17539. allUnlocked: 0,
  17540. numTotal: 0,
  17541. numUnlocked: 0
  17542. };
  17543. var n = 0, r = 0;
  17544. return h(0, t) ? (e.items || []).forEach(function(e) {
  17545. n += g(e), r += (e.items || []).length;
  17546. }) : (n = g(e), r = (e.items || []).length), {
  17547. allUnlocked: n === r,
  17548. numTotal: r,
  17549. numUnlocked: n
  17550. };
  17551. }, t.contentSoftClip = [ a.fadeAreaTop.height, -50, m.SpartaGlobals.bundleIsPC ? a.dangerZoneSize.height : a.fadeAreaBottom.height, -50 ];
  17552. var v = function(e) {
  17553. function t(t) {
  17554. var n = e.call(this, t) || this;
  17555. if (n.itemSelectionState = new d.CareerSelectionState(), n.listSelectionState = t.listSelectionState || new p.ListSelectionState(),
  17556. t.preSelectedItemId) {
  17557. var r = function o(e, t, n) {
  17558. for (var r = 0; r < t.length; r++) for (var o = t[r], i = h(0, n) ? y(o) : o.items || [], a = 0; a < i.length; a++) {
  17559. var s = i[a];
  17560. if (s.code === e) return {
  17561. categoryIndex: r,
  17562. itemIndex: a,
  17563. item: s
  17564. };
  17565. }
  17566. }(t.preSelectedItemId, t.categories || [], t.hasSubCategories || !1);
  17567. r && (n.listSelectionState.setActiveItem(r.categoryIndex), n.itemSelectionState.setActiveItem(r.item, r.itemIndex));
  17568. }
  17569. return n.cancelReaction = f.reaction(function() {
  17570. return n.listSelectionState.activeItemIndex;
  17571. }, function() {
  17572. n.itemSelectionState.setActiveItem(void 0, -1);
  17573. }), n;
  17574. }
  17575. return r.__extends(t, e), t.prototype.componentWillUnmount = function() {
  17576. this.cancelReaction();
  17577. }, t.prototype.render = function() {
  17578. return this.props.children(this.listSelectionState, this.itemSelectionState);
  17579. }, t;
  17580. }(o.Component);
  17581. t.CareerSectionSelectionHandler = v, t.CareerSectionContainer = function b(e) {
  17582. return o.createElement(s.Template, {
  17583. tallContent: !0,
  17584. scrollContent: !1,
  17585. header: e.header
  17586. }, o.createElement("surface", {
  17587. style: l.CareerSectionStyle.container
  17588. }, e.children));
  17589. }, t.CareerSectionHeader = function _(e) {
  17590. return o.createElement("surface", {
  17591. style: i.merge2(l.CareerSectionStyle.header, e.style)
  17592. }, e.children);
  17593. }, t.CareerSectionMenu = function T(e) {
  17594. return o.createElement("surface", {
  17595. style: i.merge2(l.CareerSectionStyle.menu, e.style)
  17596. }, e.children);
  17597. }, t.CareerSectionContent = function E(e) {
  17598. return o.createElement("surface", {
  17599. style: i.merge2(l.CareerSectionStyle.content, e.style)
  17600. }, e.children);
  17601. }, t.CareerSectionFullContent = function C(e) {
  17602. return o.createElement("surface", {
  17603. style: i.merge2(l.CareerSectionStyle.fullContent, e.style)
  17604. }, e.children);
  17605. }, t.CareerSectionFocusPane = c.observer(function e(t) {
  17606. var n = o.useRef(null);
  17607. return o.useEffect(function() {
  17608. n.current && n.current.scrollTo(0, 0);
  17609. }, [ t.selectionState.item, t.selectionState.index, t.selectionState.category ]),
  17610. o.createElement(u.Scroller, {
  17611. ref: n,
  17612. style: i.merge2(l.CareerSectionStyle.focusPane, t.style),
  17613. controller: !0
  17614. }, t.children);
  17615. });
  17616. }, function(e, t, n) {
  17617. "use strict";
  17618. Object.defineProperty(t, "__esModule", {
  17619. value: !0
  17620. });
  17621. var r = n(0), o = n(12), i = o.Template("CareerSectionStyle"), a = function() {
  17622. function e() {}
  17623. return e.isEnabled = o.value(function() {
  17624. return !0;
  17625. }, "1d57d6c1:18:23"), e.header = o.wrap(function() {
  17626. return o.style({
  17627. flex: 1,
  17628. flexDirection: "row",
  17629. alignItems: "center",
  17630. justifyContent: "flex-end"
  17631. }, "1d57d6c1:20:31");
  17632. }), e.headerText = o.wrap(function() {
  17633. return o.style({
  17634. marginRight: o.Grid.spacer()
  17635. }, "1d57d6c1:29:35");
  17636. }), e.warBond = o.wrap(function() {
  17637. return o.style({
  17638. texture: o.bbOfflineUrl("/sparta/assets/career/icon-warbonds-8de69417.png"),
  17639. height: o.Grid.getHeight(3),
  17640. width: o.Grid.getHeight(3),
  17641. marginRight: o.Grid.spacer(),
  17642. marginLeft: o.Grid.spacer()
  17643. }, "1d57d6c1:35:32");
  17644. }), e.container = o.wrap(function() {
  17645. return o.style({
  17646. flexDirection: "row"
  17647. }, "1d57d6c1:45:34");
  17648. }), e.menu = o.wrap(function() {
  17649. return o.style({
  17650. width: o.Grid.getWidth(6)
  17651. }, "1d57d6c1:51:29");
  17652. }), e.content = o.wrap(function() {
  17653. return o.style({
  17654. marginLeft: o.Grid.getWidth(1),
  17655. width: o.Grid.getWidth(11)
  17656. }, "1d57d6c1:57:32");
  17657. }), e.fullContent = o.wrap(function() {
  17658. return o.style({
  17659. marginLeft: o.Grid.getWidth(1),
  17660. width: o.Grid.getWidth(18)
  17661. }, "1d57d6c1:64:36");
  17662. }), e.focusPane = o.wrap(function() {
  17663. return o.style({
  17664. marginLeft: o.Grid.getWidth(.5),
  17665. width: o.Grid.getWidth(6),
  17666. height: o.LayoutBounds.content.height - o.Grid.spacer(2)
  17667. }, "1d57d6c1:71:34");
  17668. }), e.tableWidth = o.value(function() {
  17669. return o.Grid.getWidth(10.6);
  17670. }, "1d57d6c1:79:24"), e.tableHeight = o.value(function() {
  17671. return o.LayoutBounds.content.height - o.Grid.spacer(2);
  17672. }, "1d57d6c1:80:25"), e.gameviewTableHeight = o.value(function() {
  17673. return o.LayoutBounds.content.height - o.Grid.spacer(20);
  17674. }, "1d57d6c1:81:33"), e.itemHeaderHeight = o.value(function() {
  17675. return o.Grid.getHeight(2) + o.Grid.spacer(5);
  17676. }, "1d57d6c1:83:30"), e.containerTitleMargin = i.wrap(function() {
  17677. return o.style({
  17678. marginTop: -o.Grid.spacer(3)
  17679. }, "1d57d6c1:84:34");
  17680. }), e.itemHeader = o.stylefunc(function() {
  17681. return o.style({
  17682. height: o.Grid.getHeight(2),
  17683. marginBottom: o.Grid.spacer(2),
  17684. marginTop: o.Grid.spacer(3),
  17685. position: "absolute"
  17686. }, "1d57d6c1:86:14");
  17687. }, function(e) {
  17688. return o.dynamicStyle({
  17689. top: e.top
  17690. }, "1d57d6c1:93:34");
  17691. }), e.itemWidth = o.value(function() {
  17692. return o.Grid.getWidth(3) - o.Grid.spacer(2);
  17693. }, "1d57d6c1:99:23"), e.itemHeight = o.value(function() {
  17694. return o.Grid.getHeight(12) + o.Grid.spacer(1);
  17695. }, "1d57d6c1:100:24"), e.itemStyle = o.stylefunc(function() {
  17696. return o.style({
  17697. position: "absolute",
  17698. width: o.Grid.getWidth(3) - o.Grid.spacer(3),
  17699. height: o.Grid.getHeight(12)
  17700. }, "1d57d6c1:103:14");
  17701. }, function(e) {
  17702. return o.dynamicStyle({
  17703. left: e.left + o.Grid.spacer(),
  17704. top: e.top
  17705. }, "1d57d6c1:109:48");
  17706. }), e = r.__decorate([ i.style ], e);
  17707. }();
  17708. t.CareerSectionStyle = a;
  17709. }, function(e, t, n) {
  17710. "use strict";
  17711. Object.defineProperty(t, "__esModule", {
  17712. value: !0
  17713. });
  17714. var r = n(0), o = n(2), i = function() {
  17715. function e(e, t) {
  17716. this.selectionState = e, this.index = t;
  17717. }
  17718. return Object.defineProperty(e.prototype, "active", {
  17719. get: function() {
  17720. return this.selectionState.index === this.index;
  17721. },
  17722. enumerable: !0,
  17723. configurable: !0
  17724. }), r.__decorate([ o.computed ], e.prototype, "active", null), e;
  17725. }();
  17726. t.CareerItemSelectionState = i;
  17727. var a = function() {
  17728. function e() {
  17729. this.index = -1, this.page = 1, this.itemStates = {};
  17730. }
  17731. return e.prototype.setActiveItem = function(e, t, n) {
  17732. this.item = e, this.index = t, n && this.setActiveCategory(n);
  17733. }, e.prototype.setActiveCategory = function(e) {
  17734. this.category = e;
  17735. }, e.prototype.incPage = function() {
  17736. this.page++;
  17737. }, e.prototype.getItemState = function(e) {
  17738. return this.itemStates[e] || (this.itemStates[e] = new i(this, e)), this.itemStates[e];
  17739. }, r.__decorate([ o.observable ], e.prototype, "item", void 0), r.__decorate([ o.observable ], e.prototype, "category", void 0),
  17740. r.__decorate([ o.observable ], e.prototype, "index", void 0), r.__decorate([ o.observable ], e.prototype, "page", void 0),
  17741. r.__decorate([ o.action ], e.prototype, "setActiveItem", null), r.__decorate([ o.action ], e.prototype, "setActiveCategory", null),
  17742. r.__decorate([ o.action ], e.prototype, "incPage", null), e;
  17743. }();
  17744. t.CareerSelectionState = a;
  17745. }, function(e, t, n) {
  17746. "use strict";
  17747. Object.defineProperty(t, "__esModule", {
  17748. value: !0
  17749. });
  17750. var r = n(71);
  17751. t.BattleplanContext = r.createContext("Battleplan");
  17752. }, function(e, t, n) {
  17753. "use strict";
  17754. Object.defineProperty(t, "__esModule", {
  17755. value: !0
  17756. });
  17757. var r = n(0), o = n(12), i = o.Template("BFVPromoStyles"), a = function() {
  17758. function e() {}
  17759. var t;
  17760. return t = e, e.container = i.wrap(function() {
  17761. return o.style({
  17762. position: "absolute",
  17763. top: 0,
  17764. left: 0,
  17765. width: o.LayoutBounds.screen.width,
  17766. height: o.LayoutBounds.screen.height
  17767. }, "794a94e3:6:23");
  17768. }), e.page = i.wrap(function() {
  17769. return o.style({
  17770. position: "absolute",
  17771. left: 0,
  17772. top: o.LayoutBounds.fadeAreaTop.bottom,
  17773. width: o.LayoutBounds.screen.width,
  17774. height: o.LayoutBounds.content.height,
  17775. alignItems: "center"
  17776. }, "794a94e3:14:18");
  17777. }), e.logo = i.wrap(function() {
  17778. return o.style({
  17779. width: 600,
  17780. height: 220,
  17781. textureMode: "contain",
  17782. texture: o.bbOfflineUrl("/sparta/casablanca/bfv_logo_vertical_big-069062a6.png")
  17783. }, "794a94e3:23:18");
  17784. }), e.textContainer = i.wrap(function() {
  17785. return o.style({
  17786. width: o.Grid.getWidth(14),
  17787. marginTop: o.Grid.spacer(5),
  17788. marginBottom: o.Grid.spacer(6)
  17789. }, "794a94e3:30:27");
  17790. }), e.text = i.wrap(function() {
  17791. return o.style({
  17792. textAlign: "center",
  17793. opacity: 1
  17794. }, "794a94e3:36:18");
  17795. }), e.buttons = i.wrap(function() {
  17796. return o.style({
  17797. flexDirection: "row",
  17798. alignItems: "center",
  17799. width: o.LayoutBounds.content.width,
  17800. justifyContent: "center"
  17801. }, "794a94e3:41:21");
  17802. }), e.button = i.wrap(function() {
  17803. return o.style({
  17804. width: o.Grid.getWidth(5),
  17805. height: o.Grid.getHeight(6),
  17806. marginRight: o.Grid.spacer(.5),
  17807. marginLeft: o.Grid.spacer(.5)
  17808. }, "794a94e3:48:20");
  17809. }), e.friends = i.wrap(function() {
  17810. return o.style({
  17811. alignItems: "center",
  17812. marginTop: o.Grid.spacer(o.Constants.useConsoleMenu ? 4 : 6)
  17813. }, "794a94e3:55:21");
  17814. }), e.friendsText = i.wrap(function() {
  17815. return o.style({
  17816. marginBottom: o.Grid.getHeight(2)
  17817. }, "794a94e3:60:25");
  17818. }), e.pageIndicator = i.wrap(function() {
  17819. return o.style({
  17820. zOffset: 10,
  17821. position: "absolute",
  17822. left: o.Constants.useConsoleMenu ? o.LayoutBounds.safeZone.left : o.LayoutBounds.mainMenu.width + o.Grid.getWidth(1),
  17823. top: 0,
  17824. height: o.LayoutBounds.screen.height,
  17825. justifyContent: "center",
  17826. alignItems: "flex-start"
  17827. }, "794a94e3:64:27");
  17828. }), e.pageIndicatorItem = i.wrap(function() {
  17829. return o.style({
  17830. height: 30,
  17831. marginBottom: 6,
  17832. flexDirection: "row",
  17833. alignItems: "center",
  17834. opacity: .4
  17835. }, "794a94e3:74:31");
  17836. }), e.pageIndicatorItemActive = i.wrap(function() {
  17837. return o.style({
  17838. height: 30,
  17839. marginBottom: 6,
  17840. flexDirection: "row",
  17841. alignItems: "center"
  17842. }, "794a94e3:82:37");
  17843. }), e.pageIndicatorDot = i.wrap(function() {
  17844. return o.style({
  17845. width: 10,
  17846. height: 10,
  17847. marginRight: 10,
  17848. marginLeft: 5,
  17849. marginTop: 2,
  17850. texture: o.bbOfflineUrl("/sparta/casablanca/destination/page_indicator-a9682c9f.png"),
  17851. textureMode: "contain"
  17852. }, "794a94e3:89:30");
  17853. }), e.pageIndicatorDotActive = i.wrap(function() {
  17854. return o.style({
  17855. width: 20,
  17856. height: 20,
  17857. marginRight: 10,
  17858. texture: o.bbOfflineUrl("/sparta/casablanca/destination/page_indicator_active-a37066a5.png"),
  17859. textureMode: "contain"
  17860. }, "794a94e3:99:36");
  17861. }), e.pageIndicatorText = i.wrap(function() {
  17862. return o.style({
  17863. marginTop: 1
  17864. }, "794a94e3:107:31");
  17865. }), e.backgroundSlider = i.wrap(function() {
  17866. return o.style({
  17867. position: "absolute",
  17868. top: 0,
  17869. left: 0,
  17870. layer: !0,
  17871. enableMouseEvents: !1
  17872. }, "794a94e3:111:30");
  17873. }), e.backgroundSliderClip = i.wrap(function() {
  17874. return o.style({
  17875. layerSoftClip: [ 0, o.Grid.getWidth(4), 0, o.Grid.getWidth(4) ]
  17876. }, "794a94e3:119:34");
  17877. }), e.contentSlider = i.wrap(function() {
  17878. return o.style({
  17879. position: "absolute",
  17880. top: 0,
  17881. left: 0,
  17882. width: o.LayoutBounds.screen.width,
  17883. height: o.LayoutBounds.screen.height,
  17884. layerClip: !0,
  17885. layer: !0
  17886. }, "794a94e3:123:27");
  17887. }), e.background = i.wrap(function() {
  17888. return o.style({
  17889. textureMode: "cover",
  17890. position: "absolute",
  17891. left: 0,
  17892. top: 0
  17893. }, "794a94e3:133:24");
  17894. }), e.pageContent = i.wrap(function() {
  17895. return o.style({
  17896. width: o.Grid.getWidth(14)
  17897. }, "794a94e3:140:25");
  17898. }), e.pageHeader = i.wrap(function() {
  17899. return o.style({
  17900. textAlign: "center",
  17901. marginBottom: 0,
  17902. marginTop: 0,
  17903. fontSize: 32
  17904. }, "794a94e3:144:24");
  17905. }), e.pageSubHeader = i.wrap(function() {
  17906. return o.style({
  17907. textAlign: "center",
  17908. opacity: .6,
  17909. marginBottom: 0,
  17910. marginTop: 0
  17911. }, "794a94e3:151:27");
  17912. }), e.pageBodyText = i.wrap(function() {
  17913. return o.style({
  17914. marginTop: o.Grid.spacer(4),
  17915. textAlign: "center",
  17916. opacity: .6
  17917. }, "794a94e3:158:26");
  17918. }), e.slides = i.wrap(function() {
  17919. return o.style({
  17920. flexDirection: "row",
  17921. position: "absolute",
  17922. bottom: o.Constants.useConsoleMenu ? o.Grid.getHeight(12) : o.Grid.getHeight(36),
  17923. width: o.LayoutBounds.screen.width,
  17924. left: 0,
  17925. justifyContent: "center"
  17926. }, "794a94e3:164:20");
  17927. }), e.slideWidth = o.value(function() {
  17928. return 250;
  17929. }, "794a94e3:173:24"), e.slideHeight = o.value(function() {
  17930. return 160;
  17931. }, "794a94e3:174:25"), e.slide = i.wrap(function() {
  17932. return o.style({
  17933. width: t.slideWidth,
  17934. height: t.slideHeight,
  17935. marginLeft: o.Grid.spacer(.6),
  17936. marginRight: o.Grid.spacer(.6)
  17937. }, "794a94e3:176:19");
  17938. }), e.slideImage = i.wrap(function() {
  17939. return o.style({
  17940. width: t.slideWidth,
  17941. height: t.slideHeight,
  17942. textureMode: "contain",
  17943. position: "absolute",
  17944. zOffset: 1
  17945. }, "794a94e3:185:24");
  17946. }), e.slideGradient = i.wrap(function() {
  17947. return o.style({
  17948. width: t.slideWidth,
  17949. height: t.slideHeight,
  17950. textureMode: "fill",
  17951. position: "absolute",
  17952. texture: o.bbOfflineUrl("/sparta/assets/card_gradient_blue_2-f270d01e-e1faea6d.png"),
  17953. zOffset: 2
  17954. }, "794a94e3:194:27");
  17955. }), e.slideTitleContainer = i.wrap(function() {
  17956. return o.style({
  17957. position: "absolute",
  17958. bottom: 0,
  17959. width: t.slideWidth,
  17960. height: 70,
  17961. justifyContent: "center",
  17962. zOffset: 3
  17963. }, "794a94e3:203:33");
  17964. }), e.slideTitleBackground = i.wrap(function() {
  17965. return o.style({
  17966. position: "absolute",
  17967. top: 0,
  17968. right: 0,
  17969. bottom: 0,
  17970. left: 0,
  17971. backgroundColor: "#ffffff",
  17972. zOffset: 0
  17973. }, "794a94e3:212:34");
  17974. }), e.slideTitle = i.wrap(function() {
  17975. return o.style({
  17976. textAlign: "center",
  17977. fontSize: o.Constants.useConsoleMenu ? 12 : 13,
  17978. marginTop: 4,
  17979. color: "#ffffff",
  17980. zOffset: 1
  17981. }, "794a94e3:222:24");
  17982. }), e.slideSubTitle = i.wrap(function() {
  17983. return o.style({
  17984. textAlign: "center",
  17985. fontSize: o.Constants.useConsoleMenu ? 11 : 12,
  17986. marginTop: 4,
  17987. color: "#ffffff",
  17988. opacity: .35,
  17989. zOffset: 1
  17990. }, "794a94e3:230:27");
  17991. }), e.pageIcon = i.wrap(function() {
  17992. return o.style({
  17993. width: 120,
  17994. height: 120,
  17995. alignSelf: "center",
  17996. marginBottom: o.Grid.spacer(4)
  17997. }, "794a94e3:239:22");
  17998. }), e.scrollIcon = i.wrap(function() {
  17999. return o.style({
  18000. texture: o.bbOfflineUrl("/sparta/casablanca/icons/cas_scroll_v-dc0ad3c5.png"),
  18001. width: 50,
  18002. height: 50,
  18003. left: o.LayoutBounds.screen.width / 2 - 25,
  18004. position: "absolute",
  18005. bottom: o.Constants.useConsoleMenu ? 0 : 120,
  18006. zOffset: 10
  18007. }, "794a94e3:246:24");
  18008. }), e = t = r.__decorate([ i.style ], e);
  18009. }();
  18010. t.BFVPromoStyles = a;
  18011. }, function(e, t, n) {
  18012. var r = n(44);
  18013. e.exports = function(e, t) {
  18014. if (!r(e) || e._t !== t) throw TypeError("Incompatible receiver, " + t + " required!");
  18015. return e;
  18016. };
  18017. }, function(e, t, n) {
  18018. "use strict";
  18019. Object.defineProperty(t, "__esModule", {
  18020. value: !0
  18021. });
  18022. var r = n(53), o = 1, i = new (function() {
  18023. function e() {
  18024. this.queuedIds = [], this.requestMap = {}, this.numInProgress = 0;
  18025. }
  18026. return e.prototype.next = function() {
  18027. if (0 !== this.queuedIds.length) if (this.numInProgress >= 8) console.warn("Queueing request, max concurrent HTTP requests reached:", 8); else {
  18028. var e = this.queuedIds.shift();
  18029. if (e) {
  18030. var t = this.requestMap[e];
  18031. t && (this.numInProgress++, r.nativeApi.httpRequest(t.id, t.method, t.url, t.data, t.headers));
  18032. }
  18033. }
  18034. }, e.prototype.add = function(e) {
  18035. this.requestMap[e.id] = e, this.queuedIds.push(e.id), this.next();
  18036. }, e.prototype.remove = function(e) {
  18037. delete this.requestMap[e.id], this.numInProgress--, this.next();
  18038. }, e;
  18039. }())();
  18040. t.httpRequest = function a(e, t, n, r, s, u) {
  18041. s && (n = "string" == typeof n ? n : JSON.stringify(n));
  18042. var l = {
  18043. id: o++,
  18044. method: e,
  18045. url: t,
  18046. data: n,
  18047. headers: r,
  18048. isJson: s,
  18049. callback: u
  18050. };
  18051. i.add(l);
  18052. }, r.nativeApi.onHttpRequestCompleted = function(e, t, n, r, o) {
  18053. var a = i.requestMap[e];
  18054. if (a) {
  18055. if (a.isJson) {
  18056. try {
  18057. n = "" !== n ? JSON.parse(n) : {};
  18058. } catch (e) {
  18059. console.error("Bad JSON from server:", n), n = {};
  18060. }
  18061. null === n && (n = {}), n || (n = {}), t || n.error || (n.error = {
  18062. message: "HTTP REQUEST FAILED (status code: " + o + ")",
  18063. code: o
  18064. });
  18065. }
  18066. i.remove(a), a.callback && a.callback(t, n, r);
  18067. } else console.warn("Unable to handle unknown http response", {
  18068. requestId: e,
  18069. data: n,
  18070. headers: r,
  18071. statusCode: o
  18072. });
  18073. }, t.parseHeaders = function s(e) {
  18074. var t = {};
  18075. return (e = e || "").split("\n").forEach(function(e) {
  18076. var n = e.split(": ");
  18077. 2 === n.length && (t[n[0]] = n[1]);
  18078. }), t;
  18079. };
  18080. }, function(e, t, n) {
  18081. "use strict";
  18082. Object.defineProperty(t, "__esModule", {
  18083. value: !0
  18084. });
  18085. var r, o = n(0), i = n(2);
  18086. !function(e) {
  18087. e[e.IDLE = 0] = "IDLE", e[e.ENTERING = 1] = "ENTERING", e[e.ACTIVE = 2] = "ACTIVE",
  18088. e[e.LEAVING = 3] = "LEAVING";
  18089. }(r = t.EnterLeaveStates || (t.EnterLeaveStates = {}));
  18090. var a = 0, s = function() {
  18091. function e(e) {
  18092. this.name = e, this.currentState = r.IDLE, this.previousState = r.IDLE, this.stateTimer = 0,
  18093. this.stateTimeout = 250, this.lastChangeId = 0;
  18094. }
  18095. return e.prototype.changeState = function(e) {
  18096. var t = this;
  18097. this.lastChangeId = a++, this.previousState = this.currentState, this.currentState = e,
  18098. e === r.IDLE && this.setContent(null), clearTimeout(this.stateTimer), e === r.LEAVING && (this.stateTimer = setTimeout(function() {
  18099. t.currentState === r.LEAVING && t.changeState(r.IDLE);
  18100. }, this.stateTimeout)), e === r.ENTERING && (this.stateTimer = setTimeout(function() {
  18101. t.currentState === r.ENTERING && t.changeState(r.ACTIVE);
  18102. }, this.stateTimeout));
  18103. }, Object.defineProperty(e.prototype, "isActive", {
  18104. get: function() {
  18105. return this.currentState === r.ACTIVE || this.currentState === r.ENTERING;
  18106. },
  18107. enumerable: !0,
  18108. configurable: !0
  18109. }), Object.defineProperty(e.prototype, "isVisible", {
  18110. get: function() {
  18111. return this.currentState === r.ACTIVE || this.currentState === r.ENTERING || this.currentState === r.LEAVING;
  18112. },
  18113. enumerable: !0,
  18114. configurable: !0
  18115. }), o.__decorate([ i.observable ], e.prototype, "currentState", void 0), o.__decorate([ i.observable ], e.prototype, "previousState", void 0),
  18116. o.__decorate([ i.action ], e.prototype, "changeState", null), o.__decorate([ i.computed ], e.prototype, "isActive", null),
  18117. o.__decorate([ i.computed ], e.prototype, "isVisible", null), e;
  18118. }();
  18119. t.ItemState = s;
  18120. var u = function() {
  18121. function e(e) {
  18122. for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
  18123. this.states = r, this.previous = null, this.items = t, this.switchToItem(e);
  18124. }
  18125. return Object.defineProperty(e.prototype, "current", {
  18126. get: function() {
  18127. for (var e = null, t = 0, n = this.items; t < n.length; t++) {
  18128. var r = n[t];
  18129. if (r.isActive) {
  18130. if (e) throw console.error(this.items), new Error("Cannot have more than one active item!");
  18131. e = r;
  18132. }
  18133. }
  18134. return e;
  18135. },
  18136. enumerable: !0,
  18137. configurable: !0
  18138. }), e.prototype.allocateItem = function(e) {
  18139. for (var t = null, n = [], o = 0, i = this.items; o < i.length; o++) {
  18140. var a = i[o];
  18141. if (!a.isActive) {
  18142. if (a.contentEquals(e)) return a;
  18143. a.currentState === r.IDLE && (t = a), a.currentState === r.LEAVING && n.push(a);
  18144. }
  18145. }
  18146. if (!t) {
  18147. if (n.length > 0) return n.sort(function(e, t) {
  18148. return e.lastChangeId - t.lastChangeId;
  18149. }), n[0];
  18150. throw console.error("Cannot allocate an item, they are all busy (" + this.items.length + ")"),
  18151. new Error("Cannot allocate an item, they are all busy (" + this.items.length + ")");
  18152. }
  18153. return t;
  18154. }, e.prototype.switchToItem = function(e) {
  18155. if (this.current && this.current.contentEquals(e)) this.current.setContent(e); else {
  18156. var t = this.current, n = this.allocateItem(e);
  18157. this.previous = t, t && t.changeState(r.LEAVING), n.changeState(r.ENTERING), n.setContent(e);
  18158. }
  18159. }, o.__decorate([ i.observable ], e.prototype, "previous", void 0), o.__decorate([ i.computed ], e.prototype, "current", null),
  18160. o.__decorate([ i.action ], e.prototype, "switchToItem", null), e;
  18161. }();
  18162. t.EnterLeaveState = u;
  18163. }, function(e, t, n) {
  18164. "use strict";
  18165. Object.defineProperty(t, "__esModule", {
  18166. value: !0
  18167. });
  18168. var r = n(0), o = n(1), i = n(2), a = n(5), s = n(14), u = function(e) {
  18169. function t(t, n, r, o, i, a) {
  18170. var s = e.call(this) || this;
  18171. return s.debugName = t, s.component = n, s.property = r, s.getTheme = o, s.updater = i,
  18172. s.extraOptions = a, s;
  18173. }
  18174. return r.__extends(t, e), t.create = function(e, n, r, o, i, a) {
  18175. return new t(e, n, r, o, i, a);
  18176. }, t.prototype.getTween = function() {
  18177. var e = this;
  18178. if (!this.tween) {
  18179. var t = 0;
  18180. try {
  18181. var n = function(e) {
  18182. return t = e;
  18183. };
  18184. this.updater({
  18185. to: n,
  18186. set: n
  18187. }, this.getTheme(this.component));
  18188. } catch (e) {
  18189. 0;
  18190. }
  18191. var r = "function" == typeof this.extraOptions ? this.extraOptions(this.getTheme(this.component)) : this.extraOptions, o = this.tween = s.Animation.componentTween(this.component, this.debugName, t, r);
  18192. return this.component.autorun(function() {
  18193. return e.updater(o, e.getTheme(e.component));
  18194. }), o;
  18195. }
  18196. return this.tween;
  18197. }, t.prototype.pushObjectsTo = function(e, t) {
  18198. this.getTween().getStyleClass(this.property).pushObjectsTo(e, t);
  18199. }, t.prototype.getStyleValue = function(e, t) {
  18200. if ("textureFadeInTime" !== e) return this.getTween().get();
  18201. }, t;
  18202. }(a.StyleClass);
  18203. t.TweenStyle = u, t.useTweenStyle = function l(e, t, n, r) {
  18204. var a = o.useState(function() {
  18205. var t = 0;
  18206. try {
  18207. var o = function(e) {
  18208. return t = e;
  18209. };
  18210. n({
  18211. to: o,
  18212. set: o
  18213. });
  18214. } catch (e) {}
  18215. return s.Animation.tween(e, t, r);
  18216. })[0];
  18217. return o.useEffect(function() {
  18218. return function() {
  18219. a.destroy();
  18220. };
  18221. }, [ a ]), o.useEffect(function() {
  18222. return i.autorun(function() {
  18223. return n(a);
  18224. });
  18225. }, [ n, a, r ]), o.useMemo(function() {
  18226. return a.getStyleClass(t);
  18227. }, [ a, t ]);
  18228. };
  18229. }, function(e, t, n) {
  18230. "use strict";
  18231. Object.defineProperty(t, "__esModule", {
  18232. value: !0
  18233. });
  18234. var r = n(0), o = n(1), i = n(4), a = n(2), s = n(59), u = n(14), l = n(7), c = n(24), p = n(10), d = n(40), f = n(11), m = n(298), h = n(26), g = n(385), y = n(25), S = n(250), v = n(17), b = n(18), _ = n(123), T = n(8), E = n(5), C = n(922), I = n(37), A = n(508), w = n(509), P = n(19), R = {
  18235. position: "absolute",
  18236. top: 0,
  18237. right: 0,
  18238. bottom: 0,
  18239. left: 0
  18240. }, O = function() {
  18241. return function e() {};
  18242. }();
  18243. t.PopupContainerProps = O;
  18244. var x = {
  18245. normal: E.StaticStyle.create({
  18246. marginRight: 4 * l.GUTTER
  18247. }, "1beeaed7:45:12"),
  18248. last: E.StaticStyle.create({
  18249. marginRight: 0
  18250. }, "1beeaed7:46:10")
  18251. }, k = function(e) {
  18252. function t() {
  18253. var t = null !== e && e.apply(this, arguments) || this;
  18254. return t.sparta = T.SpartaContext.getFromComponent(t), t.visualButtons = new WeakMap(),
  18255. t.onTrigger = function(e) {
  18256. var n = t.visualButtons.get(e.key);
  18257. n && n.current && n.current.pulsate();
  18258. }, t;
  18259. }
  18260. return r.__extends(t, e), t.prototype.componentDidMount = function() {
  18261. this.unsubscribe = this.sparta.stores.inputStore.calledTrigger.listen(this.onTrigger);
  18262. }, t.prototype.componentWillUnmount = function() {
  18263. this.unsubscribe();
  18264. }, t.prototype.getRef = function(e) {
  18265. if (e) {
  18266. var t = this.visualButtons.get(e);
  18267. return t || (t = o.createRef(), this.visualButtons.set(e, t)), t;
  18268. }
  18269. }, t.prototype.render = function() {
  18270. var e = this, t = this.sparta.stores.inputStore.appearanceInputs.length - 1, n = this.sparta.stores.inputStore.appearanceInputs.map(function(n, r) {
  18271. var i = r !== t ? x.normal : x.last, a = n.key ? n.key.id.toString() : void 0;
  18272. return o.createElement(m.VisualButton, {
  18273. ref: e.getRef(n.key),
  18274. inputKey: n.key,
  18275. style: i,
  18276. fontStyle: e.props.fontStyle,
  18277. label: n.label,
  18278. key: "button" + a
  18279. });
  18280. });
  18281. return o.createElement("surface", {
  18282. style: C.PopupContainerStyles.buttonContainer
  18283. }, n);
  18284. }, t.contextTypes = T.SpartaContext.contextTypes, t = r.__decorate([ i.observer ], t);
  18285. }(o.Component), M = function(e) {
  18286. function t() {
  18287. var t = null !== e && e.apply(this, arguments) || this;
  18288. return t.sparta = T.SpartaContext.getFromComponent(t), t;
  18289. }
  18290. return r.__extends(t, e), t.prototype.render = function() {
  18291. var e = E.merge2(E.merge4(b.CommonStyles.justifyContentCenter, c.screen.getStyleClass("1beeaed7:123:51"), this.sparta.uiState.viewportPositionStyle, this.sparta.uiState.viewportScaleStyle), this.props.style);
  18292. return o.createElement("surface", {
  18293. style: e
  18294. }, this.props.children);
  18295. }, t.contextTypes = T.SpartaContext.contextTypes, t = r.__decorate([ i.observer ], t);
  18296. }(o.Component);
  18297. t.PopupContainer = M;
  18298. var L = function(e) {
  18299. function t() {
  18300. return null !== e && e.apply(this, arguments) || this;
  18301. }
  18302. return r.__extends(t, e), t;
  18303. }(o.Component);
  18304. t.PopupComponent = L;
  18305. var D = function(e) {
  18306. function t(t, n) {
  18307. var i = e.call(this, t, n) || this;
  18308. return i.getTheme = P.ThemeContext.getFromComponent(i), i.sparta = i.getTheme().sparta,
  18309. i.visualButtons = new WeakMap(), i.content = o.createRef(), i.inputManager = null,
  18310. i.onInputManager = function(e) {
  18311. i.inputManager = e;
  18312. }, i.getInput = function() {
  18313. var e = i.props.popup, t = i.sparta.twinkle.buildInfo;
  18314. if (i.isVisible || t.isPC) {
  18315. var n = [];
  18316. if (e.inputs) if (i.sparta.twinkle.focus.controllerMode && t.isConsole) n = e.createButtons ? e.inputs.map(function(e) {
  18317. return new f.Input(r.__assign({}, e, {
  18318. visible: !1,
  18319. action: function() {
  18320. var t = e.key && i.visualButtons.get(e.key);
  18321. t && t.current && t.current.pulsate().then(e.action);
  18322. }
  18323. }));
  18324. }) : e.inputs; else n = e.inputs.filter(function(e) {
  18325. return e.key !== p.Keys.Accept;
  18326. });
  18327. var o = i.content.current;
  18328. return o && o.getInput && !e.contentHandleInputRegistration && (n = n.concat(o.getInput() || [])),
  18329. n;
  18330. }
  18331. }, i.isVisible = !1, i.onClose = function() {
  18332. h.close(i.props.popup.id);
  18333. }, i.focusAncestor = i.sparta.twinkle.focus.createComponentAncestor(i, "popupgroup_" + t.popup.id),
  18334. i.opacityTween = u.Animation.componentTween(i, "1beeaed7:171:59", t.popup.instantShow ? 1 : 0),
  18335. t.popup.instantShow && i.setVisible(!0), i;
  18336. }
  18337. return r.__extends(t, e), t.prototype.componentWillEnter = function(e) {
  18338. this.inputManager && this.inputManager.isolateInputGroup(), this.content.current && this.content.current.popupWillShow && this.content.current.popupWillShow(),
  18339. this.focusAncestor.isolate(), this.props.popup.instantShow || (this.opacityTween.to(1),
  18340. this.setVisible(!0)), this.inputManager && this.inputManager.updateInput(), e();
  18341. }, t.prototype.componentDidEnter = function() {
  18342. var e = this.focusAncestor.children, t = this.sparta.twinkle.focus.focusedItem;
  18343. if (!(t && e.indexOf(t) > -1)) {
  18344. var n = e.filter(function(e) {
  18345. return e.autoFocusCandidate;
  18346. }), r = e[0];
  18347. n.length > 0 && (r = n[0]), r && r.setFocused(I.FocusSource.Auto);
  18348. }
  18349. }, t.prototype.componentWillLeave = function(e) {
  18350. this.inputManager && this.inputManager.releaseInputGroup(), this.focusAncestor.deisolate(),
  18351. this.content.current && this.content.current.popupWillHide && this.content.current.popupWillHide(),
  18352. this.opacityTween.promiseTo(0).then(e), this.setVisible(!1), this.inputManager && this.inputManager.updateInput();
  18353. }, t.prototype.componentWillUnmount = function() {
  18354. this.inputManager && this.inputManager.releaseInputGroup();
  18355. }, t.prototype.setVisible = function(e) {
  18356. this.isVisible = e;
  18357. }, t.prototype.getRef = function(e) {
  18358. if (e) {
  18359. var t = this.visualButtons.get(e);
  18360. return t || (t = o.createRef(), this.visualButtons.set(e, t)), t;
  18361. }
  18362. }, t.prototype.renderButtons = function(e) {
  18363. var t = this, n = this.getTheme(), r = n.getFonts().normal.fontStyle;
  18364. if (e.useInputStore) return o.createElement(k, {
  18365. fontStyle: r
  18366. });
  18367. var i, a = e.inputs.length - 1, u = e.inputs.map(function(i, u) {
  18368. if (t.sparta.twinkle.focus.controllerMode && t.sparta.twinkle.buildInfo.isConsole) {
  18369. var l = u !== a ? x.normal : x.last;
  18370. return o.createElement(m.VisualButton, {
  18371. ref: t.getRef(i.key),
  18372. inputKey: i.key,
  18373. style: l,
  18374. fontStyle: r,
  18375. label: i.label,
  18376. key: "button" + u
  18377. });
  18378. }
  18379. return o.createElement(s.Focusable, {
  18380. id: "popupbutton_" + u,
  18381. key: "button" + u
  18382. }, function(t) {
  18383. return o.createElement(d.Button, {
  18384. name: "1beeaed7:337:39",
  18385. action: i.action,
  18386. blockInputFor: i.blockInputFor,
  18387. focusItem: t,
  18388. text: i.label,
  18389. style: E.merge2(n.popup.button, e.buttonStyle),
  18390. textSize: n.popup.buttonTextSize
  18391. });
  18392. });
  18393. });
  18394. return !e.fullScreen && e.leftAlignInputs && (i = C.PopupContainerStyles.buttonLeftAlign),
  18395. o.createElement("surface", {
  18396. style: E.merge2(C.PopupContainerStyles.buttonContainer, i)
  18397. }, u);
  18398. }, t.prototype.renderCloseButton = function() {
  18399. var e = this;
  18400. return o.createElement("surface", {
  18401. style: C.PopupContainerStyles.closeButton
  18402. }, o.createElement(s.Focusable, {
  18403. id: "popup_close_" + this.props.popup.id,
  18404. isActive: !this.sparta.twinkle.focus.controllerMode
  18405. }, function(t) {
  18406. return o.createElement(S.IconButton, {
  18407. action: e.onClose,
  18408. focusItem: t,
  18409. size: 20,
  18410. icon: v.bbOfflineUrl("/sparta/jsclient/builds/assets/close2-814a9b53.png")
  18411. });
  18412. }));
  18413. }, t.prototype.renderContent = function(e) {
  18414. var t = e.content, n = {
  18415. popupInfo: e
  18416. };
  18417. return _.isStateless(t) || (n.ref = this.content), o.cloneElement(t, n);
  18418. }, t.prototype.render = function() {
  18419. this.getTheme().popup;
  18420. var e = this.props.popup, t = {
  18421. opacity: this.opacityTween.getStyle(),
  18422. position: "absolute",
  18423. top: 0,
  18424. left: 0,
  18425. width: this.sparta.uiState.window.width,
  18426. height: this.sparta.uiState.window.height,
  18427. zOffset: 100 * (this.props.index || 0)
  18428. }, n = r.__assign({
  18429. layerOpacity: this.opacityTween.getStyle(),
  18430. zOffset: -1,
  18431. layer: !0,
  18432. layerBlur: e.disableBlur ? void 0 : u.Animation.tweenSwitch(0, 1, this.isVisible),
  18433. layerBlurStrength: e.disableBlur ? void 0 : u.Animation.tweenSwitch(0, 2, this.isVisible),
  18434. layerGrabBackground: !0
  18435. }, R);
  18436. if (n.backgroundColor = e.backgroundColor ? e.backgroundColor : "#000000B2", !1 === e.containContent) return o.createElement(y.InputRegistration, {
  18437. debugName: "1beeaed7:424:32",
  18438. getInput: this.getInput,
  18439. group: !0,
  18440. ignoreParentIsolation: !0,
  18441. ref: this.onInputManager
  18442. }, o.createElement("surface", r.__assign({
  18443. style: t
  18444. }, this.focusAncestor.hooks), o.createElement("surface", {
  18445. style: [ n, {
  18446. textureFadeInTime: 0
  18447. } ]
  18448. }), this.renderContent(e), e.createButtons ? this.renderButtons(e) : null));
  18449. e.fullScreen && (t.backgroundColor = e.backgroundColor), e.onTop && (t.zOffset = (t.zOffset || 0) + 1000002);
  18450. var i, a = !1;
  18451. if (e.requireOnline && !this.sparta.stores.onlineState.isOnlineBlazeAndGateway) i = o.createElement("surface", {
  18452. style: {
  18453. justifyContent: "center",
  18454. alignItems: "center"
  18455. }
  18456. }, o.createElement(g.ConnectionState, {
  18457. popup: e,
  18458. name: "1beeaed7:454:58"
  18459. })); else {
  18460. var s = E.merge3(C.PopupContainerStyles.content, e.centerContent ? C.PopupContainerStyles.contentCenter : E.emptyStyle, e.fullScreen ? b.CommonStyles.dock : C.PopupContainerStyles.contentNotFullScreen);
  18461. this.getTheme().popup.showCloseButton && (a = e.showCloseButton), i = o.createElement("surface", {
  18462. style: s
  18463. }, this.renderContent(e), e.createButtons ? this.renderButtons(e) : null);
  18464. }
  18465. return o.createElement(y.InputRegistration, {
  18466. debugName: "1beeaed7:478:28",
  18467. getInput: this.getInput,
  18468. group: !0,
  18469. ignoreParentIsolation: !0,
  18470. ref: this.onInputManager
  18471. }, o.createElement("surface", r.__assign({
  18472. style: t
  18473. }, this.focusAncestor.hooks), o.createElement("surface", {
  18474. style: n
  18475. }), a && this.renderCloseButton(), o.createElement(M, {
  18476. style: this.opacityTween.getStyleClass("opacity")
  18477. }, i)));
  18478. }, t.contextTypes = P.ThemeContext.contextTypes, r.__decorate([ a.observable ], t.prototype, "isVisible", void 0),
  18479. r.__decorate([ a.action ], t.prototype, "setVisible", null), t = r.__decorate([ i.observer ], t);
  18480. }(o.Component), N = function(e) {
  18481. function t() {
  18482. var t = null !== e && e.apply(this, arguments) || this;
  18483. return t.sparta = T.SpartaContext.getFromComponent(t), t.scaledComponent = t.sparta.twinkle.focus.createScaledComponent(),
  18484. t;
  18485. }
  18486. return r.__extends(t, e), t.prototype.getStackablePopups = function(e) {
  18487. for (var t = [], n = e.length - 1; n >= 0; ) {
  18488. var r = e[n];
  18489. if (!r.stackable) break;
  18490. t.push(r), n--;
  18491. }
  18492. return t.reverse(), t;
  18493. }, t.prototype.render = function() {
  18494. var e, t = Array.from(this.sparta.stores.popupStore.updatedPopups.values()).sort(function(e, t) {
  18495. return e.createdDate.getDate() - t.createdDate.getDate();
  18496. }), n = t.length > 0 ? t[t.length - 1] : void 0;
  18497. n && n.stackable ? e = this.getStackablePopups(t).map(function(e, t) {
  18498. return o.createElement(D, {
  18499. key: e.id + "_" + e.createdDate.getTime(),
  18500. popup: e,
  18501. index: t
  18502. });
  18503. }) : n && (e = [ o.createElement(D, {
  18504. key: n.id + "_" + n.createdDate.getTime(),
  18505. popup: n
  18506. }) ]);
  18507. var r = !!e && e.length > 0;
  18508. return o.createElement(w.PopupContext.Provider, {
  18509. value: !0
  18510. }, o.createElement("surface", {
  18511. ref: this.scaledComponent,
  18512. style: C.PopupContainerStyles.container(r)
  18513. }, o.createElement(A.TransitionGroup, {
  18514. style: b.CommonStyles.dock
  18515. }, e)));
  18516. }, t.contextTypes = T.SpartaContext.contextTypes, t = r.__decorate([ i.observer ], t);
  18517. }(o.Component);
  18518. t.Popups = N;
  18519. }, function(e, t, n) {
  18520. "use strict";
  18521. Object.defineProperty(t, "__esModule", {
  18522. value: !0
  18523. });
  18524. var r = n(45);
  18525. t.connect = r.createTypedAction();
  18526. }, function(e, t, n) {
  18527. "use strict";
  18528. Object.defineProperty(t, "__esModule", {
  18529. value: !0
  18530. }), function(e) {
  18531. e[e.None = 0] = "None", e[e.Premium = 1] = "Premium", e[e.Rank = 2] = "Rank", e[e.Previous = 3] = "Previous",
  18532. e[e.Expansion = 4] = "Expansion";
  18533. }(t.DepType || (t.DepType = {}));
  18534. var r = function() {
  18535. function e(e) {
  18536. this.code = e.code, this.images = e.images || {}, this.description = e.description,
  18537. this.name = e.name, this.dependencies = e.dependencies, this.progression = e.progression,
  18538. this.criterias = e.criterias, this.expansions = e.expansions;
  18539. }
  18540. return Object.defineProperty(e.prototype, "criteriaProgression", {
  18541. get: function() {
  18542. if (!this.criterias) return 0;
  18543. var e = this.criterias.length, t = 0;
  18544. return this.criterias.forEach(function(e) {
  18545. e.progression && (t += e.progression.percentage);
  18546. }), 0 !== t ? t / e : 0;
  18547. },
  18548. enumerable: !0,
  18549. configurable: !0
  18550. }), e;
  18551. }();
  18552. t.BaseAward = r;
  18553. }, function(e, t, n) {
  18554. "use strict";
  18555. var r;
  18556. Object.defineProperty(t, "__esModule", {
  18557. value: !0
  18558. }), function(e) {
  18559. e.Popup = "POPUP", e.Outro = "OUTRO", e.FirstTime = "FIRST_TIME", e.CommunityGames = "COMMUNITYGAMES";
  18560. }(r = t.TakeoverType || (t.TakeoverType = {}));
  18561. var o = function() {
  18562. function e(e, t, n) {
  18563. this.id = e, this.views = t, this.telemetryId = n, this.takeoverType = r.Popup;
  18564. }
  18565. return e.fromBackend = function(t) {
  18566. var n = [];
  18567. return t.forEach(function(t) {
  18568. n.push(new e(t.id, t.views, t.telemetryId));
  18569. }), n;
  18570. }, e.isType = function(e) {
  18571. return !!e && e.takeoverType === r.Popup;
  18572. }, e;
  18573. }();
  18574. t.Takeover = o;
  18575. var i = function() {
  18576. function e(e, t, n) {
  18577. this.id = e, this.views = t, this.telemetryId = n, this.takeoverType = r.Outro;
  18578. }
  18579. return e.fromBackend = function(t) {
  18580. var n = [];
  18581. return t.forEach(function(t) {
  18582. n.push(new e(t.id, t.views, t.telemetryId));
  18583. }), n;
  18584. }, e.isType = function(e) {
  18585. return !!e && e.takeoverType === r.Outro;
  18586. }, e.minimumShownFor = 6e3, e;
  18587. }();
  18588. t.OutroScreen = i;
  18589. var a = function() {
  18590. function e(e, t, n) {
  18591. this.id = e, this.views = t, this.telemetryId = n, this.takeoverType = r.CommunityGames;
  18592. }
  18593. return e.fromBackend = function(t) {
  18594. return new e(t.id, t.views, t.telemetryId);
  18595. }, e.isType = function(e) {
  18596. return !!e && e.takeoverType === r.Outro;
  18597. }, e.minimumShownFor = 6e3, e;
  18598. }();
  18599. t.CommunityGames = a;
  18600. var s = function() {
  18601. function e(e) {
  18602. this.component = e, this.takeoverType = r.FirstTime;
  18603. }
  18604. return e.isType = function(e) {
  18605. return !!e && e.takeoverType === r.FirstTime;
  18606. }, e;
  18607. }();
  18608. t.FirstTimeTakeover = s;
  18609. }, function(e, t, n) {
  18610. "use strict";
  18611. (function(e) {
  18612. Object.defineProperty(t, "__esModule", {
  18613. value: !0
  18614. });
  18615. var r = n(373), o = n(23), i = e.get("StorageClient"), a = function() {
  18616. function e() {}
  18617. return e.prototype.get = function(e, t) {
  18618. r.getItem(e, function(e, n, r) {
  18619. var a;
  18620. if (r !== o.GetItemResult.OK && r !== o.GetItemResult.KEY_NOT_FOUND && i.warn("Error " + r + " loading key " + e),
  18621. n) try {
  18622. a = JSON.parse(n);
  18623. } catch (t) {
  18624. i.warn("Error parsing JSON from kvstorage:", e, n, t);
  18625. }
  18626. t(a);
  18627. });
  18628. }, e.prototype.load = function(e, t) {
  18629. r.getItem(e, function(e, n, a) {
  18630. if (a !== o.GetItemResult.KEY_NOT_FOUND) {
  18631. if (a !== o.GetItemResult.OK) return i.warn("Error " + a + " loading key " + e),
  18632. void (t && t(null));
  18633. if (r.removeItem(e, function(e, t) {
  18634. t < 0 && i.warn("Got error  " + t + " removing key " + e + ".");
  18635. }), n) {
  18636. var s = null;
  18637. try {
  18638. s = JSON.parse(n);
  18639. } catch (t) {
  18640. i.warn("Error parsing JSON from kvstorage:", e, n, t);
  18641. }
  18642. t && t(s);
  18643. }
  18644. } else t && t(null);
  18645. });
  18646. }, e.prototype.save = function(e, t) {
  18647. if (null != t) if (e) {
  18648. var n = JSON.stringify(t);
  18649. r.storeItem(e, n, function(e, t) {
  18650. t < 0 ? i.warn("Got error " + t + " saving key " + e) : i.debug("Key " + e + " got properly stored with serialized data " + n);
  18651. });
  18652. } else i.error("Key parameter is missing"); else i.error("data is null/undefined");
  18653. }, e;
  18654. }();
  18655. t.StorageClient = a;
  18656. }).call(this, n(15));
  18657. }, function(e, t, n) {
  18658. "use strict";
  18659. Object.defineProperty(t, "__esModule", {
  18660. value: !0
  18661. });
  18662. var r = n(0), o = n(1), i = n(14), a = n(5), s = n(23), u = n(76), l = {
  18663. easing: s.Easing.CubicOut,
  18664. duration: i.Animation.defaultTweenOptions.duration / 2
  18665. }, c = {
  18666. easing: s.Easing.CubicIn,
  18667. duration: l.duration
  18668. }, p = function(e) {
  18669. function t() {
  18670. var t = null !== e && e.apply(this, arguments) || this;
  18671. return t.state = {
  18672. tweenState: "in"
  18673. }, t.inTweens = {}, t.outTweens = {}, t.allowUpdates = !0, t._didMount = !1, t;
  18674. }
  18675. return r.__extends(t, e), t.prototype.componentWillMount = function() {
  18676. var e = this;
  18677. this._didMount = !0, this.content = this.props.children, this.updateTweens(this.props),
  18678. this.props.playInOnMount || this.props.inTweens.map(function(t) {
  18679. e.inTweens[t.propertyName].set(t.toValue);
  18680. });
  18681. }, t.prototype.componentDidMount = function() {
  18682. this.props.playInOnMount && this.playIn(this.props);
  18683. }, t.prototype.componentWillReceiveProps = function(e) {
  18684. var t = this;
  18685. if (e.transitionId === this.props.transitionId) return this.content = e.children,
  18686. void (this.nextContent = e.children);
  18687. this.nextContent = e.children, this.updateTweens(e), this.setState({
  18688. tweenState: "out"
  18689. }, function() {
  18690. t.allowUpdates = !1, t.playOut(e).then(function() {
  18691. t.allowUpdates = !0, t.content = t.nextContent, t.updateTweens(e), t._didMount && t.setState({
  18692. tweenState: "in"
  18693. }, function() {
  18694. var n = t.playIn(e);
  18695. "function" == typeof t.props.onTransitionFinished && n.then(t.props.onTransitionFinished);
  18696. });
  18697. });
  18698. });
  18699. }, t.prototype.shouldComponentUpdate = function() {
  18700. return this.allowUpdates;
  18701. }, t.prototype.componentWillUnmount = function() {
  18702. var e = this;
  18703. this._didMount = !1, Object.keys(this.inTweens).forEach(function(t) {
  18704. e.inTweens[t].destroy();
  18705. }), Object.keys(this.outTweens).forEach(