From 19adbf48642085f39b9562ea6ad1e248a546373c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 20 Sep 2018 02:19:48 +0200 Subject: browser is browsing --- public/bundle.js | 75643 ++++++++++++++++++++++++++++++++++++++++++++++++- public/bundle.js.map | 2 +- 2 files changed, 75636 insertions(+), 9 deletions(-) (limited to 'public') diff --git a/public/bundle.js b/public/bundle.js index ec8079d..b6d9f12 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -1,16 +1,75643 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=304)}([function(t,e,n){t.exports=n(294)()},function(t,e,n){"use strict";n.r(e),n.d(e,"h",function(){return s}),n.d(e,"createElement",function(){return s}),n.d(e,"cloneElement",function(){return l}),n.d(e,"Component",function(){return F}),n.d(e,"render",function(){return N}),n.d(e,"rerender",function(){return f}),n.d(e,"options",function(){return i});var i={},r=[],o=[];function s(t,e){var n,s,a,u,l=o;for(u=arguments.length;u-- >2;)r.push(arguments[u]);for(e&&null!=e.children&&(r.length||r.push(e.children),delete e.children);r.length;)if((s=r.pop())&&void 0!==s.pop)for(u=s.length;u--;)r.push(s[u]);else"boolean"==typeof s&&(s=null),(a="function"!=typeof t)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(a=!1)),a&&n?l[l.length-1]+=s:l===o?l=[s]:l.push(s),n=a;var c=new function(){};return c.nodeName=t,c.children=l,c.attributes=null==e?void 0:e,c.key=null==e?void 0:e.key,void 0!==i.vnode&&i.vnode(c),c}function a(t,e){for(var n in e)t[n]=e[n];return t}var u="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function l(t,e){return s(t.nodeName,a(a({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}var c=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,h=[];function p(t){!t._dirty&&(t._dirty=!0)&&1==h.push(t)&&(i.debounceRendering||u)(f)}function f(){var t,e=h;for(h=[];t=e.pop();)t._dirty&&R(t)}function d(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function y(t){var e=a({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===e[i]&&(e[i]=n[i]);return e}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,n,i,r){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),i&&i(t);else if("class"!==e||r)if("style"===e){if(i&&"string"!=typeof i&&"string"!=typeof n||(t.style.cssText=i||""),i&&"object"==typeof i){if("string"!=typeof n)for(var o in n)o in i||(t.style[o]="");for(var o in i)t.style[o]="number"==typeof i[o]&&!1===c.test(o)?i[o]+"px":i[o]}}else if("dangerouslySetInnerHTML"===e)i&&(t.innerHTML=i.__html||"");else if("o"==e[0]&&"n"==e[1]){var s=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),i?n||t.addEventListener(e,v,s):t.removeEventListener(e,v,s),(t._listeners||(t._listeners={}))[e]=i}else if("list"!==e&&"type"!==e&&!r&&e in t)!function(t,e,n){try{t[e]=n}catch(t){}}(t,e,null==i?"":i),null!=i&&!1!==i||t.removeAttribute(e);else{var a=r&&e!==(e=e.replace(/^xlink:?/,""));null==i||!1===i?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof i&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),i):t.setAttribute(e,i))}else t.className=i||""}function v(t){return this._listeners[t.type](i.event&&i.event(t)||t)}var g=[],b=0,w=!1,k=!1;function S(){for(var t;t=g.pop();)i.afterMount&&i.afterMount(t),t.componentDidMount&&t.componentDidMount()}function T(t,e,n,i,r,o){b++||(w=null!=r&&void 0!==r.ownerSVGElement,k=null!=t&&!("__preactattr_"in t));var s=x(t,e,n,i,o);return r&&s.parentNode!==r&&r.appendChild(s),--b||(k=!1,o||S()),s}function x(t,e,n,i,r){var o=t,s=w;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||r)?t.nodeValue!=e&&(t.nodeValue=e):(o=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0))),o.__preactattr_=!0,o;var a,u,l=e.nodeName;if("function"==typeof l)return function(t,e,n,i){var r=t&&t._component,o=r,s=t,a=r&&t._componentConstructor===e.nodeName,u=a,l=y(e);for(;r&&!u&&(r=r._parentComponent);)u=r.constructor===e.nodeName;r&&u&&(!i||r._component)?(M(r,l,3,n,i),t=r.base):(o&&!a&&(j(o),t=s=null),r=E(e.nodeName,l,n),t&&!r.nextBase&&(r.nextBase=t,s=null),M(r,l,1,n,i),t=r.base,s&&t!==s&&(s._component=null,O(s,!1)));return t}(t,e,n,i);if(w="svg"===l||"foreignObject"!==l&&w,l=String(l),(!t||!d(t,l))&&(a=l,(u=w?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,o=u,t)){for(;t.firstChild;)o.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(o,t),O(t,!0)}var c=o.firstChild,h=o.__preactattr_,p=e.children;if(null==h){h=o.__preactattr_={};for(var f=o.attributes,v=f.length;v--;)h[f[v].name]=f[v].value}return!k&&p&&1===p.length&&"string"==typeof p[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=p[0]&&(c.nodeValue=p[0]):(p&&p.length||null!=c)&&function(t,e,n,i,r){var o,s,a,u,l,c=t.childNodes,h=[],p={},f=0,y=0,_=c.length,v=0,g=e?e.length:0;if(0!==_)for(var b=0;b<_;b++){var w=c[b],k=w.__preactattr_,S=g&&k?w._component?w._component.__key:k.key:null;null!=S?(f++,p[S]=w):(k||(void 0!==w.splitText?!r||w.nodeValue.trim():r))&&(h[v++]=w)}if(0!==g)for(var b=0;b0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(a)throw a;for(var i=!1,r={},o=0;o0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1]||e+"Subscription",r=function(t){function r(n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n,i));return o[e]=n.store,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),r.prototype.getChildContext=function(){var t;return(t={})[e]=this[e],t[n]=null,t},r.prototype.render=function(){return i.a.only(this.props.children)},r}(i.b);return r.propTypes={store:a.isRequired,children:o.a.element.isRequired},r.childContextTypes=((t={})[e]=a.isRequired,t[n]=s,t),r}var l=u(),c=n(143),h=n.n(c),p=n(62),f=n.n(p);var d=null,y={notify:function(){}};var m=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.store=e,this.parentSub=n,this.onStateChange=i,this.unsubscribe=null,this.listeners=y}return t.prototype.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},t.prototype.notifyNestedSubs=function(){this.listeners.notify()},t.prototype.isSubscribed=function(){return Boolean(this.unsubscribe)},t.prototype.trySubscribe=function(){var t,e;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.onStateChange):this.store.subscribe(this.onStateChange),this.listeners=(t=[],e=[],{clear:function(){e=d,t=d},notify:function(){for(var n=t=e,i=0;i1&&void 0!==arguments[1]?arguments[1]:{},o=r.getDisplayName,u=void 0===o?function(t){return"ConnectAdvanced("+t+")"}:o,l=r.methodName,c=void 0===l?"connectAdvanced":l,p=r.renderCountProp,d=void 0===p?void 0:p,y=r.shouldHandleStateChanges,w=void 0===y||y,k=r.storeKey,S=void 0===k?"store":k,T=r.withRef,x=void 0!==T&&T,O=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),P=S+"Subscription",A=v++,E=((e={})[S]=a,e[P]=s,e),C=((n={})[P]=s,n);return function(e){f()("function"==typeof e,"You must pass a component to the function returned by "+c+". Instead received "+JSON.stringify(e));var n=e.displayName||e.name||"Component",r=u(n),o=_({},O,{getDisplayName:u,methodName:c,renderCountProp:d,shouldHandleStateChanges:w,storeKey:S,withRef:x,displayName:r,wrappedComponentName:n,WrappedComponent:e}),s=function(n){function s(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,n.call(this,t,e));return i.version=A,i.state={},i.renderCount=0,i.store=t[S]||e[S],i.propsMode=Boolean(t[S]),i.setWrappedInstance=i.setWrappedInstance.bind(i),f()(i.store,'Could not find "'+S+'" in either the context or props of "'+r+'". Either wrap the root component in a , or explicitly pass "'+S+'" as a prop to "'+r+'".'),i.initSelector(),i.initSubscription(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(s,n),s.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return(t={})[P]=e||this.context[P],t},s.prototype.componentDidMount=function(){w&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},s.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},s.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},s.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=b,this.store=null,this.selector.run=b,this.selector.shouldComponentUpdate=!1},s.prototype.getWrappedInstance=function(){return f()(x,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+c+"() call."),this.wrappedInstance},s.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},s.prototype.initSelector=function(){var e=t(this.store.dispatch,o);this.selector=function(t,e){var n={run:function(i){try{var r=t(e.getState(),i);(r!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=r,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}(e,this.store),this.selector.run(this.props)},s.prototype.initSubscription=function(){if(w){var t=(this.propsMode?this.props:this.context)[P];this.subscription=new m(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},s.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(g)):this.notifyNestedSubs()},s.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},s.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},s.prototype.addExtraProps=function(t){if(!(x||d||this.propsMode&&this.subscription))return t;var e=_({},t);return x&&(e.ref=this.setWrappedInstance),d&&(e[d]=this.renderCount++),this.propsMode&&this.subscription&&(e[P]=this.subscription),e},s.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return Object(i.c)(e,this.addExtraProps(t.props))},s}(i.b);return s.WrappedComponent=e,s.displayName=r,s.childContextTypes=C,s.contextTypes=E,s.propTypes=E,h()(s,e)}}var k=Object.prototype.hasOwnProperty;function S(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function T(t,e){if(S(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var r=0;r=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),s=n(t,o),a=i(t,o),u=r(t,o);return(o.pure?z:U)(s,a,u,t,o)}var W=Object.assign||function(t){for(var e=1;e=0;i--){var r=e[i](t);if(r)return r}return function(e,i){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function V(t,e){return t===e}var H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?w:e,i=t.mapStateToPropsFactories,r=void 0===i?D:i,o=t.mapDispatchToPropsFactories,s=void 0===o?L:o,a=t.mergePropsFactories,u=void 0===a?B:a,l=t.selectorFactory,c=void 0===l?Y:l;return function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=o.pure,l=void 0===a||a,h=o.areStatesEqual,p=void 0===h?V:h,f=o.areOwnPropsEqual,d=void 0===f?T:f,y=o.areStatePropsEqual,m=void 0===y?T:y,_=o.areMergedPropsEqual,v=void 0===_?T:_,g=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),b=G(t,r,"mapStateToProps"),w=G(e,s,"mapDispatchToProps"),k=G(i,u,"mergeProps");return n(c,W({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:b,initMapDispatchToProps:w,initMergeProps:k,pure:l,areStatesEqual:p,areOwnPropsEqual:d,areStatePropsEqual:m,areMergedPropsEqual:v},g))}}();n.d(e,"Provider",function(){return l}),n.d(e,"createProvider",function(){return u}),n.d(e,"connectAdvanced",function(){return w}),n.d(e,"connect",function(){return H})},function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return w}),n.d(e,"c",function(){return O}),n.d(e,"b",function(){return B});var i=n(61),r=n.n(i),o=n(1),s="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),a="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,u="undefined"!=typeof Symbol&&Symbol.for?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",l={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},c=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,h={},p=void 0===t||!t.env||!1;function f(){return null}var d=Object(o.h)("a",null).constructor;d.prototype.$$typeof=a,d.prototype.preactCompatUpgraded=!1,d.prototype.preactCompatNormalized=!1,Object.defineProperty(d.prototype,"type",{get:function(){return this.nodeName},set:function(t){this.nodeName=t},configurable:!0}),Object.defineProperty(d.prototype,"props",{get:function(){return this.attributes},set:function(t){this.attributes=t},configurable:!0});var y=o.options.event;o.options.event=function(t){return y&&(t=y(t)),t.persist=Object,t.nativeEvent=t,t};var m=o.options.vnode;function _(t,e,n){var i=e&&e._preactCompatRendered&&e._preactCompatRendered.base;i&&i.parentNode!==e&&(i=null),!i&&e&&(i=e.firstElementChild);for(var r=e.childNodes.length;r--;)e.childNodes[r]!==i&&e.removeChild(e.childNodes[r]);var s=Object(o.render)(t,e,i);return e&&(e._preactCompatRendered=s&&(s._component||{base:s})),"function"==typeof n&&n(),s&&s._component||s}o.options.vnode=function(t){if(!t.preactCompatUpgraded){t.preactCompatUpgraded=!0;var e=t.nodeName,n=t.attributes=C({},t.attributes);"function"==typeof e?(!0===e[u]||e.prototype&&"isReactComponent"in e.prototype)&&(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),t.preactCompatNormalized||P(t),function(t){var e=t.nodeName,n=t.attributes;t.attributes={},e.defaultProps&&C(t.attributes,e.defaultProps);n&&C(t.attributes,n)}(t)):(t.children&&""===String(t.children)&&(t.children=void 0),t.children&&(n.children=t.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),function(t,e){var n,i,r;if(e){for(r in e)if(n=c.test(r))break;if(n)for(r in i=t.attributes={},e)e.hasOwnProperty(r)&&(i[c.test(r)?r.replace(/([A-Z0-9])/,"-$1").toLowerCase():r]=e[r])}}(t,n))}m&&m(t)};var v=function(){};v.prototype.getChildContext=function(){return this.props.context},v.prototype.render=function(t){return t.children[0]};var g,b=[],w={map:function(t,e,n){return null==t?null:(t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.map(e))},forEach:function(t,e,n){if(null==t)return null;t=w.toArray(t),n&&n!==t&&(e=e.bind(n)),t.forEach(e)},count:function(t){return t&&t.length||0},only:function(t){if(1!==(t=w.toArray(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:function(t){return null==t?[]:b.concat(t)}};function k(t){return O.bind(null,t)}for(var S={},T=s.length;T--;)S[s[T]]=k(s[T]);function x(t){var e,n=t[u];return n?!0===n?t:n:(n=j({displayName:(e=t).displayName||e.name,render:function(){return e(this.props,this.context)}}),Object.defineProperty(n,u,{configurable:!0,value:!0}),n.displayName=t.displayName,n.propTypes=t.propTypes,n.defaultProps=t.defaultProps,Object.defineProperty(t,u,{configurable:!0,value:n}),n)}function O(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function t(e,n){for(var i=n||0;i0;)n[i]=arguments[i+2];if(!A(t))return t;var r=t.attributes||t.props,s=[Object(o.h)(t.nodeName||t.type,C({},r),t.children||r&&r.children),e];return n&&n.length?s.push(n):e&&e.children&&s.push(e.children),P(o.cloneElement.apply(void 0,s))},isValidElement:A,findDOMNode:function(t){return t&&t.base||t},unmountComponentAtNode:function(t){var e=t._preactCompatRendered&&t._preactCompatRendered.base;return!(!e||e.parentNode!==t||(Object(o.render)(Object(o.h)(f),t,e),0))},Component:B,PureComponent:U,unstable_renderSubtreeIntoContainer:function(t,e,n,i){var r=_(Object(o.h)(v,{context:t.context},e),n),s=r._component||r.base;return i&&i.call(s,r),s},__spread:C};e.d=z}).call(this,n(51))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e1;)try{return c.stringifyByChunk(t,i,n)}catch(t){n=Math.floor(n/2)}return c.stringifyByChar(t)}function p(t,e){for(var n=0;n may have only one child element"),this.unlisten=i.listen(function(){t.setState({match:t.computeMatch(i.location.pathname)})})},e.prototype.componentWillReceiveProps=function(t){h()(this.props.history===t.history,"You cannot change ")},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){var t=this.props.children;return t?o.d.Children.only(t):null},e}(o.d.Component);m.propTypes={history:a.a.object.isRequired,children:a.a.node},m.contextTypes={router:a.a.object},m.childContextTypes={router:a.a.object.isRequired};var _=m,v=_;function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var b=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);b.propTypes={basename:a.a.string,forceRefresh:a.a.bool,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var w=b,k=n(140),S=n.n(k);function T(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var x=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(v,{history:this.history,children:this.props.children})},e}(o.d.Component);x.propTypes={basename:a.a.string,getUserConfirmation:a.a.func,hashType:a.a.oneOf(["hashbang","noslash","slash"]),children:a.a.node};var O=x,P=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["replace","to","innerRef"]);f()(this.context.router,"You should not use outside a ");var r=this.context.router.history.createHref("string"==typeof e?{pathname:e}:e);return o.d.createElement("a",P({},i,{onClick:this.handleClick,href:r,ref:n}))},e}(o.d.Component);C.propTypes={onClick:a.a.func,target:a.a.string,replace:a.a.bool,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired,innerRef:a.a.oneOfType([a.a.string,a.a.func])},C.defaultProps={replace:!1},C.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired,createHref:a.a.func.isRequired}).isRequired}).isRequired};var M=C,R=n(83),j=n(82),F=function(t){var e=t.pathname,n=t.search,i=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r},N=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,i=void 0===n?["/"]:n,o=t.initialIndex,s=void 0===o?0:o,a=t.keyLength,u=void 0===a?6:a,l=q(),c=function(t){B(m,t),m.length=m.entries.length,l.notifyListeners(m.location,m.action)},h=function(){return Math.random().toString(36).substr(2,u)},p=U(s,0,i.length-1),f=i.map(function(t){return L(t,void 0,"string"==typeof t?h():t.key||h())}),d=F,y=function(t){var n=U(m.index+t,0,m.entries.length-1),i=m.entries[n];l.confirmTransitionTo(i,"POP",e,function(t){t?c({action:"POP",location:i,index:n}):c()})},m={length:f.length,action:"POP",location:f[p],index:p,entries:f,createHref:d,push:function(t,n){r()(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,"PUSH",e,function(t){if(t){var e=m.index+1,n=m.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),c({action:"PUSH",location:i,index:e,entries:n})}})},replace:function(t,n){r()(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=L(t,n,h(),m.location);l.confirmTransitionTo(i,"REPLACE",e,function(t){t&&(m.entries[m.index]=i,c({action:"REPLACE",location:i}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=m.index+t;return e>=0&&e0&&void 0!==arguments[0]&&arguments[0];return l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return m};function Y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var W=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},e.prototype.render=function(){return o.d.createElement(_,{history:this.history,children:this.props.children})},e}(o.d.Component);W.propTypes={initialEntries:a.a.array,initialIndex:a.a.number,getUserConfirmation:a.a.func,keyLength:a.a.number,children:a.a.node};var G=W,V=n(60),H=n.n(V),Z={},Q=0,K=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var i=e,r=i.path,o=i.exact,s=void 0!==o&&o,a=i.strict,u=void 0!==a&&a,l=i.sensitive,c=void 0!==l&&l;if(null==r)return n;var h=function(t,e){var n=""+e.end+e.strict+e.sensitive,i=Z[n]||(Z[n]={});if(i[t])return i[t];var r=[],o={re:H()(t,r,e),keys:r};return Q<1e4&&(i[t]=o,Q++),o}(r,{end:s,strict:u,sensitive:c}),p=h.re,f=h.keys,d=p.exec(t);if(!d)return null;var y=d[0],m=d.slice(1),_=t===y;return s&&!_?null:{path:r,url:"/"===r&&""===y?"/":y,isExact:_,params:f.reduce(function(t,e,n){return t[e.name]=m[n],t},{})}},X=Object.assign||function(t){for(var e=1;e or withRouter() outside a ");var u=e.route,l=(i||u.location).pathname;return K(l,{path:r,strict:o,exact:s,sensitive:a},u.match)},e.prototype.componentWillMount=function(){h()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),h()(!(this.props.component&&this.props.children&&!J(this.props.children)),"You should not use and in the same route; will be ignored"),h()(!(this.props.render&&this.props.children&&!J(this.props.children)),"You should not use and in the same route; will be ignored")},e.prototype.componentWillReceiveProps=function(t,e){h()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t,e.router)})},e.prototype.render=function(){var t=this.state.match,e=this.props,n=e.children,i=e.component,r=e.render,s=this.context.router,a=s.history,u=s.route,l=s.staticContext,c={match:t,location:this.props.location||u.location,history:a,staticContext:l};return i?t?o.d.createElement(i,c):null:r?t?r(c):null:"function"==typeof n?n(c):n&&!J(n)?o.d.Children.only(n):null},e}(o.d.Component);tt.propTypes={computedMatch:a.a.object,path:a.a.string,exact:a.a.bool,strict:a.a.bool,sensitive:a.a.bool,component:a.a.func,render:a.a.func,children:a.a.oneOfType([a.a.func,a.a.node]),location:a.a.object},tt.contextTypes={router:a.a.shape({history:a.a.object.isRequired,route:a.a.object.isRequired,staticContext:a.a.object})},tt.childContextTypes={router:a.a.object.isRequired};var et=tt,nt=et,it=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","ariaCurrent"]);return o.d.createElement(nt,{path:"object"===(void 0===e?"undefined":rt(e))?e.pathname:e,exact:n,strict:i,location:r,children:function(t){var n=t.location,i=t.match,r=!!(c?c(i,n):i);return o.d.createElement(M,it({to:e,className:r?[a,s].filter(function(t){return t}).join(" "):a,style:r?it({},l,u):l,"aria-current":r&&h},p))}})};ot.propTypes={to:M.propTypes.to,exact:a.a.bool,strict:a.a.bool,location:a.a.object,activeClassName:a.a.string,className:a.a.string,activeStyle:a.a.object,style:a.a.object,isActive:a.a.func,ariaCurrent:a.a.oneOf(["page","step","location","true"])},ot.defaultProps={activeClassName:"active",ariaCurrent:"true"};var st=ot;var at=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){f()(this.context.router,"You should not use outside a "),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(o.d.Component);at.propTypes={when:a.a.bool,message:a.a.oneOfType([a.a.func,a.a.string]).isRequired},at.defaultProps={when:!0},at.contextTypes={router:a.a.shape({history:a.a.shape({block:a.a.func.isRequired}).isRequired}).isRequired};var ut=at,lt={},ct=0,ht=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=lt[e]||(lt[e]={});if(n[t])return n[t];var i=H.a.compile(t);return ct<1e4&&(n[t]=i,ct++),i}(t)(e,{pretty:!0})},pt=Object.assign||function(t){for(var e=1;e outside a "),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=L(t.to),n=L(this.props.to);D(e,n)?h()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?ht(n,e.params):pt({},n,{pathname:ht(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.context.router.history,e=this.props.push,n=this.computeTo(this.props);e?t.push(n):t.replace(n)},e.prototype.render=function(){return null},e}(o.d.Component);ft.propTypes={computedMatch:a.a.object,push:a.a.bool,from:a.a.string,to:a.a.oneOfType([a.a.string,a.a.object]).isRequired},ft.defaultProps={push:!1},ft.contextTypes={router:a.a.shape({history:a.a.shape({push:a.a.func.isRequired,replace:a.a.func.isRequired}).isRequired,staticContext:a.a.object}).isRequired};var dt=ft,yt=Object.assign||function(t){for(var e=1;e",t)}},wt=function(){},kt=function(t){function e(){var n,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,o=Array(r),s=0;s ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},e.prototype.render=function(){var t=this.props,e=t.basename,n=(t.context,t.location),i=function(t,e){var n={};for(var i in t)e.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(t,["basename","context","location"]),r={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=_t(t);return 0!==e.pathname.indexOf(n)?e:yt({},e,{pathname:e.pathname.substr(n.length)})}(e,L(n)),push:this.handlePush,replace:this.handleReplace,go:bt("go"),goBack:bt("goBack"),goForward:bt("goForward"),listen:this.handleListen,block:this.handleBlock};return o.d.createElement(_,yt({},i,{history:r}))},e}(o.d.Component);kt.propTypes={basename:a.a.string,context:a.a.object.isRequired,location:a.a.oneOfType([a.a.string,a.a.object])},kt.defaultProps={basename:"",location:"/"},kt.childContextTypes={router:a.a.object.isRequired};var St=kt;var Tt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentWillMount=function(){f()(this.context.router,"You should not use outside a ")},e.prototype.componentWillReceiveProps=function(t){h()(!(t.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!t.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},e.prototype.render=function(){var t=this.context.router.route,e=this.props.children,n=this.props.location||t.location,i=void 0,r=void 0;return o.d.Children.forEach(e,function(e){if(null==i&&o.d.isValidElement(e)){var s=e.props,a=s.path,u=s.exact,l=s.strict,c=s.sensitive,h=s.from,p=a||h;r=e,i=K(n.pathname,{path:p,exact:u,strict:l,sensitive:c},t.match)}}),i?o.d.cloneElement(r,{location:n,computedMatch:i}):null},e}(o.d.Component);Tt.contextTypes={router:a.a.shape({route:a.a.object.isRequired}).isRequired},Tt.propTypes={children:a.a.node,location:a.a.object};var xt=Tt,Ot=K,Pt=n(139),At=n.n(Pt),Et=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}(e,["wrappedComponentRef"]);return o.d.createElement(et,{children:function(e){return o.d.createElement(t,Et({},i,e,{ref:n}))}})};return e.displayName="withRouter("+(t.displayName||t.name)+")",e.WrappedComponent=t,e.propTypes={wrappedComponentRef:a.a.func},At()(e,t)};n.d(e,"BrowserRouter",function(){return w}),n.d(e,"HashRouter",function(){return O}),n.d(e,"Link",function(){return M}),n.d(e,"MemoryRouter",function(){return G}),n.d(e,"NavLink",function(){return st}),n.d(e,"Prompt",function(){return ut}),n.d(e,"Redirect",function(){return dt}),n.d(e,"Route",function(){return nt}),n.d(e,"Router",function(){return v}),n.d(e,"StaticRouter",function(){return St}),n.d(e,"Switch",function(){return xt}),n.d(e,"matchPath",function(){return Ot}),n.d(e,"withRouter",function(){return Ct})},function(t,e,n){"use strict";t.exports=function(t,e,n,i,r,o,s,a){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,i,r,o,s,a],c=0;(u=new Error(e.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,n){"use strict";var i=function(){};t.exports=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AugmentationGrid=e.ButtonGrid=e.TaskList=e.CurrentTask=e.Checkbox=e.Button=e.SelectGroup=e.Select=e.Slider=e.NumberInput=e.TextInput=e.Param=e.ParamGroup=e.Group=e.Player=e.Gallery=e.FileUpload=e.FileRow=e.FileList=e.FolderList=e.AudioPlayer=e.Header=e.Progress=e.Loading=e.Views=void 0;var i=P(n(246)),r=P(n(245)),o=P(n(45)),s=P(n(122)),a=P(n(244)),u=P(n(243)),l=n(26),c=P(n(121)),h=P(n(120)),p=P(n(242)),f=P(n(24)),d=P(n(241)),y=P(n(18)),m=P(n(153)),_=P(n(31)),v=P(n(152)),g=P(n(87)),b=P(n(119)),w=P(n(52)),k=P(n(151)),S=P(n(63)),T=P(n(41)),x=P(n(150)),O=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(149));function P(t){return t&&t.__esModule?t:{default:t}}e.Views=O,e.Loading=y.default,e.Progress=b.default,e.Header=d.default,e.AudioPlayer=i.default,e.FolderList=h.default,e.FileList=l.FileList,e.FileRow=l.FileRow,e.FileUpload=c.default,e.Gallery=p.default,e.Player=g.default,e.Group=f.default,e.ParamGroup=v.default,e.Param=_.default,e.TextInput=T.default,e.NumberInput=m.default,e.Slider=S.default,e.Select=w.default,e.SelectGroup=k.default,e.Button=o.default,e.Checkbox=a.default,e.CurrentTask=u.default,e.TaskList=x.default,e.ButtonGrid=s.default,e.AugmentationGrid=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var e=1;e "+t:t}},t.exports=i},function(t,e,n){t.exports=n(299)()},function(t,e,n){var i,r,o=n(259),s=n(258),a=0,u=0;t.exports=function(t,e,n){var l=e&&n||0,c=e||[],h=(t=t||{}).node||i,p=void 0!==t.clockseq?t.clockseq:r;if(null==h||null==p){var f=o();null==h&&(h=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=r=16383&(f[6]<<8|f[7]))}var d=void 0!==t.msecs?t.msecs:(new Date).getTime(),y=void 0!==t.nsecs?t.nsecs:u+1,m=d-a+(y-u)/1e4;if(m<0&&void 0===t.clockseq&&(p=p+1&16383),(m<0||d>a)&&void 0===t.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=d,u=y,r=p;var _=(1e4*(268435455&(d+=122192928e5))+y)%4294967296;c[l++]=_>>>24&255,c[l++]=_>>>16&255,c[l++]=_>>>8&255,c[l++]=255&_;var v=d/4294967296*1e4&268435455;c[l++]=v>>>8&255,c[l++]=255&v,c[l++]=v>>>24&15|16,c[l++]=v>>>16&255,c[l++]=p>>>8|128,c[l++]=255&p;for(var g=0;g<6;++g)c[l+g]=h[g];return e||s(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.progress;return(0,r.h)("div",{className:"loading"},"Loading",(0,r.h)("br",null),e&&(0,r.h)(s.default,{progress:e}))};var i,r=n(1),o=n(119),s=(i=o)&&i.__esModule?i:{default:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispatch=e.store=e.history=void 0;var i=n(2),r=n(289),o=y(n(286)),s=y(n(285)),a=y(n(278)),u=y(n(277)),l=y(n(273)),c=y(n(272)),h=y(n(271)),p=y(n(270)),f=y(n(266)),d=n(265);function y(t){return t&&t.__esModule?t:{default:t}}var m=(0,i.combineReducers)({auth:a.default,system:u.default,dashboard:l.default,live:c.default,upload:h.default,queue:p.default,router:r.routerReducer,module:d.moduleReducer,audioPlayer:f.default}),_=e.history=(0,s.default)(),v=e.store=(0,i.createStore)(m,(0,i.compose)((0,i.applyMiddleware)(o.default,(0,r.routerMiddleware)(_))));e.dispatch=v.dispatch},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.play=e.pause=e.seek=e.load_epoch=e.load_sequence=e.list_sequences=e.list_epochs=e.list_checkpoints=e.set_fullscreen=e.set_param=e.get_params=void 0;var i=s(n(14)),r=s(n(6)),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(49));function s(t){return t&&t.__esModule?t:{default:t}}e.get_params=function(){return i.default.live.get_params(),{type:r.default.player.get_params}},e.set_param=function(t,e){return console.log("set param",t,e),i.default.live.set_param(t,e),{type:r.default.player.set_param,key:t,value:e}},e.set_fullscreen=function(t){return{type:r.default.player.set_fullscreen,value:t}},e.list_checkpoints=function(t){return i.default.live.list_checkpoints(t),{type:r.default.player.loading_checkpoints}},e.list_epochs=function(t,e){return i.default.live.list_epochs(t,e),{type:r.default.player.loading_epochs}},e.list_sequences=function(t){return i.default.live.list_sequences(t),{type:r.default.player.loading_sequences}},e.load_sequence=function(t){return i.default.live.load_sequence(t),{type:r.default.player.loading_sequence,sequence_name:t}},e.load_epoch=function(t,e){return i.default.live.load_epoch(t,e),{type:r.default.player.loading_checkpoint,checkpoint_name:t,epoch:e}},e.seek=function(t){return i.default.live.seek(t),{type:r.default.player.seeking}},e.pause=function t(e){return i.default.live.pause(t),o.toggleFPS(!1),{type:r.default.player.pausing}},e.play=function(t){return i.default.live.play(),o.toggleFPS(!0),{type:r.default.player.playing}}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(t[i]=n[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o0?"ep. "+m:""),f.has("date")&&(0,i.h)("div",{className:"date "+o.default.carbon_date(y)},(0,r.default)(y).format("YYYY-MM-DD")),f.has("datetime")&&(0,i.h)("div",{className:"datetime "+o.default.carbon_date(y)},(0,r.default)(y).format("YYYY-MM-DD h:mm a")),f.has("size")&&(0,i.h)("div",{className:"size "+d[0]},d[1]),f.has("count")&&(0,i.h)("div",{className:"count "+o.default.hush_null(_)[0]},_>0?_+" files":""),(f.has("activity")||f.has("module"))&&(0,i.h)("div",{className:"activity"},f.has("activity")&&e.activity,f.has("module")&&e.module),f.has("delete")&&s&&e.id&&(0,i.h)("div",{className:"destroy",onClick:function(t){return s(e)}},"x"),t.options&&t.options(e))})},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";for(var i=n(9),r=n(23),o=n(54),s=n(15),a=new Array(256),u=0;u<256;u++)a[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}e.utf8encode=function(t){return r.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,n,i,o,s,a=t.length,u=0;for(o=0;o>>6,e[s++]=128|63&n):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|63&n):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|63&n);return e}(t)},e.utf8decode=function(t){return r.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,r,o,s=t.length,u=new Array(2*s);for(n=0,e=0;e4)u[n++]=65533,e+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&e1?u[n++]=65533:r<65536?u[n++]=r:(r-=65536,u[n++]=55296|r>>10&1023,u[n++]=56320|1023&r)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),i.applyFromCharCode(u)}(t=i.transformTo(r.uint8array?"uint8array":"array",t))},i.inherits(l,s),l.prototype.processChunk=function(t){var n=i.transformTo(r.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0?e:0===n?e:n+a[t[n]]>e?n:e}(n),u=n;s!==n.length&&(r.uint8array?(u=n.subarray(0,s),this.leftOver=n.subarray(s,n.length)):(u=n.slice(0,s),this.leftOver=n.slice(s,n.length))),this.push({data:e.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=l,i.inherits(c,s),c.prototype.processChunk=function(t){this.push({data:e.utf8encode(t.data),meta:t.meta})},e.Utf8EncodeWorker=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n>>0,i=0;iTt(t)?(o=t+1,s=a-Tt(t)):(o=t,s=a),{year:o,dayOfYear:s}}function Yt(t,e,n){var i,r,o=Ut(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?i=s+Wt(r=t.year()-1,e,n):s>Wt(t.year(),e,n)?(i=s-Wt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Wt(t,e,n){var i=Ut(t,e,n),r=Ut(t+1,e,n);return(Tt(t)-i+r)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),D("week",5),D("isoWeek",5),lt("w",X),lt("ww",X,H),lt("W",X),lt("WW",X,H),dt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)}),Y("d",0,"do","day"),Y("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Y("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Y("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),D("day",11),D("weekday",11),D("isoWeekday",11),lt("d",X),lt("e",X),lt("E",X),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),dt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:f(n).invalidWeekday=t}),dt(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var Gt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ht="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Zt=at,Qt=at,Kt=at;function Xt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],u=[],l=[];for(e=0;e<7;e++)n=p([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),u.push(o),l.push(i),l.push(r),l.push(o);for(s.sort(t),a.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)a[e]=ht(a[e]),u[e]=ht(u[e]),l[e]=ht(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(t,e){Y(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function te(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,$t),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+$t.apply(this)+q(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+$t.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),j("hour","h"),D("hour",13),lt("a",te),lt("A",te),lt("H",X),lt("h",X),lt("k",X),lt("HH",X,H),lt("hh",X,H),lt("kk",X,H),lt("hmm",$),lt("hmmss",J),lt("Hmm",$),lt("Hmmss",J),ft(["H","HH"],vt),ft(["k","kk"],function(t,e,n){var i=k(t);e[vt]=24===i?0:i}),ft(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ft(["h","hh"],function(t,e,n){e[vt]=k(t),f(n).bigHour=!0}),ft("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i)),f(n).bigHour=!0}),ft("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r)),f(n).bigHour=!0}),ft("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i))}),ft("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[vt]=k(t.substr(0,i)),e[gt]=k(t.substr(i,2)),e[bt]=k(t.substr(r))});var ee,ne=At("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:jt,monthsShort:Ft,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:/[ap]\.?m?\.?/i},re={},oe={};function se(t){return t?t.toLowerCase().replace("_","-"):t}function ae(e){var n=null;if(!re[e]&&void 0!==t&&t&&t.exports)try{n=ee._abbr,function(){var t=new Error('Cannot find module "undefined"');throw t.code="MODULE_NOT_FOUND",t}(),ue(n)}catch(e){}return re[e]}function ue(t,e){var n;return t&&((n=s(e)?ce(t):le(t,e))?ee=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ee._abbr}function le(t,e){if(null!==e){var n,i=ie;if(e.abbr=t,null!=re[t])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=re[t]._config;else if(null!=e.parentLocale)if(null!=re[e.parentLocale])i=re[e.parentLocale]._config;else{if(null==(n=ae(e.parentLocale)))return oe[e.parentLocale]||(oe[e.parentLocale]=[]),oe[e.parentLocale].push({name:t,config:e}),null;i=n._config}return re[t]=new M(C(i,e)),oe[t]&&oe[t].forEach(function(t){le(t.name,t.config)}),ue(t),re[t]}return delete re[t],null}function ce(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ee;if(!r(t)){if(e=ae(t))return e;t=[t]}return function(t){for(var e,n,i,r,o=0;o=e&&S(r,n,!0)>=e-1)break;e--}o++}return ee}(t)}function he(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[mt]<0||11Mt(n[yt],n[mt])?_t:n[vt]<0||24Wt(n,o,s)?f(t)._overflowWeeks=!0:null!=u?f(t)._overflowWeekday=!0:(a=zt(n,i,r,o,s),t._a[yt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=pe(t._a[yt],r[yt]),(t._dayOfYear>Tt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Bt(s,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[_t]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[gt]&&0===t._a[bt]&&0===t._a[wt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Bt:function(t,e,n,i,r,o,s){var a=new Date(t,e,n,i,r,o,s);return t<100&&0<=t&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}var de=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,_e=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ge=/^\/?Date\((\-?\d+)/i;function be(t){var e,n,i,r,o,s,a=t._i,u=de.exec(a)||ye.exec(a);if(u){for(f(t).iso=!0,e=0,n=_e.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Be,ln.isUTC=Be,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=x("dates accessor is deprecated. Use date instead.",nn),ln.months=x("months accessor is deprecated. Use month instead",Lt),ln.years=x("years accessor is deprecated. Use year instead",Pt),ln.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ln.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(_(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):Pe(t._a);this._isDSTShifted=this.isValid()&&0 1 && arguments[1] !== undefined ? arguments[1] : []; + return with_type(type, actions.concat(['index_loading', 'index', 'index_error', 'show_loading', 'show', 'show_error', 'create_loading', 'create', 'create_error', 'update_loading', 'update', 'update_error', 'destroy_loading', 'destroy', 'destroy_error', 'upload_loading', 'upload_progress', 'upload_waiting', 'upload_complete', 'upload_error', 'sort'])); +}; + +/***/ }), + +/***/ "./app/client/api/crud.upload.js": +/*!***************************************!*\ + !*** ./app/client/api/crud.upload.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.upload_action = undefined; +exports.crud_upload = crud_upload; + +var _crud = __webpack_require__(/*! ./crud.types */ "./app/client/api/crud.types.js"); + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function crud_upload(type, fd, data, dispatch) { + return new Promise(function (resolve, reject) { + var id = data.id; + + Object.keys(data).forEach(function (key) { + if (key !== 'id') { + fd.append(key, data[key]); + } + }); + + console.log('/api/' + type + '/' + id + '/upload/'); + + var xhr = new XMLHttpRequest(); + xhr.upload.addEventListener("progress", uploadProgress, false); + xhr.addEventListener("load", uploadComplete, false); + xhr.addEventListener("error", uploadFailed, false); + xhr.addEventListener("abort", uploadCancelled, false); + xhr.open("POST", '/api/' + type + '/' + id + '/upload/'); + xhr.send(fd); + + dispatch && dispatch({ type: (0, _crud.as_type)(type, 'upload_loading') }); + + var complete = false; + + function uploadProgress(e) { + if (e.lengthComputable) { + var percent = Math.round(e.loaded * 100 / e.total) || 0; + if (percent > 99) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_waiting'), + percent: percent + }, type, id)); + } else { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_progress'), + percent: percent + }, type, id)); + } + } else { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'unable to compute upload progress' + }, type, id)); + } + } + + function uploadComplete(e) { + var parsed = void 0; + try { + parsed = JSON.parse(e.target.responseText); + } catch (e) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload failed' + }, type, id)); + reject(e); + return; + } + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_complete'), + data: parsed + }, type, id)); + if (parsed.files && parsed.files.length) { + parsed.files.forEach(function (file) { + console.log(file); + dispatch && dispatch({ + type: (0, _crud.as_type)('file', 'create'), + data: file + }); + }); + } + resolve(parsed); + } + + function uploadFailed(evt) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload failed' + }, type, id)); + reject(evt); + } + + function uploadCancelled(evt) { + dispatch && dispatch(_defineProperty({ + type: (0, _crud.as_type)(type, 'upload_error'), + error: 'upload cancelled' + }, type, id)); + reject(evt); + } + }); +} + +var upload_action = exports.upload_action = function upload_action(type, id, fd) { + return function (dispatch) { + return crud_upload(type, id, fd, dispatch); + }; +}; + +/***/ }), + +/***/ "./app/client/api/index.js": +/*!*********************************!*\ + !*** ./app/client/api/index.js ***! + \*********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.actions = exports.parser = exports.util = undefined; + +var _crud = __webpack_require__(/*! ./crud.actions */ "./app/client/api/crud.actions.js"); + +var _util = __webpack_require__(/*! ../util */ "./app/client/util/index.js"); + +var _util2 = _interopRequireDefault(_util); + +var _parser = __webpack_require__(/*! ./parser */ "./app/client/api/parser.js"); + +var parser = _interopRequireWildcard(_parser); + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* +for our crud events, create corresponding actions +the actions fire a 'loading' event, call the underlying api method, and then resolve. +so you can do ... + import { folderActions } from '../../api' + folderActions.index({ module: 'samplernn' }) + folderActions.show(12) + folderActions.create({ module: 'samplernn', name: 'foo' }) + folderActions.update(12, { module: 'pix2pix' }) + folderActions.destroy(12, { confirm: true }) + folderActions.upload(12, form_data) +*/ + +exports.util = _util2.default; +exports.parser = parser; +var actions = exports.actions = ['folder', 'file', 'dataset', 'task', 'user'].reduce(function (a, b) { + return (a[b] = (0, _crud.crud_actions)(b)) && a; +}, {}); + +/***/ }), + +/***/ "./app/client/api/parser.js": +/*!**********************************!*\ + !*** ./app/client/api/parser.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.tumblr = exports.thumbnail = exports.loadImage = exports.tag = exports.parse = exports.lookup = exports.integrations = undefined; + +var _nodeFetch = __webpack_require__(/*! node-fetch */ "./node_modules/node-fetch/browser.js"); + +var _nodeFetch2 = _interopRequireDefault(_nodeFetch); + +var _fetchJsonp = __webpack_require__(/*! fetch-jsonp */ "./node_modules/fetch-jsonp/build/fetch-jsonp.js"); + +var _fetchJsonp2 = _interopRequireDefault(_fetchJsonp); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var integrations = exports.integrations = [{ + type: 'image', + regex: /\.(jpeg|jpg|gif|png|svg)(\?.*)?$/i, + fetch: function fetch(url, done) { + var img = new Image(); + img.onload = function () { + if (!img) return; + var width = img.naturalWidth, + height = img.naturalHeight; + img = null; + done({ + url: url, + type: "image", + token: "", + thumbnail: "", + title: "", + width: width, + height: height + }); + }; + img.src = url; + if (img.complete) { + img.onload(); + } + }, + tag: function tag(media) { + return ''; + } +}, { + type: 'video', + regex: /\.(mp4|webm)(\?.*)?$/i, + fetch: function fetch(url, done) { + var video = document.createElement("video"); + var url_parts = url.replace(/\?.*$/, "").split("/"); + var filename = url_parts[url_parts.length - 1]; + video.addEventListener("loadedmetadata", function () { + var width = video.videoWidth, + height = video.videoHeight; + video = null; + done({ + url: url, + type: "video", + token: url, + thumbnail: "/public/assets/img/video-thumbnail.png", + title: filename, + width: width, + height: height + }); + }); + video.src = url; + video.load(); + }, + tag: function tag(media) { + return '