Sindbad~EG File Manager

Current Path : /var/www/moodledata/bnf310/filedir/f9/a3/
Upload File :
Current File : /var/www/moodledata/bnf310/filedir/f9/a3/f9a3d539c07c7f4355dc2010d9039696c0c751dd

(()=>{"use strict";var t=function(){function t(e,a){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.params=a,this.previousState=n,this.params.audioNotSupported=this.params.audioNotSupported||"Your browser does not support this audio.",this.params.a11y=a.a11y||[],this.params.a11y.play=this.params.a11y.play||"Play",this.params.a11y.playSlowly=this.params.a11y.playSlowly||"Play slowly",this.params.a11y.triesLeft=this.params.a11y.triesLeft||"number of tries left: @number",this.params.a11y.infinite=this.params.a11y.infinite||"infinite",this.params.a11y.sentence=this.params.a11y.sentence||"Sentence",this.params.a11y.solution=this.params.a11y.solution||"Solution",this.params.a11y.enterText=this.params.a11y.enterText||"Enter what you have heard",this.params.type=this.params.type||t.BUTTON_TYPE_NORMAL,this.params.callbacks=this.params.callbacks||{},this.params.callbacks.playAudio=this.params.callbacks.playAudio||function(){},void 0===n.triesLeft?this.triesLeft=this.params.maxTries:null===n.triesLeft?this.triesLeft=1/0:this.triesLeft=n.triesLeft,this.dom=this.createAudioDOM(e,this.params),null===this.dom.firstChild&&this.dom.appendChild(this.getDummyButtonDOM()),this.status=t.STATUS_ENDED}var e=t.prototype;return e.createAudioDOM=function(e,a){var n=this,i=H5P.jQuery("<div>",{class:t.AUDIO_WRAPPER});if(void 0!==a.sample){var s={files:a.sample,audioNotSupported:a.audioNotSupported},o=new H5P.Audio(s,e,{previousState:this.previousState.audio});o.attach(i),this.button=o.$audioButton.get(0),this.audio=o,a.type===t.BUTTON_TYPE_SLOW?(o.$audioButton.removeClass(t.BUTTON_PLAY).addClass(t.BUTTON_SLOW),this.setLabel(a.a11y.playSlowly)):this.setLabel(a.a11y.play),this.triesLeft<1&&this.audio.disableToggleButton(),this.previousState.audio&&0!==this.previousState.audio.currentTime&&(this.status=t.STATUS_PAUSE,o.$audioButton.addClass(t.BUTTON_PLAY_PAUSED)),o.audio.addEventListener("play",(function(){a.type===t.BUTTON_TYPE_SLOW&&o.$audioButton.removeClass(t.BUTTON_SLOW).addClass(t.BUTTON_PAUSE),n.status=t.STATUS_PLAYING,n.params.callbacks.playAudio(n)})),o.audio.addEventListener("pause",(function(){a.type===t.BUTTON_TYPE_SLOW&&o.$audioButton.removeClass(t.BUTTON_PAUSE).addClass(t.BUTTON_SLOW),n.status=t.STATUS_PAUSE})),o.audio.addEventListener("ended",(function(){n.handlePlayed(),a.type===t.BUTTON_TYPE_SLOW?(o.$audioButton.removeClass(t.BUTTON_PAUSE).addClass(t.BUTTON_SLOW),n.setLabel(n.params.a11y.playSlowly)):n.setLabel(n.params.a11y.play),n.status=t.STATUS_ENDED})),o.audio&&o.audio.preload&&(o.audio.preload="none")}return i.get(0)},e.getDOM=function(){return this.dom},e.getDummyButtonDOM=function(){var e=document.createElement("div");e.classList.add(t.BUTTON),e.classList.add(t.BUTTON_NONE);var a=document.createElement("div");return a.classList.add(t.INNER_CONTAINER),a.appendChild(e),a},e.play=function(){this.status!==t.STATUS_PLAYING&&this.button.click()},e.pause=function(){this.status===t.STATUS_PLAYING&&this.button.click()},e.handlePlayed=function(){this.triesLeft--,0===this.triesLeft&&this.disable()},e.setLabel=function(t){var e=isFinite(this.triesLeft)?this.triesLeft:this.params.a11y.infinite,a=this.params.a11y.triesLeft.replace(/@number/g,e);this.button&&(this.button.setAttribute("aria-label","".concat(t,". ").concat(a)),this.button.setAttribute("title",a))},e.reset=function(){this.triesLeft=this.params.maxTries,this.audio&&this.audio.seekTo(0),this.status=t.STATUS_ENDED,this.enable(),this.params.type===t.BUTTON_TYPE_SLOW?this.setLabel(this.params.a11y.playSlowly):this.setLabel(this.params.a11y.play)},e.enable=function(){this.button&&this.audio.enableToggleButton()},e.setUntabbable=function(){this.button&&this.button.setAttribute("tabindex","-1")},e.setTabbable=function(){this.button&&this.button.setAttribute("tabindex","0")},e.disable=function(){this.button&&this.audio.disableToggleButton()},e.isEnabled=function(){return!!this.button&&this.audio.isEnabled()},e.resetAudio=function(){this.audio&&this.audio.audio&&this.audio.audio.load&&this.audio.audio.load(),this.button&&(this.button.classList.remove(t.BUTTON_PAUSE),this.button.classList.remove(t.BUTTON_PLAY_PAUSED),this.params.type===t.BUTTON_TYPE_SLOW?this.button.classList.add(t.BUTTON_SLOW):this.button.classList.add(t.BUTTON_PLAY))},e.getCurrentState=function(){return{audio:this.audio?this.audio.getCurrentState():void 0,triesLeft:this.triesLeft}},e.focus=function(){this.button&&this.button.focus()},t}();t.BUTTON_TYPE_NORMAL=0,t.BUTTON_TYPE_SLOW=1,t.STATUS_PAUSE=0,t.STATUS_PLAYING=1,t.STATUS_ENDED=2,t.AUDIO_WRAPPER="h5p-dictation-audio-wrapper",t.BUTTON="h5p-audio-minimal-button",t.BUTTON_PLAY="h5p-audio-minimal-play",t.BUTTON_PLAY_PAUSED="h5p-audio-minimal-play-paused",t.BUTTON_PAUSE="h5p-audio-minimal-pause",t.BUTTON_SLOW="h5p-audio-minimal-slow",t.BUTTON_NONE="h5p-audio-minimal-none",t.INNER_CONTAINER="h5p-audio-inner";const e=t;function a(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){function t(){}return t.extend=function(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&("object"===i(arguments[0][e])&&"object"===i(arguments[t][e])?this.extend(arguments[0][e],arguments[t][e]):arguments[0][e]=arguments[t][e]);return arguments[0]},t.htmlDecode=function(t){return(new DOMParser).parseFromString(t,"text/html").documentElement.textContent},t.revertRTL=function(e){var a=[],n=[];return e.forEach((function(e){t.containsRTLCharacters(e.solution)?n.push(e):(a=a.concat(n.reverse()),n=[],a.push(e))})),0!==n.length&&(a=a.concat(n.reverse())),a},t.splitWordAlternatives=function(t){return t.split("").reverse().join("").split(/\|(?!\\)/).map((function(t){return t.split("").reverse().join("").replace("\\|","|")})).reverse()},t.containsRTLCharacters=function(e){return new RegExp("^[^"+t.RTL+"]*?["+t.RTL+"]").test(e)},t.buildCombinations=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",i=[];return t.forEach((function(t){i.push.apply(i,a(e.map((function(e){return""===e?t:"".concat(e).concat(n).concat(t)}))))})),i},t.formatLanguageCode=function(t){if("string"!=typeof t)return t;var e=t.split("-");return e[0]=e[0].toLowerCase(),e.length>1&&(e[1]=e[1].toUpperCase()),t=e.join("-")},t.shuffleArray=function(t){var e,a,n;for(n=t.length-1;n>0;n--)e=Math.floor(Math.random()*(n+1)),a=t[n],t[n]=t[e],t[e]=a;return t},t}();s.RTL="֑-ࣿ";const o=s;var r=function(){function t(e){var a=this;this.params=e,this.words=document.createElement("div"),this.words.classList.add(t.SOLUTION_TEXT),this.words.setAttribute("role","list"),this.words.setAttribute("aria-label",this.params.a11y.solution),this.words.setAttribute("aria-expanded","false"),this.words.setAttribute("tabindex","0"),this.words.addEventListener("keydown",(function(t){var e=a.words.getAttribute("aria-expanded"),n=a.wordMarked||(a.params.containsRTL?a.words.lastChild:a.words.firstChild);switch(t.keyCode){case 13:case 32:if(t.target!==t.currentTarget)break;"false"===e?(a.words.setAttribute("aria-expanded","true"),n&&n.focus()):(a.words.setAttribute("aria-expanded","false"),n.setAttribute("tabindex","-1"))}})),this.solutionInner=document.createElement("div"),this.solutionInner.classList.add(t.SOLUTION_INNER),this.solutionInner.appendChild(this.words),this.container=document.createElement("div"),this.container.classList.add(t.SOLUTION_CONTAINER),this.container.classList.add(t.HIDE),this.container.appendChild(this.solutionInner)}var e=t.prototype;return e.getDOM=function(){return this.container},e.createSolution=function(t){var e=this;return this.params.containsRTL&&(t.words=o.revertRTL(t.words)),t.words.map((function(a,n){return e.createSolutionWordDOM(n,a,t.words.length-1!==n)}))},e.createSolutionWordDOM=function(t,e){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"first"===this.params.alternateSolution&&"match"!==e.type&&"typo"!==e.type&&(e.solution=e.solution?o.splitWordAlternatives(e.solution)[0]:"");var n=document.createElement("span");!1===this.params.customTypoDisplay&&"typo"===e.type?n.classList.add("h5p-wrapper-wrong"):n.classList.add("h5p-wrapper-".concat(e.type)),a&&n.classList.add("h5p-spacer"),n.setAttribute("tabindex","-1"),n.setAttribute("role","listitem"),this.addSolutionWordListeners(n);var i="".concat(this.params.a11y.item," ").concat(t+1,"."),s=this.createAriaExplanation(e),r=this.createAriaScore(e.type);return n.setAttribute("aria-label","".concat(i," ").concat(s," ").concat(r)),this.appendExplanationTo(n,e),n},e.addSolutionWordListeners=function(t){var e=this;t.addEventListener("focus",(function(t){e.wordMarked=t.target,t.target.setAttribute("tabindex","0")})),t.addEventListener("keydown",(function(t){var a=e.params.containsRTL?t.target.parentNode.lastChild:t.target.parentNode.firstChild,n=e.params.containsRTL?t.target.parentNode.firstChild:t.target.parentNode.lastChild;switch(t.keyCode){case 37:case 38:t.preventDefault(),t.target.previousSibling&&(t.target.setAttribute("tabindex","-1"),t.target.previousSibling.focus());break;case 39:case 40:t.preventDefault(),t.target.nextSibling&&(t.target.setAttribute("tabindex","-1"),t.target.nextSibling.focus());break;case 36:t.preventDefault(),t.target!==a&&(t.target.setAttribute("tabindex","-1"),a.focus());break;case 35:t.preventDefault(),t.target!==n&&(t.target.setAttribute("tabindex","-1"),n.focus())}}))},e.createAriaExplanation=function(t){var e={match:this.params.a11y.correct,wrong:this.params.a11y.wrong,typo:this.params.a11y.typo,missing:this.params.a11y.missing,added:this.params.a11y.added},a=this.makeReadable(t.answer),n="match"===t.type||"typo"===t.type?o.splitWordAlternatives(t.solution).join(" ".concat(this.params.a11y.or," ")):t.solution,i=this.makeReadable(n),s="".concat(a).concat(""===a?"":". ").concat(e[t.type],".");return"wrong"!==t.type&&"typo"!==t.type&&"missing"!==t.type||(s+=" ".concat(this.params.a11y.shouldHaveBeen,". ").concat(i,".")),s},e.makeReadable=function(t){return void 0===t?"":t.replace(/\./g,this.params.a11y.period).replace(/!/g,this.params.a11y.exclamationPoint).replace(/\?/g,this.params.a11y.questionMark).replace(/,/g,this.params.a11y.comma).replace(/'/g,this.params.a11y.singleQuote).replace(/["\u201C\u201E]/g,this.params.a11y.doubleQuote).replace(/:/g,this.params.a11y.colon).replace(/;/g,this.params.a11y.semicolon).replace(/\+/g,this.params.a11y.plus).replace(/-/g,this.params.a11y.minus).replace(/\*/g,this.params.a11y.asterisk).replace(/\//g,this.params.a11y.forwardSlash)},e.createAriaScore=function(t){var e;if(this.params.zeroMistakeMode?(e=0,"match"===t?e=1:"typo"===t&&(e=1-this.params.typoFactor)):(e=-1,"match"===t?e=0:"typo"===t&&(e*=this.params.typoFactor)),0===e)e="";else{var a=-1===e||1===e?this.params.a11y.point:this.params.a11y.points;e="".concat(e," ").concat(a,".")}return e},e.appendExplanationTo=function(t,e){var a=new H5P.Question.ScorePoints;if("wrong"===e.type||"added"===e.type||"typo"===e.type){var n=document.createElement("span");n.classList.add("h5p-answer-".concat(e.type)),n.innerHTML=e.answer,t.appendChild(n)}if("added"!==e.type){var i=document.createElement("span");i.classList.add("h5p-solution-".concat(e.type)),i.innerHTML=e.solution,t.appendChild(i)}if(this.params.zeroMistakeMode){var s=a.getElement(!0);"match"===e.type&&t.appendChild(s),"typo"===e.type&&.5===this.params.typoFactor&&(s.classList.remove("h5p-question-minus-one"),s.classList.add("h5p-question-plus-one-half")),"typo"===e.type&&this.params.typoFactor<1&&t.appendChild(s)}else{var o=a.getElement(!1);"match"!==e.type&&("typo"===e.type&&.5===this.params.typoFactor&&(o.classList.remove("h5p-question-minus-one"),o.classList.add("h5p-question-minus-one-half")),("typo"!==e.type||this.params.typoFactor>0)&&t.appendChild(o))}},e.show=function(e){var a=this,n=this.createSolution(e);n.length>0&&"match"===e.words[n.length-1].type?this.words.classList.add("h5p-solution-last-correct"):this.words.classList.remove("h5p-solution-last-correct"),this.words.firstChild||n.forEach((function(e){a.words.appendChild(e),a.container.classList.remove(t.HIDE)}))},e.hide=function(){for(;this.words.firstChild;)this.words.removeChild(this.words.firstChild);this.container.classList.add(t.HIDE)},e.focus=function(){this.words.focus()},e.reset=function(){this.wordMarked=void 0,this.words.setAttribute("aria-expanded","false")},t}();r.SOLUTION_CONTAINER="h5p-solution-container",r.SOLUTION_INNER="h5p-solution-inner",r.SOLUTION_TEXT="h5p-solution-text",r.HIDE="hide";const u=r;var c=function(){function t(a,n,i){var s=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.index=a,this.position=a+1,this.params=n,this.contentId=i,this.maxTries=n.tries,this.maxTriesAlternative=n.triesAlternative,this.params.sentence.description=(this.params.sentence.description||"").trim(),this.params.callbacks=o.extend({playAudio:function(){},onInteracted:function(){},onContextChanged:function(){},resize:function(){}},n.callbacks),this.solutionText=o.htmlDecode(n.sentence.text).trim(),this.solutionText=n.ignorePunctuation?t.stripPunctuation(this.solutionText):this.solutionText,this.containsRTL="auto"===this.params.overrideRTL?o.containsRTLCharacters(this.solutionText):"on"===this.params.overrideRTL,this.mistakesMax=t.addSpaces(this.solutionText,{autosplit:this.params.autosplit,wordSeparator:this.params.wordSeparator}).split(n.wordSeparator).length,this.content=document.createElement("div"),this.content.setAttribute("role","group"),this.content.setAttribute("aria-label","".concat(this.params.a11y.sentence," ").concat(this.position)),this.content.classList.add(t.CONTENT_WRAPPER);var c=document.createElement("div");c.classList.add(t.CONTENT_DESCRIPTION),c.innerHTML=this.params.sentence.description;var l=document.createElement("div");l.classList.add(t.CONTENT_INTERACTION),this.buttonPlayNormal=new e(i,{sample:n.sentence.sample,audioNotSupported:n.audioNotSupported,type:e.BUTTON_TYPE_NORMAL,maxTries:n.tries,a11y:n.a11y,callbacks:{playAudio:function(t){s.handleButtonClicked(t)}}},r.buttonPlayNormal),l.appendChild(this.buttonPlayNormal.getDOM()),!0===this.params.hasAlternatives&&(this.buttonPlaySlow=new e(i,{sample:n.sentence.sampleAlternative,audioNotSupported:n.audioNotSupported,type:e.BUTTON_TYPE_SLOW,maxTries:n.triesAlternative,a11y:n.a11y,callbacks:{playAudio:function(t){s.handleButtonClicked(t)}}},r.buttonPlaySlow),l.appendChild(this.buttonPlaySlow.getDOM())),c.classList.add(!0===this.params.hasAlternatives?t.CONTENT_DESCRIPTION_TWO_BUTTONS:t.CONTENT_DESCRIPTION_ONE_BUTTON),this.inputField=document.createElement("textarea"),this.inputField.setAttribute("rows",1),this.inputField.setAttribute("spellcheck","false"),this.inputField.setAttribute("autocorrect","off"),this.inputField.setAttribute("autocapitalize","off"),this.inputField.setAttribute("aria-label",this.params.a11y.enterText),this.inputField.addEventListener("input",(function(){-1===s.inputField.value.indexOf("\n")&&-1===s.inputField.value.indexOf("\r")||(s.inputField.value=s.inputField.value.replace(/[\n\r]/g,"")),s.inputField.style.height="auto";var t=s.previousScrollHeight!==s.inputField.scrollHeight;s.inputField.style.height="".concat(s.inputField.scrollHeight+s.inputField.offsetHeight-s.inputField.clientHeight,"px"),t&&(s.previousScrollHeight=s.inputField.scrollHeight,s.params.callbacks.resize())})),this.inputField.classList.add(t.INPUT_FIELD),r.userInput?(this.inputField.value=r.userInput,this.oldValue=this.inputField.value||""):this.oldValue="",this.inputField.addEventListener("keydown",(function(){s.params.callbacks.onContextChanged(s.index)})),this.inputField.addEventListener("blur",(function(){s.oldValue!==s.inputField.value&&s.params.callbacks.onInteracted(),s.oldValue=s.inputField.value})),this.solution=new u({alternateSolution:this.params.alternateSolution,zeroMistakeMode:this.params.zeroMistakeMode,customTypoDisplay:this.params.customTypoDisplay,typoFactor:this.params.typoFactor,containsRTL:this.containsRTL,a11y:{match:this.params.a11y.correct,wrong:this.params.a11y.wrong,typo:this.params.a11y.typo,missing:this.params.a11y.missing,added:this.params.a11y.added,correct:this.params.a11y.correct,point:this.params.a11y.point,points:this.params.a11y.points,item:this.params.a11y.item,solution:this.params.a11y.solution,or:this.params.a11y.or,shouldHaveBeen:this.params.a11y.shouldHaveBeen,period:this.params.a11y.period,exclamationPoint:this.params.a11y.exclamationPoint,questionMark:this.params.a11y.questionMark,comma:this.params.a11y.comma,singleQuote:this.params.a11y.singleQuote,doubleQuote:this.params.a11y.doubleQuote,colon:this.params.a11y.colon,semicolon:this.params.a11y.semicolon,plus:this.params.a11y.plus,minus:this.params.a11y.minus,asterisk:this.params.a11y.asterisk,forwardSlash:this.params.a11y.forwardSlash}}),this.inputWrapper=document.createElement("div"),this.inputWrapper.classList.add(t.INPUT_WRAPPER),this.inputWrapper.appendChild(this.inputField),this.inputWrapper.appendChild(this.solution.getDOM()),l.appendChild(this.inputWrapper),this.content.appendChild(c),this.content.appendChild(l)}var a=t.prototype;return a.getDOM=function(){return this.content},a.getUserInput=function(){return this.inputField.value},a.setPosition=function(t){this.position=t,this.content.setAttribute("aria-label","".concat(this.params.a11y.sentence," ").concat(this.position))},a.showSolution=function(t){this.solution.show(t),this.buttonPlayNormal&&this.buttonPlayNormal.setUntabbable(),this.buttonPlaySlow&&this.buttonPlaySlow.setUntabbable()},a.hideSolution=function(){this.solution.hide(),this.buttonPlayNormal&&this.buttonPlayNormal.setTabbable(),this.buttonPlaySlow&&this.buttonPlaySlow.setTabbable()},a.getCorrectText=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?t.addSpaces(this.solutionText,{autosplit:this.params.autosplit,wordSeparator:this.params.wordSeparator}).split(this.params.wordSeparator):this.solutionText},a.getCurrentState=function(){return{index:this.index,userInput:this.getUserInput(),buttonPlayNormal:this.buttonPlayNormal?this.buttonPlayNormal.getCurrentState():void 0,buttonPlaySlow:this.buttonPlaySlow?this.buttonPlaySlow.getCurrentState():void 0}},a.getMaxMistakes=function(){return this.mistakesMax},a.getXAPIDescription=function(){return this.params.sentence.description?"<p>".concat(this.params.sentence.description,"</p>"):""},a.reset=function(){this.inputField.value="",this.oldValue="",this.solution.reset(),this.buttonPlayNormal&&this.buttonPlayNormal.reset(),this.buttonPlaySlow&&this.buttonPlaySlow.reset()},a.disable=function(){this.inputField.disabled=!0,this.buttonPlayNormal&&(this.buttonPlayNormal.disable(),this.buttonPlayNormal.resetAudio()),this.buttonPlaySlow&&(this.buttonPlaySlow.disable(),this.buttonPlaySlow.resetAudio())},a.enable=function(){this.inputField.disabled=!1,this.buttonPlayNormal&&this.buttonPlayNormal.enable(),this.buttonPlaySlow&&this.buttonPlaySlow.enable()},a.pauseButtons=function(t){this.buttonPlayNormal&&this.buttonPlayNormal!==t&&this.buttonPlayNormal.pause(),this.buttonPlaySlow&&this.buttonPlaySlow!==t&&this.buttonPlaySlow.pause()},a.handleButtonClicked=function(t){this.params.callbacks.playAudio(t),this.params.callbacks.onInteracted(),this.params.callbacks.onContextChanged(this.index)},a.focus=function(){this.buttonPlayNormal&&this.buttonPlayNormal.focus()},t.addSpaces=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a.autosplit="boolean"!=typeof a.autosplit||a.autosplit,a.wordSeparator=a.wordSeparator||" "," "!==a.wordSeparator)return e;var n=new RegExp("(".concat(t.WORD,"|^)(").concat(t.PUNCTUATION.replace("'",""),")( |$)"),"g"),i=new RegExp("( |^)(".concat(t.PUNCTUATION,")(").concat(t.WORD,"|$)"),"g");return e=e.replace(n,"$1 $2 ").replace(i," $2 $3"),!0===a.autosplit&&(e=(e=(e=e.replace(new RegExp("(".concat(t.AUTOSPLIT,")(?=").concat(t.AUTOSPLIT,")"),"g"),"$1 ")).replace(new RegExp("(".concat(t.AUTOSPLIT,")(?=").concat(t.WORD,"|d|").concat(t.PUNCTUATION,")"),"g"),"$1 ")).replace(new RegExp("(".concat(t.WORD,"|d|").concat(t.PUNCTUATION,")(?=").concat(t.AUTOSPLIT,")"),"g"),"$1 ")),e.trim()},t.stripPunctuation=function(e){var a=!1;"string"==typeof e&&(a=!0,e=[e]);var n=new RegExp("^".concat(t.PUNCTUATION)),i=new RegExp("".concat(t.PUNCTUATION,"$")),s=new RegExp(" ".concat(t.PUNCTUATION),"g"),o=new RegExp("".concat(t.PUNCTUATION.replace("'","")," "),"g");return e=e.map((function(t){return t.replace(n,"").replace(i,"").replace(s," ").replace(o," ")})),a?e.toString().replace(/[ ]{2}/g," "):e},a.computeResults=function(){var e=t.addSpaces(this.getCorrectText(),{autosplit:this.params.autosplit,wordSeparator:this.params.wordSeparator}).split(this.params.wordSeparator),a=this.getUserInput();this.params.ignorePunctuation&&(a=t.stripPunctuation(a))," "!==this.params.wordSeparator&&(e.forEach((function(e){e.split("|").forEach((function(e){if(-1!==(e=e.trim()).indexOf(" ")){var n=e.replace(/ /g,t.SPACE_ESCAPE);a=a.replace(new RegExp(e,"g"),n)}}))})),a=(a=a.replace(/ /g,this.params.wordSeparator)).replace(new RegExp(t.SPACE_ESCAPE,"g")," "));var n=""===a.trim()?[]:t.addSpaces(a,{autosplit:this.params.autosplit,wordSeparator:this.params.wordSeparator}).split(this.params.wordSeparator).filter((function(t){return t.length>0}));" "!==this.params.wordSeparator&&(n=n.map((function(t,e){return e===n.length-1?t:"".concat(t," ")})));var i=this.alignWords(e,n),s=this.computeScore(i),o=s.scoreTotal,r=s.words;return{score:{added:o[t.TYPE_ADDED],missing:o[t.TYPE_MISSING],typo:o[t.TYPE_TYPO],wrong:o[t.TYPE_WRONG],match:o[t.TYPE_MATCH],total:Math.min(o[t.TYPE_ADDED]+o[t.TYPE_MISSING]+o[t.TYPE_TYPO]+o[t.TYPE_WRONG],this.getMaxMistakes())},words:r}},a.computeScore=function(e){var a=[],n=[];n[t.TYPE_ADDED]=0,n[t.TYPE_MISSING]=0,n[t.TYPE_TYPO]=0,n[t.TYPE_WRONG]=0,n[t.TYPE_MATCH]=0;for(var i=0;i<e.words1.length;i++){var s=e.words1[i],o=e.words2[i],r="";n[r=void 0===s?t.TYPE_ADDED:void 0===o?t.TYPE_MISSING:o===s?t.TYPE_MATCH:H5P.TextUtilities.areSimilar(s,o)?t.TYPE_TYPO:t.TYPE_WRONG]++,a.push({solution:s,answer:o,type:r})}return{scoreTotal:n,words:a}},a.alignWords=function(t,e){var a=function(t){return t.words1.map((function(e,a){return e===t.words2[a]||H5P.TextUtilities.areSimilar(e,t.words2[a])||!1}))},n=function(t,e){var a,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){var i=o.splitWordAlternatives(e);return n?i.forEach((function(e){H5P.TextUtilities.areSimilar(e,t)&&(a=a||e)})):i.forEach((function(e){e===t&&(a=a||e)})),a}},i=function(t,e){e=e.map((function(t){return""===t?void 0:t}));var a=t.map((function(t){return Array.apply(null,Array(e.length)).concat(t)})).reduce((function(t,e){return t.concat(e)}),[]);a=a.concat(Array.apply(null,Array(e.length)));for(var i=Array.apply(null,Array(a.length)),s=0,o=0;o<e.length;o++)for(var r=e[o],u=a.length-1;u>=s;u--){var c=n(r,a[u]),l=void 0!==r&&void 0!==c,p=-1===e.slice(o+1).indexOf(r);if(l&&p||u===s){a[u]=c,i[u]=r,s=u+1;break}}for(var d=i.length-1;d>=0;d--){var h=i[d];if(void 0!==h&&h!==a[d]){for(var m=0,f=0,y=void 0;d+m+1<i.length&&void 0===i[d+m+1];){var T=n(h,a[d+m+1]);void 0!==T&&(f=d+m+1,y=T),m++}i[f||d+m]=h,void 0!==y&&(a[f]=y),i[d]=void 0}}for(var v=0;v<i.length;v++){var g=i[v];if(void 0!==g&&g!==a[v]){for(var b=0,S=0,w=void 0;v+b-1>=0&&void 0===i[v+b-1];){var P=n(g,a[v+b-1],!0);void 0!==P&&(S=v+b-1,w=P),b--}i[S||v+b]=g,void 0!==w&&(a[S]=w),i[v]=void 0}}for(var E=a.length-1;E>=0;E--)void 0===a[E]&&void 0===i[E]&&(a.splice(E,1),i.splice(E,1));for(var A=0;A<a.length-1;A++)void 0===a[A]&&void 0===i[A+1]&&(a[A]=a[A+1],a.splice(A+1,1),i.splice(A+1,1));for(var N=0;N<a.length-1;N++)if(i[N]===a[N]&&void 0===a[N+1]&&i[N]!==i[N+1]){for(var O=0;N+O+1<a.length&&void 0===a[N+O+1];)O++;N+O+1<a.length&&-1!==i.slice(N+1,N+O+1).lastIndexOf(i[N])&&(a[N+O+1]=a[N],a[N]=void 0)}a.reverse(),i.reverse();for(var I=0;I<a.length-1;I++)if(i[I]===a[I]&&void 0===a[I+1]&&i[I]!==i[I+1]){for(var _=0;I+_+1<a.length&&void 0===a[I+_+1];)_++;I+_+1<a.length&&-1!==i.slice(I+1,I+_+1).lastIndexOf(i[I])&&(a[I+_+1]=a[I],a[I]=void 0)}return a.reverse(),i.reverse(),{words1:a,words2:i}},s=function(t){return a(t).reduce((function(t,e){return t+(e?1:0)}),0)},r=i(t,e),u=i(t.reverse(),e.reverse());s(u)>s(r)&&(r={words1:u.words1.reverse(),words2:u.words2.reverse()});var c=a(r),l=-1,p=c.length-1;do{for(l=c.lastIndexOf(!0,p);void 0===r.words1[l+1]&&void 0===r.words2[p];)r.words1.splice(l+1,1),r.words2.splice(p,1),p-=1;p=l-1}while(l>0);return r},a.focusSolution=function(){this.solution.focus()},t}();c.CONTENT_WRAPPER="h5p-sentence",c.CONTENT_DESCRIPTION="h5p-sentence-description",c.CONTENT_DESCRIPTION_ONE_BUTTON="h5p-sentence-description-one-button",c.CONTENT_DESCRIPTION_TWO_BUTTONS="h5p-sentence-description-two-buttons",c.CONTENT_INTERACTION="h5p-sentence-interaction",c.INPUT_WRAPPER="h5p-input-wrapper",c.INPUT_FIELD="h5p-text-input",c.TYPE_ADDED="added",c.TYPE_MISSING="missing",c.TYPE_WRONG="wrong",c.TYPE_MATCH="match",c.TYPE_TYPO="typo",c.AUTOSPLIT="[一-拿挀-矿砀-賿贀-鿿]",c.PUNCTUATION="[.?!,'\";\\:\\-\\(\\)/\\+\\-\\*«»¿“-„،؟־׀׃׆ -⋯ -。〈-】!(),:;?[]﹁﹂﹏~]",c.WORD="\\w|[À-ÖØ-öø-ÿĀ-ʯ֑-ׇֽֿׁׂׅׄ-؋؍-؞ؠ-ࣿ]",c.SPACE_ESCAPE="astringthatwillneverhappen123@@";const l=c;function p(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=function(t){var e,a;function n(e,a,i){var s;(s=t.call(this,"dictation")||this).params=o.extend({media:{},taskDescription:"Please listen carefully and write what you hear.",sentences:[],behaviour:{tries:1/0,triesAlternative:1/0,shuffleSentences:"never",scoring:{ignorePunctuation:!0,zeroMistakeMode:!1,typoFactor:"100"},textual:{wordSeparator:" ",overrideRTL:"auto",autosplit:!0},feedbackPresentation:{customTypoDisplay:!1,alternateSolution:"first"},enableRetry:!0,enableSolutionsButton:!0,enableSolutionOnCheck:!1},l10n:{generalFeedback:"You have made @total mistake(s).",generalFeedbackZeroMistakesMode:"You have entered @total word(s) correctly and @typo word(s) with minor mistakes.",checkAnswer:"Check",tryAgain:"Retry",showSolution:"Show solution",audioNotSupported:"Your browser does not support this audio.",submitAnswer:"Submit"},a11y:{check:"Check the answers. The responses will be marked as correct, incorrect, or unanswered.",showSolution:"Show the solution. The task will be marked with its correct solution.",retry:"Retry the task. Reset all responses and start the task over again.",play:"Play",playSlowly:"Play slowly",triesLeft:"Number of tries left: @number",infinite:"infinite",enterText:"Enter what you have heard.",yourResult:"You got @score out of @total points",solution:"Solution",sentence:"Sentence",item:"Item",correct:"correct",wrong:"wrong",typo:"small mistake",missing:"missing",added:"added",shouldHaveBeen:"Should have been",or:"or",point:"point",points:"points",period:"period",exclamationPoint:"exclamation point",questionMark:"question mark",comma:"comma",singleQuote:"single quote",doubleQuote:"double quote",colon:"colon",semicolon:"semicolon",plus:"plus",minus:"minus",asterisk:"asterisk",forwardSlash:"forward slash"}},e);var r=i&&i.metadata&&i.metadata.defaultLanguage||"en";if(s.languageTag=o.formatLanguageCode(r),!e)return h(s);s.contentId=a,s.contentData=i||{},s.contextId=0,s.sentences=[],window.MSInputMethodContext&&document.documentMode&&s.params.sentences.forEach((function(t,e){t.sample&&"audio/x-wav"===t.sample[0].mime&&delete t.sample,t.sampleAlternative&&"audio/x-wav"===t.sampleAlternative[0].mime&&delete t.sampleAlternative}));var u=s.params.sentences.some((function(t){return void 0!==t.sampleAlternative}));return s.params.behaviour.scoring.typoFactor=parseInt(s.params.behaviour.scoring.typoFactor)/100,s.params.sentences=s.params.sentences.filter((function(t){return void 0!==t.text&&void 0!==t.sample})),s.previousSentenceStates=p(Array(s.params.sentences.length)),s.contentData.previousState&&Array.isArray(s.contentData.previousState)&&s.contentData.previousState.forEach((function(t,e){var a;s.previousSentenceStates.length>e&&(t.index=null!==(a=t.index)&&void 0!==a?a:e,s.previousSentenceStates[e]=t)})),s.params.sentences=s.params.sentences.forEach((function(t,e){s.sentences.push(new l(e,{sentence:t,audioNotSupported:s.params.l10n.audioNotSupported,tries:s.params.behaviour.tries,triesAlternative:s.params.behaviour.triesAlternative,ignorePunctuation:s.params.behaviour.scoring.ignorePunctuation,hasAlternatives:u,a11y:s.params.a11y,customTypoDisplay:s.params.behaviour.feedbackPresentation.customTypoDisplay,zeroMistakeMode:s.params.behaviour.scoring.zeroMistakeMode,typoFactor:s.params.behaviour.scoring.typoFactor,alternateSolution:s.params.behaviour.feedbackPresentation.alternateSolution,overrideRTL:s.params.behaviour.textual.overrideRTL,autosplit:s.params.behaviour.textual.autosplit,wordSeparator:s.params.behaviour.textual.wordSeparator,callbacks:{playAudio:function(t){s.handlePlayAudio(t)},onInteracted:function(){s.handleInteracted()},onContextChanged:function(t){s.handleContextChanged(t)},resize:function(){s.trigger("resize")}}},s.contentId,s.previousSentenceStates.filter((function(t){return(null==t?void 0:t.index)===e})).shift()))})),s.maxMistakes=s.sentences.map((function(t){return t.getMaxMistakes()})).reduce((function(t,e){return t+e}),0),s.mistakesCapped=0,s.isAnswered=!1,s.registerDomElements=function(){var t=s.params.media.type;if(t&&t.library){var e=t.library.split(" ")[0];"H5P.Image"===e?t.params.file&&s.setImage(t.params.file.path,{disableImageZooming:s.params.media.disableImageZooming,alt:t.params.alt,title:t.params.title}):"H5P.Video"===e&&t.params.sources&&s.setVideo(t)}if(s.params.taskDescription&&(s.introduction=document.createElement("div"),s.introduction.innerHTML=s.params.taskDescription,s.setIntroduction(s.introduction)),s.content=document.createElement("div"),s.content.classList.add("h5p-dictation-sentences"),s.contentData.previousState){var a=s.previousSentenceStates.reduce((function(t,e,a){return[].concat(p(t),[e?null==e?void 0:e.index:a])}),[]);s.reorderSentences(a)}else"never"!==s.params.behaviour.shuffleSentences&&s.shuffleSentences();s.addSentences(),s.setContent(s.content),0!==s.sentences.length&&s.addButtons()},s.addButtons=function(){s.addButton("show-solution",s.params.l10n.showSolution,(function(){s.showSolutions(),s.hideButton("show-solution")}),!1,{"aria-label":s.params.a11y.showSolution},{}),s.addButton("check-answer",s.params.l10n.checkAnswer,(function(){s.showEvaluation(),s.isAnswered=!0,s.triggerXAPIAnswered(),s.params.behaviour.enableRetry&&!s.isPassed()&&s.showButton("try-again")}),!0,{"aria-label":s.params.a11y.check},{contentData:s.contentData,textIfSubmitting:s.params.l10n.submitAnswer}),s.addButton("try-again",s.params.l10n.tryAgain,(function(){s.resetTask(),s.sentences[0].focus()}),!1,{"aria-label":s.params.a11y.retry},{})},s.addSentences=function(){if(s.content.innerHTML="",0===s.sentences.length){var t=document.createElement("div");t.classList.add("h5p-dictation-no-content"),t.innerHTML="I really need at least one sound sample and text for it :-)",s.content.appendChild(t)}else s.sentences.forEach((function(t){s.content.appendChild(t.getDOM())}))},s.shuffleSentences=function(){s.sentences=o.shuffleArray(s.sentences),s.sentences.forEach((function(t,e){t.setPosition(e+1)}))},s.reorderSentences=function(t){for(var e=[],a=0;a<t.length;a++)e.push(s.sentences[t[a]]);s.sentences=e},s.handlePlayAudio=function(t){s.sentences.forEach((function(e){e.pauseButtons(t)}))},s.handleInteracted=function(){s.triggerXAPI("interacted")},s.handleContextChanged=function(t){s.contextId=t},s.showEvaluation=function(){s.hideButton("check-answer"),s.params.behaviour.enableSolutionsButton&&!s.params.behaviour.enableSolutionOnCheck&&s.showButton("show-solution"),s.computedResults=s.sentences.map((function(t){return t.computeResults()})),s.sentences.forEach((function(t){t.disable()}));var t,e=s.computedResults.map((function(t){return t.score})).reduce((function(t,e){return{added:t.added+e.added,missing:t.missing+e.missing,typo:t.typo+e.typo,wrong:t.wrong+e.wrong,match:t.match+e.match}}),{added:0,missing:0,typo:0,wrong:0,match:0}),a=e.added+e.missing+e.wrong+e.typo*s.params.behaviour.scoring.typoFactor;s.mistakesCapped=Math.min(a,s.maxMistakes),s.correctTotal=e.match+e.typo*(1-s.params.behaviour.scoring.typoFactor),t=s.params.behaviour.scoring.zeroMistakeMode?(s.params.l10n.generalFeedbackZeroMistakesMode||"").replace("@added",e.added).replace("@missing",e.missing).replace("@wrong",e.wrong).replace("@typo",e.typo).replace("@matches",e.match).replace("@total",e.match):(s.params.l10n.generalFeedback||"").replace("@added",e.added).replace("@missing",e.missing).replace("@wrong",e.wrong).replace("@typo",e.typo).replace("@matches",e.match).replace("@total",a).replace("@capped",s.mistakesCapped);var n=H5P.Question.determineOverallFeedback(s.params.overallFeedback,s.getScore()/s.getMaxScore()),i=s.params.a11y.yourResult.replace("@score",":num").replace("@total",":total");s.setFeedback("".concat(t," ").concat(n).trim(),s.getScore(),s.getMaxScore(),i),s.params.behaviour.enableSolutionOnCheck&&s.showSolutions(),s.trigger("resize")},s.isPassed=function(){return 0===s.mistakesCapped},s.getAnswerGiven=function(){return s.isAnswered||s.sentences.some((function(t){return t.getUserInput().length>0}))},s.getScore=function(){return s.params.behaviour.scoring.zeroMistakeMode?Math.round(s.correctTotal):Math.round(s.maxMistakes-s.mistakesCapped)},s.getMaxScore=function(){return s.maxMistakes},s.showSolutions=function(){s.sentences.forEach((function(t,e){t.showSolution(s.computedResults[e])})),s.sentences[0].focusSolution(),s.trigger("resize")},s.resetTask=function(){"onRetry"===s.params.behaviour.shuffleSentences&&(s.shuffleSentences(),s.addSentences()),s.sentences.forEach((function(t){t.reset(),t.enable(),t.hideSolution()})),s.removeFeedback(),s.hideButton("try-again"),s.hideButton("show-solution"),s.showButton("check-answer"),s.introduction?s.introduction.focus():s.sentences[0].focus(),s.mistakesCapped=0,s.isAnswered=!1},s.getXAPIData=function(){return{statement:s.getXAPIAnswerEvent().data.statement}},s.triggerXAPIAnswered=function(){s.trigger(s.getXAPIAnswerEvent())},s.getXAPIAnswerEvent=function(){s.computedResults=s.sentences.map((function(t){return t.computeResults()}));var t=s.createDictationXAPIEvent("answered"),e=t.getVerifiedStatementValue(["object","definition"]);if(e.extensions&&e.extensions[n.XAPI_ALTERNATIVE_EXTENSION]){var a=t.getVerifiedStatementValue(["context"]);a.extensions=a.extensions||{},a.extensions[n.XAPI_REPORTING_VERSION_EXTENSION]=n.XAPI_REPORTING_VERSION}t.setScoredResult(s.getScore(),s.getMaxScore(),h(s),!0,s.isPassed());var i=s.computedResults.reduce((function(t,e){return t.concat(e.words.reduce((function(t,e){return t.concat(e.answer||"")}),[]))}),[]).join("[,]");return t.data.statement.result.response=i,t},s.createDictationXAPIEvent=function(t){var e=s.createXAPIEventTemplate(t);return o.extend(e.getVerifiedStatementValue(["object","definition"]),s.getxAPIDefinition()),e},s.getxAPIDefinition=function(){var t=s.computedResults.reduce((function(t,e,a){var i=s.sentences[a].getXAPIDescription(),o=e.words.map((function(){return n.FILL_IN_PLACEHOLDER})).join(" ");return"".concat(t).concat(i,"<p>").concat(o,"</p>")}),""),e={name:{}};e.name[s.languageTag]=s.getTitle(),e.name["en-US"]=e.name[s.languageTag],e.description={},e.description[s.languageTag]="".concat(s.getDescription()).concat(t),e.description["en-US"]=e.description[s.languageTag],e.type="http://adlnet.gov/expapi/activities/cmi.interaction",e.interactionType="fill-in",e.extensions=e.extensions||{},e.extensions[n.XAPI_CASE_SENSITIVITY]=!0;var a=s.buildCorrectGapVariations();return e.extensions[n.XAPI_ALTERNATIVE_EXTENSION]=a,e.correctResponsesPattern=s.buildxAPICRP(a.slice()),e},s.buildCorrectGapVariations=function(){return s.computedResults.reduce((function(t,e){return t.concat(e.words.map((function(t){return t.solution?t.solution.split("|"):[]})))}),[])},s.buildxAPICRP=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=[""];return t?(e?(t.forEach((function(t){a=o.buildCombinations(t,a,"[,]")})),a=a.map((function(t){return"{case_matters=true}".concat(t)}))):(a=t.map((function(t){return t[0]})).join("[,]"),a=["{case_matters=true}".concat(a)]),a):a},s.getCurrentState=function(){return s.sentences.map((function(t){return t.getCurrentState()}))},s.getContext=function(){return{type:"sentence",value:s.contextId+1}},s.getTitle=function(){var t;return s.contentData&&s.contentData.metadata&&(t=s.contentData.metadata.title),t=t||n.DEFAULT_DESCRIPTION,H5P.createTitle(t)},s.getDescription=function(){return s.params.taskDescription||n.DEFAULT_DESCRIPTION},s}return a=t,(e=n).prototype=Object.create(a.prototype),e.prototype.constructor=e,m(e,a),n}(H5P.Question);f.DEFAULT_DESCRIPTION="Dictation",f.XAPI_ALTERNATIVE_EXTENSION="https://h5p.org/x-api/alternatives",f.XAPI_CASE_SENSITIVITY="https://h5p.org/x-api/case-sensitivity",f.XAPI_REPORTING_VERSION_EXTENSION="https://h5p.org/x-api/h5p-reporting-version",f.XAPI_REPORTING_VERSION="1.0.0",f.FILL_IN_PLACEHOLDER="__________";const y=f;H5P=H5P||{},H5P.Dictation=y})();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists