123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308 |
- !function (t) {
- function e(e) {
- for (var n, a, l = e[0], u = e[1], h = e[2], c = 0, A = []; c < l.length; c++) a = l[c], Object.prototype.hasOwnProperty.call(r, a) && r[a] && A.push(r[a][0]), r[a] = 0;
- for (n in u) Object.prototype.hasOwnProperty.call(u, n) && (t[n] = u[n]);
- for (o && o(e); A.length;) A.shift()();
- return i.push.apply(i, h || []), s()
- }
- function s() {
- for (var t, e = 0; e < i.length; e++) {
- for (var s = i[e], n = !0, l = 1; l < s.length; l++) {
- var u = s[l];
- 0 !== r[u] && (n = !1)
- }
- n && (i.splice(e--, 1), t = a(a.s = s[0]))
- }
- return t
- }
- var n = {}, r = {22: 0}, i = [];
- function a(e) {
- if (n[e]) return n[e].exports;
- var s = n[e] = {i: e, l: !1, exports: {}};
- return t[e].call(s.exports, s, s.exports, a), s.l = !0, s.exports
- }
- a.m = t, a.c = n, a.d = function (t, e, s) {
- a.o(t, e) || Object.defineProperty(t, e, {enumerable: !0, get: s})
- }, a.r = function (t) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(t, "__esModule", {value: !0})
- }, a.t = function (t, e) {
- if (1 & e && (t = a(t)), 8 & e) return t;
- if (4 & e && "object" == typeof t && t && t.__esModule) return t;
- var s = Object.create(null);
- if (a.r(s), Object.defineProperty(s, "default", {
- enumerable: !0,
- value: t
- }), 2 & e && "string" != typeof t) for (var n in t) a.d(s, n, function (e) {
- return t[e]
- }.bind(null, n));
- return s
- }, a.n = function (t) {
- var e = t && t.__esModule ? function () {
- return t.default
- } : function () {
- return t
- };
- return a.d(e, "a", e), e
- }, a.o = function (t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }, a.p = "";
- var l = window.webpackJsonp = window.webpackJsonp || [], u = l.push.bind(l);
- l.push = e, l = l.slice();
- for (var h = 0; h < l.length; h++) e(l[h]);
- var o = u;
- i.push([153, 0]), s()
- }({
- 153: function (t, e, s) {
- "use strict";
- s.r(e);
- var n = s(25), r = s.n(n), i = s(3), a = s(21);
- class l {
- constructor() {
- var t, e, s;
- s = {
- A: 0,
- B: 1,
- C: 2,
- D: 3,
- E: 4
- }, (e = "ANSWERS_LETTERS_TO_INDEX") in (t = this) ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s
- }
- update(t) {
- this.answers = t
- }
- getAnswers(t) {
- return this.answers[t - 1]
- }
- aggregateAnswers() {
- const t = {};
- return this.ANSWERS_LETTERS.forEach(e => t[e] = 0), this.answers.forEach(e => {
- e && (t[e] || (t[e] = 0), t[e]++)
- }), t
- }
- mapAnswerToValue(t, e) {
- return e[this.ANSWERS_LETTERS_TO_INDEX[t]]
- }
- consecutives() {
- const t = [], e = this.answers;
- for (var s = 0; s < e.length - 1; s++) t.push(!(e[s] !== e[s + 1] || !e[s]));
- return t
- }
- }
- function u(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function h(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function o(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function c(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function A(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function d(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function w(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function g(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function v(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function f(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function Q(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function p(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- function T(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- const m = {
- "basic-1": class extends l {
- constructor() {
- super(), u(this, "ANSWERS_LETTERS", "ABCD".split("")), u(this, "TOTAL_ANSWERS", 4), u(this, "TOTAL_QUESTIONS", 3)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- return t ? t === this.getAnswers(2) : null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- return t ? this.aggregateAnswers().B == this.mapAnswerToValue(t, [0, 1, 2, 3]) : null
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.aggregateAnswers().A == this.mapAnswerToValue(t, [0, 1, 2, 3]) : null
- }
- }, "basic-2": class extends l {
- constructor() {
- super(), h(this, "ANSWERS_LETTERS", "ABCDE".split("")), h(this, "TOTAL_ANSWERS", 5), h(this, "TOTAL_QUESTIONS", 4)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- return t ? this.aggregateAnswers().A == this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) : null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, -1]);
- if ("E" === t) {
- return 0 == this.aggregateAnswers().A
- }
- return this.answers.indexOf("A") === e - 1
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.mapAnswerToValue(t, ["C", "D", "E", "A", "B"]) === this.getAnswers(2) : null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, ["C", "B", "A", "E", "D"]),
- n = 1 === Object(i.filter)(e, t => t >= 2).length;
- return e[s] >= 2 && n
- }
- }, "the-incredible-eight": class extends l {
- constructor() {
- super(), o(this, "ANSWERS_LETTERS", "ABCD".split("")), o(this, "TOTAL_ANSWERS", 4), o(this, "TOTAL_QUESTIONS", 8)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.aggregateAnswers().C;
- return this.mapAnswerToValue(t, [1, 2, 3, 4]) === e
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, ["D", "B", "C", "A"]), s = this.aggregateAnswers(), n = s[e];
- return 3 == Object(i.filter)(s, (t, e) => t > n).length
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, ["D", "C", "B", "A"]), s = this.aggregateAnswers(), n = s[e];
- return 3 == Object(i.filter)(s, (t, e) => t < n).length
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.aggregateAnswers();
- switch (t) {
- case"A":
- return 4 === e.A;
- case"B":
- return 1 === e.A;
- case"C":
- return 0 === e.B;
- case"D":
- return e.A === e.C
- }
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [5, 6, 7, 1]);
- return this.answers.indexOf("A") === e - 1
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = this.aggregateAnswers();
- return Object(i.map)(e, (t, e) => t).sort().reverse()[0] === this.mapAnswerToValue(t, [3, 4, 5, 6])
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = [], s = this.answers;
- for (var n = 0; n < s.length - 1; n++) e.push(!(s[n] !== s[n + 1] || !s[n]));
- const r = 1 === Object(i.filter)(e, t => t).length, a = this.mapAnswerToValue(t, [1, 6, 0, 3]);
- return r && e[a]
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, [4, 2, 3, 7]);
- return t === this.getAnswers(s) && 2 === e[t]
- }
- }, "srq-1": class extends l {
- constructor() {
- super(), c(this, "ANSWERS_LETTERS", "ABCDE".split("")), c(this, "TOTAL_ANSWERS", 5), c(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return this.answers.indexOf("E") === e - 1
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- this.aggregateAnswers();
- const e = this.mapAnswerToValue(t, [9, 7, 5, 3, 1]), s = this.getAnswers(e),
- n = Object(i.filter)([9, 7, 5, 3, 1], t => "B" === this.getAnswers(t));
- return "B" === s && 1 === n.length
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = this.consecutives(), s = 1 === Object(i.filter)(e, t => t).length,
- n = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return s && e[n]
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- this.aggregateAnswers();
- const e = this.mapAnswerToValue(t, [2, 4, 6, 8, 10]), s = this.getAnswers(e),
- n = Object(i.filter)([2, 4, 6, 8, 10], t => "A" === this.getAnswers(t));
- return "A" === s && 1 === n.length
- }
- validateQ5() {
- const t = this.getAnswers(5);
- return t ? this.aggregateAnswers().B === this.mapAnswerToValue(t, [5, 4, 3, 2, 1]) : null
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = Object(i.range)(1, 10, 2).map(t => this.getAnswers(t)),
- s = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), n = e.lastIndexOf(t);
- return -1 !== n && n === s
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return t === this.getAnswers(e)
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.getAnswers(9);
- if (!s) return !1;
- const n = this.mapAnswerToValue(s, [0, 1, 2, 3, 4]), r = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]);
- return Math.abs(n - e) === r
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = e.B + e.C + e.D;
- switch (t) {
- case"A":
- return -1 !== [1, 2, 3, 5, 7].indexOf(s);
- case"B":
- return -1 !== [1, 4, 9].indexOf(s);
- case"C":
- return -1 !== [1, 8].indexOf(s);
- case"D":
- return -1 !== [5, 10].indexOf(s);
- case"E":
- return -1 !== [1, 2, 6].indexOf(s)
- }
- }
- validateQ10() {
- return !!this.getAnswers(10) || null
- }
- }, "srq-2": class extends l {
- constructor() {
- super(), A(this, "ANSWERS_LETTERS", "ABCDE".split("")), A(this, "TOTAL_ANSWERS", 5), A(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [8, 7, 6, 5, 4]);
- return this.answers.indexOf("D") === e - 1
- }
- validateQ2() {
- const t = this.getAnswers(2);
- return t ? this.consecutives()[this.mapAnswerToValue(t, [2, 3, 4, 5, 6])] : null
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.aggregateAnswers().E === this.mapAnswerToValue(t, [1, 2, 3, 4, 5]) : null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- return t ? this.aggregateAnswers().A === this.mapAnswerToValue(t, [1, 2, 3, 4, 5]) : null
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, ["A", "B", "C", "D", "E"]);
- return e.A === e[s]
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = Object(i.range)(5, 10, 1).map(t => this.getAnswers(t)),
- s = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), n = e.lastIndexOf("B");
- return -1 !== n && n === s
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.getAnswers(8);
- if (!s) return !1;
- const n = this.mapAnswerToValue(s, [0, 1, 2, 3, 4]), r = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]);
- return Math.abs(n - e) === r
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return t === this.getAnswers(e)
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = this.aggregateAnswers();
- return this.mapAnswerToValue(t, [3, 4, 5, 6, 7]) === e.B + e.C + e.D
- }
- validateQ10() {
- return !!this.getAnswers(10) || null
- }
- }, "srq-3": class extends l {
- constructor() {
- super(), d(this, "ANSWERS_LETTERS", "ABCD".split("")), d(this, "TOTAL_ANSWERS", 4), d(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- return !!this.getAnswers(1) || null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.getAnswers(1), s = this.getAnswers(3);
- if (!e || !s) return !1;
- switch (t) {
- case"A":
- return t === s && t !== e;
- case"B":
- return t === e && t !== s;
- case"C":
- return t === e && t === s;
- case"D":
- return t !== e && t !== s
- }
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.mapAnswerToValue(t, [0, 1, 2, 3]) === this.aggregateAnswers().A : null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3]), s = this.consecutives();
- return e === Object(i.filter)(s, t => t).length
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.getAnswers(4);
- return !!e && this.mapAnswerToValue(t, ["C", "B", "A", "D"]) === e
- }
- validateQ6() {
- const t = this.getAnswers(6);
- return t ? 0 === this.aggregateAnswers()[this.mapAnswerToValue(t, ["A", "C", "D", "B"])] : null
- }
- validateQ7() {
- const t = this.getAnswers(7);
- return t ? "B" === t : null
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 2, 4]);
- return this.aggregateAnswers()[t] - 1 === e
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- switch (t) {
- case"A":
- return !0;
- case"B":
- return !1;
- case"C":
- return !0;
- case"D":
- return !1
- }
- }
- validateQ10() {
- const t = this.getAnswers(10);
- return t ? "D" !== t : null
- }
- }, "simple-srq-1": class extends l {
- constructor() {
- super(), w(this, "ANSWERS_LETTERS", "ABCD".split("")), w(this, "TOTAL_ANSWERS", 4), w(this, "TOTAL_QUESTIONS", 5)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- return t ? 1 === this.aggregateAnswers()[t] : null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, [3, 1, 5, 4]);
- return t === this.getAnswers(s) && 2 === e[t]
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.mapAnswerToValue(t, ["B", "D", "A", "C"]) === this.getAnswers(5) : null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [2, 3, 4, 5]);
- return this.answers.indexOf("A") === e - 1
- }
- validateQ5() {
- const t = this.getAnswers(5);
- return t ? this.mapAnswerToValue(t, ["C", "B", "D", "A"]) === this.getAnswers(3) : null
- }
- }, "simple-srq-2": class extends l {
- constructor() {
- super(), g(this, "ANSWERS_LETTERS", "ABCDE".split("")), g(this, "TOTAL_ANSWERS", 5), g(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- return !!this.getAnswers(1) || null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, ["B", "C", "D", "E", "A"]);
- return "E" === t ? e.A === e.B && e.A === e.C && e.A === e.D && e.A === e.E : e.A === e[s]
- }
- validateQ3() {
- const t = this.getAnswers(3);
- return t ? this.mapAnswerToValue(t, ["E", "D", "C", "B", "A"]) === this.getAnswers(10) : null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- return t ? this.mapAnswerToValue(t, ["A", "B", "C", "D", "E"]) === this.getAnswers(6) : null
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [3, 4, 5, 6, 7]);
- return t === this.getAnswers(e)
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [3, 4, 5, 6, 7]);
- return this.answers.indexOf("B") === e - 1
- }
- validateQ7() {
- const t = this.getAnswers(7);
- return t ? this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === this.aggregateAnswers().C : null
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.getAnswers(9);
- if (!s) return !1;
- const n = this.mapAnswerToValue(s, [0, 1, 2, 3, 4]), r = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]);
- return Math.abs(n - e) === r
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = e.A + e.E;
- switch (t) {
- case"A":
- return -1 !== [0, 2, 4, 6, 8, 10].indexOf(s);
- case"B":
- return -1 !== [1, 3, 5, 7, 9].indexOf(s);
- case"C":
- return -1 !== [1, 2, 3, 5, 7].indexOf(s);
- case"D":
- return -1 !== [1, 4, 9].indexOf(s);
- case"E":
- return -1 !== [5, 10].indexOf(s)
- }
- }
- validateQ10() {
- const t = this.getAnswers(10);
- return t ? this.mapAnswerToValue(t, ["C", "D", "A", "B", "E"]) === this.getAnswers(3) : null
- }
- }, "simple-srq-3": class extends l {
- constructor() {
- super(), v(this, "ANSWERS_LETTERS", "ABCDE".split("")), v(this, "TOTAL_ANSWERS", 5), v(this, "TOTAL_QUESTIONS", 5)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- if ("E" === t) {
- return 0 == this.aggregateAnswers().A
- }
- {
- const e = Object(i.range)(2, 6, 1).map(t => this.getAnswers(t)).indexOf("A");
- return this.mapAnswerToValue(t, [0, 1, 2, 3]) === e
- }
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]), s = this.aggregateAnswers();
- return e === s.A + s.E
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [[2, 5], [2, 4], [1, 3], [1, 4], [3, 5]]),
- s = this.aggregateAnswers(), n = this.getAnswers(e[0]), r = this.getAnswers(e[1]);
- return "C" === n && "C" === r && 2 === s.C
- }
- validateQ4() {
- const t = this.getAnswers(4);
- return t ? this.mapAnswerToValue(t, ["A", "C", "B", "D", "E"]) === this.getAnswers(5) : null
- }
- validateQ5() {
- const t = this.getAnswers(5);
- return t ? this.mapAnswerToValue(t, ["A", "C", "D", "B", "E"]) === this.getAnswers(4) : null
- }
- }, "simple-srq-4": class extends l {
- constructor() {
- super(), f(this, "ANSWERS_LETTERS", "ABCDE".split("")), f(this, "TOTAL_ANSWERS", 5), f(this, "TOTAL_QUESTIONS", 6)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- return t ? this.mapAnswerToValue(t, ["E", "D", "C", "B", "A"]) === this.getAnswers(2) : null
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]), s = this.getAnswers(e),
- n = Object(i.filter)([1, 2, 3, 4, 5], t => "C" === this.getAnswers(t));
- return "C" === s && 1 === n.length
- }
- validateQ3() {
- return !!this.getAnswers(3) || null
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return this.aggregateAnswers().B === e
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.consecutives();
- return e[this.mapAnswerToValue(t, [0, 1, 2, 3, 4])] && 1 === e.filter(t => t).length
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return t === this.getAnswers(e)
- }
- }, srat: class extends l {
- constructor() {
- super(), Q(this, "ANSWERS_LETTERS", "ABCDE".split("")), Q(this, "TOTAL_ANSWERS", 5), Q(this, "TOTAL_QUESTIONS", 20)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10(), this.validateQ11(), this.validateQ12(), this.validateQ13(), this.validateQ14(), this.validateQ15(), this.validateQ16(), this.validateQ17(), this.validateQ18(), this.validateQ19(), this.validateQ20()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return this.answers.indexOf("B") === e - 1
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.consecutives(), s = 1 === Object(i.filter)(e, t => t).length,
- n = this.mapAnswerToValue(t, [5, 6, 7, 8, 9]);
- return s && e[n]
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = this.aggregateAnswers().E;
- return this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === e
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.aggregateAnswers().A;
- return this.mapAnswerToValue(t, [4, 5, 6, 7, 8]) === e
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return t === this.getAnswers(e)
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = this.getAnswers(17);
- switch (t) {
- case"D":
- if ("C" !== e && "D" !== e && "E" !== e) return !0;
- case"E":
- return !1;
- default:
- return this.mapAnswerToValue(t, ["C", "D", "E", "A", "B"]) === e
- }
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.getAnswers(8);
- if (!s) return !1;
- const n = this.mapAnswerToValue(s, [0, 1, 2, 3, 4]), r = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]);
- return Math.abs(n - e) === r
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [4, 5, 6, 7, 8]), s = this.aggregateAnswers();
- return e === s.A + s.E
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = Object(i.range)(10, 15, 1).map(t => this.getAnswers(t)).indexOf(t);
- return this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === e
- }
- validateQ10() {
- const t = this.getAnswers(10);
- return t ? this.mapAnswerToValue(t, ["D", "A", "E", "B", "C"]) === this.getAnswers(16) : null
- }
- validateQ11() {
- const t = this.getAnswers(11);
- if (!t) return null;
- const e = Object(i.range)(1, 11, 1).map(t => this.getAnswers(t));
- return this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === Object(i.filter)(e, t => "B" === t).length
- }
- validateQ12() {
- const t = this.getAnswers(12);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = e.B + e.C + e.D;
- switch (t) {
- case"A":
- return -1 !== [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20].indexOf(s);
- case"B":
- return -1 !== [1, 3, 5, 7, 9, 11, 13, 15, 17, 19].indexOf(s);
- case"C":
- return -1 !== [1, 4, 9, 16].indexOf(s);
- case"D":
- return -1 !== [1, 2, 3, 5, 7, 11, 13, 17].indexOf(s);
- case"E":
- return -1 !== [5, 10, 15, 20].indexOf(s)
- }
- }
- validateQ13() {
- const t = this.getAnswers(13);
- if (!t) return null;
- this.aggregateAnswers();
- const e = this.mapAnswerToValue(t, [9, 11, 13, 15, 17]), s = this.getAnswers(e),
- n = Object(i.filter)([19, 17, 15, 13, 11, 9, 7, 5, 3, 1], t => "A" === this.getAnswers(t));
- return "A" === s && 1 === n.length
- }
- validateQ14() {
- const t = this.getAnswers(14);
- if (!t) return null;
- const e = this.aggregateAnswers().D;
- return this.mapAnswerToValue(t, [6, 7, 8, 9, 10]) === e
- }
- validateQ15() {
- const t = this.getAnswers(15);
- return t ? this.mapAnswerToValue(t, ["A", "B", "C", "D", "E"]) === this.getAnswers(12) : null
- }
- validateQ16() {
- const t = this.getAnswers(16);
- return t ? this.mapAnswerToValue(t, ["D", "C", "B", "A", "E"]) === this.getAnswers(10) : null
- }
- validateQ17() {
- const t = this.getAnswers(17);
- if (!t) return null;
- const e = this.getAnswers(6);
- switch (t) {
- case"D":
- if ("C" !== e && "D" !== e && "E" !== e) return !0;
- case"E":
- return !1;
- default:
- return this.mapAnswerToValue(t, ["C", "D", "E", "A", "B"]) === e
- }
- }
- validateQ18() {
- const t = this.getAnswers(18);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, ["B", "C", "D", "E", "A"]);
- return "E" === t ? e.A !== e.B && e.A !== e.C && e.A !== e.D && e.A !== e.E : e.A === e[s]
- }
- validateQ19() {
- return !!this.getAnswers(19) || null
- }
- validateQ20() {
- const t = this.getAnswers(20);
- return t ? "E" === t : null
- }
- }, "dont-be-puzzled": class extends l {
- constructor() {
- super(), p(this, "ANSWERS_LETTERS", "ABCDE".split("")), p(this, "TOTAL_ANSWERS", 5), p(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [4, 3, 2, 1, 1]), s = this.answers.indexOf("A");
- return "E" === t ? s > 3 || -1 === s : s === e - 1
- }
- validateQ2() {
- const t = this.getAnswers(2);
- return t ? this.consecutives()[this.mapAnswerToValue(t, [2, 3, 4, 5, 6])] : null
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = Object(i.range)(4, 9, 1).map(t => this.getAnswers(t)).indexOf("A");
- return this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === e
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- [2, 4, 6, 8, 10].map(t => this.getAnswers(t));
- const e = this.mapAnswerToValue(t, [2, 4, 6, 8, 10]);
- return this.answers.indexOf("B") === e - 1
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- this.aggregateAnswers();
- const e = this.mapAnswerToValue(t, [1, 3, 5, 7, 9]), s = this.getAnswers(e),
- n = Object(i.filter)([1, 3, 5, 7, 9], t => "C" === this.getAnswers(t));
- return "C" === s && 1 === n.length
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = Object(i.filter)([1, 2, 3, 4, 5], t => "D" === this.getAnswers(t)),
- s = Object(i.filter)([7, 8, 9, 10], t => "D" === this.getAnswers(t)), n = e.length >= 1,
- r = s.length >= 1;
- switch (t) {
- case"A":
- return n && !r;
- case"B":
- return !n && r;
- case"C":
- return n && r;
- case"D":
- case"E":
- return !1
- }
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = Object(i.range)(5, 10, 1).map(t => this.getAnswers(t)),
- s = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), n = e.lastIndexOf("E");
- return -1 !== n && n === s
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.aggregateAnswers();
- return this.mapAnswerToValue(t, [7, 6, 5, 4, 3]) === e.B + e.C + e.D
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.aggregateAnswers();
- return e === s.A + s.E
- }
- validateQ10() {
- return !!this.getAnswers(10) || null
- }
- }, "small-srat": class extends l {
- constructor() {
- super(), T(this, "ANSWERS_LETTERS", "ABCDE".split("")), T(this, "TOTAL_ANSWERS", 5), T(this, "TOTAL_QUESTIONS", 10)
- }
- validade() {
- return [this.validateQ1(), this.validateQ2(), this.validateQ3(), this.validateQ4(), this.validateQ5(), this.validateQ6(), this.validateQ7(), this.validateQ8(), this.validateQ9(), this.validateQ10()]
- }
- validateQ1() {
- const t = this.getAnswers(1);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [2, 3, 4, 5, 6]);
- return this.answers.indexOf("B") === e - 1
- }
- validateQ2() {
- const t = this.getAnswers(2);
- if (!t) return null;
- const e = this.consecutives(), s = 1 === Object(i.filter)(e, t => t).length,
- n = this.mapAnswerToValue(t, [1, 2, 3, 4, 5]);
- return s && e[n]
- }
- validateQ3() {
- const t = this.getAnswers(3);
- if (!t) return null;
- const e = Object(i.range)(6, 11, 1).map(t => this.getAnswers(t)),
- s = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]), n = e.lastIndexOf(t);
- return -1 !== n && n === s
- }
- validateQ4() {
- const t = this.getAnswers(4);
- if (!t) return null;
- const e = this.aggregateAnswers().A;
- return this.mapAnswerToValue(t, [0, 1, 2, 3, 4]) === e
- }
- validateQ5() {
- const t = this.getAnswers(5);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [10, 9, 8, 7, 6]);
- return t === this.getAnswers(e)
- }
- validateQ6() {
- const t = this.getAnswers(6);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = this.mapAnswerToValue(t, ["B", "C", "D", "E", "A"]);
- return "E" === t ? e.A !== e.B && e.A !== e.C && e.A !== e.D && e.A !== e.E : e.A === e[s]
- }
- validateQ7() {
- const t = this.getAnswers(7);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [0, 1, 2, 3, 4]), s = this.getAnswers(8);
- if (!s) return !1;
- const n = this.mapAnswerToValue(s, [0, 1, 2, 3, 4]), r = this.mapAnswerToValue(t, [4, 3, 2, 1, 0]);
- return Math.abs(n - e) === r
- }
- validateQ8() {
- const t = this.getAnswers(8);
- if (!t) return null;
- const e = this.mapAnswerToValue(t, [2, 3, 4, 5, 6]), s = this.aggregateAnswers();
- return e === s.A + s.E
- }
- validateQ9() {
- const t = this.getAnswers(9);
- if (!t) return null;
- const e = this.aggregateAnswers(), s = e.B + e.C + e.D;
- switch (t) {
- case"A":
- return -1 !== [1, 2, 3, 5, 7].indexOf(s);
- case"B":
- return -1 !== [1, 2, 6].indexOf(s);
- case"C":
- return -1 !== [1, 4, 9].indexOf(s);
- case"D":
- return -1 !== [1, 8].indexOf(s);
- case"E":
- return -1 !== [5, 10].indexOf(s)
- }
- }
- validateQ10() {
- return !!this.getAnswers(10) || null
- }
- }
- };
- class E {
- constructor(t) {
- this.won = !1, this.puzzle = t, this.$questions = r()("div[data-question]"), this.setupListeners();
- const e = new m[this.puzzle.slug];
- this.quiz = e, this.answers_state = Object(i.range)(e.TOTAL_QUESTIONS).map(() => Object(i.range)(e.TOTAL_ANSWERS).map(() => null))
- }
- canToggle(t, e) {
- const {answers_state: s} = this;
- return !0 === s[t][e] || !Object(i.some)(s[t])
- }
- toggle(t, e) {
- if (!this.canToggle(t, e)) return;
- const {answers_state: s} = this;
- s[t][e] = {null: !1, true: null, false: !0}[s[t][e]]
- }
- onClick(t, e) {
- this.toggle(t, e), this.update()
- }
- update() {
- const t = this.getAnswers();
- this.quiz.update(t);
- const e = this.quiz.validade();
- this.updateUI(e), Object(i.every)(e) && !this.won && (this.won = !0, a.a.modalEndGame(), amplitude.getInstance().logEvent("srq-win", {slug: puzzle.slug}))
- }
- updateUI(t) {
- Object(i.forEach)(this.$questions, (e, s) => {
- const n = r()(e);
- n.removeClass("correct wrong");
- const i = t[s];
- null !== i && n.addClass(i ? "correct" : "wrong")
- }), Object(i.forEach)(this.$questions, (t, e) => {
- const s = r()(t).find("ul > li"), n = Object(i.some)(this.answers_state[e]);
- Object(i.forEach)(s, (t, s) => {
- const i = r()(t);
- i.removeClass();
- const a = this.answers_state[e][s];
- !0 === a ? i.addClass("correct") : ((!1 === a || n) && i.addClass("wrong"), n && i.addClass("inactive"))
- })
- })
- }
- setupListeners() {
- this.$questions.on("click", "ul > li", t => {
- const e = r()(t.currentTarget);
- this.onClick(e.data("question"), e.data("alternative"))
- })
- }
- getAnswers() {
- return this.answers_state.map(t => {
- const e = t.indexOf(!0);
- return -1 != e ? this.quiz.ANSWERS_LETTERS[e] : null
- })
- }
- }
- let O = null;
- window.loadSRQ = t => {
- O = new E(t)
- }
- }, 16: function (t, e) {
- var s;
- s = function () {
- return this
- }();
- try {
- s = s || new Function("return this")()
- } catch (t) {
- "object" == typeof window && (s = window)
- }
- t.exports = s
- }, 21: function (t, e, s) {
- "use strict";
- s.d(e, "b", (function () {
- return i
- })), s.d(e, "a", (function () {
- return a
- }));
- var n = s(3);
- function r(t, e, s) {
- return e in t ? Object.defineProperty(t, e, {
- value: s,
- enumerable: !0,
- configurable: !0,
- writable: !0
- }) : t[e] = s, t
- }
- class i {
- constructor(t) {
- r(this, "$div", void 0), r(this, "$overlay", void 0), this.$div = t, this.$overlay = $('\n <div class="overlay-endgame">\n <div class="brand-wrapper">\n <div class="brand"></div>\n </div>\n </div>')
- }
- show() {
- return this.$div.append(this.$overlay)
- }
- hide() {
- return this.$overlay.remove()
- }
- }
- class a {
- static modalBase(t, e) {
- const s = $("#modal-".concat(t));
- if (s.data("has-template")) {
- const r = s.find(".modal-body"), i = $("#templateBody-".concat(t)),
- a = Object(n.template)(i[0].innerHTML);
- r.html(a(e))
- }
- return s.modal("show")
- }
- static modalEndGame(t) {
- const e = this.modalBase("end-game", t);
- return new Promise(t => {
- e.on("hidden.bs.modal", () => t())
- })
- }
- }
- }, 24: function (t, e) {
- t.exports = function (t) {
- return t.webpackPolyfill || (t.deprecate = function () {
- }, t.paths = [], t.children || (t.children = []), Object.defineProperty(t, "loaded", {
- enumerable: !0,
- get: function () {
- return t.l
- }
- }), Object.defineProperty(t, "id", {
- enumerable: !0, get: function () {
- return t.i
- }
- }), t.webpackPolyfill = 1), t
- }
- }
- });
- console.log(1);
|