@angular/common 17.2.0-next.0 → 17.2.0-next.1

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.
Files changed (112) hide show
  1. package/esm2022/http/public_api.mjs +6 -6
  2. package/esm2022/http/src/client.mjs +6 -6
  3. package/esm2022/http/src/fetch.mjs +12 -11
  4. package/esm2022/http/src/headers.mjs +7 -9
  5. package/esm2022/http/src/interceptor.mjs +11 -10
  6. package/esm2022/http/src/jsonp.mjs +11 -13
  7. package/esm2022/http/src/module.mjs +18 -28
  8. package/esm2022/http/src/params.mjs +15 -14
  9. package/esm2022/http/src/private_export.mjs +2 -2
  10. package/esm2022/http/src/provider.mjs +13 -13
  11. package/esm2022/http/src/request.mjs +19 -21
  12. package/esm2022/http/src/response.mjs +3 -3
  13. package/esm2022/http/src/transfer_cache.mjs +15 -11
  14. package/esm2022/http/src/xhr.mjs +11 -10
  15. package/esm2022/http/src/xsrf.mjs +17 -14
  16. package/esm2022/http/testing/src/api.mjs +1 -1
  17. package/esm2022/http/testing/src/backend.mjs +11 -11
  18. package/esm2022/http/testing/src/module.mjs +7 -13
  19. package/esm2022/http/testing/src/provider.mjs +1 -1
  20. package/esm2022/http/testing/src/request.mjs +11 -8
  21. package/esm2022/src/common.mjs +6 -6
  22. package/esm2022/src/common_module.mjs +5 -5
  23. package/esm2022/src/cookie.mjs +1 -1
  24. package/esm2022/src/directives/index.mjs +1 -1
  25. package/esm2022/src/directives/ng_class.mjs +6 -6
  26. package/esm2022/src/directives/ng_component_outlet.mjs +11 -13
  27. package/esm2022/src/directives/ng_for_of.mjs +5 -5
  28. package/esm2022/src/directives/ng_if.mjs +7 -9
  29. package/esm2022/src/directives/ng_optimized_image/asserts.mjs +1 -1
  30. package/esm2022/src/directives/ng_optimized_image/error_helper.mjs +4 -2
  31. package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +1 -1
  32. package/esm2022/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +9 -8
  33. package/esm2022/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +2 -2
  34. package/esm2022/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +1 -1
  35. package/esm2022/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +2 -2
  36. package/esm2022/src/directives/ng_optimized_image/index.mjs +1 -1
  37. package/esm2022/src/directives/ng_optimized_image/lcp_image_observer.mjs +6 -6
  38. package/esm2022/src/directives/ng_optimized_image/ng_optimized_image.mjs +160 -28
  39. package/esm2022/src/directives/ng_optimized_image/preconnect_link_checker.mjs +12 -14
  40. package/esm2022/src/directives/ng_optimized_image/preload-link-creator.mjs +4 -4
  41. package/esm2022/src/directives/ng_optimized_image/tokens.mjs +5 -2
  42. package/esm2022/src/directives/ng_optimized_image/url.mjs +2 -2
  43. package/esm2022/src/directives/ng_plural.mjs +7 -7
  44. package/esm2022/src/directives/ng_style.mjs +5 -5
  45. package/esm2022/src/directives/ng_switch.mjs +17 -15
  46. package/esm2022/src/directives/ng_switch_equality.mjs +1 -1
  47. package/esm2022/src/directives/ng_template_outlet.mjs +5 -5
  48. package/esm2022/src/dom_adapter.mjs +2 -4
  49. package/esm2022/src/dom_tokens.mjs +2 -2
  50. package/esm2022/src/errors.mjs +1 -1
  51. package/esm2022/src/i18n/format_date.mjs +62 -43
  52. package/esm2022/src/i18n/format_number.mjs +14 -13
  53. package/esm2022/src/i18n/locale_data.mjs +1 -1
  54. package/esm2022/src/i18n/locale_data_api.mjs +14 -8
  55. package/esm2022/src/i18n/localization.mjs +7 -7
  56. package/esm2022/src/location/hash_location_strategy.mjs +6 -8
  57. package/esm2022/src/location/index.mjs +2 -2
  58. package/esm2022/src/location/location.mjs +9 -11
  59. package/esm2022/src/location/location_strategy.mjs +14 -11
  60. package/esm2022/src/location/platform_location.mjs +9 -9
  61. package/esm2022/src/location/util.mjs +2 -2
  62. package/esm2022/src/navigation/navigation_types.mjs +9 -0
  63. package/esm2022/src/navigation/platform_navigation.mjs +4 -4
  64. package/esm2022/src/pipes/async_pipe.mjs +7 -7
  65. package/esm2022/src/pipes/case_conversion_pipes.mjs +11 -11
  66. package/esm2022/src/pipes/date_pipe.mjs +70 -71
  67. package/esm2022/src/pipes/i18n_plural_pipe.mjs +4 -5
  68. package/esm2022/src/pipes/i18n_select_pipe.mjs +4 -5
  69. package/esm2022/src/pipes/index.mjs +1 -1
  70. package/esm2022/src/pipes/invalid_pipe_argument_error.mjs +1 -1
  71. package/esm2022/src/pipes/json_pipe.mjs +3 -3
  72. package/esm2022/src/pipes/keyvalue_pipe.mjs +7 -9
  73. package/esm2022/src/pipes/number_pipe.mjs +13 -13
  74. package/esm2022/src/pipes/slice_pipe.mjs +4 -4
  75. package/esm2022/src/private_export.mjs +3 -2
  76. package/esm2022/src/version.mjs +1 -1
  77. package/esm2022/src/viewport_scroller.mjs +6 -5
  78. package/esm2022/testing/src/location_mock.mjs +34 -19
  79. package/esm2022/testing/src/mock_location_strategy.mjs +6 -6
  80. package/esm2022/testing/src/mock_platform_location.mjs +112 -13
  81. package/esm2022/testing/src/navigation/fake_navigation.mjs +11 -11
  82. package/esm2022/testing/src/navigation/navigation_types.mjs +9 -0
  83. package/esm2022/testing/src/navigation/provide_fake_platform_navigation.mjs +8 -5
  84. package/esm2022/testing/src/private_export.mjs +9 -0
  85. package/esm2022/testing/src/testing.mjs +3 -2
  86. package/esm2022/upgrade/src/index.mjs +2 -2
  87. package/esm2022/upgrade/src/location_shim.mjs +11 -13
  88. package/esm2022/upgrade/src/location_upgrade_module.mjs +15 -18
  89. package/esm2022/upgrade/src/params.mjs +6 -6
  90. package/esm2022/upgrade/src/utils.mjs +2 -2
  91. package/fesm2022/common.mjs +506 -340
  92. package/fesm2022/common.mjs.map +1 -1
  93. package/fesm2022/http/testing.mjs +26 -29
  94. package/fesm2022/http/testing.mjs.map +1 -1
  95. package/fesm2022/http.mjs +133 -138
  96. package/fesm2022/http.mjs.map +1 -1
  97. package/fesm2022/testing.mjs +993 -199
  98. package/fesm2022/testing.mjs.map +1 -1
  99. package/fesm2022/upgrade.mjs +30 -35
  100. package/fesm2022/upgrade.mjs.map +1 -1
  101. package/http/index.d.ts +2 -2
  102. package/http/testing/index.d.ts +3 -3
  103. package/index.d.ts +265 -70
  104. package/locales/ff-CM.mjs +31 -11
  105. package/locales/ff-GN.mjs +31 -11
  106. package/locales/ff-MR.mjs +31 -11
  107. package/locales/global/ff-CM.js +58 -44
  108. package/locales/global/ff-GN.js +58 -44
  109. package/locales/global/ff-MR.js +58 -44
  110. package/package.json +2 -2
  111. package/testing/index.d.ts +6 -1
  112. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v17.2.0-next.0
2
+ * @license Angular v17.2.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { InjectionToken, inject, Injectable, Optional, Inject, EventEmitter, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, ɵformatRuntimeError, Host, Attribute, RendererStyleFlags2, untracked, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, PLATFORM_ID, ɵIMAGE_CONFIG, Renderer2, ElementRef, Injector, ɵperformanceMarkFeature, NgZone, numberAttribute, booleanAttribute, ɵIMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue } from '@angular/core';
8
+ import { Injectable, InjectionToken, inject, Optional, Inject, EventEmitter, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, ɵformatRuntimeError, Host, Attribute, RendererStyleFlags2, untracked, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, PLATFORM_ID, ɵIMAGE_CONFIG, Renderer2, ElementRef, Injector, ɵperformanceMarkFeature, NgZone, numberAttribute, booleanAttribute, ɵIMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue } from '@angular/core';
9
9
  export { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';
10
10
 
11
11
  let _DOM = null;
@@ -13,9 +13,7 @@ function getDOM() {
13
13
  return _DOM;
14
14
  }
15
15
  function setRootDomAdapter(adapter) {
16
- if (!_DOM) {
17
- _DOM = adapter;
18
- }
16
+ _DOM ??= adapter;
19
17
  }
20
18
  /* tslint:disable:requireParameterType */
21
19
  /**
@@ -27,6 +25,19 @@ function setRootDomAdapter(adapter) {
27
25
  class DomAdapter {
28
26
  }
29
27
 
28
+ /**
29
+ * This class wraps the platform Navigation API which allows server-specific and test
30
+ * implementations.
31
+ */
32
+ class PlatformNavigation {
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
34
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation }); }
35
+ }
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformNavigation, decorators: [{
37
+ type: Injectable,
38
+ args: [{ providedIn: 'platform', useFactory: () => window.navigation }]
39
+ }] });
40
+
30
41
  /**
31
42
  * A DI Token representing the main rendering context.
32
43
  * In a browser and SSR this is the DOM Document.
@@ -34,7 +45,7 @@ class DomAdapter {
34
45
  *
35
46
  * @publicApi
36
47
  */
37
- const DOCUMENT = new InjectionToken('DocumentToken');
48
+ const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');
38
49
 
39
50
  /**
40
51
  * This class should not be used directly by an application developer. Instead, use
@@ -60,12 +71,12 @@ const DOCUMENT = new InjectionToken('DocumentToken');
60
71
  */
61
72
  class PlatformLocation {
62
73
  historyGo(relativePosition) {
63
- throw new Error('Not implemented');
74
+ throw new Error(ngDevMode ? 'Not implemented' : '');
64
75
  }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }); }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
