From bc5c49d070004a2d71130cddc7dff683b06bafc5 Mon Sep 17 00:00:00 2001 From: mimidotuser Date: Fri, 23 Apr 2021 11:59:23 +0300 Subject: [PATCH 1/2] feat: don't overwrite existing window h5p integration..override only --- src/js/h5p-integration.js | 144 +++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/src/js/h5p-integration.js b/src/js/h5p-integration.js index 6d61df44..81e899e0 100644 --- a/src/js/h5p-integration.js +++ b/src/js/h5p-integration.js @@ -1,75 +1,75 @@ -const H5PIntegration = {}; - -H5PIntegration.l10n = { - H5P: { - "fullscreen": "Fullscreen", - "disableFullscreen": "Disable fullscreen", - "download": "Download", - "copyrights": "Rights of use", - "embed": "Embed", - "size": "Size", - "showAdvanced": "Show advanced", - "hideAdvanced": "Hide advanced", - "advancedHelp": "Include this script on your website if you want dynamic sizing of the embedded content:", - "copyrightInformation": "Rights of use", - "close": "Close", - "title": "Title", - "author": "Author", - "year": "Year", - "source": "Source", - "license": "License", - "thumbnail": "Thumbnail", - "noCopyrights": "No copyright information available for this content.", - "reuse": "Reuse", - "reuseContent": "Reuse Content", - "reuseDescription": "Reuse this content.", - "downloadDescription": "Download this content as a H5P file.", - "copyrightsDescription": "View copyright information for this content.", - "embedDescription": "View the embed code for this content.", - "h5pDescription": "Visit H5P.org to check out more cool content.", - "contentChanged": "This content has changed since you last used it.", - "startingOver": "You'll be starting over.", - "by": "by", - "showMore": "Show more", - "showLess": "Show less", - "subLevel": "Sublevel", - "confirmDialogHeader": "Confirm action", - "confirmDialogBody": "Please confirm that you wish to proceed. This action is not reversible.", - "cancelLabel": "Cancel", - "confirmLabel": "Confirm", - "licenseU": "Undisclosed", - "licenseCCBY": "Attribution", - "licenseCCBYSA": "Attribution-ShareAlike", - "licenseCCBYND": "Attribution-NoDerivs", - "licenseCCBYNC": "Attribution-NonCommercial", - "licenseCCBYNCSA": "Attribution-NonCommercial-ShareAlike", - "licenseCCBYNCND": "Attribution-NonCommercial-NoDerivs", - "licenseCC40": "4.0 International", - "licenseCC30": "3.0 Unported", - "licenseCC25": "2.5 Generic", - "licenseCC20": "2.0 Generic", - "licenseCC10": "1.0 Generic", - "licenseGPL": "General Public License", - "licenseV3": "Version 3", - "licenseV2": "Version 2", - "licenseV1": "Version 1", - "licensePD": "Public Domain", - "licenseCC010": "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", - "licensePDM": "Public Domain Mark", - "licenseC": "Copyright", - "contentType": "Content Type", - "licenseExtras": "License Extras", - "changes": "Changelog", - "contentCopied": "Content is copied to the clipboard", - "connectionLost": "Connection lost. Results will be stored and sent when you regain connection.", - "connectionReestablished": "Connection reestablished.", - "resubmitScores": "Attempting to submit stored results.", - "offlineDialogHeader": "Your connection to the server was lost", - "offlineDialogBody": "We were unable to send information about your completion of this task. Please check your internet connection.", - "offlineDialogRetryMessage": "Retrying in :num....", - "offlineDialogRetryButtonLabel": "Retry now", - "offlineSuccessfulSubmit": "Successfully submitted results." +const integration = { + l10n: { + H5P: { + "fullscreen": "Fullscreen", + "disableFullscreen": "Disable fullscreen", + "download": "Download", + "copyrights": "Rights of use", + "embed": "Embed", + "size": "Size", + "showAdvanced": "Show advanced", + "hideAdvanced": "Hide advanced", + "advancedHelp": "Include this script on your website if you want dynamic sizing of the embedded content:", + "copyrightInformation": "Rights of use", + "close": "Close", + "title": "Title", + "author": "Author", + "year": "Year", + "source": "Source", + "license": "License", + "thumbnail": "Thumbnail", + "noCopyrights": "No copyright information available for this content.", + "reuse": "Reuse", + "reuseContent": "Reuse Content", + "reuseDescription": "Reuse this content.", + "downloadDescription": "Download this content as a H5P file.", + "copyrightsDescription": "View copyright information for this content.", + "embedDescription": "View the embed code for this content.", + "h5pDescription": "Visit H5P.org to check out more cool content.", + "contentChanged": "This content has changed since you last used it.", + "startingOver": "You'll be starting over.", + "by": "by", + "showMore": "Show more", + "showLess": "Show less", + "subLevel": "Sublevel", + "confirmDialogHeader": "Confirm action", + "confirmDialogBody": "Please confirm that you wish to proceed. This action is not reversible.", + "cancelLabel": "Cancel", + "confirmLabel": "Confirm", + "licenseU": "Undisclosed", + "licenseCCBY": "Attribution", + "licenseCCBYSA": "Attribution-ShareAlike", + "licenseCCBYND": "Attribution-NoDerivs", + "licenseCCBYNC": "Attribution-NonCommercial", + "licenseCCBYNCSA": "Attribution-NonCommercial-ShareAlike", + "licenseCCBYNCND": "Attribution-NonCommercial-NoDerivs", + "licenseCC40": "4.0 International", + "licenseCC30": "3.0 Unported", + "licenseCC25": "2.5 Generic", + "licenseCC20": "2.0 Generic", + "licenseCC10": "1.0 Generic", + "licenseGPL": "General Public License", + "licenseV3": "Version 3", + "licenseV2": "Version 2", + "licenseV1": "Version 1", + "licensePD": "Public Domain", + "licenseCC010": "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", + "licensePDM": "Public Domain Mark", + "licenseC": "Copyright", + "contentType": "Content Type", + "licenseExtras": "License Extras", + "changes": "Changelog", + "contentCopied": "Content is copied to the clipboard", + "connectionLost": "Connection lost. Results will be stored and sent when you regain connection.", + "connectionReestablished": "Connection reestablished.", + "resubmitScores": "Attempting to submit stored results.", + "offlineDialogHeader": "Your connection to the server was lost", + "offlineDialogBody": "We were unable to send information about your completion of this task. Please check your internet connection.", + "offlineDialogRetryMessage": "Retrying in :num....", + "offlineDialogRetryButtonLabel": "Retry now", + "offlineSuccessfulSubmit": "Successfully submitted results." + } } }; -window.H5PIntegration = H5PIntegration; \ No newline at end of file +window.H5PIntegration = window.H5PIntegration ? {...window.H5PIntegration,...integration} : integration; \ No newline at end of file From f5f3a29cb1d3ceae75bc482b1817846bb4cb5f00 Mon Sep 17 00:00:00 2001 From: mimidotuser Date: Fri, 23 Apr 2021 12:01:26 +0300 Subject: [PATCH 2/2] fix: merge conflict --- dist/main.bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/main.bundle.js b/dist/main.bundle.js index f9b43508..ac1610b7 100644 --- a/dist/main.bundle.js +++ b/dist/main.bundle.js @@ -1,2 +1,2 @@ /*! For license information please see main.bundle.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["h5p-standalone"]=t():e.H5PStandalone=t()}(self,(function(){return(()=>{var e={757:(e,t,n)=>{e.exports=n(666)},768:()=>{window.H5PIntegration={l10n:{H5P:{fullscreen:"Fullscreen",disableFullscreen:"Disable fullscreen",download:"Download",copyrights:"Rights of use",embed:"Embed",size:"Size",showAdvanced:"Show advanced",hideAdvanced:"Hide advanced",advancedHelp:"Include this script on your website if you want dynamic sizing of the embedded content:",copyrightInformation:"Rights of use",close:"Close",title:"Title",author:"Author",year:"Year",source:"Source",license:"License",thumbnail:"Thumbnail",noCopyrights:"No copyright information available for this content.",reuse:"Reuse",reuseContent:"Reuse Content",reuseDescription:"Reuse this content.",downloadDescription:"Download this content as a H5P file.",copyrightsDescription:"View copyright information for this content.",embedDescription:"View the embed code for this content.",h5pDescription:"Visit H5P.org to check out more cool content.",contentChanged:"This content has changed since you last used it.",startingOver:"You'll be starting over.",by:"by",showMore:"Show more",showLess:"Show less",subLevel:"Sublevel",confirmDialogHeader:"Confirm action",confirmDialogBody:"Please confirm that you wish to proceed. This action is not reversible.",cancelLabel:"Cancel",confirmLabel:"Confirm",licenseU:"Undisclosed",licenseCCBY:"Attribution",licenseCCBYSA:"Attribution-ShareAlike",licenseCCBYND:"Attribution-NoDerivs",licenseCCBYNC:"Attribution-NonCommercial",licenseCCBYNCSA:"Attribution-NonCommercial-ShareAlike",licenseCCBYNCND:"Attribution-NonCommercial-NoDerivs",licenseCC40:"4.0 International",licenseCC30:"3.0 Unported",licenseCC25:"2.5 Generic",licenseCC20:"2.0 Generic",licenseCC10:"1.0 Generic",licenseGPL:"General Public License",licenseV3:"Version 3",licenseV2:"Version 2",licenseV1:"Version 1",licensePD:"Public Domain",licenseCC010:"CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",licensePDM:"Public Domain Mark",licenseC:"Copyright",contentType:"Content Type",licenseExtras:"License Extras",changes:"Changelog",contentCopied:"Content is copied to the clipboard",connectionLost:"Connection lost. Results will be stored and sent when you regain connection.",connectionReestablished:"Connection reestablished.",resubmitScores:"Attempting to submit stored results.",offlineDialogHeader:"Your connection to the server was lost",offlineDialogBody:"We were unable to send information about your completion of this task. Please check your internet connection.",offlineDialogRetryMessage:"Retrying in :num....",offlineDialogRetryButtonLabel:"Retry now",offlineSuccessfulSubmit:"Successfully submitted results."}}}},666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return D()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=u(e,t,n);if("normal"===c.type){if(r=n.done?h:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",g={};function v(){}function y(){}function m(){}var b={};b[o]=function(){return this};var x=Object.getPrototypeOf,w=x&&x(x(A([])));w&&w!==n&&r.call(w,o)&&(b=w);var C=m.prototype=v.prototype=Object.create(b);function P(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,o,a,s){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function S(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=u(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},714:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(e,t){"use strict";var n=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.edges=[],this.Toposort=e}return e.prototype.add=function(e,t){if("string"!=typeof e||!e)throw new TypeError("Dependent name must be given as a not empty string");if((t=Array.isArray(t)?t:[t]).length>0){var n=t,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;if("string"!=typeof a||!a)throw new TypeError("Dependency name must be given as a not empty string");this.edges.push([e,a])}}else this.edges.push([e]);return this},e.prototype.sort=function(){var e=this,t=[],n=this.edges,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=b=o,s=Array.isArray(a),c=0;for(a=s?a:a[Symbol.iterator]();;){var l;if(s){if(c>=a.length)break;l=a[c++]}else{if((c=a.next()).done)break;l=c.value}var u=l;-1===t.indexOf(u)&&t.push(u)}}for(var d=t.length,f=new Array(t.length),p=function n(r,i){if(0!==i.length&&-1!==i.indexOf(r))throw new Error("Cyclic dependency found. "+r+" is dependent of itself.\nDependency chain: "+i.join(" -> ")+" => "+r);var o=t.indexOf(r);if(-1!==o){var a=!1;t[o]=!1;var s=e.edges,c=Array.isArray(s),l=0;for(s=c?s:s[Symbol.iterator]();;){var u;if(c){if(l>=s.length)break;u=s[l++]}else{if((l=s.next()).done)break;u=l.value}var p=u;p[0]===r&&(a=a||i.concat([r]),n(p[1],a))}f[--d]=r}},h=0;h=g.length)break;m=g[y++]}else{if((y=g.next()).done)break;m=y.value}(b=m)[0]===u&&p(b[1],[u])}f[--d]=u}return f},e.prototype.clear=function(){return this.edges=[],this},e}();t.exports=n})?n.apply(t,[t,e]):n)||(e.exports=r)},295:(e,t,n)=>{e.exports=n(714)},798:()=>{H5P.ContentType=function(e){function t(){}return t.prototype=new H5P.EventDispatcher,t.prototype.isRoot=function(){return e},t.prototype.getLibraryFilePath=function(e){return H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces)+"/"+e},t}},449:()=>{var e=window.H5P=window.H5P||{};e.Event=function(e,t,n){this.type=e,this.data=t;var r=!1,i=!1,o=!1;void 0===n&&(n={}),!0===n.bubbles&&(r=!0),!0===n.external&&(i=!0),this.preventBubbling=function(){r=!1},this.getBubbles=function(){return r},this.scheduleForExternal=function(){return!(!i||o||(o=!0,0))}},e.EventDispatcher=function(){var t=this,n={};this.on=function(e,r,i){if("function"!=typeof r)throw TypeError("listener must be a function");t.trigger("newListener",{type:e,listener:r});var o={listener:r,thisArg:i};n[e]?n[e].push(o):n[e]=[o]},this.once=function(e,n,r){if(!(n instanceof Function))throw TypeError("listener must be a function");var i=function(e){t.off(e.type,i),n.call(this,e)};t.on(e,i,r)},this.off=function(e,r){if(void 0!==r&&!(r instanceof Function))throw TypeError("listener must be a function");if(void 0!==n[e]){if(void 0===r)return delete n[e],void t.trigger("removeListener",e);for(var i=0;i{var e=window.H5P=window.H5P||{};e.XAPIEvent=function(){e.Event.call(this,"xAPI",{statement:{}},{bubbles:!0,external:!0})},e.XAPIEvent.prototype=Object.create(e.Event.prototype),e.XAPIEvent.prototype.constructor=e.XAPIEvent,e.XAPIEvent.prototype.setScoredResult=function(e,t,n,r,i){if(this.data.statement.result={},void 0!==e&&(void 0===t?this.data.statement.result.score={raw:e}:(this.data.statement.result.score={min:0,max:t,raw:e},t>0&&(this.data.statement.result.score.scaled=Math.round(e/t*1e4)/1e4))),this.data.statement.result.completion=void 0===r?"completed"===this.getVerb()||"answered"===this.getVerb():r,void 0!==i&&(this.data.statement.result.success=i),n&&n.activityStartTime){var o=Math.round((Date.now()-n.activityStartTime)/10)/100;this.data.statement.result.duration="PT"+o+"S"}},e.XAPIEvent.prototype.setVerb=function(t){-1!==e.jQuery.inArray(t,e.XAPIEvent.allowedXAPIVerbs)?this.data.statement.verb={id:"http://adlnet.gov/expapi/verbs/"+t,display:{"en-US":t}}:void 0!==t.id&&(this.data.statement.verb=t)},e.XAPIEvent.prototype.getVerb=function(e){var t=this.data.statement;return"verb"in t?!0===e?t.verb:t.verb.id.slice(31):null},e.XAPIEvent.prototype.setObject=function(t){if(t.contentId)if(this.data.statement.object={id:this.getContentXAPIId(t),objectType:"Activity",definition:{extensions:{"http://h5p.org/x-api/h5p-local-content-id":t.contentId}}},t.subContentId)this.data.statement.object.definition.extensions["http://h5p.org/x-api/h5p-subContentId"]=t.subContentId,"function"==typeof t.getTitle&&(this.data.statement.object.definition.name={"en-US":t.getTitle()});else{var n=e.getContentForInstance(t.contentId);n&&n.metadata&&n.metadata.title&&(this.data.statement.object.definition.name={"en-US":e.createTitle(n.metadata.title)})}else this.data.statement.object={definition:{}}},e.XAPIEvent.prototype.setContext=function(e){e.parent&&(e.parent.contentId||e.parent.subContentId)&&(this.data.statement.context={contextActivities:{parent:[{id:this.getContentXAPIId(e.parent),objectType:"Activity"}]}}),e.libraryInfo&&(void 0===this.data.statement.context&&(this.data.statement.context={contextActivities:{}}),this.data.statement.context.contextActivities.category=[{id:"http://h5p.org/libraries/"+e.libraryInfo.versionedNameNoSpaces,objectType:"Activity"}])},e.XAPIEvent.prototype.setActor=function(){if(void 0!==H5PIntegration.user)this.data.statement.actor={name:H5PIntegration.user.name,mbox:"mailto:"+H5PIntegration.user.mail,objectType:"Agent"};else{var t;try{localStorage.H5PUserUUID?t=localStorage.H5PUserUUID:(t=e.createUUID(),localStorage.H5PUserUUID=t)}catch(n){t="not-trackable-"+e.createUUID()}this.data.statement.actor={account:{name:t,homePage:H5PIntegration.siteUrl},objectType:"Agent"}}},e.XAPIEvent.prototype.getMaxScore=function(){return this.getVerifiedStatementValue(["result","score","max"])},e.XAPIEvent.prototype.getScore=function(){return this.getVerifiedStatementValue(["result","score","raw"])},e.XAPIEvent.prototype.getContentXAPIId=function(e){var t;return e.contentId&&H5PIntegration&&H5PIntegration.contents&&H5PIntegration.contents["cid-"+e.contentId]&&(t=H5PIntegration.contents["cid-"+e.contentId].url,e.subContentId&&(t+="?subContentId="+e.subContentId)),t},e.XAPIEvent.prototype.isFromChild=function(){var e=this.getVerifiedStatementValue(["context","contextActivities","parent",0,"id"]);return!e||-1===e.indexOf("subContentId")},e.XAPIEvent.prototype.getVerifiedStatementValue=function(e){for(var t=this.data.statement,n=0;n{var e=window.H5P=window.H5P||{};e.externalDispatcher=new e.EventDispatcher,e.EventDispatcher.prototype.triggerXAPI=function(e,t){this.trigger(this.createXAPIEventTemplate(e,t))},e.EventDispatcher.prototype.createXAPIEventTemplate=function(t,n){var r=new e.XAPIEvent;if(r.setActor(),r.setVerb(t),void 0!==n)for(var i in n)r.data.statement[i]=n[i];return"object"in r.data.statement||r.setObject(this),"context"in r.data.statement||r.setContext(this),r},e.EventDispatcher.prototype.triggerXAPICompleted=function(e,t,n){this.triggerXAPIScored(e,t,"completed",!0,n)},e.EventDispatcher.prototype.triggerXAPIScored=function(e,t,n,r,i){var o=this.createXAPIEventTemplate(n);o.setScoredResult(e,t,this,r,i),this.trigger(o)},e.EventDispatcher.prototype.setActivityStarted=function(){void 0===this.activityStartTime&&(void 0!==this.contentId&&void 0!==H5PIntegration.contents&&void 0!==H5PIntegration.contents["cid-"+this.contentId]&&this.triggerXAPI("attempted"),this.activityStartTime=Date.now())},e.xAPICompletedListener=function(t){if(("completed"===t.getVerb()||"answered"===t.getVerb())&&!t.getVerifiedStatementValue(["context","contextActivities","parent"])){var n=t.getScore(),r=t.getMaxScore(),i=t.getVerifiedStatementValue(["object","definition","extensions","http://h5p.org/x-api/h5p-local-content-id"]);e.setFinished(i,n,r)}}},357:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,c=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},l=o.push,u=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,h=p.toString,g=h.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function(e){return null!=e&&e===e.window},b=r.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in x)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function C(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var P="3.5.1",T=function(e,t){return new T.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!y(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+F+")"+F+"*"),_=new RegExp(F+"|>"),X=new RegExp(B),W=new RegExp("^"+R+"$"),Q={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{N.apply(D=L.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){N={apply:D.length?function(e,t){j.apply(e,L.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,l,u,d,h,y,m=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(f(t),t=t||p,g)){if(11!==w&&(d=Z.exec(e)))if(o=d[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(d[2])return N.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!v||!v.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(y=e,m=t,1===w&&(_.test(e)||$.test(e))){for((m=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(re,ie):t.setAttribute("id",u=x)),s=(h=a(e)).length;s--;)h[s]=(u?"#"+u:":scope")+" "+be(h[s]);y=h.join(",")}try{return N.apply(r,m.querySelectorAll(y)),r}catch(t){k(e,!0)}finally{u===x&&t.removeAttribute("id")}}}return c(e.replace(z,"$1"),t,r,i)}function ce(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[x]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return le((function(t){return t=+t,le((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=p&&9===a.nodeType&&a.documentElement&&(h=(p=a).documentElement,g=!o(p),w!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ue((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ue((function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=K.test(p.querySelectorAll))&&(ue((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+F+"*(?:value|"+q+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=K.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",B)})),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==w&&b(w,e)?-1:t==p||t.ownerDocument==w&&b(w,t)?1:u?O(u,e)-O(u,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:u?O(u,e)-O(u,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0}),p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&g&&!k[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return y(t)?T.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?T.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?T.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),H.test(r[1])&&T.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,N=T(b);var O=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function F(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(he=b.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),pe.appendChild(he),v.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",v.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="",v.option=!!pe.lastChild;var me={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?T.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n",""]);var we=/<|&#?\w+;/;function Ce(e,t,n,r,i){for(var o,a,s,c,l,u,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(i in K.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Qt,Jt=[],Yt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||T.expando+"_"+Et.guid++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",(function(e,t,n){var i,o,a,s=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Yt,"$1"+i):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||T.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always((function(){void 0===o?T(r).removeProp(i):r[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Jt.push(i)),a&&y(o)&&o(a[0]),a=o=void 0})),"script"})),v.createHTMLDocument=((Qt=b.implementation.createHTMLDocument("").body).innerHTML="
",2===Qt.childNodes.length),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=H.exec(e))?[t.createElement(i[1])]:(i=Ce([e],t,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)));var r,i,o},T.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(T.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},T.expr.pseudos.animated=function(e){return T.grep(T.timers,(function(t){return e===t.elem})).length},T.offset={setOffset:function(e,t,n){var r,i,o,a,s,c,l=T.css(e,"position"),u=T(e),d={};"static"===l&&(e.style.position="relative"),s=u.offset(),o=T.css(e,"top"),c=T.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+c).indexOf("auto")?(a=(r=u.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(c)||0),y(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){T.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),i.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-T.css(r,"marginTop",!0),left:t.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||ae}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return _(this,(function(e,r,i){var o;if(m(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),T.each(["top","left"],(function(e,t){T.cssHooks[t]=_e(v.pixelPosition,(function(e,n){if(n)return n=$e(e,t),Be.test(n)?T(e).position()[t]+"px":n}))})),T.each({Height:"height",Width:"width"},(function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){T.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return _(this,(function(t,n,i){var o;return m(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?T.css(t,n,s):T.style(t,n,i,s)}),t,a?i:void 0,a)}}))})),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){T.fn[t]=function(e){return this.on(t,e)}})),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){T.fn[t]=function(e,n){return 0{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{"use strict";function e(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);function s(t){e(a,i,o,s,c,"next",t)}function c(t){e(a,i,o,s,c,"throw",t)}s(void 0)}))}}function i(e,t){for(var n=0;ng}),n(768);var o=n(757),a=n.n(o),s=n(295),c=n.n(s),l=n(357),u=n.n(l),d=window.H5P=window.H5P||{};d.jQuery=u().noConflict(!0),d.jQuery.fn.__originalLoad=d.jQuery.load,d.jQuery.fn.load=function(e,t,n){if("function"==typeof e){console.warn("You are using a deprecated H5P library. Please upgrade!");let e=Array.prototype.slice.call(arguments);return e.unshift("load"),d.jQuery.fn.on.apply(this,e)}return d.jQuery.fn.__originalLoad.apply(this,arguments)},d.isFramed=window.self!==window.parent,d.$window=d.jQuery(window),d.instances=[],document.documentElement.requestFullScreen?d.fullScreenBrowserPrefix="":document.documentElement.webkitRequestFullScreen?(d.safariBrowser=navigator.userAgent.match(/version\/([.\d]+)/i),d.safariBrowser=null===d.safariBrowser?0:parseInt(d.safariBrowser[1]),(0===d.safariBrowser||d.safariBrowser>6)&&(d.fullScreenBrowserPrefix="webkit")):document.documentElement.mozRequestFullScreen?d.fullScreenBrowserPrefix="moz":document.documentElement.msRequestFullscreen&&(d.fullScreenBrowserPrefix="ms"),d.opened={},d.init=function(e){void 0===d.$body&&(d.$body=d.jQuery(document.body)),void 0===d.fullscreenSupported&&(d.fullscreenSupported=!(H5PIntegration.fullscreenDisabled||d.fullscreenDisabled||d.isFramed&&!1!==d.externalEmbed&&!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled))),void 0===d.canHasFullScreen&&(d.canHasFullScreen=d.fullscreenSupported),d.jQuery(".h5p-content:not(.h5p-initialized)",e).each((function(){var e=d.jQuery(this).addClass("h5p-initialized"),t=d.jQuery('
').appendTo(e),n=e.data("content-id"),r=H5PIntegration.contents["cid-"+n];if(void 0===r)return d.error("No data for content id "+n+". Perhaps the library is gone?");var i={library:r.library,params:JSON.parse(r.jsonContent),metadata:r.metadata};d.getUserData(n,"state",(function(e,a){if(a)i.userDatas={state:a};else if(null===a&&H5PIntegration.saveFreq){delete r.contentUserData;var s=new d.Dialog("content-user-data-reset","Data Reset","

"+d.t("contentChanged")+"

"+d.t("startingOver")+'

OK
',t);d.jQuery(s).on("dialog-opened",(function(e,t){var r=function(e){"click"!==e.type&&32!==e.which||(s.close(),d.deleteUserData(n,"state",0))};t.find(".h5p-dialog-ok-button").click(r).keypress(r),d.trigger(o,"resize")})).on("dialog-closed",(function(){d.trigger(o,"resize")})),s.open()}}));var o=d.newRunnable(i,n,t,!0,{standalone:!0});d.offlineRequestQueue=new d.OfflineRequestQueue({instance:o}),1==r.fullScreen&&d.fullscreenSupported&&d.jQuery('
').prependTo(t).children().click((function(){d.fullScreen(t,o)})).keydown((function(e){if(32===e.which||13===e.which)return d.fullScreen(t,o),!1}));var a,s=r.displayOptions,c=!1;if(s.frame){if(s.copyright){var l=d.getCopyrights(o,i.params,n,i.metadata);l||(s.copyright=!1)}var u=new d.ActionBar(s),f=u.getDOMElement();u.on("reuse",(function(){d.openReuseDialog(f,r,i,o,n),o.triggerXAPI("accessed-reuse")})),u.on("copyrights",(function(){new d.Dialog("copyrights",d.t("copyrightInformation"),l,t).open(!0),o.triggerXAPI("accessed-copyright")})),u.on("embed",(function(){d.openEmbedDialog(f,r.embedCode,r.resizeCode,{width:e.width(),height:e.height()},o),o.triggerXAPI("accessed-embed")})),u.hasActions()&&(c=!0,f.insertAfter(t))}if(e.addClass(c?"h5p-frame":"h5p-no-frame"),d.opened[n]=new Date,d.on(o,"finish",(function(e){void 0!==e.data&&d.setFinished(n,e.data.score,e.data.maxScore,e.data.time)})),d.on(o,"xAPI",d.xAPICompletedListener),!1!==H5PIntegration.saveFreq&&(o.getCurrentState instanceof Function||"function"==typeof o.getCurrentState)){var p,h=function(){var e=o.getCurrentState();void 0!==e&&d.setUserData(n,"state",e,{deleteOnChange:!0}),H5PIntegration.saveFreq&&(p=setTimeout(h,1e3*H5PIntegration.saveFreq))};H5PIntegration.saveFreq&&(p=setTimeout(h,1e3*H5PIntegration.saveFreq)),d.on(o,"xAPI",(function(e){var t=e.getVerb();"completed"!==t&&"progressed"!==t||(clearTimeout(p),p=setTimeout(h,3e3))}))}if(d.isFramed)if(!1===d.externalEmbed){var g=window.frameElement;d.on(o,"resize",(function(){clearTimeout(a),a=setTimeout((function(){!function(){if(!window.parent.H5P.isFullscreen){var e=g.parentElement.style.height;g.parentElement.style.height=g.parentElement.clientHeight+"px",g.getBoundingClientRect(),g.style.height="1px",g.style.height=g.contentDocument.body.scrollHeight+"px",g.parentElement.style.height=e}}()}),1)}))}else if(d.communicator){var v=!1;d.communicator.on("ready",(function(){d.communicator.send("hello")})),d.communicator.on("hello",(function(){v=!0,document.body.style.height="auto",document.body.style.overflow="hidden",d.trigger(o,"resize")})),d.communicator.on("resizePrepared",(function(){d.communicator.send("resize",{scrollHeight:document.body.scrollHeight})})),d.communicator.on("resize",(function(){d.trigger(o,"resize")})),d.on(o,"resize",(function(){d.isFullscreen||(clearTimeout(a),a=setTimeout((function(){v?d.communicator.send("prepareResize",{scrollHeight:document.body.scrollHeight,clientHeight:document.body.clientHeight}):d.communicator.send("hello")}),0))}))}d.isFramed&&!1!==d.externalEmbed||d.jQuery(window.parent).resize((function(){window.parent.H5P.isFullscreen,d.trigger(o,"resize")})),d.instances.push(o),d.trigger(o,"resize"),e.addClass("using-mouse"),e.on("mousedown keydown keyup",(function(t){e.toggleClass("using-mouse","mousedown"===t.type)})),d.externalDispatcher&&d.externalDispatcher.trigger("initialized")})),d.jQuery("iframe.h5p-iframe:not(.h5p-initialized)",e).each((function(){var e=d.jQuery(this).addClass("h5p-initialized").data("content-id");const t=H5PIntegration.contents["cid-"+e],n=t&&t.metadata&&t.metadata.defaultLanguage?t.metadata.defaultLanguage:"en";this.contentDocument.open(),this.contentDocument.write(''+d.getHeadTags(e)+'
'),this.contentDocument.close()}))},d.getHeadTags=function(e){var t=function(e){for(var t="",n=0;n';return t},n=function(e){for(var t="",n=0;n<\/script>';return t};return''+t(H5PIntegration.core.styles)+t(H5PIntegration.contents["cid-"+e].styles)+n(H5PIntegration.core.scripts)+n(H5PIntegration.contents["cid-"+e].scripts)+"