@valtimo/security 4.15.3-next-main.16 → 4.16.0-next-main.19

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.
@@ -4,616 +4,616 @@
4
4
  (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.security = {}), global.ng.core, global.ngxLogger, global.config, global.ng.router, global.ng.common, global.rxjs, global.rxjs.operators, global.ngxToastr, global.ng.common.http));
5
5
  }(this, (function (exports, i0, i2, i1, router, common, rxjs, operators, i1$1, i2$1) { 'use strict';
6
6
 
7
- /*
8
- * Copyright 2015-2020 Ritense BV, the Netherlands.
9
- *
10
- * Licensed under EUPL, Version 1.2 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" basis,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- var AuthGuardService = /** @class */ (function () {
23
- function AuthGuardService(configService, injector, logger) {
24
- this.injector = injector;
25
- this.logger = logger;
26
- this.authGuardServiceProvider = injector.get(configService.config.authentication.authProviders.guardServiceProvider);
27
- this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);
28
- }
29
- AuthGuardService.prototype.canActivate = function (route, state) {
30
- this.logger.debug('Delegating AuthGuard canActivate');
31
- return this.authGuardServiceProvider.canActivate(route, state);
32
- };
33
- return AuthGuardService;
34
- }());
35
- AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2.NGXLogger)); }, token: AuthGuardService, providedIn: "root" });
36
- AuthGuardService.decorators = [
37
- { type: i0.Injectable, args: [{
38
- providedIn: 'root',
39
- },] }
40
- ];
41
- AuthGuardService.ctorParameters = function () { return [
42
- { type: i1.ConfigService },
43
- { type: i0.Injector },
44
- { type: i2.NGXLogger }
7
+ /*
8
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
9
+ *
10
+ * Licensed under EUPL, Version 1.2 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" basis,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ var AuthGuardService = /** @class */ (function () {
23
+ function AuthGuardService(configService, injector, logger) {
24
+ this.injector = injector;
25
+ this.logger = logger;
26
+ this.authGuardServiceProvider = injector.get(configService.config.authentication.authProviders.guardServiceProvider);
27
+ this.logger.debug('Loading AuthGuardServiceProvider service', this.authGuardServiceProvider);
28
+ }
29
+ AuthGuardService.prototype.canActivate = function (route, state) {
30
+ this.logger.debug('Delegating AuthGuard canActivate');
31
+ return this.authGuardServiceProvider.canActivate(route, state);
32
+ };
33
+ return AuthGuardService;
34
+ }());
35
+ AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2.NGXLogger)); }, token: AuthGuardService, providedIn: "root" });
36
+ AuthGuardService.decorators = [
37
+ { type: i0.Injectable, args: [{
38
+ providedIn: 'root',
39
+ },] }
40
+ ];
41
+ AuthGuardService.ctorParameters = function () { return [
42
+ { type: i1.ConfigService },
43
+ { type: i0.Injector },
44
+ { type: i2.NGXLogger }
45
45
  ]; };
46
46
 