77
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }); }
67
78
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PlatformLocation, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PlatformLocation, decorators: [{
69
80
  type: Injectable,
70
81
  args: [{ providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }]
71
82
  }] });
@@ -75,7 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
75
86
  *
76
87
  * @publicApi
77
88
  */
78
- const LOCATION_INITIALIZED = new InjectionToken('Location Initialized');
89
+ const LOCATION_INITIALIZED = new InjectionToken(ngDevMode ? 'Location Initialized' : '');
79
90
  /**
80
91
  * `PlatformLocation` encapsulates all of the direct calls to platform APIs.
81
92
  * This class should not be used directly by an application developer. Instead, use
@@ -145,10 +156,10 @@ class BrowserPlatformLocation extends PlatformLocation {
145
156
  getState() {
146
157
  return this._history.state;
147
158
  }
148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
149
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() }); }
159
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
160
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() }); }
150
161
  }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
152
163
  type: Injectable,
153
164
  args: [{
154
165
  providedIn: 'platform',
@@ -198,7 +209,7 @@ function joinWithSlash(start, end) {
198
209
  */
199
210
  function stripTrailingSlash(url) {
200
211
  const match = url.match(/#|\?|$/);
201
- const pathEndIdx = match && match.index || url.length;
212
+ const pathEndIdx = (match && match.index) || url.length;
202
213
  const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);
203
214
  return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);
204
215
  }
@@ -232,12 +243,12 @@ function normalizeQueryParams(params) {
232
243
  */
233
244
  class LocationStrategy {
234
245
  historyGo(relativePosition) {
235
- throw new Error('Not implemented');
246
+ throw new Error(ngDevMode ? 'Not implemented' : '');
236
247
  }
237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
238
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }); }
248
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
249
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }); }
239
250
  }
240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LocationStrategy, decorators: [{
251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LocationStrategy, decorators: [{
241
252
  type: Injectable,
242
253
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
243
254
  }] });
@@ -264,7 +275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
264
275
  *
265
276
  * @publicApi
266
277
  */
267
- const APP_BASE_HREF = new InjectionToken('appBaseHref');
278
+ const APP_BASE_HREF = new InjectionToken(ngDevMode ? 'appBaseHref' : '');
268
279
  /**
269
280
  * @description
270
281
  * A {@link LocationStrategy} used to configure the {@link Location} service to
@@ -301,8 +312,11 @@ class PathLocationStrategy extends LocationStrategy {
301
312
  super();
302
313
  this._platformLocation = _platformLocation;
303
314
  this._removeListenerFns = [];
304
- this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ??
305
- inject(DOCUMENT).location?.origin ?? '';
315
+ this._baseHref =
316
+ href ??
317
+ this._platformLocation.getBaseHrefFromDOM() ??
318
+ inject(DOCUMENT).location?.origin ??
319
+ '';
306
320
  }
307
321
  /** @nodoc */
308
322
  ngOnDestroy() {
@@ -344,10 +358,10 @@ class PathLocationStrategy extends LocationStrategy {
344
358
  historyGo(relativePosition = 0) {
345
359
  this._platformLocation.historyGo?.(relativePosition);
346
360
  }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
348
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' }); }
361
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
362
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' }); }
349
363
  }
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PathLocationStrategy, decorators: [{
351
365
  type: Injectable,
352
366
  args: [{ providedIn: 'root' }]
353
367
  }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -400,14 +414,12 @@ class HashLocationStrategy extends LocationStrategy {
400
414
  path(includeHash = false) {
401
415
  // the hash value is always prefixed with a `#`
402
416
  // and if it is empty then it will stay empty
403
- let path = this._platformLocation.hash;
404
- if (path == null)
405
- path = '#';
417
+ const path = this._platformLocation.hash ?? '#';
406
418
  return path.length > 0 ? path.substring(1) : path;
407
419
  }
408
420
  prepareExternalUrl(internal) {
409
421
  const url = joinWithSlash(this._baseHref, internal);
410
- return url.length > 0 ? ('#' + url) : url;
422
+ return url.length > 0 ? '#' + url : url;
411
423
  }
412
424
  pushState(state, title, path, queryParams) {
413
425
  let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));
@@ -435,10 +447,10 @@ class HashLocationStrategy extends LocationStrategy {
435
447
  historyGo(relativePosition = 0) {
436
448
  this._platformLocation.historyGo?.(relativePosition);
437
449
  }
438
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
439
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: HashLocationStrategy }); }
450
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
451
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: HashLocationStrategy }); }
440
452
  }
441
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: HashLocationStrategy, decorators: [{
442
454
  type: Injectable
443
455
  }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{
444
456
  type: Optional
@@ -625,11 +637,9 @@ class Location {
625
637
  */
626
638
  onUrlChange(fn) {
627
639
  this._urlChangeListeners.push(fn);
628
- if (!this._urlChangeSubscription) {
629
- this._urlChangeSubscription = this.subscribe(v => {
630
- this._notifyUrlChangeListeners(v.url, v.state);
631
- });
632
- }
640
+ this._urlChangeSubscription ??= this.subscribe((v) => {
641
+ this._notifyUrlChangeListeners(v.url, v.state);
642
+ });
633
643
  return () => {
634
644
  const fnIndex = this._urlChangeListeners.indexOf(fn);
635
645
  this._urlChangeListeners.splice(fnIndex, 1);
@@ -641,7 +651,7 @@ class Location {
641
651
  }
642
652
  /** @internal */
643
653
  _notifyUrlChangeListeners(url = '', state) {
644
- this._urlChangeListeners.forEach(fn => fn(url, state));
654
+ this._urlChangeListeners.forEach((fn) => fn(url, state));
645
655
  }
646
656
  /**
647
657
  * Subscribes to the platform's `popState` events.
@@ -687,10 +697,10 @@ class Location {
687
697
  * @returns The URL string, modified if needed.
688
698
  */
689
699
  static { this.stripTrailingSlash = stripTrailingSlash; }
690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
691
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation }); }
700
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable }); }
701
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation }); }
692
702
  }
693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: Location, decorators: [{
703
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: Location, decorators: [{
694
704
  type: Injectable,
695
705
  args: [{
696
706
  providedIn: 'root',
@@ -720,7 +730,7 @@ function _stripOrigin(baseHref) {
720
730
  // syntactically incorrect code after Closure Compiler minification.
721
731
  // This was likely caused by a bug in Closure Compiler, but
722
732
  // for now, the check is rewritten to use `new RegExp` instead.
723
- const isAbsoluteUrl = (new RegExp('^(https?:)?//')).test(baseHref);
733
+ const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);
724
734
  if (isAbsoluteUrl) {
725
735
  const [, pathname] = baseHref.split(/\/\/[^\/]+/);
726
736
  return pathname;
@@ -954,7 +964,8 @@ function getLocaleId(locale) {
954
964
  function getLocaleDayPeriods(locale, formStyle, width) {
955
965
  const data = ɵfindLocaleData(locale);
956
966
  const amPmData = [
957
- data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]
967
+ data[ɵLocaleDataIndex.DayPeriodsFormat],
968
+ data[ɵLocaleDataIndex.DayPeriodsStandalone],
958
969
  ];
959
970
  const amPm = getLastDefinedValue(amPmData, formStyle);
960
971
  return getLastDefinedValue(amPm, width);
@@ -973,7 +984,10 @@ function getLocaleDayPeriods(locale, formStyle, width) {
973
984
  */
974
985
  function getLocaleDayNames(locale, formStyle, width) {
975
986
  const data = ɵfindLocaleData(locale);
976
- const daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];
987
+ const daysData = [
988
+ data[ɵLocaleDataIndex.DaysFormat],
989
+ data[ɵLocaleDataIndex.DaysStandalone],
990
+ ];
977
991
  const days = getLastDefinedValue(daysData, formStyle);
978
992
  return getLastDefinedValue(days, width);
979
993
  }
@@ -991,7 +1005,10 @@ function getLocaleDayNames(locale, formStyle, width) {
991
1005
  */
992
1006
  function getLocaleMonthNames(locale, formStyle, width) {
993
1007
  const data = ɵfindLocaleData(locale);
994
- const monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];
1008
+ const monthsData = [
1009
+ data[ɵLocaleDataIndex.MonthsFormat],
1010
+ data[ɵLocaleDataIndex.MonthsStandalone],
1011
+ ];
995
1012
  const months = getLastDefinedValue(monthsData, formStyle);
996
1013
  return getLastDefinedValue(months, width);
997
1014
  }
@@ -1206,8 +1223,7 @@ function getLocaleCurrencies(locale) {
1206
1223
  const getLocalePluralCase = ɵgetLocalePluralCase;
1207
1224
  function checkFullData(data) {
1208
1225
  if (!data[ɵLocaleDataIndex.ExtraData]) {
1209
- throw new Error(`Missing extra locale data for the locale "${data[ɵLocaleDataIndex
1210
- .LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
1226
+ throw new Error(`Missing extra locale data for the locale "${data[ɵLocaleDataIndex.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`);
1211
1227
  }
1212
1228
  }
1213
1229
  /**
@@ -1265,7 +1281,7 @@ function getLocaleExtraDayPeriods(locale, formStyle, width) {
1265
1281
  checkFullData(data);
1266
1282
  const dayPeriodsData = [
1267
1283
  data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],
1268
- data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]
1284
+ data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */],
1269
1285
  ];
1270
1286
  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];
1271
1287
  return getLastDefinedValue(dayPeriods, width) || [];
@@ -1430,11 +1446,13 @@ function formatDate(value, format, locale, timezone) {
1430
1446
  date = convertTimezoneToLocal(date, timezone, true);
1431
1447
  }
1432
1448
  let text = '';
1433
- parts.forEach(value => {
1449
+ parts.forEach((value) => {
1434
1450
  const dateFormatter = getDateFormatter(value);
1435
- text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) :
1436
- value === '\'\'' ? '\'' :
1437
- value.replace(/(^'|'$)/g, '').replace(/''/g, '\'');
1451
+ text += dateFormatter
1452
+ ? dateFormatter(date, locale, dateTimezoneOffset)
1453
+ : value === "''"
1454
+ ? "'"
1455
+ : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
1438
1456
  });
1439
1457
  return text;
1440
1458
  }
@@ -1468,7 +1486,7 @@ function createDate(year, month, date) {
1468
1486
  }
1469
1487
  function getNamedFormat(locale, format) {
1470
1488
  const localeId = getLocaleId(locale);
1471
- NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};
1489
+ NAMED_FORMATS[localeId] ??= {};
1472
1490
  if (NAMED_FORMATS[localeId][format]) {
1473
1491
  return NAMED_FORMATS[localeId][format];
1474
1492
  }
@@ -1501,24 +1519,34 @@ function getNamedFormat(locale, format) {
1501
1519
  case 'short':
1502
1520
  const shortTime = getNamedFormat(locale, 'shortTime');
1503
1521
  const shortDate = getNamedFormat(locale, 'shortDate');
1504
- formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);
1522
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [
1523
+ shortTime,
1524
+ shortDate,
1525
+ ]);
1505
1526
  break;
1506
1527
  case 'medium':
1507
1528
  const mediumTime = getNamedFormat(locale, 'mediumTime');
1508
1529
  const mediumDate = getNamedFormat(locale, 'mediumDate');
1509
- formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);
1530
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [
1531
+ mediumTime,
1532
+ mediumDate,
1533
+ ]);
1510
1534
  break;
1511
1535
  case 'long':
1512
1536
  const longTime = getNamedFormat(locale, 'longTime');
1513
1537
  const longDate = getNamedFormat(locale, 'longDate');
1514
- formatValue =
1515
- formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);
1538
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [
1539
+ longTime,
1540
+ longDate,
1541
+ ]);
1516
1542
  break;
1517
1543
  case 'full':
1518
1544
  const fullTime = getNamedFormat(locale, 'fullTime');
1519
1545
  const fullDate = getNamedFormat(locale, 'fullDate');
1520
- formatValue =
1521
- formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);
1546
+ formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [
1547
+ fullTime,
1548
+ fullDate,
1549
+ ]);
1522
1550
  break;
