From 917a9b6ccb05b13fc170b523af06e6d689a45ff4 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Wed, 9 Sep 2020 13:26:46 +0200 Subject: [PATCH] HFP-3095 Add error message if unable to contact hub Fix translation Update hub registration ui --- h5p.classes.php | 6 +++++- js/h5p-hub-registration.js | 2 +- js/h5p-hub-sharing.js | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index 0d842f1..c5a16e9 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -3677,7 +3677,7 @@ class H5PCore { 'helpChoosingLicense' => $this->h5pF->t('Help me choose a license'), 'shareFailed' => $this->h5pF->t('Share failed.'), 'editingFailed' => $this->h5pF->t('Editing failed.'), - 'shareTryAgain' => $this->h5pF->t('Something went wrong, please try to share agian.'), + 'shareTryAgain' => $this->h5pF->t('Something went wrong, please try to share again.'), 'pleaseWait' => $this->h5pF->t('Please wait...'), 'language' => $this->h5pF->t('Language'), 'level' => $this->h5pF->t('Level'), @@ -3774,6 +3774,10 @@ class H5PCore { throw new Exception($this->h5pF->t('Unable to authorize with the H5P Hub. Please check your Hub registration and connection.')); } + if (isset($response['status']) && $response['status'] !== 200) { + throw new Exception($this->h5pF->t('Connecting to the content hub failed, please try again later.')); + } + $result = json_decode($response['data']); if (isset($result->success) && $result->success === TRUE) { return $result; diff --git a/js/h5p-hub-registration.js b/js/h5p-hub-registration.js index 72c206e..a0090e0 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,o,a,l;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,s=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(s,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(s,0))},i=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},a=function(){return!1},l=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,m=window.setTimeout,h=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,k=5,x=0;a=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(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);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,M=!1,L=!1;function F(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 A(e){if(L=!1,F(e),!M)if(null!==C(N))M=!0,r(j);else{var t=C(O);null!==t&&i(A,t.startTime-e)}}function j(e,n){M=!1,L&&(L=!1,o()),D=!0;var r=I;try{for(F(n),z=C(N);null!==z&&(!(z.expirationTime>n)||e&&!a());){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),F(n)}else _(N);z=C(N)}if(null!==z)var c=!0;else{var s=C(O);null!==s&&i(A,s.startTime-n),c=!1}return c}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 B=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(){M||D||(M=!0,r(j))},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=B,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,a){var l=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0l?(e.sortIndex=u,S(O,e),null===C(N)&&e===C(O)&&(L?o():L=!0,i(A,u-l))):(e.sortIndex=a,S(N,e),M||D||(M=!0,r(j))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();F(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;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},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,o,a){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(o)&&l.push("domain="+o),!0===a&&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(15);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){"use strict";n.r(t);var r=n(0),i=n.n(r),o=n(16),a=n.n(o),l=i.a.createContext(),u=n(4),c=n.n(u),s=n(3),f=n.n(s),d=n(1),p=n.n(d),m=(n(30),function(e){var t=e.children,n=e.name,r=e.onClick,o=e.variant,a=e.color,l=e.enabled,u=e.id,c=[];return n&&c.push(n),o&&c.push(o),a&&c.push(a),i.a.createElement("button",{id:u,type:"button",className:c.join(" "),onClick:r,disabled:!1===l},t)});m.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 h=m,v=(n(31),function(e){var t=e.label,n=e.description,r=e.mandatory,o=e.children,a=e.link,l=e.className;return i.a.createElement("div",{className:"form-element ".concat(r?"mandatory":""," ").concat(l||"")},i.a.createElement("label",{htmlFor:o.props.id},t),i.a.createElement("div",{className:"details-row"},n&&i.a.createElement("div",{className:"description"},n),a&&i.a.createElement("button",{className:"link-button",onClick:a.onClick},a.linkText)),o)});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(5),b=n.n(y),w=(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(48),n(49),n(50),n(51),function(e){var t=e.src,n=new Image;n.src=t;var r={backgroundImage:"url('".concat(n.src,"')")};return i.a.createElement("span",{className:"image-preview",style:r})});w.propTypes={src:p.a.string};var k=w,x=(n(52),function(e){var t=e.onFile,n=e.clearImage,r=e.img,o=e.ariaLabel,a=i.a.createRef(),l=function(){t({}),n&&n()};return i.a.createElement("div",{className:"image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?a.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&l()},"aria-label":o},r&&r.src&&i.a.createElement(i.a.Fragment,null,i.a.createElement(k,{src:r.src}),i.a.createElement("span",{className:"icon-close",onClick:l})),i.a.createElement("div",{className:"image-upload ".concat(r&&r.src?"image-selected":"")},i.a.createElement("input",{tabIndex:"-1",ref:a,type:"file",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};var E=x,T=(n(53),function(e){var t=e.title,n=e.description,r=e.mainText;return i.a.createElement("div",{className:"text-field"},i.a.createElement("div",{className:"title"},t),i.a.createElement("div",{className:"description"},n),i.a.createElement("div",{className:"main-text"},r))});T.propTypes={text:p.a.string,description:p.a.string,mainText:p.a.string};n(54);var S=i.a.forwardRef((function(e,t){var n=e.id,r=e.label,o=e.checked,a=e.filter,l=e.onChecked,u=e.focused,c=e.checkboxChildren,s=e.navigateToChildren,f=e.parent,d=e.descendantsChecked,p=e.tabIndex,m=e.children;return i.a.createElement("li",{ref:t,id:n,key:a+n,className:"checkbox ".concat(o?"checked ":""," ").concat(u?"highlighted":""," ").concat(c?"parent":""),role:"checkbox","aria-checked":o,onClick:function(){return c?s(n,c):l(a,n,!o)},tabIndex:p||"0",onKeyDown:function(e){"Enter"!==e.key&&" "!=e.key||(l(a,n,!o),e.preventDefault())}},i.a.createElement("div",{className:"content",key:"label"+n},i.a.createElement("div",{className:"icon",onClick:function(e){return c?function(e,t,n,r){r.stopPropagation(),l(e,t,n,f)}(a,n,!o,e):{}}}),i.a.createElement("div",{className:"label-text"},m||r,d>0&&" (".concat(d,")"))))}));S.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 C=S,_=(n(55),function(e){var t=e.severity,n=e.children;return i.a.createElement("div",{className:"message ".concat(t)},n)});_.propTypes={severity:p.a.string.isRequired,children:p.a.node};var P=_;function N(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 O(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(a,n))void 0!==u&&0>P(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);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,M=!1,L=!1;function F(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 A(e){if(L=!1,F(e),!M)if(null!==C(N))M=!0,r(j);else{var t=C(O);null!==t&&i(A,t.startTime-e)}}function j(e,n){M=!1,L&&(L=!1,o()),D=!0;var r=I;try{for(F(n),z=C(N);null!==z&&(!(z.expirationTime>n)||e&&!a());){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),F(n)}else _(N);z=C(N)}if(null!==z)var c=!0;else{var s=C(O);null!==s&&i(A,s.startTime-n),c=!1}return c}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 B=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(){M||D||(M=!0,r(j))},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=B,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,a){var l=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0l?(e.sortIndex=u,S(O,e),null===C(N)&&e===C(O)&&(L?o():L=!0,i(A,u-l))):(e.sortIndex=a,S(N,e),M||D||(M=!0,r(j))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();F(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;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},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,o,a){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(o)&&l.push("domain="+o),!0===a&&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(15);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){"use strict";n.r(t);var r=n(0),i=n.n(r),o=n(16),a=n.n(o),l=i.a.createContext(),u=n(4),c=n.n(u),s=n(3),f=n.n(s),d=n(1),p=n.n(d),m=(n(30),function(e){var t=e.children,n=e.name,r=e.onClick,o=e.variant,a=e.color,l=e.enabled,u=e.id,c=[];return n&&c.push(n),o&&c.push(o),a&&c.push(a),i.a.createElement("button",{id:u,type:"button",className:c.join(" "),onClick:r,disabled:!1===l},t)});m.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 h=m,v=(n(31),function(e){var t=e.label,n=e.description,r=e.mandatory,o=e.children,a=e.link,l=e.className;return i.a.createElement("div",{className:"form-element ".concat(r?"mandatory":""," ").concat(l||"")},i.a.createElement("label",{htmlFor:o.props.id},t),i.a.createElement("div",{className:"details-row"},n&&i.a.createElement("div",{className:"description"},n),a&&i.a.createElement("button",{className:"link-button",onClick:a.onClick},a.linkText)),o)});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(5),b=n.n(y),w=(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(48),n(49),n(50),n(51),function(e){var t=e.src,n=new Image;n.src=t;var r={backgroundImage:"url('".concat(n.src,"')")};return i.a.createElement("span",{className:"image-preview",style:r})});w.propTypes={src:p.a.string};var k=w,x=(n(52),function(e){var t=e.onFile,n=e.clearImage,r=e.img,o=e.ariaLabel,a=i.a.createRef(),l=function(){t({}),n&&n()};return i.a.createElement("div",{className:"image-upload-container",role:"button",tabIndex:"0",onKeyDown:function(e){"Enter"===e.key?a.current.click():-1!==["Delete","Backspace"].indexOf(e.key)&&l()},"aria-label":o},r&&r.src&&i.a.createElement(i.a.Fragment,null,i.a.createElement(k,{src:r.src}),i.a.createElement("span",{className:"icon-close",onClick:l})),i.a.createElement("div",{className:"image-upload ".concat(r&&r.src?"image-selected":"")},i.a.createElement("input",{tabIndex:"-1",ref:a,type:"file",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};var E=x,T=(n(53),function(e){var t=e.title,n=e.description,r=e.mainText;return i.a.createElement("div",{className:"text-field"},i.a.createElement("div",{className:"title"},t),i.a.createElement("div",{className:"description"},n),i.a.createElement("div",{className:"main-text"},r))});T.propTypes={text:p.a.string,description:p.a.string,mainText:p.a.string};n(54);var S=i.a.forwardRef((function(e,t){var n=e.id,r=e.label,o=e.checked,a=e.filter,l=e.onChecked,u=e.focused,c=e.checkboxChildren,s=e.navigateToChildren,f=e.parent,d=e.descendantsChecked,p=e.tabIndex,m=e.children;return i.a.createElement("li",{ref:t,id:n,key:a+n,className:"checkbox ".concat(o?"checked ":""," ").concat(u?"highlighted":""," ").concat(c?"parent":""),role:"checkbox","aria-checked":o,onClick:function(){return c?s(n,c):l(a,n,!o)},tabIndex:p||"0",onKeyDown:function(e){"Enter"!==e.key&&" "!=e.key||(l(a,n,!o),e.preventDefault())}},i.a.createElement("div",{className:"content",key:"label"+n},i.a.createElement("div",{className:"icon",onClick:function(e){return c?function(e,t,n,r){r.stopPropagation(),l(e,t,n,f)}(a,n,!o,e):{}}}),i.a.createElement("div",{className:"label-text"},m||r,d>0&&" (".concat(d,")"))))}));S.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 C=S,_=(n(55),function(e){var t=e.severity,n=e.children;return i.a.createElement("div",{className:"message ".concat(t)},n)});_.propTypes={severity:p.a.string.isRequired,children:p.a.node};var P=_;function N(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 O(e){for(var t=1;tN.length&&N.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case i:u=!0}}if(u)return r(o,t,""===n?"."+I(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sP.length&&P.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case i:u=!0}}if(u)return r(o,t,""===n?"."+I(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s