Sindbad~EG File Manager

Current Path : /var/www/moodledata/mdata-maxicambios/filedir/20/f5/
Upload File :
Current File : /var/www/moodledata/mdata-maxicambios/filedir/20/f5/20f52c7e6eb87951a9b7de011bf42bc5e4d870ca

!function(){"use strict";let t=function(){function t(){}return t.extend=function(){for(let t=1;t<arguments.length;t++)for(let e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&("object"==typeof arguments[0][e]&&"object"==typeof 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.stripHTML=function(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""},t.createArray=function(e){const s=new Array(e||0);let a=e;if(arguments.length>1){const i=Array.prototype.slice.call(arguments,1);for(;a--;)s[e-1-a]=t.createArray.apply(this,i)}return s},t.swapDOMElements=function(t,e){const s=t.parentNode,a=e.parentNode;if(!s||!a)return;const i=document.createElement("div"),n=document.createElement("div");s.replaceChild(i,t),a.replaceChild(n,e),s.replaceChild(e,i),a.replaceChild(t,n)},t.shuffleDOMElements=function(e){for(let s=e.length-1;s>0;s--){const a=Math.floor(Math.random()*(s+1));s!==a&&t.swapDOMElements(e[s],e[a])}},t.formatLanguageCode=function(t){if("string"!=typeof t)return t;const e=t.split("-");return e[0]=e[0].toLowerCase(),e.length>1&&(e[1]=e[1].toUpperCase()),t=e.join("-")},t}();var e=t;let s=function(){function t(t,s){this.params=e.extend({a11y:{active:"",disabled:"",inactive:""},active:!1,classes:[],disabled:!1,type:"pulse"},t||{}),Array.isArray(this.params.classes)||(this.params.classes=[this.params.classes]),"pulse"===this.params.type&&(this.params.a11y.inactive||(this.params.a11y.inactive=this.params.a11y.active||""),this.params.a11y.active||(this.params.a11y.active=this.params.a11y.inactive||"")),this.active=this.params.active,this.disabled=this.params.disabled,this.callbacks=s||{},this.callbacks.onClick=this.callbacks.onClick||(()=>{}),this.button=document.createElement("button"),this.params.classes&&this.params.classes.forEach((t=>{this.button.classList.add(t)})),this.button.setAttribute("aria-pressed",this.params.active),this.button.setAttribute("tabindex","-1"),!0===this.params.active?this.activate():this.deactivate(),!0===this.params.disabled?this.disable():this.enable(),this.button.addEventListener("mouseup",(t=>{this.disabled||("toggle"===this.params.type&&this.toggle(),setTimeout((()=>{this.callbacks.onClick(t)}),100))}))}var s=t.prototype;return s.getDOM=function(){return this.button},s.show=function(){this.button.classList.remove("h5p-sort-paragraphs-no-display")},s.hide=function(){this.button.classList.add("h5p-sort-paragraphs-no-display")},s.enable=function(){this.disabled=!1,this.button.classList.remove("h5p-sort-paragraphs-disabled"),this.active?this.activate():this.deactivate()},s.disable=function(){this.button.classList.add("h5p-sort-paragraphs-disabled"),this.button.setAttribute("aria-label",this.params.a11y.disabled),this.button.setAttribute("title",this.params.a11y.disabled),this.disabled=!0},s.activate=function(){this.disabled||("toggle"===this.params.type&&(this.button.classList.add("h5p-sort-paragraphs-button-active"),this.button.setAttribute("aria-pressed",!0)),this.button.setAttribute("aria-label",this.params.a11y.active),this.button.setAttribute("title",this.params.a11y.active),this.active=!0)},s.deactivate=function(){this.disabled||(this.active=!1,"toggle"===this.params.type&&(this.button.classList.remove("h5p-sort-paragraphs-active"),this.button.setAttribute("aria-pressed",!1)),this.button.setAttribute("aria-label",this.params.a11y.inactive),this.button.setAttribute("title",this.params.a11y.inactive))},s.toggle=function(){this.disabled||(this.active?this.deactivate():this.activate())},s.isActive=function(){return this.active},s.isDisabled=function(){return this.disabled},t}(),a=function(){function t(t,s){this.params=t,this.callbacks=e.extend({onMoveUp:()=>{},onMoveDown:()=>{},onFocusOut:()=>{},onMouseDown:()=>{},onMouseUp:()=>{},onDragStart:()=>{},onDragEnter:()=>{},onDragLeave:()=>{},onDragEnd:()=>{},onKeyboardUp:()=>{},onKeyboardDown:()=>{},onKeyboardSelect:()=>{},onKeyboardCancel:()=>{}},s),this.selected=!1,this.shown=!0,this.buttons={},this.content=this.buildParagraph(this.params.text,this.params.l10n),this.placeholder=document.createElement("div"),this.placeholder.classList.add("h5p-sort-paragraphs-paragraph-placeholder"),this.placeholder.addEventListener("dragover",(t=>{t.preventDefault()})),this.placeholder.addEventListener("drop",(t=>{t.preventDefault()}))}var a=t.prototype;return a.getDOM=function(){return this.content},a.buildParagraph=function(){const t=document.createElement("div");t.classList.add("h5p-sort-paragraphs-paragraph"),t.setAttribute("role","listitem"),t.setAttribute("draggable",!0),this.containerText=this.buildDIVContainer({classText:"h5p-sort-paragraphs-paragraph-container",innerHTML:this.params.text}),t.appendChild(this.containerText),this.buttonsContainer=document.createElement("div"),this.buttonsContainer.classList.add("h5p-sort-paragraphs-buttons-container"),t.appendChild(this.buttonsContainer);const e=this.buildDIVContainer({classText:"h5p-sort-paragraphs-paragraph-button-container",attributes:{"aria-hidden":"true"}});this.buttonsContainer.appendChild(e),this.params?.options?.addButtonsForMovement&&(this.buttons.up=this.buildButtonUp(),e.appendChild(this.buttons.up.getDOM()));const s=this.buildDIVContainer({classText:"h5p-sort-paragraphs-paragraph-button-container",attributes:{"aria-hidden":"true"}});return this.buttonsContainer.appendChild(s),this.containerCorrections=this.buildDIVContainer({classText:"h5p-sort-paragraphs-paragraph-corrections"}),s.appendChild(this.containerCorrections),this.params?.options?.addButtonsForMovement&&(this.buttons.down=this.buildButtonDown(),s.appendChild(this.buttons.down.getDOM())),this.scoreExplanations=this.buildDIVContainer({classText:"h5p-sort-paragraphs-paragraph-score-explanations"}),s.appendChild(this.scoreExplanations),this.addKeyboardHandlers(t),this.addDragHandlers(t),t},a.buildDIVContainer=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=document.createElement("div");if(t.classText&&e.classList.add(t.classText),t.innerHTML&&(e.innerHTML=t.innerHTML),t.attributes)for(let s in t.attributes)e.setAttribute(s,t.attributes[s]);return e},a.buildButtonUp=function(){return new s({a11y:{active:this.params.l10n.up,disabled:this.params.l10n.disabled},classes:["h5p-sort-paragraphs-button","h5p-sort-paragraphs-paragraph-button-up"]},{onClick:()=>{this.callbacks.onMoveUp(this.content)}})},a.buildButtonDown=function(){return new s({a11y:{active:this.params.l10n.down,disabled:this.params.l10n.disabled},classes:["h5p-sort-paragraphs-button","h5p-sort-paragraphs-paragraph-button-down"]},{onClick:()=>{this.callbacks.onMoveDown(this.content)}})},a.addKeyboardHandlers=function(t){t.addEventListener("keydown",(t=>{switch(t.code){case"ArrowUp":if(t.preventDefault(),t.currentTarget===t.currentTarget.parentNode.firstChild)return;this.callbacks.onKeyboardUp(t.currentTarget);break;case"ArrowDown":if(t.preventDefault(),t.currentTarget===t.currentTarget.parentNode.lastChild)return;this.callbacks.onKeyboardDown(t.currentTarget);break;case"Enter":case"Space":if(this.disabled)return;this.callbacks.onKeyboardSelect(t.currentTarget);break;case"Escape":if(this.disabled)return;this.callbacks.onKeyboardCancel(t.currentTarget)}}))},a.addDragHandlers=function(t){t.addEventListener("mousedown",(t=>{this.handleMouseUpDown(t,"onMouseDown")})),t.addEventListener("mouseup",(t=>{this.handleMouseUpDown(t,"onMouseUp")})),t.addEventListener("focusout",(t=>{this.toggleEffect("selected",!1),this.callbacks.onFocusOut(t.currentTarget)})),t.addEventListener("dragstart",(t=>{this.handleDragStart(t)})),t.addEventListener("dragover",(t=>{this.handleDragOver(t)})),t.addEventListener("dragenter",(t=>{this.handleDragEnter(t)})),t.addEventListener("dragleave",(t=>{this.handleDragLeave(t)})),t.addEventListener("dragend",(t=>{this.handleDragEnd(t)})),t.addEventListener("touchstart",(e=>{e.cancelable&&!this.disabled&&t.setAttribute("draggable",!1)}),{passive:!0}),t.addEventListener("touchend",(()=>{this.disabled||t.setAttribute("draggable",!0)}))},a.showPlaceholder=function(){this.isShown()&&(this.placeholder.style.width=`${this.content.offsetWidth}px`,this.placeholder.style.height=`${this.content.offsetHeight}px`,this.attachPlaceholder())},a.attachPlaceholder=function(){this.content.parentNode.insertBefore(this.placeholder,this.content.nextSibling)},a.hidePlaceholder=function(){this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder)},a.show=function(){this.content.classList.remove("h5p-sort-paragraphs-no-display"),this.shown=!0},a.hide=function(){this.content.classList.add("h5p-sort-paragraphs-no-display"),this.shown=!1},a.isShown=function(){return this.shown},a.isSelected=function(){return this.selected},a.select=function(){this.selected=!0,this.toggleEffect("selected",!0)},a.unselect=function(){this.selected=!1,this.toggleEffect("selected",!1)},a.enable=function(){this.content.setAttribute("draggable",!0),this.toggleEffect("disabled",!1);for(let t in this.buttons)this.buttons[t].enable();this.disabled=!1},a.disable=function(){this.disabled=!0,this.content.setAttribute("draggable",!1),this.toggleEffect("disabled",!0);for(let t in this.buttons)this.buttons[t].disable()},a.focus=function(){this.content.focus()},a.getText=function(){return this.containerText.innerHTML},a.setText=function(t){"string"==typeof t&&(this.containerText.innerHTML=t)},a.setTabIndex=function(t){"number"==typeof t&&this.content.setAttribute("tabIndex",t)},a.reset=function(){this.content.classList.remove("disabled"),this.content.classList.remove("solution"),this.unselect()},a.resetDragging=function(){clearTimeout(this.placeholderTimeout),this.hidePlaceholder(),this.show(),this.showButtons(),this.toggleEffect("over",!1)},a.showButtons=function(){for(let t in this.buttons)this.buttons[t].show()},a.hideButtons=function(){for(let t in this.buttons)this.buttons[t].hide()},a.toggleButton=function(t,e){t&&this.buttons[t]&&"boolean"==typeof e&&(e?this.buttons[t].enable():this.buttons[t].disable())},a.toggleEffect=function(t,e){"boolean"==typeof e&&-1!==["over","ghosted","disabled","selected","correct","wrong","solution"].indexOf(t)&&(e?this.content.classList.add(`h5p-sort-paragraphs-${t}`):this.content.classList.remove(`h5p-sort-paragraphs-${t}`))},a.translate=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"number"==typeof t.x||"number"==typeof t.y?(this.content.classList.add("animate-translation"),setTimeout((()=>{this.content.style.transform=`translate(${t.x||0}px, ${t.y||0}px)`}),0)):(this.content.classList.remove("animate-translation"),this.content.style.transform="")},a.setAriaLabel=function(t){this.content.setAttribute("aria-label",t)},a.showScoreExplanation=function(t){this.scoreExplanations.appendChild(t)},a.hideScoreExplanation=function(){this.scoreExplanations.innerHTML=""},a.handleMouseUpDown=function(t,e){this.disabled||("onMouseDown"===e&&(this.pointerPosition={x:t.clientX,y:t.clientY}),!this.params.options.addButtonsForMovement||t.target!==this.buttons.up.getDOM()&&t.target!==this.buttons.down.getDOM()?this.callbacks[e](t.currentTarget):this.content.setAttribute("draggable",!0))},a.handleDragStart=function(t){this.disabled||(this.hideButtons(),this.toggleEffect("over",!0),t.dataTransfer.effectAllowed="move",t.dataTransfer.setDragImage(this.content,this.pointerPosition.x-this.content.getBoundingClientRect().left,this.pointerPosition.y-this.content.getBoundingClientRect().top),clearTimeout(this.placeholderTimeout),this.placeholderTimeout=setTimeout((()=>{this.showPlaceholder(),this.hide()}),0),this.callbacks.onDragStart(t.currentTarget))},a.handleDragOver=function(t){this.disabled||t.preventDefault()},a.handleDragEnter=function(t){this.disabled||this.callbacks.onDragEnter(t.currentTarget)},a.handleDragLeave=function(t){this.disabled||this.content!==t.target||this.content.contains(t.fromElement)||this.callbacks.onDragLeave(t.currentTarget)},a.handleDragEnd=function(t){this.disabled||(this.resetDragging(),this.callbacks.onDragEnd(t.currentTarget))},a.doButtonsFitVertically=function(){if(0===this.content.clientHeight||!Object.keys(this.buttons).length)return!1;this.styleContent=this.styleContent||window.getComputedStyle(this.content);const t=parseFloat(this.styleContent.getPropertyValue("padding-top"))+parseFloat(this.styleContent.getPropertyValue("padding-bottom")),e=this.content.clientHeight-t,s=Object.values(this.buttons)[0].getDOM().offsetHeight;return 0!==s&&e>=2*s},a.setButtonsVertical=function(t){this.buttonsContainer.classList.toggle("vertical",t)},t}(),i=function(){function t(){this.content=this.buildSeparator()}var e=t.prototype;return e.getDOM=function(){return this.content},e.buildSeparator=function(){const t=document.createElement("div");return t.classList.add("h5p-sort-paragraphs-separator"),t},e.show=function(){this.content.classList.remove("h5p-sort-paragraphs-no-display")},e.hide=function(){this.content.classList.add("h5p-sort-paragraphs-no-display")},e.toggleEffect=function(t,e){"boolean"==typeof e&&-1!==["correct","wrong"].indexOf(t)&&(e?this.content.classList.add(`h5p-sort-paragraphs-${t}`):this.content.classList.remove(`h5p-sort-paragraphs-${t}`))},e.setAriaLabel=function(t){this.content.setAttribute("aria-label",t)},e.showScoreExplanation=function(t){this.content.classList.contains("h5p-question-plus-one")||this.content.classList.contains("h5p-question-minus-one")||this.content.appendChild(t)},e.hideScoreExplanation=function(){const t=this.content.querySelector(".h5p-question-plus-one, .h5p-question-minus.one");t&&this.content.removeChild(t)},t}(),n=function(){function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.params=e.extend({previousState:{viewState:0}},t),this.callbacks=e.extend({onInteracted:()=>{},read:()=>{}},s),this.content=document.createElement("div"),this.content.classList.add("h5p-sort-paragraphs-content"),this.draggedElement=null,this.answerGiven=!1,this.enabled=!0,this.oldOrder=null,this.viewStates=this.params.viewStates,this.setViewState(this.params.previousState?.viewState),this.selectedDraggable=null,this.isMouseDownOnDraggable=!1,this.handleSwapTransitionEnded=this.handleSwapTransitionEnded.bind(this),this.handleSwapSolutionEnded=this.handleSwapSolutionEnded.bind(this),this.options={scoringMode:t.scoringMode||"transitions",penalties:"boolean"!=typeof t.penalties||t.penalties,duplicatesInterchangeable:t.duplicatesInterchangeable},this.ariaTemplates=this.buildAriaTemplates(),this.paragraphs=t.paragraphs.map((t=>this.buildParagraph(t))),this.separators=[],t.paragraphs.forEach(((e,s)=>{s!==t.paragraphs.length-2&&this.separators.push(new i)})),this.list=this.buildList(this.paragraphs),this.content.appendChild(this.list),t.previousState&&t.previousState.order?this.reorderDraggables(t.previousState.order):e.shuffleDOMElements(this.paragraphs.map((t=>t.getDOM()))),this.resetAriaLabels(),this.resetDraggablesTabIndex(),this.resetDraggables()}var s=t.prototype;return s.reorderDraggables=function(t){let s;for(let a=0;a<t.length;a++){s=this.getDraggables();const i=this.getDraggablesOrder();i[a]!==t[a]&&e.swapDOMElements(s[a],s[i.indexOf(t[a])])}},s.getDOM=function(){return this.content},s.focusFirstDraggable=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;window.clearTimeout(this.focusTimeout),this.focusTimeout=window.setTimeout((()=>{this.list.childNodes[0].focus()}),t)},s.showResults=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this.computeResults();this.list.setAttribute("aria-label",this.params.a11y.listDescriptionCheckAnswer),this.paragraphs.forEach((t=>{t.setButtonsVertical(!1),t.hideButtons(),t.disable()})),t.skipExplanation||("positions"===this.options.scoringMode?(this.showScoreExplanation(this.getDraggables().map((t=>this.getParagraph(t))),e),this.addScoreAria(this.getDraggables(),e)):"transitions"===this.options.scoringMode&&(this.showScoreExplanation(this.separators,e),this.addScoreAria(this.getDraggables(),e),this.setAriaLabel(this.getDraggables().pop(),{action:"neutral"}))),this.resetDraggablesTabIndex(),t.skipFocus||this.focusFirstDraggable(100)},s.hideResults=function(){this.paragraphs.concat(this.separators).forEach((t=>{t.toggleEffect("correct",!1),t.toggleEffect("wrong",!1),t.setAriaLabel(""),t.hideScoreExplanation()}))},s.showSolutions=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.hideResults(),this.list.setAttribute("aria-label",this.params.a11y.listDescriptionShowSolution),this.paragraphs.forEach((t=>{t.setButtonsVertical(!1),t.toggleEffect("solution",!0)})),this.paragraphs[this.paragraphs.length-1].getDOM().addEventListener("transitionend",this.handleSwapSolutionEnded);const e=this.getDraggables();let s=e[0].offsetTop;e.forEach(((t,a)=>{a>0&&(s+=this.paragraphs[a-1].getDOM().offsetHeight+t.offsetTop-e[a-1].offsetTop-e[a-1].offsetHeight),this.paragraphs[a].translate({y:s-this.paragraphs[a].getDOM().offsetTop})})),t.skipFocus||this.focusFirstDraggable(550)},s.handleSwapSolutionEnded=function(){this.paragraphs[this.paragraphs.length-1].getDOM().removeEventListener("transitionend",this.handleSwapSolutionEnded),this.paragraphs.forEach(((t,s)=>{t.translate();const a=this.getDraggables(),i=a.indexOf(t.getDOM());i!==s&&e.swapDOMElements(a[s],a[i])})),this.resetAriaLabels(),this.resetDraggablesTabIndex(),this.getDraggables().forEach((t=>{this.setAriaLabel(t,{action:"solution"})}))},s.addScoreAria=function(t,e){e.correctAnswers.forEach(((e,s)=>{const a=t[s],i=this.options.penalties&&"positions"===this.options.scoringMode,n={action:"positions"===this.options.scoringMode?"resultPositions":"resultTransitions",result:!0===e?this.params.a11y.correct:this.params.a11y.wrong,points:!0===e?this.params.a11y.point.replace("@score",1):i?this.params.a11y.point.replace("@score",-1):void 0};this.setAriaLabel(a,n)}))},s.showScoreExplanation=function(t,e){this.scorePoints=this.scorePoints||new H5P.Question.ScorePoints,e.correctAnswers.forEach(((e,s)=>{const a=t[s];if(!0===e)a.toggleEffect("correct",!0),a.showScoreExplanation(this.scorePoints.getElement(!0));else{a.toggleEffect("wrong",!0);this.options.penalties&&"positions"===this.options.scoringMode&&a.showScoreExplanation(this.scorePoints.getElement(!1))}}))},s.computeResults=function(){let t,s=0;const a=this.getDraggables(),i=this.paragraphs.map((t=>t.getDOM())),n=a.map((t=>i.indexOf(t)));if("positions"===this.options.scoringMode)t=e.createArray(this.paragraphs.length),s=n.reduce(((e,s,n)=>{const r=s===n||this.options.duplicatesInterchangeable&&a[n].innerText===i[n].innerText;return t[n]=r,e+=r?1:0,e+=!r&&this.options.penalties?-1:0}),0);else if("transitions"===this.options.scoringMode){t=e.createArray(this.paragraphs.length-1);const r=a.map((t=>t.innerText)),o=i.map((t=>t.innerText));for(let e=0;e<n.length-1;e++){const a=[r[e],r[e+1]],i=o.reduce(((t,e,s)=>!0===t||s!==o.length-1&&(e===a[0]&&o[s+1]===a[1])),!1);this.options.duplicatesInterchangeable&&i||n[e]===n[e+1]-1?(t[e]=!0,s++):t[e]=!1}}return{correctAnswers:t,score:Math.max(0,s)}},s.buildList=function(t){const e=document.createElement("div");return e.setAttribute("role","application"),e.setAttribute("aria-label",`${this.params.taskDescription} ${this.params.a11y.listDescription}`),e.classList.add("h5p-sort-paragraphs-list"),t.forEach(((s,a)=>{e.appendChild(s.getDOM()),a!==t.length-1&&e.appendChild(this.separators[a].getDOM())})),e},s.buildParagraph=function(t){return new a({text:t,l10n:this.params.l10n,options:{addButtonsForMovement:this.params.addButtonsForMovement}},{onMoveUp:t=>this.handleDraggableMoved(t,"up"),onMoveDown:t=>this.handleDraggableMoved(t,"down"),onFocusOut:t=>this.handleDraggableFocusOut(t),onDragStart:t=>this.handleDraggableDragStart(t),onDragEnter:t=>this.handleDraggableDragEnter(t),onDragLeave:t=>this.handleDraggableDragLeave(t),onDragEnd:t=>this.handleDraggableDragEnd(t),onKeyboardUp:t=>this.handleDraggableKeyboardMoved(t,"up"),onKeyboardDown:t=>this.handleDraggableKeyboardMoved(t,"down"),onKeyboardSelect:t=>this.handleDraggableKeyboardSelect(t),onKeyboardCancel:t=>this.handleDraggableKeyboardCancel(t),onMouseDown:t=>this.handleDraggableMouseDown(t),onMouseUp:t=>this.handleDraggableMouseUp(t)})},s.buildAriaTemplates=function(){return{selected:`${this.params.a11y.paragraph} ${this.params.a11y.sevenOfNine}. ${this.isAnswerGiven()?"":this.params.a11y.instructionsSelected+". "}@text`,grabbed:`${this.params.a11y.paragraph} ${this.params.a11y.grabbed}. ${this.params.a11y.currentPosition}: ${this.params.a11y.sevenOfNine}. ${this.isAnswerGiven()?"":this.params.a11y.instructionsGrabbed+"."}`,moved:`${this.params.a11y.paragraph} ${this.params.a11y.moved}. ${this.params.a11y.currentPosition}: ${this.params.a11y.sevenOfNine}.`,dropped:`${this.params.a11y.paragraph} ${this.params.a11y.dropped}. ${this.params.a11y.finalPosition}: ${this.params.a11y.sevenOfNine}.`,cancelled:`${this.params.a11y.reorderCancelled}. ${this.params.a11y.paragraph} ${this.params.a11y.sevenOfNine}. ${this.isAnswerGiven()?"":this.params.a11y.instructionsSelected+". "}@text`,resultPositions:`${this.params.a11y.paragraph} ${this.params.a11y.sevenOfNine}. @result. @points. @text`,resultTransitions:`${this.params.a11y.paragraph} ${this.params.a11y.sevenOfNine}. ${this.params.a11y.nextParagraph} @result. @points. @text`,neutral:`${this.params.a11y.paragraph} ${this.params.a11y.sevenOfNine}. @text`,solution:`${this.params.a11y.correctParagraph} ${this.params.a11y.sevenOfNine}. @text`}},s.handleDraggableMoved=function(t,e){const s=this.getDraggableIndex(t);let a;"up"===e&&s>0?a=s-1:"down"===e&&s<this.paragraphs.length&&(a=s+1),void 0!==a&&(this.handleInteracted(),this.swapDOMElements(t,this.getDraggableAt(a),(()=>{this.resetDraggablesTabIndex(),this.resetDraggables(),this.resetAriaLabels()})))},s.handleDraggableFocusOut=function(t){this.getParagraph(t).unselect(),this.resetAriaLabels(),this.isMouseDownOnDraggable||(this.selectedDraggable=null)},s.handleDraggableDragStart=function(t){this.oldOrder=this.getDraggablesOrder(),this.draggedElement=t,this.getDraggables().forEach((t=>{this.getParagraph(t).hideButtons()}))},s.handleDraggableDragEnter=function(t){this.dropzoneElement&&this.dropzoneElement===t||(this.dropzoneElement=t,this.dropzoneElement&&this.draggedElement&&this.draggedElement!==this.dropzoneElement&&(e.swapDOMElements(this.draggedElement,this.dropzoneElement),this.getParagraph(this.draggedElement).attachPlaceholder()))},s.handleDraggableDragLeave=function(){this.dropzoneElement=null},s.handleDraggableDragEnd=function(){const t=this.getDraggablesOrder();this.oldOrder.some(((e,s)=>e!==t[s]))&&this.handleInteracted(),this.getDraggables().forEach((t=>{this.getParagraph(t).showButtons()})),this.resetDraggables(),this.draggedElement.focus(),this.selectedDraggable=null,this.draggedElement=null,this.dropzoneElement=null,this.oldOrder=null},s.handleDraggableKeyboardMoved=function(t,s){const a=this.getDraggableIndex(t);if("up"===s&&a<=0||"down"===s&&a>=this.paragraphs.length-1||"up"!==s&&"down"!==s)return;const i=a+("up"===s?-1:1),n=this.getDraggables()[i],r=this.getParagraph(t),o=this.getParagraph(n);r.isSelected()?(e.swapDOMElements(t,n),this.resetDraggables(),this.resetAriaLabels(),this.setAriaLabel(t,{action:"moved"}),t.focus(),r.select()):(r.setTabIndex(-1),o.setTabIndex(0),o.focus())},s.handleDraggableKeyboardSelect=function(t){const e=this.getParagraph(t);e.isSelected()?(this.undoState&&this.undoState.position!==this.getDraggableIndex(t)&&this.handleInteracted(),this.setAriaLabel(t,{action:"dropped"}),e.unselect(),this.selectedDraggable=null,this.undoState=null):(this.setAriaLabel(t,{action:"grabbed"}),e.select(),this.selectedDraggable=t,this.undoState={position:this.getDraggableIndex(t),order:this.getDraggablesOrder()})},s.handleDraggableKeyboardCancel=function(t){const e=this.getParagraph(t);if(e.unselect(),this.resetAriaLabels(),this.undoState){this.reorderDraggables(this.undoState.order),e.setTabIndex(-1);const t=this.getDraggableAt(this.undoState.position);t.setAttribute("tabIndex",0),t.focus(),this.resetDraggables(),this.resetAriaLabels(),this.setAriaLabel(t,{action:"cancelled"}),this.undoState=null}},s.handleDraggableMouseDown=function(t){this.isMouseDownOnDraggable=!0;this.getParagraph(t).toggleEffect("selected",!0)},s.handleDraggableMouseUp=function(t){const e=this.getParagraph(t);if(e.isSelected())this.selectedDraggable=null,this.setAriaLabel(t,{action:"dropped"}),e.unselect();else if(null!==this.selectedDraggable&&this.selectedDraggable!==t){this.handleInteracted();const e=this.selectedDraggable;this.swapDOMElements(t,e,(()=>{this.resetDraggables(),this.resetAriaLabels(),this.setAriaLabel(e,{action:"dropped"}),e.focus(),this.selectedDraggable=null}))}else this.setAriaLabel(t,{action:"grabbed"}),e.select(),this.selectedDraggable=t;this.isMouseDownOnDraggable=!1},s.handleInteracted=function(){this.answerGiven=!0,this.ariaTemplates=this.buildAriaTemplates(),this.callbacks.onInteracted()},s.enable=function(){this.paragraphs.forEach((t=>{t.enable()})),this.enabled=!0},s.disable=function(){this.enabled=!1,this.paragraphs.forEach((t=>{t.disable()}))},s.isAnswerGiven=function(){return this.answerGiven},s.getDraggableAt=function(t){return"number"!=typeof t||t<0||t>this.paragraphs.length-1?null:this.getDraggables()[t]},s.getDraggablesOrder=function(){return this.getDraggables().map((t=>this.paragraphs.indexOf(this.getParagraph(t))))},s.getDraggableIndex=function(t){return this.getDraggables().indexOf(t)},s.getDraggables=function(){return Array.from(this.list.querySelectorAll(".h5p-sort-paragraphs-paragraph"))},s.getParagraph=function(t){return this.paragraphs.reduce(((e,s)=>null!==e?e:s.getDOM()===t?s:null),null)},s.setAriaLabel=function(t,s){const a=this.getDraggableIndex(t)+1,i=this.paragraphs.length,n=this.getParagraph(t),r=n.getText();let o=this.ariaTemplates[s.action];o=o.replace("@current",a).replace("@total",i).replace("@text",r).replace("@result",s.result||"").replace("@points.",s.points?`${s.points}. `:""),"."!==o.substr(-1)&&(o=`${o}.`),n.setAriaLabel(e.stripHTML(o)),-1!==["grabbed","dropped"].indexOf(s.action)&&this.callbacks.read(e.stripHTML(o))},s.resetAriaLabels=function(){this.enabled&&(this.previousAnswerState!==this.isAnswerGiven()&&(this.previousAnswerState=this.isAnswerGiven(),this.ariaTemplates=this.buildAriaTemplates()),this.getDraggables().forEach((t=>{this.setAriaLabel(t,{action:"selected"})})))},s.resetDraggablesTabIndex=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getDraggables().forEach(((e,s)=>{const a=this.getParagraph(e);0===s?a.setTabIndex(null!==t?t:0):a.setTabIndex(null!==t?t:-1)}))},s.resetDraggables=function(){const t=this.getDraggables();t.forEach(((e,s)=>{const a=this.getParagraph(e);a.toggleEffect("over",!1),a.toggleEffect("ghosted",!1),0===s?(a.toggleButton("up",!1),a.toggleButton("down",!0)):s===t.length-1?(a.toggleButton("up",!0),a.toggleButton("down",!1)):(a.toggleButton("up",!0),a.toggleButton("down",!0))}))},s.swapDOMElements=function(t,e,s){if(t&&t.parentNode&&e&&e.parentNode){if(t.offsetTop-e.offsetTop>0){const s=t;t=e,e=s}this.transitionElement1=t,this.transitionElement2=e,this.transitionElements=this.getDraggables(),this.transitionDone=s,this.transitionElements.forEach((t=>{const e=this.getParagraph(t);e.hideButtons(),e.unselect()})),this.transitionElement1.addEventListener("transitionend",this.handleSwapTransitionEnded),setTimeout((()=>{this.transitionElements.forEach((s=>{const a=this.getParagraph(s);let i;i=s===this.transitionElement1?-1*(this.transitionElement1.offsetTop-this.transitionElement2.offsetTop-this.transitionElement2.offsetHeight+this.transitionElement1.offsetHeight):s===this.transitionElement2?-1*(this.transitionElement2.offsetTop-this.transitionElement1.offsetTop):s.offsetTop<t.offsetTop||s.offsetTop>e.offsetTop?0:this.transitionElement2.offsetHeight-this.transitionElement1.offsetHeight,a.translate({y:i}),a.disable()}))}),0)}},s.handleSwapTransitionEnded=function(){e.swapDOMElements(this.transitionElement1,this.transitionElement2),this.getDraggables().forEach((t=>{t.removeEventListener("transitionend",this.handleSwapTransitionEnded),this.getParagraph(t).translate(),"task"===this.viewState&&(this.getParagraph(t).showButtons(),this.getParagraph(t).enable())})),this.transitionDone()},s.reset=function(){this.list.setAttribute("aria-label",`${this.params.taskDescription} ${this.params.a11y.listDescription}`),this.answerGiven=!1,this.ariaTemplates=this.buildAriaTemplates(),this.hideResults(),this.paragraphs.forEach((t=>{t.toggleEffect("correct",!1),t.toggleEffect("wrong",!1),t.toggleEffect("solution",!1),t.showButtons()})),e.shuffleDOMElements(this.paragraphs.map((t=>t.getDOM()))),this.enable(),this.resetDraggablesTabIndex(),this.resetDraggables(),this.resetAriaLabels(),this.setViewState("task"),this.focusFirstDraggable(100)},s.setViewState=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;("number"!=typeof t||(t=Object.entries(this.viewStates).find((e=>e[1]===t))?.[0],t))&&Object.keys(this.viewStates).includes(t)&&(Object.keys(this.viewStates).forEach((e=>{this.content.classList.toggle(`h5p-sort-paragraphs-view-state-${e}`,e!==t)})),this.viewState=t)},s.resize=function(){let t;t="task"===this.viewState&&this.paragraphs.every((t=>t.doButtonsFitVertically())),this.paragraphs.forEach((e=>{e.setButtonsVertical(t)}))},t}();function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}let o=function(t){var s,a;function i(s,a){var i;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(i=t.call(this,"sort-paragraphs")||this).params=e.extend({media:{},taskDescription:null,paragraphs:[],behaviour:{duplicatesInterchangeable:!0,enableSolutionsButton:!0,enableRetry:!0,scoringMode:"transitions",applyPenalties:!0,addButtonsForMovement:!0},l10n:{checkAnswer:"Check answer",submitAnswer:"Submit",showSolution:"Show solution",tryAgain:"Retry",up:"Up",down:"Down",disabled:"Disabled"},a11y:{check:"Check the answers. The responses will be marked as correct or incorrect.",showSolution:"Show the solution. The correct solution will be displayed.",retry:"Retry the task. Reset all elements and start the task over again.",listDescription:"Sortable list of paragraphs.",listDescriptionCheckAnswer:"List of paragraphs with results.",listDescriptionShowSolution:"List of paragraphs with solutions.",paragraph:"Paragraph",sevenOfNine:"@current of @total",instructionsSelected:"Press spacebar to reorder",grabbed:"grabbed",currentPosition:"Current position in list",instructionsGrabbed:"Press up and down arrow keys to change position, spacebar to drop, escape to cancel",moved:"moved",dropped:"dropped",finalPosition:"Final position",reorderCancelled:"Reorder cancelled",correct:"correct",wrong:"wrong",point:"@score point",nextParagraph:"Next paragraph",correctParagraph:"Correct paragraph at position"}},s),i.contentId=a,i.extras=n,i.canStoreState=!Number.isNaN(parseInt(H5PIntegration?.saveFreq)),i.stateProvider=i.retrieveStateProvider();for(let t in i.params.l10n)i.params.l10n[t]=e.stripHTML(e.htmlDecode(i.params.l10n[t]));const r=n&&n.metadata&&n.metadata.defaultLanguage||"en";return i.languageTag=e.formatLanguageCode(r),i.previousState=i.extras.previousState&&i.extras.previousState.order?i.extras.previousState:null,i}a=t,(s=i).prototype=Object.create(a.prototype),s.prototype.constructor=s,r(s,a);var o=i.prototype;return o.registerDomElements=function(){const t=this.params.media.type;if(t&&t.library){const e=t.library.split(" ")[0];"H5P.Image"===e?t.params.file&&this.setImage(t.params.file.path,{disableImageZooming:this.params.media.disableImageZooming,alt:t.params.alt,title:t.params.title,expandImage:t.params.expandImage,minimizeImage:t.params.minimizeImage}):"H5P.Video"===e?t.params.sources&&this.setVideo(t):"H5P.Audio"===e&&t.params.files&&this.setAudio(t)}if(this.params.taskDescription){const t=document.createElement("div");t.classList.add("h5p-sort-paragraphs-task-description"),t.innerHTML=this.params.taskDescription,this.setIntroduction(t)}this.content=new n({paragraphs:this.params.paragraphs,addButtonsForMovement:this.params.behaviour.addButtonsForMovement,duplicatesInterchangeable:this.params.behaviour.duplicatesInterchangeable,penalties:this.params.behaviour.applyPenalties,scoringMode:this.params.behaviour.scoringMode,taskDescription:e.stripHTML(this.params.taskDescription).replace(/(\r\n|\n|\r)/gm," ").replace(/\s{2}/g," ").trim(),previousState:this.previousState,a11y:this.params.a11y,l10n:{up:this.params.l10n.up,down:this.params.l10n.down,disabled:this.params.l10n.disabled},viewStates:i.VIEW_STATES},{onInteracted:()=>{this.handleInteracted()},read:t=>{this.read(t)}}),this.setViewState("task"),this.setContent(this.content.getDOM()),this.previousState=this.previousState??{},this.previousState.viewState===i.VIEW_STATES.results||this.previousState.viewState===i.VIEW_STATES.solutions?H5P.externalDispatcher.on("initialized",(()=>{this.isExternalCall=!0,this.previousState.viewState===i.VIEW_STATES.results?(this.setViewState("results"),this.checkAnswer()):(this.setViewState("solutions"),this.checkAnswer(),this.hideButton("show-solution"),this.showSolutions()),this.isExternalCall=!1})):this.previousState.viewState=i.VIEW_STATES.task,this.addButtons(),this.on("resize",(()=>{this.content.resize()})),this.trigger("resize")},o.addButtons=function(){this.addButton("check-answer",this.params.l10n.checkAnswer,(()=>{this.checkAnswer()}),!0,{"aria-label":this.params.a11y.check},{contentData:this.extras,textIfSubmitting:this.params.l10n.submitAnswer}),this.addButton("show-solution",this.params.l10n.showSolution,(()=>{this.hideButton("show-solution"),this.showSolutions()}),!1,{"aria-label":this.params.a11y.showSolution},{}),this.addButton("try-again",this.params.l10n.tryAgain,(()=>{this.resetTask()}),!1,{"aria-label":this.params.a11y.retry},{})},o.getAnswerGiven=function(){return this.content.isAnswerGiven()},o.getScore=function(){let t=0;return t=this.content?this.viewState===i.VIEW_STATES.solutions?this.currentScore||this.previousState?.score||0:this.content.computeResults().score:this.previousState?.score||0,this.currentScore=t,t},o.getMaxScore=function(){const t=this.params.paragraphs.length;return"positions"===this.params.behaviour.scoringMode?t:t-1},o.showSolutions=function(){this.setViewState("solutions"),this.content.showSolutions({skipFocus:this.isExternalCall}),this.trigger("resize")},o.resetTask=function(){this.showButton("check-answer"),this.hideButton("show-solution"),this.hideButton("try-again"),this.removeFeedback(),this.content.reset(),this.previousState={},this.setViewState("task"),this.trigger("resize")},o.getXAPIData=function(){return{statement:this.getXAPIAnswerEvent().data.statement}},o.getXAPIAnswerEvent=function(){const t=this.createXAPIEvent("answered");return t.setScoredResult(this.getScore(),this.getMaxScore(),this,!0,this.isPassed()),t.data.statement.result.response=this.content.getDraggablesOrder().join("[,]"),t},o.createXAPIEvent=function(t){const s=this.createXAPIEventTemplate(t);return e.extend(s.getVerifiedStatementValue(["object","definition"]),this.getxAPIDefinition()),s},o.getxAPIDefinition=function(){const t={name:{}};return t.name[this.languageTag]=this.getTitle(),t.name["en-US"]=t.name[this.languageTag],t.description={},t.description[this.languageTag]=e.stripHTML(this.getDescription()),t.description["en-US"]=t.description[this.languageTag],t.type="http://adlnet.gov/expapi/activities/cmi.interaction",t.interactionType="sequencing",t.correctResponsesPattern=[],this.params.paragraphs.forEach(((e,s)=>{t.correctResponsesPattern.push(s)})),t.correctResponsesPattern=[t.correctResponsesPattern.join("[,]")],t.choices=this.params.paragraphs.map(((t,s)=>{t=e.stripHTML(t);const a={};return a[this.languageTag]=t,a["en-US"]=a[this.languageTag],{id:s,description:a}})),t.extensions=t.extensions||{},"transitions"===this.content.options.scoringMode&&(t.extensions["https://h5p.org/x-api/sequencing-type"]="transitions"),this.content.options.duplicatesInterchangeable&&(t.extensions["https://h5p.org/x-api/duplicates-interchangeable"]=1),t},o.checkAnswer=function(){this.viewState===i.VIEW_STATES.task&&(this.trigger(this.getXAPIAnswerEvent()),this.storeH5PState()),this.setViewState("results"),this.trigger("resize");const t=this.isExternalCall;setTimeout((()=>{this.content.disable(),this.hideButton("check-answer"),this.viewState!==i.VIEW_STATES.solutions&&this.params.behaviour.enableSolutionsButton&&this.getScore()!==this.getMaxScore()&&this.showButton("show-solution"),this.params.behaviour.enableRetry&&this.showButton("try-again"),this.content.showResults({skipExplanation:this.viewState===i.VIEW_STATES.solutions,skipFocus:t});const e=this.getScore(),s=this.getMaxScore(),a=H5P.Question.determineOverallFeedback(this.params.overallFeedback,e/s),n=this.params.a11y.yourResult.replace("@score",":num").replace("@total",":total");this.setFeedback(a.trim(),e,s,n)}),0)},o.isPassed=function(){return this.getScore()>=this.getMaxScore()},o.getTitle=function(){let t;return this.extras.metadata&&(t=this.extras.metadata.title),t=t||i.DEFAULT_DESCRIPTION,H5P.createTitle(t)},o.getDescription=function(){return this.params.taskDescription||i.DEFAULT_DESCRIPTION},o.getCurrentState=function(){if((this.getAnswerGiven()||this.previousState.order)&&this.content)return this.getAnswerGiven()||this.previousState.order?{order:this.content.getDraggablesOrder(),viewState:this.viewState,score:this.viewState===i.VIEW_STATES.task?0:this.getScore()}:{}},o.handleInteracted=function(){this.triggerXAPI("interacted")},o.setViewState=function(t){"string"==typeof t&&void 0!==i.VIEW_STATES[t]?this.viewState=i.VIEW_STATES[t]:"number"==typeof t&&Object.values(i.VIEW_STATES).includes(t)&&(this.viewState=t,this.content.setViewState(i.VIEW_STATES.find((e=>e===t)).keys[0]))},o.retrieveStateProvider=function(){let t=this.isRoot()?this:null;if(t)return t;const e=H5P.instances.find((t=>t.contentId===this.contentId));return"function"==typeof e?.getCurrentState&&(t=e),t},o.storeH5PState=function(){this.canStoreState&&this.stateProvider&&H5P.setUserData(this.contentId,"state",this.stateProvider.getCurrentState(),{deleteOnChange:!0})},i}(H5P.Question);o.DEFAULT_DESCRIPTION="SortParagraphs",o.VIEW_STATES={task:0,results:1,solutions:2},H5P.SortParagraphs=o}();

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