1"use strict";(self.webpackChunkoutrigger=self.webpackChunkoutrigger||[]).push([[617],{9617:function(t,e,n){let i;n.r(e),n.d(e,{buildIntro:function(){return o},getNextQuiz:function(){return c},init:function(){return s},quizNumber:function(){return a}});let a=0;function s(){i=_WF.utils.getLogger("header > layoutLoader > splQuiz > infinite > init",_WF.LOGLEVEL.GLOBAL),a++}function o(t){i("buildIntro > building intro from:",t);const e=document.createElement("div");e.className="quiz-wrap start type-normal",e.id=`quiz-intro-${a}`;const n=`\n <header class="entry-header content-border-color">\n <h1 class="entry-title">${t.title}</h1>\n <div class="meta byline">\n <a href="${t.meta.category[0].url}" class="cat" target="_blank">${t.meta.category[0].name}</a> \n <span class="date">${new Date("2018-08-29 21:23:08").toLocaleString().split(",")[0]}</span>\n </div>\n </header>\n <div class="picture-container quiz-img">\n <picture>\n <img \n decoding="async" \n class="quiz-image" \n src="${t.intro.images.desktop[0].url}" \n alt="${t.intro.images.desktop[0].text.alt?t.intro.images.desktop[0].text.alt:""}"\n width="${t.intro.images.desktop[0].dimensions.width}"\n height="${t.intro.images.desktop[0].dimensions.height}">\n </picture>\n <div class="quiz-info"></div>\n <div class="photo-controls">\n <a href="${t.pages[0].url}" class="button">Start Quiz</a>\n </div>\n <div class="photo-extras-wrap">\n <div class="photo-extras">\n <div class="caption">\n ${t.intro.images.desktop[0].text.caption?t.intro.images.desktop[0].text.caption:""}\n </div>\n <div class="caption mobile">\n ${t.intro.images.desktop[0].text.caption?t.intro.images.desktop[0].text.caption:""}\n </div>\n </div>\n </div>\n </div>\n <p>${t.intro.content.join("</p><p>")}</p>\n `,s=document.getElementById("quiz-result");return s.insertAdjacentElement("afterend",e),s.id="quiz-result-"+(a-1),e.innerHTML=n,e}async function c(t){i(`getNextQuiz > Getting next quiz for post ID: ${t}`);const e=await fetch(`${window.location.origin}/wp-json/content/v2/quiz/${t}`),n=await e.json();return i("Got next quiz",n),function(t){const e=t.meta.nextPost.url,n=document.getElementById("next-button");n&&n.setAttribute("href",e)}(n),function(t){i("updatePostCache > updating page cache"),t&&(document.title=_WF.utils.removeHTMLTagsFromString(t.title),_WF.cache.setItem(_WF.KEYS.POSTABBR,t.meta.abbreviation),_WF.cache.setItem(_WF.KEYS.POSTAUTHOR,t.meta.author),_WF.cache.setItem(_WF.KEYS.POSTCATS,t.meta.category),_WF.cache.setItem(_WF.KEYS.POSTID,t.id),_WF.cache.setItem(_WF.KEYS.POSTLASTMODIFIEDDATE,t.meta.lastModified),_WF.cache.setItem(_WF.KEYS.POSTNAME,t.meta.slug),_WF.cache.setItem(_WF.KEYS.POSTNUMPAGES,t.slides.length),_WF.cache.setItem(_WF.KEYS.POSTPUBLISHDATE,t.meta.date),_WF.cache.setItem(_WF.KEYS.POSTTAX,t.meta.taxonomies),_WF.cache.setItem(_WF.KEYS.POSTTHUMBNAIL,t.meta.thumbnail),_WF.cache.setItem(_WF.KEYS.POSTTITLE,t.title),_WF.cache.setItem(_WF.KEYS.POSTU
1RL,t.meta.url),_WF.cache.setItem(_WF.KEYS.QUIZTYPE,t.meta.quizType),_WF.cache.setItem(_WF.KEYS.SWARMPOSTID,t.swarmPostId||-1))}(n),function(t){let e=t.meta.url;const n=document.location.search+document.location.hash;e+=n,history.replaceState&&(i("updatePageUrl > updating pageUrl to",e),history.replaceState(null,null,e))}(n),function(t){i("parseQuizData > parsing jsonResponse",t);const e={id:t.id,...t.meta},n={description:"",nextPostLink:t.meta.nextPost.url,nextPostId:t.meta.nextPost.id,intro:t.intro,title:t.title,meta:e,result:t.slides.pop(),pages:t.slides.map(((e,n)=>{const i={slideId:e.id,position:n,url:`${t.meta.url}${n||""}`,response:e.feedback,question:e.header,answers:e.content.answers.map((t=>({text:t.text,correct:t.correct,bucket:t.bucket})))},a=e.images.desktop[0]?e.images.desktop[0]:e.images.mobile[0];return a&&(i.img=a.url,i.imgalt=a.text?a.text.alt:null,i.caption=a.text?a.text.caption:null,i.imgWidth=a.dimensions.width,i.imgHeight=a.dimensions.height),i}))};return n}(n)}}}]);
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.