47
- /*
48
- * Copyright 2015-2020 Ritense BV, the Netherlands.
49
- *
50
- * Licensed under EUPL, Version 1.2 (the "License");
51
- * you may not use this file except in compliance with the License.
52
- * You may obtain a copy of the License at
53
- *
54
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
55
- *
56
- * Unless required by applicable law or agreed to in writing, software
57
- * distributed under the License is distributed on an "AS IS" basis,
58
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
- * See the License for the specific language governing permissions and
60
- * limitations under the License.
61
- */
62
- var ErrorComponent = /** @class */ (function () {
63
- function ErrorComponent(activatedRoute) {
64
- this.activatedRoute = activatedRoute;
65
- }
66
- ErrorComponent.prototype.ngOnInit = function () {
67
- if (this.activatedRoute.snapshot.data) {
68
- this.err = {
69
- title: this.activatedRoute.snapshot.data.title,
70
- error: this.activatedRoute.snapshot.data.error,
71
- };
72
- }
73
- };
74
- return ErrorComponent;
75
- }());
76
- ErrorComponent.decorators = [
77
- { type: i0.Component, args: [{
78
- selector: 'valtimo-error',
79
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n",
80
- styles: [""]
81
- },] }
82
- ];
83
- ErrorComponent.ctorParameters = function () { return [
84
- { type: router.ActivatedRoute }
47
+ /*
48
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
49
+ *
50
+ * Licensed under EUPL, Version 1.2 (the "License");
51
+ * you may not use this file except in compliance with the License.
52
+ * You may obtain a copy of the License at
53
+ *
54
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
55
+ *
56
+ * Unless required by applicable law or agreed to in writing, software
57
+ * distributed under the License is distributed on an "AS IS" basis,
58
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
+ * See the License for the specific language governing permissions and
60
+ * limitations under the License.
61
+ */
62
+ var ErrorComponent = /** @class */ (function () {
63
+ function ErrorComponent(activatedRoute) {
64
+ this.activatedRoute = activatedRoute;
65
+ }
66
+ ErrorComponent.prototype.ngOnInit = function () {
67
+ if (this.activatedRoute.snapshot.data) {
68
+ this.err = {
69
+ title: this.activatedRoute.snapshot.data.title,
70
+ error: this.activatedRoute.snapshot.data.error,
71
+ };
72
+ }
73
+ };
74
+ return ErrorComponent;
75
+ }());
76
+ ErrorComponent.decorators = [
77
+ { type: i0.Component, args: [{
78
+ selector: 'valtimo-error',
79
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-12\">\n <h1>{{ err.error }}</h1>\n <p>{{ err.title }}</p>\n </div>\n </div>\n </div>\n</div>\n",
80
+ styles: [""]
81
+ },] }
82
+ ];
83
+ ErrorComponent.ctorParameters = function () { return [
84
+ { type: router.ActivatedRoute }
85
85
  ]; };
86
86
 
87
- /*
88
- * Copyright 2015-2020 Ritense BV, the Netherlands.
89
- *
90
- * Licensed under EUPL, Version 1.2 (the "License");
91
- * you may not use this file except in compliance with the License.
92
- * You may obtain a copy of the License at
93
- *
94
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
95
- *
96
- * Unless required by applicable law or agreed to in writing, software
97
- * distributed under the License is distributed on an "AS IS" basis,
98
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
99
- * See the License for the specific language governing permissions and
100
- * limitations under the License.
101
- */
102
- var InterceptorSkip = 'X-Skip-Interceptor';
87
+ /*
88
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
89
+ *
90
+ * Licensed under EUPL, Version 1.2 (the "License");
91
+ * you may not use this file except in compliance with the License.
92
+ * You may obtain a copy of the License at
93
+ *
94
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
95
+ *
96
+ * Unless required by applicable law or agreed to in writing, software
97
+ * distributed under the License is distributed on an "AS IS" basis,
98
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
99
+ * See the License for the specific language governing permissions and
100
+ * limitations under the License.
101
+ */
102
+ var InterceptorSkip = 'X-Skip-Interceptor';
103
103
  var InterceptorSkipHeader = new i2$1.HttpHeaders().set(InterceptorSkip, '');
104
104
 
105
- var HttpErrorInterceptor = /** @class */ (function () {
106
- function HttpErrorInterceptor(toastr, logger) {
107
- this.toastr = toastr;
108
- this.logger = logger;
109
- }
110
- HttpErrorInterceptor.prototype.intercept = function (request, next) {
111
- var _this = this;
112
- if (request.headers && request.headers.has(InterceptorSkip)) {
113
- var headers = request.headers.delete(InterceptorSkip);
114
- return next.handle(request.clone({ headers: headers }));
115
- }
116
- else {
117
- return next.handle(request).pipe(operators.retry(1), operators.catchError(function (error) {
118
- var errorMessage = '';
119
- if (error.error instanceof ErrorEvent) {
120
- // client-side error
121
- errorMessage = "Error: " + error.error.message;
122
- }
123
- else {
124
- // server-side error
125
- if (error.error.errors) {
126
- errorMessage = error.error.errors;
127
- }
128
- else if (error.error.message) {
129
- errorMessage = error.error.message;
130
- }
131
- else {
132
- errorMessage = "Error Code: " + error.status + "\nMessage: " + error.message;
133
- }
134
- }
135
- _this.toastr.warning("An unexpected error occurred..." + errorMessage);
136
- return rxjs.throwError(errorMessage);
137
- }));
138
- }
139
- };
140
- return HttpErrorInterceptor;
141
- }());
142
- HttpErrorInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function HttpErrorInterceptor_Factory() { return new HttpErrorInterceptor(i0.ɵɵinject(i1$1.ToastrService), i0.ɵɵinject(i2.NGXLogger)); }, token: HttpErrorInterceptor, providedIn: "root" });
143
- HttpErrorInterceptor.decorators = [
144
- { type: i0.Injectable, args: [{
145
- providedIn: 'root',
146
- },] }
147
- ];
148
- HttpErrorInterceptor.ctorParameters = function () { return [
149
- { type: i1$1.ToastrService },
150
- { type: i2.NGXLogger }
105
+ var HttpErrorInterceptor = /** @class */ (function () {
106
+ function HttpErrorInterceptor(toastr, logger) {
107
+ this.toastr = toastr;
108
+ this.logger = logger;
109
+ }
110
+ HttpErrorInterceptor.prototype.intercept = function (request, next) {
111
+ var _this = this;
112
+ if (request.headers && request.headers.has(InterceptorSkip)) {
113
+ var headers = request.headers.delete(InterceptorSkip);
114
+ return next.handle(request.clone({ headers: headers }));
115
+ }
116
+ else {
117
+ return next.handle(request).pipe(operators.retry(1), operators.catchError(function (error) {
118
+ var errorMessage = '';
119
+ if (error.error instanceof ErrorEvent) {
120
+ // client-side error
121
+ errorMessage = "Error: " + error.error.message;
122
+ }
123
+ else {
124
+ // server-side error
125
+ if (error.error.errors) {
126
+ errorMessage = error.error.errors;
127
+ }
128
+ else if (error.error.message) {
129
+ errorMessage = error.error.message;
130
+ }
131
+ else {
132
+ errorMessage = "Error Code: " + error.status + "\nMessage: " + error.message;
133
+ }
134
+ }
135
+ _this.toastr.warning("An unexpected error occurred..." + errorMessage);
136
+ return rxjs.throwError(errorMessage);
137
+ }));
138
+ }
139
+ };
140
+ return HttpErrorInterceptor;
141
+ }());
142
+ HttpErrorInterceptor.ɵprov = i0.ɵɵdefineInjectable({ factory: function HttpErrorInterceptor_Factory() { return new HttpErrorInterceptor(i0.ɵɵinject(i1$1.ToastrService), i0.ɵɵinject(i2.NGXLogger)); }, token: HttpErrorInterceptor, providedIn: "root" });
143
+ HttpErrorInterceptor.decorators = [
144
+ { type: i0.Injectable, args: [{
145
+ providedIn: 'root',
146
+ },] }
147
+ ];
148
+ HttpErrorInterceptor.ctorParameters = function () { return [
149
+ { type: i1$1.ToastrService },
150
+ { type: i2.NGXLogger }
151
151
  ]; };
152
152
 
153
- /*
154
- * Copyright 2015-2020 Ritense BV, the Netherlands.
155
- *
156
- * Licensed under EUPL, Version 1.2 (the "License");
157
- * you may not use this file except in compliance with the License.
158
- * You may obtain a copy of the License at
159
- *
160
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
161
- *
162
- * Unless required by applicable law or agreed to in writing, software
163
- * distributed under the License is distributed on an "AS IS" basis,
164
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
165
- * See the License for the specific language governing permissions and
166
- * limitations under the License.
167
- */
168
- var ɵ0 = { title: 'Access Forbidden', error: 403 }, ɵ1 = { title: 'Not Found', error: 404 }, ɵ2 = { title: 'Internal Server Error', error: 500 }, ɵ3 = { title: 'Service Unavailable', error: 503 };
169
- var routes = [
170
- { path: '403', component: ErrorComponent, data: ɵ0 },
171
- { path: '404', component: ErrorComponent, data: ɵ1 },
172
- { path: '500', component: ErrorComponent, data: ɵ2 },
173
- { path: '503', component: ErrorComponent, data: ɵ3 },
174
- ];
175
- var ErrorRoutingModule = /** @class */ (function () {
176
- function ErrorRoutingModule() {
177
- }
178
- return ErrorRoutingModule;
179
- }());
180
- ErrorRoutingModule.decorators = [
181
- { type: i0.NgModule, args: [{
182
- declarations: [],
183
- imports: [common.CommonModule, router.RouterModule.forChild(routes)],
184
- exports: [router.RouterModule],
185
- providers: [{ provide: i2$1.HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
186
- },] }
153
+ /*
154
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
155
+ *
156
+ * Licensed under EUPL, Version 1.2 (the "License");
157
+ * you may not use this file except in compliance with the License.
158
+ * You may obtain a copy of the License at
159
+ *
160
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
161
+ *
162
+ * Unless required by applicable law or agreed to in writing, software
163
+ * distributed under the License is distributed on an "AS IS" basis,
164
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
165
+ * See the License for the specific language governing permissions and
166
+ * limitations under the License.
167
+ */
168
+ var ɵ0 = { title: 'Access Forbidden', error: 403 }, ɵ1 = { title: 'Not Found', error: 404 }, ɵ2 = { title: 'Internal Server Error', error: 500 }, ɵ3 = { title: 'Service Unavailable', error: 503 };
169
+ var routes = [
170
+ { path: '403', component: ErrorComponent, data: ɵ0 },
171
+ { path: '404', component: ErrorComponent, data: ɵ1 },
172
+ { path: '500', component: ErrorComponent, data: ɵ2 },
173
+ { path: '503', component: ErrorComponent, data: ɵ3 },
174
+ ];
175
+ var ErrorRoutingModule = /** @class */ (function () {
176
+ function ErrorRoutingModule() {
177
+ }
178
+ return ErrorRoutingModule;
179
+ }());
180
+ ErrorRoutingModule.decorators = [
181
+ { type: i0.NgModule, args: [{
182
+ declarations: [],
183
+ imports: [common.CommonModule, router.RouterModule.forChild(routes)],
184
+ exports: [router.RouterModule],
185
+ providers: [{ provide: i2$1.HTTP_INTERCEPTORS, useClass: HttpErrorInterceptor, multi: true }],
186
+ },] }
187
187
  ];
188
188
 
189
- /*
190
- * Copyright 2015-2020 Ritense BV, the Netherlands.
191
- *
192
- * Licensed under EUPL, Version 1.2 (the "License");
193
- * you may not use this file except in compliance with the License.
194
- * You may obtain a copy of the License at
195
- *
196
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
197
- *
198
- * Unless required by applicable law or agreed to in writing, software
199
- * distributed under the License is distributed on an "AS IS" basis,
200
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- * See the License for the specific language governing permissions and
202
- * limitations under the License.
203
- */
204
- var SecurityModule = /** @class */ (function () {
205
- function SecurityModule() {
206
- }
207
- return SecurityModule;
208
- }());
209
- SecurityModule.decorators = [
210
- { type: i0.NgModule, args: [{
211
- declarations: [ErrorComponent],
212
- imports: [ErrorRoutingModule],
213
- exports: [ErrorComponent],
214
- providers: [AuthGuardService],
215
- },] }
189
+ /*
190
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
191
+ *
192
+ * Licensed under EUPL, Version 1.2 (the "License");
193
+ * you may not use this file except in compliance with the License.
194
+ * You may obtain a copy of the License at
195
+ *
196
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
197
+ *
198
+ * Unless required by applicable law or agreed to in writing, software
199
+ * distributed under the License is distributed on an "AS IS" basis,
200
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ * See the License for the specific language governing permissions and
202
+ * limitations under the License.
203
+ */
204
+ var SecurityModule = /** @class */ (function () {
205
+ function SecurityModule() {
206
+ }
207
+ return SecurityModule;
208
+ }());
209
+ SecurityModule.decorators = [
210
+ { type: i0.NgModule, args: [{
211
+ declarations: [ErrorComponent],
212
+ imports: [ErrorRoutingModule],
213
+ exports: [ErrorComponent],
214
+ providers: [AuthGuardService],
215
+ },] }
216
216
  ];
217
217
 
218
- /*! *****************************************************************************
219
- Copyright (c) Microsoft Corporation.
220
-
221
- Permission to use, copy, modify, and/or distribute this software for any
222
- purpose with or without fee is hereby granted.
223
-
224
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
225
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
226
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
227
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
228
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
229
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
230
- PERFORMANCE OF THIS SOFTWARE.
231
- ***************************************************************************** */
232
- /* global Reflect, Promise */
233
- var extendStatics = function (d, b) {
234
- extendStatics = Object.setPrototypeOf ||
235
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
236
- function (d, b) { for (var p in b)
237
- if (Object.prototype.hasOwnProperty.call(b, p))
238
- d[p] = b[p]; };
239
- return extendStatics(d, b);
240
- };
241
- function __extends(d, b) {
242
- if (typeof b !== "function" && b !== null)
243
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
244
- extendStatics(d, b);
245
- function __() { this.constructor = d; }
246
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
247
- }
248
- var __assign = function () {
249
- __assign = Object.assign || function __assign(t) {
250
- for (var s, i = 1, n = arguments.length; i < n; i++) {
251
- s = arguments[i];
252
- for (var p in s)
253
- if (Object.prototype.hasOwnProperty.call(s, p))
254
- t[p] = s[p];
255
- }
256
- return t;
257
- };
258
- return __assign.apply(this, arguments);
259
- };
260
- function __rest(s, e) {
261
- var t = {};
262
- for (var p in s)
263
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
264
- t[p] = s[p];
265
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
266
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
267
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
268
- t[p[i]] = s[p[i]];
269
- }
270
- return t;
271
- }
272
- function __decorate(decorators, target, key, desc) {
273
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
274
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
275
- r = Reflect.decorate(decorators, target, key, desc);
276
- else
277
- for (var i = decorators.length - 1; i >= 0; i--)
278
- if (d = decorators[i])
279
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
280
- return c > 3 && r && Object.defineProperty(target, key, r), r;
281
- }
282
- function __param(paramIndex, decorator) {
283
- return function (target, key) { decorator(target, key, paramIndex); };
284
- }
285
- function __metadata(metadataKey, metadataValue) {
286
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
287
- return Reflect.metadata(metadataKey, metadataValue);
288
- }
289
- function __awaiter(thisArg, _arguments, P, generator) {
290
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
291
- return new (P || (P = Promise))(function (resolve, reject) {
292
- function fulfilled(value) { try {
293
- step(generator.next(value));
294
- }
295
- catch (e) {
296
- reject(e);
297
- } }
298
- function rejected(value) { try {
299
- step(generator["throw"](value));
300
- }
301
- catch (e) {
302
- reject(e);
303
- } }
304
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
305
- step((generator = generator.apply(thisArg, _arguments || [])).next());
306
- });
307
- }
308
- function __generator(thisArg, body) {
309
- var _ = { label: 0, sent: function () { if (t[0] & 1)
310
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
311
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
312
- function verb(n) { return function (v) { return step([n, v]); }; }
313
- function step(op) {
314
- if (f)
315
- throw new TypeError("Generator is already executing.");
316
- while (_)
317
- try {
318
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
319
- return t;
320
- if (y = 0, t)
321
- op = [op[0] & 2, t.value];
322
- switch (op[0]) {
323
- case 0:
324
- case 1:
325
- t = op;
326
- break;
327
- case 4:
328
- _.label++;
329
- return { value: op[1], done: false };
330
- case 5:
331
- _.label++;
332
- y = op[1];
333
- op = [0];
334
- continue;
335
- case 7:
336
- op = _.ops.pop();
337
- _.trys.pop();
338
- continue;
339
- default:
340
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
341
- _ = 0;
342
- continue;
343
- }
344
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
345
- _.label = op[1];
346
- break;
347
- }
348
- if (op[0] === 6 && _.label < t[1]) {
349
- _.label = t[1];
350
- t = op;
351
- break;
352
- }
353
- if (t && _.label < t[2]) {
354
- _.label = t[2];
355
- _.ops.push(op);
356
- break;
357
- }
358
- if (t[2])
359
- _.ops.pop();
360
- _.trys.pop();
361
- continue;
362
- }
363
- op = body.call(thisArg, _);
364
- }
365
- catch (e) {
366
- op = [6, e];
367
- y = 0;
368
- }
369
- finally {
370
- f = t = 0;
371
- }
372
- if (op[0] & 5)
373
- throw op[1];
374
- return { value: op[0] ? op[1] : void 0, done: true };
375
- }
376
- }
377
- var __createBinding = Object.create ? (function (o, m, k, k2) {
378
- if (k2 === undefined)
379
- k2 = k;
380
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
381
- }) : (function (o, m, k, k2) {
382
- if (k2 === undefined)
383
- k2 = k;
384
- o[k2] = m[k];
385
- });
386
- function __exportStar(m, o) {
387
- for (var p in m)
388
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
389
- __createBinding(o, m, p);
390
- }
391
- function __values(o) {
392
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
393
- if (m)
394
- return m.call(o);
395
- if (o && typeof o.length === "number")
396
- return {
397
- next: function () {
398
- if (o && i >= o.length)
399
- o = void 0;
400
- return { value: o && o[i++], done: !o };
401
- }
402
- };
403
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
404
- }
405
- function __read(o, n) {
406
- var m = typeof Symbol === "function" && o[Symbol.iterator];
407
- if (!m)
408
- return o;
409
- var i = m.call(o), r, ar = [], e;
410
- try {
411
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
412
- ar.push(r.value);
413
- }
414
- catch (error) {
415
- e = { error: error };
416
- }
417
- finally {
418
- try {
419
- if (r && !r.done && (m = i["return"]))
420
- m.call(i);
421
- }
422
- finally {
423
- if (e)
424
- throw e.error;
425
- }
426
- }
427
- return ar;
428
- }
429
- /** @deprecated */
430
- function __spread() {
431
- for (var ar = [], i = 0; i < arguments.length; i++)
432
- ar = ar.concat(__read(arguments[i]));
433
- return ar;
434
- }
435
- /** @deprecated */
436
- function __spreadArrays() {
437
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
438
- s += arguments[i].length;
439
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
440
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
441
- r[k] = a[j];
442
- return r;
443
- }
444
- function __spreadArray(to, from, pack) {
445
- if (pack || arguments.length === 2)
446
- for (var i = 0, l = from.length, ar; i < l; i++) {
447
- if (ar || !(i in from)) {
448
- if (!ar)
449
- ar = Array.prototype.slice.call(from, 0, i);
450
- ar[i] = from[i];
451
- }
452
- }
453
- return to.concat(ar || Array.prototype.slice.call(from));
454
- }
455
- function __await(v) {
456
- return this instanceof __await ? (this.v = v, this) : new __await(v);
457
- }
458
- function __asyncGenerator(thisArg, _arguments, generator) {
459
- if (!Symbol.asyncIterator)
460
- throw new TypeError("Symbol.asyncIterator is not defined.");
461
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
462
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
463
- function verb(n) { if (g[n])
464
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
465
- function resume(n, v) { try {
466
- step(g[n](v));
467
- }
468
- catch (e) {
469
- settle(q[0][3], e);
470
- } }
471
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
472
- function fulfill(value) { resume("next", value); }
473
- function reject(value) { resume("throw", value); }
474
- function settle(f, v) { if (f(v), q.shift(), q.length)
475
- resume(q[0][0], q[0][1]); }
476
- }
477
- function __asyncDelegator(o) {
478
- var i, p;
479
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
480
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
481
- }
482
- function __asyncValues(o) {
483
- if (!Symbol.asyncIterator)
484
- throw new TypeError("Symbol.asyncIterator is not defined.");
485
- var m = o[Symbol.asyncIterator], i;
486
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
487
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
488
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
489
- }
490
- function __makeTemplateObject(cooked, raw) {
491
- if (Object.defineProperty) {
492
- Object.defineProperty(cooked, "raw", { value: raw });
493
- }
494
- else {
495
- cooked.raw = raw;
496
- }
497
- return cooked;
498
- }
499
- ;
500
- var __setModuleDefault = Object.create ? (function (o, v) {
501
- Object.defineProperty(o, "default", { enumerable: true, value: v });
502
- }) : function (o, v) {
503
- o["default"] = v;
504
- };
505
- function __importStar(mod) {
506
- if (mod && mod.__esModule)
507
- return mod;
508
- var result = {};
509
- if (mod != null)
510
- for (var k in mod)
511
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
512
- __createBinding(result, mod, k);
513
- __setModuleDefault(result, mod);
514
- return result;
515
- }
516
- function __importDefault(mod) {
517
- return (mod && mod.__esModule) ? mod : { default: mod };
518
- }
519
- function __classPrivateFieldGet(receiver, state, kind, f) {
520
- if (kind === "a" && !f)
521
- throw new TypeError("Private accessor was defined without a getter");
522
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
523
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
524
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
525
- }
526
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
527
- if (kind === "m")
528
- throw new TypeError("Private method is not writable");
529
- if (kind === "a" && !f)
530
- throw new TypeError("Private accessor was defined without a setter");
531
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
532
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
533
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
218
+ /*! *****************************************************************************
219
+ Copyright (c) Microsoft Corporation.
220
+
221
+ Permission to use, copy, modify, and/or distribute this software for any
222
+ purpose with or without fee is hereby granted.
223
+
224
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
225
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
226
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
227
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
228
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
229
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
230
+ PERFORMANCE OF THIS SOFTWARE.
231
+ ***************************************************************************** */
232
+ /* global Reflect, Promise */
233
+ var extendStatics = function (d, b) {
234
+ extendStatics = Object.setPrototypeOf ||
235
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
236
+ function (d, b) { for (var p in b)
237
+ if (Object.prototype.hasOwnProperty.call(b, p))
238
+ d[p] = b[p]; };
239
+ return extendStatics(d, b);
240
+ };
241
+ function __extends(d, b) {
242
+ if (typeof b !== "function" && b !== null)
243
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
244
+ extendStatics(d, b);
245
+ function __() { this.constructor = d; }
246
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
247
+ }
248
+ var __assign = function () {
249
+ __assign = Object.assign || function __assign(t) {
250
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
251
+ s = arguments[i];
252
+ for (var p in s)
253
+ if (Object.prototype.hasOwnProperty.call(s, p))
254
+ t[p] = s[p];
255
+ }
256
+ return t;
257
+ };
258
+ return __assign.apply(this, arguments);
259
+ };
260
+ function __rest(s, e) {
261
+ var t = {};
262
+ for (var p in s)
263
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
264
+ t[p] = s[p];
265
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
266
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
267
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
268
+ t[p[i]] = s[p[i]];
269
+ }
270
+ return t;
271
+ }
272
+ function __decorate(decorators, target, key, desc) {
273
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
274
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
275
+ r = Reflect.decorate(decorators, target, key, desc);
276
+ else
277
+ for (var i = decorators.length - 1; i >= 0; i--)
278
+ if (d = decorators[i])
279
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
280
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
281
+ }
282
+ function __param(paramIndex, decorator) {
283
+ return function (target, key) { decorator(target, key, paramIndex); };
284
+ }
285
+ function __metadata(metadataKey, metadataValue) {
286
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
287
+ return Reflect.metadata(metadataKey, metadataValue);
288
+ }
289
+ function __awaiter(thisArg, _arguments, P, generator) {
290
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
291
+ return new (P || (P = Promise))(function (resolve, reject) {
292
+ function fulfilled(value) { try {
293
+ step(generator.next(value));
294
+ }
295
+ catch (e) {
296
+ reject(e);
297
+ } }
298
+ function rejected(value) { try {
299
+ step(generator["throw"](value));
300
+ }
301
+ catch (e) {
302
+ reject(e);
303
+ } }
304
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
305
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
306
+ });
307
+ }
308
+ function __generator(thisArg, body) {
309
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
310
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
311
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
312
+ function verb(n) { return function (v) { return step([n, v]); }; }
313
+ function step(op) {
314
+ if (f)
315
+ throw new TypeError("Generator is already executing.");
316
+ while (_)
317
+ try {
318
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
319
+ return t;
320
+ if (y = 0, t)
321
+ op = [op[0] & 2, t.value];
322
+ switch (op[0]) {
323
+ case 0:
324
+ case 1:
325
+ t = op;
326
+ break;
327
+ case 4:
328
+ _.label++;
329
+ return { value: op[1], done: false };
330
+ case 5:
331
+ _.label++;
332
+ y = op[1];
333
+ op = [0];
334
+ continue;
335
+ case 7:
336
+ op = _.ops.pop();
337
+ _.trys.pop();
338
+ continue;
339
+ default:
340
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
341
+ _ = 0;
342
+ continue;
343
+ }
344
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
345
+ _.label = op[1];
346
+ break;
347
+ }
348
+ if (op[0] === 6 && _.label < t[1]) {
349
+ _.label = t[1];
350
+ t = op;
351
+ break;
352
+ }
353
+ if (t && _.label < t[2]) {
354
+ _.label = t[2];
355
+ _.ops.push(op);
356
+ break;
357
+ }
358
+ if (t[2])
359
+ _.ops.pop();
360
+ _.trys.pop();
361
+ continue;
362
+ }
363
+ op = body.call(thisArg, _);
364
+ }
365
+ catch (e) {
366
+ op = [6, e];
367
+ y = 0;
368
+ }
369
+ finally {
370
+ f = t = 0;
371
+ }
372
+ if (op[0] & 5)
373
+ throw op[1];
374
+ return { value: op[0] ? op[1] : void 0, done: true };
375
+ }
376
+ }
377
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
378
+ if (k2 === undefined)
379
+ k2 = k;
380
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
381
+ }) : (function (o, m, k, k2) {
382
+ if (k2 === undefined)
383
+ k2 = k;
384
+ o[k2] = m[k];
385
+ });
386
+ function __exportStar(m, o) {
387
+ for (var p in m)
388
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
389
+ __createBinding(o, m, p);
390
+ }
391
+ function __values(o) {
392
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
393
+ if (m)
394
+ return m.call(o);
395
+ if (o && typeof o.length === "number")
396
+ return {
397
+ next: function () {
398
+ if (o && i >= o.length)
399
+ o = void 0;
400
+ return { value: o && o[i++], done: !o };
401
+ }
402
+ };
403
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
404
+ }
405
+ function __read(o, n) {
406
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
407
+ if (!m)
408
+ return o;
409
+ var i = m.call(o), r, ar = [], e;
410
+ try {
411
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
412
+ ar.push(r.value);
413
+ }
414
+ catch (error) {
415
+ e = { error: error };
416
+ }
417
+ finally {
418
+ try {
419
+ if (r && !r.done && (m = i["return"]))
420
+ m.call(i);
421
+ }
422
+ finally {
423
+ if (e)
424
+ throw e.error;
425
+ }
426
+ }
427
+ return ar;
428
+ }
429
+ /** @deprecated */
430
+ function __spread() {
431
+ for (var ar = [], i = 0; i < arguments.length; i++)
432
+ ar = ar.concat(__read(arguments[i]));
433
+ return ar;
434
+ }
435
+ /** @deprecated */
436
+ function __spreadArrays() {
437
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
438
+ s += arguments[i].length;
439
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
440
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
441
+ r[k] = a[j];
442
+ return r;
443
+ }
444
+ function __spreadArray(to, from, pack) {
445
+ if (pack || arguments.length === 2)
446
+ for (var i = 0, l = from.length, ar; i < l; i++) {
447
+ if (ar || !(i in from)) {
448
+ if (!ar)
449
+ ar = Array.prototype.slice.call(from, 0, i);
450
+ ar[i] = from[i];
451
+ }
452
+ }
453
+ return to.concat(ar || Array.prototype.slice.call(from));
454
+ }
455
+ function __await(v) {
456
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
457
+ }
458
+ function __asyncGenerator(thisArg, _arguments, generator) {
459
+ if (!Symbol.asyncIterator)
460
+ throw new TypeError("Symbol.asyncIterator is not defined.");
461
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
462
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
463
+ function verb(n) { if (g[n])
464
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
465
+ function resume(n, v) { try {
466
+ step(g[n](v));
467
+ }
468
+ catch (e) {
469
+ settle(q[0][3], e);
470
+ } }
471
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
472
+ function fulfill(value) { resume("next", value); }
473
+ function reject(value) { resume("throw", value); }
474
+ function settle(f, v) { if (f(v), q.shift(), q.length)
475
+ resume(q[0][0], q[0][1]); }
476
+ }
477
+ function __asyncDelegator(o) {
478
+ var i, p;
479
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
480
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
481
+ }
482
+ function __asyncValues(o) {
483
+ if (!Symbol.asyncIterator)
484
+ throw new TypeError("Symbol.asyncIterator is not defined.");
485
+ var m = o[Symbol.asyncIterator], i;
486
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
487
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
488
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
489
+ }
490
+ function __makeTemplateObject(cooked, raw) {
491
+ if (Object.defineProperty) {
492
+ Object.defineProperty(cooked, "raw", { value: raw });
493
+ }
494
+ else {
495
+ cooked.raw = raw;
496
+ }
497
+ return cooked;
498
+ }
499
+ ;
500
+ var __setModuleDefault = Object.create ? (function (o, v) {
501
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
502
+ }) : function (o, v) {
503
+ o["default"] = v;
504
+ };
505
+ function __importStar(mod) {
506
+ if (mod && mod.__esModule)
507
+ return mod;
508
+ var result = {};
509
+ if (mod != null)
510
+ for (var k in mod)
511
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
512
+ __createBinding(result, mod, k);
513
+ __setModuleDefault(result, mod);
514
+ return result;
515
+ }
516
+ function __importDefault(mod) {
517
+ return (mod && mod.__esModule) ? mod : { default: mod };
518
+ }
519
+ function __classPrivateFieldGet(receiver, state, kind, f) {
520
+ if (kind === "a" && !f)
521
+ throw new TypeError("Private accessor was defined without a getter");
522
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
523
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
524
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
525
+ }
526
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
527
+ if (kind === "m")
528
+ throw new TypeError("Private method is not writable");
529
+ if (kind === "a" && !f)
530
+ throw new TypeError("Private accessor was defined without a setter");
531
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
532
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
533
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
534
534
  }
