"use strict";

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

var _typeof = require("@babel/runtime/helpers/typeof");

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "Components", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatComponent.Components;
  }
});
Object.defineProperty(exports, "Constants", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatCore.Constants;
  }
});
Object.defineProperty(exports, "concatMiddleware", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatComponent.concatMiddleware;
  }
});
Object.defineProperty(exports, "connectToWebChat", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatComponent.connectToWebChat;
  }
});
Object.defineProperty(exports, "createBrowserWebSpeechPonyfillFactory", {
  enumerable: true,
  get: function get() {
    return _createBrowserWebSpeechPonyfillFactory.default;
  }
});
exports.createDirectLineAppServiceExtension = exports.createDirectLine = void 0;
Object.defineProperty(exports, "createStore", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatCore.createStore;
  }
});
Object.defineProperty(exports, "createStoreWithDevTools", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatCore.createStoreWithDevTools;
  }
});
Object.defineProperty(exports, "createStyleSet", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatComponent.createStyleSet;
  }
});
exports.default = void 0;
Object.defineProperty(exports, "hooks", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatComponent.hooks;
  }
});
exports.renderWebChat = void 0;
Object.defineProperty(exports, "version", {
  enumerable: true,
  get: function get() {
    return _botframeworkWebchatCore.version;
  }
});

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

var _botframeworkWebchatCore = require("botframework-webchat-core");

var _botframeworkWebchatComponent = _interopRequireWildcard(require("botframework-webchat-component"));

var _addVersion = _interopRequireDefault(require("./addVersion"));

var _renderWebChat = _interopRequireDefault(require("./renderWebChat"));

var _createBrowserWebSpeechPonyfillFactory = _interopRequireDefault(require("./createBrowserWebSpeechPonyfillFactory"));

var _createDirectLine = _interopRequireDefault(require("./createDirectLine"));

var _createDirectLineAppServiceExtension = _interopRequireDefault(require("./createDirectLineAppServiceExtension"));

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

var renderWebChat = _renderWebChat.default.bind(null, _botframeworkWebchatComponent.default);

exports.renderWebChat = renderWebChat;

var createDirectLine = function createDirectLine(options) {
  options.botAgent && console.warn('Web Chat: Developers are not currently allowed to set botAgent in the createDirectLine function. See https://github.com/microsoft/BotFramework-WebChat/issues/2119 for more details.');
  return (0, _createDirectLine.default)(_objectSpread(_objectSpread({}, options), {}, {
    botAgent: "WebChat/".concat(_botframeworkWebchatCore.version, " (Minimal)")
  }));
};

exports.createDirectLine = createDirectLine;

var createDirectLineAppServiceExtension = function createDirectLineAppServiceExtension(options) {
  options.botAgent && console.warn('Web Chat: Developers are not currently allowed to set botAgent in the createDirectLine function. See https://github.com/microsoft/BotFramework-WebChat/issues/2119 for more details.');
  return (0, _createDirectLineAppServiceExtension.default)(_objectSpread(_objectSpread({}, options), {}, {
    botAgent: "WebChat/".concat(_botframeworkWebchatCore.version, " (Minimal)")
  }));
};

exports.createDirectLineAppServiceExtension = createDirectLineAppServiceExtension;
var _default = _botframeworkWebchatComponent.default;
exports.default = _default;
// Until we have a development-specific bundle, we are not shipping createStoreWithDevTools in bundle.
window['WebChat'] = _objectSpread(_objectSpread({}, window['WebChat']), {}, {
  concatMiddleware: _botframeworkWebchatComponent.concatMiddleware,
  connectToWebChat: _botframeworkWebchatComponent.connectToWebChat,
  Constants: _botframeworkWebchatCore.Constants,
  createBrowserWebSpeechPonyfillFactory: _createBrowserWebSpeechPonyfillFactory.default,
  createDirectLine: createDirectLine,
  createDirectLineAppServiceExtension: createDirectLineAppServiceExtension,
  createStore: _botframeworkWebchatCore.createStore,
  createStyleSet: _botframeworkWebchatComponent.createStyleSet,
  hooks: _botframeworkWebchatComponent.hooks,
  ReactWebChat: _botframeworkWebchatComponent.default,
  renderWebChat: renderWebChat
});
(0, _addVersion.default)('minimal');
//# sourceMappingURL=data:application/json;charset=utf-8;base64, 