'use strict'; // React stuff

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.loadPackage = loadPackage;
exports.bootstrap = bootstrap;
exports.TreeItemHelpers = exports.Reselect = exports.ReactRedux = exports.ReduxThunk = exports.Redux = exports.playMessage = exports.scrollToTop = exports.showNotification = exports.showConfirmation = exports.showAlert = exports.showPopup = exports.ValidationUtils = exports.readCookie = exports.writeCookie = exports.FocusHelper = exports.scrollToNode = exports.filterKeyCodes = exports.wait = exports.cleanFormState = exports.extendFormState = exports.fillBrandName = exports.OS = exports.isSafeStringValue = exports.isAutomationTestActive = exports.mountComponent = exports.isReactElement = exports.isReactComponent = exports.setDocumentTitle = exports.getSilentRouterHistory = exports.TreeStore = exports.ColumnsStore = exports.TinyEmitter = exports.classnames = exports.moment = exports._ = exports.validator = exports.formatMessage = exports.md5 = exports.History = exports.ReactRouterBootstrap = exports.ReactRouter = exports.ReactDOM = void 0;

var _react = _interopRequireDefault(require("react"));

exports.React = _react.default;

var _propTypes = _interopRequireDefault(require("prop-types"));

exports.PropTypes = _propTypes.default;

var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"));

exports.ReactUpdate = _immutabilityHelper.default;

var _Redux = _interopRequireWildcard(require("redux"));

exports.Redux = _Redux;

var _ReduxThunk = _interopRequireWildcard(require("redux-thunk"));

exports.ReduxThunk = _ReduxThunk;

var _ReactRedux = _interopRequireWildcard(require("react-redux"));

exports.ReactRedux = _ReactRedux;

var _Reselect = _interopRequireWildcard(require("reselect"));

exports.Reselect = _Reselect;

var _functions = require("./ui/functions");

exports.localize = _functions.localize;
exports.showPopup = _functions.showPopup;
exports.showAlert = _functions.showAlert;
exports.showConfirmation = _functions.showConfirmation;
exports.showNotification = _functions.showNotification;
exports.scrollToTop = _functions.scrollToTop;
exports.playMessage = _functions.playMessage;

var _Popup = require("./ui/popups/Popup");

exports.Popup = _Popup.Popup;

var _Notification = require("./ui/Notification");

exports.Notification = _Notification.Notification;

var _Filter = require("./ui/Filter");

exports.Filter = _Filter.Filter;

var _Menu = require("./ui/Menu");

exports.Menu = _Menu.Menu;

var _MenuItem = require("./ui/MenuItem");

exports.MenuItem = _MenuItem.MenuItem;

var _TabPanel = require("./ui/TabPanel");

exports.TabPanel = _TabPanel.TabPanel;

var _TabPanelOverflowContainer = require("./ui/TabPanelOverflowContainer");

exports.TabPanelOverflowContainer = _TabPanelOverflowContainer.TabPanelOverflowContainer;

var _TabItem = require("./ui/TabItem");

exports.TabItem = _TabItem.TabItem;

var _Button = require("./ui/Button");

exports.Button = _Button.Button;

var _Spinner = require("./ui/Spinner/Spinner");

exports.Spinner = _Spinner.Spinner;

var _Loader = require("./ui/Loader");

exports.Loader = _Loader.Loader;

var _GlobalLoader = require("./ui/GlobalLoader");

exports.GlobalLoader = _GlobalLoader.GlobalLoader;

var _SplitButton = require("./ui/SplitButton");

exports.SplitButton = _SplitButton.SplitButton;

var _CTAContainer = require("./ui/CTAContainer");

exports.CTAContainer = _CTAContainer.CTAContainer;

var _CTAControl = require("./ui/CTAControl");

exports.CTAControl = _CTAControl.CTAControl;

var _Form = require("./ui/form/Form");

exports.Form = _Form.Form;

var _TextInput = require("./ui/form/TextInput");

exports.TextInput = _TextInput.TextInput;

var _TextArea = require("./ui/form/TextArea");

exports.TextArea = _TextArea.TextArea;

var _PureCheckbox = require("./ui/form/PureCheckbox");

exports.PureCheckbox = _PureCheckbox.PureCheckbox;

