@angular/common 14.1.3 → 14.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/esm2020/http/src/client.mjs +3 -3
  2. package/esm2020/http/src/interceptor.mjs +3 -3
  3. package/esm2020/http/src/jsonp.mjs +6 -6
  4. package/esm2020/http/src/module.mjs +15 -15
  5. package/esm2020/http/src/xhr.mjs +3 -3
  6. package/esm2020/http/src/xsrf.mjs +6 -6
  7. package/esm2020/http/testing/src/backend.mjs +3 -3
  8. package/esm2020/http/testing/src/module.mjs +4 -4
  9. package/esm2020/src/common.mjs +2 -1
  10. package/esm2020/src/common_module.mjs +4 -4
  11. package/esm2020/src/directives/ng_class.mjs +4 -4
  12. package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
  13. package/esm2020/src/directives/ng_for_of.mjs +3 -3
  14. package/esm2020/src/directives/ng_if.mjs +3 -3
  15. package/esm2020/src/directives/ng_optimized_image/asserts.mjs +20 -0
  16. package/esm2020/src/directives/ng_optimized_image/error_helper.mjs +13 -0
  17. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +35 -0
  18. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +43 -0
  19. package/esm2020/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +78 -0
  20. package/esm2020/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +35 -0
  21. package/esm2020/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +33 -0
  22. package/esm2020/src/directives/ng_optimized_image/index.mjs +16 -0
  23. package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +99 -0
  24. package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +569 -0
  25. package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +137 -0
  26. package/esm2020/src/directives/ng_optimized_image/url.mjs +52 -0
  27. package/esm2020/src/directives/ng_plural.mjs +6 -6
  28. package/esm2020/src/directives/ng_style.mjs +4 -4
  29. package/esm2020/src/directives/ng_switch.mjs +9 -9
  30. package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
  31. package/esm2020/src/errors.mjs +1 -1
  32. package/esm2020/src/i18n/localization.mjs +6 -6
  33. package/esm2020/src/location/hash_location_strategy.mjs +3 -3
  34. package/esm2020/src/location/location.mjs +4 -4
  35. package/esm2020/src/location/location_strategy.mjs +6 -6
  36. package/esm2020/src/location/platform_location.mjs +6 -6
  37. package/esm2020/src/pipes/async_pipe.mjs +3 -3
  38. package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
  39. package/esm2020/src/pipes/date_pipe.mjs +3 -3
  40. package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
  41. package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
  42. package/esm2020/src/pipes/json_pipe.mjs +3 -3
  43. package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
  44. package/esm2020/src/pipes/number_pipe.mjs +9 -9
  45. package/esm2020/src/pipes/slice_pipe.mjs +3 -3
  46. package/esm2020/src/version.mjs +1 -1
  47. package/esm2020/testing/src/location_mock.mjs +3 -3
  48. package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
  49. package/esm2020/testing/src/mock_platform_location.mjs +3 -3
  50. package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
  51. package/fesm2015/common.mjs +1202 -104
  52. package/fesm2015/common.mjs.map +1 -1
  53. package/fesm2015/http/testing.mjs +8 -8
  54. package/fesm2015/http.mjs +37 -37
  55. package/fesm2015/testing.mjs +10 -10
  56. package/fesm2015/upgrade.mjs +5 -5
  57. package/fesm2020/common.mjs +1200 -104
  58. package/fesm2020/common.mjs.map +1 -1
  59. package/fesm2020/http/testing.mjs +8 -8
  60. package/fesm2020/http.mjs +37 -37
  61. package/fesm2020/testing.mjs +10 -10
  62. package/fesm2020/upgrade.mjs +5 -5
  63. package/http/index.d.ts +1 -1
  64. package/http/testing/index.d.ts +1 -1
  65. package/index.d.ts +309 -3
  66. package/package.json +2 -2
  67. package/testing/index.d.ts +1 -1
  68. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v14.1.3
2
+ * @license Angular v14.2.0-rc.0
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, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable } from '@angular/core';
8
+ import { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, NgZone } from '@angular/core';
9
9
 
10
10
  /**
11
11
  * @license
@@ -87,9 +87,9 @@ class PlatformLocation {
87
87
  throw new Error('Not implemented');
88
88
  }
89
89
  }
90
- PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
- PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PlatformLocation, decorators: [{
90
+ PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PlatformLocation, decorators: [{
93
93
  type: Injectable,
94
94
  args: [{
95
95
  providedIn: 'platform',
@@ -190,9 +190,9 @@ class BrowserPlatformLocation extends PlatformLocation {
190
190
  return this._history.state;
191
191
  }
192
192
  }
193
- BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
- BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
193
+ BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
+ BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
196
196
  type: Injectable,
197
197
  args: [{
198
198
  providedIn: 'platform',
@@ -313,9 +313,9 @@ class LocationStrategy {
313
313
  throw new Error('Not implemented');
314
314
  }
315
315
  }
316
- LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
- LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: LocationStrategy, decorators: [{
316
+ LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
+ LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LocationStrategy, decorators: [{
319
319
  type: Injectable,
320
320
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
321
321
  }] });
@@ -424,9 +424,9 @@ class PathLocationStrategy extends LocationStrategy {
424
424
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
425
425
  }
426
426
  }
427
- PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
428
- PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PathLocationStrategy, decorators: [{
427
+ PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
428
+ PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
430
430
  type: Injectable,
431
431
  args: [{ providedIn: 'root' }]
432
432
  }], ctorParameters: function () {
@@ -525,9 +525,9 @@ class HashLocationStrategy extends LocationStrategy {
525
525
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
526
526
  }
527
527
  }
528
- HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
529
- HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: HashLocationStrategy });
530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: HashLocationStrategy, decorators: [{
528
+ HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
529
+ HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: HashLocationStrategy });
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
531
531
  type: Injectable
532
532
  }], ctorParameters: function () {
533
533
  return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -783,9 +783,9 @@ Location.joinWithSlash = joinWithSlash;
783
783
  * @returns The URL string, modified if needed.
784
784
  */
785
785
  Location.stripTrailingSlash = stripTrailingSlash;
