@moveo-ai/web-client 0.92.0 → 0.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/147.min.js.LICENSE.txt +1 -1
- package/dist/147.min.js.map +1 -1
- package/dist/329.min.js.LICENSE.txt +1 -1
- package/dist/329.min.js.map +1 -1
- package/dist/audio-client.min.js +1 -1
- package/dist/audio-client.min.js.LICENSE.txt +1 -1
- package/dist/audio-client.min.js.map +1 -1
- package/dist/iframe.min.js +1 -1
- package/dist/iframe.min.js.LICENSE.txt +1 -1
- package/dist/iframe.min.js.map +1 -1
- package/dist/iframe.v2.min.js +1 -1
- package/dist/iframe.v2.min.js.LICENSE.txt +1 -1
- package/dist/iframe.v2.min.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/preview-audio/index.html +3 -1
- package/dist/preview.css.min.js +1 -1
- package/dist/preview.css.min.js.LICENSE.txt +1 -1
- package/dist/preview.css.min.js.map +1 -1
- package/dist/web-client.min.js +1 -1
- package/dist/web-client.min.js.LICENSE.txt +1 -1
- package/dist/web-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-client.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,UAAW,GAAIH,GACI,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,GACnB,CATD,CASGK,KAAM,WACT,O,gDCJAH,EAAOD,QAAU,SAAUK,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOH,KAAKI,IAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAA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B,MACMqM,GAD4G,KAApD,QAAxClE,EAAKwM,EAAgBC,qBAAkC,IAAPzM,OAAgB,EAASA,EAAG0M,YACpE,KAAOtB,EAAWlH,SAAW,KACrDyI,EAAa,IAAI3I,EAAiB,CACpCvE,OAAQ+M,EACRtI,YAIJlQ,GAAI,gBACJ,MAAM4Y,QAAiBD,EAAWzV,OAElC,OADAlD,GAAI,eACG4Y,E","sources":["webpack://MoveoAI/webpack/universalModuleDefinition","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/api.js","webpack://MoveoAI/./node_modules/debug/src/browser.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://MoveoAI/./node_modules/debug/src/common.js","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://MoveoAI/./node_modules/ms/index.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://MoveoAI/./src/styles/web-client.scss","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://MoveoAI/webpack/bootstrap","webpack://MoveoAI/webpack/runtime/compat get default export","webpack://MoveoAI/webpack/runtime/define property getters","webpack://MoveoAI/webpack/runtime/global","webpack://MoveoAI/webpack/runtime/hasOwnProperty shorthand","webpack://MoveoAI/webpack/runtime/make namespace object","webpack://MoveoAI/webpack/runtime/nonce","webpack://MoveoAI/./node_modules/ts-deepmerge/esm/index.js","webpack://MoveoAI/./src/config/config.ts","webpack://MoveoAI/./src/config/constants.ts","webpack://MoveoAI/./src/util/utils.ts","webpack://MoveoAI/./node_modules/isbot/index.mjs","webpack://MoveoAI/./node_modules/lodash-es/isObject.js","webpack://MoveoAI/./src/ts/index.ts","webpack://MoveoAI/./node_modules/lodash-es/_freeGlobal.js","webpack://MoveoAI/./node_modules/lodash-es/_root.js","webpack://MoveoAI/./node_modules/lodash-es/now.js","webpack://MoveoAI/./node_modules/lodash-es/_trimmedEndIndex.js","webpack://MoveoAI/./node_modules/lodash-es/_baseTrim.js","webpack://MoveoAI/./node_modules/lodash-es/_Symbol.js","webpack://MoveoAI/./node_modules/lodash-es/_getRawTag.js","webpack://MoveoAI/./node_modules/lodash-es/_objectToString.js","webpack://MoveoAI/./node_modules/lodash-es/_baseGetTag.js","webpack://MoveoAI/./node_modules/lodash-es/toNumber.js","webpack://MoveoAI/./node_modules/lodash-es/isSymbol.js","webpack://MoveoAI/./node_modules/lodash-es/isObjectLike.js","webpack://MoveoAI/./node_modules/lodash-es/debounce.js","webpack://MoveoAI/./src/util/userway.ts","webpack://MoveoAI/./src/controller/controller.ts","webpack://MoveoAI/./node_modules/lodash-es/throttle.js","webpack://MoveoAI/./src/styles/web-client.scss?6ea3","webpack://MoveoAI/./src/index.tsx","webpack://MoveoAI/./node_modules/nanoid/index.browser.js","webpack://MoveoAI/./node_modules/nanoid/url-alphabet/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MoveoAI\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MoveoAI\"] = factory();\n\telse\n\t\troot[\"MoveoAI\"] = factory();\n})(this, function() {\nreturn ","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99%}.web-client-container.embed{position:static;width:100% !important;height:100% !important;max-height:100%}.web-client-container.full{width:100% !important;height:100% !important;inset:0 !important;max-height:initial}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/styles/web-client.scss\"],\"names\":[],\"mappings\":\"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,cAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CACA,eAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA\",\"sourcesContent\":[\"// This style is applied to the iframe that customers load.\\n// Ideally we use style variables rather than this so that\\n// we can use the widget-id.\\n\\n.web-client-container {\\n $widget-z-index: 10022;\\n $widget-max-height: 99%;\\n\\n position: fixed;\\n bottom: 0;\\n right: 0;\\n cursor: pointer;\\n z-index: $widget-z-index;\\n max-height: $widget-max-height;\\n\\n &.embed {\\n position: static;\\n width: 100% !important;\\n height: 100% !important;\\n max-height: 100%;\\n }\\n\\n // ! Important because this happens on the clients website\\n &.full {\\n width: 100% !important;\\n height: 100% !important;\\n inset: 0 !important;\\n max-height: initial;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","// istanbul ignore next\nconst isObject = (obj) => {\n if (typeof obj === \"object\" && obj !== null) {\n if (typeof Object.getPrototypeOf === \"function\") {\n const prototype = Object.getPrototypeOf(obj);\n return prototype === Object.prototype || prototype === null;\n }\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n }\n return false;\n};\nexport const merge = (...objects) => objects.reduce((result, current) => {\n if (current === undefined) {\n return result;\n }\n if (Array.isArray(current)) {\n throw new TypeError(\"Arguments provided to ts-deepmerge must be objects, not arrays.\");\n }\n Object.keys(current).forEach((key) => {\n if ([\"__proto__\", \"constructor\", \"prototype\"].includes(key)) {\n return;\n }\n if (Array.isArray(result[key]) && Array.isArray(current[key])) {\n result[key] = merge.options.mergeArrays\n ? merge.options.uniqueArrayItems\n ? Array.from(new Set(result[key].concat(current[key])))\n : [...result[key], ...current[key]]\n : current[key];\n }\n else if (isObject(result[key]) && isObject(current[key])) {\n result[key] = merge(result[key], current[key]);\n }\n else if (!isObject(result[key]) && isObject(current[key])) {\n result[key] = merge(current[key], undefined);\n }\n else {\n result[key] =\n current[key] === undefined\n ? merge.options.allowUndefinedOverrides\n ? current[key]\n : result[key]\n : current[key];\n }\n });\n return result;\n}, {});\nconst defaultOptions = {\n allowUndefinedOverrides: true,\n mergeArrays: true,\n uniqueArrayItems: true,\n};\nmerge.options = defaultOptions;\nmerge.withOptions = (options, ...objects) => {\n merge.options = Object.assign(Object.assign({}, defaultOptions), options);\n const result = merge(...objects);\n merge.options = defaultOptions;\n return result;\n};\n","const config = {\n CHANNELS_HOST: 'https://channels-ws.moveo.ai',\n BRAIN_AVATAR: 'https://res.cloudinary.com/moveo-ai/image/upload/v1637720224/avatars/images_wgdkxm.jpg',\n TEST_INTEGRATION_ID: 'fake-integration-id',\n};\nexport const getConfig = () => config;\n","/**\n * Mapping of country codes to their respective language names.\n * Provides a record of language names based on ISO country codes.\n */\nexport const languageByCountryCode = {\n en: 'English',\n el: 'Ελληνικά',\n es: 'Español',\n pt: 'Português',\n 'pt-br': 'Português brasileiro',\n it: 'Italiano',\n fr: 'Français',\n da: 'Dansk',\n de: 'Deutsch',\n ro: 'Română',\n bg: 'Български',\n cs: 'Čeština',\n pl: 'Polski',\n id: 'Bahasa Indonesia',\n me: 'Montenegrin',\n nl: 'Nederlands',\n 'nl-be': 'Nederlands (België)',\n sr: 'Српски',\n sv: 'Svenska',\n ru: 'Русский',\n sq: 'Shqip',\n ar: 'العربية',\n ja: '日本語',\n zh: '中文',\n tr: 'Türkçe',\n tl: 'Tagalog',\n};\n// Keep in sync with brand defaults in src/index.css\nexport const DEFAULT_BACKGROUND_COLOR = '#1B66D6'; // --color-brand-background\nexport const DEFAULT_ACCENT_COLOR = '#ffffff'; // --color-brand-foreground\n/**\n * URL of the next version of the web client.\n */\nexport const WEB_CLIENT_NEXT_URL = 'https://web-client.dev.moveo.ai';\n/**\n * URL of the production web client.\n */\nexport const WEB_CLIENT_URL = 'https://web-client.moveo.ai';\n/**\n * URL of the new web client.\n */\nexport const WEB_CLIENT_URL_NEW = 'https://web.moveo.ai';\nexport const WEB_CLIENT_URL_NEW_DEV = 'https://web.dev.moveo.ai';\n/**\n * Timeout duration in milliseconds for modals.\n * Specifies the time duration for modal timeouts.\n * The value is 400 milliseconds.\n */\nexport const MODAL_TIMEOUT = 400;\n/**\n * Minimum number of messages required to show a survey.\n * Specifies the minimum number of messages required to trigger a survey display.\n * The value is 3.\n */\nexport const MINIMUM_MESSAGES_TO_SHOW_SURVEY = 3;\nexport const LOCAL_EVENT = 'local-storage';\nexport const STORAGE_EVENT = 'storage';\n/**\n * The size in pixels of the custom launcher image.\n * The value is 72 pixels.\n **/\nexport const CUSTOM_LAUNCHER_SIZE_PX = '72px';\n/**\n * The width of the expanded chat.\n * The value is 672 pixels.\n **/\nexport const EXPANDED_CHAT_WIDTH = '672px';\n/**\n * The size in pixels of the bubble image.\n * The value is 60 pixels.\n **/\nexport const BUBBLE_SIZE_PX = '60px';\n/**\n * The maximum number of minutes that user can be inactive before we consider\n * them to reconnect to the server.\n * The value is 30 minutes.\n */\nexport const MAX_INACTIVITY_TO_RECONNECT_MS = 30 * 60 * 1000; // 30 minutes\n/**\n * The interval, in milliseconds, at which the inactivity is checked.\n * The value is 10 seconds.\n * */\nexport const CHECK_INACTIVITY_INTERVAL_MS = 10 * 1000; // 10 seconds\n/**\n * The interval to use when updating the visitor activity in local storage\n * The value is 3 seconds.\n * */\nexport const UPDATE_ACTIVITY_INTERVAL_MS = 3 * 1000; // 3 seconds\n/**\n * The duration, in milliseconds, of inactivity timeout.\n * This variable represents the amount of time that can elapse without any user activity\n * before considering the user as inactive.\n * The value is 10 minutes.\n */\nexport const INACTIVITY_TIMEOUT_MS = 10 * 60 * 1000;\n/**\n * The maximum duration, in milliseconds, that the compose indicator\n * will be displayed\n * The value is 30 seconds.\n */\nexport const MAX_TYPING_INDICATOR_MS = 30000;\n/**\n * The maximum duration, in milliseconds, that can elapse before\n * considering the user as having stopped typing.\n * The value is 1.1 seconds.\n */\nexport const MAX_TYPING_DURATION_MS = 1100;\n/**\n * The maximum length, in characters for user messages.\n * The value is 280 characters.\n */\nexport const MAX_CHARS = 280;\nexport const NEW_MAX_CHARS = 512;\n/**\n * The interval, in milliseconds, at which the last activity is sent to the server.\n * The value is 10 seconds.\n */\nexport const DEFAULT_UPDATE_INTERVAL_MS = 10 * 1000; // 10 seconds\n/**\n * The interval, in milliseconds, at which the session id is checked in\n * local storage. This is used to detect if the user create another session\n * in another tab.\n * The value is 5 seconds.\n **/\nexport const SESSION_ID_CHECK_INTERVAL_MS = 5000; // 5 seconds\nexport const isArabic = (text) => {\n const arabicRegex = /[\\u0600-\\u06FF]/;\n return arabicRegex.test(text) ? 'rtl' : 'ltr';\n};\nexport const NUMBER_OF_ACCEPTED_FILES = 4;\nexport const ONE_MB = 1024 * 1024;\nexport const MAX_FILE_SIZE = 20 * ONE_MB;\nexport const ACCEPTED_FILE_TYPES = {\n 'application/pdf': ['.pdf'],\n 'text/plain': ['.txt', '.csv'],\n 'application/msword': ['.doc', '.docx'],\n 'application/vnd.ms-excel': ['.xls', '.xlsx'],\n 'application/vnd.ms-powerpoint': ['.ppt', '.pptx'],\n 'image/jpeg': ['.jpg', '.jpeg'],\n 'image/png': ['.png'],\n 'image/gif': ['.gif'],\n};\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport truncate from 'lodash-es/truncate';\nimport uniq from 'lodash-es/uniq';\nimport scrollIntoView from 'smooth-scroll-into-view-if-needed';\nimport { getConfig } from '../config/config';\nimport { WEB_CLIENT_NEXT_URL, WEB_CLIENT_URL, WEB_CLIENT_URL_NEW, WEB_CLIENT_URL_NEW_DEV, } from '../config/constants';\n/**\n * Fetches the integration configuration\n * @param host the channels host\n * @param id the integration id\n * @returns\n */\nexport const fetchIntegration = async (id, host) => {\n const channelHost = host || getConfig().CHANNELS_HOST;\n const response = await fetch(`${channelHost}/v1/web/${id}`, {\n headers: {\n 'Cache-Control': 'no-cache',\n },\n });\n const text = await response.text();\n if (response.ok) {\n const data = JSON.parse(text);\n return data;\n }\n throw new Error(`Error loading config from: ${channelHost}/${id}`);\n};\n/**\n * Promise that resolves when the document is ready.\n *\n */\n/**\n * Promise that resolves when the document is ready.\n * @returns Promise that resolves when document is fully loaded\n */\nexport const onDocumentReady = () => new Promise((resolve) => {\n if (document.readyState === 'complete') {\n return resolve();\n }\n else {\n window.addEventListener('load', () => {\n return resolve();\n });\n }\n});\n/**\n * Creates a promise that resolves after a specified delay.\n * @param ms - Number of milliseconds to wait\n * @returns Promise that resolves after the delay\n */\nexport const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\n/**\n * Gets the current timestamp in milliseconds.\n * @returns Current timestamp as number\n */\nexport const getTimestamp = () => Date.now();\nexport const KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ESC: 'Escape',\n ENTER: 'Enter',\n DELETE: 'Delete',\n SPACE: 'Space',\n TAB: 'Tab',\n};\nexport const emailRegExp = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))){2,}$/i;\n/**\n * Validates and converts a YouTube URL to an embeddable format.\n * @param text - The YouTube URL to validate and convert\n * @returns Embeddable YouTube URL or false if invalid\n */\nexport const validateYouTubeUrl = (text) => {\n if (text) {\n const regExp = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=|\\?v=)([^#\\&\\?]*).*/;\n const match = text.match(regExp);\n if (match && match[2].length == 11) {\n return `https://www.youtube.com/embed/${match[2]}?autoplay=0`;\n }\n }\n return false;\n};\n/**\n * Determines if the current window is considered mobile based on dimensions.\n * @returns True if window is mobile-sized, false otherwise\n */\nexport const isWindowMobile = () => window.innerWidth < 650 ||\n (window.innerHeight < 550 && window.innerWidth < 1000);\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createIframeUrl = (widgetId, version = 'v1') => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n const regex = /@moveo-ai\\/web-client.*next/;\n if (scripts) {\n scripts.forEach((script) => {\n var _a;\n if ((_a = script.src) === null || _a === void 0 ? void 0 : _a.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost, specific moveo-ai deployment on Vercel,\n // or other conditions by looking at the origin\n const { origin } = window.location;\n if (!url) {\n if (origin.match(/localhost:8880/) ||\n origin.match(/web-client.*moveo-ai\\.vercel\\.app/)) {\n url = origin; // Load from localhost or a web-client deployment in Vercel\n }\n else if (origin.match(/web-client\\.dev/)) {\n url = WEB_CLIENT_NEXT_URL; // Specific web-client development URL\n }\n else {\n url = WEB_CLIENT_URL; // Default to the production web-client URL\n }\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}&version=${version}`;\n};\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createNewIframeUrl = (widgetId) => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n if (scripts) {\n scripts.forEach((script) => {\n var _a, _b, _c;\n if ((_a = script.src) === null || _a === void 0 ? void 0 : _a.includes(WEB_CLIENT_URL_NEW_DEV)) {\n url = WEB_CLIENT_URL_NEW_DEV;\n }\n if ((_b = script.src) === null || _b === void 0 ? void 0 : _b.includes(WEB_CLIENT_URL_NEW)) {\n url = WEB_CLIENT_URL_NEW;\n }\n const regex = /@moveo-ai\\/web-client.*next/;\n if ((_c = script.src) === null || _c === void 0 ? void 0 : _c.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost, specific moveo-ai deployment on Vercel,\n // or other conditions by looking at the origin\n const { origin } = window.location;\n if (!url) {\n if (origin.match(/localhost:8880/) ||\n origin.match(/web-client.*moveo-ai\\.vercel\\.app/) ||\n origin.match(/web.*moveo\\.ai/)) {\n url = origin; // Load from localhost , from cloudflare preview or a deployment in Vercel\n }\n else {\n url = WEB_CLIENT_URL_NEW; // Default to the production web-client URL\n }\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}&version=v2`;\n};\n/**\n * Parses a message event and extracts the event type and data.\n * @param widgetId - The widget ID to filter events\n * @param event - The message event to parse\n * @returns Parsed event object or null if invalid\n */\nexport const parseEvent = (widgetId, event) => {\n var _a, _b;\n const eventType = (_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.type;\n if (typeof eventType !== 'string' || !eventType.startsWith(widgetId)) {\n return null;\n }\n // Extract the event type by removing the prefix `widgetId`\n const type = eventType.replace(widgetId, '');\n const data = (_b = event.data) === null || _b === void 0 ? void 0 : _b.data;\n return { type, data };\n};\n/**\n * Determines if the parent URL is a test environment.\n * @param parentUrl - The parent URL to check\n * @returns True if URL is a test environment, false otherwise\n */\nexport const isTest = (parentUrl) => {\n if (parentUrl) {\n const url = new URL(parentUrl).origin;\n if (url.match(/localhost:|vercel.app/) ||\n url === WEB_CLIENT_NEXT_URL ||\n url === WEB_CLIENT_URL ||\n url === WEB_CLIENT_URL_NEW ||\n url === WEB_CLIENT_URL_NEW_DEV) {\n return true;\n }\n }\n return false;\n};\n/**\n * Checks if a value is a plain object (not array or null).\n * @param item - The value to check\n * @returns True if item is a plain object, false otherwise\n */\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n// From: stackoverflow.com/a/37164538\nexport function mergeDeep(target = {}, source = {}) {\n const output = Object.assign({}, target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n }\n else {\n output[key] = mergeDeep(target[key], source[key]);\n }\n }\n else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n}\n/**\n * Smoothly scrolls an element into view.\n * @param element - The element to scroll to\n * @param options - Additional scroll options to override defaults\n */\nexport const scrollToElement = (element, options = {}) => {\n scrollIntoView(element, Object.assign({ behavior: 'smooth', inline: 'end', block: 'end' }, options));\n};\n/**\n * Finds the file type based on the provided MIME type.\n * Supported types: 'image', 'video', 'audio', 'file'.\n */\n/**\n * Determines the file type category based on MIME type.\n * @param mimeType - The MIME type string to analyze\n * @returns File type category: 'image', 'video', 'audio', or 'file'\n */\nexport const getFileTypeFromMimeType = (mimeType) => {\n if (mimeType.startsWith('image/')) {\n return 'image';\n }\n if (mimeType.startsWith('video/')) {\n return 'video';\n }\n if (mimeType.startsWith('audio/')) {\n return 'audio';\n }\n return 'file';\n};\n// This number comes from the max length in orchestrator\nexport const MAX_CHARS_IN_TAG = 48;\n/**\n * Normalizes the tags in the provided context by:\n * - Removing empty or whitespace-only tags.\n * - Transliterating non-Latin characters into ASCII.\n * - Removing diacritic marks from characters.\n * - Truncating each tag to a maximum allowed length.\n * - Removing duplicate tags.\n * - Removing tags that are not latin or greek characters.\n *\n * @param context - The context object containing a `tags` array and other properties.\n * @returns The updated context object with normalized tags.\n */\nexport const normalizeTags = (_a) => {\n var { tags } = _a, rest = __rest(_a, [\"tags\"]);\n if (!tags) {\n return rest;\n }\n const normalizedTags = tags\n .map((tag) => {\n // This will return an undefined value that later will be filtered.\n if (typeof tag !== 'string') {\n return;\n }\n // Remove spaces at the end and beggining\n let normalizedTag = tag.trim();\n // After trimming the tag, check if it's empty\n if (!normalizedTag) {\n return;\n }\n // Convert non-latin characters to ASCII (Such as Greek)\n normalizedTag = greekToLatin(normalizedTag);\n // Remove diacritic marks\n normalizedTag = transliterateToAscii(normalizedTag);\n normalizedTag = normalizedTag.replace(/\\s+/g, '-');\n // Shorten tag to max length\n return truncate(normalizedTag, {\n length: MAX_CHARS_IN_TAG,\n // This avoids appending `...` to the end of the string\n omission: '',\n });\n })\n // Remove empty tags\n .filter((tag) => Boolean(tag));\n return Object.assign(Object.assign({}, rest), { tags: uniq(normalizedTags) });\n};\n/**\n * Converts Greek text to its Latin equivalent using a simple character mapping.\n *\n * This function replaces each Greek letter with its corresponding Latin transcription\n * based on common transliteration rules.\n *\n * @param text - The Greek text to be transliterated.\n * @returns The transliterated Latin text.\n */\nconst greekToLatin = (text) => {\n const map = {\n Α: 'A',\n Β: 'B',\n Γ: 'G',\n Δ: 'D',\n Ε: 'E',\n Ζ: 'Z',\n Η: 'H',\n Θ: 'Th',\n Ι: 'I',\n Κ: 'K',\n Λ: 'L',\n Μ: 'M',\n Ν: 'N',\n Ξ: 'X',\n Ο: 'O',\n Π: 'P',\n Ρ: 'R',\n Σ: 'S',\n Τ: 'T',\n Υ: 'Y',\n Φ: 'F',\n Χ: 'Ch',\n Ψ: 'Ps',\n Ω: 'O',\n α: 'a',\n β: 'b',\n γ: 'g',\n δ: 'd',\n ε: 'e',\n ζ: 'z',\n η: 'i',\n θ: 'th',\n ι: 'i',\n κ: 'k',\n λ: 'l',\n μ: 'm',\n ν: 'n',\n ξ: 'x',\n ο: 'o',\n π: 'p',\n ρ: 'r',\n σ: 's',\n ς: 's',\n τ: 't',\n υ: 'y',\n φ: 'f',\n χ: 'ch',\n ψ: 'ps',\n ω: 'o',\n };\n return text\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .split('')\n .map((char) => map[char] || char)\n .join('');\n};\n/**\n * Converts a string to its ASCII equivalent by:\n * - Normalizing Unicode characters to their decomposed form.\n * - Removing diacritic marks (accents, tildes, etc.).\n * - Removing any non-ASCII characters.\n *\n * @param {string} str - The input string to transliterate.\n * @returns {string} - The ASCII-only version of the input string.\n */\nconst transliterateToAscii = (str) => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[^\\x00-\\x7F]/g, '');\n};\n/**\n * Normalizes the display name in the context object.\n * If the display name is an empty string, it will be set to null.\n * When the value is null, channels will assign a default value such as\n * `Visitor <id>`.\n *\n * @param context - The context object containing user information\n * @returns The context object with normalized display name\n */\nexport const normalizeDisplayName = (context) => {\n if (!(context === null || context === void 0 ? void 0 : context.user)) {\n return context;\n }\n return Object.assign(Object.assign({}, context), { user: Object.assign(Object.assign({}, context.user), { display_name: context.user.display_name === '' ? null : context.user.display_name }) });\n};\n/**\n * Normalizes the email address in the context object.\n * - Splits multiple emails by comma, semicolon, or space\n * - Trims whitespace\n * - Converts to lowercase\n * - Takes the first valid email if multiple are provided\n *\n * @param context - The context object containing user email\n * @returns The context object with normalized email\n */\nexport const normalizeEmail = (context) => {\n var _a, _b;\n const email = (_a = context.user) === null || _a === void 0 ? void 0 : _a.email;\n if (!email || typeof email !== 'string') {\n return context;\n }\n const emails = email\n .split(/[,; ]+/)\n .map((e) => e.trim().toLowerCase())\n .filter(Boolean);\n return Object.assign(Object.assign({}, context), { user: Object.assign(Object.assign({}, context.user), { email: (_b = emails[0]) !== null && _b !== void 0 ? _b : email }) });\n};\n/**\n * Converts specified user fields to strings if they are not already strings.\n * Handles the following fields: external_id, phone, user_id, contact_id\n * As this fields are used internally by moveo, they must be strings.\n *\n * @param context - The context object containing user information\n * @returns The context object with stringified user fields\n */\nexport const stringifyUserKeys = (context) => {\n if (!context.user) {\n return context;\n }\n const keys = ['external_id', 'phone', 'user_id', 'contact_id'];\n const updatedUser = Object.assign({}, context.user);\n for (const key of keys) {\n const val = updatedUser[key];\n if (val !== undefined && typeof val !== 'string') {\n updatedUser[key] = `${val}`;\n }\n }\n return Object.assign(Object.assign({}, context), { user: updatedUser });\n};\n/**\n * Applies a series of normalization functions to the context object.\n * The normalization pipeline includes:\n * - Normalizing display name\n * - Normalizing email address\n * - Converting user fields to strings\n * - Normalizing tags\n *\n * @param context - The context object to normalize\n * @returns The fully normalized context object\n */\nexport const normalizeContext = (context) => {\n return [\n normalizeDisplayName,\n normalizeEmail,\n stringifyUserKeys,\n normalizeTags,\n ].reduce((acc, fn) => fn(acc), context);\n};\n/**\n * Pattern for unformatted phone number, this is how users\n * typically enter their phone numbers. Validation:\n * - Optional + prefix\n * - 9-20 characters including digits, spaces, hyphens, and parentheses\n * - Allows international format with parentheses\n * - No backtracking possible due to fixed structure\n */\nexport const UNFORMATTED_PHONE_PATTERN = /^\\+?[0-9()-\\s]{9,20}$/;\n/**\n * Pattern for normalized phone number, this is how we\n * store phone numbers in the database. Validation:\n * - Optional + prefix\n * - 7-18 digits only\n * - No spaces, hyphens, or parentheses\n * - No backtracking possible due to fixed structure\n */\nexport const NORMALIZED_PHONE_PATTERN = /^\\+?[0-9]{7,18}$/;\n/**\n * Validates and formats a phone number.\n * @param value - The phone number string to validate\n * @returns Object with validation result and formatted number\n */\nexport const validatePhoneNumber = (value) => {\n if (!value) {\n return { valid: true, formatted: value };\n }\n if (!UNFORMATTED_PHONE_PATTERN.test(value)) {\n return { valid: false };\n }\n const formatted = value.replace(/[()-\\s]/g, '');\n if (!NORMALIZED_PHONE_PATTERN.test(formatted)) {\n return { valid: false };\n }\n return { valid: true, formatted };\n};\n/**\n * Creates a nested object structure from a dot-notation path.\n * @param path - Dot-notation path like 'custom.field' or 'settings.theme.color'\n * @param value - The value to set at the specified path\n * @returns Nested object with the value at the specified path\n */\nexport const setNestedValue = (path, value) => {\n const keys = path.split('.');\n const result = {};\n let current = result;\n for (let i = 0; i < keys.length - 1; i++) {\n current[keys[i]] = {};\n current = current[keys[i]];\n }\n current[keys[keys.length - 1]] = value;\n return result;\n};\n/**\n * Formats a Date object to a local datetime string in ISO format.\n * @param date - The Date object to format\n * @returns Formatted datetime string (YYYY-MM-DDTHH:mm)\n */\nexport const getLocalDateTimeString = (date) => {\n const pad = (n) => n.toString().padStart(2, '0');\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;\n};\nexport const formatDurationMMSS = (totalSeconds) => {\n const rawSeconds = typeof totalSeconds === 'number' ? totalSeconds : 0;\n const safeSeconds = Number.isFinite(rawSeconds)\n ? Math.max(0, Math.floor(rawSeconds))\n : 0;\n const minutes = Math.floor(safeSeconds / 60);\n const seconds = safeSeconds % 60;\n return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;\n};\nexport const formatMinutesSecondsMMSS = (minutes, seconds) => {\n const rawMinutes = typeof minutes === 'number' ? minutes : 0;\n const rawSeconds = typeof seconds === 'number' ? seconds : 0;\n const safeMinutes = Number.isFinite(rawMinutes) ? Math.max(0, rawMinutes) : 0;\n const safeSeconds = Number.isFinite(rawSeconds) ? Math.max(0, rawSeconds) : 0;\n return formatDurationMMSS(safeMinutes * 60 + safeSeconds);\n};\nexport const formatTimeHMMA = (date) => {\n const hours = date.getHours();\n const hour12 = hours % 12 || 12;\n const minutes = date.getMinutes().toString().padStart(2, '0');\n const amPm = hours >= 12 ? 'PM' : 'AM';\n return `${hour12}:${minutes} ${amPm}`;\n};\n/**\n * Determines if a survey event is a custom survey (not hosted by moveo.ai).\n * @param event - The survey event to check\n * @returns True if the survey is custom, false if it's a Moveo survey\n */\nexport const isCustomSurveyEvent = (event) => {\n var _a;\n // We might need to find a more reliable way to determine if a survey is custom. This approach cannot have surveys hosted in a moveo.ai domain\n return !((_a = event === null || event === void 0 ? void 0 : event.url) === null || _a === void 0 ? void 0 : _a.includes('moveo.ai'));\n};\n","// src/patterns.json\nvar patterns_default = [\n \" daum[ /]\",\n \" deusu/\",\n \"(?:^|[^g])news(?!sapphire)\",\n \"(?<! (?:channel/|google/))google(?!(app|/google| pixel))\",\n \"(?<! cu)bots?(?:\\\\b|_)\",\n \"(?<!(?:lib))http\",\n \"(?<![hg]m)score\",\n \"(?<!cam)scan\",\n \"24x7\",\n \"@[a-z][\\\\w-]+\\\\.\",\n \"\\\\(\\\\)\",\n \"\\\\.com\\\\b\",\n \"\\\\bperl\\\\b\",\n \"\\\\btime/\",\n \"\\\\|\",\n \"^[\\\\w \\\\.\\\\-\\\\(?:\\\\):%]+(?:/v?\\\\d+(?:\\\\.\\\\d+)?(?:\\\\.\\\\d{1,10})*?)?(?:,|$)\",\n \"^[^ ]{50,}$\",\n \"^\\\\d+\\\\b\",\n \"^\\\\W\",\n \"^\\\\w*search\\\\b\",\n \"^\\\\w+/[\\\\w\\\\(\\\\)]*$\",\n \"^active\",\n \"^ad muncher\",\n \"^amaya\",\n \"^avsdevicesdk/\",\n \"^azure\",\n \"^biglotron\",\n \"^bot\",\n \"^bw/\",\n \"^clamav[ /]\",\n \"^client/\",\n \"^cobweb/\",\n \"^custom\",\n \"^ddg[_-]android\",\n \"^discourse\",\n \"^dispatch/\\\\d\",\n \"^downcast/\",\n \"^duckduckgo\",\n \"^email\",\n \"^facebook\",\n \"^getright/\",\n \"^gozilla/\",\n \"^hobbit\",\n \"^hotzonu\",\n \"^hwcdn/\",\n \"^igetter/\",\n \"^jeode/\",\n \"^jetty/\",\n \"^jigsaw\",\n \"^microsoft bits\",\n \"^movabletype\",\n \"^mozilla/\\\\d\\\\.\\\\d\\\\s[\\\\w\\\\.-]+$\",\n \"^mozilla/\\\\d\\\\.\\\\d\\\\s\\\\(compatible;?(?:\\\\s\\\\w+\\\\/\\\\d+\\\\.\\\\d+)?\\\\)$\",\n \"^navermailapp\",\n \"^netsurf\",\n \"^offline\",\n \"^openai/\",\n \"^owler\",\n \"^php\",\n \"^postman\",\n \"^python\",\n \"^rank\",\n \"^read\",\n \"^reed\",\n \"^rest\",\n \"^rss\",\n \"^snapchat\",\n \"^space bison\",\n \"^svn\",\n \"^swcd \",\n \"^taringa\",\n \"^thumbor/\",\n \"^track\",\n \"^w3c\",\n \"^webbandit/\",\n \"^webcopier\",\n \"^wget\",\n \"^whatsapp\",\n \"^wordpress\",\n \"^xenu link sleuth\",\n \"^yahoo\",\n \"^yandex\",\n \"^zdm/\\\\d\",\n \"^zoom marketplace/\",\n \"agent\\\\b\",\n \"analyzer\",\n \"archive\",\n \"ask jeeves/teoma\",\n \"audit\",\n \"bit\\\\.ly/\",\n \"bluecoat drtr\",\n \"browsex\",\n \"burpcollaborator\",\n \"capture\",\n \"catch\",\n \"check\\\\b\",\n \"checker\",\n \"chrome-lighthouse\",\n \"chromeframe\",\n \"classifier\",\n \"cloudflare\",\n \"convertify\",\n \"crawl\",\n \"cypress/\",\n \"dareboost\",\n \"datanyze\",\n \"dejaclick\",\n \"detect\",\n \"dmbrowser\",\n \"download\",\n \"evc-batch/\",\n \"exaleadcloudview\",\n \"feed\",\n \"fetcher\",\n \"firephp\",\n \"functionize\",\n \"grab\",\n \"headless\",\n \"httrack\",\n \"hubspot marketing grader\",\n \"hydra\",\n \"ibisbrowser\",\n \"infrawatch\",\n \"insight\",\n \"inspect\",\n \"iplabel\",\n \"java(?!;)\",\n \"library\",\n \"linkcheck\",\n \"mail\\\\.ru/\",\n \"manager\",\n \"measure\",\n \"neustar wpm\",\n \"node\\\\b\",\n \"nutch\",\n \"offbyone\",\n \"onetrust\",\n \"optimize\",\n \"pageburst\",\n \"pagespeed\",\n \"parser\",\n \"phantomjs\",\n \"pingdom\",\n \"powermarks\",\n \"preview\",\n \"proxy\",\n \"ptst[ /]\\\\d\",\n \"retriever\",\n \"rexx;\",\n \"rigor\",\n \"rss\\\\b\",\n \"scrape\",\n \"server\",\n \"sogou\",\n \"sparkler/\",\n \"speedcurve\",\n \"spider\",\n \"splash\",\n \"statuscake\",\n \"supercleaner\",\n \"synapse\",\n \"synthetic\",\n \"tools\",\n \"torrent\",\n \"transcoder\",\n \"url\",\n \"validator\",\n \"virtuoso\",\n \"wappalyzer\",\n \"webglance\",\n \"webkit2png\",\n \"whatcms/\",\n \"xtate/\"\n];\n\n// src/pattern.ts\nvar fullPattern = \" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\\\w-]+\\\\.|\\\\(\\\\)|\\\\.com\\\\b|\\\\bperl\\\\b|\\\\btime/|\\\\||^[\\\\w \\\\.\\\\-\\\\(?:\\\\):%]+(?:/v?\\\\d+(?:\\\\.\\\\d+)?(?:\\\\.\\\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\\\d+\\\\b|^\\\\W|^\\\\w*search\\\\b|^\\\\w+/[\\\\w\\\\(\\\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\\\d\\\\.\\\\d\\\\s[\\\\w\\\\.-]+$|^mozilla/\\\\d\\\\.\\\\d\\\\s\\\\(compatible;?(?:\\\\s\\\\w+\\\\/\\\\d+\\\\.\\\\d+)?\\\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\\\d|^zoom marketplace/|agent\\\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\\\.ru/|manager|measure|neustar wpm|node\\\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\\\d|retriever|rexx;|rigor|rss\\\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/\";\n\n// src/index.ts\nvar naivePattern = /bot|crawl|http|lighthouse|scan|search|spider/i;\nvar pattern;\nfunction getPattern() {\n if (pattern instanceof RegExp) {\n return pattern;\n }\n try {\n pattern = new RegExp(fullPattern, \"i\");\n } catch (error) {\n pattern = naivePattern;\n }\n return pattern;\n}\nvar list = patterns_default;\nvar isbotNaive = (userAgent) => Boolean(userAgent) && naivePattern.test(userAgent);\nfunction isbot(userAgent) {\n return Boolean(userAgent) && getPattern().test(userAgent);\n}\nvar createIsbot = (customPattern) => (userAgent) => Boolean(userAgent) && customPattern.test(userAgent);\nvar createIsbotFromList = (list2) => {\n const pattern2 = new RegExp(list2.join(\"|\"), \"i\");\n return (userAgent) => Boolean(userAgent) && pattern2.test(userAgent);\n};\nvar isbotMatch = (userAgent) => {\n var _a, _b;\n return (_b = (_a = userAgent == null ? void 0 : userAgent.match(getPattern())) == null ? void 0 : _a[0]) != null ? _b : null;\n};\nvar isbotMatches = (userAgent) => list.map((part) => {\n var _a;\n return (_a = userAgent == null ? void 0 : userAgent.match(new RegExp(part, \"i\"))) == null ? void 0 : _a[0];\n}).filter(Boolean);\nvar isbotPattern = (userAgent) => {\n var _a;\n return userAgent ? (_a = list.find((pattern2) => new RegExp(pattern2, \"i\").test(userAgent))) != null ? _a : null : null;\n};\nvar isbotPatterns = (userAgent) => userAgent ? list.filter((pattern2) => new RegExp(pattern2, \"i\").test(userAgent)) : [];\nexport {\n createIsbot,\n createIsbotFromList,\n getPattern,\n isbot,\n isbotMatch,\n isbotMatches,\n isbotNaive,\n isbotPattern,\n isbotPatterns,\n list\n};\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** User provided configuration */\nexport var SessionStatus;\n(function (SessionStatus) {\n SessionStatus[\"Open\"] = \"open\";\n SessionStatus[\"Resolved\"] = \"closed\";\n SessionStatus[\"Expired\"] = \"expired\";\n SessionStatus[\"Spam\"] = \"spam\";\n SessionStatus[\"Trash\"] = \"trash\";\n})(SessionStatus || (SessionStatus = {}));\n/**\n * Events send from the iframe to the web-client\n */\nexport var IframeEventType;\n(function (IframeEventType) {\n IframeEventType[\"AnalyticsEvent\"] = \"moveo-analytics-event\";\n IframeEventType[\"IframeLoaded\"] = \"moveo-iframe-loaded\";\n IframeEventType[\"IframeError\"] = \"moveo-iframe-error\";\n IframeEventType[\"WidgetLoaded\"] = \"moveo-widget-loaded\";\n IframeEventType[\"WidgetError\"] = \"moveo-widget-error\";\n IframeEventType[\"Opened\"] = \"moveo-widget-opened\";\n IframeEventType[\"Closed\"] = \"moveo-widget-closed\";\n IframeEventType[\"Resize\"] = \"moveo-widget-resize\";\n IframeEventType[\"LocaleChanged\"] = \"moveo-widget-locale-changed\";\n IframeEventType[\"SessionCreated\"] = \"moveo-widget-session-created\";\n IframeEventType[\"SessionReconnected\"] = \"moveo-widget-session-reconnected\";\n IframeEventType[\"SessionClosed\"] = \"moveo-widget-session-closed\";\n IframeEventType[\"ConversationClosed\"] = \"moveo-widget-conversation-closed\";\n IframeEventType[\"LinkClicked\"] = \"moveo-widget-link-clicked\";\n IframeEventType[\"UserActivity\"] = \"moveo-widget-user-activity\";\n IframeEventType[\"MemberLeave\"] = \"moveo-widget-member-leave\";\n IframeEventType[\"ConversationUnreadMessages\"] = \"moveo-conversation-unread-messages\";\n IframeEventType[\"ConversationNoUnreadMessages\"] = \"moveo-conversation-no-unread-messages\";\n IframeEventType[\"UserWayInit\"] = \"moveo-userway-init\";\n})(IframeEventType || (IframeEventType = {}));\n/**\n * Events send from the web-client to the iframe\n */\nexport var WebClientEventType;\n(function (WebClientEventType) {\n WebClientEventType[\"SetConfig\"] = \"moveo-set-config\";\n WebClientEventType[\"SetLocale\"] = \"moveo-set-locale\";\n WebClientEventType[\"SetCssVariables\"] = \"moveo-set-css-variables\";\n WebClientEventType[\"Open\"] = \"moveo-open\";\n WebClientEventType[\"Close\"] = \"moveo-close\";\n WebClientEventType[\"CloseConversation\"] = \"moveo-close-conversation\";\n WebClientEventType[\"SendMessage\"] = \"moveo-send-message\";\n WebClientEventType[\"ShowTeaserMessage\"] = \"moveo-show-teaser-message\";\n WebClientEventType[\"UpdateContext\"] = \"moveo-update-context\";\n WebClientEventType[\"WindowResize\"] = \"moveo-resize\";\n WebClientEventType[\"SessionActivity\"] = \"session-activity\";\n WebClientEventType[\"UserWayDisabled\"] = \"userway-disabled\";\n WebClientEventType[\"UserWayEnabled\"] = \"userway-enabled\";\n WebClientEventType[\"LinkClicked\"] = \"link-clicked\";\n})(WebClientEventType || (WebClientEventType = {}));\nexport var ChatModal;\n(function (ChatModal) {\n ChatModal[\"Expired\"] = \"expired\";\n ChatModal[\"Survey\"] = \"survey\";\n ChatModal[\"SurveyFull\"] = \"survey-full\";\n /**\n * Shows a modal with a button to close the session.\n * This is shown when the user press the close button on the widget.\n */\n ChatModal[\"Closing\"] = \"closing\";\n /**\n * Shows the resolved modal with a button to continue or end the session.\n * This is shown when the agent closes the conversation.\n */\n ChatModal[\"Resolved\"] = \"closed\";\n ChatModal[\"Inactivity\"] = \"inactivity\";\n ChatModal[\"Email\"] = \"email\";\n})(ChatModal || (ChatModal = {}));\nexport var TestClassName;\n(function (TestClassName) {\n TestClassName[\"MinimizeButton\"] = \"minimize-btn\";\n TestClassName[\"CloseButton\"] = \"close-btn\";\n TestClassName[\"EndSessionButton\"] = \"end-btn\";\n TestClassName[\"LauncherButton\"] = \"launcher-btn\";\n TestClassName[\"MessageInput\"] = \"message-input\";\n TestClassName[\"DisclaimerCheck\"] = \"disclaimer-check\";\n TestClassName[\"DisclaimerContainer\"] = \"disclaimer-container\";\n TestClassName[\"HeaderContainer\"] = \"header-container\";\n TestClassName[\"ImageButton\"] = \"image-btn\";\n})(TestClassName || (TestClassName = {}));\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","export const injectScript = () => {\n const gplusjs = '(function (d) {var s = d.createElement(\"script\");s.setAttribute(\"data-account\", \"Yd9gTOcFbs\");s.setAttribute(\"src\", \"https://cdn.userway.org/widget.js\");(d.body || d.head).appendChild(s);})(document)';\n const script = document.createElement('script');\n script.textContent = gplusjs;\n document.body.appendChild(script);\n};\nexport const userWayEvents = [\n 's2', // Big cursor pointer\n 's3', // Contrast\n 's4', //Big text\n 's6', // Highlight feature\n 's7', // Legible fonts\n 's10', // Reading Guide\n 's12', //Tooltips\n 's13', // Pause animations\n 's14', // Text spacing\n 's15', //Dyslexia Font\n 's16', //Mask reader\n 's17', // Line height\n 's19', // text align\n 's23', // Saturation\n];\nexport const userWayConfig = {\n s2: {\n disabled: `window.UserWay.bigCursorDisable()`,\n enabled: `window.UserWay.bigCursorEnable()`,\n },\n s3: {\n disabled: `window.UserWay.contrastDisable()`,\n enabled: `window.UserWay.contrastEnable(parseInt(value))`,\n },\n s4: {\n disabled: `window.UserWay.bigTextDisable()`,\n enabled: `window.UserWay.bigTextEnable(parseInt(value))`,\n },\n s6: {\n disabled: `window.UserWay.highlightDisable()`,\n enabled: `window.UserWay.highlightToggle()`,\n },\n s7: {\n disabled: `window.UserWay.legibleFontsDisable()`,\n enabled: `window.UserWay.legibleFontsToggle()`,\n },\n s10: {\n disabled: `window.UserWay.readingGuideDisable()`,\n enabled: `window.UserWay.readingGuideEnable()`,\n },\n s12: {\n disabled: `window.UserWay.tooltipsDisable()`,\n enabled: `window.UserWay.tooltipsToggle()`,\n },\n s13: {\n disabled: `window.UserWay.stopAnimationDisable()`,\n enabled: `window.UserWay.stopAnimationToggle()`,\n },\n s14: {\n disabled: `window.UserWay.textSpacingDisable()`,\n enabled: `(function enable(){\n const input = document.querySelector('.${\"message-input\" /* TestClassName.MessageInput */}');\n input.classList.add(\"userway-s14-active\");\n window.UserWay.textSpacingEnable(parseInt(value));\n })();\n `,\n },\n s15: {\n disabled: `window.UserWay.dyslexiaFontDisable()`,\n enabled: `window.UserWay.dyslexiaFontToggle()`,\n },\n s16: { disabled: `window.UserWay.readingMaskDisable()` },\n s17: {\n disabled: `window.UserWay.lineHeightDisable()`,\n enabled: `window.UserWay.lineHeightEnable(parseInt(value))`,\n },\n s19: {\n disabled: `window.UserWay.textAlignDisable()`,\n enabled: `window.UserWay.textAlignEnable(parseInt(value))`,\n },\n s23: {\n disabled: `window.UserWay.saturationDisable()`,\n enabled: `window.UserWay.saturationEnable(parseInt(value))`,\n },\n};\n","import debug from 'debug';\nimport { isbot } from 'isbot';\nimport debounce from 'lodash-es/debounce';\nimport throttle from 'lodash-es/throttle';\nimport { UPDATE_ACTIVITY_INTERVAL_MS } from '@/config/constants';\nimport { IframeEventType, WebClientEventType, } from '@/ts';\nimport { userWayEvents } from '@/util/userway';\nimport { createIframeUrl, createNewIframeUrl, isWindowMobile, parseEvent, sleep, } from '@/util/utils';\n/**\n * Communicates messages between the main page and the web-client iframe.\n * It generates a unique id to identify the iframe\n */\nexport class WidgetController {\n constructor({ config, version = 'v1' }) {\n this.detectUserway = () => {\n userWayEvents.forEach((event) => {\n document.addEventListener(`userway:feature_enabled_${event}`, () => {\n var _a;\n const value = (_a = localStorage.getItem(`userway-${event}`)) !== null && _a !== void 0 ? _a : '';\n this.sendEventToIframe({\n type: WebClientEventType.UserWayEnabled,\n data: {\n eventType: event,\n value,\n },\n });\n });\n document.addEventListener(`userway:feature_disabled_${event}`, () => {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayDisabled,\n data: {\n eventType: event,\n },\n });\n });\n });\n };\n this.initUserway = () => {\n const data = Object.assign({}, localStorage);\n Object.keys(data).forEach((key) => {\n const value = data[key] === 'true' ? data[key] : data[key];\n if (key.includes('userway-s') &&\n (!isNaN(parseInt(value)) || value === 'true')) {\n const id = key.split('-')[1];\n if (value === '0') {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayDisabled,\n data: {\n eventType: id,\n },\n });\n }\n else {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayEnabled,\n data: {\n eventType: id,\n value,\n },\n });\n }\n }\n });\n };\n this.detectMobile = () => {\n this.sendEventToIframe({\n type: WebClientEventType.WindowResize,\n data: {\n is_mobile: isWindowMobile(),\n width: window.innerWidth,\n height: window.innerHeight,\n },\n });\n this.isMobile = isWindowMobile();\n };\n this.trackActivity = () => {\n const updateLastActivity = () => {\n this.sendEventToIframe({\n type: WebClientEventType.SessionActivity,\n data: 'active',\n });\n };\n const trackLastActivity = throttle(updateLastActivity, UPDATE_ACTIVITY_INTERVAL_MS);\n window.onload = trackLastActivity;\n window.onmousemove = trackLastActivity;\n window.onmousedown = trackLastActivity; // catches touchscreen presses as well\n window.ontouchstart = trackLastActivity; // catches touchscreen swipes as well\n window.ontouchmove = trackLastActivity; // required by some devices\n window.onclick = trackLastActivity; // catches touchpad clicks as well\n window.onkeydown = trackLastActivity;\n window.addEventListener('scroll', trackLastActivity, true);\n };\n this.config = config;\n this.id = config.widgetId;\n this.initialized = false;\n this.log = debug(`moveo:web-client:${this.id}`);\n this.version = version;\n this.iframe = this.createIframe();\n this.isMobile = null;\n }\n createIframe() {\n const iframe = document.createElement('iframe');\n iframe.width = '1px';\n iframe.height = '1px';\n iframe.title = 'Moveo webchat';\n iframe.id = this.id;\n iframe.name = this.id;\n iframe.allow = 'geolocation';\n iframe.style.border = '0';\n iframe.classList.add('web-client-container');\n if (this.config.widget_position === 'embed') {\n iframe.classList.add('embed');\n }\n if (this.version !== 'v2') {\n iframe.setAttribute('src', createIframeUrl(this.id, this.version));\n }\n else {\n iframe.setAttribute('src', createNewIframeUrl(this.id));\n }\n return iframe;\n }\n handleEvents(resolve, reject) {\n return (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n switch (event.type) {\n case IframeEventType.IframeLoaded: {\n this.sendEventToIframe({\n type: WebClientEventType.SetConfig,\n data: this.config,\n });\n break;\n }\n case IframeEventType.IframeError: {\n return reject(event.data);\n }\n case IframeEventType.UserWayInit: {\n this.initUserway();\n this.detectUserway();\n break;\n }\n case IframeEventType.WidgetLoaded: {\n setTimeout(() => {\n this.detectMobile();\n resolve(this);\n }, 0);\n break;\n }\n case IframeEventType.WidgetError: {\n this.notify(event);\n break;\n }\n case IframeEventType.Opened: {\n if (event.data.isFull || event.data.is_mobile) {\n this.iframe.classList.add('full');\n }\n break;\n }\n case IframeEventType.Closed: {\n if (event.data.isFull) {\n this.iframe.classList.remove('full');\n }\n break;\n }\n case IframeEventType.Resize: {\n this.iframe.style.width = event.data.width;\n this.iframe.style.height = event.data.height;\n this.iframe.style.left = event.data.left;\n if (event.data.top != null) {\n this.iframe.style.top = event.data.top;\n this.iframe.style.bottom = 'auto';\n }\n break;\n }\n default: {\n this.log(`Unhandle event: ${event.type}`);\n }\n }\n };\n }\n init() {\n return new Promise((resolve, reject) => {\n var _a, _b;\n if (isbot(navigator.userAgent)) {\n throw new Error(`Widget ${this.id} was not initialized because user-agent is a bot`);\n }\n if (this.initialized) {\n throw new Error(`Widget ${this.id} was already initialized`);\n }\n window.addEventListener('message', this.handleEvents(resolve, reject));\n window.addEventListener('resize', debounce(this.detectMobile, 100));\n this.trackActivity();\n if (this.config.widget_position === 'embed') {\n let element = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.element) || null;\n if (typeof element === 'string') {\n element = document.getElementById(element);\n if (!element) {\n throw new Error(`Element with id: ${element} not found`);\n }\n }\n // Add the widget to the provided element\n element === null || element === void 0 ? void 0 : element.appendChild(this.iframe);\n }\n else {\n (_b = window.document.querySelector('body')) === null || _b === void 0 ? void 0 : _b.appendChild(this.iframe);\n }\n this.initialized = true;\n this.detectMobile();\n });\n }\n /**\n * Sends a message to the iframe using the iframe id as prefix.\n */\n sendEventToIframe(event) {\n var _a;\n if (this.iframe && this.iframe.contentWindow) {\n this.log(`Event to iframe: ${event.type}`, event);\n if (event.type === WebClientEventType.SetConfig && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.element)) {\n delete event.data.element;\n }\n // Add the `widgetId` to the event type\n this.iframe.contentWindow.postMessage(Object.assign(Object.assign({}, event), { type: `${this.id}${event.type}` }), '*');\n }\n else {\n this.log('Error: Cannot find iframe to send event');\n }\n }\n notify(event) {\n this.log(`notify ${event.type}:`, event);\n }\n notifyParent(eventType, callback) {\n window.addEventListener('message', (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n this.log(`Event from iframe: ${event.type}`, event);\n if (event.type === eventType) {\n if ('data' in event &&\n typeof event.data === 'object' &&\n event.data !== null &&\n 'skipInstanceCallback' in event.data) {\n return;\n }\n if ('data' in event) {\n callback(event.data);\n }\n else {\n callback();\n }\n }\n });\n }\n // --------------------------------\n // Start the instance methods here.\n // --------------------------------\n openWindow() {\n this.sendEventToIframe({\n type: WebClientEventType.Open,\n });\n }\n async destroy() {\n this.closeConversation({ hide: true });\n await sleep(4000);\n // Remove the iframe from the DOM\n const element = document.getElementById(this.id);\n if (element) {\n element.remove();\n this.initialized = false;\n }\n }\n closeConversation({ hide }) {\n this.sendEventToIframe({\n type: WebClientEventType.CloseConversation,\n data: { hide },\n });\n }\n closeWindow() {\n this.sendEventToIframe({ type: WebClientEventType.Close });\n }\n sendMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.SendMessage,\n data: message,\n });\n }\n /**\n * Programmatically triggers the teaser message (opening message bubble).\n * @param message - Optional custom message text to display. If not provided,\n * uses the configured `welcome_message` or page trigger message.\n */\n showTeaserMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.ShowTeaserMessage,\n data: message ? { text: message } : undefined,\n });\n }\n updateContext(data) {\n this.sendEventToIframe({\n type: WebClientEventType.UpdateContext,\n data,\n });\n }\n /**\n * Sets CSS variables for visual customization.\n *\n * @example\n * setCSSVariables({\n * '--color-accent': '#ff0000',\n * '--color-background': '#ffffff'\n * })\n *\n * @param data - CSS variables to set (key-value pairs)\n */\n setCSSVariables(data) {\n this.sendEventToIframe({\n type: WebClientEventType.SetCssVariables,\n data,\n });\n }\n setLocale(locale) {\n this.sendEventToIframe({\n type: WebClientEventType.SetLocale,\n data: locale,\n });\n }\n onSessionCreated(callback) {\n this.notifyParent(IframeEventType.SessionCreated, callback);\n }\n onSessionClosed(callback) {\n this.notifyParent(IframeEventType.SessionClosed, callback);\n }\n onConversationClosed(callback) {\n this.notifyParent(IframeEventType.ConversationClosed, callback);\n }\n onSessionReconnected(callback) {\n this.notifyParent(IframeEventType.SessionReconnected, callback);\n }\n onNoUnreadMessages(callback) {\n this.notifyParent(IframeEventType.ConversationNoUnreadMessages, callback);\n }\n onUnreadMessages(callback) {\n this.notifyParent(IframeEventType.ConversationUnreadMessages, callback);\n }\n onLinkClicked(callback) {\n this.notifyParent(IframeEventType.LinkClicked, callback);\n }\n onUserActivity(callback) {\n this.notifyParent(IframeEventType.UserActivity, callback);\n }\n onAnalyticsEvent(callback) {\n this.notifyParent(IframeEventType.AnalyticsEvent, callback);\n }\n onWebchatOpened(callback) {\n this.notifyParent(IframeEventType.Opened, callback);\n }\n onWebchatClosed(callback) {\n this.notifyParent(IframeEventType.Closed, callback);\n }\n onMemberLeave(callback) {\n this.notifyParent(IframeEventType.MemberLeave, callback);\n }\n}\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import debug from 'debug';\nimport { nanoid } from 'nanoid';\nimport { merge } from 'ts-deepmerge';\nimport { onDocumentReady, fetchIntegration } from '@/util/utils';\nimport { WidgetController } from './controller/controller';\nimport '@/styles/web-client.scss';\nlet log = debug('moveo:web-client');\n/**\n * Loads the integration configuration and merges it\n * with the user-supplied configuration,\n */\nconst loadWebClientConfig = async (userConfig) => {\n const widgetId = `moveo-${nanoid(5)}`;\n const clientUrl = window.location.href;\n log = log.extend(`:${widgetId}`);\n if (!(userConfig === null || userConfig === void 0 ? void 0 : userConfig.integrationId)) {\n throw new Error('integrationId is required.\\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })');\n }\n const widgetConfig = await fetchIntegration(userConfig.integrationId, userConfig.host);\n log('Loaded integration configuration:', widgetConfig);\n // Overwrite the widget configuration with the user configuration\n return Object.assign(Object.assign({}, merge(Object.assign({}, widgetConfig), userConfig)), { clientUrl,\n widgetId });\n};\n/**\n * Initializes the iframe, appends it to the body and return an instance.\n *\n */\nexport const init = async (userConfig) => {\n var _a;\n // 1. Wait for the Client DOM to be fully loaded\n await onDocumentReady();\n // 2. Load integration config and combine it with the user configuration\n // the window location and the device information.\n // This method prepares all the info we can gather from the client's web page\n const webClientConfig = await loadWebClientConfig(userConfig);\n log('Configuration:', webClientConfig);\n if (webClientConfig.widget_position === 'embed' && !webClientConfig.element) {\n throw new Error('element is not defined but required by embed widget');\n }\n // 3. Create a controller to manage the communication\n // between the customer and the web-client.\n // The messages will be filtered based on the widgetId\n // Check for webchat_v2 feature flag to determine version\n const shouldUseV2 = ((_a = webClientConfig.feature_flags) === null || _a === void 0 ? void 0 : _a.webchat_v2) === true;\n const version = shouldUseV2 ? 'v2' : userConfig.version || 'v1';\n const controller = new WidgetController({\n config: webClientConfig,\n version,\n });\n // 4. Initialize the controller which creates and attach the iframe along\n // with all the event listeners\n log('Initializing');\n const instance = await controller.init();\n log('Initialized');\n return instance;\n};\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n"],"names":["root","factory","exports","module","define","amd","this","cssWithMappingToString","list","toString","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","formatArgs","args","useColors","namespace","humanize","diff","c","color","splice","index","lastC","replace","match","save","namespaces","storage","setItem","removeItem","error","load","r","getItem","process","env","DEBUG","window","type","__nwjs","navigator","userAgent","toLowerCase","m","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","parseInt","localStorage","localstorage","destroy","warned","warn","colors","log","debug","formatters","j","v","JSON","stringify","message","options","update","remove","styleElement","insertStyleElement","obj","css","sourceMap","btoa","unescape","encodeURIComponent","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","enabled","self","curr","Number","Date","ms","prev","coerce","unshift","format","formatter","val","call","selectColor","extend","Object","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","matchesTemplate","search","template","searchIndex","templateIndex","starIndex","matchIndex","default","Error","stack","disable","names","skips","enable","split","trim","filter","Boolean","ns","slice","name","skip","keys","forEach","key","hash","charCodeAt","Math","abs","cssMapping","base64","data","sourceMapping","s","h","d","w","plural","msAbs","n","isPlural","round","str","String","exec","parseFloat","parse","isFinite","long","fmtShort","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","references","updater","addElementStyle","byIndex","api","domAPI","newObj","lastIdentifiers","newList","newLastIdentifiers","_i","_index","___CSS_LOADER_EXPORT___","memo","insert","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","appendChild","nonce","setAttribute","element","createElement","setAttributes","attributes","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","a","definition","o","g","globalThis","Function","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nc","isObject","getPrototypeOf","merge","objects","reduce","current","Array","isArray","TypeError","includes","mergeArrays","uniqueArrayItems","from","Set","allowUndefinedOverrides","defaultOptions","withOptions","assign","config","isWindowMobile","innerWidth","innerHeight","parseEvent","widgetId","event","_a","_b","eventType","startsWith","pattern","naivePattern","SessionStatus","IframeEventType","WebClientEventType","ChatModal","TestClassName","freeSelf","now","reWhitespace","reTrimStart","string","test","charAt","objectProto","nativeObjectToString","symToStringTag","isOwn","tag","unmasked","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","other","valueOf","isBinary","nativeMax","max","nativeMin","min","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","timeWaiting","remainingWait","debounced","isInvoking","arguments","leadingEdge","clearTimeout","cancel","flush","userWayEvents","WidgetController","constructor","version","detectUserway","addEventListener","sendEventToIframe","UserWayEnabled","UserWayDisabled","initUserway","isNaN","detectMobile","WindowResize","is_mobile","width","height","isMobile","trackActivity","trackLastActivity","SessionActivity","onload","onmousemove","onmousedown","ontouchstart","ontouchmove","onclick","onkeydown","initialized","iframe","createIframe","title","allow","border","classList","add","widget_position","url","scripts","querySelectorAll","regex","script","src","origin","location","createIframeUrl","_c","createNewIframeUrl","handleEvents","resolve","reject","messageEvent","IframeLoaded","SetConfig","IframeError","UserWayInit","WidgetLoaded","WidgetError","notify","Opened","isFull","Closed","Resize","left","top","bottom","Promise","RegExp","getPattern","getElementById","contentWindow","postMessage","notifyParent","callback","openWindow","Open","closeConversation","hide","CloseConversation","closeWindow","Close","sendMessage","SendMessage","showTeaserMessage","ShowTeaserMessage","text","updateContext","UpdateContext","setCSSVariables","SetCssVariables","setLocale","locale","SetLocale","onSessionCreated","SessionCreated","onSessionClosed","SessionClosed","onConversationClosed","ConversationClosed","onSessionReconnected","SessionReconnected","onNoUnreadMessages","ConversationNoUnreadMessages","onUnreadMessages","ConversationUnreadMessages","onLinkClicked","LinkClicked","onUserActivity","UserActivity","onAnalyticsEvent","AnalyticsEvent","onWebchatOpened","onWebchatClosed","onMemberLeave","MemberLeave","locals","loadWebClientConfig","async","userConfig","size","bytes","crypto","getRandomValues","Uint8Array","nanoid","clientUrl","href","integrationId","widgetConfig","host","channelHost","getConfig","response","fetch","headers","ok","fetchIntegration","readyState","webClientConfig","feature_flags","webchat_v2","controller","instance"],"ignoreList":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"web-client.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,UAAW,GAAIH,GACI,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,GACnB,CATD,CASGK,KAAM,WACT,O,qFCPIC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,4TAA6T,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,0KAA0K,eAAiB,CAAC,krBAAkrB,WAAa,MAE5zC,K,gCCDAN,EAAOD,QAAU,SAA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gBxQ,QAChE,MAAM,IAAI7E,MAAM,uDAMpB,MACM+M,GAD4G,KAApD,QAAxClE,EAAKwM,EAAgBC,qBAAkC,IAAPzM,OAAgB,EAASA,EAAG0M,YACpE,KAAOtB,EAAWlH,SAAW,KACrDyI,EAAa,IAAI3I,EAAiB,CACpC1E,OAAQkN,EACRtI,YAIJ3P,GAAI,gBACJ,MAAMqY,QAAiBD,EAAWnW,OAElC,OADAjC,GAAI,eACGqY,E","sources":["webpack://MoveoAI/webpack/universalModuleDefinition","webpack://MoveoAI/./src/styles/web-client.scss","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/api.js","webpack://MoveoAI/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://MoveoAI/./node_modules/debug/src/browser.js","webpack://MoveoAI/./node_modules/debug/src/common.js","webpack://MoveoAI/./node_modules/ms/index.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://MoveoAI/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://MoveoAI/webpack/bootstrap","webpack://MoveoAI/webpack/runtime/compat get default export","webpack://MoveoAI/webpack/runtime/define property getters","webpack://MoveoAI/webpack/runtime/global","webpack://MoveoAI/webpack/runtime/hasOwnProperty shorthand","webpack://MoveoAI/webpack/runtime/make namespace object","webpack://MoveoAI/webpack/runtime/nonce","webpack://MoveoAI/./node_modules/ts-deepmerge/esm/index.js","webpack://MoveoAI/./src/config/config.ts","webpack://MoveoAI/./src/config/constants.ts","webpack://MoveoAI/./src/util/utils.ts","webpack://MoveoAI/./node_modules/isbot/index.mjs","webpack://MoveoAI/./node_modules/lodash-es/isObject.js","webpack://MoveoAI/./src/ts/index.ts","webpack://MoveoAI/./node_modules/lodash-es/_freeGlobal.js","webpack://MoveoAI/./node_modules/lodash-es/_root.js","webpack://MoveoAI/./node_modules/lodash-es/now.js","webpack://MoveoAI/./node_modules/lodash-es/_trimmedEndIndex.js","webpack://MoveoAI/./node_modules/lodash-es/_baseTrim.js","webpack://MoveoAI/./node_modules/lodash-es/_Symbol.js","webpack://MoveoAI/./node_modules/lodash-es/_getRawTag.js","webpack://MoveoAI/./node_modules/lodash-es/_objectToString.js","webpack://MoveoAI/./node_modules/lodash-es/_baseGetTag.js","webpack://MoveoAI/./node_modules/lodash-es/toNumber.js","webpack://MoveoAI/./node_modules/lodash-es/isSymbol.js","webpack://MoveoAI/./node_modules/lodash-es/isObjectLike.js","webpack://MoveoAI/./node_modules/lodash-es/debounce.js","webpack://MoveoAI/./src/util/userway.ts","webpack://MoveoAI/./src/controller/controller.ts","webpack://MoveoAI/./node_modules/lodash-es/throttle.js","webpack://MoveoAI/./src/styles/web-client.scss?6ea3","webpack://MoveoAI/./src/index.tsx","webpack://MoveoAI/./node_modules/nanoid/index.browser.js","webpack://MoveoAI/./node_modules/nanoid/url-alphabet/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"MoveoAI\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MoveoAI\"] = factory();\n\telse\n\t\troot[\"MoveoAI\"] = factory();\n})(this, function() {\nreturn ","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".web-client-container{position:fixed;bottom:0;right:0;cursor:pointer;z-index:10022;max-height:99%}.web-client-container.embed{position:static;width:100% !important;height:100% !important;max-height:100%}.web-client-container.full{width:100% !important;height:100% !important;inset:0 !important;max-height:initial}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/styles/web-client.scss\"],\"names\":[],\"mappings\":\"AAIA,sBAIE,cAAA,CACA,QAAA,CACA,OAAA,CACA,cAAA,CACA,aAPiB,CAQjB,cAPoB,CASpB,4BACE,eAAA,CACA,qBAAA,CACA,sBAAA,CACA,eAAA,CAIF,2BACE,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,kBAAA\",\"sourcesContent\":[\"// This style is applied to the iframe that customers load.\\n// Ideally we use style variables rather than this so that\\n// we can use the widget-id.\\n\\n.web-client-container {\\n $widget-z-index: 10022;\\n $widget-max-height: 99%;\\n\\n position: fixed;\\n bottom: 0;\\n right: 0;\\n cursor: pointer;\\n z-index: $widget-z-index;\\n max-height: $widget-max-height;\\n\\n &.embed {\\n position: static;\\n width: 100% !important;\\n height: 100% !important;\\n max-height: 100%;\\n }\\n\\n // ! Important because this happens on the clients website\\n &.full {\\n width: 100% !important;\\n height: 100% !important;\\n inset: 0 !important;\\n max-height: initial;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","// istanbul ignore next\nconst isObject = (obj) => {\n if (typeof obj === \"object\" && obj !== null) {\n if (typeof Object.getPrototypeOf === \"function\") {\n const prototype = Object.getPrototypeOf(obj);\n return prototype === Object.prototype || prototype === null;\n }\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n }\n return false;\n};\nexport const merge = (...objects) => objects.reduce((result, current) => {\n if (current === undefined) {\n return result;\n }\n if (Array.isArray(current)) {\n throw new TypeError(\"Arguments provided to ts-deepmerge must be objects, not arrays.\");\n }\n Object.keys(current).forEach((key) => {\n if ([\"__proto__\", \"constructor\", \"prototype\"].includes(key)) {\n return;\n }\n if (Array.isArray(result[key]) && Array.isArray(current[key])) {\n result[key] = merge.options.mergeArrays\n ? merge.options.uniqueArrayItems\n ? Array.from(new Set(result[key].concat(current[key])))\n : [...result[key], ...current[key]]\n : current[key];\n }\n else if (isObject(result[key]) && isObject(current[key])) {\n result[key] = merge(result[key], current[key]);\n }\n else if (!isObject(result[key]) && isObject(current[key])) {\n result[key] = merge(current[key], undefined);\n }\n else {\n result[key] =\n current[key] === undefined\n ? merge.options.allowUndefinedOverrides\n ? current[key]\n : result[key]\n : current[key];\n }\n });\n return result;\n}, {});\nconst defaultOptions = {\n allowUndefinedOverrides: true,\n mergeArrays: true,\n uniqueArrayItems: true,\n};\nmerge.options = defaultOptions;\nmerge.withOptions = (options, ...objects) => {\n merge.options = Object.assign(Object.assign({}, defaultOptions), options);\n const result = merge(...objects);\n merge.options = defaultOptions;\n return result;\n};\n","const config = {\n CHANNELS_HOST: 'https://channels-ws.moveo.ai',\n BRAIN_AVATAR: 'https://res.cloudinary.com/moveo-ai/image/upload/v1637720224/avatars/images_wgdkxm.jpg',\n TEST_INTEGRATION_ID: 'fake-integration-id',\n};\nexport const getConfig = () => config;\n","/**\n * Mapping of country codes to their respective language names.\n * Provides a record of language names based on ISO country codes.\n */\nexport const languageByCountryCode = {\n en: 'English',\n el: 'Ελληνικά',\n es: 'Español',\n pt: 'Português',\n 'pt-br': 'Português brasileiro',\n it: 'Italiano',\n fr: 'Français',\n da: 'Dansk',\n de: 'Deutsch',\n ro: 'Română',\n bg: 'Български',\n cs: 'Čeština',\n pl: 'Polski',\n id: 'Bahasa Indonesia',\n me: 'Montenegrin',\n nl: 'Nederlands',\n 'nl-be': 'Nederlands (België)',\n sr: 'Српски',\n sv: 'Svenska',\n ru: 'Русский',\n sq: 'Shqip',\n ar: 'العربية',\n ja: '日本語',\n zh: '中文',\n tr: 'Türkçe',\n tl: 'Tagalog',\n};\n// Keep in sync with brand defaults in src/index.css\nexport const DEFAULT_BACKGROUND_COLOR = '#1B66D6'; // --color-brand-background\nexport const DEFAULT_ACCENT_COLOR = '#ffffff'; // --color-brand-foreground\n/**\n * URL of the next version of the web client.\n */\nexport const WEB_CLIENT_NEXT_URL = 'https://web-client.dev.moveo.ai';\n/**\n * URL of the production web client.\n */\nexport const WEB_CLIENT_URL = 'https://web-client.moveo.ai';\n/**\n * URL of the new web client.\n */\nexport const WEB_CLIENT_URL_NEW = 'https://web.moveo.ai';\nexport const WEB_CLIENT_URL_NEW_DEV = 'https://web.dev.moveo.ai';\n/**\n * Timeout duration in milliseconds for modals.\n * Specifies the time duration for modal timeouts.\n * The value is 400 milliseconds.\n */\nexport const MODAL_TIMEOUT = 400;\n/**\n * Minimum number of messages required to show a survey.\n * Specifies the minimum number of messages required to trigger a survey display.\n * The value is 3.\n */\nexport const MINIMUM_MESSAGES_TO_SHOW_SURVEY = 3;\nexport const LOCAL_EVENT = 'local-storage';\nexport const STORAGE_EVENT = 'storage';\n/**\n * The size in pixels of the custom launcher image.\n * The value is 72 pixels.\n **/\nexport const CUSTOM_LAUNCHER_SIZE_PX = '72px';\n/**\n * The width of the expanded chat.\n * The value is 672 pixels.\n **/\nexport const EXPANDED_CHAT_WIDTH = '672px';\n/**\n * The size in pixels of the bubble image.\n * The value is 60 pixels.\n **/\nexport const BUBBLE_SIZE_PX = '60px';\n/**\n * The maximum number of minutes that user can be inactive before we consider\n * them to reconnect to the server.\n * The value is 30 minutes.\n */\nexport const MAX_INACTIVITY_TO_RECONNECT_MS = 30 * 60 * 1000; // 30 minutes\n/**\n * The interval, in milliseconds, at which the inactivity is checked.\n * The value is 10 seconds.\n * */\nexport const CHECK_INACTIVITY_INTERVAL_MS = 10 * 1000; // 10 seconds\n/**\n * The interval to use when updating the visitor activity in local storage\n * The value is 3 seconds.\n * */\nexport const UPDATE_ACTIVITY_INTERVAL_MS = 3 * 1000; // 3 seconds\n/**\n * The duration, in milliseconds, of inactivity timeout.\n * This variable represents the amount of time that can elapse without any user activity\n * before considering the user as inactive.\n * The value is 10 minutes.\n */\nexport const INACTIVITY_TIMEOUT_MS = 10 * 60 * 1000;\n/**\n * The maximum duration, in milliseconds, that the compose indicator\n * will be displayed\n * The value is 30 seconds.\n */\nexport const MAX_TYPING_INDICATOR_MS = 30000;\n/**\n * The maximum duration, in milliseconds, that can elapse before\n * considering the user as having stopped typing.\n * The value is 1.1 seconds.\n */\nexport const MAX_TYPING_DURATION_MS = 1100;\n/**\n * The maximum length, in characters for user messages.\n * The value is 280 characters.\n */\nexport const MAX_CHARS = 280;\nexport const NEW_MAX_CHARS = 512;\n/**\n * The interval, in milliseconds, at which the last activity is sent to the server.\n * The value is 10 seconds.\n */\nexport const DEFAULT_UPDATE_INTERVAL_MS = 10 * 1000; // 10 seconds\n/**\n * The interval, in milliseconds, at which the session id is checked in\n * local storage. This is used to detect if the user create another session\n * in another tab.\n * The value is 5 seconds.\n **/\nexport const SESSION_ID_CHECK_INTERVAL_MS = 5000; // 5 seconds\nexport const isArabic = (text) => {\n const arabicRegex = /[\\u0600-\\u06FF]/;\n return arabicRegex.test(text) ? 'rtl' : 'ltr';\n};\nexport const NUMBER_OF_ACCEPTED_FILES = 4;\nexport const ONE_MB = 1024 * 1024;\nexport const MAX_FILE_SIZE = 20 * ONE_MB;\nexport const ACCEPTED_FILE_TYPES = {\n 'application/pdf': ['.pdf'],\n 'text/plain': ['.txt', '.csv'],\n 'application/msword': ['.doc', '.docx'],\n 'application/vnd.ms-excel': ['.xls', '.xlsx'],\n 'application/vnd.ms-powerpoint': ['.ppt', '.pptx'],\n 'image/jpeg': ['.jpg', '.jpeg'],\n 'image/png': ['.png'],\n 'image/gif': ['.gif'],\n};\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport truncate from 'lodash-es/truncate';\nimport uniq from 'lodash-es/uniq';\nimport scrollIntoView from 'smooth-scroll-into-view-if-needed';\nimport { getConfig } from '../config/config';\nimport { WEB_CLIENT_NEXT_URL, WEB_CLIENT_URL, WEB_CLIENT_URL_NEW, WEB_CLIENT_URL_NEW_DEV, } from '../config/constants';\n/**\n * Fetches the integration configuration\n * @param host the channels host\n * @param id the integration id\n * @returns\n */\nexport const fetchIntegration = async (id, host) => {\n const channelHost = host || getConfig().CHANNELS_HOST;\n const response = await fetch(`${channelHost}/v1/web/${id}`, {\n headers: {\n 'Cache-Control': 'no-cache',\n },\n });\n const text = await response.text();\n if (response.ok) {\n const data = JSON.parse(text);\n return data;\n }\n throw new Error(`Error loading config from: ${channelHost}/${id}`);\n};\n/**\n * Promise that resolves when the document is ready.\n *\n */\n/**\n * Promise that resolves when the document is ready.\n * @returns Promise that resolves when document is fully loaded\n */\nexport const onDocumentReady = () => new Promise((resolve) => {\n if (document.readyState === 'complete') {\n return resolve();\n }\n else {\n window.addEventListener('load', () => {\n return resolve();\n });\n }\n});\n/**\n * Creates a promise that resolves after a specified delay.\n * @param ms - Number of milliseconds to wait\n * @returns Promise that resolves after the delay\n */\nexport const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));\n/**\n * Gets the current timestamp in milliseconds.\n * @returns Current timestamp as number\n */\nexport const getTimestamp = () => Date.now();\nexport const KEYS = {\n UP: 'ArrowUp',\n DOWN: 'ArrowDown',\n ESC: 'Escape',\n ENTER: 'Enter',\n DELETE: 'Delete',\n SPACE: 'Space',\n TAB: 'Tab',\n};\nexport const emailRegExp = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))){2,}$/i;\n/**\n * Validates and converts a YouTube URL to an embeddable format.\n * @param text - The YouTube URL to validate and convert\n * @returns Embeddable YouTube URL or false if invalid\n */\nexport const validateYouTubeUrl = (text) => {\n if (text) {\n const regExp = /^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=|\\?v=)([^#\\&\\?]*).*/;\n const match = text.match(regExp);\n if (match && match[2].length == 11) {\n return `https://www.youtube.com/embed/${match[2]}?autoplay=0`;\n }\n }\n return false;\n};\n/**\n * Determines if the current window is considered mobile based on dimensions.\n * @returns True if window is mobile-sized, false otherwise\n */\nexport const isWindowMobile = () => window.innerWidth < 650 ||\n (window.innerHeight < 550 && window.innerWidth < 1000);\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createIframeUrl = (widgetId, version = 'v1') => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n const regex = /@moveo-ai\\/web-client.*next/;\n if (scripts) {\n scripts.forEach((script) => {\n var _a;\n if ((_a = script.src) === null || _a === void 0 ? void 0 : _a.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost, specific moveo-ai deployment on Vercel,\n // or other conditions by looking at the origin\n const { origin } = window.location;\n if (!url) {\n if (origin.match(/localhost:8880/) ||\n origin.match(/web-client.*moveo-ai\\.vercel\\.app/)) {\n url = origin; // Load from localhost or a web-client deployment in Vercel\n }\n else if (origin.match(/web-client\\.dev/)) {\n url = WEB_CLIENT_NEXT_URL; // Specific web-client development URL\n }\n else {\n url = WEB_CLIENT_URL; // Default to the production web-client URL\n }\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}&version=${version}`;\n};\n/**\n * Returns the URL that will be use to load the iframe\n */\nexport const createNewIframeUrl = (widgetId) => {\n // 1. Check if using the beta/next release by looking at the script src\n let url = '';\n const scripts = document.querySelectorAll('script');\n if (scripts) {\n scripts.forEach((script) => {\n var _a, _b, _c;\n if ((_a = script.src) === null || _a === void 0 ? void 0 : _a.includes(WEB_CLIENT_URL_NEW_DEV)) {\n url = WEB_CLIENT_URL_NEW_DEV;\n }\n if ((_b = script.src) === null || _b === void 0 ? void 0 : _b.includes(WEB_CLIENT_URL_NEW)) {\n url = WEB_CLIENT_URL_NEW;\n }\n const regex = /@moveo-ai\\/web-client.*next/;\n if ((_c = script.src) === null || _c === void 0 ? void 0 : _c.match(regex)) {\n url = WEB_CLIENT_NEXT_URL;\n }\n });\n }\n // 2. Check if using localhost, specific moveo-ai deployment on Vercel,\n // or other conditions by looking at the origin\n const { origin } = window.location;\n if (!url) {\n if (origin.match(/localhost:8880/) ||\n origin.match(/web-client.*moveo-ai\\.vercel\\.app/) ||\n origin.match(/web.*moveo\\.ai/)) {\n url = origin; // Load from localhost , from cloudflare preview or a deployment in Vercel\n }\n else {\n url = WEB_CLIENT_URL_NEW; // Default to the production web-client URL\n }\n }\n // 4. Append the WidgetId to the iframe so that this window and the iframe can\n // stablish a communication channel\n return `${url}?widgetId=${widgetId}&version=v2`;\n};\n/**\n * Parses a message event and extracts the event type and data.\n * @param widgetId - The widget ID to filter events\n * @param event - The message event to parse\n * @returns Parsed event object or null if invalid\n */\nexport const parseEvent = (widgetId, event) => {\n var _a, _b;\n const eventType = (_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.type;\n if (typeof eventType !== 'string' || !eventType.startsWith(widgetId)) {\n return null;\n }\n // Extract the event type by removing the prefix `widgetId`\n const type = eventType.replace(widgetId, '');\n const data = (_b = event.data) === null || _b === void 0 ? void 0 : _b.data;\n return { type, data };\n};\n/**\n * Determines if the parent URL is a test environment.\n * @param parentUrl - The parent URL to check\n * @returns True if URL is a test environment, false otherwise\n */\nexport const isTest = (parentUrl) => {\n if (parentUrl) {\n const url = new URL(parentUrl).origin;\n if (url.match(/localhost:|vercel.app/) ||\n url === WEB_CLIENT_NEXT_URL ||\n url === WEB_CLIENT_URL ||\n url === WEB_CLIENT_URL_NEW ||\n url === WEB_CLIENT_URL_NEW_DEV) {\n return true;\n }\n }\n return false;\n};\n/**\n * Checks if a value is a plain object (not array or null).\n * @param item - The value to check\n * @returns True if item is a plain object, false otherwise\n */\nfunction isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n}\n// From: stackoverflow.com/a/37164538\nexport function mergeDeep(target = {}, source = {}) {\n const output = Object.assign({}, target);\n if (isObject(target) && isObject(source)) {\n Object.keys(source).forEach((key) => {\n if (isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, { [key]: source[key] });\n }\n else {\n output[key] = mergeDeep(target[key], source[key]);\n }\n }\n else {\n Object.assign(output, { [key]: source[key] });\n }\n });\n }\n return output;\n}\n/**\n * Smoothly scrolls an element into view.\n * @param element - The element to scroll to\n * @param options - Additional scroll options to override defaults\n */\nexport const scrollToElement = (element, options = {}) => {\n scrollIntoView(element, Object.assign({ behavior: 'smooth', inline: 'end', block: 'end' }, options));\n};\n/**\n * Finds the file type based on the provided MIME type.\n * Supported types: 'image', 'video', 'audio', 'file'.\n */\n/**\n * Determines the file type category based on MIME type.\n * @param mimeType - The MIME type string to analyze\n * @returns File type category: 'image', 'video', 'audio', or 'file'\n */\nexport const getFileTypeFromMimeType = (mimeType) => {\n if (mimeType.startsWith('image/')) {\n return 'image';\n }\n if (mimeType.startsWith('video/')) {\n return 'video';\n }\n if (mimeType.startsWith('audio/')) {\n return 'audio';\n }\n return 'file';\n};\n// This number comes from the max length in orchestrator\nexport const MAX_CHARS_IN_TAG = 48;\n/**\n * Normalizes the tags in the provided context by:\n * - Removing empty or whitespace-only tags.\n * - Transliterating non-Latin characters into ASCII.\n * - Removing diacritic marks from characters.\n * - Truncating each tag to a maximum allowed length.\n * - Removing duplicate tags.\n * - Removing tags that are not latin or greek characters.\n *\n * @param context - The context object containing a `tags` array and other properties.\n * @returns The updated context object with normalized tags.\n */\nexport const normalizeTags = (_a) => {\n var { tags } = _a, rest = __rest(_a, [\"tags\"]);\n if (!tags) {\n return rest;\n }\n const normalizedTags = tags\n .map((tag) => {\n // This will return an undefined value that later will be filtered.\n if (typeof tag !== 'string') {\n return;\n }\n // Remove spaces at the end and beggining\n let normalizedTag = tag.trim();\n // After trimming the tag, check if it's empty\n if (!normalizedTag) {\n return;\n }\n // Convert non-latin characters to ASCII (Such as Greek)\n normalizedTag = greekToLatin(normalizedTag);\n // Remove diacritic marks\n normalizedTag = transliterateToAscii(normalizedTag);\n normalizedTag = normalizedTag.replace(/\\s+/g, '-');\n // Shorten tag to max length\n return truncate(normalizedTag, {\n length: MAX_CHARS_IN_TAG,\n // This avoids appending `...` to the end of the string\n omission: '',\n });\n })\n // Remove empty tags\n .filter((tag) => Boolean(tag));\n return Object.assign(Object.assign({}, rest), { tags: uniq(normalizedTags) });\n};\n/**\n * Converts Greek text to its Latin equivalent using a simple character mapping.\n *\n * This function replaces each Greek letter with its corresponding Latin transcription\n * based on common transliteration rules.\n *\n * @param text - The Greek text to be transliterated.\n * @returns The transliterated Latin text.\n */\nconst greekToLatin = (text) => {\n const map = {\n Α: 'A',\n Β: 'B',\n Γ: 'G',\n Δ: 'D',\n Ε: 'E',\n Ζ: 'Z',\n Η: 'H',\n Θ: 'Th',\n Ι: 'I',\n Κ: 'K',\n Λ: 'L',\n Μ: 'M',\n Ν: 'N',\n Ξ: 'X',\n Ο: 'O',\n Π: 'P',\n Ρ: 'R',\n Σ: 'S',\n Τ: 'T',\n Υ: 'Y',\n Φ: 'F',\n Χ: 'Ch',\n Ψ: 'Ps',\n Ω: 'O',\n α: 'a',\n β: 'b',\n γ: 'g',\n δ: 'd',\n ε: 'e',\n ζ: 'z',\n η: 'i',\n θ: 'th',\n ι: 'i',\n κ: 'k',\n λ: 'l',\n μ: 'm',\n ν: 'n',\n ξ: 'x',\n ο: 'o',\n π: 'p',\n ρ: 'r',\n σ: 's',\n ς: 's',\n τ: 't',\n υ: 'y',\n φ: 'f',\n χ: 'ch',\n ψ: 'ps',\n ω: 'o',\n };\n return text\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .split('')\n .map((char) => map[char] || char)\n .join('');\n};\n/**\n * Converts a string to its ASCII equivalent by:\n * - Normalizing Unicode characters to their decomposed form.\n * - Removing diacritic marks (accents, tildes, etc.).\n * - Removing any non-ASCII characters.\n *\n * @param {string} str - The input string to transliterate.\n * @returns {string} - The ASCII-only version of the input string.\n */\nconst transliterateToAscii = (str) => {\n return str\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[^\\x00-\\x7F]/g, '');\n};\n/**\n * Normalizes the display name in the context object.\n * If the display name is an empty string, it will be set to null.\n * When the value is null, channels will assign a default value such as\n * `Visitor <id>`.\n *\n * @param context - The context object containing user information\n * @returns The context object with normalized display name\n */\nexport const normalizeDisplayName = (context) => {\n if (!(context === null || context === void 0 ? void 0 : context.user)) {\n return context;\n }\n return Object.assign(Object.assign({}, context), { user: Object.assign(Object.assign({}, context.user), { display_name: context.user.display_name === '' ? null : context.user.display_name }) });\n};\n/**\n * Normalizes the email address in the context object.\n * - Splits multiple emails by comma, semicolon, or space\n * - Trims whitespace\n * - Converts to lowercase\n * - Takes the first valid email if multiple are provided\n *\n * @param context - The context object containing user email\n * @returns The context object with normalized email\n */\nexport const normalizeEmail = (context) => {\n var _a, _b;\n const email = (_a = context.user) === null || _a === void 0 ? void 0 : _a.email;\n if (!email || typeof email !== 'string') {\n return context;\n }\n const emails = email\n .split(/[,; ]+/)\n .map((e) => e.trim().toLowerCase())\n .filter(Boolean);\n return Object.assign(Object.assign({}, context), { user: Object.assign(Object.assign({}, context.user), { email: (_b = emails[0]) !== null && _b !== void 0 ? _b : email }) });\n};\n/**\n * Converts specified user fields to strings if they are not already strings.\n * Handles the following fields: external_id, phone, user_id, contact_id\n * As this fields are used internally by moveo, they must be strings.\n *\n * @param context - The context object containing user information\n * @returns The context object with stringified user fields\n */\nexport const stringifyUserKeys = (context) => {\n if (!context.user) {\n return context;\n }\n const keys = ['external_id', 'phone', 'user_id', 'contact_id'];\n const updatedUser = Object.assign({}, context.user);\n for (const key of keys) {\n const val = updatedUser[key];\n if (val !== undefined && typeof val !== 'string') {\n updatedUser[key] = `${val}`;\n }\n }\n return Object.assign(Object.assign({}, context), { user: updatedUser });\n};\n/**\n * Applies a series of normalization functions to the context object.\n * The normalization pipeline includes:\n * - Normalizing display name\n * - Normalizing email address\n * - Converting user fields to strings\n * - Normalizing tags\n *\n * @param context - The context object to normalize\n * @returns The fully normalized context object\n */\nexport const normalizeContext = (context) => {\n return [\n normalizeDisplayName,\n normalizeEmail,\n stringifyUserKeys,\n normalizeTags,\n ].reduce((acc, fn) => fn(acc), context);\n};\n/**\n * Pattern for unformatted phone number, this is how users\n * typically enter their phone numbers. Validation:\n * - Optional + prefix\n * - 9-20 characters including digits, spaces, hyphens, and parentheses\n * - Allows international format with parentheses\n * - No backtracking possible due to fixed structure\n */\nexport const UNFORMATTED_PHONE_PATTERN = /^\\+?[0-9()-\\s]{9,20}$/;\n/**\n * Pattern for normalized phone number, this is how we\n * store phone numbers in the database. Validation:\n * - Optional + prefix\n * - 7-18 digits only\n * - No spaces, hyphens, or parentheses\n * - No backtracking possible due to fixed structure\n */\nexport const NORMALIZED_PHONE_PATTERN = /^\\+?[0-9]{7,18}$/;\n/**\n * Validates and formats a phone number.\n * @param value - The phone number string to validate\n * @returns Object with validation result and formatted number\n */\nexport const validatePhoneNumber = (value) => {\n if (!value) {\n return { valid: true, formatted: value };\n }\n if (!UNFORMATTED_PHONE_PATTERN.test(value)) {\n return { valid: false };\n }\n const formatted = value.replace(/[()-\\s]/g, '');\n if (!NORMALIZED_PHONE_PATTERN.test(formatted)) {\n return { valid: false };\n }\n return { valid: true, formatted };\n};\n/**\n * Creates a nested object structure from a dot-notation path.\n * @param path - Dot-notation path like 'custom.field' or 'settings.theme.color'\n * @param value - The value to set at the specified path\n * @returns Nested object with the value at the specified path\n */\nexport const setNestedValue = (path, value) => {\n const keys = path.split('.');\n const result = {};\n let current = result;\n for (let i = 0; i < keys.length - 1; i++) {\n current[keys[i]] = {};\n current = current[keys[i]];\n }\n current[keys[keys.length - 1]] = value;\n return result;\n};\n/**\n * Formats a Date object to a local datetime string in ISO format.\n * @param date - The Date object to format\n * @returns Formatted datetime string (YYYY-MM-DDTHH:mm)\n */\nexport const getLocalDateTimeString = (date) => {\n const pad = (n) => n.toString().padStart(2, '0');\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;\n};\nexport const formatDurationMMSS = (totalSeconds) => {\n const rawSeconds = typeof totalSeconds === 'number' ? totalSeconds : 0;\n const safeSeconds = Number.isFinite(rawSeconds)\n ? Math.max(0, Math.floor(rawSeconds))\n : 0;\n const minutes = Math.floor(safeSeconds / 60);\n const seconds = safeSeconds % 60;\n return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;\n};\nexport const formatMinutesSecondsMMSS = (minutes, seconds) => {\n const rawMinutes = typeof minutes === 'number' ? minutes : 0;\n const rawSeconds = typeof seconds === 'number' ? seconds : 0;\n const safeMinutes = Number.isFinite(rawMinutes) ? Math.max(0, rawMinutes) : 0;\n const safeSeconds = Number.isFinite(rawSeconds) ? Math.max(0, rawSeconds) : 0;\n return formatDurationMMSS(safeMinutes * 60 + safeSeconds);\n};\nexport const formatTimeHMMA = (date) => {\n const hours = date.getHours();\n const hour12 = hours % 12 || 12;\n const minutes = date.getMinutes().toString().padStart(2, '0');\n const amPm = hours >= 12 ? 'PM' : 'AM';\n return `${hour12}:${minutes} ${amPm}`;\n};\n/**\n * Determines if a survey event is a custom survey (not hosted by moveo.ai).\n * @param event - The survey event to check\n * @returns True if the survey is custom, false if it's a Moveo survey\n */\nexport const isCustomSurveyEvent = (event) => {\n var _a;\n // We might need to find a more reliable way to determine if a survey is custom. This approach cannot have surveys hosted in a moveo.ai domain\n return !((_a = event === null || event === void 0 ? void 0 : event.url) === null || _a === void 0 ? void 0 : _a.includes('moveo.ai'));\n};\n","// src/patterns.json\nvar patterns_default = [\n \" daum[ /]\",\n \" deusu/\",\n \"(?:^|[^g])news(?!sapphire)\",\n \"(?<! (?:channel/|google/))google(?!(app|/google| pixel))\",\n \"(?<! cu)bots?(?:\\\\b|_)\",\n \"(?<!(?:lib))http\",\n \"(?<![hg]m)score\",\n \"(?<!cam)scan\",\n \"24x7\",\n \"@[a-z][\\\\w-]+\\\\.\",\n \"\\\\(\\\\)\",\n \"\\\\.com\\\\b\",\n \"\\\\bperl\\\\b\",\n \"\\\\btime/\",\n \"\\\\|\",\n \"^[\\\\w \\\\.\\\\-\\\\(?:\\\\):%]+(?:/v?\\\\d+(?:\\\\.\\\\d+)?(?:\\\\.\\\\d{1,10})*?)?(?:,|$)\",\n \"^[^ ]{50,}$\",\n \"^\\\\d+\\\\b\",\n \"^\\\\W\",\n \"^\\\\w*search\\\\b\",\n \"^\\\\w+/[\\\\w\\\\(\\\\)]*$\",\n \"^active\",\n \"^ad muncher\",\n \"^amaya\",\n \"^avsdevicesdk/\",\n \"^azure\",\n \"^biglotron\",\n \"^bot\",\n \"^bw/\",\n \"^clamav[ /]\",\n \"^client/\",\n \"^cobweb/\",\n \"^custom\",\n \"^ddg[_-]android\",\n \"^discourse\",\n \"^dispatch/\\\\d\",\n \"^downcast/\",\n \"^duckduckgo\",\n \"^email\",\n \"^facebook\",\n \"^getright/\",\n \"^gozilla/\",\n \"^hobbit\",\n \"^hotzonu\",\n \"^hwcdn/\",\n \"^igetter/\",\n \"^jeode/\",\n \"^jetty/\",\n \"^jigsaw\",\n \"^microsoft bits\",\n \"^movabletype\",\n \"^mozilla/\\\\d\\\\.\\\\d\\\\s[\\\\w\\\\.-]+$\",\n \"^mozilla/\\\\d\\\\.\\\\d\\\\s\\\\(compatible;?(?:\\\\s\\\\w+\\\\/\\\\d+\\\\.\\\\d+)?\\\\)$\",\n \"^navermailapp\",\n \"^netsurf\",\n \"^offline\",\n \"^openai/\",\n \"^owler\",\n \"^php\",\n \"^postman\",\n \"^python\",\n \"^rank\",\n \"^read\",\n \"^reed\",\n \"^rest\",\n \"^rss\",\n \"^snapchat\",\n \"^space bison\",\n \"^svn\",\n \"^swcd \",\n \"^taringa\",\n \"^thumbor/\",\n \"^track\",\n \"^w3c\",\n \"^webbandit/\",\n \"^webcopier\",\n \"^wget\",\n \"^whatsapp\",\n \"^wordpress\",\n \"^xenu link sleuth\",\n \"^yahoo\",\n \"^yandex\",\n \"^zdm/\\\\d\",\n \"^zoom marketplace/\",\n \"agent\\\\b\",\n \"analyzer\",\n \"archive\",\n \"ask jeeves/teoma\",\n \"audit\",\n \"bit\\\\.ly/\",\n \"bluecoat drtr\",\n \"browsex\",\n \"burpcollaborator\",\n \"capture\",\n \"catch\",\n \"check\\\\b\",\n \"checker\",\n \"chrome-lighthouse\",\n \"chromeframe\",\n \"classifier\",\n \"cloudflare\",\n \"convertify\",\n \"crawl\",\n \"cypress/\",\n \"dareboost\",\n \"datanyze\",\n \"dejaclick\",\n \"detect\",\n \"dmbrowser\",\n \"download\",\n \"evc-batch/\",\n \"exaleadcloudview\",\n \"feed\",\n \"fetcher\",\n \"firephp\",\n \"functionize\",\n \"grab\",\n \"headless\",\n \"httrack\",\n \"hubspot marketing grader\",\n \"hydra\",\n \"ibisbrowser\",\n \"infrawatch\",\n \"insight\",\n \"inspect\",\n \"iplabel\",\n \"java(?!;)\",\n \"library\",\n \"linkcheck\",\n \"mail\\\\.ru/\",\n \"manager\",\n \"measure\",\n \"neustar wpm\",\n \"node\\\\b\",\n \"nutch\",\n \"offbyone\",\n \"onetrust\",\n \"optimize\",\n \"pageburst\",\n \"pagespeed\",\n \"parser\",\n \"phantomjs\",\n \"pingdom\",\n \"powermarks\",\n \"preview\",\n \"proxy\",\n \"ptst[ /]\\\\d\",\n \"retriever\",\n \"rexx;\",\n \"rigor\",\n \"rss\\\\b\",\n \"scrape\",\n \"server\",\n \"sogou\",\n \"sparkler/\",\n \"speedcurve\",\n \"spider\",\n \"splash\",\n \"statuscake\",\n \"supercleaner\",\n \"synapse\",\n \"synthetic\",\n \"tools\",\n \"torrent\",\n \"transcoder\",\n \"url\",\n \"validator\",\n \"virtuoso\",\n \"wappalyzer\",\n \"webglance\",\n \"webkit2png\",\n \"whatcms/\",\n \"xtate/\"\n];\n\n// src/pattern.ts\nvar fullPattern = \" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|24x7|@[a-z][\\\\w-]+\\\\.|\\\\(\\\\)|\\\\.com\\\\b|\\\\bperl\\\\b|\\\\btime/|\\\\||^[\\\\w \\\\.\\\\-\\\\(?:\\\\):%]+(?:/v?\\\\d+(?:\\\\.\\\\d+)?(?:\\\\.\\\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\\\d+\\\\b|^\\\\W|^\\\\w*search\\\\b|^\\\\w+/[\\\\w\\\\(\\\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\\\d\\\\.\\\\d\\\\s[\\\\w\\\\.-]+$|^mozilla/\\\\d\\\\.\\\\d\\\\s\\\\(compatible;?(?:\\\\s\\\\w+\\\\/\\\\d+\\\\.\\\\d+)?\\\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\\\d|^zoom marketplace/|agent\\\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\\\.ru/|manager|measure|neustar wpm|node\\\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\\\d|retriever|rexx;|rigor|rss\\\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/\";\n\n// src/index.ts\nvar naivePattern = /bot|crawl|http|lighthouse|scan|search|spider/i;\nvar pattern;\nfunction getPattern() {\n if (pattern instanceof RegExp) {\n return pattern;\n }\n try {\n pattern = new RegExp(fullPattern, \"i\");\n } catch (error) {\n pattern = naivePattern;\n }\n return pattern;\n}\nvar list = patterns_default;\nvar isbotNaive = (userAgent) => Boolean(userAgent) && naivePattern.test(userAgent);\nfunction isbot(userAgent) {\n return Boolean(userAgent) && getPattern().test(userAgent);\n}\nvar createIsbot = (customPattern) => (userAgent) => Boolean(userAgent) && customPattern.test(userAgent);\nvar createIsbotFromList = (list2) => {\n const pattern2 = new RegExp(list2.join(\"|\"), \"i\");\n return (userAgent) => Boolean(userAgent) && pattern2.test(userAgent);\n};\nvar isbotMatch = (userAgent) => {\n var _a, _b;\n return (_b = (_a = userAgent == null ? void 0 : userAgent.match(getPattern())) == null ? void 0 : _a[0]) != null ? _b : null;\n};\nvar isbotMatches = (userAgent) => list.map((part) => {\n var _a;\n return (_a = userAgent == null ? void 0 : userAgent.match(new RegExp(part, \"i\"))) == null ? void 0 : _a[0];\n}).filter(Boolean);\nvar isbotPattern = (userAgent) => {\n var _a;\n return userAgent ? (_a = list.find((pattern2) => new RegExp(pattern2, \"i\").test(userAgent))) != null ? _a : null : null;\n};\nvar isbotPatterns = (userAgent) => userAgent ? list.filter((pattern2) => new RegExp(pattern2, \"i\").test(userAgent)) : [];\nexport {\n createIsbot,\n createIsbotFromList,\n getPattern,\n isbot,\n isbotMatch,\n isbotMatches,\n isbotNaive,\n isbotPattern,\n isbotPatterns,\n list\n};\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** User provided configuration */\nexport var SessionStatus;\n(function (SessionStatus) {\n SessionStatus[\"Open\"] = \"open\";\n SessionStatus[\"Resolved\"] = \"closed\";\n SessionStatus[\"Expired\"] = \"expired\";\n SessionStatus[\"Spam\"] = \"spam\";\n SessionStatus[\"Trash\"] = \"trash\";\n})(SessionStatus || (SessionStatus = {}));\n/**\n * Events send from the iframe to the web-client\n */\nexport var IframeEventType;\n(function (IframeEventType) {\n IframeEventType[\"AnalyticsEvent\"] = \"moveo-analytics-event\";\n IframeEventType[\"IframeLoaded\"] = \"moveo-iframe-loaded\";\n IframeEventType[\"IframeError\"] = \"moveo-iframe-error\";\n IframeEventType[\"WidgetLoaded\"] = \"moveo-widget-loaded\";\n IframeEventType[\"WidgetError\"] = \"moveo-widget-error\";\n IframeEventType[\"Opened\"] = \"moveo-widget-opened\";\n IframeEventType[\"Closed\"] = \"moveo-widget-closed\";\n IframeEventType[\"Resize\"] = \"moveo-widget-resize\";\n IframeEventType[\"LocaleChanged\"] = \"moveo-widget-locale-changed\";\n IframeEventType[\"SessionCreated\"] = \"moveo-widget-session-created\";\n IframeEventType[\"SessionReconnected\"] = \"moveo-widget-session-reconnected\";\n IframeEventType[\"SessionClosed\"] = \"moveo-widget-session-closed\";\n IframeEventType[\"ConversationClosed\"] = \"moveo-widget-conversation-closed\";\n IframeEventType[\"LinkClicked\"] = \"moveo-widget-link-clicked\";\n IframeEventType[\"UserActivity\"] = \"moveo-widget-user-activity\";\n IframeEventType[\"MemberLeave\"] = \"moveo-widget-member-leave\";\n IframeEventType[\"ConversationUnreadMessages\"] = \"moveo-conversation-unread-messages\";\n IframeEventType[\"ConversationNoUnreadMessages\"] = \"moveo-conversation-no-unread-messages\";\n IframeEventType[\"UserWayInit\"] = \"moveo-userway-init\";\n})(IframeEventType || (IframeEventType = {}));\n/**\n * Events send from the web-client to the iframe\n */\nexport var WebClientEventType;\n(function (WebClientEventType) {\n WebClientEventType[\"SetConfig\"] = \"moveo-set-config\";\n WebClientEventType[\"SetLocale\"] = \"moveo-set-locale\";\n WebClientEventType[\"SetCssVariables\"] = \"moveo-set-css-variables\";\n WebClientEventType[\"Open\"] = \"moveo-open\";\n WebClientEventType[\"Close\"] = \"moveo-close\";\n WebClientEventType[\"CloseConversation\"] = \"moveo-close-conversation\";\n WebClientEventType[\"SendMessage\"] = \"moveo-send-message\";\n WebClientEventType[\"ShowTeaserMessage\"] = \"moveo-show-teaser-message\";\n WebClientEventType[\"UpdateContext\"] = \"moveo-update-context\";\n WebClientEventType[\"WindowResize\"] = \"moveo-resize\";\n WebClientEventType[\"SessionActivity\"] = \"session-activity\";\n WebClientEventType[\"UserWayDisabled\"] = \"userway-disabled\";\n WebClientEventType[\"UserWayEnabled\"] = \"userway-enabled\";\n WebClientEventType[\"LinkClicked\"] = \"link-clicked\";\n})(WebClientEventType || (WebClientEventType = {}));\nexport var ChatModal;\n(function (ChatModal) {\n ChatModal[\"Expired\"] = \"expired\";\n ChatModal[\"Survey\"] = \"survey\";\n ChatModal[\"SurveyFull\"] = \"survey-full\";\n /**\n * Shows a modal with a button to close the session.\n * This is shown when the user press the close button on the widget.\n */\n ChatModal[\"Closing\"] = \"closing\";\n /**\n * Shows the resolved modal with a button to continue or end the session.\n * This is shown when the agent closes the conversation.\n */\n ChatModal[\"Resolved\"] = \"closed\";\n ChatModal[\"Inactivity\"] = \"inactivity\";\n ChatModal[\"Email\"] = \"email\";\n})(ChatModal || (ChatModal = {}));\nexport var TestClassName;\n(function (TestClassName) {\n TestClassName[\"MinimizeButton\"] = \"minimize-btn\";\n TestClassName[\"CloseButton\"] = \"close-btn\";\n TestClassName[\"EndSessionButton\"] = \"end-btn\";\n TestClassName[\"LauncherButton\"] = \"launcher-btn\";\n TestClassName[\"MessageInput\"] = \"message-input\";\n TestClassName[\"DisclaimerCheck\"] = \"disclaimer-check\";\n TestClassName[\"DisclaimerContainer\"] = \"disclaimer-container\";\n TestClassName[\"HeaderContainer\"] = \"header-container\";\n TestClassName[\"ImageButton\"] = \"image-btn\";\n})(TestClassName || (TestClassName = {}));\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","export const injectScript = () => {\n const gplusjs = '(function (d) {var s = d.createElement(\"script\");s.setAttribute(\"data-account\", \"Yd9gTOcFbs\");s.setAttribute(\"src\", \"https://cdn.userway.org/widget.js\");(d.body || d.head).appendChild(s);})(document)';\n const script = document.createElement('script');\n script.textContent = gplusjs;\n document.body.appendChild(script);\n};\nexport const userWayEvents = [\n 's2', // Big cursor pointer\n 's3', // Contrast\n 's4', //Big text\n 's6', // Highlight feature\n 's7', // Legible fonts\n 's10', // Reading Guide\n 's12', //Tooltips\n 's13', // Pause animations\n 's14', // Text spacing\n 's15', //Dyslexia Font\n 's16', //Mask reader\n 's17', // Line height\n 's19', // text align\n 's23', // Saturation\n];\nexport const userWayConfig = {\n s2: {\n disabled: `window.UserWay.bigCursorDisable()`,\n enabled: `window.UserWay.bigCursorEnable()`,\n },\n s3: {\n disabled: `window.UserWay.contrastDisable()`,\n enabled: `window.UserWay.contrastEnable(parseInt(value))`,\n },\n s4: {\n disabled: `window.UserWay.bigTextDisable()`,\n enabled: `window.UserWay.bigTextEnable(parseInt(value))`,\n },\n s6: {\n disabled: `window.UserWay.highlightDisable()`,\n enabled: `window.UserWay.highlightToggle()`,\n },\n s7: {\n disabled: `window.UserWay.legibleFontsDisable()`,\n enabled: `window.UserWay.legibleFontsToggle()`,\n },\n s10: {\n disabled: `window.UserWay.readingGuideDisable()`,\n enabled: `window.UserWay.readingGuideEnable()`,\n },\n s12: {\n disabled: `window.UserWay.tooltipsDisable()`,\n enabled: `window.UserWay.tooltipsToggle()`,\n },\n s13: {\n disabled: `window.UserWay.stopAnimationDisable()`,\n enabled: `window.UserWay.stopAnimationToggle()`,\n },\n s14: {\n disabled: `window.UserWay.textSpacingDisable()`,\n enabled: `(function enable(){\n const input = document.querySelector('.${\"message-input\" /* TestClassName.MessageInput */}');\n input.classList.add(\"userway-s14-active\");\n window.UserWay.textSpacingEnable(parseInt(value));\n })();\n `,\n },\n s15: {\n disabled: `window.UserWay.dyslexiaFontDisable()`,\n enabled: `window.UserWay.dyslexiaFontToggle()`,\n },\n s16: { disabled: `window.UserWay.readingMaskDisable()` },\n s17: {\n disabled: `window.UserWay.lineHeightDisable()`,\n enabled: `window.UserWay.lineHeightEnable(parseInt(value))`,\n },\n s19: {\n disabled: `window.UserWay.textAlignDisable()`,\n enabled: `window.UserWay.textAlignEnable(parseInt(value))`,\n },\n s23: {\n disabled: `window.UserWay.saturationDisable()`,\n enabled: `window.UserWay.saturationEnable(parseInt(value))`,\n },\n};\n","import debug from 'debug';\nimport { isbot } from 'isbot';\nimport debounce from 'lodash-es/debounce';\nimport throttle from 'lodash-es/throttle';\nimport { UPDATE_ACTIVITY_INTERVAL_MS } from '@/config/constants';\nimport { IframeEventType, WebClientEventType, } from '@/ts';\nimport { userWayEvents } from '@/util/userway';\nimport { createIframeUrl, createNewIframeUrl, isWindowMobile, parseEvent, sleep, } from '@/util/utils';\n/**\n * Communicates messages between the main page and the web-client iframe.\n * It generates a unique id to identify the iframe\n */\nexport class WidgetController {\n constructor({ config, version = 'v1' }) {\n this.detectUserway = () => {\n userWayEvents.forEach((event) => {\n document.addEventListener(`userway:feature_enabled_${event}`, () => {\n var _a;\n const value = (_a = localStorage.getItem(`userway-${event}`)) !== null && _a !== void 0 ? _a : '';\n this.sendEventToIframe({\n type: WebClientEventType.UserWayEnabled,\n data: {\n eventType: event,\n value,\n },\n });\n });\n document.addEventListener(`userway:feature_disabled_${event}`, () => {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayDisabled,\n data: {\n eventType: event,\n },\n });\n });\n });\n };\n this.initUserway = () => {\n const data = Object.assign({}, localStorage);\n Object.keys(data).forEach((key) => {\n const value = data[key] === 'true' ? data[key] : data[key];\n if (key.includes('userway-s') &&\n (!isNaN(parseInt(value)) || value === 'true')) {\n const id = key.split('-')[1];\n if (value === '0') {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayDisabled,\n data: {\n eventType: id,\n },\n });\n }\n else {\n this.sendEventToIframe({\n type: WebClientEventType.UserWayEnabled,\n data: {\n eventType: id,\n value,\n },\n });\n }\n }\n });\n };\n this.detectMobile = () => {\n this.sendEventToIframe({\n type: WebClientEventType.WindowResize,\n data: {\n is_mobile: isWindowMobile(),\n width: window.innerWidth,\n height: window.innerHeight,\n },\n });\n this.isMobile = isWindowMobile();\n };\n this.trackActivity = () => {\n const updateLastActivity = () => {\n this.sendEventToIframe({\n type: WebClientEventType.SessionActivity,\n data: 'active',\n });\n };\n const trackLastActivity = throttle(updateLastActivity, UPDATE_ACTIVITY_INTERVAL_MS);\n window.onload = trackLastActivity;\n window.onmousemove = trackLastActivity;\n window.onmousedown = trackLastActivity; // catches touchscreen presses as well\n window.ontouchstart = trackLastActivity; // catches touchscreen swipes as well\n window.ontouchmove = trackLastActivity; // required by some devices\n window.onclick = trackLastActivity; // catches touchpad clicks as well\n window.onkeydown = trackLastActivity;\n window.addEventListener('scroll', trackLastActivity, true);\n };\n this.config = config;\n this.id = config.widgetId;\n this.initialized = false;\n this.log = debug(`moveo:web-client:${this.id}`);\n this.version = version;\n this.iframe = this.createIframe();\n this.isMobile = null;\n }\n createIframe() {\n const iframe = document.createElement('iframe');\n iframe.width = '1px';\n iframe.height = '1px';\n iframe.title = 'Moveo webchat';\n iframe.id = this.id;\n iframe.name = this.id;\n iframe.allow = 'geolocation';\n iframe.style.border = '0';\n iframe.classList.add('web-client-container');\n if (this.config.widget_position === 'embed') {\n iframe.classList.add('embed');\n }\n if (this.version !== 'v2') {\n iframe.setAttribute('src', createIframeUrl(this.id, this.version));\n }\n else {\n iframe.setAttribute('src', createNewIframeUrl(this.id));\n }\n return iframe;\n }\n handleEvents(resolve, reject) {\n return (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n switch (event.type) {\n case IframeEventType.IframeLoaded: {\n this.sendEventToIframe({\n type: WebClientEventType.SetConfig,\n data: this.config,\n });\n break;\n }\n case IframeEventType.IframeError: {\n return reject(event.data);\n }\n case IframeEventType.UserWayInit: {\n this.initUserway();\n this.detectUserway();\n break;\n }\n case IframeEventType.WidgetLoaded: {\n setTimeout(() => {\n this.detectMobile();\n resolve(this);\n }, 0);\n break;\n }\n case IframeEventType.WidgetError: {\n this.notify(event);\n break;\n }\n case IframeEventType.Opened: {\n if (event.data.isFull || event.data.is_mobile) {\n this.iframe.classList.add('full');\n }\n break;\n }\n case IframeEventType.Closed: {\n if (event.data.isFull) {\n this.iframe.classList.remove('full');\n }\n break;\n }\n case IframeEventType.Resize: {\n this.iframe.style.width = event.data.width;\n this.iframe.style.height = event.data.height;\n this.iframe.style.left = event.data.left;\n if (event.data.top != null) {\n this.iframe.style.top = event.data.top;\n this.iframe.style.bottom = 'auto';\n }\n break;\n }\n default: {\n this.log(`Unhandle event: ${event.type}`);\n }\n }\n };\n }\n init() {\n return new Promise((resolve, reject) => {\n var _a, _b;\n if (isbot(navigator.userAgent)) {\n throw new Error(`Widget ${this.id} was not initialized because user-agent is a bot`);\n }\n if (this.initialized) {\n throw new Error(`Widget ${this.id} was already initialized`);\n }\n window.addEventListener('message', this.handleEvents(resolve, reject));\n window.addEventListener('resize', debounce(this.detectMobile, 100));\n this.trackActivity();\n if (this.config.widget_position === 'embed') {\n let element = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.element) || null;\n if (typeof element === 'string') {\n element = document.getElementById(element);\n if (!element) {\n throw new Error(`Element with id: ${element} not found`);\n }\n }\n // Add the widget to the provided element\n element === null || element === void 0 ? void 0 : element.appendChild(this.iframe);\n }\n else {\n (_b = window.document.querySelector('body')) === null || _b === void 0 ? void 0 : _b.appendChild(this.iframe);\n }\n this.initialized = true;\n this.detectMobile();\n });\n }\n /**\n * Sends a message to the iframe using the iframe id as prefix.\n */\n sendEventToIframe(event) {\n var _a;\n if (this.iframe && this.iframe.contentWindow) {\n this.log(`Event to iframe: ${event.type}`, event);\n if (event.type === WebClientEventType.SetConfig && ((_a = event.data) === null || _a === void 0 ? void 0 : _a.element)) {\n delete event.data.element;\n }\n // Add the `widgetId` to the event type\n this.iframe.contentWindow.postMessage(Object.assign(Object.assign({}, event), { type: `${this.id}${event.type}` }), '*');\n }\n else {\n this.log('Error: Cannot find iframe to send event');\n }\n }\n notify(event) {\n this.log(`notify ${event.type}:`, event);\n }\n notifyParent(eventType, callback) {\n window.addEventListener('message', (messageEvent) => {\n const event = parseEvent(this.id, messageEvent);\n if (!event) {\n return;\n }\n this.log(`Event from iframe: ${event.type}`, event);\n if (event.type === eventType) {\n if ('data' in event &&\n typeof event.data === 'object' &&\n event.data !== null &&\n 'skipInstanceCallback' in event.data) {\n return;\n }\n if ('data' in event) {\n callback(event.data);\n }\n else {\n callback();\n }\n }\n });\n }\n // --------------------------------\n // Start the instance methods here.\n // --------------------------------\n openWindow() {\n this.sendEventToIframe({\n type: WebClientEventType.Open,\n });\n }\n async destroy() {\n this.closeConversation({ hide: true });\n await sleep(4000);\n // Remove the iframe from the DOM\n const element = document.getElementById(this.id);\n if (element) {\n element.remove();\n this.initialized = false;\n }\n }\n closeConversation({ hide }) {\n this.sendEventToIframe({\n type: WebClientEventType.CloseConversation,\n data: { hide },\n });\n }\n closeWindow() {\n this.sendEventToIframe({ type: WebClientEventType.Close });\n }\n sendMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.SendMessage,\n data: message,\n });\n }\n /**\n * Programmatically triggers the teaser message (opening message bubble).\n * @param message - Optional custom message text to display. If not provided,\n * uses the configured `welcome_message` or page trigger message.\n */\n showTeaserMessage(message) {\n this.sendEventToIframe({\n type: WebClientEventType.ShowTeaserMessage,\n data: message ? { text: message } : undefined,\n });\n }\n updateContext(data) {\n this.sendEventToIframe({\n type: WebClientEventType.UpdateContext,\n data,\n });\n }\n /**\n * Sets CSS variables for visual customization.\n *\n * @example\n * setCSSVariables({\n * '--color-accent': '#ff0000',\n * '--color-background': '#ffffff'\n * })\n *\n * @param data - CSS variables to set (key-value pairs)\n */\n setCSSVariables(data) {\n this.sendEventToIframe({\n type: WebClientEventType.SetCssVariables,\n data,\n });\n }\n setLocale(locale) {\n this.sendEventToIframe({\n type: WebClientEventType.SetLocale,\n data: locale,\n });\n }\n onSessionCreated(callback) {\n this.notifyParent(IframeEventType.SessionCreated, callback);\n }\n onSessionClosed(callback) {\n this.notifyParent(IframeEventType.SessionClosed, callback);\n }\n onConversationClosed(callback) {\n this.notifyParent(IframeEventType.ConversationClosed, callback);\n }\n onSessionReconnected(callback) {\n this.notifyParent(IframeEventType.SessionReconnected, callback);\n }\n onNoUnreadMessages(callback) {\n this.notifyParent(IframeEventType.ConversationNoUnreadMessages, callback);\n }\n onUnreadMessages(callback) {\n this.notifyParent(IframeEventType.ConversationUnreadMessages, callback);\n }\n onLinkClicked(callback) {\n this.notifyParent(IframeEventType.LinkClicked, callback);\n }\n onUserActivity(callback) {\n this.notifyParent(IframeEventType.UserActivity, callback);\n }\n onAnalyticsEvent(callback) {\n this.notifyParent(IframeEventType.AnalyticsEvent, callback);\n }\n onWebchatOpened(callback) {\n this.notifyParent(IframeEventType.Opened, callback);\n }\n onWebchatClosed(callback) {\n this.notifyParent(IframeEventType.Closed, callback);\n }\n onMemberLeave(callback) {\n this.notifyParent(IframeEventType.MemberLeave, callback);\n }\n}\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-modules-typescript-loader/index.js!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../node_modules/sass-loader/dist/cjs.js!./web-client.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import debug from 'debug';\nimport { nanoid } from 'nanoid';\nimport { merge } from 'ts-deepmerge';\nimport { onDocumentReady, fetchIntegration } from '@/util/utils';\nimport { WidgetController } from './controller/controller';\nimport '@/styles/web-client.scss';\nlet log = debug('moveo:web-client');\n/**\n * Loads the integration configuration and merges it\n * with the user-supplied configuration,\n */\nconst loadWebClientConfig = async (userConfig) => {\n const widgetId = `moveo-${nanoid(5)}`;\n const clientUrl = window.location.href;\n log = log.extend(`:${widgetId}`);\n if (!(userConfig === null || userConfig === void 0 ? void 0 : userConfig.integrationId)) {\n throw new Error('integrationId is required.\\n Call MoveoAI.init({ integrationId: YOUR_INTEGRATION_HERE })');\n }\n const widgetConfig = await fetchIntegration(userConfig.integrationId, userConfig.host);\n log('Loaded integration configuration:', widgetConfig);\n // Overwrite the widget configuration with the user configuration\n return Object.assign(Object.assign({}, merge(Object.assign({}, widgetConfig), userConfig)), { clientUrl,\n widgetId });\n};\n/**\n * Initializes the iframe, appends it to the body and return an instance.\n *\n */\nexport const init = async (userConfig) => {\n var _a;\n // 1. Wait for the Client DOM to be fully loaded\n await onDocumentReady();\n // 2. Load integration config and combine it with the user configuration\n // the window location and the device information.\n // This method prepares all the info we can gather from the client's web page\n const webClientConfig = await loadWebClientConfig(userConfig);\n log('Configuration:', webClientConfig);\n if (webClientConfig.widget_position === 'embed' && !webClientConfig.element) {\n throw new Error('element is not defined but required by embed widget');\n }\n // 3. Create a controller to manage the communication\n // between the customer and the web-client.\n // The messages will be filtered based on the widgetId\n // Check for webchat_v2 feature flag to determine version\n const shouldUseV2 = ((_a = webClientConfig.feature_flags) === null || _a === void 0 ? void 0 : _a.webchat_v2) === true;\n const version = shouldUseV2 ? 'v2' : userConfig.version || 'v1';\n const controller = new WidgetController({\n config: webClientConfig,\n version,\n });\n // 4. Initialize the controller which creates and attach the iframe along\n // with all the event listeners\n log('Initializing');\n const instance = await controller.init();\n log('Initialized');\n return instance;\n};\n","/* @ts-self-types=\"./index.d.ts\" */\nimport { urlAlphabet as scopedUrlAlphabet } from './url-alphabet/index.js'\nexport { urlAlphabet } from './url-alphabet/index.js'\nexport let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nexport let customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << Math.log2(alphabet.length - 1)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step | 0\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length >= size) return id\n }\n }\n }\n}\nexport let customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size | 0, random)\nexport let nanoid = (size = 21) => {\n let id = ''\n let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)))\n while (size--) {\n id += scopedUrlAlphabet[bytes[size] & 63]\n }\n return id\n}\n","export const urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n"],"names":["root","factory","exports","module","define","amd","this","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","formatArgs","args","useColors","namespace","humanize","diff","c","color","splice","index","lastC","replace","match","save","namespaces","storage","setItem","removeItem","error","load","r","getItem","process","env","DEBUG","window","type","__nwjs","navigator","userAgent","toLowerCase","m","document","documentElement","style","WebkitAppearance","console","firebug","exception","table","parseInt","localStorage","localstorage","destroy","warned","warn","colors","log","debug","formatters","j","v","message","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","enabled","self","curr","Number","Date","ms","prev","coerce","unshift","format","formatter","val","call","apply","selectColor","extend","Object","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","matchesTemplate","search","template","searchIndex","templateIndex","starIndex","matchIndex","default","Error","stack","disable","names","skips","enable","split","trim","filter","Boolean","ns","slice","name","skip","keys","forEach","key","hash","charCodeAt","Math","abs","s","h","d","w","plural","msAbs","n","isPlural","round","options","str","String","exec","parseFloat","parse","isFinite","long","fmtShort","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","api","domAPI","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_i","_index","memo","insert","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","getTarget","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","a","definition","o","g","globalThis","Function","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nc","isObject","getPrototypeOf","merge","objects","reduce","current","Array","isArray","TypeError","includes","mergeArrays","uniqueArrayItems","from","Set","allowUndefinedOverrides","defaultOptions","withOptions","assign","config","WEB_CLIENT_NEXT_URL","WEB_CLIENT_URL_NEW","WEB_CLIENT_URL_NEW_DEV","isWindowMobile","innerWidth","innerHeight","parseEvent","widgetId","event","_a","_b","eventType","startsWith","pattern","naivePattern","SessionStatus","IframeEventType","WebClientEventType","ChatModal","TestClassName","freeSelf","now","reWhitespace","reTrimStart","string","test","charAt","objectProto","nativeObjectToString","symToStringTag","isOwn","tag","unmasked","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","other","valueOf","isBinary","nativeMax","max","nativeMin","min","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","thisArg","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","timeWaiting","remainingWait","debounced","isInvoking","arguments","leadingEdge","clearTimeout","cancel","flush","userWayEvents","WidgetController","constructor","version","detectUserway","addEventListener","sendEventToIframe","UserWayEnabled","UserWayDisabled","initUserway","isNaN","detectMobile","WindowResize","is_mobile","width","height","isMobile","trackActivity","trackLastActivity","SessionActivity","onload","onmousemove","onmousedown","ontouchstart","ontouchmove","onclick","onkeydown","initialized","iframe","createIframe","title","allow","border","classList","add","widget_position","url","scripts","querySelectorAll","regex","script","src","origin","location","createIframeUrl","_c","createNewIframeUrl","handleEvents","resolve","reject","messageEvent","IframeLoaded","SetConfig","IframeError","UserWayInit","WidgetLoaded","WidgetError","notify","Opened","isFull","Closed","Resize","left","top","bottom","Promise","RegExp","getPattern","getElementById","contentWindow","postMessage","notifyParent","callback","openWindow","Open","closeConversation","hide","CloseConversation","closeWindow","Close","sendMessage","SendMessage","showTeaserMessage","ShowTeaserMessage","text","updateContext","UpdateContext","setCSSVariables","SetCssVariables","setLocale","locale","SetLocale","onSessionCreated","SessionCreated","onSessionClosed","SessionClosed","onConversationClosed","ConversationClosed","onSessionReconnected","SessionReconnected","onNoUnreadMessages","ConversationNoUnreadMessages","onUnreadMessages","ConversationUnreadMessages","onLinkClicked","LinkClicked","onUserActivity","UserActivity","onAnalyticsEvent","AnalyticsEvent","onWebchatOpened","onWebchatClosed","onMemberLeave","MemberLeave","locals","loadWebClientConfig","async","userConfig","size","bytes","crypto","getRandomValues","Uint8Array","nanoid","clientUrl","href","integrationId","widgetConfig","host","channelHost","getConfig","response","fetch","headers","ok","fetchIntegration","readyState","webClientConfig","feature_flags","webchat_v2","controller","instance"],"sourceRoot":""}
|