var _Checkbox = require("./ui/form/Checkbox");

exports.Checkbox = _Checkbox.Checkbox;

var _CheckboxGroup = require("./ui/form/CheckboxGroup");

exports.CheckboxGroup = _CheckboxGroup.CheckboxGroup;

var _Radio = require("./ui/form/Radio");

exports.Radio = _Radio.Radio;

var _Select = require("./ui/form/Select");

exports.Select = _Select.Select;

var _FormGroup = require("./ui/form/FormGroup");

exports.FormGroup = _FormGroup.FormGroup;
exports.Input = _FormGroup.FormGroup;

var _FormControl = require("./ui/form/FormControl");

exports.FormControl = _FormControl.FormControl;
exports.FormInput = _FormControl.FormControl;

var _FormErrorAutoFocusContainer = require("./ui/form/FormErrorAutoFocusContainer");

exports.FormErrorAutoFocusContainer = _FormErrorAutoFocusContainer.FormErrorAutoFocusContainer;

var _TextInputControl = require("./ui/form/TextInputControl");

exports.TextInputControl = _TextInputControl.TextInputControl;

var _TextAreaControl = require("./ui/form/TextAreaControl");

exports.TextAreaControl = _TextAreaControl.TextAreaControl;

var _CheckboxControl = require("./ui/form/CheckboxControl");

exports.CheckboxControl = _CheckboxControl.CheckboxControl;

var _RadioControl = require("./ui/form/RadioControl");

exports.RadioControl = _RadioControl.RadioControl;

var _SelectControl = require("./ui/form/SelectControl");

exports.SelectControl = _SelectControl.SelectControl;

var _MultiSelect = require("./ui/form/MultiSelect");

exports.MultiSelect = _MultiSelect.MultiSelect;

var _TreeFilterControl = require("./ui/form/TreeFilterControl");

exports.TreeFilterControl = _TreeFilterControl.TreeFilterControl;

var _InputCounter = require("./ui/form/InputCounter");

exports.InputCounter = _InputCounter.InputCounter;

var _Autosuggest = require("./ui/form/Autosuggest");

exports.Autosuggest = _Autosuggest.Autosuggest;

var _AutosuggestControl = require("./ui/form/AutosuggestControl");

exports.AutosuggestControl = _AutosuggestControl.AutosuggestControl;

var _Translate = require("./ui/Translate");

exports.Translate = _Translate.Translate;

var _DangerousHTML = require("./ui/DangerousHTML");

exports.DangerousHTML = _DangerousHTML.DangerousHTML;

var _ListControlCheckbox = require("./ui/list/withStore/ListControlCheckbox");

exports.ListControlCheckbox = _ListControlCheckbox.ListControlCheckbox;

var _ListHighlight = require("./ui/list/withStore/ListHighlight");

exports.ListHighlight = _ListHighlight.ListHighlight;

var _ListSorter = require("./ui/list/withStore/ListSorter");

exports.ListSorter = _ListSorter.ListSorter;

var _ListRow = require("./ui/list/ListRow");

exports.ListRow = _ListRow.ListRow;

var _GridSorter = require("./ui/list/withStore/GridSorter");

exports.GridSorter = _GridSorter.GridSorter;

var _GridHeaderCell = require("./ui/list/withStore/GridHeaderCell");

exports.GridHeaderCell = _GridHeaderCell.GridHeaderCell;

var _GridCell = require("./ui/list/withStore/GridCell");

exports.GridCell = _GridCell.GridCell;

var _GridRowActions = require("./ui/GridRowActions");

exports.GridRowActions = _GridRowActions.GridRowActions;

var _CollapsibleList = require("./ui/CollapsibleList");

exports.CollapsibleList = _CollapsibleList.CollapsibleList;

var _CollapsibleToolbar = require("./ui/CollapsibleToolbar");

exports.CollapsibleToolbar = _CollapsibleToolbar.CollapsibleToolbar;

var _Icon = require("./ui/Icon");

exports.Icon = _Icon.Icon;

var _HeaderIcon = require("./ui/HeaderIcon");

exports.HeaderIcon = _HeaderIcon.HeaderIcon;

var _Panel = require("./ui/Panel");