1523
1551
  }
1524
1552
  if (formatValue) {
@@ -1529,7 +1557,7 @@ function getNamedFormat(locale, format) {
1529
1557
  function formatDateTime(str, opt_values) {
1530
1558
  if (opt_values) {
1531
1559
  str = str.replace(/\{([^}]+)}/g, function (match, key) {
1532
- return (opt_values != null && key in opt_values) ? opt_values[key] : match;
1560
+ return opt_values != null && key in opt_values ? opt_values[key] : match;
1533
1561
  });
1534
1562
  }
1535
1563
  return str;
@@ -1624,13 +1652,12 @@ function getDateTranslation(date, locale, name, width, form, extended) {
1624
1652
  if (extended) {
1625
1653
  const rules = getLocaleExtraDayPeriodRules(locale);
1626
1654
  const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);
1627
- const index = rules.findIndex(rule => {
1655
+ const index = rules.findIndex((rule) => {
1628
1656
  if (Array.isArray(rule)) {
1629
1657
  // morning, afternoon, evening, night
1630
1658
  const [from, to] = rule;
1631
1659
  const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;
1632
- const beforeTo = (currentHours < to.hours ||
1633
- (currentHours === to.hours && currentMinutes < to.minutes));
1660
+ const beforeTo = currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes);
1634
1661
  // We must account for normal rules that span a period during the day (e.g. 6am-9am)
1635
1662
  // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.
1636
1663
  // 10pm - 5am) where `from` is greater (later!) than `to`.
@@ -1650,7 +1677,8 @@ function getDateTranslation(date, locale, name, width, form, extended) {
1650
1677
  return true;
1651
1678
  }
1652
1679
  }
1653
- else { // noon or midnight
1680
+ else {
1681
+ // noon or midnight
1654
1682
  if (rule.hours === currentHours && rule.minutes === currentMinutes) {
1655
1683
  return true;
1656
1684
  }
@@ -1686,20 +1714,26 @@ function timeZoneGetter(width) {
1686
1714
  const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);
1687
1715
  switch (width) {
1688
1716
  case ZoneWidth.Short:
1689
- return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +
1690
- padNumber(Math.abs(zone % 60), 2, minusSign);
1717
+ return ((zone >= 0 ? '+' : '') +
1718
+ padNumber(hours, 2, minusSign) +
1719
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1691
1720
  case ZoneWidth.ShortGMT:
1692
- return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);
1721
+ return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign);
1693
1722
  case ZoneWidth.Long:
1694
- return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
1695
- padNumber(Math.abs(zone % 60), 2, minusSign);
1723
+ return ('GMT' +
1724
+ (zone >= 0 ? '+' : '') +
1725
+ padNumber(hours, 2, minusSign) +
1726
+ ':' +
1727
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1696
1728
  case ZoneWidth.Extended:
1697
1729
  if (offset === 0) {
1698
1730
  return 'Z';
1699
1731
  }
1700
1732
  else {
1701
- return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +
1702
- padNumber(Math.abs(zone % 60), 2, minusSign);
1733
+ return ((zone >= 0 ? '+' : '') +
1734
+ padNumber(hours, 2, minusSign) +
1735
+ ':' +
1736
+ padNumber(Math.abs(zone % 60), 2, minusSign));
1703
1737
  }
1704
1738
  default:
1705
1739
  throw new Error(`Unknown zone width "${width}"`);
@@ -1710,10 +1744,17 @@ const JANUARY = 0;
1710
1744
  const THURSDAY = 4;
1711
1745
  function getFirstThursdayOfYear(year) {
1712
1746
  const firstDayOfYear = createDate(year, JANUARY, 1).getDay();
1713
- return createDate(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
1747
+ return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);
1714
1748
  }
1715
- function getThursdayThisWeek(datetime) {
1716
- return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));
1749
+ /**
1750
+ * ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday)
1751
+ */
1752
+ function getThursdayThisIsoWeek(datetime) {
1753
+ // getDay returns 0-6 range with sunday as 0.
1754
+ const currentDay = datetime.getDay();
1755
+ // On a Sunday, read the previous Thursday since ISO weeks start on Monday.
1756
+ const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;
1757
+ return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday);
1717
1758
  }
1718
1759
  function weekGetter(size, monthBased = false) {
1719
1760
  return function (date, locale) {
@@ -1724,7 +1765,7 @@ function weekGetter(size, monthBased = false) {
1724
1765
  result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);
1725
1766
  }
1726
1767
  else {
1727
- const thisThurs = getThursdayThisWeek(date);
1768
+ const thisThurs = getThursdayThisIsoWeek(date);
1728
1769
  // Some days of a year are part of next year according to ISO 8601.
1729
1770
  // Compute the firstThurs from the year of this week's Thursday
1730
1771
  const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());
@@ -1739,7 +1780,7 @@ function weekGetter(size, monthBased = false) {
1739
1780
  */
1740
1781
  function weekNumberingYearGetter(size, trim = false) {
1741
1782
  return function (date, locale) {
1742
- const thisThurs = getThursdayThisWeek(date);
1783
+ const thisThurs = getThursdayThisIsoWeek(date);
1743
1784
  const weekNumberingYear = thisThurs.getFullYear();
1744
1785
  return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);
1745
1786
  };
@@ -1822,16 +1863,13 @@ function getDateFormatter(format) {
1822
1863
  break;
1823
1864
  // Month of the year (January, ...), string, standalone
1824
1865
  case 'LLL':
1825
- formatter =
1826
- dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
1866
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);
1827
1867
  break;
1828
1868
  case 'LLLL':
1829
- formatter =
1830
- dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
1869
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);
1831
1870
  break;
1832
1871
  case 'LLLLL':
1833
- formatter =
1834
- dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
1872
+ formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);
1835
1873
  break;
1836
1874
  // Week of the year (1, ... 52)
1837
1875
  case 'w':
@@ -1857,15 +1895,13 @@ function getDateFormatter(format) {
1857
1895
  formatter = dateGetter(DateType.Day, 1);
1858
1896
  break;
1859
1897
  case 'ccc':
1860
- formatter =
1861
- dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
1898
+ formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);
1862
1899
  break;
1863
1900
  case 'cccc':
1864
1901
  formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);
1865
1902
  break;
1866
1903
  case 'ccccc':
1867
- formatter =
1868
- dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
1904
+ formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);
1869
1905
  break;
1870
1906
  case 'cccccc':
1871
1907
  formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);
@@ -1916,8 +1952,7 @@ function getDateFormatter(format) {
1916
1952
  formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);
1917
1953
  break;
1918
1954
  case 'BBBB':
1919
- formatter =
1920
- dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
1955
+ formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);
1921
1956
  break;
1922
1957
  case 'BBBBB':
1923
1958
  formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);
@@ -2050,7 +2085,7 @@ function toDate(value) {
2050
2085
  return new Date(parsedNb);
2051
2086
  }
2052
2087
  let match;
2053
- if (match = value.match(ISO8601_DATE_REGEX)) {
2088
+ if ((match = value.match(ISO8601_DATE_REGEX))) {
2054
2089
  return isoStringToDate(match);
2055
2090
  }
2056
2091
  }
@@ -2143,7 +2178,7 @@ function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimal
2143
2178
  let integerLen = parsedNumber.integerLen;
2144
2179
  const exponent = parsedNumber.exponent;
2145
2180
  let decimals = [];
2146
- isZero = digits.every(d => !d);
2181
+ isZero = digits.every((d) => !d);
2147
2182
  // pad zeros for small numbers
2148
2183
  for (; integerLen < minInt; integerLen++) {
2149
2184
  digits.unshift(0);
@@ -2219,7 +2254,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
2219
2254
  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);
2220
2255
  pattern.maxFrac = pattern.minFrac;
2221
2256
  const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);
2222
- return res
2257
+ return (res
2223
2258
  .replace(CURRENCY_CHAR, currency)
2224
2259
  // if we have 2 time the currency character, the second one is ignored
2225
2260
  .replace(CURRENCY_CHAR, '')
@@ -2227,7 +2262,7 @@ function formatCurrency(value, locale, currency, currencyCode, digitsInfo) {
2227
2262
  // the currency character is suppressed by passing an empty string, the
2228
2263
  // spacing character would remain as part of the string. Then we
2229
2264
  // should remove it.
2230
- .trim();
2265
+ .trim());
2231
2266
  }
2232
2267
  /**
2233
2268
  * @ngModule CommonModule
@@ -2286,16 +2321,16 @@ function parseNumberFormat(format, minusSign = '-') {
2286
2321
  negPre: '',
2287
2322
  negSuf: '',
2288
2323
  gSize: 0,
2289
- lgSize: 0
2324
+ lgSize: 0,
2290
2325
  };
2291
2326
  const patternParts = format.split(PATTERN_SEP);
2292
2327
  const positive = patternParts[0];
2293
2328
  const negative = patternParts[1];
2294
- const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?
2295
- positive.split(DECIMAL_SEP) :
2296
- [
2329
+ const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1
2330
+ ? positive.split(DECIMAL_SEP)
2331
+ : [
2297
2332
  positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),
2298
- positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)
2333
+ positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1),
2299
2334
  ], integer = positiveParts[0], fraction = positiveParts[1] || '';
2300
2335
  p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR));
2301
2336
  for (let i = 0; i < fraction.length; i++) {
@@ -2312,7 +2347,7 @@ function parseNumberFormat(format, minusSign = '-') {
2312
2347
  }
2313
2348
  const groups = integer.split(GROUP_SEP);
2314
2349
  p.gSize = groups[1] ? groups[1].length : 0;
2315
- p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;
2350
+ p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0;
2316
2351
  if (negative) {
2317
2352
  const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);
2318
2353
  p.negPre = negative.substring(0, pos).replace(/'/g, '');
@@ -2371,7 +2406,8 @@ function parseNumber(num) {
2371
2406
  integerLen = numStr.length;
2372
2407
  }
2373
2408
  // Count the number of leading zeros.
2374
- for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */
2409
+ for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {
2410
+ /* empty */
2375
2411
  }
2376
2412
  if (i === (zeros = numStr.length)) {
2377
2413
  // The digits are all zero.
@@ -2425,7 +2461,7 @@ function roundNumber(parsedNumber, minFrac, maxFrac) {
2425
2461
  // We rounded to zero so reset the parsedNumber
2426
2462
  fractionLen = Math.max(0, fractionLen);
2427
2463
  parsedNumber.integerLen = 1;
2428
- digits.length = Math.max(1, roundAt = fractionSize + 1);
2464
+ digits.length = Math.max(1, (roundAt = fractionSize + 1));
2429
2465
  digits[0] = 0;
2430
2466
  for (let i = 1; i < roundAt; i++)
2431
2467
  digits[i] = 0;
@@ -2482,10 +2518,10 @@ function parseIntAutoRadix(text) {
2482
2518
  * @publicApi
2483
2519
  */
2484
2520
  class NgLocalization {
2485
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2486
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] }); }
2521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] }); }
2487
2523
  }