786
- Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
787
- Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: Location, decorators: [{
786
+ Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
787
+ Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: Location, decorators: [{
789
789
  type: Injectable,
790
790
  args: [{
791
791
  providedIn: 'root',
@@ -2601,9 +2601,9 @@ function parseIntAutoRadix(text) {
2601
2601
  */
2602
2602
  class NgLocalization {
2603
2603
  }
2604
- NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
- NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocalization, decorators: [{
2604
+ NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
+ NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocalization, decorators: [{
2607
2607
  type: Injectable,
2608
2608
  args: [{
2609
2609
  providedIn: 'root',
@@ -2658,9 +2658,9 @@ class NgLocaleLocalization extends NgLocalization {
2658
2658
  }
2659
2659
  }
2660
2660
  }
2661
- NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2662
- NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocaleLocalization });
2663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2661
+ NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2662
+ NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization });
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2664
2664
  type: Injectable
2665
2665
  }], ctorParameters: function () {
2666
2666
  return [{ type: undefined, decorators: [{
@@ -2855,9 +2855,9 @@ class NgClass {
2855
2855
  }
2856
2856
  }
2857
2857
  }
2858
- NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2859
- NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgClass, decorators: [{
2858
+ NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2859
+ NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgClass, decorators: [{
2861
2861
  type: Directive,
2862
2862
  args: [{
2863
2863
  selector: '[ngClass]',
@@ -2976,9 +2976,9 @@ class NgComponentOutlet {
2976
2976
  this._moduleRef.destroy();
2977
2977
  }
2978
2978
  }
2979
- NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2980
- NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgComponentOutlet, decorators: [{
2979
+ NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2980
+ NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2982
2982
  type: Directive,
2983
2983
  args: [{
2984
2984
  selector: '[ngComponentOutlet]',
@@ -3268,9 +3268,9 @@ class NgForOf {
3268
3268
  return true;
3269
3269
  }
3270
3270
  }
3271
- NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3272
- NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgForOf, decorators: [{
3271
+ NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3272
+ NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgForOf, decorators: [{
3274
3274
  type: Directive,
3275
3275
  args: [{
3276
3276
  selector: '[ngFor][ngForOf]',
@@ -3503,9 +3503,9 @@ class NgIf {
3503
3503
  return true;
3504
3504
  }
3505
3505
  }
3506
- NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3507
- NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3508
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgIf, decorators: [{
3506
+ NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3507
+ NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgIf, decorators: [{
3509
3509
  type: Directive,
3510
3510
  args: [{
3511
3511
  selector: '[ngIf]',
@@ -3676,9 +3676,9 @@ class NgSwitch {
3676
3676
  }
3677
3677
  }
3678
3678
  }
3679
- NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
- NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitch, decorators: [{
3679
+ NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
+ NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitch, decorators: [{
3682
3682
  type: Directive,
3683
3683
  args: [{
3684
3684
  selector: '[ngSwitch]',
@@ -3737,9 +3737,9 @@ class NgSwitchCase {
3737
3737
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3738
3738
  }
3739
3739
  }
3740
- NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3741
- NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitchCase, decorators: [{
3740
+ NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3741
+ NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3743
3743
  type: Directive,
3744
3744
  args: [{
3745
3745
  selector: '[ngSwitchCase]',
@@ -3776,9 +3776,9 @@ class NgSwitchDefault {
3776
3776
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3777
3777
  }
3778
3778
  }
3779
- NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3780
- NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgSwitchDefault, decorators: [{
3779
+ NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3780
+ NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3782
3782
  type: Directive,
3783
3783
  args: [{
3784
3784
  selector: '[ngSwitchDefault]',
@@ -3864,9 +3864,9 @@ class NgPlural {
3864
3864
  }
3865
3865
  }
3866
3866
  }
3867
- NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3868
- NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgPlural, decorators: [{
3867
+ NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3868
+ NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgPlural, decorators: [{
3870
3870
  type: Directive,
3871
3871
  args: [{
3872
3872
  selector: '[ngPlural]',
@@ -3902,9 +3902,9 @@ class NgPluralCase {
3902
3902
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3903
3903
  }
3904
3904
  }
3905
- NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3906
- NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgPluralCase, decorators: [{
3905
+ NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3906
+ NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgPluralCase, decorators: [{
3908
3908
  type: Directive,
3909
3909
  args: [{
3910
3910
  selector: '[ngPluralCase]',
@@ -4000,9 +4000,9 @@ class NgStyle {
4000
4000
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
4001
4001
  }
4002
4002
  }
4003
- NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4004
- NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
4005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgStyle, decorators: [{
4003
+ NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4004
+ NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
4005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgStyle, decorators: [{
4006
4006
  type: Directive,
4007
4007
  args: [{
4008
4008
  selector: '[ngStyle]',
@@ -4082,9 +4082,9 @@ class NgTemplateOutlet {
4082
4082
  }
4083
4083
  }
4084
4084
  }
4085
- NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4086
- NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4085
+ NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4086
+ NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4088
4088
  type: Directive,
4089
4089
  args: [{
4090
4090
  selector: '[ngTemplateOutlet]',
@@ -4256,9 +4256,9 @@ class AsyncPipe {
4256
4256
  }
4257
4257
  }
4258
4258
  }
4259
- AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4260
- AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AsyncPipe, decorators: [{
4259
+ AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4260
+ AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: AsyncPipe, decorators: [{
4262
4262
  type: Pipe,
4263
4263
  args: [{
4264
4264
  name: 'async',
@@ -4299,9 +4299,9 @@ class LowerCasePipe {
4299
4299
  return value.toLowerCase();
4300
4300
  }
4301
4301
  }
4302
- LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
- LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: LowerCasePipe, decorators: [{
4302
+ LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
+ LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4305
4305
  type: Pipe,
4306
4306
  args: [{
4307
4307
  name: 'lowercase',
@@ -4344,9 +4344,9 @@ class TitleCasePipe {
4344
4344
  return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4345
4345
  }
4346
4346
  }
4347
- TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
- TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TitleCasePipe, decorators: [{
4347
+ TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
+ TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4350
4350
  type: Pipe,
4351
4351
  args: [{
4352
4352
  name: 'titlecase',
@@ -4371,9 +4371,9 @@ class UpperCasePipe {
4371
4371
  return value.toUpperCase();
4372
4372
  }
4373
4373
  }
4374
- UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
- UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: UpperCasePipe, decorators: [{
4374
+ UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
+ UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4377
4377
  type: Pipe,
4378
4378
  args: [{
4379
4379
  name: 'uppercase',
@@ -4569,9 +4569,9 @@ class DatePipe {
4569
4569
  }
4570
4570
  }
4571
4571
  }
4572
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4573
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DatePipe, decorators: [{
4572
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4573
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DatePipe, decorators: [{
4575
4575
  type: Pipe,
4576
4576
  args: [{
4577
4577
  name: 'date',
@@ -4633,9 +4633,9 @@ class I18nPluralPipe {
4633
4633
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4634
4634
  }
4635
4635
  }
4636
- I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4637
- I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: I18nPluralPipe, decorators: [{
4636
+ I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4637
+ I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4639
4639
  type: Pipe,
4640
4640
  args: [{
4641
4641
  name: 'i18nPlural',
@@ -4689,9 +4689,9 @@ class I18nSelectPipe {
4689
4689
  return '';
4690
4690
  }
4691
4691
  }
4692
- I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4693
- I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: I18nSelectPipe, decorators: [{
4692
+ I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4693
+ I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4695
4695
  type: Pipe,
4696
4696
  args: [{
4697
4697
  name: 'i18nSelect',
@@ -4730,9 +4730,9 @@ class JsonPipe {
4730
4730
  return JSON.stringify(value, null, 2);
4731
4731
  }
4732
4732
  }
4733
- JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4734
- JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: JsonPipe, decorators: [{
4733
+ JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4734
+ JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: JsonPipe, decorators: [{
4736
4736
  type: Pipe,
4737
4737
  args: [{
4738
4738
  name: 'json',
@@ -4800,9 +4800,9 @@ class KeyValuePipe {
4800
4800
  return this.keyValues;
4801
4801
  }
4802
4802
  }
4803
- KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4804
- KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: KeyValuePipe, decorators: [{
4803
+ KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4804
+ KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4806
4806
  type: Pipe,
4807
4807
  args: [{
4808
4808
  name: 'keyvalue',
@@ -4935,9 +4935,9 @@ class DecimalPipe {
4935
4935
  }
4936
4936
  }
4937
4937
  }
4938
- DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4939
- DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: DecimalPipe, decorators: [{
4938
+ DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4939
+ DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: DecimalPipe, decorators: [{
4941
4941
  type: Pipe,
4942
4942
  args: [{
4943
4943
  name: 'number',
@@ -5002,9 +5002,9 @@ class PercentPipe {
5002
5002
  }
5003
5003
  }
5004
5004
  }
5005
- PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
5006
- PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5007
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PercentPipe, decorators: [{
5005
+ PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
5006
+ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PercentPipe, decorators: [{
5008
5008
  type: Pipe,
5009
5009
  args: [{
5010
5010
  name: 'percent',
@@ -5122,9 +5122,9 @@ class CurrencyPipe {
5122
5122
  }
5123
5123
  }
5124
5124
  }
5125
- CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5126
- CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CurrencyPipe, decorators: [{
5125
+ CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5126
+ CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5128
5128
  type: Pipe,
5129
5129
  args: [{
5130
5130
  name: 'currency',
@@ -5211,9 +5211,9 @@ class SlicePipe {
5211
5211
  return typeof obj === 'string' || Array.isArray(obj);
5212
5212
  }
5213
5213
  }
5214
- SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5215
- SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SlicePipe, decorators: [{
5214
+ SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5215
+ SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.0-rc.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: SlicePipe, decorators: [{
5217
5217
  type: Pipe,
5218
5218
  args: [{
5219
5219
  name: 'slice',
@@ -5267,10 +5267,10 @@ const COMMON_PIPES = [
5267
5267
  */
5268
5268
  class CommonModule {
5269
5269
  }
5270
- CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5271
- CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", 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] });
5272
- CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonModule });
5273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: CommonModule, decorators: [{
5270
+ CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5271
+ CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0-rc.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] });
5272
+ CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CommonModule });
5273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: CommonModule, decorators: [{
5274
5274
  type: NgModule,
5275
5275
  args: [{
5276
5276
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5328,7 +5328,7 @@ function isPlatformWorkerUi(platformId) {
5328
5328
  /**
5329
5329
  * @publicApi
5330
5330
  */
5331
- const VERSION = new Version('14.1.3');
5331
+ const VERSION = new Version('14.2.0-rc.0');
5332
5332
 
5333
5333
  /**
5334
5334
  * @license
@@ -5553,6 +5553,1104 @@ class NullViewportScroller {
5553
5553
  class XhrFactory {
5554
5554
  }
5555
5555
 
5556
+ /**
5557
+ * @license
5558
+ * Copyright Google LLC All Rights Reserved.
5559
+ *
5560
+ * Use of this source code is governed by an MIT-style license that can be
5561
+ * found in the LICENSE file at https://angular.io/license
5562
+ */
5563
+ /**
5564
+ * Asserts that the application is in development mode. Throws an error if the application is in
5565
+ * production mode. This assert can be used to make sure that there is no dev-mode code invoked in
5566
+ * the prod mode accidentally.
5567
+ */
5568
+ function assertDevMode(checkName) {
5569
+ if (!ngDevMode) {
5570
+ throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
5571
+ `Please make sure that the prod mode is enabled for production builds.`);
5572
+ }
5573
+ }
5574
+
5575
+ /**
5576
+ * @license
5577
+ * Copyright Google LLC All Rights Reserved.
5578
+ *
5579
+ * Use of this source code is governed by an MIT-style license that can be
5580
+ * found in the LICENSE file at https://angular.io/license
5581
+ */
5582
+ // Assembles directive details string, useful for error messages.
5583
+ function imgDirectiveDetails$1(rawSrc, includeRawSrc = true) {
5584
+ const rawSrcInfo = includeRawSrc ? `(activated on an <img> element with the \`rawSrc="${rawSrc}"\`) ` : '';
5585
+ return `The NgOptimizedImage directive ${rawSrcInfo}has detected that`;
5586
+ }
5587
+
5588
+ /**
5589
+ * @license
5590
+ * Copyright Google LLC All Rights Reserved.
5591
+ *
5592
+ * Use of this source code is governed by an MIT-style license that can be
5593
+ * found in the LICENSE file at https://angular.io/license
5594
+ */
5595
+ // Converts a string that represents a URL into a URL class instance.
5596
+ function getUrl(src, win) {
5597
+ // Don't use a base URL is the URL is absolute.
5598
+ return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);
5599
+ }
5600
+ // Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).
5601
+ function isAbsoluteUrl(src) {
5602
+ return /^https?:\/\//.test(src);
5603
+ }
5604
+ // Assembles directive details string, useful for error messages.
5605
+ function imgDirectiveDetails(rawSrc, includeRawSrc = true) {
5606
+ const rawSrcInfo = includeRawSrc ? `(activated on an <img> element with the \`rawSrc="${rawSrc}"\`) ` : '';
5607
+ return `The NgOptimizedImage directive ${rawSrcInfo}has detected that`;
5608
+ }
5609
+ // Invokes a callback for each element in the array. Also invokes a callback
5610
+ // recursively for each nested array.
5611
+ function deepForEach$1(input, fn) {
5612
+ input.forEach(value => Array.isArray(value) ? deepForEach$1(value, fn) : fn(value));
5613
+ }
5614
+ // Given a URL, extract the hostname part.
5615
+ // If a URL is a relative one - the URL is returned as is.
5616
+ function extractHostname(url) {
5617
+ return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;
5618
+ }
5619
+ function isValidPath(path) {
5620
+ const isString = typeof path === 'string';
5621
+ if (!isString || path.trim() === '') {
5622
+ return false;
5623
+ }
5624
+ // Calling new URL() will throw if the path string is malformed
5625
+ try {
5626
+ const url = new URL(path);
5627
+ return true;
5628
+ }
5629
+ catch (_a) {
5630
+ return false;
5631
+ }
5632
+ }
5633
+ function normalizePath(path) {
5634
+ return path.endsWith('/') ? path.slice(0, -1) : path;
5635
+ }
5636
+ function normalizeSrc(src) {
5637
+ return src.startsWith('/') ? src.slice(1) : src;
5638
+ }
5639
+
5640
+ /**
5641
+ * @license
5642
+ * Copyright Google LLC All Rights Reserved.
5643
+ *
5644
+ * Use of this source code is governed by an MIT-style license that can be
5645
+ * found in the LICENSE file at https://angular.io/license
5646
+ */
5647
+ // Set of origins that are always excluded from the preconnect checks.
5648
+ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);
5649
+ /**
5650
+ * Multi-provider injection token to configure which origins should be excluded
5651
+ * from the preconnect checks. It can either be a single string or an array of strings
5652
+ * to represent a group of origins, for example:
5653
+ *
5654
+ * ```typescript
5655
+ * {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true, useValue: 'https://your-domain.com'}
5656
+ * ```
5657
+ *
5658
+ * or:
5659
+ *
5660
+ * ```typescript
5661
+ * {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true,
5662
+ * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
5663
+ * ```
5664
+ *
5665
+ * @publicApi
5666
+ * @developerPreview
5667
+ */
5668
+ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5669
+ /**
5670
+ * Contains the logic to detect whether an image, marked with the "priority" attribute
5671
+ * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
5672
+ *
5673
+ * Note: this is a dev-mode only class, which should not appear in prod bundles,
5674
+ * thus there is no `ngDevMode` use in the code.
5675
+ */
5676
+ class PreconnectLinkChecker {
5677
+ constructor() {
5678
+ /**
5679
+ * Set of <link rel="preconnect"> tags found on this page.
5680
+ * The `null` value indicates that there was no DOM query operation performed.
5681
+ */
5682
+ this.preconnectLinks = null;
5683
+ /*
5684
+ * Keep track of all already seen origin URLs to avoid repeating the same check.
5685
+ */
5686
+ this.alreadySeen = new Set();
5687
+ this.window = null;
5688
+ this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
5689
+ assertDevMode('preconnect link checker');
5690
+ const win = inject(DOCUMENT).defaultView;
5691
+ if (typeof win !== 'undefined') {
5692
+ this.window = win;
5693
+ }
5694
+ const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });
5695
+ if (blocklist) {
5696
+ this.populateBlocklist(blocklist);
5697
+ }
5698
+ }
5699
+ populateBlocklist(origins) {
5700
+ if (Array.isArray(origins)) {
5701
+ deepForEach(origins, origin => {
5702
+ this.blocklist.add(extractHostname(origin));
5703
+ });
5704
+ }
5705
+ else {
5706
+ throw new ɵRuntimeError(2957 /* RuntimeErrorCode.INVALID_PRECONNECT_CHECK_BLOCKLIST */, `The blocklist for the preconnect check was not provided as an array. ` +
5707
+ `Check that the \`PRECONNECT_CHECK_BLOCKLIST\` token is configured as a \`multi: true\` provider.`);
5708
+ }
5709
+ }
5710
+ /**
5711
+ * Checks that a preconnect resource hint exists in the head fo rthe
5712
+ * given src.
5713
+ *
5714
+ * @param rewrittenSrc src formatted with loader
5715
+ * @param rawSrc rawSrc value
5716
+ */
5717
+ assertPreconnect(rewrittenSrc, rawSrc) {
5718
+ if (!this.window)
5719
+ return;
5720
+ const imgUrl = getUrl(rewrittenSrc, this.window);
5721
+ if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))
5722
+ return;
5723
+ // Register this origin as seen, so we don't check it again later.
5724
+ this.alreadySeen.add(imgUrl.origin);
5725
+ if (!this.preconnectLinks) {
5726
+ // Note: we query for preconnect links only *once* and cache the results
5727
+ // for the entire lifespan of an application, since it's unlikely that the
5728
+ // list would change frequently. This allows to make sure there are no
5729
+ // performance implications of making extra DOM lookups for each image.
5730
+ this.preconnectLinks = this.queryPreconnectLinks();
5731
+ }
5732
+ if (!this.preconnectLinks.has(imgUrl.origin)) {
5733
+ console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails$1(rawSrc)} there is no preconnect tag present for this image. ` +
5734
+ `Preconnecting to the origin(s) that serve priority images ensures that these ` +
5735
+ `images are delivered as soon as possible. To fix this, please add the following ` +
5736
+ `element into the <head> of the document:\n` +
5737
+ ` <link rel="preconnect" href="${imgUrl.origin}">`));
5738
+ }
5739
+ }
5740
+ queryPreconnectLinks() {
5741
+ const preconnectUrls = new Set();
5742
+ const selector = 'link[rel=preconnect]';
5743
+ const links = Array.from(document.querySelectorAll(selector));
5744
+ for (let link of links) {
5745
+ const url = getUrl(link.href, this.window);
5746
+ preconnectUrls.add(url.origin);
5747
+ }
5748
+ return preconnectUrls;
5749
+ }
5750
+ ngOnDestroy() {
5751
+ var _a;
5752
+ (_a = this.preconnectLinks) === null || _a === void 0 ? void 0 : _a.clear();
5753
+ this.alreadySeen.clear();
5754
+ }
5755
+ }
5756
+ PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5757
+ PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
5758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5759
+ type: Injectable,
5760
+ args: [{ providedIn: 'root' }]
5761
+ }], ctorParameters: function () { return []; } });
5762
+ /**
5763
+ * Invokes a callback for each element in the array. Also invokes a callback
5764
+ * recursively for each nested array.
5765
+ */
5766
+ function deepForEach(input, fn) {
5767
+ for (let value of input) {
5768
+ Array.isArray(value) ? deepForEach(value, fn) : fn(value);
5769
+ }
5770
+ }
5771
+
5772
+ /**
5773
+ * @license
5774
+ * Copyright Google LLC All Rights Reserved.
5775
+ *
5776
+ * Use of this source code is governed by an MIT-style license that can be
5777
+ * found in the LICENSE file at https://angular.io/license
5778
+ */
5779
+ /**
5780
+ * Noop image loader that does no transformation to the original src and just returns it as is.
5781
+ * This loader is used as a default one if more specific logic is not provided in an app config.
5782
+ *
5783
+ * @see `ImageLoader`
5784
+ * @see `NgOptimizedImage`
5785
+ */
5786
+ const noopImageLoader = (config) => config.src;
5787
+ /**
5788
+ * Injection token that configures the image loader function.
5789
+ *
5790
+ * @see `ImageLoader`
5791
+ * @see `NgOptimizedImage`
5792
+ * @publicApi
5793
+ * @developerPreview
5794
+ */
5795
+ const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5796
+ providedIn: 'root',
5797
+ factory: () => noopImageLoader,
5798
+ });
5799
+ /**
5800
+ * Internal helper function that makes it easier to introduce custom image loaders for the
5801
+ * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI
5802
+ * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI
5803
+ * tokens managing preconnect check functionality.
5804
+ * @param buildUrlFn a function returning a full URL based on loader's configuration
5805
+ * @param exampleUrls example of full URLs for a given loader (used in error messages)
5806
+ * @returns a set of DI providers corresponding to the configured image loader
5807
+ */
5808
+ function createImageLoader(buildUrlFn, exampleUrls) {
5809
+ return function provideImageLoader(path, options = { ensurePreconnect: true }) {
5810
+ if (ngDevMode && !isValidPath(path)) {
5811
+ throwInvalidPathError(path, exampleUrls || []);
5812
+ }
5813
+ // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in
5814
+ // the individual loader functions.
5815
+ path = normalizePath(path);
5816
+ const loaderFn = (config) => {
5817
+ if (ngDevMode && isAbsoluteUrl(config.src)) {
5818
+ // Image loader functions expect an image file name (e.g. `my-image.png`)
5819
+ // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,
5820
+ // so the final absolute URL can be constructed.
5821
+ // When an absolute URL is provided instead - the loader can not
5822
+ // build a final URL, thus the error is thrown to indicate that.
5823
+ throwUnexpectedAbsoluteUrlError(path, config.src);
5824
+ }
5825
+ return buildUrlFn(path, Object.assign(Object.assign({}, config), { src: normalizeSrc(config.src) }));
5826
+ };
5827
+ const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];
5828
+ if (ngDevMode && options.ensurePreconnect === false) {
5829
+ providers.push({ provide: PRECONNECT_CHECK_BLOCKLIST, useValue: [path], multi: true });
5830
+ }
5831
+ return providers;
5832
+ };
5833
+ }
5834
+ function throwInvalidPathError(path, exampleUrls) {
5835
+ const exampleUrlsMsg = exampleUrls.join(' or ');
5836
+ throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `Image loader has detected an invalid path (\`${path}\`). ` +
5837
+ `To fix this, supply a path using one of the following formats: ${exampleUrlsMsg}`);
5838
+ }
5839
+ function throwUnexpectedAbsoluteUrlError(path, url) {
5840
+ throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `Image loader has detected a \`<img>\` tag with an invalid \`rawSrc\` attribute: ${url}. ` +
5841
+ `This image loader expects \`rawSrc\` to be a relative URL - ` +
5842
+ `however the provided value is an absolute URL. ` +
5843
+ `To fix this, provide \`rawSrc\` as a path relative to the base URL ` +
5844
+ `configured for this loader (\`${path}\`).`);
5845
+ }
5846
+
5847
+ /**
5848
+ * @license
5849
+ * Copyright Google LLC All Rights Reserved.
5850
+ *
5851
+ * Use of this source code is governed by an MIT-style license that can be
5852
+ * found in the LICENSE file at https://angular.io/license
5853
+ */
5854
+ /**
5855
+ * Function that generates an ImageLoader for [Cloudflare Image
5856
+ * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular
5857
+ * provider. Note: Cloudflare has multiple image products - this provider is specifically for
5858
+ * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.
5859
+ *
5860
+ * @param path Your domain name, e.g. https://mysite.com
5861
+ * @param options An object with extra configuration:
5862
+ * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5863
+ * should verify that there is a corresponding `<link rel="preconnect">`
5864
+ * present in the document's `<head>`.
5865
+ * @returns Provider that provides an ImageLoader function
5866
+ *
5867
+ * @publicApi
5868
+ * @developerPreview
5869
+ */
5870
+ const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);
5871
+ function createCloudflareUrl(path, config) {
5872
+ let params = `format=auto`;
5873
+ if (config.width) {
5874
+ params += `,width=${config.width}`;
5875
+ }
5876
+ // Cloudflare image URLs format:
5877
+ // https://developers.cloudflare.com/images/image-resizing/url-format/
5878
+ return `${path}/cdn-cgi/image/${params}/${config.src}`;
5879
+ }
5880
+
5881
+ /**
5882
+ * @license
5883
+ * Copyright Google LLC All Rights Reserved.
5884
+ *
5885
+ * Use of this source code is governed by an MIT-style license that can be
5886
+ * found in the LICENSE file at https://angular.io/license
5887
+ */
5888
+ /**
5889
+ * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
5890
+ *
5891
+ * @param path Base URL of your Cloudinary images
5892
+ * This URL should match one of the following formats:
5893
+ * https://res.cloudinary.com/mysite
5894
+ * https://mysite.cloudinary.com
5895
+ * https://subdomain.mysite.com
5896
+ * @param options An object with extra configuration:
5897
+ * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5898
+ * should verify that there is a corresponding `<link rel="preconnect">`
5899
+ * present in the document's `<head>`.
5900
+ * @returns Set of providers to configure the Cloudinary loader.
5901
+ *
5902
+ * @publicApi
5903
+ * @developerPreview
5904
+ */
5905
+ const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5906
+ [
5907
+ 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',
5908
+ 'https://subdomain.mysite.com'
5909
+ ] :
5910
+ undefined);
5911
+ function createCloudinaryUrl(path, config) {
5912
+ // Cloudinary image URLformat:
5913
+ // https://cloudinary.com/documentation/image_transformations#transformation_url_structure
5914
+ // Example of a Cloudinary image URL:
5915
+ // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png
5916
+ let params = `f_auto,q_auto`; // sets image format and quality to "auto"
5917
+ if (config.width) {
5918
+ params += `,w_${config.width}`;
5919
+ }
5920
+ return `${path}/image/upload/${params}/${config.src}`;
5921
+ }
5922
+
5923
+ /**
5924
+ * @license
5925
+ * Copyright Google LLC All Rights Reserved.
5926
+ *
5927
+ * Use of this source code is governed by an MIT-style license that can be
5928
+ * found in the LICENSE file at https://angular.io/license
5929
+ */
5930
+ /**
5931
+ * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
5932
+ *
5933
+ * @param path Base URL of your ImageKit images
5934
+ * This URL should match one of the following formats:
5935
+ * https://ik.imagekit.io/myaccount
5936
+ * https://subdomain.mysite.com
5937
+ * @param options An object with extra configuration:
5938
+ * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5939
+ * should verify that there is a corresponding `<link rel="preconnect">`
5940
+ * present in the document's `<head>`.
5941
+ * @returns Set of providers to configure the ImageKit loader.
5942
+ *
5943
+ * @publicApi
5944
+ * @developerPreview
5945
+ */
5946
+ const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
5947
+ function createImagekitUrl(path, config) {
5948
+ // Example of an ImageKit image URL:
5949
+ // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg
5950
+ let params = `tr:q-auto`; // applies the "auto quality" transformation
5951
+ if (config.width) {
5952
+ params += `,w-${config.width}`;
5953
+ }
5954
+ return `${path}/${params}/${config.src}`;
5955
+ }
5956
+
5957
+ /**
5958
+ * @license
5959
+ * Copyright Google LLC All Rights Reserved.
5960
+ *
5961
+ * Use of this source code is governed by an MIT-style license that can be
5962
+ * found in the LICENSE file at https://angular.io/license
5963
+ */
5964
+ /**
5965
+ * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
5966
+ *
5967
+ * @param path path to the desired Imgix origin,
5968
+ * e.g. https://somepath.imgix.net or https://images.mysite.com
5969
+ * @param options An object with extra configuration:
5970
+ * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5971
+ * should verify that there is a corresponding `<link rel="preconnect">`
5972
+ * present in the document's `<head>`.
5973
+ * @returns Set of providers to configure the Imgix loader.
5974
+ *
5975
+ * @publicApi
5976
+ * @developerPreview
5977
+ */
5978
+ const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
5979
+ function createImgixUrl(path, config) {
5980
+ const url = new URL(`${path}/${config.src}`);
5981
+ // This setting ensures the smallest allowable format is set.
5982
+ url.searchParams.set('auto', 'format');
5983
+ if (config.width) {
5984
+ url.searchParams.set('w', config.width.toString());
5985
+ }
5986
+ return url.href;
5987
+ }
5988
+
5989
+ /**
5990
+ * @license
5991
+ * Copyright Google LLC All Rights Reserved.
5992
+ *
5993
+ * Use of this source code is governed by an MIT-style license that can be
5994
+ * found in the LICENSE file at https://angular.io/license
5995
+ */
5996
+ /**
5997
+ * Observer that detects whether an image with `NgOptimizedImage`
5998
+ * is treated as a Largest Contentful Paint (LCP) element. If so,
5999
+ * asserts that the image has the `priority` attribute.
6000
+ *
6001
+ * Note: this is a dev-mode only class and it does not appear in prod bundles,
6002
+ * thus there is no `ngDevMode` use in the code.
6003
+ *
6004
+ * Based on https://web.dev/lcp/#measure-lcp-in-javascript.
6005
+ */
6006
+ class LCPImageObserver {
6007
+ constructor() {
6008
+ // Map of full image URLs -> original `rawSrc` values.
6009
+ this.images = new Map();
6010
+ // Keep track of images for which `console.warn` was produced.
6011
+ this.alreadyWarned = new Set();
6012
+ this.window = null;
6013
+ this.observer = null;
6014
+ assertDevMode('LCP checker');
6015
+ const win = inject(DOCUMENT).defaultView;
6016
+ if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {
6017
+ this.window = win;
6018
+ this.observer = this.initPerformanceObserver();
6019
+ }
6020
+ }
6021
+ /**
6022
+ * Inits PerformanceObserver and subscribes to LCP events.
6023
+ * Based on https://web.dev/lcp/#measure-lcp-in-javascript
6024
+ */
6025
+ initPerformanceObserver() {
6026
+ const observer = new PerformanceObserver((entryList) => {
6027
+ var _a, _b;
6028
+ const entries = entryList.getEntries();
6029
+ if (entries.length === 0)
6030
+ return;
6031
+ // We use the latest entry produced by the `PerformanceObserver` as the best
6032
+ // signal on which element is actually an LCP one. As an example, the first image to load on
6033
+ // a page, by virtue of being the only thing on the page so far, is often a LCP candidate
6034
+ // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.
6035
+ const lcpElement = entries[entries.length - 1];
6036
+ // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.
6037
+ // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint
6038
+ const imgSrc = (_b = (_a = lcpElement.element) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
6039
+ // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.
6040
+ if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))
6041
+ return;
6042
+ const imgRawSrc = this.images.get(imgSrc);
6043
+ if (imgRawSrc && !this.alreadyWarned.has(imgSrc)) {
6044
+ this.alreadyWarned.add(imgSrc);
6045
+ logMissingPriorityWarning(imgSrc);
6046
+ }
6047
+ });
6048
+ observer.observe({ type: 'largest-contentful-paint', buffered: true });
6049
+ return observer;
6050
+ }
6051
+ registerImage(rewrittenSrc, rawSrc) {
6052
+ if (!this.observer)
6053
+ return;
6054
+ this.images.set(getUrl(rewrittenSrc, this.window).href, rawSrc);
6055
+ }
6056
+ unregisterImage(rewrittenSrc) {
6057
+ if (!this.observer)
6058
+ return;
6059
+ this.images.delete(getUrl(rewrittenSrc, this.window).href);
6060
+ }
6061
+ ngOnDestroy() {
6062
+ if (!this.observer)
6063
+ return;
6064
+ this.observer.disconnect();
6065
+ this.images.clear();
6066
+ this.alreadyWarned.clear();
6067
+ }
6068
+ }
6069
+ LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6070
+ LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
6071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: LCPImageObserver, decorators: [{
6072
+ type: Injectable,
6073
+ args: [{ providedIn: 'root' }]
6074
+ }], ctorParameters: function () { return []; } });
6075
+ function logMissingPriorityWarning(rawSrc) {
6076
+ const directiveDetails = imgDirectiveDetails$1(rawSrc);
6077
+ console.warn(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
6078
+ `element but was not marked "priority". This image should be marked ` +
6079
+ `"priority" in order to prioritize its loading. ` +
6080
+ `To fix this, add the "priority" attribute.`));
6081
+ }
6082
+
6083
+ /**
6084
+ * @license
6085
+ * Copyright Google LLC All Rights Reserved.
6086
+ *
6087
+ * Use of this source code is governed by an MIT-style license that can be
6088
+ * found in the LICENSE file at https://angular.io/license
6089
+ */
6090
+ /**
6091
+ * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,
6092
+ * an error is thrown. The image content (as a string) might be very long, thus making
6093
+ * it hard to read an error message if the entire string is included. This const defines
6094
+ * the number of characters that should be included into the error message. The rest
6095
+ * of the content is truncated.
6096
+ */
6097
+ const BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;
6098
+ /**
6099
+ * RegExpr to determine whether a src in a srcset is using width descriptors.
6100
+ * Should match something like: "100w, 200w".
6101
+ */
6102
+ const VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/;
6103
+ /**
6104
+ * RegExpr to determine whether a src in a srcset is using density descriptors.
6105
+ * Should match something like: "1x, 2x".
6106
+ */
6107
+ const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d(\.\d)?x\s*(,|$)){1,})$/;
6108
+ /**
6109
+ * Srcset values with a density descriptor higher than this value will actively
6110
+ * throw an error. Such densities are not permitted as they cause image sizes
6111
+ * to be unreasonably large and slow down LCP.
6112
+ */
6113
+ const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
6114
+ /**
6115
+ * Used only in error message text to communicate best practices, as we will
6116
+ * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
6117
+ */
6118
+ const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
6119
+ /**
6120
+ * Used to determine whether two aspect ratios are similar in value.
6121
+ */
6122
+ const ASPECT_RATIO_TOLERANCE = .1;
6123
+ /**
6124
+ * Used to determine whether the image has been requested at an overly
6125
+ * large size compared to the actual rendered image size (after taking
6126
+ * into account a typical device pixel ratio). In pixels.
6127
+ */
6128
+ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6129
+ /**
6130
+ * Directive that improves image loading performance by enforcing best practices.
6131
+ *
6132
+ * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is
6133
+ * prioritized by:
6134
+ * - Automatically setting the `fetchpriority` attribute on the `<img>` tag
6135
+ * - Lazy loading non-priority images by default
6136
+ * - Asserting that there is a corresponding preconnect link tag in the document head
6137
+ *
6138
+ * In addition, the directive:
6139
+ * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
6140
+ * - Requires that `width` and `height` are set
6141
+ * - Warns if `width` or `height` have been set incorrectly
6142
+ * - Warns if the image will be visually distorted when rendered
6143
+ *
6144
+ * @usageNotes
6145
+ * The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can
6146
+ * be imported directly.
6147
+ *
6148
+ * Follow the steps below to enable and use the directive:
6149
+ * 1. Import it into the necessary NgModule or a standalone Component.
6150
+ * 2. Optionally provide an `ImageLoader` if you use an image hosting service.
6151
+ * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `rawSrc`.
6152
+ * Using a `rawSrc` allows the directive to control when the `src` gets set, which triggers an image
6153
+ * download.
6154
+ *
6155
+ * Step 1: import the `NgOptimizedImage` directive.
6156
+ *
6157
+ * ```typescript
6158
+ * import { NgOptimizedImage } from '@angular/common';
6159
+ *
6160
+ * // Include it into the necessary NgModule
6161
+ * @NgModule({
6162
+ * imports: [NgOptimizedImage],
6163
+ * })
6164
+ * class AppModule {}
6165
+ *
6166
+ * // ... or a standalone Component
6167
+ * @Component({
6168
+ * standalone: true
6169
+ * imports: [NgOptimizedImage],
6170
+ * })
6171
+ * class MyStandaloneComponent {}
6172
+ * ```
6173
+ *
6174
+ * Step 2: configure a loader.
6175
+ *
6176
+ * To use the **default loader**: no additional code changes are necessary. The URL returned by the
6177
+ * generic loader will always match the value of "src". In other words, this loader applies no
6178
+ * transformations to thr resource URL and the value of the `rawSrc` attribute will be used as is.
6179
+ *
6180
+ * To use an existing loader for a **third-party image service**: add the provider factory for your
6181
+ * chosen service to the `providers` array. In the example below, the Imgix loader is used:
6182
+ *
6183
+ * ```typescript
6184
+ * import {provideImgixLoader} from '@angular/common';
6185
+ *
6186
+ * // Call the function and add the result to the `providers` array:
6187
+ * providers: [
6188
+ * provideImgixLoader("https://my.base.url/"),
6189
+ * ],
6190
+ * ```
6191
+ *
6192
+ * The `NgOptimizedImage` directive provides the following functions:
6193
+ * - `provideCloudflareLoader`
6194
+ * - `provideCloudinaryLoader`
6195
+ * - `provideImageKitLoader`
6196
+ * - `provideImgixLoader`
6197
+ *
6198
+ * If you use a different image provider, you can create a custom loader function as described
6199
+ * below.
6200
+ *
6201
+ * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI
6202
+ * token.
6203
+ *
6204
+ * ```typescript
6205
+ * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';
6206
+ *
6207
+ * // Configure the loader using the `IMAGE_LOADER` token.
6208
+ * providers: [
6209
+ * {
6210
+ * provide: IMAGE_LOADER,
6211
+ * useValue: (config: ImageLoaderConfig) => {
6212
+ * return `https://example.com/${config.src}-${config.width}.jpg}`;
6213
+ * }
6214
+ * },
6215
+ * ],
6216
+ * ```
6217
+ *
6218
+ * Step 3: update `<img>` tags in templates to use `rawSrc` instead of `src`.
6219
+ *
6220
+ * ```
6221
+ * <img rawSrc="logo.png" width="200" height="100">
6222
+ * ```
6223
+ *
6224
+ * @publicApi
6225
+ * @developerPreview
6226
+ */
6227
+ class NgOptimizedImage {
6228
+ constructor() {
6229
+ this.imageLoader = inject(IMAGE_LOADER);
6230
+ this.renderer = inject(Renderer2);
6231
+ this.imgElement = inject(ElementRef).nativeElement;
6232
+ this.injector = inject(Injector);
6233
+ /**
6234
+ * Calculate the rewritten `src` once and store it.
6235
+ * This is needed to avoid repetitive calculations and make sure the directive cleanup in the
6236
+ * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other
6237
+ * instance that might be already destroyed).
6238
+ */
6239
+ this._renderedSrc = null;
6240
+ this._priority = false;
6241
+ }
6242
+ /**
6243
+ * The intrinsic width of the image in pixels.
6244
+ */
6245
+ set width(value) {
6246
+ ngDevMode && assertGreaterThanZero(this, value, 'width');
6247
+ this._width = inputToInteger(value);
6248
+ }
6249
+ get width() {
6250
+ return this._width;
6251
+ }
6252
+ /**
6253
+ * The intrinsic height of the image in pixels.
6254
+ */
6255
+ set height(value) {
6256
+ ngDevMode && assertGreaterThanZero(this, value, 'height');
6257
+ this._height = inputToInteger(value);
6258
+ }
6259
+ get height() {
6260
+ return this._height;
6261
+ }
6262
+ /**
6263
+ * Indicates whether this image should have a high priority.
6264
+ */
6265
+ set priority(value) {
6266
+ this._priority = inputToBoolean(value);
6267
+ }
6268
+ get priority() {
6269
+ return this._priority;
6270
+ }
6271
+ ngOnInit() {
6272
+ if (ngDevMode) {
6273
+ assertNonEmptyInput(this, 'rawSrc', this.rawSrc);
6274
+ assertValidRawSrcset(this, this.rawSrcset);
6275
+ assertNoConflictingSrc(this);
6276
+ assertNoConflictingSrcset(this);
6277
+ assertNotBase64Image(this);
6278
+ assertNotBlobUrl(this);
6279
+ assertNonEmptyWidthAndHeight(this);
6280
+ assertValidLoadingInput(this);
6281
+ assertNoImageDistortion(this, this.imgElement, this.renderer);
6282
+ if (this.priority) {
6283
+ const checker = this.injector.get(PreconnectLinkChecker);
6284
+ checker.assertPreconnect(this.getRewrittenSrc(), this.rawSrc);
6285
+ }
6286
+ else {
6287
+ // Monitor whether an image is an LCP element only in case
6288
+ // the `priority` attribute is missing. Otherwise, an image
6289
+ // has the necessary settings and no extra checks are required.
6290
+ invokeLCPImageObserverCallback(this.injector, (observer) => observer.registerImage(this.getRewrittenSrc(), this.rawSrc));
6291
+ }
6292
+ }
6293
+ this.setHostAttributes();
6294
+ }
6295
+ setHostAttributes() {
6296
+ // Must set width/height explicitly in case they are bound (in which case they will
6297
+ // only be reflected and not found by the browser)
6298
+ this.setHostAttribute('width', this.width.toString());
6299
+ this.setHostAttribute('height', this.height.toString());
6300
+ this.setHostAttribute('loading', this.getLoadingBehavior());
6301
+ this.setHostAttribute('fetchpriority', this.getFetchPriority());
6302
+ // The `src` and `srcset` attributes should be set last since other attributes
6303
+ // could affect the image's loading behavior.
6304
+ this.setHostAttribute('src', this.getRewrittenSrc());
6305
+ if (this.rawSrcset) {
6306
+ this.setHostAttribute('srcset', this.getRewrittenSrcset());
6307
+ }
6308
+ }
6309
+ ngOnChanges(changes) {
6310
+ if (ngDevMode) {
6311
+ assertNoPostInitInputChange(this, changes, ['rawSrc', 'rawSrcset', 'width', 'height', 'priority']);
6312
+ }
6313
+ }
6314
+ getLoadingBehavior() {
6315
+ if (!this.priority && this.loading !== undefined) {
6316
+ return this.loading;
6317
+ }
6318
+ return this.priority ? 'eager' : 'lazy';
6319
+ }
6320
+ getFetchPriority() {
6321
+ return this.priority ? 'high' : 'auto';
6322
+ }
6323
+ getRewrittenSrc() {
6324
+ // ImageLoaderConfig supports setting a width property. However, we're not setting width here
6325
+ // because if the developer uses rendered width instead of intrinsic width in the HTML width
6326
+ // attribute, the image requested may be too small for 2x+ screens.
6327
+ if (!this._renderedSrc) {
6328
+ const imgConfig = { src: this.rawSrc };
6329
+ // Cache calculated image src to reuse it later in the code.
6330
+ this._renderedSrc = this.imageLoader(imgConfig);
6331
+ }
6332
+ return this._renderedSrc;
6333
+ }
6334
+ getRewrittenSrcset() {
6335
+ const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.rawSrcset);
6336
+ const finalSrcs = this.rawSrcset.split(',').filter(src => src !== '').map(srcStr => {
6337
+ srcStr = srcStr.trim();
6338
+ const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
6339
+ return `${this.imageLoader({ src: this.rawSrc, width })} ${srcStr}`;
6340
+ });
6341
+ return finalSrcs.join(', ');
6342
+ }
6343
+ ngOnDestroy() {
6344
+ if (ngDevMode) {
6345
+ if (!this.priority && this._renderedSrc !== null) {
6346
+ invokeLCPImageObserverCallback(this.injector, (observer) => observer.unregisterImage(this._renderedSrc));
6347
+ }
6348
+ }
6349
+ }
6350
+ setHostAttribute(name, value) {
6351
+ this.renderer.setAttribute(this.imgElement, name, value);
6352
+ }
6353
+ }
6354
+ NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6355
+ NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0-rc.0", type: NgOptimizedImage, isStandalone: true, selector: "img[rawSrc]", inputs: { rawSrc: "rawSrc", rawSrcset: "rawSrcset", width: "width", height: "height", loading: "loading", priority: "priority", src: "src", srcset: "srcset" }, usesOnChanges: true, ngImport: i0 });
6356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0-rc.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
6357
+ type: Directive,
6358
+ args: [{
6359
+ standalone: true,
6360
+ selector: 'img[rawSrc]',
6361
+ }]
6362
+ }], propDecorators: { rawSrc: [{
6363
+ type: Input
6364
+ }], rawSrcset: [{
6365
+ type: Input
6366
+ }], width: [{
6367
+ type: Input
6368
+ }], height: [{
6369
+ type: Input
6370
+ }], loading: [{
6371
+ type: Input
6372
+ }], priority: [{
6373
+ type: Input
6374
+ }], src: [{
6375
+ type: Input
6376
+ }], srcset: [{
6377
+ type: Input
6378
+ }] } });
6379
+ /***** Helpers *****/
6380
+ /**
6381
+ * Convert input value to integer.
6382
+ */
6383
+ function inputToInteger(value) {
6384
+ return typeof value === 'string' ? parseInt(value, 10) : value;
6385
+ }
6386
+ /**
6387
+ * Convert input value to boolean.
6388
+ */
6389
+ function inputToBoolean(value) {
6390
+ return value != null && `${value}` !== 'false';
6391
+ }
6392
+ /**
6393
+ * Invokes a function, passing an instance of the `LCPImageObserver` as an argument.
6394
+ *
6395
+ * Notes:
6396
+ * - the `LCPImageObserver` is a tree-shakable provider, provided in 'root',
6397
+ * thus it's a singleton within this application
6398
+ * - the process of `LCPImageObserver` creation and an actual operation are invoked outside of the
6399
+ * NgZone to make sure none of the calls inside the `LCPImageObserver` class trigger unnecessary
6400
+ * change detection
6401
+ */
6402
+ function invokeLCPImageObserverCallback(injector, operation) {
6403
+ const ngZone = injector.get(NgZone);
6404
+ return ngZone.runOutsideAngular(() => {
6405
+ const observer = injector.get(LCPImageObserver);
6406
+ operation(observer);
6407
+ });
6408
+ }
6409
+ /***** Assert functions *****/
6410
+ /**
6411
+ * Verifies that there is no `src` set on a host element.
6412
+ */
6413
+ function assertNoConflictingSrc(dir) {
6414
+ if (dir.src) {
6415
+ throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails$1(dir.rawSrc)} both \`src\` and \`rawSrc\` have been set. ` +
6416
+ `Supplying both of these attributes breaks lazy loading. ` +
6417
+ `The NgOptimizedImage directive sets \`src\` itself based on the value of \`rawSrc\`. ` +
6418
+ `To fix this, please remove the \`src\` attribute.`);
6419
+ }
6420
+ }
6421
+ /**
6422
+ * Verifies that there is no `srcset` set on a host element.
6423
+ */
6424
+ function assertNoConflictingSrcset(dir) {
6425
+ if (dir.srcset) {
6426
+ throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails$1(dir.rawSrc)} both \`srcset\` and \`rawSrcset\` have been set. ` +
6427
+ `Supplying both of these attributes breaks lazy loading. ` +
6428
+ `The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` +
6429
+ `\`rawSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
6430
+ }
6431
+ }
6432
+ /**
6433
+ * Verifies that the `rawSrc` is not a Base64-encoded image.
6434
+ */
6435
+ function assertNotBase64Image(dir) {
6436
+ let rawSrc = dir.rawSrc.trim();
6437
+ if (rawSrc.startsWith('data:')) {
6438
+ if (rawSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
6439
+ rawSrc = rawSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
6440
+ }
6441
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc, false)} \`rawSrc\` is a Base64-encoded string ` +
6442
+ `(${rawSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +
6443
+ `To fix this, disable the NgOptimizedImage directive for this element ` +
6444
+ `by removing \`rawSrc\` and using a standard \`src\` attribute instead.`);
6445
+ }
6446
+ }
6447
+ /**
6448
+ * Verifies that the `rawSrc` is not a Blob URL.
6449
+ */
6450
+ function assertNotBlobUrl(dir) {
6451
+ const rawSrc = dir.rawSrc.trim();
6452
+ if (rawSrc.startsWith('blob:')) {
6453
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} \`rawSrc\` was set to a blob URL (${rawSrc}). ` +
6454
+ `Blob URLs are not supported by the NgOptimizedImage directive. ` +
6455
+ `To fix this, disable the NgOptimizedImage directive for this element ` +
6456
+ `by removing \`rawSrc\` and using a regular \`src\` attribute instead.`);
6457
+ }
6458
+ }
6459
+ /**
6460
+ * Verifies that the input is set to a non-empty string.
6461
+ */
6462
+ function assertNonEmptyInput(dir, name, value) {
6463
+ const isString = typeof value === 'string';
6464
+ const isEmptyString = isString && value.trim() === '';
6465
+ if (!isString || isEmptyString) {
6466
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} \`${name}\` has an invalid value ` +
6467
+ `(\`${value}\`). To fix this, change the value to a non-empty string.`);
6468
+ }
6469
+ }
6470
+ /**
6471
+ * Verifies that the `rawSrcset` is in a valid format, e.g. "100w, 200w" or "1x, 2x".
6472
+ */
6473
+ function assertValidRawSrcset(dir, value) {
6474
+ if (value == null)
6475
+ return;
6476
+ assertNonEmptyInput(dir, 'rawSrcset', value);
6477
+ const stringVal = value;
6478
+ const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);
6479
+ const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);
6480
+ if (isValidDensityDescriptor) {
6481
+ assertUnderDensityCap(dir, stringVal);
6482
+ }
6483
+ const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
6484
+ if (!isValidSrcset) {
6485
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} \`rawSrcset\` has an invalid value (\`${value}\`). ` +
6486
+ `To fix this, supply \`rawSrcset\` using a comma-separated list of one or more width ` +
6487
+ `descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
6488
+ }
6489
+ }
6490
+ function assertUnderDensityCap(dir, value) {
6491
+ const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
6492
+ if (!underDensityCap) {
6493
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} the \`rawSrcset\` contains an unsupported image density:` +
6494
+ `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
6495
+ `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
6496
+ `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
6497
+ `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +
6498
+ `most use cases. Images that will be pinch-zoomed are typically the primary use case for` +
6499
+ `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
6500
+ }
6501
+ }
6502
+ /**
6503
+ * Creates a `RuntimeError` instance to represent a situation when an input is set after
6504
+ * the directive has initialized.
6505
+ */
6506
+ function postInitInputChangeError(dir, inputName) {
6507
+ return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails$1(dir.rawSrc)} \`${inputName}\` was updated after initialization. ` +
6508
+ `The NgOptimizedImage directive will not react to this input change. ` +
6509
+ `To fix this, switch \`${inputName}\` a static value or wrap the image element ` +
6510
+ `in an *ngIf that is gated on the necessary value.`);
6511
+ }
6512
+ /**
6513
+ * Verify that none of the listed inputs has changed.
6514
+ */
6515
+ function assertNoPostInitInputChange(dir, changes, inputs) {
6516
+ inputs.forEach(input => {
6517
+ const isUpdated = changes.hasOwnProperty(input);
6518
+ if (isUpdated && !changes[input].isFirstChange()) {
6519
+ if (input === 'rawSrc') {
6520
+ // When the `rawSrc` input changes, we detect that only in the
6521
+ // `ngOnChanges` hook, thus the `rawSrc` is already set. We use
6522
+ // `rawSrc` in the error message, so we use a previous value, but
6523
+ // not the updated one in it.
6524
+ dir = { rawSrc: changes[input].previousValue };
6525
+ }
6526
+ throw postInitInputChangeError(dir, input);
6527
+ }
6528
+ });
6529
+ }
6530
+ /**
6531
+ * Verifies that a specified input is a number greater than 0.
6532
+ */
6533
+ function assertGreaterThanZero(dir, inputValue, inputName) {
6534
+ const validNumber = typeof inputValue === 'number' && inputValue > 0;
6535
+ const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
6536
+ if (!validNumber && !validString) {
6537
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} \`${inputName}\` has an invalid value ` +
6538
+ `(\`${inputValue}\`). To fix this, provide \`${inputName}\` ` +
6539
+ `as a number greater than 0.`);
6540
+ }
6541
+ }
6542
+ /**
6543
+ * Verifies that the rendered image is not visually distorted. Effectively this is checking:
6544
+ * - Whether the "width" and "height" attributes reflect the actual dimensions of the image.
6545
+ * - Whether image styling is "correct" (see below for a longer explanation).
6546
+ */
6547
+ function assertNoImageDistortion(dir, img, renderer) {
6548
+ const removeListenerFn = renderer.listen(img, 'load', () => {
6549
+ removeListenerFn();
6550
+ // TODO: `clientWidth`, `clientHeight`, `naturalWidth` and `naturalHeight`
6551
+ // are typed as number, but we run `parseFloat` (which accepts strings only).
6552
+ // Verify whether `parseFloat` is needed in the cases below.
6553
+ const renderedWidth = parseFloat(img.clientWidth);
6554
+ const renderedHeight = parseFloat(img.clientHeight);
6555
+ const renderedAspectRatio = renderedWidth / renderedHeight;
6556
+ const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;
6557
+ const intrinsicWidth = parseFloat(img.naturalWidth);
6558
+ const intrinsicHeight = parseFloat(img.naturalHeight);
6559
+ const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;
6560
+ const suppliedWidth = dir.width;
6561
+ const suppliedHeight = dir.height;
6562
+ const suppliedAspectRatio = suppliedWidth / suppliedHeight;
6563
+ // Tolerance is used to account for the impact of subpixel rendering.
6564
+ // Due to subpixel rendering, the rendered, intrinsic, and supplied
6565
+ // aspect ratios of a correctly configured image may not exactly match.
6566
+ // For example, a `width=4030 height=3020` image might have a rendered
6567
+ // size of "1062w, 796.48h". (An aspect ratio of 1.334... vs. 1.333...)
6568
+ const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;
6569
+ const stylingDistortion = nonZeroRenderedDimensions &&
6570
+ Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
6571
+ if (inaccurateDimensions) {
6572
+ console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} the aspect ratio of the image does not match ` +
6573
+ `the aspect ratio indicated by the width and height attributes. ` +
6574
+ `Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
6575
+ `(aspect-ratio: ${intrinsicAspectRatio}). Supplied width and height attributes: ` +
6576
+ `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +
6577
+ `To fix this, update the width and height attributes.`));
6578
+ }
6579
+ else if (stylingDistortion) {
6580
+ console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} the aspect ratio of the rendered image ` +
6581
+ `does not match the image's intrinsic aspect ratio. ` +
6582
+ `Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
6583
+ `(aspect-ratio: ${intrinsicAspectRatio}). Rendered image size: ` +
6584
+ `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +
6585
+ `${renderedAspectRatio}). This issue can occur if "width" and "height" ` +
6586
+ `attributes are added to an image without updating the corresponding ` +
6587
+ `image styling. To fix this, adjust image styling. In most cases, ` +
6588
+ `adding "height: auto" or "width: auto" to the image styling will fix ` +
6589
+ `this issue.`));
6590
+ }
6591
+ else if (!dir.rawSrcset && nonZeroRenderedDimensions) {
6592
+ // If `rawSrcset` hasn't been set, sanity check the intrinsic size.
6593
+ const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
6594
+ const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
6595
+ const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;
6596
+ const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;
6597
+ if (oversizedWidth || oversizedHeight) {
6598
+ console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails$1(dir.rawSrc)} the intrinsic image is significantly ` +
6599
+ `larger than necessary. ` +
6600
+ `Rendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
6601
+ `Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
6602
+ `Recommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +
6603
+ `Note: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +
6604
+ `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +
6605
+ `or consider using the "rawSrcset" and "sizes" attributes.`));
6606
+ }
6607
+ }
6608
+ });
6609
+ }
6610
+ /**
6611
+ * Verifies that a specified input is set.
6612
+ */
6613
+ function assertNonEmptyWidthAndHeight(dir) {
6614
+ let missingAttributes = [];
6615
+ if (dir.width === undefined)
6616
+ missingAttributes.push('width');
6617
+ if (dir.height === undefined)
6618
+ missingAttributes.push('height');
6619
+ if (missingAttributes.length > 0) {
6620
+ throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails$1(dir.rawSrc)} these required attributes ` +
6621
+ `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6622
+ `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6623
+ `To fix this, include "width" and "height" attributes on the image tag.`);
6624
+ }
6625
+ }
6626
+ /**
6627
+ * Verifies that the `loading` attribute is set to a valid input &
6628
+ * is not used on priority images.
6629
+ */
6630
+ function assertValidLoadingInput(dir) {
6631
+ if (dir.loading && dir.priority) {
6632
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} the \`loading\` attribute ` +
6633
+ `was used on an image that was marked "priority". ` +
6634
+ `Setting \`loading\` on priority images is not allowed ` +
6635
+ `because these images will always be eagerly loaded. ` +
6636
+ `To fix this, remove the “loading” attribute from the priority image.`);
6637
+ }
6638
+ const validInputs = ['auto', 'eager', 'lazy'];
6639
+ if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
6640
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails$1(dir.rawSrc)} the \`loading\` attribute ` +
6641
+ `has an invalid value (\`${dir.loading}\`). ` +
6642
+ `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
6643
+ }
6644
+ }
6645
+
6646
+ /**
6647
+ * @license
6648
+ * Copyright Google LLC All Rights Reserved.
6649
+ *
6650
+ * Use of this source code is governed by an MIT-style license that can be
6651
+ * found in the LICENSE file at https://angular.io/license
6652
+ */
6653
+
5556
6654
  /**
5557
6655
  * @license
5558
6656
  * Copyright Google LLC All Rights Reserved.
@@ -5582,5 +6680,5 @@ class XhrFactory {
5582
6680
  * Generated bundle index. Do not edit.
5583
6681
  */
5584
6682
 
5585
- export { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, 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, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, 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, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6683
+ export { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, 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, BrowserPlatformLocation as ɵBrowserPlatformLocation, 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, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
5586
6684
  //# sourceMappingURL=common.mjs.map