1"use strict";(self.webpackChunktde_webpack_boilerplate=self.webpackChunktde_webpack_boilerplate||[]).push([[5308],{1493:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(56036);n(19184);function s(t){let e,n;const s=t[1].default,o=(0,r.Of3)(s,t,t[0],null);return{c(){e=(0,r.ND4)("div"),o&&o.c(),(0,r.CFu)(e,"class","centered-content__content")},m(t,s){(0,r.Yry)(t,e,s),o&&o.m(e,null),n=!0},p(t,[e]){o&&o.p&&(!n||1&e)&&(0,r.nkG)(o,s,t,t[0],n?(0,r.sWk)(s,t[0],e,null):(0,r.i32)(t[0]),null)},i(t){n||((0,r.c7F)(o,t),n=!0)},o(t){(0,r.Tn8)(o,t),n=!1},d(t){t&&(0,r.YoD)(e),o&&o.d(t)}}}function o(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,r]}class ContentSide extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,o,s,r.jXN,{})}}const c=ContentSide},7752:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(56036);n(19184);function s(t){let e,n;return{c(){e=(0,r.ND4)("img"),(0,r.mq_)(e.src,n=t[0])||(0,r.CFu)(e,"src",n),(0,r.CFu)(e,"class",t[1]),(0,r.CFu)(e,"width",t[2]),(0,r.CFu)(e,"height",t[3]),(0,r.CFu)(e,"alt",t[4])},m(t,n){(0,r.Yry)(t,e,n)},p(t,[s]){1&s&&!(0,r.mq_)(e.src,n=t[0])&&(0,r.CFu)(e,"src",n),2&s&&(0,r.CFu)(e,"class",t[1]),4&s&&(0,r.CFu)(e,"width",t[2]),8&s&&(0,r.CFu)(e,"height",t[3]),16&s&&(0,r.CFu)(e,"alt",t[4])},i:r.lQ1,o:r.lQ1,d(t){t&&(0,r.YoD)(e)}}}function o(t,e,n){let{src:r}=e,{className:s=""}=e,{width:o}=e,{height:c}=e,{alt:i=""}=e;return t.$$set=t=>{"src"in t&&n(0,r=t.src),"className"in t&&n(1,s=t.className),"width"in t&&n(2,o=t.width),"height"in t&&n(3,c=t.height),"alt"in t&&n(4,i=t.alt)},[r,s,o,c,i]}class ImageElement extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,o,s,r.jXN,{src:0,className:1,width:2,height:3,alt:4})}}const c=ImageElement},13919:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(56036);n(19184);function s(t){let e,n;const s=t[1].default,o=(0,r.Of3)(s,t,t[0],null);return{c(){e=(0,r.ND4)("div"),o&&o.c(),(0,r.CFu)(e,"class","form-input__wrapper svelte-iyeshr")},m(t,s){(0,r.Yry)(t,e,s),o&&o.m(e,null),n=!0},p(t,[e]){o&&o.p&&(!n||1&e)&&(0,r.nkG)(o,s,t,t[0],n?(0,r.sWk)(s,t[0],e,null):(0,r.i32)(t[0]),null)},i(t){n||((0,r.c7F)(o,t),n=!0)},o(t){(0,r.Tn8)(o,t),n=!1},d(t){t&&(0,r.YoD)(e),o&&o.d(t)}}}function o(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,r]}class FormInputBase extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,o,s,r.jXN,{})}}const c=FormInputBase},16756:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(56036),s=(n(19184),n(13919));function o(t){let e;const n=t[0].default,s=(0,r.Of3)(n,t,t[1],null);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||2&o)&&(0,r.nkG)(s,n,t,t[1],e?(0,r.sWk)(n,t[1],o,null):(0,r.i32)(t[1]),null)},i(t){e||((0,r.c7F)(s,t),e=!0)},o(t){(0,r.Tn8)(s,t),e=!1},d(t){s&&s.d(t)}}}function c(t){let e,n;return e=new s.A({props:{$$slots:{default:[o]},$$scope:{ctx:t}}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,[n]){const r={};2&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function i(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[r,s]}class FormButton extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,i,c,r.jXN,{})}}const u=FormButton},22525:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(56036);n(19184);function s(t){let e,n;const s=t[1].default,o=(0,r.Of3)(s,t,t[0],null);return{c(){e=(0,r.ND4)("div"),o&&o.c(),(0,r.CFu)(e,"class","centered-content__image-wrapper")},m(t,s){(0,r.Yry)(t,e,s),o&&o.m(e,null),n=!0},p(t,[e]){o&&o.p&&(!n||1&e)&&(0,r.nkG)(o,s,t,t[0],n?(0,r.sWk)(s,t[0],e,null):(0,r.i32)(t[0]),null)},i(t){n||((0,r.c7F)(o,t),n=!0)},o(t){(0,r.Tn8)(o,t),n=!1},d(t){t&&(0,r.YoD)(e),o&&o.d(t)}}}function o(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,r]}class ImageSide extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,o,s,r.jXN,{})}}const c=ImageSide},25115:(t,e,n)=>{n.d(e,{F:()=>r});const r={AuthUser:async()=>{const{default:t}=await Promise.all([n.e(1367),n.e(6107)]).then(n.bind(n,48692));try{return await t(!0)}catch{return{loggedin:!1,token:null,data:{}}}}}},33826:(t,e,n)=>{n.r(e),n.d(e,{initQuiz:()=>Ct});var r=n(56036),s=(n(19184),n(28428)),o=n(22525),c=n(47939),i=n(1493);let u=function(t){return t.START="start",t.QUESTIONS="questions",t.SCORE="score",t.SUBMITTED="submitted",t}({});var l=n(7752),a=n(68014);const d={src:null,width:"auto",height:"auto,"},m=(0,a.T5)(d),p=(0,a.T5)(d),$={SAVE:"/api-simple/?module=quiz&action=save",VERIFY:"/api-simple/?module=quiz&action=verify"},f={SUBMIT:"submit-prediction"},h=157,g=4,w=15,T=2,S=10,F=t=>t?{src:t.src||null,width:t.width,height:t.height,classes:""}:null,C=async(t,e)=>{const n=new FormData;return n.append("element_id",t.quizId.toString()),n.append("questions_correct",t.correctAnswers.toString()),n.append("total_score",t.totalScore.toString()),e&&n.append("token",e),fetch($.SAVE,{method:"post",body:n}).then(t=>t.json()).then(t=>
1"success"===t.status?Promise.resolve(t):Promise.reject(t))},N=async(t,e)=>{if(!t||!e)return Promise.reject();const n=new FormData;return n.append("submission_id",t),n.append("token",e),fetch($.VERIFY,{method:"post",body:n}).then(t=>t.json()).then(t=>"success"===t.status?Promise.resolve(t):Promise.reject(t))};var q=n(85503),A=n(85747);function v(t){let e,n=t[0].quiz.content.text+"";return{c(){e=(0,r.ND4)("div"),(0,r.CFu)(e,"class","quiz__text")},m(t,s){(0,r.Yry)(t,e,s),e.innerHTML=n},p(t,r){1&r&&n!==(n=t[0].quiz.content.text+"")&&(e.innerHTML=n)},d(t){t&&(0,r.YoD)(e)}}}function y(t){let e,n,s,o,c,i,u,l=t[0].quiz.content.title+"",a=t[0].quiz.content.text&&v(t);return i=new A.A({props:{id:"prediction-completed",label:t[0].quiz.content.button.title,"}":!0,variants:[q.A.BUTTONS.PRIMARY]}}),i.$on("click",t[1]),{c(){e=(0,r.ND4)("div"),n=(0,r.ND4)("h2"),s=(0,r.Qq7)(l),o=(0,r.xem)(),a&&a.c(),c=(0,r.xem)(),(0,r.N0i)(i.$$.fragment),(0,r.CFu)(n,"class","quiz__title")},m(t,l){(0,r.Yry)(t,e,l),(0,r.BCw)(e,n),(0,r.BCw)(n,s),(0,r.BCw)(e,o),a&&a.m(e,null),(0,r.BCw)(e,c),(0,r.wSR)(i,e,null),u=!0},p(t,[n]){(!u||1&n)&&l!==(l=t[0].quiz.content.title+"")&&(0,r.iQh)(s,l),t[0].quiz.content.text?a?a.p(t,n):(a=v(t),a.c(),a.m(e,c)):a&&(a.d(1),a=null);const o={};1&n&&(o.label=t[0].quiz.content.button.title),i.$set(o)},i(t){u||((0,r.c7F)(i.$$.fragment,t),u=!0)},o(t){(0,r.Tn8)(i.$$.fragment,t),u=!1},d(t){t&&(0,r.YoD)(e),a&&a.d(),(0,r.Hbl)(i)}}}function D(t,e,n){let{data:s}=e;return t.$$set=t=>{"data"in t&&n(0,s=t.data)},[s,function(e){r.Tq.call(this,t,e)}]}class Start extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,D,y,r.jXN,{data:0})}}const b=Start;var x=n(48253);function _(t){let e,n,s,o,c,i,u,l,a,d,m,p=Math.ceil(t[0])+"";return{c(){e=(0,r.ND4)("div"),n=(0,r.QQy)("svg"),s=(0,r.QQy)("g"),o=(0,r.QQy)("circle"),c=(0,r.xem)(),i=(0,r.QQy)("svg"),u=(0,r.QQy)("g"),l=(0,r.QQy)("circle"),a=(0,r.xem)(),d=(0,r.ND4)("span"),m=(0,r.Qq7)(p),(0,r.CFu)(o,"r","24"),(0,r.CFu)(o,"cy","28"),(0,r.CFu)(o,"cx","28"),(0,r.CFu)(o,"stroke-width","6"),(0,r.CFu)(o,"stroke","#dc0e0e"),(0,r.CFu)(o,"fill","none"),(0,r.CFu)(n,"class","donut__countdown svelte-1dhly9q"),(0,r.CFu)(n,"width","56"),(0,r.CFu)(n,"height","56"),(0,r.CFu)(n,"xmlns","http://www.w3.org/2000/svg"),(0,r.CFu)(l,"r","24"),(0,r.CFu)(l,"cy","28"),(0,r.CFu)(l,"cx","28"),(0,r.CFu)(l,"stroke-width","6"),(0,r.CFu)(l,"stroke","#e7e7e7"),(0,r.CFu)(l,"fill","none"),(0,r.CFu)(i,"class","donut__bg svelte-1dhly9q"),(0,r.CFu)(i,"width","56"),(0,r.CFu)(i,"height","56"),(0,r.CFu)(i,"xmlns","http://www.w3.org/2000/svg"),(0,r.CFu)(e,"class","donut svelte-1dhly9q")},m(t,p){(0,r.Yry)(t,e,p),(0,r.BCw)(e,n),(0,r.BCw)(n,s),(0,r.BCw)(s,o),(0,r.BCw)(e,c),(0,r.BCw)(e,i),(0,r.BCw)(i,u),(0,r.BCw)(u,l),(0,r.BCw)(e,a),(0,r.BCw)(e,d),(0,r.BCw)(d,m)},p(t,[e]){1&e&&p!==(p=Math.ceil(t[0])+"")&&(0,r.iQh)(m,p)},i:r.lQ1,o:r.lQ1,d(t){t&&(0,r.YoD)(e)}}}const Y=t=>{document.documentElement.style.setProperty("--donut-dash-offset",Math.round(t).toString())};function I(t,e,n){(0,s.Rc)(()=>{document.documentElement.style.setProperty("--donut-dash-array",`${h}`)});let{remainingSeconds:r=0}=e;return t.$$set=t=>{"remainingSeconds"in t&&n(0,r=t.remainingSeconds)},[r]}class Donut extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,I,_,r.jXN,{remainingSeconds:0})}}const z=Donut;var B=n(53874),O=n(17604);function R(t,e,n){const r=t.slice();return r[14]=e[n],r[16]=n,r}function E(t,e,n){const r=t.slice();return r[17]=e[n],r}function k(t){let e,n,s,o,c,i,u,l=t[14].question+"",a=(0,r.rv_)(t[4](t[14].answers)),d=[];for(let e=0;e<a.length;e+=1)d[e]=Q(E(t,a,e));const m=t=>(0,r.Tn8)(d[t],1,1,()=>{d[t]=null});return{c(){e=(0,r.ND4)("div"),n=(0,r.ND4)("h2"),s=(0,r.Qq7)(l),o=(0,r.xem)(),c=(0,r.ND4)("div");for(let t=0;t<d.length;t+=1)d[t].c();i=(0,r.xem)(),(0,r.CFu)(n,"class","quiz-title svelte-41m3u4"),(0,r.CFu)(c,"class","quiz-btn-wrapper svelte-41m3u4")},m(t,l){(0,r.Yry)(t,e,l),(0,r.BCw)(e,n),(0,r.BCw)(n,s),(0,r.BCw)(e,o),(0,r.BCw)(e,c);for(let t=0;t<d.length;t+=1)d[t]&&d[t].m(c,null);(0,r.BCw)(e,i),u=!0},p(t,e){if((!u||1&e)&&l!==(l=t[14].question+"")&&(0,r.iQh)(s,l),57&e){let n;for(a=(0,r.rv_)(t[4](t[14].answers)),n=0;n<a.length;n+=1){const s=E(t,a,n);d[n]?(d[n].p(s,e),(0,r.c7F)(d[n],1)):(d[n]=Q(s),d[n].c(),(0,r.c7F)(d[n],1),d[n].m(c,null))}for((0,r.V44)(),n=a.length;n<d.length;n+=1)m(n);(0,r.GYV)()}},i(t){if(!u){for(let t=0;t<a.length;t+=1)(0,r.c7F)(d[t]);u=!0}}
1,o(t){d=d.filter(Boolean);for(let t=0;t<d.length;t+=1)(0,r.Tn8)(d[t]);u=!1},d(t){t&&(0,r.YoD)(e),(0,r.ppq)(d,t)}}}function Q(t){let e,n;return e=new A.A({props:{id:`button_${t[16]}_${t[17].index}`,variants:[q.A.BUTTONS.GHOST_BORDERED,q.A.BUTTONS.FULL_WIDTH],label:t[3](t[17].answer)}}),e.$on("click",function(){return t[6](t[17])}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(n,r){t=n;const s={};1&r&&(s.id=`button_${t[16]}_${t[17].index}`),1&r&&(s.label=t[3](t[17].answer)),e.$set(s)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function H(t){let e,n,s=t[16]===t[2]&&k(t);return{c(){s&&s.c(),e=(0,r.Iex)()},m(t,o){s&&s.m(t,o),(0,r.Yry)(t,e,o),n=!0},p(t,n){t[16]===t[2]?s?(s.p(t,n),4&n&&(0,r.c7F)(s,1)):(s=k(t),s.c(),(0,r.c7F)(s,1),s.m(e.parentNode,e)):s&&((0,r.V44)(),(0,r.Tn8)(s,1,1,()=>{s=null}),(0,r.GYV)())},i(t){n||((0,r.c7F)(s),n=!0)},o(t){(0,r.Tn8)(s),n=!1},d(t){t&&(0,r.YoD)(e),s&&s.d(t)}}}function U(t){let e,n,s,o,c,i,u,l,a,d=x.A.trans("quiz.question.count",{count:t[2]+1,total:t[0].quiz.questions.length})+"";i=new z({props:{remainingSeconds:t[1]}});let m=(0,r.rv_)(t[0].quiz.questions),p=[];for(let e=0;e<m.length;e+=1)p[e]=H(R(t,m,e));const $=t=>(0,r.Tn8)(p[t],1,1,()=>{p[t]=null});return{c(){e=(0,r.ND4)("div"),n=(0,r.ND4)("div"),s=(0,r.ND4)("div"),o=(0,r.Qq7)(d),c=(0,r.xem)(),(0,r.N0i)(i.$$.fragment),u=(0,r.xem)(),l=(0,r.ND4)("div");for(let t=0;t<p.length;t+=1)p[t].c();(0,r.CFu)(s,"class","question-header__question"),(0,r.CFu)(n,"class","question-header svelte-41m3u4"),(0,r.CFu)(l,"class","question-base")},m(t,d){(0,r.Yry)(t,e,d),(0,r.BCw)(e,n),(0,r.BCw)(n,s),(0,r.BCw)(s,o),(0,r.BCw)(n,c),(0,r.wSR)(i,n,null),(0,r.BCw)(e,u),(0,r.BCw)(e,l);for(let t=0;t<p.length;t+=1)p[t]&&p[t].m(l,null);a=!0},p(t,[e]){(!a||5&e)&&d!==(d=x.A.trans("quiz.question.count",{count:t[2]+1,total:t[0].quiz.questions.length})+"")&&(0,r.iQh)(o,d);const n={};if(2&e&&(n.remainingSeconds=t[1]),i.$set(n),61&e){let n;for(m=(0,r.rv_)(t[0].quiz.questions),n=0;n<m.length;n+=1){const s=R(t,m,n);p[n]?(p[n].p(s,e),(0,r.c7F)(p[n],1)):(p[n]=H(s),p[n].c(),(0,r.c7F)(p[n],1),p[n].m(l,null))}for((0,r.V44)(),n=m.length;n<p.length;n+=1)$(n);(0,r.GYV)()}},i(t){if(!a){(0,r.c7F)(i.$$.fragment,t);for(let t=0;t<m.length;t+=1)(0,r.c7F)(p[t]);a=!0}},o(t){(0,r.Tn8)(i.$$.fragment,t),p=p.filter(Boolean);for(let t=0;t<p.length;t+=1)(0,r.Tn8)(p[t]);a=!1},d(t){t&&(0,r.YoD)(e),(0,r.Hbl)(i),(0,r.ppq)(p,t)}}}function j(t,e,n){const r=(0,s.ur)();let o,c,{data:i}=e,u=w,l=0,a=null;const d=t=>{const e=atob(t);return new TextDecoder("utf-8").decode(new Uint8Array(e.split("").map(t=>t.charCodeAt(0))))},$=()=>{m.set(F(i.quiz.questions[l].image||i.quiz.image)),p.set(F(i.quiz.questions[l].backgroundImage||i.quiz.backgroundImage))},f=t=>{clearInterval(a);const e=i.quiz.questions[l],n=parseInt(d(e.correctAnswer),10),s=(()=>{const t={};for(let e=0;e<g;e+=1)t[`button_${l}_${e}`]=O.A.DISABLED;return t})();n===t?(B.l.update(()=>Object.assign(Object.assign({},s),{[`button_${l}_${t}`]:O.A.SUCCESS})),r("countCorrectAnswer",l),r("countCorrectAnswerSecond",u)):B.l.update(()=>Object.assign(Object.assign({},s),{[`button_${l}_${t}`]:O.A.ERROR,[`button_${l}_${n}`]:O.A.SUCCESS})),setTimeout(()=>{o()},1e3*T)};o=()=>{n(1,u=w),n(2,l+=1),l>=i.quiz.questions.length?r("finish"):($(),c(),Y(0))},c=()=>{const t=Date.now()+1e3*w;a=setInterval(()=>{n(1,u=(t-Date.now())/1e3),u<0&&n(1,u=0),Y(h-h/w*u),t-Date.now()<1&&(a&&clearInterval(a),setTimeout(()=>{o()},1e3*T))},50)},(0,s.Rc)(()=>{$(),c()});return t.$$set=t=>{"data"in t&&n(0,i=t.data)},[i,u,l,d,t=>t.sort(()=>Math.random()-.5),f,t=>{f(t.index)}]}class Questions extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,j,U,r.jXN,{data:0})}}const M=Questions;var V=n(16756),P=n(66270);function G(t){let e,n,s=t[2].quiz.content.results["75_100"]+"";return{c(){e=new r.OKD(!1),n=(0,r.Iex)(),e.a=n},m(t,o){e.m(s,t,o),(0,r.Yry)(t,n,o)},p(t,n){4&n&&s!==(s=t[2].quiz.content.results["75_100"]+"")&&e.p(s)},d(t){t&&((0,r.YoD)(n),e.d())}}}function L(t){let e,n,s=t[2].quiz.content.results["50_75"]+"";return{c(){e=new r.OKD(!1),n=(0,r.Iex)(),e.a=n},m(t,o){e.m(s,t,o),(0,r.Yry)(t,n,o)},p(t,n){4&n&&s!==(s=t[2].quiz.content.results["50_75"]+"")&&e.p(s)},d(t){t&&((0,r.YoD)(n),e.d())}}}function X(t){let e,n,s=t[2].quiz.content.results["25_50"]+"";
1return{c(){e=new r.OKD(!1),n=(0,r.Iex)(),e.a=n},m(t,o){e.m(s,t,o),(0,r.Yry)(t,n,o)},p(t,n){4&n&&s!==(s=t[2].quiz.content.results["25_50"]+"")&&e.p(s)},d(t){t&&((0,r.YoD)(n),e.d())}}}function W(t){let e,n,s=t[2].quiz.content.results["0_25"]+"";return{c(){e=new r.OKD(!1),n=(0,r.Iex)(),e.a=n},m(t,o){e.m(s,t,o),(0,r.Yry)(t,n,o)},p(t,n){4&n&&s!==(s=t[2].quiz.content.results["0_25"]+"")&&e.p(s)},d(t){t&&((0,r.YoD)(n),e.d())}}}function K(t){let e;return{c(){e=(0,r.ND4)("div"),e.textContent=`${x.A.trans("quiz.error.global")}`,(0,r.CFu)(e,"class","form-error-wrapper")},m(t,n){(0,r.Yry)(t,e,n)},d(t){t&&(0,r.YoD)(e)}}}function J(t){let e,n;return e=new A.A({props:{id:f.SUBMIT,label:t[1]?x.A.trans("quiz.button.submit"):x.A.trans("quiz.button.submit.login"),variants:[q.A.BUTTONS.PRIMARY],type:"submit"}}),e.$on("click",t[9]),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};2&n&&(r.label=t[1]?x.A.trans("quiz.button.submit"):x.A.trans("quiz.button.submit.login")),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function Z(t){let e,n,s,o,c,i,u,l,a,d,m,p,$,f,h=x.A.trans("quiz.score.title",{pointstotal:t[4]})+"",g=x.A.trans("quiz.score.results.questions",{correctquestions:t[0].length,totalquestions:t[8],pointsquestion:t[3]})+"",w=x.A.trans("quiz.score.results.seconds",{totalseconds:t[5],pointstotal:t[4]})+"";function T(t,e){return t[6]<25?W:t[6]>=25&&t[6]<50?X:t[6]>=50&&t[6]<75?L:t[6]>=75?G:void 0}let S=T(t),F=S&&S(t),C=t[7]&&K();return $=new V.A({props:{$$slots:{default:[J]},$$scope:{ctx:t}}}),{c(){e=(0,r.ND4)("div"),n=(0,r.ND4)("h2"),s=(0,r.Qq7)(h),o=(0,r.xem)(),F&&F.c(),c=(0,r.xem)(),i=(0,r.ND4)("hr"),u=(0,r.xem)(),l=(0,r.ND4)("p"),a=(0,r.xem)(),d=(0,r.ND4)("p"),m=(0,r.xem)(),C&&C.c(),p=(0,r.xem)(),(0,r.N0i)($.$$.fragment),(0,r.CFu)(n,"class","title svelte-1xtzpjg")},m(t,h){(0,r.Yry)(t,e,h),(0,r.BCw)(e,n),(0,r.BCw)(n,s),(0,r.BCw)(e,o),F&&F.m(e,null),(0,r.BCw)(e,c),(0,r.BCw)(e,i),(0,r.BCw)(e,u),(0,r.BCw)(e,l),l.innerHTML=g,(0,r.BCw)(e,a),(0,r.BCw)(e,d),d.innerHTML=w,(0,r.BCw)(e,m),C&&C.m(e,null),(0,r.BCw)(e,p),(0,r.wSR)($,e,null),f=!0},p(t,[n]){(!f||16&n)&&h!==(h=x.A.trans("quiz.score.title",{pointstotal:t[4]})+"")&&(0,r.iQh)(s,h),S===(S=T(t))&&F?F.p(t,n):(F&&F.d(1),F=S&&S(t),F&&(F.c(),F.m(e,c))),(!f||9&n)&&g!==(g=x.A.trans("quiz.score.results.questions",{correctquestions:t[0].length,totalquestions:t[8],pointsquestion:t[3]})+"")&&(l.innerHTML=g),(!f||48&n)&&w!==(w=x.A.trans("quiz.score.results.seconds",{totalseconds:t[5],pointstotal:t[4]})+"")&&(d.innerHTML=w),t[7]?C||(C=K(),C.c(),C.m(e,p)):C&&(C.d(1),C=null);const o={};16386&n&&(o.$$scope={dirty:n,ctx:t}),$.$set(o)},i(t){f||((0,r.c7F)($.$$.fragment,t),f=!0)},o(t){(0,r.Tn8)($.$$.fragment,t),f=!1},d(t){t&&(0,r.YoD)(e),F&&F.d(),C&&C.d(),(0,r.Hbl)($)}}}function tt(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(s,o){function c(t){try{u(r.next(t))}catch(t){o(t)}}function i(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(c,i)}u((r=r.apply(t,e||[])).next())})};let{correctAnswerIndexes:o}=e,{correctAnswerSeconds:c}=e,{userToken:i}=e,{data:u}=e;const l=u.quiz.questions.length;let a=0,d=0,m=0,p=0,$=!1;const h=(0,s.ur)(),g=t=>{t?B.l.update(()=>({[f.SUBMIT]:O.A.LOADING})):B.l.update(()=>null)};return(0,s.Rc)(()=>{n(3,a=o.length*S),c.forEach(t=>{n(5,m+=Math.round(t))}),n(4,d=a+m),n(6,p=100/l*o.length)}),t.$$set=t=>{"correctAnswerIndexes"in t&&n(0,o=t.correctAnswerIndexes),"correctAnswerSeconds"in t&&n(10,c=t.correctAnswerSeconds),"userToken"in t&&n(1,i=t.userToken),"data"in t&&n(2,u=t.data)},[o,i,u,a,d,m,p,$,l,()=>r(void 0,void 0,void 0,function*(){n(7,$=!1),g(!0);const t={quizId:u.quiz.id,correctAnswers:o.length,totalScore:d};try{const e=yield C(t,i);if(!e.data.verified)return P.m.set(e.data.id),void(window.location.href=`${x.A.trans("users.slug.login")}?redirect=${x.A.trans("quiz.url")}/${u.entry.slug}`);h("finish")}catch(t){throw g(!1),n(7,$=!0),new Error(JSON.stringify(t))}}),c]}class Score extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,tt,Z,r.jXN,{correctAnswerIndexes:0,correctAnswerSeconds:10,userToken:1,data:2})}}const et=Score;function nt(t){let e,n;return e=new A.A({props:{id:"button",label:x.A.trans("quiz.format.button"),variants:[q.A.BUTTONS.PRIMARY],href:x.A.trans("quiz.url"),type:"anch
1or"}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p:r.lQ1,i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function rt(t){let e,n,s,o,c,i=t[0].quiz.completed.text+"";return o=new V.A({props:{$$slots:{default:[nt]},$$scope:{ctx:t}}}),{c(){e=(0,r.ND4)("div"),n=new r.OKD(!1),s=(0,r.xem)(),(0,r.N0i)(o.$$.fragment),n.a=s},m(t,u){(0,r.Yry)(t,e,u),n.m(i,e),(0,r.BCw)(e,s),(0,r.wSR)(o,e,null),c=!0},p(t,[e]){(!c||1&e)&&i!==(i=t[0].quiz.completed.text+"")&&n.p(i);const r={};2&e&&(r.$$scope={dirty:e,ctx:t}),o.$set(r)},i(t){c||((0,r.c7F)(o.$$.fragment,t),c=!0)},o(t){(0,r.Tn8)(o.$$.fragment,t),c=!1},d(t){t&&(0,r.YoD)(e),(0,r.Hbl)(o)}}}function st(t,e,n){let{data:r}=e;return t.$$set=t=>{"data"in t&&n(0,r=t.data)},[r]}class Submitted extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,st,rt,r.jXN,{data:0})}}const ot=Submitted;var ct=n(25115),it=n(64487);function ut(t){let e,n;return e=new l.A({props:{src:t[4].src,className:"centered-content__image",width:t[4].width,height:t[4].height,alt:""}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};16&n&&(r.src=t[4].src),16&n&&(r.width=t[4].width),16&n&&(r.height=t[4].height),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function lt(t){let e,n;return e=new l.A({props:{src:t[5].src,className:"centered-content__image centered-content__blurred-background",width:t[5].width,height:t[5].height,alt:""}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};32&n&&(r.src=t[5].src),32&n&&(r.width=t[5].width),32&n&&(r.height=t[5].height),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function at(t){let e,n,s,o=t[4]&&ut(t),c=t[5]&<(t);return{c(){o&&o.c(),e=(0,r.xem)(),c&&c.c(),n=(0,r.Iex)()},m(t,i){o&&o.m(t,i),(0,r.Yry)(t,e,i),c&&c.m(t,i),(0,r.Yry)(t,n,i),s=!0},p(t,s){t[4]?o?(o.p(t,s),16&s&&(0,r.c7F)(o,1)):(o=ut(t),o.c(),(0,r.c7F)(o,1),o.m(e.parentNode,e)):o&&((0,r.V44)(),(0,r.Tn8)(o,1,1,()=>{o=null}),(0,r.GYV)()),t[5]?c?(c.p(t,s),32&s&&(0,r.c7F)(c,1)):(c=lt(t),c.c(),(0,r.c7F)(c,1),c.m(n.parentNode,n)):c&&((0,r.V44)(),(0,r.Tn8)(c,1,1,()=>{c=null}),(0,r.GYV)())},i(t){s||((0,r.c7F)(o),(0,r.c7F)(c),s=!0)},o(t){(0,r.Tn8)(o),(0,r.Tn8)(c),s=!1},d(t){t&&((0,r.YoD)(e),(0,r.YoD)(n)),o&&o.d(t),c&&c.d(t)}}}function dt(t){let e,n,s,o,c,i=t[1]===u.START&&pt(t),l=t[1]===u.QUESTIONS&&$t(t),a=t[1]===u.SCORE&&ft(t),d=t[1]===u.SUBMITTED&&ht(t);return{c(){i&&i.c(),e=(0,r.xem)(),l&&l.c(),n=(0,r.xem)(),a&&a.c(),s=(0,r.xem)(),d&&d.c(),o=(0,r.Iex)()},m(t,u){i&&i.m(t,u),(0,r.Yry)(t,e,u),l&&l.m(t,u),(0,r.Yry)(t,n,u),a&&a.m(t,u),(0,r.Yry)(t,s,u),d&&d.m(t,u),(0,r.Yry)(t,o,u),c=!0},p(t,c){t[1]===u.START?i?(i.p(t,c),2&c&&(0,r.c7F)(i,1)):(i=pt(t),i.c(),(0,r.c7F)(i,1),i.m(e.parentNode,e)):i&&((0,r.V44)(),(0,r.Tn8)(i,1,1,()=>{i=null}),(0,r.GYV)()),t[1]===u.QUESTIONS?l?(l.p(t,c),2&c&&(0,r.c7F)(l,1)):(l=$t(t),l.c(),(0,r.c7F)(l,1),l.m(n.parentNode,n)):l&&((0,r.V44)(),(0,r.Tn8)(l,1,1,()=>{l=null}),(0,r.GYV)()),t[1]===u.SCORE?a?(a.p(t,c),2&c&&(0,r.c7F)(a,1)):(a=ft(t),a.c(),(0,r.c7F)(a,1),a.m(s.parentNode,s)):a&&((0,r.V44)(),(0,r.Tn8)(a,1,1,()=>{a=null}),(0,r.GYV)()),t[1]===u.SUBMITTED?d?(d.p(t,c),2&c&&(0,r.c7F)(d,1)):(d=ht(t),d.c(),(0,r.c7F)(d,1),d.m(o.parentNode,o)):d&&((0,r.V44)(),(0,r.Tn8)(d,1,1,()=>{d=null}),(0,r.GYV)())},i(t){c||((0,r.c7F)(i),(0,r.c7F)(l),(0,r.c7F)(a),(0,r.c7F)(d),c=!0)},o(t){(0,r.Tn8)(i),(0,r.Tn8)(l),(0,r.Tn8)(a),(0,r.Tn8)(d),c=!1},d(t){t&&((0,r.YoD)(e),(0,r.YoD)(n),(0,r.YoD)(s),(0,r.YoD)(o)),i&&i.d(t),l&&l.d(t),a&&a.d(t),d&&d.d(t)}}}function mt(t){let e,n,s;return n=new it.A({}),{c(){e=(0,r.ND4)("div"),(0,r.N0i)(n.$$.fragment),(0,r.hgi)(e,"position","relative"),(0,r.hgi)(e,"min-height","64px")},m(t,o){(0,r.Yry)(t,e,o),(0,r.wSR)(n,e,null),s=!0},p:r.lQ1,i(t){s||((0,r.c7F)(n.$$.fragment,t),s=!0)},o(t){(0,r.Tn8)(n.$$.fragment,t),s=!1},d(t){t&&(0,r.YoD)(e),(0,r.Hbl)(n)}}}function pt(t){let e,n;return e=new b({props:{data:t[0]}}),e.$on("click",t[8]),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};1&n&&(r.data=t[0]),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function $t(t){let e,n;return e=new M({props:{data:t[0]}}),e.$on("finish",t[9]),e.$on("countCorrectAnswer",t[10]),e.$on("countCorrectAnswerSecond",t[11]),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};1&n&&(r.data=t[0]),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function ft(t){let e,n;return e=new et({props:{data:t[0],correctAnswerIndexes:t[6],correctAnswerSeconds:t[7],userToken:t[3]}}),e.$on("finish",t[12]),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};1&n&&(r.data=t[0]),8&n&&(r.userToken=t[3]),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function ht(t){let e,n;return e=new ot({props:{data:t[0]}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,n){const r={};1&n&&(r.data=t[0]),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function gt(t){let e,n,s,o;const c=[mt,dt],i=[];function u(t,e){return t[2]?1:0}return e=u(t),n=i[e]=c[e](t),{c(){n.c(),s=(0,r.Iex)()},m(t,n){i[e].m(t,n),(0,r.Yry)(t,s,n),o=!0},p(t,o){let l=e;e=u(t),e===l?i[e].p(t,o):((0,r.V44)(),(0,r.Tn8)(i[l],1,1,()=>{i[l]=null}),(0,r.GYV)(),n=i[e],n?n.p(t,o):(n=i[e]=c[e](t),n.c()),(0,r.c7F)(n,1),n.m(s.parentNode,s))},i(t){o||((0,r.c7F)(n),o=!0)},o(t){(0,r.Tn8)(n),o=!1},d(t){t&&(0,r.YoD)(s),i[e].d(t)}}}function wt(t){let e,n,s,c;return e=new o.A({props:{$$slots:{default:[at]},$$scope:{ctx:t}}}),s=new i.A({props:{$$slots:{default:[gt]},$$scope:{ctx:t}}}),{c(){(0,r.N0i)(e.$$.fragment),n=(0,r.xem)(),(0,r.N0i)(s.$$.fragment)},m(t,o){(0,r.wSR)(e,t,o),(0,r.Yry)(t,n,o),(0,r.wSR)(s,t,o),c=!0},p(t,n){const r={};65584&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);const o={};65551&n&&(o.$$scope={dirty:n,ctx:t}),s.$set(o)},i(t){c||((0,r.c7F)(e.$$.fragment,t),(0,r.c7F)(s.$$.fragment,t),c=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),(0,r.Tn8)(s.$$.fragment,t),c=!1},d(t){t&&(0,r.YoD)(n),(0,r.Hbl)(e,t),(0,r.Hbl)(s,t)}}}function Tt(t){let e,n;return e=new c.A({props:{$$slots:{default:[wt]},$$scope:{ctx:t}}}),{c(){(0,r.N0i)(e.$$.fragment)},m(t,s){(0,r.wSR)(e,t,s),n=!0},p(t,[n]){const r={};65599&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||((0,r.c7F)(e.$$.fragment,t),n=!0)},o(t){(0,r.Tn8)(e.$$.fragment,t),n=!1},d(t){(0,r.Hbl)(e,t)}}}function St(t,e,n){let o,c;(0,r.j0C)(t,m,t=>n(4,o=t)),(0,r.j0C)(t,p,t=>n(5,c=t));var i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Prom
1ise))(function(s,o){function c(t){try{u(r.next(t))}catch(t){o(t)}}function i(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(c,i)}u((r=r.apply(t,e||[])).next())})};let{data:l}=e;const a=[],d=[];let $=!1,f=u.START,h=null;const g=t=>{t!==u.QUESTIONS&&(m.set(F(l.quiz.image)),p.set(F(l.quiz.backgroundImage)))};(0,s.Rc)(()=>{g(f),P.m.get()||n(2,$=!0),ct.F.AuthUser().then(t=>{n(3,h=t.token),h&&P.m.get()?i(void 0,void 0,void 0,function*(){try{"success"===(yield N(P.m.get(),h)).status&&(P.m.remove(),n(2,$=!0),n(1,f=u.SUBMITTED))}catch(t){P.m.remove(),n(2,$=!0)}}):(P.m.remove(),n(2,$=!0))})});return t.$$set=t=>{"data"in t&&n(0,l=t.data)},t.$$.update=()=>{2&t.$$.dirty&&g(f)},[l,f,$,h,o,c,a,d,()=>{n(1,f=u.QUESTIONS)},()=>{n(1,f=u.SCORE)},t=>{a.push(t.detail)},t=>{d.push(t.detail)},()=>{n(1,f=u.SUBMITTED)}]}class Quiz extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,St,Tt,r.jXN,{data:0})}}const Ft=Quiz,Ct=()=>{const t=document.querySelector("#js-quiz"),e=window.quizData;t&&"object"==typeof e&&new Ft({target:t,props:{data:e}})}},47939:(t,e,n)=>{n.d(e,{A:()=>c});var r=n(56036);n(19184);function s(t){let e,n;const s=t[1].default,o=(0,r.Of3)(s,t,t[0],null);return{c(){e=(0,r.ND4)("div"),o&&o.c(),(0,r.CFu)(e,"class","centered-content__inner")},m(t,s){(0,r.Yry)(t,e,s),o&&o.m(e,null),n=!0},p(t,[e]){o&&o.p&&(!n||1&e)&&(0,r.nkG)(o,s,t,t[0],n?(0,r.sWk)(s,t[0],e,null):(0,r.i32)(t[0]),null)},i(t){n||((0,r.c7F)(o,t),n=!0)},o(t){(0,r.Tn8)(o,t),n=!1},d(t){t&&(0,r.YoD)(e),o&&o.d(t)}}}function o(t,e,n){let{$$slots:r={},$$scope:s}=e;return t.$$set=t=>{"$$scope"in t&&n(0,s=t.$$scope)},[s,r]}class ViewMinimalSplitted extends r.r7T{constructor(t){super(),(0,r.TsN)(this,t,o,s,r.jXN,{})}}const c=ViewMinimalSplitted},66270:(t,e,n)=>{n.d(e,{m:()=>o});var r=n(79053);const s="user-auth-memory-submission",o={set(t){app.helper.localStorage.setItem(s,t)},get:()=>app.helper.localStorage.getItem(s),remove:()=>app.helper.localStorage.removeItem(s),async verify(t,e){const n=r.A.get(),s=new FormData;return e&&n&&t?(s.append("submission_id",n),s.append("token",e),fetch(t,{method:"post",body:s}).then(t=>t.json()).then(t=>"success"===t.status?(r.A.remove(),Promise.resolve()):Promise.reject()).catch(t=>Promise.reject(t))):Promise.reject()}}},79053:(t,e,n)=>{n.d(e,{A:()=>c,O:()=>o});var r=n(81149);const s="user-auth",o="RN365_AUTH_TOKEN",c={get:()=>app.helper.localStorage.getItem(s),remove(){app.helper.localStorage.removeItem(s),app.helper.removeCookie(o),this.render()},setFromShadow(t){this.storeUser({avatar:t.profile_image})},storeUser(t){const e=JSON.stringify(t);app.helper.localStorage.setItem(s,e),this.render(e)},render(){const t=this.get(),e=document.querySelector(".js-top-user-image");if(!e)return;const n=t?JSON.parse(t):{avatar:0},s=(0,r.Y)(n.avatar);e.src=s.image,e.setAttribute("alt",s.title)}}},85503:(t,e,n)=>{n.d(e,{A:()=>r});const r={BUTTONS:{PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",GHOST:"ghost",GHOST_ALT:"ghost-alt",GHOST_BORDERED:"ghost-bordered",SUCCESS:"success",CLEAN:"clean",FULL_WIDTH:"full-width"},TYPE:{NOTIFICATION:"type-notification"},COLORS:{WHITE:"color-white"},POSITION:{BOTTOM:"position-bottom",CENTERED:"position-centered"},SIZING:{FULL_WIDTH:"sizing-full-width",SMALL:"sizing-small"},FONTSIZE:{SMALL:"font-size-small"},SPACINGS:{TOP_LARGE:"spacing-top-large",TOP_MEDIUM:"spacing-top-medium",TOP_NONE:"spacing-top-none"}}}}]); 2//# sourceMappingURL=quiz.build.js.map?v=b536eb
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.