exports.Panel = _Panel.Panel;

var _Block = require("./ui/Block");

exports.Block = _Block.Block;

var _Dropdown = require("./ui/Dropdown");

exports.Dropdown = _Dropdown.Dropdown;

var _DropdownButton = require("./ui/DropdownButton");

exports.DropdownButton = _DropdownButton.DropdownButton;

var _Row = require("./ui/Row");

exports.Row = _Row.Row;

var _Col = require("./ui/Col");

exports.Col = _Col.Col;

var _Message = require("./ui/Message");

exports.Message = _Message.Message;

var _Wizard = require("./ui/Wizard");

exports.Wizard = _Wizard.Wizard;

var _Tooltip = require("./ui/Tooltip");

exports.Tooltip = _Tooltip.Tooltip;

var _BorderedList = require("./ui/BorderedList");

exports.BorderedList = _BorderedList.BorderedList;
exports.BorderedListItem = _BorderedList.BorderedListItem;

var _BrandedImage = require("./ui/BrandedImage");

exports.BrandedImage = _BrandedImage.BrandedImage;

var _MoreButton = require("./ui/MoreButton");

exports.MoreButton = _MoreButton.MoreButton;

var _Pagination = require("./ui/list/withStore/Pagination");

exports.Pagination = _Pagination.Pagination;

var _HeaderToolbar = require("./ui/HeaderToolbar");

exports.HeaderToolbar = _HeaderToolbar.HeaderToolbar;

var _Highlighter = require("./ui/Highlighter");

exports.Highlighter = _Highlighter.Highlighter;

var _Note = require("./ui/Note");

exports.Note = _Note.Note;

var _StoreCounterText = require("./ui/list/withStore/StoreCounterText");

exports.StoreCounterText = _StoreCounterText.StoreCounterText;

var _SelectedRecordsSwitcher = require("./ui/SelectedRecordsSwitcher");

exports.SelectedRecordsSwitcher = _SelectedRecordsSwitcher.SelectedRecordsSwitcher;

var _List = require("./ui/list/withStore/List");

exports.List = _List.List;

var _ListLayout = require("./ui/list/withStore/ListLayout");

exports.ListLayout = _ListLayout.ListLayout;

var _WizardStep = require("./ui/WizardStep");

exports.WizardStep = _WizardStep.WizardStep;

var _Alert = require("./ui/popups/Alert");

exports.Alert = _Alert.Alert;

var _Confirm = require("./ui/popups/Confirm");

exports.Confirm = _Confirm.Confirm;

var _DismissibleAlert = require("./ui/DismissibleAlert");

exports.DismissibleAlert = _DismissibleAlert.DismissibleAlert;

var _TiledGrid = require("./ui/TiledGrid");

exports.TiledGrid = _TiledGrid.TiledGrid;

var _Banner = require("./ui/Banner");

exports.Banner = _Banner.Banner;

var _AudioPlayer = require("./ui/media/AudioPlayer");

exports.AudioPlayer = _AudioPlayer.AudioPlayer;

var _AudioRecorder = require("./ui/media/AudioRecorder");

exports.AudioRecorder = _AudioRecorder.AudioRecorder;

var _Static = require("./ui/form/Static");

exports.Static = _Static.Static;

var _Toggle = require("./ui/form/Toggle");

exports.Toggle = _Toggle.Toggle;

var _ToggleControl = require("./ui/form/ToggleControl");

exports.ToggleControl = _ToggleControl.ToggleControl;

var _FileUploadControl = require("./ui/form/FileUploadControl");

exports.FileUploadControl = _FileUploadControl.FileUploadControl;

var _FileUpload = require("./ui/form/FileUpload");

exports.FileUpload = _FileUpload.FileUpload;

var _PrintArea = require("./ui/PrintArea");

exports.PrintArea = _PrintArea.PrintArea;

var _NoPrint = require("./ui/NoPrint");

exports.NoPrint = _NoPrint.NoPrint;

var _ColumnTreeView = require("./ui/ColumnTreeView");

exports.ColumnTreeView = _ColumnTreeView.ColumnTreeView;

var _BreadCrumbs = require("./ui/BreadCrumbs");

exports.BreadCrumbs = _BreadCrumbs.BreadCrumbs;

