react-dropzone-uploader
Advanced tools
Comparing version 2.5.2 to 2.6.0
@@ -14,2 +14,2 @@ module.exports=function(r){var n={};function a(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=r,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=27)}([function(e,t,r){e.exports=r(25)()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";e.exports=r(23)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var a=r(3);e.exports=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(e){a(t,e,r[e])})}return t}},function(e,t,r){e.exports=r(16)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,r){var n=r(21),a=r(1);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?a(e):t}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.exports=r},function(e,t,r){var n=r(22);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t){function s(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}e.exports=function(u){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=u.apply(e,i);function a(e){s(n,t,r,a,o,"next",e)}function o(e){s(n,t,r,a,o,"throw",e)}a(void 0)})}}},function(e,t,r){var n=r(18),a=r(19),o=r(20);e.exports=function(e){return n(e)||a(e)||o()}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgOCAxNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMzMzMzMzIj48cGF0aCBkPSJNMSwxNCBDMC40LDE0IDAsMTMuNiAwLDEzIEwwLDEgQzAsMC40IDAuNCwwIDEsMCBDMS42LDAgMiwwLjQgMiwxIEwyLDEzIEMyLDEzLjYgMS42LDE0IDEsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48cGF0aCBkPSJNNywxNCBDNi40LDE0IDYsMTMuNiA2LDEzIEw2LDEgQzYsMC40IDYuNCwwIDcsMCBDNy42LDAgOCwwLjQgOCwxIEw4LDEzIEM4LDEzLjYgNy42LDE0IDcsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48L2c+PC9zdmc+Cg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTQgMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMCwgMC4wKSIgZmlsbD0iIzMzMzMzMyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNC4wLCAwLjApIj48cG9seWdvbiBwb2ludHM9IjcuNzE5IDQuOTY0IDEyLjY5MiAwLjAxNyAxNC4zODkgMS43MTUgOS40MTIgNi42NjYgMTQuMzU0IDExLjYzNCAxMi42NTcgMTMuMzMxIDYuMDE3IDYuNjU3IDcuNzE1IDQuOTYwIj48L3BvbHlnb24+PHBvbHlnb24gcG9pbnRzPSI3LjYxMiA0Ljk2NCA3LjYxNiA0Ljk2MCA5LjMxMyA2LjY1NyAyLjY3NCAxMy4zMzEgMC45NzcgMTEuNjM0IDUuOTE5IDYuNjY2IDAuOTQyIDEuNzE1IDIuNjM5IDAuMDE3Ij48L3BvbHlnb24+PC9nPjwvZz48L3N2Zz4K"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTAuNSwxNC45IEMwLjIsMTQuNyAwLDE0LjQgMCwxNCBMMCwyIEMwLDEuNiAwLjIsMS4zIDAuNSwxLjEgQzAuOCwwLjkgMS4yLDAuOSAxLjUsMS4xIEwxMC41LDcuMSBDMTAuOCw3LjMgMTAuOSw3LjYgMTAuOSw3LjkgQzEwLjksOC4yIDEwLjcsOC41IDEwLjUsOC43IEwxLjUsMTQuNyBDMS40LDE0LjkgMC44LDE1LjEgMC41LDE0LjkgWiBNMiwzLjkgTDIsMTIuMiBMOC4yLDguMSBMMiwzLjkgWiI+PC9wYXRoPjwvZz48L3N2Zz4K"},function(e,t,r){var n=function(){return this||"object"==typeof self&&self}()||Function("return this")(),a=n.regeneratorRuntime&&0<=Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime"),o=a&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(17),a)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(z,e){!function(e){"use strict";var s,t=Object.prototype,c=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",n=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag",i="object"==typeof z,u=e.regeneratorRuntime;if(u)i&&(z.exports=u);else{(u=e.regeneratorRuntime=i?z.exports:{}).wrap=g;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",y={},l={};l[a]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(N([])));v&&v!==t&&c.call(v,a)&&(l=v);var b=j.prototype=x.prototype=Object.create(l);S.prototype=b.constructor=j,j.constructor=S,j[o]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(b),e},u.awrap=function(e){return{__await:e}},R(_.prototype),_.prototype[n]=function(){return this},u.AsyncIterator=_,u.async=function(e,t,r,n){var a=new _(g(e,t,r,n));return u.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},R(b),b[o]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},u.keys=function(r){var n=[];for(var e in r)n.push(e);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},u.values=N,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return o.type="throw",o.arg=r,n.next=e,t&&(n.method="next",n.arg=s),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var a=this.tryEntries[t],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=c.call(a,"catchLoc"),u=c.call(a,"finallyLoc");if(i&&u){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:N(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=s),y}}}function g(e,t,r,n){var o,i,u,s,a=t&&t.prototype instanceof x?t:x,c=Object.create(a.prototype),l=new L(n||[]);return c._invoke=(o=e,i=r,u=l,s=f,function(e,t){if(s===d)throw new Error("Generator is already running");if(s===m){if("throw"===e)throw t;return D()}for(u.method=e,u.arg=t;;){var r=u.delegate;if(r){var n=C(r,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(s===f)throw s=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);s=d;var a=w(o,i,u);if("normal"===a.type){if(s=u.done?m:p,a.arg===y)continue;return{value:a.arg,done:u.done}}"throw"===a.type&&(s=m,u.method="throw",u.arg=a.arg)}}),c}function w(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function x(){}function S(){}function j(){}function R(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function _(s){var t;this._invoke=function(r,n){function e(){return new Promise(function(e,t){!function t(e,r,n,a){var o=w(s[e],s,r);if("throw"!==o.type){var i=o.arg,u=i.value;return u&&"object"==typeof u&&c.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,n,a)},function(e){t("throw",e,n,a)}):Promise.resolve(u).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,a)})}a(o.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}}function C(e,t){var r=e.iterator[t.method];if(r===s){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=s,C(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=w(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,y;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=s),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function N(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=s,e.done=!0,e};return n.next=n}}return{next:D}}function D(){return{value:s,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?t.exports=n=function(e){return r(e)}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}t.exports=n},function(r,e){function n(e,t){return r.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}r.exports=n},function(e,t,r){"use strict"; | ||
@license MIT | ||
*/var s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))c.call(r,i)&&(a[i]=r[i]);if(s){n=s(r);for(var u=0;u<n.length;u++)l.call(r,n[u])&&(a[n[u]]=r[n[u]])}}return a}},function(e,t,r){"use strict";var u=r(26);function n(){}e.exports=function(){function e(e,t,r,n,a,o){if(o!==u){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}var r={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(5),j=r.n(n),a=r(11),o=r.n(a),i=r(12),le=r.n(i),u=r(4),fe=r.n(u),s=r(6),c=r.n(s),l=r(7),f=r.n(l),p=r(8),d=r.n(p),m=r(9),y=r.n(m),h=r(10),v=r.n(h),b=r(1),g=r.n(b),w=r(3),x=r.n(w),S=r(2),pe=r.n(S),R=r(0),_=r.n(R),C=function(e){var t=e.input,r=e.previews,n=e.submitButton,a=e.dropzoneProps,o=e.files,i=e.extra.maxFiles;return pe.a.createElement("div",a,r,o.length<i&&t,0<o.length&&n)};C.propTypes={input:_.a.node,previews:_.a.arrayOf(_.a.node),submitButton:_.a.node,dropzoneProps:_.a.shape({ref:_.a.any.isRequired,className:_.a.string.isRequired,style:_.a.object,onDragEnter:_.a.func.isRequired,onDragOver:_.a.func.isRequired,onDragLeave:_.a.func.isRequired,onDrop:_.a.func.isRequired}).isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,onFiles:_.a.func.isRequired,onCancelFile:_.a.func.isRequired,onRemoveFile:_.a.func.isRequired,onRestartFile:_.a.func.isRequired}).isRequired};var de=C,E=function(e){for(var t=0,r=e;1024<=r;)r/=1024,t+=1;return"".concat(r.toFixed(10<=r||t<1?0:1)).concat(["bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][t])},O=function(e){var t=new Date(null);t.setSeconds(e);var r=t.toISOString().slice(11,19);return e<3600?r.slice(3):r},me=function(e,t){if(!e||!t||"*"===t)return!0;var r=e.name||"",n=e.type||"",a=n.replace(/\/.*$/,"");return t.split(",").map(function(e){return e.trim()}).some(function(e){return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):e.endsWith("/*")?a===e.replace(/\/.*$/,""):n===e})},ye=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,r):e},he={dropzone:"dzu-dropzone",dropzoneActive:"dzu-dropzoneActive",dropzoneReject:"dzu-dropzoneActive",dropzoneDisabled:"dzu-dropzoneDisabled",input:"dzu-input",inputLabel:"dzu-inputLabel",inputLabelWithFiles:"dzu-inputLabelWithFiles",preview:"dzu-previewContainer",previewImage:"dzu-previewImage",submitButtonContainer:"dzu-submitButtonContainer",submitButton:"dzu-submitButton"},L=function(e){var t=[];if(e.dataTransfer){var r=e.dataTransfer;r.files&&r.files.length?t=r.files:r.items&&r.items.length&&(t=r.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)},N=function(e){var t=e.className,r=e.labelClassName,n=e.labelWithFilesClassName,a=e.style,o=e.labelStyle,i=e.labelWithFilesStyle,u=e.accept,s=e.multiple,c=e.disabled,l=e.content,f=e.withFilesContent,p=e.onFiles,d=e.files;return pe.a.createElement("label",{className:0<d.length?n:r,style:0<d.length?i:o},0<d.length?f:l,pe.a.createElement("input",{className:t,style:a,type:"file",accept:u,multiple:s,disabled:c,onChange:function(e){p(L(e)),e.target.value=null}}))};N.propTypes={className:_.a.string,labelClassName:_.a.string,labelWithFilesClassName:_.a.string,style:_.a.object,labelStyle:_.a.object,labelWithFilesStyle:_.a.object,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,disabled:_.a.bool.isRequired,content:_.a.node,withFilesContent:_.a.node,onFiles:_.a.func.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ve=N,D=r(13),z=r.n(D),M=r(14),I=r.n(M),P=r(15),q=r.n(P),k={cancel:{backgroundImage:"url(".concat(z.a,")")},remove:{backgroundImage:"url(".concat(I.a,")")},restart:{backgroundImage:"url(".concat(q.a,")")}},B=function(e){function t(){return c()(this,t),d()(this,y()(t).apply(this,arguments))}return v()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.imageClassName,n=e.style,a=e.imageStyle,o=e.fileWithMeta,i=o.cancel,u=o.remove,s=o.restart,c=e.meta,l=c.name,f=void 0===l?"":l,p=c.percent,d=void 0===p?0:p,m=c.size,y=void 0===m?0:m,h=c.previewUrl,v=c.status,b=c.duration,g=c.validationError,w=e.isUpload,x=e.canCancel,S=e.canRemove,j=e.canRestart,R=e.extra.minSizeBytes,_="".concat(f||"?",", ").concat(E(y));return b&&(_="".concat(_,", ").concat(O(b))),"error_file_size"===v||"error_validation"===v?pe.a.createElement("div",{className:t,style:n},pe.a.createElement("span",{className:"dzu-previewFileNameError"},_),"error_file_size"===v&&pe.a.createElement("span",null,y<R?"File too small":"File too big"),"error_validation"===v&&pe.a.createElement("span",null,String(g)),S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u})):("error_upload_params"!==v&&"exception_upload"!==v&&"error_upload"!==v||(_="".concat(_," (upload failed)")),"aborted"===v&&(_="".concat(_," (cancelled)")),pe.a.createElement("div",{className:t,style:n},h&&pe.a.createElement("img",{className:r,style:a,src:h,alt:_,title:_}),!h&&pe.a.createElement("span",{className:"dzu-previewFileName"},_),pe.a.createElement("div",{className:"dzu-previewStatusContainer"},w&&pe.a.createElement("progress",{max:100,value:"done"===v||"headers_received"===v?100:d}),"uploading"===v&&x&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.cancel,onClick:i}),"uploading"!==v&&"preparing"!==v&&S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u}),["error_upload_params","exception_upload","error_upload","aborted","ready"].includes(v)&&j&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.restart,onClick:s}))))}}]),t}(pe.a.PureComponent);B.propTypes={className:_.a.string,imageClassName:_.a.string,style:_.a.object,imageStyle:_.a.object,fileWithMeta:_.a.shape({file:_.a.any.isRequired,meta:_.a.object.isRequired,cancel:_.a.func.isRequired,restart:_.a.func.isRequired,remove:_.a.func.isRequired,xhr:_.a.any}).isRequired,meta:_.a.shape({status:_.a.oneOf(["preparing","error_file_size","error_validation","ready","uploading","error_upload_params","exception_upload","aborted","error_upload","headers_received","done"]).isRequired,type:_.a.string.isRequired,name:_.a.string,uploadedDate:_.a.string.isRequired,percent:_.a.number,size:_.a.number,lastModifiedDate:_.a.string,previewUrl:_.a.string,duration:_.a.number,width:_.a.number,height:_.a.number,videoWidth:_.a.number,videoHeight:_.a.number,validationError:_.a.any}).isRequired,isUpload:_.a.bool.isRequired,canCancel:_.a.bool.isRequired,canRemove:_.a.bool.isRequired,canRestart:_.a.bool.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var be=B,T=function(e){var t=e.className,r=e.buttonClassName,n=e.style,a=e.buttonStyle,o=e.disabled,i=e.content,u=e.onSubmit,s=e.files,c=s.some(function(e){return["uploading","preparing"].includes(e.meta.status)})||!s.some(function(e){return["headers_received","done"].includes(e.meta.status)});return pe.a.createElement("div",{className:t,style:n},pe.a.createElement("button",{className:r,style:a,onClick:function(){u(s.filter(function(e){return["headers_received","done"].includes(e.meta.status)}))},disabled:o||c},i))};T.propTypes={className:_.a.string,buttonClassName:_.a.string,style:_.a.object,buttonStyle:_.a.object,disabled:_.a.bool.isRequired,content:_.a.node,onSubmit:_.a.func.isRequired,files:_.a.arrayOf(_.a.object).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ge=T;r.d(t,"Layout",function(){return de}),r.d(t,"Input",function(){return ve}),r.d(t,"Preview",function(){return be}),r.d(t,"SubmitButton",function(){return ge}),r.d(t,"formatBytes",function(){return E}),r.d(t,"formatDuration",function(){return O}),r.d(t,"accepts",function(){return me}),r.d(t,"defaultClassNames",function(){return he});var F=0,A=function(e){function t(e){var S;return c()(this,t),S=d()(this,y()(t).call(this,e)),x()(g()(g()(S)),"_forceUpdate",function(){S._mounted&&S.forceUpdate()}),x()(g()(g()(S)),"handleDragEnter",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!0,dragged:L(e)})}),x()(g()(g()(S)),"handleDragOver",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(S._dragTimeoutId),S.setState({active:!0,dragged:L(e)})}),x()(g()(g()(S)),"handleDragLeave",function(e){e.preventDefault(),e.stopPropagation(),S._dragTimeoutId=setTimeout(function(){return S.setState({active:!1,dragged:[]})},150)}),x()(g()(g()(S)),"handleDrop",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!1,dragged:[]}),S.handleFiles(L(e))}),x()(g()(g()(S)),"handleDropDisabled",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!1,dragged:[]})}),x()(g()(g()(S)),"handleChangeStatus",function(e){if(S.props.onChangeStatus){var t=(S.props.onChangeStatus(e,e.meta.status,S._files)||{}).meta;t&&(delete t.status,e.meta=fe()({},e.meta,t),S._forceUpdate())}}),x()(g()(g()(S)),"handleSubmit",function(e){S.props.onSubmit&&S.props.onSubmit(e,le()(S._files))}),x()(g()(g()(S)),"handleCancel",function(e){"uploading"===e.meta.status&&(e.meta.status="aborted",e.xhr.abort(),S.handleChangeStatus(e),S._forceUpdate())}),x()(g()(g()(S)),"handleRemove",function(t){var e=S._files.findIndex(function(e){return e.meta.id===t.meta.id});-1!==e&&(t.meta.status="removed",S.handleChangeStatus(t),S._files.splice(e,1),S._forceUpdate())}),x()(g()(g()(S)),"handleRestart",function(e){S.props.getUploadParams&&("ready"===e.meta.status?e.meta.status="started":e.meta.status="restarted",S.handleChangeStatus(e),e.meta.status="uploading",e.meta.percent=0,S.handleChangeStatus(e),S._forceUpdate(),S.uploadFile(e))}),x()(g()(g()(S)),"handleFiles",function(e){e.forEach(function(e){return S.handleFile(e)});var t=S._dropzone.current;t&&setTimeout(function(){return t.scroll({top:t.scrollHeight,behavior:"smooth"})},150)}),x()(g()(g()(S)),"handleFile",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,n=t.size,a=t.type,o=t.lastModified,i=S.props,u=i.minSizeBytes,s=i.maxSizeBytes,c=i.maxFiles,l=i.accept,f=i.getUploadParams,p=i.autoUpload,d=i.validate,m=(new Date).toISOString(),y=o&&new Date(o).toISOString(),h={file:t,meta:{name:r,size:n,type:a,lastModifiedDate:y,uploadedDate:m,percent:0,id:F}},"application/x-moz-file"===t.type||me(t,l)){e.next=9;break}return h.meta.status="rejected_file_type",S.handleChangeStatus(h),e.abrupt("return");case 9:if(S._files.length>=c)return h.meta.status="rejected_max_files",S.handleChangeStatus(h),e.abrupt("return");e.next=13;break;case 13:if(h.cancel=function(){return S.handleCancel(h)},h.remove=function(){return S.handleRemove(h)},h.restart=function(){return S.handleRestart(h)},h.meta.status="preparing",S._files.push(h),S.handleChangeStatus(h),S._forceUpdate(),F+=1,n<u||s<n)return h.meta.status="error_file_size",S.handleChangeStatus(h),S._forceUpdate(),e.abrupt("return");e.next=26;break;case 26:return e.next=28,S.generatePreview(h);case 28:if(!d){e.next=36;break}if(v=d(h))return h.meta.status="error_validation",h.meta.validationError=v,S.handleChangeStatus(h),S._forceUpdate(),e.abrupt("return");e.next=36;break;case 36:h.meta.status=f?p?(S.uploadFile(h),"uploading"):"ready":"done",S.handleChangeStatus(h),S._forceUpdate();case 39:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(S)),"generatePreview",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.meta.type,n=t.file,a=r.startsWith("image/"),o=r.startsWith("audio/"),i=r.startsWith("video/"),a||o||i){e.next=6;break}return e.abrupt("return");case 6:if(u=URL.createObjectURL(n),s=function(t,r){return new Promise(function(e){t[r]=e})},e.prev=8,a)return(c=new Image).src=u,t.meta.previewUrl=u,e.next=15,s(c,"onload");e.next=17;break;case 15:t.meta.width=c.width,t.meta.height=c.height;case 17:if(o)return(l=new Audio).src=u,e.next=22,s(l,"onloadedmetadata");e.next=23;break;case 22:t.meta.duration=l.duration;case 23:if(i)return(f=document.createElement("video")).src=u,e.next=28,s(f,"onloadedmetadata");e.next=31;break;case 28:t.meta.duration=f.duration,t.meta.videoWidth=f.videoWidth,t.meta.videoHeight=f.videoHeight;case 31:URL.revokeObjectURL(u),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(8),URL.revokeObjectURL(u);case 37:S._forceUpdate();case 38:case"end":return e.stop()}},e,this,[[8,34]])}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(S)),"uploadFile",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v,b,g,w,x;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.props.getUploadParams,e.prev=1,e.next=4,r(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error("Error Upload Params",e.t0.stack);case 10:if(o=(a=n||{}).fields,i=void 0===o?{}:o,u=a.headers,s=void 0===u?{}:u,c=a.meta,l=void 0===c?{}:c,f=a.method,p=void 0===f?"POST":f,d=a.url,delete l.status,d){e.next=17;break}return t.meta.status="error_upload_params",S.handleChangeStatus(t),S._forceUpdate(),e.abrupt("return");case 17:for(m=new XMLHttpRequest,y=new FormData,m.open(p,d,!0),h=Object.keys(i),v=0;v<h.length;v++)b=h[v],y.append(b,i[b]);for(m.setRequestHeader("X-Requested-With","XMLHttpRequest"),g=Object.keys(s),w=0;w<g.length;w++)x=g[w],m.setRequestHeader(x,s[x]);t.meta=fe()({},t.meta,l),m.upload.addEventListener("progress",function(e){t.meta.percent=100*e.loaded/e.total||100,S._forceUpdate()}),m.addEventListener("readystatechange",function(){2!==m.readyState&&4!==m.readyState||(0===m.status&&"aborted"!==t.meta.status&&(t.meta.status="exception_upload",S.handleChangeStatus(t),S._forceUpdate()),0<m.status&&m.status<400&&(t.meta.percent=100,2===m.readyState&&(t.meta.status="headers_received"),4===m.readyState&&(t.meta.status="done"),S.handleChangeStatus(t),S._forceUpdate()),400<=m.status&&"error_upload"!==t.meta.status&&(t.meta.status="error_upload",S.handleChangeStatus(t),S._forceUpdate()))}),y.append("file",t.file),S.props.timeout&&(m.timeout=S.props.timeout),m.send(y),t.xhr=m;case 32:case"end":return e.stop()}},e,this,[[1,7]])}));return function(e){return t.apply(this,arguments)}}()),S.state={active:!1,dragged:[]},S._files=[],S._mounted=!0,S._dropzone=pe.a.createRef(),S}return v()(t,e),f()(t,[{key:"componentWillUnmount",value:function(){var e=!(this._mounted=!1),t=!1,r=void 0;try{for(var n,a=this._files[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value;this.handleCancel(o)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}}},{key:"render",value:function(){var e=this.props,t=e.accept,r=e.multiple,n=e.maxFiles,a=e.minSizeBytes,o=e.maxSizeBytes,i=e.onSubmit,u=e.getUploadParams,s=e.disabled,c=e.canCancel,l=e.canRemove,f=e.canRestart,p=e.inputContent,d=e.inputWithFilesContent,m=e.submitButtonDisabled,y=e.submitButtonContent,h=e.classNames,v=e.styles,b=e.addClassNames,g=e.InputComponent,w=e.PreviewComponent,x=e.SubmitButtonComponent,S=e.LayoutComponent,j=this.state,R=j.active,_=j.dragged,C=_.some(function(e){return"application/x-moz-file"!==e.type&&!me(e,t)}),E={active:R,reject:C,dragged:_,accept:t,multiple:r,minSizeBytes:a,maxSizeBytes:o,maxFiles:n},O=le()(this._files),L=ye(s,O,E),N=function(e,t,r){for(var n=fe()({},he),a=fe()({},t),o=arguments.length,i=new Array(3<o?o-3:0),u=3;u<o;u++)i[u-3]=arguments[u];for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];n[l]=ye.apply(void 0,[e[l]].concat(i))}for(var f=Object.keys(r),p=0;p<f.length;p++){var d=f[p];n[d]="".concat(n[d]," ").concat(ye.apply(void 0,[r[d]].concat(i)))}for(var m=Object.keys(t),y=0;y<m.length;y++){var h=m[y];a[h]=ye.apply(void 0,[t[h]].concat(i))}return{classNames:n,styles:a}}(h,v,b,O,E),D=N.classNames,z=D.dropzone,M=D.dropzoneActive,I=D.dropzoneReject,P=D.dropzoneDisabled,q=D.input,k=D.inputLabel,B=D.inputLabelWithFiles,T=D.preview,F=D.previewImage,A=D.submitButtonContainer,U=D.submitButton,W=N.styles,G=W.dropzone,H=W.dropzoneActive,Y=W.dropzoneReject,Q=W.dropzoneDisabled,$=W.input,Z=W.inputLabel,J=W.inputLabelWithFiles,V=W.preview,X=W.previewImage,K=W.submitButtonContainer,ee=W.submitButton,te=g||ve,re=w||be,ne=x||ge,ae=S||de,oe=null;null!==w&&(oe=O.map(function(e){return pe.a.createElement(re,{className:T,imageClassName:F,style:V,imageStyle:X,key:e.meta.id,fileWithMeta:e,meta:fe()({},e.meta),isUpload:Boolean(u),canCancel:ye(c,O,E),canRemove:ye(l,O,E),canRestart:ye(f,O,E),files:O,extra:E})}));var ie=null!==g?pe.a.createElement(te,{className:q,labelClassName:k,labelWithFilesClassName:B,style:$,labelStyle:Z,labelWithFilesStyle:J,accept:t,multiple:r,disabled:L,content:ye(p,O,E),withFilesContent:ye(d,O,E),onFiles:this.handleFiles,files:O,extra:E}):null,ue=i&&null!==x?pe.a.createElement(ne,{className:A,buttonClassName:U,style:K,buttonStyle:ee,disabled:ye(m,O,E),content:ye(y,O,E),onSubmit:this.handleSubmit,files:O,extra:E}):null,se=z,ce=G;return L?(se="".concat(se," ").concat(P),ce=fe()({},ce||{},Q||{})):C?(se="".concat(se," ").concat(I),ce=fe()({},ce||{},Y||{})):R&&(se="".concat(se," ").concat(M),ce=fe()({},ce||{},H||{})),pe.a.createElement(ae,{input:ie,previews:oe,submitButton:ue,dropzoneProps:{ref:this._dropzone,className:se,style:ce,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:L?this.handleDropDisabled:this.handleDrop},files:O,extra:fe()({},E,{onFiles:this.handleFiles,onCancelFile:this.handleCancel,onRemoveFile:this.handleRemove,onRestartFile:this.handleRestart})})}}]),t}(pe.a.Component);A.propTypes={onChangeStatus:_.a.func,getUploadParams:_.a.func,onSubmit:_.a.func,accept:_.a.string,multiple:_.a.bool,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,validate:_.a.func,autoUpload:_.a.bool,timeout:_.a.number,disabled:_.a.oneOfType([_.a.bool,_.a.func]),canCancel:_.a.oneOfType([_.a.bool,_.a.func]),canRemove:_.a.oneOfType([_.a.bool,_.a.func]),canRestart:_.a.oneOfType([_.a.bool,_.a.func]),inputContent:_.a.oneOfType([_.a.node,_.a.func]),inputWithFilesContent:_.a.oneOfType([_.a.node,_.a.func]),submitButtonDisabled:_.a.oneOfType([_.a.bool,_.a.func]),submitButtonContent:_.a.oneOfType([_.a.node,_.a.func]),classNames:_.a.object.isRequired,styles:_.a.object.isRequired,addClassNames:_.a.object.isRequired,InputComponent:_.a.func,PreviewComponent:_.a.func,SubmitButtonComponent:_.a.func,LayoutComponent:_.a.func},A.defaultProps={accept:"*",multiple:!0,minSizeBytes:0,maxSizeBytes:Number.MAX_SAFE_INTEGER,maxFiles:Number.MAX_SAFE_INTEGER,autoUpload:!0,disabled:!1,canCancel:!0,canRemove:!0,canRestart:!0,inputContent:"Drag Files or Click to Browse",inputWithFilesContent:"Add Files",submitButtonDisabled:!1,submitButtonContent:"Submit",classNames:{},styles:{},addClassNames:{}};t.default=A}]); | ||
*/var s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))c.call(r,i)&&(a[i]=r[i]);if(s){n=s(r);for(var u=0;u<n.length;u++)l.call(r,n[u])&&(a[n[u]]=r[n[u]])}}return a}},function(e,t,r){"use strict";var u=r(26);function n(){}e.exports=function(){function e(e,t,r,n,a,o){if(o!==u){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}var r={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(5),R=r.n(n),a=r(11),o=r.n(a),i=r(12),le=r.n(i),u=r(4),fe=r.n(u),s=r(6),c=r.n(s),l=r(7),f=r.n(l),p=r(8),d=r.n(p),m=r(9),y=r.n(m),h=r(10),v=r.n(h),b=r(1),g=r.n(b),w=r(3),x=r.n(w),S=r(2),pe=r.n(S),j=r(0),_=r.n(j),C=function(e){var t=e.input,r=e.previews,n=e.submitButton,a=e.dropzoneProps,o=e.files,i=e.extra.maxFiles;return pe.a.createElement("div",a,r,o.length<i&&t,0<o.length&&n)};C.propTypes={input:_.a.node,previews:_.a.arrayOf(_.a.node),submitButton:_.a.node,dropzoneProps:_.a.shape({ref:_.a.any.isRequired,className:_.a.string.isRequired,style:_.a.object,onDragEnter:_.a.func.isRequired,onDragOver:_.a.func.isRequired,onDragLeave:_.a.func.isRequired,onDrop:_.a.func.isRequired}).isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,onFiles:_.a.func.isRequired,onCancelFile:_.a.func.isRequired,onRemoveFile:_.a.func.isRequired,onRestartFile:_.a.func.isRequired}).isRequired};var de=C,E=function(e){for(var t=0,r=e;1024<=r;)r/=1024,t+=1;return"".concat(r.toFixed(10<=r||t<1?0:1)).concat(["bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][t])},O=function(e){var t=new Date(null);t.setSeconds(e);var r=t.toISOString().slice(11,19);return e<3600?r.slice(3):r},me=function(e,t){if(!e||!t||"*"===t)return!0;var r=e.name||"",n=e.type||"",a=n.replace(/\/.*$/,"");return t.split(",").map(function(e){return e.trim()}).some(function(e){return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):e.endsWith("/*")?a===e.replace(/\/.*$/,""):n===e})},ye=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,r):e},he={dropzone:"dzu-dropzone",dropzoneActive:"dzu-dropzoneActive",dropzoneReject:"dzu-dropzoneActive",dropzoneDisabled:"dzu-dropzoneDisabled",input:"dzu-input",inputLabel:"dzu-inputLabel",inputLabelWithFiles:"dzu-inputLabelWithFiles",preview:"dzu-previewContainer",previewImage:"dzu-previewImage",submitButtonContainer:"dzu-submitButtonContainer",submitButton:"dzu-submitButton"},L=function(e){var t=[];if(e.dataTransfer){var r=e.dataTransfer;r.files&&r.files.length?t=r.files:r.items&&r.items.length&&(t=r.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)},N=function(e){var t=e.className,r=e.labelClassName,n=e.labelWithFilesClassName,a=e.style,o=e.labelStyle,i=e.labelWithFilesStyle,u=e.accept,s=e.multiple,c=e.disabled,l=e.content,f=e.withFilesContent,p=e.onFiles,d=e.files;return pe.a.createElement("label",{className:0<d.length?n:r,style:0<d.length?i:o},0<d.length?f:l,pe.a.createElement("input",{className:t,style:a,type:"file",accept:u,multiple:s,disabled:c,onChange:function(e){p(L(e)),e.target.value=null}}))};N.propTypes={className:_.a.string,labelClassName:_.a.string,labelWithFilesClassName:_.a.string,style:_.a.object,labelStyle:_.a.object,labelWithFilesStyle:_.a.object,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,disabled:_.a.bool.isRequired,content:_.a.node,withFilesContent:_.a.node,onFiles:_.a.func.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ve=N,D=r(13),z=r.n(D),M=r(14),I=r.n(M),P=r(15),q=r.n(P),k={cancel:{backgroundImage:"url(".concat(z.a,")")},remove:{backgroundImage:"url(".concat(I.a,")")},restart:{backgroundImage:"url(".concat(q.a,")")}},B=function(e){function t(){return c()(this,t),d()(this,y()(t).apply(this,arguments))}return v()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.imageClassName,n=e.style,a=e.imageStyle,o=e.fileWithMeta,i=o.cancel,u=o.remove,s=o.restart,c=e.meta,l=c.name,f=void 0===l?"":l,p=c.percent,d=void 0===p?0:p,m=c.size,y=void 0===m?0:m,h=c.previewUrl,v=c.status,b=c.duration,g=c.validationError,w=e.isUpload,x=e.canCancel,S=e.canRemove,j=e.canRestart,R=e.extra.minSizeBytes,_="".concat(f||"?",", ").concat(E(y));return b&&(_="".concat(_,", ").concat(O(b))),"error_file_size"===v||"error_validation"===v?pe.a.createElement("div",{className:t,style:n},pe.a.createElement("span",{className:"dzu-previewFileNameError"},_),"error_file_size"===v&&pe.a.createElement("span",null,y<R?"File too small":"File too big"),"error_validation"===v&&pe.a.createElement("span",null,String(g)),S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u})):("error_upload_params"!==v&&"exception_upload"!==v&&"error_upload"!==v||(_="".concat(_," (upload failed)")),"aborted"===v&&(_="".concat(_," (cancelled)")),pe.a.createElement("div",{className:t,style:n},h&&pe.a.createElement("img",{className:r,style:a,src:h,alt:_,title:_}),!h&&pe.a.createElement("span",{className:"dzu-previewFileName"},_),pe.a.createElement("div",{className:"dzu-previewStatusContainer"},w&&pe.a.createElement("progress",{max:100,value:"done"===v||"headers_received"===v?100:d}),"uploading"===v&&x&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.cancel,onClick:i}),"uploading"!==v&&"preparing"!==v&&S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u}),["error_upload_params","exception_upload","error_upload","aborted","ready"].includes(v)&&j&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.restart,onClick:s}))))}}]),t}(pe.a.PureComponent);B.propTypes={className:_.a.string,imageClassName:_.a.string,style:_.a.object,imageStyle:_.a.object,fileWithMeta:_.a.shape({file:_.a.any.isRequired,meta:_.a.object.isRequired,cancel:_.a.func.isRequired,restart:_.a.func.isRequired,remove:_.a.func.isRequired,xhr:_.a.any}).isRequired,meta:_.a.shape({status:_.a.oneOf(["preparing","error_file_size","error_validation","ready","uploading","error_upload_params","exception_upload","aborted","error_upload","headers_received","done"]).isRequired,type:_.a.string.isRequired,name:_.a.string,uploadedDate:_.a.string.isRequired,percent:_.a.number,size:_.a.number,lastModifiedDate:_.a.string,previewUrl:_.a.string,duration:_.a.number,width:_.a.number,height:_.a.number,videoWidth:_.a.number,videoHeight:_.a.number,validationError:_.a.any}).isRequired,isUpload:_.a.bool.isRequired,canCancel:_.a.bool.isRequired,canRemove:_.a.bool.isRequired,canRestart:_.a.bool.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var be=B,T=function(e){var t=e.className,r=e.buttonClassName,n=e.style,a=e.buttonStyle,o=e.disabled,i=e.content,u=e.onSubmit,s=e.files,c=s.some(function(e){return["uploading","preparing"].includes(e.meta.status)})||!s.some(function(e){return["headers_received","done"].includes(e.meta.status)});return pe.a.createElement("div",{className:t,style:n},pe.a.createElement("button",{className:r,style:a,onClick:function(){u(s.filter(function(e){return["headers_received","done"].includes(e.meta.status)}))},disabled:o||c},i))};T.propTypes={className:_.a.string,buttonClassName:_.a.string,style:_.a.object,buttonStyle:_.a.object,disabled:_.a.bool.isRequired,content:_.a.node,onSubmit:_.a.func.isRequired,files:_.a.arrayOf(_.a.object).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ge=T;r.d(t,"Layout",function(){return de}),r.d(t,"Input",function(){return ve}),r.d(t,"Preview",function(){return be}),r.d(t,"SubmitButton",function(){return ge}),r.d(t,"formatBytes",function(){return E}),r.d(t,"formatDuration",function(){return O}),r.d(t,"accepts",function(){return me}),r.d(t,"defaultClassNames",function(){return he});var F=0,A=function(e){function t(e){var j;return c()(this,t),j=d()(this,y()(t).call(this,e)),x()(g()(g()(j)),"_forceUpdate",function(){j._mounted&&j.forceUpdate()}),x()(g()(g()(j)),"handleDragEnter",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!0,dragged:L(e)})}),x()(g()(g()(j)),"handleDragOver",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(j._dragTimeoutId),j.setState({active:!0,dragged:L(e)})}),x()(g()(g()(j)),"handleDragLeave",function(e){e.preventDefault(),e.stopPropagation(),j._dragTimeoutId=setTimeout(function(){return j.setState({active:!1,dragged:[]})},150)}),x()(g()(g()(j)),"handleDrop",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!1,dragged:[]}),j.handleFiles(L(e))}),x()(g()(g()(j)),"handleDropDisabled",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!1,dragged:[]})}),x()(g()(g()(j)),"handleChangeStatus",function(e){if(j.props.onChangeStatus){var t=(j.props.onChangeStatus(e,e.meta.status,j._files)||{}).meta;t&&(delete t.status,e.meta=fe()({},e.meta,t),j._forceUpdate())}}),x()(g()(g()(j)),"handleSubmit",function(e){j.props.onSubmit&&j.props.onSubmit(e,le()(j._files))}),x()(g()(g()(j)),"handleCancel",function(e){"uploading"===e.meta.status&&(e.meta.status="aborted",e.xhr.abort(),j.handleChangeStatus(e),j._forceUpdate())}),x()(g()(g()(j)),"handleRemove",function(t){var e=j._files.findIndex(function(e){return e.meta.id===t.meta.id});-1!==e&&(t.meta.status="removed",j.handleChangeStatus(t),j._files.splice(e,1),j._forceUpdate())}),x()(g()(g()(j)),"handleRestart",function(e){j.props.getUploadParams&&("ready"===e.meta.status?e.meta.status="started":e.meta.status="restarted",j.handleChangeStatus(e),e.meta.status="uploading",e.meta.percent=0,j.handleChangeStatus(e),j._forceUpdate(),j.uploadFile(e))}),x()(g()(g()(j)),"handleFiles",function(e){e.forEach(function(e){return j.handleFile(e)});var t=j._dropzone.current;t&&setTimeout(function(){return t.scroll({top:t.scrollHeight,behavior:"smooth"})},150)}),x()(g()(g()(j)),"handleFile",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,n=t.size,a=t.type,o=t.lastModified,i=j.props,u=i.minSizeBytes,s=i.maxSizeBytes,c=i.maxFiles,l=i.accept,f=i.getUploadParams,p=i.autoUpload,d=i.validate,m=(new Date).toISOString(),y=o&&new Date(o).toISOString(),h={file:t,meta:{name:r,size:n,type:a,lastModifiedDate:y,uploadedDate:m,percent:0,id:F}},"application/x-moz-file"===t.type||me(t,l)){e.next=9;break}return h.meta.status="rejected_file_type",j.handleChangeStatus(h),e.abrupt("return");case 9:if(j._files.length>=c)return h.meta.status="rejected_max_files",j.handleChangeStatus(h),e.abrupt("return");e.next=13;break;case 13:if(h.cancel=function(){return j.handleCancel(h)},h.remove=function(){return j.handleRemove(h)},h.restart=function(){return j.handleRestart(h)},h.meta.status="preparing",j._files.push(h),j.handleChangeStatus(h),j._forceUpdate(),F+=1,n<u||s<n)return h.meta.status="error_file_size",j.handleChangeStatus(h),j._forceUpdate(),e.abrupt("return");e.next=26;break;case 26:return e.next=28,j.generatePreview(h);case 28:if(!d){e.next=36;break}if(v=d(h))return h.meta.status="error_validation",h.meta.validationError=v,j.handleChangeStatus(h),j._forceUpdate(),e.abrupt("return");e.next=36;break;case 36:h.meta.status=f?p?(j.uploadFile(h),"uploading"):"ready":"done",j.handleChangeStatus(h),j._forceUpdate();case 39:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(j)),"generatePreview",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.meta.type,n=t.file,a=r.startsWith("image/"),o=r.startsWith("audio/"),i=r.startsWith("video/"),a||o||i){e.next=6;break}return e.abrupt("return");case 6:if(u=URL.createObjectURL(n),s=function(t,r){return new Promise(function(e){t[r]=e})},e.prev=8,a)return(c=new Image).src=u,t.meta.previewUrl=u,e.next=15,s(c,"onload");e.next=17;break;case 15:t.meta.width=c.width,t.meta.height=c.height;case 17:if(o)return(l=new Audio).src=u,e.next=22,s(l,"onloadedmetadata");e.next=23;break;case 22:t.meta.duration=l.duration;case 23:if(i)return(f=document.createElement("video")).src=u,e.next=28,s(f,"onloadedmetadata");e.next=31;break;case 28:t.meta.duration=f.duration,t.meta.videoWidth=f.videoWidth,t.meta.videoHeight=f.videoHeight;case 31:URL.revokeObjectURL(u),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(8),URL.revokeObjectURL(u);case 37:j._forceUpdate();case 38:case"end":return e.stop()}},e,this,[[8,34]])}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(j)),"uploadFile",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v,b,g,w,x,S;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=j.props.getUploadParams,e.prev=1,e.next=4,r(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error("Error Upload Params",e.t0.stack);case 10:if(o=(a=n||{}).url,i=a.method,u=void 0===i?"POST":i,s=a.body,c=a.fields,l=void 0===c?{}:c,f=a.headers,p=void 0===f?{}:f,d=a.meta,delete(m=void 0===d?{}:d).status,o){e.next=17;break}return t.meta.status="error_upload_params",j.handleChangeStatus(t),j._forceUpdate(),e.abrupt("return");case 17:for(y=new XMLHttpRequest,h=new FormData,y.open(u,o,!0),v=Object.keys(l),b=0;b<v.length;b++)g=v[b],h.append(g,l[g]);for(y.setRequestHeader("X-Requested-With","XMLHttpRequest"),w=Object.keys(p),x=0;x<w.length;x++)S=w[x],y.setRequestHeader(S,p[S]);t.meta=fe()({},t.meta,m),y.upload.addEventListener("progress",function(e){t.meta.percent=100*e.loaded/e.total||100,j._forceUpdate()}),y.addEventListener("readystatechange",function(){2!==y.readyState&&4!==y.readyState||(0===y.status&&"aborted"!==t.meta.status&&(t.meta.status="exception_upload",j.handleChangeStatus(t),j._forceUpdate()),0<y.status&&y.status<400&&(t.meta.percent=100,2===y.readyState&&(t.meta.status="headers_received"),4===y.readyState&&(t.meta.status="done"),j.handleChangeStatus(t),j._forceUpdate()),400<=y.status&&"error_upload"!==t.meta.status&&(t.meta.status="error_upload",j.handleChangeStatus(t),j._forceUpdate()))}),h.append("file",t.file),j.props.timeout&&(y.timeout=j.props.timeout),y.send(s||h),t.xhr=y;case 32:case"end":return e.stop()}},e,this,[[1,7]])}));return function(e){return t.apply(this,arguments)}}()),j.state={active:!1,dragged:[]},j._files=[],j._mounted=!0,j._dropzone=pe.a.createRef(),j}return v()(t,e),f()(t,[{key:"componentWillUnmount",value:function(){var e=!(this._mounted=!1),t=!1,r=void 0;try{for(var n,a=this._files[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value;this.handleCancel(o)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}}},{key:"render",value:function(){var e=this.props,t=e.accept,r=e.multiple,n=e.maxFiles,a=e.minSizeBytes,o=e.maxSizeBytes,i=e.onSubmit,u=e.getUploadParams,s=e.disabled,c=e.canCancel,l=e.canRemove,f=e.canRestart,p=e.inputContent,d=e.inputWithFilesContent,m=e.submitButtonDisabled,y=e.submitButtonContent,h=e.classNames,v=e.styles,b=e.addClassNames,g=e.InputComponent,w=e.PreviewComponent,x=e.SubmitButtonComponent,S=e.LayoutComponent,j=this.state,R=j.active,_=j.dragged,C=_.some(function(e){return"application/x-moz-file"!==e.type&&!me(e,t)}),E={active:R,reject:C,dragged:_,accept:t,multiple:r,minSizeBytes:a,maxSizeBytes:o,maxFiles:n},O=le()(this._files),L=ye(s,O,E),N=function(e,t,r){for(var n=fe()({},he),a=fe()({},t),o=arguments.length,i=new Array(3<o?o-3:0),u=3;u<o;u++)i[u-3]=arguments[u];for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];n[l]=ye.apply(void 0,[e[l]].concat(i))}for(var f=Object.keys(r),p=0;p<f.length;p++){var d=f[p];n[d]="".concat(n[d]," ").concat(ye.apply(void 0,[r[d]].concat(i)))}for(var m=Object.keys(t),y=0;y<m.length;y++){var h=m[y];a[h]=ye.apply(void 0,[t[h]].concat(i))}return{classNames:n,styles:a}}(h,v,b,O,E),D=N.classNames,z=D.dropzone,M=D.dropzoneActive,I=D.dropzoneReject,P=D.dropzoneDisabled,q=D.input,k=D.inputLabel,B=D.inputLabelWithFiles,T=D.preview,F=D.previewImage,A=D.submitButtonContainer,U=D.submitButton,W=N.styles,G=W.dropzone,H=W.dropzoneActive,Y=W.dropzoneReject,Q=W.dropzoneDisabled,$=W.input,Z=W.inputLabel,J=W.inputLabelWithFiles,V=W.preview,X=W.previewImage,K=W.submitButtonContainer,ee=W.submitButton,te=g||ve,re=w||be,ne=x||ge,ae=S||de,oe=null;null!==w&&(oe=O.map(function(e){return pe.a.createElement(re,{className:T,imageClassName:F,style:V,imageStyle:X,key:e.meta.id,fileWithMeta:e,meta:fe()({},e.meta),isUpload:Boolean(u),canCancel:ye(c,O,E),canRemove:ye(l,O,E),canRestart:ye(f,O,E),files:O,extra:E})}));var ie=null!==g?pe.a.createElement(te,{className:q,labelClassName:k,labelWithFilesClassName:B,style:$,labelStyle:Z,labelWithFilesStyle:J,accept:t,multiple:r,disabled:L,content:ye(p,O,E),withFilesContent:ye(d,O,E),onFiles:this.handleFiles,files:O,extra:E}):null,ue=i&&null!==x?pe.a.createElement(ne,{className:A,buttonClassName:U,style:K,buttonStyle:ee,disabled:ye(m,O,E),content:ye(y,O,E),onSubmit:this.handleSubmit,files:O,extra:E}):null,se=z,ce=G;return L?(se="".concat(se," ").concat(P),ce=fe()({},ce||{},Q||{})):C?(se="".concat(se," ").concat(I),ce=fe()({},ce||{},Y||{})):R&&(se="".concat(se," ").concat(M),ce=fe()({},ce||{},H||{})),pe.a.createElement(ae,{input:ie,previews:oe,submitButton:ue,dropzoneProps:{ref:this._dropzone,className:se,style:ce,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:L?this.handleDropDisabled:this.handleDrop},files:O,extra:fe()({},E,{onFiles:this.handleFiles,onCancelFile:this.handleCancel,onRemoveFile:this.handleRemove,onRestartFile:this.handleRestart})})}}]),t}(pe.a.Component);A.propTypes={onChangeStatus:_.a.func,getUploadParams:_.a.func,onSubmit:_.a.func,accept:_.a.string,multiple:_.a.bool,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,validate:_.a.func,autoUpload:_.a.bool,timeout:_.a.number,disabled:_.a.oneOfType([_.a.bool,_.a.func]),canCancel:_.a.oneOfType([_.a.bool,_.a.func]),canRemove:_.a.oneOfType([_.a.bool,_.a.func]),canRestart:_.a.oneOfType([_.a.bool,_.a.func]),inputContent:_.a.oneOfType([_.a.node,_.a.func]),inputWithFilesContent:_.a.oneOfType([_.a.node,_.a.func]),submitButtonDisabled:_.a.oneOfType([_.a.bool,_.a.func]),submitButtonContent:_.a.oneOfType([_.a.node,_.a.func]),classNames:_.a.object.isRequired,styles:_.a.object.isRequired,addClassNames:_.a.object.isRequired,InputComponent:_.a.func,PreviewComponent:_.a.func,SubmitButtonComponent:_.a.func,LayoutComponent:_.a.func},A.defaultProps={accept:"*",multiple:!0,minSizeBytes:0,maxSizeBytes:Number.MAX_SAFE_INTEGER,maxFiles:Number.MAX_SAFE_INTEGER,autoUpload:!0,disabled:!1,canCancel:!0,canRemove:!0,canRestart:!0,inputContent:"Drag Files or Click to Browse",inputWithFilesContent:"Add Files",submitButtonDisabled:!1,submitButtonContent:"Submit",classNames:{},styles:{},addClassNames:{}};t.default=A}]); |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ReactDropzoneUploader=t():e.ReactDropzoneUploader=t()}(window,function(){return function(r){var n={};function a(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=r,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=27)}([function(e,t,r){e.exports=r(25)()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";e.exports=r(23)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var a=r(3);e.exports=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(e){a(t,e,r[e])})}return t}},function(e,t,r){e.exports=r(16)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,r){var n=r(21),a=r(1);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?a(e):t}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.exports=r},function(e,t,r){var n=r(22);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t){function s(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}e.exports=function(u){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=u.apply(e,i);function a(e){s(n,t,r,a,o,"next",e)}function o(e){s(n,t,r,a,o,"throw",e)}a(void 0)})}}},function(e,t,r){var n=r(18),a=r(19),o=r(20);e.exports=function(e){return n(e)||a(e)||o()}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgOCAxNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMzMzMzMzIj48cGF0aCBkPSJNMSwxNCBDMC40LDE0IDAsMTMuNiAwLDEzIEwwLDEgQzAsMC40IDAuNCwwIDEsMCBDMS42LDAgMiwwLjQgMiwxIEwyLDEzIEMyLDEzLjYgMS42LDE0IDEsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48cGF0aCBkPSJNNywxNCBDNi40LDE0IDYsMTMuNiA2LDEzIEw2LDEgQzYsMC40IDYuNCwwIDcsMCBDNy42LDAgOCwwLjQgOCwxIEw4LDEzIEM4LDEzLjYgNy42LDE0IDcsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48L2c+PC9zdmc+Cg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTQgMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMCwgMC4wKSIgZmlsbD0iIzMzMzMzMyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNC4wLCAwLjApIj48cG9seWdvbiBwb2ludHM9IjcuNzE5IDQuOTY0IDEyLjY5MiAwLjAxNyAxNC4zODkgMS43MTUgOS40MTIgNi42NjYgMTQuMzU0IDExLjYzNCAxMi42NTcgMTMuMzMxIDYuMDE3IDYuNjU3IDcuNzE1IDQuOTYwIj48L3BvbHlnb24+PHBvbHlnb24gcG9pbnRzPSI3LjYxMiA0Ljk2NCA3LjYxNiA0Ljk2MCA5LjMxMyA2LjY1NyAyLjY3NCAxMy4zMzEgMC45NzcgMTEuNjM0IDUuOTE5IDYuNjY2IDAuOTQyIDEuNzE1IDIuNjM5IDAuMDE3Ij48L3BvbHlnb24+PC9nPjwvZz48L3N2Zz4K"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTAuNSwxNC45IEMwLjIsMTQuNyAwLDE0LjQgMCwxNCBMMCwyIEMwLDEuNiAwLjIsMS4zIDAuNSwxLjEgQzAuOCwwLjkgMS4yLDAuOSAxLjUsMS4xIEwxMC41LDcuMSBDMTAuOCw3LjMgMTAuOSw3LjYgMTAuOSw3LjkgQzEwLjksOC4yIDEwLjcsOC41IDEwLjUsOC43IEwxLjUsMTQuNyBDMS40LDE0LjkgMC44LDE1LjEgMC41LDE0LjkgWiBNMiwzLjkgTDIsMTIuMiBMOC4yLDguMSBMMiwzLjkgWiI+PC9wYXRoPjwvZz48L3N2Zz4K"},function(e,t,r){var n=function(){return this||"object"==typeof self&&self}()||Function("return this")(),a=n.regeneratorRuntime&&0<=Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime"),o=a&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(17),a)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(z,e){!function(e){"use strict";var s,t=Object.prototype,c=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",n=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag",i="object"==typeof z,u=e.regeneratorRuntime;if(u)i&&(z.exports=u);else{(u=e.regeneratorRuntime=i?z.exports:{}).wrap=g;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",y={},l={};l[a]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(D([])));v&&v!==t&&c.call(v,a)&&(l=v);var b=j.prototype=x.prototype=Object.create(l);S.prototype=b.constructor=j,j.constructor=S,j[o]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(b),e},u.awrap=function(e){return{__await:e}},R(_.prototype),_.prototype[n]=function(){return this},u.AsyncIterator=_,u.async=function(e,t,r,n){var a=new _(g(e,t,r,n));return u.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},R(b),b[o]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},u.keys=function(r){var n=[];for(var e in r)n.push(e);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},u.values=D,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return o.type="throw",o.arg=r,n.next=e,t&&(n.method="next",n.arg=s),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var a=this.tryEntries[t],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=c.call(a,"catchLoc"),u=c.call(a,"finallyLoc");if(i&&u){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:D(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=s),y}}}function g(e,t,r,n){var o,i,u,s,a=t&&t.prototype instanceof x?t:x,c=Object.create(a.prototype),l=new L(n||[]);return c._invoke=(o=e,i=r,u=l,s=f,function(e,t){if(s===d)throw new Error("Generator is already running");if(s===m){if("throw"===e)throw t;return N()}for(u.method=e,u.arg=t;;){var r=u.delegate;if(r){var n=C(r,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(s===f)throw s=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);s=d;var a=w(o,i,u);if("normal"===a.type){if(s=u.done?m:p,a.arg===y)continue;return{value:a.arg,done:u.done}}"throw"===a.type&&(s=m,u.method="throw",u.arg=a.arg)}}),c}function w(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function x(){}function S(){}function j(){}function R(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function _(s){var t;this._invoke=function(r,n){function e(){return new Promise(function(e,t){!function t(e,r,n,a){var o=w(s[e],s,r);if("throw"!==o.type){var i=o.arg,u=i.value;return u&&"object"==typeof u&&c.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,n,a)},function(e){t("throw",e,n,a)}):Promise.resolve(u).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,a)})}a(o.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}}function C(e,t){var r=e.iterator[t.method];if(r===s){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=s,C(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=w(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,y;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=s),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function D(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=s,e.done=!0,e};return n.next=n}}return{next:N}}function N(){return{value:s,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?t.exports=n=function(e){return r(e)}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}t.exports=n},function(r,e){function n(e,t){return r.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}r.exports=n},function(e,t,r){"use strict"; | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ReactDropzoneUploader=t():e.ReactDropzoneUploader=t()}(window,function(){return function(r){var n={};function a(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,a),t.l=!0,t.exports}return a.m=r,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(r,n,function(e){return t[e]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=27)}([function(e,t,r){e.exports=r(25)()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,r){"use strict";e.exports=r(23)},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){var a=r(3);e.exports=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(e){a(t,e,r[e])})}return t}},function(e,t,r){e.exports=r(16)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,r){var n=r(21),a=r(1);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?a(e):t}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.exports=r},function(e,t,r){var n=r(22);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t){function s(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}e.exports=function(u){return function(){var e=this,i=arguments;return new Promise(function(t,r){var n=u.apply(e,i);function a(e){s(n,t,r,a,o,"next",e)}function o(e){s(n,t,r,a,o,"throw",e)}a(void 0)})}}},function(e,t,r){var n=r(18),a=r(19),o=r(20);e.exports=function(e){return n(e)||a(e)||o()}},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgOCAxNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMzMzMzMzIj48cGF0aCBkPSJNMSwxNCBDMC40LDE0IDAsMTMuNiAwLDEzIEwwLDEgQzAsMC40IDAuNCwwIDEsMCBDMS42LDAgMiwwLjQgMiwxIEwyLDEzIEMyLDEzLjYgMS42LDE0IDEsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48cGF0aCBkPSJNNywxNCBDNi40LDE0IDYsMTMuNiA2LDEzIEw2LDEgQzYsMC40IDYuNCwwIDcsMCBDNy42LDAgOCwwLjQgOCwxIEw4LDEzIEM4LDEzLjYgNy42LDE0IDcsMTQgWiIgaWQ9IlBhdGgiPjwvcGF0aD48L2c+PC9zdmc+Cg=="},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTQgMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMCwgMC4wKSIgZmlsbD0iIzMzMzMzMyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNC4wLCAwLjApIj48cG9seWdvbiBwb2ludHM9IjcuNzE5IDQuOTY0IDEyLjY5MiAwLjAxNyAxNC4zODkgMS43MTUgOS40MTIgNi42NjYgMTQuMzU0IDExLjYzNCAxMi42NTcgMTMuMzMxIDYuMDE3IDYuNjU3IDcuNzE1IDQuOTYwIj48L3BvbHlnb24+PHBvbHlnb24gcG9pbnRzPSI3LjYxMiA0Ljk2NCA3LjYxNiA0Ljk2MCA5LjMxMyA2LjY1NyAyLjY3NCAxMy4zMzEgMC45NzcgMTEuNjM0IDUuOTE5IDYuNjY2IDAuOTQyIDEuNzE1IDIuNjM5IDAuMDE3Ij48L3BvbHlnb24+PC9nPjwvZz48L3N2Zz4K"},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTEgMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGc+PHBhdGggZD0iTTAuNSwxNC45IEMwLjIsMTQuNyAwLDE0LjQgMCwxNCBMMCwyIEMwLDEuNiAwLjIsMS4zIDAuNSwxLjEgQzAuOCwwLjkgMS4yLDAuOSAxLjUsMS4xIEwxMC41LDcuMSBDMTAuOCw3LjMgMTAuOSw3LjYgMTAuOSw3LjkgQzEwLjksOC4yIDEwLjcsOC41IDEwLjUsOC43IEwxLjUsMTQuNyBDMS40LDE0LjkgMC44LDE1LjEgMC41LDE0LjkgWiBNMiwzLjkgTDIsMTIuMiBMOC4yLDguMSBMMiwzLjkgWiI+PC9wYXRoPjwvZz48L3N2Zz4K"},function(e,t,r){var n=function(){return this||"object"==typeof self&&self}()||Function("return this")(),a=n.regeneratorRuntime&&0<=Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime"),o=a&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(17),a)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(z,e){!function(e){"use strict";var s,t=Object.prototype,c=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",n=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag",i="object"==typeof z,u=e.regeneratorRuntime;if(u)i&&(z.exports=u);else{(u=e.regeneratorRuntime=i?z.exports:{}).wrap=g;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",y={},l={};l[a]=function(){return this};var h=Object.getPrototypeOf,b=h&&h(h(D([])));b&&b!==t&&c.call(b,a)&&(l=b);var v=j.prototype=x.prototype=Object.create(l);S.prototype=v.constructor=j,j.constructor=S,j[o]=S.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===S||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(v),e},u.awrap=function(e){return{__await:e}},R(_.prototype),_.prototype[n]=function(){return this},u.AsyncIterator=_,u.async=function(e,t,r,n){var a=new _(g(e,t,r,n));return u.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},R(v),v[o]="Generator",v[a]=function(){return this},v.toString=function(){return"[object Generator]"},u.keys=function(r){var n=[];for(var e in r)n.push(e);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},u.values=D,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return o.type="throw",o.arg=r,n.next=e,t&&(n.method="next",n.arg=s),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var a=this.tryEntries[t],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=c.call(a,"catchLoc"),u=c.call(a,"finallyLoc");if(i&&u){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&c.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:D(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=s),y}}}function g(e,t,r,n){var o,i,u,s,a=t&&t.prototype instanceof x?t:x,c=Object.create(a.prototype),l=new L(n||[]);return c._invoke=(o=e,i=r,u=l,s=f,function(e,t){if(s===d)throw new Error("Generator is already running");if(s===m){if("throw"===e)throw t;return N()}for(u.method=e,u.arg=t;;){var r=u.delegate;if(r){var n=C(r,u);if(n){if(n===y)continue;return n}}if("next"===u.method)u.sent=u._sent=u.arg;else if("throw"===u.method){if(s===f)throw s=m,u.arg;u.dispatchException(u.arg)}else"return"===u.method&&u.abrupt("return",u.arg);s=d;var a=w(o,i,u);if("normal"===a.type){if(s=u.done?m:p,a.arg===y)continue;return{value:a.arg,done:u.done}}"throw"===a.type&&(s=m,u.method="throw",u.arg=a.arg)}}),c}function w(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function x(){}function S(){}function j(){}function R(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function _(s){var t;this._invoke=function(r,n){function e(){return new Promise(function(e,t){!function t(e,r,n,a){var o=w(s[e],s,r);if("throw"!==o.type){var i=o.arg,u=i.value;return u&&"object"==typeof u&&c.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,n,a)},function(e){t("throw",e,n,a)}):Promise.resolve(u).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,a)})}a(o.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}}function C(e,t){var r=e.iterator[t.method];if(r===s){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=s,C(e,t),"throw"===t.method))return y;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var n=w(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,y;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=s),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function D(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(c.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=s,e.done=!0,e};return n.next=n}}return{next:N}}function N(){return{value:s,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?t.exports=n=function(e){return r(e)}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}t.exports=n},function(r,e){function n(e,t){return r.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}r.exports=n},function(e,t,r){"use strict"; | ||
/** @license React v16.5.2 | ||
@@ -9,3 +9,3 @@ * react.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var l=r(24),n="function"==typeof Symbol&&Symbol.for,f=n?Symbol.for("react.element"):60103,c=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112;n&&Symbol.for("react.placeholder");var m="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<t;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,t,r,n,a,o,i,u){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,a,o,i,u],c=0;(e=Error(t.replace(/%s/g,function(){return s[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function b(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||h}function g(){}function w(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||h}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=b.prototype;var x=w.prototype=new g;x.constructor=w,l(x,b.prototype),x.isPureReactComponent=!0;var S={current:null,currentDispatcher:null},j=Object.prototype.hasOwnProperty,R={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var n=void 0,a={},o=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)j.call(t,n)&&!R.hasOwnProperty(n)&&(a[n]=t[n]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===a[n]&&(a[n]=u[n]);return{$$typeof:f,type:e,key:o,ref:i,props:a,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===f}var E=/\/+/g,O=[];function L(e,t,r,n){if(O.length){var a=O.pop();return a.result=e,a.keyPrefix=t,a.func=r,a.context=n,a.count=0,a}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,O.length<10&&O.push(e)}function N(e,t,r){return null==e?0:function e(t,r,n,a){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var i=!1;if(null===t)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case f:case c:i=!0}}if(i)return n(a,t,""===r?"."+z(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var u=0;u<t.length;u++){var s=r+z(o=t[u],u);i+=e(o,s,n,a)}else if("function"==typeof(s=null===t||"object"!=typeof t?null:"function"==typeof(s=m&&t[m]||t["@@iterator"])?s:null))for(t=s.call(t),u=0;!(o=t.next()).done;)i+=e(o=o.value,s=r+z(o,u++),n,a);else"object"===o&&y("31","[object Object]"==(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return i}(e,"",t,r)}function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=e.key,n={"=":"=0",":":"=2"},"$"+(""+r).replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function M(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,r){var n,a,o=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?P(e,o,r,function(e){return e}):null!=e&&(C(e)&&(a=i+(!(n=e).key||t&&t.key===e.key?"":(""+e.key).replace(E,"$&/")+"/")+r,e={$$typeof:f,type:n.type,key:a,ref:n.ref,props:n.props,_owner:n._owner}),o.push(e))}function P(e,t,r,n,a){var o="";null!=r&&(o=(""+r).replace(E,"$&/")+"/"),N(e,I,t=L(t,o,n,a)),D(t)}var q={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return P(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;N(e,M,t=L(null,null,t,r)),D(t)},count:function(e){return N(e,function(){return null},null)},toArray:function(e){var t=[];return P(e,t,null,function(e){return e}),t},only:function(e){return C(e)||y("143"),e}},createRef:function(){return{current:null}},Component:b,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:u,_context:e},(e.Consumer=e).unstable_read=function(e,t){var r=S.currentDispatcher;return null===r&&y("277"),r.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:d,render:e}},Fragment:a,StrictMode:o,unstable_AsyncMode:p,unstable_Profiler:i,createElement:_,cloneElement:function(e,t,r){null==e&&y("267",e);var n=void 0,a=l({},e.props),o=e.key,i=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(i=t.ref,u=S.current),void 0!==t.key&&(o=""+t.key);var s=void 0;for(n in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)j.call(t,n)&&!R.hasOwnProperty(n)&&(a[n]=void 0===t[n]&&void 0!==s?s[n]:t[n])}if(1===(n=arguments.length-2))a.children=r;else if(1<n){s=Array(n);for(var c=0;c<n;c++)s[c]=arguments[c+2];a.children=s}return{$$typeof:f,type:e.type,key:o,ref:i,props:a,_owner:u}},createFactory:function(e){var t=_.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:S,assign:l}},k=q;e.exports=k.default||k},function(e,t,r){"use strict"; | ||
*/var l=r(24),n="function"==typeof Symbol&&Symbol.for,f=n?Symbol.for("react.element"):60103,c=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,p=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112;n&&Symbol.for("react.placeholder");var m="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<t;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,t,r,n,a,o,i,u){if(!e){if((e=void 0)===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,a,o,i,u],c=0;(e=Error(t.replace(/%s/g,function(){return s[c++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function v(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||h}function g(){}function w(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=v.prototype;var x=w.prototype=new g;x.constructor=w,l(x,v.prototype),x.isPureReactComponent=!0;var S={current:null,currentDispatcher:null},j=Object.prototype.hasOwnProperty,R={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var n=void 0,a={},o=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)j.call(t,n)&&!R.hasOwnProperty(n)&&(a[n]=t[n]);var u=arguments.length-2;if(1===u)a.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];a.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===a[n]&&(a[n]=u[n]);return{$$typeof:f,type:e,key:o,ref:i,props:a,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===f}var E=/\/+/g,O=[];function L(e,t,r,n){if(O.length){var a=O.pop();return a.result=e,a.keyPrefix=t,a.func=r,a.context=n,a.count=0,a}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,O.length<10&&O.push(e)}function N(e,t,r){return null==e?0:function e(t,r,n,a){var o=typeof t;"undefined"!==o&&"boolean"!==o||(t=null);var i=!1;if(null===t)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case f:case c:i=!0}}if(i)return n(a,t,""===r?"."+z(t,0):r),1;if(i=0,r=""===r?".":r+":",Array.isArray(t))for(var u=0;u<t.length;u++){var s=r+z(o=t[u],u);i+=e(o,s,n,a)}else if("function"==typeof(s=null===t||"object"!=typeof t?null:"function"==typeof(s=m&&t[m]||t["@@iterator"])?s:null))for(t=s.call(t),u=0;!(o=t.next()).done;)i+=e(o=o.value,s=r+z(o,u++),n,a);else"object"===o&&y("31","[object Object]"==(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return i}(e,"",t,r)}function z(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=e.key,n={"=":"=0",":":"=2"},"$"+(""+r).replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function M(e,t){e.func.call(e.context,t,e.count++)}function I(e,t,r){var n,a,o=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?P(e,o,r,function(e){return e}):null!=e&&(C(e)&&(a=i+(!(n=e).key||t&&t.key===e.key?"":(""+e.key).replace(E,"$&/")+"/")+r,e={$$typeof:f,type:n.type,key:a,ref:n.ref,props:n.props,_owner:n._owner}),o.push(e))}function P(e,t,r,n,a){var o="";null!=r&&(o=(""+r).replace(E,"$&/")+"/"),N(e,I,t=L(t,o,n,a)),D(t)}var q={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return P(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;N(e,M,t=L(null,null,t,r)),D(t)},count:function(e){return N(e,function(){return null},null)},toArray:function(e){var t=[];return P(e,t,null,function(e){return e}),t},only:function(e){return C(e)||y("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:w,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,Provider:null,Consumer:null,unstable_read:null}).Provider={$$typeof:u,_context:e},(e.Consumer=e).unstable_read=function(e,t){var r=S.currentDispatcher;return null===r&&y("277"),r.readContext(e,t)}.bind(null,e),e},forwardRef:function(e){return{$$typeof:d,render:e}},Fragment:a,StrictMode:o,unstable_AsyncMode:p,unstable_Profiler:i,createElement:_,cloneElement:function(e,t,r){null==e&&y("267",e);var n=void 0,a=l({},e.props),o=e.key,i=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(i=t.ref,u=S.current),void 0!==t.key&&(o=""+t.key);var s=void 0;for(n in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)j.call(t,n)&&!R.hasOwnProperty(n)&&(a[n]=void 0===t[n]&&void 0!==s?s[n]:t[n])}if(1===(n=arguments.length-2))a.children=r;else if(1<n){s=Array(n);for(var c=0;c<n;c++)s[c]=arguments[c+2];a.children=s}return{$$typeof:f,type:e.type,key:o,ref:i,props:a,_owner:u}},createFactory:function(e){var t=_.bind(null,e);return t.type=e,t},isValidElement:C,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:S,assign:l}},k=q;e.exports=k.default||k},function(e,t,r){"use strict"; | ||
/* | ||
@@ -15,2 +15,2 @@ object-assign | ||
@license MIT | ||
*/var s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))c.call(r,i)&&(a[i]=r[i]);if(s){n=s(r);for(var u=0;u<n.length;u++)l.call(r,n[u])&&(a[n[u]]=r[n[u]])}}return a}},function(e,t,r){"use strict";var u=r(26);function n(){}e.exports=function(){function e(e,t,r,n,a,o){if(o!==u){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}var r={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(5),j=r.n(n),a=r(11),o=r.n(a),i=r(12),le=r.n(i),u=r(4),fe=r.n(u),s=r(6),c=r.n(s),l=r(7),f=r.n(l),p=r(8),d=r.n(p),m=r(9),y=r.n(m),h=r(10),v=r.n(h),b=r(1),g=r.n(b),w=r(3),x=r.n(w),S=r(2),pe=r.n(S),R=r(0),_=r.n(R),C=function(e){var t=e.input,r=e.previews,n=e.submitButton,a=e.dropzoneProps,o=e.files,i=e.extra.maxFiles;return pe.a.createElement("div",a,r,o.length<i&&t,0<o.length&&n)};C.propTypes={input:_.a.node,previews:_.a.arrayOf(_.a.node),submitButton:_.a.node,dropzoneProps:_.a.shape({ref:_.a.any.isRequired,className:_.a.string.isRequired,style:_.a.object,onDragEnter:_.a.func.isRequired,onDragOver:_.a.func.isRequired,onDragLeave:_.a.func.isRequired,onDrop:_.a.func.isRequired}).isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,onFiles:_.a.func.isRequired,onCancelFile:_.a.func.isRequired,onRemoveFile:_.a.func.isRequired,onRestartFile:_.a.func.isRequired}).isRequired};var de=C,E=function(e){for(var t=0,r=e;1024<=r;)r/=1024,t+=1;return"".concat(r.toFixed(10<=r||t<1?0:1)).concat(["bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][t])},O=function(e){var t=new Date(null);t.setSeconds(e);var r=t.toISOString().slice(11,19);return e<3600?r.slice(3):r},me=function(e,t){if(!e||!t||"*"===t)return!0;var r=e.name||"",n=e.type||"",a=n.replace(/\/.*$/,"");return t.split(",").map(function(e){return e.trim()}).some(function(e){return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):e.endsWith("/*")?a===e.replace(/\/.*$/,""):n===e})},ye=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,r):e},he={dropzone:"dzu-dropzone",dropzoneActive:"dzu-dropzoneActive",dropzoneReject:"dzu-dropzoneActive",dropzoneDisabled:"dzu-dropzoneDisabled",input:"dzu-input",inputLabel:"dzu-inputLabel",inputLabelWithFiles:"dzu-inputLabelWithFiles",preview:"dzu-previewContainer",previewImage:"dzu-previewImage",submitButtonContainer:"dzu-submitButtonContainer",submitButton:"dzu-submitButton"},L=function(e){var t=[];if(e.dataTransfer){var r=e.dataTransfer;r.files&&r.files.length?t=r.files:r.items&&r.items.length&&(t=r.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)},D=function(e){var t=e.className,r=e.labelClassName,n=e.labelWithFilesClassName,a=e.style,o=e.labelStyle,i=e.labelWithFilesStyle,u=e.accept,s=e.multiple,c=e.disabled,l=e.content,f=e.withFilesContent,p=e.onFiles,d=e.files;return pe.a.createElement("label",{className:0<d.length?n:r,style:0<d.length?i:o},0<d.length?f:l,pe.a.createElement("input",{className:t,style:a,type:"file",accept:u,multiple:s,disabled:c,onChange:function(e){p(L(e)),e.target.value=null}}))};D.propTypes={className:_.a.string,labelClassName:_.a.string,labelWithFilesClassName:_.a.string,style:_.a.object,labelStyle:_.a.object,labelWithFilesStyle:_.a.object,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,disabled:_.a.bool.isRequired,content:_.a.node,withFilesContent:_.a.node,onFiles:_.a.func.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ve=D,N=r(13),z=r.n(N),M=r(14),I=r.n(M),P=r(15),q=r.n(P),k={cancel:{backgroundImage:"url(".concat(z.a,")")},remove:{backgroundImage:"url(".concat(I.a,")")},restart:{backgroundImage:"url(".concat(q.a,")")}},B=function(e){function t(){return c()(this,t),d()(this,y()(t).apply(this,arguments))}return v()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.imageClassName,n=e.style,a=e.imageStyle,o=e.fileWithMeta,i=o.cancel,u=o.remove,s=o.restart,c=e.meta,l=c.name,f=void 0===l?"":l,p=c.percent,d=void 0===p?0:p,m=c.size,y=void 0===m?0:m,h=c.previewUrl,v=c.status,b=c.duration,g=c.validationError,w=e.isUpload,x=e.canCancel,S=e.canRemove,j=e.canRestart,R=e.extra.minSizeBytes,_="".concat(f||"?",", ").concat(E(y));return b&&(_="".concat(_,", ").concat(O(b))),"error_file_size"===v||"error_validation"===v?pe.a.createElement("div",{className:t,style:n},pe.a.createElement("span",{className:"dzu-previewFileNameError"},_),"error_file_size"===v&&pe.a.createElement("span",null,y<R?"File too small":"File too big"),"error_validation"===v&&pe.a.createElement("span",null,String(g)),S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u})):("error_upload_params"!==v&&"exception_upload"!==v&&"error_upload"!==v||(_="".concat(_," (upload failed)")),"aborted"===v&&(_="".concat(_," (cancelled)")),pe.a.createElement("div",{className:t,style:n},h&&pe.a.createElement("img",{className:r,style:a,src:h,alt:_,title:_}),!h&&pe.a.createElement("span",{className:"dzu-previewFileName"},_),pe.a.createElement("div",{className:"dzu-previewStatusContainer"},w&&pe.a.createElement("progress",{max:100,value:"done"===v||"headers_received"===v?100:d}),"uploading"===v&&x&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.cancel,onClick:i}),"uploading"!==v&&"preparing"!==v&&S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u}),["error_upload_params","exception_upload","error_upload","aborted","ready"].includes(v)&&j&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.restart,onClick:s}))))}}]),t}(pe.a.PureComponent);B.propTypes={className:_.a.string,imageClassName:_.a.string,style:_.a.object,imageStyle:_.a.object,fileWithMeta:_.a.shape({file:_.a.any.isRequired,meta:_.a.object.isRequired,cancel:_.a.func.isRequired,restart:_.a.func.isRequired,remove:_.a.func.isRequired,xhr:_.a.any}).isRequired,meta:_.a.shape({status:_.a.oneOf(["preparing","error_file_size","error_validation","ready","uploading","error_upload_params","exception_upload","aborted","error_upload","headers_received","done"]).isRequired,type:_.a.string.isRequired,name:_.a.string,uploadedDate:_.a.string.isRequired,percent:_.a.number,size:_.a.number,lastModifiedDate:_.a.string,previewUrl:_.a.string,duration:_.a.number,width:_.a.number,height:_.a.number,videoWidth:_.a.number,videoHeight:_.a.number,validationError:_.a.any}).isRequired,isUpload:_.a.bool.isRequired,canCancel:_.a.bool.isRequired,canRemove:_.a.bool.isRequired,canRestart:_.a.bool.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var be=B,T=function(e){var t=e.className,r=e.buttonClassName,n=e.style,a=e.buttonStyle,o=e.disabled,i=e.content,u=e.onSubmit,s=e.files,c=s.some(function(e){return["uploading","preparing"].includes(e.meta.status)})||!s.some(function(e){return["headers_received","done"].includes(e.meta.status)});return pe.a.createElement("div",{className:t,style:n},pe.a.createElement("button",{className:r,style:a,onClick:function(){u(s.filter(function(e){return["headers_received","done"].includes(e.meta.status)}))},disabled:o||c},i))};T.propTypes={className:_.a.string,buttonClassName:_.a.string,style:_.a.object,buttonStyle:_.a.object,disabled:_.a.bool.isRequired,content:_.a.node,onSubmit:_.a.func.isRequired,files:_.a.arrayOf(_.a.object).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ge=T;r.d(t,"Layout",function(){return de}),r.d(t,"Input",function(){return ve}),r.d(t,"Preview",function(){return be}),r.d(t,"SubmitButton",function(){return ge}),r.d(t,"formatBytes",function(){return E}),r.d(t,"formatDuration",function(){return O}),r.d(t,"accepts",function(){return me}),r.d(t,"defaultClassNames",function(){return he});var F=0,A=function(e){function t(e){var S;return c()(this,t),S=d()(this,y()(t).call(this,e)),x()(g()(g()(S)),"_forceUpdate",function(){S._mounted&&S.forceUpdate()}),x()(g()(g()(S)),"handleDragEnter",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!0,dragged:L(e)})}),x()(g()(g()(S)),"handleDragOver",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(S._dragTimeoutId),S.setState({active:!0,dragged:L(e)})}),x()(g()(g()(S)),"handleDragLeave",function(e){e.preventDefault(),e.stopPropagation(),S._dragTimeoutId=setTimeout(function(){return S.setState({active:!1,dragged:[]})},150)}),x()(g()(g()(S)),"handleDrop",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!1,dragged:[]}),S.handleFiles(L(e))}),x()(g()(g()(S)),"handleDropDisabled",function(e){e.preventDefault(),e.stopPropagation(),S.setState({active:!1,dragged:[]})}),x()(g()(g()(S)),"handleChangeStatus",function(e){if(S.props.onChangeStatus){var t=(S.props.onChangeStatus(e,e.meta.status,S._files)||{}).meta;t&&(delete t.status,e.meta=fe()({},e.meta,t),S._forceUpdate())}}),x()(g()(g()(S)),"handleSubmit",function(e){S.props.onSubmit&&S.props.onSubmit(e,le()(S._files))}),x()(g()(g()(S)),"handleCancel",function(e){"uploading"===e.meta.status&&(e.meta.status="aborted",e.xhr.abort(),S.handleChangeStatus(e),S._forceUpdate())}),x()(g()(g()(S)),"handleRemove",function(t){var e=S._files.findIndex(function(e){return e.meta.id===t.meta.id});-1!==e&&(t.meta.status="removed",S.handleChangeStatus(t),S._files.splice(e,1),S._forceUpdate())}),x()(g()(g()(S)),"handleRestart",function(e){S.props.getUploadParams&&("ready"===e.meta.status?e.meta.status="started":e.meta.status="restarted",S.handleChangeStatus(e),e.meta.status="uploading",e.meta.percent=0,S.handleChangeStatus(e),S._forceUpdate(),S.uploadFile(e))}),x()(g()(g()(S)),"handleFiles",function(e){e.forEach(function(e){return S.handleFile(e)});var t=S._dropzone.current;t&&setTimeout(function(){return t.scroll({top:t.scrollHeight,behavior:"smooth"})},150)}),x()(g()(g()(S)),"handleFile",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,n=t.size,a=t.type,o=t.lastModified,i=S.props,u=i.minSizeBytes,s=i.maxSizeBytes,c=i.maxFiles,l=i.accept,f=i.getUploadParams,p=i.autoUpload,d=i.validate,m=(new Date).toISOString(),y=o&&new Date(o).toISOString(),h={file:t,meta:{name:r,size:n,type:a,lastModifiedDate:y,uploadedDate:m,percent:0,id:F}},"application/x-moz-file"===t.type||me(t,l)){e.next=9;break}return h.meta.status="rejected_file_type",S.handleChangeStatus(h),e.abrupt("return");case 9:if(S._files.length>=c)return h.meta.status="rejected_max_files",S.handleChangeStatus(h),e.abrupt("return");e.next=13;break;case 13:if(h.cancel=function(){return S.handleCancel(h)},h.remove=function(){return S.handleRemove(h)},h.restart=function(){return S.handleRestart(h)},h.meta.status="preparing",S._files.push(h),S.handleChangeStatus(h),S._forceUpdate(),F+=1,n<u||s<n)return h.meta.status="error_file_size",S.handleChangeStatus(h),S._forceUpdate(),e.abrupt("return");e.next=26;break;case 26:return e.next=28,S.generatePreview(h);case 28:if(!d){e.next=36;break}if(v=d(h))return h.meta.status="error_validation",h.meta.validationError=v,S.handleChangeStatus(h),S._forceUpdate(),e.abrupt("return");e.next=36;break;case 36:h.meta.status=f?p?(S.uploadFile(h),"uploading"):"ready":"done",S.handleChangeStatus(h),S._forceUpdate();case 39:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(S)),"generatePreview",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.meta.type,n=t.file,a=r.startsWith("image/"),o=r.startsWith("audio/"),i=r.startsWith("video/"),a||o||i){e.next=6;break}return e.abrupt("return");case 6:if(u=URL.createObjectURL(n),s=function(t,r){return new Promise(function(e){t[r]=e})},e.prev=8,a)return(c=new Image).src=u,t.meta.previewUrl=u,e.next=15,s(c,"onload");e.next=17;break;case 15:t.meta.width=c.width,t.meta.height=c.height;case 17:if(o)return(l=new Audio).src=u,e.next=22,s(l,"onloadedmetadata");e.next=23;break;case 22:t.meta.duration=l.duration;case 23:if(i)return(f=document.createElement("video")).src=u,e.next=28,s(f,"onloadedmetadata");e.next=31;break;case 28:t.meta.duration=f.duration,t.meta.videoWidth=f.videoWidth,t.meta.videoHeight=f.videoHeight;case 31:URL.revokeObjectURL(u),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(8),URL.revokeObjectURL(u);case 37:S._forceUpdate();case 38:case"end":return e.stop()}},e,this,[[8,34]])}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(S)),"uploadFile",function(){var t=o()(j.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,v,b,g,w,x;return j.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.props.getUploadParams,e.prev=1,e.next=4,r(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error("Error Upload Params",e.t0.stack);case 10:if(o=(a=n||{}).fields,i=void 0===o?{}:o,u=a.headers,s=void 0===u?{}:u,c=a.meta,l=void 0===c?{}:c,f=a.method,p=void 0===f?"POST":f,d=a.url,delete l.status,d){e.next=17;break}return t.meta.status="error_upload_params",S.handleChangeStatus(t),S._forceUpdate(),e.abrupt("return");case 17:for(m=new XMLHttpRequest,y=new FormData,m.open(p,d,!0),h=Object.keys(i),v=0;v<h.length;v++)b=h[v],y.append(b,i[b]);for(m.setRequestHeader("X-Requested-With","XMLHttpRequest"),g=Object.keys(s),w=0;w<g.length;w++)x=g[w],m.setRequestHeader(x,s[x]);t.meta=fe()({},t.meta,l),m.upload.addEventListener("progress",function(e){t.meta.percent=100*e.loaded/e.total||100,S._forceUpdate()}),m.addEventListener("readystatechange",function(){2!==m.readyState&&4!==m.readyState||(0===m.status&&"aborted"!==t.meta.status&&(t.meta.status="exception_upload",S.handleChangeStatus(t),S._forceUpdate()),0<m.status&&m.status<400&&(t.meta.percent=100,2===m.readyState&&(t.meta.status="headers_received"),4===m.readyState&&(t.meta.status="done"),S.handleChangeStatus(t),S._forceUpdate()),400<=m.status&&"error_upload"!==t.meta.status&&(t.meta.status="error_upload",S.handleChangeStatus(t),S._forceUpdate()))}),y.append("file",t.file),S.props.timeout&&(m.timeout=S.props.timeout),m.send(y),t.xhr=m;case 32:case"end":return e.stop()}},e,this,[[1,7]])}));return function(e){return t.apply(this,arguments)}}()),S.state={active:!1,dragged:[]},S._files=[],S._mounted=!0,S._dropzone=pe.a.createRef(),S}return v()(t,e),f()(t,[{key:"componentWillUnmount",value:function(){var e=!(this._mounted=!1),t=!1,r=void 0;try{for(var n,a=this._files[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value;this.handleCancel(o)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}}},{key:"render",value:function(){var e=this.props,t=e.accept,r=e.multiple,n=e.maxFiles,a=e.minSizeBytes,o=e.maxSizeBytes,i=e.onSubmit,u=e.getUploadParams,s=e.disabled,c=e.canCancel,l=e.canRemove,f=e.canRestart,p=e.inputContent,d=e.inputWithFilesContent,m=e.submitButtonDisabled,y=e.submitButtonContent,h=e.classNames,v=e.styles,b=e.addClassNames,g=e.InputComponent,w=e.PreviewComponent,x=e.SubmitButtonComponent,S=e.LayoutComponent,j=this.state,R=j.active,_=j.dragged,C=_.some(function(e){return"application/x-moz-file"!==e.type&&!me(e,t)}),E={active:R,reject:C,dragged:_,accept:t,multiple:r,minSizeBytes:a,maxSizeBytes:o,maxFiles:n},O=le()(this._files),L=ye(s,O,E),D=function(e,t,r){for(var n=fe()({},he),a=fe()({},t),o=arguments.length,i=new Array(3<o?o-3:0),u=3;u<o;u++)i[u-3]=arguments[u];for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];n[l]=ye.apply(void 0,[e[l]].concat(i))}for(var f=Object.keys(r),p=0;p<f.length;p++){var d=f[p];n[d]="".concat(n[d]," ").concat(ye.apply(void 0,[r[d]].concat(i)))}for(var m=Object.keys(t),y=0;y<m.length;y++){var h=m[y];a[h]=ye.apply(void 0,[t[h]].concat(i))}return{classNames:n,styles:a}}(h,v,b,O,E),N=D.classNames,z=N.dropzone,M=N.dropzoneActive,I=N.dropzoneReject,P=N.dropzoneDisabled,q=N.input,k=N.inputLabel,B=N.inputLabelWithFiles,T=N.preview,F=N.previewImage,A=N.submitButtonContainer,U=N.submitButton,W=D.styles,G=W.dropzone,H=W.dropzoneActive,Y=W.dropzoneReject,Q=W.dropzoneDisabled,$=W.input,Z=W.inputLabel,J=W.inputLabelWithFiles,V=W.preview,X=W.previewImage,K=W.submitButtonContainer,ee=W.submitButton,te=g||ve,re=w||be,ne=x||ge,ae=S||de,oe=null;null!==w&&(oe=O.map(function(e){return pe.a.createElement(re,{className:T,imageClassName:F,style:V,imageStyle:X,key:e.meta.id,fileWithMeta:e,meta:fe()({},e.meta),isUpload:Boolean(u),canCancel:ye(c,O,E),canRemove:ye(l,O,E),canRestart:ye(f,O,E),files:O,extra:E})}));var ie=null!==g?pe.a.createElement(te,{className:q,labelClassName:k,labelWithFilesClassName:B,style:$,labelStyle:Z,labelWithFilesStyle:J,accept:t,multiple:r,disabled:L,content:ye(p,O,E),withFilesContent:ye(d,O,E),onFiles:this.handleFiles,files:O,extra:E}):null,ue=i&&null!==x?pe.a.createElement(ne,{className:A,buttonClassName:U,style:K,buttonStyle:ee,disabled:ye(m,O,E),content:ye(y,O,E),onSubmit:this.handleSubmit,files:O,extra:E}):null,se=z,ce=G;return L?(se="".concat(se," ").concat(P),ce=fe()({},ce||{},Q||{})):C?(se="".concat(se," ").concat(I),ce=fe()({},ce||{},Y||{})):R&&(se="".concat(se," ").concat(M),ce=fe()({},ce||{},H||{})),pe.a.createElement(ae,{input:ie,previews:oe,submitButton:ue,dropzoneProps:{ref:this._dropzone,className:se,style:ce,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:L?this.handleDropDisabled:this.handleDrop},files:O,extra:fe()({},E,{onFiles:this.handleFiles,onCancelFile:this.handleCancel,onRemoveFile:this.handleRemove,onRestartFile:this.handleRestart})})}}]),t}(pe.a.Component);A.propTypes={onChangeStatus:_.a.func,getUploadParams:_.a.func,onSubmit:_.a.func,accept:_.a.string,multiple:_.a.bool,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,validate:_.a.func,autoUpload:_.a.bool,timeout:_.a.number,disabled:_.a.oneOfType([_.a.bool,_.a.func]),canCancel:_.a.oneOfType([_.a.bool,_.a.func]),canRemove:_.a.oneOfType([_.a.bool,_.a.func]),canRestart:_.a.oneOfType([_.a.bool,_.a.func]),inputContent:_.a.oneOfType([_.a.node,_.a.func]),inputWithFilesContent:_.a.oneOfType([_.a.node,_.a.func]),submitButtonDisabled:_.a.oneOfType([_.a.bool,_.a.func]),submitButtonContent:_.a.oneOfType([_.a.node,_.a.func]),classNames:_.a.object.isRequired,styles:_.a.object.isRequired,addClassNames:_.a.object.isRequired,InputComponent:_.a.func,PreviewComponent:_.a.func,SubmitButtonComponent:_.a.func,LayoutComponent:_.a.func},A.defaultProps={accept:"*",multiple:!0,minSizeBytes:0,maxSizeBytes:Number.MAX_SAFE_INTEGER,maxFiles:Number.MAX_SAFE_INTEGER,autoUpload:!0,disabled:!1,canCancel:!0,canRemove:!0,canRestart:!0,inputContent:"Drag Files or Click to Browse",inputWithFilesContent:"Add Files",submitButtonDisabled:!1,submitButtonContent:"Submit",classNames:{},styles:{},addClassNames:{}};t.default=A}])}); | ||
*/var s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o<arguments.length;o++){for(var i in r=Object(arguments[o]))c.call(r,i)&&(a[i]=r[i]);if(s){n=s(r);for(var u=0;u<n.length;u++)l.call(r,n[u])&&(a[n[u]]=r[n[u]])}}return a}},function(e,t,r){"use strict";var u=r(26);function n(){}e.exports=function(){function e(e,t,r,n,a,o){if(o!==u){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}var r={array:e.isRequired=e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=n,r.PropTypes=r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(5),R=r.n(n),a=r(11),o=r.n(a),i=r(12),le=r.n(i),u=r(4),fe=r.n(u),s=r(6),c=r.n(s),l=r(7),f=r.n(l),p=r(8),d=r.n(p),m=r(9),y=r.n(m),h=r(10),b=r.n(h),v=r(1),g=r.n(v),w=r(3),x=r.n(w),S=r(2),pe=r.n(S),j=r(0),_=r.n(j),C=function(e){var t=e.input,r=e.previews,n=e.submitButton,a=e.dropzoneProps,o=e.files,i=e.extra.maxFiles;return pe.a.createElement("div",a,r,o.length<i&&t,0<o.length&&n)};C.propTypes={input:_.a.node,previews:_.a.arrayOf(_.a.node),submitButton:_.a.node,dropzoneProps:_.a.shape({ref:_.a.any.isRequired,className:_.a.string.isRequired,style:_.a.object,onDragEnter:_.a.func.isRequired,onDragOver:_.a.func.isRequired,onDragLeave:_.a.func.isRequired,onDrop:_.a.func.isRequired}).isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,onFiles:_.a.func.isRequired,onCancelFile:_.a.func.isRequired,onRemoveFile:_.a.func.isRequired,onRestartFile:_.a.func.isRequired}).isRequired};var de=C,E=function(e){for(var t=0,r=e;1024<=r;)r/=1024,t+=1;return"".concat(r.toFixed(10<=r||t<1?0:1)).concat(["bytes","kB","MB","GB","TB","PB","EB","ZB","YB"][t])},O=function(e){var t=new Date(null);t.setSeconds(e);var r=t.toISOString().slice(11,19);return e<3600?r.slice(3):r},me=function(e,t){if(!e||!t||"*"===t)return!0;var r=e.name||"",n=e.type||"",a=n.replace(/\/.*$/,"");return t.split(",").map(function(e){return e.trim()}).some(function(e){return"."===e.charAt(0)?r.toLowerCase().endsWith(e.toLowerCase()):e.endsWith("/*")?a===e.replace(/\/.*$/,""):n===e})},ye=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"==typeof e?e.apply(void 0,r):e},he={dropzone:"dzu-dropzone",dropzoneActive:"dzu-dropzoneActive",dropzoneReject:"dzu-dropzoneActive",dropzoneDisabled:"dzu-dropzoneDisabled",input:"dzu-input",inputLabel:"dzu-inputLabel",inputLabelWithFiles:"dzu-inputLabelWithFiles",preview:"dzu-previewContainer",previewImage:"dzu-previewImage",submitButtonContainer:"dzu-submitButtonContainer",submitButton:"dzu-submitButton"},L=function(e){var t=[];if(e.dataTransfer){var r=e.dataTransfer;r.files&&r.files.length?t=r.files:r.items&&r.items.length&&(t=r.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)},D=function(e){var t=e.className,r=e.labelClassName,n=e.labelWithFilesClassName,a=e.style,o=e.labelStyle,i=e.labelWithFilesStyle,u=e.accept,s=e.multiple,c=e.disabled,l=e.content,f=e.withFilesContent,p=e.onFiles,d=e.files;return pe.a.createElement("label",{className:0<d.length?n:r,style:0<d.length?i:o},0<d.length?f:l,pe.a.createElement("input",{className:t,style:a,type:"file",accept:u,multiple:s,disabled:c,onChange:function(e){p(L(e)),e.target.value=null}}))};D.propTypes={className:_.a.string,labelClassName:_.a.string,labelWithFilesClassName:_.a.string,style:_.a.object,labelStyle:_.a.object,labelWithFilesStyle:_.a.object,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,disabled:_.a.bool.isRequired,content:_.a.node,withFilesContent:_.a.node,onFiles:_.a.func.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var be=D,N=r(13),z=r.n(N),M=r(14),I=r.n(M),P=r(15),q=r.n(P),k={cancel:{backgroundImage:"url(".concat(z.a,")")},remove:{backgroundImage:"url(".concat(I.a,")")},restart:{backgroundImage:"url(".concat(q.a,")")}},B=function(e){function t(){return c()(this,t),d()(this,y()(t).apply(this,arguments))}return b()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.className,r=e.imageClassName,n=e.style,a=e.imageStyle,o=e.fileWithMeta,i=o.cancel,u=o.remove,s=o.restart,c=e.meta,l=c.name,f=void 0===l?"":l,p=c.percent,d=void 0===p?0:p,m=c.size,y=void 0===m?0:m,h=c.previewUrl,b=c.status,v=c.duration,g=c.validationError,w=e.isUpload,x=e.canCancel,S=e.canRemove,j=e.canRestart,R=e.extra.minSizeBytes,_="".concat(f||"?",", ").concat(E(y));return v&&(_="".concat(_,", ").concat(O(v))),"error_file_size"===b||"error_validation"===b?pe.a.createElement("div",{className:t,style:n},pe.a.createElement("span",{className:"dzu-previewFileNameError"},_),"error_file_size"===b&&pe.a.createElement("span",null,y<R?"File too small":"File too big"),"error_validation"===b&&pe.a.createElement("span",null,String(g)),S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u})):("error_upload_params"!==b&&"exception_upload"!==b&&"error_upload"!==b||(_="".concat(_," (upload failed)")),"aborted"===b&&(_="".concat(_," (cancelled)")),pe.a.createElement("div",{className:t,style:n},h&&pe.a.createElement("img",{className:r,style:a,src:h,alt:_,title:_}),!h&&pe.a.createElement("span",{className:"dzu-previewFileName"},_),pe.a.createElement("div",{className:"dzu-previewStatusContainer"},w&&pe.a.createElement("progress",{max:100,value:"done"===b||"headers_received"===b?100:d}),"uploading"===b&&x&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.cancel,onClick:i}),"uploading"!==b&&"preparing"!==b&&S&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.remove,onClick:u}),["error_upload_params","exception_upload","error_upload","aborted","ready"].includes(b)&&j&&pe.a.createElement("span",{className:"dzu-previewButton",style:k.restart,onClick:s}))))}}]),t}(pe.a.PureComponent);B.propTypes={className:_.a.string,imageClassName:_.a.string,style:_.a.object,imageStyle:_.a.object,fileWithMeta:_.a.shape({file:_.a.any.isRequired,meta:_.a.object.isRequired,cancel:_.a.func.isRequired,restart:_.a.func.isRequired,remove:_.a.func.isRequired,xhr:_.a.any}).isRequired,meta:_.a.shape({status:_.a.oneOf(["preparing","error_file_size","error_validation","ready","uploading","error_upload_params","exception_upload","aborted","error_upload","headers_received","done"]).isRequired,type:_.a.string.isRequired,name:_.a.string,uploadedDate:_.a.string.isRequired,percent:_.a.number,size:_.a.number,lastModifiedDate:_.a.string,previewUrl:_.a.string,duration:_.a.number,width:_.a.number,height:_.a.number,videoWidth:_.a.number,videoHeight:_.a.number,validationError:_.a.any}).isRequired,isUpload:_.a.bool.isRequired,canCancel:_.a.bool.isRequired,canRemove:_.a.bool.isRequired,canRestart:_.a.bool.isRequired,files:_.a.arrayOf(_.a.any).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ve=B,T=function(e){var t=e.className,r=e.buttonClassName,n=e.style,a=e.buttonStyle,o=e.disabled,i=e.content,u=e.onSubmit,s=e.files,c=s.some(function(e){return["uploading","preparing"].includes(e.meta.status)})||!s.some(function(e){return["headers_received","done"].includes(e.meta.status)});return pe.a.createElement("div",{className:t,style:n},pe.a.createElement("button",{className:r,style:a,onClick:function(){u(s.filter(function(e){return["headers_received","done"].includes(e.meta.status)}))},disabled:o||c},i))};T.propTypes={className:_.a.string,buttonClassName:_.a.string,style:_.a.object,buttonStyle:_.a.object,disabled:_.a.bool.isRequired,content:_.a.node,onSubmit:_.a.func.isRequired,files:_.a.arrayOf(_.a.object).isRequired,extra:_.a.shape({active:_.a.bool.isRequired,reject:_.a.bool.isRequired,dragged:_.a.arrayOf(_.a.any).isRequired,accept:_.a.string.isRequired,multiple:_.a.bool.isRequired,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired}).isRequired};var ge=T;r.d(t,"Layout",function(){return de}),r.d(t,"Input",function(){return be}),r.d(t,"Preview",function(){return ve}),r.d(t,"SubmitButton",function(){return ge}),r.d(t,"formatBytes",function(){return E}),r.d(t,"formatDuration",function(){return O}),r.d(t,"accepts",function(){return me}),r.d(t,"defaultClassNames",function(){return he});var F=0,A=function(e){function t(e){var j;return c()(this,t),j=d()(this,y()(t).call(this,e)),x()(g()(g()(j)),"_forceUpdate",function(){j._mounted&&j.forceUpdate()}),x()(g()(g()(j)),"handleDragEnter",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!0,dragged:L(e)})}),x()(g()(g()(j)),"handleDragOver",function(e){e.preventDefault(),e.stopPropagation(),clearTimeout(j._dragTimeoutId),j.setState({active:!0,dragged:L(e)})}),x()(g()(g()(j)),"handleDragLeave",function(e){e.preventDefault(),e.stopPropagation(),j._dragTimeoutId=setTimeout(function(){return j.setState({active:!1,dragged:[]})},150)}),x()(g()(g()(j)),"handleDrop",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!1,dragged:[]}),j.handleFiles(L(e))}),x()(g()(g()(j)),"handleDropDisabled",function(e){e.preventDefault(),e.stopPropagation(),j.setState({active:!1,dragged:[]})}),x()(g()(g()(j)),"handleChangeStatus",function(e){if(j.props.onChangeStatus){var t=(j.props.onChangeStatus(e,e.meta.status,j._files)||{}).meta;t&&(delete t.status,e.meta=fe()({},e.meta,t),j._forceUpdate())}}),x()(g()(g()(j)),"handleSubmit",function(e){j.props.onSubmit&&j.props.onSubmit(e,le()(j._files))}),x()(g()(g()(j)),"handleCancel",function(e){"uploading"===e.meta.status&&(e.meta.status="aborted",e.xhr.abort(),j.handleChangeStatus(e),j._forceUpdate())}),x()(g()(g()(j)),"handleRemove",function(t){var e=j._files.findIndex(function(e){return e.meta.id===t.meta.id});-1!==e&&(t.meta.status="removed",j.handleChangeStatus(t),j._files.splice(e,1),j._forceUpdate())}),x()(g()(g()(j)),"handleRestart",function(e){j.props.getUploadParams&&("ready"===e.meta.status?e.meta.status="started":e.meta.status="restarted",j.handleChangeStatus(e),e.meta.status="uploading",e.meta.percent=0,j.handleChangeStatus(e),j._forceUpdate(),j.uploadFile(e))}),x()(g()(g()(j)),"handleFiles",function(e){e.forEach(function(e){return j.handleFile(e)});var t=j._dropzone.current;t&&setTimeout(function(){return t.scroll({top:t.scrollHeight,behavior:"smooth"})},150)}),x()(g()(g()(j)),"handleFile",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,b;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,n=t.size,a=t.type,o=t.lastModified,i=j.props,u=i.minSizeBytes,s=i.maxSizeBytes,c=i.maxFiles,l=i.accept,f=i.getUploadParams,p=i.autoUpload,d=i.validate,m=(new Date).toISOString(),y=o&&new Date(o).toISOString(),h={file:t,meta:{name:r,size:n,type:a,lastModifiedDate:y,uploadedDate:m,percent:0,id:F}},"application/x-moz-file"===t.type||me(t,l)){e.next=9;break}return h.meta.status="rejected_file_type",j.handleChangeStatus(h),e.abrupt("return");case 9:if(j._files.length>=c)return h.meta.status="rejected_max_files",j.handleChangeStatus(h),e.abrupt("return");e.next=13;break;case 13:if(h.cancel=function(){return j.handleCancel(h)},h.remove=function(){return j.handleRemove(h)},h.restart=function(){return j.handleRestart(h)},h.meta.status="preparing",j._files.push(h),j.handleChangeStatus(h),j._forceUpdate(),F+=1,n<u||s<n)return h.meta.status="error_file_size",j.handleChangeStatus(h),j._forceUpdate(),e.abrupt("return");e.next=26;break;case 26:return e.next=28,j.generatePreview(h);case 28:if(!d){e.next=36;break}if(b=d(h))return h.meta.status="error_validation",h.meta.validationError=b,j.handleChangeStatus(h),j._forceUpdate(),e.abrupt("return");e.next=36;break;case 36:h.meta.status=f?p?(j.uploadFile(h),"uploading"):"ready":"done",j.handleChangeStatus(h),j._forceUpdate();case 39:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(j)),"generatePreview",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.meta.type,n=t.file,a=r.startsWith("image/"),o=r.startsWith("audio/"),i=r.startsWith("video/"),a||o||i){e.next=6;break}return e.abrupt("return");case 6:if(u=URL.createObjectURL(n),s=function(t,r){return new Promise(function(e){t[r]=e})},e.prev=8,a)return(c=new Image).src=u,t.meta.previewUrl=u,e.next=15,s(c,"onload");e.next=17;break;case 15:t.meta.width=c.width,t.meta.height=c.height;case 17:if(o)return(l=new Audio).src=u,e.next=22,s(l,"onloadedmetadata");e.next=23;break;case 22:t.meta.duration=l.duration;case 23:if(i)return(f=document.createElement("video")).src=u,e.next=28,s(f,"onloadedmetadata");e.next=31;break;case 28:t.meta.duration=f.duration,t.meta.videoWidth=f.videoWidth,t.meta.videoHeight=f.videoHeight;case 31:URL.revokeObjectURL(u),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(8),URL.revokeObjectURL(u);case 37:j._forceUpdate();case 38:case"end":return e.stop()}},e,this,[[8,34]])}));return function(e){return t.apply(this,arguments)}}()),x()(g()(g()(j)),"uploadFile",function(){var t=o()(R.a.mark(function e(t){var r,n,a,o,i,u,s,c,l,f,p,d,m,y,h,b,v,g,w,x,S;return R.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=j.props.getUploadParams,e.prev=1,e.next=4,r(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error("Error Upload Params",e.t0.stack);case 10:if(o=(a=n||{}).url,i=a.method,u=void 0===i?"POST":i,s=a.body,c=a.fields,l=void 0===c?{}:c,f=a.headers,p=void 0===f?{}:f,d=a.meta,delete(m=void 0===d?{}:d).status,o){e.next=17;break}return t.meta.status="error_upload_params",j.handleChangeStatus(t),j._forceUpdate(),e.abrupt("return");case 17:for(y=new XMLHttpRequest,h=new FormData,y.open(u,o,!0),b=Object.keys(l),v=0;v<b.length;v++)g=b[v],h.append(g,l[g]);for(y.setRequestHeader("X-Requested-With","XMLHttpRequest"),w=Object.keys(p),x=0;x<w.length;x++)S=w[x],y.setRequestHeader(S,p[S]);t.meta=fe()({},t.meta,m),y.upload.addEventListener("progress",function(e){t.meta.percent=100*e.loaded/e.total||100,j._forceUpdate()}),y.addEventListener("readystatechange",function(){2!==y.readyState&&4!==y.readyState||(0===y.status&&"aborted"!==t.meta.status&&(t.meta.status="exception_upload",j.handleChangeStatus(t),j._forceUpdate()),0<y.status&&y.status<400&&(t.meta.percent=100,2===y.readyState&&(t.meta.status="headers_received"),4===y.readyState&&(t.meta.status="done"),j.handleChangeStatus(t),j._forceUpdate()),400<=y.status&&"error_upload"!==t.meta.status&&(t.meta.status="error_upload",j.handleChangeStatus(t),j._forceUpdate()))}),h.append("file",t.file),j.props.timeout&&(y.timeout=j.props.timeout),y.send(s||h),t.xhr=y;case 32:case"end":return e.stop()}},e,this,[[1,7]])}));return function(e){return t.apply(this,arguments)}}()),j.state={active:!1,dragged:[]},j._files=[],j._mounted=!0,j._dropzone=pe.a.createRef(),j}return b()(t,e),f()(t,[{key:"componentWillUnmount",value:function(){var e=!(this._mounted=!1),t=!1,r=void 0;try{for(var n,a=this._files[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value;this.handleCancel(o)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}}},{key:"render",value:function(){var e=this.props,t=e.accept,r=e.multiple,n=e.maxFiles,a=e.minSizeBytes,o=e.maxSizeBytes,i=e.onSubmit,u=e.getUploadParams,s=e.disabled,c=e.canCancel,l=e.canRemove,f=e.canRestart,p=e.inputContent,d=e.inputWithFilesContent,m=e.submitButtonDisabled,y=e.submitButtonContent,h=e.classNames,b=e.styles,v=e.addClassNames,g=e.InputComponent,w=e.PreviewComponent,x=e.SubmitButtonComponent,S=e.LayoutComponent,j=this.state,R=j.active,_=j.dragged,C=_.some(function(e){return"application/x-moz-file"!==e.type&&!me(e,t)}),E={active:R,reject:C,dragged:_,accept:t,multiple:r,minSizeBytes:a,maxSizeBytes:o,maxFiles:n},O=le()(this._files),L=ye(s,O,E),D=function(e,t,r){for(var n=fe()({},he),a=fe()({},t),o=arguments.length,i=new Array(3<o?o-3:0),u=3;u<o;u++)i[u-3]=arguments[u];for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];n[l]=ye.apply(void 0,[e[l]].concat(i))}for(var f=Object.keys(r),p=0;p<f.length;p++){var d=f[p];n[d]="".concat(n[d]," ").concat(ye.apply(void 0,[r[d]].concat(i)))}for(var m=Object.keys(t),y=0;y<m.length;y++){var h=m[y];a[h]=ye.apply(void 0,[t[h]].concat(i))}return{classNames:n,styles:a}}(h,b,v,O,E),N=D.classNames,z=N.dropzone,M=N.dropzoneActive,I=N.dropzoneReject,P=N.dropzoneDisabled,q=N.input,k=N.inputLabel,B=N.inputLabelWithFiles,T=N.preview,F=N.previewImage,A=N.submitButtonContainer,U=N.submitButton,W=D.styles,G=W.dropzone,H=W.dropzoneActive,Y=W.dropzoneReject,Q=W.dropzoneDisabled,$=W.input,Z=W.inputLabel,J=W.inputLabelWithFiles,V=W.preview,X=W.previewImage,K=W.submitButtonContainer,ee=W.submitButton,te=g||be,re=w||ve,ne=x||ge,ae=S||de,oe=null;null!==w&&(oe=O.map(function(e){return pe.a.createElement(re,{className:T,imageClassName:F,style:V,imageStyle:X,key:e.meta.id,fileWithMeta:e,meta:fe()({},e.meta),isUpload:Boolean(u),canCancel:ye(c,O,E),canRemove:ye(l,O,E),canRestart:ye(f,O,E),files:O,extra:E})}));var ie=null!==g?pe.a.createElement(te,{className:q,labelClassName:k,labelWithFilesClassName:B,style:$,labelStyle:Z,labelWithFilesStyle:J,accept:t,multiple:r,disabled:L,content:ye(p,O,E),withFilesContent:ye(d,O,E),onFiles:this.handleFiles,files:O,extra:E}):null,ue=i&&null!==x?pe.a.createElement(ne,{className:A,buttonClassName:U,style:K,buttonStyle:ee,disabled:ye(m,O,E),content:ye(y,O,E),onSubmit:this.handleSubmit,files:O,extra:E}):null,se=z,ce=G;return L?(se="".concat(se," ").concat(P),ce=fe()({},ce||{},Q||{})):C?(se="".concat(se," ").concat(I),ce=fe()({},ce||{},Y||{})):R&&(se="".concat(se," ").concat(M),ce=fe()({},ce||{},H||{})),pe.a.createElement(ae,{input:ie,previews:oe,submitButton:ue,dropzoneProps:{ref:this._dropzone,className:se,style:ce,onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:L?this.handleDropDisabled:this.handleDrop},files:O,extra:fe()({},E,{onFiles:this.handleFiles,onCancelFile:this.handleCancel,onRemoveFile:this.handleRemove,onRestartFile:this.handleRestart})})}}]),t}(pe.a.Component);A.propTypes={onChangeStatus:_.a.func,getUploadParams:_.a.func,onSubmit:_.a.func,accept:_.a.string,multiple:_.a.bool,minSizeBytes:_.a.number.isRequired,maxSizeBytes:_.a.number.isRequired,maxFiles:_.a.number.isRequired,validate:_.a.func,autoUpload:_.a.bool,timeout:_.a.number,disabled:_.a.oneOfType([_.a.bool,_.a.func]),canCancel:_.a.oneOfType([_.a.bool,_.a.func]),canRemove:_.a.oneOfType([_.a.bool,_.a.func]),canRestart:_.a.oneOfType([_.a.bool,_.a.func]),inputContent:_.a.oneOfType([_.a.node,_.a.func]),inputWithFilesContent:_.a.oneOfType([_.a.node,_.a.func]),submitButtonDisabled:_.a.oneOfType([_.a.bool,_.a.func]),submitButtonContent:_.a.oneOfType([_.a.node,_.a.func]),classNames:_.a.object.isRequired,styles:_.a.object.isRequired,addClassNames:_.a.object.isRequired,InputComponent:_.a.func,PreviewComponent:_.a.func,SubmitButtonComponent:_.a.func,LayoutComponent:_.a.func},A.defaultProps={accept:"*",multiple:!0,minSizeBytes:0,maxSizeBytes:Number.MAX_SAFE_INTEGER,maxFiles:Number.MAX_SAFE_INTEGER,autoUpload:!0,disabled:!1,canCancel:!0,canRemove:!0,canRestart:!0,inputContent:"Drag Files or Click to Browse",inputWithFilesContent:"Add Files",submitButtonDisabled:!1,submitButtonContent:"Submit",classNames:{},styles:{},addClassNames:{}};t.default=A}])}); |
{ | ||
"name": "react-dropzone-uploader", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"author": "Kyle Bebak <kylebebak@gmail.com>", | ||
@@ -52,2 +52,3 @@ "description": "React file dropzone and uploader: fully customizable, progress indicators, upload cancellation and restart, zero deps", | ||
"jest": "^23.6.0", | ||
"prettier": "1.16.4", | ||
"prop-types": ">=15.5.10", | ||
@@ -74,3 +75,3 @@ "react": ">=16.2.0", | ||
"dev": "webpack-dev-server --config webpack.config.js --mode development --open", | ||
"lint": "eslint src", | ||
"lint": "prettier --check 'src/**/*.js' && eslint src", | ||
"test": "jest --coverage", | ||
@@ -81,3 +82,4 @@ "styleguide": "styleguidist server", | ||
"build-styleguide-quickstart": "styleguidist build --config styleguide-quickstart.config.js", | ||
"build-docs": "./build_docs.sh" | ||
"build-docs": "./build_docs.sh", | ||
"prettier": "prettier --write 'src/**/*.js'" | ||
}, | ||
@@ -84,0 +86,0 @@ "dependencies": { |
@@ -84,3 +84,3 @@ # React Dropzone Uploader | ||
## UMD Build | ||
This library is available as an ES Module at <https://unpkg.com/react-dropzone-uploader@2.5.2/dist/react-dropzone-uploader.umd.js>. | ||
This library is available as an ES Module at <https://unpkg.com/react-dropzone-uploader@<version>/dist/react-dropzone-uploader.umd.js>. | ||
@@ -94,4 +94,4 @@ If you want to include it in your page, you need to include the dependencies and CSS as well. | ||
<script src="https://unpkg.com/react-dropzone-uploader@2.5.2/dist/react-dropzone-uploader.umd.js"></script> | ||
<link rel"stylesheet" href="https://unpkg.com/react-dropzone-uploader@2.5.2/dist/styles.css"></script> | ||
<script src="https://unpkg.com/react-dropzone-uploader@<version>/dist/react-dropzone-uploader.umd.js"></script> | ||
<link rel"stylesheet" href="https://unpkg.com/react-dropzone-uploader@<version>/dist/styles.css"></script> | ||
~~~ | ||
@@ -98,0 +98,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
89944
8
294
35
1