51 | }
52 | });
53 |
54 |
55 |
56 | React.render(, document.body);
57 |
58 |
59 |
60 | function calcTotal(acc, d) { return acc + d.count; }
61 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "melbjs-feb-2015",
3 | "version": "1.0.0",
4 | "description": "melbjs demo app",
5 | "main": "index.js",
6 | "scripts": {
7 | "build-scripts": "node_modules/.bin/webpack -p --progress",
8 | "build-scripts-dev": "node_modules/.bin/webpack --progress",
9 | "watch": "node_modules/.bin/webpack --watch --progress",
10 | "start": "node index.js"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "github.com/orodio/melbjs-feb-2015"
15 | },
16 | "keywords": [
17 | "melbjs"
18 | ],
19 | "author": "orodio",
20 | "license": "ISC",
21 | "bugs": {
22 | "url": "https://github.com/orodio/melbjs-feb-2015/issues"
23 | },
24 | "homepage": "https://github.com/orodio/melbjs-feb-2015",
25 | "dependencies": {
26 | "body-parser": "^1.11.0",
27 | "compression": "^1.4.0",
28 | "dispy": "0.0.1",
29 | "express": "^4.11.2",
30 | "lodash": "^3.1.0",
31 | "morgan": "^1.5.1"
32 | },
33 | "devDependencies": {
34 | "6to5-core": "^3.5.3",
35 | "6to5-loader": "^3.0.0",
36 | "autoprefixer-loader": "^1.1.0",
37 | "css-loader": "^0.9.1",
38 | "nib": "^1.0.4",
39 | "oro-xhr": "^1.0.4",
40 | "react": "^0.12.2",
41 | "react-magic-move": "^0.1.0",
42 | "style-loader": "^0.8.3",
43 | "stylus": "^0.49.3",
44 | "stylus-loader": "^0.5.0",
45 | "webpack": "^1.5.3"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/dynamic/_actions/tacos.js:
--------------------------------------------------------------------------------
1 | import send from "dispy/send"
2 | import getTacos from "../_http/getTacos"
3 | import incTaco from "../_http/incTaco"
4 | import decTaco from "../_http/decTaco"
5 | import delTaco from "../_http/deleteTaco"
6 | import createTaco from "../_http/createTaco"
7 |
8 | import resetTacosCount from "../_http/resetTacosCount"
9 | import resetTacoCount from "../_http/resetTacoCount"
10 | import resetTacos from "../_http/resetTacos"
11 |
12 | function updateTacos(res) { send("TACOS_UPDATE", {tacos : JSON.parse(res.text)}); }
13 | function updateTaco(res) { send("TACO_UPDATE", {taco : JSON.parse(res.text)}); }
14 | function resetTacoForm() { send("TACOS_FORM_RESET"); }
15 |
16 |
17 |
18 | function poll() {
19 | getTacos()
20 | .then(updateTacos)
21 | }
22 |
23 | function create(title) {
24 | createTaco(title)
25 | .then(updateTaco)
26 | .then(resetTacoForm)
27 | }
28 |
29 | function del(id) {
30 | delTaco(id)
31 | .then(updateTacos)
32 | }
33 |
34 | function inc(id) {
35 | incTaco(id)
36 | .then(updateTaco)
37 | }
38 |
39 | function dec(id) {
40 | decTaco(id)
41 | .then(updateTaco)
42 | }
43 |
44 | function resetCount(id) {
45 | resetTacoCount(id)
46 | .then(updateTaco)
47 | }
48 |
49 | function resetCounts() {
50 | resetTacosCount()
51 | .then(updateTacos)
52 | }
53 |
54 | function resetAll() {
55 | resetTacos()
56 | .then(updateTacos)
57 | }
58 |
59 | export default {
60 | poll, inc, dec, del, create,
61 | resetCount, resetCounts, resetAll };
62 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | var express = require("express");
2 | var compression = require("compression");
3 | var morgan = require("morgan");
4 | var bodyParser = require("body-parser");
5 |
6 | var PORT = Number( process.env.PORT || 4000 );
7 | var app = express();
8 |
9 | var tacos = require("./lib/tacos");
10 |
11 | app.use(morgan("combined"));
12 | app.use(bodyParser.urlencoded({extended: false}));
13 | app.use(bodyParser.json());
14 | app.use(compression());
15 |
16 | function send(name) {
17 | return function(req, res) {
18 | res.sendFile(__dirname + "/static/" + name);
19 | };
20 | }
21 |
22 | app.get("/", send("index.html"));
23 | app.get("/app.js", send("app.js"));
24 |
25 | // get the tacos :: GET
26 | app.get("/api/v1/tacos", function(req, res) {
27 | console.log("GET TACOS")
28 | res.json(tacos.getAll());
29 | });
30 |
31 | // create a taco :: POST [title]
32 | app.post("/api/v1/tacos", function(req, res) {
33 | res.json(tacos.createTaco(req.body.title)); });
34 |
35 | // delete all the tacos :: DELETE
36 | app.delete("/api/v1/tacos", function(req, res) {
37 | res.json(tacos.resetTacos()); });
38 |
39 | // reset the tacos counts to 0 :: DELETE
40 | app.delete("/api/v1/tacos/count", function(req, res) {
41 | res.json(tacos.resetCounts()); });
42 |
43 | // inc a taco :: POST [id]
44 | app.post("/api/v1/taco/inc", function(req, res) {
45 | res.json(tacos.incTaco(req.body.id)); });
46 |
47 | // dec a taco :: POST [id]
48 | app.post("/api/v1/taco/dec", function(req, res) {
49 | res.json(tacos.decTaco(req.body.id)); });
50 |
51 | // delete a taco :: DELETE [id]
52 | app.delete("/api/v1/taco", function(req, res) {
53 | res.json(tacos.deleteTaco(req.body.id)); });
54 |
55 | // reset taco count :: DELETE [id]
56 | app.delete("/api/v1/taco/count", function(req, res) {
57 | res.json(tacos.resetCount(req.body.id)); });
58 |
59 |
60 | app.listen(PORT, console.log.bind(null, "PORT: " + PORT));
61 |
--------------------------------------------------------------------------------
/static/app.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(){return{tacos:m.getAll()}}function o(e,t){return e+t.count}var i=function(e){return e&&e.__esModule?e["default"]:e};n(238),n(127);var a=i(n(8)),s=i(n(72)),u=i(n(117)),c=i(n(113)),l=i(n(115)),p=i(n(116)),d=i(n(131)),f=i(n(132)),h=i(n(16)),m=i(n(126)),v=a.createClass({displayName:"App",mixins:[s(r,m)],componentDidMount:function(){h.poll()},render:function(){var e=this.state.tacos,t=f(e,o,0),n=d(e,function(e){return e}).reverse();return a.createElement("div",{className:"App"},a.createElement(u,{count:t}),a.createElement(c,null),a.createElement(l,{tacos:n}),a.createElement(p,{tacos:n,total:t}))}});a.render(a.createElement(v,null),document.body)},function(e){"use strict";function t(){}var n=e.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var r=[];if(t){var o=document.createElement("div"),i=new MutationObserver(function(){var e=r.slice();r.length=0,e.forEach(function(e){e()})});return i.observe(o,{attributes:!0}),function(e){r.length||o.setAttribute("yes","no"),r.push(e)}}return n?(window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=t,n.addListener=t,n.once=t,n.off=t,n.removeListener=t,n.removeAllListeners=t,n.emit=t,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,o,i,a,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,s,u],p=0;c=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return l[p++]}))}throw c.framesToPop=1,c}};e.exports=n}).call(t,n(1))},function(e){"use strict";function t(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;r1){for(var h=Array(f),m=0;f>m;m++)h[m]=arguments[m+2];c.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof c[o]&&(c[o]=v[o])}return new l(e,p,d,a.current,i.current,c)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceProps=function(e,n){var r=new l(e.type,e.key,e.ref,e._owner,e._context,n);return"production"!==t.env.NODE_ENV&&(r._store.validated=e._store.validated),r},l.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=l}).call(t,n(1))},function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(14),o=r;"production"!==t.env.NODE_ENV&&(o=function(e,t){for(var n=[],r=2,o=arguments.length;o>r;r++)n.push(arguments[r]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){var i=0;console.warn("Warning: "+t.replace(/%s/g,function(){return n[i++]}))}}),e.exports=o}).call(t,n(1))},function(e,t,n){"use strict";var r=n(28),o=r({bubbled:null,captured:null}),i=r({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){"use strict";e.exports=n(171)},function(e,t,n){(function(t){"use strict";function r(e){var t=e._owner||null;return t&&t.constructor&&t.constructor.displayName?" Check the render method of `"+t.constructor.displayName+"`.":""}function o(e,n,r){for(var o in n)n.hasOwnProperty(o)&&("production"!==t.env.NODE_ENV?T("function"==typeof n[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactCompositeComponent",C[r],o):T("function"==typeof n[o]))}function i(e,n){var r=U.hasOwnProperty(n)?U[n]:null;B.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?T(r===V.OVERRIDE_BASE,"ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",n):T(r===V.OVERRIDE_BASE)),e.hasOwnProperty(n)&&("production"!==t.env.NODE_ENV?T(r===V.DEFINE_MANY||r===V.DEFINE_MANY_MERGED,"ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n):T(r===V.DEFINE_MANY||r===V.DEFINE_MANY_MERGED))}function a(e){var n=e._compositeLifeCycleState;"production"!==t.env.NODE_ENV?T(e.isMounted()||n===F.MOUNTING,"replaceState(...): Can only update a mounted or mounting component."):T(e.isMounted()||n===F.MOUNTING),"production"!==t.env.NODE_ENV?T(null==h.current,"replaceState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."):T(null==h.current),"production"!==t.env.NODE_ENV?T(n!==F.UNMOUNTING,"replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component."):T(n!==F.UNMOUNTING)}function s(e,n){if(n){"production"!==t.env.NODE_ENV?T(!E.isValidFactory(n),"ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."):T(!E.isValidFactory(n)),"production"!==t.env.NODE_ENV?T(!m.isValidElement(n),"ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object."):T(!m.isValidElement(n));var r=e.prototype;n.hasOwnProperty(A)&&j.mixins(e,n.mixins);for(var o in n)if(n.hasOwnProperty(o)&&o!==A){var a=n[o];if(i(r,o),j.hasOwnProperty(o))j[o](e,a);else{var s=U.hasOwnProperty(o),u=r.hasOwnProperty(o),c=a&&a.__reactDontBind,d="function"==typeof a,f=d&&!s&&!u&&!c;if(f)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=a,r[o]=a;else if(u){var h=U[o];"production"!==t.env.NODE_ENV?T(s&&(h===V.DEFINE_MANY_MERGED||h===V.DEFINE_MANY),"ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.",h,o):T(s&&(h===V.DEFINE_MANY_MERGED||h===V.DEFINE_MANY)),h===V.DEFINE_MANY_MERGED?r[o]=l(r[o],a):h===V.DEFINE_MANY&&(r[o]=p(r[o],a))}else r[o]=a,"production"!==t.env.NODE_ENV&&"function"==typeof a&&n.displayName&&(r[o].displayName=n.displayName+"_"+o)}}}}function u(e,n){if(n)for(var r in n){var o=n[r];if(n.hasOwnProperty(r)){var i=r in j;"production"!==t.env.NODE_ENV?T(!i,'ReactCompositeComponent: 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):T(!i);var a=r in e;"production"!==t.env.NODE_ENV?T(!a,"ReactCompositeComponent: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):T(!a),e[r]=o}}}function c(e,n){return"production"!==t.env.NODE_ENV?T(e&&n&&"object"==typeof e&&"object"==typeof n,"mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"):T(e&&n&&"object"==typeof e&&"object"==typeof n),k(n,function(n,r){"production"!==t.env.NODE_ENV?T(void 0===e[r],"mergeObjectsWithNoDuplicateKeys(): 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):T(void 0===e[r]),e[r]=n}),e}function l(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);return null==n?r:null==r?n:c(n,r)}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}var d=n(26),f=n(57),h=n(21),m=n(4),v=n(58),y=n(40),g=n(187),E=n(33),_=n(87),b=n(12),N=n(191),D=n(89),C=n(88),w=n(13),x=n(3),O=n(43),T=n(2),M=n(28),R=n(15),I=n(44),k=n(102),P=n(69),S=n(6),A=R({mixins:null}),V=M({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),L=[],U={mixins:V.DEFINE_MANY,statics:V.DEFINE_MANY,propTypes:V.DEFINE_MANY,contextTypes:V.DEFINE_MANY,childContextTypes:V.DEFINE_MANY,getDefaultProps:V.DEFINE_MANY_MERGED,getInitialState:V.DEFINE_MANY_MERGED,getChildContext:V.DEFINE_MANY_MERGED,render:V.DEFINE_ONCE,componentWillMount:V.DEFINE_MANY,componentDidMount:V.DEFINE_MANY,componentWillReceiveProps:V.DEFINE_MANY,shouldComponentUpdate:V.DEFINE_ONCE,componentWillUpdate:V.DEFINE_MANY,componentDidUpdate:V.DEFINE_MANY,componentWillUnmount:V.DEFINE_MANY,updateComponent:V.OVERRIDE_BASE},j={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;ns;s++)a.push(arguments[s]);if(t!==n&&null!==t)I("react_bind_warning",{component:o}),console.warn("bind(): React component methods may only be bound to the component instance. See "+o);else if(!a.length)return I("react_bind_warning",{component:o}),console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See "+o),r;var c=i.apply(r,arguments);return c.__reactBoundContext=n,c.__reactBoundMethod=e,c.__reactBoundArguments=a,c}}return r}},H=function(){};x(H.prototype,d.Mixin,_.Mixin,N.Mixin,B);var W={LifeCycle:F,Base:H,createClass:function(e){var n=function(){};n.prototype=new H,n.prototype.constructor=n,L.forEach(s.bind(null,n)),s(n,e),n.getDefaultProps&&(n.defaultProps=n.getDefaultProps()),"production"!==t.env.NODE_ENV?T(n.prototype.render,"createClass(...): Class specification must implement a `render` method."):T(n.prototype.render),"production"!==t.env.NODE_ENV&&n.prototype.componentShouldUpdate&&(I("react_component_should_update_warning",{component:e.displayName}),console.warn((e.displayName||"A component")+" has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value."));for(var r in U)n.prototype[r]||(n.prototype[r]=null);return E.wrapFactory("production"!==t.env.NODE_ENV?v.createFactory(n):m.createFactory(n))},injection:{injectMixin:function(e){L.push(e)}}};e.exports=W}).call(t,n(1))},function(e,t,n){(function(t){"use strict";function r(e){var t=b(e);return t&&L.getID(t)}function o(e){var n=i(e);if(n)if(M.hasOwnProperty(n)){var r=M[n];r!==e&&("production"!==t.env.NODE_ENV?D(!u(r,n),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",T,n):D(!u(r,n)),M[n]=e)}else M[n]=e;return n}function i(e){return e&&e.getAttribute&&e.getAttribute(T)||""}function a(e,t){var n=i(e);n!==t&&delete M[n],e.setAttribute(T,t),M[t]=e}function s(e){return M.hasOwnProperty(e)&&u(M[e],e)||(M[e]=L.findReactNodeByID(e)),M[e]}function u(e,n){if(e){"production"!==t.env.NODE_ENV?D(i(e)===n,"ReactMount: Unexpected modification of `%s`",T):D(i(e)===n);var r=L.findReactContainerForID(n);if(r&&E(r,e))return!0}return!1}function c(e){delete M[e]}function l(e){var t=M[e];return t&&u(t,e)?void(V=t):!1}function p(e){V=null,y.traverseAncestors(e,l);var t=V;return V=null,t}var d=n(20),f=n(25),h=n(21),m=n(4),v=n(33),y=n(27),g=n(12),E=n(95),_=n(61),b=n(99),N=n(43),D=n(2),C=n(69),w=n(6),x=v.wrapCreateElement(m.createElement),O=y.SEPARATOR,T=d.ID_ATTRIBUTE_NAME,M={},R=1,I=9,k={},P={};if("production"!==t.env.NODE_ENV)var S={};var A=[],V=null,L={_instancesByReactRootID:k,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,n,o,i){var a=n.props;return L.scrollMonitor(o,function(){e.replaceProps(a,i)}),"production"!==t.env.NODE_ENV&&(S[r(o)]=b(o)),e},_registerComponent:function(e,n){"production"!==t.env.NODE_ENV?D(n&&(n.nodeType===R||n.nodeType===I),"_registerComponent(...): Target container is not a DOM element."):D(n&&(n.nodeType===R||n.nodeType===I)),f.ensureScrollValueMonitoring();var r=L.registerContainer(n);return k[r]=e,r},_renderNewRootComponent:g.measure("ReactMount","_renderNewRootComponent",function(e,n,r){"production"!==t.env.NODE_ENV?w(null==h.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var o=N(e,null),i=L._registerComponent(o,n);return o.mountComponentIntoNode(i,n,r),"production"!==t.env.NODE_ENV&&(S[i]=b(n)),o}),render:function(e,n,o){"production"!==t.env.NODE_ENV?D(m.isValidElement(e),"renderComponent(): Invalid component element.%s","string"==typeof e?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":v.isValidFactory(e)?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"undefined"!=typeof e.props?" This may be caused by unintentionally loading two independent copies of React.":""):D(m.isValidElement(e));var i=k[r(n)];if(i){var a=i._currentElement;if(C(a,e))return L._updateRootComponent(i,e,n,o);L.unmountComponentAtNode(n)}var s=b(n),u=s&&L.isRenderedByReact(s),c=u&&!i,l=L._renderNewRootComponent(e,n,c);return o&&o.call(l),l},constructAndRenderComponent:function(e,t,n){var r=x(e,t);return L.render(r,n)},constructAndRenderComponentByID:function(e,n,r){var o=document.getElementById(r);return"production"!==t.env.NODE_ENV?D(o,'Tried to get element with id of "%s" but it is not present on the page.',r):D(o),L.constructAndRenderComponent(e,n,o)},registerContainer:function(e){var t=r(e);return t&&(t=y.getReactRootIDFromNodeID(t)),t||(t=y.createReactRootID()),P[t]=e,t},unmountComponentAtNode:function(e){"production"!==t.env.NODE_ENV?w(null==h.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var n=r(e),o=k[n];return o?(L.unmountComponentFromNode(o,e),delete k[n],delete P[n],"production"!==t.env.NODE_ENV&&delete S[n],!0):!1},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===I&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var n=y.getReactRootIDFromNodeID(e),r=P[n];if("production"!==t.env.NODE_ENV){var o=S[n];if(o&&o.parentNode!==r){"production"!==t.env.NODE_ENV?D(i(o)===n,"ReactMount: Root element ID differed from reactRootID."):D(i(o)===n);var a=r.firstChild;a&&n===i(a)?S[n]=a:console.warn("ReactMount: Root element has been removed from its original container. New container:",o.parentNode)}}return r},findReactNodeByID:function(e){var t=L.findReactContainerForID(e);return L.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=L.getID(e);return t?t.charAt(0)===O:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(L.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,n){var r=A,o=0,i=p(n)||e;for(r[0]=i.firstChild,r.length=1;o when using tables, nesting tags like