From f672ff49f303b88090ebe68193b9f094419ad458 Mon Sep 17 00:00:00 2001 From: Oleg Solomka Date: Mon, 10 Oct 2016 09:40:46 -0500 Subject: [PATCH] _updateParent: fix parent is null issue --- app/build/mojs-curve-editor.js | 8 ++++++-- app/build/mojs-curve-editor.min.js | 2 +- app/index.html | 30 +++++++++++++++++++++++++++++- app/js/app.babel.jsx | 6 ++++-- package.json | 2 +- readme.md | 3 +-- 6 files changed, 42 insertions(+), 9 deletions(-) diff --git a/app/build/mojs-curve-editor.js b/app/build/mojs-curve-editor.js index 12bb6c4..eaa6060 100644 --- a/app/build/mojs-curve-editor.js +++ b/app/build/mojs-curve-editor.js @@ -160,7 +160,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_vars', value: function _vars() { - this.revision = '1.4.3'; + this.revision = '1.4.5'; this.store = (0, _store2.default)(); this._easings = []; @@ -275,7 +275,11 @@ return /******/ (function(modules) { // webpackBootstrap value: function _updateParent(easing) { var parent = easing._parent; - if (parent && parent.setProgress) { + if (!parent) { + return; + }; + + if (parent.setProgress) { this._triggerParent(parent); } else if (parent._o.callbacksContext) { this._triggerParent(parent._o.callbacksContext.timeline); diff --git a/app/build/mojs-curve-editor.min.js b/app/build/mojs-curve-editor.min.js index 6a737bc..004778b 100644 --- a/app/build/mojs-curve-editor.min.js +++ b/app/build/mojs-curve-editor.min.js @@ -1,4 +1,4 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("mojs-curve-editor",[],e):"object"==typeof exports?exports["mojs-curve-editor"]=e():t["mojs-curve-editor"]=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="build/",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=r(i),a=n(5),s=r(a),u=n(42),c=r(u),l=n(43),f=r(l),p=n(47),d=n(48),h=n(65),_=r(h),v=n(185),y=r(v),m=n(114),g=(r(m),n(128)),b=r(g),x=n(212),T=r(x),E=n(213),w=r(E),P=n(181),M=n(134),S=(r(M),function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];(0,c["default"])(this,t),this._o=e,this._decalareDefaults(),this._extendDefaults(),this._vars(),this._render(),this._tryToRestore(),this._listenUnload(),this._subscribe()}return(0,f["default"])(t,[{key:"_decalareDefaults",value:function(){this._defaults={name:"mojs-curve-editor",isSaveState:!0}}},{key:"_extendDefaults",value:function(){this._props={};for(var t in this._defaults)this._props[t]=(0,T["default"])(this._o[t],this._defaults[t])}},{key:"_vars",value:function(){this.revision="1.4.3",this.store=(0,y["default"])(),this._easings=[],this._progressLines=[];var t=(0,T["default"])(this._o.name,this._defaults.name);t+=t===this._defaults.name?"":"__"+this._defaults.name,this._localStorage=t+"__"+(0,b["default"])(t),this.store.dispatch({type:"SET_EDITOR_NAME",data:this._localStorage})}},{key:"_render",value:function(){var t=this;document.addEventListener("DOMContentLoaded",function(){(0,d.render)((0,d.h)(p.Provider,{store:t.store},(0,d.h)(_["default"],{progressLines:t._progressLines,ref:function(e){t._el=e}})),document.body)})}},{key:"_listenUnload",value:function(){var t=this,e="onpagehide"in window?"pagehide":"beforeunload";window.addEventListener(e,function(){if(t._props.isSaveState){var e=(0,s["default"])({},t.store.getState());delete e.points.history,delete e.pointControls.history,e.progressLines.lines=[],localStorage.setItem(t._localStorage,(0,o["default"])(e))}else localStorage.removeItem(t._localStorage)})}},{key:"_tryToRestore",value:function(){var t=localStorage.getItem(this._localStorage);t?this.store.dispatch({type:"SET_STATE",data:JSON.parse(t)}):(0,P.reset)(this.store)}},{key:"_subscribe",value:function(){this._compilePath(),this.store.subscribe(this._compilePath.bind(this))}},{key:"_compilePath",value:function(){var t=this,e=this.store.getState(),n=e.points.present,r=n.path;this._easing||(this._easing=mojs.easing.path(r)),clearTimeout(this._tm),this._tm=setTimeout(function(){t._prevPath!==r&&(t._prevPath=r,t._easing=mojs.easing.path(r),t._fireOnChange(r))},40)}},{key:"_fireOnChange",value:function(t){for(var e=0;ec;)for(var p,d=s(arguments[c++]),h=l?r(d).concat(l(d)):r(d),_=h.length,v=0;_>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:u},function(t,e,n){var r=n(25),i=n(38);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(26),i=n(27),o=n(31)(!1),a=n(35)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(28),i=n(30);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(27),i=n(32),o=n(34);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(33),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(33),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(36)("keys"),i=n(37);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(10),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(30);t.exports=function(t){return Object(r(t))}},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(44),o=r(i);e["default"]=function(){function t(t,e){for(var n=0;n does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function s(t,e){if(t===e)return!0;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,o=0;o, "+('or explicitly pass "store" as a prop to "'+i+'".'));var r=n.store.getState();return n.state={storeState:r},n.clearCache(),n}return p.inherits(u,o),u.prototype.shouldComponentUpdate=function(){return!y||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var r=t.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(r,e):this.finalMapStateToProps(r);return n(i,"mapStateToProps"),i},u.prototype.configureFinalMapState=function(t,e){var r=f(t.getState(),e),i="function"==typeof r;return this.finalMapStateToProps=i?r:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(t,e):(n(r,"mapStateToProps"),r)},u.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var r=t.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(r,e):this.finalMapDispatchToProps(r);return n(i,"mapDispatchToProps"),i},u.prototype.configureFinalMapDispatch=function(t,e){var r=d(t.dispatch,e),i="function"==typeof r;return this.finalMapDispatchToProps=i?r:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(t,e):(n(r,"mapDispatchToProps"),r)},u.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!s(t,this.stateProps))&&(this.stateProps=t,!0)},u.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!s(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},u.prototype.updateMergedPropsIfNeeded=function(){var t=r(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&s(t,this.mergedProps))&&(this.mergedProps=t,!0)},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){a&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(t){y&&s(t,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!y||e!==t){if(y&&!this.doStatePropsDependOnOwnProps){var n=l(this.updateStatePropsIfNeeded,this);if(!n)return;n===A&&(this.statePropsPrecalculationError=A.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},u.prototype.getWrappedInstance=function(){return C(g,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var n=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,i=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,a=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var s=!0,u=!0;y&&a&&(s=r||n&&this.doStatePropsDependOnOwnProps,u=n&&this.doDispatchPropsDependOnOwnProps);var c=!1,l=!1;i?c=!0:s&&(c=this.updateStatePropsIfNeeded()),u&&(l=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(c||l||n)&&this.updateMergedPropsIfNeeded(),!f&&a?a:(g?this.renderedElement=e.h(t,p["extends"]({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=e.h(t,this.mergedProps),this.renderedElement)},u}(e.Component);return u.displayName=i,u.WrappedComponent=t,u.contextTypes={store:_},u.prototype.componentWillUpdate=function(){this.version!==x&&(this.version=x,this.trySubscribe(),this.clearCache())},S(u,t)}}var p={};p.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},p["extends"]=Object.assign||function(t){for(var e=1;e2){var d=typeof r;if(3===p&&"object"!==d&&"function"!==d)c(r)||(i=[String(r)]);else{i=[];for(var h=2;h2?o(arguments,2):t.children)}function d(t,e,n){var r=e.split("."),o=r[0];return function(e){var c,l,f,p=e&&e.currentTarget||this,d=t.state,h=d;if(s(n)?(l=i(e,n),u(l)&&(p=p._component)&&(l=i(p,n))):l=p.nodeName?(p.nodeName+p.type).match(/^input(check|rad)/i)?p.checked:p.value:e,a(l)&&(l=l.call(p)),r.length>1){for(f=0;f=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=c++,r=!(arguments.length<2)&&s.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(49).setImmediate,n(49).clearImmediate)},function(t,e){function n(){f&&c&&(f=!1,c.length?l=c.concat(l):p=-1,l.length&&r())}function r(){if(!f){var t=a.call(null,n);f=!0;for(var e=l.length;e;){for(c=l,l=[];++p1)for(var n=1;nc;)for(var p,d=s(arguments[c++]),h=l?r(d).concat(l(d)):r(d),_=h.length,v=0;_>v;)f.call(d,p=h[v++])&&(n[p]=d[p]);return n}:u},function(t,e,n){var r=n(25),i=n(38);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(26),i=n(27),o=n(31)(!1),a=n(35)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(28),i=n(30);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(29);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(27),i=n(32),o=n(34);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if(s=u[l++],s!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(33),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(33),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(36)("keys"),i=n(37);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(10),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(30);t.exports=function(t){return Object(r(t))}},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(44),o=r(i);e["default"]=function(){function t(t,e){for(var n=0;n does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function s(t,e){if(t===e)return!0;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty,o=0;o, "+('or explicitly pass "store" as a prop to "'+i+'".'));var r=n.store.getState();return n.state={storeState:r},n.clearCache(),n}return p.inherits(u,o),u.prototype.shouldComponentUpdate=function(){return!y||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var r=t.getState(),i=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(r,e):this.finalMapStateToProps(r);return n(i,"mapStateToProps"),i},u.prototype.configureFinalMapState=function(t,e){var r=f(t.getState(),e),i="function"==typeof r;return this.finalMapStateToProps=i?r:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,i?this.computeStateProps(t,e):(n(r,"mapStateToProps"),r)},u.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var r=t.dispatch,i=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(r,e):this.finalMapDispatchToProps(r);return n(i,"mapDispatchToProps"),i},u.prototype.configureFinalMapDispatch=function(t,e){var r=d(t.dispatch,e),i="function"==typeof r;return this.finalMapDispatchToProps=i?r:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,i?this.computeDispatchProps(t,e):(n(r,"mapDispatchToProps"),r)},u.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!s(t,this.stateProps))&&(this.stateProps=t,!0)},u.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!s(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},u.prototype.updateMergedPropsIfNeeded=function(){var t=r(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&s(t,this.mergedProps))&&(this.mergedProps=t,!0)},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){a&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(t){y&&s(t,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!y||e!==t){if(y&&!this.doStatePropsDependOnOwnProps){var n=l(this.updateStatePropsIfNeeded,this);if(!n)return;n===A&&(this.statePropsPrecalculationError=A.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},u.prototype.getWrappedInstance=function(){return C(g,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var n=this.haveOwnPropsChanged,r=this.hasStoreStateChanged,i=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,a=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var s=!0,u=!0;y&&a&&(s=r||n&&this.doStatePropsDependOnOwnProps,u=n&&this.doDispatchPropsDependOnOwnProps);var c=!1,l=!1;i?c=!0:s&&(c=this.updateStatePropsIfNeeded()),u&&(l=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(c||l||n)&&this.updateMergedPropsIfNeeded(),!f&&a?a:(g?this.renderedElement=e.h(t,p["extends"]({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=e.h(t,this.mergedProps),this.renderedElement)},u}(e.Component);return u.displayName=i,u.WrappedComponent=t,u.contextTypes={store:_},u.prototype.componentWillUpdate=function(){this.version!==x&&(this.version=x,this.trySubscribe(),this.clearCache())},S(u,t)}}var p={};p.classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},p["extends"]=Object.assign||function(t){for(var e=1;e2){var d=typeof r;if(3===p&&"object"!==d&&"function"!==d)c(r)||(i=[String(r)]);else{i=[];for(var h=2;h2?o(arguments,2):t.children)}function d(t,e,n){var r=e.split("."),o=r[0];return function(e){var c,l,f,p=e&&e.currentTarget||this,d=t.state,h=d;if(s(n)?(l=i(e,n),u(l)&&(p=p._component)&&(l=i(p,n))):l=p.nodeName?(p.nodeName+p.type).match(/^input(check|rad)/i)?p.checked:p.value:e,a(l)&&(l=l.call(p)),r.length>1){for(f=0;f=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=c++,r=!(arguments.length<2)&&s.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(49).setImmediate,n(49).clearImmediate)},function(t,e){function n(){f&&c&&(f=!1,c.length?l=c.concat(l):p=-1,l.length&&r())}function r(){if(!f){var t=a.call(null,n);f=!0;for(var e=l.length;e;){for(c=l,l=[];++p1)for(var n=1;n0?"Unexpected "+(o.length>1?"keys":"key")+" "+('"'+o.join('", "')+'" found in '+i+". ")+"Expected to find one of the known reducer keys instead: "+('"'+r.join('", "')+'". Unexpected keys will be ignored.'):void 0}function a(t){Object.keys(t).forEach(function(e){var n=t[e],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var i="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:i}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function s(e){for(var n=Object.keys(e),r={},s=0;s2&&(0,A.reset)(t),clearTimeout(this._tm),this._tm=setTimeout(function(){e._resetCounter=0},300)}},{key:"_subscribeFocus",value:function(){var t=this;this._createActivePool();var e=this.context.store;(0,N["default"])(this.base,function(n){var r=mojs[v["default"].ACTIVE_POOL_NAME];r&&r.resetActive(t),t._state.controls.isActive||e.dispatch({type:"SET_ACTIVE",data:!0})})}},{key:"_getPool",value:function(){return mojs[v["default"].ACTIVE_POOL_NAME]||(mojs[v["default"].ACTIVE_POOL_NAME]=new L["default"]),mojs[v["default"].ACTIVE_POOL_NAME]}},{key:"_createActivePool",value:function(){var t=this._getPool();t.add(this._setInactive.bind(this)),mojs[v["default"].ACTIVE_POOL_NAME]=t}},{key:"_setInactive",value:function(t){var e=this.context.store;t!==this&&e.dispatch({type:"SET_ACTIVE",data:!1})}}]),e}(h.Component);e["default"]=R},function(t,e,n){t.exports={"default":n(67),__esModule:!0}},function(t,e,n){n(68),t.exports=n(4).Object.getPrototypeOf},function(t,e,n){var r=n(41),i=n(69);n(70)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(26),i=n(41),o=n(35)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(9),i=n(4),o=n(19);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(72),o=r(i);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,o["default"])(e))&&"function"!=typeof e?t:e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(73),o=r(i),a=n(92),s=r(a),u="function"==typeof s["default"]&&"symbol"==typeof o["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":typeof t};e["default"]="function"==typeof s["default"]&&"symbol"===u(o["default"])?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e,n){t.exports={"default":n(74),__esModule:!0}},function(t,e,n){n(75),n(87),t.exports=n(91).f("iterator")},function(t,e,n){"use strict";var r=n(76)(!0);n(77)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(33),i=n(30);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(78),i=n(9),o=n(79),a=n(13),s=n(26),u=n(80),c=n(81),l=n(85),f=n(69),p=n(86)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",_="keys",v="values",y=function(){return this};t.exports=function(t,e,n,m,g,b,x){c(n,e,m);var T,E,w,P=function(t){if(!d&&t in C)return C[t];switch(t){case _:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},M=e+" Iterator",S=g==v,O=!1,C=t.prototype,k=C[p]||C[h]||g&&C[g],j=k||P(g),N=g?S?P("entries"):j:void 0,A="Array"==e?C.entries||k:k;if(A&&(w=f(A.call(new t)),w!==Object.prototype&&(l(w,M,!0),r||s(w,p)||a(w,p,y))),S&&k&&k.name!==v&&(O=!0,j=function(){return k.call(this)}),r&&!x||!d&&!O&&C[p]||a(C,p,j),u[e]=j,u[M]=y,g)if(T={values:S?j:P(v),keys:b?j:P(_),entries:N},x)for(E in T)E in C||o(C,E,T[E]);else i(i.P+i.F*(d||O),e,T);return T}},function(t,e){t.exports=!0},function(t,e,n){t.exports=n(13)},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(82),i=n(22),o=n(85),a={};n(13)(a,n(86)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(15),i=n(83),o=n(38),a=n(35)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=n(20)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(84).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;r--;)delete c[u][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(14),i=n(15),o=n(24);t.exports=n(18)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){t.exports=n(10).document&&document.documentElement},function(t,e,n){var r=n(14).f,i=n(26),o=n(86)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(36)("wks"),i=n(37),o=n(10).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},function(t,e,n){n(88);for(var r=n(10),i=n(13),o=n(80),a=n(86)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){"use strict";var r=n(89),i=n(90),o=n(80),a=n(27);t.exports=n(77)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){e.f=n(86)},function(t,e,n){t.exports={"default":n(93),__esModule:!0}},function(t,e,n){n(94),n(103),n(104),n(105),t.exports=n(4).Symbol},function(t,e,n){"use strict";var r=n(10),i=n(26),o=n(18),a=n(9),s=n(79),u=n(95).KEY,c=n(19),l=n(36),f=n(85),p=n(37),d=n(86),h=n(91),_=n(96),v=n(97),y=n(98),m=n(99),g=n(15),b=n(27),x=n(21),T=n(22),E=n(82),w=n(100),P=n(102),M=n(14),S=n(24),O=P.f,C=M.f,k=w.f,j=r.Symbol,N=r.JSON,A=N&&N.stringify,I="prototype",L=d("_hidden"),R=d("toPrimitive"),D={}.propertyIsEnumerable,F=l("symbol-registry"),z=l("symbols"),U=l("op-symbols"),Y=Object[I],X="function"==typeof j,V=r.QObject,W=!V||!V[I]||!V[I].findChild,B=o&&c(function(){return 7!=E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O(Y,e);r&&delete Y[e],C(t,e,n),r&&t!==Y&&C(Y,e,r)}:C,H=function(t){var e=z[t]=E(j[I]);return e._k=t,e},Z=X&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},q=function(t,e,n){return t===Y&&q(U,e,n),g(t),e=x(e,!0),g(n),i(z,e)?(n.enumerable?(i(t,L)&&t[L][e]&&(t[L][e]=!1),n=E(n,{enumerable:T(0,!1)})):(i(t,L)||C(t,L,T(1,{})),t[L][e]=!0),B(t,e,n)):C(t,e,n)},G=function(t,e){g(t);for(var n,r=y(e=b(e)),i=0,o=r.length;o>i;)q(t,n=r[i++],e[n]);return t},J=function(t,e){return void 0===e?E(t):G(E(t),e)},K=function(t){var e=D.call(this,t=x(t,!0));return!(this===Y&&i(z,t)&&!i(U,t))&&(!(e||!i(this,t)||!i(z,t)||i(this,L)&&this[L][t])||e)},Q=function(t,e){if(t=b(t),e=x(e,!0),t!==Y||!i(z,e)||i(U,e)){var n=O(t,e);return!n||!i(z,e)||i(t,L)&&t[L][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=k(b(t)),r=[],o=0;n.length>o;)i(z,e=n[o++])||e==L||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===Y,r=k(n?U:b(t)),o=[],a=0;r.length>a;)!i(z,e=r[a++])||n&&!i(Y,e)||o.push(z[e]);return o};X||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===Y&&e.call(U,n),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),B(this,t,T(1,n))};return o&&W&&B(Y,t,{configurable:!0,set:e}),H(t)},s(j[I],"toString",function(){return this._k}),P.f=Q,M.f=q,n(101).f=w.f=$,n(40).f=K,n(39).f=tt,o&&!n(78)&&s(Y,"propertyIsEnumerable",K,!0),h.f=function(t){return H(d(t))}),a(a.G+a.W+a.F*!X,{Symbol:j});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=S(d.store),nt=0;et.length>nt;)_(et[nt++]);a(a.S+a.F*!X,"Symbol",{"for":function(t){return i(F,t+="")?F[t]:F[t]=j(t)},keyFor:function(t){if(Z(t))return v(F,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!X,"Object",{create:J,defineProperty:q,defineProperties:G,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:tt}),N&&a(a.S+a.F*(!X||c(function(){var t=j();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!Z(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&m(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!Z(e))return e}),r[1]=e,A.apply(N,r)}}}),j[I][R]||n(13)(j[I],R,j[I].valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(37)("meta"),i=n(16),o=n(26),a=n(14).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(19)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},p=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},d=function(t){return c&&h.NEED&&u(t)&&!o(t,r)&&l(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var r=n(10),i=n(4),o=n(78),a=n(91),s=n(14).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(24),i=n(27);t.exports=function(t,e){for(var n,o=i(t),a=r(o),s=a.length,u=0;s>u;)if(o[n=a[u++]]===e)return n}},function(t,e,n){var r=n(24),i=n(39),o=n(40);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(29);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(27),i=n(101).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(e){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},function(t,e,n){var r=n(25),i=n(38).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(40),i=n(22),o=n(27),a=n(21),s=n(26),u=n(17),c=Object.getOwnPropertyDescriptor;e.f=n(18)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(n){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(96)("asyncIterator")},function(t,e,n){n(96)("observable")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var i=n(107),o=r(i),a=n(111),s=r(a),u=n(72),c=r(u);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,c["default"])(e)));t.prototype=(0,s["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o["default"]?(0,o["default"])(t,e):t.__proto__=e)}},function(t,e,n){t.exports={"default":n(108),__esModule:!0}},function(t,e,n){n(109),t.exports=n(4).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(110).set})},function(t,e,n){var r=n(16),i=n(15),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(11)(Function.call,n(102).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){t.exports={"default":n(112),__esModule:!0}},function(t,e,n){n(113);var r=n(4).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(82)})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=350;e["default"]={CURVE_SIZE:n,RESIZE_NEGATIVE_OFFSET:150,CURVE_PERCENT:n/100,CURVE_PADDING:10,ACTIVE_POOL_NAME:"_mojsCurveEditorPool"}},function(t,e,n){var r;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * diff --git a/app/index.html b/app/index.html index 63f70c8..3353076 100644 --- a/app/index.html +++ b/app/index.html @@ -68,7 +68,35 @@