From 92aad16b852cc744aa7879d42393b9181a59268d Mon Sep 17 00:00:00 2001 From: Adam Svystun Date: Tue, 11 Sep 2018 08:25:51 +0200 Subject: [PATCH 1/2] Add placeholder description, API description, acknowledgements --- frontend/client/App.js | 13 +++-- frontend/client/constants.js | 3 + frontend/static/frontend/css/app.css | 17 +++++- frontend/static/frontend/js/app.client.js | 2 +- frontend/templates/index.html | 71 ++++++++++++++++++++++- package.json | 6 +- 6 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 frontend/client/constants.js diff --git a/frontend/client/App.js b/frontend/client/App.js index 6caa280..fd9e08e 100644 --- a/frontend/client/App.js +++ b/frontend/client/App.js @@ -5,9 +5,11 @@ import Dropzone from "react-dropzone"; import { BarLoader } from "react-spinners"; import { css } from "react-emotion"; -const COMIXIFY_API = "/comixify/"; -const MAX_FILE_SIZE = 50000000; -const PERMITTED_VIDEO_EXTENSIONS = "video/*"; +import { + COMIXIFY_API, + MAX_FILE_SIZE, + PERMITTED_VIDEO_EXTENSIONS +} from "./constants"; class App extends React.Component { static appStates = { @@ -83,8 +85,7 @@ class App extends React.Component { App.appStates.FINISHED ].includes(state); return ( -
-

Comixify

+
{state === App.appStates.FINISHED && [ ,

Go again:

@@ -122,4 +123,4 @@ class App extends React.Component { } } -ReactDOM.render(, document.getElementById("root")); +ReactDOM.render(, document.getElementById("demo")); diff --git a/frontend/client/constants.js b/frontend/client/constants.js new file mode 100644 index 0000000..23edf4a --- /dev/null +++ b/frontend/client/constants.js @@ -0,0 +1,3 @@ +export const COMIXIFY_API = "/comixify/"; +export const MAX_FILE_SIZE = 50000000; +export const PERMITTED_VIDEO_EXTENSIONS = "video/*"; diff --git a/frontend/static/frontend/css/app.css b/frontend/static/frontend/css/app.css index 8f440de..87125bf 100644 --- a/frontend/static/frontend/css/app.css +++ b/frontend/static/frontend/css/app.css @@ -10,14 +10,25 @@ body { } .wrap { - padding: 1rem; margin: 2rem auto 0 auto; max-width: 700px; - background: white; + box-sizing: border-box; +} + +.section { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04); border: 1px solid rgba(0, 0, 0, 0.09); border-radius: 3px; - box-sizing: border-box; + background: white; + margin-bottom: 1rem; + padding: 1rem; +} + +.authors { + display: flex; + justify-content: space-between; + max-width: 500px; + margin: 0 auto; } img { diff --git a/frontend/static/frontend/js/app.client.js b/frontend/static/frontend/js/app.client.js index dd16f1c..58eea19 100644 --- a/frontend/static/frontend/js/app.client.js +++ b/frontend/static/frontend/js/app.client.js @@ -25,4 +25,4 @@ object-assign * * @author Feross Aboukhadijeh * @license MIT - */e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=n(30),o=n(7),a=n(95),i=n(96);function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){u.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=u},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],c=!1,f=-1;function p(){c&&l&&(c=!1,l.length?s=l.concat(s):f=-1,s.length&&d())}function d(){if(!c){var e=u(p);c=!0;for(var t=s.length;t;){for(l=s,s=[];++f1)for(var n=1;n=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(7);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,o=String(e),a="",i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.charAt(0|i)||(u="=",i%1);a+=u.charAt(63&t>>8-i%1*8)){if((n=o.charCodeAt(i+=.75))>255)throw new r;t=t<<8|n}return a}},function(e,t,n){"use strict";var r=n(7);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(a)&&u.push("domain="+a),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(7);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,n){"use strict";var r=n(7),o=n(97),a=n(53),i=n(30),u=n(98),l=n(99);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.baseURL&&!u(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||i.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(54);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var r=n(103);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array: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 n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,o,a;o=[t,n(0),n(1),n(2),n(4),n(67)],void 0===(a="function"==typeof(r=function(e,t,n,r,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var i=l(t),u=l(n);function l(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(e,t){for(var n=0;ns;)for(var p,d=u(arguments[s++]),h=c?r(d).concat(c(d)):r(d),m=h.length,y=0;m>y;)f.call(d,p=h[y++])&&(n[p]=d[p]);return n}:l},function(e,t,n){var r=n(19),o=n(111),a=n(112);e.exports=function(e){return function(t,n,i){var u,l=r(t),s=o(l.length),c=a(i,s);if(e&&n!=n){for(;s>c;)if((u=l[c++])!=u)return!0}else for(;s>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(33),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(33),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){e.exports={default:n(114),__esModule:!0}},function(e,t,n){n(115),n(121),e.exports=n(42).f("iterator")},function(e,t,n){"use strict";var r=n(116)(!0);n(63)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(33),o=n(32);e.exports=function(e){return function(t,n){var a,i,u=String(o(t)),l=r(n),s=u.length;return l<0||l>=s?e?"":void 0:(a=u.charCodeAt(l))<55296||a>56319||l+1===s||(i=u.charCodeAt(l+1))<56320||i>57343?e?u.charAt(l):a:e?u.slice(l,l+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(40),o=n(23),a=n(41),i={};n(14)(i,n(20)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(15),o=n(21),a=n(22);e.exports=n(17)?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),u=i.length,l=0;u>l;)r.f(e,n=i[l++],t[n]);return e}},function(e,t,n){var r=n(10).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(11),o=n(38),a=n(34)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){n(122);for(var r=n(10),o=n(14),a=n(39),i=n(20)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(126),__esModule:!0}},function(e,t,n){n(127),n(132),n(133),n(134),e.exports=n(9).Symbol},function(e,t,n){"use strict";var r=n(10),o=n(11),a=n(17),i=n(13),u=n(64),l=n(128).KEY,s=n(18),c=n(35),f=n(41),p=n(25),d=n(20),h=n(42),m=n(43),y=n(129),v=n(130),g=n(21),b=n(16),w=n(19),x=n(31),k=n(23),_=n(40),E=n(131),C=n(66),S=n(15),O=n(22),P=C.f,T=S.f,N=E.f,j=r.Symbol,U=r.JSON,z=U&&U.stringify,A=d("_hidden"),R=d("toPrimitive"),D={}.propertyIsEnumerable,F=c("symbol-registry"),M=c("symbols"),L=c("op-symbols"),I=Object.prototype,B="function"==typeof j,W=r.QObject,V=!W||!W.prototype||!W.prototype.findChild,H=a&&s(function(){return 7!=_(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(I,t);r&&delete I[t],T(e,t,n),r&&e!==I&&T(I,t,r)}:T,$=function(e){var t=M[e]=_(j.prototype);return t._k=e,t},q=B&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},K=function(e,t,n){return e===I&&K(L,t,n),g(e),t=x(t,!0),g(n),o(M,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=_(n,{enumerable:k(0,!1)})):(o(e,A)||T(e,A,k(1,{})),e[A][t]=!0),H(e,t,n)):T(e,t,n)},X=function(e,t){g(e);for(var n,r=y(t=w(t)),o=0,a=r.length;a>o;)K(e,n=r[o++],t[n]);return e},G=function(e){var t=D.call(this,e=x(e,!0));return!(this===I&&o(M,e)&&!o(L,e))&&(!(t||!o(this,e)||!o(M,e)||o(this,A)&&this[A][e])||t)},Y=function(e,t){if(e=w(e),t=x(t,!0),e!==I||!o(M,t)||o(L,t)){var n=P(e,t);return!n||!o(M,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=N(w(e)),r=[],a=0;n.length>a;)o(M,t=n[a++])||t==A||t==l||r.push(t);return r},Z=function(e){for(var t,n=e===I,r=N(n?L:w(e)),a=[],i=0;r.length>i;)!o(M,t=r[i++])||n&&!o(I,t)||a.push(M[t]);return a};B||(u((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(L,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),H(this,e,k(1,n))};return a&&V&&H(I,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),C.f=Y,S.f=K,n(65).f=E.f=Q,n(26).f=G,n(37).f=Z,a&&!n(24)&&u(I,"propertyIsEnumerable",G,!0),h.f=function(e){return $(d(e))}),i(i.G+i.W+i.F*!B,{Symbol:j});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;J.length>ee;)d(J[ee++]);for(var te=O(d.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!B,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=j(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),i(i.S+i.F*!B,"Object",{create:function(e,t){return void 0===t?_(e):X(_(e),t)},defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),U&&i(i.S+i.F*(!B||s(function(){var e=j();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,z.apply(U,r)}}),j.prototype[R]||n(14)(j.prototype,R,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(25)("meta"),o=n(16),a=n(11),i=n(15).f,u=0,l=Object.isExtensible||function(){return!0},s=!n(18)(function(){return l(Object.preventExtensions({}))}),c=function(e){i(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return s&&f.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t,n){var r=n(22),o=n(37),a=n(26);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var i,u=n(e),l=a.f,s=0;u.length>s;)l.call(e,i=u[s++])&&t.push(i);return t}},function(e,t,n){var r=n(61);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(19),o=n(65).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(r(e))}},function(e,t){},function(e,t,n){n(43)("asyncIterator")},function(e,t,n){n(43)("observable")},function(e,t,n){e.exports={default:n(136),__esModule:!0}},function(e,t,n){n(137),e.exports=n(9).Object.setPrototypeOf},function(e,t,n){var r=n(13);r(r.S,"Object",{setPrototypeOf:n(138).set})},function(e,t,n){var r=n(16),o=n(21),a=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(56)(Function.call,n(66).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(140),__esModule:!0}},function(e,t,n){n(141);var r=n(9).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(13);r(r.S,"Object",{create:n(40)})},function(e,t,n){n(143),e.exports=n(9).Object.keys},function(e,t,n){var r=n(38),o=n(22);n(144)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(13),o=n(9),a=n(18);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var r,o,a;o=[t,n(0),n(1),n(2),n(4)],void 0===(a="function"==typeof(r=function(e,t,n,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=u(t),i=u(n);function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var k=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.renderChildren=function(e,t,n,o){return"function"==typeof e?e(b({},r.state,{isDragActive:t,isDragAccept:n,isDragReject:o})):e},r.composeHandlers=r.composeHandlers.bind(r),r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.onInputElementClick=r.onInputElementClick.bind(r),r.setRef=r.setRef.bind(r),r.setRefs=r.setRefs.bind(r),r.isFileDialogActive=!1,r.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a.Component),w(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",h,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),null!=this.fileInputEl&&this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",h),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){this.props.onDragStart&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),Promise.resolve(this.props.getDataTransferItems(e)).then(function(e){t.setState({isDragActive:!0,draggedFiles:e})}),this.props.onDragEnter&&this.props.onDragEnter.call(this,e)}},{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),this.dragTargets=this.dragTargets.filter(function(n){return n!==e.target&&t.node.contains(n)}),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,o=n.onDropAccepted,a=n.onDropRejected,i=n.multiple,u=n.disablePreview,l=n.accept,s=n.getDataTransferItems;e.preventDefault(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),Promise.resolve(s(e)).then(function(n){var s=[],c=[];n.forEach(function(e){if(!u)try{e.preview=window.URL.createObjectURL(e)}catch(e){}d(e,l)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?s.push(e):c.push(e)}),!i&&s.length>1&&c.push.apply(c,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&a&&a.call(t,c,e),s.length>0&&o&&o.call(t,s,e)})}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick;t.disableClick||(e.stopPropagation(),n&&n.call(this,e),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?setTimeout(this.open.bind(this),0):this.open())}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick()}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout(function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1)),"function"==typeof t&&t()},300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,r=e.activeClassName,a=e.children,i=e.disabled,u=e.disabledClassName,l=e.inputProps,s=e.multiple,c=e.name,f=e.rejectClassName,h=x(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),w=h.acceptStyle,k=h.activeStyle,_=h.className,E=void 0===_?"":_,C=h.disabledStyle,S=h.rejectStyle,O=h.style,P=x(h,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),T=this.state,N=T.isDragActive,j=T.draggedFiles,U=j.length,z=s||U<=1,A=U>0&&function(e,t){return e.every(function(e){return d(e,t)})}(j,this.props.accept),R=U>0&&(!A||!z),D=!(E||O||k||w||S||C);N&&r&&(E+=" "+r),A&&n&&(E+=" "+n),R&&f&&(E+=" "+f),i&&u&&(E+=" "+u),D&&(O=g,k=v,w=v,S=m,C=y);var F=b({position:"relative"},O);k&&N&&(F=b({},F,k)),w&&A&&(F=b({},F,w)),S&&R&&(F=b({},F,S)),C&&i&&(F=b({},F,C));var M={accept:t,disabled:i,type:"file",style:b({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},l.style),multiple:p&&s,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};c&&c.length&&(M.name=c),P.acceptedFiles,P.preventDropOnDocument,P.disablePreview,P.disableClick,P.onDropAccepted,P.onDropRejected,P.onFileDialogCancel,P.maxSize,P.minSize,P.getDataTransferItems;var L=x(P,["acceptedFiles","preventDropOnDocument","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return o.a.createElement("div",b({className:E,style:F},L,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":i}),this.renderChildren(a,N,A,R),o.a.createElement("input",b({},l,M)))}}]),t}(),_=k;k.propTypes={accept:s.a.oneOfType([s.a.string,s.a.arrayOf(s.a.string)]),children:s.a.oneOfType([s.a.node,s.a.func]),disableClick:s.a.bool,disabled:s.a.bool,disablePreview:s.a.bool,preventDropOnDocument:s.a.bool,inputProps:s.a.object,multiple:s.a.bool,name:s.a.string,maxSize:s.a.number,minSize:s.a.number,className:s.a.string,activeClassName:s.a.string,acceptClassName:s.a.string,rejectClassName:s.a.string,disabledClassName:s.a.string,style:s.a.object,activeStyle:s.a.object,acceptStyle:s.a.object,rejectStyle:s.a.object,disabledStyle:s.a.object,getDataTransferItems:s.a.func,onClick:s.a.func,onDrop:s.a.func,onDropAccepted:s.a.func,onDropRejected:s.a.func,onDragStart:s.a.func,onDragEnter:s.a.func,onDragOver:s.a.func,onDragLeave:s.a.func,onFileDialogCancel:s.a.func},k.defaultProps={preventDropOnDocument:!0,disabled:!1,disablePreview:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}};var E,C=n(71),S=n(2),O=n(27),P=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class)|(on[A-Z].*)|((data|aria|x)-.*))$/i,T=(Object(O.a)(P.test.bind(P)),"__EMOTION_THEMING__");(E={})[T]=s.a.object;o.a;const N="/comixify/",j=5e7,U="video/*";class z extends o.a.Component{constructor(e){super(e),this.state={state:z.appStates.INITIAL,drop_errors:[],result_comics:null},this.onVideoDrop=this.onVideoDrop.bind(this),this.onVideoUploadProgress=this.onVideoUploadProgress.bind(this)}onVideoUploadProgress(e){let t=Math.round(100*e.loaded/e.total);console.log(t)}processVideo(e){let t=new FormData;t.append("file",e),Object(u.post)(N,t,{headers:{"content-type":"multipart/form-data"},onUploadProgress:this.onVideoUploadProgress}).then(e=>{"ok"===e.data.status_message?this.setState({state:z.appStates.FINISHED,result_comics:e.data.comic}):this.setState({state:z.appStates.UPLOAD_ERROR})}).catch(e=>{console.error(e),this.setState({state:z.appStates.UPLOAD_ERROR})}),this.setState({state:z.appStates.PROCESSING})}onVideoDrop(e,t){if(0!==t.length)return console.error(t),void this.setState({drop_errors:["Maximum size for single video is 50MB"],stata:z.appStates.DROP_ERROR});this.processVideo(e[0])}render(){let{state:e,drop_errors:t,result_comics:n}=this.state,r=[z.appStates.INITIAL,z.appStates.UPLOAD_ERROR,z.appStates.DROP_ERROR,z.appStates.FINISHED].includes(e);return o.a.createElement("div",{className:"wrap"},o.a.createElement("h1",null,"Comixify"),e===z.appStates.FINISHED&&[o.a.createElement("img",{key:"1",src:n}),o.a.createElement("p",{key:"2"},"Go again:")],e===z.appStates.DROP_ERROR&&t.map((e,t)=>o.a.createElement("p",{key:t},e)),e===z.appStates.UPLOAD_ERROR&&o.a.createElement("p",null,"Server Error: Please try again later."),r&&o.a.createElement(_,{onDrop:this.onVideoDrop,accept:U,maxSize:j,className:"dropzone",acceptClassName:"dropzone--accepted",rejectClassName:"dropzone--rejected",multiple:!1},o.a.createElement("p",null,"Drop files here, or click to select manually")),e===z.appStates.PROCESSING&&o.a.createElement(C.BarLoader,{color:"rgb(54, 215, 183)",className:Object(S.css)("margin:0 auto;"),width:10,widthUnit:"rem"}))}}z.appStates={INITIAL:0,PROCESSING:1,FINISHED:2,UPLOAD_ERROR:3,DROP_ERROR:4},i.a.render(o.a.createElement(z,null),document.getElementById("root"))}]); \ No newline at end of file + */e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=n(30),o=n(7),a=n(95),i=n(96);function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[i,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){u.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=u},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,s=[],c=!1,f=-1;function p(){c&&l&&(c=!1,l.length?s=l.concat(s):f=-1,s.length&&d())}function d(){if(!c){var e=u(p);c=!0;for(var t=s.length;t;){for(l=s,s=[];++f1)for(var n=1;n=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(7);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,o=String(e),a="",i=0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.charAt(0|i)||(u="=",i%1);a+=u.charAt(63&t>>8-i%1*8)){if((n=o.charCodeAt(i+=.75))>255)throw new r;t=t<<8|n}return a}},function(e,t,n){"use strict";var r=n(7);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(a)&&u.push("domain="+a),!0===i&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(7);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},function(e,t,n){"use strict";var r=n(7),o=n(97),a=n(53),i=n(30),u=n(98),l=n(99);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.baseURL&&!u(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||i.adapter)(e).then(function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(7);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(54);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var r=n(103);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=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 u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array: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 n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,o,a;o=[t,n(0),n(1),n(2),n(4),n(67)],void 0===(a="function"==typeof(r=function(e,t,n,r,o,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var i=l(t),u=l(n);function l(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(e,t){for(var n=0;ns;)for(var p,d=u(arguments[s++]),h=c?r(d).concat(c(d)):r(d),m=h.length,y=0;m>y;)f.call(d,p=h[y++])&&(n[p]=d[p]);return n}:l},function(e,t,n){var r=n(19),o=n(111),a=n(112);e.exports=function(e){return function(t,n,i){var u,l=r(t),s=o(l.length),c=a(i,s);if(e&&n!=n){for(;s>c;)if((u=l[c++])!=u)return!0}else for(;s>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(33),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(33),o=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):a(e,t)}},function(e,t,n){e.exports={default:n(114),__esModule:!0}},function(e,t,n){n(115),n(121),e.exports=n(42).f("iterator")},function(e,t,n){"use strict";var r=n(116)(!0);n(63)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(33),o=n(32);e.exports=function(e){return function(t,n){var a,i,u=String(o(t)),l=r(n),s=u.length;return l<0||l>=s?e?"":void 0:(a=u.charCodeAt(l))<55296||a>56319||l+1===s||(i=u.charCodeAt(l+1))<56320||i>57343?e?u.charAt(l):a:e?u.slice(l,l+2):i-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(40),o=n(23),a=n(41),i={};n(14)(i,n(20)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(i,{next:o(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(15),o=n(21),a=n(22);e.exports=n(17)?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),u=i.length,l=0;u>l;)r.f(e,n=i[l++],t[n]);return e}},function(e,t,n){var r=n(10).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(11),o=n(38),a=n(34)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},function(e,t,n){n(122);for(var r=n(10),o=n(14),a=n(39),i=n(20)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(126),__esModule:!0}},function(e,t,n){n(127),n(132),n(133),n(134),e.exports=n(9).Symbol},function(e,t,n){"use strict";var r=n(10),o=n(11),a=n(17),i=n(13),u=n(64),l=n(128).KEY,s=n(18),c=n(35),f=n(41),p=n(25),d=n(20),h=n(42),m=n(43),y=n(129),v=n(130),g=n(21),b=n(16),w=n(19),x=n(31),k=n(23),_=n(40),E=n(131),C=n(66),S=n(15),O=n(22),P=C.f,T=S.f,N=E.f,j=r.Symbol,U=r.JSON,z=U&&U.stringify,A=d("_hidden"),R=d("toPrimitive"),D={}.propertyIsEnumerable,F=c("symbol-registry"),M=c("symbols"),L=c("op-symbols"),I=Object.prototype,B="function"==typeof j,W=r.QObject,V=!W||!W.prototype||!W.prototype.findChild,H=a&&s(function(){return 7!=_(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(I,t);r&&delete I[t],T(e,t,n),r&&e!==I&&T(I,t,r)}:T,$=function(e){var t=M[e]=_(j.prototype);return t._k=e,t},q=B&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},K=function(e,t,n){return e===I&&K(L,t,n),g(e),t=x(t,!0),g(n),o(M,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=_(n,{enumerable:k(0,!1)})):(o(e,A)||T(e,A,k(1,{})),e[A][t]=!0),H(e,t,n)):T(e,t,n)},X=function(e,t){g(e);for(var n,r=y(t=w(t)),o=0,a=r.length;a>o;)K(e,n=r[o++],t[n]);return e},G=function(e){var t=D.call(this,e=x(e,!0));return!(this===I&&o(M,e)&&!o(L,e))&&(!(t||!o(this,e)||!o(M,e)||o(this,A)&&this[A][e])||t)},Y=function(e,t){if(e=w(e),t=x(t,!0),e!==I||!o(M,t)||o(L,t)){var n=P(e,t);return!n||!o(M,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=N(w(e)),r=[],a=0;n.length>a;)o(M,t=n[a++])||t==A||t==l||r.push(t);return r},Z=function(e){for(var t,n=e===I,r=N(n?L:w(e)),a=[],i=0;r.length>i;)!o(M,t=r[i++])||n&&!o(I,t)||a.push(M[t]);return a};B||(u((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===I&&t.call(L,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),H(this,e,k(1,n))};return a&&V&&H(I,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",function(){return this._k}),C.f=Y,S.f=K,n(65).f=E.f=Q,n(26).f=G,n(37).f=Z,a&&!n(24)&&u(I,"propertyIsEnumerable",G,!0),h.f=function(e){return $(d(e))}),i(i.G+i.W+i.F*!B,{Symbol:j});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;J.length>ee;)d(J[ee++]);for(var te=O(d.store),ne=0;te.length>ne;)m(te[ne++]);i(i.S+i.F*!B,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=j(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),i(i.S+i.F*!B,"Object",{create:function(e,t){return void 0===t?_(e):X(_(e),t)},defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),U&&i(i.S+i.F*(!B||s(function(){var e=j();return"[null]"!=z([e])||"{}"!=z({a:e})||"{}"!=z(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,z.apply(U,r)}}),j.prototype[R]||n(14)(j.prototype,R,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(25)("meta"),o=n(16),a=n(11),i=n(15).f,u=0,l=Object.isExtensible||function(){return!0},s=!n(18)(function(){return l(Object.preventExtensions({}))}),c=function(e){i(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return s&&f.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t,n){var r=n(22),o=n(37),a=n(26);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var i,u=n(e),l=a.f,s=0;u.length>s;)l.call(e,i=u[s++])&&t.push(i);return t}},function(e,t,n){var r=n(61);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(19),o=n(65).f,a={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==a.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(r(e))}},function(e,t){},function(e,t,n){n(43)("asyncIterator")},function(e,t,n){n(43)("observable")},function(e,t,n){e.exports={default:n(136),__esModule:!0}},function(e,t,n){n(137),e.exports=n(9).Object.setPrototypeOf},function(e,t,n){var r=n(13);r(r.S,"Object",{setPrototypeOf:n(138).set})},function(e,t,n){var r=n(16),o=n(21),a=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(56)(Function.call,n(66).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(140),__esModule:!0}},function(e,t,n){n(141);var r=n(9).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(13);r(r.S,"Object",{create:n(40)})},function(e,t,n){n(143),e.exports=n(9).Object.keys},function(e,t,n){var r=n(38),o=n(22);n(144)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(13),o=n(9),a=n(18);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],i={};i[e]=t(n),r(r.S+r.F*a(function(){n(1)}),"Object",i)}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var r,o,a;o=[t,n(0),n(1),n(2),n(4)],void 0===(a="function"==typeof(r=function(e,t,n,r,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=u(t),i=u(n);function u(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var k=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.renderChildren=function(e,t,n,o){return"function"==typeof e?e(b({},r.state,{isDragActive:t,isDragAccept:n,isDragReject:o})):e},r.composeHandlers=r.composeHandlers.bind(r),r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.onInputElementClick=r.onInputElementClick.bind(r),r.setRef=r.setRef.bind(r),r.setRefs=r.setRefs.bind(r),r.isFileDialogActive=!1,r.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.a.Component),w(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",h,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),null!=this.fileInputEl&&this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",h),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){this.props.onDragStart&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),Promise.resolve(this.props.getDataTransferItems(e)).then(function(e){t.setState({isDragActive:!0,draggedFiles:e})}),this.props.onDragEnter&&this.props.onDragEnter.call(this,e)}},{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),this.dragTargets=this.dragTargets.filter(function(n){return n!==e.target&&t.node.contains(n)}),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,o=n.onDropAccepted,a=n.onDropRejected,i=n.multiple,u=n.disablePreview,l=n.accept,s=n.getDataTransferItems;e.preventDefault(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),Promise.resolve(s(e)).then(function(n){var s=[],c=[];n.forEach(function(e){if(!u)try{e.preview=window.URL.createObjectURL(e)}catch(e){}d(e,l)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?s.push(e):c.push(e)}),!i&&s.length>1&&c.push.apply(c,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&a&&a.call(t,c,e),s.length>0&&o&&o.call(t,s,e)})}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick;t.disableClick||(e.stopPropagation(),n&&n.call(this,e),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?setTimeout(this.open.bind(this),0):this.open())}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick()}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout(function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1)),"function"==typeof t&&t()},300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,r=e.activeClassName,a=e.children,i=e.disabled,u=e.disabledClassName,l=e.inputProps,s=e.multiple,c=e.name,f=e.rejectClassName,h=x(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),w=h.acceptStyle,k=h.activeStyle,_=h.className,E=void 0===_?"":_,C=h.disabledStyle,S=h.rejectStyle,O=h.style,P=x(h,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),T=this.state,N=T.isDragActive,j=T.draggedFiles,U=j.length,z=s||U<=1,A=U>0&&function(e,t){return e.every(function(e){return d(e,t)})}(j,this.props.accept),R=U>0&&(!A||!z),D=!(E||O||k||w||S||C);N&&r&&(E+=" "+r),A&&n&&(E+=" "+n),R&&f&&(E+=" "+f),i&&u&&(E+=" "+u),D&&(O=g,k=v,w=v,S=m,C=y);var F=b({position:"relative"},O);k&&N&&(F=b({},F,k)),w&&A&&(F=b({},F,w)),S&&R&&(F=b({},F,S)),C&&i&&(F=b({},F,C));var M={accept:t,disabled:i,type:"file",style:b({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},l.style),multiple:p&&s,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};c&&c.length&&(M.name=c),P.acceptedFiles,P.preventDropOnDocument,P.disablePreview,P.disableClick,P.onDropAccepted,P.onDropRejected,P.onFileDialogCancel,P.maxSize,P.minSize,P.getDataTransferItems;var L=x(P,["acceptedFiles","preventDropOnDocument","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return o.a.createElement("div",b({className:E,style:F},L,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":i}),this.renderChildren(a,N,A,R),o.a.createElement("input",b({},l,M)))}}]),t}(),_=k;k.propTypes={accept:s.a.oneOfType([s.a.string,s.a.arrayOf(s.a.string)]),children:s.a.oneOfType([s.a.node,s.a.func]),disableClick:s.a.bool,disabled:s.a.bool,disablePreview:s.a.bool,preventDropOnDocument:s.a.bool,inputProps:s.a.object,multiple:s.a.bool,name:s.a.string,maxSize:s.a.number,minSize:s.a.number,className:s.a.string,activeClassName:s.a.string,acceptClassName:s.a.string,rejectClassName:s.a.string,disabledClassName:s.a.string,style:s.a.object,activeStyle:s.a.object,acceptStyle:s.a.object,rejectStyle:s.a.object,disabledStyle:s.a.object,getDataTransferItems:s.a.func,onClick:s.a.func,onDrop:s.a.func,onDropAccepted:s.a.func,onDropRejected:s.a.func,onDragStart:s.a.func,onDragEnter:s.a.func,onDragOver:s.a.func,onDragLeave:s.a.func,onFileDialogCancel:s.a.func},k.defaultProps={preventDropOnDocument:!0,disabled:!1,disablePreview:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}};var E,C=n(71),S=n(2),O=n(27),P=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class)|(on[A-Z].*)|((data|aria|x)-.*))$/i,T=(Object(O.a)(P.test.bind(P)),"__EMOTION_THEMING__");(E={})[T]=s.a.object;o.a;const N="/comixify/",j=5e7,U="video/*";class z extends o.a.Component{constructor(e){super(e),this.state={state:z.appStates.INITIAL,drop_errors:[],result_comics:null},this.onVideoDrop=this.onVideoDrop.bind(this),this.onVideoUploadProgress=this.onVideoUploadProgress.bind(this)}onVideoUploadProgress(e){let t=Math.round(100*e.loaded/e.total);console.log(t)}processVideo(e){let t=new FormData;t.append("file",e),Object(u.post)(N,t,{headers:{"content-type":"multipart/form-data"},onUploadProgress:this.onVideoUploadProgress}).then(e=>{"ok"===e.data.status_message?this.setState({state:z.appStates.FINISHED,result_comics:e.data.comic}):this.setState({state:z.appStates.UPLOAD_ERROR})}).catch(e=>{console.error(e),this.setState({state:z.appStates.UPLOAD_ERROR})}),this.setState({state:z.appStates.PROCESSING})}onVideoDrop(e,t){if(0!==t.length)return console.error(t),void this.setState({drop_errors:["Maximum size for single video is 50MB"],stata:z.appStates.DROP_ERROR});this.processVideo(e[0])}render(){let{state:e,drop_errors:t,result_comics:n}=this.state,r=[z.appStates.INITIAL,z.appStates.UPLOAD_ERROR,z.appStates.DROP_ERROR,z.appStates.FINISHED].includes(e);return o.a.createElement("div",null,e===z.appStates.FINISHED&&[o.a.createElement("img",{key:"1",src:n}),o.a.createElement("p",{key:"2"},"Go again:")],e===z.appStates.DROP_ERROR&&t.map((e,t)=>o.a.createElement("p",{key:t},e)),e===z.appStates.UPLOAD_ERROR&&o.a.createElement("p",null,"Server Error: Please try again later."),r&&o.a.createElement(_,{onDrop:this.onVideoDrop,accept:U,maxSize:j,className:"dropzone",acceptClassName:"dropzone--accepted",rejectClassName:"dropzone--rejected",multiple:!1},o.a.createElement("p",null,"Drop files here, or click to select manually")),e===z.appStates.PROCESSING&&o.a.createElement(C.BarLoader,{color:"rgb(54, 215, 183)",className:Object(S.css)("margin:0 auto;"),width:10,widthUnit:"rem"}))}}z.appStates={INITIAL:0,PROCESSING:1,FINISHED:2,UPLOAD_ERROR:3,DROP_ERROR:4},i.a.render(o.a.createElement(z,null),document.getElementById("demo"))}]); \ No newline at end of file diff --git a/frontend/templates/index.html b/frontend/templates/index.html index a8b6192..7425d5d 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -9,7 +9,76 @@ -
+ +
+
+

Comixify

+
+
+ Author 1 +
+
+ Author 2 +
+
+ Author 3 +
+
+ Author 4 +
+
+
+

Abstract

+
+ Lorem ipsum eiusmod esse laboris tempor laboris aliquip laborum anim enim reprehenderit consequat sed mollit eiusmod dolore qui duis exercitation adipisicing exercitation in. Sint in occaecat ut incididunt eiusmod consectetur sint quis dolore nostrud laboris sit ut in aute. Ex non dolore ut ullamco ut ea ad dolore. Lorem ipsum cupidatat occaecat veniam consectetur sunt in id incididunt esse. Elit non deserunt laborum anim dolor ut cillum reprehenderit anim veniam incididunt ea aute commodo in dolor. Elit esse nisi anim duis sunt tempor pariatur anim et laborum laborum aute in excepteur cupidatat duis veniam. Voluptate labore ad consectetur ut amet dolor nisi eiusmod consectetur sit in. Laborum in excepteur dolore dolore nulla mollit cillum occaecat ut pariatur non. +
+
+
+
+

Demo

+
+
+
+

API

+
+

Request:

+

+ Path: + http://comixify.ii.pw.edu.pl/comixify/ +

+

Method: POST

+

Data: +
+ + { +
+     file: video/mp4 +
+ } +
+

+ + * Max size of video is 50 MB + +

Respose:

+ + { +
+     status: string,
+     comic: string +
+ } +
+

comic - url to result comics

+
+
+
+

Acknowledgements

+
+ We would like to thank Google for giving us free credits for Google Cloud. +
+
+
diff --git a/package.json b/package.json index 819ce83..fcbe31b 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --config ./frontend/client/webpack.config.js", - "build:watch": - "webpack --config ./frontend/client/webpack.config.js --watch", - "build:prod": - "NODE_ENV=production webpack --config ./frontend/client/webpack.config.js" + "build:watch": "webpack --config ./frontend/client/webpack.config.js --watch", + "build:prod": "NODE_ENV=production webpack --config ./frontend/client/webpack.config.js" }, "repository": { "type": "git", From 2097318562929506ef7e7baaaa7ec8c18140b5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99=C5=9Bko?= Date: Tue, 11 Sep 2018 21:00:31 +0200 Subject: [PATCH 2/2] Add texts in placeholders --- frontend/templates/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/templates/index.html b/frontend/templates/index.html index 7425d5d..96d38f0 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -15,22 +15,22 @@

Comixify

- Author 1 + Maciej Pęśko
- Author 2 + Adam Svystun
- Author 3 + Paweł Andruszkiewicz
- Author 4 + Tomasz Trzciński

Abstract

- Lorem ipsum eiusmod esse laboris tempor laboris aliquip laborum anim enim reprehenderit consequat sed mollit eiusmod dolore qui duis exercitation adipisicing exercitation in. Sint in occaecat ut incididunt eiusmod consectetur sint quis dolore nostrud laboris sit ut in aute. Ex non dolore ut ullamco ut ea ad dolore. Lorem ipsum cupidatat occaecat veniam consectetur sunt in id incididunt esse. Elit non deserunt laborum anim dolor ut cillum reprehenderit anim veniam incididunt ea aute commodo in dolor. Elit esse nisi anim duis sunt tempor pariatur anim et laborum laborum aute in excepteur cupidatat duis veniam. Voluptate labore ad consectetur ut amet dolor nisi eiusmod consectetur sit in. Laborum in excepteur dolore dolore nulla mollit cillum occaecat ut pariatur non. + Many recent works in the field of Neural Style Transfer showed that producing an image in the style of another image is possible. There are various possible applications to use such techniques like paintings style transfer or photo-realistic style transfer. In our project, we present end-to-end solution that transforms input video into a comic in just a few seconds. Our work consists of two main parts: keyframes extraction and comic style transfer. In the near future we would like to introduce next two parts: Comic Grid Layout Generation and Speech Extraction.
@@ -75,7 +75,7 @@

Acknowledgements

- We would like to thank Google for giving us free credits for Google Cloud. + We would like to thank Google for granting us free Google Cloud Platform credits that enabled us to develop our project.