2488
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocalization, decorators: [{
2524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocalization, decorators: [{
2489
2525
  type: Injectable,
2490
2526
  args: [{
2491
2527
  providedIn: 'root',
@@ -2539,10 +2575,10 @@ class NgLocaleLocalization extends NgLocalization {
2539
2575
  return 'other';
2540
2576
  }
2541
2577
  }
2542
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
2543
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocaleLocalization }); }
2578
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
2579
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocaleLocalization }); }
2544
2580
  }
2545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2581
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2546
2582
  type: Injectable
2547
2583
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2548
2584
  type: Inject,
@@ -2701,7 +2737,7 @@ class NgClass {
2701
2737
  }
2702
2738
  klass = klass.trim();
2703
2739
  if (klass.length > 0) {
2704
- klass.split(WS_REGEXP).forEach(klass => {
2740
+ klass.split(WS_REGEXP).forEach((klass) => {
2705
2741
  if (enabled) {
2706
2742
  this._renderer.addClass(this._ngEl.nativeElement, klass);
2707
2743
  }
@@ -2711,10 +2747,10 @@ class NgClass {
2711
2747
  });
2712
2748
  }
2713
2749
  }
2714
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2715
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 }); }
2750
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
2751
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 }); }
2716
2752
  }
2717
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgClass, decorators: [{
2753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgClass, decorators: [{
2718
2754
  type: Directive,
2719
2755
  args: [{
2720
2756
  selector: '[ngClass]',
@@ -2812,17 +2848,17 @@ class NgComponentOutlet {
2812
2848
  // Note: square brackets property accessor is safe for Closure compiler optimizations (the
2813
2849
  // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
2814
2850
  // were changed).
2815
- return changes['ngComponentOutletNgModule'] !== undefined ||
2816
- changes['ngComponentOutletNgModuleFactory'] !== undefined;
2851
+ return (changes['ngComponentOutletNgModule'] !== undefined ||
2852
+ changes['ngComponentOutletNgModuleFactory'] !== undefined);
2817
2853
  }
2818
2854
  _needToReCreateComponentInstance(changes) {
2819
2855
  // Note: square brackets property accessor is safe for Closure compiler optimizations (the
2820
2856
  // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that
2821
2857
  // were changed).
2822
- return changes['ngComponentOutlet'] !== undefined ||
2858
+ return (changes['ngComponentOutlet'] !== undefined ||
2823
2859
  changes['ngComponentOutletContent'] !== undefined ||
2824
2860
  changes['ngComponentOutletInjector'] !== undefined ||
2825
- this._needToReCreateNgModuleInstance(changes);
2861
+ this._needToReCreateNgModuleInstance(changes));
2826
2862
  }
2827
2863
  /** @nodoc */
2828
2864
  ngOnChanges(changes) {
@@ -2835,12 +2871,10 @@ class NgComponentOutlet {
2835
2871
  if (this._needToReCreateNgModuleInstance(changes)) {
2836
2872
  this._moduleRef?.destroy();
2837
2873
  if (this.ngComponentOutletNgModule) {
2838
- this._moduleRef =
2839
- createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
2874
+ this._moduleRef = createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));
2840
2875
  }
2841
2876
  else if (this.ngComponentOutletNgModuleFactory) {
2842
- this._moduleRef =
2843
- this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
2877
+ this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));
2844
2878
  }
2845
2879
  else {
2846
2880
  this._moduleRef = undefined;
@@ -2883,10 +2917,10 @@ class NgComponentOutlet {
2883
2917
  }
2884
2918
  }
2885
2919
  }
2886
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2887
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 }); }
2920
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
2921
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInputs: "ngComponentOutletInputs", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 }); }
2888
2922
  }
2889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgComponentOutlet, decorators: [{
2890
2924
  type: Directive,
2891
2925
  args: [{
2892
2926
  selector: '[ngComponentOutlet]',
@@ -3166,10 +3200,10 @@ class NgForOf {
3166
3200
  static ngTemplateContextGuard(dir, ctx) {
3167
3201
  return true;
3168
3202
  }
3169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
3170
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 }); }
3203
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive }); }
3204
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 }); }
3171
3205
  }
3172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgForOf, decorators: [{
3206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgForOf, decorators: [{
3173
3207
  type: Directive,
3174
3208
  args: [{
3175
3209
  selector: '[ngFor][ngForOf]',
@@ -3369,8 +3403,7 @@ class NgIf {
3369
3403
  this._viewContainer.clear();
3370
3404
  this._elseViewRef = null;
3371
3405
  if (this._thenTemplateRef) {
3372
- this._thenViewRef =
3373
- this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
3406
+ this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);
3374
3407
  }
3375
3408
  }
3376
3409
  }
@@ -3379,8 +3412,7 @@ class NgIf {
3379
3412
  this._viewContainer.clear();
3380
3413
  this._thenViewRef = null;
3381
3414
  if (this._elseTemplateRef) {
3382
- this._elseViewRef =
3383
- this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
3415
+ this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);
3384
3416
  }
3385
3417
  }
3386
3418
  }
@@ -3394,10 +3426,10 @@ class NgIf {
3394
3426
  static ngTemplateContextGuard(dir, ctx) {
3395
3427
  return true;
3396
3428
  }
3397
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3398
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 }); }
3429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3430
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 }); }
3399
3431
  }
3400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgIf, decorators: [{
3432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgIf, decorators: [{
3401
3433
  type: Directive,
3402
3434
  args: [{
3403
3435
  selector: '[ngIf]',
@@ -3545,13 +3577,15 @@ class NgSwitch {
3545
3577
  }
3546
3578
  /** @internal */
3547
3579
  _matchCase(value) {
3548
- const matched = NG_SWITCH_USE_STRICT_EQUALS ? value === this._ngSwitch : value == this._ngSwitch;
3580
+ const matched = NG_SWITCH_USE_STRICT_EQUALS
3581
+ ? value === this._ngSwitch
3582
+ : value == this._ngSwitch;
3549
3583
  if ((typeof ngDevMode === 'undefined' || ngDevMode) && matched !== (value == this._ngSwitch)) {
3550
3584
  console.warn(ɵformatRuntimeError(2001 /* RuntimeErrorCode.EQUALITY_NG_SWITCH_DIFFERENCE */, 'As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' +
3551
3585
  `Previously the case value "${stringifyValue(value)}" matched switch expression value "${stringifyValue(this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` +
3552
3586
  'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.'));
3553
3587
  }
3554
- this._lastCasesMatched = this._lastCasesMatched || matched;
3588
+ this._lastCasesMatched ||= matched;
3555
3589
  this._lastCaseCheckIndex++;
3556
3590
  if (this._lastCaseCheckIndex === this._caseCount) {
3557
3591
  this._updateDefaultCases(!this._lastCasesMatched);
@@ -3568,10 +3602,10 @@ class NgSwitch {
3568
3602
  }
3569
3603
  }
3570
3604
  }
3571
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3572
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 }); }
3605
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
3606
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 }); }
3573
3607
  }
3574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitch, decorators: [{
3608
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitch, decorators: [{
3575
3609
  type: Directive,
3576
3610
  args: [{
3577
3611
  selector: '[ngSwitch]',
@@ -3605,8 +3639,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
3605
3639
  * that defines the subtree to be selected if the value of the match expression
3606
3640
  * matches the value of the switch expression.
3607
3641
  *
3608
- * Unlike JavaScript, which uses strict equality, Angular uses loose equality.
3609
- * This means that the empty string, `""` matches 0.
3642
+ * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of
3643
+ * loose equality (`==`) to match different cases.
3610
3644
  *
3611
3645
  * @publicApi
3612
3646
  * @see {@link NgSwitch}
@@ -3629,10 +3663,10 @@ class NgSwitchCase {
3629
3663
  ngDoCheck() {
3630
3664
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3631
3665
  }
3632
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3633
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 }); }
3666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3667
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 }); }
3634
3668
  }
3635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitchCase, decorators: [{
3636
3670
  type: Directive,
3637
3671
  args: [{
3638
3672
  selector: '[ngSwitchCase]',
@@ -3666,10 +3700,10 @@ class NgSwitchDefault {
3666
3700
  }
3667
3701
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3668
3702
  }
3669
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3670
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 }); }
3703
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3704
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 }); }
3671
3705
  }
3672
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3706
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgSwitchDefault, decorators: [{
3673
3707
  type: Directive,
3674
3708
  args: [{
3675
3709
  selector: '[ngSwitchDefault]',
@@ -3747,10 +3781,10 @@ class NgPlural {
3747
3781
  this._activeView.create();
3748
3782
  }
3749
3783
  }
3750
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive }); }
3751
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 }); }
3784
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive }); }
3785
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 }); }
3752
3786
  }