var _Dropzone = require("./ui/Dropzone");

exports.Dropzone = _Dropzone.Dropzone;

var _KeyDownable = require("./ui/KeyDownable");

exports.KeyDownable = _KeyDownable.KeyDownable;

var _NavDropdown = require("./ui/NavDropdown");

exports.NavDropdown = _NavDropdown.NavDropdown;

var _flexBlock = require("./ui/flexBlock");

exports.FlexBlock = _flexBlock.FlexBlock;
exports.FlexBlockItem = _flexBlock.FlexBlockItem;

var _TestAutomationPanel = require("./ui/TestAutomationPanel/TestAutomationPanel");

exports.TestAutomationPanel = _TestAutomationPanel.TestAutomationPanel;

var _TreeList = require("./ui/list/TreeList");

exports.TreeList = _TreeList.TreeList;

var _SingleDatePickerInputControl = require("./ui/form/DateTimePicker/SingleDatePickerInputControl");

exports.DatePickerControl = _SingleDatePickerInputControl.SingleDatePickerInputControl;

var _SingleDatePicker = require("./ui/form/DateTimePicker/SingleDatePicker");

exports.DatePicker = _SingleDatePicker.SingleDatePicker;

var _DayRangePickerControl = require("./ui/form/DateTimePicker/DayRangePickerControl");

exports.DateRangePickerControl = _DayRangePickerControl.DayRangePickerControl;

var _DayRangePicker = require("./ui/form/DateTimePicker/DayRangePicker");

exports.DateRangePicker = _DayRangePicker.DayRangePicker;

var _accordion = require("./ui/accordion");

exports.Accordion = _accordion.Accordion;
exports.AccordionItem = _accordion.AccordionItem;

var _DateRangePickerWithPresets = require("./ui/form/DateRangePickerWithPresets");

exports.DateRangePickerWithPresets = _DateRangePickerWithPresets.DateRangePickerWithPresets;

var _index = require("./ui/catalog/index");

exports.CatalogItemIcon = _index.CatalogItemIcon;
exports.CatalogListItem = _index.CatalogListItem;
exports.CatalogGridItem = _index.CatalogGridItem;
exports.CatalogListDetails = _index.CatalogListDetails;
exports.CatalogGridDetails = _index.CatalogGridDetails;
exports.CatalogSearchResultItem = _index.CatalogSearchResultItem;

var _Search = require("./ui/Search");

exports.Search = _Search.Search;

var _PureList = require("./ui/list/PureList");

exports.PureList = _PureList.PureList;

var _PurePagination = require("./ui/list/PurePagination");

exports.PurePagination = _PurePagination.PurePagination;

var _CounterText = require("./ui/list/CounterText");

exports.CounterText = _CounterText.CounterText;

var _ListManager = require("./ui/list/ListManager");

exports.ListManager = _ListManager.ListManager;
exports.passedListManagerPropsTypes = _ListManager.passedListManagerPropsTypes;

var _PureListSorter = require("./ui/list/PureListSorter");

exports.PureListSorter = _PureListSorter.PureListSorter;

var _PureListHighlight = require("./ui/list/PureListHighlight");

exports.PureListHighlight = _PureListHighlight.PureListHighlight;

var _PureListLayout = require("./ui/list/PureListLayout");

exports.PureListLayout = _PureListLayout.PureListLayout;

var _PurePaginationWithCounter = require("./ui/list/PurePaginationWithCounter");

exports.PurePaginationWithCounter = _PurePaginationWithCounter.PurePaginationWithCounter;

var _Switcher = require("./ui/switcher/Switcher");

exports.Switcher = _Switcher.Switcher;

var _SwitcherItem = require("./ui/switcher/SwitcherItem");

exports.SwitcherItem = _SwitcherItem.SwitcherItem;

var _withSelectedIds = require("./ui/HOCs/withSelectedIds");

exports.withSelectedIds = _withSelectedIds.withSelectedIds;
exports.passedWithSelectedIdsPropsTypes = _withSelectedIds.passedWithSelectedIdsPropsTypes;

var _ExternalLink = require("./ui/ExternalLink");

exports.ExternalLink = _ExternalLink.ExternalLink;