535
535
 
536
- var UserProviderService = /** @class */ (function () {
537
- function UserProviderService(configService, injector, http, logger) {
538
- this.configService = configService;
539
- this.injector = injector;
540
- this.http = http;
541
- this.logger = logger;
542
- this.valtimoApiConfig = configService.config.valtimoApi;
543
- this.userService = injector.get(configService.config.authentication.authProviders.userServiceProvider);
544
- this.logger.debug('Loading UserProviderService service', this.userService);
545
- }
546
- UserProviderService.prototype.getUserSubject = function () {
547
- this.logger.debug('Delegating UserProviderService::getUserIdentity');
548
- return this.userService.getUserSubject();
549
- };
550
- UserProviderService.prototype.logout = function () {
551
- this.logger.debug('Delegating UserProviderService::logout');
552
- return this.userService.logout();
553
- };
554
- UserProviderService.prototype.getToken = function () {
555
- return __awaiter(this, void 0, void 0, function () {
556
- return __generator(this, function (_a) {
557
- this.logger.debug('Delegating UserProviderService::getToken');
558
- return [2 /*return*/, this.userService.getToken()];
559
- });
560
- });
561
- };
562
- UserProviderService.prototype.updateToken = function (minValidity) {
563
- return __awaiter(this, void 0, void 0, function () {
564
- return __generator(this, function (_a) {
565
- this.logger.debug('Delegating UserProviderService::updateToken');
566
- if (this.userService.updateToken) {
567
- return [2 /*return*/, this.userService.updateToken(minValidity)];
568
- }
569
- else {
570
- return [2 /*return*/, new Promise(function (resolve) { return resolve(true); })];
571
- }
572
- return [2 /*return*/];
573
- });
574
- });
575
- };
576
- UserProviderService.prototype.getEmailNotificationSettings = function () {
577
- this.logger.debug('getEmailNotificationSettings');
578
- return this.http.get(this.valtimoApiConfig.endpointUri + "email-notification-settings");
579
- };
580
- UserProviderService.prototype.updateEmailNotificationSettings = function (settings) {
581
- this.logger.debug('updateEmailNotificationSettings', settings);
582
- return this.http.put(this.valtimoApiConfig.endpointUri + "email-notification-settings", settings);
583
- };
584
- return UserProviderService;
585
- }());
586
- UserProviderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserProviderService_Factory() { return new UserProviderService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i2.NGXLogger)); }, token: UserProviderService, providedIn: "root" });
587
- UserProviderService.decorators = [
588
- { type: i0.Injectable, args: [{
589
- providedIn: 'root',
590
- },] }
591
- ];
592
- UserProviderService.ctorParameters = function () { return [
593
- { type: i1.ConfigService },
594
- { type: i0.Injector },
595
- { type: i2$1.HttpClient },
596
- { type: i2.NGXLogger }
536
+ var UserProviderService = /** @class */ (function () {
537
+ function UserProviderService(configService, injector, http, logger) {
538
+ this.configService = configService;
539
+ this.injector = injector;
540
+ this.http = http;
541
+ this.logger = logger;
542
+ this.valtimoApiConfig = configService.config.valtimoApi;
543
+ this.userService = injector.get(configService.config.authentication.authProviders.userServiceProvider);
544
+ this.logger.debug('Loading UserProviderService service', this.userService);
545
+ }
546
+ UserProviderService.prototype.getUserSubject = function () {
547
+ this.logger.debug('Delegating UserProviderService::getUserIdentity');
548
+ return this.userService.getUserSubject();
549
+ };
550
+ UserProviderService.prototype.logout = function () {
551
+ this.logger.debug('Delegating UserProviderService::logout');
552
+ return this.userService.logout();
553
+ };
554
+ UserProviderService.prototype.getToken = function () {
555
+ return __awaiter(this, void 0, void 0, function () {
556
+ return __generator(this, function (_a) {
557
+ this.logger.debug('Delegating UserProviderService::getToken');
558
+ return [2 /*return*/, this.userService.getToken()];
559
+ });
560
+ });
561
+ };
562
+ UserProviderService.prototype.updateToken = function (minValidity) {
563
+ return __awaiter(this, void 0, void 0, function () {
564
+ return __generator(this, function (_a) {
565
+ this.logger.debug('Delegating UserProviderService::updateToken');
566
+ if (this.userService.updateToken) {
567
+ return [2 /*return*/, this.userService.updateToken(minValidity)];
568
+ }
569
+ else {
570
+ return [2 /*return*/, new Promise(function (resolve) { return resolve(true); })];
571
+ }
572
+ return [2 /*return*/];
573
+ });
574
+ });
575
+ };
576
+ UserProviderService.prototype.getEmailNotificationSettings = function () {
577
+ this.logger.debug('getEmailNotificationSettings');
578
+ return this.http.get(this.valtimoApiConfig.endpointUri + "email-notification-settings");
579
+ };
580
+ UserProviderService.prototype.updateEmailNotificationSettings = function (settings) {
581
+ this.logger.debug('updateEmailNotificationSettings', settings);
582
+ return this.http.put(this.valtimoApiConfig.endpointUri + "email-notification-settings", settings);
583
+ };
584
+ return UserProviderService;
585
+ }());
586
+ UserProviderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserProviderService_Factory() { return new UserProviderService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(i2.NGXLogger)); }, token: UserProviderService, providedIn: "root" });
587
+ UserProviderService.decorators = [
588
+ { type: i0.Injectable, args: [{
589
+ providedIn: 'root',
590
+ },] }
591
+ ];
592
+ UserProviderService.ctorParameters = function () { return [
593
+ { type: i1.ConfigService },
594
+ { type: i0.Injector },
595
+ { type: i2$1.HttpClient },
596
+ { type: i2.NGXLogger }
597
597
  ]; };
598
598
 
599
- /*
600
- * Copyright 2015-2020 Ritense BV, the Netherlands.
601
- *
602
- * Licensed under EUPL, Version 1.2 (the "License");
603
- * you may not use this file except in compliance with the License.
604
- * You may obtain a copy of the License at
605
- *
606
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
607
- *
608
- * Unless required by applicable law or agreed to in writing, software
609
- * distributed under the License is distributed on an "AS IS" basis,
610
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
611
- * See the License for the specific language governing permissions and
612
- * limitations under the License.
599
+ /*
600
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
601
+ *
602
+ * Licensed under EUPL, Version 1.2 (the "License");
603
+ * you may not use this file except in compliance with the License.
604
+ * You may obtain a copy of the License at
605
+ *
606
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
607
+ *
608
+ * Unless required by applicable law or agreed to in writing, software
609
+ * distributed under the License is distributed on an "AS IS" basis,
610
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
611
+ * See the License for the specific language governing permissions and
612
+ * limitations under the License.
613
613
  */
614
614
 
615
- /**
616
- * Generated bundle index. Do not edit.
615
+ /**
616
+ * Generated bundle index. Do not edit.
617
617
  */
618
618
 
619
619
  exports.AuthGuardService = AuthGuardService;