3753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgPlural, decorators: [{
3787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgPlural, decorators: [{
3754
3788
  type: Directive,
3755
3789
  args: [{
3756
3790
  selector: '[ngPlural]',
@@ -3785,10 +3819,10 @@ class NgPluralCase {
3785
3819
  const isANumber = !isNaN(Number(value));
3786
3820
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3787
3821
  }
3788
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3789
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 }); }
3822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3823
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 }); }
3790
3824
  }
3791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgPluralCase, decorators: [{
3825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgPluralCase, decorators: [{
3792
3826
  type: Directive,
3793
3827
  args: [{
3794
3828
  selector: '[ngPluralCase]',
@@ -3874,10 +3908,10 @@ class NgStyle {
3874
3908
  changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));
3875
3909
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
3876
3910
  }
3877
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
3878
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 }); }
3911
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
3912
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 }); }
3879
3913
  }
3880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgStyle, decorators: [{
3914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgStyle, decorators: [{
3881
3915
  type: Directive,
3882
3916
  args: [{
3883
3917
  selector: '[ngStyle]',
@@ -3978,10 +4012,10 @@ class NgTemplateOutlet {
3978
4012
  },
3979
4013
  });
3980
4014
  }
3981
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
3982
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.0", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 }); }
4015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
4016
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0-next.1", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 }); }
3983
4017
  }
3984
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgTemplateOutlet, decorators: [{
3985
4019
  type: Directive,
3986
4020
  args: [{
3987
4021
  selector: '[ngTemplateOutlet]',
@@ -4030,7 +4064,7 @@ class SubscribableStrategy {
4030
4064
  next: updateLatestValue,
4031
4065
  error: (e) => {
4032
4066
  throw e;
4033
- }
4067
+ },
4034
4068
  }));
4035
4069
  }
4036
4070
  dispose(subscription) {
@@ -4040,7 +4074,7 @@ class SubscribableStrategy {
4040
4074
  }
4041
4075
  class PromiseStrategy {
4042
4076
  createSubscription(async, updateLatestValue) {
4043
- return async.then(updateLatestValue, e => {
4077
+ return async.then(updateLatestValue, (e) => {
4044
4078
  throw e;
4045
4079
  });
4046
4080
  }
@@ -4139,10 +4173,10 @@ class AsyncPipe {
4139
4173
  this._ref.markForCheck();
4140
4174
  }
4141
4175
  }
4142
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
4143
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false }); }
4176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
4177
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false }); }
4144
4178
  }