var _ToolsMenu = require("./ui/ToolsMenu");

exports.ToolsMenu = _ToolsMenu.ToolsMenu;
exports.ToolsDropdown = _ToolsMenu.ToolsDropdown;

var _ButtonToolbar2 = _interopRequireDefault(require("react-bootstrap/lib/ButtonToolbar"));

exports.ButtonToolbar = _ButtonToolbar2.default;

var _ButtonGroup2 = _interopRequireDefault(require("react-bootstrap/lib/ButtonGroup"));

exports.ButtonGroup = _ButtonGroup2.default;

var _OverlayTrigger2 = _interopRequireDefault(require("react-bootstrap/lib/OverlayTrigger"));

exports.OverlayTrigger = _OverlayTrigger2.default;

var _Overlay2 = _interopRequireDefault(require("react-bootstrap/lib/Overlay"));

exports.Overlay = _Overlay2.default;

var _Popover2 = _interopRequireDefault(require("react-bootstrap/lib/Popover"));

exports.Popover = _Popover2.default;

var _Navbar2 = _interopRequireDefault(require("react-bootstrap/lib/Navbar"));

exports.Navbar = _Navbar2.default;

var _NavItem2 = _interopRequireDefault(require("react-bootstrap/lib/NavItem"));

exports.NavItem = _NavItem2.default;

var _Nav2 = _interopRequireDefault(require("react-bootstrap/lib/Nav"));

exports.Nav = _Nav2.default;

var _Table2 = _interopRequireDefault(require("react-bootstrap/lib/Table"));

exports.Table = _Table2.default;

var _Collapse2 = _interopRequireDefault(require("react-bootstrap/lib/Collapse"));

exports.Collapse = _Collapse2.default;

var _FormControlStatic = _interopRequireDefault(require("react-bootstrap/lib/FormControlStatic"));

exports.StaticControl = _FormControlStatic.default;

var _Alert2 = _interopRequireDefault(require("react-bootstrap/lib/Alert"));

exports.BootstrapAlert = _Alert2.default;

var _ControlLabel2 = _interopRequireDefault(require("react-bootstrap/lib/ControlLabel"));

exports.ControlLabel = _ControlLabel2.default;

var _HelpBlock2 = _interopRequireDefault(require("react-bootstrap/lib/HelpBlock"));

exports.HelpBlock = _HelpBlock2.default;

var _InputGroup2 = _interopRequireDefault(require("react-bootstrap/lib/InputGroup"));

exports.InputGroup = _InputGroup2.default;

var _InputGroupAddon2 = _interopRequireDefault(require("react-bootstrap/lib/InputGroupAddon"));

exports.InputGroupAddon = _InputGroupAddon2.default;

var _InputGroupButton2 = _interopRequireDefault(require("react-bootstrap/lib/InputGroupButton"));

exports.InputGroupButton = _InputGroupButton2.default;

var _Media2 = _interopRequireDefault(require("react-bootstrap/lib/Media"));

exports.Media = _Media2.default;

var _ProgressBar2 = _interopRequireDefault(require("react-bootstrap/lib/ProgressBar"));

exports.ProgressBar = _ProgressBar2.default;

var _FormControlFeedback2 = _interopRequireDefault(require("react-bootstrap/lib/FormControlFeedback"));

exports.FormControlFeedback = _FormControlFeedback2.default;

var _Transport2 = _interopRequireDefault(require("./data/Transport"));

exports.Transport = _Transport2.default;

var _Store2 = _interopRequireDefault(require("./data/Store"));

exports.Store = _Store2.default;

var _ColumnsStore = require("./data/ColumnsStore");

exports.ColumnsStore = _ColumnsStore.ColumnsStore;

var _TreeItemHelpers = _interopRequireWildcard(require("./data/TreeItemMap"));

exports.TreeItemHelpers = _TreeItemHelpers;

var _TreeStore = require("./data/TreeStore");

exports.TreeStore = _TreeStore.TreeStore;

var _EventBus2 = _interopRequireDefault(require("./utils/EventBus"));

exports.EventBus = _EventBus2.default;

var _BrandedFileLoader2 = _interopRequireDefault(require("./utils/BrandedFileLoader"));

exports.BrandedFileLoader = _BrandedFileLoader2.default;

