react-rails 2.5.0 → 2.6.1
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -1
- data/README.md +43 -7
- data/lib/assets/javascripts/react_ujs.js +24 -7
- data/lib/assets/react-source/development/react-server.js +937 -275
- data/lib/assets/react-source/development/react.js +19459 -14928
- data/lib/assets/react-source/production/react-server.js +4 -4
- data/lib/assets/react-source/production/react.js +8 -8
- data/lib/generators/react/component_generator.rb +91 -15
- data/lib/generators/templates/component.js.jsx.tsx +36 -0
- data/lib/react/jsx/sprockets_strategy.rb +1 -1
- data/lib/react/rails/component_mount.rb +7 -0
- data/lib/react/rails/railtie.rb +1 -1
- data/lib/react/rails/test_helper.rb +0 -1
- data/lib/react/rails/version.rb +1 -1
- metadata +21 -12
@@ -1,9 +1,9 @@
|
|
1
|
-
!function(e){function t(
|
1
|
+
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(e){var t=r(2),n=r(14),o=r(4),i=r(8);e.React=t,e.ReactDOMServer=n,e.createReactClass=o,e.PropTypes=i}).call(t,function(){return this}())},function(e,t){/*
|
2
2
|
object-assign
|
3
3
|
(c) Sindre Sorhus
|
4
4
|
@license MIT
|
5
5
|
*/
|
6
|
-
"use strict";function
|
6
|
+
"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function n(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=n()?Object.assign:function(e,t){for(var n,u,l=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)i.call(n,c)&&(l[c]=n[c]);if(o){u=o(n);for(var f=0;f<u.length;f++)a.call(n,u[f])&&(l[u[f]]=n[u[f]])}}return l}},function(e,t,r){"use strict";e.exports=r(10)},function(e,t,r){"use strict";function n(e){return e}function o(e,t,r){function o(e,t){var r=g.hasOwnProperty(t)?g[t]:null;S.hasOwnProperty(t)&&l("OVERRIDE_BASE"===r,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&l("DEFINE_MANY"===r||"DEFINE_MANY_MERGED"===r,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function i(e,r){if(r){l("function"!=typeof r,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),l(!t(r),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var n=e.prototype,i=n.__reactAutoBindPairs;r.hasOwnProperty(s)&&x.mixins(e,r.mixins);for(var a in r)if(r.hasOwnProperty(a)&&a!==s){var u=r[a],c=n.hasOwnProperty(a);if(o(c,a),x.hasOwnProperty(a))x[a](e,u);else{var f=g.hasOwnProperty(a),d="function"==typeof u,y=d&&!f&&!c&&r.autobind!==!1;if(y)i.push(a,u),n[a]=u;else if(c){var m=g[a];l(f&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?n[a]=p(n[a],u):"DEFINE_MANY"===m&&(n[a]=h(n[a],u))}else n[a]=u}}}}function c(e,t){if(t)for(var r in t){var n=t[r];if(t.hasOwnProperty(r)){var o=r in x;l(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r);var i=r in e;if(i){var a=w.hasOwnProperty(r)?w[r]:null;return l("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r),void(e[r]=p(e[r],n))}e[r]=n}}}function f(e,t){l(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var r in t)t.hasOwnProperty(r)&&(l(void 0===e[r],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r),e[r]=t[r]);return e}function p(e,t){return function(){var r=e.apply(this,arguments),n=t.apply(this,arguments);if(null==r)return n;if(null==n)return r;var o={};return f(o,r),f(o,n),o}}function h(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function d(e,t){var r=t.bind(e);return r}function y(e){for(var t=e.__reactAutoBindPairs,r=0;r<t.length;r+=2){var n=t[r],o=t[r+1];e[n]=d(e,o)}}function m(e){var t=n(function(e,n,o){this.__reactAutoBindPairs.length&&y(this),this.props=e,this.context=n,this.refs=u,this.updater=o||r,this.state=null;var i=this.getInitialState?this.getInitialState():null;l("object"==typeof i&&!Array.isArray(i),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=i});t.prototype=new _,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],v.forEach(i.bind(null,t)),i(t,E),i(t,e),i(t,b),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),l(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var o in g)t.prototype[o]||(t.prototype[o]=null);return t}var v=[],g={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},w={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var r=0;r<t.length;r++)i(e,t[r])},childContextTypes:function(e,t){e.childContextTypes=a({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=a({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=p(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=a({},e.propTypes,t)},statics:function(e,t){c(e,t)},autobind:function(){}},E={componentDidMount:function(){this.__isMounted=!0}},b={componentWillUnmount:function(){this.__isMounted=!1}},S={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},_=function(){};return a(_.prototype,e.prototype,S),m}var i,a=r(1),u=r(5),l=r(6),s="mixins";i={},e.exports=o},function(e,t,r){"use strict";var n=r(2),o=r(3);if("undefined"==typeof n)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new n.Component).updater;e.exports=o(n.Component,n.isValidElement,i)},function(e,t,r){"use strict";var n={};e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,i,a,u,l){if(o(t),!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,i,a,u,l],f=0;s=new Error(t.replace(/%s/g,function(){return c[f++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(e){};e.exports=n},function(e,t,r){"use strict";function n(){}function o(){}var i=r(9);o.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,o,a){if(a!==i){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){e.exports=r(7)()},function(e,t){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},function(e,t,r){/** @license React v16.9.0
|
7
7
|
* react.production.min.js
|
8
8
|
*
|
9
9
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -11,7 +11,7 @@
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
13
13
|
*/
|
14
|
-
"use strict";function
|
14
|
+
"use strict";function n(e){for(var t=e.message,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)r+="&args[]="+encodeURIComponent(arguments[n]);return e.message="Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}function o(e,t,r){this.props=e,this.context=t,this.refs=j,this.updater=r||A}function i(){}function a(e,t,r){this.props=e,this.context=t,this.refs=j,this.updater=r||A}function u(e,t,r){var n=void 0,o={},i=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)W.call(t,n)&&!Y.hasOwnProperty(n)&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var l=Array(u),s=0;s<u;s++)l[s]=arguments[s+2];o.children=l}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return{$$typeof:b,type:e,key:i,ref:a,props:o,_owner:U.current}}function l(e,t){return{$$typeof:b,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function s(e){return"object"==typeof e&&null!==e&&e.$$typeof===b}function c(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function f(e,t,r,n){if(z.length){var o=z.pop();return o.result=e,o.keyPrefix=t,o.func=r,o.context=n,o.count=0,o}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>z.length&&z.push(e)}function h(e,t,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case b:case S:a=!0}}if(a)return r(o,e,""===t?"."+y(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u<e.length;u++){i=e[u];var l=t+y(i,u);a+=h(i,l,r,o)}else if(null===e||"object"!=typeof e?l=null:(l=R&&e[R]||e["@@iterator"],l="function"==typeof l?l:null),"function"==typeof l)for(e=l.call(e),u=0;!(i=e.next()).done;)i=i.value,l=t+y(i,u++),a+=h(i,l,r,o);else if("object"===i)throw r=""+e,n(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,"");return a}function d(e,t,r){return null==e?0:h(e,"",t,r)}function y(e,t){return"object"==typeof e&&null!==e&&null!=e.key?c(e.key):t.toString(36)}function m(e,t){e.func.call(e.context,t,e.count++)}function v(e,t,r){var n=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,n,r,function(e){return e}):null!=e&&(s(e)&&(e=l(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(V,"$&/")+"/")+r)),n.push(e))}function g(e,t,r,n,o){var i="";null!=r&&(i=(""+r).replace(V,"$&/")+"/"),t=f(t,i,n,o),d(e,v,t),p(t)}function w(){var e=$.current;if(null===e)throw n(Error(321));return e}var x=r(1),E="function"==typeof Symbol&&Symbol.for,b=E?Symbol.for("react.element"):60103,S=E?Symbol.for("react.portal"):60106,_=E?Symbol.for("react.fragment"):60107,k=E?Symbol.for("react.strict_mode"):60108,C=E?Symbol.for("react.profiler"):60114,D=E?Symbol.for("react.provider"):60109,N=E?Symbol.for("react.context"):60110,F=E?Symbol.for("react.forward_ref"):60112,I=E?Symbol.for("react.suspense"):60113,O=E?Symbol.for("react.suspense_list"):60120,P=E?Symbol.for("react.memo"):60115,M=E?Symbol.for("react.lazy"):60116;E&&Symbol.for("react.fundamental"),E&&Symbol.for("react.responder");var R="function"==typeof Symbol&&Symbol.iterator,A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j={};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw n(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var T=a.prototype=new i;T.constructor=a,x(T,o.prototype),T.isPureReactComponent=!0;var $={current:null},L={suspense:null},U={current:null},W=Object.prototype.hasOwnProperty,Y={key:!0,ref:!0,__self:!0,__source:!0},V=/\/+/g,z=[],q={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return g(e,n,null,t,r),n},forEach:function(e,t,r){return null==e?e:(t=f(null,null,t,r),d(e,m,t),void p(t))},count:function(e){return d(e,function(){return null},null)},toArray:function(e){var t=[];return g(e,t,null,function(e){return e}),t},only:function(e){if(!s(e))throw n(Error(143));return e}},createRef:function(){return{current:null}},Component:o,PureComponent:a,createContext:function(e,t){return void 0===t&&(t=null),e={$$typeof:N,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:D,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:F,render:e}},lazy:function(e){return{$$typeof:M,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:P,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return w().useCallback(e,t)},useContext:function(e,t){return w().useContext(e,t)},useEffect:function(e,t){return w().useEffect(e,t)},useImperativeHandle:function(e,t,r){return w().useImperativeHandle(e,t,r)},useDebugValue:function(){},useLayoutEffect:function(e,t){return w().useLayoutEffect(e,t)},useMemo:function(e,t){return w().useMemo(e,t)},useReducer:function(e,t,r){return w().useReducer(e,t,r)},useRef:function(e){return w().useRef(e)},useState:function(e){return w().useState(e)},Fragment:_,Profiler:C,StrictMode:k,Suspense:I,unstable_SuspenseList:O,createElement:u,cloneElement:function(e,t,r){if(null===e||void 0===e)throw n(Error(267),e);var o=void 0,i=x({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(u=t.ref,l=U.current),void 0!==t.key&&(a=""+t.key);var s=void 0;e.type&&e.type.defaultProps&&(s=e.type.defaultProps);for(o in t)W.call(t,o)&&!Y.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(o=arguments.length-2,1===o)i.children=r;else if(1<o){s=Array(o);for(var c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}return{$$typeof:b,type:e.type,key:a,ref:u,props:i,_owner:l}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:s,version:"16.9.0",unstable_withSuspenseConfig:function(e,t){var r=L.suspense;L.suspense=void 0===t?null:t;try{e()}finally{L.suspense=r}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:$,ReactCurrentBatchConfig:L,ReactCurrentOwner:U,IsSomeRendererActing:{current:!1},assign:x}},H={default:q},B=H&&q||H;e.exports=B.default||B},function(e,t,r){/** @license React v16.9.0
|
15
15
|
* react-dom-server.browser.production.min.js
|
16
16
|
*
|
17
17
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -19,4 +19,4 @@
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
21
21
|
*/
|
22
|
-
"use strict";function r(e,t,n,r,o,i,a,u){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,u],s=0;e=Error(t.replace(/%s/g,function(){return l[s++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function o(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=0;o
|
22
|
+
"use strict";function n(e){for(var t=e.message,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n
|
@@ -1,9 +1,9 @@
|
|
1
|
-
!function(e){function t(r){if(n[r])return n[r].exports;var
|
1
|
+
!function(e){function t(r){if(n[r])return n[r].exports;var l=n[r]={exports:{},id:r,loaded:!1};return e[r].call(l.exports,l,l.exports,t),l.loaded=!0,l.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var r=n(2),l=n(13),i=n(4),o=n(8);window.React=r,window.ReactDOM=l,window.createReactClass=i,window.PropTypes=o},function(e,t){/*
|
2
2
|
object-assign
|
3
3
|
(c) Sindre Sorhus
|
4
4
|
@license MIT
|
5
5
|
*/
|
6
|
-
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var
|
6
|
+
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(e){l[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},l)).join("")}catch(e){return!1}}var l=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var s in r)i.call(r,s)&&(u[s]=r[s]);if(l){a=l(r);for(var f=0;f<a.length;f++)o.call(r,a[f])&&(u[a[f]]=r[a[f]])}}return u}},function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";function r(e){return e}function l(e,t,n){function l(e,t){var n=g.hasOwnProperty(t)?g[t]:null;x.hasOwnProperty(t)&&u("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&u("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function i(e,n){if(n){u("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),u(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(c)&&w.mixins(e,n.mixins);for(var o in n)if(n.hasOwnProperty(o)&&o!==c){var a=n[o],s=r.hasOwnProperty(o);if(l(s,o),w.hasOwnProperty(o))w[o](e,a);else{var f=g.hasOwnProperty(o),h="function"==typeof a,m=h&&!f&&!s&&n.autobind!==!1;if(m)i.push(o,a),r[o]=a;else if(s){var y=g[o];u(f&&("DEFINE_MANY_MERGED"===y||"DEFINE_MANY"===y),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",y,o),"DEFINE_MANY_MERGED"===y?r[o]=d(r[o],a):"DEFINE_MANY"===y&&(r[o]=p(r[o],a))}else r[o]=a}}}}function s(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var l=n in w;u(!l,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;if(i){var o=b.hasOwnProperty(n)?b[n]:null;return u("DEFINE_MANY_MERGED"===o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=d(e[n],r))}e[n]=r}}}function f(e,t){u(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(u(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function d(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var l={};return f(l,n),f(l,r),l}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function m(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],l=t[n+1];e[r]=h(e,l)}}function y(e){var t=r(function(e,r,l){this.__reactAutoBindPairs.length&&m(this),this.props=e,this.context=r,this.refs=a,this.updater=l||n,this.state=null;var i=this.getInitialState?this.getInitialState():null;u("object"==typeof i&&!Array.isArray(i),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=i});t.prototype=new T,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],v.forEach(i.bind(null,t)),i(t,E),i(t,e),i(t,k),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),u(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");for(var l in g)t.prototype[l]||(t.prototype[l]=null);return t}var v=[],g={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},b={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=o({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=o({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=d(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=o({},e.propTypes,t)},statics:function(e,t){s(e,t)},autobind:function(){}},E={componentDidMount:function(){this.__isMounted=!0}},k={componentWillUnmount:function(){this.__isMounted=!1}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},T=function(){};return o(T.prototype,e.prototype,x),y}var i,o=n(1),a=n(5),u=n(6),c="mixins";i={},e.exports=l},function(e,t,n){"use strict";var r=n(2),l=n(3);if("undefined"==typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=l(r.Component,r.isValidElement,i)},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,u){if(l(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,i,o,a,u],f=0;c=new Error(t.replace(/%s/g,function(){return s[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var l=function(e){};e.exports=r},function(e,t,n){"use strict";function r(){}function l(){}var i=n(9);l.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,l,o){if(o!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){e.exports=n(7)()},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){/** @license React v16.9.0
|
7
7
|
* react.production.min.js
|
8
8
|
*
|
9
9
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -11,7 +11,7 @@
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
13
13
|
*/
|
14
|
-
"use strict";function r(e
|
14
|
+
"use strict";function r(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}function l(e,t,n){this.props=e,this.context=t,this.refs=z,this.updater=n||F}function i(){}function o(e,t,n){this.props=e,this.context=t,this.refs=z,this.updater=n||F}function a(e,t,n){var r=void 0,l={},i=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(i=""+t.key),t)W.call(t,r)&&!B.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(1===a)l.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===l[r]&&(l[r]=a[r]);return{$$typeof:k,type:e,key:i,ref:o,props:l,_owner:j.current}}function u(e,t){return{$$typeof:k,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===k}function s(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function f(e,t,n,r){if(H.length){var l=H.pop();return l.result=e,l.keyPrefix=t,l.func=n,l.context=r,l.count=0,l}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function d(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>H.length&&H.push(e)}function p(e,t,n,l){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case k:case x:o=!0}}if(o)return n(l,e,""===t?"."+m(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var u=t+m(i,a);o+=p(i,u,n,l)}else if(null===e||"object"!=typeof e?u=null:(u=O&&e[O]||e["@@iterator"],u="function"==typeof u?u:null),"function"==typeof u)for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=t+m(i,a++),o+=p(i,u,n,l);else if("object"===i)throw n=""+e,r(Error(31),"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return o}function h(e,t,n){return null==e?0:p(e,"",t,n)}function m(e,t){return"object"==typeof e&&null!==e&&null!=e.key?s(e.key):t.toString(36)}function y(e,t){e.func.call(e.context,t,e.count++)}function v(e,t,n){var r=e.result,l=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,r,n,function(e){return e}):null!=e&&(c(e)&&(e=u(e,l+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(V,"$&/")+"/")+n)),r.push(e))}function g(e,t,n,r,l){var i="";null!=n&&(i=(""+n).replace(V,"$&/")+"/"),t=f(t,i,r,l),h(e,v,t),d(t)}function b(){var e=A.current;if(null===e)throw r(Error(321));return e}var w=n(1),E="function"==typeof Symbol&&Symbol.for,k=E?Symbol.for("react.element"):60103,x=E?Symbol.for("react.portal"):60106,T=E?Symbol.for("react.fragment"):60107,_=E?Symbol.for("react.strict_mode"):60108,C=E?Symbol.for("react.profiler"):60114,S=E?Symbol.for("react.provider"):60109,P=E?Symbol.for("react.context"):60110,N=E?Symbol.for("react.forward_ref"):60112,M=E?Symbol.for("react.suspense"):60113,R=E?Symbol.for("react.suspense_list"):60120,D=E?Symbol.for("react.memo"):60115,I=E?Symbol.for("react.lazy"):60116;E&&Symbol.for("react.fundamental"),E&&Symbol.for("react.responder");var O="function"==typeof Symbol&&Symbol.iterator,F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z={};l.prototype.isReactComponent={},l.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw r(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},l.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=l.prototype;var U=o.prototype=new i;U.constructor=o,w(U,l.prototype),U.isPureReactComponent=!0;var A={current:null},L={suspense:null},j={current:null},W=Object.prototype.hasOwnProperty,B={key:!0,ref:!0,__self:!0,__source:!0},V=/\/+/g,H=[],Y={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return g(e,r,null,t,n),r},forEach:function(e,t,n){return null==e?e:(t=f(null,null,t,n),h(e,y,t),void d(t))},count:function(e){return h(e,function(){return null},null)},toArray:function(e){var t=[];return g(e,t,null,function(e){return e}),t},only:function(e){if(!c(e))throw r(Error(143));return e}},createRef:function(){return{current:null}},Component:l,PureComponent:o,createContext:function(e,t){return void 0===t&&(t=null),e={$$typeof:P,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:S,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:N,render:e}},lazy:function(e){return{$$typeof:I,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:D,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return b().useCallback(e,t)},useContext:function(e,t){return b().useContext(e,t)},useEffect:function(e,t){return b().useEffect(e,t)},useImperativeHandle:function(e,t,n){return b().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return b().useLayoutEffect(e,t)},useMemo:function(e,t){return b().useMemo(e,t)},useReducer:function(e,t,n){return b().useReducer(e,t,n)},useRef:function(e){return b().useRef(e)},useState:function(e){return b().useState(e)},Fragment:T,Profiler:C,StrictMode:_,Suspense:M,unstable_SuspenseList:R,createElement:a,cloneElement:function(e,t,n){if(null===e||void 0===e)throw r(Error(267),e);var l=void 0,i=w({},e.props),o=e.key,a=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,u=j.current),void 0!==t.key&&(o=""+t.key);var c=void 0;e.type&&e.type.defaultProps&&(c=e.type.defaultProps);for(l in t)W.call(t,l)&&!B.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}if(l=arguments.length-2,1===l)i.children=n;else if(1<l){c=Array(l);for(var s=0;s<l;s++)c[s]=arguments[s+2];i.children=c}return{$$typeof:k,type:e.type,key:o,ref:a,props:i,_owner:u}},createFactory:function(e){var t=a.bind(null,e);return t.type=e,t},isValidElement:c,version:"16.9.0",unstable_withSuspenseConfig:function(e,t){var n=L.suspense;L.suspense=void 0===t?null:t;try{e()}finally{L.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:A,ReactCurrentBatchConfig:L,ReactCurrentOwner:j,IsSomeRendererActing:{current:!1},assign:w}},Q={default:Y},$=Q&&Y||Q;e.exports=$.default||$},,function(e,t,n){/** @license React v16.9.0
|
15
15
|
* react-dom.production.min.js
|
16
16
|
*
|
17
17
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -19,10 +19,10 @@
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
21
21
|
*/
|
22
|
-
"use strict";function r(e,t,n,r,i,o,l,a){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,l,a],c=0;e=Error(t.replace(/%s/g,function(){return u[c++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function i(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=0;i
|
23
|
-
var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case lo:return n.key===i?n.type===uo?f(e,t,n.props.children,r,i):c(e,t,n,r):null;case ao:return n.key===i?s(e,t,n,r):null}if(zl(n)||J(n))return null!==i?null:f(e,t,n,r,null);Zt(e,n)}return null}function m(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return e=e.get(n)||null,u(t,e,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case lo:return e=e.get(null===r.key?n:r.key)||null,r.type===uo?f(t,e,r.props.children,i,r.key):c(t,e,r,i);case ao:return e=e.get(null===r.key?n:r.key)||null,s(t,e,r,i)}if(zl(r)||J(r))return e=e.get(n)||null,f(t,e,r,i,null);Zt(t,r)}return null}function h(i,o,a,u){for(var c=null,s=null,f=o,h=o=0,v=null;null!==f&&h
|
24
|
-
case"select":case"option":break;default:"function"==typeof f.onClick&&(o.onclick=ft)}l=s,a.updateQueue=l,a=null!==l,a&&er(t)}else{f=t,d=l,o=a,s=9===u.nodeType?u:u.ownerDocument,c===hl.html&&(c=rt(d)),c===hl.html?"script"===d?(o=s.createElement("div"),o.innerHTML="",s=o.removeChild(o.firstChild)):"string"==typeof o.is?s=s.createElement(d,{is:o.is}):(s=s.createElement(d),"select"===d&&(d=s,o.multiple?d.multiple=!0:o.size&&(d.size=o.size))):s=s.createElementNS(c,d),o=s,o[Si]=f,o[Ci]=a,Na(o,t,!1,!1),d=o,s=l,f=a;var p=u,m=ct(s,f);switch(s){case"iframe":case"object":Ue("load",d),u=f;break;case"video":case"audio":for(u=0;u
component higher in the tree to provide a loading indicator or placeholder to display."+te(s))}Ba=!0,f=Jn(f,s),u=c;do{switch(u.tag){case 3:u.effectTag|=2048,u.expirationTime=a,a=sr(u,f,a),Qn(u,a);break e;case 1:if(p=f,m=u.type,s=u.stateNode,0===(64&u.effectTag)&&("function"==typeof m.getDerivedStateFromError||null!==s&&"function"==typeof s.componentDidCatch&&(null===qa||!qa.has(s)))){u.effectTag|=2048,u.expirationTime=a,a=fr(u,p,a),Qn(u,a);break e}}u=u.return}while(null!==u)}La=kr(l);continue}o=!0,Yr(t)}}break}if(Aa=!1,Fa.current=n,Ta=wa=xa=null,cn(),o)ja=null,e.finishedWork=null;else if(null!==La)e.finishedWork=null;else{if(n=e.current.alternate,null===n?i("281"):void 0,ja=null,Ba){if(o=e.latestPendingTime,l=e.latestSuspendedTime,a=e.latestPingedTime,0!==o&&o |
25
|
-
EnterLeaveEventPlugin:jo,ChangeEventPlugin:Do,SelectEventPlugin:ml,BeforeInputEventPlugin:Xi});var hl={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},vl=void 0,yl=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==hl.svg||"innerHTML"in e)e.innerHTML=t;else{for(vl=vl||document.createElement("div"),vl.innerHTML="",t=vl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),gl={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bl=["Webkit","ms","Moz","O"];Object.keys(gl).forEach(function(e){bl.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gl[t]=gl[e]})});var kl=ai({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),xl=null,wl=null,Tl="function"==typeof setTimeout?setTimeout:void 0,El="function"==typeof clearTimeout?clearTimeout:void 0,_l=ui.unstable_scheduleCallback,Sl=ui.unstable_cancelCallback;new Set;var Cl=[],Pl=-1,Nl={},Dl={current:Nl},Il={current:!1},Ol=Nl,Rl=null,Ml=null,Fl=(new li.Component).refs,Ul={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===Ne(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Fr();r=Er(r,e);var i=Yn(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),gr(),$n(e,i),Pr(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Fr();r=Er(r,e);var i=Yn(r);i.tag=_a,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),gr(),$n(e,i),Pr(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Fr();n=Er(n,e);var r=Yn(n);r.tag=Sa,void 0!==t&&null!==t&&(r.callback=t),gr(),$n(e,r),Pr(e,n)}},zl=Array.isArray,Al=Jt(!0),Ll=Jt(!1),jl={},Wl={current:jl},Vl={current:jl},Bl={current:jl},Yl=0,Hl=2,$l=4,Ql=8,Kl=16,ql=32,Gl=64,Xl=128,Zl=ro.ReactCurrentDispatcher,Jl=0,ea=null,ta=null,na=null,ra=null,ia=null,oa=null,la=0,aa=null,ua=0,ca=!1,sa=null,fa=0,da={readContext:Wn,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln},pa={readContext:Wn,useCallback:function(e,t){return sn().memoizedState=[e,void 0===t?null:t],e},useContext:Wn,useEffect:function(e,t){return hn(516,Xl|Gl,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,hn(4,$l|ql,yn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hn(4,$l|ql,e,t)},useMemo:function(e,t){var n=sn();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sn();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=bn.bind(null,ea,e),[r.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:function(e){var t=sn();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={last:null,dispatch:null,lastRenderedReducer:dn,lastRenderedState:e},e=e.dispatch=bn.bind(null,ea,e),[t.memoizedState,e]},useDebugValue:gn},ma={readContext:Wn,useCallback:function(e,t){var n=fn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&an(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:Wn,useEffect:function(e,t){return vn(516,Xl|Gl,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,vn(4,$l|ql,yn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vn(4,$l|ql,e,t)},useMemo:function(e,t){var n=fn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&an(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:pn,useRef:function(){return fn().memoizedState},useState:function(e){return pn(dn,e)},useDebugValue:gn},ha=null,va=null,ya=!1,ga=ro.ReactCurrentOwner,ba=!1,ka={current:null},xa=null,wa=null,Ta=null,Ea=0,_a=1,Sa=2,Ca=3,Pa=!1,Na=void 0,Da=void 0,Ia=void 0,Oa=void 0;Na=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Da=function(){},Ia=function(e,t,n,r,i){var o=e.memoizedProps;if(o!==r){var l=t.stateNode;switch(en(Wl.current),e=null,n){case"input":o=ce(l,o),r=ce(l,r),e=[];break;case"option":o=Xe(l,o),r=Xe(l,r),e=[];break;case"select":o=ai({},o,{value:void 0}),r=ai({},r,{value:void 0}),e=[];break;case"textarea":o=Je(l,o),r=Je(l,r),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(l.onclick=ft)}ut(n,r),l=n=void 0;var a=null;for(n in o)if(!r.hasOwnProperty(n)&&o.hasOwnProperty(n)&&null!=o[n])if("style"===n){var u=o[n];for(l in u)u.hasOwnProperty(l)&&(a||(a={}),a[l]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(gi.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var c=r[n];if(u=null!=o?o[n]:void 0,r.hasOwnProperty(n)&&c!==u&&(null!=c||null!=u))if("style"===n)if(u){for(l in u)!u.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(a||(a={}),a[l]="");for(l in c)c.hasOwnProperty(l)&&u[l]!==c[l]&&(a||(a={}),a[l]=c[l])}else a||(e||(e=[]),e.push(n,a)),a=c;else"dangerouslySetInnerHTML"===n?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(e=e||[]).push(n,""+c)):"children"===n?u===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(n,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(gi.hasOwnProperty(n)?(null!=c&&st(i,n),e||u===c||(e=[])):(e=e||[]).push(n,c))}a&&(e=e||[]).push("style",a),i=e,(t.updateQueue=i)&&er(t)}},Oa=function(e,t,n,r){n!==r&&er(t)};var Ra="function"==typeof WeakSet?WeakSet:Set,Ma="function"==typeof WeakMap?WeakMap:Map,Fa=ro.ReactCurrentDispatcher,Ua=ro.ReactCurrentOwner,za=1073741822,Aa=!1,La=null,ja=null,Wa=0,Va=-1,Ba=!1,Ya=null,Ha=!1,$a=null,Qa=null,Ka=null,qa=null,Ga=null,Xa=null,Za=0,Ja=void 0,eu=!1,tu=null,nu=0,ru=0,iu=!1,ou=null,lu=!1,au=!1,uu=null,cu=ui.unstable_now(),su=1073741822-(cu/10|0),fu=su,du=50,pu=0,mu=null,hu=!1;Zi=function(e,t,n){switch(t){case"input":if(de(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t
|
22
|
+
"use strict";function r(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r
|
23
|
+
null!==g&&(a=o(g,a,y),null===f?s=g:f.sibling=g,f=g);return s}for(m=l(i,m);!g.done;y++,g=u.next())g=h(m,i,y,g.value,c),null!==g&&(e&&null!==g.alternate&&m.delete(null===g.key?y:g.key),a=o(g,a,y),null===f?s=g:f.sibling=g,f=g);return e&&m.forEach(function(e){return t(i,e)}),s}return function(e,l,o,u){var c="object"==typeof o&&null!==o&&o.type===ai&&null===o.key;c&&(o=o.props.children);var s="object"==typeof o&&null!==o;if(s)switch(o.$$typeof){case ii:e:{for(s=o.key,c=l;null!==c;){if(c.key===s){if(7===c.tag?o.type===ai:c.elementType===o.type){n(e,c.sibling),l=i(c,o.type===ai?o.props.children:o.props,u),l.ref=tn(e,c,o),l.return=e,e=l;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===ai?(l=Lr(o.props.children,e.mode,u,o.key),l.return=e,e=l):(u=Ar(o.type,o.key,o.props,null,e.mode,u),u.ref=tn(e,l,o),u.return=e,e=u)}return a(e);case oi:e:{for(c=o.key;null!==l;){if(l.key===c){if(4===l.tag&&l.stateNode.containerInfo===o.containerInfo&&l.stateNode.implementation===o.implementation){n(e,l.sibling),l=i(l,o.children||[],u),l.return=e,e=l;break e}n(e,l);break}t(e,l),l=l.sibling}l=Wr(o,e.mode,u),l.return=e,e=l}return a(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==l&&6===l.tag?(n(e,l.sibling),l=i(l,o,u),l.return=e,e=l):(n(e,l),l=jr(o,e.mode,u),l.return=e,e=l),a(e);if(ca(o))return m(e,l,o,u);if(Z(o))return y(e,l,o,u);if(s&&nn(e,o),"undefined"==typeof o&&!c)switch(e.tag){case 1:case 0:throw e=e.type,r(Error(152),e.displayName||e.name||"Component")}return n(e,l)}}function ln(e){if(e===da)throw r(Error(174));return e}function on(e,t){ht(ma,t,e),ht(ha,e,e),ht(pa,da,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nt(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=nt(t,n)}pt(pa,e),ht(pa,t,e)}function an(e){pt(pa,e),pt(ha,e),pt(ma,e)}function un(e){ln(ma.current);var t=ln(pa.current),n=nt(t,e.type);t!==n&&(ht(ha,e,e),ht(pa,n,e))}function cn(e){ha.current===e&&(pt(pa,e),pt(ha,e))}function sn(e){for(var t=e;null!==t;){if(13===t.tag){if(null!==t.memoizedState)return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function fn(){throw r(Error(321))}function dn(e,t){if(null===t)return!1;for(var n=0;n
|
24
|
+
if(u=sn(n),null!==u){for(t.effectTag|=64,Yn(i,!1),n=u.updateQueue,null!==n&&(t.updateQueue=n,t.effectTag|=4),t.firstEffect=t.lastEffect=null,n=t.child;null!==n;)i=n,o=l,i.effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,u=i.alternate,null===u?(i.childExpirationTime=0,i.expirationTime=o,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=u.childExpirationTime,i.expirationTime=u.expirationTime,i.child=u.child,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,o=u.dependencies,i.dependencies=null===o?null:{expirationTime:o.expirationTime,firstContext:o.firstContext,responders:o.responders}),n=n.sibling;ht(ba,ba.current&ya|ga,t),t=t.child;break e}n=n.sibling}}else{if(!o)if(n=sn(u),null!==n){if(t.effectTag|=64,o=!0,Yn(i,!0),null===i.tail&&"hidden"===i.tailMode){l=n.updateQueue,null!==l&&(t.updateQueue=l,t.effectTag|=4),t=t.lastEffect=i.lastEffect,null!==t&&(t.nextEffect=null);break}}else ea()>i.tailExpiration&&1
|
25
|
+
case"mousedown":go=!0;break;case"contextmenu":case"mouseup":case"dragend":return go=!1,$e(n,r);case"selectionchange":if(po)break;case"keydown":case"keyup":return $e(n,r)}return null}};kl.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),gl=g,bl=y,wl=v,kl.injectEventPluginsByName({SimpleEventPlugin:ao,EnterLeaveEventPlugin:Li,ChangeEventPlugin:Ni,SelectEventPlugin:bo,BeforeInputEventPlugin:Kl});var wo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Eo=void 0,ko=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!==wo.svg||"innerHTML"in e)e.innerHTML=t;else{for(Eo=Eo||document.createElement("div"),Eo.innerHTML="",t=Eo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),xo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},To=["Webkit","ms","Moz","O"];Object.keys(xo).forEach(function(e){To.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xo[t]=xo[e]})});var _o=il({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Co=null,So=null,Po="function"==typeof setTimeout?setTimeout:void 0,No="function"==typeof clearTimeout?clearTimeout:void 0;new Set;var Mo=[],Ro=-1,Do={},Io={current:Do},Oo={current:!1},Fo=Do,zo=ol.unstable_runWithPriority,Uo=ol.unstable_scheduleCallback,Ao=ol.unstable_cancelCallback,Lo=ol.unstable_shouldYield,jo=ol.unstable_requestPaint,Wo=ol.unstable_now,Bo=ol.unstable_getCurrentPriorityLevel,Vo=ol.unstable_ImmediatePriority,Ho=ol.unstable_UserBlockingPriority,Yo=ol.unstable_NormalPriority,Qo=ol.unstable_LowPriority,$o=ol.unstable_IdlePriority,qo={},Ko=void 0!==jo?jo:function(){},Go=null,Xo=null,Zo=!1,Jo=Wo(),ea=1e4>Jo?Wo:function(){return Wo()-Jo},ta={current:null},na=null,ra=null,la=null,ia=!1,oa=ni.ReactCurrentBatchConfig,aa=(new ll.Component).refs,ua={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===Ne(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=ar(),l=oa.suspense;r=ur(r,e,l),l=Wt(r,l),l.payload=t,void 0!==n&&null!==n&&(l.callback=n),Vt(e,l),cr(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=ar(),l=oa.suspense;r=ur(r,e,l),l=Wt(r,l),l.tag=1,l.payload=t,void 0!==n&&null!==n&&(l.callback=n),Vt(e,l),cr(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=ar(),r=oa.suspense;n=ur(n,e,r),r=Wt(n,r),r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Vt(e,r),cr(e,n)}},ca=Array.isArray,sa=rn(!0),fa=rn(!1),da={},pa={current:da},ha={current:da},ma={current:da},ya=1,va=1,ga=2,ba={current:0},wa=0,Ea=2,ka=4,xa=8,Ta=16,_a=32,Ca=64,Sa=128,Pa=ni.ReactCurrentDispatcher,Na=0,Ma=null,Ra=null,Da=null,Ia=null,Oa=null,Fa=null,za=0,Ua=null,Aa=0,La=!1,ja=null,Wa=0,Ba={readContext:At,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useResponder:fn},Va={readContext:At,useCallback:function(e,t){return mn().memoizedState=[e,void 0===t?null:t],e},useContext:At,useEffect:function(e,t){return wn(516,Sa|Ca,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wn(4,ka|_a,kn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wn(4,ka|_a,e,t)},useMemo:function(e,t){var n=mn();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mn();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Tn.bind(null,Ma,e),[r.memoizedState,e]},useRef:function(e){var t=mn();return e={current:e},t.memoizedState=e},useState:function(e){var t=mn();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={last:null,dispatch:null,lastRenderedReducer:vn,lastRenderedState:e},e=e.dispatch=Tn.bind(null,Ma,e),[t.memoizedState,e]},useDebugValue:xn,useResponder:Pe},Ha={readContext:At,useCallback:function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(n.memoizedState=[e,t],e)},useContext:At,useEffect:function(e,t){return En(516,Sa|Ca,e,t)},useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,En(4,ka|_a,kn.bind(null,t,e),n)},useLayoutEffect:function(e,t){return En(4,ka|_a,e,t)},useMemo:function(e,t){var n=yn();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dn(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)},useReducer:gn,useRef:function(){return yn().memoizedState},useState:function(e){return gn(vn,e)},useDebugValue:xn,useResponder:Pe},Ya=null,Qa=null,$a=!1,qa=ni.ReactCurrentOwner,Ka=!1,Ga={},Xa=void 0,Za=void 0,Ja=void 0,eu=void 0;Xa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(20===n.tag)e.appendChild(n.stateNode.instance);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Za=function(){},Ja=function(e,t,n,r,l){var i=e.memoizedProps;if(i!==r){var o=t.stateNode;switch(ln(pa.current),e=null,n){case"input":i=ue(o,i),r=ue(o,r),e=[];break;case"option":i=Ke(o,i),r=Ke(o,r),e=[];break;case"select":i=il({},i,{value:void 0}),r=il({},r,{value:void 0}),e=[];break;case"textarea":i=Xe(o,i),r=Xe(o,r),e=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(o.onclick=ct)}ot(n,r),o=n=void 0;var a=null;for(n in i)if(!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&null!=i[n])if("style"===n){var u=i[n];for(o in u)u.hasOwnProperty(o)&&(a||(a={}),a[o]="")}else"dangerouslySetInnerHTML"!==n&&"children"!==n&&"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&"autoFocus"!==n&&(fl.hasOwnProperty(n)?e||(e=[]):(e=e||[]).push(n,null));for(n in r){var c=r[n];if(u=null!=i?i[n]:void 0,r.hasOwnProperty(n)&&c!==u&&(null!=c||null!=u))if("style"===n)if(u){for(o in u)!u.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(a||(a={}),a[o]="");for(o in c)c.hasOwnProperty(o)&&u[o]!==c[o]&&(a||(a={}),a[o]=c[o])}else a||(e||(e=[]),e.push(n,a)),a=c;else"dangerouslySetInnerHTML"===n?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(e=e||[]).push(n,""+c)):"children"===n?u===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(n,""+c):"suppressContentEditableWarning"!==n&&"suppressHydrationWarning"!==n&&(fl.hasOwnProperty(n)?(null!=c&&ut(l,n),e||u===c||(e=[])):(e=e||[]).push(n,c))}a&&(e=e||[]).push("style",a),l=e,(t.updateQueue=l)&&Hn(t)}},eu=function(e,t,n,r){n!==r&&Hn(t)};var tu="function"==typeof WeakSet?WeakSet:Set,nu="function"==typeof WeakMap?WeakMap:Map,ru=Math.ceil,lu=ni.ReactCurrentDispatcher,iu=ni.ReactCurrentOwner,ou=0,au=8,uu=16,cu=32,su=0,fu=1,du=2,pu=3,hu=4,mu=ou,yu=null,vu=null,gu=0,bu=su,wu=1073741823,Eu=1073741823,ku=null,xu=!1,Tu=0,_u=500,Cu=null,Su=!1,Pu=null,Nu=null,Mu=!1,Ru=null,Du=90,Iu=0,Ou=null,Fu=0,zu=null,Uu=0,Au=0,Lu=void 0;Lu=function(e,t,n){var l=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||Oo.current)Ka=!0;else if(l
|
26
26
|
* scheduler.production.min.js
|
27
27
|
*
|
28
28
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
@@ -30,4 +30,4 @@ EnterLeaveEventPlugin:jo,ChangeEventPlugin:Do,SelectEventPlugin:ml,BeforeInputEv
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
32
32
|
*/
|
33
|
-
"use strict";function n(
|
33
|
+
"use strict";function n(e,t){var n=e.next;if(n===e)F=null;else{e===F&&(F=n);var r=e.previous;r.next=n,n.previous=r}e.next=e.previous=null,n=e.callback,r=A;var l=U;A=e.priorityLevel,U=e;try{var i=e.expirationTime<=t;switch(A){case 1:var o=n(i);break;case 2:o=n(i);break;case 3:o=n(i);break;case 4:o=n(i);break;case 5:o=n(i)}}catch(e){throw e}finally{A=r,U=l}if("function"==typeof o)if(t=e.expirationTime,e.callback=o,null===F)F=e.next=e.previous=e;else{o=null,i=F;do{if(t<=i.expirationTime){o=i;break}i=i.next}while(i!==F);null===o?o=F:o===F&&(F=e),t=o.previous,t.next=o.previous=e,e.next=o,e.previous=t}}function r(e){if(null!==z&&z.startTime<=e)do{var t=z,n=t.next;if(t===n)z=null;else{z=n;var r=t.previous;r.next=n,n.previous=r}t.next=t.previous=null,a(t,t.expirationTime)}while(null!==z&&z.startTime<=e)}function l(e){W=!1,r(e),j||(null!==F?(j=!0,u(i)):null!==z&&c(l,z.startTime-e))}function i(e,i){j=!1,W&&(W=!1,s()),r(i),L=!0;try{if(e){if(null!==F)do n(F,i),i=t.unstable_now(),r(i);while(null!==F&&!f())}else for(;null!==F&&F.expirationTime<=i;)n(F,i),i=t.unstable_now(),r(i);return null!==F||(null!==z&&c(l,z.startTime-i),!1)}finally{L=!1}}function o(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}function a(e,t){if(null===F)F=e.next=e.previous=e;else{var n=null,r=F;do{if(t<r.expirationTime){n=r;break}r=r.next}while(r!==F);null===n?n=F:n===F&&(F=e),t=n.previous,t.next=n.previous=e,e.next=n,e.previous=t}}Object.defineProperty(t,"__esModule",{value:!0});var u=void 0,c=void 0,s=void 0,f=void 0,d=void 0;if(t.unstable_now=void 0,t.unstable_forceFrameRate=void 0,"undefined"==typeof window||"function"!=typeof MessageChannel){var p=null,h=null,m=function(){if(null!==p)try{var e=t.unstable_now();p(!0,e),p=null}catch(e){throw setTimeout(m,0),e}};t.unstable_now=function(){return Date.now()},u=function(e){null!==p?setTimeout(u,0,e):(p=e,setTimeout(m,0))},c=function(e,t){h=setTimeout(e,t)},s=function(){clearTimeout(h)},f=function(){return!1},d=t.unstable_forceFrameRate=function(){}}else{var y=window.performance,v=window.Date,g=window.setTimeout,b=window.clearTimeout,w=window.requestAnimationFrame,E=window.cancelAnimationFrame;"undefined"!=typeof console&&("function"!=typeof w&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof E&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),t.unstable_now="object"==typeof y&&"function"==typeof y.now?function(){return y.now()}:function(){return v.now()};var k=!1,x=null,T=-1,_=-1,C=33.33,S=-1,P=-1,N=0,M=!1;f=function(){return t.unstable_now()>=N},d=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):0<e?(C=Math.floor(1e3/e),M=!0):(C=33.33,M=!1)};var R=function(){if(null!==x){var e=t.unstable_now(),n=0<N-e;try{x(n,e)||(x=null)}catch(e){throw I.postMessage(null),e}}},D=new MessageChannel,I=D.port2;D.port1.onmessage=R;var O=function(e){if(null===x)P=S=-1,k=!1;else{k=!0,w(function(e){b(T),O(e)});var n=function(){N=t.unstable_now()+C/2,R(),T=g(n,3*C)};if(T=g(n,3*C),-1!==S&&.1<e-S){var r=e-S;!M&&-1!==P&&r<C&&P<C&&(C=r<P?P:r,8.33>C&&(C=8.33)),P=r}S=e,N=e+C,I.postMessage(null)}};u=function(e){x=e,k||(k=!0,w(function(e){O(e)}))},c=function(e,n){_=g(function(){e(t.unstable_now())},n)},s=function(){b(_),_=-1}}var F=null,z=null,U=null,A=3,L=!1,j=!1,W=!1,B=d;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=A;A=e;try{return t()}finally{A=n}},t.unstable_next=function(e){switch(A){case 1:case 2:case 3:var t=3;break;default:t=A}var n=A;A=t;try{return e()}finally{A=n}},t.unstable_scheduleCallback=function(e,n,r){var f=t.unstable_now();if("object"==typeof r&&null!==r){var d=r.delay;d="number"==typeof d&&0<d?f+d:f,r="number"==typeof r.timeout?r.timeout:o(e)}else r=o(e),d=f;if(r=d+r,e={callback:n,priorityLevel:e,startTime:d,expirationTime:r,next:null,previous:null},d>f){if(r=d,null===z)z=e.next=e.previous=e;else{n=null;var p=z;do{if(r<p.startTime){n=p;break}p=p.next}while(p!==z);null===n?n=z:n===z&&(z=e),r=n.previous,r.next=n.previous=e,e.next=n,e.previous=r}null===F&&z===e&&(W?s():W=!0,c(l,d-f))}else a(e,r),j||L||(j=!0,u(i));return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(e===t)e===F?F=null:e===z&&(z=null);else{e===F?F=t:e===z&&(z=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var t=A;return function(){var n=A;A=t;try{return e.apply(this,arguments)}finally{A=n}}},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_shouldYield=function(){var e=t.unstable_now();return r(e),null!==U&&null!==F&&F.startTime<=e&&F.expirationTime<U.expirationTime||f()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){j||L||(j=!0,u(i))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return F}},function(e,t,n){"use strict";e.exports=n(15)}]);
|
@@ -55,6 +55,11 @@ module React
|
|
55
55
|
default: false,
|
56
56
|
desc: 'Output es6 class based component'
|
57
57
|
|
58
|
+
class_option :ts,
|
59
|
+
type: :boolean,
|
60
|
+
default: false,
|
61
|
+
desc: 'Output tsx class based component'
|
62
|
+
|
58
63
|
class_option :coffee,
|
59
64
|
type: :boolean,
|
60
65
|
default: false,
|
@@ -89,9 +94,38 @@ module React
|
|
89
94
|
}
|
90
95
|
}
|
91
96
|
|
97
|
+
TYPESCRIPT_TYPES = {
|
98
|
+
'node' => 'React.ReactNode',
|
99
|
+
'bool' => 'boolean',
|
100
|
+
'boolean' => 'boolean',
|
101
|
+
'string' => 'string',
|
102
|
+
'number' => 'number',
|
103
|
+
'object' => 'object',
|
104
|
+
'array' => 'Array<any>',
|
105
|
+
'shape' => 'object',
|
106
|
+
'element' => 'object',
|
107
|
+
'func' => 'object',
|
108
|
+
'function' => 'object',
|
109
|
+
'any' => 'any',
|
110
|
+
|
111
|
+
'instanceOf' => ->(type) {
|
112
|
+
type.to_s.camelize
|
113
|
+
},
|
114
|
+
|
115
|
+
'oneOf' => ->(*opts) {
|
116
|
+
opts.map{ |k| "'#{k.to_s}'" }.join(" | ")
|
117
|
+
},
|
118
|
+
|
119
|
+
'oneOfType' => ->(*opts) {
|
120
|
+
opts.map{ |k| "#{ts_lookup(k.to_s, k.to_s)}" }.join(" | ")
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
92
124
|
def create_component_file
|
93
125
|
template_extension = if options[:coffee]
|
94
126
|
'js.jsx.coffee'
|
127
|
+
elsif options[:ts]
|
128
|
+
'js.jsx.tsx'
|
95
129
|
elsif options[:es6] || webpacker?
|
96
130
|
'es6.jsx'
|
97
131
|
else
|
@@ -101,7 +135,13 @@ module React
|
|
101
135
|
# Prefer webpacker to sprockets:
|
102
136
|
if webpacker?
|
103
137
|
new_file_name = file_name.camelize
|
104
|
-
extension = options[:coffee]
|
138
|
+
extension = if options[:coffee]
|
139
|
+
'coffee'
|
140
|
+
elsif options[:ts]
|
141
|
+
'tsx'
|
142
|
+
else
|
143
|
+
'js'
|
144
|
+
end
|
105
145
|
target_dir = webpack_configuration.source_path
|
106
146
|
.join('components')
|
107
147
|
.relative_path_from(::Rails.root)
|
@@ -128,6 +168,7 @@ module React
|
|
128
168
|
|
129
169
|
def file_header
|
130
170
|
if webpacker?
|
171
|
+
return %|import * as React from "react"\n| if options[:ts]
|
131
172
|
%|import React from "react"\nimport PropTypes from "prop-types"\n|
|
132
173
|
else
|
133
174
|
''
|
@@ -146,23 +187,58 @@ module React
|
|
146
187
|
defined?(Webpacker)
|
147
188
|
end
|
148
189
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
190
|
+
def parse_attributes!
|
191
|
+
self.attributes = (attributes || []).map do |attr|
|
192
|
+
name = ''
|
193
|
+
type = ''
|
194
|
+
args = ''
|
195
|
+
args_regex = /(?<args>{.*})/
|
196
|
+
|
197
|
+
name, type = attr.split(':')
|
198
|
+
|
199
|
+
if matchdata = args_regex.match(type)
|
200
|
+
args = matchdata[:args]
|
201
|
+
type = type.gsub(args_regex, '')
|
202
|
+
end
|
203
|
+
|
204
|
+
if options[:ts]
|
205
|
+
{ :name => name, :type => ts_lookup(name, type, args), :union => union?(args) }
|
206
|
+
else
|
207
|
+
{ :name => name, :type => lookup(type, args) }
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
def union?(args = '')
|
213
|
+
return args.to_s.gsub(/[{}]/, '').split(',').count > 1
|
214
|
+
end
|
155
215
|
|
156
|
-
|
216
|
+
def self.ts_lookup(name, type = 'node', args = '')
|
217
|
+
ts_type = TYPESCRIPT_TYPES[type]
|
218
|
+
if ts_type.blank?
|
219
|
+
if type =~ /^[[:upper:]]/
|
220
|
+
ts_type = TYPESCRIPT_TYPES['instanceOf']
|
221
|
+
else
|
222
|
+
ts_type = TYPESCRIPT_TYPES['node']
|
223
|
+
end
|
224
|
+
end
|
157
225
|
|
158
|
-
|
159
|
-
options = matchdata[:options]
|
160
|
-
type = type.gsub(options_regex, '')
|
161
|
-
end
|
226
|
+
args = args.to_s.gsub(/[{}]/, '').split(',')
|
162
227
|
|
163
|
-
|
164
|
-
|
165
|
-
|
228
|
+
if ts_type.respond_to? :call
|
229
|
+
if args.blank?
|
230
|
+
return ts_type.call(type)
|
231
|
+
end
|
232
|
+
|
233
|
+
ts_type = ts_type.call(*args)
|
234
|
+
end
|
235
|
+
|
236
|
+
ts_type
|
237
|
+
end
|
238
|
+
|
239
|
+
def ts_lookup(name, type = 'node', args = '')
|
240
|
+
self.class.ts_lookup(name, type, args)
|
241
|
+
end
|
166
242
|
|
167
243
|
def self.lookup(type = 'node', options = '')
|
168
244
|
react_prop_type = REACT_PROP_TYPES[type]
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<%= file_header %>
|
2
|
+
<% unions = attributes.select{ |a| a[:union] } -%>
|
3
|
+
<% if unions.size > 0 -%>
|
4
|
+
<% unions.each do |e| -%>
|
5
|
+
type <%= e[:name].titleize %> = <%= e[:type]%>
|
6
|
+
<% end -%>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
interface I<%= component_name %>Props {
|
10
|
+
<% if attributes.size > 0 -%>
|
11
|
+
<% attributes.each do | attribute | -%>
|
12
|
+
<% if attribute[:union] -%>
|
13
|
+
<%= attribute[:name].camelize(:lower) %>: <%= attribute[:name].titleize %>;
|
14
|
+
<% else -%>
|
15
|
+
<%= attribute[:name].camelize(:lower) %>: <%= attribute[:type] %>;
|
16
|
+
<% end -%>
|
17
|
+
<% end -%>
|
18
|
+
<% end -%>
|
19
|
+
}
|
20
|
+
|
21
|
+
interface I<%= component_name %>State {
|
22
|
+
}
|
23
|
+
|
24
|
+
class <%= component_name %> extends React.Component <I<%= component_name %>Props, I<%= component_name %>State> {
|
25
|
+
render() {
|
26
|
+
return (
|
27
|
+
<React.Fragment>
|
28
|
+
<% attributes.each do |attribute| -%>
|
29
|
+
<%= attribute[:name].titleize %>: {this.props.<%= attribute[:name].camelize(:lower) %>}
|
30
|
+
<% end -%>
|
31
|
+
</React.Fragment>
|
32
|
+
);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
<%= file_footer %>
|
@@ -23,7 +23,7 @@ module React
|
|
23
23
|
# @return [Symbol] based on the environment, return a method name to call with the sprockets environment
|
24
24
|
def detect_strategy
|
25
25
|
sprockets_version = Gem::Version.new(Sprockets::VERSION)
|
26
|
-
if sprockets_version >= Gem::Version.new('4.
|
26
|
+
if sprockets_version >= Gem::Version.new('4.a')
|
27
27
|
:register_processors
|
28
28
|
elsif sprockets_version >= Gem::Version.new('3.0.0')
|
29
29
|
:register_engine_with_mime_type
|
@@ -11,6 +11,10 @@ module React
|
|
11
11
|
attr_accessor :output_buffer
|
12
12
|
mattr_accessor :camelize_props_switch
|
13
13
|
|
14
|
+
def initialize
|
15
|
+
@cache_ids = []
|
16
|
+
end
|
17
|
+
|
14
18
|
# {ControllerLifecycle} calls these hooks
|
15
19
|
# You can use them in custom helper implementations
|
16
20
|
def setup(controller)
|
@@ -40,6 +44,9 @@ module React
|
|
40
44
|
data[:react_class] = name
|
41
45
|
data[:react_props] = (props.is_a?(String) ? props : props.to_json)
|
42
46
|
data[:hydrate] = 't' if prerender_options
|
47
|
+
|
48
|
+
num_components = @cache_ids.count { |c| c.start_with? name }
|
49
|
+
data[:react_cache_id] = "#{name}-#{num_components}"
|
43
50
|
end
|
44
51
|
end
|
45
52
|
html_tag = html_options[:tag] || :div
|
@@ -58,7 +58,7 @@ module React
|
|
58
58
|
|
59
59
|
ActiveSupport.on_load(:action_view) do
|
60
60
|
include ::React::Rails::ViewHelper
|
61
|
-
ActionDispatch::IntegrationTest.send(:include, React::Rails::TestHelper)
|
61
|
+
ActionDispatch::IntegrationTest.send(:include, React::Rails::TestHelper) if ::Rails.env.test?
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul O’Shannessy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-12-31 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: appraisal
|
@@ -31,20 +31,14 @@ dependencies:
|
|
31
31
|
name: bundler
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - "
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 1.2.2
|
37
|
-
- - "<"
|
34
|
+
- - "~>"
|
38
35
|
- !ruby/object:Gem::Version
|
39
36
|
version: '2.0'
|
40
37
|
type: :development
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
|
-
- - "
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 1.2.2
|
47
|
-
- - "<"
|
41
|
+
- - "~>"
|
48
42
|
- !ruby/object:Gem::Version
|
49
43
|
version: '2.0'
|
50
44
|
- !ruby/object:Gem::Dependency
|
@@ -146,7 +140,7 @@ dependencies:
|
|
146
140
|
- !ruby/object:Gem::Version
|
147
141
|
version: 3.0.0
|
148
142
|
- !ruby/object:Gem::Dependency
|
149
|
-
name:
|
143
|
+
name: webdrivers
|
150
144
|
requirement: !ruby/object:Gem::Requirement
|
151
145
|
requirements:
|
152
146
|
- - ">="
|
@@ -215,6 +209,20 @@ dependencies:
|
|
215
209
|
- - ">="
|
216
210
|
- !ruby/object:Gem::Version
|
217
211
|
version: '3.2'
|
212
|
+
- !ruby/object:Gem::Dependency
|
213
|
+
name: pry-byebug
|
214
|
+
requirement: !ruby/object:Gem::Requirement
|
215
|
+
requirements:
|
216
|
+
- - ">="
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: '0'
|
219
|
+
type: :development
|
220
|
+
prerelease: false
|
221
|
+
version_requirements: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ">="
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
218
226
|
- !ruby/object:Gem::Dependency
|
219
227
|
name: connection_pool
|
220
228
|
requirement: !ruby/object:Gem::Requirement
|
@@ -310,6 +318,7 @@ files:
|
|
310
318
|
- lib/generators/templates/component.es6.jsx
|
311
319
|
- lib/generators/templates/component.js.jsx
|
312
320
|
- lib/generators/templates/component.js.jsx.coffee
|
321
|
+
- lib/generators/templates/component.js.jsx.tsx
|
313
322
|
- lib/generators/templates/react_server_rendering.rb
|
314
323
|
- lib/generators/templates/server_rendering.js
|
315
324
|
- lib/generators/templates/server_rendering_pack.js
|
@@ -360,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
360
369
|
- !ruby/object:Gem::Version
|
361
370
|
version: '0'
|
362
371
|
requirements: []
|
363
|
-
rubygems_version: 3.
|
372
|
+
rubygems_version: 3.1.2
|
364
373
|
signing_key:
|
365
374
|
specification_version: 4
|
366
375
|
summary: React integration for Ruby on Rails
|