4145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: AsyncPipe, decorators: [{
4179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: AsyncPipe, decorators: [{
4146
4180
  type: Pipe,
4147
4181
  args: [{
4148
4182
  name: 'async',
@@ -4175,10 +4209,10 @@ class LowerCasePipe {
4175
4209
  }
4176
4210
  return value.toLowerCase();
4177
4211
  }
4178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4179
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" }); }
4212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4213
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" }); }
4180
4214
  }
4181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LowerCasePipe, decorators: [{
4182
4216
  type: Pipe,
4183
4217
  args: [{
4184
4218
  name: 'lowercase',
@@ -4218,12 +4252,12 @@ class TitleCasePipe {
4218
4252
  if (typeof value !== 'string') {
4219
4253
  throw invalidPipeArgumentError(TitleCasePipe, value);
4220
4254
  }
4221
- return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4255
+ return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());
4222
4256
  }
4223
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4224
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" }); }
4257
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4258
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" }); }
4225
4259
  }
4226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: TitleCasePipe, decorators: [{
4227
4261
  type: Pipe,
4228
4262
  args: [{
4229
4263
  name: 'titlecase',
@@ -4247,10 +4281,10 @@ class UpperCasePipe {
4247
4281
  }
4248
4282
  return value.toUpperCase();
4249
4283
  }
4250
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4251
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" }); }
4284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4285
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" }); }
4252
4286
  }
4253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: UpperCasePipe, decorators: [{
4254
4288
  type: Pipe,
4255
4289
  args: [{
4256
4290
  name: 'uppercase',
@@ -4270,7 +4304,7 @@ const DEFAULT_DATE_FORMAT = 'mediumDate';
4270
4304
  *
4271
4305
  * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe
4272
4306
  */
4273
- const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZONE');
4307
+ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_TIMEZONE' : '');
4274
4308
  /**
4275
4309
  * DI token that allows to provide default configuration for the `DatePipe` instances in an
4276
4310
  * application. The value is an object which can include the following fields:
@@ -4302,7 +4336,7 @@ const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken('DATE_PIPE_DEFAULT_TIMEZON
4302
4336
  * ]
4303
4337
  * ```
4304
4338
  */
4305
- const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS');
4339
+ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_OPTIONS' : '');
4306
4340
  // clang-format off
4307
4341
  /**
4308
4342
  * @ngModule CommonModule
@@ -4360,70 +4394,70 @@ const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken('DATE_PIPE_DEFAULT_OPTIONS'
4360
4394
  * Format details depend on the locale.
4361
4395
  * Fields marked with (*) are only available in the extra data set for the given locale.
4362
4396
  *
4363
- * | Field type | Format | Description | Example Value |
4364
- * |-------------------- |-------------|---------------------------------------------------------------|------------------------------------------------------------|
4365
- * | Era | G, GG & GGG | Abbreviated | AD |
4366
- * | | GGGG | Wide | Anno Domini |
4367
- * | | GGGGG | Narrow | A |
4368
- * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4369
- * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4370
- * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4371
- * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4372
- * | Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4373
- * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4374
- * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4375
- * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4376
- * | Month | M | Numeric: 1 digit | 9, 12 |
4377
- * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
4378
- * | | MMM | Abbreviated | Sep |
4379
- * | | MMMM | Wide | September |
4380
- * | | MMMMM | Narrow | S |
4381
- * | Month standalone | L | Numeric: 1 digit | 9, 12 |
4382
- * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
4383
- * | | LLL | Abbreviated | Sep |
4384
- * | | LLLL | Wide | September |
4385
- * | | LLLLL | Narrow | S |
4386
- * | Week of year | w | Numeric: minimum digits | 1... 53 |
4387
- * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
4388
- * | Week of month | W | Numeric: 1 digit | 1... 5 |
4389
- * | Day of month | d | Numeric: minimum digits | 1 |
4390
- * | | dd | Numeric: 2 digits + zero padded | 01 |
4391
- * | Week day | E, EE & EEE | Abbreviated | Tue |
4392
- * | | EEEE | Wide | Tuesday |
4393
- * | | EEEEE | Narrow | T |
4394
- * | | EEEEEE | Short | Tu |
4395
- * | Week day standalone | c, cc | Numeric: 1 digit | 2 |
4396
- * | | ccc | Abbreviated | Tue |
4397
- * | | cccc | Wide | Tuesday |
4398
- * | | ccccc | Narrow | T |
4399
- * | | cccccc | Short | Tu |
4400
- * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
4401
- * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
4402
- * | | aaaaa | Narrow | a/p |
4403
- * | Period* | B, BB & BBB | Abbreviated | mid. |
4404
- * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4405
- * | | BBBBB | Narrow | md |
4406
- * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
4407
- * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4408
- * | | bbbbb | Narrow | md |
4409
- * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
4410
- * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
4411
- * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
4412
- * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
4413
- * | Minute | m | Numeric: minimum digits | 8, 59 |
4414
- * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
4415
- * | Second | s | Numeric: minimum digits | 0... 59 |
4416
- * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
4417
- * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
4418
- * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
4419
- * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
4420
- * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
4421
- * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
4422
- * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
4423
- * | | ZZZZ | Long localized GMT format | GMT-8:00 |
4424
- * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
4425
- * | | O, OO & OOO | Short localized GMT format | GMT-8 |
4426
- * | | OOOO | Long localized GMT format | GMT-08:00 |
4397
+ * | Field type | Format | Description | Example Value |
4398
+ * |-------------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|
4399
+ * | Era | G, GG & GGG | Abbreviated | AD |
4400
+ * | | GGGG | Wide | Anno Domini |
4401
+ * | | GGGGG | Narrow | A |
4402
+ * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4403
+ * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4404
+ * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4405
+ * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4406
+ * | ISO Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |
4407
+ * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |
4408
+ * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |
4409
+ * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |
4410
+ * | Month | M | Numeric: 1 digit | 9, 12 |
4411
+ * | | MM | Numeric: 2 digits + zero padded | 09, 12 |
4412
+ * | | MMM | Abbreviated | Sep |
4413
+ * | | MMMM | Wide | September |
4414
+ * | | MMMMM | Narrow | S |
4415
+ * | Month standalone | L | Numeric: 1 digit | 9, 12 |
4416
+ * | | LL | Numeric: 2 digits + zero padded | 09, 12 |
4417
+ * | | LLL | Abbreviated | Sep |
4418
+ * | | LLLL | Wide | September |
4419
+ * | | LLLLL | Narrow | S |
4420
+ * | ISO Week of year | w | Numeric: minimum digits | 1... 53 |
4421
+ * | | ww | Numeric: 2 digits + zero padded | 01... 53 |
4422
+ * | Week of month | W | Numeric: 1 digit | 1... 5 |
4423
+ * | Day of month | d | Numeric: minimum digits | 1 |
4424
+ * | | dd | Numeric: 2 digits + zero padded | 01 |
4425
+ * | Week day | E, EE & EEE | Abbreviated | Tue |
4426
+ * | | EEEE | Wide | Tuesday |
4427
+ * | | EEEEE | Narrow | T |
4428
+ * | | EEEEEE | Short | Tu |
4429
+ * | Week day standalone | c, cc | Numeric: 1 digit | 2 |
4430
+ * | | ccc | Abbreviated | Tue |
4431
+ * | | cccc | Wide | Tuesday |
4432
+ * | | ccccc | Narrow | T |
4433
+ * | | cccccc | Short | Tu |
4434
+ * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |
4435
+ * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |
4436
+ * | | aaaaa | Narrow | a/p |
4437
+ * | Period* | B, BB & BBB | Abbreviated | mid. |
4438
+ * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4439
+ * | | BBBBB | Narrow | md |
4440
+ * | Period standalone* | b, bb & bbb | Abbreviated | mid. |
4441
+ * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |
4442
+ * | | bbbbb | Narrow | md |
4443
+ * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |
4444
+ * | | hh | Numeric: 2 digits + zero padded | 01, 12 |
4445
+ * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |
4446
+ * | | HH | Numeric: 2 digits + zero padded | 00, 23 |
4447
+ * | Minute | m | Numeric: minimum digits | 8, 59 |
4448
+ * | | mm | Numeric: 2 digits + zero padded | 08, 59 |
4449
+ * | Second | s | Numeric: minimum digits | 0... 59 |
4450
+ * | | ss | Numeric: 2 digits + zero padded | 00... 59 |
4451
+ * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |
4452
+ * | | SS | Numeric: 2 digits + zero padded | 00... 99 |
4453
+ * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |
4454
+ * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |
4455
+ * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |
4456
+ * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |
4457
+ * | | ZZZZ | Long localized GMT format | GMT-8:00 |
4458
+ * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |
4459
+ * | | O, OO & OOO | Short localized GMT format | GMT-8 |
4460
+ * | | OOOO | Long localized GMT format | GMT-08:00 |
4427
4461
  *
4428
4462
  *
4429
4463
  * ### Format examples
@@ -4481,14 +4515,13 @@ class DatePipe {
4481
4515
  throw invalidPipeArgumentError(DatePipe, error.message);
4482
4516
  }
4483
4517
  }
4484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
4485
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" }); }
4518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
4519
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" }); }
4486
4520
  }
4487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: DatePipe, decorators: [{
4521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: DatePipe, decorators: [{
4488
4522
  type: Pipe,
4489
4523
  args: [{
4490
4524
  name: 'date',
4491
- pure: true,
4492
4525
  standalone: true,
4493
4526
  }]
4494
4527
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -4541,14 +4574,13 @@ class I18nPluralPipe {
4541
4574
  const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);
4542
4575
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4543
4576
  }
4544
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe }); }
4545
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" }); }
4577
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe }); }
4578
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" }); }
4546
4579
  }
4547
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nPluralPipe, decorators: [{
4548
4581
  type: Pipe,
4549
4582
  args: [{
4550
4583
  name: 'i18nPlural',
4551
- pure: true,
4552
4584
  standalone: true,
4553
4585
  }]
4554
4586
  }], ctorParameters: () => [{ type: NgLocalization }] });
@@ -4590,14 +4622,13 @@ class I18nSelectPipe {
4590
4622
  }
4591
4623
  return '';
4592
4624
  }
4593
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4594
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" }); }
4625
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4626
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" }); }
4595
4627
  }
4596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: I18nSelectPipe, decorators: [{
4597
4629
  type: Pipe,
4598
4630
  args: [{
4599
4631
  name: 'i18nSelect',
4600
- pure: true,
4601
4632
  standalone: true,
4602
4633
  }]
4603
4634
  }] });
@@ -4624,10 +4655,10 @@ class JsonPipe {
4624
4655
  transform(value) {
4625
4656
  return JSON.stringify(value, null, 2);
4626
4657
  }
4627
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4628
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false }); }
4658
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
4659
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false }); }
4629
4660
  }
4630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: JsonPipe, decorators: [{
4661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: JsonPipe, decorators: [{
4631
4662
  type: Pipe,
4632
4663
  args: [{
4633
4664
  name: 'json',
@@ -4669,10 +4700,8 @@ class KeyValuePipe {
4669
4700
  if (!input || (!(input instanceof Map) && typeof input !== 'object')) {
4670
4701
  return null;
4671
4702
  }
4672
- if (!this.differ) {
4673
- // make a differ for whatever type we've been passed in
4674
- this.differ = this.differs.find(input).create();
4675
- }
4703
+ // make a differ for whatever type we've been passed in
4704
+ this.differ ??= this.differs.find(input).create();
4676
4705
  const differChanges = this.differ.diff(input);
4677
4706
  const compareFnChanged = compareFn !== this.compareFn;
4678
4707
  if (differChanges) {
@@ -4687,10 +4716,10 @@ class KeyValuePipe {
4687
4716
  }
4688
4717
  return this.keyValues;
4689
4718
  }
4690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe }); }
4691
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false }); }
4719
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe }); }
4720
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false }); }
4692
4721
  }
4693
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: KeyValuePipe, decorators: [{
4694
4723
  type: Pipe,
4695
4724
  args: [{
4696
4725
  name: 'keyvalue',
@@ -4806,7 +4835,7 @@ class DecimalPipe {
4806
4835
  transform(value, digitsInfo, locale) {
4807
4836
  if (!isValue(value))
4808
4837
  return null;
4809
- locale = locale || this._locale;
4838
+ locale ||= this._locale;
4810
4839
  try {
4811
4840
  const num = strToNumber(value);
4812
4841
  return formatNumber(num, locale, digitsInfo);
@@ -4815,10 +4844,10 @@ class DecimalPipe {
4815
4844
  throw invalidPipeArgumentError(DecimalPipe, error.message);
4816
4845
  }
4817
4846
  }
4818
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4819
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" }); }
4847
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4848
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" }); }
4820
4849
  }
4821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: DecimalPipe, decorators: [{
4850
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: DecimalPipe, decorators: [{
4822
4851
  type: Pipe,
4823
4852
  args: [{
4824
4853
  name: 'number',
@@ -4871,7 +4900,7 @@ class PercentPipe {
4871
4900
  transform(value, digitsInfo, locale) {
4872
4901
  if (!isValue(value))
4873
4902
  return null;
4874
- locale = locale || this._locale;
4903
+ locale ||= this._locale;
4875
4904
  try {
4876
4905
  const num = strToNumber(value);
4877
4906
  return formatPercent(num, locale, digitsInfo);
@@ -4880,10 +4909,10 @@ class PercentPipe {
4880
4909
  throw invalidPipeArgumentError(PercentPipe, error.message);
4881
4910
  }
4882
4911
  }
4883
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4884
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" }); }
4912
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
4913
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" }); }
4885
4914
  }
4886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PercentPipe, decorators: [{
4915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PercentPipe, decorators: [{
4887
4916
  type: Pipe,
4888
4917
  args: [{
4889
4918
  name: 'percent',
@@ -4955,7 +4984,7 @@ class CurrencyPipe {
4955
4984
  transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {
4956
4985
  if (!isValue(value))
4957
4986
  return null;
4958
- locale = locale || this._locale;
4987
+ locale ||= this._locale;
4959
4988
  if (typeof display === 'boolean') {
4960
4989
  if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {
4961
4990
  console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`);
@@ -4979,10 +5008,10 @@ class CurrencyPipe {
4979
5008
  throw invalidPipeArgumentError(CurrencyPipe, error.message);
4980
5009
  }
4981
5010
  }
4982
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
4983
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" }); }
5011
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe }); }
5012
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" }); }
4984
5013
  }
4985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5014
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: CurrencyPipe, decorators: [{
4986
5015
  type: Pipe,
4987
5016
  args: [{
4988
5017
  name: 'currency',
@@ -5059,10 +5088,10 @@ class SlicePipe {
5059
5088
  supports(obj) {
5060
5089
  return typeof obj === 'string' || Array.isArray(obj);
5061
5090
  }
5062
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5063
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false }); }
5091
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5092
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false }); }
5064
5093
  }
5065
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: SlicePipe, decorators: [{
5094
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: SlicePipe, decorators: [{
5066
5095
  type: Pipe,
5067
5096
  args: [{
5068
5097
  name: 'slice',
@@ -5106,11 +5135,11 @@ const COMMON_PIPES = [
5106
5135
  * @publicApi
5107
5136
  */
5108
5137
  class CommonModule {
5109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5110
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0-next.0", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); }
5111
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: CommonModule }); }
5138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5139
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0-next.1", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] }); }
5140
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: CommonModule }); }
5112
5141
  }
5113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: CommonModule, decorators: [{
5142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: CommonModule, decorators: [{
5114
5143
  type: NgModule,
5115
5144
  args: [{
5116
5145
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5163,7 +5192,7 @@ function isPlatformWorkerUi(platformId) {
5163
5192
  /**
5164
5193
  * @publicApi
5165
5194
  */
5166
- const VERSION = new Version('17.2.0-next.0');
5195
+ const VERSION = new Version('17.2.0-next.1');
5167
5196
 
5168
5197
  /**
5169
5198
  * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
@@ -5177,9 +5206,9 @@ class ViewportScroller {
5177
5206
  static { this.ɵprov = ɵɵdefineInjectable({
5178
5207
  token: ViewportScroller,
5179
5208
  providedIn: 'root',
5180
- factory: () => isPlatformBrowser(inject(PLATFORM_ID)) ?
5181
- new BrowserViewportScroller(inject(DOCUMENT), window) :
5182
- new NullViewportScroller()
5209
+ factory: () => isPlatformBrowser(inject(PLATFORM_ID))
5210
+ ? new BrowserViewportScroller(inject(DOCUMENT), window)
5211
+ : new NullViewportScroller(),
5183
5212
  }); }
5184
5213
  }
5185
5214
  /**
@@ -5270,7 +5299,8 @@ function findAnchorFromDocument(document, target) {
5270
5299
  }
5271
5300
  // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we
5272
5301
  // have to traverse the DOM manually and do the lookup through the shadow roots.
5273
- if (typeof document.createTreeWalker === 'function' && document.body &&
5302
+ if (typeof document.createTreeWalker === 'function' &&
5303
+ document.body &&
5274
5304
  typeof document.body.attachShadow === 'function') {
5275
5305
  const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
5276
5306
  let currentNode = treeWalker.currentNode;
@@ -5337,7 +5367,7 @@ function isAbsoluteUrl(src) {
5337
5367
  // Given a URL, extract the hostname part.
5338
5368
  // If a URL is a relative one - the URL is returned as is.
5339
5369
  function extractHostname(url) {
5340
- return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;
5370
+ return isAbsoluteUrl(url) ? new URL(url).hostname : url;
5341
5371
  }
5342
5372
  function isValidPath(path) {
5343
5373
  const isString = typeof path === 'string';
@@ -5375,7 +5405,7 @@ const noopImageLoader = (config) => config.src;
5375
5405
  * @see {@link NgOptimizedImage}
5376
5406
  * @publicApi
5377
5407
  */
5378
- const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5408
+ const IMAGE_LOADER = new InjectionToken(ngDevMode ? 'ImageLoader' : '', {
5379
5409
  providedIn: 'root',
5380
5410
  factory: () => noopImageLoader,
5381
5411
  });
@@ -5452,7 +5482,7 @@ function createCloudflareUrl(path, config) {
5452
5482
  */
5453
5483
  const cloudinaryLoaderInfo = {
5454
5484
  name: 'Cloudinary',
5455
- testUrl: isCloudinaryUrl
5485
+ testUrl: isCloudinaryUrl,
5456
5486
  };
5457
5487
  const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
5458
5488
  /**
@@ -5473,12 +5503,13 @@ function isCloudinaryUrl(url) {
5473
5503
  *
5474
5504
  * @publicApi
5475
5505
  */
5476
- const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5477
- [
5478
- 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',
5479
- 'https://subdomain.mysite.com'
5480
- ] :
5481
- undefined);
5506
+ const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode
5507
+ ? [
5508
+ 'https://res.cloudinary.com/mysite',
5509
+ 'https://mysite.cloudinary.com',
5510
+ 'https://subdomain.mysite.com',
5511
+ ]
5512
+ : undefined);
5482
5513
  function createCloudinaryUrl(path, config) {
5483
5514
  // Cloudinary image URLformat:
5484
5515
  // https://cloudinary.com/documentation/image_transformations#transformation_url_structure
@@ -5537,7 +5568,7 @@ function createImagekitUrl(path, config) {
5537
5568
  */
5538
5569
  const imgixLoaderInfo = {
5539
5570
  name: 'Imgix',
5540
- testUrl: isImgixUrl
5571
+ testUrl: isImgixUrl,
5541
5572
  };
5542
5573
  const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
5543
5574
  /**
@@ -5568,7 +5599,9 @@ function createImgixUrl(path, config) {
5568
5599
 
5569
5600
  // Assembles directive details string, useful for error messages.
5570
5601
  function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
5571
- const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
5602
+ const ngSrcInfo = includeNgSrc
5603
+ ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) `
5604
+ : '';
5572
5605
  return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
5573
5606
  }
5574
5607
 
@@ -5649,7 +5682,7 @@ class LCPImageObserver {
5649
5682
  priority: isPriority,
5650
5683
  modified: false,
5651
5684
  alreadyWarnedModified: false,
5652
- alreadyWarnedPriority: false
5685
+ alreadyWarnedPriority: false,
5653
5686
  };
5654
5687
  this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState);
5655
5688
  }
@@ -5673,10 +5706,10 @@ class LCPImageObserver {
5673
5706
  this.observer.disconnect();
5674
5707
  this.images.clear();
5675
5708
  }
5676
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5677
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' }); }
5709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5710
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LCPImageObserver, providedIn: 'root' }); }
5678
5711
  }
5679
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: LCPImageObserver, decorators: [{
5712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: LCPImageObserver, decorators: [{
5680
5713
  type: Injectable,
5681
5714
  args: [{ providedIn: 'root' }]
5682
5715
  }], ctorParameters: () => [] });
@@ -5715,7 +5748,7 @@ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '
5715
5748
  *
5716
5749
  * @publicApi
5717
5750
  */
5718
- const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5751
+ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken(ngDevMode ? 'PRECONNECT_CHECK_BLOCKLIST' : '');
5719
5752
  /**
5720
5753
  * Contains the logic to detect whether an image, marked with the "priority" attribute
5721
5754
  * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
@@ -5749,7 +5782,7 @@ class PreconnectLinkChecker {
5749
5782
  }
5750
5783
  populateBlocklist(origins) {
5751
5784
  if (Array.isArray(origins)) {
5752
- deepForEach(origins, origin => {
5785
+ deepForEach(origins, (origin) => {
5753
5786
  this.blocklist.add(extractHostname(origin));
5754
5787
  });
5755
5788
  }
@@ -5772,13 +5805,11 @@ class PreconnectLinkChecker {
5772
5805
  return;
5773
5806
  // Register this origin as seen, so we don't check it again later.
5774
5807
  this.alreadySeen.add(imgUrl.origin);
5775
- if (!this.preconnectLinks) {
5776
- // Note: we query for preconnect links only *once* and cache the results
5777
- // for the entire lifespan of an application, since it's unlikely that the
5778
- // list would change frequently. This allows to make sure there are no
5779
- // performance implications of making extra DOM lookups for each image.
5780
- this.preconnectLinks = this.queryPreconnectLinks();
5781
- }
5808
+ // Note: we query for preconnect links only *once* and cache the results
5809
+ // for the entire lifespan of an application, since it's unlikely that the
5810
+ // list would change frequently. This allows to make sure there are no
5811
+ // performance implications of making extra DOM lookups for each image.
5812
+ this.preconnectLinks ??= this.queryPreconnectLinks();
5782
5813
  if (!this.preconnectLinks.has(imgUrl.origin)) {
5783
5814
  console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
5784
5815
  `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
@@ -5801,10 +5832,10 @@ class PreconnectLinkChecker {
5801
5832
  this.preconnectLinks?.clear();
5802
5833
  this.alreadySeen.clear();
5803
5834
  }
5804
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5805
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' }); }
5835
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5836
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' }); }
5806
5837
  }
5807
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5838
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5808
5839
  type: Injectable,
5809
5840
  args: [{ providedIn: 'root' }]
5810
5841
  }], ctorParameters: () => [] });
@@ -5832,7 +5863,10 @@ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
5832
5863
  * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
5833
5864
  * run through the specified `IMAGE_LOADER`.
5834
5865
  */
5835
- const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
5866
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {
5867
+ providedIn: 'root',
5868
+ factory: () => new Set(),
5869
+ });
5836
5870
 
5837
5871
  /**
5838
5872
  * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
@@ -5890,10 +5924,10 @@ class PreloadLinkCreator {
5890
5924
  }
5891
5925
  renderer.appendChild(this.document.head, preload);
5892
5926
  }
5893
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5894
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' }); }
5927
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5928
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' }); }
5895
5929
  }
5896
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
5930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: PreloadLinkCreator, decorators: [{
5897
5931
  type: Injectable,
5898
5932
  args: [{ providedIn: 'root' }]
5899
5933
  }] });
@@ -5938,7 +5972,7 @@ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
5938
5972
  /**
5939
5973
  * Used to determine whether two aspect ratios are similar in value.
5940
5974
  */
5941
- const ASPECT_RATIO_TOLERANCE = .1;
5975
+ const ASPECT_RATIO_TOLERANCE = 0.1;
5942
5976
  /**
5943
5977
  * Used to determine whether the image has been requested at an overly
5944
5978
  * large size compared to the actual rendered image size (after taking
@@ -5951,6 +5985,21 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
5951
5985
  */
5952
5986
  const FIXED_SRCSET_WIDTH_LIMIT = 1920;
5953
5987
  const FIXED_SRCSET_HEIGHT_LIMIT = 1080;
5988
+ /**
5989
+ * Default blur radius of the CSS filter used on placeholder images, in pixels
5990
+ */
5991
+ const PLACEHOLDER_BLUR_AMOUNT = 15;
5992
+ /**
5993
+ * Used to warn or error when the user provides an overly large dataURL for the placeholder
5994
+ * attribute.
5995
+ * Character count of Base64 images is 1 character per byte, and base64 encoding is approximately
5996
+ * 33% larger than base images, so 4000 characters is around 3KB on disk and 10000 characters is
5997
+ * around 7.7KB. Experimentally, 4000 characters is about 20x20px in PNG or medium-quality JPEG
5998
+ * format, and 10,000 is around 50x50px, but there's quite a bit of variation depending on how the
5999
+ * image is saved.
6000
+ */
6001
+ const DATA_URL_WARN_LIMIT = 4000;
6002
+ const DATA_URL_ERROR_LIMIT = 10000;
5954
6003
  /** Info about built-in loaders we can test for. */
5955
6004
  const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];
5956
6005
  /**
@@ -6118,6 +6167,7 @@ class NgOptimizedImage {
6118
6167
  if (!this.ngSrcset) {
6119
6168
  assertNoComplexSizes(this);
6120
6169
  }
6170
+ assertValidPlaceholder(this, this.imageLoader);
6121
6171
  assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
6122
6172
  assertNoNgSrcsetWithoutLoader(this, this.imageLoader);
6123
6173
  assertNoLoaderParamsWithoutLoader(this, this.imageLoader);
@@ -6132,15 +6182,16 @@ class NgOptimizedImage {
6132
6182
  checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
6133
6183
  }
6134
6184
  }
6185
+ if (this.placeholder) {
6186
+ this.removePlaceholderOnLoad(this, this.imgElement, this.renderer);
6187
+ }
6135
6188
  this.setHostAttributes();
6136
6189
  }
6137
6190
  setHostAttributes() {
6138
6191
  // Must set width/height explicitly in case they are bound (in which case they will
6139
6192
  // only be reflected and not found by the browser)
6140
6193
  if (this.fill) {
6141
- if (!this.sizes) {
6142
- this.sizes = '100vw';
6143
- }
6194
+ this.sizes ||= '100vw';
6144
6195
  }
6145
6196
  else {
6146
6197
  this.setHostAttribute('width', this.width.toString());
@@ -6217,7 +6268,10 @@ class NgOptimizedImage {
6217
6268
  }
6218
6269
  getRewrittenSrcset() {
6219
6270
  const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
6220
- const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
6271
+ const finalSrcs = this.ngSrcset
6272
+ .split(',')
6273
+ .filter((src) => src !== '')
6274
+ .map((srcStr) => {
6221
6275
  srcStr = srcStr.trim();
6222
6276
  const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
6223
6277
  return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;
@@ -6238,9 +6292,9 @@ class NgOptimizedImage {
6238
6292
  if (this.sizes?.trim() === '100vw') {
6239
6293
  // Since this is a full-screen-width image, our srcset only needs to include
6240
6294
  // breakpoints with full viewport widths.
6241
- filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6295
+ filteredBreakpoints = breakpoints.filter((bp) => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6242
6296
  }
6243
- const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6297
+ const finalSrcs = filteredBreakpoints.map((bp) => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6244
6298
  return finalSrcs.join(', ');
6245
6299
  }
6246
6300
  updateSrcAndSrcset(forceSrcRecalc = false) {
@@ -6264,9 +6318,9 @@ class NgOptimizedImage {
6264
6318
  return rewrittenSrcset;
6265
6319
  }
6266
6320
  getFixedSrcset() {
6267
- const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({
6321
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map((multiplier) => `${this.callImageLoader({
6268
6322
  src: this.ngSrc,
6269
- width: this.width * multiplier
6323
+ width: this.width * multiplier,
6270
6324
  })} ${multiplier}x`);
6271
6325
  return finalSrcs.join(', ');
6272
6326
  }
@@ -6276,8 +6330,51 @@ class NgOptimizedImage {
6276
6330
  oversizedImage =
6277
6331
  this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT;
6278
6332
  }
6279
- return !this.disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&
6280
- !oversizedImage;
6333
+ return (!this.disableOptimizedSrcset &&
6334
+ !this.srcset &&
6335
+ this.imageLoader !== noopImageLoader &&
6336
+ !oversizedImage);
6337
+ }
6338
+ /**
6339
+ * Returns an image url formatted for use with the CSS background-image property. Expects one of:
6340
+ * * A base64 encoded image, which is wrapped and passed through.
6341
+ * * A boolean. If true, calls the image loader to generate a small placeholder url.
6342
+ */
6343
+ generatePlaceholder(placeholderInput) {
6344
+ const { placeholderResolution } = this.config;
6345
+ if (placeholderInput === true) {
6346
+ return `url(${this.callImageLoader({
6347
+ src: this.ngSrc,
6348
+ width: placeholderResolution,
6349
+ isPlaceholder: true,
6350
+ })})`;
6351
+ }
6352
+ else if (typeof placeholderInput === 'string' && placeholderInput.startsWith('data:')) {
6353
+ return `url(${placeholderInput})`;
6354
+ }
6355
+ return null;
6356
+ }
6357
+ /**
6358
+ * Determines if blur should be applied, based on an optional boolean
6359
+ * property `blur` within the optional configuration object `placeholderConfig`.
6360
+ */
6361
+ shouldBlurPlaceholder(placeholderConfig) {
6362
+ if (!placeholderConfig || !placeholderConfig.hasOwnProperty('blur')) {
6363
+ return true;
6364
+ }
6365
+ return Boolean(placeholderConfig.blur);
6366
+ }
6367
+ removePlaceholderOnLoad(dir, img, renderer) {
6368
+ const removeLoadListenerFn = renderer.listen(img, 'load', () => {
6369
+ removeLoadListenerFn();
6370
+ removeErrorListenerFn();
6371
+ dir.placeholder = false;
6372
+ });
6373
+ const removeErrorListenerFn = renderer.listen(img, 'error', () => {
6374
+ removeLoadListenerFn();
6375
+ removeErrorListenerFn();
6376
+ dir.placeholder = false;
6377
+ });
6281
6378
  }
6282
6379
  /** @nodoc */
6283
6380
  ngOnDestroy() {
@@ -6290,10 +6387,10 @@ class NgOptimizedImage {
6290
6387
  setHostAttribute(name, value) {
6291
6388
  this.renderer.setAttribute(this.imgElement, name, value);
6292
6389
  }
6293
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6294
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0-next.0", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0px\" : null" } }, usesOnChanges: true, ngImport: i0 }); }
6390
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
6391
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.2.0-next.1", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrDataUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 }); }
6295
6392
  }
6296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
6393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.1", ngImport: i0, type: NgOptimizedImage, decorators: [{
6297
6394
  type: Directive,
6298
6395
  args: [{
6299
6396
  standalone: true,
@@ -6302,8 +6399,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
6302
6399
  '[style.position]': 'fill ? "absolute" : null',
6303
6400
  '[style.width]': 'fill ? "100%" : null',
6304
6401
  '[style.height]': 'fill ? "100%" : null',
6305
- '[style.inset]': 'fill ? "0px" : null'
6306
- }
6402
+ '[style.inset]': 'fill ? "0" : null',
6403
+ '[style.background-size]': 'placeholder ? "cover" : null',
6404
+ '[style.background-position]': 'placeholder ? "50% 50%" : null',
6405
+ '[style.background-repeat]': 'placeholder ? "no-repeat" : null',
6406
+ '[style.background-image]': 'placeholder ? generatePlaceholder(placeholder) : null',
6407
+ '[style.filter]': `placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(${PLACEHOLDER_BLUR_AMOUNT}px)" : null`,
6408
+ },
6307
6409
  }]
6308
6410
  }], propDecorators: { ngSrc: [{
6309
6411
  type: Input,
@@ -6331,6 +6433,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0-next.0",
6331
6433
  }], fill: [{
6332
6434
  type: Input,
6333
6435
  args: [{ transform: booleanAttribute }]
6436
+ }], placeholder: [{
6437
+ type: Input,
6438
+ args: [{ transform: booleanOrDataUrlAttribute }]
6439
+ }], placeholderConfig: [{
6440
+ type: Input
6334
6441
  }], src: [{
6335
6442
  type: Input
6336
6443
  }], srcset: [{
@@ -6397,6 +6504,53 @@ function assertNoComplexSizes(dir) {
6397
6504
  `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
6398
6505
  }
6399
6506
  }
6507
+ function assertValidPlaceholder(dir, imageLoader) {
6508
+ assertNoPlaceholderConfigWithoutPlaceholder(dir);
6509
+ assertNoRelativePlaceholderWithoutLoader(dir, imageLoader);
6510
+ assertNoOversizedDataUrl(dir);
6511
+ }
6512
+ /**
6513
+ * Verifies that placeholderConfig isn't being used without placeholder
6514
+ */
6515
+ function assertNoPlaceholderConfigWithoutPlaceholder(dir) {
6516
+ if (dir.placeholderConfig && !dir.placeholder) {
6517
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an ` +
6518
+ `image that does not use the \`placeholder\` attribute, and will have no effect.`);
6519
+ }
6520
+ }
6521
+ /**
6522
+ * Warns if a relative URL placeholder is specified, but no loader is present to provide the small
6523
+ * image.
6524
+ */
6525
+ function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {
6526
+ if (dir.placeholder === true && imageLoader === noopImageLoader) {
6527
+ throw new ɵRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but ` +
6528
+ `no image loader is configured (i.e. the default one is being used), ` +
6529
+ `which would result in the same image being used for the primary image and its placeholder. ` +
6530
+ `To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`);
6531
+ }
6532
+ }
6533
+ /**
6534
+ * Warns or throws an error if an oversized dataURL placeholder is provided.
6535
+ */
6536
+ function assertNoOversizedDataUrl(dir) {
6537
+ if (dir.placeholder &&
6538
+ typeof dir.placeholder === 'string' &&
6539
+ dir.placeholder.startsWith('data:')) {
6540
+ if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {
6541
+ throw new ɵRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
6542
+ `than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` +
6543
+ `directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` +
6544
+ `a smaller data URL placeholder.`);
6545
+ }
6546
+ if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {
6547
+ console.warn(ɵformatRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` +
6548
+ `than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` +
6549
+ `directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` +
6550
+ `generate a smaller data URL placeholder.`));
6551
+ }
6552
+ }
6553
+ }
6400
6554
  /**
6401
6555
  * Verifies that the `ngSrc` is not a Blob URL.
6402
6556
  */
@@ -6441,7 +6595,9 @@ function assertValidNgSrcset(dir, value) {
6441
6595
  }
6442
6596
  }
6443
6597
  function assertUnderDensityCap(dir, value) {
6444
- const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
6598
+ const underDensityCap = value
6599
+ .split(',')
6600
+ .every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
6445
6601
  if (!underDensityCap) {
6446
6602
  throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
6447
6603
  `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
@@ -6459,12 +6615,14 @@ function assertUnderDensityCap(dir, value) {
6459
6615
  function postInitInputChangeError(dir, inputName) {
6460
6616
  let reason;
6461
6617
  if (inputName === 'width' || inputName === 'height') {
6462
- reason = `Changing \`${inputName}\` may result in different attribute value ` +
6463
- `applied to the underlying image element and cause layout shifts on a page.`;
6618
+ reason =
6619
+ `Changing \`${inputName}\` may result in different attribute value ` +
6620
+ `applied to the underlying image element and cause layout shifts on a page.`;
6464
6621
  }
6465
6622
  else {
6466
- reason = `Changing the \`${inputName}\` would have no effect on the underlying ` +
6467
- `image element, because the resource loading has already occurred.`;
6623
+ reason =
6624
+ `Changing the \`${inputName}\` would have no effect on the underlying ` +
6625
+ `image element, because the resource loading has already occurred.`;
6468
6626
  }
6469
6627
  return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
6470
6628
  `The NgOptimizedImage directive will not react to this input change. ${reason} ` +
@@ -6475,7 +6633,7 @@ function postInitInputChangeError(dir, inputName) {
6475
6633
  * Verify that none of the listed inputs has changed.
6476
6634
  */
6477
6635
  function assertNoPostInitInputChange(dir, changes, inputs) {
6478
- inputs.forEach(input => {
6636
+ inputs.forEach((input) => {
6479
6637
  const isUpdated = changes.hasOwnProperty(input);
6480
6638
  if (isUpdated && !changes[input].isFirstChange()) {
6481
6639
  if (input === 'ngSrc') {
@@ -6561,8 +6719,8 @@ function assertNoImageDistortion(dir, img, renderer) {
6561
6719
  // If `ngSrcset` hasn't been set, sanity check the intrinsic size.
6562
6720
  const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
6563
6721
  const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
6564
- const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;
6565
- const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;
6722
+ const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
6723
+ const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
6566
6724
  if (oversizedWidth || oversizedHeight) {
6567
6725
  console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
6568
6726
  `larger than necessary. ` +
@@ -6595,7 +6753,7 @@ function assertNonEmptyWidthAndHeight(dir) {
6595
6753
  missingAttributes.push('height');
6596
6754
  if (missingAttributes.length > 0) {
6597
6755
  throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
6598
- `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6756
+ `are missing: ${missingAttributes.map((attr) => `"${attr}"`).join(', ')}. ` +
6599
6757
  `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6600
6758
  `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
6601
6759
  `"fill" mode with the \`fill\` attribute.`);
@@ -6717,6 +6875,14 @@ function unwrapSafeUrl(value) {
6717
6875
  }
6718
6876
  return ɵunwrapSafeValue(value);
6719
6877
  }
6878
+ // Transform function to handle inputs which may be booleans, strings, or string representations
6879
+ // of boolean values. Used for the placeholder attribute.
6880
+ function booleanOrDataUrlAttribute(value) {
6881
+ if (typeof value === 'string' && value.startsWith(`data:`)) {
6882
+ return value;
6883
+ }
6884
+ return booleanAttribute(value);
6885
+ }
6720
6886
 
6721
6887
  /**
6722
6888
  * @module
@@ -6737,5 +6903,5 @@ function unwrapSafeUrl(value) {
6737
6903
  * Generated bundle index. Do not edit.
6738
6904
  */
6739
6905
 
6740
- export { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6906
+ export { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, PlatformNavigation as ɵPlatformNavigation, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6741
6907
  //# sourceMappingURL=common.mjs.map