vdb-ai-chat 1.0.91 → 1.0.92
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/ajs-destination.chat-widget.js +52 -0
- package/dist/auto-track.chat-widget.js +22 -0
- package/dist/chat-widget.js +560 -1
- package/dist/chat-widget.js.LICENSE.txt +1 -1
- package/dist/legacyVideos.chat-widget.js +22 -0
- package/dist/queryString.chat-widget.js +32 -0
- package/dist/remoteMiddleware.chat-widget.js +22 -0
- package/dist/schemaFilter.chat-widget.js +32 -0
- package/dist/tsub-middleware.chat-widget.js +32 -0
- package/dist/vendors-node_modules_segment_analytics_js-video-plugins_dist_index_umd_js.chat-widget.js +21 -0
- package/lib/commonjs/api.js +1 -1
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/ChatWidget.js +0 -1
- package/lib/commonjs/components/ChatWidget.js.map +1 -1
- package/lib/commonjs/components/ProductsGrid.js +1 -1
- package/lib/commonjs/components/ProductsGrid.js.map +1 -1
- package/lib/commonjs/components/utils.js +1 -6
- package/lib/commonjs/components/utils.js.map +1 -1
- package/lib/module/api.js +1 -1
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/ChatWidget.js +0 -1
- package/lib/module/components/ChatWidget.js.map +1 -1
- package/lib/module/components/ProductsGrid.js +1 -1
- package/lib/module/components/ProductsGrid.js.map +1 -1
- package/lib/module/components/utils.js +1 -6
- package/lib/module/components/utils.js.map +1 -1
- package/lib/typescript/components/BetaNotice.d.ts +1 -2
- package/lib/typescript/components/BetaNotice.d.ts.map +1 -1
- package/lib/typescript/components/ChatWidget.d.ts.map +1 -1
- package/lib/typescript/components/ListItemDiamond.d.ts +1 -2
- package/lib/typescript/components/ListItemDiamond.d.ts.map +1 -1
- package/lib/typescript/components/ListItemJewelry.d.ts +1 -2
- package/lib/typescript/components/ListItemJewelry.d.ts.map +1 -1
- package/lib/typescript/components/utils.d.ts.map +1 -1
- package/lib/typescript/contexts/AnalyticsClientContext.d.ts +1 -1
- package/lib/typescript/contexts/AnalyticsClientContext.d.ts.map +1 -1
- package/lib/typescript/contexts/ThemeProvider.d.ts +1 -1
- package/lib/typescript/contexts/ThemeProvider.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api.ts +1 -1
- package/src/components/ChatWidget.tsx +0 -2
- package/src/components/ProductsGrid.tsx +1 -1
- package/src/components/utils.ts +1 -7
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
4
|
+
* This devtool is neither made for production nor for readable output files.
|
|
5
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
6
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
7
|
+
* or disable the default devtool with "devtool: false".
|
|
8
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
9
|
+
*/
|
|
10
|
+
(self["webpackChunkvdb_ai_chat"] = self["webpackChunkvdb_ai_chat"] || []).push([["ajs-destination"],{
|
|
11
|
+
|
|
12
|
+
/***/ "./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js"
|
|
13
|
+
/*!************************************************************************************!*\
|
|
14
|
+
!*** ./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js ***!
|
|
15
|
+
\************************************************************************************/
|
|
16
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
17
|
+
|
|
18
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isPlanEventEnabled: () => (/* binding */ isPlanEventEnabled)\n/* harmony export */ });\n/**\n * Determines whether a track event is allowed to be sent based on the\n * user's tracking plan.\n * If the user does not have a tracking plan or the event is allowed based\n * on the tracking plan configuration, returns true.\n */\nfunction isPlanEventEnabled(plan, planEvent) {\n var _a, _b;\n // Always prioritize the event's `enabled` status\n if (typeof (planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) === 'boolean') {\n return planEvent.enabled;\n }\n // Assume absence of a tracking plan means events are enabled\n return (_b = (_a = plan === null || plan === void 0 ? void 0 : plan.__default) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true;\n}\n//# sourceMappingURL=is-plan-event-enabled.js.map\n\n//# sourceURL=webpack://vdb-ai-chat/./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js?\n}");
|
|
19
|
+
|
|
20
|
+
/***/ },
|
|
21
|
+
|
|
22
|
+
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js"
|
|
23
|
+
/*!****************************************************************************************!*\
|
|
24
|
+
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js ***!
|
|
25
|
+
\****************************************************************************************/
|
|
26
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
27
|
+
|
|
28
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LegacyDestination: () => (/* binding */ LegacyDestination),\n/* harmony export */ ajsDestinations: () => (/* binding */ ajsDestinations)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _segment_facade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @segment/facade */ \"./node_modules/@segment/facade/dist/index.js\");\n/* harmony import */ var _segment_facade__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_segment_facade__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _core_connection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/connection */ \"./node_modules/@segment/analytics-next/dist/pkg/core/connection/index.js\");\n/* harmony import */ var _core_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/context */ \"./node_modules/@segment/analytics-next/dist/pkg/core/context/index.js\");\n/* harmony import */ var _core_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../core/context */ \"./node_modules/@segment/analytics-core/dist/esm/context/index.js\");\n/* harmony import */ var _core_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../core/environment */ \"./node_modules/@segment/analytics-next/dist/pkg/core/environment/index.js\");\n/* harmony import */ var _segment_analytics_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @segment/analytics-core */ \"./node_modules/@segment/analytics-core/dist/esm/queue/delivery.js\");\n/* harmony import */ var _lib_is_plan_event_enabled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../lib/is-plan-event-enabled */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js\");\n/* harmony import */ var _lib_merged_options__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../lib/merged-options */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/merged-options.js\");\n/* harmony import */ var _lib_p_while__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/p-while */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/p-while.js\");\n/* harmony import */ var _lib_priority_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../lib/priority-queue */ \"./node_modules/@segment/analytics-core/dist/esm/priority-queue/index.js\");\n/* harmony import */ var _lib_priority_queue_persisted__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../lib/priority-queue/persisted */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/priority-queue/persisted.js\");\n/* harmony import */ var _middleware__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../middleware */ \"./node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js\");\n/* harmony import */ var _loader__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./loader */ \"./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js\");\n/* harmony import */ var _segment_analytics_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @segment/analytics-core */ \"./node_modules/@segment/analytics-core/dist/esm/validation/helpers.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils */ \"./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js\");\n/* harmony import */ var _core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../core/stats/metric-helpers */ \"./node_modules/@segment/analytics-next/dist/pkg/core/stats/metric-helpers.js\");\n/* harmony import */ var _segment_analytics_generic_utils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @segment/analytics-generic-utils */ \"./node_modules/@segment/analytics-generic-utils/dist/esm/create-deferred/create-deferred.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction flushQueue(xt, queue) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n var failedQueue;\n var _this = this;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n failedQueue = [];\n if ((0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOffline)()) {\n return [2 /*return*/, queue];\n }\n return [4 /*yield*/, (0,_lib_p_while__WEBPACK_IMPORTED_MODULE_9__.pWhile)(function () { return queue.length > 0 && (0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOnline)(); }, function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(_this, void 0, void 0, function () {\n var ctx, result, success;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n ctx = queue.pop();\n if (!ctx) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, (0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_6__.attempt)(ctx, xt)];\n case 1:\n result = _a.sent();\n success = result instanceof _core_context__WEBPACK_IMPORTED_MODULE_3__.Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [2 /*return*/];\n }\n });\n }); })\n // re-add failed tasks\n ];\n case 1:\n _a.sent();\n // re-add failed tasks\n failedQueue.map(function (failed) { return queue.pushWithBackoff(failed); });\n return [2 /*return*/, queue];\n }\n });\n });\n}\nvar LegacyDestination = /** @class */ (function () {\n function LegacyDestination(name, version, writeKey, settings, options, integrationSource) {\n if (settings === void 0) { settings = {}; }\n var _this = this;\n this.options = {};\n this.type = 'destination';\n this.middleware = [];\n this.initializePromise = (0,_segment_analytics_generic_utils__WEBPACK_IMPORTED_MODULE_17__.createDeferred)();\n this.flushing = false;\n this.name = name;\n this.version = version;\n this.settings = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, settings);\n this.disableAutoISOConversion = options.disableAutoISOConversion || false;\n this.integrationSource = integrationSource;\n // AJS-Renderer sets an extraneous `type` setting that clobbers\n // existing type defaults. We need to remove it if it's present\n if (this.settings['type'] && this.settings['type'] === 'browser') {\n delete this.settings['type'];\n }\n this.initializePromise.promise.then(function (isInitialized) { return (_this._initialized = isInitialized); }, function () { });\n this.options = options;\n this.buffer = options.disableClientPersistence\n ? new _lib_priority_queue__WEBPACK_IMPORTED_MODULE_10__.PriorityQueue(4, [])\n : new _lib_priority_queue_persisted__WEBPACK_IMPORTED_MODULE_11__.PersistedPriorityQueue(4, \"\".concat(writeKey, \":dest-\").concat(name));\n this.scheduleFlush();\n }\n LegacyDestination.prototype.isLoaded = function () {\n return !!this._ready;\n };\n LegacyDestination.prototype.ready = function () {\n var _this = this;\n return this.initializePromise.promise.then(function () { var _a; return (_a = _this.onReady) !== null && _a !== void 0 ? _a : Promise.resolve(); });\n };\n LegacyDestination.prototype.load = function (ctx, analyticsInstance) {\n var _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n var integrationSource, _b, error_1;\n var _this = this;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (this._ready || this.onReady !== undefined) {\n return [2 /*return*/];\n }\n _c.label = 1;\n case 1:\n _c.trys.push([1, 5, , 6]);\n if (!((_a = this.integrationSource) !== null && _a !== void 0)) return [3 /*break*/, 2];\n _b = _a;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, (0,_loader__WEBPACK_IMPORTED_MODULE_13__.loadIntegration)(ctx, this.name, this.version, this.options.obfuscate)];\n case 3:\n _b = (_c.sent());\n _c.label = 4;\n case 4:\n integrationSource = _b;\n this.integration = (0,_loader__WEBPACK_IMPORTED_MODULE_13__.buildIntegration)(integrationSource, this.settings, analyticsInstance);\n return [3 /*break*/, 6];\n case 5:\n error_1 = _c.sent();\n (0,_core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__.recordIntegrationMetric)(ctx, {\n integrationName: this.name,\n methodName: 'load',\n type: 'classic',\n didError: true,\n });\n throw error_1;\n case 6:\n this.onReady = new Promise(function (resolve) {\n var onReadyFn = function () {\n _this._ready = true;\n resolve(true);\n };\n _this.integration.once('ready', onReadyFn);\n });\n this.integration.on('initialize', function () {\n _this.initializePromise.resolve(true);\n });\n try {\n (0,_core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__.recordIntegrationMetric)(ctx, {\n integrationName: this.name,\n methodName: 'initialize',\n type: 'classic',\n });\n this.integration.initialize();\n }\n catch (error) {\n (0,_core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__.recordIntegrationMetric)(ctx, {\n integrationName: this.name,\n methodName: 'initialize',\n type: 'classic',\n didError: true,\n });\n this.initializePromise.resolve(false);\n throw error;\n }\n return [2 /*return*/];\n }\n });\n });\n };\n LegacyDestination.prototype.unload = function (_ctx, _analyticsInstance) {\n return (0,_loader__WEBPACK_IMPORTED_MODULE_13__.unloadIntegration)(this.name, this.version, this.options.obfuscate);\n };\n LegacyDestination.prototype.addMiddleware = function () {\n var _a;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n this.middleware = (_a = this.middleware).concat.apply(_a, fn);\n };\n LegacyDestination.prototype.shouldBuffer = function (ctx) {\n return (\n // page events can't be buffered because of destinations that automatically add page views\n ctx.event.type !== 'page' &&\n ((0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOffline)() || this._ready !== true || this._initialized !== true));\n };\n LegacyDestination.prototype.send = function (ctx, clz, eventType) {\n var _a, _b;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n var plan, ev, planEvent, afterMiddleware, event, err_1;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (this.shouldBuffer(ctx)) {\n this.buffer.push(ctx);\n this.scheduleFlush();\n return [2 /*return*/, ctx];\n }\n plan = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.track;\n ev = ctx.event.event;\n if (plan && ev && this.name !== 'Segment.io') {\n planEvent = plan[ev];\n if (!(0,_lib_is_plan_event_enabled__WEBPACK_IMPORTED_MODULE_7__.isPlanEventEnabled)(plan, planEvent)) {\n ctx.updateEvent('integrations', (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, ctx.event.integrations), { All: false, 'Segment.io': true }));\n ctx.cancel(new _core_context__WEBPACK_IMPORTED_MODULE_4__.ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: 'Dropped by plan',\n }));\n }\n else {\n ctx.updateEvent('integrations', (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));\n }\n if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {\n ctx.cancel(new _core_context__WEBPACK_IMPORTED_MODULE_4__.ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: 'Dropped by plan',\n }));\n }\n }\n return [4 /*yield*/, (0,_middleware__WEBPACK_IMPORTED_MODULE_12__.applyDestinationMiddleware)(this.name, ctx.event, this.middleware)];\n case 1:\n afterMiddleware = _c.sent();\n if (afterMiddleware === null) {\n return [2 /*return*/, ctx];\n }\n event = new clz(afterMiddleware, {\n traverse: !this.disableAutoISOConversion,\n });\n (0,_core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__.recordIntegrationMetric)(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: 'classic',\n });\n _c.label = 2;\n case 2:\n _c.trys.push([2, 5, , 6]);\n if (!this.integration) return [3 /*break*/, 4];\n return [4 /*yield*/, this.integration.invoke.call(this.integration, eventType, event)];\n case 3:\n _c.sent();\n _c.label = 4;\n case 4: return [3 /*break*/, 6];\n case 5:\n err_1 = _c.sent();\n (0,_core_stats_metric_helpers__WEBPACK_IMPORTED_MODULE_16__.recordIntegrationMetric)(ctx, {\n integrationName: this.name,\n methodName: eventType,\n type: 'classic',\n didError: true,\n });\n throw err_1;\n case 6: return [2 /*return*/, ctx];\n }\n });\n });\n };\n LegacyDestination.prototype.track = function (ctx) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_1__.Track, 'track')];\n });\n });\n };\n LegacyDestination.prototype.page = function (ctx) {\n var _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (((_a = this.integration) === null || _a === void 0 ? void 0 : _a._assumesPageview) && !this._initialized) {\n this.integration.initialize();\n }\n return [4 /*yield*/, this.initializePromise.promise];\n case 1:\n _b.sent();\n return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_1__.Page, 'page')];\n }\n });\n });\n };\n LegacyDestination.prototype.identify = function (ctx) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_1__.Identify, 'identify')];\n });\n });\n };\n LegacyDestination.prototype.alias = function (ctx) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_1__.Alias, 'alias')];\n });\n });\n };\n LegacyDestination.prototype.group = function (ctx) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n return [2 /*return*/, this.send(ctx, _segment_facade__WEBPACK_IMPORTED_MODULE_1__.Group, 'group')];\n });\n });\n };\n LegacyDestination.prototype.scheduleFlush = function () {\n var _this = this;\n if (this.flushing) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n setTimeout(function () { return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(_this, void 0, void 0, function () {\n var _a;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_b) {\n switch (_b.label) {\n case 0:\n if ((0,_core_connection__WEBPACK_IMPORTED_MODULE_2__.isOffline)() || this._ready !== true || this._initialized !== true) {\n this.scheduleFlush();\n return [2 /*return*/];\n }\n this.flushing = true;\n _a = this;\n return [4 /*yield*/, flushQueue(this, this.buffer)];\n case 1:\n _a.buffer = _b.sent();\n this.flushing = false;\n if (this.buffer.todo > 0) {\n this.scheduleFlush();\n }\n return [2 /*return*/];\n }\n });\n }); }, Math.random() * 5000);\n };\n return LegacyDestination;\n}());\n\nfunction ajsDestinations(writeKey, settings, integrations, options, routingMiddleware, legacyIntegrationSources) {\n var _a, _b;\n if (integrations === void 0) { integrations = {}; }\n if (options === void 0) { options = {}; }\n if ((0,_core_environment__WEBPACK_IMPORTED_MODULE_5__.isServer)()) {\n return [];\n }\n if (settings.plan) {\n options = options !== null && options !== void 0 ? options : {};\n options.plan = settings.plan;\n }\n var routingRules = (_b = (_a = settings.middlewareSettings) === null || _a === void 0 ? void 0 : _a.routingRules) !== null && _b !== void 0 ? _b : [];\n var remoteIntegrationsConfig = settings.integrations;\n var localIntegrationsConfig = options.integrations;\n // merged remote CDN settings with user provided options\n var integrationOptions = (0,_lib_merged_options__WEBPACK_IMPORTED_MODULE_8__.mergedOptions)(settings, options !== null && options !== void 0 ? options : {});\n var adhocIntegrationSources = legacyIntegrationSources === null || legacyIntegrationSources === void 0 ? void 0 : legacyIntegrationSources.reduce(function (acc, integrationSource) {\n var _a;\n return ((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, acc), (_a = {}, _a[(0,_loader__WEBPACK_IMPORTED_MODULE_13__.resolveIntegrationNameFromSource)(integrationSource)] = integrationSource, _a)));\n }, {});\n var installableIntegrations = new Set((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)([], Object.keys(remoteIntegrationsConfig).filter(function (name) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_15__.isInstallableIntegration)(name, remoteIntegrationsConfig[name]);\n }), true), Object.keys(adhocIntegrationSources || {}).filter(function (name) {\n return (0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_14__.isPlainObject)(remoteIntegrationsConfig[name]) ||\n (0,_segment_analytics_core__WEBPACK_IMPORTED_MODULE_14__.isPlainObject)(localIntegrationsConfig === null || localIntegrationsConfig === void 0 ? void 0 : localIntegrationsConfig[name]);\n }), true));\n return Array.from(installableIntegrations)\n .filter(function (name) { return !(0,_utils__WEBPACK_IMPORTED_MODULE_15__.isDisabledIntegration)(name, integrations); })\n .map(function (name) {\n var integrationSettings = remoteIntegrationsConfig[name];\n var version = (0,_loader__WEBPACK_IMPORTED_MODULE_13__.resolveVersion)(integrationSettings);\n var destination = new LegacyDestination(name, version, writeKey, integrationOptions[name], options, adhocIntegrationSources === null || adhocIntegrationSources === void 0 ? void 0 : adhocIntegrationSources[name]);\n var routing = routingRules.filter(function (rule) { return rule.destinationName === name; });\n if (routing.length > 0 && routingMiddleware) {\n destination.addMiddleware(routingMiddleware);\n }\n return destination;\n });\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://vdb-ai-chat/./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js?\n}");
|
|
29
|
+
|
|
30
|
+
/***/ },
|
|
31
|
+
|
|
32
|
+
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js"
|
|
33
|
+
/*!*****************************************************************************************!*\
|
|
34
|
+
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js ***!
|
|
35
|
+
\*****************************************************************************************/
|
|
36
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37
|
+
|
|
38
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ buildIntegration: () => (/* binding */ buildIntegration),\n/* harmony export */ loadIntegration: () => (/* binding */ loadIntegration),\n/* harmony export */ resolveIntegrationNameFromSource: () => (/* binding */ resolveIntegrationNameFromSource),\n/* harmony export */ resolveVersion: () => (/* binding */ resolveVersion),\n/* harmony export */ unloadIntegration: () => (/* binding */ unloadIntegration)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ \"./node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var _lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/parse-cdn */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/parse-cdn.js\");\n/* harmony import */ var _lib_load_script__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/load-script */ \"./node_modules/@segment/analytics-next/dist/pkg/lib/load-script.js\");\n\n\n\nfunction normalizeName(name) {\n return name.toLowerCase().replace('.', '').replace(/\\s+/g, '-');\n}\nfunction obfuscatePathName(pathName, obfuscate) {\n if (obfuscate === void 0) { obfuscate = false; }\n return obfuscate ? btoa(pathName).replace(/=/g, '') : undefined;\n}\nfunction resolveIntegrationNameFromSource(integrationSource) {\n return ('Integration' in integrationSource\n ? integrationSource.Integration\n : integrationSource).prototype.name;\n}\nfunction recordLoadMetrics(fullPath, ctx, name) {\n var _a, _b;\n try {\n var metric = ((_b = (_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.getEntriesByName(fullPath, 'resource')) !== null && _b !== void 0 ? _b : [])[0];\n // we assume everything that took under 100ms is cached\n metric &&\n ctx.stats.gauge('legacy_destination_time', Math.round(metric.duration), (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spreadArray)([\n name\n ], (metric.duration < 100 ? ['cached'] : []), true));\n }\n catch (_) {\n // not available\n }\n}\nfunction buildIntegration(integrationSource, integrationSettings, analyticsInstance) {\n var integrationCtr;\n // GA and Appcues use a different interface to instantiating integrations\n if ('Integration' in integrationSource) {\n var analyticsStub = {\n user: function () { return analyticsInstance.user(); },\n addIntegration: function () { },\n };\n integrationSource(analyticsStub);\n integrationCtr = integrationSource.Integration;\n }\n else {\n integrationCtr = integrationSource;\n }\n var integration = new integrationCtr(integrationSettings);\n integration.analytics = analyticsInstance;\n return integration;\n}\nfunction loadIntegration(ctx, name, version, obfuscate) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n var pathName, obfuscatedPathName, path, fullPath, err_1, deps;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0:\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(pathName, obfuscate);\n path = (0,_lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__.getNextIntegrationsURL)();\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.loadScript)(fullPath)];\n case 2:\n _a.sent();\n recordLoadMetrics(fullPath, ctx, name);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n ctx.stats.gauge('legacy_destination_time', -1, [\"plugin:\".concat(name), \"failed\"]);\n throw err_1;\n case 4:\n deps = window[\"\".concat(pathName, \"Deps\")];\n return [4 /*yield*/, Promise.all(deps.map(function (dep) { return (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.loadScript)(path + dep + '.gz'); }))\n // @ts-ignore\n ];\n case 5:\n _a.sent();\n // @ts-ignore\n window[\"\".concat(pathName, \"Loader\")]();\n return [2 /*return*/, window[\n // @ts-ignore\n \"\".concat(pathName, \"Integration\")]];\n }\n });\n });\n}\nfunction unloadIntegration(name, version, obfuscate) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__awaiter)(this, void 0, void 0, function () {\n var path, pathName, obfuscatedPathName, fullPath;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__generator)(this, function (_a) {\n path = (0,_lib_parse_cdn__WEBPACK_IMPORTED_MODULE_1__.getNextIntegrationsURL)();\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(name, obfuscate);\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n return [2 /*return*/, (0,_lib_load_script__WEBPACK_IMPORTED_MODULE_2__.unloadScript)(fullPath)];\n });\n });\n}\nfunction resolveVersion(integrationConfig) {\n var _a, _b, _c, _d;\n return ((_d = (_b = (_a = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _a === void 0 ? void 0 : _a.override) !== null && _b !== void 0 ? _b : (_c = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : 'latest');\n}\n//# sourceMappingURL=loader.js.map\n\n//# sourceURL=webpack://vdb-ai-chat/./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js?\n}");
|
|
39
|
+
|
|
40
|
+
/***/ },
|
|
41
|
+
|
|
42
|
+
/***/ "./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js"
|
|
43
|
+
/*!****************************************************************************************!*\
|
|
44
|
+
!*** ./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js ***!
|
|
45
|
+
\****************************************************************************************/
|
|
46
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
47
|
+
|
|
48
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ isDisabledIntegration: () => (/* binding */ isDisabledIntegration),\n/* harmony export */ isInstallableIntegration: () => (/* binding */ isInstallableIntegration)\n/* harmony export */ });\nvar isInstallableIntegration = function (name, integrationSettings) {\n var _a;\n var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;\n // We use `!== 'unbundled'` (versus `=== 'bundled'`) to be inclusive of\n // destinations without a defined value for `bundlingStatus`\n var deviceMode = bundlingStatus !== 'unbundled' &&\n (type === 'browser' || ((_a = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _a === void 0 ? void 0 : _a.includes('browser')));\n // checking for iterable is a quick fix we need in place to prevent\n // errors showing Iterable as a failed destiantion. Ideally, we should\n // fix the Iterable metadata instead, but that's a longer process.\n return !name.startsWith('Segment') && name !== 'Iterable' && deviceMode;\n};\nvar isDisabledIntegration = function (integrationName, integrations) {\n var allDisableAndNotDefined = integrations.All === false && integrations[integrationName] === undefined;\n return integrations[integrationName] === false || allDisableAndNotDefined;\n};\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://vdb-ai-chat/./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/utils.js?\n}");
|
|
49
|
+
|
|
50
|
+
/***/ }
|
|
51
|
+
|
|
52
|
+
}]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
4
|
+
* This devtool is neither made for production nor for readable output files.
|
|
5
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
6
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
7
|
+
* or disable the default devtool with "devtool: false".
|
|
8
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
9
|
+
*/
|
|
10
|
+
(self["webpackChunkvdb_ai_chat"] = self["webpackChunkvdb_ai_chat"] || []).push([["auto-track"],{
|
|
11
|
+
|
|
12
|
+
/***/ "./node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js"
|
|
13
|
+
/*!**************************************************************************!*\
|
|
14
|
+
!*** ./node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js ***!
|
|
15
|
+
\**************************************************************************/
|
|
16
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
17
|
+
|
|
18
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ form: () => (/* binding */ form),\n/* harmony export */ link: () => (/* binding */ link)\n/* harmony export */ });\n/* harmony import */ var _callback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./callback */ \"./node_modules/@segment/analytics-core/dist/esm/callback/index.js\");\n\n// Check if a user is opening the link in a new tab\nfunction userNewTab(event) {\n var typedEvent = event;\n if (typedEvent.ctrlKey ||\n typedEvent.shiftKey ||\n typedEvent.metaKey ||\n (typedEvent.button && typedEvent.button == 1)) {\n return true;\n }\n return false;\n}\n// Check if the link opens in new tab\nfunction linkNewTab(element, href) {\n if (element.target === '_blank' && href) {\n return true;\n }\n return false;\n}\nfunction link(links, event, properties, options) {\n var _this = this;\n var elements = [];\n // always arrays, handles jquery\n if (!links) {\n return this;\n }\n if (links instanceof Element) {\n elements = [links];\n }\n else if ('toArray' in links) {\n elements = links.toArray();\n }\n else {\n elements = links;\n }\n elements.forEach(function (el) {\n el.addEventListener('click', function (elementEvent) {\n var _a, _b;\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var href = el.getAttribute('href') ||\n el.getAttributeNS('http://www.w3.org/1999/xlink', 'href') ||\n el.getAttribute('xlink:href') ||\n ((_a = el.getElementsByTagName('a')[0]) === null || _a === void 0 ? void 0 : _a.getAttribute('href'));\n var trackEvent = (0,_callback__WEBPACK_IMPORTED_MODULE_0__.pTimeout)(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_b = _this.settings.timeout) !== null && _b !== void 0 ? _b : 500);\n if (!linkNewTab(el, href) &&\n !userNewTab(elementEvent)) {\n if (href) {\n elementEvent.preventDefault\n ? elementEvent.preventDefault()\n : (elementEvent.returnValue = false);\n trackEvent\n .catch(console.error)\n .then(function () {\n window.location.href = href;\n })\n .catch(console.error);\n }\n }\n }, false);\n });\n return this;\n}\nfunction form(forms, event, properties, options) {\n var _this = this;\n // always arrays, handles jquery\n if (!forms)\n return this;\n if (forms instanceof HTMLFormElement)\n forms = [forms];\n var elements = forms;\n elements.forEach(function (el) {\n if (!(el instanceof Element))\n throw new TypeError('Must pass HTMLElement to trackForm/trackSubmit.');\n var handler = function (elementEvent) {\n var _a;\n elementEvent.preventDefault\n ? elementEvent.preventDefault()\n : (elementEvent.returnValue = false);\n var ev = event instanceof Function ? event(el) : event;\n var props = properties instanceof Function ? properties(el) : properties;\n var trackEvent = (0,_callback__WEBPACK_IMPORTED_MODULE_0__.pTimeout)(_this.track(ev, props, options !== null && options !== void 0 ? options : {}), (_a = _this.settings.timeout) !== null && _a !== void 0 ? _a : 500);\n trackEvent\n .catch(console.error)\n .then(function () {\n el.submit();\n })\n .catch(console.error);\n };\n // Support the events happening through jQuery or Zepto instead of through\n // the normal DOM API, because `el.submit` doesn't bubble up events...\n var $ = window.jQuery || window.Zepto;\n if ($) {\n $(el).submit(handler);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n el.addEventListener('submit', handler, false);\n }\n });\n return this;\n}\n//# sourceMappingURL=auto-track.js.map\n\n//# sourceURL=webpack://vdb-ai-chat/./node_modules/@segment/analytics-next/dist/pkg/core/auto-track.js?\n}");
|
|
19
|
+
|
|
20
|
+
/***/ }
|
|
21
|
+
|
|
22
|
+
}]);
|