",{class:"h5p-joubelui-progressbar-background"}).appendTo(this.$progressbar)}return((e.prototype=Object.create(H5P.EventDispatcher.prototype)).constructor=e).prototype.updateAria=function(){var e;this.options.disableAria||(this.$currentStatus||(this.$currentStatus=i("
",{class:"h5p-joubelui-progressbar-slide-status-text","aria-live":"assertive"}).appendTo(this.$progressbar)),e=this.options.progressText.replace(":num",this.currentStep).replace(":total",this.steps),this.$currentStatus.html(e))},e.prototype.appendTo=function(e){this.$progressbar.appendTo(e)},e.prototype.setProgress=function(e){e>this.steps||e<0||(this.currentStep=e,this.$background.css({width:this.currentStep/this.steps*100+"%"}),this.updateAria())},e.prototype.next=function(){this.setProgress(this.currentStep+1)},e.prototype.reset=function(){this.setProgress(0)},e.prototype.isLastStep=function(){return this.steps===this.currentStep},e}(H5P.jQuery),(H5P=H5P||{}).JoubelUI=function(i){function e(){}var t;return e.createTip=function(e,t){return new H5P.JoubelTip(e,t)},e.createMessageDialog=function(e,t){return new H5P.JoubelMessageDialog(e,t)},e.createHelpTextDialog=function(e,t,i){return new H5P.JoubelHelpTextDialog(e,t,i)},e.createProgressCircle=function(e,t,i,n){return new H5P.JoubelProgressCircle(e,t,i,n)},e.createThrobber=function(){return new H5P.JoubelThrobber},e.createSimpleRoundedButton=function(e){return new H5P.SimpleRoundedButton(e)},e.createSlider=function(e){return new H5P.JoubelSlider(e)},e.createScoreBar=function(e,t,i,n){return new H5P.JoubelScoreBar(e,t,i,n)},e.createProgressbar=function(e,t){return new H5P.JoubelProgressbar(e,t)},e.createButton=function(e){var t="button";return e.href?t="a":e.type="button",e.class?e.class+=" h5p-joubelui-button":e.class="h5p-joubelui-button",i("<"+t+"/>",e)},H5P.isFramed&&!H5P.hasiOSiframeScrollFix&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&(H5P.hasiOSiframeScrollFix=!0,t=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(){(this instanceof HTMLAnchorElement||this instanceof HTMLInputElement||this instanceof HTMLSelectElement||this instanceof HTMLTextAreaElement||this instanceof HTMLButtonElement||this instanceof HTMLIFrameElement||this instanceof HTMLAreaElement)&&!this.getAttribute("role")&&t.call(this)}),e}(H5P.jQuery),/*!@license H5P.Components-1.0/dist/h5p-components.js by H5P Group licensed under MIT*/(()=>{"use strict";function _(e){let t,i="h5p-theme-primary-cta";"secondary"===e.styleType?i="h5p-theme-secondary-cta":"nav"===e.styleType&&(i="h5p-theme-nav-button"),i="h5p-theme-button "+i,e.icon&&(i+=" h5p-theme-"+e.icon,t=e.tooltip??e.label);var n,s=P("button",{innerHTML:e.label?`
${e.label}`:"",ariaLabel:null==(s=e.ariaLabel??e.label)?"":((n=document.createElement("div")).innerHTML=s,n.textContent),classList:e.classes?i+" "+e.classes:i,onclick:e.onClick,type:e.buttonType??"button",disabled:e.disabled??!1});return t&&H5P.Tooltip(s,{text:t,position:e.tooltipPosition??"top"}),e.icon&&o.observe(s),s}function x(e={}){const t=e.progressLength??1;let i=e.index??0;const n=P("div",{classList:"h5p-visual-progress",role:"progressbar",ariaValueMax:e.ariaValueMax??100,ariaValueMin:e.ariaValueMin??0,ariaValueNow:e.ariaValueNow??0}),s=P("div",{classList:"h5p-visual-progress-inner"});return n.appendChild(s),(e=e=>{i=e,n.setAttribute("aria-valuenow",((e+1)/t*100).toFixed(2)),s.style.width=(e+1)/t*100+"%"})(i),n.updateProgressBar=e,n}function C(o={}){const i=o.dots.length;let r=o.index??0;const a=[],s=P("ul",{className:"h5p-progress-dots-container"}),l=e=>{e.preventDefault();var t=Number(e.target.getAttribute("data-index"));n(t),o.handleProgressDotClick?.(e)},c=e=>{switch(e.code){case"Enter":case"Space":l(e);break;case"ArrowLeft":case"ArrowUp":t(r-1);break;case"ArrowRight":case"ArrowDown":t(r+1)}},h=o.dots.some(e=>0<=e.tabIndex),t=(o.dots.forEach((e,t)=>{var i=P("li",{className:"h5p-progress-item"}),n=h?e.tabIndex??-1:0===t?0:-1,e=P("a",{href:"#",className:"h5p-progress-dot unanswered "+(0<=n?"current":""),ariaLabel:e.ariaLabel,tabIndex:n,onclick:l,onkeydown:c});e.setAttribute("data-index",t),i.appendChild(e),s.appendChild(i),a.push(e)}),(e,t=!0)=>{e<0||e>=i||(r=e,a.forEach((e,t)=>{e.setAttribute("tabIndex",r===t?0:-1)}),t&&a[r].focus())}),n=n=>{let s=o.texts;a.forEach((e,t)=>{e.setAttribute("tabIndex",r===t?0:-1);var t=t===n,i=s.jumpToQuestion.replace("%d",(n+1).toString()).replace("%total",a.length);i+=t?", "+s.currentQuestionText:", "+(e.classList.contains("answered")?s.answeredText:s.unansweredText),e.classList.toggle("current",t),e.setAttribute("aria-label",i)})};return s.setActiveDot=t,s.toggleFilledDot=(e,t)=>{var i=o.texts.jumpToQuestion.replace("%d",(e+1).toString()).replace("%total",a.length)+", "+(t?o.texts.answeredText:o.texts.unansweredText);a[e].classList.toggle("unanswered",!t),a[e].classList.toggle("answered",t),a[e].setAttribute("aria-label",i)},s.toggleCurrentDot=n,s}const P=(e,t,i={})=>{e=Object.assign(document.createElement(e),t);return Object.assign(e.style,i),e},a=e=>{if(!e)return 0;var t=getComputedStyle(e);let i=parseFloat(t.lineHeight);isNaN(i)&&(i=1.2*parseFloat(t.fontSize));t=e.getBoundingClientRect().height/i;return Math.abs(Math.round(t)-t)<.01?Math.round(t):Math.ceil(t)},l=(e,t)=>e&&t&&(e=e.offsetWidth,t=t.clientWidth,e)&&t?e/t:0,o=new ResizeObserver((()=>{let t;return(...e)=>{clearTimeout(t),t=setTimeout(()=>(e=>{for(const t of e){const e=t.target;if(!e.isConnected||e.matches(":hover"))continue;const i=e.querySelector(".h5p-theme-label"),n=a(i);if(!n)continue;const s=l(i,e),o=n>1||s>.85,r=e.parentElement;for(const e of r.children)e instanceof HTMLButtonElement&&e.isConnected&&e.classList.toggle("icon-only",o)}})(...e),40)}})());function c(e,t,i){e=P("span",{classList:e,innerText:t});return i&&H5P.Tooltip(e,{text:i,position:"top"}),e}function k(t,e,i,n,s={}){var o,r;t.innerHTML="",e=e,o={"@current":()=>c("progress-current",i+1,s.currentTooltip),"@total":()=>c("progress-last",n,s.totalTooltip)},r=Object.keys(o),r=new RegExp(`(${r.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})`,"g"),e.split(r).filter(e=>""!==e).map(e=>o[e]?o[e]():document.createTextNode(e)).forEach(e=>t.appendChild(e))}const t={default:'\n
\n ',h5pImageDefault:'\n
\n '};(H5P=H5P||{}).Components=H5P.Components||{},H5P.Components.CoverPage=function(e){let t="h5p-theme-cover-page";(e.useMediaContainer||e.img)&&(t+=" h5p-theme-cover-page-with-image");var i=P("div",{classList:t}),n=(i.appendChild(P("div",{classList:"h5p-theme-pattern-container",innerHTML:'
'})),e.useMediaContainer?i.appendChild(P("div",{classList:"h5p-theme-cover-img"})):e.img&&i.appendChild(P("img",{src:e.img,alt:e.imgAlt??"",classList:"h5p-theme-cover-img"})),P("div",{classList:"h5p-theme-cover-details"}));return e.icon&&n.appendChild(P("span",{classList:"h5p-theme-cover-icon h5p-theme-"+e.icon,ariaHidden:!0})),n.appendChild(P("h2",{textContent:e.title})),e.description&&n.appendChild(P("p",{classList:"h5p-theme-cover-description",innerHTML:e.description})),n.appendChild(_({label:e.buttonLabel,icon:e.icon,onClick:e.buttonOnClick})),i.appendChild(n),i},H5P.Components.Button=_,H5P.Components.Draggable=function(e){let t="h5p-draggable";e.hasHandle&&(t+=" h5p-draggable--has-handle"),e.statusChangesBackground&&(t+=" h5p-draggable--background-status"),e.pointsAndStatus&&(t+=" h5p-draggable--points-and-status");const i=({dom:e,label:t})=>{n.innerHTML="",e?n.append(e):n.innerHTML=`
${t}`},n=P("div",{classList:t,role:"button",tabIndex:e.tabIndex??0});return i({dom:e.dom,label:e.label}),n.setAttribute("aria-grabbed",e.ariaGrabbed??!1),H5P.jQuery(n).draggable({revert:e.handleRevert,drag:e.handleDragEvent,start:e.handleDragStartEvent,stop:e.handleDragStopEvent,containment:e.containment}),n.setContentOpacity=e=>{e=Math.max(0,Math.min(Number(e)??100,100))/100;n.style.setProperty("--content-opacity",e)},n.setOpacity=e=>{e=Math.max(0,Math.min(Number(e)??100,100))/100;n.style.setProperty("--opacity",e)},n.getBorderWidth=()=>window.getComputedStyle(n).getPropertyValue("--border-width"),n.setContent=i,n.setDragHandleVisibility=e=>{n.classList.toggle("h5p-draggable--has-handle",e)},n},H5P.Components.Dropzone=function(i){const e=["h5p-dropzone","area"===i.variant?"h5p-dropzone--area":"h5p-dropzone--inline"];"string"==typeof i.containerClasses&&e.push(i.containerClasses),0===i.backgroundOpacity?e.push("h5p-dropzone--transparent-background"):100===i.backgroundOpacity&&e.push("h5p-dropzone--opaque-background");var t={classList:e.join(" "),role:i.role,ariaDisabled:i.ariaDisabled},t=P("div",t);if("area"===i.variant&&i.areaLabel){const e=P("div",{classList:"h5p-dropzone_label"});e.innerHTML=i.areaLabel,t.appendChild(e)}const n=H5P.jQuery("
",{"aria-dropeffect":"none","aria-label":i.ariaLabel,tabindex:i.tabIndex??-1,class:i.classes||""}).appendTo(t).droppable({activeClass:"h5p-dropzone--active",tolerance:i.tolerance,accept:i.handleAcceptEvent,over:(e,t)=>{n.classList.add("h5p-dropzone--hover"),i.handleDropOverEvent?.(e,t)},out:(e,t)=>{n.classList.remove("h5p-dropzone--hover"),i.handleDropOutEvent?.(e,t)},drop:(e,t)=>{n.classList.remove("h5p-dropzone--hover"),i.handleDropEvent?.(e,t,i.index??-1)}}).get(0);return t},H5P.Components.Navigation=function(t={}){let i,n,s,o,r,a,l,c=!1,h=t.index??0,e="h5p-navigation";"2-split-spread"===t.variant?e+=" h5p-navigation--2-split-spread":"2-split-next"===t.variant?e+=" h5p-navigation--2-split-next":e+=" h5p-navigation--3-split";var u,d,p,f,g,m=P("nav",{classList:e+" "+(t.className??""),role:"navigation"});if(t.handlePrevious){const P="h5p-theme-previous";r=_({styleType:"nav",label:t?.texts?.previousButton??"Previous",ariaLabel:t?.texts.previousButtonAria,tooltip:t?.texts.previousTooltip,icon:"previous",classes:0===h?t.showDisabledButtons?P+" h5p-disabled":P+" h5p-visibility-hidden":P,disabled:t.showDisabledButtons&&0===h,onClick:e=>{!1!==t.handlePrevious(e)&&y()}}),m.appendChild(r)}if("bar"===t.progressType)i=x({index:h,progressLength:t.navigationLength}),m.appendChild(i);else if("dots"===t.progressType)n=C({dots:t.dots,texts:t.texts??{},handleProgressDotClick:e=>{h=Number(e.target.getAttribute("data-index")),t.handleProgressDotClick?.(e,h)}}),m.appendChild(n);else if("text"===t.progressType){const i=P("div",{classList:"progress-container h5p-theme-progress"});if(s=([{textualProgress:u,currentIndex:d,navigationLength:p,texts:f={}}]=[{textualProgress:t.texts.textualProgress,currentIndex:h,navigationLength:t.navigationLength,texts:t.texts}],k(g=P("div",{classList:"progress-text"}),u,d,p,f),g),i.appendChild(s),t.titles&&0
{!1!==t.handleNext(e)&&w()}}),m.appendChild(a)}t.handleLast&&(l=_({styleType:"primary",label:t?.texts?.lastButton??"Submit",ariaLabel:t?.texts.lastButtonAria,tooltip:t?.texts.lastTooltip,icon:"show-results",classes:"h5p-visibility-hidden",onClick:e=>{w(),t.handleLast(e)}}),m.appendChild(l));const v=()=>{var e;t.showDisabledButtons?(r&&(r.toggleAttribute("disabled",0===h),r.classList.toggle("h5p-disabled",0===h)),a&&(e=h>=t.navigationLength-1,a.toggleAttribute("disabled",e),a.classList.toggle("h5p-disabled",e),l?.classList.toggle("h5p-visibility-hidden",!c||!e))):(r&&0===h?r.classList.add("h5p-visibility-hidden"):r&&0=t.navigationLength-1?(a.classList.add("h5p-visibility-hidden"),l?.classList.toggle("h5p-visibility-hidden",!c)):a&&h{h=e,o&&t.titles&&t.titles[h]&&(o.textContent=t.titles[h]),i?i.updateProgressBar(h):s?k(s,t.texts.textualProgress,h,t.navigationLength,t.texts):n&&n.toggleCurrentDot(h),v()},y=()=>{b(h-1)},w=()=>{b(h+1)};return m.setCurrentIndex=b,m.setNavigationLength=e=>{if("number"!=typeof e||e<0)throw new Error("Invalid navigation length");t.navigationLength=e},m.previous=y,m.next=w,m.setCanShowLast=e=>{c=e,v()},m.progressBar=i,m.progressDots=n,m},H5P.Components.PlaceholderImg=function(e){e=function(e){if("string"==typeof e){var e=e.trim();if(e.includes("