From 47d449937720214a4c4e5a3df3c4c4f217f805c1 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 26 Nov 2020 16:22:53 +0100 Subject: [PATCH] Update Hub Sharing + Registration clients --- js/h5p-hub-registration.js | 2 +- js/h5p-hub-sharing.js | 2 +- styles/h5p-hub-registration.css | 8 ++++---- styles/h5p-hub-sharing.css | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/js/h5p-hub-registration.js b/js/h5p-hub-registration.js index ffe8094..dfd0fbe 100644 --- a/js/h5p-hub-registration.js +++ b/js/h5p-hub-registration.js @@ -34,4 +34,4 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r,i,a,o,l;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(c,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(c,0))},i=function(e,t){s=setTimeout(e,t)},a=function(){clearTimeout(s)},o=function(){return!1},l=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var y=!1,b=null,w=-1,E=5,x=0;o=function(){return t.unstable_now()>=x},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0P(o,n))void 0!==u&&0>P(u,o)?(e[r]=u,e[l]=n,r=l):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],O=[],R=1,z=null,I=3,D=!1,L=!1,M=!1;function A(e){for(var t=C(O);null!==t;){if(null===t.callback)_(O);else{if(!(t.startTime<=e))break;_(O),t.sortIndex=t.expirationTime,S(N,t)}t=C(O)}}function j(e){if(M=!1,A(e),!L)if(null!==C(N))L=!0,r(F);else{var t=C(O);null!==t&&i(j,t.startTime-e)}}function F(e,n){L=!1,M&&(M=!1,a()),D=!0;var r=I;try{for(A(n),z=C(N);null!==z&&(!(z.expirationTime>n)||e&&!o());){var l=z.callback;if(null!==l){z.callback=null,I=z.priorityLevel;var u=l(z.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?z.callback=u:z===C(N)&&_(N),A(n)}else _(N);z=C(N)}if(null!==z)var s=!0;else{var c=C(O);null!==c&&i(j,c.startTime-n),s=!1}return s}finally{z=null,I=r,D=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||D||(L=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return C(N)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,o){var l=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0l?(e.sortIndex=u,S(O,e),null===C(N)&&e===C(O)&&(M?a():M=!0,i(j,u-l))):(e.sortIndex=o,S(N,e),L||D||(L=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();A(e);var n=C(N);return n!==z&&null!==z&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimee.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(i)&&l.push("path="+i),r.isString(a)&&l.push("domain="+a),!0===o&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(16);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(3),o=n.n(a),l=i.a.createContext(),u=n(5),s=n.n(u),c=n(4),f=n.n(c),d=n(1),p=n.n(d),h=(n(31),function(e){var t=e.children,n=e.name,r=e.onClick,a=e.variant,o=e.color,l=e.enabled,u=e.id,s=[];return n&&s.push("h5p-hub-"+n),a&&s.push("h5p-hub-"+a),o&&s.push("h5p-hub-"+o),i.a.createElement("button",{id:u,type:"button",className:s.join(" "),onClick:r,disabled:!1===l},t)});h.propTypes={children:p.a.oneOfType([p.a.string,p.a.object]),name:p.a.string,onClick:p.a.func.isRequired,variant:p.a.string,color:p.a.string,enabled:p.a.bool,id:p.a.string};var m=h,v=(n(32),function(e){var t=e.label,n=e.description,r=e.mandatory,a=e.children,o=e.link,l=e.className;return i.a.createElement("div",{className:"h5p-hub-form-element ".concat(r?"h5p-hub-mandatory":""," ").concat(l||"")},i.a.createElement("label",{htmlFor:a.props.id},t),i.a.createElement("div",{className:"h5p-hub-details-row"},n&&i.a.createElement("div",{className:"h5p-hub-description"},n),o&&i.a.createElement("button",{className:"h5p-hub-link-button",onClick:o.onClick},o.linkText)),a)});v.propTypes={label:p.a.string.isRequired,description:p.a.string,mandatory:p.a.bool,children:p.a.shape(),link:p.a.shape({onClick:p.a.func.isRequired,linkText:p.a.string.isRequired}),className:p.a.string};var g=v,y=n(6),b=n.n(y);p.a.shape({title:p.a.string.isRequired,license:p.a.string.isRequired,licenseVersion:p.a.string.isRequired,disciplines:p.a.array.isRequired,language:p.a.string.isRequired,level:p.a.string}),p.a.shape({keywords:p.a.array,shortDescription:p.a.string,longDescription:p.a.string,icon:p.a.object,screenshots:p.a.array}),n(49),n(50),n(51),n(52);var w=function(e){var t=e.src,n=Object(r.useMemo)((function(){var e=new Image;return e.src=t,e}),[t]),a={backgroundImage:"url('".concat(n.src,"')")};return i.a.createElement("span",{className:"h5p-hub-image-preview",style:a})};w.propTypes={src:p.a.string};var E=w,x=(n(53),function(e){var t=e.onFile,n=e.clearImage,r=e.img,a=e.ariaLabel,o=e.removeImageLabel,l=i.a.createRef(),u=function(){t({}),l.current.value=null,n&&n()};return i.a.createElement("div",{className:"h5p-hub-image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?l.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&u()},"aria-label":a},r&&r.src&&i.a.createElement(i.a.Fragment,null,i.a.createElement(E,{src:r.src}),i.a.createElement("button",{className:"h5p-hub-icon-close","aria-label":o,onKeyDown:function(e){-1!==["Enter","Space"].indexOf(e.key)&&(e.stopPropagation(),u())},onClick:u,tabIndex:"0"})),i.a.createElement("div",{className:"h5p-hub-image-upload ".concat(r&&r.src?"h5p-hub-image-selected":"")},i.a.createElement("input",{tabIndex:"-1",ref:l,type:"file",accept:".png,.jpg,.jpeg,.jfif,.pjpeg,.pjp",onChange:function(e){if(0!==e.target.files.length){var n=e.target.files[0];t({src:URL.createObjectURL(n),file:n})}}})))});x.propTypes={onFile:p.a.func.isRequired,clearImage:p.a.func,img:p.a.object,ariaLabel:p.a.string.isRequired,removeImageLabel:p.a.string.isRequired};var k=x,T=(n(54),function(e){var t=e.title,n=e.description,r=e.mainText;return i.a.createElement("div",{className:"h5p-hub-text-field"},i.a.createElement("div",{className:"h5p-hub-title"},t),i.a.createElement("div",{className:"h5p-hub-description"},n),i.a.createElement("div",{className:"h5p-hub-main-text"},r))});T.propTypes={text:p.a.string,description:p.a.string,mainText:p.a.string};function S(){return(S=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function P(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var N=!1,O=i.a.createContext(null),R=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}_(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.a.findDOMNode(this),r],a=i[0],l=i[1],u=this.getTimeouts(),s=r?u.appear:u.enter;!e&&!n||N?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,l),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.a.findDOMNode(this);t&&!N?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],l=i[1];this.props.addEndListener(a,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,C(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(O.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function z(){}R.contextType=O,R.propTypes={},R.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z},R.UNMOUNTED="unmounted",R.EXITED="exited",R.ENTERING="entering",R.ENTERED="entered",R.EXITING="exiting";var I=R,D=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=P(n.className,r):n.setAttribute("class",P(n.className&&n.className.baseVal||"",r)));var n,r}))},L=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i0&&" (".concat(d,")"))))}));U.displayName="Checkbox",U.propTypes={id:p.a.string.isRequired,label:p.a.string.isRequired,onChecked:p.a.func.isRequired,checked:p.a.bool.isRequired,filter:p.a.string.isRequired,focused:p.a.bool,children:p.a.any,checkboxChildren:p.a.array,navigateToChildren:p.a.func,parent:p.a.string,tabIndex:p.a.string,descendantsChecked:p.a.any};var V=U,B=(n(58),function(e){var t=e.severity,n=e.children;return i.a.createElement("div",{className:"h5p-hub-message h5p-hub-".concat(t)},n)});B.propTypes={severity:p.a.string.isRequired,children:p.a.node};var q=B;function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t=x},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0P(o,n))void 0!==u&&0>P(u,o)?(e[r]=u,e[l]=n,r=l):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==u&&0>P(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function P(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var N=[],O=[],R=1,z=null,I=3,D=!1,L=!1,M=!1;function A(e){for(var t=C(O);null!==t;){if(null===t.callback)_(O);else{if(!(t.startTime<=e))break;_(O),t.sortIndex=t.expirationTime,S(N,t)}t=C(O)}}function j(e){if(M=!1,A(e),!L)if(null!==C(N))L=!0,r(F);else{var t=C(O);null!==t&&i(j,t.startTime-e)}}function F(e,n){L=!1,M&&(M=!1,a()),D=!0;var r=I;try{for(A(n),z=C(N);null!==z&&(!(z.expirationTime>n)||e&&!o());){var l=z.callback;if(null!==l){z.callback=null,I=z.priorityLevel;var u=l(z.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?z.callback=u:z===C(N)&&_(N),A(n)}else _(N);z=C(N)}if(null!==z)var s=!0;else{var c=C(O);null!==c&&i(j,c.startTime-n),s=!1}return s}finally{z=null,I=r,D=!1}}function U(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var V=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||D||(L=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return C(N)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,o){var l=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0l?(e.sortIndex=u,S(O,e),null===C(N)&&e===C(O)&&(M?a():M=!0,i(j,u-l))):(e.sortIndex=o,S(N,e),L||D||(L=!0,r(F))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();A(e);var n=C(N);return n!==z&&null!==z&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTimee.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(i)&&l.push("path="+i),r.isString(a)&&l.push("domain="+a),!0===o&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(16);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(3),o=n.n(a),l=i.a.createContext(),u=n(5),s=n.n(u),c=n(4),f=n.n(c),d=n(1),p=n.n(d),h=(n(31),function(e){var t=e.children,n=e.name,r=e.onClick,a=e.variant,o=e.color,l=e.enabled,u=e.id,s=[];return n&&s.push("h5p-hub-"+n),a&&s.push("h5p-hub-"+a),o&&s.push("h5p-hub-"+o),i.a.createElement("button",{id:u,type:"button",className:s.join(" "),onClick:r,disabled:!1===l},t)});h.propTypes={children:p.a.oneOfType([p.a.string,p.a.object]),name:p.a.string,onClick:p.a.func.isRequired,variant:p.a.string,color:p.a.string,enabled:p.a.bool,id:p.a.string};var m=h,v=(n(32),function(e){var t=e.label,n=e.description,r=e.mandatory,a=e.children,o=e.link,l=e.className;return i.a.createElement("div",{className:"h5p-hub-form-element ".concat(r?"h5p-hub-mandatory":""," ").concat(l||"")},i.a.createElement("label",{htmlFor:a.props.id},t),i.a.createElement("div",{className:"h5p-hub-details-row"},n&&i.a.createElement("div",{className:"h5p-hub-description"},n),o&&i.a.createElement("button",{className:"h5p-hub-link-button",onClick:o.onClick},o.linkText)),a)});v.propTypes={label:p.a.string.isRequired,description:p.a.string,mandatory:p.a.bool,children:p.a.shape(),link:p.a.shape({onClick:p.a.func.isRequired,linkText:p.a.string.isRequired}),className:p.a.string};var g=v,y=n(6),b=n.n(y);p.a.shape({title:p.a.string.isRequired,license:p.a.string.isRequired,licenseVersion:p.a.string.isRequired,disciplines:p.a.array.isRequired,language:p.a.string.isRequired,level:p.a.string}),p.a.shape({keywords:p.a.array,shortDescription:p.a.string,longDescription:p.a.string,icon:p.a.object,screenshots:p.a.array}),n(49),n(50),n(51),n(52);var w=function(e){var t=e.src,n=Object(r.useMemo)((function(){var e=new Image;return e.src=t,e}),[t]),a={backgroundImage:"url('".concat(n.src,"')")};return i.a.createElement("span",{className:"h5p-hub-image-preview",style:a})};w.propTypes={src:p.a.string};var E=w,x=(n(53),function(e){var t=e.onFile,n=e.clearImage,r=e.img,a=e.ariaLabel,o=e.removeImageLabel,l=i.a.createRef(),u=function(){t({}),l.current.value=null,n&&n()};return i.a.createElement("div",{className:"h5p-hub-image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?l.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&u()},"aria-label":a},r&&r.src&&i.a.createElement(i.a.Fragment,null,i.a.createElement(E,{src:r.src}),i.a.createElement("button",{className:"h5p-hub-icon-close","aria-label":o,onKeyDown:function(e){-1!==["Enter","Space"].indexOf(e.key)&&(e.stopPropagation(),u())},onClick:u,tabIndex:"0"})),i.a.createElement("div",{className:"h5p-hub-image-upload ".concat(r&&r.src?"h5p-hub-image-selected":"")},i.a.createElement("input",{tabIndex:"-1",ref:l,type:"file",accept:".png,.jpg,.jpeg,.jfif,.pjpeg,.pjp",onChange:function(e){if(0!==e.target.files.length){var n=e.target.files[0];t({src:URL.createObjectURL(n),file:n})}}})))});x.propTypes={onFile:p.a.func.isRequired,clearImage:p.a.func,img:p.a.object,ariaLabel:p.a.string.isRequired,removeImageLabel:p.a.string.isRequired};var k=x,T=(n(54),function(e){var t=e.title,n=e.description,r=e.mainText;return i.a.createElement("div",{className:"h5p-hub-text-field"},i.a.createElement("div",{className:"h5p-hub-title"},t),i.a.createElement("div",{className:"h5p-hub-description"},n),i.a.createElement("div",{className:"h5p-hub-main-text"},r))});T.propTypes={text:p.a.string,description:p.a.string,mainText:p.a.string};function S(){return(S=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function _(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function P(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var N=!1,O=i.a.createContext(null),R=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}_(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.a.findDOMNode(this),r],a=i[0],l=i[1],u=this.getTimeouts(),s=r?u.appear:u.enter;!e&&!n||N?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,l),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.a.findDOMNode(this);t&&!N?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],l=i[1];this.props.addEndListener(a,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,C(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.a.createElement(O.Provider,{value:null},"function"==typeof n?n(e,r):i.a.cloneElement(i.a.Children.only(n),r))},t}(i.a.Component);function z(){}R.contextType=O,R.propTypes={},R.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:z,onEntering:z,onEntered:z,onExit:z,onExiting:z,onExited:z},R.UNMOUNTED="unmounted",R.EXITED="exited",R.ENTERING="entering",R.ENTERED="entered",R.EXITING="exiting";var I=R,D=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=P(n.className,r):n.setAttribute("class",P(n.className&&n.className.baseVal||"",r)));var n,r}))},L=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i0&&" (".concat(d,")"))))}));U.displayName="Checkbox",U.propTypes={id:p.a.string.isRequired,label:p.a.string.isRequired,onChecked:p.a.func.isRequired,checked:p.a.bool.isRequired,filter:p.a.string.isRequired,focused:p.a.bool,children:p.a.any,checkboxChildren:p.a.array,navigateToChildren:p.a.func,parent:p.a.string,tabIndex:p.a.string,descendantsChecked:p.a.any};var V=U,B=(n(58),function(e){var t=e.severity,n=e.children;return i.a.createElement("div",{className:"h5p-hub-message h5p-hub-".concat(t)},n)});B.propTypes={severity:p.a.string.isRequired,children:p.a.node};var q=B;function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t0,L=function(e,t){I((function(n){return W(W({},n),{},s()({},t,e))}))},M=""!==z.publisher&&""!==z.emailAddress&&h;return i.a.createElement("div",{className:"h5p-hub-registration"},"failed"===E&&i.a.createElement(q,{severity:"error"},i.a.createElement("div",{className:"h5p-hub-message-header",tabIndex:"-1",ref:T},c.registrationFailed),i.a.createElement("div",{className:"h5p-hub-message-description"},_||c.registrationFailedDescription)),"finished"===E?i.a.createElement(q,{severity:"success"},i.a.createElement("div",{className:"h5p-hub-message-header",tabIndex:"-1",ref:N},D?c.successfullyUpdated:c.successfullyRegistred),i.a.createElement("div",{className:"h5p-hub-message-description"},c.successfullyRegistredDescription,i.a.createElement("a",{href:a},c.accountDetailsLinkText))):i.a.createElement("div",{className:"h5p-hub-registration-wrapper"},i.a.createElement("div",{className:"h5p-hub-step-panel"},i.a.createElement("div",{className:"h5p-hub-step-title",role:"heading"},c.registrationTitle),i.a.createElement("div",{className:"h5p-hub-step-content"},i.a.createElement("div",{className:"h5p-hub-row"},i.a.createElement(g,{label:c.publisherFieldTitle,mandatory:!0,description:c.publisherFieldDescription},i.a.createElement("input",{id:"h5p-hub-publisher",onChange:function(e){return L(e.target.value,"publisher")},value:z.publisher})),i.a.createElement(g,{label:c.emailAddress,mandatory:!0,className:"h5p-hub-email-address"},i.a.createElement("input",{id:"h5p-hub-email-address",onChange:function(e){return L(e.target.value,"emailAddress")},value:z.emailAddress}))),i.a.createElement(g,{label:c.publisherDescription,description:c.publisherDescriptionText,mandatory:!1},i.a.createElement("textarea",{value:z.publisherDescription,id:"h5p-hub-publisher-description",placeholder:"",onChange:function(e){return L(e.target.value,"publisherDescription")},className:"h5p-hub-publisher-description"})),i.a.createElement("div",{className:"h5p-hub-row"},i.a.createElement(g,{label:c.contactPerson,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-contact-person",onChange:function(e){return L(e.target.value,"contactPerson")},value:z.contactPerson})),i.a.createElement(g,{label:c.phone,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-phone",onChange:function(e){return L(e.target.value,"phone")},value:z.phone}))),i.a.createElement(g,{label:c.address,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-address",onChange:function(e){return L(e.target.value,"address")},value:z.address})),i.a.createElement("div",{className:"h5p-hub-row"},i.a.createElement(g,{label:c.city,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-city",onChange:function(e){return L(e.target.value,"city")},value:z.city})),i.a.createElement(g,{label:c.zip,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-zip",onChange:function(e){return L(e.target.value,"zip")},value:z.zip})),i.a.createElement(g,{label:c.country,mandatory:!1},i.a.createElement("input",{id:"h5p-hub-country",onChange:function(e){return L(e.target.value,"country")},value:z.country}))),i.a.createElement("div",{className:"h5p-hub-logo-upload-text"},c.logoUploadText),i.a.createElement(k,{img:z.logo,onFile:function(e){L(!1,"removeLogo"),L(e,"logo")},clearImage:L.bind(void 0,!0,"removeLogo"),ariaLabel:c.logoUploadText,removeImageLabel:c.removeImage}),i.a.createElement(V,{label:c.acceptTerms,id:"h5p-hub-accept-terms",checked:h,filter:"",onChecked:function(e,t,n){return v(n)}},c.acceptTerms,i.a.createElement("span",null," "),i.a.createElement("a",{onClick:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()},target:"_blank",href:t},c.licenseLinkText)))),i.a.createElement("div",{className:"h5p-hub-footer"},i.a.createElement(m,{onClick:function(){window.history.back()}},c.cancel),i.a.createElement(m,{variant:"register-hub",onClick:function(){x("in-process"),function(e,t,n,r,i){var a=new FormData;a.append("_token",t),a.append("name",n.publisher),a.append("email",n.emailAddress),a.append("description",n.publisherDescription),a.append("contact_person",n.contactPerson),a.append("phone",n.phone),a.append("address",n.address),a.append("city",n.city),a.append("zip",n.zip),a.append("country",n.country),a.append("remove_logo",n.removeLogo?"1":"0"),n.logo.file&&a.append("logo",n.logo.file),b.a.post(e,a,{headers:{"Content-Type":"multipart/form-data"},timeout:1e4}).then(r).catch(i)}(n,o,z,(function(e){if(e.data&&e.data.success)x("finished"),P(null),N.current&&N.current.focus();else{var t=e.data&&e.data.message||null;P(t),x("failed"),T.current&&T.current.focus()}}),(function(e){x("failed");var t=e.response&&e.response.data&&e.response.data.message||null;P(t),T.current&&T.current.focus()}))},enabled:M&&"in-process"!==E},D?c.updateRegistrationOnHub:c.registerOnHub))))};$.propTypes={postUrl:p.a.string.isRequired,accountSettingsUrl:p.a.string.isRequired,accountInfo:p.a.object,licenseLink:p.a.string.isRequired};var Q=$;n(18).polyfill(),window.H5PHub=window.H5PHub||{},window.H5PHub.createRegistrationUI=function(e){var t=e.container,n=e.l10n,r=e.licenseLink,a=e.registrationURL,u=e.accountSettingsUrl,s=e.token,c=e.accountInfo;o.a.render(i.a.createElement(l.Provider,{value:n},i.a.createElement(Q,{licenseLink:r,postUrl:a,accountSettingsUrl:u,token:s,accountInfo:c||{}})),t)}}]); \ No newline at end of file diff --git a/js/h5p-hub-sharing.js b/js/h5p-hub-sharing.js index 8cc9827..69866cd 100644 --- a/js/h5p-hub-sharing.js +++ b/js/h5p-hub-sharing.js @@ -51,4 +51,4 @@ var r=/input|select|textarea|button|object/;function o(e){var t=e.offsetWidth<=0 Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. -*/!function(){"use strict";var o=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:o,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var r={},o={};t.add=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),n.add(e)}));var n,a},t.remove=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&n.remove(e)}));var n,a}},function(e,t,n){"use strict";var r,o=n(27),a=(r=o)&&r.__esModule?r:{default:r};var i=void 0,l=void 0,u=[];function s(){0!==u.length&&u[u.length-1].focusContent()}a.default.subscribe((function(e,t){i&&l||((i=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),i.style.position="absolute",i.style.opacity="0",i.setAttribute("tabindex","0"),i.addEventListener("focus",s),(l=i.cloneNode()).addEventListener("focus",s)),(u=t).length>0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==l){var u=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){},function(e,t,n){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(7),i=n.n(a),l=o.a.createContext(),u=o.a.createContext(),s=n(2),c=n.n(s),f=n(3),d=n.n(f),p=n(1),h=n.n(p),m=(n(43),function(e){var t=e.children,n=e.name,r=e.onClick,a=e.variant,i=e.color,l=e.enabled,u=e.id,s=[];return n&&s.push("h5p-hub-"+n),a&&s.push("h5p-hub-"+a),i&&s.push("h5p-hub-"+i),o.a.createElement("button",{id:u,type:"button",className:s.join(" "),onClick:r,disabled:!1===l},t)});m.propTypes={children:h.a.oneOfType([h.a.string,h.a.object]),name:h.a.string,onClick:h.a.func.isRequired,variant:h.a.string,color:h.a.string,enabled:h.a.bool,id:h.a.string};var v=m;n(44);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;tn&&(a.completed=!0),[n>0?o.a.createElement(b,{key:"connector-".concat(n)}):null,o.a.cloneElement(e,g(g({key:"step-".concat(n)},a),e.props))]}));return o.a.createElement("div",{className:"h5p-hub-stepper","aria-hidden":!0},a)};w.propTypes={activeStep:h.a.number.isRequired,children:h.a.array.isRequired,completed:h.a.bool};var E=w,k=(n(45),function(e){var t=e.active,n=e.label,r=e.index,a=e.completed,i=["h5p-hub-step"];return t&&i.push("h5p-hub-active"),a&&i.push("h5p-hub-completed"),o.a.createElement("div",{className:i.join(" ")},o.a.createElement("div",{className:"h5p-hub-step-icon"},a?o.a.createElement("i",{className:"h5p-hub-icon-check"}):r+1),o.a.createElement("div",{className:"h5p-hub-step-label"},n))});k.propTypes={active:h.a.bool,label:h.a.string.isRequired,index:h.a.number.isRequired,completed:h.a.bool};var x=k,C=n(6),S=n.n(C),T=(n(49),function(e){var t=e.label,n=e.description,r=e.mandatory,a=e.children,i=e.link,l=e.className;return o.a.createElement("div",{className:"h5p-hub-form-element ".concat(r?"h5p-hub-mandatory":""," ").concat(l||"")},o.a.createElement("label",{htmlFor:a.props.id},t),o.a.createElement("div",{className:"h5p-hub-details-row"},n&&o.a.createElement("div",{className:"h5p-hub-description"},n),i&&o.a.createElement("button",{className:"h5p-hub-link-button",onClick:i.onClick},i.linkText)),a)});T.propTypes={label:h.a.string.isRequired,description:h.a.string,mandatory:h.a.bool,children:h.a.shape(),link:h.a.shape({onClick:h.a.func.isRequired,linkText:h.a.string.isRequired}),className:h.a.string};var O=T,_=(n(50),function(e){var t=e.selected,n=e.options,r=e.onChange,a=e.allowNone;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"h5p-hub-icon-arrow-down"}),o.a.createElement("select",{value:t,onChange:r,disabled:0===n.length},function(e,t){var n=o.a.createElement("option",{value:"",key:"-"},"-");if(e.length>0){var r=t?[n]:[];return r=r.concat(e.map((function(e,t){return e.licenses?o.a.createElement("optgroup",{key:"optgroup-"+t,label:e.translation},e.licenses.map((function(e){return o.a.createElement("option",{value:e.id,key:e.id},e.name)}))):o.a.createElement("option",{value:e.id,key:e.id},e.name)})))}return n}(n,a)))});_.prototypes={selected:h.a.string,options:h.a.array,onchange:h.a.func.isRequired,allowNone:h.a.bool},_.defaultProps={allowNone:!1};var N=_,P=n(11),R=n.n(P);function D(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&a.current[0!==r?r-1:1]&&a.current[0!==r?r-1:1].focus(),n(t.filter((function(t){return t.id!==e.id})).map((function(e){return e.id})))};return t.length>0?o.a.createElement("ul",{className:"h5p-hub-chips-list"},t.map((function(e,t){return o.a.createElement("li",{key:e.id},o.a.createElement("span",{className:"h5p-hub-sr-only"},e.name),o.a.createElement("button",{ref:function(e){return a.current[t]=e},"aria-label":I(r.removeChip,{":chip":e.name}),onClick:function(){return u(e)},onKeyDown:function(e){return i(e)},id:"h5p-hub-"+e.id},e.name,o.a.createElement("div",{className:"h5p-hub-icon-close"})))}))):null});q.propTypes={chips:h.a.array.isRequired,setChips:h.a.func.isRequired};var B=q,V=n(8),W=n.n(V),H=n(9),$=n.n(H),Q=n(4),K=n.n(Q),Y=n(29),X=n.n(Y),G=n(30),J=n.n(G),Z=n(12),ee=n.n(Z);function te(){return(te=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function re(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function oe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var ae=!1,ie=o.a.createContext(null),le=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}re(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[i.a.findDOMNode(this),r],a=o[0],l=o[1],u=this.getTimeouts(),s=r?u.appear:u.enter;!e&&!n||ae?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,l),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i.a.findDOMNode(this);t&&!ae?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],l=o[1];this.props.addEndListener(a,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,ne(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.a.createElement(ie.Provider,{value:null},"function"==typeof n?n(e,r):o.a.cloneElement(o.a.Children.only(n),r))},t}(o.a.Component);function ue(){}le.contextType=ie,le.propTypes={},le.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ue,onEntering:ue,onEntered:ue,onExit:ue,onExiting:ue,onExited:ue},le.UNMOUNTED="unmounted",le.EXITED="exited",le.ENTERING="entering",le.ENTERED="entered",le.EXITING="exiting";var se=le,ce=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=oe(n.className,r):n.setAttribute("class",oe(n.className&&n.className.baseVal||"",r)));var n,r}))},fe=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o1&&function(e,t){for(var n=[],r=t.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:0;i.push(o.a.createElement("span",{key:"checkbox-span-"+a,className:"h5p-hub-non-bold"},e.slice(t,t+r))),n[a+1]?i.push(o.a.createElement("span",{key:"checkbox-span-bold-"+a,className:"h5p-hub-bold"},e.slice(t+r,n[a+1]))):i.push(o.a.createElement("span",{key:"checkbox-span-bold-"+a,className:"h5p-hub-bold"},e.slice(t+r))),a+=1})),i.map((function(e){return e}))}(e.name,p)))}))};return o.a.createElement("ul",{className:"h5p-hub-checkbox-list",role:"group","aria-labelledby":i.name,ref:t&&t[s]},d.map((function(e){return o.a.createElement("div",{key:"headers-"+e.id,className:e.noLine?"":"h5p-hub-bottom-line"},o.a.createElement("div",null,null!==e.catNoParent?y([e.catNoParent]):null),e.children&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{key:e,ref:t[h+e.id],className:"h5p-hub-category-header"},m.in," ",e.name),y(e.children)))})))})));xe.displayName="CategoryList",xe.propTypes={onChecked:h.a.func.isRequired,checked:h.a.array,filter:h.a.string.isRequired,focused:h.a.string,parent:h.a.string,listRefId:h.a.string.isRequired,tabIndex:h.a.string,categoryRefId:h.a.string.isRequired,checkedParents:h.a.array,getDescendants:h.a.func.isRequired,categoryList:h.a.array.isRequired,searchValue:h.a.string.isRequired,dictionary:h.a.object.isRequired,errors:h.a.object};var Ce=xe,Se=(n(85),o.a.forwardRef((function(e,t){var n=e.value,r=e.onSearch,a=e.onNavigateVertical,i=e.onSelect,l=e.placeholder,u=e.onClick,s=e.onNavigateSideway,c=e.onFocus,f=e.inSearch,d=e.dictionary,p=e.handleClearSearch,h=e.closeDropdown;return o.a.createElement("div",{onMouseDown:u,className:"h5p-hub-search-button",role:"button","aria-label":d.dropdownButton},o.a.createElement("div",{className:"h5p-hub-search-field",role:"search"},o.a.createElement("input",{id:"h5p-hub-filter-search-bar",type:"text",value:n,"aria-label":l,placeholder:l,ref:t,onKeyDown:function(e){return function(e){switch(e.key){case"ArrowUp":a(-1),e.preventDefault();break;case"ArrowDown":a(1),e.preventDefault();break;case"ArrowRight":f||(s(1),e.preventDefault());break;case"ArrowLeft":f||(s(-1),e.preventDefault());break;case"Enter":i(),e.preventDefault();break;case"Escape":h(),e.preventDefault()}}(e)},onChange:function(e){var t=e.target;r(t.value)},onFocus:c,autoComplete:"off"}),o.a.createElement("div",{className:"h5p-hub-icon-arrow"})),n.length>0&&o.a.createElement("button",{onClick:p,className:"h5p-hub-clear-button"}))})));Se.displayName="SearchField",Se.propTypes={value:h.a.string,onSearch:h.a.func.isRequired,onNavigateVertical:h.a.func.isRequired,onNavigateSideway:h.a.func.isRequired,onSelect:h.a.func.isRequired,placeholder:h.a.string.isRequired,onClick:h.a.func.isRequired,onFocus:h.a.func,inSearch:h.a.bool,handleClearSearch:h.a.func.isRequired},Se.defaultProps={onNavigateVertical:function(){},onNavigateSideway:function(){},onSelect:function(){}};var Te=Se;n(86);function Oe(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _e(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?n.push({id:o.id,name:o.name,children:i,catNoParent:a?o:null}):a&&n.push({id:o.id,name:o.name,catNoParent:o})}for(var l=0;l0){l=t.checkboxRefs[t.categoryRefId+t.state.categoryList[0].id].current.offsetHeight;var s,c=0,f=Oe(t.state.categoryList);try{for(f.s();!(s=f.n()).done;){var d=s.value;if(d.catNoParent&&(c+=1),c>n)break;d.children&&(c+=d.children.length),u+=1}}catch(e){f.e(e)}finally{f.f()}}var p=i+(n+1)*o+u*l-a;t.checkboxRefs[t.listRefId].current.scrollTop=p}})),c()(K()(t),"handleNavigateSideway",(function(e){t.state.dropdownOpen&&-1==e&&t.state.parent?t.navigateToParent():t.state.dropdownOpen&&1==e&&t.state.focused&&t.getCheckboxFromId(t.state.focused,t.parents)&&t.navigateToChildren(t.state.focused,t.getCheckboxFromId(t.state.focused,t.parents).children)})),c()(K()(t),"navigateToChildren",(function(e,n){t.setState({checkboxElements:n,parent:[].concat(S()(t.state.parent),[e])}),t.searchRef.current.focus()})),c()(K()(t),"navigateToParent",(function(){var e=t.state.parent[t.state.parent.length-2],n=t.getCheckboxFromId(e,t.parents)&&t.getCheckboxFromId(e,t.parents).children,r=t.state.parent,o=r.pop();t.setState({parent:r,checkboxElements:n||t.props.items.sort(t.compare),focused:o}),t.searchRef.current.focus()})),c()(K()(t),"compare",(function(e,t){var n=e.name.toUpperCase(),r=t.name.toUpperCase();return nr?1:void 0})),c()(K()(t),"getDescendants",(function(e){if(null===e)return[];for(var t=[],n=[e];n.length>0;){var r=n.pop();r&&r.children&&(t.concat(r.children),r.children.forEach((function(e){t.push(e),n.push(e)})))}return t})),c()(K()(t),"setParentsAndLeafs",(function(e){for(var n=0;n0:-1!=this.props.checked.indexOf(e)||-1!==this.state.checkedParents.indexOf(e)}},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"h5p-hub-search-filter",ref:this.selfRef},o.a.createElement(Te,{ref:this.searchRef,value:this.state.searchValue,onSearch:this.handleOnSearch,placeholder:this.props.dictionary.searchPlaceholder,onClick:this.handleSearchClick,onNavigateVertical:this.handleNavigateVertical,onSelect:function(){return e.handleChecked(e.props.filter,e.state.focused,!e.checkedOf(e.state.focused),e.state.parent[e.state.parent.length-1])},onNavigateSideway:this.handleNavigateSideway,onFocus:this.handleSearchFocus,inSearch:this.state.inSearch,dictionary:this.props.dictionary,closeDropdown:this.closeDropdown,handleClearSearch:this.handleClearSearch}),this.state.parent.length>0&&this.state.dropdownOpen&&o.a.createElement("div",{className:"h5p-hub-navigate-parent"},o.a.createElement("button",{onClick:this.navigateToParent}),this.getCheckboxFromId(this.state.parent[this.state.parent.length-1],this.parents).name),this.state.dropdownOpen&&this.props.items&&(!this.props.category||this.state.searchValue.length<2)&&o.a.createElement(ke,{onChecked:this.handleChecked,items:this.state.checkboxElements,errors:this.props.errors,checked:this.props.checked,checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,navigateToChildren:this.navigateToChildren,parent:this.state.parent[this.state.parent.length-1],ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",inSearch:this.state.inSearch}),this.state.dropdownOpen&&this.props.items&&this.props.category&&(this.state.categoryList.length>0||this.state.categoryList.topCategories)&&this.state.inSearch&&o.a.createElement(Ce,{onChecked:this.handleChecked,checked:this.props.checked,checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",categoryList:this.state.categoryList,searchValue:this.state.searchValue,categoryRefId:this.categoryRefId,dictionary:this.props.dictionary,errors:this.props.errors}))}}]),r}(o.a.Component);De.propTypes={items:h.a.array,errors:h.a.object,handleChecked:h.a.func.isRequired,checked:h.a.array,filter:h.a.string.isRequired,dictionary:h.a.object.isRequired,category:h.a.bool,dropdownAlwaysOpen:h.a.bool,setFocus:h.a.bool};var je=De,Ie=function(e){var t=e.disciplines,n=e.errors,a=e.setDisciplines,i=Object(r.useContext)(u),s=Object(r.useContext)(l),c=o.a.useState(!1),f=d()(c,2),p=f[0],h=f[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement(B,{chips:t.map((function(e){return{id:e,name:i.getDiscipline(e).name}})),setChips:function(e){a(e),0===e.length&&h((function(e){return!e}))}}),o.a.createElement(je,{items:i.disciplines,errors:n,handleChecked:function(e,n,r){Array.isArray(n)&&null!==n&&r?a(t.filter((function(e){return-1===n.indexOf(e)})).concat(n)):null!=n&&r&&a([].concat(S()(t),[n]))},checked:t,filter:"discipline",dictionary:s.discipline,category:!0,dropdownAlwaysOpen:!1,setFocus:p}))};Ie.propTypes={disciplines:h.a.array.isRequired,errors:h.a.object,setDisciplines:h.a.func.isRequired};var Le=Ie,Me=(n(87),function(e){var t=e.severity,n=e.children;return o.a.createElement("div",{className:"h5p-hub-message h5p-hub-".concat(t)},n)});Me.propTypes={severity:h.a.string.isRequired,children:h.a.node};var Ae=Me,Fe=(n(88),function(e){var t=e.children,n=o.a.useState(""),r=d()(n,2),a=r[0],i=r[1];return t.map((function(e){return o.a.createElement("div",{key:e.props.id},o.a.createElement("dt",{className:"h5p-hub-accordion-heading"},o.a.createElement("span",{className:"h5p-hub-icon-dropdown"+(a===e.props.id?" h5p-hub-open":"")}),o.a.createElement("button",{className:"h5p-hub-accordion-button",onClick:function(){return t=e.props.id,void i(t===a?"":t);var t},"aria-expanded":a===e.props.id},o.a.createElement("span",{className:"h5p-hub-accordion-header"},e.props.header))),a==e.props.id&&o.a.createElement("dl",null,o.a.createElement("div",{className:"h5p-hub-panel-body"},e)))}))});Fe.propTypes={children:h.a.arrayOf(h.a.shape({props:h.a.shape({header:h.a.string.isRequired,id:h.a.string.isRequired}).isRequired}).isRequired).isRequired};var Ue=Fe,ze=(n(89),function(e){return e.versions.length?e.versions.map((function(t){return{id:"".concat(e.id,"-").concat(t.id),name:"".concat(e.name," ").concat(t.name),url:t.url}})):[e]}),qe=function(e,t){if(t.licenses){var n=t.licenses.reduce((function(e,t){var n=ze(t);return e.concat(n)}),[]);return e.concat(n)}var r=ze(t);return e.concat(r)},Be=o.a.forwardRef((function(e,t){var n=e.closeModal,r=o.a.useContext(u),a=o.a.useContext(l);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"h5p-hub-dialog-header"},o.a.createElement("div",{className:"h5p-hub-dialog-title"},o.a.createElement("span",null,a.contentLicenseTitle),o.a.createElement("button",{onClick:n,ref:t},a.close)),o.a.createElement("div",{className:"h5p-hub-dialog-description"},a.licenseDialogDescription)),o.a.createElement("div",{className:"h5p-hub-dialog-content"},o.a.createElement(Ue,null,r.licenses.reduce(qe,[]).map((function(e){return o.a.createElement("div",{key:e.id,id:"h5p-hub-"+e.id,header:e.name},o.a.createElement("a",{href:e.url,target:"_blank"},e.url))})))))}));Be.displayName="ModalContent",Be.propTypes={closeModal:h.a.func.isRequired};var Ve=Be;function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t0&&t.disciplines.length<=10})),f((function(){return e}))}),[t,a,v]);var L=function(e){w(e)};return o.a.createElement(o.a.Fragment,null,o.a.createElement(z,{isOpen:b,closeModal:function(){return L(!1)},onAfterOpen:function(){E.current&&E.current.focus()}},o.a.createElement(Ve,{closeModal:function(){return L(!1)},ref:E})),o.a.createElement(O,{label:p.title,mandatory:!0},o.a.createElement("input",{id:"h5p-hub-title",onChange:function(e){return j(e.target.value,"title")},value:t.title,maxLength:255,onFocus:function(){return T(!0)},onBlur:function(){return T(!1)}})),o.a.createElement(ve,{text:I(p.maxLength,{":length":255}),open:255===t.title.length&&C,className:"h5p-hub-tip-text-field"}),o.a.createElement("div",{className:"h5p-hub-row"},o.a.createElement(O,{label:p.license,description:p.licenseDescription,mandatory:!0,link:{linkText:p.licenseDetails,onClick:function(){return L(!0)}}},o.a.createElement(N,{options:h.licenses,selected:t.license||"U",allowNone:!1,onChange:function(e){return j(e.target.value,"license")}})),o.a.createElement(O,{label:p.licenseVersion,description:p.licenseVersionDescription,mandatory:!0},o.a.createElement(N,{options:v,selected:t.licenseVersion,allowNone:!0,onChange:function(e){return j(e.target.value,"licenseVersion")}}))),o.a.createElement("div",{className:"h5p-hub-row"},o.a.createElement(O,{label:p.language,mandatory:!0},o.a.createElement(N,{options:h.languages,onChange:function(e){return j(e.target.value,"language")},selected:t.language,allowNone:!0})),o.a.createElement(O,{label:p.level,mandatory:!0},o.a.createElement(N,{options:h.levels,onChange:function(e){return j(e.target.value,"level")},selected:t.level,allowNone:!0}))),o.a.createElement(O,{label:p.disciplineLabel,description:p.disciplineDescription,mandatory:!0},o.a.createElement(Le,{disciplines:t.disciplines,errors:R.disciplines,setDisciplines:function(e){if(e.length<=10)j(e,"disciplines"),D((function(e){return delete e.disciplines,e}));else{var t=S()(e).pop();D((function(e){return He(He({},e),{},{disciplines:c()({},t,I(p.disciplineLimitReachedMessage,{":numDisciplines":10}))})}))}}})))};$e.propTypes={mandatoryInfo:L,setMandatoryInfo:h.a.func.isRequired,setIsValid:h.a.func.isRequired};var Qe=$e,Ke=(n(90),function(e){var t=e.chips,n=e.setKeywords,r=o.a.useRef(null),a=o.a.useContext(l),i=o.a.useState(!1),u=d()(i,2),s=u[0],c=u[1],f=o.a.useState(!1),p=d()(f,2),h=p[0],m=p[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement(B,{chips:t.map((function(e){return{id:e,name:e}})),setChips:function(e){n(e),0===e.length&&r.current.focus()}}),o.a.createElement("input",{placeholder:a.keywordsPlaceholder,onKeyDown:function(e){return function(e){if("Enter"===e.key){e.preventDefault();var o=e.target.value.trim();t.filter((function(e){return e.toLowerCase()===o.toLowerCase()})).length>0?c(!0):-1===t.indexOf(o)&&""!==o&&(n([].concat(S()(t),[o])),r.current.value="")}else c(!1)}(e)},ref:r,onFocus:function(){return m(!0)},onBlur:function(){return m(!1)}}),o.a.createElement(ve,{text:a.keywordExists,open:s&&h,className:"h5p-hub-tip-keywords"}))});Ke.propTypes={chips:h.a.array.isRequired,setKeywords:h.a.func.isRequired};var Ye=Ke,Xe=(n(91),function(e){var t=e.src,n=Object(r.useMemo)((function(){var e=new Image;return e.src=t,e}),[t]),a={backgroundImage:"url('".concat(n.src,"')")};return o.a.createElement("span",{className:"h5p-hub-image-preview",style:a})});Xe.propTypes={src:h.a.string};var Ge=Xe,Je=(n(92),function(e){var t=e.onFile,n=e.clearImage,r=e.img,a=e.ariaLabel,i=e.removeImageLabel,l=o.a.createRef(),u=function(){t({}),l.current.value=null,n&&n()};return o.a.createElement("div",{className:"h5p-hub-image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?l.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&u()},"aria-label":a},r&&r.src&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Ge,{src:r.src}),o.a.createElement("button",{className:"h5p-hub-icon-close","aria-label":i,onKeyDown:function(e){-1!==["Enter","Space"].indexOf(e.key)&&(e.stopPropagation(),u())},onClick:u,tabIndex:"0"})),o.a.createElement("div",{className:"h5p-hub-image-upload ".concat(r&&r.src?"h5p-hub-image-selected":"")},o.a.createElement("input",{tabIndex:"-1",ref:l,type:"file",accept:".png,.jpg,.jpeg,.jfif,.pjpeg,.pjp",onChange:function(e){if(0!==e.target.files.length){var n=e.target.files[0];t({src:URL.createObjectURL(n),file:n})}}})))});Je.propTypes={onFile:h.a.func.isRequired,clearImage:h.a.func,img:h.a.object,ariaLabel:h.a.string.isRequired,removeImageLabel:h.a.string.isRequired};var Ze=Je;n(93);function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t0;){var r=n.pop();r&&r.children&&(t.push(r),r.children.forEach((function(e){n.push(e)})))}return t}(m.disciplines));!function(e,t,n,r,o){var a=new FormData;a.append("_token",t),a.append("title",n.title),a.append("license",n.license),null!==n.licenseVersion&&a.append("license_version",n.licenseVersion),a.append("language",n.language),a.append("level",n.level),n.disciplines.forEach((function(e){a.append("disciplines[]",e)})),n.keywords.forEach((function(e){a.append("keywords[]",e)})),a.append("summary",n.shortDescription),a.append("description",n.longDescription),void 0!==n.icon.file&&a.append("icon",n.icon.file),n.remove_icon&&a.append("remove_icon",1),n.screenshots.forEach((function(e){e.file&&a.append("screenshots[]",e.file),a.append("screenshot_alt_texts[]",e.alt)})),n.remove_screenshots.forEach((function(e){a.append("remove_screenshots[]",e)})),R.a.post(e,a,{headers:{"Content-Type":"multipart/form-data"},timeout:1e4}).then(r).catch(o)}(i,f,dt(dt({},le),{},{disciplines:e},re),(function(e){var t=e.data;t.success?(T(!0),B(!1)):(A(t.message||null),P(!0),B(!1))}),(function(){A(null),P(!0),B(!1)}))}else w((function(e){return e+1}))},enabled:pe&&!q,id:q?"h5p-hub-share-in-process":""},q?o.a.createElement("span",null,se.pleaseWait):se[fe.nextButton.label])),o.a.createElement("div",{className:"h5p-hub-sharing-note"},o.a.createElement("i",{className:"h5p-hub-icon-info"}),se.sharingNote))))))}ht.propTypes={title:h.a.string.isRequired,publishURL:h.a.string.isRequired,contentType:h.a.string.isRequired,language:h.a.string.isRequired};var mt=ht;function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t0?(document.body.firstChild!==i&&document.body.insertBefore(i,document.body.firstChild),document.body.lastChild!==l&&document.body.appendChild(l)):(i.parentElement&&i.parentElement.removeChild(i),l.parentElement&&l.parentElement.removeChild(l))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==l){var u=e.displayName||e.name,s="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+s+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return i})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){},function(e,t,n){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(7),i=n.n(a),l=o.a.createContext(),u=o.a.createContext(),s=n(2),c=n.n(s),f=n(3),d=n.n(f),p=n(1),h=n.n(p),m=(n(43),function(e){var t=e.children,n=e.name,r=e.onClick,a=e.variant,i=e.color,l=e.enabled,u=e.id,s=[];return n&&s.push("h5p-hub-"+n),a&&s.push("h5p-hub-"+a),i&&s.push("h5p-hub-"+i),o.a.createElement("button",{id:u,type:"button",className:s.join(" "),onClick:r,disabled:!1===l},t)});m.propTypes={children:h.a.oneOfType([h.a.string,h.a.object]),name:h.a.string,onClick:h.a.func.isRequired,variant:h.a.string,color:h.a.string,enabled:h.a.bool,id:h.a.string};var v=m;n(44);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;tn&&(a.completed=!0),[n>0?o.a.createElement(b,{key:"connector-".concat(n)}):null,o.a.cloneElement(e,g(g({key:"step-".concat(n)},a),e.props))]}));return o.a.createElement("div",{className:"h5p-hub-stepper","aria-hidden":!0},a)};w.propTypes={activeStep:h.a.number.isRequired,children:h.a.array.isRequired,completed:h.a.bool};var E=w,k=(n(45),function(e){var t=e.active,n=e.label,r=e.index,a=e.completed,i=["h5p-hub-step"];return t&&i.push("h5p-hub-active"),a&&i.push("h5p-hub-completed"),o.a.createElement("div",{className:i.join(" ")},o.a.createElement("div",{className:"h5p-hub-step-icon"},a?o.a.createElement("i",{className:"h5p-hub-icon-check"}):r+1),o.a.createElement("div",{className:"h5p-hub-step-label"},n))});k.propTypes={active:h.a.bool,label:h.a.string.isRequired,index:h.a.number.isRequired,completed:h.a.bool};var x=k,C=n(6),S=n.n(C),T=(n(49),function(e){var t=e.label,n=e.description,r=e.mandatory,a=e.children,i=e.link,l=e.className;return o.a.createElement("div",{className:"h5p-hub-form-element ".concat(r?"h5p-hub-mandatory":""," ").concat(l||"")},o.a.createElement("label",{htmlFor:a.props.id},t),o.a.createElement("div",{className:"h5p-hub-details-row"},n&&o.a.createElement("div",{className:"h5p-hub-description"},n),i&&o.a.createElement("button",{className:"h5p-hub-link-button",onClick:i.onClick},i.linkText)),a)});T.propTypes={label:h.a.string.isRequired,description:h.a.string,mandatory:h.a.bool,children:h.a.shape(),link:h.a.shape({onClick:h.a.func.isRequired,linkText:h.a.string.isRequired}),className:h.a.string};var O=T,_=(n(50),function(e){var t=e.selected,n=e.options,r=e.onChange,a=e.allowNone;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"h5p-hub-icon-arrow-down"}),o.a.createElement("select",{value:t,onChange:r,disabled:0===n.length},function(e,t){var n=o.a.createElement("option",{value:"",key:"-"},"-");if(e.length>0){var r=t?[n]:[];return r=r.concat(e.map((function(e,t){return e.licenses?o.a.createElement("optgroup",{key:"optgroup-"+t,label:e.translation},e.licenses.map((function(e){return o.a.createElement("option",{value:e.id,key:e.id},e.name)}))):o.a.createElement("option",{value:e.id,key:e.id},e.name)})))}return n}(n,a)))});_.prototypes={selected:h.a.string,options:h.a.array,onchange:h.a.func.isRequired,allowNone:h.a.bool},_.defaultProps={allowNone:!1};var N=_,P=n(11),R=n.n(P);function D(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&a.current[0!==r?r-1:1]&&a.current[0!==r?r-1:1].focus(),n(t.filter((function(t){return t.id!==e.id})).map((function(e){return e.id})))};return t.length>0?o.a.createElement("ul",{className:"h5p-hub-chips-list"},t.map((function(e,t){return o.a.createElement("li",{key:e.id},o.a.createElement("span",{className:"h5p-hub-sr-only"},e.name),o.a.createElement("button",{ref:function(e){return a.current[t]=e},"aria-label":I(r.removeChip,{":chip":e.name}),onClick:function(){return u(e)},onKeyDown:function(e){return i(e)},id:"h5p-hub-"+e.id},e.name,o.a.createElement("div",{className:"h5p-hub-icon-close"})))}))):null});q.propTypes={chips:h.a.array.isRequired,setChips:h.a.func.isRequired};var B=q,V=n(8),W=n.n(V),H=n(9),$=n.n(H),Q=n(4),K=n.n(Q),Y=n(29),X=n.n(Y),G=n(30),J=n.n(G),Z=n(12),ee=n.n(Z);function te(){return(te=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function re(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function oe(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var ae=!1,ie=o.a.createContext(null),le=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o="exited",r.appearStatus="entering"):o="entered":o=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:o},r.nextCallback=null,r}re(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[i.a.findDOMNode(this),r],a=o[0],l=o[1],u=this.getTimeouts(),s=r?u.appear:u.enter;!e&&!n||ae?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,l),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,l)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i.a.findDOMNode(this);t&&!ae?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],l=o[1];this.props.addEndListener(a,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,ne(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.a.createElement(ie.Provider,{value:null},"function"==typeof n?n(e,r):o.a.cloneElement(o.a.Children.only(n),r))},t}(o.a.Component);function ue(){}le.contextType=ie,le.propTypes={},le.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ue,onEntering:ue,onEntered:ue,onExit:ue,onExiting:ue,onExited:ue},le.UNMOUNTED="unmounted",le.EXITED="exited",le.ENTERING="entering",le.ENTERED="entered",le.EXITING="exiting";var se=le,ce=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=oe(n.className,r):n.setAttribute("class",oe(n.className&&n.className.baseVal||"",r)));var n,r}))},fe=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o1&&function(e,t){for(var n=[],r=t.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:0;i.push(o.a.createElement("span",{key:"checkbox-span-"+a,className:"h5p-hub-non-bold"},e.slice(t,t+r))),n[a+1]?i.push(o.a.createElement("span",{key:"checkbox-span-bold-"+a,className:"h5p-hub-bold"},e.slice(t+r,n[a+1]))):i.push(o.a.createElement("span",{key:"checkbox-span-bold-"+a,className:"h5p-hub-bold"},e.slice(t+r))),a+=1})),i.map((function(e){return e}))}(e.name,p)))}))};return o.a.createElement("ul",{className:"h5p-hub-checkbox-list",role:"group","aria-labelledby":i.name,ref:t&&t[s]},d.map((function(e){return o.a.createElement("div",{key:"headers-"+e.id,className:e.noLine?"":"h5p-hub-bottom-line"},o.a.createElement("div",null,null!==e.catNoParent?y([e.catNoParent]):null),e.children&&o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{key:e,ref:t[h+e.id],className:"h5p-hub-category-header"},m.in," ",e.name),y(e.children)))})))})));xe.displayName="CategoryList",xe.propTypes={onChecked:h.a.func.isRequired,checked:h.a.array,filter:h.a.string.isRequired,focused:h.a.string,parent:h.a.string,listRefId:h.a.string.isRequired,tabIndex:h.a.string,categoryRefId:h.a.string.isRequired,checkedParents:h.a.array,getDescendants:h.a.func.isRequired,categoryList:h.a.array.isRequired,searchValue:h.a.string.isRequired,dictionary:h.a.object.isRequired,errors:h.a.object};var Ce=xe,Se=(n(85),o.a.forwardRef((function(e,t){var n=e.value,r=e.onSearch,a=e.onNavigateVertical,i=e.onSelect,l=e.placeholder,u=e.onClick,s=e.onNavigateSideway,c=e.onFocus,f=e.inSearch,d=e.dictionary,p=e.handleClearSearch,h=e.closeDropdown;return o.a.createElement("div",{onMouseDown:u,className:"h5p-hub-search-button",role:"button","aria-label":d.dropdownButton},o.a.createElement("div",{className:"h5p-hub-search-field",role:"search"},o.a.createElement("input",{id:"h5p-hub-filter-search-bar",type:"text",value:n,"aria-label":l,placeholder:l,ref:t,onKeyDown:function(e){return function(e){switch(e.key){case"ArrowUp":a(-1),e.preventDefault();break;case"ArrowDown":a(1),e.preventDefault();break;case"ArrowRight":f||(s(1),e.preventDefault());break;case"ArrowLeft":f||(s(-1),e.preventDefault());break;case"Enter":i(),e.preventDefault();break;case"Escape":h(),e.preventDefault()}}(e)},onChange:function(e){var t=e.target;r(t.value)},onFocus:c,autoComplete:"off"}),o.a.createElement("div",{className:"h5p-hub-icon-arrow"})),n.length>0&&o.a.createElement("button",{onClick:p,className:"h5p-hub-clear-button"}))})));Se.displayName="SearchField",Se.propTypes={value:h.a.string,onSearch:h.a.func.isRequired,onNavigateVertical:h.a.func.isRequired,onNavigateSideway:h.a.func.isRequired,onSelect:h.a.func.isRequired,placeholder:h.a.string.isRequired,onClick:h.a.func.isRequired,onFocus:h.a.func,inSearch:h.a.bool,handleClearSearch:h.a.func.isRequired},Se.defaultProps={onNavigateVertical:function(){},onNavigateSideway:function(){},onSelect:function(){}};var Te=Se;n(86);function Oe(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _e(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?n.push({id:o.id,name:o.name,children:i,catNoParent:a?o:null}):a&&n.push({id:o.id,name:o.name,catNoParent:o})}for(var l=0;l0){l=t.checkboxRefs[t.categoryRefId+t.state.categoryList[0].id].current.offsetHeight;var s,c=0,f=Oe(t.state.categoryList);try{for(f.s();!(s=f.n()).done;){var d=s.value;if(d.catNoParent&&(c+=1),c>n)break;d.children&&(c+=d.children.length),u+=1}}catch(e){f.e(e)}finally{f.f()}}var p=i+(n+1)*o+u*l-a;t.checkboxRefs[t.listRefId].current.scrollTop=p}})),c()(K()(t),"handleNavigateSideway",(function(e){t.state.dropdownOpen&&-1==e&&t.state.parent?t.navigateToParent():t.state.dropdownOpen&&1==e&&t.state.focused&&t.getCheckboxFromId(t.state.focused,t.parents)&&t.navigateToChildren(t.state.focused,t.getCheckboxFromId(t.state.focused,t.parents).children)})),c()(K()(t),"navigateToChildren",(function(e,n){t.setState({checkboxElements:n,parent:[].concat(S()(t.state.parent),[e])}),t.searchRef.current.focus()})),c()(K()(t),"navigateToParent",(function(){var e=t.state.parent[t.state.parent.length-2],n=t.getCheckboxFromId(e,t.parents)&&t.getCheckboxFromId(e,t.parents).children,r=t.state.parent,o=r.pop();t.setState({parent:r,checkboxElements:n||t.props.items.sort(t.compare),focused:o}),t.searchRef.current.focus()})),c()(K()(t),"compare",(function(e,t){var n=e.name.toUpperCase(),r=t.name.toUpperCase();return nr?1:void 0})),c()(K()(t),"getDescendants",(function(e){if(null===e)return[];for(var t=[],n=[e];n.length>0;){var r=n.pop();r&&r.children&&(t.concat(r.children),r.children.forEach((function(e){t.push(e),n.push(e)})))}return t})),c()(K()(t),"setParentsAndLeafs",(function(e){for(var n=0;n0:-1!=this.props.checked.indexOf(e)||-1!==this.state.checkedParents.indexOf(e)}},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"h5p-hub-search-filter",ref:this.selfRef},o.a.createElement(Te,{ref:this.searchRef,value:this.state.searchValue,onSearch:this.handleOnSearch,placeholder:this.props.dictionary.searchPlaceholder,onClick:this.handleSearchClick,onNavigateVertical:this.handleNavigateVertical,onSelect:function(){return e.handleChecked(e.props.filter,e.state.focused,!e.checkedOf(e.state.focused),e.state.parent[e.state.parent.length-1])},onNavigateSideway:this.handleNavigateSideway,onFocus:this.handleSearchFocus,inSearch:this.state.inSearch,dictionary:this.props.dictionary,closeDropdown:this.closeDropdown,handleClearSearch:this.handleClearSearch}),this.state.parent.length>0&&this.state.dropdownOpen&&o.a.createElement("div",{className:"h5p-hub-navigate-parent"},o.a.createElement("button",{onClick:this.navigateToParent}),this.getCheckboxFromId(this.state.parent[this.state.parent.length-1],this.parents).name),this.state.dropdownOpen&&this.props.items&&(!this.props.category||this.state.searchValue.length<2)&&o.a.createElement(ke,{onChecked:this.handleChecked,items:this.state.checkboxElements,errors:this.props.errors,checked:this.props.checked,checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,navigateToChildren:this.navigateToChildren,parent:this.state.parent[this.state.parent.length-1],ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",inSearch:this.state.inSearch}),this.state.dropdownOpen&&this.props.items&&this.props.category&&(this.state.categoryList.length>0||this.state.categoryList.topCategories)&&this.state.inSearch&&o.a.createElement(Ce,{onChecked:this.handleChecked,checked:this.props.checked,checkedParents:this.state.checkedParents,filter:this.props.filter,focused:this.state.focused,ref:this.checkboxRefs,listRefId:this.listRefId,getDescendants:this.getDescendants,tabIndex:"-1",categoryList:this.state.categoryList,searchValue:this.state.searchValue,categoryRefId:this.categoryRefId,dictionary:this.props.dictionary,errors:this.props.errors}))}}]),r}(o.a.Component);De.propTypes={items:h.a.array,errors:h.a.object,handleChecked:h.a.func.isRequired,checked:h.a.array,filter:h.a.string.isRequired,dictionary:h.a.object.isRequired,category:h.a.bool,dropdownAlwaysOpen:h.a.bool,setFocus:h.a.bool};var je=De,Ie=function(e){var t=e.disciplines,n=e.errors,a=e.setDisciplines,i=Object(r.useContext)(u),s=Object(r.useContext)(l),c=o.a.useState(!1),f=d()(c,2),p=f[0],h=f[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement(B,{chips:t.map((function(e){return{id:e,name:i.getDiscipline(e).name}})),setChips:function(e){a(e),0===e.length&&h((function(e){return!e}))}}),o.a.createElement(je,{items:i.disciplines,errors:n,handleChecked:function(e,n,r){Array.isArray(n)&&null!==n&&r?a(t.filter((function(e){return-1===n.indexOf(e)})).concat(n)):null!=n&&r&&a([].concat(S()(t),[n]))},checked:t,filter:"discipline",dictionary:s.discipline,category:!0,dropdownAlwaysOpen:!1,setFocus:p}))};Ie.propTypes={disciplines:h.a.array.isRequired,errors:h.a.object,setDisciplines:h.a.func.isRequired};var Le=Ie,Me=(n(87),function(e){var t=e.severity,n=e.children;return o.a.createElement("div",{className:"h5p-hub-message h5p-hub-".concat(t)},n)});Me.propTypes={severity:h.a.string.isRequired,children:h.a.node};var Ae=Me,Fe=(n(88),function(e){var t=e.children,n=o.a.useState(""),r=d()(n,2),a=r[0],i=r[1];return t.map((function(e){return o.a.createElement("div",{key:e.props.id},o.a.createElement("dt",{className:"h5p-hub-accordion-heading"},o.a.createElement("span",{className:"h5p-hub-icon-dropdown"+(a===e.props.id?" h5p-hub-open":"")}),o.a.createElement("button",{className:"h5p-hub-accordion-button",onClick:function(){return t=e.props.id,void i(t===a?"":t);var t},"aria-expanded":a===e.props.id},o.a.createElement("span",{className:"h5p-hub-accordion-header"},e.props.header))),a==e.props.id&&o.a.createElement("dl",null,o.a.createElement("div",{className:"h5p-hub-panel-body"},e)))}))});Fe.propTypes={children:h.a.arrayOf(h.a.shape({props:h.a.shape({header:h.a.string.isRequired,id:h.a.string.isRequired}).isRequired}).isRequired).isRequired};var Ue=Fe,ze=(n(89),function(e){return e.versions.length?e.versions.map((function(t){return{id:"".concat(e.id,"-").concat(t.id),name:"".concat(e.name," ").concat(t.name),url:t.url}})):[e]}),qe=function(e,t){if(t.licenses){var n=t.licenses.reduce((function(e,t){var n=ze(t);return e.concat(n)}),[]);return e.concat(n)}var r=ze(t);return e.concat(r)},Be=o.a.forwardRef((function(e,t){var n=e.closeModal,r=o.a.useContext(u),a=o.a.useContext(l);return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"h5p-hub-dialog-header"},o.a.createElement("div",{className:"h5p-hub-dialog-title"},o.a.createElement("span",null,a.contentLicenseTitle),o.a.createElement("button",{onClick:n,ref:t},a.close)),o.a.createElement("div",{className:"h5p-hub-dialog-description"},a.licenseDialogDescription)),o.a.createElement("div",{className:"h5p-hub-dialog-content"},o.a.createElement(Ue,null,r.licenses.reduce(qe,[]).map((function(e){return o.a.createElement("div",{key:e.id,id:"h5p-hub-"+e.id,header:e.name},o.a.createElement("a",{href:e.url,target:"_blank"},e.url))})))))}));Be.displayName="ModalContent",Be.propTypes={closeModal:h.a.func.isRequired};var Ve=Be;function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t0&&t.disciplines.length<=10})),f((function(){return e}))}),[t,a,v]);var L=function(e){w(e)};return o.a.createElement(o.a.Fragment,null,o.a.createElement(z,{isOpen:b,closeModal:function(){return L(!1)},onAfterOpen:function(){E.current&&E.current.focus()}},o.a.createElement(Ve,{closeModal:function(){return L(!1)},ref:E})),o.a.createElement(O,{label:p.title,mandatory:!0},o.a.createElement("input",{id:"h5p-hub-title",onChange:function(e){return j(e.target.value,"title")},value:t.title,maxLength:255,onFocus:function(){return T(!0)},onBlur:function(){return T(!1)}})),o.a.createElement(ve,{text:I(p.maxLength,{":length":255}),open:255===t.title.length&&C,className:"h5p-hub-tip-text-field"}),o.a.createElement("div",{className:"h5p-hub-row"},o.a.createElement(O,{label:p.license,description:p.licenseDescription,mandatory:!0,link:{linkText:p.licenseDetails,onClick:function(){return L(!0)}}},o.a.createElement(N,{options:h.licenses,selected:t.license||"U",allowNone:!1,onChange:function(e){return j(e.target.value,"license")}})),o.a.createElement(O,{label:p.licenseVersion,description:p.licenseVersionDescription,mandatory:!0},o.a.createElement(N,{options:v,selected:t.licenseVersion,allowNone:!0,onChange:function(e){return j(e.target.value,"licenseVersion")}}))),o.a.createElement("div",{className:"h5p-hub-row"},o.a.createElement(O,{label:p.language,mandatory:!0},o.a.createElement(N,{options:h.languages,onChange:function(e){return j(e.target.value,"language")},selected:t.language,allowNone:!0})),o.a.createElement(O,{label:p.level,mandatory:!0},o.a.createElement(N,{options:h.levels,onChange:function(e){return j(e.target.value,"level")},selected:t.level,allowNone:!0}))),o.a.createElement(O,{label:p.disciplineLabel,description:p.disciplineDescription,mandatory:!0},o.a.createElement(Le,{disciplines:t.disciplines,errors:R.disciplines,setDisciplines:function(e){if(e.length<=10)j(e,"disciplines"),D((function(e){return delete e.disciplines,e}));else{var t=S()(e).pop();D((function(e){return He(He({},e),{},{disciplines:c()({},t,I(p.disciplineLimitReachedMessage,{":numDisciplines":10}))})}))}}})))};$e.propTypes={mandatoryInfo:L,setMandatoryInfo:h.a.func.isRequired,setIsValid:h.a.func.isRequired};var Qe=$e,Ke=(n(90),function(e){var t=e.chips,n=e.setKeywords,r=o.a.useRef(null),a=o.a.useContext(l),i=o.a.useState(!1),u=d()(i,2),s=u[0],c=u[1],f=o.a.useState(!1),p=d()(f,2),h=p[0],m=p[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement(B,{chips:t.map((function(e){return{id:e,name:e}})),setChips:function(e){n(e),0===e.length&&r.current.focus()}}),o.a.createElement("input",{placeholder:a.keywordsPlaceholder,onKeyDown:function(e){return function(e){if("Enter"===e.key){e.preventDefault();var o=e.target.value.trim();t.filter((function(e){return e.toLowerCase()===o.toLowerCase()})).length>0?c(!0):-1===t.indexOf(o)&&""!==o&&(n([].concat(S()(t),[o])),r.current.value="")}else c(!1)}(e)},ref:r,onFocus:function(){return m(!0)},onBlur:function(){return m(!1)}}),o.a.createElement(ve,{text:a.keywordExists,open:s&&h,className:"h5p-hub-tip-keywords"}))});Ke.propTypes={chips:h.a.array.isRequired,setKeywords:h.a.func.isRequired};var Ye=Ke,Xe=(n(91),function(e){var t=e.src,n=Object(r.useMemo)((function(){var e=new Image;return e.src=t,e}),[t]),a={backgroundImage:"url('".concat(n.src,"')")};return o.a.createElement("span",{className:"h5p-hub-image-preview",style:a})});Xe.propTypes={src:h.a.string};var Ge=Xe,Je=(n(92),function(e){var t=e.onFile,n=e.clearImage,r=e.img,a=e.ariaLabel,i=e.removeImageLabel,l=o.a.createRef(),u=function(){t({}),l.current.value=null,n&&n()};return o.a.createElement("div",{className:"h5p-hub-image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?l.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&u()},"aria-label":a},r&&r.src&&o.a.createElement(o.a.Fragment,null,o.a.createElement(Ge,{src:r.src}),o.a.createElement("button",{className:"h5p-hub-icon-close","aria-label":i,onKeyDown:function(e){-1!==["Enter","Space"].indexOf(e.key)&&(e.stopPropagation(),u())},onClick:u,tabIndex:"0"})),o.a.createElement("div",{className:"h5p-hub-image-upload ".concat(r&&r.src?"h5p-hub-image-selected":"")},o.a.createElement("input",{tabIndex:"-1",ref:l,type:"file",accept:".png,.jpg,.jpeg,.jfif,.pjpeg,.pjp",onChange:function(e){if(0!==e.target.files.length){var n=e.target.files[0];t({src:URL.createObjectURL(n),file:n})}}})))});Je.propTypes={onFile:h.a.func.isRequired,clearImage:h.a.func,img:h.a.object,ariaLabel:h.a.string.isRequired,removeImageLabel:h.a.string.isRequired};var Ze=Je;n(93);function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t0;){var r=n.pop();r&&r.children&&(t.push(r),r.children.forEach((function(e){n.push(e)})))}return t}(y.disciplines));!function(e,t,n,r,o){var a=new FormData;a.append("_token",t),a.append("title",n.title),a.append("license",n.license),null!==n.licenseVersion&&a.append("license_version",n.licenseVersion),a.append("language",n.language),a.append("level",n.level),n.disciplines.forEach((function(e){a.append("disciplines[]",e)})),n.keywords.forEach((function(e){a.append("keywords[]",e)})),a.append("summary",n.shortDescription),a.append("description",n.longDescription),void 0!==n.icon.file&&a.append("icon",n.icon.file),n.remove_icon&&a.append("remove_icon",1),n.screenshots.forEach((function(e){e.file&&a.append("screenshots[]",e.file),a.append("screenshot_alt_texts[]",e.alt)})),n.remove_screenshots.forEach((function(e){a.append("remove_screenshots[]",e)})),R.a.post(e,a,{headers:{"Content-Type":"multipart/form-data"},timeout:1e4}).then(r).catch(o)}(i,p,dt(dt({},ue),{},{disciplines:e},oe),(function(e){var t=e.data;t.success?(O(!0),V(!1)):(F(t.message||null),j(!0),V(!1))}),(function(){F(null),j(!0),V(!1)}))}else k((function(e){return e+1}))},enabled:he&&!B,id:B?"h5p-hub-share-in-process":""},B?o.a.createElement("span",null,ce.pleaseWait):ce[de.nextButton.label])),o.a.createElement("div",{className:"h5p-hub-sharing-note"},o.a.createElement("i",{className:"h5p-hub-icon-info"}),ce.sharingNote))))))}ht.propTypes={title:h.a.string.isRequired,publishURL:h.a.string.isRequired,returnURL:h.a.string.isRequired,contentType:h.a.string.isRequired,language:h.a.string.isRequired};var mt=ht;function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t.h5p-hub-form-element:first-child,.h5p-hub-registration .h5p-hub-step-content>.h5p-hub-form-element:first-child{padding-top:0}.h5p-hub-publish .h5p-hub-step-content>.h5p-hub-form-element:last-child,.h5p-hub-registration .h5p-hub-step-content>.h5p-hub-form-element:last-child{padding-bottom:0} -.h5p-hub-publish select{font-size:0.917em;border-radius:0.208em;padding:0.833em;color:#313131;background-color:#ffffff;font-family:"Open Sans", sans-serif;border:1px solid #bebdcd;width:100%;-webkit-appearance:none;-moz-appearance:none;line-height:1.5}.h5p-hub-publish select:disabled{background-color:#ededed}.h5p-hub-publish select:disabled::before{content:"-"}.h5p-hub-publish select::-ms-expand{display:none}.h5p-hub-publish div.h5p-hub-icon-arrow-down{position:relative;line-height:1.1em;pointer-events:none}.h5p-hub-publish div.h5p-hub-icon-arrow-down:before{content:"\e925";transform:rotate(90deg);position:absolute;right:1.5em;top:1.6em;font-size:0.6em} +.h5p-hub-publish select{font-size:0.917em;border-radius:0.208em;padding:0.833em 2.334em 0.833em 0.833em;color:#313131;background-color:#ffffff;font-family:"Open Sans", sans-serif;border:1px solid #bebdcd;width:100%;-webkit-appearance:none;-moz-appearance:none;line-height:1.5}.h5p-hub-publish select:disabled{background-color:#ededed}.h5p-hub-publish select:disabled::before{content:"-"}.h5p-hub-publish select::-ms-expand{display:none}.h5p-hub-publish div.h5p-hub-icon-arrow-down{position:relative;line-height:1.1em;pointer-events:none}.h5p-hub-publish div.h5p-hub-icon-arrow-down:before{content:"\e925";transform:rotate(90deg);position:absolute;right:1.5em;top:1.6em;font-size:0.6em} .h5p-hub-publish .h5p-hub-modal-content{z-index:2;background-color:#ffffff;opacity:1;position:relative;margin:2em 3em;border-radius:0.167em}.h5p-hub-publish .h5p-hub-modal-overlay{position:absolute;top:0;left:0px;right:0px;bottom:0px;background-color:rgba(0,0,0,0.7);z-index:2} @@ -27,17 +27,17 @@ .h5p-hub-publish .h5p-hub-search-filter{position:relative;border:1px solid #bebdcd;border-radius:0.208em;font-size:0.833em}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-clear-button{background:none;position:absolute;padding:1.6em;right:3.5em;color:#757575;border:none;top:50%;transform:translateY(-50%)}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-clear-button::before{content:"\e93a";font-family:"h5p";font-style:normal;font-size:1em}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-navigate-parent{font-size:1.25em;padding:0.3534em;display:flex;font-weight:bold;font-family:"Open Sans", sans-serif;border-top:1px solid #e6e6e8;align-items:center}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-navigate-parent button{background-color:#ffffff;position:relative;font-style:normal;font-size:0.8em;border-radius:50%;margin-right:0.4em;align-self:center;padding:0.5em;border:none}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-navigate-parent button::before{content:"\e937";font-family:"h5p";transform:rotate(180deg);font-weight:normal;display:inline-block}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-navigate-parent button:hover{background-color:#dadada;cursor:pointer}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list{overflow:hidden;overflow-y:scroll;max-height:25em;margin:0}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li{border-bottom:1px solid #e6e6e8;margin:0}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li:last-child{border-bottom:none}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li:first-child{border-top:1px solid #e6e6e8}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li .h5p-hub-content{padding:0.3em}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li .h5p-hub-content .h5p-hub-label-text{margin:0 1em}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li:focus{border-color:#3ba0f2;background-color:#fff;outline:none;box-shadow:none}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li:hover{background-color:#f2f2f2}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li.h5p-hub-highlighted{outline:1px solid #3ba0f2;outline-offset:-1px;background-color:#fff;box-shadow:none}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list li:hover{background-color:rgba(230,230,232,0.25)}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list::-webkit-scrollbar{background-color:rgba(105,117,133,0.25);width:0.54525em;border-radius:5.45256em}.h5p-hub-publish .h5p-hub-search-filter .h5p-hub-checkbox-list::-webkit-scrollbar-thumb{background-color:#697585;background-size:24px 100%;border-radius:5.45256em} -.h5p-hub-publish .h5p-hub-message,.h5p-hub-registration .h5p-hub-message{font-size:0.833em;border-left:0.3em solid;padding:1em;margin:0.5em 0}.h5p-hub-publish .h5p-hub-message.h5p-hub-warning,.h5p-hub-registration .h5p-hub-message.h5p-hub-warning{border-color:#fdcc31;background:#fff8e0}.h5p-hub-publish .h5p-hub-message.h5p-hub-error,.h5p-hub-registration .h5p-hub-message.h5p-hub-error{border-color:#c1494b;background-color:#ece0e0}.h5p-hub-publish .h5p-hub-message.h5p-hub-success,.h5p-hub-registration .h5p-hub-message.h5p-hub-success{border-color:#03a953;background-color:#d9eae2} +.h5p-hub-publish .h5p-hub-message,.h5p-hub-registration .h5p-hub-message{font-size:1em;border-left:0.3em solid;padding:1em;margin:0.5em 0}.h5p-hub-publish .h5p-hub-message.h5p-hub-warning,.h5p-hub-registration .h5p-hub-message.h5p-hub-warning{border-color:#fdcc31;background:#fff8e0}.h5p-hub-publish .h5p-hub-message.h5p-hub-error,.h5p-hub-registration .h5p-hub-message.h5p-hub-error{border-color:#c1494b;background-color:#ece0e0}.h5p-hub-publish .h5p-hub-message.h5p-hub-success,.h5p-hub-registration .h5p-hub-message.h5p-hub-success{border-color:#03a953;background-color:#d9eae2} -.h5p-hub-publish .h5p-hub-accordion-heading{display:flex;align-items:center}.h5p-hub-publish .h5p-hub-accordion-heading .h5p-hub-icon-dropdown{font-size:0.4em;color:#616161;display:inline-block;left:0;display:flex;padding:0.2em}.h5p-hub-publish .h5p-hub-accordion-heading .h5p-hub-icon-dropdown.h5p-hub-open{transform:rotate(90deg)}.h5p-hub-publish .h5p-hub-accordion-button{border:none;position:relative;padding:0.2em;width:100%;justify-self:start;display:flex}.h5p-hub-publish .h5p-hub-accordion-button .h5p-hub-accordion-header{border:none;text-align:left;color:#616161}.h5p-hub-publish .h5p-hub-panel-body{font-size:0.833em;margin:0.8em;margin-bottom:0;color:#707475} +.h5p-hub-publish .h5p-hub-accordion-heading{display:flex;align-items:center}.h5p-hub-publish .h5p-hub-accordion-heading .h5p-hub-icon-dropdown{font-size:0.4em;color:#616161;display:inline-block;left:0;display:flex;padding:0.2em}.h5p-hub-publish .h5p-hub-accordion-heading .h5p-hub-icon-dropdown.h5p-hub-open{transform:rotate(90deg)}.h5p-hub-publish .h5p-hub-accordion-button{border:none;position:relative;padding:0.2em;width:100%;justify-self:start;display:flex}.h5p-hub-publish .h5p-hub-accordion-button .h5p-hub-accordion-header{border:none;text-align:left;color:#616161}.h5p-hub-publish .h5p-hub-panel-body{font-size:0.833em;margin:0.8em;margin-bottom:0;color:#707475;overflow:hidden} .h5p-hub-publish .h5p-hub-dialog-header{padding:1.708em 2.292em;border-bottom:1px solid #d5d5d7}.h5p-hub-publish .h5p-hub-dialog-header .h5p-hub-dialog-description{font-size:0.833em;color:#707475}.h5p-hub-publish .h5p-hub-dialog-content{padding:1.708em 2.292em}.h5p-hub-publish .h5p-hub-dialog-title{display:flex;justify-content:space-between}.h5p-hub-publish .h5p-hub-dialog-title span{font-size:1.458em;color:#1a1a1a;margin-bottom:0.2em}.h5p-hub-publish .h5p-hub-dialog-title button{max-height:2.77em} .h5p-hub-publish .h5p-hub-tip-keywords{top:2.5em} -.h5p-hub-publish .h5p-hub-image-preview,.h5p-hub-registration .h5p-hub-image-preview{width:4em;height:3em;margin-right:0.5em;display:inline-block;background-size:cover;background-position:center} +.h5p-hub-publish .h5p-hub-image-preview,.h5p-hub-registration .h5p-hub-image-preview{width:4em;height:3em;margin-right:0.5em;display:inline-block;background-position:center;background-size:contain;background-repeat:no-repeat;background-color:#d0d0d1} -.h5p-hub-publish .h5p-hub-image-upload-container,.h5p-hub-registration .h5p-hub-image-upload-container{width:4em;height:3em;margin-right:1em;position:relative}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-preview,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-preview{position:absolute;left:4px;top:4px;width:calc(100% - 4px);height:calc(100% - 4px)}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close{cursor:pointer;font-size:1em;border:none;outline:none}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close::before{font-size:0.6em;padding:0.5em;line-height:1.1;color:#fff;background:#000;position:absolute;z-index:1;display:inline-block;right:-1.2em;top:-1.2em;border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all 0.3s}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close:hover::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close:hover::before{background:#eee;color:#000}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close:focus::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close:focus::before{outline:#000;outline-style:auto}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload{position:absolute;top:0;left:0;width:100%;height:100%;border:0.125em dashed #bebdcd;color:#bebdcd;text-align:center;transition:all 0.3s}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload input,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload input{position:absolute;left:0;top:0;width:100%;height:100%;cursor:pointer;opacity:0}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload input::-webkit-file-upload-button,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload input::-webkit-file-upload-button{visibility:hidden}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload:hover,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload:hover{color:#777;border-color:#777}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload:before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload:before{content:"+";font-size:2em;display:inline-block;position:relative;top:50%;transform:translateY(-50%)}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected{border-style:solid;border-radius:0.1em}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected:before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected:before{display:none} +.h5p-hub-publish .h5p-hub-image-upload-container,.h5p-hub-registration .h5p-hub-image-upload-container{width:4em;height:3em;margin-right:1em;position:relative}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close{cursor:pointer;font-size:1em;border:none;outline:none}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close::before{font-size:0.6em;padding:0.5em;line-height:1.1;color:#fff;background:#000;position:absolute;z-index:1;display:inline-block;right:-1.2em;top:-1.2em;border:3px solid #fff;border-radius:50%;cursor:pointer;transition:all 0.3s}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close:hover::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close:hover::before{background:#eee;color:#000}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-icon-close:focus::before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-icon-close:focus::before{outline:#000;outline-style:auto}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload{position:absolute;top:0;left:0;width:100%;height:100%;border:0.125em dashed #bebdcd;color:#bebdcd;text-align:center;transition:all 0.3s}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload input,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload input{position:absolute;left:0;top:0;width:100%;height:100%;cursor:pointer;opacity:0}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload input::-webkit-file-upload-button,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload input::-webkit-file-upload-button{visibility:hidden}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload:hover,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload:hover{color:#777;border-color:#777}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload:before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload:before{content:"+";font-size:2em;display:inline-block;position:relative;top:50%;transform:translateY(-50%)}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected{border-style:solid;border-radius:0.1em}.h5p-hub-publish .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected:before,.h5p-hub-registration .h5p-hub-image-upload-container .h5p-hub-image-upload.h5p-hub-image-selected:before{display:none} .h5p-hub-publish .h5p-hub-optional .h5p-hub-keywords .h5p-hub-form-element label{margin-bottom:0.708em}.h5p-hub-publish .h5p-hub-optional #h5p-hub-screenshots{display:flex;flex-wrap:wrap;flex-direction:column}.h5p-hub-publish .h5p-hub-optional #h5p-hub-screenshots .h5p-hub-image-upload-container{margin-top:0.4em}.h5p-hub-publish .h5p-hub-optional #h5p-hub-screenshots .h5p-hub-row{margin-top:0.5em}.h5p-hub-publish .h5p-hub-optional #h5p-hub-screenshots .h5p-hub-row .h5p-hub-form-element{padding:0}.h5p-hub-publish .h5p-hub-optional #h5p-hub-screenshots .h5p-hub-alt-text{padding:0.3em}.h5p-hub-publish .h5p-hub-optional .h5p-hub-optional-second-part{display:flex}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-optional .h5p-hub-optional-second-part{flex-wrap:wrap}}.h5p-hub-publish .h5p-hub-optional #h5p-hub-long-description{height:10.458em}.h5p-hub-publish .h5p-hub-optional #h5p-hub-short-description{height:6.333em} @@ -397,5 +397,5 @@ template { display: none; } -@keyframes spinner{0%{transform:translate3d(-50%, -50%, 0) rotate(0deg)}100%{transform:translate3d(-50%, -50%, 0) rotate(360deg)}}.h5p-hub-publish,.h5p-hub-registration-wrapper{position:relative;margin:2em auto;font-family:'Open Sans', sans-serif;max-width:1024px;border:1px solid #2c9586;border-radius:0.167em;box-sizing:border-box;font-size:18px;box-shadow:0px 0px 20px rgba(0,0,0,0.1)}.h5p-hub-publish .h5p-hub-header,.h5p-hub-registration-wrapper .h5p-hub-header{padding:1.5em;display:flex;align-items:center;width:100%;box-sizing:border-box;border-bottom:1px solid #d5d5d7}.h5p-hub-publish .h5p-hub-header .h5p-hub-title,.h5p-hub-registration-wrapper .h5p-hub-header .h5p-hub-title{font-size:1.458em;flex-grow:1}.h5p-hub-publish .h5p-hub-step-panel,.h5p-hub-registration-wrapper .h5p-hub-step-panel{margin:2em;border-radius:0.208em;border:1px solid #d5d5d7}.h5p-hub-publish .h5p-hub-step-title,.h5p-hub-registration-wrapper .h5p-hub-step-title{color:#1a1a1a;font-size:1.250em;font-weight:bold;border-bottom:1px solid #ccc;padding:1.2em 1.8em;line-height:normal}.h5p-hub-publish .h5p-hub-step-content,.h5p-hub-registration-wrapper .h5p-hub-step-content{padding:2em}.h5p-hub-publish .h5p-hub-footer,.h5p-hub-registration-wrapper .h5p-hub-footer{padding:0 2em 2em;width:100%;box-sizing:border-box;position:relative}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation{display:flex}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation button,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation button{z-index:1}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation button:before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation button:before{font-family:'h5p';font-size:0.75em;content:"\e91a";transform:rotate(180deg);display:inline-block;margin-right:1em;line-height:1;position:relative;top:-0.1em}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation .h5p-hub-back:before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation .h5p-hub-back:before{transform:rotate(0)}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation #h5p-hub-share-in-process::before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation #h5p-hub-share-in-process::before{font-family:"h5p";font-size:0.75em;content:"\e928";animation:2s linear infinite spinner;top:0.5em}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation .h5p-hub-next,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation .h5p-hub-next{margin-left:auto}.h5p-hub-publish .h5p-hub-tip-text-field,.h5p-hub-registration-wrapper .h5p-hub-tip-text-field{top:1.5em}.h5p-hub-publish .h5p-hub-hare-error,.h5p-hub-registration-wrapper .h5p-hub-hare-error{padding:0 2em 2em;text-align:end}.h5p-hub-publish .h5p-hub-bold,.h5p-hub-registration-wrapper .h5p-hub-bold{font-weight:bold}.h5p-hub-publish .h5p-hub-row,.h5p-hub-registration-wrapper .h5p-hub-row{display:flex;flex-wrap:wrap;margin-right:-1em}.h5p-hub-publish .h5p-hub-row .h5p-hub-form-element,.h5p-hub-registration-wrapper .h5p-hub-row .h5p-hub-form-element{flex-basis:100%;flex:1;min-width:17em;align-self:flex-end;border-right:1em solid #ffffff}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-row .h5p-hub-form-element,.h5p-hub-registration-wrapper .h5p-hub-row .h5p-hub-form-element{min-width:calc(100% - 1em)}}.h5p-hub-publish .h5p-hub-columns,.h5p-hub-registration-wrapper .h5p-hub-columns{display:flex;margin-right:-1em}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-columns,.h5p-hub-registration-wrapper .h5p-hub-columns{flex-wrap:wrap}}.h5p-hub-publish .h5p-hub-columns .h5p-hub-column,.h5p-hub-registration-wrapper .h5p-hub-columns .h5p-hub-column{width:50%;border-right:1em solid #ffffff}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-columns .h5p-hub-column,.h5p-hub-registration-wrapper .h5p-hub-columns .h5p-hub-column{width:100%;margin-right:0}}.h5p-hub-publish .h5p-hub-sharing-note,.h5p-hub-registration-wrapper .h5p-hub-sharing-note{text-align:center;color:#707475;font-size:0.833em;width:calc(100% - 4.9em);position:absolute;top:0.65em;box-sizing:border-box;padding:0 8em}.h5p-hub-publish .h5p-hub-sharing-note .h5p-hub-icon-info:before,.h5p-hub-registration-wrapper .h5p-hub-sharing-note .h5p-hub-icon-info:before{font-size:0.5em;display:inline-block;margin-right:1em;background:#d1d7e3;padding:0.4em;border-radius:50%;position:relative;top:-0.25em}.h5p-hub-publish .h5p-hub-sr-only,.h5p-hub-registration-wrapper .h5p-hub-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.h5p-hub-publish [class^="h5p-hub-icon-"],.h5p-hub-publish [class*=" h5p-hub-icon-"],.h5p-hub-registration-wrapper [class^="h5p-hub-icon-"],.h5p-hub-registration-wrapper [class*=" h5p-hub-icon-"]{font-family:'h5p' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.h5p-hub-publish .h5p-hub-icon-dropdown:before,.h5p-hub-registration-wrapper .h5p-hub-icon-dropdown:before{content:"\e925"}.h5p-hub-publish .h5p-hub-icon-info:before,.h5p-hub-registration-wrapper .h5p-hub-icon-info:before{content:"\e93c"}.h5p-hub-publish .h5p-hub-icon-thick-arrow:before,.h5p-hub-registration-wrapper .h5p-hub-icon-thick-arrow:before{content:"\e91a"}.h5p-hub-publish .h5p-hub-icon-check:before,.h5p-hub-registration-wrapper .h5p-hub-icon-check:before{content:"\e933"}.h5p-hub-publish .h5p-hub-icon-close:before,.h5p-hub-registration-wrapper .h5p-hub-icon-close:before{content:"\e93a"}.h5p-hub-publish .h5p-hub-icon-plus:before,.h5p-hub-registration-wrapper .h5p-hub-icon-plus:before{content:"\e939"} +@keyframes spinner{0%{transform:translate3d(-50%, -50%, 0) rotate(0deg)}100%{transform:translate3d(-50%, -50%, 0) rotate(360deg)}}.h5p-hub-publish,.h5p-hub-registration-wrapper{position:relative;margin:2em auto;font-family:'Open Sans', sans-serif;max-width:1024px;border:1px solid #2c9586;border-radius:0.167em;box-sizing:border-box;font-size:18px;box-shadow:0px 0px 20px rgba(0,0,0,0.1)}.h5p-hub-publish .h5p-hub-header,.h5p-hub-registration-wrapper .h5p-hub-header{padding:1.5em;display:flex;align-items:center;width:100%;box-sizing:border-box;border-bottom:1px solid #d5d5d7}.h5p-hub-publish .h5p-hub-header .h5p-hub-title,.h5p-hub-registration-wrapper .h5p-hub-header .h5p-hub-title{font-size:1.458em;flex-grow:1}.h5p-hub-publish .h5p-hub-step-panel,.h5p-hub-registration-wrapper .h5p-hub-step-panel{margin:2em;border-radius:0.208em;border:1px solid #d5d5d7}.h5p-hub-publish .h5p-hub-step-title,.h5p-hub-registration-wrapper .h5p-hub-step-title{color:#1a1a1a;font-size:1.250em;font-weight:bold;border-bottom:1px solid #ccc;padding:1.2em 1.8em;line-height:normal}.h5p-hub-publish .h5p-hub-step-content,.h5p-hub-registration-wrapper .h5p-hub-step-content{padding:2em}.h5p-hub-publish .h5p-hub-footer,.h5p-hub-registration-wrapper .h5p-hub-footer{padding:0 2em 2em;width:100%;box-sizing:border-box;position:relative}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation{display:flex}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation button,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation button{z-index:1}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation button:before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation button:before{font-family:'h5p';font-size:0.75em;content:"\e91a";transform:rotate(180deg);display:inline-block;margin-right:1em;line-height:1;position:relative;top:-0.1em}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation .h5p-hub-back:before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation .h5p-hub-back:before{transform:rotate(0)}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation #h5p-hub-share-in-process::before,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation #h5p-hub-share-in-process::before{font-family:"h5p";font-size:0.75em;content:"\e928";animation:2s linear infinite spinner;top:0.5em}.h5p-hub-publish .h5p-hub-footer .h5p-hub-navigation .h5p-hub-next,.h5p-hub-registration-wrapper .h5p-hub-footer .h5p-hub-navigation .h5p-hub-next{margin-left:auto}.h5p-hub-publish .h5p-hub-tip-text-field,.h5p-hub-registration-wrapper .h5p-hub-tip-text-field{top:1.5em}.h5p-hub-publish .h5p-hub-hare-error,.h5p-hub-registration-wrapper .h5p-hub-hare-error{padding:0 2em 2em;text-align:end}.h5p-hub-publish .h5p-hub-bold,.h5p-hub-registration-wrapper .h5p-hub-bold{font-weight:bold}.h5p-hub-publish .h5p-hub-row,.h5p-hub-registration-wrapper .h5p-hub-row{display:flex;flex-wrap:wrap;margin-right:-1em}.h5p-hub-publish .h5p-hub-row .h5p-hub-form-element,.h5p-hub-registration-wrapper .h5p-hub-row .h5p-hub-form-element{flex-basis:100%;flex:1;min-width:17em;align-self:flex-end;border-right:1em solid #ffffff}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-row .h5p-hub-form-element,.h5p-hub-registration-wrapper .h5p-hub-row .h5p-hub-form-element{min-width:calc(100% - 1em)}}.h5p-hub-publish .h5p-hub-columns,.h5p-hub-registration-wrapper .h5p-hub-columns{display:flex;margin-right:-1em}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-columns,.h5p-hub-registration-wrapper .h5p-hub-columns{flex-wrap:wrap}}.h5p-hub-publish .h5p-hub-columns .h5p-hub-column,.h5p-hub-registration-wrapper .h5p-hub-columns .h5p-hub-column{width:50%;border-right:1em solid #ffffff}@media (max-width: 576px){.h5p-hub-publish .h5p-hub-columns .h5p-hub-column,.h5p-hub-registration-wrapper .h5p-hub-columns .h5p-hub-column{width:100%;margin-right:0}}.h5p-hub-publish .h5p-hub-sharing-note,.h5p-hub-registration-wrapper .h5p-hub-sharing-note{text-align:center;color:#707475;font-size:0.833em;width:calc(100% - 4.9em);position:absolute;top:0.65em;box-sizing:border-box;padding:0 8em}.h5p-hub-publish .h5p-hub-sharing-note .h5p-hub-icon-info:before,.h5p-hub-registration-wrapper .h5p-hub-sharing-note .h5p-hub-icon-info:before{font-size:0.5em;display:inline-block;margin-right:1em;background:#d1d7e3;padding:0.4em;border-radius:50%;position:relative;top:-0.25em}.h5p-hub-publish .h5p-hub-sr-only,.h5p-hub-registration-wrapper .h5p-hub-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.h5p-hub-publish [class^="h5p-hub-icon-"],.h5p-hub-publish [class*=" h5p-hub-icon-"],.h5p-hub-registration-wrapper [class^="h5p-hub-icon-"],.h5p-hub-registration-wrapper [class*=" h5p-hub-icon-"]{font-family:'h5p' !important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.h5p-hub-publish .h5p-hub-icon-dropdown:before,.h5p-hub-registration-wrapper .h5p-hub-icon-dropdown:before{content:"\e925"}.h5p-hub-publish .h5p-hub-icon-info:before,.h5p-hub-registration-wrapper .h5p-hub-icon-info:before{content:"\e93c"}.h5p-hub-publish .h5p-hub-icon-thick-arrow:before,.h5p-hub-registration-wrapper .h5p-hub-icon-thick-arrow:before{content:"\e91a"}.h5p-hub-publish .h5p-hub-icon-check:before,.h5p-hub-registration-wrapper .h5p-hub-icon-check:before{content:"\e933"}.h5p-hub-publish .h5p-hub-icon-close:before,.h5p-hub-registration-wrapper .h5p-hub-icon-close:before{content:"\e93a"}.h5p-hub-publish .h5p-hub-icon-plus:before,.h5p-hub-registration-wrapper .h5p-hub-icon-plus:before{content:"\e939"}.h5p-hub-share-error{margin:2em}