Advertisement
TigerC10

sorting-quiz.bundle-1049329190.js

May 8th, 2016
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function(t, e, n) {
  2.     "use strict";
  3.     function r(t) {
  4.         return t && t.__esModule ? t : {
  5.             "default": t
  6.         }
  7.     }
  8.     function i(t, e, n, r, i, o) {
  9.         var a = this
  10.           , u = t.path().split("/")[1]
  11.           , s = u.replace("/", "");
  12.         this.quiz = u.replace("/", "").replace("-", " "),
  13.         this.quizIntroContent = v["default"][s],
  14.         this.quizReady = !1,
  15.         this.fawkesUrl = o.fawkes.url,
  16.         n.getQuizDeck(s).then(function(t) {
  17.             return r.initialise({
  18.                 type: s,
  19.                 length: t.length
  20.             }),
  21.             t
  22.         }).then(function(t) {
  23.             i.addQuestions(t)
  24.         }).then(function() {
  25.             return a.quizReady = !0
  26.         }),
  27.         this.startQuiz = function() {
  28.             r.nextStep(),
  29.             e.go("question.answer", {
  30.                 type: s,
  31.                 step: r.getActiveStep(),
  32.                 answer: 1
  33.             })
  34.         }
  35.     }
  36.     Object.defineProperty(e, "__esModule", {
  37.         value: !0
  38.     });
  39.     var o = n(59)
  40.       , a = n(12)
  41.       , u = r(a)
  42.       , s = n(132)
  43.       , c = r(s)
  44.       , l = n(134)
  45.       , f = r(l)
  46.       , p = n(136)
  47.       , h = r(p)
  48.       , d = n(137)
  49.       , v = r(d);
  50.     e["default"] = (0,
  51.     o.controller)("IntroPage", ["$location", "$state", "quizRepository", "quizStore", "questionStore", "config", i], [c["default"], f["default"], h["default"], u["default"]])
  52. }
  53. , function(t, e, n) {
  54.     "use strict";
  55.     function r(t) {
  56.         return t && t.__esModule ? t : {
  57.             "default": t
  58.         }
  59.     }
  60.     function i(t, e) {
  61.         function n() {
  62.             return t.random(1, 10)
  63.         }
  64.         this.getQuizDeck = function(t) {
  65.             return e.get("api/quiz/" + t + "/" + n()).then(function(t) {
  66.                 return t.data
  67.             })
  68.         }
  69.         ,
  70.         this.getOutcome = function(t, n) {
  71.             return e.post("api/quiz/" + t, n).then(function(t) {
  72.                 return t.data.outcome
  73.             })
  74.         }
  75.     }
  76.     Object.defineProperty(e, "__esModule", {
  77.         value: !0
  78.     });
  79.     var o = n(2)
  80.       , a = r(o)
  81.       , u = n(133)
  82.       , s = r(u);
  83.     e["default"] = a["default"].module("service.quizRepository", [s["default"]]).service("quizRepository", ["_", "$http", i]).name
  84. }
  85. , function(t, e, n) {
  86.     "use strict";
  87.     function r(t) {
  88.         return t && t.__esModule ? t : {
  89.             "default": t
  90.         }
  91.     }
  92.     Object.defineProperty(e, "__esModule", {
  93.         value: !0
  94.     });
  95.     var i = n(79)
  96.       , o = r(i)
  97.       , a = n(59);
  98.     e["default"] = (0,
  99.     a.factory)("_", [function() {
  100.         return o["default"]
  101.     }
  102.     ])
  103. }
  104. , function(t, e, n) {
  105.     "use strict";
  106.     function r(t) {
  107.         return t && t.__esModule ? t : {
  108.             "default": t
  109.         }
  110.     }
  111.     Object.defineProperty(e, "__esModule", {
  112.         value: !0
  113.     });
  114.     var i = n(59)
  115.       , o = n(135)
  116.       , a = r(o);
  117.     e["default"] = (0,
  118.     i.factory)("quizStore", ["sessionStorageFactory", function(t) {
  119.         var e = t("quiz-in-progress");
  120.         return {
  121.             initialise: function(t) {
  122.                 e.put("type", t.type),
  123.                 e.put("length", t.length),
  124.                 e.put("step", 0)
  125.             },
  126.             getActiveStep: function() {
  127.                 var t = e.get("length")
  128.                   , n = e.get("step");
  129.                 return n > t ? "outcome" : n
  130.             },
  131.             nextStep: function() {
  132.                 var t = e.get("step") || 0;
  133.                 e.put("step", t + 1),
  134.                 e.put("answerDirection", null )
  135.             },
  136.             initAnswers: function(t) {
  137.                 e.put("answer", t.answerNumber),
  138.                 e.put("answerLength", t.length)
  139.             },
  140.             getActiveAnswer: function() {
  141.                 return e.get("answer")
  142.             },
  143.             getAnswerLength: function() {
  144.                 return e.get("answerLength")
  145.             },
  146.             getAnswerDirection: function() {
  147.                 return e.get("answerDirection")
  148.             },
  149.             previousAnswer: function() {
  150.                 var t = e.get("answer")
  151.                   , n = e.get("answerLength")
  152.                   , r = t - 1;
  153.                 0 >= r && (r = n),
  154.                 e.put("answer", r),
  155.                 e.put("answerDirection", "previous")
  156.             },
  157.             nextAnswer: function() {
  158.                 var t = e.get("answer")
  159.                   , n = e.get("answerLength")
  160.                   , r = t + 1;
  161.                 r > n && (r = 1),
  162.                 e.put("answer", r),
  163.                 e.put("answerDirection", "next")
  164.             },
  165.             getQuizType: function() {
  166.                 return e.get("type")
  167.             },
  168.             reset: function() {
  169.                 return e.clearAll()
  170.             }
  171.         }
  172.     }
  173.     ], [a["default"]])
  174. }
  175. , function(t, e, n) {
  176.     "use strict";
  177.     function r(t) {
  178.         return t && t.__esModule ? t : {
  179.             "default": t
  180.         }
  181.     }
  182.     function i(t, e) {
  183.         if (!(t instanceof e))
  184.             throw new TypeError("Cannot call a class as a function")
  185.     }
  186.     function o(t, e) {
  187.         var n = l(t.getItem(e)) || {};
  188.         return new (function() {
  189.             function r() {
  190.                 i(this, r)
  191.             }
  192.             return a(r, [{
  193.                 key: "put",
  194.                 value: function(r, i) {
  195.                     n[r] = i,
  196.                     t.setItem(e, f(n))
  197.                 }
  198.             }, {
  199.                 key: "get",
  200.                 value: function(t) {
  201.                     return n[t]
  202.                 }
  203.             }, {
  204.                 key: "getAll",
  205.                 value: function() {
  206.                     return n
  207.                 }
  208.             }, {
  209.                 key: "info",
  210.                 value: function() {
  211.                     return {
  212.                         id: e,
  213.                         size: Object.keys(n).length
  214.                     }
  215.                 }
  216.             }, {
  217.                 key: "clear",
  218.                 value: function() {
  219.                     t.removeItem(e)
  220.                 }
  221.             }, {
  222.                 key: "clearAll",
  223.                 value: function() {
  224.                     t.clear()
  225.                 }
  226.             }]),
  227.             r
  228.         }())
  229.     }
  230.     Object.defineProperty(e, "__esModule", {
  231.         value: !0
  232.     });
  233.     var a = function() {
  234.         function t(t, e) {
  235.             for (var n = 0; n < e.length; n++) {
  236.                 var r = e[n];
  237.                 r.enumerable = r.enumerable || !1,
  238.                 r.configurable = !0,
  239.                 "value" in r && (r.writable = !0),
  240.                 Object.defineProperty(t, r.key, r)
  241.             }
  242.         }
  243.         return function(e, n, r) {
  244.             return n && t(e.prototype, n),
  245.             r && t(e, r),
  246.             e
  247.         }
  248.     }()
  249.       , u = n(2)
  250.       , s = r(u)
  251.       , c = n(59)
  252.       , l = s["default"].fromJson
  253.       , f = s["default"].toJson;
  254.     e["default"] = (0,
  255.     c.factory)("sessionStorageFactory", ["$window", function(t) {
  256.         return function(e) {
  257.             return new o(t.sessionStorage,e)
  258.         }
  259.     }
  260.     ])
  261. }
  262. , function(t, e, n) {
  263.     "use strict";
  264.     function r(t) {
  265.         return t && t.__esModule ? t : {
  266.             "default": t
  267.         }
  268.     }
  269.     Object.defineProperty(e, "__esModule", {
  270.         value: !0
  271.     });
  272.     var i = n(59)
  273.       , o = n(135)
  274.       , a = r(o);
  275.     e["default"] = (0,
  276.     i.factory)("questionStore", ["sessionStorageFactory", "quizStore", function(t, e) {
  277.         var n = void 0;
  278.         return Boolean(e.getQuizType()) && (n = t(e.getQuizType())),
  279.         {
  280.             addQuestions: function(r) {
  281.                 n = n || t(e.getQuizType()),
  282.                 r.forEach(function(t, e) {
  283.                     n.put(e + 1, t)
  284.                 })
  285.             },
  286.             getQuestion: function() {
  287.                 return n.get(e.getActiveStep())
  288.             }
  289.         }
  290.     }
  291.     ], [a["default"]])
  292. }
  293. , function(t, e) {
  294.     "use strict";
  295.     Object.defineProperty(e, "__esModule", {
  296.         value: !0
  297.     }),
  298.     e["default"] = {
  299.         wand: {
  300.             storyTitle: "Mr Ollivander",
  301.             storyUri: "https://www.pottermore.com/writing-by-jk-rowling/mr-ollivander",
  302.             quizTitle: "The Wand Ceremony",
  303.             quizIntroText: "Take your time and answer honestly - your answers are final."
  304.         },
  305.         "sorting-hat": {
  306.             storyTitle: "The Sorting Hat",
  307.             storyUri: "https://www.pottermore.com/writing-by-jk-rowling/the-sorting-hat",
  308.             quizTitle: "The Sorting Ceremony",
  309.             quizIntroText: "Answer truthfully, after all the hat's decision is final."
  310.         },
  311.         "ilvermorny-sorting": {
  312.             storyTitle: "Ilvermorny School of Witchcraft and Wizardry",
  313.             storyUri: "https://www.pottermore.com/collection-episodic/ilvermorny-school-of-witchcraft-and-wizardry",
  314.             quizTitle: "The Ilvermorny Sorting Ceremony",
  315.             quizIntroText: "Where do you belong? Horned Serpent, Wampus, Thunderbird or Pukwudgie..."
  316.         }
  317.     }
  318. }
  319. , function(t, e) {
  320.     t.exports = '<div class=quiz> <div class=quiz-intro> <section class=quiz-intro__section> <h2 class=quiz-intro__section-title>{{ctrl.quizIntroContent.storyTitle}}</h2> <h3 class=quiz-intro__section-sub-title>By J.K. Rowling</h3> <p> <a href={{ctrl.quizIntroContent.storyUri}} class=btn>Read the story</a> </p> </section> <span class=quiz-intro__divider>OR</span> <section class=quiz-intro__section> <h2 class=quiz-intro__section-title>{{ctrl.quizIntroContent.quizTitle}}</h2> <h3 class=quiz-intro__section-sub-title>{{ctrl.quizIntroContent.quizIntroText}}</h3> <button class="quiz-intro__button btn" data-r-btn=begin ng-disabled=!ctrl.quizReady ng-click=ctrl.startQuiz()>Begin the experience</button> </section> </div> </div>'
  321. }
  322. , function(t, e, n) {
  323.     "use strict";
  324.     function r(t) {
  325.         return t && t.__esModule ? t : {
  326.             "default": t
  327.         }
  328.     }
  329.     function i(t, e) {
  330.         var n = void 0
  331.           , r = void 0;
  332.         return u["default"].isNumber(t) ? (n = "question.answer",
  333.         r = {
  334.             step: t,
  335.             answer: 1
  336.         }) : (n = "result",
  337.         r = {
  338.             type: e
  339.         }),
  340.         {
  341.             id: n,
  342.             params: r
  343.         }
  344.     }
  345.     function o(t, e, n, r, o) {
  346.         function a(t) {
  347.             var e = i(t, r.getQuizType());
  348.             n.go(e.id, e.params)
  349.         }
  350.         var u = void 0
  351.           , s = void 0;
  352.         u = parseInt(e.step, 10),
  353.         s = r.getActiveStep(),
  354.         u !== s && a(s);
  355.         var c = o.getQuestion();
  356.         this.question = c.question,
  357.         this.theme = c.theme,
  358.         this.nextQuestion = function() {
  359.             t.scrollTo(0, 0),
  360.             r.nextStep(),
  361.             a(r.getActiveStep())
  362.         }
  363.     }
  364.     Object.defineProperty(e, "__esModule", {
  365.         value: !0
  366.     });
  367.     var a = n(2)
  368.       , u = r(a)
  369.       , s = n(59)
  370.       , c = n(140)
  371.       , l = r(c)
  372.       , f = n(145)
  373.       , p = r(f)
  374.       , h = n(146)
  375.       , d = r(h)
  376.       , v = n(148)
  377.       , $ = r(v)
  378.       , m = n(152)
  379.       , g = r(m)
  380.       , y = n(134)
  381.       , w = r(y)
  382.       , b = n(136)
  383.       , x = r(b);
  384.     e["default"] = (0,
  385.     s.controller)("QuestionPage", ["$window", "$stateParams", "$state", "quizStore", "questionStore", o], [g["default"], d["default"], l["default"], w["default"], x["default"], p["default"], $["default"]])
  386. }
  387. , function(t, e, n) {
  388.     "use strict";
  389.     function r(t) {
  390.         return t && t.__esModule ? t : {
  391.             "default": t
  392.         }
  393.     }
  394.     Object.defineProperty(e, "__esModule", {
  395.         value: !0
  396.     });
  397.     var i = n(2)
  398.       , o = r(i)
  399.       , a = n(134)
  400.       , u = r(a)
  401.       , s = n(141)
  402.       , c = r(s)
  403.       , l = n(144)
  404.       , f = r(l);
  405.     e["default"] = o["default"].module("directive.pmIndicator", [u["default"]]).directive("pmIndicator", function() {
  406.         return {
  407.             restrict: "E",
  408.             replace: !0,
  409.             scope: {},
  410.             controller: ["$scope", "quizStore", c["default"]],
  411.             controllerAs: "ctrl",
  412.             template: f["default"]
  413.         }
  414.     }).name
  415. }
  416. , function(t, e, n) {
  417.     "use strict";
  418.     function r(t) {
  419.         return t && t.__esModule ? t : {
  420.             "default": t
  421.         }
  422.     }
  423.     function i(t) {
  424.         return function(e) {
  425.             return t((0,
  426.             u["default"])(1, e + 1))
  427.         }
  428.     }
  429.     function o(t, e) {
  430.         var n = this;
  431.         t.$watch(function() {
  432.             return e.getAnswerLength()
  433.         }, i(function(t) {
  434.             n.dots = t
  435.         })),
  436.         this.isActive = function(t) {
  437.             return t === e.getActiveAnswer()
  438.         }
  439.     }
  440.     Object.defineProperty(e, "__esModule", {
  441.         value: !0
  442.     });
  443.     var a = n(142)
  444.       , u = r(a);
  445.     e["default"] = o
  446. }
  447. , function(t, e, n) {
  448.     function r(t, e, n) {
  449.         n && i(t, e, n) && (e = n = void 0),
  450.         t = +t || 0,
  451.         n = null  == n ? 1 : +n || 0,
  452.         null  == e ? (e = t,
  453.         t = 0) : e = +e || 0;
  454.         for (var r = -1, u = a(o((e - t) / (n || 1)), 0), s = Array(u); ++r < u; )
  455.             s[r] = t,
  456.             t += n;
  457.         return s
  458.     }
  459.     var i = n(143)
  460.       , o = Math.ceil
  461.       , a = Math.max;
  462.     t.exports = r
  463. }
  464. , function(t, e, n) {
  465.     function r(t, e, n) {
  466.         if (!a(n))
  467.             return !1;
  468.         var r = typeof e;
  469.         if ("number" == r ? i(n) && o(e, n.length) : "string" == r && e in n) {
  470.             var u = n[e];
  471.             return t === t ? t === u : u !== u
  472.         }
  473.         return !1
  474.     }
  475.     var i = n(103)
  476.       , o = n(50)
  477.       , a = n(28);
  478.     t.exports = r
  479. }
  480. , function(t, e) {
  481.     t.exports = '<div class=indicator> <em class=indicator__dot ng-class="{\'is-selected\': ctrl.isActive(dot) }" ng-repeat="dot in ctrl.dots">•</em> </div>'
  482. }
  483. , function(t, e, n) {
  484.     "use strict";
  485.     function r(t) {
  486.         return t && t.__esModule ? t : {
  487.             "default": t
  488.         }
  489.     }
  490.     Object.defineProperty(e, "__esModule", {
  491.         value: !0
  492.     });
  493.     var i = n(2)
  494.       , o = r(i);
  495.     e["default"] = o["default"].module("directive.goToAnswer", []).directive("pmGoToAnswer", ["$window", "$interval", function(t, e) {
  496.         return {
  497.             restrict: "A",
  498.             replace: !0,
  499.             scope: {
  500.                 question: "@"
  501.             },
  502.             link: function(n, r) {
  503.                 var i = function() {
  504.                     var n = t.scrollY
  505.                       , r = e(function() {
  506.                         n < t.innerHeight ? (n += 10,
  507.                         t.scrollTo(0, n)) : e.cancel(r)
  508.                     }, 1)
  509.                 }
  510.                 ;
  511.                 ["click", "touchstart"].forEach(function(t) {
  512.                     r[0].addEventListener(t, i, !1)
  513.                 })
  514.             }
  515.         }
  516.     }
  517.     ]).name
  518. }
  519. , function(t, e, n) {
  520.     "use strict";
  521.     function r(t) {
  522.         return t && t.__esModule ? t : {
  523.             "default": t
  524.         }
  525.     }
  526.     Object.defineProperty(e, "__esModule", {
  527.         value: !0
  528.     });
  529.     var i = n(2)
  530.       , o = r(i)
  531.       , a = n(147)
  532.       , u = r(a);
  533.     e["default"] = o["default"].module("directive.quizQuestion", []).directive("pmQuizQuestion", [function() {
  534.         return {
  535.             restrict: "E",
  536.             replace: !0,
  537.             scope: {
  538.                 question: "@"
  539.             },
  540.             template: u["default"]
  541.         }
  542.     }
  543.     ]).name
  544. }
  545. , function(t, e) {
  546.     t.exports = "<p class=quiz-question>{{ question }}</p>"
  547. }
  548. , function(t, e, n) {
  549.     "use strict";
  550.     function r(t) {
  551.         return t && t.__esModule ? t : {
  552.             "default": t
  553.         }
  554.     }
  555.     function i(t, e) {
  556.         return function(n) {
  557.             n.keyCode === t && e()
  558.         }
  559.     }
  560.     Object.defineProperty(e, "__esModule", {
  561.         value: !0
  562.     });
  563.     var o = n(2)
  564.       , a = r(o)
  565.       , u = n(81)
  566.       , s = r(u)
  567.       , c = n(149)
  568.       , l = r(c)
  569.       , f = n(134)
  570.       , p = r(f)
  571.       , h = n(151)
  572.       , d = r(h)
  573.       , v = s["default"].ENTER;
  574.     e["default"] = a["default"].module("directive.pmQuizAnswerChooser", [l["default"], p["default"]]).directive("pmQuizAnswerChooser", ["quizStore", "domEvent", function(t, e) {
  575.         return {
  576.             replace: !0,
  577.             restrict: "E",
  578.             scope: {
  579.                 type: "@",
  580.                 onChoose: "&",
  581.                 onMatch: "&",
  582.                 style: "="
  583.             },
  584.             template: d["default"],
  585.             link: function(n, r) {
  586.                 n.clickHandler = function() {
  587.                     n.onChoose()
  588.                 }
  589.                 ,
  590.                 n.keyUpHandler = i(v, function() {
  591.                     n.onChoose()
  592.                 }),
  593.                 t.getAnswerDirection() === n.type && e.focus(r)
  594.             }
  595.         }
  596.     }
  597.     ]).name
  598. }
  599. , function(t, e, n) {
  600.     "use strict";
  601.     function r(t) {
  602.         return t && t.__esModule ? t : {
  603.             "default": t
  604.         }
  605.     }
  606.     Object.defineProperty(e, "__esModule", {
  607.         value: !0
  608.     });
  609.     var i = n(150)
  610.       , o = r(i);
  611.     e["default"] = o["default"]
  612. }
  613. , function(t, e, n) {
  614.     "use strict";
  615.     function r(t) {
  616.         return t && t.__esModule ? t : {
  617.             "default": t
  618.         }
  619.     }
  620.     Object.defineProperty(e, "__esModule", {
  621.         value: !0
  622.     });
  623.     var i = n(9)
  624.       , o = r(i);
  625.     e["default"] = o["default"].module("utils.domEvent", []).factory("domEvent", [function() {
  626.         return {
  627.             focus: function(t) {
  628.                 return t[0].focus()
  629.             }
  630.         }
  631.     }
  632.     ]).name
  633. }
  634. , function(t, e) {
  635.     t.exports = '<a data-r-answer-navigation="{{ type }}" ng-click=clickHandler() ng-keyup=keyUpHandler($event) role=button> <span ng-style=style></span> </a>'
  636. }
  637. , function(t, e, n) {
  638.     "use strict";
  639.     function r(t) {
  640.         return t && t.__esModule ? t : {
  641.             "default": t
  642.         }
  643.     }
  644.     Object.defineProperty(e, "__esModule", {
  645.         value: !0
  646.     });
  647.     var i = n(2)
  648.       , o = r(i)
  649.       , a = n(153)
  650.       , u = r(a);
  651.     e["default"] = o["default"].module("directive.sortingIllustration", []).directive("pmSortingIllustration", [function() {
  652.         return {
  653.             transclude: !0,
  654.             restrict: "E",
  655.             replace: !0,
  656.             scope: {
  657.                 illustration: "@"
  658.             },
  659.             template: u["default"]
  660.         }
  661.     }
  662.     ]).name
  663. }
  664. , function(t, e) {
  665.     t.exports = '<div class="quiz-illustration quiz-illustration--{{ illustration }}"> <div class=quiz-illustration__background></div> <div class=quiz-illustration__middleground></div> <div class=quiz-illustration__foreground></div> <div class=quiz-illustration__content ng-transclude></div> </div>'
  666. }
  667. , function(t, e) {
  668.     t.exports = '<div class="quiz quiz--questions"> <div class=quiz__question> <pm-sorting-illustration illustration="{{ ctrl.theme }}"> <pm-quiz-question question="{{ ctrl.question }}"></pm-quiz-question> </pm-sorting-illustration> <a pm-go-to-answer class=quiz-question__nav><span class=circle></span></a> </div> <div class=quiz__answer> <pm-indicator></pm-indicator> <div class=quiz__answer-wrapper> <div ui-view class=swap-animation ng-class="{previous: ctrl.previousTransition, next: ctrl.nextTransition}"></div> </div> <button class="btn quiz__accept-answer form__button form__button--hollow" data-r-btn=accept ng-click=ctrl.nextQuestion()>Select</button> </div> </div>'
  669. }
  670. , function(t, e, n) {
  671.     "use strict";
  672.     function r(t) {
  673.         return t && t.__esModule ? t : {
  674.             "default": t
  675.         }
  676.     }
  677.     function i(t, e, n, r, i) {
  678.         function o() {
  679.             var e = n.getActiveAnswer();
  680.             t.go("question.answer", {
  681.                 answer: e
  682.             })
  683.         }
  684.         var a = this
  685.           , u = r.getQuestion()
  686.           , s = parseInt(n.getActiveStep(), 10)
  687.           , c = parseInt(e.answer, 10)
  688.           , l = u.answers
  689.           , f = l[c - 1];
  690.         n.initAnswers({
  691.             answerNumber: c,
  692.             length: l.length
  693.         }),
  694.         this.previousTransition = !1,
  695.         this.nextTransition = !1,
  696.         this.answerText = f.answer,
  697.         this.answerStyle = {
  698.             "background-color": f.colour
  699.         },
  700.         this.toggleStyle = {
  701.             "border-color": f.colour
  702.         },
  703.         i.setAnswer(s, f.id),
  704.         this.previous = function() {
  705.             a.previousTransition = !0,
  706.             a.nextTransition = !1,
  707.             n.previousAnswer(),
  708.             o()
  709.         }
  710.         ,
  711.         this.next = function() {
  712.             a.previousTransition = !1,
  713.             a.nextTransition = !0,
  714.             n.nextAnswer(),
  715.             o()
  716.         }
  717.     }
  718.     Object.defineProperty(e, "__esModule", {
  719.         value: !0
  720.     });
  721.     var o = n(59)
  722.       , a = n(130)
  723.       , u = r(a)
  724.       , s = n(134)
  725.       , c = r(s)
  726.       , l = n(136)
  727.       , f = r(l)
  728.       , p = n(156)
  729.       , h = r(p);
  730.     e["default"] = (0,
  731.     o.controller)("Answer", ["$state", "$stateParams", "quizStore", "questionStore", "answerStore", i], [u["default"], c["default"], f["default"], h["default"]])
  732. }
  733. , function(t, e, n) {
  734.     "use strict";
  735.     function r(t) {
  736.         return t && t.__esModule ? t : {
  737.             "default": t
  738.         }
  739.     }
  740.     Object.defineProperty(e, "__esModule", {
  741.         value: !0
  742.     });
  743.     var i = n(59)
  744.       , o = n(79)
  745.       , a = r(o)
  746.       , u = n(135)
  747.       , s = r(u);
  748.     e["default"] = (0,
  749.     i.factory)("answerStore", ["sessionStorageFactory", function(t) {
  750.         var e = t("answers");
  751.         return {
  752.             setAnswer: function(t, n) {
  753.                 e.put(t, n)
  754.             },
  755.             getAnswers: function() {
  756.                 var t = e.info().size;
  757.                 return a["default"].range(t).map(function(t) {
  758.                     return e.get(t + 1)
  759.                 })
  760.             }
  761.         }
  762.     }
  763.     ], [s["default"]])
  764. }
  765. , function(t, e) {
  766.     t.exports = '<div class=quiz-answer data-r-answers ng-style=ctrl.answerStyle> <pm-quiz-answer-chooser type=previous on-choose=ctrl.previous() class="quiz-answer__nav quiz-answer__nav--prev" tabindex=6 style="" title="previous option" aria-labelledby="previous option"></pm-quiz-answer-chooser> <span class=quiz-answer__text data-r-answer>{{ ctrl.answerText }}</span> <pm-quiz-answer-chooser type=next on-choose=ctrl.next() class="quiz-answer__nav quiz-answer__nav--next" tabindex=6 style="" title="next option" aria-labelledby="next option"></pm-quiz-answer-chooser> </div>'
  767. }
  768. , function(t, e, n) {
  769.     "use strict";
  770.     function r(t) {
  771.         return t && t.__esModule ? t : {
  772.             "default": t
  773.         }
  774.     }
  775.     function i(t, e, n, r, i) {
  776.         var o = this
  777.           , a = e.getQuizType()
  778.           , u = n.getAnswers();
  779.         this.fawkesUrl = i.fawkes.url,
  780.         t.getOutcome(a, u).then(function(t) {
  781.             o.outcomeFor = "partial/" + a,
  782.             o.outcome = t,
  783.             t ? (o.outcome.displayName = t.displayName || "unthemed",
  784.             r.name = t.urlFriendlyName || "unthemed") : r.name = "unthemed"
  785.         }).then(function() {
  786.             return e.reset()
  787.         })
  788.     }
  789.     Object.defineProperty(e, "__esModule", {
  790.         value: !0
  791.     });
  792.     var o = n(59)
  793.       , a = n(12)
  794.       , u = r(a)
  795.       , s = n(132)
  796.       , c = r(s)
  797.       , l = n(134)
  798.       , f = r(l)
  799.       , p = n(156)
  800.       , h = r(p);
  801.     e["default"] = (0,
  802.     o.controller)("OutcomePage", ["quizRepository", "quizStore", "answerStore", "theme", "config", i], [c["default"], f["default"], h["default"], u["default"]])
  803. }
  804. , function(t, e) {
  805.     t.exports = "<div class=outcome ng-include=ctrl.outcomeFor></div>"
  806. }
  807. , function(t, e) {
  808.     t.exports = '<div class=outcome__decision data-r-outcome-decision> <div class="outcome__badge {{ ctrl.outcome.urlFriendlyName }}"></div> <h1 class=outcome__decision-text data-r-outcome-decision-text>{{ ctrl.outcome.displayName }}</h1> </div> <div class=outcome__share> <p class=outcome__message data-r-outcome-message>Congratulations on being sorted into {{ ctrl.outcome.displayName }}</p> <div class=outcome__social data-r-outcome-social> <h2 class=outcome__social-title>Share your house</h2> <pm-social-share url="{{ ctrl.fawkesUrl }}/collection/all-about-{{ ctrl.outcome.urlFriendlyName }}" title="I am in {{ ctrl.outcome.displayName }}" text="I got sorted into {{ ctrl.outcome.displayName }} on #pottermore {{ ctrl.fawkesUrl }}/collection/all-about-{{ ctrl.outcome.urlFriendlyName }}"></pm-social-share> </div> </div> <div class=outcome__next-steps> <div class=outcome__next-step> <a href=user-profile class="form__button btn form__button--hollow" target=_self data-r-outcome-profile-link>Return to my profile</a> </div> <div class=outcome__next-step> <a href=/user-profile/my-house/ilvermorny class="btn form__button form__button--hollow" target=_self data-r-outcome-continue-link>More about my House</a> </div> </div>'
  809. }
  810. , function(t, e) {
  811.     t.exports = '<div class=outcome__decision data-r-outcome-decision> <div class="outcome__badge {{ ctrl.outcome.urlFriendlyName }}"></div> <h1 class=outcome__decision-text data-r-outcome-decision-text>{{ ctrl.outcome.displayName }}</h1> </div> <div class=outcome__share> <p class=outcome__message data-r-outcome-message>Congratulations on being sorted into {{ ctrl.outcome.displayName }}</p> <div class=outcome__social data-r-outcome-social> <h2 class=outcome__social-title>Share your house</h2> <pm-social-share url="{{ ctrl.fawkesUrl }}/collection/all-about-{{ ctrl.outcome.urlFriendlyName }}" title="I am in {{ ctrl.outcome.displayName }}" text="I got sorted into {{ ctrl.outcome.displayName }} on #pottermore {{ ctrl.fawkesUrl }}/collection/all-about-{{ ctrl.outcome.urlFriendlyName }}"></pm-social-share> </div> </div> <div class=outcome__next-steps> <div class=outcome__next-step> <a href=user-profile class="form__button btn form__button--hollow" target=_self data-r-outcome-profile-link>Return to my profile</a> </div> <div class=outcome__next-step> <a href=/user-profile/my-house/hogwarts class="btn form__button form__button--hollow" target=_self data-r-outcome-continue-link>More about my House</a> </div> </div>'
  812. }
  813. , function(t, e) {
  814.     t.exports = '<div class=outcome__decision data-r-outcome-decision> <div class=outcome__image> <picture class=wand data-r-outcome-image> <source data-r-responsive-image=enormous media="(min-width: 1450px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=225"/> <source data-r-responsive-image=huge media="(min-width: 1200px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=175"/> <source data-r-responsive-image=large media="(min-width: 992px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=150"/> <source data-r-responsive-image=medium media="(min-width: 768px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=75"/> <source data-r-responsive-image=small media="(min-width: 481px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=75"/> <source data-r-responsive-image=smallest media="(min-width: 321px)" ng-srcset="{{ ctrl.outcome.wand.image }}?h=75"/> <img data-r-responsive-image=default ng-src="{{ ctrl.outcome.wand.image }}" alt="Picture of wand"/> </picture> </div> <h1 class=outcome__decision-text data-r-outcome-decision-text>{{ ctrl.outcome.wand.wood.displayName }} wood with a {{ ctrl.outcome.wand.core.displayName | lowercase }} core, {{ ctrl.outcome.wand.length.displayName }} and {{ ctrl.outcome.wand.flexibility.displayName | lowercase }} flexibility</h1> </div> <div class=outcome__share> <p class=outcome__message data-r-outcome-message>Your wand has chosen you, spread the word...</p> <div class=outcome__social data-r-outcome-social> <h2 class=outcome__social-title>Share your wand</h2> <pm-social-share url="{{ ctrl.fawkesUrl }}{{ ctrl.outcome.wandDisplay.path }}" title="My wand is {{ctrl.outcome.wandDisplay.displayName}}" text="My wand, {{ctrl.outcome.wandDisplay.displayName}}, chose me on #pottermore {{ ctrl.fawkesUrl }}{{ ctrl.outcome.wandDisplay.path }}"></pm-social-share> </div> </div> <div class=outcome__next-steps> <div class=outcome__next-step> <a href=user-profile class="btn form__button form__button--hollow" target=_self data-r-outcome-profile-link>Return to my profile</a> </div> <div class=outcome__next-step> <a href=/user-profile/wand class="btn form__button form__button--hollow" target=_self data-r-outcome-continue-link>More about my Wand</a> </div> </div>'
  815. }
  816. , , function(t, e, n, r) {
  817.     n(r),
  818.     t.exports = angular
  819. }
  820. ]));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement