",{class:"h5p-question-scorebar-container"}),(v=void 0===v?Q.createScoreBar(n,i,r,s):v).appendTo(l),u.toggleClass("has-content",void 0!==e&&0
",{class:"h5p-question-feedback-tail"}).hide().appendTo(s),s=z("
",{class:"h5p-question-feedback-close",tabindex:0,title:r,on:{click:function(e){c.remove(),d.remove(),e.preventDefault()},keydown:function(e){switch(e.which){case 13:case 32:c.remove(),d.remove(),e.preventDefault()}}}}).hide().appendTo(c),null!=u&&(u.hasClass("correct")?(c.addClass("h5p-question-feedback-correct"),s.show(),x.buttons.$element.hide()):x.buttons.$element.appendTo(x.feedback.$element)),I(c,u),v.setScore(t)):y=setTimeout(function(){var e;A(x.feedback.$element),A(x.scorebar.$element),C=!0,!m||m.hasClass("h5p-standalone")&&!H5P.isFullscreen||(e=j(m))&&e.animate({scrollTop:m.css("height")},"slow"),y=setTimeout(function(){C=!1,w.trigger("resize"),v.setScore(t)},150)},0)),w},w.updateFeedbackContent=function(e,t){return x.feedback&&x.feedback.$element&&(t&&(e=z(".h5p-question-feedback-content",x.feedback.$element).html()+" "+e),z(".h5p-question-feedback-content",x.feedback.$element).html(e).addClass("has-content"),A(x.feedback.$element),setTimeout(w.trigger.bind(w,"resize"),150)),w},w.setExplanation=function(e,t){return e?(t=new H5P.Question.Explainer(t,e),x.explanation?h("explanation",t.getElement()):(p("explanation",t.getElement()),S&&m&&E(w.order,"explanation",x,m))):x.explanation&&x.explanation.$element.children().detach(),w},w.hasButton=function(e){return void 0!==u[e]},w.addButton=function(e,t,n,i,r,o){var s,a,l,c;return!u[e]&&(void 0===x.buttons&&(p("buttons"),S)&&E(w.order,"buttons",x,m),(o=o||{}).confirmationDialog=o.confirmationDialog||{},r=r||{},s=w.addConfirmationDialogToButton(o.confirmationDialog,n),o.contentData&&o.contentData.standalone&&(o.contentData.isScoringEnabled||o.contentData.isReportingEnabled)&&o.textIfSubmitting&&(t=o.textIfSubmitting),u[e]={isTruncated:!(a=function(){o.confirmationDialog.enable&&s?(o.confirmationDialog.$parentElement||x.popups.$element.removeClass("hidden"),s.show(c.position().top)):n()}),text:t,isVisible:!1,ariaLabel:r["aria-label"]},l=void 0!==r.href,c=u[e].$element=Q.createButton(z.extend({class:"h5p-question-"+e,html:t,on:{click:function(e){a(),l&&e.preventDefault()}}},r)),d.push(e),H5P.Tooltip(c.get(0),{tooltipSource:"data-tooltip"}),l&&c.on("keypress",function(e){32===e.which&&(a(),e.preventDefault())}),void 0===i||i)&&(c.appendTo(x.buttons.$element),u[e].isVisible=!0,B(x.buttons)),w},function(e){var t=e.$element,t=t.clone().css({position:"absolute","white-space":"nowrap","max-width":"none"}).removeClass("truncated").html(e.text).appendTo(t.parent());e.width={max:Math.ceil(t.outerWidth()+parseFloat(t.css("margin-left"))+parseFloat(t.css("margin-right")))},t.html("").addClass("truncated"),e.width.min=Math.ceil(t.outerWidth()+parseFloat(t.css("margin-left"))+parseFloat(t.css("margin-right"))),t.remove()});w.addConfirmationDialogToButton=function(t,e){if((t=t||{}).enable){var n=new H5P.ConfirmationDialog({instance:t.instance,headerText:t.l10n.header,dialogText:t.l10n.body,cancelText:t.l10n.cancelLabel,confirmText:t.l10n.confirmLabel});if(t.$parentElement){var i=t.$parentElement.get(0);let e;i.classList.contains("h5p-content")&&(e=i.querySelector(".h5p-container")),n.appendTo(e??i)}else void 0===x.popups&&(p("popups"),S&&E(w.order,"popups",x,m),x.popups.$element.addClass("hidden"),w.order.push("popups")),n.appendTo(x.popups.$element.get(0));return n.on("confirmed",function(){t.$parentElement||x.popups.$element.addClass("hidden"),e(),w.trigger("confirmed")}),n.on("canceled",function(){t.$parentElement||x.popups.$element.addClass("hidden"),w.trigger("canceled")}),n}},w.showButton=function(e,t){var n=-1!==i(e,"id",c);return void 0===u[e]||!0===u[e].isVisible&&!n||(t=t||0,-1!==(n=i(e,"id",P))?P[n].priority
",{"aria-live":"polite",class:"h5p-hidden-read"}),p("read",r),w.trigger("registerDomElements")),(m=e).html("").addClass("h5p-question h5p-"+O);for(var t=[],n=0;n
=t&&r)return i.feedback}return""},t}(H5P.jQuery,H5P.EventDispatcher,H5P.JoubelUI),/*!@license H5P.Question-1.5/scripts/explainer.js by Joubel licensed under MIT*/H5P.Question.Explainer=function(l){return function(o,s){var a=this;!function(){a.$explanation=l("",{class:"h5p-question-explanation-container"}),l("
",{class:"h5p-question-explanation-title",role:"heading",html:o,appendTo:a.$explanation});for(var e=l("
",{class:"h5p-question-explanation-list",appendTo:a.$explanation}),t=0;t",{class:"h5p-question-explanation-item",appendTo:e}),r=l("",{class:"h5p-question-explanation-status"});n.correct&&l("
",{class:"h5p-question-explanation-correct",html:n.correct,appendTo:r}),n.wrong&&l("",{class:"h5p-question-explanation-wrong",html:n.wrong,appendTo:r}),r.appendTo(i),n.text&&l("",{class:"h5p-question-explanation-text",html:n.text,appendTo:i})}}(),a.getElement=function(){return a.$explanation}}}(H5P.jQuery),H5P.Question.ScorePoints=function(){var n,i=[],r=(this.getElement=function(e){var t=document.createElement("div");return t.classList.add(e?"h5p-question-plus-one":"h5p-question-minus-one"),t.classList.add("h5p-question-hidden-one"),i.push(t),n&&clearTimeout(n),n=setTimeout(r,0),t},function(){var e=0,t=150;i.length&&i.length>Math.ceil(1e3/t)&&(t=1e3/i.length);for(var n=0;n
t.length-1)&&(r=0===n?"":t[n-1].replace(i,""),t=n+e.length===t.length?"":t[n+e.length].replace(i,""),""===r)&&""===t},l.areSimilar=function(e,t){var n;if(e&&"string"==typeof e&&(t&&"string"==typeof t))return n=Math.min(e.length,t.length),0===(e=H5P.TextUtilities.computeLevenshteinDistance(e,t,!0))||9=Math.max(c,u)+l&&(a+=(o-l-1)/(c+u-2*l+2)*(1-a))}return a}},l.fuzzyContains=function(e,t){return this.fuzzyFind(e,t).contains},l.fuzzyIndexOf=function(e,t){return this.fuzzyFind(e,t).indexOf},l.fuzzyMatch=function(e,t){return this.fuzzyFind(e,t).match},l.fuzzyFind=function(t,e,n){if(!t||"string"!=typeof t)return!1;if(!e||"string"!=typeof e)return!1;void 0!==n&&void 0!==n.windowSize&&"number"==typeof n.windowSize||(n={windowSize:3});var i,r=e.split(" ").some(function(e){return i=e,H5P.TextUtilities.areSimilar(t,e)});if(!r){for(var o=0;oOslo is the capital of *Norway*."],overallFeedback:[],userAnswers:[],showSolutions:"Show solution",tryAgain:"Try again",checkAnswer:"Check",changeAnswer:"Change answer",notFilledOut:"Please fill in all blanks to view solution",answerIsCorrect:"':ans' is correct",answerIsWrong:"':ans' is wrong",answeredCorrectly:"Answered correctly",answeredIncorrectly:"Answered incorrectly",solutionLabel:"Correct answer:",inputLabel:"Blank input @num of @total",inputHasTipLabel:"Tip available",tipLabel:"Tip",scoreBarLabel:"You got :num out of :total points",behaviour:{enableRetry:!0,enableSolutionsButton:!0,enableCheckButton:!0,caseSensitive:!0,showSolutionsRequiresInput:!0,autoCheck:!1,separateLines:!1},a11yCheck:"Check the answers. The responses will be marked as correct, incorrect, or unanswered.",a11yShowSolution:"Show the solution. The task will be marked with its correct solution.",a11yRetry:"Retry the task. Reset all responses and start the task over again.",a11yHeader:"Checking mode",submitAnswer:"Submit"},e);for(var r=this.params.questions.length-1;0<=r;r--)this.params.questions[r]||this.params.questions.splice(r,1);this.contentData=n,void 0!==this.contentData&&void 0!==this.contentData.previousState&&(this.previousState=this.contentData.previousState),this.clozes=[],this.shiftPressed=!1,H5P.$body.keydown(function(e){16===e.keyCode&&(i.shiftPressed=!0)}).keyup(function(e){16===e.keyCode&&(i.shiftPressed=!1)}),this.labelId="h5p-blanks-instructions-"+a.idCounter+"-"+H5P.createUUID(),this.content=i.createQuestions();t=i.params.media;t&&t.type&&t.type.library&&("H5P.Image"===(e=(t=t.type).library.split(" ")[0])?t.params.file&&i.setImage(t.params.file.path,{disableImageZooming:i.params.media.disableImageZooming||!1,alt:t.params.alt,title:t.params.title,expandImage:t.params.expandImage,minimizeImage:t.params.minimizeImage}):"H5P.Video"===e?t.params.sources&&i.setVideo(t):"H5P.Audio"===e&&t.params.files&&i.setAudio(t)),i.setIntroduction(''+i.params.text+"
"),i.setContent(i.content,{class:i.params.behaviour.separateLines?"h5p-separate-lines":""}),i.registerButtons(),i.setH5PUserState()}return((a.prototype=Object.create(o.prototype)).constructor=a).prototype.registerButtons=function(){var e=this,t=l('[data-content-id="'+e.contentId+'"].h5p-content'),n=t.parents(".h5p-container"),n=0!==n.length?n.last():0!==t.length?t:l(document.body);!e.params.behaviour.autoCheck&&this.params.behaviour.enableCheckButton&&e.addButton("check-answer",e.params.checkAnswer,function(){e.a11yHeader.innerHTML=e.params.a11yHeader,e.a11yHeader.focus(),e.toggleButtonVisibility(s),e.markResults(),e.showEvaluation(),e.triggerAnswered()},!0,{"aria-label":e.params.a11yCheck},{confirmationDialog:{enable:e.params.behaviour.confirmCheckDialog,l10n:e.params.confirmCheck,instance:e,$parentElement:n},textIfSubmitting:e.params.submitAnswer,contentData:e.contentData}),e.addButton("show-solution",e.params.showSolutions,function(){e.showCorrectAnswers(!1)},e.params.behaviour.enableSolutionsButton,{"aria-label":e.params.a11yShowSolution}),!0===e.params.behaviour.enableRetry&&e.addButton("try-again",e.params.tryAgain,function(){e.a11yHeader.innerHTML="",e.resetTask(),e.$questions.filter(":first").find("input:first").focus()},!0,{"aria-label":e.params.a11yRetry},{confirmationDialog:{enable:e.params.behaviour.confirmRetryDialog,l10n:e.params.confirmRetry,instance:e,$parentElement:n}}),e.toggleButtonVisibility(r)},a.prototype.handleBlanks=function(e,t){for(var n,i,r,o=e.indexOf("*");-1!==o&&-1!==n;)o++,-1!==(n=e.indexOf("*",o))&&(r="",(i=e.substring(o,n).replaceAll(/<\/?[a-z]*\d?>/gi,"")).length?(r=t(this.parseSolution(i)),n++):o+=1,e=e.slice(0,o-1)+r+e.slice(n),n-=n-o-r.length,o=e.indexOf("*",n));return e},a.prototype.createQuestions=function(){for(var o=this,e="",n=0,t=0;to.clozes.length?o.params.userAnswers[o.clozes.length]:null,e=new a.Cloze(e,o.params.behaviour,t,{answeredCorrectly:o.params.answeredCorrectly,answeredIncorrectly:o.params.answeredIncorrectly,solutionLabel:o.params.solutionLabel,inputLabel:o.params.inputLabel,inputHasTipLabel:o.params.inputHasTipLabel,tipLabel:o.params.tipLabel});return o.clozes.push(e),e});e+=''+i+"
"}return o.hasClozes=0").text(this.getUserAnswer()).html();o.read((this.correct()?o.params.answerIsCorrect:o.params.answerIsWrong).replace(":ans",e)),(o.done||o.allBlanksFilledOut())&&(o.toggleButtonVisibility(s),o.showEvaluation(),o.triggerAnswered(),o.done=!0)}),o.clozes[e].setInput(l(this),n,function(){o.toggleButtonVisibility(r),o.params.behaviour.autoCheck||o.hideEvaluation()},e,o.clozes.length)}).keydown(function(e){var t,n,i=l(this),r=(o.autoGrowTextField(i),13===e.keyCode),e=9===e.keyCode&&o.params.behaviour.autoCheck;if((r||e)&&(t=o.$questions.find(".h5p-input-wrapper:not(.h5p-correct) .h5p-text-input"),n=i.is(t[t.length-1])),(e&&n&&!o.shiftPressed||r&&n)&&setTimeout(function(){o.focusButton()},10),r)return n?i.trigger("blur"):t.eq(t.index(i)+1).focus(),!1}).on("change",function(){o.answered=!0,o.triggerXAPI("interacted")}),o.on("resize",function(){o.resetGrowTextField()}),this.$questions},a.prototype.autoGrowTextField=function(i){var r,e,o,s,a;this.params.behaviour.separateLines||(r=this,e=parseInt(i.css("font-size"),10),o=3*e,s=3.25*e,a=.5*e,setTimeout(function(){var e=l("",{text:i.val()}),t=(e.css({position:"absolute","white-space":"nowrap","font-size":i.css("font-size"),"font-family":i.css("font-family"),padding:i.css("padding"),width:"initial"}),i.parent().append(e),e.width()),n=r.$questions.width();e.remove(),t<=o?i.width(o+a):n<=t+s?i.width(n-s):i.width(t+a)},1))},a.prototype.resetGrowTextField=function(){var e=this;this.$questions.find("input").each(function(){e.autoGrowTextField(l(this))})},a.prototype.toggleButtonVisibility=function(e){var t=this.getScore()===this.getMaxScore();this.params.behaviour.autoCheck&&t&&(e=i),this.params.behaviour.enableSolutionsButton&&(e!==s||t?this.hideButton("show-solution"):this.showButton("show-solution")),this.params.behaviour.enableRetry&&(e===s&&!t||e===n?this.showButton("try-again"):this.hideButton("try-again")),e===r?this.showButton("check-answer"):this.hideButton("check-answer"),this.trigger("resize")},a.prototype.allowSolution=function(){return!(!0===this.params.behaviour.showSolutionsRequiresInput&&!this.allBlanksFilledOut()&&(this.updateFeedbackContent(this.params.notFilledOut),this.read(this.params.notFilledOut),1))},a.prototype.allBlanksFilledOut=function(){return!this.clozes.some(function(e){return!e.filledOut()})},a.prototype.markResults=function(){for(var e=0;e
input").attr("disabled",!1),this.trigger("resize")},a.prototype.showCorrectAnswers=function(e){if(e||this.allowSolution()){this.toggleButtonVisibility(n),this.hideSolutions();for(var t=0;t]*>/g,t).split(/(\*.*?\*)/).filter(function(e){return 0",{"aria-hidden":!0,class:"h5p-correct-answer",text:H5P.trim(n.replace(/\s*\/\s*/g,"/")),insertAfter:l}),a.attr("disabled",!0),e=p+". "+s.solutionLabel+" "+n+". "+s.answeredIncorrectly,a.attr("aria-label",e))},this.correct=function(){return h(this.getUserAnswer())},this.setInput=function(e,t,n,i,r){l=(a=e).parent(),p=p.replace("@num",i+1).replace("@total",r),void 0!==u&&0";return c.length=e.length,e},this.getUserAnswer=function(){var e=H5P.trim(a.val().replace(/\ /g," "));return a.val(e),o.formulaEditor&&a.parent().find(".wiris-h5p-input").html(e),e},this.setUserInput=function(e){a.val(e)},this.resetAriaLabel=function(){a.attr("aria-label",p)}}}(H5P.jQuery),/*!@license H5P.CoursePresentation-1.26/dist/h5p-course-presentation.js by Joubel licensed under MIT*/(()=>{var n={454:e=>{e.exports=function(e,t){this.index=e,this.parent=t}},270:(e,t,n)=>{const s=n(454),a=H5P.EventDispatcher;function i(i,t){const r=this;a.call(r),r.children=[];function o(t){for(let e=t;e{var t=e&&e.__esModule?()=>e.default:()=>e;return de.d(t,{a:t}),t},de.d=(e,t)=>{for(var n in t)de.o(t,n)&&!de.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},de.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function i(e){return e.concat.apply([],e)}function l(e){return"function"==typeof e}function o(e,t){return-1!==e.indexOf(t)}function r(e,t){return void 0!==e?e:t}function v(e,t,n){e.click(function(e){t.call(n||this,e)}),e.keydown(function(e){o([13,32],e.which)&&(e.preventDefault(),t.call(n||this,e))})}var u,a,e=de(270),s=de.n(e),b=H5P.jQuery,d=H5P.EventDispatcher,c=H5P.JoubelUI,M=null!==navigator.userAgent.match(/iPad/i),O=null!==navigator.userAgent.match(/iPad|iPod|iPhone/i),N=b("");t.prototype.updateSummarySlide=function(e,t){var n,i,r=this,e=void 0===this.cp.editor&&void 0!==this.$summarySlide&&e>=this.cp.slides.length-1,o=!this.cp.showSummarySlide&&this.cp.hasAnswerElements;e&&(r.cp.presentation.keywordListEnabled&&r.cp.presentation.keywordListAlwaysShow&&r.cp.hideKeywords(),this.$summarySlide.children().remove(),e=r.cp.getSlideScores(t),t=r.outputScoreStats(e),b(t).appendTo(r.$summarySlide),o||(n=r.totalScores(e),isNaN(n.totalPercentage)||((t=c.createScoreBar(n.totalMaxScore,"","","")).setScore(n.totalScore),i=b(".h5p-summary-total-score",r.$summarySlide),t.appendTo(i),setTimeout(function(){i.append(b("
",{"aria-live":"polite",class:"hidden-but-read",html:r.cp.l10n.summary+". "+r.cp.l10n.accessibilityTotalScore.replace("@score",n.totalScore).replace("@maxScore",n.totalMaxScore)}))},100)),!0===r.cp.enableTwitterShare&&(o=b(".h5p-summary-twitter-message",r.$summarySlide),this.addTwitterScoreLinkTo(o,n)),!0===r.cp.enableFacebookShare&&(e=b(".h5p-summary-facebook-message",r.$summarySlide),this.addFacebookScoreLinkTo(e,n)),!0===r.cp.enableGoogleShare&&(t=b(".h5p-summary-google-message",r.$summarySlide),this.addGoogleScoreLinkTo(t)),r.$summarySlide.find(".h5p-td > .h5p-slide-link").each(function(){var t=b(this);t.click(function(e){r.cp.jumpToSlide(parseInt(t.data("slide"),10)-1),e.preventDefault()})})),o=b(".h5p-summary-footer",r.$summarySlide),this.cp.showSummarySlideSolutionButton&&c.createButton({class:"h5p-show-solutions",html:r.cp.l10n.showSolutions,on:{click:function(){r.toggleSolutionMode(!0)}},appendTo:o}),this.cp.showSummarySlideRetryButton&&c.createButton({class:"h5p-cp-retry-button",html:r.cp.l10n.retry,on:{click:function(){r.cp.resetTask()}},appendTo:o}),r.cp.hasAnswerElements)&&c.createButton({class:"h5p-eta-export",html:r.cp.l10n.exportAnswers,on:{click:function(){H5P.ExportableTextArea.Exporter.run(r.cp.slides,r.cp.elementInstances)}},appendTo:o})},t.prototype.outputScoreStats=function(e){if(void 0===e)return this.$summarySlide.addClass("h5p-summary-only-export"),'';for(var t=this,n=0,i=0,r="",o=0,s="",a=0;a
]+)>)/gi,"")+" "+o+'%" data-slide="'+e[a].slide+'">'+t.cp.l10n.slide+" "+e[a].slide+": "+s.replace(/(<([^>]+)>)/gi,"")+' | '+o+"% "+e[a].score+"/"+e[a].maxScore+" | ",n+=e[a].score,i+=e[a].maxScore;this.cp.isSolutionMode||this.cp.ignoreResize||t.cp.triggerXAPICompleted(n,i);var l=t.cp.enableTwitterShare||t.cp.enableFacebookShare||t.cp.enableGoogleShare?''+t.cp.l10n.shareResult+"":"",c=!0===t.cp.enableTwitterShare?'':"",u=!0===t.cp.enableFacebookShare?'':"",d=!0===t.cp.enableGoogleShare?'':"";return''},t.prototype.getSlideDescription=function(e){var t,n,i,r=this.cp.slides[e.slide-1].elements;return 1 '),n=(e.attr("role","application").addClass("h5p-course-presentation").html(n),this.$container=e,this.$slideAnnouncer=e.find(".h5p-current-slide-announcer"),this.$fullscreenAnnouncer=e.find(".h5p-fullscreen-announcer"),this.$slideTop=this.$slideAnnouncer.next(),this.$wrapper=e.children(".h5p-wrapper"),this.activeSurface&&this.$wrapper.addClass("h5p-course-presentation-active-surface"),this.$wrapper.focus(function(){o.initKeyEvents()}).blur(function(){void 0!==o.keydown&&(H5P.jQuery("body").unbind("keydown",o.keydown),delete o.keydown)}).click(function(e){var t=H5P.jQuery(e.target),n=o.belongsToTagName(e.target,["input","textarea","a","button"],e.currentTarget),e=o.hasTabIndex(e.target,e.currentTarget),i=t.closest(".h5p-popup-container"),r=0!==i.length;n||e||o.editor||(r?1===(n=t.closest("[tabindex]")).closest(".h5p-popup-container").length?n:i.find(".h5p-close-popup"):o.$wrapper).focus(),o.presentation.keywordListEnabled&&!o.presentation.keywordListAlwaysShow&&o.presentation.keywordListAutoHide&&!t.is("textarea, .h5p-icon-pencil, span")&&o.hideKeywords()}),this.on("exitFullScreen",function(){t.$footer.removeClass("footer-full-screen"),t.$fullScreenButton.attr("aria-label",t.l10n.fullscreen),t.$fullscreenAnnouncer.html(t.l10n.accessibilityExitedFullscreen)}),this.on("enterFullScreen",function(){t.$fullscreenAnnouncer.html(t.l10n.accessibilityEnteredFullscreen)}),parseInt(this.$wrapper.css("width"))),e=(this.width=0!==n?n:640,parseInt(this.$wrapper.css("height")));this.height=0!==e?e:400,this.ratio=16/9,this.fontSize=16,this.$boxWrapper=this.$wrapper.children(".h5p-box-wrapper");var i,n=this.$boxWrapper.children(".h5p-presentation-wrapper"),n=(this.$slidesWrapper=n.children(".h5p-slides-wrapper"),this.$keywordsWrapper=n.children(".h5p-keywords-wrapper"),this.$progressbar=this.$wrapper.find(".h5p-progressbar"),this.$footer=this.$wrapper.children(".h5p-footer"),this.initKeywords=void 0===this.presentation.keywordListEnabled||!0===this.presentation.keywordListEnabled||void 0!==this.editor,this.activeSurface&&void 0===this.editor&&(this.initKeywords=!1,this.$boxWrapper.css("height","100%")),this.isSolutionMode=!1,this.createSlides(),this.elementsAttached[this.currentSlideIndex]=!0,this.showSummarySlide=!1,this.hideSummarySlide?this.showSummarySlide=!this.hideSummarySlide:this.slidesWithSolutions.forEach(function(e){o.showSummarySlide=e.length}),void 0===this.editor&&(this.showSummarySlide||this.hasAnswerElements)&&(this.slides.push(e={elements:[],keywords:[]}),(i=H5P.jQuery(le.createHTML(e)).appendTo(this.$slidesWrapper)).addClass("h5p-summary-slide"),this.isCurrentSlide(this.slides.length-1))&&(this.$current=i),this.getKeywordMenuConfig());0",{class:"h5p-toggle-full-screen","aria-label":this.l10n.fullscreen,role:"button",tabindex:0,appendTo:this.$wrapper}),H5P.Tooltip(this.$fullScreenButton.get(0),{position:"left"}),v(this.$fullScreenButton,function(){return o.toggleFullScreen()}))):(this.initTouchEvents(),this.navigationLine=new Y(this),this.previousState&&this.previousState.progress||this.setSlideNumberAnnouncer(0,!1),this.summarySlideObject=new q(this,i)),Z(this),this.previousState&&this.previousState.progress&&this.jumpToSlide(this.previousState.progress,!1,null,!1,!0)},B.prototype.belongsToTagName=function(e,t,n){if(!e)return!1;n=n||document.body,t=(t="string"==typeof t?[t]:t).map(function(e){return e.toLowerCase()});var i=e.tagName.toLowerCase();return-1!==t.indexOf(i)||n!==e&&this.belongsToTagName(e.parentNode,t,n)},B.prototype.hasTabIndex=function(e,t){if(-1!==e.tabIndex)return!0;var n,i=b(e).parents();for(n in i){if(-1!==i[n].tabIndex)return!0;if(t&&i[n]===t)return!1}return!1},B.prototype.updateKeywordMenuFromSlides=function(){this.keywordMenu.removeAllMenuItemElements();var e=this.getKeywordMenuConfig();return b(this.keywordMenu.init(e))},B.prototype.getKeywordMenuConfig=function(){var n=this;return this.slides.map(function(e,t){return{title:n.createSlideTitle(e),subtitle:"".concat(n.l10n.slide," ").concat(t+1),index:t}}).filter(function(e){return null!==e.title})},B.prototype.createSlideTitle=function(e){var t=this.isEditor()?this.l10n.noTitle:null;return this.hasKeywords(e)?e.keywords[0].main:t},B.prototype.isEditor=function(){return void 0!==this.editor},B.prototype.hasKeywords=function(e){return void 0!==e.keywords&&0=e.maxScore,n.addClass(t?"h5p-is-correct":"h5p-is-wrong"),i.navigationLine.updateSlideTitle(e.slide-1))}):this.progressbarParts.forEach(function(e){e.find(".h5p-progressbar-part-has-task").removeClass("h5p-is-correct").removeClass("h5p-is-wrong")})},B.prototype.toggleKeywords=function(){this[this.$keywordsWrapper.hasClass("h5p-open")?"hideKeywords":"showKeywords"]()},B.prototype.hideKeywords=function(){this.$keywordsWrapper.hasClass("h5p-open")&&(void 0!==this.$keywordsButton&&(this.$keywordsButton.attr("aria-label",this.l10n.showKeywords),this.$keywordsButton.attr("aria-expanded","false"),this.$keywordsButton.focus()),this.$keywordsWrapper.removeClass("h5p-open"))},B.prototype.showKeywords=function(){this.$keywordsWrapper.hasClass("h5p-open")||(void 0!==this.$keywordsButton&&(this.$keywordsButton.attr("aria-label",this.l10n.hideKeywords),this.$keywordsButton.attr("aria-expanded","true")),this.$keywordsWrapper.addClass("h5p-open"),this.presentation.keywordListAlwaysShow)||this.$keywordsWrapper.find('li[tabindex="0"]').focus()},B.prototype.setKeywordsOpacity=function(e){var t,n,i;""!==this.$keywordsWrapper.css("background-color")&&(n=this.$keywordsWrapper.css("background-color").match(/\d+/g),i=3,i=(n=function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(n,i)||function(e,t){var n;if(e)return"string"==typeof e?ce(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],t=n[1],n=n[2],this.$keywordsWrapper.css("background-color","rgba(".concat(i,", ").concat(t,", ").concat(n,", ").concat(e/100,")")))},B.prototype.fitCT=function(){void 0===this.editor&&this.$current.find(".h5p-ct").each(function(){for(var e=100,t=H5P.jQuery(this),n=t.parent().height();t.outerHeight()>n&&(t.css({fontSize:--e+"%",lineHeight:e+65+"%"}),!(e<0)););})},B.prototype.resize=function(){var e=this.$container.hasClass("h5p-fullscreen")||this.$container.hasClass("h5p-semi-fullscreen");if(!this.ignoreResize){this.$wrapper.css("width","auto");var t=this.$container.width(),n={},e=(e&&t/(e=this.$container.height())>this.ratio&&(t=e*this.ratio,n.width=t+"px"),t/this.width),i=(n.height=t/this.ratio+"px",n.fontSize=this.fontSize*e+"px",void 0!==this.editor&&this.editor.setContainerEm(this.fontSize*e*.75),this.$wrapper.css(n),this.swipeThreshold=100*e,this.elementInstances[this.$current.index()]);if(void 0!==i)for(var r=this.slides[this.$current.index()].elements,o=0;o",{class:"h5p-element"+(r?" h5p-element-button-wrapper":"")+(o.length?" "+o:"")}).css({left:e.x+"%",top:e.y+"%",width:e.width+"%",height:e.height+"%"}).appendTo(n.children('[role="document"]').first()),o=void 0===e.backgroundOpacity||0===e.backgroundOpacity;return s.toggleClass("h5p-transparent",o),r?this.createInteractionButton(e,t).appendTo(s):(n=e.action&&e.action.library?this.getLibraryTypePmz(e.action.library):"other",o=H5P.jQuery("",{class:"h5p-element-outer ".concat(n,"-outer-element")}).css({background:"rgba(255,255,255,"+(void 0===e.backgroundOpacity?0:e.backgroundOpacity/100)+")"}).appendTo(s),r=H5P.jQuery("
",{class:"h5p-element-inner"}).appendTo(o),t.on("set-size",function(e){for(var t in e.data)s.get(0).style[t]=e.data[t]}),t.attach(r),void 0!==e.action&&"H5P.InteractiveVideo"===e.action.library.substr(0,20)&&(n=function(){t.$container.addClass("h5p-fullscreen"),t.controls.$fullscreen&&t.controls.$fullscreen.remove(),t.hasFullScreen=!0,t.controls.$play.hasClass("h5p-pause")?t.$controls.addClass("h5p-autohide"):t.enableAutoHide()},void 0!==t.controls?n():t.on("controls",n)),this.setOverflowTabIndex()),void 0!==this.editor?this.editor.processElement(e,s,i,t):(e.solution&&this.addElementSolutionButton(e,t,s),this.hasAnswerElements=this.hasAnswerElements||void 0!==t.exportAnswers),s},B.prototype.disableTabIndexes=function(){var n=this.$container.find(".h5p-popup-container");this.$tabbables=this.$container.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){var e=b(this),t=b.contains(n.get(0),e.get(0));return!!e.data("tabindex")||!t&&(t=e.attr("tabindex"),e.data("tabindex",t),e.attr("tabindex","-1"),!0)})},B.prototype.restoreTabIndexes=function(){this.$tabbables&&this.$tabbables.each(function(){var e=b(this),t=e.data("tabindex");e.hasClass("ui-slider-handle")?(e.attr("tabindex",0),e.removeData("tabindex")):void 0!==t?(e.attr("tabindex",t),e.removeData("tabindex")):e.removeAttr("tabindex")})},B.prototype.createInteractionButton=function(e,t){var n,i=this,r=e.action.metadata?e.action.metadata.title:"",o=(""!==r&&void 0!==r||(r=(null==(n=e.action)||null==(n=n.params)?void 0:n.contentName)||(null==(n=e.action)||null==(n=n.params)?void 0:n.title)||e.action.library.split(" ")[0].split(".")[1]),this.getLibraryTypePmz(e.action.library)),s=b("
",{role:"button",tabindex:0,"aria-label":r,"aria-haspopup":"dialog","aria-expanded":!1,class:"h5p-element-button h5p-element-button-".concat(e.buttonSize," ").concat(o,"-button")}),a=b('
'),l=(t.attach(a),"h5p-advancedtext"===o?{x:e.x,y:e.y}:null);return v(s,function(){var e;s.attr("aria-expanded","true"),i.showInteractionPopup(t,s,a,o,(e=s,function(){return e.attr("aria-expanded","false")}),l)}),void 0!==e.action&&"H5P.InteractiveVideo"===e.action.library.substr(0,20)&&t.on("controls",function(){t.controls.$fullscreen&&t.controls.$fullscreen.remove()}),s},B.prototype.showInteractionPopup=function(e,t,n,i,r){function o(){e.trigger("resize")}var s=this,a=5
",{role:"button",tabindex:0,title:o.l10n.solutionsButtonTitle,"aria-haspopup":"dialog","aria-expanded":!1,class:"h5p-element-solution"}).append('').appendTo(r),n={x:i.x,y:i.y},i.displayAsButton||(n.x+=i.width-4,n.y+=i.height-12),v(t,function(e){o.showPopup({popupContent:i.solution,$focusOnClose:t,parentPosition:n,updateAriaExpanded:!0}),t.attr("aria-expanded",!0),e.stopPropagation()}))},void 0!==i.alwaysDisplayComments&&i.alwaysDisplayComments&&e.showCPComments()},B.prototype.showPopup=function(e){var n,i,r,t,o,s=this,a=e.popupContent,l=e.$focusOnClose,c=e.parentPosition,c=void 0===c?null:c,u=e.remove,d=e.classes,d=void 0===d?"h5p-popup-comment-field":d,p=e.instance,h=e.keepInDOM,f=void 0!==h&&h,m=e.updateAriaExpanded,g=this,e=(this.popupId=void 0===this.popupId?0:this.popupId+1,this.closePopup=function(e){var t=!(1
')).find(".h5p-popup-wrapper"),a instanceof H5P.jQuery?h.append(a):h.html(a),r="",h.children().each(function(e,t){t.setAttribute("id","popup-content-"+s.popupId+"-"+e),r+="popup-content-"+s.popupId+"-"+e+" "}),i.find(".h5p-popup-container").attr("aria-describedby",r),p)&&p.subContentId&&(g.popups[p.subContentId]=i),i.find(".h5p-popup-container"));return d=i,a=e,(h=c)&&(a.css({visibility:"hidden"}),d.prependTo(s.$wrapper),p=a.height(),c=a.width(),t=p*(100/(p=d.height())),50<(c=c*(100/d.width()))&&50
=u.slides.length?0:e,d=!(c=null)}).bind("touchmove",function(e){var t=e.originalEvent.touches,n=(d&&(u.$current.prev().addClass("h5p-touch-move"),u.$current.next().addClass("h5p-touch-move"),d=!1),s=t[0].pageX,r-s);null===c&&(c=Math.abs(o-e.originalEvent.touches[0].pageY)>Math.abs(n)),1!==t.length||c||(e.preventDefault(),p)||(n<0?u.$current.prev().css(i("translateX("+(a-n)+"px")):u.$current.next().css(i("translateX("+(l-n)+"px)")),u.$current.css(i("translateX("+-n+"px)")))}).bind("touchend",function(){if(!c){var e=r-s;if(e>u.swipeThreshold&&u.nextSlide(void 0,!1)||e<-u.swipeThreshold&&u.previousSlide(void 0,!1))return}u.$slidesWrapper.children().css(t).removeClass("h5p-touch-move")})},B.prototype.updateTouchPopup=function(e,t,n,i){var r;arguments.length<=0?void 0!==this.touchPopup&&this.touchPopup.remove():(r="",void 0!==this.$keywords&&void 0!==this.$keywords.children(":eq("+t+")").find("span").html()?r+=this.$keywords.children(":eq("+t+")").find("span").html():r+=this.l10n.slide+" "+(t+1),void 0===this.editor&&t>=this.slides.length-1&&(r=this.l10n.showSolutions),void 0===this.touchPopup?this.touchPopup=H5P.jQuery("",{class:"h5p-touch-popup"}).insertAfter(e):this.touchPopup.insertAfter(e),i-.15*e.parent().height()<0?i=0:i-=.15*e.parent().height(),this.touchPopup.css({"max-width":e.width()-n,left:n,top:i}),this.touchPopup.html(r))},B.prototype.previousSlide=function(e){var t=!(1{H5P.ContentType=function(t){function e(){}return(e.prototype=new H5P.EventDispatcher).isRoot=function(){return t},e.prototype.getLibraryFilePath=function(t){return furtherH5PInlineResources[this.libraryInfo.versionedNameNoSpaces+"/"+t]||this.libraryInfo.versionedNameNoSpaces+"/"+t},e};var i=HTMLScriptElement.prototype.setAttribute,n=(HTMLScriptElement.prototype.setAttribute=function(t,e){if("src"===t){if(!(e instanceof String)){if(!e.toString)return void i.call(this,t,e);e=e.toString()}var r=window.location.href.substr(0,window.location.href.lastIndexOf("/")),r=(e=e.startsWith(r)?e.substr(r.length+1):e).match(/^.\/libraries\/([^?]+)\??.*$/);r&&(r=r[1],furtherH5PInlineResources[r])&&(e=furtherH5PInlineResources[r])}i.call(this,t,e)},Object.defineProperty(HTMLScriptElement.prototype,"src",{set(t){this.setAttribute("src",t)}}),HTMLLinkElement.prototype.setAttribute);HTMLLinkElement.prototype.setAttribute=function(t,e){if("href"===t){if(!(e instanceof String)){if(!e.toString)return void i.call(this,t,e);e=e.toString()}var r=window.location.href.substr(0,window.location.href.lastIndexOf("/")),r=(e=e.startsWith(r)?e.substr(r.length+1):e).match(/^.\/libraries\/([^?]+)\??.*$/);r&&(r=r[1],furtherH5PInlineResources[r])&&(e=furtherH5PInlineResources[r])}n.call(this,t,e)},Object.defineProperty(HTMLLinkElement.prototype,"src",{set(t){this.setAttribute("src",t)}});let e=fetch;fetch=(...t)=>1==t.length&&"string"==typeof t[0]&&furtherH5PInlineResources[t[0]]?fetch(furtherH5PInlineResources[t[0]]):e(...t)})();