/* * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file in the browser devtools. * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * or disable the default devtool with "devtool: false". * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). */ /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./snippet/components/Background.js": /*!******************************************!*\ !*** ./snippet/components/Background.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nclass Background {\n constructor() {\n this.element = document.createElement('div')\n this.element.setAttribute('id', 'botscrew-widget-background')\n this.body = document.getElementsByTagName('body')[0]\n }\n\n init() {\n this.#setStyle()\n this.body.appendChild(this.element)\n }\n\n unmount() {\n this.element.remove()\n }\n\n #setStyle() {\n const styles = {\n backgroundColor: 'RGBA(0,0,0,.5)',\n width: '100vw',\n height: '100vh',\n position: 'fixed',\n zIndex: '9999',\n top: '0',\n left: '0',\n display: 'none',\n }\n Object.assign(this.element.style, styles)\n }\n\n onToggleBackground(show) {\n if (show) {\n this.element.style.display = 'block'\n } else {\n this.element.style.display = 'none'\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Background);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/Background.js?"); /***/ }), /***/ "./snippet/components/Body.js": /*!************************************!*\ !*** ./snippet/components/Body.js ***! \************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nclass Body {\n constructor() {\n this.element = document.getElementsByTagName('body')[0]\n this.overflow = window.getComputedStyle(document.getElementsByTagName('body')[0]).overflow\n this.position = window.getComputedStyle(document.getElementsByTagName('body')[0]).position\n this.top = window.getComputedStyle(document.getElementsByTagName('body')[0]).top\n this.scrollPosition = 0\n }\n\n onToggleOverflow(preventScroll) {\n if (preventScroll) {\n this.scrollPosition = window.pageYOffset\n this.element.style.overflow = 'hidden'\n this.element.style.position = 'fixed'\n this.element.style.top = `${this.scrollPosition}px`\n } else {\n this.element.style.overflow = this.overflow\n this.element.style.position = this.position\n this.element.style.top = this.top\n window.scrollTo({ top: this.scrollPosition, left: 0, behavior: 'auto' })\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Body);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/Body.js?"); /***/ }), /***/ "./snippet/components/CustomBubble.js": /*!********************************************!*\ !*** ./snippet/components/CustomBubble.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nclass CustomBubble {\n constructor(scriptData) {\n this.element = document.createElement('img')\n this.scriptData = scriptData\n this.body = document.getElementsByTagName('body')[0]\n }\n\n init() {\n this.element.setAttribute('src', this.scriptData.iconUrl)\n this.#setStyle()\n\n this.body.appendChild(this.element)\n }\n\n #setStyle() {\n const styles = {\n width: `${this.scriptData.popupLogoSize}px`,\n height: `${this.scriptData.popupLogoSize}px`,\n margin: '10px'\n }\n Object.assign(this.element.style, styles)\n }\n\n setOnClick(onClick) {\n this.element.addEventListener('click', onClick)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomBubble);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/CustomBubble.js?"); /***/ }), /***/ "./snippet/components/CustomBubbleWrap.js": /*!************************************************!*\ !*** ./snippet/components/CustomBubbleWrap.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _CustomBubble__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CustomBubble */ \"./snippet/components/CustomBubble.js\");\n/* harmony import */ var _GreetingsWrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GreetingsWrap */ \"./snippet/components/GreetingsWrap.js\");\n\n\n\nclass CustomBubbleWrap {\n constructor(scriptData) {\n this.element = document.createElement('div')\n this.element.setAttribute('id', 'botscrew-custom-bubble-wrap')\n this.greetingWrap = new _GreetingsWrap__WEBPACK_IMPORTED_MODULE_1__[\"default\"](scriptData)\n this.customBubble = new _CustomBubble__WEBPACK_IMPORTED_MODULE_0__[\"default\"](scriptData)\n this.scriptData = scriptData\n this.body = document.getElementsByTagName('body')[0]\n this.isReverse = false\n }\n\n init() {\n this.customBubble.init()\n this.element.appendChild(this.customBubble.element)\n\n this.greetingWrap.init()\n this.element.appendChild(this.greetingWrap.element)\n\n this.#setStyle()\n this.body.appendChild(this.element)\n this.#getGreetingPosition()\n }\n\n unmount() {\n this.element.remove()\n }\n\n #setStyle() {\n const styles = {\n display: 'flex',\n alignItems: 'flex-end',\n justifyContent: 'flex-end',\n position: 'fixed',\n flexDirection: 'row-reverse',\n zIndex: '10000',\n cursor: 'pointer',\n touchAction: 'pan-x pan-y',\n ...this.#getPositionStyle(),\n }\n Object.assign(this.element.style, styles)\n }\n\n #getPositionStyle() {\n const verticalDirection = 'bottom'\n const alignmentSide = this.scriptData.popupLogoAlignment.toLowerCase()\n\n const styles = {\n [verticalDirection]: `${this.scriptData.bottomSpacing}px`,\n [alignmentSide]: `${this.scriptData.sideSpacing}px`,\n }\n\n return styles\n }\n\n #getGreetingPosition() {\n const leftSpace = this.element.getBoundingClientRect().left\n const greetingWidth = this.scriptData.isMobile ? 120 : 380\n const alignmentSide = this.scriptData.popupLogoAlignment.toLowerCase()\n\n if (leftSpace < greetingWidth && alignmentSide === 'left') {\n this.element.style.flexDirection = 'row'\n this.isReverse = true\n }\n }\n\n hideCustomBubble(hide) {\n if (hide) {\n this.element.style.display = 'none'\n } else {\n this.element.style.display = 'flex'\n }\n }\n\n updateGreeting(greetings) {\n this.greetingWrap.updateGreeting(greetings, this.isReverse)\n }\n\n setOnClick(onClick) {\n this.customBubble.setOnClick(onClick)\n }\n\n setOnSubmitGreeting(onClick) {\n this.greetingWrap.setOnSubmitGreeting(onClick)\n }\n\n setOnCloseGreeting(onClick) {\n this.greetingWrap.setOnCloseGreeting(onClick)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomBubbleWrap);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/CustomBubbleWrap.js?"); /***/ }), /***/ "./snippet/components/Greeting.js": /*!****************************************!*\ !*** ./snippet/components/Greeting.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _GreetingText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GreetingText */ \"./snippet/components/GreetingText.js\");\n/* harmony import */ var _GreetingCloseButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GreetingCloseButton */ \"./snippet/components/GreetingCloseButton.js\");\n\n\n\nclass Greeting {\n constructor(scriptData) {\n this.element = document.createElement('div')\n this.greetingText = new _GreetingText__WEBPACK_IMPORTED_MODULE_0__[\"default\"]()\n this.greetingCloseButton = new _GreetingCloseButton__WEBPACK_IMPORTED_MODULE_1__[\"default\"]()\n this.scriptData = scriptData\n }\n\n init(greeting, isReverse) {\n this.greetingText.init(greeting.text)\n this.element.appendChild(this.greetingCloseButton.element)\n\n this.greetingCloseButton.init()\n this.element.appendChild(this.greetingText.element)\n\n this.#setStyle(isReverse)\n }\n\n #setStyle(isReverse) {\n const styles = {\n display: 'flex',\n padding: '16px',\n width: 'max-content',\n background: 'white',\n boxShadow: this.scriptData.isMobile ? '0px 0px 13px rgba(51, 51, 51, 0.1)' : '0px 0px 30px rgba(51, 51, 51, 0.1)',\n borderRadius: '10px',\n alignItems: 'center',\n cursor: 'pointer',\n maxWidth: this.scriptData.isMobile ? `${window.innerWidth - 120}px` : '380px',\n margin: this.scriptData.isMobile ? '10px 0 10px 10px' : '8px 0 8px 8px',\n border: 'none',\n gap: '16px',\n flexDirection: isReverse ? 'row-reverse' : 'row',\n boxSizing: 'border-box'\n }\n Object.assign(this.element.style, styles)\n }\n\n setOnClose(onClick) {\n this.greetingCloseButton.setOnClick(onClick)\n }\n\n setOnClick(onClick) {\n this.element.addEventListener('click', onClick)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Greeting);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/Greeting.js?"); /***/ }), /***/ "./snippet/components/GreetingCloseButton.js": /*!***************************************************!*\ !*** ./snippet/components/GreetingCloseButton.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _icons_CloseGreetingIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../icons/CloseGreetingIcon */ \"./snippet/icons/CloseGreetingIcon.js\");\n\n\nclass GreetingCloseButton {\n constructor() {\n this.element = document.createElement('span')\n }\n\n init() {\n this.element.innerHTML = _icons_CloseGreetingIcon__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n this.#setStyle()\n }\n\n #setStyle() {\n const styles = {\n display: 'flex',\n cursor: 'pointer',\n alignItems: 'center',\n backgroundColor: 'white',\n border: 'none',\n padding: '0',\n }\n Object.assign(this.element.style, styles)\n }\n\n setOnClick(onClick) {\n this.element.addEventListener('click', (event) => {\n event.stopPropagation()\n onClick()\n })\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GreetingCloseButton);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/GreetingCloseButton.js?"); /***/ }), /***/ "./snippet/components/GreetingText.js": /*!********************************************!*\ !*** ./snippet/components/GreetingText.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nclass GreetingText {\n constructor() {\n this.element = document.createElement('p')\n }\n\n init(text) {\n this.element.innerText = text\n this.#setStyle()\n }\n\n #setStyle() {\n const styles = {\n fontSize: '14px',\n color: '#616581',\n margin: 0,\n fontFamily: 'Lato, sans-serif',\n fontWeight: 400,\n textAlign: 'center',\n padding: 0\n }\n Object.assign(this.element.style, styles)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GreetingText);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/GreetingText.js?"); /***/ }), /***/ "./snippet/components/GreetingsWrap.js": /*!*********************************************!*\ !*** ./snippet/components/GreetingsWrap.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _Greeting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Greeting */ \"./snippet/components/Greeting.js\");\n\n\nclass GreetingsWrap {\n constructor(scriptData) {\n this.element = document.createElement('div')\n this.body = document.getElementsByTagName('body')[0]\n this.scriptData = scriptData\n this.onSubmitGreeting = null\n this.onCloseGreeting = null\n }\n\n init() {\n this.#setStyle()\n }\n\n #setStyle() {\n const styles = {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-end',\n }\n Object.assign(this.element.style, styles)\n }\n\n updateGreeting(greetings, isReverse) {\n this.element.innerHTML = ''\n\n greetings.forEach(greetingData => {\n const greeting = new _Greeting__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this.scriptData)\n greeting.init(greetingData, isReverse)\n greeting.setOnClick(() => this.onSubmitGreeting(greetingData))\n greeting.setOnClose(() => this.onCloseGreeting(greetingData))\n this.element.appendChild(greeting.element)\n })\n }\n\n setOnSubmitGreeting(onClick) {\n this.onSubmitGreeting = (data) => onClick(data)\n }\n\n setOnCloseGreeting(onClick) {\n this.onCloseGreeting = (data) => onClick(data)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GreetingsWrap);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/GreetingsWrap.js?"); /***/ }), /***/ "./snippet/components/Iframe.js": /*!**************************************!*\ !*** ./snippet/components/Iframe.js ***! \**************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _helpers_getAttributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/getAttributes */ \"./snippet/helpers/getAttributes.js\");\n\n\nclass Iframe {\n constructor(scriptData) {\n this.element = document.createElement('iframe')\n this.scriptData = scriptData\n this.body = this.#getContainerIfWidgetEmbedded(scriptData) || document.getElementsByTagName('body')[0]\n this.head = document.getElementsByTagName('head')[0]\n }\n\n init() {\n this.element.setAttribute('allow', `geolocation ${this.scriptData.src}`)\n // eslint-disable-next-line max-len\n this.element.setAttribute('src', `${this.scriptData.src}?ref=${this.scriptData.ref}&open=${!!this.scriptData.open}&isEmbedded=${this.scriptData.isEmbedded}&embeddedHeight=${this.scriptData.embeddedHeight}&embeddedWidth=${this.scriptData.embeddedWidth}&placelholderId=${this.scriptData.placeholderId}`)\n this.element.setAttribute('id', 'botscrew-widget')\n\n const alignmentSide = this.scriptData.popupLogoAlignment\n\n if (this.scriptData.isEmbedded) {\n this.#setEmbeddedStyle()\n } else {\n alignmentSide === 'LEFT' ? this.#setStyleLeftSide() : this.#setStyleRightSide()\n }\n\n this.#generateHeadMeta()\n this.#generateHeadFont()\n this.body.appendChild(this.element)\n }\n\n unmount() {\n this.element.remove()\n }\n\n #setStyleLeftSide() {\n const styles = {\n position: 'fixed',\n zIndex: '10001',\n border: 'none',\n height: '0px',\n width: '0px',\n bottom: this.#getBottomStyle(false),\n left: this.#getPositionStyle(false),\n }\n Object.assign(this.element.style, styles)\n }\n\n #setStyleRightSide() {\n const styles = {\n position: 'fixed',\n zIndex: '10001',\n border: 'none',\n height: '0px',\n width: '0px',\n bottom: this.#getBottomStyle(false),\n right: this.#getPositionStyle(false),\n }\n Object.assign(this.element.style, styles)\n }\n\n #setEmbeddedStyle() {\n const styles = {\n // position: 'fixed',\n // zIndex: '10',\n border: 'none',\n height: '0px',\n width: '0px',\n bottom: this.#getBottomStyle(false),\n right: this.#getPositionStyle(false),\n }\n Object.assign(this.element.style, styles)\n }\n\n #getBottomStyle(isFullScreenWidget) {\n if (isFullScreenWidget || this.scriptData.isMobile) {\n return '0px'\n } else if (this.scriptData.iconUrl) {\n var bottomPadding = parseInt(this.scriptData.popupLogoSize) + 26\n return `${bottomPadding}px`\n } else {\n return '10px'\n }\n }\n\n #getPositionStyle(isFullScreenWidget) {\n if (isFullScreenWidget) {\n return 'calc((100% - 68vw) / 2)'\n } else if (this.scriptData.isMobile) {\n return '0px'\n } else {\n return '10px'\n }\n }\n\n #generateHeadMeta() {\n const meta = document.createElement('meta')\n meta.name = 'viewport'\n meta.content = 'width=device-width, initial-scale=1, maximum-scale=1.0'\n this.head.appendChild(meta)\n }\n\n #generateHeadFont() {\n const meta = document.createElement('link')\n meta.href = 'https://fonts.googleapis.com/css?family=Lato:300,400,700'\n meta.rel = 'stylesheet'\n this.head.appendChild(meta)\n }\n\n\n #getContainerIfWidgetEmbedded(scriptData) {\n if (scriptData.isEmbedded && document.getElementById(scriptData.placeholderId)) {\n const embeddingContainer = document.getElementById(scriptData.placeholderId)\n embeddingContainer.innerHTML = ''\n return embeddingContainer\n }\n }\n\n onToggleFullScreen(isFullScreenWidget, alignmentSide) {\n const styles = alignmentSide === 'left' ? {\n bottom: this.#getBottomStyle(isFullScreenWidget),\n left: this.#getPositionStyle(isFullScreenWidget),\n } : {\n bottom: this.#getBottomStyle(isFullScreenWidget),\n right: this.#getPositionStyle(isFullScreenWidget),\n }\n Object.assign(this.element.style, styles)\n }\n\n onResizeIframe(size) {\n const styles = { ...size }\n Object.assign(this.element.style, styles)\n }\n\n postMessageInitialization() {\n const tabs = JSON.parse(localStorage.getItem(`tabs-${this.scriptData.botId}`)) || {}\n\n this.element.contentWindow.postMessage(\n {\n type: 'initialization',\n botId: this.scriptData.botId,\n url: window.location.href,\n serverUrl: this.scriptData.serverUrl,\n isCustomBubble: this.scriptData.iconUrl,\n isMobile: this.scriptData.isMobile,\n isMinimizedWidget: this.scriptData.isMinimizedWidget,\n open: this.scriptData.open,\n attributes: (0,_helpers_getAttributes__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(),\n device: {\n width: this.scriptData.isMobile ? document.documentElement.clientWidth : 0,\n height: this.scriptData.isMobile ? document.documentElement.clientHeight : 0,\n },\n storage: JSON.parse(localStorage.getItem(`widget-${this.scriptData.botId}`)) || {},\n isWidgetOpen: Object.values(tabs).some(value => value),\n screenSize: {\n width: document.documentElement.clientWidth,\n height: document.documentElement.clientHeight,\n },\n isTestMode: this.scriptData.isTestMode,\n },\n this.scriptData.src,\n )\n }\n\n postMessageResetWidgetChatHistory() {\n this.element.contentWindow.postMessage(\n {\n type: 'reset-chat-history',\n },\n this.scriptData.src,\n )\n }\n\n postMessageToggleWidget() {\n this.element.contentWindow.postMessage(\n {\n type: 'open-widget',\n },\n this.scriptData.src,\n )\n }\n\n postMessageSubmitGreeting(message) {\n this.element.contentWindow.postMessage(\n {\n type: 'submit-greeting',\n message,\n },\n this.scriptData.src,\n )\n }\n\n postMessageCloseGreeting(message) {\n this.element.contentWindow.postMessage(\n {\n type: 'close-greeting',\n message,\n },\n this.scriptData.src,\n )\n }\n\n postMessageWidgetHidden(isWidgetOpen) {\n this.element.contentWindow.postMessage(\n {\n type: 'is-widget-open-at-some-tab',\n isWidgetOpen,\n },\n this.scriptData.src,\n )\n }\n\n postMessageWidgetResize() {\n if (!this.scriptData.isMobile) {\n this.element.contentWindow.postMessage(\n {\n type: 'widget-resize-screen',\n screenSize: {\n width: window.innerWidth,\n height: window.innerHeight,\n },\n },\n this.scriptData.src,\n )\n }\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Iframe);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/Iframe.js?"); /***/ }), /***/ "./snippet/components/ResetChatButton.js": /*!***********************************************!*\ !*** ./snippet/components/ResetChatButton.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nclass ResetChatButton {\n constructor() {\n this.element = document.getElementById('reset-chat-button')\n }\n\n unmount(onClick) {\n this.element?.removeEventListener('click', onClick)\n }\n\n setOnClick(onClick) {\n this.element?.addEventListener('click', onClick)\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ResetChatButton);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/components/ResetChatButton.js?"); /***/ }), /***/ "./snippet/helpers/debounce.js": /*!*************************************!*\ !*** ./snippet/helpers/debounce.js ***! \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ debounce)\n/* harmony export */ });\nfunction debounce(func) {\n let timer\n return function(event) {\n if (timer) clearTimeout(timer)\n timer = setTimeout(func, 400, event)\n }\n}\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/debounce.js?"); /***/ }), /***/ "./snippet/helpers/getAttributes.js": /*!******************************************!*\ !*** ./snippet/helpers/getAttributes.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _getDeviceCategory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getDeviceCategory */ \"./snippet/helpers/getDeviceCategory.js\");\n/* harmony import */ var _getBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getBrowser */ \"./snippet/helpers/getBrowser.js\");\n\n\n\nfunction getAttributes() {\n return [\n { name: 'pageUrl', value: window.location.href },\n { name: 'browserLanguage', value: navigator.language },\n { name: 'deviceCategory', value: (0,_getDeviceCategory__WEBPACK_IMPORTED_MODULE_0__[\"default\"])() },\n { name: 'browser', value: (0,_getBrowser__WEBPACK_IMPORTED_MODULE_1__[\"default\"])() },\n {\n name: 'widgetMetadata',\n value: document.getElementById('chatbot-initials-script').getAttribute('data-widget-metadata'),\n },\n ]\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getAttributes);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getAttributes.js?"); /***/ }), /***/ "./snippet/helpers/getBrowser.js": /*!***************************************!*\ !*** ./snippet/helpers/getBrowser.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction getBrowser() {\n const userAgent = navigator.userAgent\n let browserName = ''\n\n if (userAgent.match(/chrome|chromium|crios/i)) {\n browserName = 'Chrome'\n } else if (userAgent.match(/firefox|fxios/i)) {\n browserName = 'Firefox'\n } else if (userAgent.match(/safari/i)) {\n browserName = 'Safari'\n } else if (userAgent.match(/opr\\//i)) {\n browserName = 'Opera'\n } else if (userAgent.match(/edg/i)) {\n browserName = 'Edge'\n }\n\n return browserName\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getBrowser);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getBrowser.js?"); /***/ }), /***/ "./snippet/helpers/getDeviceCategory.js": /*!**********************************************!*\ !*** ./snippet/helpers/getDeviceCategory.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _getIsMobile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getIsMobile */ \"./snippet/helpers/getIsMobile.js\");\n/* harmony import */ var _getIsMobileTablet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getIsMobileTablet */ \"./snippet/helpers/getIsMobileTablet.js\");\n\n\n\nfunction getDeviceCategory() {\n if ((0,_getIsMobile__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()) return 'Mobile'\n if ((0,_getIsMobileTablet__WEBPACK_IMPORTED_MODULE_1__[\"default\"])()) return 'Tablet'\n return 'Desktop'\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getDeviceCategory);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getDeviceCategory.js?"); /***/ }), /***/ "./snippet/helpers/getIsMobile.js": /*!****************************************!*\ !*** ./snippet/helpers/getIsMobile.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-disable */\nfunction getIsMobile() {\n let check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a,) ||\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\n a.substr(0, 4),\n )\n )\n check = true\n })(navigator.userAgent || navigator.vendor || window.opera)\n return check\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getIsMobile);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getIsMobile.js?"); /***/ }), /***/ "./snippet/helpers/getIsMobileTablet.js": /*!**********************************************!*\ !*** ./snippet/helpers/getIsMobileTablet.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-disable */\nfunction getIsMobileTablet() {\n var check = false;\n (function (a) {\n // eslint-disable-next-line max-len\n if (\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(\n a,\n ) ||\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\n a.substr(0, 4),\n )\n )\n check = true\n })(navigator.userAgent || navigator.vendor || window.opera)\n return check\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getIsMobileTablet);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getIsMobileTablet.js?"); /***/ }), /***/ "./snippet/helpers/getQueryVariable.js": /*!*********************************************!*\ !*** ./snippet/helpers/getQueryVariable.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction getQueryVariable(variable) {\n const query = window.location.search.substring(1)\n const vars = query.split('&')\n for (let i = 0; i < vars.length; i++) {\n const pair = vars[i].split('=')\n if (pair[0] === variable) {\n return decodeURI(pair[1])\n }\n }\n return false\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getQueryVariable);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getQueryVariable.js?"); /***/ }), /***/ "./snippet/helpers/getScriptData.js": /*!******************************************!*\ !*** ./snippet/helpers/getScriptData.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _getQueryVariable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getQueryVariable */ \"./snippet/helpers/getQueryVariable.js\");\n\n\nfunction getScriptData() {\n const scriptTag = document.getElementById('chatbot-initials-script')\n const isWidgetEmbeddedInWebPageContent = scriptTag.getAttribute('embedded') === 'true'\n\n return Object.assign({\n botId: scriptTag.getAttribute('bot-id') || scriptTag.getAttribute('data-bot-id'),\n src: scriptTag.getAttribute('src').replace('script-chatbot.js', ''),\n serverUrl: scriptTag.getAttribute('server-url') || scriptTag.getAttribute('data-server-url'),\n iconUrl: scriptTag.getAttribute('data-icon-url'),\n iconScale: scriptTag.getAttribute('data-icon-scale') || 1,\n iconPosition: scriptTag.getAttribute('data-icon-position')?.split(' ') || [],\n open: !!isWidgetEmbeddedInWebPageContent || (0,_getQueryVariable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('open') === 'true' ||\n scriptTag.getAttribute('data-open-widget') === 'true',\n ref: (0,_getQueryVariable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('ref'),\n isMobile: /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\n isTestMode: (0,_getQueryVariable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('isTestMode') === 'true',\n isMinimizedWidget: (0,_getQueryVariable__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('minimizeWidget') === 'true',\n isEmbedded: isWidgetEmbeddedInWebPageContent,\n placeholderId: scriptTag.getAttribute('placeholder-id'),\n embeddedWidth: scriptTag.getAttribute('embedded-width'),\n embeddedHeight: scriptTag.getAttribute('embedded-height'),\n })\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getScriptData);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/getScriptData.js?"); /***/ }), /***/ "./snippet/helpers/removeTabId.js": /*!****************************************!*\ !*** ./snippet/helpers/removeTabId.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction removeTabId(botId, tabId) {\n const tabs = JSON.parse(localStorage.getItem(`tabs-${botId}`)) || {}\n delete tabs[tabId]\n localStorage.setItem(`tabs-${botId}`, JSON.stringify(tabs))\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (removeTabId);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/removeTabId.js?"); /***/ }), /***/ "./snippet/helpers/resetStorage.js": /*!*****************************************!*\ !*** ./snippet/helpers/resetStorage.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction resetStorage(botId) {\n localStorage.removeItem(`widget-${botId}`)\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (resetStorage);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/resetStorage.js?"); /***/ }), /***/ "./snippet/helpers/toggleTabId.js": /*!****************************************!*\ !*** ./snippet/helpers/toggleTabId.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction toggleTabId(isWidgetOpen, botId, tabId) {\n const tabs = JSON.parse(localStorage.getItem(`tabs-${botId}`)) || {}\n\n tabs[tabId] = isWidgetOpen\n\n localStorage.setItem(`tabs-${botId}`, JSON.stringify(tabs))\n return tabs\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toggleTabId);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/toggleTabId.js?"); /***/ }), /***/ "./snippet/helpers/toggleZoomImage.js": /*!********************************************!*\ !*** ./snippet/helpers/toggleZoomImage.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction toggleZoomImage(url) {\n if (url === '') return\n\n const styleId = 'chatbot-img-style-id'\n const containerId = 'chatbot-img-container'\n const imageId = 'chatbot-img'\n const closeBtnId = 'chatbot-img-close-btn'\n\n const container = document.createElement('div')\n const image = container.appendChild(document.createElement('img'))\n const closeBtn = container.appendChild(document.createElement('div'))\n\n const containerStyle = `\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n z-index: 10011;\n background: RGBA(0, 0, 0, .9);\n overflow: auto;\n `\n\n const imageStyle = `\n display: block;\n width: calc(100vw - 20%);\n height: calc(100vh - 20%);\n object-fit: contain;\n `\n const imageStyleActive = `\n width: 100%;\n height: auto;\n `\n\n const closeBtnStyle = `\n position: fixed;\n right: 20px;\n top: 20px;\n width: 40px;\n height: 40px;\n background: RGBA(0, 0, 0, .1);\n border-radius: 4px;\n z-index: 3;\n cursor: pointer;\n `\n const closeBtnLinesStyle = `\n position: absolute;\n left: 19px;\n top: 8px;\n content: ' ';\n height: 24px;\n width: 2px;\n background: #ffffff;\n `\n\n const style = document.createElement('style')\n style.setAttribute('id', styleId)\n\n style.innerHTML = `\n #${containerId} {\n ${containerStyle}\n }\n #${imageId} {\n ${imageStyle}\n }\n #${imageId}.active {\n ${imageStyleActive}\n }\n #${closeBtnId} {\n ${closeBtnStyle}\n }\n #${closeBtnId}:before,\n #${closeBtnId}:after {\n ${closeBtnLinesStyle}\n }\n #${closeBtnId}:before {\n transform: rotate(45deg);\n }\n #${closeBtnId}:after {\n transform: rotate(-45deg);\n }\n `\n\n document.head.appendChild(style)\n\n container.setAttribute('id', containerId)\n\n image.setAttribute('id', imageId)\n image.setAttribute('src', url)\n\n closeBtn.setAttribute('id', closeBtnId)\n\n document.body.appendChild(container)\n\n const containerRef = document.getElementById(containerId)\n const styleRef = document.getElementById(styleId)\n containerRef.addEventListener('click', closeImg)\n\n const imageRef = document.getElementById(imageId)\n imageRef.addEventListener('click', function (e) {\n e.stopPropagation()\n })\n\n const closeBtnRef = document.getElementById(closeBtnId)\n closeBtnRef.addEventListener('click', closeImg)\n\n function closeImg() {\n containerRef.remove()\n styleRef.remove()\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toggleZoomImage);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/toggleZoomImage.js?"); /***/ }), /***/ "./snippet/helpers/updateStorage.js": /*!******************************************!*\ !*** ./snippet/helpers/updateStorage.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nfunction updateStorage(botId, data) {\n const storage = { ...JSON.parse(localStorage.getItem(`widget-${botId}`)), ...data }\n localStorage.setItem(`widget-${botId}`, JSON.stringify(storage))\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (updateStorage);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/helpers/updateStorage.js?"); /***/ }), /***/ "./snippet/icons/CloseGreetingIcon.js": /*!********************************************!*\ !*** ./snippet/icons/CloseGreetingIcon.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst CloseGreetingIcon = `\n \n \n \n `\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CloseGreetingIcon);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/icons/CloseGreetingIcon.js?"); /***/ }), /***/ "./snippet/index.js": /*!**************************!*\ !*** ./snippet/index.js ***! \**************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./main */ \"./snippet/main.js\");\n//doc 'Widget snippet logic overview' can be found at the Confluence\n\n\nconst main = new _main__WEBPACK_IMPORTED_MODULE_0__[\"default\"]()\n\nmain.init()\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/index.js?"); /***/ }), /***/ "./snippet/main.js": /*!*************************!*\ !*** ./snippet/main.js ***! \*************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_Iframe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Iframe */ \"./snippet/components/Iframe.js\");\n/* harmony import */ var _components_Background__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/Background */ \"./snippet/components/Background.js\");\n/* harmony import */ var _components_ResetChatButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/ResetChatButton */ \"./snippet/components/ResetChatButton.js\");\n/* harmony import */ var _components_CustomBubbleWrap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/CustomBubbleWrap */ \"./snippet/components/CustomBubbleWrap.js\");\n/* harmony import */ var _components_CustomBubble__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/CustomBubble */ \"./snippet/components/CustomBubble.js\");\n/* harmony import */ var _components_Body__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/Body */ \"./snippet/components/Body.js\");\n/* harmony import */ var _helpers_getScriptData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers/getScriptData */ \"./snippet/helpers/getScriptData.js\");\n/* harmony import */ var _helpers_toggleZoomImage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./helpers/toggleZoomImage */ \"./snippet/helpers/toggleZoomImage.js\");\n/* harmony import */ var _helpers_updateStorage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers/updateStorage */ \"./snippet/helpers/updateStorage.js\");\n/* harmony import */ var _helpers_resetStorage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helpers/resetStorage */ \"./snippet/helpers/resetStorage.js\");\n/* harmony import */ var _helpers_removeTabId__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./helpers/removeTabId */ \"./snippet/helpers/removeTabId.js\");\n/* harmony import */ var _helpers_toggleTabId__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/toggleTabId */ \"./snippet/helpers/toggleTabId.js\");\n/* harmony import */ var _helpers_debounce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/debounce */ \"./snippet/helpers/debounce.js\");\n/* harmony import */ var _src_api_api__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../src/api/api */ \"./src/api/api.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Main {\n constructor() {\n this.staticData = (0,_helpers_getScriptData__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()\n this.iframe = new _components_Iframe__WEBPACK_IMPORTED_MODULE_0__[\"default\"](this.staticData)\n this.customBubbleWrap = new _components_CustomBubbleWrap__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.staticData)\n this.customBubble = new _components_CustomBubble__WEBPACK_IMPORTED_MODULE_4__[\"default\"](this.staticData)\n this.background = new _components_Background__WEBPACK_IMPORTED_MODULE_1__[\"default\"]()\n this.resetChatButton = new _components_ResetChatButton__WEBPACK_IMPORTED_MODULE_2__[\"default\"]()\n this.body = new _components_Body__WEBPACK_IMPORTED_MODULE_5__[\"default\"]()\n this.tabId = new Date().getTime()\n }\n\n async init() {\n await (0,_src_api_api__WEBPACK_IMPORTED_MODULE_13__.getGreetingMessagePopupSettings)(this.staticData.serverUrl, this.staticData.botId).then(\n greetingMessagePopupSettings => {\n this.setWidgetBubbleConfigFromWidgetSettings(greetingMessagePopupSettings)\n },\n )\n\n this.iframe.init()\n this.background.init()\n\n if (this.staticData.iconUrl && !this.staticData.isEmbedded) {\n this.customBubbleWrap.init()\n this.customBubbleWrap.setOnClick(() => this.iframe.postMessageToggleWidget())\n this.customBubbleWrap.setOnSubmitGreeting(data => this.iframe.postMessageSubmitGreeting(data))\n this.customBubbleWrap.setOnCloseGreeting(data => this.iframe.postMessageCloseGreeting(data))\n }\n if (this.staticData.isTestMode) {\n this.resetChatButton.setOnClick(() => this.iframe.postMessageResetWidgetChatHistory())\n }\n\n this.addWindowEventListeners()\n\n }\n\n setWidgetBubbleConfigFromWidgetSettings(greetingMessagePopupSettings) {\n this.staticData.iconUrl = greetingMessagePopupSettings.popupLogoUrl\n this.staticData.popupLogoSize = greetingMessagePopupSettings.popupLogoSize\n this.staticData.popupLogoAlignment = greetingMessagePopupSettings.alignment\n this.staticData.bottomSpacing = greetingMessagePopupSettings.bottomSpacing\n this.staticData.sideSpacing = greetingMessagePopupSettings.sideSpacing\n }\n\n addWindowEventListeners = () => {\n window.addEventListener('message', this.handlePostMessage)\n window.addEventListener('beforeunload', this.handleBeforeUnload)\n window.addEventListener('storage', this.handleStorage)\n window.addEventListener('resize', this.handleResize)\n }\n\n removeWindowEventListeners = () => {\n window.removeEventListener('message', this.handlePostMessage)\n window.removeEventListener('beforeunload', this.handleBeforeUnload)\n window.removeEventListener('storage', this.handleStorage)\n window.removeEventListener('resize', this.handleResize)\n }\n\n handlePostMessage = event => {\n if (event.data.type === 'widget-background') {\n this.background.onToggleBackground(event.data.background)\n }\n if (event.data.type === 'zoom-image') {\n (0,_helpers_toggleZoomImage__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(event.data.imageUrl)\n }\n if (event.data.type === 'widget-set-url') {\n this.iframe.postMessageInitialization()\n }\n if (event.data.type === 'resize-widget') {\n this.#handleResizeWidget(event, this.staticData.popupLogoAlignment.toLowerCase())\n }\n if (event.data.type === 'update-greeting') {\n this.customBubbleWrap.updateGreeting(event.data.greetings)\n }\n if (event.data.type === 'reload-page') {\n (0,_helpers_resetStorage__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(this.staticData.botId)\n window.location.reload()\n }\n if (event.data.type === 'clear-storage') {\n (0,_helpers_resetStorage__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(this.staticData.botId)\n }\n if (event.data.type === 'toggle-widget') {\n this.#handleToggleWidget(event)\n }\n if (event.data.type === 'update-local-storage') {\n (0,_helpers_updateStorage__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(this.staticData.botId, event.data.storage)\n }\n if (event.data.type === 'set-browser-tab-name') {\n document.title = `${event.data.botName} - Test Widget`\n }\n if (event.data.type === 'remove-event-listeners') {\n this.removeWindowEventListeners()\n }\n\n this.iframe.onResizeIframe({ width: event.data.width, height: event.data.height })\n }\n\n handleBeforeUnload = () => {\n this.removeWidget()\n }\n\n handleStorage = event => {\n if (event.key === `tabs-${this.staticData.botId}`) {\n this.iframe.postMessageWidgetHidden(Object.values(JSON.parse(event.newValue)).some(value => value))\n }\n }\n\n handleResize = (0,_helpers_debounce__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(() => {\n this.iframe.postMessageWidgetResize()\n })\n\n removeWidget() {\n this.removeWindowEventListeners()\n\n this.iframe.unmount()\n this.background.unmount()\n\n if (this.staticData.iconUrl) {\n this.customBubbleWrap.unmount()\n }\n\n if (this.staticData.isTestMode) {\n this.resetChatButton.unmount(() => this.iframe.postMessageResetWidgetChatHistory())\n }\n (0,_helpers_removeTabId__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(this.staticData.botId, this.tabId)\n }\n\n #handleResizeWidget(event, alignmentSide) {\n this.iframe.onToggleFullScreen(event.data.isFullScreenWidget, alignmentSide)\n if (this.staticData.iconUrl) {\n this.customBubbleWrap.hideCustomBubble(event.data.isFullScreenWidget)\n }\n }\n\n #handleToggleWidget(event) {\n if (this.staticData.isMobile) {\n this.body.onToggleOverflow(event.data.isWidgetOpen)\n }\n const tabs = (0,_helpers_toggleTabId__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(event.data.isWidgetOpen, this.staticData.botId, this.tabId)\n this.iframe.postMessageWidgetHidden(Object.values(tabs).some(value => value))\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Main);\n\n\n//# sourceURL=webpack://botscrew-widget/./snippet/main.js?"); /***/ }), /***/ "./src/api/api.js": /*!************************!*\ !*** ./src/api/api.js ***! \************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"assignGreeting\": () => (/* binding */ assignGreeting),\n/* harmony export */ \"createJsonHeaders\": () => (/* binding */ createJsonHeaders),\n/* harmony export */ \"getConversationStarters\": () => (/* binding */ getConversationStarters),\n/* harmony export */ \"getGreetingMessagePopupSettings\": () => (/* binding */ getGreetingMessagePopupSettings),\n/* harmony export */ \"getGreetingText\": () => (/* binding */ getGreetingText),\n/* harmony export */ \"getPersistentMenuApi\": () => (/* binding */ getPersistentMenuApi),\n/* harmony export */ \"getWidgetSettings\": () => (/* binding */ getWidgetSettings),\n/* harmony export */ \"logoutOnRequestOrResponseJson\": () => (/* binding */ logoutOnRequestOrResponseJson),\n/* harmony export */ \"sendAction\": () => (/* binding */ sendAction),\n/* harmony export */ \"sendFeedback\": () => (/* binding */ sendFeedback),\n/* harmony export */ \"sendGreetingEvent\": () => (/* binding */ sendGreetingEvent)\n/* harmony export */ });\n/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config/config */ \"./src/config/config.js\");\n/* harmony import */ var _config_mockSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config/mockSettings */ \"./src/config/mockSettings.js\");\n\n\n\nconst createJsonHeaders = () => {\n const headers = createHeaders()\n headers.append('Content-Type', 'application/json;charset=UTF-8')\n return headers\n}\n\nfunction createHeaders() {\n return new Headers()\n}\n\nfunction logoutOnRequestOrResponseJson(response) {\n if (response.ok) {\n return response.json()\n } else {\n throw Error(response.status + ' - ' + response.statusText)\n }\n}\n\nconst getWidgetSettings = (botId, chatId, language) => {\n const queryParam = chatId ? `chatId=${chatId}` : `language=${language}`\n\n return fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/info/${botId}?${queryParam}`, {\n headers: createJsonHeaders(),\n method: 'GET',\n })\n .then(response => {\n if (response.ok) {\n return response.json().then(settings => settings.data)\n }\n if (response.status >= 400) {\n response.text().then(err => console.log(err))\n return _config_mockSettings__WEBPACK_IMPORTED_MODULE_1__.mockWidgetSettings\n }\n })\n .catch(error => console.log(error))\n}\n\nasync function getGreetingMessagePopupSettings(serverUrl, botId) {\n return await fetch(`${serverUrl}/public/greeting-settings/${botId}`, {\n headers: createJsonHeaders(),\n method: 'GET'\n }).then(response => {\n if (response.ok) {\n return response.json().then(response => response.data)\n }\n }).catch(error => console.log(error))\n}\n\nconst getPersistentMenuApi = async(botId, chatId) => {\n return fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/persistentMenu?chatId=${chatId}`, {\n headers: createJsonHeaders(),\n method: 'GET',\n })\n .then(response => {\n if (response.ok) {\n return response.json().then(settings => settings)\n }\n })\n .catch(error => console.log(error))\n}\n\nconst sendAction = (actionType, botId, chatId, metadata) => {\n const event = {\n action: {\n type: actionType,\n },\n chatId,\n }\n\n if (metadata) {\n event.action.metadata = metadata\n }\n\n if (chatId) {\n return fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/chat/${chatId}/action`, {\n headers: createJsonHeaders(),\n method: 'POST',\n body: JSON.stringify(event),\n }).catch(error => console.log(error))\n }\n}\n\nconst getGreetingText = (botId, attributes, language, chatId) => {\n const url = new URL(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/greeting`)\n const id = chatId\n\n attributes.forEach(attribute => {\n url.searchParams.append(attribute.name, attribute.value)\n })\n\n if (id) {\n url.searchParams.append('chatId', id)\n }\n\n if (language) {\n url.searchParams.append('language', language)\n }\n\n return fetch(url, {\n headers: createJsonHeaders(),\n method: 'GET',\n })\n .then(response => {\n if (response.ok) {\n return response.json().then(greetingText => greetingText.data || null)\n }\n })\n .catch(error => console.log(error))\n}\n\nconst sendGreetingEvent = (event, botId, hash, chatId, eventId) => {\n const body = {\n hash,\n event,\n }\n\n if (chatId) body.chatId = chatId\n if (eventId) body.id = eventId\n\n return fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/greeting/event`, {\n headers: createJsonHeaders(),\n method: 'POST',\n body: JSON.stringify(body),\n })\n .then(response => {\n if (response.ok) {\n return response.json().then(res => res.data)\n }\n })\n .catch(error => console.log(error))\n}\n\nconst assignGreeting = (botId, chatId, id) => {\n const body = {\n chatId,\n id,\n }\n\n fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/greeting/event`, {\n headers: createJsonHeaders(),\n method: 'PATCH',\n body: JSON.stringify(body),\n }).catch(error => console.log(error))\n}\n\nconst sendFeedback = (feedback, chatId, botId) => {\n return fetch(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/bot/${botId}/analytics/feedback/${chatId}`, {\n headers: createJsonHeaders(),\n method: 'POST',\n body: JSON.stringify(feedback),\n })\n}\n\nconst getConversationStarters = (botId, language, chatId) => {\n const url = new URL(`${_config_config__WEBPACK_IMPORTED_MODULE_0__.API_URL}/widget/${botId}/conversation-starters`)\n if (chatId) {\n url.searchParams.append('chatId', chatId)\n }\n if (language) {\n url.searchParams.append('language', language)\n }\n\n return fetch(url, {\n headers: createJsonHeaders(),\n method: 'GET',\n })\n .then(response => {\n if (response.ok) {\n return response.json().then(starters => starters.data || null)\n }\n return null\n })\n .catch(error => {\n console.log('Failed to fetch conversation starters:', error)\n return null\n })\n}\n\n\n//# sourceURL=webpack://botscrew-widget/./src/api/api.js?"); /***/ }), /***/ "./src/config/config.js": /*!******************************!*\ !*** ./src/config/config.js ***! \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"API_URL\": () => (/* binding */ API_URL),\n/* harmony export */ \"setAPIUrl\": () => (/* binding */ setAPIUrl)\n/* harmony export */ });\nlet API_URL = null\n\nfunction setAPIUrl(value) {\n API_URL = value\n}\n\n\n\n\n//# sourceURL=webpack://botscrew-widget/./src/config/config.js?"); /***/ }), /***/ "./src/config/mockSettings.js": /*!************************************!*\ !*** ./src/config/mockSettings.js ***! \************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"mockWidgetSettings\": () => (/* binding */ mockWidgetSettings)\n/* harmony export */ });\nconst mockWidgetSettings = {\n botName: 'Test58',\n welcomeTitle: 'Hey there!',\n welcomeSubtitle: 'Ready to start a journey with our chatbot?',\n widgetName: 'Chatbot',\n logo: '/default_avatar.png',\n color: '#3a87f0',\n isLoginNameInputEnabled: true,\n isLoginEmailInputEnabled: false,\n isBackgroundBlurred: false,\n isComposerInputEnabled: true,\n chatHistoryLevel: 'LOCAL_STORAGE',\n startButton: 'Start',\n nameInputPlaceholder: 'Your name',\n nameInputError: 'Username can only contain letters, spaces, and hyphens',\n emailInputPlaceholder: 'Your email',\n emailInputError: 'Email is not valid',\n emailInputEmptyError: 'Email should not be blank',\n startLabel: 'Jump into the chat by entering your info',\n inputPlaceholder: 'Write a reply...',\n isRtl: false,\n hasPersistentMenu: true,\n endConversation: {\n title: 'End conversation',\n subtitle: \"Do you want to end conversation? We won't be able to send you messages anymore.\",\n },\n rating: {\n title: 'How would you rate the conversation?',\n commentInputPlaceholder: 'Type comment here',\n },\n widgetActions: {\n maximizeWidgetTitle: 'Maximize widget',\n minimizeWidgetTitle: 'Minimize widget',\n soundOnTitle: 'Sound on',\n soundOffTitle: 'Sound off',\n endConversationTitle: 'End conversation',\n },\n unreadMessagesTitle: 'Unread messages',\n failMessageSendTitle: 'Message failed to send. Do you want to try again?',\n promptButtons: {\n endTitle: 'End',\n cancelTitle: 'Cancel',\n sendTitle: 'Send',\n tryAgainTitle: 'Try again',\n },\n widgetSettings: {\n doEnableSoundNotifications: true,\n doShowPopupMessagePreview: true,\n doAskForRating: true,\n doEnableAttachments: null,\n },\n statusesLabels: {\n agentJoined: 'Agent joined the conversation',\n agentLeft: 'Agent left the conversation',\n userEnded: 'You ended the conversation',\n sessionExpired: 'Session expired',\n },\n greetingMessagePopupSettings: {\n popupLogoUrl: '/default_popup_avatar.png',\n popupLogoSize: 64,\n alignment: 'RIGHT',\n bottomSpacing: 32,\n sideSpacing: 32\n }\n}\n\n\n//# sourceURL=webpack://botscrew-widget/./src/config/mockSettings.js?"); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module can't be inlined because the eval devtool is used. /******/ var __webpack_exports__ = __webpack_require__("./snippet/index.js"); /******/ /******/ })() ;