@angular/common 22.0.0-next.3 → 22.0.0-next.5
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/fesm2022/_common_module-chunk.mjs +87 -87
- package/fesm2022/_common_module-chunk.mjs.map +1 -1
- package/fesm2022/_location-chunk.mjs +17 -17
- package/fesm2022/_location-chunk.mjs.map +1 -1
- package/fesm2022/_module-chunk.mjs +414 -410
- package/fesm2022/_module-chunk.mjs.map +1 -1
- package/fesm2022/_platform_location-chunk.mjs +8 -8
- package/fesm2022/_platform_location-chunk.mjs.map +1 -1
- package/fesm2022/_platform_navigation-chunk.mjs +4 -4
- package/fesm2022/_platform_navigation-chunk.mjs.map +1 -1
- package/fesm2022/_xhr-chunk.mjs +1 -1
- package/fesm2022/_xhr-chunk.mjs.map +1 -1
- package/fesm2022/common.mjs +24 -21
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http-testing.mjs +9 -9
- package/fesm2022/http-testing.mjs.map +1 -1
- package/fesm2022/http.mjs +3 -3
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +15 -15
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +6 -6
- package/fesm2022/upgrade.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_common_module-chunk.d.ts +4 -4
- package/types/_module-chunk.d.ts +1 -1
- package/types/_platform_location-chunk.d.ts +1 -1
- package/types/_xhr-chunk.d.ts +1 -1
- package/types/common.d.ts +2 -2
- package/types/http-testing.d.ts +1 -1
- package/types/http.d.ts +10 -6
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.5
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { ɵRuntimeError as _RuntimeError, inject, NgZone, DestroyRef,
|
|
9
|
-
import {
|
|
10
|
-
import { Observable,
|
|
8
|
+
import { ɵRuntimeError as _RuntimeError, inject, NgZone, DestroyRef, ɵformatRuntimeError as _formatRuntimeError, Injectable, InjectionToken, runInInjectionContext, PendingTasks, ɵConsole as _Console, DOCUMENT, Inject, ɵTracingService as _TracingService, EnvironmentInjector, makeEnvironmentProviders, NgModule } from '@angular/core';
|
|
9
|
+
import { finalize, concatMap, filter, map, switchMap } from 'rxjs/operators';
|
|
10
|
+
import { Observable, of, from } from 'rxjs';
|
|
11
11
|
import { XhrFactory, parseCookieValue } from './_xhr-chunk.mjs';
|
|
12
12
|
import { PlatformLocation } from './_platform_location-chunk.mjs';
|
|
13
13
|
|
|
@@ -974,7 +974,7 @@ class FetchBackend {
|
|
|
974
974
|
}
|
|
975
975
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
976
976
|
minVersion: "12.0.0",
|
|
977
|
-
version: "22.0.0-next.
|
|
977
|
+
version: "22.0.0-next.5",
|
|
978
978
|
ngImport: i0,
|
|
979
979
|
type: FetchBackend,
|
|
980
980
|
deps: [],
|
|
@@ -982,18 +982,22 @@ class FetchBackend {
|
|
|
982
982
|
});
|
|
983
983
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
984
984
|
minVersion: "12.0.0",
|
|
985
|
-
version: "22.0.0-next.
|
|
985
|
+
version: "22.0.0-next.5",
|
|
986
986
|
ngImport: i0,
|
|
987
|
-
type: FetchBackend
|
|
987
|
+
type: FetchBackend,
|
|
988
|
+
providedIn: 'root'
|
|
988
989
|
});
|
|
989
990
|
}
|
|
990
991
|
i0.ɵɵngDeclareClassMetadata({
|
|
991
992
|
minVersion: "12.0.0",
|
|
992
|
-
version: "22.0.0-next.
|
|
993
|
+
version: "22.0.0-next.5",
|
|
993
994
|
ngImport: i0,
|
|
994
995
|
type: FetchBackend,
|
|
995
996
|
decorators: [{
|
|
996
|
-
type: Injectable
|
|
997
|
+
type: Injectable,
|
|
998
|
+
args: [{
|
|
999
|
+
providedIn: 'root'
|
|
1000
|
+
}]
|
|
997
1001
|
}]
|
|
998
1002
|
});
|
|
999
1003
|
class FetchFactory {}
|
|
@@ -1007,275 +1011,6 @@ function silenceSuperfluousUnhandledPromiseRejection(promise) {
|
|
|
1007
1011
|
promise.then(noop, noop);
|
|
1008
1012
|
}
|
|
1009
1013
|
|
|
1010
|
-
const XSSI_PREFIX = /^\)\]\}',?\n/;
|
|
1011
|
-
function validateXhrCompatibility(req) {
|
|
1012
|
-
const unsupportedOptions = [{
|
|
1013
|
-
property: 'keepalive',
|
|
1014
|
-
errorCode: 2813
|
|
1015
|
-
}, {
|
|
1016
|
-
property: 'cache',
|
|
1017
|
-
errorCode: 2814
|
|
1018
|
-
}, {
|
|
1019
|
-
property: 'priority',
|
|
1020
|
-
errorCode: 2815
|
|
1021
|
-
}, {
|
|
1022
|
-
property: 'mode',
|
|
1023
|
-
errorCode: 2816
|
|
1024
|
-
}, {
|
|
1025
|
-
property: 'redirect',
|
|
1026
|
-
errorCode: 2817
|
|
1027
|
-
}, {
|
|
1028
|
-
property: 'credentials',
|
|
1029
|
-
errorCode: 2818
|
|
1030
|
-
}, {
|
|
1031
|
-
property: 'integrity',
|
|
1032
|
-
errorCode: 2820
|
|
1033
|
-
}, {
|
|
1034
|
-
property: 'referrer',
|
|
1035
|
-
errorCode: 2821
|
|
1036
|
-
}, {
|
|
1037
|
-
property: 'referrerPolicy',
|
|
1038
|
-
errorCode: 2823
|
|
1039
|
-
}];
|
|
1040
|
-
for (const {
|
|
1041
|
-
property,
|
|
1042
|
-
errorCode
|
|
1043
|
-
} of unsupportedOptions) {
|
|
1044
|
-
if (req[property]) {
|
|
1045
|
-
console.warn(_formatRuntimeError(errorCode, `Angular detected that a \`HttpClient\` request with the \`${property}\` option was sent using XHR, which does not support it. To use the \`${property}\` option, enable Fetch API support by passing \`withFetch()\` as an argument to \`provideHttpClient()\`.`));
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
class HttpXhrBackend {
|
|
1050
|
-
xhrFactory;
|
|
1051
|
-
tracingService = inject(_TracingService, {
|
|
1052
|
-
optional: true
|
|
1053
|
-
});
|
|
1054
|
-
constructor(xhrFactory) {
|
|
1055
|
-
this.xhrFactory = xhrFactory;
|
|
1056
|
-
}
|
|
1057
|
-
maybePropagateTrace(fn) {
|
|
1058
|
-
return this.tracingService?.propagate ? this.tracingService.propagate(fn) : fn;
|
|
1059
|
-
}
|
|
1060
|
-
handle(req) {
|
|
1061
|
-
if (req.method === 'JSONP') {
|
|
1062
|
-
throw new _RuntimeError(-2800, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot make a JSONP request without JSONP support. To fix the problem, either add the \`withJsonpSupport()\` call (if \`provideHttpClient()\` is used) or import the \`HttpClientJsonpModule\` in the root NgModule.`);
|
|
1063
|
-
}
|
|
1064
|
-
ngDevMode && validateXhrCompatibility(req);
|
|
1065
|
-
const xhrFactory = this.xhrFactory;
|
|
1066
|
-
const source = typeof ngServerMode !== 'undefined' && ngServerMode && xhrFactory.ɵloadImpl ? from(xhrFactory.ɵloadImpl()) : of(null);
|
|
1067
|
-
return source.pipe(switchMap(() => {
|
|
1068
|
-
return new Observable(observer => {
|
|
1069
|
-
const xhr = xhrFactory.build();
|
|
1070
|
-
xhr.open(req.method, req.urlWithParams);
|
|
1071
|
-
if (req.withCredentials) {
|
|
1072
|
-
xhr.withCredentials = true;
|
|
1073
|
-
}
|
|
1074
|
-
req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));
|
|
1075
|
-
if (!req.headers.has(ACCEPT_HEADER)) {
|
|
1076
|
-
xhr.setRequestHeader(ACCEPT_HEADER, ACCEPT_HEADER_VALUE);
|
|
1077
|
-
}
|
|
1078
|
-
if (!req.headers.has(CONTENT_TYPE_HEADER)) {
|
|
1079
|
-
const detectedType = req.detectContentTypeHeader();
|
|
1080
|
-
if (detectedType !== null) {
|
|
1081
|
-
xhr.setRequestHeader(CONTENT_TYPE_HEADER, detectedType);
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
if (req.timeout) {
|
|
1085
|
-
xhr.timeout = req.timeout;
|
|
1086
|
-
}
|
|
1087
|
-
if (req.responseType) {
|
|
1088
|
-
const responseType = req.responseType.toLowerCase();
|
|
1089
|
-
xhr.responseType = responseType !== 'json' ? responseType : 'text';
|
|
1090
|
-
}
|
|
1091
|
-
const reqBody = req.serializeBody();
|
|
1092
|
-
let headerResponse = null;
|
|
1093
|
-
const partialFromXhr = () => {
|
|
1094
|
-
if (headerResponse !== null) {
|
|
1095
|
-
return headerResponse;
|
|
1096
|
-
}
|
|
1097
|
-
const statusText = xhr.statusText || 'OK';
|
|
1098
|
-
const headers = new HttpHeaders(xhr.getAllResponseHeaders());
|
|
1099
|
-
const url = xhr.responseURL || req.url;
|
|
1100
|
-
headerResponse = new HttpHeaderResponse({
|
|
1101
|
-
headers,
|
|
1102
|
-
status: xhr.status,
|
|
1103
|
-
statusText,
|
|
1104
|
-
url
|
|
1105
|
-
});
|
|
1106
|
-
return headerResponse;
|
|
1107
|
-
};
|
|
1108
|
-
const onLoad = this.maybePropagateTrace(() => {
|
|
1109
|
-
let {
|
|
1110
|
-
headers,
|
|
1111
|
-
status,
|
|
1112
|
-
statusText,
|
|
1113
|
-
url
|
|
1114
|
-
} = partialFromXhr();
|
|
1115
|
-
let body = null;
|
|
1116
|
-
if (status !== HTTP_STATUS_CODE_NO_CONTENT) {
|
|
1117
|
-
body = typeof xhr.response === 'undefined' ? xhr.responseText : xhr.response;
|
|
1118
|
-
}
|
|
1119
|
-
if (status === 0) {
|
|
1120
|
-
status = !!body ? HTTP_STATUS_CODE_OK : 0;
|
|
1121
|
-
}
|
|
1122
|
-
let ok = status >= 200 && status < 300;
|
|
1123
|
-
if (req.responseType === 'json' && typeof body === 'string') {
|
|
1124
|
-
const originalBody = body;
|
|
1125
|
-
body = body.replace(XSSI_PREFIX, '');
|
|
1126
|
-
try {
|
|
1127
|
-
body = body !== '' ? JSON.parse(body) : null;
|
|
1128
|
-
} catch (error) {
|
|
1129
|
-
body = originalBody;
|
|
1130
|
-
if (ok) {
|
|
1131
|
-
ok = false;
|
|
1132
|
-
body = {
|
|
1133
|
-
error,
|
|
1134
|
-
text: body
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
if (ok) {
|
|
1140
|
-
observer.next(new HttpResponse({
|
|
1141
|
-
body,
|
|
1142
|
-
headers,
|
|
1143
|
-
status,
|
|
1144
|
-
statusText,
|
|
1145
|
-
url: url || undefined
|
|
1146
|
-
}));
|
|
1147
|
-
observer.complete();
|
|
1148
|
-
} else {
|
|
1149
|
-
observer.error(new HttpErrorResponse({
|
|
1150
|
-
error: body,
|
|
1151
|
-
headers,
|
|
1152
|
-
status,
|
|
1153
|
-
statusText,
|
|
1154
|
-
url: url || undefined
|
|
1155
|
-
}));
|
|
1156
|
-
}
|
|
1157
|
-
});
|
|
1158
|
-
const onError = this.maybePropagateTrace(error => {
|
|
1159
|
-
const {
|
|
1160
|
-
url
|
|
1161
|
-
} = partialFromXhr();
|
|
1162
|
-
const res = new HttpErrorResponse({
|
|
1163
|
-
error,
|
|
1164
|
-
status: xhr.status || 0,
|
|
1165
|
-
statusText: xhr.statusText || 'Unknown Error',
|
|
1166
|
-
url: url || undefined
|
|
1167
|
-
});
|
|
1168
|
-
observer.error(res);
|
|
1169
|
-
});
|
|
1170
|
-
let onTimeout = onError;
|
|
1171
|
-
if (req.timeout) {
|
|
1172
|
-
onTimeout = this.maybePropagateTrace(_ => {
|
|
1173
|
-
const {
|
|
1174
|
-
url
|
|
1175
|
-
} = partialFromXhr();
|
|
1176
|
-
const res = new HttpErrorResponse({
|
|
1177
|
-
error: new DOMException('Request timed out', 'TimeoutError'),
|
|
1178
|
-
status: xhr.status || 0,
|
|
1179
|
-
statusText: xhr.statusText || 'Request timeout',
|
|
1180
|
-
url: url || undefined
|
|
1181
|
-
});
|
|
1182
|
-
observer.error(res);
|
|
1183
|
-
});
|
|
1184
|
-
}
|
|
1185
|
-
let sentHeaders = false;
|
|
1186
|
-
const onDownProgress = this.maybePropagateTrace(event => {
|
|
1187
|
-
if (!sentHeaders) {
|
|
1188
|
-
observer.next(partialFromXhr());
|
|
1189
|
-
sentHeaders = true;
|
|
1190
|
-
}
|
|
1191
|
-
let progressEvent = {
|
|
1192
|
-
type: HttpEventType.DownloadProgress,
|
|
1193
|
-
loaded: event.loaded
|
|
1194
|
-
};
|
|
1195
|
-
if (event.lengthComputable) {
|
|
1196
|
-
progressEvent.total = event.total;
|
|
1197
|
-
}
|
|
1198
|
-
if (req.responseType === 'text' && !!xhr.responseText) {
|
|
1199
|
-
progressEvent.partialText = xhr.responseText;
|
|
1200
|
-
}
|
|
1201
|
-
observer.next(progressEvent);
|
|
1202
|
-
});
|
|
1203
|
-
const onUpProgress = this.maybePropagateTrace(event => {
|
|
1204
|
-
let progress = {
|
|
1205
|
-
type: HttpEventType.UploadProgress,
|
|
1206
|
-
loaded: event.loaded
|
|
1207
|
-
};
|
|
1208
|
-
if (event.lengthComputable) {
|
|
1209
|
-
progress.total = event.total;
|
|
1210
|
-
}
|
|
1211
|
-
observer.next(progress);
|
|
1212
|
-
});
|
|
1213
|
-
xhr.addEventListener('load', onLoad);
|
|
1214
|
-
xhr.addEventListener('error', onError);
|
|
1215
|
-
xhr.addEventListener('timeout', onTimeout);
|
|
1216
|
-
xhr.addEventListener('abort', onError);
|
|
1217
|
-
if (req.reportProgress) {
|
|
1218
|
-
xhr.addEventListener('progress', onDownProgress);
|
|
1219
|
-
if (reqBody !== null && xhr.upload) {
|
|
1220
|
-
xhr.upload.addEventListener('progress', onUpProgress);
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
xhr.send(reqBody);
|
|
1224
|
-
observer.next({
|
|
1225
|
-
type: HttpEventType.Sent
|
|
1226
|
-
});
|
|
1227
|
-
return () => {
|
|
1228
|
-
xhr.removeEventListener('error', onError);
|
|
1229
|
-
xhr.removeEventListener('abort', onError);
|
|
1230
|
-
xhr.removeEventListener('load', onLoad);
|
|
1231
|
-
xhr.removeEventListener('timeout', onTimeout);
|
|
1232
|
-
if (req.reportProgress) {
|
|
1233
|
-
xhr.removeEventListener('progress', onDownProgress);
|
|
1234
|
-
if (reqBody !== null && xhr.upload) {
|
|
1235
|
-
xhr.upload.removeEventListener('progress', onUpProgress);
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
if (xhr.readyState !== xhr.DONE) {
|
|
1239
|
-
xhr.abort();
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
});
|
|
1243
|
-
}));
|
|
1244
|
-
}
|
|
1245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1246
|
-
minVersion: "12.0.0",
|
|
1247
|
-
version: "22.0.0-next.3",
|
|
1248
|
-
ngImport: i0,
|
|
1249
|
-
type: HttpXhrBackend,
|
|
1250
|
-
deps: [{
|
|
1251
|
-
token: XhrFactory
|
|
1252
|
-
}],
|
|
1253
|
-
target: i0.ɵɵFactoryTarget.Injectable
|
|
1254
|
-
});
|
|
1255
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1256
|
-
minVersion: "12.0.0",
|
|
1257
|
-
version: "22.0.0-next.3",
|
|
1258
|
-
ngImport: i0,
|
|
1259
|
-
type: HttpXhrBackend,
|
|
1260
|
-
providedIn: 'root'
|
|
1261
|
-
});
|
|
1262
|
-
}
|
|
1263
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1264
|
-
minVersion: "12.0.0",
|
|
1265
|
-
version: "22.0.0-next.3",
|
|
1266
|
-
ngImport: i0,
|
|
1267
|
-
type: HttpXhrBackend,
|
|
1268
|
-
decorators: [{
|
|
1269
|
-
type: Injectable,
|
|
1270
|
-
args: [{
|
|
1271
|
-
providedIn: 'root'
|
|
1272
|
-
}]
|
|
1273
|
-
}],
|
|
1274
|
-
ctorParameters: () => [{
|
|
1275
|
-
type: XhrFactory
|
|
1276
|
-
}]
|
|
1277
|
-
});
|
|
1278
|
-
|
|
1279
1014
|
function interceptorChainEndFn(req, finalHandlerFn) {
|
|
1280
1015
|
return finalHandlerFn(req);
|
|
1281
1016
|
}
|
|
@@ -1318,7 +1053,7 @@ function legacyInterceptorFnFactory() {
|
|
|
1318
1053
|
class HttpBackend {
|
|
1319
1054
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1320
1055
|
minVersion: "12.0.0",
|
|
1321
|
-
version: "22.0.0-next.
|
|
1056
|
+
version: "22.0.0-next.5",
|
|
1322
1057
|
ngImport: i0,
|
|
1323
1058
|
type: HttpBackend,
|
|
1324
1059
|
deps: [],
|
|
@@ -1326,23 +1061,23 @@ class HttpBackend {
|
|
|
1326
1061
|
});
|
|
1327
1062
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1328
1063
|
minVersion: "12.0.0",
|
|
1329
|
-
version: "22.0.0-next.
|
|
1064
|
+
version: "22.0.0-next.5",
|
|
1330
1065
|
ngImport: i0,
|
|
1331
1066
|
type: HttpBackend,
|
|
1332
1067
|
providedIn: 'root',
|
|
1333
|
-
useExisting:
|
|
1068
|
+
useExisting: FetchBackend
|
|
1334
1069
|
});
|
|
1335
1070
|
}
|
|
1336
1071
|
i0.ɵɵngDeclareClassMetadata({
|
|
1337
1072
|
minVersion: "12.0.0",
|
|
1338
|
-
version: "22.0.0-next.
|
|
1073
|
+
version: "22.0.0-next.5",
|
|
1339
1074
|
ngImport: i0,
|
|
1340
1075
|
type: HttpBackend,
|
|
1341
1076
|
decorators: [{
|
|
1342
1077
|
type: Injectable,
|
|
1343
1078
|
args: [{
|
|
1344
1079
|
providedIn: 'root',
|
|
1345
|
-
useExisting:
|
|
1080
|
+
useExisting: FetchBackend
|
|
1346
1081
|
}]
|
|
1347
1082
|
}]
|
|
1348
1083
|
});
|
|
@@ -1360,7 +1095,7 @@ class HttpInterceptorHandler {
|
|
|
1360
1095
|
const isTestingBackend = this.backend.isTestingBackend;
|
|
1361
1096
|
if (typeof ngServerMode !== 'undefined' && ngServerMode && !(this.backend instanceof FetchBackend) && !isTestingBackend) {
|
|
1362
1097
|
fetchBackendWarningDisplayed = true;
|
|
1363
|
-
injector.get(_Console).warn(_formatRuntimeError(2801, 'Angular detected that `HttpClient` is not configured ' + "to use `fetch` APIs. It's strongly recommended to " + 'enable `fetch` for applications that use Server-Side Rendering ' + 'for better performance and compatibility. ' + 'To enable `fetch`,
|
|
1098
|
+
injector.get(_Console).warn(_formatRuntimeError(2801, 'Angular detected that `HttpClient` is not configured ' + "to use `fetch` APIs. It's strongly recommended to " + 'enable `fetch` for applications that use Server-Side Rendering ' + 'for better performance and compatibility. ' + 'To enable `fetch`, remove the `withXhr()` feature from the `provideHttpClient()` call'));
|
|
1364
1099
|
}
|
|
1365
1100
|
}
|
|
1366
1101
|
}
|
|
@@ -1378,7 +1113,7 @@ class HttpInterceptorHandler {
|
|
|
1378
1113
|
}
|
|
1379
1114
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1380
1115
|
minVersion: "12.0.0",
|
|
1381
|
-
version: "22.0.0-next.
|
|
1116
|
+
version: "22.0.0-next.5",
|
|
1382
1117
|
ngImport: i0,
|
|
1383
1118
|
type: HttpInterceptorHandler,
|
|
1384
1119
|
deps: [{
|
|
@@ -1390,7 +1125,7 @@ class HttpInterceptorHandler {
|
|
|
1390
1125
|
});
|
|
1391
1126
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1392
1127
|
minVersion: "12.0.0",
|
|
1393
|
-
version: "22.0.0-next.
|
|
1128
|
+
version: "22.0.0-next.5",
|
|
1394
1129
|
ngImport: i0,
|
|
1395
1130
|
type: HttpInterceptorHandler,
|
|
1396
1131
|
providedIn: 'root'
|
|
@@ -1398,7 +1133,7 @@ class HttpInterceptorHandler {
|
|
|
1398
1133
|
}
|
|
1399
1134
|
i0.ɵɵngDeclareClassMetadata({
|
|
1400
1135
|
minVersion: "12.0.0",
|
|
1401
|
-
version: "22.0.0-next.
|
|
1136
|
+
version: "22.0.0-next.5",
|
|
1402
1137
|
ngImport: i0,
|
|
1403
1138
|
type: HttpInterceptorHandler,
|
|
1404
1139
|
decorators: [{
|
|
@@ -1416,7 +1151,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1416
1151
|
class HttpHandler {
|
|
1417
1152
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1418
1153
|
minVersion: "12.0.0",
|
|
1419
|
-
version: "22.0.0-next.
|
|
1154
|
+
version: "22.0.0-next.5",
|
|
1420
1155
|
ngImport: i0,
|
|
1421
1156
|
type: HttpHandler,
|
|
1422
1157
|
deps: [],
|
|
@@ -1424,7 +1159,7 @@ class HttpHandler {
|
|
|
1424
1159
|
});
|
|
1425
1160
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1426
1161
|
minVersion: "12.0.0",
|
|
1427
|
-
version: "22.0.0-next.
|
|
1162
|
+
version: "22.0.0-next.5",
|
|
1428
1163
|
ngImport: i0,
|
|
1429
1164
|
type: HttpHandler,
|
|
1430
1165
|
providedIn: 'root',
|
|
@@ -1433,7 +1168,7 @@ class HttpHandler {
|
|
|
1433
1168
|
}
|
|
1434
1169
|
i0.ɵɵngDeclareClassMetadata({
|
|
1435
1170
|
minVersion: "12.0.0",
|
|
1436
|
-
version: "22.0.0-next.
|
|
1171
|
+
version: "22.0.0-next.5",
|
|
1437
1172
|
ngImport: i0,
|
|
1438
1173
|
type: HttpHandler,
|
|
1439
1174
|
decorators: [{
|
|
@@ -1583,7 +1318,7 @@ class HttpClient {
|
|
|
1583
1318
|
}
|
|
1584
1319
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1585
1320
|
minVersion: "12.0.0",
|
|
1586
|
-
version: "22.0.0-next.
|
|
1321
|
+
version: "22.0.0-next.5",
|
|
1587
1322
|
ngImport: i0,
|
|
1588
1323
|
type: HttpClient,
|
|
1589
1324
|
deps: [{
|
|
@@ -1593,7 +1328,7 @@ class HttpClient {
|
|
|
1593
1328
|
});
|
|
1594
1329
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1595
1330
|
minVersion: "12.0.0",
|
|
1596
|
-
version: "22.0.0-next.
|
|
1331
|
+
version: "22.0.0-next.5",
|
|
1597
1332
|
ngImport: i0,
|
|
1598
1333
|
type: HttpClient,
|
|
1599
1334
|
providedIn: 'root'
|
|
@@ -1601,7 +1336,7 @@ class HttpClient {
|
|
|
1601
1336
|
}
|
|
1602
1337
|
i0.ɵɵngDeclareClassMetadata({
|
|
1603
1338
|
minVersion: "12.0.0",
|
|
1604
|
-
version: "22.0.0-next.
|
|
1339
|
+
version: "22.0.0-next.5",
|
|
1605
1340
|
ngImport: i0,
|
|
1606
1341
|
type: HttpClient,
|
|
1607
1342
|
decorators: [{
|
|
@@ -1671,127 +1406,396 @@ class JsonpClientBackend {
|
|
|
1671
1406
|
cleanup();
|
|
1672
1407
|
if (!finished) {
|
|
1673
1408
|
observer.error(new HttpErrorResponse({
|
|
1674
|
-
url,
|
|
1675
|
-
status: 0,
|
|
1676
|
-
statusText: 'JSONP Error',
|
|
1677
|
-
error: new Error(JSONP_ERR_NO_CALLBACK)
|
|
1409
|
+
url,
|
|
1410
|
+
status: 0,
|
|
1411
|
+
statusText: 'JSONP Error',
|
|
1412
|
+
error: new Error(JSONP_ERR_NO_CALLBACK)
|
|
1413
|
+
}));
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
observer.next(new HttpResponse({
|
|
1417
|
+
body,
|
|
1418
|
+
status: HTTP_STATUS_CODE_OK,
|
|
1419
|
+
statusText: 'OK',
|
|
1420
|
+
url
|
|
1421
|
+
}));
|
|
1422
|
+
observer.complete();
|
|
1423
|
+
});
|
|
1424
|
+
};
|
|
1425
|
+
const onError = error => {
|
|
1426
|
+
cleanup();
|
|
1427
|
+
observer.error(new HttpErrorResponse({
|
|
1428
|
+
error,
|
|
1429
|
+
status: 0,
|
|
1430
|
+
statusText: 'JSONP Error',
|
|
1431
|
+
url
|
|
1432
|
+
}));
|
|
1433
|
+
};
|
|
1434
|
+
node.addEventListener('load', onLoad);
|
|
1435
|
+
node.addEventListener('error', onError);
|
|
1436
|
+
this.document.body.appendChild(node);
|
|
1437
|
+
observer.next({
|
|
1438
|
+
type: HttpEventType.Sent
|
|
1439
|
+
});
|
|
1440
|
+
return () => {
|
|
1441
|
+
if (!finished) {
|
|
1442
|
+
this.removeListeners(node);
|
|
1443
|
+
}
|
|
1444
|
+
cleanup();
|
|
1445
|
+
};
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
removeListeners(script) {
|
|
1449
|
+
foreignDocument ??= this.document.implementation.createHTMLDocument();
|
|
1450
|
+
foreignDocument.adoptNode(script);
|
|
1451
|
+
}
|
|
1452
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1453
|
+
minVersion: "12.0.0",
|
|
1454
|
+
version: "22.0.0-next.5",
|
|
1455
|
+
ngImport: i0,
|
|
1456
|
+
type: JsonpClientBackend,
|
|
1457
|
+
deps: [{
|
|
1458
|
+
token: JsonpCallbackContext
|
|
1459
|
+
}, {
|
|
1460
|
+
token: DOCUMENT
|
|
1461
|
+
}],
|
|
1462
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1463
|
+
});
|
|
1464
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1465
|
+
minVersion: "12.0.0",
|
|
1466
|
+
version: "22.0.0-next.5",
|
|
1467
|
+
ngImport: i0,
|
|
1468
|
+
type: JsonpClientBackend
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1472
|
+
minVersion: "12.0.0",
|
|
1473
|
+
version: "22.0.0-next.5",
|
|
1474
|
+
ngImport: i0,
|
|
1475
|
+
type: JsonpClientBackend,
|
|
1476
|
+
decorators: [{
|
|
1477
|
+
type: Injectable
|
|
1478
|
+
}],
|
|
1479
|
+
ctorParameters: () => [{
|
|
1480
|
+
type: JsonpCallbackContext
|
|
1481
|
+
}, {
|
|
1482
|
+
type: undefined,
|
|
1483
|
+
decorators: [{
|
|
1484
|
+
type: Inject,
|
|
1485
|
+
args: [DOCUMENT]
|
|
1486
|
+
}]
|
|
1487
|
+
}]
|
|
1488
|
+
});
|
|
1489
|
+
function jsonpInterceptorFn(req, next) {
|
|
1490
|
+
if (req.method === 'JSONP') {
|
|
1491
|
+
return inject(JsonpClientBackend).handle(req);
|
|
1492
|
+
}
|
|
1493
|
+
return next(req);
|
|
1494
|
+
}
|
|
1495
|
+
class JsonpInterceptor {
|
|
1496
|
+
injector;
|
|
1497
|
+
constructor(injector) {
|
|
1498
|
+
this.injector = injector;
|
|
1499
|
+
}
|
|
1500
|
+
intercept(initialRequest, next) {
|
|
1501
|
+
return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1502
|
+
}
|
|
1503
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1504
|
+
minVersion: "12.0.0",
|
|
1505
|
+
version: "22.0.0-next.5",
|
|
1506
|
+
ngImport: i0,
|
|
1507
|
+
type: JsonpInterceptor,
|
|
1508
|
+
deps: [{
|
|
1509
|
+
token: i0.EnvironmentInjector
|
|
1510
|
+
}],
|
|
1511
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1512
|
+
});
|
|
1513
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1514
|
+
minVersion: "12.0.0",
|
|
1515
|
+
version: "22.0.0-next.5",
|
|
1516
|
+
ngImport: i0,
|
|
1517
|
+
type: JsonpInterceptor
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1521
|
+
minVersion: "12.0.0",
|
|
1522
|
+
version: "22.0.0-next.5",
|
|
1523
|
+
ngImport: i0,
|
|
1524
|
+
type: JsonpInterceptor,
|
|
1525
|
+
decorators: [{
|
|
1526
|
+
type: Injectable
|
|
1527
|
+
}],
|
|
1528
|
+
ctorParameters: () => [{
|
|
1529
|
+
type: i0.EnvironmentInjector
|
|
1530
|
+
}]
|
|
1531
|
+
});
|
|
1532
|
+
|
|
1533
|
+
const XSSI_PREFIX = /^\)\]\}',?\n/;
|
|
1534
|
+
function validateXhrCompatibility(req) {
|
|
1535
|
+
const unsupportedOptions = [{
|
|
1536
|
+
property: 'keepalive',
|
|
1537
|
+
errorCode: 2813
|
|
1538
|
+
}, {
|
|
1539
|
+
property: 'cache',
|
|
1540
|
+
errorCode: 2814
|
|
1541
|
+
}, {
|
|
1542
|
+
property: 'priority',
|
|
1543
|
+
errorCode: 2815
|
|
1544
|
+
}, {
|
|
1545
|
+
property: 'mode',
|
|
1546
|
+
errorCode: 2816
|
|
1547
|
+
}, {
|
|
1548
|
+
property: 'redirect',
|
|
1549
|
+
errorCode: 2817
|
|
1550
|
+
}, {
|
|
1551
|
+
property: 'credentials',
|
|
1552
|
+
errorCode: 2818
|
|
1553
|
+
}, {
|
|
1554
|
+
property: 'integrity',
|
|
1555
|
+
errorCode: 2820
|
|
1556
|
+
}, {
|
|
1557
|
+
property: 'referrer',
|
|
1558
|
+
errorCode: 2821
|
|
1559
|
+
}, {
|
|
1560
|
+
property: 'referrerPolicy',
|
|
1561
|
+
errorCode: 2823
|
|
1562
|
+
}];
|
|
1563
|
+
for (const {
|
|
1564
|
+
property,
|
|
1565
|
+
errorCode
|
|
1566
|
+
} of unsupportedOptions) {
|
|
1567
|
+
if (req[property]) {
|
|
1568
|
+
console.warn(_formatRuntimeError(errorCode, `Angular detected that a \`HttpClient\` request with the \`${property}\` option was sent using XHR, which does not support it. To use the \`${property}\` option, use the Fetch API by removing \`withXhr()\` from the \`provideHttpClient()\` call.`));
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
class HttpXhrBackend {
|
|
1573
|
+
xhrFactory;
|
|
1574
|
+
tracingService = inject(_TracingService, {
|
|
1575
|
+
optional: true
|
|
1576
|
+
});
|
|
1577
|
+
constructor(xhrFactory) {
|
|
1578
|
+
this.xhrFactory = xhrFactory;
|
|
1579
|
+
}
|
|
1580
|
+
maybePropagateTrace(fn) {
|
|
1581
|
+
return this.tracingService?.propagate ? this.tracingService.propagate(fn) : fn;
|
|
1582
|
+
}
|
|
1583
|
+
handle(req) {
|
|
1584
|
+
if (req.method === 'JSONP') {
|
|
1585
|
+
throw new _RuntimeError(-2800, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot make a JSONP request without JSONP support. To fix the problem, either add the \`withJsonpSupport()\` call (if \`provideHttpClient()\` is used) or import the \`HttpClientJsonpModule\` in the root NgModule.`);
|
|
1586
|
+
}
|
|
1587
|
+
ngDevMode && validateXhrCompatibility(req);
|
|
1588
|
+
const xhrFactory = this.xhrFactory;
|
|
1589
|
+
const source = typeof ngServerMode !== 'undefined' && ngServerMode && xhrFactory.ɵloadImpl ? from(xhrFactory.ɵloadImpl()) : of(null);
|
|
1590
|
+
return source.pipe(switchMap(() => {
|
|
1591
|
+
return new Observable(observer => {
|
|
1592
|
+
const xhr = xhrFactory.build();
|
|
1593
|
+
xhr.open(req.method, req.urlWithParams);
|
|
1594
|
+
if (req.withCredentials) {
|
|
1595
|
+
xhr.withCredentials = true;
|
|
1596
|
+
}
|
|
1597
|
+
req.headers.forEach((name, values) => xhr.setRequestHeader(name, values.join(',')));
|
|
1598
|
+
if (!req.headers.has(ACCEPT_HEADER)) {
|
|
1599
|
+
xhr.setRequestHeader(ACCEPT_HEADER, ACCEPT_HEADER_VALUE);
|
|
1600
|
+
}
|
|
1601
|
+
if (!req.headers.has(CONTENT_TYPE_HEADER)) {
|
|
1602
|
+
const detectedType = req.detectContentTypeHeader();
|
|
1603
|
+
if (detectedType !== null) {
|
|
1604
|
+
xhr.setRequestHeader(CONTENT_TYPE_HEADER, detectedType);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
if (req.timeout) {
|
|
1608
|
+
xhr.timeout = req.timeout;
|
|
1609
|
+
}
|
|
1610
|
+
if (req.responseType) {
|
|
1611
|
+
const responseType = req.responseType.toLowerCase();
|
|
1612
|
+
xhr.responseType = responseType !== 'json' ? responseType : 'text';
|
|
1613
|
+
}
|
|
1614
|
+
const reqBody = req.serializeBody();
|
|
1615
|
+
let headerResponse = null;
|
|
1616
|
+
const partialFromXhr = () => {
|
|
1617
|
+
if (headerResponse !== null) {
|
|
1618
|
+
return headerResponse;
|
|
1619
|
+
}
|
|
1620
|
+
const statusText = xhr.statusText || 'OK';
|
|
1621
|
+
const headers = new HttpHeaders(xhr.getAllResponseHeaders());
|
|
1622
|
+
const url = xhr.responseURL || req.url;
|
|
1623
|
+
headerResponse = new HttpHeaderResponse({
|
|
1624
|
+
headers,
|
|
1625
|
+
status: xhr.status,
|
|
1626
|
+
statusText,
|
|
1627
|
+
url
|
|
1628
|
+
});
|
|
1629
|
+
return headerResponse;
|
|
1630
|
+
};
|
|
1631
|
+
const onLoad = this.maybePropagateTrace(() => {
|
|
1632
|
+
let {
|
|
1633
|
+
headers,
|
|
1634
|
+
status,
|
|
1635
|
+
statusText,
|
|
1636
|
+
url
|
|
1637
|
+
} = partialFromXhr();
|
|
1638
|
+
let body = null;
|
|
1639
|
+
if (status !== HTTP_STATUS_CODE_NO_CONTENT) {
|
|
1640
|
+
body = typeof xhr.response === 'undefined' ? xhr.responseText : xhr.response;
|
|
1641
|
+
}
|
|
1642
|
+
if (status === 0) {
|
|
1643
|
+
status = !!body ? HTTP_STATUS_CODE_OK : 0;
|
|
1644
|
+
}
|
|
1645
|
+
let ok = status >= 200 && status < 300;
|
|
1646
|
+
if (req.responseType === 'json' && typeof body === 'string') {
|
|
1647
|
+
const originalBody = body;
|
|
1648
|
+
body = body.replace(XSSI_PREFIX, '');
|
|
1649
|
+
try {
|
|
1650
|
+
body = body !== '' ? JSON.parse(body) : null;
|
|
1651
|
+
} catch (error) {
|
|
1652
|
+
body = originalBody;
|
|
1653
|
+
if (ok) {
|
|
1654
|
+
ok = false;
|
|
1655
|
+
body = {
|
|
1656
|
+
error,
|
|
1657
|
+
text: body
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
if (ok) {
|
|
1663
|
+
observer.next(new HttpResponse({
|
|
1664
|
+
body,
|
|
1665
|
+
headers,
|
|
1666
|
+
status,
|
|
1667
|
+
statusText,
|
|
1668
|
+
url: url || undefined
|
|
1669
|
+
}));
|
|
1670
|
+
observer.complete();
|
|
1671
|
+
} else {
|
|
1672
|
+
observer.error(new HttpErrorResponse({
|
|
1673
|
+
error: body,
|
|
1674
|
+
headers,
|
|
1675
|
+
status,
|
|
1676
|
+
statusText,
|
|
1677
|
+
url: url || undefined
|
|
1678
1678
|
}));
|
|
1679
|
-
return;
|
|
1680
1679
|
}
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
statusText: 'OK',
|
|
1680
|
+
});
|
|
1681
|
+
const onError = this.maybePropagateTrace(error => {
|
|
1682
|
+
const {
|
|
1685
1683
|
url
|
|
1686
|
-
})
|
|
1687
|
-
|
|
1684
|
+
} = partialFromXhr();
|
|
1685
|
+
const res = new HttpErrorResponse({
|
|
1686
|
+
error,
|
|
1687
|
+
status: xhr.status || 0,
|
|
1688
|
+
statusText: xhr.statusText || 'Unknown Error',
|
|
1689
|
+
url: url || undefined
|
|
1690
|
+
});
|
|
1691
|
+
observer.error(res);
|
|
1688
1692
|
});
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
type: HttpEventType.Sent
|
|
1704
|
-
});
|
|
1705
|
-
return () => {
|
|
1706
|
-
if (!finished) {
|
|
1707
|
-
this.removeListeners(node);
|
|
1693
|
+
let onTimeout = onError;
|
|
1694
|
+
if (req.timeout) {
|
|
1695
|
+
onTimeout = this.maybePropagateTrace(_ => {
|
|
1696
|
+
const {
|
|
1697
|
+
url
|
|
1698
|
+
} = partialFromXhr();
|
|
1699
|
+
const res = new HttpErrorResponse({
|
|
1700
|
+
error: new DOMException('Request timed out', 'TimeoutError'),
|
|
1701
|
+
status: xhr.status || 0,
|
|
1702
|
+
statusText: xhr.statusText || 'Request timeout',
|
|
1703
|
+
url: url || undefined
|
|
1704
|
+
});
|
|
1705
|
+
observer.error(res);
|
|
1706
|
+
});
|
|
1708
1707
|
}
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1708
|
+
let sentHeaders = false;
|
|
1709
|
+
const onDownProgress = this.maybePropagateTrace(event => {
|
|
1710
|
+
if (!sentHeaders) {
|
|
1711
|
+
observer.next(partialFromXhr());
|
|
1712
|
+
sentHeaders = true;
|
|
1713
|
+
}
|
|
1714
|
+
let progressEvent = {
|
|
1715
|
+
type: HttpEventType.DownloadProgress,
|
|
1716
|
+
loaded: event.loaded
|
|
1717
|
+
};
|
|
1718
|
+
if (event.lengthComputable) {
|
|
1719
|
+
progressEvent.total = event.total;
|
|
1720
|
+
}
|
|
1721
|
+
if (req.responseType === 'text' && !!xhr.responseText) {
|
|
1722
|
+
progressEvent.partialText = xhr.responseText;
|
|
1723
|
+
}
|
|
1724
|
+
observer.next(progressEvent);
|
|
1725
|
+
});
|
|
1726
|
+
const onUpProgress = this.maybePropagateTrace(event => {
|
|
1727
|
+
let progress = {
|
|
1728
|
+
type: HttpEventType.UploadProgress,
|
|
1729
|
+
loaded: event.loaded
|
|
1730
|
+
};
|
|
1731
|
+
if (event.lengthComputable) {
|
|
1732
|
+
progress.total = event.total;
|
|
1733
|
+
}
|
|
1734
|
+
observer.next(progress);
|
|
1735
|
+
});
|
|
1736
|
+
xhr.addEventListener('load', onLoad);
|
|
1737
|
+
xhr.addEventListener('error', onError);
|
|
1738
|
+
xhr.addEventListener('timeout', onTimeout);
|
|
1739
|
+
xhr.addEventListener('abort', onError);
|
|
1740
|
+
if (req.reportProgress) {
|
|
1741
|
+
xhr.addEventListener('progress', onDownProgress);
|
|
1742
|
+
if (reqBody !== null && xhr.upload) {
|
|
1743
|
+
xhr.upload.addEventListener('progress', onUpProgress);
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
xhr.send(reqBody);
|
|
1747
|
+
observer.next({
|
|
1748
|
+
type: HttpEventType.Sent
|
|
1749
|
+
});
|
|
1750
|
+
return () => {
|
|
1751
|
+
xhr.removeEventListener('error', onError);
|
|
1752
|
+
xhr.removeEventListener('abort', onError);
|
|
1753
|
+
xhr.removeEventListener('load', onLoad);
|
|
1754
|
+
xhr.removeEventListener('timeout', onTimeout);
|
|
1755
|
+
if (req.reportProgress) {
|
|
1756
|
+
xhr.removeEventListener('progress', onDownProgress);
|
|
1757
|
+
if (reqBody !== null && xhr.upload) {
|
|
1758
|
+
xhr.upload.removeEventListener('progress', onUpProgress);
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
if (xhr.readyState !== xhr.DONE) {
|
|
1762
|
+
xhr.abort();
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
});
|
|
1766
|
+
}));
|
|
1716
1767
|
}
|
|
1717
1768
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1718
1769
|
minVersion: "12.0.0",
|
|
1719
|
-
version: "22.0.0-next.
|
|
1770
|
+
version: "22.0.0-next.5",
|
|
1720
1771
|
ngImport: i0,
|
|
1721
|
-
type:
|
|
1772
|
+
type: HttpXhrBackend,
|
|
1722
1773
|
deps: [{
|
|
1723
|
-
token:
|
|
1724
|
-
}, {
|
|
1725
|
-
token: DOCUMENT
|
|
1774
|
+
token: XhrFactory
|
|
1726
1775
|
}],
|
|
1727
1776
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
1728
1777
|
});
|
|
1729
1778
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1730
1779
|
minVersion: "12.0.0",
|
|
1731
|
-
version: "22.0.0-next.
|
|
1780
|
+
version: "22.0.0-next.5",
|
|
1732
1781
|
ngImport: i0,
|
|
1733
|
-
type:
|
|
1782
|
+
type: HttpXhrBackend,
|
|
1783
|
+
providedIn: 'root'
|
|
1734
1784
|
});
|
|
1735
1785
|
}
|
|
1736
1786
|
i0.ɵɵngDeclareClassMetadata({
|
|
1737
1787
|
minVersion: "12.0.0",
|
|
1738
|
-
version: "22.0.0-next.
|
|
1788
|
+
version: "22.0.0-next.5",
|
|
1739
1789
|
ngImport: i0,
|
|
1740
|
-
type:
|
|
1790
|
+
type: HttpXhrBackend,
|
|
1741
1791
|
decorators: [{
|
|
1742
|
-
type: Injectable
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
type: JsonpCallbackContext
|
|
1746
|
-
}, {
|
|
1747
|
-
type: undefined,
|
|
1748
|
-
decorators: [{
|
|
1749
|
-
type: Inject,
|
|
1750
|
-
args: [DOCUMENT]
|
|
1792
|
+
type: Injectable,
|
|
1793
|
+
args: [{
|
|
1794
|
+
providedIn: 'root'
|
|
1751
1795
|
}]
|
|
1752
|
-
}]
|
|
1753
|
-
});
|
|
1754
|
-
function jsonpInterceptorFn(req, next) {
|
|
1755
|
-
if (req.method === 'JSONP') {
|
|
1756
|
-
return inject(JsonpClientBackend).handle(req);
|
|
1757
|
-
}
|
|
1758
|
-
return next(req);
|
|
1759
|
-
}
|
|
1760
|
-
class JsonpInterceptor {
|
|
1761
|
-
injector;
|
|
1762
|
-
constructor(injector) {
|
|
1763
|
-
this.injector = injector;
|
|
1764
|
-
}
|
|
1765
|
-
intercept(initialRequest, next) {
|
|
1766
|
-
return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, downstreamRequest => next.handle(downstreamRequest)));
|
|
1767
|
-
}
|
|
1768
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1769
|
-
minVersion: "12.0.0",
|
|
1770
|
-
version: "22.0.0-next.3",
|
|
1771
|
-
ngImport: i0,
|
|
1772
|
-
type: JsonpInterceptor,
|
|
1773
|
-
deps: [{
|
|
1774
|
-
token: i0.EnvironmentInjector
|
|
1775
|
-
}],
|
|
1776
|
-
target: i0.ɵɵFactoryTarget.Injectable
|
|
1777
|
-
});
|
|
1778
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1779
|
-
minVersion: "12.0.0",
|
|
1780
|
-
version: "22.0.0-next.3",
|
|
1781
|
-
ngImport: i0,
|
|
1782
|
-
type: JsonpInterceptor
|
|
1783
|
-
});
|
|
1784
|
-
}
|
|
1785
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1786
|
-
minVersion: "12.0.0",
|
|
1787
|
-
version: "22.0.0-next.3",
|
|
1788
|
-
ngImport: i0,
|
|
1789
|
-
type: JsonpInterceptor,
|
|
1790
|
-
decorators: [{
|
|
1791
|
-
type: Injectable
|
|
1792
1796
|
}],
|
|
1793
1797
|
ctorParameters: () => [{
|
|
1794
|
-
type:
|
|
1798
|
+
type: XhrFactory
|
|
1795
1799
|
}]
|
|
1796
1800
|
});
|
|
1797
1801
|
|
|
@@ -1826,7 +1830,7 @@ class HttpXsrfCookieExtractor {
|
|
|
1826
1830
|
}
|
|
1827
1831
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1828
1832
|
minVersion: "12.0.0",
|
|
1829
|
-
version: "22.0.0-next.
|
|
1833
|
+
version: "22.0.0-next.5",
|
|
1830
1834
|
ngImport: i0,
|
|
1831
1835
|
type: HttpXsrfCookieExtractor,
|
|
1832
1836
|
deps: [],
|
|
@@ -1834,7 +1838,7 @@ class HttpXsrfCookieExtractor {
|
|
|
1834
1838
|
});
|
|
1835
1839
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1836
1840
|
minVersion: "12.0.0",
|
|
1837
|
-
version: "22.0.0-next.
|
|
1841
|
+
version: "22.0.0-next.5",
|
|
1838
1842
|
ngImport: i0,
|
|
1839
1843
|
type: HttpXsrfCookieExtractor,
|
|
1840
1844
|
providedIn: 'root'
|
|
@@ -1842,7 +1846,7 @@ class HttpXsrfCookieExtractor {
|
|
|
1842
1846
|
}
|
|
1843
1847
|
i0.ɵɵngDeclareClassMetadata({
|
|
1844
1848
|
minVersion: "12.0.0",
|
|
1845
|
-
version: "22.0.0-next.
|
|
1849
|
+
version: "22.0.0-next.5",
|
|
1846
1850
|
ngImport: i0,
|
|
1847
1851
|
type: HttpXsrfCookieExtractor,
|
|
1848
1852
|
decorators: [{
|
|
@@ -1855,7 +1859,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1855
1859
|
class HttpXsrfTokenExtractor {
|
|
1856
1860
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1857
1861
|
minVersion: "12.0.0",
|
|
1858
|
-
version: "22.0.0-next.
|
|
1862
|
+
version: "22.0.0-next.5",
|
|
1859
1863
|
ngImport: i0,
|
|
1860
1864
|
type: HttpXsrfTokenExtractor,
|
|
1861
1865
|
deps: [],
|
|
@@ -1863,7 +1867,7 @@ class HttpXsrfTokenExtractor {
|
|
|
1863
1867
|
});
|
|
1864
1868
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1865
1869
|
minVersion: "12.0.0",
|
|
1866
|
-
version: "22.0.0-next.
|
|
1870
|
+
version: "22.0.0-next.5",
|
|
1867
1871
|
ngImport: i0,
|
|
1868
1872
|
type: HttpXsrfTokenExtractor,
|
|
1869
1873
|
providedIn: 'root',
|
|
@@ -1872,7 +1876,7 @@ class HttpXsrfTokenExtractor {
|
|
|
1872
1876
|
}
|
|
1873
1877
|
i0.ɵɵngDeclareClassMetadata({
|
|
1874
1878
|
minVersion: "12.0.0",
|
|
1875
|
-
version: "22.0.0-next.
|
|
1879
|
+
version: "22.0.0-next.5",
|
|
1876
1880
|
ngImport: i0,
|
|
1877
1881
|
type: HttpXsrfTokenExtractor,
|
|
1878
1882
|
decorators: [{
|
|
@@ -1917,7 +1921,7 @@ class HttpXsrfInterceptor {
|
|
|
1917
1921
|
}
|
|
1918
1922
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1919
1923
|
minVersion: "12.0.0",
|
|
1920
|
-
version: "22.0.0-next.
|
|
1924
|
+
version: "22.0.0-next.5",
|
|
1921
1925
|
ngImport: i0,
|
|
1922
1926
|
type: HttpXsrfInterceptor,
|
|
1923
1927
|
deps: [],
|
|
@@ -1925,14 +1929,14 @@ class HttpXsrfInterceptor {
|
|
|
1925
1929
|
});
|
|
1926
1930
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1927
1931
|
minVersion: "12.0.0",
|
|
1928
|
-
version: "22.0.0-next.
|
|
1932
|
+
version: "22.0.0-next.5",
|
|
1929
1933
|
ngImport: i0,
|
|
1930
1934
|
type: HttpXsrfInterceptor
|
|
1931
1935
|
});
|
|
1932
1936
|
}
|
|
1933
1937
|
i0.ɵɵngDeclareClassMetadata({
|
|
1934
1938
|
minVersion: "12.0.0",
|
|
1935
|
-
version: "22.0.0-next.
|
|
1939
|
+
version: "22.0.0-next.5",
|
|
1936
1940
|
ngImport: i0,
|
|
1937
1941
|
type: HttpXsrfInterceptor,
|
|
1938
1942
|
decorators: [{
|
|
@@ -2080,7 +2084,7 @@ class HttpClientXsrfModule {
|
|
|
2080
2084
|
}
|
|
2081
2085
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2082
2086
|
minVersion: "12.0.0",
|
|
2083
|
-
version: "22.0.0-next.
|
|
2087
|
+
version: "22.0.0-next.5",
|
|
2084
2088
|
ngImport: i0,
|
|
2085
2089
|
type: HttpClientXsrfModule,
|
|
2086
2090
|
deps: [],
|
|
@@ -2088,13 +2092,13 @@ class HttpClientXsrfModule {
|
|
|
2088
2092
|
});
|
|
2089
2093
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
2090
2094
|
minVersion: "14.0.0",
|
|
2091
|
-
version: "22.0.0-next.
|
|
2095
|
+
version: "22.0.0-next.5",
|
|
2092
2096
|
ngImport: i0,
|
|
2093
2097
|
type: HttpClientXsrfModule
|
|
2094
2098
|
});
|
|
2095
2099
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
2096
2100
|
minVersion: "12.0.0",
|
|
2097
|
-
version: "22.0.0-next.
|
|
2101
|
+
version: "22.0.0-next.5",
|
|
2098
2102
|
ngImport: i0,
|
|
2099
2103
|
type: HttpClientXsrfModule,
|
|
2100
2104
|
providers: [HttpXsrfInterceptor, {
|
|
@@ -2115,7 +2119,7 @@ class HttpClientXsrfModule {
|
|
|
2115
2119
|
}
|
|
2116
2120
|
i0.ɵɵngDeclareClassMetadata({
|
|
2117
2121
|
minVersion: "12.0.0",
|
|
2118
|
-
version: "22.0.0-next.
|
|
2122
|
+
version: "22.0.0-next.5",
|
|
2119
2123
|
ngImport: i0,
|
|
2120
2124
|
type: HttpClientXsrfModule,
|
|
2121
2125
|
decorators: [{
|
|
@@ -2141,7 +2145,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2141
2145
|
class HttpClientModule {
|
|
2142
2146
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2143
2147
|
minVersion: "12.0.0",
|
|
2144
|
-
version: "22.0.0-next.
|
|
2148
|
+
version: "22.0.0-next.5",
|
|
2145
2149
|
ngImport: i0,
|
|
2146
2150
|
type: HttpClientModule,
|
|
2147
2151
|
deps: [],
|
|
@@ -2149,13 +2153,13 @@ class HttpClientModule {
|
|
|
2149
2153
|
});
|
|
2150
2154
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
2151
2155
|
minVersion: "14.0.0",
|
|
2152
|
-
version: "22.0.0-next.
|
|
2156
|
+
version: "22.0.0-next.5",
|
|
2153
2157
|
ngImport: i0,
|
|
2154
2158
|
type: HttpClientModule
|
|
2155
2159
|
});
|
|
2156
2160
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
2157
2161
|
minVersion: "12.0.0",
|
|
2158
|
-
version: "22.0.0-next.
|
|
2162
|
+
version: "22.0.0-next.5",
|
|
2159
2163
|
ngImport: i0,
|
|
2160
2164
|
type: HttpClientModule,
|
|
2161
2165
|
providers: [provideHttpClient(withInterceptorsFromDi(), withXhr())]
|
|
@@ -2163,7 +2167,7 @@ class HttpClientModule {
|
|
|
2163
2167
|
}
|
|
2164
2168
|
i0.ɵɵngDeclareClassMetadata({
|
|
2165
2169
|
minVersion: "12.0.0",
|
|
2166
|
-
version: "22.0.0-next.
|
|
2170
|
+
version: "22.0.0-next.5",
|
|
2167
2171
|
ngImport: i0,
|
|
2168
2172
|
type: HttpClientModule,
|
|
2169
2173
|
decorators: [{
|
|
@@ -2176,7 +2180,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2176
2180
|
class HttpClientJsonpModule {
|
|
2177
2181
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2178
2182
|
minVersion: "12.0.0",
|
|
2179
|
-
version: "22.0.0-next.
|
|
2183
|
+
version: "22.0.0-next.5",
|
|
2180
2184
|
ngImport: i0,
|
|
2181
2185
|
type: HttpClientJsonpModule,
|
|
2182
2186
|
deps: [],
|
|
@@ -2184,13 +2188,13 @@ class HttpClientJsonpModule {
|
|
|
2184
2188
|
});
|
|
2185
2189
|
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
2186
2190
|
minVersion: "14.0.0",
|
|
2187
|
-
version: "22.0.0-next.
|
|
2191
|
+
version: "22.0.0-next.5",
|
|
2188
2192
|
ngImport: i0,
|
|
2189
2193
|
type: HttpClientJsonpModule
|
|
2190
2194
|
});
|
|
2191
2195
|
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
2192
2196
|
minVersion: "12.0.0",
|
|
2193
|
-
version: "22.0.0-next.
|
|
2197
|
+
version: "22.0.0-next.5",
|
|
2194
2198
|
ngImport: i0,
|
|
2195
2199
|
type: HttpClientJsonpModule,
|
|
2196
2200
|
providers: [withJsonpSupport().ɵproviders]
|
|
@@ -2198,7 +2202,7 @@ class HttpClientJsonpModule {
|
|
|
2198
2202
|
}
|
|
2199
2203
|
i0.ɵɵngDeclareClassMetadata({
|
|
2200
2204
|
minVersion: "12.0.0",
|
|
2201
|
-
version: "22.0.0-next.
|
|
2205
|
+
version: "22.0.0-next.5",
|
|
2202
2206
|
ngImport: i0,
|
|
2203
2207
|
type: HttpClientJsonpModule,
|
|
2204
2208
|
decorators: [{
|