@cognigy/webchat 3.42.0 → 3.44.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/OSS_LICENSES.txt +3 -3
- package/dist/webchat.esm.js +210 -94
- package/dist/webchat.js +28 -28
- package/package.json +2 -2
package/OSS_LICENSES.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Created on
|
|
1
|
+
Created on 16-06-2026 at 13:58:08
|
|
2
2
|
|
|
3
3
|
{
|
|
4
4
|
"@babel/code-frame@7.29.0": {
|
|
@@ -170,7 +170,7 @@ Created on 30-04-2026 at 06:59:50
|
|
|
170
170
|
"licenseFile": "node_modules/@cognigy/socket-client/LICENSE",
|
|
171
171
|
"copyright": "Copyright (c) 2019 Cognigy GmbH"
|
|
172
172
|
},
|
|
173
|
-
"@cognigy/webchat@3.
|
|
173
|
+
"@cognigy/webchat@3.44.0": {
|
|
174
174
|
"licenses": "MIT*",
|
|
175
175
|
"repository": "https://github.com/Cognigy/Webchat",
|
|
176
176
|
"publisher": "Cognigy GmbH",
|
|
@@ -528,7 +528,7 @@ Created on 30-04-2026 at 06:59:50
|
|
|
528
528
|
"licenseFile": "node_modules/autolinker/LICENSE",
|
|
529
529
|
"copyright": "Copyright (c) 2014 Gregory Jacobs (http://greg-jacobs.com)"
|
|
530
530
|
},
|
|
531
|
-
"axios@1.15.
|
|
531
|
+
"axios@1.15.2": {
|
|
532
532
|
"licenses": "MIT",
|
|
533
533
|
"repository": "https://github.com/axios/axios",
|
|
534
534
|
"publisher": "Matt Zabriskie",
|
package/dist/webchat.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* webchat.esm.js v3.
|
|
3
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
4
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
2
|
+
* webchat.esm.js v3.44.0
|
|
3
|
+
* https://github.com/Cognigy/Webchat/tree/v3.44.0
|
|
4
|
+
* https://github.com/Cognigy/Webchat/tree/v3.44.0/OSS_LICENSES.txt
|
|
5
5
|
*/
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7dac9eee__ from "react-dom";
|
|
@@ -38178,6 +38178,23 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
38178
38178
|
this.props.onShowChatScreen();
|
|
38179
38179
|
}
|
|
38180
38180
|
};
|
|
38181
|
+
|
|
38182
|
+
/**
|
|
38183
|
+
* Emits the `webchat/close-button` analytics event.
|
|
38184
|
+
*
|
|
38185
|
+
* Fired only from the close ("X") button handlers — the chat window header
|
|
38186
|
+
* (`handleCloseAndReset`) and the disconnect overlay (`handleClose`). It is
|
|
38187
|
+
* NOT emitted for the toggle button, the home-screen close (which minimizes),
|
|
38188
|
+
* or the programmatic `webchat.close()` / `webchat.toggle()` APIs.
|
|
38189
|
+
*
|
|
38190
|
+
* This lives in the component rather than the redux analytics middleware
|
|
38191
|
+
* (where `webchat/open|close|minimize` are emitted) on purpose: the store only
|
|
38192
|
+
* sees the resulting `SET_OPEN` action and cannot tell which control triggered
|
|
38193
|
+
* the close, so the originating interaction is only known here.
|
|
38194
|
+
*/
|
|
38195
|
+
emitCloseButtonAnalytics = () => {
|
|
38196
|
+
this.props.onEmitAnalytics("webchat/close-button");
|
|
38197
|
+
};
|
|
38181
38198
|
render() {
|
|
38182
38199
|
const {
|
|
38183
38200
|
props,
|
|
@@ -38242,7 +38259,8 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
38242
38259
|
} = state;
|
|
38243
38260
|
const {
|
|
38244
38261
|
widgetSettings: {
|
|
38245
|
-
disableToggleButton
|
|
38262
|
+
disableToggleButton,
|
|
38263
|
+
disableMobileScrollLock
|
|
38246
38264
|
},
|
|
38247
38265
|
behavior: {
|
|
38248
38266
|
enableConnectionStatusIndicator
|
|
@@ -38285,12 +38303,15 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
38285
38303
|
const chatRegionAriaLabel = config.settings.customTranslations?.ariaLabels?.chatRegion ?? "Chat window";
|
|
38286
38304
|
const handleClose = () => {
|
|
38287
38305
|
onClose();
|
|
38306
|
+
// The disconnect overlay's close ("X") is also a header close button, so
|
|
38307
|
+
// it emits "webchat/close-button" for parity with the chat window header.
|
|
38308
|
+
this.emitCloseButtonAnalytics();
|
|
38288
38309
|
this.chatToggleButtonRef.current?.focus();
|
|
38289
38310
|
};
|
|
38290
38311
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_emotion_react__WEBPACK_IMPORTED_MODULE_2__.a, {
|
|
38291
38312
|
theme: theme
|
|
38292
38313
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_remove_scroll__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A, {
|
|
38293
|
-
enabled: open && isMobile,
|
|
38314
|
+
enabled: open && isMobile && !disableMobileScrollLock,
|
|
38294
38315
|
allowPinchZoom: true
|
|
38295
38316
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_WebchatWrapper__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .A, _extends({
|
|
38296
38317
|
"data-cognigy-webchat-root": true
|
|
@@ -38419,6 +38440,10 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
38419
38440
|
const handleCloseAndReset = () => {
|
|
38420
38441
|
onSetShowHomeScreen(true);
|
|
38421
38442
|
onClose();
|
|
38443
|
+
// `onClose()` emits the generic "webchat/close" (which also fires for the
|
|
38444
|
+
// toggle button); this additionally emits "webchat/close-button" so
|
|
38445
|
+
// integrations can react to an explicit header close only.
|
|
38446
|
+
this.emitCloseButtonAnalytics();
|
|
38422
38447
|
// Restore focus to chat toggle button
|
|
38423
38448
|
this.chatToggleButtonRef?.current?.focus?.();
|
|
38424
38449
|
};
|
|
@@ -42142,29 +42167,51 @@ const ScreenReaderLiveRegion = ({
|
|
|
42142
42167
|
return message !== null && typeof message === "object" && "animationState" in message;
|
|
42143
42168
|
};
|
|
42144
42169
|
const timeout = setTimeout(() => {
|
|
42145
|
-
|
|
42146
|
-
|
|
42170
|
+
// Scan for the first unannounced message that is currently announceable.
|
|
42171
|
+
// We must NOT stop at index 0 for non-rendered (data-only) messages,
|
|
42172
|
+
// otherwise a permanently data-only message would block all later ones.
|
|
42173
|
+
for (const candidate of unannouncedMessages) {
|
|
42174
|
+
const id = `webchatMessageId-${candidate.timestamp}`;
|
|
42175
|
+
|
|
42176
|
+
// A streaming message that hasn't finished blocks later announcements
|
|
42177
|
+
// (preserves in-order announcement of streamed output).
|
|
42178
|
+
const isStreaming = isProgressiveRenderingEnabled && isStreamingMessage(candidate) && (candidate.animationState === "start" || candidate.animationState === "animating");
|
|
42179
|
+
if (isStreaming) return;
|
|
42180
|
+
|
|
42181
|
+
// Event status pills announce themselves via aria-live="assertive".
|
|
42182
|
+
// Mark handled and continue; they must not block later real messages.
|
|
42183
|
+
if (liveContent[id] === `IGNORE-${id}`) {
|
|
42184
|
+
announcedIdsRef.current.add(id);
|
|
42185
|
+
continue;
|
|
42186
|
+
}
|
|
42187
|
+
|
|
42188
|
+
// Prefer chat-components' live content; otherwise read the DOM.
|
|
42189
|
+
// getTextFromDOM returns null when no <article data-message-id>
|
|
42190
|
+
// node exists, which is the signal for a not-rendered message.
|
|
42191
|
+
const liveText = liveContent[id];
|
|
42192
|
+
const domText = liveText ? null : (0,_utils_live_region_announcement__WEBPACK_IMPORTED_MODULE_2__/* .getTextFromDOM */ .g9)(id);
|
|
42147
42193
|
|
|
42148
|
-
|
|
42149
|
-
|
|
42194
|
+
// "Rendered" iff chat-components produced live content for it,
|
|
42195
|
+
// or an <article data-message-id> node exists in the DOM.
|
|
42196
|
+
const isRendered = Boolean(liveText) || domText !== null;
|
|
42150
42197
|
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42198
|
+
// Data-only / unsupported message: not in the chat log UI.
|
|
42199
|
+
// Skip WITHOUT marking announced so it can still be announced
|
|
42200
|
+
// if it becomes rendered later (e.g. progressive rendering).
|
|
42201
|
+
if (!isRendered) {
|
|
42202
|
+
continue;
|
|
42203
|
+
}
|
|
42154
42204
|
|
|
42155
|
-
|
|
42156
|
-
|
|
42157
|
-
|
|
42205
|
+
// Rendered: announce exactly one message per effect run.
|
|
42206
|
+
// Fall back to "A new message" for rendered-but-textless nodes.
|
|
42207
|
+
announcedIdsRef.current.add(id);
|
|
42208
|
+
const text = (0,_utils_live_region_announcement__WEBPACK_IMPORTED_MODULE_2__/* .cleanUpText */ .Yx)(liveText || domText || "A new message");
|
|
42209
|
+
setLiveMessage({
|
|
42210
|
+
id,
|
|
42211
|
+
text
|
|
42212
|
+
});
|
|
42158
42213
|
return;
|
|
42159
42214
|
}
|
|
42160
|
-
|
|
42161
|
-
// Use live content if available, otherwise extract from DOM
|
|
42162
|
-
const rawText = liveContent[id] || (0,_utils_live_region_announcement__WEBPACK_IMPORTED_MODULE_2__/* .getTextFromDOM */ .g9)(id);
|
|
42163
|
-
const text = (0,_utils_live_region_announcement__WEBPACK_IMPORTED_MODULE_2__/* .cleanUpText */ .Yx)(rawText || "A new message");
|
|
42164
|
-
setLiveMessage({
|
|
42165
|
-
id,
|
|
42166
|
-
text
|
|
42167
|
-
});
|
|
42168
42215
|
}, 100);
|
|
42169
42216
|
return () => clearTimeout(timeout);
|
|
42170
42217
|
}, [messages, liveContent, isProgressiveRenderingEnabled]);
|
|
@@ -44180,12 +44227,17 @@ const extractTextForScreenReader = root => {
|
|
|
44180
44227
|
* - Querying the DOM for the element with the specified ID
|
|
44181
44228
|
* - Using the extractTextForScreenReader function to get the text content
|
|
44182
44229
|
*
|
|
44230
|
+
* The <article data-message-id="..."> node only exists when chat-components'
|
|
44231
|
+
* Message matcher matched at least one plugin. Data-only / unsupported
|
|
44232
|
+
* messages produce no DOM node, so callers can use a `null` return to tell a
|
|
44233
|
+
* not-rendered message apart from a rendered-but-textless one.
|
|
44234
|
+
*
|
|
44183
44235
|
* @param id - The message ID to extract text for
|
|
44184
|
-
* @returns The extracted text or
|
|
44236
|
+
* @returns The extracted text, or `null` if no element exists for the id
|
|
44185
44237
|
*/
|
|
44186
44238
|
const getTextFromDOM = id => {
|
|
44187
44239
|
const messageElement = document.querySelector(`[data-message-id="${id}"]`);
|
|
44188
|
-
return messageElement ? extractTextForScreenReader(messageElement) :
|
|
44240
|
+
return messageElement ? extractTextForScreenReader(messageElement) : null;
|
|
44189
44241
|
};
|
|
44190
44242
|
|
|
44191
44243
|
/***/ },
|
|
@@ -45597,6 +45649,7 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
|
|
|
45597
45649
|
disableTextInputSanitization: false,
|
|
45598
45650
|
disableToggleButton: false,
|
|
45599
45651
|
disableTeaserMarkdownRemoval: false,
|
|
45652
|
+
disableMobileScrollLock: false,
|
|
45600
45653
|
enableAutoFocus: false,
|
|
45601
45654
|
enableInjectionWithoutEmptyHistory: false,
|
|
45602
45655
|
enableFocusTrap: false,
|
|
@@ -45892,10 +45945,23 @@ const createInputCollationMiddleware = () => {
|
|
|
45892
45945
|
messages
|
|
45893
45946
|
} = store.getState().inputCollation;
|
|
45894
45947
|
const text = messages.map(message => message.text).join(" ");
|
|
45948
|
+
|
|
45949
|
+
/**
|
|
45950
|
+
* Preserve file upload attachments while collating. Each collatable input
|
|
45951
|
+
* carries its attachments in `data.attachments`, so we merge them across all
|
|
45952
|
+
* buffered messages. Without this, uploaded files are silently dropped when
|
|
45953
|
+
* input collation is enabled (no file payload reaches the flow).
|
|
45954
|
+
*/
|
|
45955
|
+
const attachments = messages.flatMap(message => {
|
|
45956
|
+
const fileAttachments = message.data?.attachments;
|
|
45957
|
+
return Array.isArray(fileAttachments) ? fileAttachments : [];
|
|
45958
|
+
});
|
|
45895
45959
|
const message = {
|
|
45896
45960
|
...messages[0],
|
|
45897
45961
|
text,
|
|
45898
|
-
data:
|
|
45962
|
+
data: attachments.length > 0 ? {
|
|
45963
|
+
attachments
|
|
45964
|
+
} : undefined
|
|
45899
45965
|
};
|
|
45900
45966
|
return message;
|
|
45901
45967
|
};
|
|
@@ -135860,16 +135926,18 @@ const factory = env => {
|
|
|
135860
135926
|
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? (encoder => str => encoder.encode(str))(new TextEncoder()) : async str => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
135861
135927
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
135862
135928
|
let duplexAccessed = false;
|
|
135863
|
-
const
|
|
135864
|
-
|
|
135865
|
-
body,
|
|
135929
|
+
const request = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.origin, {
|
|
135930
|
+
body: new ReadableStream(),
|
|
135866
135931
|
method: 'POST',
|
|
135867
135932
|
get duplex() {
|
|
135868
135933
|
duplexAccessed = true;
|
|
135869
135934
|
return 'half';
|
|
135870
135935
|
}
|
|
135871
|
-
})
|
|
135872
|
-
|
|
135936
|
+
});
|
|
135937
|
+
const hasContentType = request.headers.has('Content-Type');
|
|
135938
|
+
if (request.body != null) {
|
|
135939
|
+
request.body.cancel();
|
|
135940
|
+
}
|
|
135873
135941
|
return duplexAccessed && !hasContentType;
|
|
135874
135942
|
});
|
|
135875
135943
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.isReadableStream(new Response('').body));
|
|
@@ -135961,6 +136029,15 @@ const factory = env => {
|
|
|
135961
136029
|
// Cloudflare Workers throws when credentials are defined
|
|
135962
136030
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
135963
136031
|
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
136032
|
+
|
|
136033
|
+
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
136034
|
+
// delete it so fetch can set it correctly with the boundary
|
|
136035
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.isFormData(data)) {
|
|
136036
|
+
const contentType = headers.getContentType();
|
|
136037
|
+
if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
|
|
136038
|
+
headers.delete('content-type');
|
|
136039
|
+
}
|
|
136040
|
+
}
|
|
135964
136041
|
const resolvedOptions = {
|
|
135965
136042
|
...fetchOptions,
|
|
135966
136043
|
signal: composedSignal,
|
|
@@ -136853,6 +136930,7 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
|
136853
136930
|
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
136854
136931
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
136855
136932
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
136933
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
136856
136934
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
|
|
136857
136935
|
|
|
136858
136936
|
/***/ },
|
|
@@ -136870,38 +136948,37 @@ AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
|
136870
136948
|
|
|
136871
136949
|
|
|
136872
136950
|
const $internals = Symbol('internals');
|
|
136873
|
-
const
|
|
136874
|
-
function
|
|
136875
|
-
|
|
136876
|
-
|
|
136877
|
-
|
|
136878
|
-
|
|
136879
|
-
|
|
136880
|
-
|
|
136951
|
+
const INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
136952
|
+
function trimSPorHTAB(str) {
|
|
136953
|
+
let start = 0;
|
|
136954
|
+
let end = str.length;
|
|
136955
|
+
while (start < end) {
|
|
136956
|
+
const code = str.charCodeAt(start);
|
|
136957
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
136958
|
+
break;
|
|
136959
|
+
}
|
|
136960
|
+
start += 1;
|
|
136881
136961
|
}
|
|
136882
|
-
|
|
136883
|
-
|
|
136962
|
+
while (end > start) {
|
|
136963
|
+
const code = str.charCodeAt(end - 1);
|
|
136964
|
+
if (code !== 0x09 && code !== 0x20) {
|
|
136965
|
+
break;
|
|
136966
|
+
}
|
|
136967
|
+
end -= 1;
|
|
136884
136968
|
}
|
|
136969
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
136885
136970
|
}
|
|
136886
136971
|
function normalizeHeader(header) {
|
|
136887
136972
|
return header && String(header).trim().toLowerCase();
|
|
136888
136973
|
}
|
|
136889
|
-
function
|
|
136890
|
-
|
|
136891
|
-
while (end > 0) {
|
|
136892
|
-
const charCode = str.charCodeAt(end - 1);
|
|
136893
|
-
if (charCode !== 10 && charCode !== 13) {
|
|
136894
|
-
break;
|
|
136895
|
-
}
|
|
136896
|
-
end -= 1;
|
|
136897
|
-
}
|
|
136898
|
-
return end === str.length ? str : str.slice(0, end);
|
|
136974
|
+
function sanitizeHeaderValue(str) {
|
|
136975
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
136899
136976
|
}
|
|
136900
136977
|
function normalizeValue(value) {
|
|
136901
136978
|
if (value === false || value == null) {
|
|
136902
136979
|
return value;
|
|
136903
136980
|
}
|
|
136904
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isArray(value) ? value.map(normalizeValue) :
|
|
136981
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
136905
136982
|
}
|
|
136906
136983
|
function parseTokens(str) {
|
|
136907
136984
|
const tokens = Object.create(null);
|
|
@@ -136957,7 +137034,6 @@ class AxiosHeaders {
|
|
|
136957
137034
|
}
|
|
136958
137035
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.findKey(self, lHeader);
|
|
136959
137036
|
if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
|
|
136960
|
-
assertValidHeaderValue(_value, _header);
|
|
136961
137037
|
self[key || _header] = normalizeValue(_value);
|
|
136962
137038
|
}
|
|
136963
137039
|
}
|
|
@@ -137235,7 +137311,7 @@ class InterceptorManager {
|
|
|
137235
137311
|
*/
|
|
137236
137312
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
137237
137313
|
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(requestedURL);
|
|
137238
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
137314
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
137239
137315
|
return (0,_helpers_combineURLs_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(baseURL, requestedURL);
|
|
137240
137316
|
}
|
|
137241
137317
|
return requestedURL;
|
|
@@ -137348,7 +137424,18 @@ const headersToObject = thing => thing instanceof _AxiosHeaders_js__WEBPACK_IMPO
|
|
|
137348
137424
|
function mergeConfig(config1, config2) {
|
|
137349
137425
|
// eslint-disable-next-line no-param-reassign
|
|
137350
137426
|
config2 = config2 || {};
|
|
137351
|
-
|
|
137427
|
+
|
|
137428
|
+
// Use a null-prototype object so that downstream reads such as `config.auth`
|
|
137429
|
+
// or `config.baseURL` cannot inherit polluted values from Object.prototype
|
|
137430
|
+
// (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
|
|
137431
|
+
// own slot to preserve ergonomics for user code that relies on it.
|
|
137432
|
+
const config = Object.create(null);
|
|
137433
|
+
Object.defineProperty(config, 'hasOwnProperty', {
|
|
137434
|
+
value: Object.prototype.hasOwnProperty,
|
|
137435
|
+
enumerable: false,
|
|
137436
|
+
writable: true,
|
|
137437
|
+
configurable: true
|
|
137438
|
+
});
|
|
137352
137439
|
function getMergedValue(target, source, prop, caseless) {
|
|
137353
137440
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isPlainObject(source)) {
|
|
137354
137441
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.merge.call({
|
|
@@ -137387,9 +137474,9 @@ function mergeConfig(config1, config2) {
|
|
|
137387
137474
|
|
|
137388
137475
|
// eslint-disable-next-line consistent-return
|
|
137389
137476
|
function mergeDirectKeys(a, b, prop) {
|
|
137390
|
-
if (
|
|
137477
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(config2, prop)) {
|
|
137391
137478
|
return getMergedValue(a, b);
|
|
137392
|
-
} else if (
|
|
137479
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(config1, prop)) {
|
|
137393
137480
|
return getMergedValue(undefined, a);
|
|
137394
137481
|
}
|
|
137395
137482
|
}
|
|
@@ -137420,6 +137507,7 @@ function mergeConfig(config1, config2) {
|
|
|
137420
137507
|
httpsAgent: defaultToConfig2,
|
|
137421
137508
|
cancelToken: defaultToConfig2,
|
|
137422
137509
|
socketPath: defaultToConfig2,
|
|
137510
|
+
allowedSocketPaths: defaultToConfig2,
|
|
137423
137511
|
responseEncoding: defaultToConfig2,
|
|
137424
137512
|
validateStatus: mergeDirectKeys,
|
|
137425
137513
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
@@ -137430,7 +137518,9 @@ function mergeConfig(config1, config2) {
|
|
|
137430
137518
|
}), function computeConfigValue(prop) {
|
|
137431
137519
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
137432
137520
|
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
137433
|
-
const
|
|
137521
|
+
const a = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(config1, prop) ? config1[prop] : undefined;
|
|
137522
|
+
const b = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
137523
|
+
const configValue = merge(a, b, prop);
|
|
137434
137524
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
137435
137525
|
});
|
|
137436
137526
|
return config;
|
|
@@ -137528,6 +137618,7 @@ function transformData(fns, response) {
|
|
|
137528
137618
|
|
|
137529
137619
|
|
|
137530
137620
|
|
|
137621
|
+
const own = (obj, key) => obj != null && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(obj, key) ? obj[key] : undefined;
|
|
137531
137622
|
|
|
137532
137623
|
/**
|
|
137533
137624
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
@@ -137578,14 +137669,16 @@ const defaults = {
|
|
|
137578
137669
|
}
|
|
137579
137670
|
let isFileList;
|
|
137580
137671
|
if (isObjectPayload) {
|
|
137672
|
+
const formSerializer = own(this, 'formSerializer');
|
|
137581
137673
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
137582
|
-
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(data,
|
|
137674
|
+
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(data, formSerializer).toString();
|
|
137583
137675
|
}
|
|
137584
137676
|
if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
137585
|
-
const
|
|
137677
|
+
const env = own(this, 'env');
|
|
137678
|
+
const _FormData = env && env.FormData;
|
|
137586
137679
|
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(isFileList ? {
|
|
137587
137680
|
'files[]': data
|
|
137588
|
-
} : data, _FormData && new _FormData(),
|
|
137681
|
+
} : data, _FormData && new _FormData(), formSerializer);
|
|
137589
137682
|
}
|
|
137590
137683
|
}
|
|
137591
137684
|
if (isObjectPayload || hasJSONContentType) {
|
|
@@ -137595,21 +137688,22 @@ const defaults = {
|
|
|
137595
137688
|
return data;
|
|
137596
137689
|
}],
|
|
137597
137690
|
transformResponse: [function transformResponse(data) {
|
|
137598
|
-
const transitional = this
|
|
137691
|
+
const transitional = own(this, 'transitional') || defaults.transitional;
|
|
137599
137692
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
137600
|
-
const
|
|
137693
|
+
const responseType = own(this, 'responseType');
|
|
137694
|
+
const JSONRequested = responseType === 'json';
|
|
137601
137695
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isReadableStream(data)) {
|
|
137602
137696
|
return data;
|
|
137603
137697
|
}
|
|
137604
|
-
if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isString(data) && (forcedJSONParsing && !
|
|
137698
|
+
if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
137605
137699
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
137606
137700
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
137607
137701
|
try {
|
|
137608
|
-
return JSON.parse(data, this
|
|
137702
|
+
return JSON.parse(data, own(this, 'parseReviver'));
|
|
137609
137703
|
} catch (e) {
|
|
137610
137704
|
if (strictJSONParsing) {
|
|
137611
137705
|
if (e.name === 'SyntaxError') {
|
|
137612
|
-
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.ERR_BAD_RESPONSE, this, null, this
|
|
137706
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
|
|
137613
137707
|
}
|
|
137614
137708
|
throw e;
|
|
137615
137709
|
}
|
|
@@ -137670,7 +137764,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.forEach(['delete', 'g
|
|
|
137670
137764
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
137671
137765
|
/* harmony export */ x: () => (/* binding */ VERSION)
|
|
137672
137766
|
/* harmony export */ });
|
|
137673
|
-
const VERSION = "1.15.
|
|
137767
|
+
const VERSION = "1.15.2";
|
|
137674
137768
|
|
|
137675
137769
|
/***/ },
|
|
137676
137770
|
|
|
@@ -137700,10 +137794,9 @@ function encode(str) {
|
|
|
137700
137794
|
'(': '%28',
|
|
137701
137795
|
')': '%29',
|
|
137702
137796
|
'~': '%7E',
|
|
137703
|
-
'%20': '+'
|
|
137704
|
-
'%00': '\x00'
|
|
137797
|
+
'%20': '+'
|
|
137705
137798
|
};
|
|
137706
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
137799
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
137707
137800
|
return charMap[match];
|
|
137708
137801
|
});
|
|
137709
137802
|
}
|
|
@@ -138096,7 +138189,7 @@ function formDataToJSON(formData) {
|
|
|
138096
138189
|
name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isArray(target) ? target.length : name;
|
|
138097
138190
|
if (isLast) {
|
|
138098
138191
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasOwnProp(target, name)) {
|
|
138099
|
-
target[name] = [target[name], value];
|
|
138192
|
+
target[name] = _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
138100
138193
|
} else {
|
|
138101
138194
|
target[name] = value;
|
|
138102
138195
|
}
|
|
@@ -138291,19 +138384,19 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
138291
138384
|
let bytesNotified = 0;
|
|
138292
138385
|
const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(50, 250);
|
|
138293
138386
|
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(e => {
|
|
138294
|
-
const
|
|
138387
|
+
const rawLoaded = e.loaded;
|
|
138295
138388
|
const total = e.lengthComputable ? e.total : undefined;
|
|
138296
|
-
const
|
|
138389
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
138390
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
138297
138391
|
const rate = _speedometer(progressBytes);
|
|
138298
|
-
|
|
138299
|
-
bytesNotified = loaded;
|
|
138392
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
138300
138393
|
const data = {
|
|
138301
138394
|
loaded,
|
|
138302
138395
|
total,
|
|
138303
138396
|
progress: total ? loaded / total : undefined,
|
|
138304
138397
|
bytes: progressBytes,
|
|
138305
138398
|
rate: rate ? rate : undefined,
|
|
138306
|
-
estimated: rate && total
|
|
138399
|
+
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
138307
138400
|
event: e,
|
|
138308
138401
|
lengthComputable: total != null,
|
|
138309
138402
|
[isDownloadStream ? 'download' : 'upload']: true
|
|
@@ -138347,16 +138440,21 @@ const asyncDecorator = fn => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
138347
138440
|
|
|
138348
138441
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (config => {
|
|
138349
138442
|
const newConfig = (0,_core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({}, config);
|
|
138350
|
-
|
|
138351
|
-
|
|
138352
|
-
|
|
138353
|
-
|
|
138354
|
-
|
|
138355
|
-
|
|
138356
|
-
|
|
138357
|
-
|
|
138443
|
+
|
|
138444
|
+
// Read only own properties to prevent prototype pollution gadgets
|
|
138445
|
+
// (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
|
|
138446
|
+
const own = key => _utils_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
|
|
138447
|
+
const data = own('data');
|
|
138448
|
+
let withXSRFToken = own('withXSRFToken');
|
|
138449
|
+
const xsrfHeaderName = own('xsrfHeaderName');
|
|
138450
|
+
const xsrfCookieName = own('xsrfCookieName');
|
|
138451
|
+
let headers = own('headers');
|
|
138452
|
+
const auth = own('auth');
|
|
138453
|
+
const baseURL = own('baseURL');
|
|
138454
|
+
const allowAbsoluteUrls = own('allowAbsoluteUrls');
|
|
138455
|
+
const url = own('url');
|
|
138358
138456
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A.from(headers);
|
|
138359
|
-
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(
|
|
138457
|
+
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)((0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
138360
138458
|
|
|
138361
138459
|
// HTTP basic authentication
|
|
138362
138460
|
if (auth) {
|
|
@@ -138383,9 +138481,15 @@ const asyncDecorator = fn => (...args) => _utils_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
138383
138481
|
// Specifically not if we're in a web worker, or react-native.
|
|
138384
138482
|
|
|
138385
138483
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.hasStandardBrowserEnv) {
|
|
138386
|
-
|
|
138387
|
-
|
|
138388
|
-
|
|
138484
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.isFunction(withXSRFToken)) {
|
|
138485
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
138486
|
+
}
|
|
138487
|
+
|
|
138488
|
+
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
138489
|
+
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
138490
|
+
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
138491
|
+
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && (0,_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(newConfig.url);
|
|
138492
|
+
if (shouldSendXSRF) {
|
|
138389
138493
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A.read(xsrfCookieName);
|
|
138390
138494
|
if (xsrfValue) {
|
|
138391
138495
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -138650,6 +138754,7 @@ function toFormData(obj, formData, options) {
|
|
|
138650
138754
|
const dots = options.dots;
|
|
138651
138755
|
const indexes = options.indexes;
|
|
138652
138756
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
138757
|
+
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
138653
138758
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isSpecCompliantForm(formData);
|
|
138654
138759
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isFunction(visitor)) {
|
|
138655
138760
|
throw new TypeError('visitor must be a function');
|
|
@@ -138716,8 +138821,11 @@ function toFormData(obj, formData, options) {
|
|
|
138716
138821
|
convertValue,
|
|
138717
138822
|
isVisitable
|
|
138718
138823
|
});
|
|
138719
|
-
function build(value, path) {
|
|
138824
|
+
function build(value, path, depth = 0) {
|
|
138720
138825
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isUndefined(value)) return;
|
|
138826
|
+
if (depth > maxDepth) {
|
|
138827
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
138828
|
+
}
|
|
138721
138829
|
if (stack.indexOf(value) !== -1) {
|
|
138722
138830
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
138723
138831
|
}
|
|
@@ -138725,7 +138833,7 @@ function toFormData(obj, formData, options) {
|
|
|
138725
138833
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.forEach(value, function each(el, key) {
|
|
138726
138834
|
const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isUndefined(el) || el === null) && visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
138727
138835
|
if (result === true) {
|
|
138728
|
-
build(el, path ? path.concat(key) : [key]);
|
|
138836
|
+
build(el, path ? path.concat(key) : [key], depth + 1);
|
|
138729
138837
|
}
|
|
138730
138838
|
});
|
|
138731
138839
|
stack.pop();
|
|
@@ -138935,7 +139043,9 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
138935
139043
|
let i = keys.length;
|
|
138936
139044
|
while (i-- > 0) {
|
|
138937
139045
|
const opt = keys[i];
|
|
138938
|
-
|
|
139046
|
+
// Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
|
|
139047
|
+
// a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
|
|
139048
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
|
|
138939
139049
|
if (validator) {
|
|
138940
139050
|
const value = options[opt];
|
|
138941
139051
|
const result = value === undefined || validator(value, opt, options);
|
|
@@ -139342,10 +139452,16 @@ function getGlobal() {
|
|
|
139342
139452
|
const G = getGlobal();
|
|
139343
139453
|
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
139344
139454
|
const isFormData = thing => {
|
|
139345
|
-
|
|
139346
|
-
|
|
139455
|
+
if (!thing) return false;
|
|
139456
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
139457
|
+
// Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
|
|
139458
|
+
const proto = getPrototypeOf(thing);
|
|
139459
|
+
if (!proto || proto === Object.prototype) return false;
|
|
139460
|
+
if (!isFunction(thing.append)) return false;
|
|
139461
|
+
const kind = kindOf(thing);
|
|
139462
|
+
return kind === 'formdata' ||
|
|
139347
139463
|
// detect form-data instance
|
|
139348
|
-
kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'
|
|
139464
|
+
kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]';
|
|
139349
139465
|
};
|
|
139350
139466
|
|
|
139351
139467
|
/**
|