@clickview/streamable-learning 0.18.0-rc.6 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/scripts/{1067-1a22760dca-streamable-learning.chunk.js → 1067-e39248ce9b-streamable-learning.chunk.js} +1 -1
- package/dist/scripts/2245-01ca1acb8f-streamable-learning.chunk.js +1 -0
- package/dist/scripts/{704-421a38d22e-streamable-learning.chunk.js → 704-4dd0b01842-streamable-learning.chunk.js} +2 -2
- package/dist/scripts/{719-7766cf402a-streamable-learning.chunk.js → 719-96e56ed411-streamable-learning.chunk.js} +2 -2
- package/dist/scripts/{9861-d9608809fa-streamable-learning.chunk.js → 9861-4272c8604b-streamable-learning.chunk.js} +2 -2
- package/dist/scripts/bundle-f73f760d16.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/2245-1469f789d9-streamable-learning.chunk.js +0 -1
- package/dist/scripts/bundle-1982ff65dc.min.js +0 -2
- /package/dist/scripts/{704-421a38d22e-streamable-learning.chunk.js.LICENSE.txt → 704-4dd0b01842-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{719-7766cf402a-streamable-learning.chunk.js.LICENSE.txt → 719-96e56ed411-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9861-d9608809fa-streamable-learning.chunk.js.LICENSE.txt → 9861-4272c8604b-streamable-learning.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-1982ff65dc.min.js.LICENSE.txt → bundle-f73f760d16.min.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[2245],{97079:(e,t)=>{t.Z=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return r.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}},58591:(e,t,r)=>{r.d(t,{uI:()=>ae});var n=r(32735),o=r(60216),i=r.n(o);function a(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function c(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}l((n=n.apply(e,t||[])).next())}))}function c(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function u(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var s=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function p(e,t){var r=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var r=t.split(".").pop().toLowerCase(),n=s.get(r);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof r.path){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:"string"==typeof t?t:"string"==typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}var f=[".DS_Store","Thumbs.db"];function d(e){return"object"==typeof e&&null!==e}function m(e){return v(e.target.files).map((function(e){return p(e)}))}function g(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return p(e)}))]}}))}))}function h(e,t){return a(this,void 0,void 0,(function(){var r;return c(this,(function(n){switch(n.label){case 0:return e.items?(r=v(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,r]:[4,Promise.all(r.map(y))]):[3,2];case 1:return[2,b(w(n.sent()))];case 2:return[2,b(v(e.files).map((function(e){return p(e)})))]}}))}))}function b(e){return e.filter((function(e){return-1===f.indexOf(e.name)}))}function v(e){if(null===e)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function y(e){if("function"!=typeof e.webkitGetAsEntry)return k(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?j(t):k(e)}function w(e){return e.reduce((function(e,t){return u(u([],l(e),!1),l(Array.isArray(t)?w(t):[t]),!1)}),[])}function k(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=p(t);return Promise.resolve(r)}function D(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return[2,e.isDirectory?j(e):x(e)]}))}))}function j(e){var t=e.createReader();return new Promise((function(e,r){var n=[];!function o(){var i=this;t.readEntries((function(t){return a(i,void 0,void 0,(function(){var i,a,l;return c(this,(function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(n)];case 2:return i=c.sent(),e(i),[3,4];case 3:return a=c.sent(),r(a),[3,4];case 4:return[3,6];case 5:l=Promise.all(t.map(D)),n.push(l),o(),c.label=6;case 6:return[2]}}))}))}),(function(e){r(e)}))}()}))}function x(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return[2,new Promise((function(t,r){e.file((function(r){var n=p(r,e.fullPath);t(n)}),(function(e){r(e)}))}))]}))}))}var O=r(97079);function A(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||C(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||C(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){if(e){if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var R=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},I=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},T=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},M={code:"too-many-files",message:"Too many files"};function _(e,t){var r="application/x-moz-file"===e.type||(0,O.Z)(e,t);return[r,r?null:R(t)]}function L(e,t,r){if(q(e.size))if(q(t)&&q(r)){if(e.size>r)return[!1,I(r)];if(e.size<t)return[!1,T(t)]}else{if(q(t)&&e.size<t)return[!1,T(t)];if(q(r)&&e.size>r)return[!1,I(r)]}return[!0,null]}function q(e){return null!=e}function $(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function B(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function K(e){e.preventDefault()}function U(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return t.some((function(t){return!$(e)&&t&&t.apply(void 0,[e].concat(n)),$(e)}))}}function G(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function N(e){return/^.*\.[\w]+$/.test(e)}var W=["children"],H=["open"],Z=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Y=["refKey","onChange","onClick"];function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||Q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){if(e){if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function re(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ne=(0,n.forwardRef)((function(e,t){var r=e.children,o=ae(re(e,W)),i=o.open,a=re(o,H);return(0,n.useImperativeHandle)(t,(function(){return{open:i}}),[i]),n.createElement(n.Fragment,null,r(ee(ee({},a),{},{open:i})))}));ne.displayName="Dropzone";var oe={disabled:!1,getFilesFromEvent:function(e){return a(this,void 0,void 0,(function(){return c(this,(function(t){return d(e)&&d(e.dataTransfer)?[2,h(e.dataTransfer,e.type)]:d(r=e)&&d(r.target)?[2,m(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,g(e)]:[2,[]];var r}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};ne.defaultProps=oe,ne.propTypes={children:i().func,accept:i().objectOf(i().arrayOf(i().string)),multiple:i().bool,preventDropOnDocument:i().bool,noClick:i().bool,noKeyboard:i().bool,noDrag:i().bool,noDragEventsBubbling:i().bool,minSize:i().number,maxSize:i().number,maxFiles:i().number,disabled:i().bool,getFilesFromEvent:i().func,onFileDialogCancel:i().func,onFileDialogOpen:i().func,useFsAccessApi:i().bool,autoFocus:i().bool,onDragEnter:i().func,onDragLeave:i().func,onDragOver:i().func,onDrop:i().func,onDropAccepted:i().func,onDropRejected:i().func,onError:i().func,validator:i().func};var ie={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ee(ee({},oe),e),r=t.accept,o=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,c=t.minSize,l=t.multiple,u=t.maxFiles,s=t.onDragEnter,p=t.onDragLeave,f=t.onDragOver,d=t.onDrop,m=t.onDropAccepted,g=t.onDropRejected,h=t.onFileDialogCancel,b=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,w=t.preventDropOnDocument,k=t.noClick,D=t.noKeyboard,j=t.noDrag,x=t.noDragEventsBubbling,O=t.onError,E=t.validator,C=(0,n.useMemo)((function(){return function(e){if(q(e))return Object.entries(e).reduce((function(e,t){var r=P(t,2),n=r[0],o=r[1];return[].concat(A(e),[n],A(o))}),[]).filter((function(e){return G(e)||N(e)})).join(",")}(r)}),[r]),z=(0,n.useMemo)((function(){return function(e){return q(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=P(e,2),r=t[0],n=t[1],o=!0;return G(r)||(console.warn('Skipped "'.concat(r,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(n)&&n.every(N)||(console.warn('Skipped "'.concat(r,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var r=P(t,2),n=r[0],o=r[1];return F(F({},e),{},S({},n,o))}),{})}]:e}(r)}),[r]),R=(0,n.useMemo)((function(){return"function"==typeof b?b:le}),[b]),I=(0,n.useMemo)((function(){return"function"==typeof h?h:le}),[h]),T=(0,n.useRef)(null),W=(0,n.useRef)(null),H=J((0,n.useReducer)(ce,ie),2),X=H[0],ne=H[1],ae=X.isFocused,ue=X.isFileDialogActive,se=(0,n.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&"showOpenFilePicker"in window),pe=function(){!se.current&&ue&&setTimeout((function(){W.current&&(W.current.files.length||(ne({type:"closeDialog"}),I()))}),300)};(0,n.useEffect)((function(){return window.addEventListener("focus",pe,!1),function(){window.removeEventListener("focus",pe,!1)}}),[W,ue,I,se]);var fe=(0,n.useRef)([]),de=function(e){T.current&&T.current.contains(e.target)||(e.preventDefault(),fe.current=[])};(0,n.useEffect)((function(){return w&&(document.addEventListener("dragover",K,!1),document.addEventListener("drop",de,!1)),function(){w&&(document.removeEventListener("dragover",K),document.removeEventListener("drop",de))}}),[T,w]),(0,n.useEffect)((function(){return!o&&y&&T.current&&T.current.focus(),function(){}}),[T,y,o]);var me=(0,n.useCallback)((function(e){O?O(e):console.error(e)}),[O]),ge=(0,n.useCallback)((function(e){var t;e.preventDefault(),e.persist(),Fe(e),fe.current=[].concat(function(e){if(Array.isArray(e))return V(e)}(t=fe.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||Q(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e.target]),B(e)&&Promise.resolve(i(e)).then((function(t){if(!$(e)||x){var r=t.length,n=r>0&&function(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,c=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=P(_(e,r),1)[0],i=P(L(e,n,o),1)[0],a=c?c(e):null;return t&&i&&!a}))}({files:t,accept:C,minSize:c,maxSize:a,multiple:l,maxFiles:u,validator:E});ne({isDragAccept:n,isDragReject:r>0&&!n,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e)}})).catch((function(e){return me(e)}))}),[i,s,me,x,C,c,a,l,u,E]),he=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Fe(e);var t=B(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&f&&f(e),!1}),[f,x]),be=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Fe(e);var t=fe.current.filter((function(e){return T.current&&T.current.contains(e)})),r=t.indexOf(e.target);-1!==r&&t.splice(r,1),fe.current=t,t.length>0||(ne({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),B(e)&&p&&p(e))}),[T,p,x]),ve=(0,n.useCallback)((function(e,t){var r=[],n=[];e.forEach((function(e){var t=J(_(e,C),2),o=t[0],i=t[1],l=J(L(e,c,a),2),u=l[0],s=l[1],p=E?E(e):null;if(o&&u&&!p)r.push(e);else{var f=[i,s];p&&(f=f.concat(p)),n.push({file:e,errors:f.filter((function(e){return e}))})}})),(!l&&r.length>1||l&&u>=1&&r.length>u)&&(r.forEach((function(e){n.push({file:e,errors:[M]})})),r.splice(0)),ne({acceptedFiles:r,fileRejections:n,type:"setFiles"}),d&&d(r,n,t),n.length>0&&g&&g(n,t),r.length>0&&m&&m(r,t)}),[ne,l,C,c,a,u,d,m,g,E]),ye=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Fe(e),fe.current=[],B(e)&&Promise.resolve(i(e)).then((function(t){$(e)&&!x||ve(t,e)})).catch((function(e){return me(e)})),ne({type:"reset"})}),[i,ve,me,x]),we=(0,n.useCallback)((function(){if(se.current){ne({type:"openDialog"}),R();var e={multiple:l,types:z};window.showOpenFilePicker(e).then((function(e){return i(e)})).then((function(e){ve(e,null),ne({type:"closeDialog"})})).catch((function(e){var t;(t=e)instanceof DOMException&&("AbortError"===t.name||t.code===t.ABORT_ERR)?(I(e),ne({type:"closeDialog"})):function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?(se.current=!1,W.current?(W.current.value=null,W.current.click()):me(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):me(e)}))}else W.current&&(ne({type:"openDialog"}),R(),W.current.value=null,W.current.click())}),[ne,R,I,v,ve,me,z,l]),ke=(0,n.useCallback)((function(e){T.current&&T.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),we()))}),[T,we]),De=(0,n.useCallback)((function(){ne({type:"focus"})}),[]),je=(0,n.useCallback)((function(){ne({type:"blur"})}),[]),xe=(0,n.useCallback)((function(){k||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?setTimeout(we,0):we())}),[k,we]),Oe=function(e){return o?null:e},Ae=function(e){return D?null:Oe(e)},Ee=function(e){return j?null:Oe(e)},Fe=function(e){x&&e.stopPropagation()},Se=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,n=e.role,i=e.onKeyDown,a=e.onFocus,c=e.onBlur,l=e.onClick,u=e.onDragEnter,s=e.onDragOver,p=e.onDragLeave,f=e.onDrop,d=re(e,Z);return ee(ee(te({onKeyDown:Ae(U(i,ke)),onFocus:Ae(U(a,De)),onBlur:Ae(U(c,je)),onClick:Oe(U(l,xe)),onDragEnter:Ee(U(u,ge)),onDragOver:Ee(U(s,he)),onDragLeave:Ee(U(p,be)),onDrop:Ee(U(f,ye)),role:"string"==typeof n&&""!==n?n:"presentation"},r,T),o||D?{}:{tabIndex:0}),d)}}),[T,ke,De,je,xe,ge,he,be,ye,D,j,o]),Pe=(0,n.useCallback)((function(e){e.stopPropagation()}),[]),Ce=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,n=e.onChange,o=e.onClick,i=re(e,Y);return ee(ee({},te({accept:C,multiple:l,type:"file",style:{display:"none"},onChange:Oe(U(n,ye)),onClick:Oe(U(o,Pe)),tabIndex:-1},r,W)),i)}}),[W,r,l,ye,o]);return ee(ee({},X),{},{isFocused:ae&&!o,getRootProps:Se,getInputProps:Ce,rootRef:T,inputRef:W,open:Oe(we)})}function ce(e,t){switch(t.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},ie),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ee(ee({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ee(ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ee({},ie);default:return e}}function le(){}},76198:(e,t,r)=>{r.d(t,{O9:()=>c,_8:()=>i,yd:()=>a});class n{constructor(e){const{length:t,separator:r,dictionaries:n,style:o,seed:i}=e;this.dictionaries=n,this.separator=r,this.length=t,this.style=o,this.seed=i}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.\nLength provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);return this.dictionaries.slice(0,this.length).reduce(((e,t)=>{let r=t[Math.floor((this.seed?(n=this.seed,(e=>{e=1831565813+(e|=0)|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296})(n)):Math.random())*t.length)]||"";var n;if("lowerCase"===this.style)r=r.toLowerCase();else if("capital"===this.style){const[e,...t]=r.split("");r=e.toUpperCase()+t.join("")}else"upperCase"===this.style&&(r=r.toUpperCase());return e?`${e}${this.separator}${r}`:`${r}`}),"")}}const o={separator:"_",dictionaries:[]},i=e=>{const t=[...e&&e.dictionaries||o.dictionaries],r={...o,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new n(r).generate()};var a=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],c=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"]}}]);
|