diff --git a/README.md b/README.md index d393561c..154ff044 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# h5p-standalone 1.3.3 +# h5p-standalone 1.3.4 Display H5P content with plain old HTML ## Usage diff --git a/bower.json b/bower.json index b165902d..37ab4055 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "h5p-standalone", - "version": "1.3.3", + "version": "1.3.4", "homepage": "https://github.com/tunapanda/h5p-standalone", "authors": [ "Jake Lee Kennedy " diff --git a/dist/js/h5p-standalone-frame.js b/dist/js/h5p-standalone-frame.js index 83f16afc..61b95c3d 100644 --- a/dist/js/h5p-standalone-frame.js +++ b/dist/js/h5p-standalone-frame.js @@ -12612,6 +12612,9 @@ H5P.createTitle = function (rawTitle, maxLength) { })(H5P.jQuery); H5P.getLibraryPath = function (library) { + if (H5PIntegration.pathIncludesVersion) { + return H5PIntegration.url + '/' + library; + } return H5PIntegration.url + '/' + library.split('-')[0]; }; @@ -12641,4 +12644,4 @@ H5P.getPath = function (path, contentId) { // } return prefix + '/' + path; -}; \ No newline at end of file +}; diff --git a/dist/js/h5p-standalone-frame.min.js b/dist/js/h5p-standalone-frame.min.js index 5c5b9a33..a7daa063 100644 --- a/dist/js/h5p-standalone-frame.min.js +++ b/dist/js/h5p-standalone-frame.min.js @@ -1 +1 @@ -var H5P;!function(h,w){var t,n,v=typeof w,g=h.document,e=h.location,r=h.jQuery,i=h.$,o={},d=[],a="1.9.1",y=d.concat,s=d.push,u=d.slice,c=d.indexOf,l=o.toString,m=o.hasOwnProperty,f=a.trim,ve=function(e,t){return new ve.fn.init(e,t,n)},p=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,C=/\S+/g,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,x=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,P=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,H=/^[\],:{}\s]*$/,T=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,E=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,N=/^-ms-/,k=/-([\da-z])/gi,A=function(e,t){return t.toUpperCase()},D=function(e){(g.addEventListener||"load"===e.type||"complete"===g.readyState)&&(I(),ve.ready())},I=function(){g.addEventListener?(g.removeEventListener("DOMContentLoaded",D,!1),h.removeEventListener("load",D,!1)):(g.detachEvent("onreadystatechange",D),h.detachEvent("onload",D))};function j(e){var t=e.length,n=ve.type(e);return!ve.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&0"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:x.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 ve?t[0]:t,ve.merge(this,ve.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),P.test(r[1])&&ve.isPlainObject(t))for(r in t)ve.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if((i=g.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return n.find(e);this.length=1,this[0]=i}return this.context=g,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ve.isFunction(e)?n.ready(e):(e.selector!==w&&(this.selector=e.selector,this.context=e.context),ve.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return u.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){var t=ve.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ve.each(this,e,t)},ready:function(e){return ve.ready.promise().done(e),this},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n
a",e=u.getElementsByTagName("*"),t=u.getElementsByTagName("a")[0],!e||!t||!e.length)return{};a=(r=g.createElement("select")).appendChild(g.createElement("option")),n=u.getElementsByTagName("input")[0],t.style.cssText="top:1px;float:left;opacity:.5",o={getSetAttribute:"t"!==u.className,leadingWhitespace:3===u.firstChild.nodeType,tbody:!u.getElementsByTagName("tbody").length,htmlSerialize:!!u.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.5/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:!!n.value,optSelected:a.selected,enctype:!!g.createElement("form").enctype,html5Clone:"<:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===g.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},n.checked=!0,o.noCloneChecked=n.cloneNode(!0).checked,r.disabled=!0,o.optDisabled=!a.disabled;try{delete u.test}catch(e){o.deleteExpando=!1}for(l in(n=g.createElement("input")).setAttribute("value",""),o.input=""===n.getAttribute("value"),n.value="t",n.setAttribute("type","radio"),o.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),(i=g.createDocumentFragment()).appendChild(n),o.appendChecked=n.checked,o.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){o.noCloneEvent=!1}),u.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})u.setAttribute(s="on"+l,"t"),o[l+"Bubbles"]=s in h||!1===u.attributes[s].expando;return u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===u.style.backgroundClip,ve(function(){var e,t,n,r="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",i=g.getElementsByTagName("body")[0];i&&((e=g.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",i.appendChild(e).appendChild(u),u.innerHTML="
t
",(n=u.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===n[0].offsetHeight,n[0].style.display="",n[1].style.display="none",o.reliableHiddenOffsets=c&&0===n[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",o.boxSizing=4===u.offsetWidth,o.doesNotIncludeMarginInBodyOffset=1!==i.offsetTop,h.getComputedStyle&&(o.pixelPosition="1%"!==(h.getComputedStyle(u,null)||{}).top,o.boxSizingReliable="4px"===(h.getComputedStyle(u,null)||{width:"4px"}).width,(t=u.appendChild(g.createElement("div"))).style.cssText=u.style.cssText=r,t.style.marginRight=t.style.width="0",u.style.width="1px",o.reliableMarginRight=!parseFloat((h.getComputedStyle(t,null)||{}).marginRight)),typeof u.style.zoom!==v&&(u.innerHTML="",u.style.cssText=r+"width:1px;padding:1px;display:inline;zoom:1",o.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="
",u.firstChild.style.width="5px",o.shrinkWrapBlocks=3!==u.offsetWidth,o.inlineBlockNeedsLayout&&(i.style.zoom=1)),i.removeChild(e),e=u=n=t=null)}),e=r=i=a=t=n=null,o}();var F=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,M=/([A-Z])/g;function B(e,t,n,r){if(ve.acceptData(e)){var i,o,a=ve.expando,s="string"==typeof t,c=e.nodeType,l=c?ve.cache:e,u=c?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||!s||n!==w)return u||(c?e[a]=u=d.pop()||ve.guid++:u=a),l[u]||(l[u]={},c||(l[u].toJSON=ve.noop)),"object"!=typeof t&&"function"!=typeof t||(r?l[u]=ve.extend(l[u],t):l[u].data=ve.extend(l[u].data,t)),i=l[u],r||(i.data||(i.data={}),i=i.data),n!==w&&(i[ve.camelCase(t)]=n),s?null==(o=i[t])&&(o=i[ve.camelCase(t)]):o=i,o}}function O(e,t,n){if(ve.acceptData(e)){var r,i,o,a=e.nodeType,s=a?ve.cache:e,c=a?e[ve.expando]:ve.expando;if(s[c]){if(t&&(o=n?s[c]:s[c].data)){for((r=0,i=(t=ve.isArray(t)?t.concat(ve.map(t,ve.camelCase)):t in o?[t]:(t=ve.camelCase(t))in o?[t]:t.split(" ")).length);r+~])"+L+"*"),R=new RegExp(O),z=new RegExp("^"+M+"$"),X={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},W=/[\x20\t\r\n\f]*[+~]/,U=/^[^{]+\{\s*\[native code/,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,J=/'|\\/g,G=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,K=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Z=function(e,t){var n="0x"+t-65536;return n!=n?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{I.call(b.documentElement.childNodes,0)[0].nodeType}catch(e){I=function(e){for(var t,n=[];t=this[e++];)n.push(t);return n}}function ee(e){return U.test(e+"")}function te(){var n,r=[];return n=function(e,t){return r.push(e+=" ")>H.cacheLength&&delete n[r.shift()],n[e]=t}}function ne(e){return e[T]=!0,e}function re(e){var t=C.createElement("div");try{return e(t)}catch(e){return!1}finally{t=null}}function ie(e,t,n,r){var i,o,a,s,c,l,u,d,f,p;if((t?t.ownerDocument||t:b)!==C&&g(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=(t=t||C).nodeType)&&9!==s)return[];if(!m&&!r){if(i=V.exec(e))if(a=i[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return D.apply(n,I.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&x.getByClassName&&t.getElementsByClassName)return D.apply(n,I.call(t.getElementsByClassName(a),0)),n}if(x.qsa&&!v.test(e)){if(u=!0,d=T,f=t,p=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=le(e),(u=t.getAttribute("id"))?d=u.replace(J,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",c=l.length;c--;)l[c]=d+ue(l[c]);f=W.test(e)&&t.parentNode||t,p=l.join(",")}if(p)try{return D.apply(n,I.call(f.querySelectorAll(p),0)),n}catch(e){}finally{u||t.removeAttribute("id")}}}return function(e,t,n,r){var i,o,a,s,c,l=le(e);if(!r&&1===l.length){if(2<(o=l[0]=l[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&!m&&H.relative[o[1].type]){if(!(t=H.find.ID(a.matches[0].replace(K,Z),t)[0]))return n;e=e.slice(o.shift().value.length)}for(i=X.needsContext.test(e)?0:o.length;i--&&(a=o[i],!H.relative[s=a.type]);)if((c=H.find[s])&&(r=c(a.matches[0].replace(K,Z),W.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),!(e=r.length&&ue(o)))return D.apply(n,I.call(r,0)),n;break}}return h(e,l)(r,t,m,n,W.test(e)),n}(e.replace(q,"$1"),t,n,r)}function oe(e,t){var n=t&&e,r=n&&(~t.sourceIndex||N)-(~e.sourceIndex||N);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ae(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function se(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ce(a){return ne(function(o){return o=+o,ne(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}for(t in r=ie.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},g=ie.setDocument=function(e){var c=e?e.ownerDocument||e:b;return c!==C&&9===c.nodeType&&c.documentElement&&(i=(C=c).documentElement,m=r(c),x.tagNameNoComments=re(function(e){return e.appendChild(c.createComment("")),!e.getElementsByTagName("*").length}),x.attributes=re(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),x.getByClassName=re(function(e){return e.innerHTML="",!(!e.getElementsByClassName||!e.getElementsByClassName("e").length)&&(e.lastChild.className="e",2===e.getElementsByClassName("e").length)}),x.getByName=re(function(e){e.id=T+0,e.innerHTML="
",i.insertBefore(e,i.firstChild);var t=c.getElementsByName&&c.getElementsByName(T).length===2+c.getElementsByName(T+0).length;return x.getIdNotName=!c.getElementById(T),i.removeChild(e),t}),H.attrHandle=re(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==E&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},x.getIdNotName?(H.find.ID=function(e,t){if(typeof t.getElementById!==E&&!m){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},H.filter.ID=function(e){var t=e.replace(K,Z);return function(e){return e.getAttribute("id")===t}}):(H.find.ID=function(e,t){if(typeof t.getElementById!==E&&!m){var n=t.getElementById(e);return n?n.id===e||typeof n.getAttributeNode!==E&&n.getAttributeNode("id").value===e?[n]:void 0:[]}},H.filter.ID=function(e){var n=e.replace(K,Z);return function(e){var t=typeof e.getAttributeNode!==E&&e.getAttributeNode("id");return t&&t.value===n}}),H.find.TAG=x.tagNameNoComments?function(e,t){if(typeof t.getElementsByTagName!==E)return t.getElementsByTagName(e)}: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},H.find.NAME=x.getByName&&function(e,t){if(typeof t.getElementsByName!==E)return t.getElementsByName(name)},H.find.CLASS=x.getByClassName&&function(e,t){if(typeof t.getElementsByClassName!==E&&!m)return t.getElementsByClassName(e)},a=[],v=[":focus"],(x.qsa=ee(c.querySelectorAll))&&(re(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||v.push("\\["+L+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||v.push(":checked")}),re(function(e){e.innerHTML="",e.querySelectorAll("[i^='']").length&&v.push("[*^$]="+L+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(x.matchesSelector=ee(s=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector))&&re(function(e){x.disconnectedMatch=s.call(e,"div"),s.call(e,"[s!='']:x"),a.push("!=",O)}),v=new RegExp(v.join("|")),a=new RegExp(a.join("|")),y=ee(i.contains)||i.compareDocumentPosition?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},u=i.compareDocumentPosition?function(e,t){var n;return e===t?(l=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===c||y(b,e)?-1:t===c||y(b,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(e===t)return l=!0,0;if(!i||!o)return e===c?-1:t===c?1:i?-1:o?1:0;if(i===o)return oe(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?oe(a[r],s[r]):a[r]===b?-1:s[r]===b?1:0},l=!1,[0,0].sort(u),x.detectDuplicates=l),C},ie.matches=function(e,t){return ie(e,null,null,t)},ie.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&g(e),t=t.replace(G,"='$1']"),x.matchesSelector&&!m&&(!a||!a.test(t))&&!v.test(t))try{var n=s.call(e,t);if(n||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,Z),e[3]=(e[4]||e[5]||"").replace(K,Z),"~="===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]||ie.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]&&ie.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return X.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&R.test(n)&&(t=le(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(t){return"*"===t?function(){return!0}:(t=t.replace(K,Z).toLowerCase(),function(e){return e.nodeName&&e.nodeName.toLowerCase()===t})},CLASS:function(e){var t=c[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&c(e,function(e){return t.test(e.className||typeof e.getAttribute!==E&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=ie.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1]","i"),ge=/^\s+/,me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ye=/<([\w:]+)/,be=/\s*$/g,Ee={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ve.support.htmlSerialize?[0,"",""]:[1,"X
","
"]},Ne=de(g).appendChild(g.createElement("div"));function ke(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function Ae(e){var t=Te.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function De(e,t){for(var n,r=0;null!=(n=e[r]);r++)ve._data(n,"globalEval",!t||ve._data(t[r],"globalEval"))}function Ie(e,t){if(1===t.nodeType&&ve.hasData(e)){var n,r,i,o=ve._data(e),a=ve._data(t,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r");try{for(;n")?o=e.cloneNode(!0):(Ne.innerHTML=e.outerHTML,Ne.removeChild(o=Ne.firstChild)),!(ve.support.noCloneEvent&&ve.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ve.isXMLDoc(e)))for(r=Le(o),s=Le(e),a=0;null!=(i=s[a]);++a)r[a]&&je(i,r[a]);if(t)if(n)for(s=s||Le(e),r=r||Le(o),a=0;null!=(i=s[a]);a++)Ie(i,r[a]);else Ie(e,o);return 0<(r=Le(o,"script")).length&&De(r,!c&&Le(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,c,l,u,d=e.length,f=de(t),p=[],h=0;h")+u[2],i=u[0];i--;)s=s.lastChild;if(!ve.support.leadingWhitespace&&ge.test(o)&&p.push(t.createTextNode(ge.exec(o)[0])),!ve.support.tbody)for(i=(o="table"!==c||be.test(o)?""!==u[1]||be.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)ve.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(ve.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=f.lastChild}else p.push(t.createTextNode(o));for(s&&f.removeChild(s),ve.support.appendChecked||ve.grep(Le(p,"input"),Fe),h=0;o=p[h++];)if((!r||-1===ve.inArray(o,r))&&(a=ve.contains(o.ownerDocument,o),s=Le(f.appendChild(o),"script"),a&&De(s),n))for(i=0;o=s[i++];)Ce.test(o.type||"")&&n.push(o);return s=null,f},cleanData:function(e,t){for(var n,r,i,o,a=0,s=ve.expando,c=ve.cache,l=ve.support.deleteExpando,u=ve.event.special;null!=(n=e[a]);a++)if((t||ve.acceptData(n))&&(o=(i=n[s])&&c[i])){if(o.events)for(r in o.events)u[r]?ve.event.remove(n,r):ve.removeEvent(n,r,o.handle);c[i]&&(delete c[i],l?delete n[s]:typeof n.removeAttribute!==v?n.removeAttribute(s):n[s]=null,d.push(i))}}});var Me,Be,Oe,qe=/alpha\([^)]*\)/i,_e=/opacity\s*=\s*([^)]*)/,$e=/^(top|right|bottom|left)$/,Re=/^(none|table(?!-c[ea]).+)/,ze=/^margin/,Xe=new RegExp("^("+p+")(.*)$","i"),We=new RegExp("^("+p+")(?!px)[a-z%]+$","i"),Ue=new RegExp("^([+-])=("+p+")","i"),Ve={BODY:"block"},Qe={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:0,fontWeight:400},Je=["Top","Right","Bottom","Left"],Ge=["Webkit","O","Moz","ms"];function Ke(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Ge.length;i--;)if((t=Ge[i]+n)in e)return t;return r}function Ze(e,t){return e=t||e,"none"===ve.css(e,"display")||!ve.contains(e.ownerDocument,e)}function et(e,t){for(var n,r,i,o=[],a=0,s=e.length;a").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||Me[0].contentDocument).document).write(""),t.close(),n=ot(e,t),Me.detach()),Ve[e]=n),n}function ot(e,t){var n=ve(t.createElement(e)).appendTo(t.body),r=ve.css(n[0],"display");return n.remove(),r}ve.fn.extend({css:function(e,t){return ve.access(this,function(e,t,n){var r,i,o={},a=0;if(ve.isArray(t)){for(i=Be(e),r=t.length;a").append(ve.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){a.each(n,i||[e.responseText,t,e])}),this},ve.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ve.fn[t]=function(e){return this.on(t,e)}}),ve.each(["get","post"],function(e,i){ve[i]=function(e,t,n,r){return ve.isFunction(t)&&(r=r||n,n=t,t=w),ve.ajax({url:e,type:i,dataType:r,data:t,success:n})}}),ve.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pt,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ft[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":h.String,"text html":!0,"text json":ve.parseJSON,"text xml":ve.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Nt(Nt(e,ve.ajaxSettings),t):Nt(ve.ajaxSettings,e)},ajaxPrefilter:St(wt),ajaxTransport:St(Ct),ajax:function(e,t){"object"==typeof e&&(t=e,e=w),t=t||{};var n,r,u,d,f,p,h,i,g=ve.ajaxSetup({},t),m=g.context||g,v=g.context&&(m.nodeType||m.jquery)?ve(m):ve.event,y=ve.Deferred(),b=ve.Callbacks("once memory"),x=g.statusCode||{},o={},a={},P=0,s="canceled",H={readyState:0,getResponseHeader:function(e){var t;if(2===P){if(!i)for(i={};t=yt.exec(d);)i[t[1].toLowerCase()]=t[2];t=i[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===P?d:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return P||(e=a[n]=a[n]||e,o[e]=t),this},overrideMimeType:function(e){return P||(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(P<2)for(t in e)x[t]=[x[t],e[t]];else H.always(e[H.status]);return this},abort:function(e){var t=e||s;return h&&h.abort(t),c(0,t),this}};if(y.promise(H).complete=b.add,H.success=H.done,H.error=H.fail,g.url=((e||g.url||pt)+"").replace(mt,"").replace(xt,ft[1]+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=ve.trim(g.dataType||"*").toLowerCase().match(C)||[""],null==g.crossDomain&&(n=Pt.exec(g.url.toLowerCase()),g.crossDomain=!(!n||n[1]===ft[1]&&n[2]===ft[2]&&(n[3]||("http:"===n[1]?80:443))==(ft[3]||("http:"===ft[1]?80:443)))),g.data&&g.processData&&"string"!=typeof g.data&&(g.data=ve.param(g.data,g.traditional)),Et(wt,g,t,H),2===P)return H;for(r in(p=g.global)&&0==ve.active++&&ve.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!bt.test(g.type),u=g.url,g.hasContent||(g.data&&(u=g.url+=(gt.test(u)?"&":"?")+g.data,delete g.data),!1===g.cache&&(g.url=vt.test(u)?u.replace(vt,"$1_="+ht++):u+(gt.test(u)?"&":"?")+"_="+ht++)),g.ifModified&&(ve.lastModified[u]&&H.setRequestHeader("If-Modified-Since",ve.lastModified[u]),ve.etag[u]&&H.setRequestHeader("If-None-Match",ve.etag[u])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&H.setRequestHeader("Content-Type",g.contentType),H.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+Tt+"; q=0.01":""):g.accepts["*"]),g.headers)H.setRequestHeader(r,g.headers[r]);if(g.beforeSend&&(!1===g.beforeSend.call(m,H,g)||2===P))return H.abort();for(r in s="abort",{success:1,error:1,complete:1})H[r](g[r]);if(h=Et(Ct,g,t,H)){H.readyState=1,p&&v.trigger("ajaxSend",[H,g]),g.async&&0'),t=function(e,t){var n=function(){r.trigger(e)};H5P.jQuery("
  • ",{class:"h5p-button h5p-noselect h5p-"+(t||e),role:"button",tabindex:0,title:H5P.t(e+"Description"),html:H5P.t(e),on:{click:n,keypress:function(e){32===e.which&&(n(),e.preventDefault())}},appendTo:o}),i=!0};e.export&&t("download","export"),e.copyright&&t("copyrights"),e.embed&&t("embed"),e.icon&&(H5P.jQuery('
  • ').appendTo(o),i=!0),r.getDOMElement=function(){return o},r.hasActions=function(){return i}}return(t.prototype=Object.create(n.prototype)).constructor=t}(H5P.jQuery,H5P.EventDispatcher),H5P.ContentType=function(e,t){function n(){}return(n.prototype=new H5P.EventDispatcher).isRoot=function(){return e},n.prototype.getLibraryFilePath=function(e){return H5P.getLibraryPath(this.libraryInfo.versionedNameNoSpaces)+"/"+e},n},(H5P=H5P||{}).XAPIEvent=function(){H5P.Event.call(this,"xAPI",{statement:{}},{bubbles:!0,external:!0})},H5P.XAPIEvent.prototype=Object.create(H5P.Event.prototype),H5P.XAPIEvent.prototype.constructor=H5P.XAPIEvent,H5P.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},0').appendTo(e),i=e.data("content-id"),o=H5PIntegration.contents["cid-"+i];if(void 0===o)return H5P.error("No data for content id "+i+". Perhaps the library is gone?");var a={library:o.library,params:JSON.parse(o.jsonContent)};H5P.getUserData(i,"state",function(e,t){if(t)a.userDatas={state:t};else if(null===t&&H5PIntegration.saveFreq){delete o.contentUserData;var r=new H5P.Dialog("content-user-data-reset","Data Reset","

    "+H5P.t("contentChanged")+"

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

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