var _functions2 = require("./utils/functions");

exports.getSilentRouterHistory = _functions2.getSilentRouterHistory;
exports.setDocumentTitle = _functions2.setDocumentTitle;
exports.isReactComponent = _functions2.isReactComponent;
exports.isReactElement = _functions2.isReactElement;
exports.mountComponent = _functions2.mountComponent;
exports.isAutomationTestActive = _functions2.isAutomationTestActive;
exports.isSafeStringValue = _functions2.isSafeStringValue;
exports.OS = _functions2.OS;
exports.fillBrandName = _functions2.fillBrandName;
exports.extendFormState = _functions2.extendFormState;
exports.cleanFormState = _functions2.cleanFormState;
exports.wait = _functions2.wait;
exports.filterKeyCodes = _functions2.filterKeyCodes;

var _utils = require("./ui/utils");

exports.scrollToNode = _utils.scrollToNode;

var _FocusHelper = require("./utils/FocusHelper");

exports.FocusHelper = _FocusHelper.FocusHelper;

var _cookie = require("./utils/cookie");

exports.writeCookie = _cookie.writeCookie;
exports.readCookie = _cookie.readCookie;

var _ValidationUtils = require("./utils/ValidationUtils");

var ReactDOM = require('react-dom');

exports.ReactDOM = ReactDOM;

var ReactRouter = require('react-router');

exports.ReactRouter = ReactRouter;

var ReactRouterBootstrap = require('react-router-bootstrap');

exports.ReactRouterBootstrap = ReactRouterBootstrap;

var History = require('history');

exports.History = History;

var md5 = require('md5');

exports.md5 = md5;

// Utils
var formatMessage = require('format-message');

exports.formatMessage = formatMessage;

var validator = require('validator');

exports.validator = validator;

var _ = require('lodash');

exports._ = _;

var moment = require('moment');

exports.moment = moment;

require('moment/locale/fr.js');

require('moment/locale/fr-ca.js');

require('moment/locale/de.js');

require('moment/locale/en-gb.js');

require('moment/locale/es.js');

require('moment/locale/it.js');

require('moment/locale/ja.js');

require('moment/locale/pt.js');

require('moment/locale/pt-br');

require('moment/locale/zh-cn');

require('moment/locale/zh-tw');

require('moment/locale/zh-hk');

require('moment/locale/x-pseudo.js');

var classnames = require('classnames');

exports.classnames = classnames;

var TinyEmitter = require('tiny-emitter'); // React Bootstrap Non-Wrapped


exports.TinyEmitter = TinyEmitter;
var ValidationUtils = {
  validate: _ValidationUtils.validate,
  stripErrors: _ValidationUtils.stripErrors
};
exports.ValidationUtils = ValidationUtils;

var showLoader = function showLoader() {};

var hideLoader = function hideLoader() {};

function loadPackage(modules, callback, errback) {
  if (!Array.isArray(modules)) {
    modules = [modules];
  }

  showLoader(); // guard against Webpack context parser
  //TODO Try ro require('requirejs')

  window['require'](modules.map(function (p) {
    return p.indexOf('app/') !== -1 && p.indexOf('/index') !== -1 ? p : 'app/' + p + '/index'; //TODO Make app prefix configurable
  }), function () {
    hideLoader();
    callback.apply(null, arguments);
  }, function () {
    hideLoader();

    if (errback) {
      errback.apply(null, arguments);
    } else {
      // eslint-disable-next-line
      if (arguments[0] && arguments[0].stack) console.error(arguments[0].stack); // eslint-disable-next-line

      console.error(arguments);
    }
  });
}

function bootstrap(options) {
  showLoader = options.showLoader || showLoader;
  hideLoader = options.hideLoader || hideLoader;
  setup(options.config, options.locale);
  loadPackage(['app/lang/common/index-en_US'], function (langCommon) {
    (0, _functions.localize)(langCommon);
    var skin = options.skin || options.config.brandId;
    loadPackage(['app/core/all/index-' + skin], options.done, function () {
      // eslint-disable-next-line
      console.warn('Skin for', skin, 'cannot be loaded, fallback to default');
      loadPackage(['app/core/all/index-default'], options.done);
    });
  });
}