"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
var _exportNames = {
  Root: true,
  DispatcherButton: true,
  ExportButton: true,
  ImportButton: true,
  PrintButton: true,
  SliderButton: true,
  Header: true,
  MonitorSelector: true,
  Settings: true,
  TopButtons: true,
  DevTools: true,
  Dispatcher: true,
  SliderMonitor: true
};
Object.defineProperty(exports, "DevTools", {
  enumerable: true,
  get: function () {
    return _DevTools.default;
  }
});
Object.defineProperty(exports, "Dispatcher", {
  enumerable: true,
  get: function () {
    return _Dispatcher.default;
  }
});
Object.defineProperty(exports, "DispatcherButton", {
  enumerable: true,
  get: function () {
    return _DispatcherButton.default;
  }
});
Object.defineProperty(exports, "ExportButton", {
  enumerable: true,
  get: function () {
    return _ExportButton.default;
  }
});
Object.defineProperty(exports, "Header", {
  enumerable: true,
  get: function () {
    return _Header.default;
  }
});
Object.defineProperty(exports, "ImportButton", {
  enumerable: true,
  get: function () {
    return _ImportButton.default;
  }
});
Object.defineProperty(exports, "MonitorSelector", {
  enumerable: true,
  get: function () {
    return _MonitorSelector.default;
  }
});
Object.defineProperty(exports, "PrintButton", {
  enumerable: true,
  get: function () {
    return _PrintButton.default;
  }
});
exports.Root = void 0;
Object.defineProperty(exports, "Settings", {
  enumerable: true,
  get: function () {
    return _Settings.default;
  }
});
Object.defineProperty(exports, "SliderButton", {
  enumerable: true,
  get: function () {
    return _SliderButton.default;
  }
});
Object.defineProperty(exports, "SliderMonitor", {
  enumerable: true,
  get: function () {
    return _Slider.default;
  }
});
Object.defineProperty(exports, "TopButtons", {
  enumerable: true,
  get: function () {
    return _TopButtons.default;
  }
});
var _react = _interopRequireWildcard(require("react"));
var _reactRedux = require("react-redux");
var _react2 = require("redux-persist/integration/react");
var _configureStore = _interopRequireDefault(require("./store/configureStore"));
var _socketActionTypes = require("./constants/socketActionTypes");
Object.keys(_socketActionTypes).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _socketActionTypes[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _socketActionTypes[key];
    }
  });
});
var _App = _interopRequireDefault(require("./containers/App"));
var _actions = require("./actions");
Object.keys(_actions).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _actions[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _actions[key];
    }
  });
});
var _DispatcherButton = _interopRequireDefault(require("./components/buttons/DispatcherButton"));
var _ExportButton = _interopRequireDefault(require("./components/buttons/ExportButton"));
var _ImportButton = _interopRequireDefault(require("./components/buttons/ImportButton"));
var _PrintButton = _interopRequireDefault(require("./components/buttons/PrintButton"));
var _SliderButton = _interopRequireDefault(require("./components/buttons/SliderButton"));
var _Header = _interopRequireDefault(require("./components/Header"));
var _MonitorSelector = _interopRequireDefault(require("./components/MonitorSelector"));
var _Settings = _interopRequireDefault(require("./components/Settings"));
var _TopButtons = _interopRequireDefault(require("./components/TopButtons"));
var _DevTools = _interopRequireDefault(require("./containers/DevTools"));
var _Dispatcher = _interopRequireDefault(require("./containers/monitors/Dispatcher"));
var _Slider = _interopRequireDefault(require("./containers/monitors/Slider"));
var _actionTypes = require("./constants/actionTypes");
Object.keys(_actionTypes).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _actionTypes[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _actionTypes[key];
    }
  });
});
var _api = require("./middlewares/api");
Object.keys(_api).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _api[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _api[key];
    }
  });
});
var _exportState = require("./middlewares/exportState");
Object.keys(_exportState).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _exportState[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _exportState[key];
    }
  });
});
var _reducers = require("./reducers");
Object.keys(_reducers).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _reducers[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _reducers[key];
    }
  });
});
var _connection = require("./reducers/connection");
Object.keys(_connection).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _connection[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _connection[key];
    }
  });
});
var _instances = require("./reducers/instances");
Object.keys(_instances).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _instances[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _instances[key];
    }
  });
});
var _monitor = require("./reducers/monitor");
Object.keys(_monitor).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _monitor[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _monitor[key];
    }
  });
});
var _notification = require("./reducers/notification");
Object.keys(_notification).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _notification[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _notification[key];
    }
  });
});
var _reports = require("./reducers/reports");
Object.keys(_reports).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _reports[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _reports[key];
    }
  });
});
var _section = require("./reducers/section");
Object.keys(_section).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _section[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _section[key];
    }
  });
});
var _socket = require("./reducers/socket");
Object.keys(_socket).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _socket[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _socket[key];
    }
  });
});
var _theme = require("./reducers/theme");
Object.keys(_theme).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _theme[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _theme[key];
    }
  });
});
var _stateTreeSettings = require("./reducers/stateTreeSettings");
Object.keys(_stateTreeSettings).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _stateTreeSettings[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _stateTreeSettings[key];
    }
  });
});
var _monitorActions = require("./utils/monitorActions");
Object.keys(_monitorActions).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _monitorActions[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _monitorActions[key];
    }
  });
});
var _stringifyJSON = require("./utils/stringifyJSON");
Object.keys(_stringifyJSON).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
  if (key in exports && exports[key] === _stringifyJSON[key]) return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function () {
      return _stringifyJSON[key];
    }
  });
});
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
class Root extends _react.Component {
  UNSAFE_componentWillMount() {
    const {
      store,
      persistor
    } = (0, _configureStore.default)(store => {
      if (store.getState().connection.type !== 'disabled') {
        store.dispatch({
          type: _socketActionTypes.CONNECT_REQUEST
        });
      }
    });
    this.store = store;
    this.persistor = persistor;
  }
  render() {
    if (!this.store) return null;
    return /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
      store: this.store
    }, /*#__PURE__*/_react.default.createElement(_react2.PersistGate, {
      loading: null,
      persistor: this.persistor
    }, /*#__PURE__*/_react.default.createElement(_App.default, null)));
  }
}
exports.Root = Root;