\r\n \r\n\r\n \r\n \r\n \r\n\r\n 0\"\r\n (increment)=\"add()\"\r\n (decrement)=\"remove()\"\r\n [productName]=\"product.title\"\r\n [count]=\"(countInCart$ | async)!\"\r\n [available]=\"product.count\"\r\n >\r\n \r\n\r\n","\r\n \r\n \r\n\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ProductsService } from './products.service';\r\nimport { Observable } from 'rxjs';\r\nimport { Product } from './product.interface';\r\n\r\n@Component({\r\n selector: 'app-products',\r\n templateUrl: './products.component.html',\r\n styleUrls: ['./products.component.scss'],\r\n})\r\nexport class ProductsComponent implements OnInit {\r\n readonly products$: Observable<\r\n Product[]\r\n > = this.productsService.getProducts();\r\n\r\n constructor(private readonly productsService: ProductsService) {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ProductsComponent } from './products.component';\r\nimport { ProductItemComponent } from './product-item/product-item.component';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { CartCountControlsModule } from '../core/cart-count-controls/cart-count-controls.module';\r\n\r\n@NgModule({\r\n declarations: [ProductsComponent, ProductItemComponent],\r\n imports: [\r\n CommonModule,\r\n MatCardModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n CartCountControlsModule,\r\n ],\r\n exports: [ProductsComponent],\r\n})\r\nexport class ProductsModule {}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { EMPTY, Observable, of, throwError } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\nimport { Product } from './product.interface';\r\n\r\nimport { ApiService } from '../core/api.service';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ProductsService extends ApiService {\r\n createNewProduct(product: Product): Observable {\r\n if (!this.endpointEnabled('bff')) {\r\n console.warn(\r\n 'Endpoint \"bff\" is disabled. To enable change your environment.ts config'\r\n );\r\n return EMPTY;\r\n }\r\n\r\n const url = this.getUrl('bff', 'products');\r\n return this.http.post(url, product);\r\n }\r\n\r\n editProduct(id: string, changedProduct: Product): Observable {\r\n if (!this.endpointEnabled('bff')) {\r\n console.warn(\r\n 'Endpoint \"bff\" is disabled. To enable change your environment.ts config'\r\n );\r\n return EMPTY;\r\n }\r\n\r\n const url = this.getUrl('bff', `products/${id}`);\r\n return this.http.put(url, changedProduct);\r\n }\r\n\r\n getProductById(id: string): Observable {\r\n if (!this.endpointEnabled('bff')) {\r\n console.warn(\r\n 'Endpoint \"bff\" is disabled. To enable change your environment.ts config'\r\n );\r\n return this.http\r\n .get('/assets/products.json')\r\n .pipe(\r\n map(\r\n (products) => products.find((product) => product.id === id) || null\r\n )\r\n );\r\n }\r\n\r\n const url = this.getUrl('bff', `products/${id}`);\r\n return this.http\r\n .get<{ product: Product }>(url)\r\n .pipe(map((resp) => resp.product));\r\n }\r\n\r\n getProducts(): Observable {\r\n if (!this.endpointEnabled('bff')) {\r\n console.warn(\r\n 'Endpoint \"bff\" is disabled. To enable change your environment.ts config'\r\n );\r\n return this.http.get('/assets/products.json');\r\n }\r\n\r\n const url = this.getUrl('bff', 'products');\r\n return this.http.get(url);\r\n }\r\n\r\n getProductsForCheckout(ids: string[]): Observable {\r\n if (!ids.length) {\r\n return of([]);\r\n }\r\n\r\n return this.getProducts().pipe(\r\n map((products) => products.filter((product) => ids.includes(product.id)))\r\n );\r\n }\r\n}\r\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nimport { Config } from './config.interface';\r\n\r\nexport const environment: Config = {\r\n production: false,\r\n apiEndpoints: {\r\n product: 'https://.execute-api.eu-west-1.amazonaws.com/dev',\r\n order: 'https://.execute-api.eu-west-1.amazonaws.com/dev',\r\n import: 'https://.execute-api.eu-west-1.amazonaws.com/dev',\r\n bff: 'https://.execute-api.eu-west-1.amazonaws.com/dev',\r\n cart: 'https://.execute-api.eu-west-1.amazonaws.com/dev',\r\n },\r\n apiEndpointsEnabled: {\r\n product: false,\r\n order: false,\r\n import: false,\r\n bff: false,\r\n cart: false,\r\n },\r\n};\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from './environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .catch((err) => console.error(err));\r\n"],"names":["RouterModule","ProductsComponent","routes","path","component","loadChildren","then","m","CartModule","AdminModule","AppRoutingModule","forRoot","imports","exports","AppComponent","selectors","decls","vars","consts","template","i0","BrowserModule","BrowserAnimationsModule","HeaderComponent","MatToolbarModule","MatButtonModule","MatIconModule","MatMenuModule","MatTooltipModule","ProductsModule","HTTP_INTERCEPTORS","HttpClientModule","MatBadgeModule","CONFIG_TOKEN","environment","ErrorPrintInterceptor","MatSnackBarModule","interceptors","provide","useClass","multi","AppModule","bootstrap","useValue","declarations","CartComponent","CartRoutingModule","forChild","EventEmitter","CartShippingFormComponent","constructor","inputs","shippingInfo","outputs","nextStep","ctx","Validators","STEPPER_GLOBAL_OPTIONS","map","shareReplay","fb","checkoutService","cartService","fullName","firstName","lastName","value","address","comment","ngOnInit","group","required","products$","getProductsForCheckout","pipe","refCount","bufferSize","totalPrice$","products","total","reduce","acc","val","totalPrice","toFixed","totalInCart$","cartEmpty$","count","add","id","addItem","remove","removeItem","features","displayDefaultIndicatorType","CommonModule","MatCardModule","MatStepperModule","ReactiveFormsModule","MatFormFieldModule","MatInputModule","ProductItemCheckoutComponent","CartCountControlsModule","MatProgressSpinnerModule","OrderSummaryComponent","BehaviorSubject","CartService","_CartService_cartSource","__classPrivateFieldGet","asObservable","cart$","cart","values","Object","length","updateCount","empty","next","type","getValue","newVal","console","warn","factory","providedIn","switchMap","CheckoutService","productsService","keys","product","orderedCount","price","showControls","hideControls","Location","HttpClient","ApiService","injector","config","get","http","endpointEnabled","api","apiEndpointsEnabled","getUrl","joinWithSlash","apiEndpoints","ElementRef","CartCountControlsComponent","focusAddBtn","addBtn","nativeElement","focus","viewQuery","InjectionToken","tap","notificationService","intercept","request","handle","error","url","URL","showError","pathname","NotificationService","snackBar","text","duration","open","panelClass","ProductItemComponent","countInCart$","updateFocusIfNeeded","prev","observable","curr","setTimeout","countControls","cartBtn","getProducts","EMPTY","of","ProductsService","createNewProduct","post","editProduct","changedProduct","put","getProductById","find","resp","ids","filter","includes","production","order","import","bff","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","catch","err"],"sourceRoot":"webpack:///","x_google_ignoreList":[]}
\ No newline at end of file
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js
new file mode 100644
index 00000000..1a00dd85
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js
@@ -0,0 +1,3649 @@
+"use strict";
+(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([
+ ["polyfills"],
+ {
+ /***/ 7435:
+ /*!**************************!*\
+ !*** ./src/polyfills.ts ***!
+ \**************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! zone.js */ 4946);
+ /* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_0___default =
+ /*#__PURE__*/ __webpack_require__.n(
+ zone_js__WEBPACK_IMPORTED_MODULE_0__
+ );
+ /**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+ /***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+ /**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ * (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
+ /***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+ // Included with Angular CLI.
+ /***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
+
+ /***/
+ },
+
+ /***/ 4946:
+ /*!***********************************************!*\
+ !*** ./node_modules/zone.js/fesm2015/zone.js ***!
+ \***********************************************/
+ /***/ () => {
+ /**
+ * @license Angular v15.1.0-next.0
+ * (c) 2010-2022 Google LLC. https://angular.io/
+ * License: MIT
+ */
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ (function (global) {
+ const performance = global["performance"];
+ function mark(name) {
+ performance && performance["mark"] && performance["mark"](name);
+ }
+ function performanceMeasure(name, label) {
+ performance &&
+ performance["measure"] &&
+ performance["measure"](name, label);
+ }
+ mark("Zone");
+ // Initialize before it's accessed below.
+ // __Zone_symbol_prefix global can be used to override the default zone
+ // symbol prefix with a custom one if needed.
+ const symbolPrefix =
+ global["__Zone_symbol_prefix"] || "__zone_symbol__";
+ function __symbol__(name) {
+ return symbolPrefix + name;
+ }
+ const checkDuplicate =
+ global[__symbol__("forceDuplicateZoneCheck")] === true;
+ if (global["Zone"]) {
+ // if global['Zone'] already exists (maybe zone.js was already loaded or
+ // some other lib also registered a global object named Zone), we may need
+ // to throw an error, but sometimes user may not want this error.
+ // For example,
+ // we have two web pages, page1 includes zone.js, page2 doesn't.
+ // and the 1st time user load page1 and page2, everything work fine,
+ // but when user load page2 again, error occurs because global['Zone'] already exists.
+ // so we add a flag to let user choose whether to throw this error or not.
+ // By default, if existing Zone is from zone.js, we will not throw the error.
+ if (
+ checkDuplicate ||
+ typeof global["Zone"].__symbol__ !== "function"
+ ) {
+ throw new Error("Zone already loaded.");
+ } else {
+ return global["Zone"];
+ }
+ }
+ class Zone {
+ constructor(parent, zoneSpec) {
+ this._parent = parent;
+ this._name = zoneSpec ? zoneSpec.name || "unnamed" : "";
+ this._properties = (zoneSpec && zoneSpec.properties) || {};
+ this._zoneDelegate = new _ZoneDelegate(
+ this,
+ this._parent && this._parent._zoneDelegate,
+ zoneSpec
+ );
+ }
+ static assertZonePatched() {
+ if (global["Promise"] !== patches["ZoneAwarePromise"]) {
+ throw new Error(
+ "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` " +
+ "has been overwritten.\n" +
+ "Most likely cause is that a Promise polyfill has been loaded " +
+ "after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. " +
+ "If you must load one, do so before loading zone.js.)"
+ );
+ }
+ }
+ static get root() {
+ let zone = Zone.current;
+ while (zone.parent) {
+ zone = zone.parent;
+ }
+ return zone;
+ }
+ static get current() {
+ return _currentZoneFrame.zone;
+ }
+ static get currentTask() {
+ return _currentTask;
+ }
+ // tslint:disable-next-line:require-internal-with-underscore
+ static __load_patch(name, fn, ignoreDuplicate = false) {
+ if (patches.hasOwnProperty(name)) {
+ // `checkDuplicate` option is defined from global variable
+ // so it works for all modules.
+ // `ignoreDuplicate` can work for the specified module
+ if (!ignoreDuplicate && checkDuplicate) {
+ throw Error("Already loaded patch: " + name);
+ }
+ } else if (!global["__Zone_disable_" + name]) {
+ const perfName = "Zone:" + name;
+ mark(perfName);
+ patches[name] = fn(global, Zone, _api);
+ performanceMeasure(perfName, perfName);
+ }
+ }
+ get parent() {
+ return this._parent;
+ }
+ get name() {
+ return this._name;
+ }
+ get(key) {
+ const zone = this.getZoneWith(key);
+ if (zone) return zone._properties[key];
+ }
+ getZoneWith(key) {
+ let current = this;
+ while (current) {
+ if (current._properties.hasOwnProperty(key)) {
+ return current;
+ }
+ current = current._parent;
+ }
+ return null;
+ }
+ fork(zoneSpec) {
+ if (!zoneSpec) throw new Error("ZoneSpec required!");
+ return this._zoneDelegate.fork(this, zoneSpec);
+ }
+ wrap(callback, source) {
+ if (typeof callback !== "function") {
+ throw new Error("Expecting function got: " + callback);
+ }
+ const _callback = this._zoneDelegate.intercept(
+ this,
+ callback,
+ source
+ );
+ const zone = this;
+ return function () {
+ return zone.runGuarded(_callback, this, arguments, source);
+ };
+ }
+ run(callback, applyThis, applyArgs, source) {
+ _currentZoneFrame = {
+ parent: _currentZoneFrame,
+ zone: this,
+ };
+ try {
+ return this._zoneDelegate.invoke(
+ this,
+ callback,
+ applyThis,
+ applyArgs,
+ source
+ );
+ } finally {
+ _currentZoneFrame = _currentZoneFrame.parent;
+ }
+ }
+ runGuarded(callback, applyThis = null, applyArgs, source) {
+ _currentZoneFrame = {
+ parent: _currentZoneFrame,
+ zone: this,
+ };
+ try {
+ try {
+ return this._zoneDelegate.invoke(
+ this,
+ callback,
+ applyThis,
+ applyArgs,
+ source
+ );
+ } catch (error) {
+ if (this._zoneDelegate.handleError(this, error)) {
+ throw error;
+ }
+ }
+ } finally {
+ _currentZoneFrame = _currentZoneFrame.parent;
+ }
+ }
+ runTask(task, applyThis, applyArgs) {
+ if (task.zone != this) {
+ throw new Error(
+ "A task can only be run in the zone of creation! (Creation: " +
+ (task.zone || NO_ZONE).name +
+ "; Execution: " +
+ this.name +
+ ")"
+ );
+ }
+ // https://github.com/angular/zone.js/issues/778, sometimes eventTask
+ // will run in notScheduled(canceled) state, we should not try to
+ // run such kind of task but just return
+ if (
+ task.state === notScheduled &&
+ (task.type === eventTask || task.type === macroTask)
+ ) {
+ return;
+ }
+ const reEntryGuard = task.state != running;
+ reEntryGuard && task._transitionTo(running, scheduled);
+ task.runCount++;
+ const previousTask = _currentTask;
+ _currentTask = task;
+ _currentZoneFrame = {
+ parent: _currentZoneFrame,
+ zone: this,
+ };
+ try {
+ if (
+ task.type == macroTask &&
+ task.data &&
+ !task.data.isPeriodic
+ ) {
+ task.cancelFn = undefined;
+ }
+ try {
+ return this._zoneDelegate.invokeTask(
+ this,
+ task,
+ applyThis,
+ applyArgs
+ );
+ } catch (error) {
+ if (this._zoneDelegate.handleError(this, error)) {
+ throw error;
+ }
+ }
+ } finally {
+ // if the task's state is notScheduled or unknown, then it has already been cancelled
+ // we should not reset the state to scheduled
+ if (task.state !== notScheduled && task.state !== unknown) {
+ if (
+ task.type == eventTask ||
+ (task.data && task.data.isPeriodic)
+ ) {
+ reEntryGuard && task._transitionTo(scheduled, running);
+ } else {
+ task.runCount = 0;
+ this._updateTaskCount(task, -1);
+ reEntryGuard &&
+ task._transitionTo(notScheduled, running, notScheduled);
+ }
+ }
+ _currentZoneFrame = _currentZoneFrame.parent;
+ _currentTask = previousTask;
+ }
+ }
+ scheduleTask(task) {
+ if (task.zone && task.zone !== this) {
+ // check if the task was rescheduled, the newZone
+ // should not be the children of the original zone
+ let newZone = this;
+ while (newZone) {
+ if (newZone === task.zone) {
+ throw Error(
+ `can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`
+ );
+ }
+ newZone = newZone.parent;
+ }
+ }
+ task._transitionTo(scheduling, notScheduled);
+ const zoneDelegates = [];
+ task._zoneDelegates = zoneDelegates;
+ task._zone = this;
+ try {
+ task = this._zoneDelegate.scheduleTask(this, task);
+ } catch (err) {
+ // should set task's state to unknown when scheduleTask throw error
+ // because the err may from reschedule, so the fromState maybe notScheduled
+ task._transitionTo(unknown, scheduling, notScheduled);
+ // TODO: @JiaLiPassion, should we check the result from handleError?
+ this._zoneDelegate.handleError(this, err);
+ throw err;
+ }
+ if (task._zoneDelegates === zoneDelegates) {
+ // we have to check because internally the delegate can reschedule the task.
+ this._updateTaskCount(task, 1);
+ }
+ if (task.state == scheduling) {
+ task._transitionTo(scheduled, scheduling);
+ }
+ return task;
+ }
+ scheduleMicroTask(source, callback, data, customSchedule) {
+ return this.scheduleTask(
+ new ZoneTask(
+ microTask,
+ source,
+ callback,
+ data,
+ customSchedule,
+ undefined
+ )
+ );
+ }
+ scheduleMacroTask(
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ ) {
+ return this.scheduleTask(
+ new ZoneTask(
+ macroTask,
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ )
+ );
+ }
+ scheduleEventTask(
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ ) {
+ return this.scheduleTask(
+ new ZoneTask(
+ eventTask,
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ )
+ );
+ }
+ cancelTask(task) {
+ if (task.zone != this)
+ throw new Error(
+ "A task can only be cancelled in the zone of creation! (Creation: " +
+ (task.zone || NO_ZONE).name +
+ "; Execution: " +
+ this.name +
+ ")"
+ );
+ if (task.state !== scheduled && task.state !== running) {
+ return;
+ }
+ task._transitionTo(canceling, scheduled, running);
+ try {
+ this._zoneDelegate.cancelTask(this, task);
+ } catch (err) {
+ // if error occurs when cancelTask, transit the state to unknown
+ task._transitionTo(unknown, canceling);
+ this._zoneDelegate.handleError(this, err);
+ throw err;
+ }
+ this._updateTaskCount(task, -1);
+ task._transitionTo(notScheduled, canceling);
+ task.runCount = 0;
+ return task;
+ }
+ _updateTaskCount(task, count) {
+ const zoneDelegates = task._zoneDelegates;
+ if (count == -1) {
+ task._zoneDelegates = null;
+ }
+ for (let i = 0; i < zoneDelegates.length; i++) {
+ zoneDelegates[i]._updateTaskCount(task.type, count);
+ }
+ }
+ }
+ // tslint:disable-next-line:require-internal-with-underscore
+ Zone.__symbol__ = __symbol__;
+ const DELEGATE_ZS = {
+ name: "",
+ onHasTask: (delegate, _, target, hasTaskState) =>
+ delegate.hasTask(target, hasTaskState),
+ onScheduleTask: (delegate, _, target, task) =>
+ delegate.scheduleTask(target, task),
+ onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) =>
+ delegate.invokeTask(target, task, applyThis, applyArgs),
+ onCancelTask: (delegate, _, target, task) =>
+ delegate.cancelTask(target, task),
+ };
+ class _ZoneDelegate {
+ constructor(zone, parentDelegate, zoneSpec) {
+ this._taskCounts = {
+ microTask: 0,
+ macroTask: 0,
+ eventTask: 0,
+ };
+ this.zone = zone;
+ this._parentDelegate = parentDelegate;
+ this._forkZS =
+ zoneSpec &&
+ (zoneSpec && zoneSpec.onFork
+ ? zoneSpec
+ : parentDelegate._forkZS);
+ this._forkDlgt =
+ zoneSpec &&
+ (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
+ this._forkCurrZone =
+ zoneSpec &&
+ (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);
+ this._interceptZS =
+ zoneSpec &&
+ (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
+ this._interceptDlgt =
+ zoneSpec &&
+ (zoneSpec.onIntercept
+ ? parentDelegate
+ : parentDelegate._interceptDlgt);
+ this._interceptCurrZone =
+ zoneSpec &&
+ (zoneSpec.onIntercept
+ ? this.zone
+ : parentDelegate._interceptCurrZone);
+ this._invokeZS =
+ zoneSpec &&
+ (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
+ this._invokeDlgt =
+ zoneSpec &&
+ (zoneSpec.onInvoke
+ ? parentDelegate
+ : parentDelegate._invokeDlgt);
+ this._invokeCurrZone =
+ zoneSpec &&
+ (zoneSpec.onInvoke
+ ? this.zone
+ : parentDelegate._invokeCurrZone);
+ this._handleErrorZS =
+ zoneSpec &&
+ (zoneSpec.onHandleError
+ ? zoneSpec
+ : parentDelegate._handleErrorZS);
+ this._handleErrorDlgt =
+ zoneSpec &&
+ (zoneSpec.onHandleError
+ ? parentDelegate
+ : parentDelegate._handleErrorDlgt);
+ this._handleErrorCurrZone =
+ zoneSpec &&
+ (zoneSpec.onHandleError
+ ? this.zone
+ : parentDelegate._handleErrorCurrZone);
+ this._scheduleTaskZS =
+ zoneSpec &&
+ (zoneSpec.onScheduleTask
+ ? zoneSpec
+ : parentDelegate._scheduleTaskZS);
+ this._scheduleTaskDlgt =
+ zoneSpec &&
+ (zoneSpec.onScheduleTask
+ ? parentDelegate
+ : parentDelegate._scheduleTaskDlgt);
+ this._scheduleTaskCurrZone =
+ zoneSpec &&
+ (zoneSpec.onScheduleTask
+ ? this.zone
+ : parentDelegate._scheduleTaskCurrZone);
+ this._invokeTaskZS =
+ zoneSpec &&
+ (zoneSpec.onInvokeTask
+ ? zoneSpec
+ : parentDelegate._invokeTaskZS);
+ this._invokeTaskDlgt =
+ zoneSpec &&
+ (zoneSpec.onInvokeTask
+ ? parentDelegate
+ : parentDelegate._invokeTaskDlgt);
+ this._invokeTaskCurrZone =
+ zoneSpec &&
+ (zoneSpec.onInvokeTask
+ ? this.zone
+ : parentDelegate._invokeTaskCurrZone);
+ this._cancelTaskZS =
+ zoneSpec &&
+ (zoneSpec.onCancelTask
+ ? zoneSpec
+ : parentDelegate._cancelTaskZS);
+ this._cancelTaskDlgt =
+ zoneSpec &&
+ (zoneSpec.onCancelTask
+ ? parentDelegate
+ : parentDelegate._cancelTaskDlgt);
+ this._cancelTaskCurrZone =
+ zoneSpec &&
+ (zoneSpec.onCancelTask
+ ? this.zone
+ : parentDelegate._cancelTaskCurrZone);
+ this._hasTaskZS = null;
+ this._hasTaskDlgt = null;
+ this._hasTaskDlgtOwner = null;
+ this._hasTaskCurrZone = null;
+ const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;
+ const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;
+ if (zoneSpecHasTask || parentHasTask) {
+ // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such
+ // a case all task related interceptors must go through this ZD. We can't short circuit it.
+ this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;
+ this._hasTaskDlgt = parentDelegate;
+ this._hasTaskDlgtOwner = this;
+ this._hasTaskCurrZone = zone;
+ if (!zoneSpec.onScheduleTask) {
+ this._scheduleTaskZS = DELEGATE_ZS;
+ this._scheduleTaskDlgt = parentDelegate;
+ this._scheduleTaskCurrZone = this.zone;
+ }
+ if (!zoneSpec.onInvokeTask) {
+ this._invokeTaskZS = DELEGATE_ZS;
+ this._invokeTaskDlgt = parentDelegate;
+ this._invokeTaskCurrZone = this.zone;
+ }
+ if (!zoneSpec.onCancelTask) {
+ this._cancelTaskZS = DELEGATE_ZS;
+ this._cancelTaskDlgt = parentDelegate;
+ this._cancelTaskCurrZone = this.zone;
+ }
+ }
+ }
+ fork(targetZone, zoneSpec) {
+ return this._forkZS
+ ? this._forkZS.onFork(
+ this._forkDlgt,
+ this.zone,
+ targetZone,
+ zoneSpec
+ )
+ : new Zone(targetZone, zoneSpec);
+ }
+ intercept(targetZone, callback, source) {
+ return this._interceptZS
+ ? this._interceptZS.onIntercept(
+ this._interceptDlgt,
+ this._interceptCurrZone,
+ targetZone,
+ callback,
+ source
+ )
+ : callback;
+ }
+ invoke(targetZone, callback, applyThis, applyArgs, source) {
+ return this._invokeZS
+ ? this._invokeZS.onInvoke(
+ this._invokeDlgt,
+ this._invokeCurrZone,
+ targetZone,
+ callback,
+ applyThis,
+ applyArgs,
+ source
+ )
+ : callback.apply(applyThis, applyArgs);
+ }
+ handleError(targetZone, error) {
+ return this._handleErrorZS
+ ? this._handleErrorZS.onHandleError(
+ this._handleErrorDlgt,
+ this._handleErrorCurrZone,
+ targetZone,
+ error
+ )
+ : true;
+ }
+ scheduleTask(targetZone, task) {
+ let returnTask = task;
+ if (this._scheduleTaskZS) {
+ if (this._hasTaskZS) {
+ returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);
+ }
+ // clang-format off
+ returnTask = this._scheduleTaskZS.onScheduleTask(
+ this._scheduleTaskDlgt,
+ this._scheduleTaskCurrZone,
+ targetZone,
+ task
+ );
+ // clang-format on
+ if (!returnTask) returnTask = task;
+ } else {
+ if (task.scheduleFn) {
+ task.scheduleFn(task);
+ } else if (task.type == microTask) {
+ scheduleMicroTask(task);
+ } else {
+ throw new Error("Task is missing scheduleFn.");
+ }
+ }
+ return returnTask;
+ }
+ invokeTask(targetZone, task, applyThis, applyArgs) {
+ return this._invokeTaskZS
+ ? this._invokeTaskZS.onInvokeTask(
+ this._invokeTaskDlgt,
+ this._invokeTaskCurrZone,
+ targetZone,
+ task,
+ applyThis,
+ applyArgs
+ )
+ : task.callback.apply(applyThis, applyArgs);
+ }
+ cancelTask(targetZone, task) {
+ let value;
+ if (this._cancelTaskZS) {
+ value = this._cancelTaskZS.onCancelTask(
+ this._cancelTaskDlgt,
+ this._cancelTaskCurrZone,
+ targetZone,
+ task
+ );
+ } else {
+ if (!task.cancelFn) {
+ throw Error("Task is not cancelable");
+ }
+ value = task.cancelFn(task);
+ }
+ return value;
+ }
+ hasTask(targetZone, isEmpty) {
+ // hasTask should not throw error so other ZoneDelegate
+ // can still trigger hasTask callback
+ try {
+ this._hasTaskZS &&
+ this._hasTaskZS.onHasTask(
+ this._hasTaskDlgt,
+ this._hasTaskCurrZone,
+ targetZone,
+ isEmpty
+ );
+ } catch (err) {
+ this.handleError(targetZone, err);
+ }
+ }
+ // tslint:disable-next-line:require-internal-with-underscore
+ _updateTaskCount(type, count) {
+ const counts = this._taskCounts;
+ const prev = counts[type];
+ const next = (counts[type] = prev + count);
+ if (next < 0) {
+ throw new Error("More tasks executed then were scheduled.");
+ }
+ if (prev == 0 || next == 0) {
+ const isEmpty = {
+ microTask: counts["microTask"] > 0,
+ macroTask: counts["macroTask"] > 0,
+ eventTask: counts["eventTask"] > 0,
+ change: type,
+ };
+ this.hasTask(this.zone, isEmpty);
+ }
+ }
+ }
+ class ZoneTask {
+ constructor(type, source, callback, options, scheduleFn, cancelFn) {
+ // tslint:disable-next-line:require-internal-with-underscore
+ this._zone = null;
+ this.runCount = 0;
+ // tslint:disable-next-line:require-internal-with-underscore
+ this._zoneDelegates = null;
+ // tslint:disable-next-line:require-internal-with-underscore
+ this._state = "notScheduled";
+ this.type = type;
+ this.source = source;
+ this.data = options;
+ this.scheduleFn = scheduleFn;
+ this.cancelFn = cancelFn;
+ if (!callback) {
+ throw new Error("callback is not defined");
+ }
+ this.callback = callback;
+ const self = this;
+ // TODO: @JiaLiPassion options should have interface
+ if (type === eventTask && options && options.useG) {
+ this.invoke = ZoneTask.invokeTask;
+ } else {
+ this.invoke = function () {
+ return ZoneTask.invokeTask.call(
+ global,
+ self,
+ this,
+ arguments
+ );
+ };
+ }
+ }
+ static invokeTask(task, target, args) {
+ if (!task) {
+ task = this;
+ }
+ _numberOfNestedTaskFrames++;
+ try {
+ task.runCount++;
+ return task.zone.runTask(task, target, args);
+ } finally {
+ if (_numberOfNestedTaskFrames == 1) {
+ drainMicroTaskQueue();
+ }
+ _numberOfNestedTaskFrames--;
+ }
+ }
+ get zone() {
+ return this._zone;
+ }
+ get state() {
+ return this._state;
+ }
+ cancelScheduleRequest() {
+ this._transitionTo(notScheduled, scheduling);
+ }
+ // tslint:disable-next-line:require-internal-with-underscore
+ _transitionTo(toState, fromState1, fromState2) {
+ if (this._state === fromState1 || this._state === fromState2) {
+ this._state = toState;
+ if (toState == notScheduled) {
+ this._zoneDelegates = null;
+ }
+ } else {
+ throw new Error(
+ `${this.type} '${
+ this.source
+ }': can not transition to '${toState}', expecting state '${fromState1}'${
+ fromState2 ? " or '" + fromState2 + "'" : ""
+ }, was '${this._state}'.`
+ );
+ }
+ }
+ toString() {
+ if (this.data && typeof this.data.handleId !== "undefined") {
+ return this.data.handleId.toString();
+ } else {
+ return Object.prototype.toString.call(this);
+ }
+ }
+ // add toJSON method to prevent cyclic error when
+ // call JSON.stringify(zoneTask)
+ toJSON() {
+ return {
+ type: this.type,
+ state: this.state,
+ source: this.source,
+ zone: this.zone.name,
+ runCount: this.runCount,
+ };
+ }
+ }
+ //////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////
+ /// MICROTASK QUEUE
+ //////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////
+ const symbolSetTimeout = __symbol__("setTimeout");
+ const symbolPromise = __symbol__("Promise");
+ const symbolThen = __symbol__("then");
+ let _microTaskQueue = [];
+ let _isDrainingMicrotaskQueue = false;
+ let nativeMicroTaskQueuePromise;
+ function nativeScheduleMicroTask(func) {
+ if (!nativeMicroTaskQueuePromise) {
+ if (global[symbolPromise]) {
+ nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);
+ }
+ }
+ if (nativeMicroTaskQueuePromise) {
+ let nativeThen = nativeMicroTaskQueuePromise[symbolThen];
+ if (!nativeThen) {
+ // native Promise is not patchable, we need to use `then` directly
+ // issue 1078
+ nativeThen = nativeMicroTaskQueuePromise["then"];
+ }
+ nativeThen.call(nativeMicroTaskQueuePromise, func);
+ } else {
+ global[symbolSetTimeout](func, 0);
+ }
+ }
+ function scheduleMicroTask(task) {
+ // if we are not running in any task, and there has not been anything scheduled
+ // we must bootstrap the initial task creation by manually scheduling the drain
+ if (
+ _numberOfNestedTaskFrames === 0 &&
+ _microTaskQueue.length === 0
+ ) {
+ // We are not running in Task, so we need to kickstart the microtask queue.
+ nativeScheduleMicroTask(drainMicroTaskQueue);
+ }
+ task && _microTaskQueue.push(task);
+ }
+ function drainMicroTaskQueue() {
+ if (!_isDrainingMicrotaskQueue) {
+ _isDrainingMicrotaskQueue = true;
+ while (_microTaskQueue.length) {
+ const queue = _microTaskQueue;
+ _microTaskQueue = [];
+ for (let i = 0; i < queue.length; i++) {
+ const task = queue[i];
+ try {
+ task.zone.runTask(task, null, null);
+ } catch (error) {
+ _api.onUnhandledError(error);
+ }
+ }
+ }
+ _api.microtaskDrainDone();
+ _isDrainingMicrotaskQueue = false;
+ }
+ }
+ //////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////
+ /// BOOTSTRAP
+ //////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////
+ const NO_ZONE = {
+ name: "NO ZONE",
+ };
+ const notScheduled = "notScheduled",
+ scheduling = "scheduling",
+ scheduled = "scheduled",
+ running = "running",
+ canceling = "canceling",
+ unknown = "unknown";
+ const microTask = "microTask",
+ macroTask = "macroTask",
+ eventTask = "eventTask";
+ const patches = {};
+ const _api = {
+ symbol: __symbol__,
+ currentZoneFrame: () => _currentZoneFrame,
+ onUnhandledError: noop,
+ microtaskDrainDone: noop,
+ scheduleMicroTask: scheduleMicroTask,
+ showUncaughtError: () =>
+ !Zone[__symbol__("ignoreConsoleErrorUncaughtError")],
+ patchEventTarget: () => [],
+ patchOnProperties: noop,
+ patchMethod: () => noop,
+ bindArguments: () => [],
+ patchThen: () => noop,
+ patchMacroTask: () => noop,
+ patchEventPrototype: () => noop,
+ isIEOrEdge: () => false,
+ getGlobalObjects: () => undefined,
+ ObjectDefineProperty: () => noop,
+ ObjectGetOwnPropertyDescriptor: () => undefined,
+ ObjectCreate: () => undefined,
+ ArraySlice: () => [],
+ patchClass: () => noop,
+ wrapWithCurrentZone: () => noop,
+ filterProperties: () => [],
+ attachOriginToPatched: () => noop,
+ _redefineProperty: () => noop,
+ patchCallbacks: () => noop,
+ nativeScheduleMicroTask: nativeScheduleMicroTask,
+ };
+ let _currentZoneFrame = {
+ parent: null,
+ zone: new Zone(null, null),
+ };
+ let _currentTask = null;
+ let _numberOfNestedTaskFrames = 0;
+ function noop() {}
+ performanceMeasure("Zone", "Zone");
+ return (global["Zone"] = Zone);
+ })(
+ (typeof window !== "undefined" && window) ||
+ (typeof self !== "undefined" && self) ||
+ global
+ );
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Suppress closure compiler errors about unknown 'Zone' variable
+ * @fileoverview
+ * @suppress {undefinedVars,globalThis,missingRequire}
+ */
+ ///
+ // issue #989, to reduce bundle size, use short name
+ /** Object.getOwnPropertyDescriptor */
+ const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ /** Object.defineProperty */
+ const ObjectDefineProperty = Object.defineProperty;
+ /** Object.getPrototypeOf */
+ const ObjectGetPrototypeOf = Object.getPrototypeOf;
+ /** Object.create */
+ const ObjectCreate = Object.create;
+ /** Array.prototype.slice */
+ const ArraySlice = Array.prototype.slice;
+ /** addEventListener string const */
+ const ADD_EVENT_LISTENER_STR = "addEventListener";
+ /** removeEventListener string const */
+ const REMOVE_EVENT_LISTENER_STR = "removeEventListener";
+ /** zoneSymbol addEventListener */
+ const ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(
+ ADD_EVENT_LISTENER_STR
+ );
+ /** zoneSymbol removeEventListener */
+ const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(
+ REMOVE_EVENT_LISTENER_STR
+ );
+ /** true string const */
+ const TRUE_STR = "true";
+ /** false string const */
+ const FALSE_STR = "false";
+ /** Zone symbol prefix string const. */
+ const ZONE_SYMBOL_PREFIX = Zone.__symbol__("");
+ function wrapWithCurrentZone(callback, source) {
+ return Zone.current.wrap(callback, source);
+ }
+ function scheduleMacroTaskWithCurrentZone(
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ ) {
+ return Zone.current.scheduleMacroTask(
+ source,
+ callback,
+ data,
+ customSchedule,
+ customCancel
+ );
+ }
+ const zoneSymbol = Zone.__symbol__;
+ const isWindowExists = typeof window !== "undefined";
+ const internalWindow = isWindowExists ? window : undefined;
+ const _global =
+ (isWindowExists && internalWindow) ||
+ (typeof self === "object" && self) ||
+ global;
+ const REMOVE_ATTRIBUTE = "removeAttribute";
+ function bindArguments(args, source) {
+ for (let i = args.length - 1; i >= 0; i--) {
+ if (typeof args[i] === "function") {
+ args[i] = wrapWithCurrentZone(args[i], source + "_" + i);
+ }
+ }
+ return args;
+ }
+ function patchPrototype(prototype, fnNames) {
+ const source = prototype.constructor["name"];
+ for (let i = 0; i < fnNames.length; i++) {
+ const name = fnNames[i];
+ const delegate = prototype[name];
+ if (delegate) {
+ const prototypeDesc = ObjectGetOwnPropertyDescriptor(
+ prototype,
+ name
+ );
+ if (!isPropertyWritable(prototypeDesc)) {
+ continue;
+ }
+ prototype[name] = ((delegate) => {
+ const patched = function () {
+ return delegate.apply(
+ this,
+ bindArguments(arguments, source + "." + name)
+ );
+ };
+ attachOriginToPatched(patched, delegate);
+ return patched;
+ })(delegate);
+ }
+ }
+ }
+ function isPropertyWritable(propertyDesc) {
+ if (!propertyDesc) {
+ return true;
+ }
+ if (propertyDesc.writable === false) {
+ return false;
+ }
+ return !(
+ typeof propertyDesc.get === "function" &&
+ typeof propertyDesc.set === "undefined"
+ );
+ }
+ const isWebWorker =
+ typeof WorkerGlobalScope !== "undefined" &&
+ self instanceof WorkerGlobalScope;
+ // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
+ // this code.
+ const isNode =
+ !("nw" in _global) &&
+ typeof _global.process !== "undefined" &&
+ {}.toString.call(_global.process) === "[object process]";
+ const isBrowser =
+ !isNode &&
+ !isWebWorker &&
+ !!(isWindowExists && internalWindow["HTMLElement"]);
+ // we are in electron of nw, so we are both browser and nodejs
+ // Make sure to access `process` through `_global` so that WebPack does not accidentally browserify
+ // this code.
+ const isMix =
+ typeof _global.process !== "undefined" &&
+ {}.toString.call(_global.process) === "[object process]" &&
+ !isWebWorker &&
+ !!(isWindowExists && internalWindow["HTMLElement"]);
+ const zoneSymbolEventNames$1 = {};
+ const wrapFn = function (event) {
+ // https://github.com/angular/zone.js/issues/911, in IE, sometimes
+ // event will be undefined, so we need to use window.event
+ event = event || _global.event;
+ if (!event) {
+ return;
+ }
+ let eventNameSymbol = zoneSymbolEventNames$1[event.type];
+ if (!eventNameSymbol) {
+ eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol(
+ "ON_PROPERTY" + event.type
+ );
+ }
+ const target = this || event.target || _global;
+ const listener = target[eventNameSymbol];
+ let result;
+ if (
+ isBrowser &&
+ target === internalWindow &&
+ event.type === "error"
+ ) {
+ // window.onerror have different signature
+ // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror
+ // and onerror callback will prevent default when callback return true
+ const errorEvent = event;
+ result =
+ listener &&
+ listener.call(
+ this,
+ errorEvent.message,
+ errorEvent.filename,
+ errorEvent.lineno,
+ errorEvent.colno,
+ errorEvent.error
+ );
+ if (result === true) {
+ event.preventDefault();
+ }
+ } else {
+ result = listener && listener.apply(this, arguments);
+ if (result != undefined && !result) {
+ event.preventDefault();
+ }
+ }
+ return result;
+ };
+ function patchProperty(obj, prop, prototype) {
+ let desc = ObjectGetOwnPropertyDescriptor(obj, prop);
+ if (!desc && prototype) {
+ // when patch window object, use prototype to check prop exist or not
+ const prototypeDesc = ObjectGetOwnPropertyDescriptor(
+ prototype,
+ prop
+ );
+ if (prototypeDesc) {
+ desc = {
+ enumerable: true,
+ configurable: true,
+ };
+ }
+ }
+ // if the descriptor not exists or is not configurable
+ // just return
+ if (!desc || !desc.configurable) {
+ return;
+ }
+ const onPropPatchedSymbol = zoneSymbol("on" + prop + "patched");
+ if (
+ obj.hasOwnProperty(onPropPatchedSymbol) &&
+ obj[onPropPatchedSymbol]
+ ) {
+ return;
+ }
+ // A property descriptor cannot have getter/setter and be writable
+ // deleting the writable and value properties avoids this error:
+ //
+ // TypeError: property descriptors must not specify a value or be writable when a
+ // getter or setter has been specified
+ delete desc.writable;
+ delete desc.value;
+ const originalDescGet = desc.get;
+ const originalDescSet = desc.set;
+ // slice(2) cuz 'onclick' -> 'click', etc
+ const eventName = prop.slice(2);
+ let eventNameSymbol = zoneSymbolEventNames$1[eventName];
+ if (!eventNameSymbol) {
+ eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol(
+ "ON_PROPERTY" + eventName
+ );
+ }
+ desc.set = function (newValue) {
+ // in some of windows's onproperty callback, this is undefined
+ // so we need to check it
+ let target = this;
+ if (!target && obj === _global) {
+ target = _global;
+ }
+ if (!target) {
+ return;
+ }
+ const previousValue = target[eventNameSymbol];
+ if (typeof previousValue === "function") {
+ target.removeEventListener(eventName, wrapFn);
+ }
+ // issue #978, when onload handler was added before loading zone.js
+ // we should remove it with originalDescSet
+ originalDescSet && originalDescSet.call(target, null);
+ target[eventNameSymbol] = newValue;
+ if (typeof newValue === "function") {
+ target.addEventListener(eventName, wrapFn, false);
+ }
+ };
+ // The getter would return undefined for unassigned properties but the default value of an
+ // unassigned property is null
+ desc.get = function () {
+ // in some of windows's onproperty callback, this is undefined
+ // so we need to check it
+ let target = this;
+ if (!target && obj === _global) {
+ target = _global;
+ }
+ if (!target) {
+ return null;
+ }
+ const listener = target[eventNameSymbol];
+ if (listener) {
+ return listener;
+ } else if (originalDescGet) {
+ // result will be null when use inline event attribute,
+ // such as
+ // because the onclick function is internal raw uncompiled handler
+ // the onclick will be evaluated when first time event was triggered or
+ // the property is accessed, https://github.com/angular/zone.js/issues/525
+ // so we should use original native get to retrieve the handler
+ let value = originalDescGet.call(this);
+ if (value) {
+ desc.set.call(this, value);
+ if (typeof target[REMOVE_ATTRIBUTE] === "function") {
+ target.removeAttribute(prop);
+ }
+ return value;
+ }
+ }
+ return null;
+ };
+ ObjectDefineProperty(obj, prop, desc);
+ obj[onPropPatchedSymbol] = true;
+ }
+ function patchOnProperties(obj, properties, prototype) {
+ if (properties) {
+ for (let i = 0; i < properties.length; i++) {
+ patchProperty(obj, "on" + properties[i], prototype);
+ }
+ } else {
+ const onProperties = [];
+ for (const prop in obj) {
+ if (prop.slice(0, 2) == "on") {
+ onProperties.push(prop);
+ }
+ }
+ for (let j = 0; j < onProperties.length; j++) {
+ patchProperty(obj, onProperties[j], prototype);
+ }
+ }
+ }
+ const originalInstanceKey = zoneSymbol("originalInstance");
+ // wrap some native API on `window`
+ function patchClass(className) {
+ const OriginalClass = _global[className];
+ if (!OriginalClass) return;
+ // keep original class in global
+ _global[zoneSymbol(className)] = OriginalClass;
+ _global[className] = function () {
+ const a = bindArguments(arguments, className);
+ switch (a.length) {
+ case 0:
+ this[originalInstanceKey] = new OriginalClass();
+ break;
+ case 1:
+ this[originalInstanceKey] = new OriginalClass(a[0]);
+ break;
+ case 2:
+ this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
+ break;
+ case 3:
+ this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
+ break;
+ case 4:
+ this[originalInstanceKey] = new OriginalClass(
+ a[0],
+ a[1],
+ a[2],
+ a[3]
+ );
+ break;
+ default:
+ throw new Error("Arg list too long.");
+ }
+ };
+ // attach original delegate to patched function
+ attachOriginToPatched(_global[className], OriginalClass);
+ const instance = new OriginalClass(function () {});
+ let prop;
+ for (prop in instance) {
+ // https://bugs.webkit.org/show_bug.cgi?id=44721
+ if (className === "XMLHttpRequest" && prop === "responseBlob")
+ continue;
+ (function (prop) {
+ if (typeof instance[prop] === "function") {
+ _global[className].prototype[prop] = function () {
+ return this[originalInstanceKey][prop].apply(
+ this[originalInstanceKey],
+ arguments
+ );
+ };
+ } else {
+ ObjectDefineProperty(_global[className].prototype, prop, {
+ set: function (fn) {
+ if (typeof fn === "function") {
+ this[originalInstanceKey][prop] = wrapWithCurrentZone(
+ fn,
+ className + "." + prop
+ );
+ // keep callback in wrapped function so we can
+ // use it in Function.prototype.toString to return
+ // the native one.
+ attachOriginToPatched(
+ this[originalInstanceKey][prop],
+ fn
+ );
+ } else {
+ this[originalInstanceKey][prop] = fn;
+ }
+ },
+ get: function () {
+ return this[originalInstanceKey][prop];
+ },
+ });
+ }
+ })(prop);
+ }
+ for (prop in OriginalClass) {
+ if (prop !== "prototype" && OriginalClass.hasOwnProperty(prop)) {
+ _global[className][prop] = OriginalClass[prop];
+ }
+ }
+ }
+ function patchMethod(target, name, patchFn) {
+ let proto = target;
+ while (proto && !proto.hasOwnProperty(name)) {
+ proto = ObjectGetPrototypeOf(proto);
+ }
+ if (!proto && target[name]) {
+ // somehow we did not find it, but we can see it. This happens on IE for Window properties.
+ proto = target;
+ }
+ const delegateName = zoneSymbol(name);
+ let delegate = null;
+ if (
+ proto &&
+ (!(delegate = proto[delegateName]) ||
+ !proto.hasOwnProperty(delegateName))
+ ) {
+ delegate = proto[delegateName] = proto[name];
+ // check whether proto[name] is writable
+ // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob
+ const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);
+ if (isPropertyWritable(desc)) {
+ const patchDelegate = patchFn(delegate, delegateName, name);
+ proto[name] = function () {
+ return patchDelegate(this, arguments);
+ };
+ attachOriginToPatched(proto[name], delegate);
+ }
+ }
+ return delegate;
+ }
+ // TODO: @JiaLiPassion, support cancel task later if necessary
+ function patchMacroTask(obj, funcName, metaCreator) {
+ let setNative = null;
+ function scheduleTask(task) {
+ const data = task.data;
+ data.args[data.cbIdx] = function () {
+ task.invoke.apply(this, arguments);
+ };
+ setNative.apply(data.target, data.args);
+ return task;
+ }
+ setNative = patchMethod(
+ obj,
+ funcName,
+ (delegate) =>
+ function (self, args) {
+ const meta = metaCreator(self, args);
+ if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === "function") {
+ return scheduleMacroTaskWithCurrentZone(
+ meta.name,
+ args[meta.cbIdx],
+ meta,
+ scheduleTask
+ );
+ } else {
+ // cause an error by calling it directly.
+ return delegate.apply(self, args);
+ }
+ }
+ );
+ }
+ function attachOriginToPatched(patched, original) {
+ patched[zoneSymbol("OriginalDelegate")] = original;
+ }
+ let isDetectedIEOrEdge = false;
+ let ieOrEdge = false;
+ function isIE() {
+ try {
+ const ua = internalWindow.navigator.userAgent;
+ if (ua.indexOf("MSIE ") !== -1 || ua.indexOf("Trident/") !== -1) {
+ return true;
+ }
+ } catch (error) {}
+ return false;
+ }
+ function isIEOrEdge() {
+ if (isDetectedIEOrEdge) {
+ return ieOrEdge;
+ }
+ isDetectedIEOrEdge = true;
+ try {
+ const ua = internalWindow.navigator.userAgent;
+ if (
+ ua.indexOf("MSIE ") !== -1 ||
+ ua.indexOf("Trident/") !== -1 ||
+ ua.indexOf("Edge/") !== -1
+ ) {
+ ieOrEdge = true;
+ }
+ } catch (error) {}
+ return ieOrEdge;
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ Zone.__load_patch("ZoneAwarePromise", (global, Zone, api) => {
+ const ObjectGetOwnPropertyDescriptor =
+ Object.getOwnPropertyDescriptor;
+ const ObjectDefineProperty = Object.defineProperty;
+ function readableObjectToString(obj) {
+ if (obj && obj.toString === Object.prototype.toString) {
+ const className = obj.constructor && obj.constructor.name;
+ return (className ? className : "") + ": " + JSON.stringify(obj);
+ }
+ return obj ? obj.toString() : Object.prototype.toString.call(obj);
+ }
+ const __symbol__ = api.symbol;
+ const _uncaughtPromiseErrors = [];
+ const isDisableWrappingUncaughtPromiseRejection =
+ global[
+ __symbol__("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")
+ ] === true;
+ const symbolPromise = __symbol__("Promise");
+ const symbolThen = __symbol__("then");
+ const creationTrace = "__creationTrace__";
+ api.onUnhandledError = (e) => {
+ if (api.showUncaughtError()) {
+ const rejection = e && e.rejection;
+ if (rejection) {
+ console.error(
+ "Unhandled Promise rejection:",
+ rejection instanceof Error ? rejection.message : rejection,
+ "; Zone:",
+ e.zone.name,
+ "; Task:",
+ e.task && e.task.source,
+ "; Value:",
+ rejection,
+ rejection instanceof Error ? rejection.stack : undefined
+ );
+ } else {
+ console.error(e);
+ }
+ }
+ };
+ api.microtaskDrainDone = () => {
+ while (_uncaughtPromiseErrors.length) {
+ const uncaughtPromiseError = _uncaughtPromiseErrors.shift();
+ try {
+ uncaughtPromiseError.zone.runGuarded(() => {
+ if (uncaughtPromiseError.throwOriginal) {
+ throw uncaughtPromiseError.rejection;
+ }
+ throw uncaughtPromiseError;
+ });
+ } catch (error) {
+ handleUnhandledRejection(error);
+ }
+ }
+ };
+ const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__(
+ "unhandledPromiseRejectionHandler"
+ );
+ function handleUnhandledRejection(e) {
+ api.onUnhandledError(e);
+ try {
+ const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];
+ if (typeof handler === "function") {
+ handler.call(this, e);
+ }
+ } catch (err) {}
+ }
+ function isThenable(value) {
+ return value && value.then;
+ }
+ function forwardResolution(value) {
+ return value;
+ }
+ function forwardRejection(rejection) {
+ return ZoneAwarePromise.reject(rejection);
+ }
+ const symbolState = __symbol__("state");
+ const symbolValue = __symbol__("value");
+ const symbolFinally = __symbol__("finally");
+ const symbolParentPromiseValue = __symbol__("parentPromiseValue");
+ const symbolParentPromiseState = __symbol__("parentPromiseState");
+ const source = "Promise.then";
+ const UNRESOLVED = null;
+ const RESOLVED = true;
+ const REJECTED = false;
+ const REJECTED_NO_CATCH = 0;
+ function makeResolver(promise, state) {
+ return (v) => {
+ try {
+ resolvePromise(promise, state, v);
+ } catch (err) {
+ resolvePromise(promise, false, err);
+ }
+ // Do not return value or you will break the Promise spec.
+ };
+ }
+
+ const once = function () {
+ let wasCalled = false;
+ return function wrapper(wrappedFunction) {
+ return function () {
+ if (wasCalled) {
+ return;
+ }
+ wasCalled = true;
+ wrappedFunction.apply(null, arguments);
+ };
+ };
+ };
+ const TYPE_ERROR = "Promise resolved with itself";
+ const CURRENT_TASK_TRACE_SYMBOL = __symbol__("currentTaskTrace");
+ // Promise Resolution
+ function resolvePromise(promise, state, value) {
+ const onceWrapper = once();
+ if (promise === value) {
+ throw new TypeError(TYPE_ERROR);
+ }
+ if (promise[symbolState] === UNRESOLVED) {
+ // should only get value.then once based on promise spec.
+ let then = null;
+ try {
+ if (typeof value === "object" || typeof value === "function") {
+ then = value && value.then;
+ }
+ } catch (err) {
+ onceWrapper(() => {
+ resolvePromise(promise, false, err);
+ })();
+ return promise;
+ }
+ // if (value instanceof ZoneAwarePromise) {
+ if (
+ state !== REJECTED &&
+ value instanceof ZoneAwarePromise &&
+ value.hasOwnProperty(symbolState) &&
+ value.hasOwnProperty(symbolValue) &&
+ value[symbolState] !== UNRESOLVED
+ ) {
+ clearRejectedNoCatch(value);
+ resolvePromise(promise, value[symbolState], value[symbolValue]);
+ } else if (state !== REJECTED && typeof then === "function") {
+ try {
+ then.call(
+ value,
+ onceWrapper(makeResolver(promise, state)),
+ onceWrapper(makeResolver(promise, false))
+ );
+ } catch (err) {
+ onceWrapper(() => {
+ resolvePromise(promise, false, err);
+ })();
+ }
+ } else {
+ promise[symbolState] = state;
+ const queue = promise[symbolValue];
+ promise[symbolValue] = value;
+ if (promise[symbolFinally] === symbolFinally) {
+ // the promise is generated by Promise.prototype.finally
+ if (state === RESOLVED) {
+ // the state is resolved, should ignore the value
+ // and use parent promise value
+ promise[symbolState] = promise[symbolParentPromiseState];
+ promise[symbolValue] = promise[symbolParentPromiseValue];
+ }
+ }
+ // record task information in value when error occurs, so we can
+ // do some additional work such as render longStackTrace
+ if (state === REJECTED && value instanceof Error) {
+ // check if longStackTraceZone is here
+ const trace =
+ Zone.currentTask &&
+ Zone.currentTask.data &&
+ Zone.currentTask.data[creationTrace];
+ if (trace) {
+ // only keep the long stack trace into error when in longStackTraceZone
+ ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, {
+ configurable: true,
+ enumerable: false,
+ writable: true,
+ value: trace,
+ });
+ }
+ }
+ for (let i = 0; i < queue.length; ) {
+ scheduleResolveOrReject(
+ promise,
+ queue[i++],
+ queue[i++],
+ queue[i++],
+ queue[i++]
+ );
+ }
+ if (queue.length == 0 && state == REJECTED) {
+ promise[symbolState] = REJECTED_NO_CATCH;
+ let uncaughtPromiseError = value;
+ try {
+ // Here we throws a new Error to print more readable error log
+ // and if the value is not an error, zone.js builds an `Error`
+ // Object here to attach the stack information.
+ throw new Error(
+ "Uncaught (in promise): " +
+ readableObjectToString(value) +
+ (value && value.stack ? "\n" + value.stack : "")
+ );
+ } catch (err) {
+ uncaughtPromiseError = err;
+ }
+ if (isDisableWrappingUncaughtPromiseRejection) {
+ // If disable wrapping uncaught promise reject
+ // use the value instead of wrapping it.
+ uncaughtPromiseError.throwOriginal = true;
+ }
+ uncaughtPromiseError.rejection = value;
+ uncaughtPromiseError.promise = promise;
+ uncaughtPromiseError.zone = Zone.current;
+ uncaughtPromiseError.task = Zone.currentTask;
+ _uncaughtPromiseErrors.push(uncaughtPromiseError);
+ api.scheduleMicroTask(); // to make sure that it is running
+ }
+ }
+ }
+ // Resolving an already resolved promise is a noop.
+ return promise;
+ }
+ const REJECTION_HANDLED_HANDLER = __symbol__(
+ "rejectionHandledHandler"
+ );
+ function clearRejectedNoCatch(promise) {
+ if (promise[symbolState] === REJECTED_NO_CATCH) {
+ // if the promise is rejected no catch status
+ // and queue.length > 0, means there is a error handler
+ // here to handle the rejected promise, we should trigger
+ // windows.rejectionhandled eventHandler or nodejs rejectionHandled
+ // eventHandler
+ try {
+ const handler = Zone[REJECTION_HANDLED_HANDLER];
+ if (handler && typeof handler === "function") {
+ handler.call(this, {
+ rejection: promise[symbolValue],
+ promise: promise,
+ });
+ }
+ } catch (err) {}
+ promise[symbolState] = REJECTED;
+ for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {
+ if (promise === _uncaughtPromiseErrors[i].promise) {
+ _uncaughtPromiseErrors.splice(i, 1);
+ }
+ }
+ }
+ }
+ function scheduleResolveOrReject(
+ promise,
+ zone,
+ chainPromise,
+ onFulfilled,
+ onRejected
+ ) {
+ clearRejectedNoCatch(promise);
+ const promiseState = promise[symbolState];
+ const delegate = promiseState
+ ? typeof onFulfilled === "function"
+ ? onFulfilled
+ : forwardResolution
+ : typeof onRejected === "function"
+ ? onRejected
+ : forwardRejection;
+ zone.scheduleMicroTask(
+ source,
+ () => {
+ try {
+ const parentPromiseValue = promise[symbolValue];
+ const isFinallyPromise =
+ !!chainPromise &&
+ symbolFinally === chainPromise[symbolFinally];
+ if (isFinallyPromise) {
+ // if the promise is generated from finally call, keep parent promise's state and value
+ chainPromise[symbolParentPromiseValue] = parentPromiseValue;
+ chainPromise[symbolParentPromiseState] = promiseState;
+ }
+ // should not pass value to finally callback
+ const value = zone.run(
+ delegate,
+ undefined,
+ isFinallyPromise &&
+ delegate !== forwardRejection &&
+ delegate !== forwardResolution
+ ? []
+ : [parentPromiseValue]
+ );
+ resolvePromise(chainPromise, true, value);
+ } catch (error) {
+ // if error occurs, should always return this error
+ resolvePromise(chainPromise, false, error);
+ }
+ },
+ chainPromise
+ );
+ }
+ const ZONE_AWARE_PROMISE_TO_STRING =
+ "function ZoneAwarePromise() { [native code] }";
+ const noop = function () {};
+ const AggregateError = global.AggregateError;
+ class ZoneAwarePromise {
+ static toString() {
+ return ZONE_AWARE_PROMISE_TO_STRING;
+ }
+ static resolve(value) {
+ return resolvePromise(new this(null), RESOLVED, value);
+ }
+ static reject(error) {
+ return resolvePromise(new this(null), REJECTED, error);
+ }
+ static any(values) {
+ if (!values || typeof values[Symbol.iterator] !== "function") {
+ return Promise.reject(
+ new AggregateError([], "All promises were rejected")
+ );
+ }
+ const promises = [];
+ let count = 0;
+ try {
+ for (let v of values) {
+ count++;
+ promises.push(ZoneAwarePromise.resolve(v));
+ }
+ } catch (err) {
+ return Promise.reject(
+ new AggregateError([], "All promises were rejected")
+ );
+ }
+ if (count === 0) {
+ return Promise.reject(
+ new AggregateError([], "All promises were rejected")
+ );
+ }
+ let finished = false;
+ const errors = [];
+ return new ZoneAwarePromise((resolve, reject) => {
+ for (let i = 0; i < promises.length; i++) {
+ promises[i].then(
+ (v) => {
+ if (finished) {
+ return;
+ }
+ finished = true;
+ resolve(v);
+ },
+ (err) => {
+ errors.push(err);
+ count--;
+ if (count === 0) {
+ finished = true;
+ reject(
+ new AggregateError(
+ errors,
+ "All promises were rejected"
+ )
+ );
+ }
+ }
+ );
+ }
+ });
+ }
+ static race(values) {
+ let resolve;
+ let reject;
+ let promise = new this((res, rej) => {
+ resolve = res;
+ reject = rej;
+ });
+ function onResolve(value) {
+ resolve(value);
+ }
+ function onReject(error) {
+ reject(error);
+ }
+ for (let value of values) {
+ if (!isThenable(value)) {
+ value = this.resolve(value);
+ }
+ value.then(onResolve, onReject);
+ }
+ return promise;
+ }
+ static all(values) {
+ return ZoneAwarePromise.allWithCallback(values);
+ }
+ static allSettled(values) {
+ const P =
+ this && this.prototype instanceof ZoneAwarePromise
+ ? this
+ : ZoneAwarePromise;
+ return P.allWithCallback(values, {
+ thenCallback: (value) => ({
+ status: "fulfilled",
+ value,
+ }),
+ errorCallback: (err) => ({
+ status: "rejected",
+ reason: err,
+ }),
+ });
+ }
+ static allWithCallback(values, callback) {
+ let resolve;
+ let reject;
+ let promise = new this((res, rej) => {
+ resolve = res;
+ reject = rej;
+ });
+ // Start at 2 to prevent prematurely resolving if .then is called immediately.
+ let unresolvedCount = 2;
+ let valueIndex = 0;
+ const resolvedValues = [];
+ for (let value of values) {
+ if (!isThenable(value)) {
+ value = this.resolve(value);
+ }
+ const curValueIndex = valueIndex;
+ try {
+ value.then(
+ (value) => {
+ resolvedValues[curValueIndex] = callback
+ ? callback.thenCallback(value)
+ : value;
+ unresolvedCount--;
+ if (unresolvedCount === 0) {
+ resolve(resolvedValues);
+ }
+ },
+ (err) => {
+ if (!callback) {
+ reject(err);
+ } else {
+ resolvedValues[curValueIndex] =
+ callback.errorCallback(err);
+ unresolvedCount--;
+ if (unresolvedCount === 0) {
+ resolve(resolvedValues);
+ }
+ }
+ }
+ );
+ } catch (thenErr) {
+ reject(thenErr);
+ }
+ unresolvedCount++;
+ valueIndex++;
+ }
+ // Make the unresolvedCount zero-based again.
+ unresolvedCount -= 2;
+ if (unresolvedCount === 0) {
+ resolve(resolvedValues);
+ }
+ return promise;
+ }
+ constructor(executor) {
+ const promise = this;
+ if (!(promise instanceof ZoneAwarePromise)) {
+ throw new Error("Must be an instanceof Promise.");
+ }
+ promise[symbolState] = UNRESOLVED;
+ promise[symbolValue] = []; // queue;
+ try {
+ const onceWrapper = once();
+ executor &&
+ executor(
+ onceWrapper(makeResolver(promise, RESOLVED)),
+ onceWrapper(makeResolver(promise, REJECTED))
+ );
+ } catch (error) {
+ resolvePromise(promise, false, error);
+ }
+ }
+ get [Symbol.toStringTag]() {
+ return "Promise";
+ }
+ get [Symbol.species]() {
+ return ZoneAwarePromise;
+ }
+ then(onFulfilled, onRejected) {
+ var _a;
+ // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`
+ // may be an object without a prototype (created through `Object.create(null)`); thus
+ // `this.constructor` will be undefined. One of the use cases is SystemJS creating
+ // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty
+ // object and copies promise properties into that object (within the `getOrCreateLoad`
+ // function). The zone.js then checks if the resolved value has the `then` method and invokes
+ // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read
+ // properties of undefined (reading 'Symbol(Symbol.species)')`.
+ let C =
+ (_a = this.constructor) === null || _a === void 0
+ ? void 0
+ : _a[Symbol.species];
+ if (!C || typeof C !== "function") {
+ C = this.constructor || ZoneAwarePromise;
+ }
+ const chainPromise = new C(noop);
+ const zone = Zone.current;
+ if (this[symbolState] == UNRESOLVED) {
+ this[symbolValue].push(
+ zone,
+ chainPromise,
+ onFulfilled,
+ onRejected
+ );
+ } else {
+ scheduleResolveOrReject(
+ this,
+ zone,
+ chainPromise,
+ onFulfilled,
+ onRejected
+ );
+ }
+ return chainPromise;
+ }
+ catch(onRejected) {
+ return this.then(null, onRejected);
+ }
+ finally(onFinally) {
+ var _a;
+ // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.
+ let C =
+ (_a = this.constructor) === null || _a === void 0
+ ? void 0
+ : _a[Symbol.species];
+ if (!C || typeof C !== "function") {
+ C = ZoneAwarePromise;
+ }
+ const chainPromise = new C(noop);
+ chainPromise[symbolFinally] = symbolFinally;
+ const zone = Zone.current;
+ if (this[symbolState] == UNRESOLVED) {
+ this[symbolValue].push(
+ zone,
+ chainPromise,
+ onFinally,
+ onFinally
+ );
+ } else {
+ scheduleResolveOrReject(
+ this,
+ zone,
+ chainPromise,
+ onFinally,
+ onFinally
+ );
+ }
+ return chainPromise;
+ }
+ }
+ // Protect against aggressive optimizers dropping seemingly unused properties.
+ // E.g. Closure Compiler in advanced mode.
+ ZoneAwarePromise["resolve"] = ZoneAwarePromise.resolve;
+ ZoneAwarePromise["reject"] = ZoneAwarePromise.reject;
+ ZoneAwarePromise["race"] = ZoneAwarePromise.race;
+ ZoneAwarePromise["all"] = ZoneAwarePromise.all;
+ const NativePromise = (global[symbolPromise] = global["Promise"]);
+ global["Promise"] = ZoneAwarePromise;
+ const symbolThenPatched = __symbol__("thenPatched");
+ function patchThen(Ctor) {
+ const proto = Ctor.prototype;
+ const prop = ObjectGetOwnPropertyDescriptor(proto, "then");
+ if (prop && (prop.writable === false || !prop.configurable)) {
+ // check Ctor.prototype.then propertyDescriptor is writable or not
+ // in meteor env, writable is false, we should ignore such case
+ return;
+ }
+ const originalThen = proto.then;
+ // Keep a reference to the original method.
+ proto[symbolThen] = originalThen;
+ Ctor.prototype.then = function (onResolve, onReject) {
+ const wrapped = new ZoneAwarePromise((resolve, reject) => {
+ originalThen.call(this, resolve, reject);
+ });
+ return wrapped.then(onResolve, onReject);
+ };
+ Ctor[symbolThenPatched] = true;
+ }
+ api.patchThen = patchThen;
+ function zoneify(fn) {
+ return function (self, args) {
+ let resultPromise = fn.apply(self, args);
+ if (resultPromise instanceof ZoneAwarePromise) {
+ return resultPromise;
+ }
+ let ctor = resultPromise.constructor;
+ if (!ctor[symbolThenPatched]) {
+ patchThen(ctor);
+ }
+ return resultPromise;
+ };
+ }
+ if (NativePromise) {
+ patchThen(NativePromise);
+ patchMethod(global, "fetch", (delegate) => zoneify(delegate));
+ }
+ // This is not part of public API, but it is useful for tests, so we expose it.
+ Promise[Zone.__symbol__("uncaughtPromiseErrors")] =
+ _uncaughtPromiseErrors;
+ return ZoneAwarePromise;
+ });
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ // override Function.prototype.toString to make zone.js patched function
+ // look like native function
+ Zone.__load_patch("toString", (global) => {
+ // patch Func.prototype.toString to let them look like native
+ const originalFunctionToString = Function.prototype.toString;
+ const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol("OriginalDelegate");
+ const PROMISE_SYMBOL = zoneSymbol("Promise");
+ const ERROR_SYMBOL = zoneSymbol("Error");
+ const newFunctionToString = function toString() {
+ if (typeof this === "function") {
+ const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];
+ if (originalDelegate) {
+ if (typeof originalDelegate === "function") {
+ return originalFunctionToString.call(originalDelegate);
+ } else {
+ return Object.prototype.toString.call(originalDelegate);
+ }
+ }
+ if (this === Promise) {
+ const nativePromise = global[PROMISE_SYMBOL];
+ if (nativePromise) {
+ return originalFunctionToString.call(nativePromise);
+ }
+ }
+ if (this === Error) {
+ const nativeError = global[ERROR_SYMBOL];
+ if (nativeError) {
+ return originalFunctionToString.call(nativeError);
+ }
+ }
+ }
+ return originalFunctionToString.call(this);
+ };
+ newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] =
+ originalFunctionToString;
+ Function.prototype.toString = newFunctionToString;
+ // patch Object.prototype.toString to let them look like native
+ const originalObjectToString = Object.prototype.toString;
+ const PROMISE_OBJECT_TO_STRING = "[object Promise]";
+ Object.prototype.toString = function () {
+ if (typeof Promise === "function" && this instanceof Promise) {
+ return PROMISE_OBJECT_TO_STRING;
+ }
+ return originalObjectToString.call(this);
+ };
+ });
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ let passiveSupported = false;
+ if (typeof window !== "undefined") {
+ try {
+ const options = Object.defineProperty({}, "passive", {
+ get: function () {
+ passiveSupported = true;
+ },
+ });
+ // Note: We pass the `options` object as the event handler too. This is not compatible with the
+ // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler
+ // without an actual handler.
+ window.addEventListener("test", options, options);
+ window.removeEventListener("test", options, options);
+ } catch (err) {
+ passiveSupported = false;
+ }
+ }
+ // an identifier to tell ZoneTask do not create a new invoke closure
+ const OPTIMIZED_ZONE_EVENT_TASK_DATA = {
+ useG: true,
+ };
+ const zoneSymbolEventNames = {};
+ const globalSources = {};
+ const EVENT_NAME_SYMBOL_REGX = new RegExp(
+ "^" + ZONE_SYMBOL_PREFIX + "(\\w+)(true|false)$"
+ );
+ const IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol("propagationStopped");
+ function prepareEventNames(eventName, eventNameToString) {
+ const falseEventName =
+ (eventNameToString ? eventNameToString(eventName) : eventName) +
+ FALSE_STR;
+ const trueEventName =
+ (eventNameToString ? eventNameToString(eventName) : eventName) +
+ TRUE_STR;
+ const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
+ const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
+ zoneSymbolEventNames[eventName] = {};
+ zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
+ zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
+ }
+ function patchEventTarget(_global, api, apis, patchOptions) {
+ const ADD_EVENT_LISTENER =
+ (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;
+ const REMOVE_EVENT_LISTENER =
+ (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;
+ const LISTENERS_EVENT_LISTENER =
+ (patchOptions && patchOptions.listeners) || "eventListeners";
+ const REMOVE_ALL_LISTENERS_EVENT_LISTENER =
+ (patchOptions && patchOptions.rmAll) || "removeAllListeners";
+ const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);
+ const ADD_EVENT_LISTENER_SOURCE = "." + ADD_EVENT_LISTENER + ":";
+ const PREPEND_EVENT_LISTENER = "prependListener";
+ const PREPEND_EVENT_LISTENER_SOURCE =
+ "." + PREPEND_EVENT_LISTENER + ":";
+ const invokeTask = function (task, target, event) {
+ // for better performance, check isRemoved which is set
+ // by removeEventListener
+ if (task.isRemoved) {
+ return;
+ }
+ const delegate = task.callback;
+ if (typeof delegate === "object" && delegate.handleEvent) {
+ // create the bind version of handleEvent when invoke
+ task.callback = (event) => delegate.handleEvent(event);
+ task.originalDelegate = delegate;
+ }
+ // invoke static task.invoke
+ // need to try/catch error here, otherwise, the error in one event listener
+ // will break the executions of the other event listeners. Also error will
+ // not remove the event listener when `once` options is true.
+ let error;
+ try {
+ task.invoke(task, target, [event]);
+ } catch (err) {
+ error = err;
+ }
+ const options = task.options;
+ if (options && typeof options === "object" && options.once) {
+ // if options.once is true, after invoke once remove listener here
+ // only browser need to do this, nodejs eventEmitter will cal removeListener
+ // inside EventEmitter.once
+ const delegate = task.originalDelegate
+ ? task.originalDelegate
+ : task.callback;
+ target[REMOVE_EVENT_LISTENER].call(
+ target,
+ event.type,
+ delegate,
+ options
+ );
+ }
+ return error;
+ };
+ function globalCallback(context, event, isCapture) {
+ // https://github.com/angular/zone.js/issues/911, in IE, sometimes
+ // event will be undefined, so we need to use window.event
+ event = event || _global.event;
+ if (!event) {
+ return;
+ }
+ // event.target is needed for Samsung TV and SourceBuffer
+ // || global is needed https://github.com/angular/zone.js/issues/190
+ const target = context || event.target || _global;
+ const tasks =
+ target[
+ zoneSymbolEventNames[event.type][
+ isCapture ? TRUE_STR : FALSE_STR
+ ]
+ ];
+ if (tasks) {
+ const errors = [];
+ // invoke all tasks which attached to current target with given event.type and capture = false
+ // for performance concern, if task.length === 1, just invoke
+ if (tasks.length === 1) {
+ const err = invokeTask(tasks[0], target, event);
+ err && errors.push(err);
+ } else {
+ // https://github.com/angular/zone.js/issues/836
+ // copy the tasks array before invoke, to avoid
+ // the callback will remove itself or other listener
+ const copyTasks = tasks.slice();
+ for (let i = 0; i < copyTasks.length; i++) {
+ if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {
+ break;
+ }
+ const err = invokeTask(copyTasks[i], target, event);
+ err && errors.push(err);
+ }
+ }
+ // Since there is only one error, we don't need to schedule microTask
+ // to throw the error.
+ if (errors.length === 1) {
+ throw errors[0];
+ } else {
+ for (let i = 0; i < errors.length; i++) {
+ const err = errors[i];
+ api.nativeScheduleMicroTask(() => {
+ throw err;
+ });
+ }
+ }
+ }
+ }
+ // global shared zoneAwareCallback to handle all event callback with capture = false
+ const globalZoneAwareCallback = function (event) {
+ return globalCallback(this, event, false);
+ };
+ // global shared zoneAwareCallback to handle all event callback with capture = true
+ const globalZoneAwareCaptureCallback = function (event) {
+ return globalCallback(this, event, true);
+ };
+ function patchEventTargetMethods(obj, patchOptions) {
+ if (!obj) {
+ return false;
+ }
+ let useGlobalCallback = true;
+ if (patchOptions && patchOptions.useG !== undefined) {
+ useGlobalCallback = patchOptions.useG;
+ }
+ const validateHandler = patchOptions && patchOptions.vh;
+ let checkDuplicate = true;
+ if (patchOptions && patchOptions.chkDup !== undefined) {
+ checkDuplicate = patchOptions.chkDup;
+ }
+ let returnTarget = false;
+ if (patchOptions && patchOptions.rt !== undefined) {
+ returnTarget = patchOptions.rt;
+ }
+ let proto = obj;
+ while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {
+ proto = ObjectGetPrototypeOf(proto);
+ }
+ if (!proto && obj[ADD_EVENT_LISTENER]) {
+ // somehow we did not find it, but we can see it. This happens on IE for Window properties.
+ proto = obj;
+ }
+ if (!proto) {
+ return false;
+ }
+ if (proto[zoneSymbolAddEventListener]) {
+ return false;
+ }
+ const eventNameToString =
+ patchOptions && patchOptions.eventNameToString;
+ // a shared global taskData to pass data for scheduleEventTask
+ // so we do not need to create a new object just for pass some data
+ const taskData = {};
+ const nativeAddEventListener = (proto[zoneSymbolAddEventListener] =
+ proto[ADD_EVENT_LISTENER]);
+ const nativeRemoveEventListener = (proto[
+ zoneSymbol(REMOVE_EVENT_LISTENER)
+ ] = proto[REMOVE_EVENT_LISTENER]);
+ const nativeListeners = (proto[
+ zoneSymbol(LISTENERS_EVENT_LISTENER)
+ ] = proto[LISTENERS_EVENT_LISTENER]);
+ const nativeRemoveAllListeners = (proto[
+ zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)
+ ] = proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]);
+ let nativePrependEventListener;
+ if (patchOptions && patchOptions.prepend) {
+ nativePrependEventListener = proto[
+ zoneSymbol(patchOptions.prepend)
+ ] = proto[patchOptions.prepend];
+ }
+ /**
+ * This util function will build an option object with passive option
+ * to handle all possible input from the user.
+ */
+ function buildEventListenerOptions(options, passive) {
+ if (!passiveSupported && typeof options === "object" && options) {
+ // doesn't support passive but user want to pass an object as options.
+ // this will not work on some old browser, so we just pass a boolean
+ // as useCapture parameter
+ return !!options.capture;
+ }
+ if (!passiveSupported || !passive) {
+ return options;
+ }
+ if (typeof options === "boolean") {
+ return {
+ capture: options,
+ passive: true,
+ };
+ }
+ if (!options) {
+ return {
+ passive: true,
+ };
+ }
+ if (typeof options === "object" && options.passive !== false) {
+ return Object.assign(Object.assign({}, options), {
+ passive: true,
+ });
+ }
+ return options;
+ }
+ const customScheduleGlobal = function (task) {
+ // if there is already a task for the eventName + capture,
+ // just return, because we use the shared globalZoneAwareCallback here.
+ if (taskData.isExisting) {
+ return;
+ }
+ return nativeAddEventListener.call(
+ taskData.target,
+ taskData.eventName,
+ taskData.capture
+ ? globalZoneAwareCaptureCallback
+ : globalZoneAwareCallback,
+ taskData.options
+ );
+ };
+ const customCancelGlobal = function (task) {
+ // if task is not marked as isRemoved, this call is directly
+ // from Zone.prototype.cancelTask, we should remove the task
+ // from tasksList of target first
+ if (!task.isRemoved) {
+ const symbolEventNames = zoneSymbolEventNames[task.eventName];
+ let symbolEventName;
+ if (symbolEventNames) {
+ symbolEventName =
+ symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];
+ }
+ const existingTasks =
+ symbolEventName && task.target[symbolEventName];
+ if (existingTasks) {
+ for (let i = 0; i < existingTasks.length; i++) {
+ const existingTask = existingTasks[i];
+ if (existingTask === task) {
+ existingTasks.splice(i, 1);
+ // set isRemoved to data for faster invokeTask check
+ task.isRemoved = true;
+ if (existingTasks.length === 0) {
+ // all tasks for the eventName + capture have gone,
+ // remove globalZoneAwareCallback and remove the task cache from target
+ task.allRemoved = true;
+ task.target[symbolEventName] = null;
+ }
+ break;
+ }
+ }
+ }
+ }
+ // if all tasks for the eventName + capture have gone,
+ // we will really remove the global event callback,
+ // if not, return
+ if (!task.allRemoved) {
+ return;
+ }
+ return nativeRemoveEventListener.call(
+ task.target,
+ task.eventName,
+ task.capture
+ ? globalZoneAwareCaptureCallback
+ : globalZoneAwareCallback,
+ task.options
+ );
+ };
+ const customScheduleNonGlobal = function (task) {
+ return nativeAddEventListener.call(
+ taskData.target,
+ taskData.eventName,
+ task.invoke,
+ taskData.options
+ );
+ };
+ const customSchedulePrepend = function (task) {
+ return nativePrependEventListener.call(
+ taskData.target,
+ taskData.eventName,
+ task.invoke,
+ taskData.options
+ );
+ };
+ const customCancelNonGlobal = function (task) {
+ return nativeRemoveEventListener.call(
+ task.target,
+ task.eventName,
+ task.invoke,
+ task.options
+ );
+ };
+ const customSchedule = useGlobalCallback
+ ? customScheduleGlobal
+ : customScheduleNonGlobal;
+ const customCancel = useGlobalCallback
+ ? customCancelGlobal
+ : customCancelNonGlobal;
+ const compareTaskCallbackVsDelegate = function (task, delegate) {
+ const typeOfDelegate = typeof delegate;
+ return (
+ (typeOfDelegate === "function" && task.callback === delegate) ||
+ (typeOfDelegate === "object" &&
+ task.originalDelegate === delegate)
+ );
+ };
+ const compare =
+ patchOptions && patchOptions.diff
+ ? patchOptions.diff
+ : compareTaskCallbackVsDelegate;
+ const unpatchedEvents = Zone[zoneSymbol("UNPATCHED_EVENTS")];
+ const passiveEvents = _global[zoneSymbol("PASSIVE_EVENTS")];
+ const makeAddListener = function (
+ nativeListener,
+ addSource,
+ customScheduleFn,
+ customCancelFn,
+ returnTarget = false,
+ prepend = false
+ ) {
+ return function () {
+ const target = this || _global;
+ let eventName = arguments[0];
+ if (patchOptions && patchOptions.transferEventName) {
+ eventName = patchOptions.transferEventName(eventName);
+ }
+ let delegate = arguments[1];
+ if (!delegate) {
+ return nativeListener.apply(this, arguments);
+ }
+ if (isNode && eventName === "uncaughtException") {
+ // don't patch uncaughtException of nodejs to prevent endless loop
+ return nativeListener.apply(this, arguments);
+ }
+ // don't create the bind delegate function for handleEvent
+ // case here to improve addEventListener performance
+ // we will create the bind delegate when invoke
+ let isHandleEvent = false;
+ if (typeof delegate !== "function") {
+ if (!delegate.handleEvent) {
+ return nativeListener.apply(this, arguments);
+ }
+ isHandleEvent = true;
+ }
+ if (
+ validateHandler &&
+ !validateHandler(nativeListener, delegate, target, arguments)
+ ) {
+ return;
+ }
+ const passive =
+ passiveSupported &&
+ !!passiveEvents &&
+ passiveEvents.indexOf(eventName) !== -1;
+ const options = buildEventListenerOptions(
+ arguments[2],
+ passive
+ );
+ if (unpatchedEvents) {
+ // check unpatched list
+ for (let i = 0; i < unpatchedEvents.length; i++) {
+ if (eventName === unpatchedEvents[i]) {
+ if (passive) {
+ return nativeListener.call(
+ target,
+ eventName,
+ delegate,
+ options
+ );
+ } else {
+ return nativeListener.apply(this, arguments);
+ }
+ }
+ }
+ }
+ const capture = !options
+ ? false
+ : typeof options === "boolean"
+ ? true
+ : options.capture;
+ const once =
+ options && typeof options === "object" ? options.once : false;
+ const zone = Zone.current;
+ let symbolEventNames = zoneSymbolEventNames[eventName];
+ if (!symbolEventNames) {
+ prepareEventNames(eventName, eventNameToString);
+ symbolEventNames = zoneSymbolEventNames[eventName];
+ }
+ const symbolEventName =
+ symbolEventNames[capture ? TRUE_STR : FALSE_STR];
+ let existingTasks = target[symbolEventName];
+ let isExisting = false;
+ if (existingTasks) {
+ // already have task registered
+ isExisting = true;
+ if (checkDuplicate) {
+ for (let i = 0; i < existingTasks.length; i++) {
+ if (compare(existingTasks[i], delegate)) {
+ // same callback, same capture, same event name, just return
+ return;
+ }
+ }
+ }
+ } else {
+ existingTasks = target[symbolEventName] = [];
+ }
+ let source;
+ const constructorName = target.constructor["name"];
+ const targetSource = globalSources[constructorName];
+ if (targetSource) {
+ source = targetSource[eventName];
+ }
+ if (!source) {
+ source =
+ constructorName +
+ addSource +
+ (eventNameToString
+ ? eventNameToString(eventName)
+ : eventName);
+ }
+ // do not create a new object as task.data to pass those things
+ // just use the global shared one
+ taskData.options = options;
+ if (once) {
+ // if addEventListener with once options, we don't pass it to
+ // native addEventListener, instead we keep the once setting
+ // and handle ourselves.
+ taskData.options.once = false;
+ }
+ taskData.target = target;
+ taskData.capture = capture;
+ taskData.eventName = eventName;
+ taskData.isExisting = isExisting;
+ const data = useGlobalCallback
+ ? OPTIMIZED_ZONE_EVENT_TASK_DATA
+ : undefined;
+ // keep taskData into data to allow onScheduleEventTask to access the task information
+ if (data) {
+ data.taskData = taskData;
+ }
+ const task = zone.scheduleEventTask(
+ source,
+ delegate,
+ data,
+ customScheduleFn,
+ customCancelFn
+ );
+ // should clear taskData.target to avoid memory leak
+ // issue, https://github.com/angular/angular/issues/20442
+ taskData.target = null;
+ // need to clear up taskData because it is a global object
+ if (data) {
+ data.taskData = null;
+ }
+ // have to save those information to task in case
+ // application may call task.zone.cancelTask() directly
+ if (once) {
+ options.once = true;
+ }
+ if (!(!passiveSupported && typeof task.options === "boolean")) {
+ // if not support passive, and we pass an option object
+ // to addEventListener, we should save the options to task
+ task.options = options;
+ }
+ task.target = target;
+ task.capture = capture;
+ task.eventName = eventName;
+ if (isHandleEvent) {
+ // save original delegate for compare to check duplicate
+ task.originalDelegate = delegate;
+ }
+ if (!prepend) {
+ existingTasks.push(task);
+ } else {
+ existingTasks.unshift(task);
+ }
+ if (returnTarget) {
+ return target;
+ }
+ };
+ };
+ proto[ADD_EVENT_LISTENER] = makeAddListener(
+ nativeAddEventListener,
+ ADD_EVENT_LISTENER_SOURCE,
+ customSchedule,
+ customCancel,
+ returnTarget
+ );
+ if (nativePrependEventListener) {
+ proto[PREPEND_EVENT_LISTENER] = makeAddListener(
+ nativePrependEventListener,
+ PREPEND_EVENT_LISTENER_SOURCE,
+ customSchedulePrepend,
+ customCancel,
+ returnTarget,
+ true
+ );
+ }
+ proto[REMOVE_EVENT_LISTENER] = function () {
+ const target = this || _global;
+ let eventName = arguments[0];
+ if (patchOptions && patchOptions.transferEventName) {
+ eventName = patchOptions.transferEventName(eventName);
+ }
+ const options = arguments[2];
+ const capture = !options
+ ? false
+ : typeof options === "boolean"
+ ? true
+ : options.capture;
+ const delegate = arguments[1];
+ if (!delegate) {
+ return nativeRemoveEventListener.apply(this, arguments);
+ }
+ if (
+ validateHandler &&
+ !validateHandler(
+ nativeRemoveEventListener,
+ delegate,
+ target,
+ arguments
+ )
+ ) {
+ return;
+ }
+ const symbolEventNames = zoneSymbolEventNames[eventName];
+ let symbolEventName;
+ if (symbolEventNames) {
+ symbolEventName =
+ symbolEventNames[capture ? TRUE_STR : FALSE_STR];
+ }
+ const existingTasks = symbolEventName && target[symbolEventName];
+ if (existingTasks) {
+ for (let i = 0; i < existingTasks.length; i++) {
+ const existingTask = existingTasks[i];
+ if (compare(existingTask, delegate)) {
+ existingTasks.splice(i, 1);
+ // set isRemoved to data for faster invokeTask check
+ existingTask.isRemoved = true;
+ if (existingTasks.length === 0) {
+ // all tasks for the eventName + capture have gone,
+ // remove globalZoneAwareCallback and remove the task cache from target
+ existingTask.allRemoved = true;
+ target[symbolEventName] = null;
+ // in the target, we have an event listener which is added by on_property
+ // such as target.onclick = function() {}, so we need to clear this internal
+ // property too if all delegates all removed
+ if (typeof eventName === "string") {
+ const onPropertySymbol =
+ ZONE_SYMBOL_PREFIX + "ON_PROPERTY" + eventName;
+ target[onPropertySymbol] = null;
+ }
+ }
+ existingTask.zone.cancelTask(existingTask);
+ if (returnTarget) {
+ return target;
+ }
+ return;
+ }
+ }
+ }
+ // issue 930, didn't find the event name or callback
+ // from zone kept existingTasks, the callback maybe
+ // added outside of zone, we need to call native removeEventListener
+ // to try to remove it.
+ return nativeRemoveEventListener.apply(this, arguments);
+ };
+ proto[LISTENERS_EVENT_LISTENER] = function () {
+ const target = this || _global;
+ let eventName = arguments[0];
+ if (patchOptions && patchOptions.transferEventName) {
+ eventName = patchOptions.transferEventName(eventName);
+ }
+ const listeners = [];
+ const tasks = findEventTasks(
+ target,
+ eventNameToString ? eventNameToString(eventName) : eventName
+ );
+ for (let i = 0; i < tasks.length; i++) {
+ const task = tasks[i];
+ let delegate = task.originalDelegate
+ ? task.originalDelegate
+ : task.callback;
+ listeners.push(delegate);
+ }
+ return listeners;
+ };
+ proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {
+ const target = this || _global;
+ let eventName = arguments[0];
+ if (!eventName) {
+ const keys = Object.keys(target);
+ for (let i = 0; i < keys.length; i++) {
+ const prop = keys[i];
+ const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
+ let evtName = match && match[1];
+ // in nodejs EventEmitter, removeListener event is
+ // used for monitoring the removeListener call,
+ // so just keep removeListener eventListener until
+ // all other eventListeners are removed
+ if (evtName && evtName !== "removeListener") {
+ this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(
+ this,
+ evtName
+ );
+ }
+ }
+ // remove removeListener listener finally
+ this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(
+ this,
+ "removeListener"
+ );
+ } else {
+ if (patchOptions && patchOptions.transferEventName) {
+ eventName = patchOptions.transferEventName(eventName);
+ }
+ const symbolEventNames = zoneSymbolEventNames[eventName];
+ if (symbolEventNames) {
+ const symbolEventName = symbolEventNames[FALSE_STR];
+ const symbolCaptureEventName = symbolEventNames[TRUE_STR];
+ const tasks = target[symbolEventName];
+ const captureTasks = target[symbolCaptureEventName];
+ if (tasks) {
+ const removeTasks = tasks.slice();
+ for (let i = 0; i < removeTasks.length; i++) {
+ const task = removeTasks[i];
+ let delegate = task.originalDelegate
+ ? task.originalDelegate
+ : task.callback;
+ this[REMOVE_EVENT_LISTENER].call(
+ this,
+ eventName,
+ delegate,
+ task.options
+ );
+ }
+ }
+ if (captureTasks) {
+ const removeTasks = captureTasks.slice();
+ for (let i = 0; i < removeTasks.length; i++) {
+ const task = removeTasks[i];
+ let delegate = task.originalDelegate
+ ? task.originalDelegate
+ : task.callback;
+ this[REMOVE_EVENT_LISTENER].call(
+ this,
+ eventName,
+ delegate,
+ task.options
+ );
+ }
+ }
+ }
+ }
+ if (returnTarget) {
+ return this;
+ }
+ };
+ // for native toString patch
+ attachOriginToPatched(
+ proto[ADD_EVENT_LISTENER],
+ nativeAddEventListener
+ );
+ attachOriginToPatched(
+ proto[REMOVE_EVENT_LISTENER],
+ nativeRemoveEventListener
+ );
+ if (nativeRemoveAllListeners) {
+ attachOriginToPatched(
+ proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER],
+ nativeRemoveAllListeners
+ );
+ }
+ if (nativeListeners) {
+ attachOriginToPatched(
+ proto[LISTENERS_EVENT_LISTENER],
+ nativeListeners
+ );
+ }
+ return true;
+ }
+ let results = [];
+ for (let i = 0; i < apis.length; i++) {
+ results[i] = patchEventTargetMethods(apis[i], patchOptions);
+ }
+ return results;
+ }
+ function findEventTasks(target, eventName) {
+ if (!eventName) {
+ const foundTasks = [];
+ for (let prop in target) {
+ const match = EVENT_NAME_SYMBOL_REGX.exec(prop);
+ let evtName = match && match[1];
+ if (evtName && (!eventName || evtName === eventName)) {
+ const tasks = target[prop];
+ if (tasks) {
+ for (let i = 0; i < tasks.length; i++) {
+ foundTasks.push(tasks[i]);
+ }
+ }
+ }
+ }
+ return foundTasks;
+ }
+ let symbolEventName = zoneSymbolEventNames[eventName];
+ if (!symbolEventName) {
+ prepareEventNames(eventName);
+ symbolEventName = zoneSymbolEventNames[eventName];
+ }
+ const captureFalseTasks = target[symbolEventName[FALSE_STR]];
+ const captureTrueTasks = target[symbolEventName[TRUE_STR]];
+ if (!captureFalseTasks) {
+ return captureTrueTasks ? captureTrueTasks.slice() : [];
+ } else {
+ return captureTrueTasks
+ ? captureFalseTasks.concat(captureTrueTasks)
+ : captureFalseTasks.slice();
+ }
+ }
+ function patchEventPrototype(global, api) {
+ const Event = global["Event"];
+ if (Event && Event.prototype) {
+ api.patchMethod(
+ Event.prototype,
+ "stopImmediatePropagation",
+ (delegate) =>
+ function (self, args) {
+ self[IMMEDIATE_PROPAGATION_SYMBOL] = true;
+ // we need to call the native stopImmediatePropagation
+ // in case in some hybrid application, some part of
+ // application will be controlled by zone, some are not
+ delegate && delegate.apply(self, args);
+ }
+ );
+ }
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ function patchCallbacks(api, target, targetName, method, callbacks) {
+ const symbol = Zone.__symbol__(method);
+ if (target[symbol]) {
+ return;
+ }
+ const nativeDelegate = (target[symbol] = target[method]);
+ target[method] = function (name, opts, options) {
+ if (opts && opts.prototype) {
+ callbacks.forEach(function (callback) {
+ const source = `${targetName}.${method}::` + callback;
+ const prototype = opts.prototype;
+ // Note: the `patchCallbacks` is used for patching the `document.registerElement` and
+ // `customElements.define`. We explicitly wrap the patching code into try-catch since
+ // callbacks may be already patched by other web components frameworks (e.g. LWC), and they
+ // make those properties non-writable. This means that patching callback will throw an error
+ // `cannot assign to read-only property`. See this code as an example:
+ // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186
+ // We don't want to stop the application rendering if we couldn't patch some
+ // callback, e.g. `attributeChangedCallback`.
+ try {
+ if (prototype.hasOwnProperty(callback)) {
+ const descriptor = api.ObjectGetOwnPropertyDescriptor(
+ prototype,
+ callback
+ );
+ if (descriptor && descriptor.value) {
+ descriptor.value = api.wrapWithCurrentZone(
+ descriptor.value,
+ source
+ );
+ api._redefineProperty(
+ opts.prototype,
+ callback,
+ descriptor
+ );
+ } else if (prototype[callback]) {
+ prototype[callback] = api.wrapWithCurrentZone(
+ prototype[callback],
+ source
+ );
+ }
+ } else if (prototype[callback]) {
+ prototype[callback] = api.wrapWithCurrentZone(
+ prototype[callback],
+ source
+ );
+ }
+ } catch (_a) {
+ // Note: we leave the catch block empty since there's no way to handle the error related
+ // to non-writable property.
+ }
+ });
+ }
+ return nativeDelegate.call(target, name, opts, options);
+ };
+ api.attachOriginToPatched(target[method], nativeDelegate);
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ function filterProperties(target, onProperties, ignoreProperties) {
+ if (!ignoreProperties || ignoreProperties.length === 0) {
+ return onProperties;
+ }
+ const tip = ignoreProperties.filter((ip) => ip.target === target);
+ if (!tip || tip.length === 0) {
+ return onProperties;
+ }
+ const targetIgnoreProperties = tip[0].ignoreProperties;
+ return onProperties.filter(
+ (op) => targetIgnoreProperties.indexOf(op) === -1
+ );
+ }
+ function patchFilteredProperties(
+ target,
+ onProperties,
+ ignoreProperties,
+ prototype
+ ) {
+ // check whether target is available, sometimes target will be undefined
+ // because different browser or some 3rd party plugin.
+ if (!target) {
+ return;
+ }
+ const filteredProperties = filterProperties(
+ target,
+ onProperties,
+ ignoreProperties
+ );
+ patchOnProperties(target, filteredProperties, prototype);
+ }
+ /**
+ * Get all event name properties which the event name startsWith `on`
+ * from the target object itself, inherited properties are not considered.
+ */
+ function getOnEventNames(target) {
+ return Object.getOwnPropertyNames(target)
+ .filter((name) => name.startsWith("on") && name.length > 2)
+ .map((name) => name.substring(2));
+ }
+ function propertyDescriptorPatch(api, _global) {
+ if (isNode && !isMix) {
+ return;
+ }
+ if (Zone[api.symbol("patchEvents")]) {
+ // events are already been patched by legacy patch.
+ return;
+ }
+ const ignoreProperties = _global["__Zone_ignore_on_properties"];
+ // for browsers that we can patch the descriptor: Chrome & Firefox
+ let patchTargets = [];
+ if (isBrowser) {
+ const internalWindow = window;
+ patchTargets = patchTargets.concat([
+ "Document",
+ "SVGElement",
+ "Element",
+ "HTMLElement",
+ "HTMLBodyElement",
+ "HTMLMediaElement",
+ "HTMLFrameSetElement",
+ "HTMLFrameElement",
+ "HTMLIFrameElement",
+ "HTMLMarqueeElement",
+ "Worker",
+ ]);
+ const ignoreErrorProperties = isIE()
+ ? [
+ {
+ target: internalWindow,
+ ignoreProperties: ["error"],
+ },
+ ]
+ : [];
+ // in IE/Edge, onProp not exist in window object, but in WindowPrototype
+ // so we need to pass WindowPrototype to check onProp exist or not
+ patchFilteredProperties(
+ internalWindow,
+ getOnEventNames(internalWindow),
+ ignoreProperties
+ ? ignoreProperties.concat(ignoreErrorProperties)
+ : ignoreProperties,
+ ObjectGetPrototypeOf(internalWindow)
+ );
+ }
+ patchTargets = patchTargets.concat([
+ "XMLHttpRequest",
+ "XMLHttpRequestEventTarget",
+ "IDBIndex",
+ "IDBRequest",
+ "IDBOpenDBRequest",
+ "IDBDatabase",
+ "IDBTransaction",
+ "IDBCursor",
+ "WebSocket",
+ ]);
+ for (let i = 0; i < patchTargets.length; i++) {
+ const target = _global[patchTargets[i]];
+ target &&
+ target.prototype &&
+ patchFilteredProperties(
+ target.prototype,
+ getOnEventNames(target.prototype),
+ ignoreProperties
+ );
+ }
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ Zone.__load_patch("util", (global, Zone, api) => {
+ // Collect native event names by looking at properties
+ // on the global namespace, e.g. 'onclick'.
+ const eventNames = getOnEventNames(global);
+ api.patchOnProperties = patchOnProperties;
+ api.patchMethod = patchMethod;
+ api.bindArguments = bindArguments;
+ api.patchMacroTask = patchMacroTask;
+ // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to
+ // define which events will not be patched by `Zone.js`.
+ // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep
+ // the name consistent with angular repo.
+ // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for
+ // backwards compatibility.
+ const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__(
+ "BLACK_LISTED_EVENTS"
+ );
+ const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__("UNPATCHED_EVENTS");
+ if (global[SYMBOL_UNPATCHED_EVENTS]) {
+ global[SYMBOL_BLACK_LISTED_EVENTS] =
+ global[SYMBOL_UNPATCHED_EVENTS];
+ }
+ if (global[SYMBOL_BLACK_LISTED_EVENTS]) {
+ Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =
+ global[SYMBOL_BLACK_LISTED_EVENTS];
+ }
+ api.patchEventPrototype = patchEventPrototype;
+ api.patchEventTarget = patchEventTarget;
+ api.isIEOrEdge = isIEOrEdge;
+ api.ObjectDefineProperty = ObjectDefineProperty;
+ api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;
+ api.ObjectCreate = ObjectCreate;
+ api.ArraySlice = ArraySlice;
+ api.patchClass = patchClass;
+ api.wrapWithCurrentZone = wrapWithCurrentZone;
+ api.filterProperties = filterProperties;
+ api.attachOriginToPatched = attachOriginToPatched;
+ api._redefineProperty = Object.defineProperty;
+ api.patchCallbacks = patchCallbacks;
+ api.getGlobalObjects = () => ({
+ globalSources,
+ zoneSymbolEventNames,
+ eventNames,
+ isBrowser,
+ isMix,
+ isNode,
+ TRUE_STR,
+ FALSE_STR,
+ ZONE_SYMBOL_PREFIX,
+ ADD_EVENT_LISTENER_STR,
+ REMOVE_EVENT_LISTENER_STR,
+ });
+ });
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ const taskSymbol = zoneSymbol("zoneTask");
+ function patchTimer(window, setName, cancelName, nameSuffix) {
+ let setNative = null;
+ let clearNative = null;
+ setName += nameSuffix;
+ cancelName += nameSuffix;
+ const tasksByHandleId = {};
+ function scheduleTask(task) {
+ const data = task.data;
+ data.args[0] = function () {
+ return task.invoke.apply(this, arguments);
+ };
+ data.handleId = setNative.apply(window, data.args);
+ return task;
+ }
+ function clearTask(task) {
+ return clearNative.call(window, task.data.handleId);
+ }
+ setNative = patchMethod(
+ window,
+ setName,
+ (delegate) =>
+ function (self, args) {
+ if (typeof args[0] === "function") {
+ const options = {
+ isPeriodic: nameSuffix === "Interval",
+ delay:
+ nameSuffix === "Timeout" || nameSuffix === "Interval"
+ ? args[1] || 0
+ : undefined,
+ args: args,
+ };
+ const callback = args[0];
+ args[0] = function timer() {
+ try {
+ return callback.apply(this, arguments);
+ } finally {
+ // issue-934, task will be cancelled
+ // even it is a periodic task such as
+ // setInterval
+ // https://github.com/angular/angular/issues/40387
+ // Cleanup tasksByHandleId should be handled before scheduleTask
+ // Since some zoneSpec may intercept and doesn't trigger
+ // scheduleFn(scheduleTask) provided here.
+ if (!options.isPeriodic) {
+ if (typeof options.handleId === "number") {
+ // in non-nodejs env, we remove timerId
+ // from local cache
+ delete tasksByHandleId[options.handleId];
+ } else if (options.handleId) {
+ // Node returns complex objects as handleIds
+ // we remove task reference from timer object
+ options.handleId[taskSymbol] = null;
+ }
+ }
+ }
+ };
+ const task = scheduleMacroTaskWithCurrentZone(
+ setName,
+ args[0],
+ options,
+ scheduleTask,
+ clearTask
+ );
+ if (!task) {
+ return task;
+ }
+ // Node.js must additionally support the ref and unref functions.
+ const handle = task.data.handleId;
+ if (typeof handle === "number") {
+ // for non nodejs env, we save handleId: task
+ // mapping in local cache for clearTimeout
+ tasksByHandleId[handle] = task;
+ } else if (handle) {
+ // for nodejs env, we save task
+ // reference in timerId Object for clearTimeout
+ handle[taskSymbol] = task;
+ }
+ // check whether handle is null, because some polyfill or browser
+ // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame
+ if (
+ handle &&
+ handle.ref &&
+ handle.unref &&
+ typeof handle.ref === "function" &&
+ typeof handle.unref === "function"
+ ) {
+ task.ref = handle.ref.bind(handle);
+ task.unref = handle.unref.bind(handle);
+ }
+ if (typeof handle === "number" || handle) {
+ return handle;
+ }
+ return task;
+ } else {
+ // cause an error by calling it directly.
+ return delegate.apply(window, args);
+ }
+ }
+ );
+ clearNative = patchMethod(
+ window,
+ cancelName,
+ (delegate) =>
+ function (self, args) {
+ const id = args[0];
+ let task;
+ if (typeof id === "number") {
+ // non nodejs env.
+ task = tasksByHandleId[id];
+ } else {
+ // nodejs env.
+ task = id && id[taskSymbol];
+ // other environments.
+ if (!task) {
+ task = id;
+ }
+ }
+ if (task && typeof task.type === "string") {
+ if (
+ task.state !== "notScheduled" &&
+ ((task.cancelFn && task.data.isPeriodic) ||
+ task.runCount === 0)
+ ) {
+ if (typeof id === "number") {
+ delete tasksByHandleId[id];
+ } else if (id) {
+ id[taskSymbol] = null;
+ }
+ // Do not cancel already canceled functions
+ task.zone.cancelTask(task);
+ }
+ } else {
+ // cause an error by calling it directly.
+ delegate.apply(window, args);
+ }
+ }
+ );
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ function patchCustomElements(_global, api) {
+ const { isBrowser, isMix } = api.getGlobalObjects();
+ if (
+ (!isBrowser && !isMix) ||
+ !_global["customElements"] ||
+ !("customElements" in _global)
+ ) {
+ return;
+ }
+ const callbacks = [
+ "connectedCallback",
+ "disconnectedCallback",
+ "adoptedCallback",
+ "attributeChangedCallback",
+ ];
+ api.patchCallbacks(
+ api,
+ _global.customElements,
+ "customElements",
+ "define",
+ callbacks
+ );
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ function eventTargetPatch(_global, api) {
+ if (Zone[api.symbol("patchEventTarget")]) {
+ // EventTarget is already patched.
+ return;
+ }
+ const {
+ eventNames,
+ zoneSymbolEventNames,
+ TRUE_STR,
+ FALSE_STR,
+ ZONE_SYMBOL_PREFIX,
+ } = api.getGlobalObjects();
+ // predefine all __zone_symbol__ + eventName + true/false string
+ for (let i = 0; i < eventNames.length; i++) {
+ const eventName = eventNames[i];
+ const falseEventName = eventName + FALSE_STR;
+ const trueEventName = eventName + TRUE_STR;
+ const symbol = ZONE_SYMBOL_PREFIX + falseEventName;
+ const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;
+ zoneSymbolEventNames[eventName] = {};
+ zoneSymbolEventNames[eventName][FALSE_STR] = symbol;
+ zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;
+ }
+ const EVENT_TARGET = _global["EventTarget"];
+ if (!EVENT_TARGET || !EVENT_TARGET.prototype) {
+ return;
+ }
+ api.patchEventTarget(_global, api, [
+ EVENT_TARGET && EVENT_TARGET.prototype,
+ ]);
+ return true;
+ }
+ function patchEvent(global, api) {
+ api.patchEventPrototype(global, api);
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ Zone.__load_patch("legacy", (global) => {
+ const legacyPatch = global[Zone.__symbol__("legacyPatch")];
+ if (legacyPatch) {
+ legacyPatch();
+ }
+ });
+ Zone.__load_patch("queueMicrotask", (global, Zone, api) => {
+ api.patchMethod(global, "queueMicrotask", (delegate) => {
+ return function (self, args) {
+ Zone.current.scheduleMicroTask("queueMicrotask", args[0]);
+ };
+ });
+ });
+ Zone.__load_patch("timers", (global) => {
+ const set = "set";
+ const clear = "clear";
+ patchTimer(global, set, clear, "Timeout");
+ patchTimer(global, set, clear, "Interval");
+ patchTimer(global, set, clear, "Immediate");
+ });
+ Zone.__load_patch("requestAnimationFrame", (global) => {
+ patchTimer(global, "request", "cancel", "AnimationFrame");
+ patchTimer(global, "mozRequest", "mozCancel", "AnimationFrame");
+ patchTimer(global, "webkitRequest", "webkitCancel", "AnimationFrame");
+ });
+ Zone.__load_patch("blocking", (global, Zone) => {
+ const blockingMethods = ["alert", "prompt", "confirm"];
+ for (let i = 0; i < blockingMethods.length; i++) {
+ const name = blockingMethods[i];
+ patchMethod(global, name, (delegate, symbol, name) => {
+ return function (s, args) {
+ return Zone.current.run(delegate, global, args, name);
+ };
+ });
+ }
+ });
+ Zone.__load_patch("EventTarget", (global, Zone, api) => {
+ patchEvent(global, api);
+ eventTargetPatch(global, api);
+ // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener
+ const XMLHttpRequestEventTarget = global["XMLHttpRequestEventTarget"];
+ if (
+ XMLHttpRequestEventTarget &&
+ XMLHttpRequestEventTarget.prototype
+ ) {
+ api.patchEventTarget(global, api, [
+ XMLHttpRequestEventTarget.prototype,
+ ]);
+ }
+ });
+ Zone.__load_patch("MutationObserver", (global, Zone, api) => {
+ patchClass("MutationObserver");
+ patchClass("WebKitMutationObserver");
+ });
+ Zone.__load_patch("IntersectionObserver", (global, Zone, api) => {
+ patchClass("IntersectionObserver");
+ });
+ Zone.__load_patch("FileReader", (global, Zone, api) => {
+ patchClass("FileReader");
+ });
+ Zone.__load_patch("on_property", (global, Zone, api) => {
+ propertyDescriptorPatch(api, global);
+ });
+ Zone.__load_patch("customElements", (global, Zone, api) => {
+ patchCustomElements(global, api);
+ });
+ Zone.__load_patch("XHR", (global, Zone) => {
+ // Treat XMLHttpRequest as a macrotask.
+ patchXHR(global);
+ const XHR_TASK = zoneSymbol("xhrTask");
+ const XHR_SYNC = zoneSymbol("xhrSync");
+ const XHR_LISTENER = zoneSymbol("xhrListener");
+ const XHR_SCHEDULED = zoneSymbol("xhrScheduled");
+ const XHR_URL = zoneSymbol("xhrURL");
+ const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol(
+ "xhrErrorBeforeScheduled"
+ );
+ function patchXHR(window) {
+ const XMLHttpRequest = window["XMLHttpRequest"];
+ if (!XMLHttpRequest) {
+ // XMLHttpRequest is not available in service worker
+ return;
+ }
+ const XMLHttpRequestPrototype = XMLHttpRequest.prototype;
+ function findPendingTask(target) {
+ return target[XHR_TASK];
+ }
+ let oriAddListener =
+ XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];
+ let oriRemoveListener =
+ XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
+ if (!oriAddListener) {
+ const XMLHttpRequestEventTarget =
+ window["XMLHttpRequestEventTarget"];
+ if (XMLHttpRequestEventTarget) {
+ const XMLHttpRequestEventTargetPrototype =
+ XMLHttpRequestEventTarget.prototype;
+ oriAddListener =
+ XMLHttpRequestEventTargetPrototype[
+ ZONE_SYMBOL_ADD_EVENT_LISTENER
+ ];
+ oriRemoveListener =
+ XMLHttpRequestEventTargetPrototype[
+ ZONE_SYMBOL_REMOVE_EVENT_LISTENER
+ ];
+ }
+ }
+ const READY_STATE_CHANGE = "readystatechange";
+ const SCHEDULED = "scheduled";
+ function scheduleTask(task) {
+ const data = task.data;
+ const target = data.target;
+ target[XHR_SCHEDULED] = false;
+ target[XHR_ERROR_BEFORE_SCHEDULED] = false;
+ // remove existing event listener
+ const listener = target[XHR_LISTENER];
+ if (!oriAddListener) {
+ oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];
+ oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];
+ }
+ if (listener) {
+ oriRemoveListener.call(target, READY_STATE_CHANGE, listener);
+ }
+ const newListener = (target[XHR_LISTENER] = () => {
+ if (target.readyState === target.DONE) {
+ // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with
+ // readyState=4 multiple times, so we need to check task state here
+ if (
+ !data.aborted &&
+ target[XHR_SCHEDULED] &&
+ task.state === SCHEDULED
+ ) {
+ // check whether the xhr has registered onload listener
+ // if that is the case, the task should invoke after all
+ // onload listeners finish.
+ // Also if the request failed without response (status = 0), the load event handler
+ // will not be triggered, in that case, we should also invoke the placeholder callback
+ // to close the XMLHttpRequest::send macroTask.
+ // https://github.com/angular/angular/issues/38795
+ const loadTasks = target[Zone.__symbol__("loadfalse")];
+ if (
+ target.status !== 0 &&
+ loadTasks &&
+ loadTasks.length > 0
+ ) {
+ const oriInvoke = task.invoke;
+ task.invoke = function () {
+ // need to load the tasks again, because in other
+ // load listener, they may remove themselves
+ const loadTasks = target[Zone.__symbol__("loadfalse")];
+ for (let i = 0; i < loadTasks.length; i++) {
+ if (loadTasks[i] === task) {
+ loadTasks.splice(i, 1);
+ }
+ }
+ if (!data.aborted && task.state === SCHEDULED) {
+ oriInvoke.call(task);
+ }
+ };
+ loadTasks.push(task);
+ } else {
+ task.invoke();
+ }
+ } else if (!data.aborted && target[XHR_SCHEDULED] === false) {
+ // error occurs when xhr.send()
+ target[XHR_ERROR_BEFORE_SCHEDULED] = true;
+ }
+ }
+ });
+ oriAddListener.call(target, READY_STATE_CHANGE, newListener);
+ const storedTask = target[XHR_TASK];
+ if (!storedTask) {
+ target[XHR_TASK] = task;
+ }
+ sendNative.apply(target, data.args);
+ target[XHR_SCHEDULED] = true;
+ return task;
+ }
+ function placeholderCallback() {}
+ function clearTask(task) {
+ const data = task.data;
+ // Note - ideally, we would call data.target.removeEventListener here, but it's too late
+ // to prevent it from firing. So instead, we store info for the event listener.
+ data.aborted = true;
+ return abortNative.apply(data.target, data.args);
+ }
+ const openNative = patchMethod(
+ XMLHttpRequestPrototype,
+ "open",
+ () =>
+ function (self, args) {
+ self[XHR_SYNC] = args[2] == false;
+ self[XHR_URL] = args[1];
+ return openNative.apply(self, args);
+ }
+ );
+ const XMLHTTPREQUEST_SOURCE = "XMLHttpRequest.send";
+ const fetchTaskAborting = zoneSymbol("fetchTaskAborting");
+ const fetchTaskScheduling = zoneSymbol("fetchTaskScheduling");
+ const sendNative = patchMethod(
+ XMLHttpRequestPrototype,
+ "send",
+ () =>
+ function (self, args) {
+ if (Zone.current[fetchTaskScheduling] === true) {
+ // a fetch is scheduling, so we are using xhr to polyfill fetch
+ // and because we already schedule macroTask for fetch, we should
+ // not schedule a macroTask for xhr again
+ return sendNative.apply(self, args);
+ }
+ if (self[XHR_SYNC]) {
+ // if the XHR is sync there is no task to schedule, just execute the code.
+ return sendNative.apply(self, args);
+ } else {
+ const options = {
+ target: self,
+ url: self[XHR_URL],
+ isPeriodic: false,
+ args: args,
+ aborted: false,
+ };
+ const task = scheduleMacroTaskWithCurrentZone(
+ XMLHTTPREQUEST_SOURCE,
+ placeholderCallback,
+ options,
+ scheduleTask,
+ clearTask
+ );
+ if (
+ self &&
+ self[XHR_ERROR_BEFORE_SCHEDULED] === true &&
+ !options.aborted &&
+ task.state === SCHEDULED
+ ) {
+ // xhr request throw error when send
+ // we should invoke task instead of leaving a scheduled
+ // pending macroTask
+ task.invoke();
+ }
+ }
+ }
+ );
+ const abortNative = patchMethod(
+ XMLHttpRequestPrototype,
+ "abort",
+ () =>
+ function (self, args) {
+ const task = findPendingTask(self);
+ if (task && typeof task.type == "string") {
+ // If the XHR has already completed, do nothing.
+ // If the XHR has already been aborted, do nothing.
+ // Fix #569, call abort multiple times before done will cause
+ // macroTask task count be negative number
+ if (
+ task.cancelFn == null ||
+ (task.data && task.data.aborted)
+ ) {
+ return;
+ }
+ task.zone.cancelTask(task);
+ } else if (Zone.current[fetchTaskAborting] === true) {
+ // the abort is called from fetch polyfill, we need to call native abort of XHR.
+ return abortNative.apply(self, args);
+ }
+ // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no
+ // task
+ // to cancel. Do nothing.
+ }
+ );
+ }
+ });
+
+ Zone.__load_patch("geolocation", (global) => {
+ /// GEO_LOCATION
+ if (global["navigator"] && global["navigator"].geolocation) {
+ patchPrototype(global["navigator"].geolocation, [
+ "getCurrentPosition",
+ "watchPosition",
+ ]);
+ }
+ });
+ Zone.__load_patch("PromiseRejectionEvent", (global, Zone) => {
+ // handle unhandled promise rejection
+ function findPromiseRejectionHandler(evtName) {
+ return function (e) {
+ const eventTasks = findEventTasks(global, evtName);
+ eventTasks.forEach((eventTask) => {
+ // windows has added unhandledrejection event listener
+ // trigger the event listener
+ const PromiseRejectionEvent = global["PromiseRejectionEvent"];
+ if (PromiseRejectionEvent) {
+ const evt = new PromiseRejectionEvent(evtName, {
+ promise: e.promise,
+ reason: e.rejection,
+ });
+ eventTask.invoke(evt);
+ }
+ });
+ };
+ }
+ if (global["PromiseRejectionEvent"]) {
+ Zone[zoneSymbol("unhandledPromiseRejectionHandler")] =
+ findPromiseRejectionHandler("unhandledrejection");
+ Zone[zoneSymbol("rejectionHandledHandler")] =
+ findPromiseRejectionHandler("rejectionhandled");
+ }
+ });
+
+ /***/
+ },
+ },
+ /******/ (__webpack_require__) => {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = (moduleId) =>
+ __webpack_require__((__webpack_require__.s = moduleId));
+ /******/ var __webpack_exports__ = __webpack_exec__(7435);
+ /******/
+ },
+]);
+//# sourceMappingURL=polyfills.js.map
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js.map b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js.map
new file mode 100644
index 00000000..2ef32f53
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/polyfills.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"polyfills.js","mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAgBA;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAwBA;;;AAGiB,CAAC;AAElB;;;;;;;;;;;;ACjDa;;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAE,UAAUA,MAAM,EAAE;EAChB,MAAMC,WAAW,GAAGD,MAAM,CAAC,aAAa,CAAC;EACzC,SAASE,IAAI,CAACC,IAAI,EAAE;IAChBF,WAAW,IAAIA,WAAW,CAAC,MAAM,CAAC,IAAIA,WAAW,CAAC,MAAM,CAAC,CAACE,IAAI,CAAC;EACnE;EACA,SAASC,kBAAkB,CAACD,IAAI,EAAEE,KAAK,EAAE;IACrCJ,WAAW,IAAIA,WAAW,CAAC,SAAS,CAAC,IAAIA,WAAW,CAAC,SAAS,CAAC,CAACE,IAAI,EAAEE,KAAK,CAAC;EAChF;EACAH,IAAI,CAAC,MAAM,CAAC;EACZ;EACA;EACA;EACA,MAAMI,YAAY,GAAGN,MAAM,CAAC,sBAAsB,CAAC,IAAI,iBAAiB;EACxE,SAASO,UAAU,CAACJ,IAAI,EAAE;IACtB,OAAOG,YAAY,GAAGH,IAAI;EAC9B;EACA,MAAMK,cAAc,GAAGR,MAAM,CAACO,UAAU,CAAC,yBAAyB,CAAC,CAAC,KAAK,IAAI;EAC7E,IAAIP,MAAM,CAAC,MAAM,CAAC,EAAE;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAIQ,cAAc,IAAI,OAAOR,MAAM,CAAC,MAAM,CAAC,CAACO,UAAU,KAAK,UAAU,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AW,CAAC,CAAC2jB,WAAW,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;EAC5F;AACJ,CAAC,CAAC;AACFjjB,IAAI,CAACkB,YAAY,CAAC,uBAAuB,EAAE,CAAC5B,MAAM,EAAEU,IAAI,KAAK;EACzD;EACA,SAASkjB,2BAA2B,CAAC5F,OAAO,EAAE;IAC1C,OAAO,UAAU5L,CAAC,EAAE;MAChB,MAAMyR,UAAU,GAAGjG,cAAc,CAAC5d,MAAM,EAAEge,OAAO,CAAC;MAClD6F,UAAU,CAAC9E,OAAO,CAACtb,SAAS,IAAI;QAC5B;QACA;QACA,MAAMqgB,qBAAqB,GAAG9jB,MAAM,CAAC,uBAAuB,CAAC;QAC7D,IAAI8jB,qBAAqB,EAAE;UACvB,MAAMC,GAAG,GAAG,IAAID,qBAAqB,CAAC9F,OAAO,EAAE;YAAElK,OAAO,EAAE1B,CAAC,CAAC0B,OAAO;YAAE4C,MAAM,EAAEtE,CAAC,CAACC;UAAU,CAAC,CAAC;UAC3F5O,SAAS,CAACT,MAAM,CAAC+gB,GAAG,CAAC;QACzB;MACJ,CAAC,CAAC;IACN,CAAC;EACL;EACA,IAAI/jB,MAAM,CAAC,uBAAuB,CAAC,EAAE;IACjCU,IAAI,CAAC6M,UAAU,CAAC,kCAAkC,CAAC,CAAC,GAChDqW,2BAA2B,CAAC,oBAAoB,CAAC;IACrDljB,IAAI,CAAC6M,UAAU,CAAC,yBAAyB,CAAC,CAAC,GACvCqW,2BAA2B,CAAC,kBAAkB,CAAC;EACvD;AACJ,CAAC,CAAC","sources":["./src/polyfills.ts","./node_modules/zone.js/fesm2015/zone.js"],"sourcesContent":["/**\r\n * This file includes polyfills needed by Angular and is loaded before the app.\r\n * You can add your own extra polyfills to this file.\r\n *\r\n * This file is divided into 2 sections:\r\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\r\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\r\n * file.\r\n *\r\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\r\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\r\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\r\n *\r\n * Learn more in https://angular.io/guide/browser-support\r\n */\r\n\r\n/***************************************************************************************************\r\n * BROWSER POLYFILLS\r\n */\r\n\r\n/**\r\n * By default, zone.js will patch all possible macroTask and DomEvents\r\n * user can disable parts of macroTask/DomEvents patch by setting following flags\r\n * because those flags need to be set before `zone.js` being loaded, and webpack\r\n * will put import in the top of bundle, so user need to create a separate file\r\n * in this directory (for example: zone-flags.ts), and put the following flags\r\n * into that file, and then add the following code before importing zone.js.\r\n * import './zone-flags';\r\n *\r\n * The flags allowed in zone-flags.ts are listed here.\r\n *\r\n * The following flags will work for all browsers.\r\n *\r\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\r\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\r\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\r\n *\r\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\r\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\r\n *\r\n * (window as any).__Zone_enable_cross_context_check = true;\r\n *\r\n */\r\n\r\n/***************************************************************************************************\r\n * Zone JS is required by default for Angular itself.\r\n */\r\nimport 'zone.js'; // Included with Angular CLI.\r\n\r\n/***************************************************************************************************\r\n * APPLICATION IMPORTS\r\n */\r\n","'use strict';\n/**\n * @license Angular v15.1.0-next.0\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n((function (global) {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n if (task.state !== scheduled && task.state !== running) {\n return;\n }\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n Zone.__symbol__ = __symbol__;\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class _ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt = zoneSpec &&\n (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = { name: 'NO ZONE' };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n}))(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// \n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || typeof self === 'object' && self || global;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signature\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // slice(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] === true;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected :\n forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then(v => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n ;\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n const onceWrapper = once();\n executor &&\n executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n var _a;\n // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n // may be an object without a prototype (created through `Object.create(null)`); thus\n // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n // object and copies promise properties into that object (within the `getOrCreateLoad`\n // function). The zone.js then checks if the resolved value has the `then` method and invokes\n // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read\n // properties of undefined (reading 'Symbol(Symbol.species)')`.\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n var _a;\n // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n let C = (_a = this.constructor) === null || _a === void 0 ? void 0 : _a[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n // Note: We pass the `options` object as the event handler too. This is not compatible with the\n // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n // without an actual handler.\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return Object.assign(Object.assign({}, options), { passive: true });\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n if (unpatchedEvents) {\n // check unpatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n // `customElements.define`. We explicitly wrap the patching code into try-catch since\n // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n // make those properties non-writable. This means that patching callback will throw an error\n // `cannot assign to read-only property`. See this code as an example:\n // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n // We don't want to stop the application rendering if we couldn't patch some\n // callback, e.g. `attributeChangedCallback`.\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n catch (_a) {\n // Note: we leave the catch block empty since there's no way to handle the error related\n // to non-writable property.\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter(name => name.startsWith('on') && name.length > 2)\n .map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement',\n 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker'\n ]);\n const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest',\n 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket'\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target && target.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR\n });\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options.isPeriodic)) {\n if (typeof options.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options.handleId];\n }\n else if (options.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options.handleId[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback'];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nZone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n api.patchMethod(global, 'queueMicrotask', delegate => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n});\nZone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n});\nZone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\n"],"names":["global","performance","mark","name","performanceMeasure","label","symbolPrefix","__symbol__","checkDuplicate","Error","Zone","constructor","parent","zoneSpec","_parent","_name","_properties","properties","_zoneDelegate","_ZoneDelegate","assertZonePatched","patches","root","zone","current","_currentZoneFrame","currentTask","_currentTask","__load_patch","fn","ignoreDuplicate","hasOwnProperty","perfName","_api","get","key","getZoneWith","fork","wrap","callback","source","_callback","intercept","runGuarded","arguments","run","applyThis","applyArgs","invoke","error","handleError","runTask","task","NO_ZONE","state","notScheduled","type","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","data","isPeriodic","cancelFn","undefined","invokeTask","unknown","_updateTaskCount","scheduleTask","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","err","scheduleMicroTask","customSchedule","ZoneTask","microTask","scheduleMacroTask","customCancel","scheduleEventTask","cancelTask","canceling","count","i","length","DELEGATE_ZS","onHasTask","delegate","_","target","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","parentHasTask","targetZone","apply","returnTask","push","scheduleFn","value","isEmpty","counts","prev","next","change","options","_state","self","useG","call","args","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","toString","handleId","Object","prototype","toJSON","symbolSetTimeout","symbolPromise","symbolThen","_microTaskQueue","_isDrainingMicrotaskQueue","nativeMicroTaskQueuePromise","nativeScheduleMicroTask","func","resolve","nativeThen","queue","onUnhandledError","microtaskDrainDone","symbol","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","window","getOwnPropertyDescriptor","defineProperty","ObjectGetPrototypeOf","getPrototypeOf","create","Array","slice","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","scheduleMacroTaskWithCurrentZone","zoneSymbol","isWindowExists","internalWindow","_global","REMOVE_ATTRIBUTE","patchPrototype","fnNames","prototypeDesc","isPropertyWritable","patched","propertyDesc","writable","set","isWebWorker","WorkerGlobalScope","isNode","process","isBrowser","isMix","zoneSymbolEventNames$1","wrapFn","event","eventNameSymbol","listener","result","errorEvent","message","filename","lineno","colno","preventDefault","patchProperty","obj","prop","desc","enumerable","configurable","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","newValue","previousValue","removeEventListener","addEventListener","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","a","instance","patchFn","proto","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","meta","original","isDetectedIEOrEdge","ieOrEdge","isIE","ua","navigator","userAgent","indexOf","api","readableObjectToString","JSON","stringify","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","creationTrace","e","rejection","console","stack","uncaughtPromiseError","shift","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","handler","isThenable","then","forwardResolution","forwardRejection","ZoneAwarePromise","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","REJECTED_NO_CATCH","makeResolver","promise","v","resolvePromise","once","wasCalled","wrapper","wrappedFunction","TYPE_ERROR","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","TypeError","clearRejectedNoCatch","trace","scheduleResolveOrReject","REJECTION_HANDLED_HANDLER","splice","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","ZONE_AWARE_PROMISE_TO_STRING","AggregateError","any","values","Symbol","iterator","Promise","promises","finished","errors","race","res","rej","onResolve","onReject","all","allWithCallback","allSettled","P","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","toStringTag","species","_a","C","catch","finally","onFinally","NativePromise","symbolThenPatched","Ctor","originalThen","wrapped","zoneify","resultPromise","ctor","originalFunctionToString","Function","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","PROMISE_OBJECT_TO_STRING","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","RegExp","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","add","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","listeners","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","PREPEND_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","globalCallback","context","isCapture","tasks","copyTasks","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","prepend","buildEventListenerOptions","passive","capture","assign","customScheduleGlobal","isExisting","customCancelGlobal","symbolEventNames","symbolEventName","existingTasks","existingTask","allRemoved","customScheduleNonGlobal","customSchedulePrepend","customCancelNonGlobal","compareTaskCallbackVsDelegate","typeOfDelegate","compare","diff","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","constructorName","targetSource","unshift","onPropertySymbol","findEventTasks","keys","match","exec","evtName","symbolCaptureEventName","captureTasks","removeTasks","results","foundTasks","captureFalseTasks","captureTrueTasks","concat","Event","targetName","method","callbacks","nativeDelegate","opts","forEach","descriptor","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","filteredProperties","getOnEventNames","getOwnPropertyNames","startsWith","map","substring","propertyDescriptorPatch","patchTargets","ignoreErrorProperties","eventNames","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","delay","timer","handle","ref","unref","bind","id","patchCustomElements","customElements","eventTargetPatch","EVENT_TARGET","patchEvent","legacyPatch","clear","blockingMethods","s","XMLHttpRequestEventTarget","patchXHR","XHR_TASK","XHR_SYNC","XHR_LISTENER","XHR_SCHEDULED","XHR_URL","XHR_ERROR_BEFORE_SCHEDULED","XMLHttpRequest","XMLHttpRequestPrototype","findPendingTask","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","newListener","readyState","DONE","aborted","loadTasks","oriInvoke","storedTask","sendNative","placeholderCallback","abortNative","openNative","XMLHTTPREQUEST_SOURCE","fetchTaskAborting","fetchTaskScheduling","url","geolocation","findPromiseRejectionHandler","eventTasks","PromiseRejectionEvent","evt"],"sourceRoot":"webpack:///","x_google_ignoreList":[1]}
\ No newline at end of file
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js
new file mode 100644
index 00000000..4eff1422
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js
@@ -0,0 +1,446 @@
+/******/ (() => {
+ // webpackBootstrap
+ /******/ "use strict";
+ /******/ var __webpack_modules__ = {};
+ /************************************************************************/
+ /******/ // The module cache
+ /******/ var __webpack_module_cache__ = {};
+ /******/
+ /******/ // The require function
+ /******/ function __webpack_require__(moduleId) {
+ /******/ // Check if module is in cache
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
+ /******/ if (cachedModule !== undefined) {
+ /******/ return cachedModule.exports;
+ /******/
+ }
+ /******/ // Create a new module (and put it into the cache)
+ /******/ var module = (__webpack_module_cache__[moduleId] = {
+ /******/ // no module.id needed
+ /******/ // no module.loaded needed
+ /******/ exports: {},
+ /******/
+ });
+ /******/
+ /******/ // Execute the module function
+ /******/ __webpack_modules__[moduleId](
+ module,
+ module.exports,
+ __webpack_require__
+ );
+ /******/
+ /******/ // Return the exports of the module
+ /******/ return module.exports;
+ /******/
+ }
+ /******/
+ /******/ // expose the modules object (__webpack_modules__)
+ /******/ __webpack_require__.m = __webpack_modules__;
+ /******/
+ /************************************************************************/
+ /******/ /* webpack/runtime/chunk loaded */
+ /******/ (() => {
+ /******/ var deferred = [];
+ /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
+ /******/ if (chunkIds) {
+ /******/ priority = priority || 0;
+ /******/ for (
+ var i = deferred.length;
+ i > 0 && deferred[i - 1][2] > priority;
+ i--
+ )
+ deferred[i] = deferred[i - 1];
+ /******/ deferred[i] = [chunkIds, fn, priority];
+ /******/ return;
+ /******/
+ }
+ /******/ var notFulfilled = Infinity;
+ /******/ for (var i = 0; i < deferred.length; i++) {
+ /******/ var [chunkIds, fn, priority] = deferred[i];
+ /******/ var fulfilled = true;
+ /******/ for (var j = 0; j < chunkIds.length; j++) {
+ /******/ if (
+ (priority & (1 === 0) || notFulfilled >= priority) &&
+ Object.keys(__webpack_require__.O).every((key) =>
+ __webpack_require__.O[key](chunkIds[j])
+ )
+ ) {
+ /******/ chunkIds.splice(j--, 1);
+ /******/
+ } else {
+ /******/ fulfilled = false;
+ /******/ if (priority < notFulfilled) notFulfilled = priority;
+ /******/
+ }
+ /******/
+ }
+ /******/ if (fulfilled) {
+ /******/ deferred.splice(i--, 1);
+ /******/ var r = fn();
+ /******/ if (r !== undefined) result = r;
+ /******/
+ }
+ /******/
+ }
+ /******/ return result;
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/compat get default export */
+ /******/ (() => {
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
+ /******/ __webpack_require__.n = (module) => {
+ /******/ var getter =
+ module && module.__esModule
+ ? /******/ () => module["default"]
+ : /******/ () => module;
+ /******/ __webpack_require__.d(getter, { a: getter });
+ /******/ return getter;
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/define property getters */
+ /******/ (() => {
+ /******/ // define getter functions for harmony exports
+ /******/ __webpack_require__.d = (exports, definition) => {
+ /******/ for (var key in definition) {
+ /******/ if (
+ __webpack_require__.o(definition, key) &&
+ !__webpack_require__.o(exports, key)
+ ) {
+ /******/ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: definition[key],
+ });
+ /******/
+ }
+ /******/
+ }
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/ensure chunk */
+ /******/ (() => {
+ /******/ __webpack_require__.f = {};
+ /******/ // This file contains only the entry chunk.
+ /******/ // The chunk loading function for additional chunks
+ /******/ __webpack_require__.e = (chunkId) => {
+ /******/ return Promise.all(
+ Object.keys(__webpack_require__.f).reduce((promises, key) => {
+ /******/ __webpack_require__.f[key](chunkId, promises);
+ /******/ return promises;
+ /******/
+ }, [])
+ );
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/get javascript chunk filename */
+ /******/ (() => {
+ /******/ // This function allow to reference async chunks
+ /******/ __webpack_require__.u = (chunkId) => {
+ /******/ // return url for filenames based on template
+ /******/ return "" + chunkId + ".js";
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/get mini-css chunk filename */
+ /******/ (() => {
+ /******/ // This function allow to reference async chunks
+ /******/ __webpack_require__.miniCssF = (chunkId) => {
+ /******/ // return url for filenames based on template
+ /******/ return undefined;
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
+ /******/ (() => {
+ /******/ __webpack_require__.o = (obj, prop) =>
+ Object.prototype.hasOwnProperty.call(obj, prop);
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/load script */
+ /******/ (() => {
+ /******/ var inProgress = {};
+ /******/ var dataWebpackPrefix = "app:";
+ /******/ // loadScript function to load a script via script tag
+ /******/ __webpack_require__.l = (url, done, key, chunkId) => {
+ /******/ if (inProgress[url]) {
+ inProgress[url].push(done);
+ return;
+ }
+ /******/ var script, needAttach;
+ /******/ if (key !== undefined) {
+ /******/ var scripts = document.getElementsByTagName("script");
+ /******/ for (var i = 0; i < scripts.length; i++) {
+ /******/ var s = scripts[i];
+ /******/ if (
+ s.getAttribute("src") == url ||
+ s.getAttribute("data-webpack") == dataWebpackPrefix + key
+ ) {
+ script = s;
+ break;
+ }
+ /******/
+ }
+ /******/
+ }
+ /******/ if (!script) {
+ /******/ needAttach = true;
+ /******/ script = document.createElement("script");
+ /******/ script.type = "module";
+ /******/ script.charset = "utf-8";
+ /******/ script.timeout = 120;
+ /******/ if (__webpack_require__.nc) {
+ /******/ script.setAttribute("nonce", __webpack_require__.nc);
+ /******/
+ }
+ /******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
+ /******/ script.src = __webpack_require__.tu(url);
+ /******/
+ }
+ /******/ inProgress[url] = [done];
+ /******/ var onScriptComplete = (prev, event) => {
+ /******/ // avoid mem leaks in IE.
+ /******/ script.onerror = script.onload = null;
+ /******/ clearTimeout(timeout);
+ /******/ var doneFns = inProgress[url];
+ /******/ delete inProgress[url];
+ /******/ script.parentNode && script.parentNode.removeChild(script);
+ /******/ doneFns && doneFns.forEach((fn) => fn(event));
+ /******/ if (prev) return prev(event);
+ /******/
+ };
+ /******/ var timeout = setTimeout(
+ onScriptComplete.bind(null, undefined, {
+ type: "timeout",
+ target: script,
+ }),
+ 120000
+ );
+ /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
+ /******/ script.onload = onScriptComplete.bind(null, script.onload);
+ /******/ needAttach && document.head.appendChild(script);
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/make namespace object */
+ /******/ (() => {
+ /******/ // define __esModule on exports
+ /******/ __webpack_require__.r = (exports) => {
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, {
+ value: "Module",
+ });
+ /******/
+ }
+ /******/ Object.defineProperty(exports, "__esModule", { value: true });
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/trusted types policy */
+ /******/ (() => {
+ /******/ var policy;
+ /******/ __webpack_require__.tt = () => {
+ /******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
+ /******/ if (policy === undefined) {
+ /******/ policy = {
+ /******/ createScriptURL: (url) => url,
+ /******/
+ };
+ /******/ if (
+ typeof trustedTypes !== "undefined" &&
+ trustedTypes.createPolicy
+ ) {
+ /******/ policy = trustedTypes.createPolicy(
+ "angular#bundler",
+ policy
+ );
+ /******/
+ }
+ /******/
+ }
+ /******/ return policy;
+ /******/
+ };
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/trusted types script url */
+ /******/ (() => {
+ /******/ __webpack_require__.tu = (url) =>
+ __webpack_require__.tt().createScriptURL(url);
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/publicPath */
+ /******/ (() => {
+ /******/ __webpack_require__.p = "";
+ /******/
+ })();
+ /******/
+ /******/ /* webpack/runtime/jsonp chunk loading */
+ /******/ (() => {
+ /******/ // no baseURI
+ /******/
+ /******/ // object to store loaded and loading chunks
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
+ /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
+ /******/ var installedChunks = {
+ /******/ runtime: 0,
+ /******/
+ };
+ /******/
+ /******/ __webpack_require__.f.j = (chunkId, promises) => {
+ /******/ // JSONP chunk loading for javascript
+ /******/ var installedChunkData = __webpack_require__.o(
+ installedChunks,
+ chunkId
+ )
+ ? installedChunks[chunkId]
+ : undefined;
+ /******/ if (installedChunkData !== 0) {
+ // 0 means "already installed".
+ /******/
+ /******/ // a Promise means "currently loading".
+ /******/ if (installedChunkData) {
+ /******/ promises.push(installedChunkData[2]);
+ /******/
+ } else {
+ /******/ if ("runtime" != chunkId) {
+ /******/ // setup Promise in chunk cache
+ /******/ var promise = new Promise(
+ (resolve, reject) =>
+ (installedChunkData = installedChunks[chunkId] =
+ [resolve, reject])
+ );
+ /******/ promises.push((installedChunkData[2] = promise));
+ /******/
+ /******/ // start chunk loading
+ /******/ var url =
+ __webpack_require__.p + __webpack_require__.u(chunkId);
+ /******/ // create error before stack unwound to get useful stacktrace later
+ /******/ var error = new Error();
+ /******/ var loadingEnded = (event) => {
+ /******/ if (__webpack_require__.o(installedChunks, chunkId)) {
+ /******/ installedChunkData = installedChunks[chunkId];
+ /******/ if (installedChunkData !== 0)
+ installedChunks[chunkId] = undefined;
+ /******/ if (installedChunkData) {
+ /******/ var errorType =
+ event && (event.type === "load" ? "missing" : event.type);
+ /******/ var realSrc =
+ event && event.target && event.target.src;
+ /******/ error.message =
+ "Loading chunk " +
+ chunkId +
+ " failed.\n(" +
+ errorType +
+ ": " +
+ realSrc +
+ ")";
+ /******/ error.name = "ChunkLoadError";
+ /******/ error.type = errorType;
+ /******/ error.request = realSrc;
+ /******/ installedChunkData[1](error);
+ /******/
+ }
+ /******/
+ }
+ /******/
+ };
+ /******/ __webpack_require__.l(
+ url,
+ loadingEnded,
+ "chunk-" + chunkId,
+ chunkId
+ );
+ /******/
+ } else installedChunks[chunkId] = 0;
+ /******/
+ }
+ /******/
+ }
+ /******/
+ };
+ /******/
+ /******/ // no prefetching
+ /******/
+ /******/ // no preloaded
+ /******/
+ /******/ // no HMR
+ /******/
+ /******/ // no HMR manifest
+ /******/
+ /******/ __webpack_require__.O.j = (chunkId) =>
+ installedChunks[chunkId] === 0;
+ /******/
+ /******/ // install a JSONP callback for chunk loading
+ /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
+ /******/ var [chunkIds, moreModules, runtime] = data;
+ /******/ // add "moreModules" to the modules object,
+ /******/ // then flag all "chunkIds" as loaded and fire callback
+ /******/ var moduleId,
+ chunkId,
+ i = 0;
+ /******/ if (chunkIds.some((id) => installedChunks[id] !== 0)) {
+ /******/ for (moduleId in moreModules) {
+ /******/ if (__webpack_require__.o(moreModules, moduleId)) {
+ /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
+ /******/
+ }
+ /******/
+ }
+ /******/ if (runtime) var result = runtime(__webpack_require__);
+ /******/
+ }
+ /******/ if (parentChunkLoadingFunction) parentChunkLoadingFunction(data);
+ /******/ for (; i < chunkIds.length; i++) {
+ /******/ chunkId = chunkIds[i];
+ /******/ if (
+ __webpack_require__.o(installedChunks, chunkId) &&
+ installedChunks[chunkId]
+ ) {
+ /******/ installedChunks[chunkId][0]();
+ /******/
+ }
+ /******/ installedChunks[chunkId] = 0;
+ /******/
+ }
+ /******/ return __webpack_require__.O(result);
+ /******/
+ };
+ /******/
+ /******/ var chunkLoadingGlobal = (self["webpackChunkapp"] =
+ self["webpackChunkapp"] || []);
+ /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
+ /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(
+ null,
+ chunkLoadingGlobal.push.bind(chunkLoadingGlobal)
+ );
+ /******/
+ })();
+ /******/
+ /************************************************************************/
+ /******/
+ /******/
+ /******/
+})();
+//# sourceMappingURL=runtime.js.map
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js.map b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js.map
new file mode 100644
index 00000000..b183504e
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/runtime.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"runtime.js","mappings":";;;;UAAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF;;;;;WCRA;WACA;WACA;WACA;WACA;;;;;WCJA;WACA;WACA;WACA;WACA;;;;;WCJA;;;;;WCAA;WACA;WACA;WACA;WACA,uBAAuB,4BAA4B;WACnD;WACA;WACA;WACA,iBAAiB,oBAAoB;WACrC;WACA,mGAAmG,YAAY;WAC/G;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE,iCAAiC;WACpG;WACA;WACA;WACA;;;;;WCxCA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WCZA;;;;;WCAA;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA,iCAAiC;;WAEjC;WACA;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA","sources":["webpack/bootstrap","webpack/runtime/chunk loaded","webpack/runtime/compat get default export","webpack/runtime/define property getters","webpack/runtime/ensure chunk","webpack/runtime/get javascript chunk filename","webpack/runtime/get mini-css chunk filename","webpack/runtime/hasOwnProperty shorthand","webpack/runtime/load script","webpack/runtime/make namespace object","webpack/runtime/trusted types policy","webpack/runtime/trusted types script url","webpack/runtime/publicPath","webpack/runtime/jsonp chunk loading","webpack/before-startup","webpack/startup","webpack/after-startup"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","var inProgress = {};\nvar dataWebpackPrefix = \"app:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\t\tscript.type = \"module\";\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = __webpack_require__.tu(url);\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var policy;\n__webpack_require__.tt = () => {\n\t// Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.\n\tif (policy === undefined) {\n\t\tpolicy = {\n\t\t\tcreateScriptURL: (url) => (url)\n\t\t};\n\t\tif (typeof trustedTypes !== \"undefined\" && trustedTypes.createPolicy) {\n\t\t\tpolicy = trustedTypes.createPolicy(\"angular#bundler\", policy);\n\t\t}\n\t}\n\treturn policy;\n};","__webpack_require__.tu = (url) => (__webpack_require__.tt().createScriptURL(url));","__webpack_require__.p = \"\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"runtime\": 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(\"runtime\" != chunkId) {\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkapp\"] = self[\"webpackChunkapp\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","",""],"names":[],"sourceRoot":"webpack:///","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}
\ No newline at end of file
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js
new file mode 100644
index 00000000..3695c686
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js
@@ -0,0 +1,8397 @@
+"use strict";
+(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([
+ ["src_app_admin_admin_module_ts"],
+ {
+ /***/ 3176:
+ /*!***********************************************!*\
+ !*** ./src/app/admin/admin-routing.module.ts ***!
+ \***********************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ AdminRoutingModule: () =>
+ /* binding */ AdminRoutingModule,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ =
+ __webpack_require__(/*! @angular/router */ 124);
+ /* harmony import */ var _orders_orders_component__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ./orders/orders.component */ 63);
+ /* harmony import */ var _manage_products_manage_products_component__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(
+ /*! ./manage-products/manage-products.component */ 8677
+ );
+ /* harmony import */ var _edit_product_edit_product_component__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(
+ /*! ./edit-product/edit-product.component */ 1171
+ );
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+
+ const routes = [
+ {
+ path: "orders",
+ component:
+ _orders_orders_component__WEBPACK_IMPORTED_MODULE_0__.OrdersComponent,
+ },
+ {
+ path: "products",
+ component:
+ _manage_products_manage_products_component__WEBPACK_IMPORTED_MODULE_1__.ManageProductsComponent,
+ },
+ {
+ path: "products/new",
+ component:
+ _edit_product_edit_product_component__WEBPACK_IMPORTED_MODULE_2__.EditProductComponent,
+ },
+ {
+ path: "products/:productId",
+ component:
+ _edit_product_edit_product_component__WEBPACK_IMPORTED_MODULE_2__.EditProductComponent,
+ },
+ ];
+ class AdminRoutingModule {}
+ AdminRoutingModule.ɵfac = function AdminRoutingModule_Factory(t) {
+ return new (t || AdminRoutingModule)();
+ };
+ AdminRoutingModule.ɵmod =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵdefineNgModule"
+ ]({
+ type: AdminRoutingModule,
+ });
+ AdminRoutingModule.ɵinj =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵdefineInjector"
+ ]({
+ imports: [
+ _angular_router__WEBPACK_IMPORTED_MODULE_4__.RouterModule.forChild(
+ routes
+ ),
+ _angular_router__WEBPACK_IMPORTED_MODULE_4__.RouterModule,
+ ],
+ });
+ (function () {
+ (typeof ngJitMode === "undefined" || ngJitMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵsetNgModuleScope"](
+ AdminRoutingModule,
+ {
+ imports: [
+ _angular_router__WEBPACK_IMPORTED_MODULE_4__.RouterModule,
+ ],
+ exports: [
+ _angular_router__WEBPACK_IMPORTED_MODULE_4__.RouterModule,
+ ],
+ }
+ );
+ })();
+
+ /***/
+ },
+
+ /***/ 7095:
+ /*!***************************************!*\
+ !*** ./src/app/admin/admin.module.ts ***!
+ \***************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ AdminModule: () => /* binding */ AdminModule,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+ /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_14__ =
+ __webpack_require__(/*! @angular/forms */ 2508);
+ /* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_9__ =
+ __webpack_require__(/*! @angular/material/card */ 2156);
+ /* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_10__ =
+ __webpack_require__(/*! @angular/material/input */ 8562);
+ /* harmony import */ var _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_13__ =
+ __webpack_require__(/*! @angular/material/progress-spinner */ 6511);
+ /* harmony import */ var _admin_routing_module__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ./admin-routing.module */ 3176);
+ /* harmony import */ var _orders_orders_component__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! ./orders/orders.component */ 63);
+ /* harmony import */ var _angular_material_table__WEBPACK_IMPORTED_MODULE_11__ =
+ __webpack_require__(/*! @angular/material/table */ 5288);
+ /* harmony import */ var _orders_orders_service__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! ./orders/orders.service */ 3259);
+ /* harmony import */ var _manage_products_manage_products_component__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(
+ /*! ./manage-products/manage-products.component */ 8677
+ );
+ /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_12__ =
+ __webpack_require__(/*! @angular/material/button */ 4522);
+ /* harmony import */ var _shared_file_picker_file_picker_module__WEBPACK_IMPORTED_MODULE_4__ =
+ __webpack_require__(
+ /*! ../shared/file-picker/file-picker.module */ 2145
+ );
+ /* harmony import */ var _manage_products_manage_products_service__WEBPACK_IMPORTED_MODULE_5__ =
+ __webpack_require__(
+ /*! ./manage-products/manage-products.service */ 9310
+ );
+ /* harmony import */ var _edit_product_edit_product_component__WEBPACK_IMPORTED_MODULE_6__ =
+ __webpack_require__(
+ /*! ./edit-product/edit-product.component */ 1171
+ );
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+
+ class AdminModule {}
+ AdminModule.ɵfac = function AdminModule_Factory(t) {
+ return new (t || AdminModule)();
+ };
+ AdminModule.ɵmod =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_7__[
+ "ɵɵdefineNgModule"
+ ]({
+ type: AdminModule,
+ });
+ AdminModule.ɵinj =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_7__[
+ "ɵɵdefineInjector"
+ ]({
+ providers: [
+ _orders_orders_service__WEBPACK_IMPORTED_MODULE_2__.OrdersService,
+ _manage_products_manage_products_service__WEBPACK_IMPORTED_MODULE_5__.ManageProductsService,
+ ],
+ imports: [
+ _admin_routing_module__WEBPACK_IMPORTED_MODULE_0__.AdminRoutingModule,
+ _angular_common__WEBPACK_IMPORTED_MODULE_8__.CommonModule,
+ _shared_file_picker_file_picker_module__WEBPACK_IMPORTED_MODULE_4__.FilePickerModule,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_9__.MatCardModule,
+ _angular_material_input__WEBPACK_IMPORTED_MODULE_10__.MatInputModule,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_11__.MatTableModule,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_12__.MatButtonModule,
+ _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_13__.MatProgressSpinnerModule,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_14__.ReactiveFormsModule,
+ ],
+ });
+ (function () {
+ (typeof ngJitMode === "undefined" || ngJitMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵsetNgModuleScope"](
+ AdminModule,
+ {
+ declarations: [
+ _orders_orders_component__WEBPACK_IMPORTED_MODULE_1__.OrdersComponent,
+ _manage_products_manage_products_component__WEBPACK_IMPORTED_MODULE_3__.ManageProductsComponent,
+ _edit_product_edit_product_component__WEBPACK_IMPORTED_MODULE_6__.EditProductComponent,
+ ],
+ imports: [
+ _admin_routing_module__WEBPACK_IMPORTED_MODULE_0__.AdminRoutingModule,
+ _angular_common__WEBPACK_IMPORTED_MODULE_8__.CommonModule,
+ _shared_file_picker_file_picker_module__WEBPACK_IMPORTED_MODULE_4__.FilePickerModule,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_9__.MatCardModule,
+ _angular_material_input__WEBPACK_IMPORTED_MODULE_10__.MatInputModule,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_11__.MatTableModule,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_12__.MatButtonModule,
+ _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_13__.MatProgressSpinnerModule,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_14__.ReactiveFormsModule,
+ ],
+ }
+ );
+ })();
+
+ /***/
+ },
+
+ /***/ 1171:
+ /*!**************************************************************!*\
+ !*** ./src/app/admin/edit-product/edit-product.component.ts ***!
+ \**************************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ EditProductComponent: () =>
+ /* binding */ EditProductComponent,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ =
+ __webpack_require__(/*! @angular/forms */ 2508);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! rxjs */ 6317);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ =
+ __webpack_require__(/*! rxjs */ 228);
+ /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ =
+ __webpack_require__(/*! rxjs/operators */ 2313);
+ /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ =
+ __webpack_require__(/*! rxjs/operators */ 8951);
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_8__ =
+ __webpack_require__(/*! @angular/router */ 124);
+ /* harmony import */ var _core_notification_service__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ../../core/notification.service */ 7319);
+ /* harmony import */ var _products_products_service__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! ../../products/products.service */ 9855);
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+ /* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_10__ =
+ __webpack_require__(/*! @angular/material/card */ 2156);
+ /* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_11__ =
+ __webpack_require__(/*! @angular/material/input */ 8562);
+ /* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__ =
+ __webpack_require__(/*! @angular/material/form-field */ 5074);
+ /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_13__ =
+ __webpack_require__(/*! @angular/material/button */ 4522);
+ /* harmony import */ var _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_14__ =
+ __webpack_require__(/*! @angular/material/progress-spinner */ 6511);
+
+ function EditProductComponent_mat_card_0_mat_error_10_Template(
+ rf,
+ ctx
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "mat-error"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 1,
+ " Product title is required "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ }
+ }
+ function EditProductComponent_mat_card_0_mat_error_16_Template(
+ rf,
+ ctx
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "mat-error"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 1,
+ " Product description is required "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ }
+ }
+ function EditProductComponent_mat_card_0_mat_error_22_Template(
+ rf,
+ ctx
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "mat-error"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 1,
+ " Product price is required "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ }
+ }
+ function EditProductComponent_mat_card_0_mat_error_28_Template(
+ rf,
+ ctx
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "mat-error"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 1,
+ " Product count is required "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ }
+ }
+ function EditProductComponent_mat_card_0_Template(rf, ctx) {
+ if (rf & 1) {
+ const _r8 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵgetCurrentView"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "mat-card"
+ )(1, "h1", 2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 3,
+ "mat-card-content"
+ )(4, "form", 3)(5, "div", 4)(
+ 6,
+ "mat-form-field",
+ 5
+ )(7, "mat-label");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](8, "Title");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](
+ 9,
+ "input",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 10,
+ EditProductComponent_mat_card_0_mat_error_10_Template,
+ 2,
+ 0,
+ "mat-error",
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 11,
+ "div",
+ 4
+ )(
+ 12,
+ "mat-form-field",
+ 5
+ )(13, "mat-label");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 14,
+ "Description"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](
+ 15,
+ "textarea",
+ 8
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 16,
+ EditProductComponent_mat_card_0_mat_error_16_Template,
+ 2,
+ 0,
+ "mat-error",
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 17,
+ "div",
+ 9
+ )(
+ 18,
+ "mat-form-field",
+ 5
+ )(19, "mat-label");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 20,
+ "Price ($)"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](
+ 21,
+ "input",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 22,
+ EditProductComponent_mat_card_0_mat_error_22_Template,
+ 2,
+ 0,
+ "mat-error",
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 23,
+ "div",
+ 9
+ )(
+ 24,
+ "mat-form-field",
+ 5
+ )(25, "mat-label");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](26, "Count");
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](
+ 27,
+ "input",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 28,
+ EditProductComponent_mat_card_0_mat_error_28_Template,
+ 2,
+ 0,
+ "mat-error",
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()()();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 29,
+ "mat-card-actions"
+ )(30, "button", 12);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 31,
+ " cancel "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 32,
+ "button",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"](
+ "click",
+ function EditProductComponent_mat_card_0_Template_button_click_32_listener() {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵrestoreView"](
+ _r8
+ );
+ const ctx_r7 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"]();
+ return _angular_core__WEBPACK_IMPORTED_MODULE_2__[
+ "ɵɵresetView"
+ ](ctx_r7.editProduct());
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](
+ 33,
+ " save product "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()();
+ }
+ if (rf & 2) {
+ const ctx_r0 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate1"](
+ " ",
+ ctx_r0.productId ? "Edit product" : "Create new product",
+ " "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "formGroup",
+ ctx_r0.form
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "ngIf",
+ ctx_r0.titleCtrl.touched && ctx_r0.titleCtrl.hasError("required")
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "ngIf",
+ ctx_r0.descriptionCtrl.touched &&
+ ctx_r0.descriptionCtrl.hasError("required")
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "ngIf",
+ ctx_r0.priceCtrl.touched && ctx_r0.priceCtrl.hasError("required")
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "ngIf",
+ ctx_r0.countCtrl.touched && ctx_r0.countCtrl.hasError("required")
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](4);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "disabled",
+ ctx_r0.form.invalid || ctx_r0.requestInProgress
+ );
+ }
+ }
+ function EditProductComponent_ng_template_2_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](
+ 0,
+ "div",
+ 14
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](
+ 1,
+ "mat-spinner",
+ 15
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "diameter",
+ 40
+ );
+ }
+ }
+ class EditProductComponent {
+ constructor(
+ activatedRoute,
+ fb,
+ notificationService,
+ productsService,
+ router
+ ) {
+ this.activatedRoute = activatedRoute;
+ this.fb = fb;
+ this.notificationService = notificationService;
+ this.productsService = productsService;
+ this.router = router;
+ this.productId = null;
+ this.requestInProgress = false;
+ this.loaded$ =
+ new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(false);
+ this.onDestroy$ = new rxjs__WEBPACK_IMPORTED_MODULE_4__.Subject();
+ this.form = this.fb.group({
+ title: [
+ "",
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required,
+ ],
+ description: [
+ "",
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required,
+ ],
+ price: [
+ "",
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required,
+ ],
+ count: [
+ "",
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.Validators.required,
+ ],
+ });
+ }
+ get countCtrl() {
+ return this.form.get("count");
+ }
+ get descriptionCtrl() {
+ return this.form.get("description");
+ }
+ get priceCtrl() {
+ return this.form.get("price");
+ }
+ get titleCtrl() {
+ return this.form.get("title");
+ }
+ ngOnInit() {
+ const productId =
+ this.activatedRoute.snapshot.paramMap.get("productId");
+ if (!productId) {
+ this.loaded$.next(true);
+ return;
+ }
+ this.productsService
+ .getProductById(productId)
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.finalize)(() =>
+ this.loaded$.next(true)
+ ),
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.takeUntil)(
+ this.onDestroy$
+ )
+ )
+ .subscribe((product) => {
+ if (product) {
+ this.form.patchValue(product);
+ this.productId = product.id;
+ }
+ });
+ }
+ ngOnDestroy() {
+ this.onDestroy$.next();
+ this.onDestroy$.complete();
+ }
+ editProduct() {
+ const product = this.form.value;
+ if (!product) {
+ return;
+ }
+ const editProduct$ = this.productId
+ ? this.productsService.editProduct(this.productId, product)
+ : this.productsService.createNewProduct(product);
+ this.requestInProgress = true;
+ editProduct$.subscribe(
+ () =>
+ this.router.navigate(["../"], {
+ relativeTo: this.activatedRoute,
+ }),
+ (error) => {
+ console.warn(error);
+ this.requestInProgress = false;
+ this.notificationService.showError(
+ `Failed to ${this.productId ? "edit" : "create"} product`
+ );
+ }
+ );
+ }
+ }
+ EditProductComponent.ɵfac = function EditProductComponent_Factory(t) {
+ return new (t || EditProductComponent)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](
+ _angular_router__WEBPACK_IMPORTED_MODULE_8__.ActivatedRoute
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.UntypedFormBuilder
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](
+ _core_notification_service__WEBPACK_IMPORTED_MODULE_0__.NotificationService
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](
+ _products_products_service__WEBPACK_IMPORTED_MODULE_1__.ProductsService
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](
+ _angular_router__WEBPACK_IMPORTED_MODULE_8__.Router
+ )
+ );
+ };
+ EditProductComponent.ɵcmp =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__[
+ "ɵɵdefineComponent"
+ ]({
+ type: EditProductComponent,
+ selectors: [["app-edit-product"]],
+ decls: 4,
+ vars: 4,
+ consts: [
+ [4, "ngIf", "ngIfElse"],
+ ["loaderTemplate", ""],
+ ["mat-card-title", "", 1, "text-center", "pt-4"],
+ [1, "row", 3, "formGroup"],
+ [1, "col-12"],
+ [1, "w-100"],
+ ["matInput", "", "formControlName", "title"],
+ [4, "ngIf"],
+ ["matInput", "", "formControlName", "description"],
+ [1, "col", "col-md-6"],
+ ["type", "number", "matInput", "", "formControlName", "price"],
+ ["type", "number", "matInput", "", "formControlName", "count"],
+ [
+ "mat-flat-button",
+ "",
+ "routerLink",
+ "..",
+ 1,
+ "text-uppercase",
+ "mr-2",
+ ],
+ [
+ "color",
+ "primary",
+ "mat-flat-button",
+ "",
+ 1,
+ "text-uppercase",
+ 3,
+ "disabled",
+ "click",
+ ],
+ [1, "py-5"],
+ [1, "mx-auto", 3, "diameter"],
+ ],
+ template: function EditProductComponent_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 0,
+ EditProductComponent_mat_card_0_Template,
+ 34,
+ 7,
+ "mat-card",
+ 0
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpipe"](
+ 1,
+ "async"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](
+ 2,
+ EditProductComponent_ng_template_2_Template,
+ 2,
+ 1,
+ "ng-template",
+ null,
+ 1,
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__[
+ "ɵɵtemplateRefExtractor"
+ ]
+ );
+ }
+ if (rf & 2) {
+ const _r1 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵreference"](3);
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"](
+ "ngIf",
+ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpipeBind1"](
+ 1,
+ 2,
+ ctx.loaded$
+ )
+ )("ngIfElse", _r1);
+ }
+ },
+ dependencies: [
+ _angular_router__WEBPACK_IMPORTED_MODULE_8__.RouterLink,
+ _angular_common__WEBPACK_IMPORTED_MODULE_9__.NgIf,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_10__.MatCard,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_10__.MatCardActions,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_10__.MatCardContent,
+ _angular_material_card__WEBPACK_IMPORTED_MODULE_10__.MatCardTitle,
+ _angular_material_input__WEBPACK_IMPORTED_MODULE_11__.MatInput,
+ _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__.MatFormField,
+ _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__.MatLabel,
+ _angular_material_form_field__WEBPACK_IMPORTED_MODULE_12__.MatError,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_13__.MatButton,
+ _angular_material_progress_spinner__WEBPACK_IMPORTED_MODULE_14__.MatProgressSpinner,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__["ɵNgNoValidate"],
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.DefaultValueAccessor,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NumberValueAccessor,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatus,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatusGroup,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.FormGroupDirective,
+ _angular_forms__WEBPACK_IMPORTED_MODULE_5__.FormControlName,
+ _angular_common__WEBPACK_IMPORTED_MODULE_9__.AsyncPipe,
+ ],
+ styles: [
+ "\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ== */",
+ ],
+ changeDetection: 0,
+ });
+
+ /***/
+ },
+
+ /***/ 8677:
+ /*!********************************************************************!*\
+ !*** ./src/app/admin/manage-products/manage-products.component.ts ***!
+ \********************************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ ManageProductsComponent: () =>
+ /* binding */ ManageProductsComponent,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+ /* harmony import */ var _products_products_service__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ../../products/products.service */ 9855);
+ /* harmony import */ var _manage_products_service__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! ./manage-products.service */ 9310);
+ /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ =
+ __webpack_require__(/*! @angular/router */ 124);
+ /* harmony import */ var _shared_file_picker_file_picker_component__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(
+ /*! ../../shared/file-picker/file-picker.component */ 17
+ );
+ /* harmony import */ var _angular_material_table__WEBPACK_IMPORTED_MODULE_5__ =
+ __webpack_require__(/*! @angular/material/table */ 5288);
+ /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_6__ =
+ __webpack_require__(/*! @angular/material/button */ 4522);
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+
+ function ManageProductsComponent_th_8_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "th",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1, "Title");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ }
+ function ManageProductsComponent_td_9_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "td",
+ 14
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const product_r12 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](
+ " ",
+ product_r12.title,
+ " "
+ );
+ }
+ }
+ function ManageProductsComponent_th_11_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "th",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](
+ 1,
+ "Description"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ }
+ function ManageProductsComponent_td_12_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "td",
+ 14
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const product_r13 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](
+ product_r13.description
+ );
+ }
+ }
+ function ManageProductsComponent_th_14_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "th",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1, "Price");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ }
+ function ManageProductsComponent_td_15_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "td",
+ 14
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](2, "currency");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](3, "number");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const product_r14 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate1"](
+ " ",
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](
+ 2,
+ 1,
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind2"](
+ 3,
+ 3,
+ product_r14.price,
+ "1.2-2"
+ )
+ ),
+ " "
+ );
+ }
+ }
+ function ManageProductsComponent_th_17_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "th",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1, "Count");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ }
+ function ManageProductsComponent_td_18_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "td",
+ 14
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const product_r15 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtextInterpolate"](
+ product_r15.count
+ );
+ }
+ }
+ function ManageProductsComponent_th_20_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "th",
+ 13
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](1, "Action");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ }
+ function ManageProductsComponent_td_21_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "td",
+ 14
+ )(1, "button", 15);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](2, " manage ");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 3,
+ "button",
+ 16
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](4, " delete ");
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
+ }
+ if (rf & 2) {
+ const product_r16 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"](
+ "routerLink",
+ product_r16.id
+ );
+ }
+ }
+ function ManageProductsComponent_tr_22_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](
+ 0,
+ "tr",
+ 17
+ );
+ }
+ }
+ function ManageProductsComponent_tr_23_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](
+ 0,
+ "tr",
+ 18
+ );
+ }
+ }
+ class ManageProductsComponent {
+ constructor(productsService, manageProductsService, cdr) {
+ this.productsService = productsService;
+ this.manageProductsService = manageProductsService;
+ this.cdr = cdr;
+ this.columns = ["from", "description", "price", "count", "action"];
+ this.selectedFile = null;
+ }
+ ngOnInit() {
+ this.products$ = this.productsService.getProducts();
+ }
+ onUploadCSV() {
+ if (!this.selectedFile) {
+ return;
+ }
+ this.manageProductsService
+ .uploadProductsCSV(this.selectedFile)
+ .subscribe(() => {
+ this.selectedFile = null;
+ this.cdr.markForCheck();
+ });
+ }
+ }
+ ManageProductsComponent.ɵfac = function ManageProductsComponent_Factory(
+ t
+ ) {
+ return new (t || ManageProductsComponent)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](
+ _products_products_service__WEBPACK_IMPORTED_MODULE_0__.ProductsService
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](
+ _manage_products_service__WEBPACK_IMPORTED_MODULE_1__.ManageProductsService
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__.ChangeDetectorRef
+ )
+ );
+ };
+ ManageProductsComponent.ɵcmp =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵdefineComponent"
+ ]({
+ type: ManageProductsComponent,
+ selectors: [["app-manage-products"]],
+ decls: 24,
+ vars: 4,
+ consts: [
+ [1, "d-flex"],
+ [1, "mr-2", 3, "file", "fileChange", "uploadClick"],
+ [
+ "color",
+ "primary",
+ "mat-flat-button",
+ "",
+ "routerLink",
+ "new",
+ 1,
+ "text-uppercase",
+ ],
+ ["mat-table", "", 1, "w-100", 3, "dataSource"],
+ ["matColumnDef", "from"],
+ ["mat-header-cell", "", 4, "matHeaderCellDef"],
+ ["mat-cell", "", 4, "matCellDef"],
+ ["matColumnDef", "description"],
+ ["matColumnDef", "price"],
+ ["matColumnDef", "count"],
+ ["matColumnDef", "action"],
+ ["mat-header-row", "", 4, "matHeaderRowDef"],
+ ["mat-row", "", 4, "matRowDef", "matRowDefColumns"],
+ ["mat-header-cell", ""],
+ ["mat-cell", ""],
+ [
+ "color",
+ "primary",
+ "mat-flat-button",
+ "",
+ 1,
+ "text-uppercase",
+ "mr-2",
+ 3,
+ "routerLink",
+ ],
+ ["color", "warn", "mat-flat-button", "", 1, "text-uppercase"],
+ ["mat-header-row", ""],
+ ["mat-row", ""],
+ ],
+ template: function ManageProductsComponent_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 0,
+ "h1"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](
+ 1,
+ "Manage products"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 2,
+ "div",
+ 0
+ )(3, "app-file-picker", 1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"](
+ "fileChange",
+ function ManageProductsComponent_Template_app_file_picker_fileChange_3_listener(
+ $event
+ ) {
+ return (ctx.selectedFile = $event);
+ }
+ )(
+ "uploadClick",
+ function ManageProductsComponent_Template_app_file_picker_uploadClick_3_listener() {
+ return ctx.onUploadCSV();
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 4,
+ "button",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](
+ 5,
+ " create product "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](
+ 6,
+ "table",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerStart"
+ ](7, 4);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 8,
+ ManageProductsComponent_th_8_Template,
+ 2,
+ 0,
+ "th",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 9,
+ ManageProductsComponent_td_9_Template,
+ 2,
+ 1,
+ "td",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerStart"
+ ](10, 7);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 11,
+ ManageProductsComponent_th_11_Template,
+ 2,
+ 0,
+ "th",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 12,
+ ManageProductsComponent_td_12_Template,
+ 2,
+ 1,
+ "td",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerStart"
+ ](13, 8);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 14,
+ ManageProductsComponent_th_14_Template,
+ 2,
+ 0,
+ "th",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 15,
+ ManageProductsComponent_td_15_Template,
+ 4,
+ 6,
+ "td",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerStart"
+ ](16, 9);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 17,
+ ManageProductsComponent_th_17_Template,
+ 2,
+ 0,
+ "th",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 18,
+ ManageProductsComponent_td_18_Template,
+ 2,
+ 1,
+ "td",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerStart"
+ ](19, 10);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 20,
+ ManageProductsComponent_th_20_Template,
+ 2,
+ 0,
+ "th",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 21,
+ ManageProductsComponent_td_21_Template,
+ 5,
+ 1,
+ "td",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 22,
+ ManageProductsComponent_tr_22_Template,
+ 1,
+ 0,
+ "tr",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](
+ 23,
+ ManageProductsComponent_tr_23_Template,
+ 1,
+ 0,
+ "tr",
+ 12
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"](
+ "file",
+ ctx.selectedFile
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](3);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"](
+ "dataSource",
+ ctx.products$
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](16);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"](
+ "matHeaderRowDef",
+ ctx.columns
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"](
+ "matRowDefColumns",
+ ctx.columns
+ );
+ }
+ },
+ dependencies: [
+ _angular_router__WEBPACK_IMPORTED_MODULE_4__.RouterLink,
+ _shared_file_picker_file_picker_component__WEBPACK_IMPORTED_MODULE_2__.FilePickerComponent,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatTable,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatHeaderCellDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatHeaderRowDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatColumnDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatCellDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatRowDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatHeaderCell,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatCell,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatHeaderRow,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_5__.MatRow,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_6__.MatButton,
+ _angular_common__WEBPACK_IMPORTED_MODULE_7__.DecimalPipe,
+ _angular_common__WEBPACK_IMPORTED_MODULE_7__.CurrencyPipe,
+ ],
+ styles: [
+ "\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ== */",
+ ],
+ });
+
+ /***/
+ },
+
+ /***/ 9310:
+ /*!******************************************************************!*\
+ !*** ./src/app/admin/manage-products/manage-products.service.ts ***!
+ \******************************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ ManageProductsService: () =>
+ /* binding */ ManageProductsService,
+ /* harmony export */
+ });
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! rxjs */ 591);
+ /* harmony import */ var _core_api_service__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ../../core/api.service */ 9274);
+ /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! rxjs/operators */ 2673);
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+
+ class ManageProductsService extends _core_api_service__WEBPACK_IMPORTED_MODULE_0__.ApiService {
+ constructor(injector) {
+ super(injector);
+ }
+ uploadProductsCSV(file) {
+ if (!this.endpointEnabled("import")) {
+ console.warn(
+ 'Endpoint "import" is disabled. To enable change your environment.ts config'
+ );
+ return rxjs__WEBPACK_IMPORTED_MODULE_1__.EMPTY;
+ }
+ return this.getPreSignedUrl(file.name).pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.switchMap)(
+ (url) =>
+ this.http.put(url, file, {
+ headers: {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ "Content-Type": "text/csv",
+ },
+ })
+ )
+ );
+ }
+ getPreSignedUrl(fileName) {
+ const url = this.getUrl("import", "import");
+ return this.http.get(url, {
+ params: {
+ name: fileName,
+ },
+ });
+ }
+ }
+ ManageProductsService.ɵfac = function ManageProductsService_Factory(t) {
+ return new (t || ManageProductsService)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_3__.Injector
+ )
+ );
+ };
+ ManageProductsService.ɵprov =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__[
+ "ɵɵdefineInjectable"
+ ]({
+ token: ManageProductsService,
+ factory: ManageProductsService.ɵfac,
+ });
+
+ /***/
+ },
+
+ /***/ 63:
+ /*!**************************************************!*\
+ !*** ./src/app/admin/orders/orders.component.ts ***!
+ \**************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ OrdersComponent: () =>
+ /* binding */ OrdersComponent,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+ /* harmony import */ var _orders_service__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ./orders.service */ 3259);
+ /* harmony import */ var _angular_material_table__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! @angular/material/table */ 5288);
+
+ function OrdersComponent_th_4_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1, "From");
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ }
+ function OrdersComponent_td_5_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const order_r12 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate2"](
+ " ",
+ order_r12.address.firstName,
+ " ",
+ order_r12.address.firstName,
+ " "
+ );
+ }
+ }
+ function OrdersComponent_th_7_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1, "Count");
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ }
+ function OrdersComponent_td_8_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const order_r13 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](
+ order_r13.items.length
+ );
+ }
+ }
+ function OrdersComponent_th_10_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1, "Address");
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ }
+ function OrdersComponent_td_11_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const order_r14 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](
+ order_r14.address.address
+ );
+ }
+ }
+ function OrdersComponent_th_13_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1, "Status");
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ }
+ function OrdersComponent_td_14_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const order_r15 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](
+ order_r15.items.length
+ );
+ }
+ }
+ function OrdersComponent_th_16_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 10
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1, "Action");
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ }
+ function OrdersComponent_td_17_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 11
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const order_r16 = ctx.$implicit;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](
+ order_r16.items.length
+ );
+ }
+ }
+ function OrdersComponent_tr_18_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](
+ 0,
+ "tr",
+ 12
+ );
+ }
+ }
+ function OrdersComponent_tr_19_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](
+ 0,
+ "tr",
+ 13
+ );
+ }
+ }
+ class OrdersComponent {
+ constructor(ordersService) {
+ this.ordersService = ordersService;
+ this.columns = ["from", "count", "address", "status", "action"];
+ }
+ ngOnInit() {
+ this.orders$ = this.ordersService.getOrders();
+ }
+ }
+ OrdersComponent.ɵfac = function OrdersComponent_Factory(t) {
+ return new (t || OrdersComponent)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _orders_service__WEBPACK_IMPORTED_MODULE_0__.OrdersService
+ )
+ );
+ };
+ OrdersComponent.ɵcmp =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: OrdersComponent,
+ selectors: [["app-orders"]],
+ decls: 20,
+ vars: 3,
+ consts: [
+ ["mat-table", "", 1, "w-100", 3, "dataSource"],
+ ["matColumnDef", "from"],
+ ["mat-header-cell", "", 4, "matHeaderCellDef"],
+ ["mat-cell", "", 4, "matCellDef"],
+ ["matColumnDef", "count"],
+ ["matColumnDef", "address"],
+ ["matColumnDef", "status"],
+ ["matColumnDef", "action"],
+ ["mat-header-row", "", 4, "matHeaderRowDef"],
+ ["mat-row", "", 4, "matRowDef", "matRowDefColumns"],
+ ["mat-header-cell", ""],
+ ["mat-cell", ""],
+ ["mat-header-row", ""],
+ ["mat-row", ""],
+ ],
+ template: function OrdersComponent_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "h1"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](
+ 1,
+ "Manage orders"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 2,
+ "table",
+ 0
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](3, 1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 4,
+ OrdersComponent_th_4_Template,
+ 2,
+ 0,
+ "th",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 5,
+ OrdersComponent_td_5_Template,
+ 2,
+ 2,
+ "td",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](6, 4);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 7,
+ OrdersComponent_th_7_Template,
+ 2,
+ 0,
+ "th",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 8,
+ OrdersComponent_td_8_Template,
+ 2,
+ 1,
+ "td",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](9, 5);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 10,
+ OrdersComponent_th_10_Template,
+ 2,
+ 0,
+ "th",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 11,
+ OrdersComponent_td_11_Template,
+ 2,
+ 1,
+ "td",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](12, 6);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 13,
+ OrdersComponent_th_13_Template,
+ 2,
+ 0,
+ "th",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 14,
+ OrdersComponent_td_14_Template,
+ 2,
+ 1,
+ "td",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](15, 7);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 16,
+ OrdersComponent_th_16_Template,
+ 2,
+ 0,
+ "th",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 17,
+ OrdersComponent_td_17_Template,
+ 2,
+ 1,
+ "td",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 18,
+ OrdersComponent_tr_18_Template,
+ 1,
+ 0,
+ "tr",
+ 8
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 19,
+ OrdersComponent_tr_19_Template,
+ 1,
+ 0,
+ "tr",
+ 9
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"](
+ "dataSource",
+ ctx.orders$
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](16);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"](
+ "matHeaderRowDef",
+ ctx.columns
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"](
+ "matRowDefColumns",
+ ctx.columns
+ );
+ }
+ },
+ dependencies: [
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatTable,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatHeaderCellDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatHeaderRowDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatColumnDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatCellDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatRowDef,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatHeaderCell,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatCell,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatHeaderRow,
+ _angular_material_table__WEBPACK_IMPORTED_MODULE_2__.MatRow,
+ ],
+ styles: [
+ "\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ== */",
+ ],
+ });
+
+ /***/
+ },
+
+ /***/ 3259:
+ /*!************************************************!*\
+ !*** ./src/app/admin/orders/orders.service.ts ***!
+ \************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ OrdersService: () => /* binding */ OrdersService,
+ /* harmony export */
+ });
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! rxjs */ 745);
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+
+ class OrdersService {
+ constructor() {}
+ getOrders() {
+ return (0, rxjs__WEBPACK_IMPORTED_MODULE_0__.of)([]);
+ }
+ }
+ OrdersService.ɵfac = function OrdersService_Factory(t) {
+ return new (t || OrdersService)();
+ };
+ OrdersService.ɵprov =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineInjectable"
+ ]({
+ token: OrdersService,
+ factory: OrdersService.ɵfac,
+ });
+
+ /***/
+ },
+
+ /***/ 17:
+ /*!*************************************************************!*\
+ !*** ./src/app/shared/file-picker/file-picker.component.ts ***!
+ \*************************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ FilePickerComponent: () =>
+ /* binding */ FilePickerComponent,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+ /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! @angular/material/button */ 4522);
+
+ function FilePickerComponent_ng_container_3_Template(rf, ctx) {
+ if (rf & 1) {
+ const _r5 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵelementContainerStart"
+ ](0);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 1,
+ "span",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 3,
+ "button",
+ 6
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"](
+ "click",
+ function FilePickerComponent_ng_container_3_Template_button_click_3_listener() {
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](
+ _r5
+ );
+ const ctx_r4 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
+ return _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵresetView"
+ ](ctx_r4.uploadClick.emit());
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4, " Upload ");
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 5,
+ "button",
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"](
+ "click",
+ function FilePickerComponent_ng_container_3_Template_button_click_5_listener() {
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](
+ _r5
+ );
+ const ctx_r6 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
+ return _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵresetView"
+ ](ctx_r6.removeFile());
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](6, "Delete");
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵelementContainerEnd"
+ ]();
+ }
+ if (rf & 2) {
+ const ctx_r1 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](
+ "Selected file: ",
+ ctx_r1.file.name,
+ ""
+ );
+ }
+ }
+ function FilePickerComponent_ng_template_4_Template(rf, ctx) {
+ if (rf & 1) {
+ const _r8 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 0,
+ "span",
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](
+ 1,
+ "Select file to upload"
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 2,
+ "button",
+ 8
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"](
+ "click",
+ function FilePickerComponent_ng_template_4_Template_button_click_2_listener() {
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](
+ _r8
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
+ const _r0 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](1);
+ return _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵresetView"
+ ](_r0.click());
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](
+ 3,
+ " Import Products CSV "
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ }
+ }
+ class FilePickerComponent {
+ constructor() {
+ this.file = null;
+ this.fileChange =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter();
+ this.uploadClick =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter();
+ }
+ selectFile(files) {
+ if (!(files === null || files === void 0 ? void 0 : files.length)) {
+ this.removeFile();
+ return;
+ }
+ const file = files.item(0);
+ if (!["text/csv", "application/vnd.ms-excel"].includes(file.type)) {
+ this.removeFile();
+ return;
+ }
+ this.fileChange.emit(file);
+ this.file = file;
+ }
+ removeFile() {
+ this.file = null;
+ this.fileChange.emit(null);
+ }
+ }
+ FilePickerComponent.ɵfac = function FilePickerComponent_Factory(t) {
+ return new (t || FilePickerComponent)();
+ };
+ FilePickerComponent.ɵcmp =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵdefineComponent"
+ ]({
+ type: FilePickerComponent,
+ selectors: [["app-file-picker"]],
+ inputs: {
+ file: "file",
+ },
+ outputs: {
+ fileChange: "fileChange",
+ uploadClick: "uploadClick",
+ },
+ decls: 6,
+ vars: 2,
+ consts: [
+ ["accept", "text/csv", "type", "file", 1, "d-none", 3, "change"],
+ ["fileInput", ""],
+ [1, "h5", "mb-0", "text-muted", "d-flex", "align-items-center"],
+ [4, "ngIf", "ngIfElse"],
+ ["selectFileTemplate", ""],
+ [1, "mr-3"],
+ [
+ "color",
+ "primary",
+ "mat-flat-button",
+ "",
+ 1,
+ "mr-1",
+ 3,
+ "click",
+ ],
+ ["color", "warn", "mat-flat-button", "", 3, "click"],
+ ["color", "accent", "mat-flat-button", "", 3, "click"],
+ ],
+ template: function FilePickerComponent_Template(rf, ctx) {
+ if (rf & 1) {
+ const _r9 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵgetCurrentView"
+ ]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 0,
+ "input",
+ 0,
+ 1
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"](
+ "change",
+ function FilePickerComponent_Template_input_change_0_listener() {
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](
+ _r9
+ );
+ const _r0 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](
+ 1
+ );
+ return _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵresetView"
+ ](ctx.selectFile(_r0.files));
+ }
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](
+ 2,
+ "div",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](
+ 3,
+ FilePickerComponent_ng_container_3_Template,
+ 7,
+ 1,
+ "ng-container",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](
+ 4,
+ FilePickerComponent_ng_template_4_Template,
+ 4,
+ 0,
+ "ng-template",
+ null,
+ 4,
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵtemplateRefExtractor"
+ ]
+ );
+ }
+ if (rf & 2) {
+ const _r2 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵreference"](5);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"](
+ "ngIf",
+ ctx.file
+ )("ngIfElse", _r2);
+ }
+ },
+ dependencies: [
+ _angular_common__WEBPACK_IMPORTED_MODULE_1__.NgIf,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_2__.MatButton,
+ ],
+ styles: [
+ "\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ== */",
+ ],
+ });
+
+ /***/
+ },
+
+ /***/ 2145:
+ /*!**********************************************************!*\
+ !*** ./src/app/shared/file-picker/file-picker.module.ts ***!
+ \**********************************************************/
+ /***/ (
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ FilePickerModule: () =>
+ /* binding */ FilePickerModule,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+ /* harmony import */ var _file_picker_component__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! ./file-picker.component */ 17);
+ /* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! @angular/material/button */ 4522);
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+
+ class FilePickerModule {}
+ FilePickerModule.ɵfac = function FilePickerModule_Factory(t) {
+ return new (t || FilePickerModule)();
+ };
+ FilePickerModule.ɵmod =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineNgModule"
+ ]({
+ type: FilePickerModule,
+ });
+ FilePickerModule.ɵinj =
+ /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineInjector"
+ ]({
+ imports: [
+ _angular_common__WEBPACK_IMPORTED_MODULE_2__.CommonModule,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_3__.MatButtonModule,
+ ],
+ });
+ (function () {
+ (typeof ngJitMode === "undefined" || ngJitMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](
+ FilePickerModule,
+ {
+ declarations: [
+ _file_picker_component__WEBPACK_IMPORTED_MODULE_0__.FilePickerComponent,
+ ],
+ imports: [
+ _angular_common__WEBPACK_IMPORTED_MODULE_2__.CommonModule,
+ _angular_material_button__WEBPACK_IMPORTED_MODULE_3__.MatButtonModule,
+ ],
+ exports: [
+ _file_picker_component__WEBPACK_IMPORTED_MODULE_0__.FilePickerComponent,
+ ],
+ }
+ );
+ })();
+
+ /***/
+ },
+
+ /***/ 9673:
+ /*!******************************************************!*\
+ !*** ./node_modules/@angular/cdk/fesm2020/table.mjs ***!
+ \******************************************************/
+ /***/ (
+ __unused_webpack___webpack_module__,
+ __webpack_exports__,
+ __webpack_require__
+ ) => {
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ BaseCdkCell: () => /* binding */ BaseCdkCell,
+ /* harmony export */ BaseRowDef: () => /* binding */ BaseRowDef,
+ /* harmony export */ CDK_ROW_TEMPLATE: () =>
+ /* binding */ CDK_ROW_TEMPLATE,
+ /* harmony export */ CDK_TABLE: () => /* binding */ CDK_TABLE,
+ /* harmony export */ CDK_TABLE_TEMPLATE: () =>
+ /* binding */ CDK_TABLE_TEMPLATE,
+ /* harmony export */ CdkCell: () => /* binding */ CdkCell,
+ /* harmony export */ CdkCellDef: () => /* binding */ CdkCellDef,
+ /* harmony export */ CdkCellOutlet: () => /* binding */ CdkCellOutlet,
+ /* harmony export */ CdkColumnDef: () => /* binding */ CdkColumnDef,
+ /* harmony export */ CdkFooterCell: () => /* binding */ CdkFooterCell,
+ /* harmony export */ CdkFooterCellDef: () =>
+ /* binding */ CdkFooterCellDef,
+ /* harmony export */ CdkFooterRow: () => /* binding */ CdkFooterRow,
+ /* harmony export */ CdkFooterRowDef: () =>
+ /* binding */ CdkFooterRowDef,
+ /* harmony export */ CdkHeaderCell: () => /* binding */ CdkHeaderCell,
+ /* harmony export */ CdkHeaderCellDef: () =>
+ /* binding */ CdkHeaderCellDef,
+ /* harmony export */ CdkHeaderRow: () => /* binding */ CdkHeaderRow,
+ /* harmony export */ CdkHeaderRowDef: () =>
+ /* binding */ CdkHeaderRowDef,
+ /* harmony export */ CdkNoDataRow: () => /* binding */ CdkNoDataRow,
+ /* harmony export */ CdkRecycleRows: () =>
+ /* binding */ CdkRecycleRows,
+ /* harmony export */ CdkRow: () => /* binding */ CdkRow,
+ /* harmony export */ CdkRowDef: () => /* binding */ CdkRowDef,
+ /* harmony export */ CdkTable: () => /* binding */ CdkTable,
+ /* harmony export */ CdkTableModule: () =>
+ /* binding */ CdkTableModule,
+ /* harmony export */ CdkTextColumn: () => /* binding */ CdkTextColumn,
+ /* harmony export */ DataRowOutlet: () => /* binding */ DataRowOutlet,
+ /* harmony export */ DataSource: () =>
+ /* reexport safe */ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__.DataSource,
+ /* harmony export */ FooterRowOutlet: () =>
+ /* binding */ FooterRowOutlet,
+ /* harmony export */ HeaderRowOutlet: () =>
+ /* binding */ HeaderRowOutlet,
+ /* harmony export */ NoDataRowOutlet: () =>
+ /* binding */ NoDataRowOutlet,
+ /* harmony export */ STICKY_DIRECTIONS: () =>
+ /* binding */ STICKY_DIRECTIONS,
+ /* harmony export */ STICKY_POSITIONING_LISTENER: () =>
+ /* binding */ STICKY_POSITIONING_LISTENER,
+ /* harmony export */ StickyStyler: () => /* binding */ StickyStyler,
+ /* harmony export */ TEXT_COLUMN_OPTIONS: () =>
+ /* binding */ TEXT_COLUMN_OPTIONS,
+ /* harmony export */ _COALESCED_STYLE_SCHEDULER: () =>
+ /* binding */ _COALESCED_STYLE_SCHEDULER,
+ /* harmony export */ _CoalescedStyleScheduler: () =>
+ /* binding */ _CoalescedStyleScheduler,
+ /* harmony export */ _Schedule: () => /* binding */ _Schedule,
+ /* harmony export */ mixinHasStickyInput: () =>
+ /* binding */ mixinHasStickyInput,
+ /* harmony export */
+ });
+ /* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__ =
+ __webpack_require__(/*! @angular/cdk/bidi */ 2867);
+ /* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ =
+ __webpack_require__(/*! @angular/cdk/coercion */ 8971);
+ /* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__ =
+ __webpack_require__(/*! @angular/cdk/collections */ 1755);
+ /* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_12__ =
+ __webpack_require__(/*! @angular/cdk/platform */ 9107);
+ /* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_13__ =
+ __webpack_require__(/*! @angular/cdk/scrolling */ 6328);
+ /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_11__ =
+ __webpack_require__(/*! @angular/common */ 4666);
+ /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ =
+ __webpack_require__(/*! @angular/core */ 2560);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ =
+ __webpack_require__(/*! rxjs */ 228);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ =
+ __webpack_require__(/*! rxjs */ 9346);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ =
+ __webpack_require__(/*! rxjs */ 6317);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ =
+ __webpack_require__(/*! rxjs */ 4437);
+ /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ =
+ __webpack_require__(/*! rxjs */ 745);
+ /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ =
+ __webpack_require__(/*! rxjs/operators */ 8951);
+ /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ =
+ __webpack_require__(/*! rxjs/operators */ 9295);
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Mixin to provide a directive with a function that checks if the sticky input has been
+ * changed since the last time the function was called. Essentially adds a dirty-check to the
+ * sticky value.
+ * @docs-private
+ */
+ const _c0 = [[["caption"]], [["colgroup"], ["col"]]];
+ const _c1 = ["caption", "colgroup, col"];
+ function CdkTextColumn_th_1_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "th",
+ 3
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const ctx_r0 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵstyleProp"](
+ "text-align",
+ ctx_r0.justify
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](
+ " ",
+ ctx_r0.headerText,
+ " "
+ );
+ }
+ }
+ function CdkTextColumn_td_2_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](
+ 0,
+ "td",
+ 4
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
+ }
+ if (rf & 2) {
+ const data_r2 = ctx.$implicit;
+ const ctx_r1 =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"]();
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵstyleProp"](
+ "text-align",
+ ctx_r1.justify
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](
+ " ",
+ ctx_r1.dataAccessor(data_r2, ctx_r1.name),
+ " "
+ );
+ }
+ }
+ function mixinHasStickyInput(base) {
+ return class extends base {
+ /** Whether sticky positioning should be applied. */
+ get sticky() {
+ return this._sticky;
+ }
+ set sticky(v) {
+ const prevValue = this._sticky;
+ this._sticky = (0,
+ _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceBooleanProperty)(
+ v
+ );
+ this._hasStickyChanged = prevValue !== this._sticky;
+ }
+ /** Whether the sticky value has changed since this was last called. */
+ hasStickyChanged() {
+ const hasStickyChanged = this._hasStickyChanged;
+ this._hasStickyChanged = false;
+ return hasStickyChanged;
+ }
+ /** Resets the dirty check for cases where the sticky state has been used without checking. */
+ resetStickyChanged() {
+ this._hasStickyChanged = false;
+ }
+ constructor(...args) {
+ super(...args);
+ this._sticky = false;
+ /** Whether the sticky input has changed since it was last checked. */
+ this._hasStickyChanged = false;
+ }
+ };
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Used to provide a table to some of the sub-components without causing a circular dependency.
+ * @docs-private
+ */
+ const CDK_TABLE =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken(
+ "CDK_TABLE"
+ );
+ /** Injection token that can be used to specify the text column options. */
+ const TEXT_COLUMN_OPTIONS =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken(
+ "text-column-options"
+ );
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Cell definition for a CDK table.
+ * Captures the template of a column's data row cell as well as cell-specific properties.
+ */
+ class CdkCellDef {
+ constructor(/** @docs-private */ template) {
+ this.template = template;
+ }
+ }
+ CdkCellDef.ɵfac = function CdkCellDef_Factory(t) {
+ return new (t || CdkCellDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ )
+ );
+ };
+ CdkCellDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkCellDef,
+ selectors: [["", "cdkCellDef", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkCellDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkCellDef]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Header cell definition for a CDK table.
+ * Captures the template of a column's header cell and as well as cell-specific properties.
+ */
+ class CdkHeaderCellDef {
+ constructor(/** @docs-private */ template) {
+ this.template = template;
+ }
+ }
+ CdkHeaderCellDef.ɵfac = function CdkHeaderCellDef_Factory(t) {
+ return new (t || CdkHeaderCellDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ )
+ );
+ };
+ CdkHeaderCellDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkHeaderCellDef,
+ selectors: [["", "cdkHeaderCellDef", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkHeaderCellDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkHeaderCellDef]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Footer cell definition for a CDK table.
+ * Captures the template of a column's footer cell and as well as cell-specific properties.
+ */
+ class CdkFooterCellDef {
+ constructor(/** @docs-private */ template) {
+ this.template = template;
+ }
+ }
+ CdkFooterCellDef.ɵfac = function CdkFooterCellDef_Factory(t) {
+ return new (t || CdkFooterCellDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ )
+ );
+ };
+ CdkFooterCellDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkFooterCellDef,
+ selectors: [["", "cdkFooterCellDef", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkFooterCellDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkFooterCellDef]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ // Boilerplate for applying mixins to CdkColumnDef.
+ /** @docs-private */
+ class CdkColumnDefBase {}
+ const _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);
+ /**
+ * Column definition for the CDK table.
+ * Defines a set of cells available for a table column.
+ */
+ class CdkColumnDef extends _CdkColumnDefBase {
+ /** Unique name for this column. */
+ get name() {
+ return this._name;
+ }
+ set name(name) {
+ this._setNameInput(name);
+ }
+ /**
+ * Whether this column should be sticky positioned on the end of the row. Should make sure
+ * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value
+ * has been changed.
+ */
+ get stickyEnd() {
+ return this._stickyEnd;
+ }
+ set stickyEnd(v) {
+ const prevValue = this._stickyEnd;
+ this._stickyEnd = (0,
+ _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceBooleanProperty)(
+ v
+ );
+ this._hasStickyChanged = prevValue !== this._stickyEnd;
+ }
+ constructor(_table) {
+ super();
+ this._table = _table;
+ this._stickyEnd = false;
+ }
+ /**
+ * Overridable method that sets the css classes that will be added to every cell in this
+ * column.
+ * In the future, columnCssClassName will change from type string[] to string and this
+ * will set a single string value.
+ * @docs-private
+ */
+ _updateColumnCssClassName() {
+ this._columnCssClassName = [
+ `cdk-column-${this.cssClassFriendlyName}`,
+ ];
+ }
+ /**
+ * This has been extracted to a util because of TS 4 and VE.
+ * View Engine doesn't support property rename inheritance.
+ * TS 4.0 doesn't allow properties to override accessors or vice-versa.
+ * @docs-private
+ */
+ _setNameInput(value) {
+ // If the directive is set without a name (updated programmatically), then this setter will
+ // trigger with an empty string and should not overwrite the programmatically set value.
+ if (value) {
+ this._name = value;
+ this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, "-");
+ this._updateColumnCssClassName();
+ }
+ }
+ }
+ CdkColumnDef.ɵfac = function CdkColumnDef_Factory(t) {
+ return new (t || CdkColumnDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CDK_TABLE,
+ 8
+ )
+ );
+ };
+ CdkColumnDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkColumnDef,
+ selectors: [["", "cdkColumnDef", ""]],
+ contentQueries: function CdkColumnDef_ContentQueries(
+ rf,
+ ctx,
+ dirIndex
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkCellDef,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkHeaderCellDef,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkFooterCellDef,
+ 5
+ );
+ }
+ if (rf & 2) {
+ let _t;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.cell = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.headerCell = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.footerCell = _t.first);
+ }
+ },
+ inputs: {
+ sticky: "sticky",
+ name: ["cdkColumnDef", "name"],
+ stickyEnd: "stickyEnd",
+ },
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([
+ {
+ provide: "MAT_SORT_HEADER_COLUMN_DEF",
+ useExisting: CdkColumnDef,
+ },
+ ]),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkColumnDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkColumnDef]",
+ inputs: ["sticky"],
+ providers: [
+ {
+ provide: "MAT_SORT_HEADER_COLUMN_DEF",
+ useExisting: CdkColumnDef,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [CDK_TABLE],
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ ];
+ },
+ {
+ name: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ args: ["cdkColumnDef"],
+ },
+ ],
+ stickyEnd: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ args: ["stickyEnd"],
+ },
+ ],
+ cell: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChild,
+ args: [CdkCellDef],
+ },
+ ],
+ headerCell: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChild,
+ args: [CdkHeaderCellDef],
+ },
+ ],
+ footerCell: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChild,
+ args: [CdkFooterCellDef],
+ },
+ ],
+ }
+ );
+ })();
+ /** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */
+ class BaseCdkCell {
+ constructor(columnDef, elementRef) {
+ elementRef.nativeElement.classList.add(
+ ...columnDef._columnCssClassName
+ );
+ }
+ }
+ /** Header cell template container that adds the right classes and role. */
+ class CdkHeaderCell extends BaseCdkCell {
+ constructor(columnDef, elementRef) {
+ super(columnDef, elementRef);
+ }
+ }
+ CdkHeaderCell.ɵfac = function CdkHeaderCell_Factory(t) {
+ return new (t || CdkHeaderCell)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CdkColumnDef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ CdkHeaderCell.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkHeaderCell,
+ selectors: [["cdk-header-cell"], ["th", "cdk-header-cell", ""]],
+ hostAttrs: ["role", "columnheader", 1, "cdk-header-cell"],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkHeaderCell,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "cdk-header-cell, th[cdk-header-cell]",
+ host: {
+ class: "cdk-header-cell",
+ role: "columnheader",
+ },
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: CdkColumnDef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /** Footer cell template container that adds the right classes and role. */
+ class CdkFooterCell extends BaseCdkCell {
+ constructor(columnDef, elementRef) {
+ super(columnDef, elementRef);
+ if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {
+ const tableRole =
+ columnDef._table._elementRef.nativeElement.getAttribute("role");
+ const role =
+ tableRole === "grid" || tableRole === "treegrid"
+ ? "gridcell"
+ : "cell";
+ elementRef.nativeElement.setAttribute("role", role);
+ }
+ }
+ }
+ CdkFooterCell.ɵfac = function CdkFooterCell_Factory(t) {
+ return new (t || CdkFooterCell)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CdkColumnDef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ CdkFooterCell.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkFooterCell,
+ selectors: [["cdk-footer-cell"], ["td", "cdk-footer-cell", ""]],
+ hostAttrs: [1, "cdk-footer-cell"],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkFooterCell,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "cdk-footer-cell, td[cdk-footer-cell]",
+ host: {
+ class: "cdk-footer-cell",
+ },
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: CdkColumnDef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /** Cell template container that adds the right classes and role. */
+ class CdkCell extends BaseCdkCell {
+ constructor(columnDef, elementRef) {
+ super(columnDef, elementRef);
+ if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {
+ const tableRole =
+ columnDef._table._elementRef.nativeElement.getAttribute("role");
+ const role =
+ tableRole === "grid" || tableRole === "treegrid"
+ ? "gridcell"
+ : "cell";
+ elementRef.nativeElement.setAttribute("role", role);
+ }
+ }
+ }
+ CdkCell.ɵfac = function CdkCell_Factory(t) {
+ return new (t || CdkCell)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CdkColumnDef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ CdkCell.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkCell,
+ selectors: [["cdk-cell"], ["td", "cdk-cell", ""]],
+ hostAttrs: [1, "cdk-cell"],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkCell,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "cdk-cell, td[cdk-cell]",
+ host: {
+ class: "cdk-cell",
+ },
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: CdkColumnDef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * @docs-private
+ */
+ class _Schedule {
+ constructor() {
+ this.tasks = [];
+ this.endTasks = [];
+ }
+ }
+ /** Injection token used to provide a coalesced style scheduler. */
+ const _COALESCED_STYLE_SCHEDULER =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken(
+ "_COALESCED_STYLE_SCHEDULER"
+ );
+ /**
+ * Allows grouping up CSSDom mutations after the current execution context.
+ * This can significantly improve performance when separate consecutive functions are
+ * reading from the CSSDom and then mutating it.
+ *
+ * @docs-private
+ */
+ class _CoalescedStyleScheduler {
+ constructor(_ngZone) {
+ this._ngZone = _ngZone;
+ this._currentSchedule = null;
+ this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject();
+ }
+ /**
+ * Schedules the specified task to run at the end of the current VM turn.
+ */
+ schedule(task) {
+ this._createScheduleIfNeeded();
+ this._currentSchedule.tasks.push(task);
+ }
+ /**
+ * Schedules the specified task to run after other scheduled tasks at the end of the current
+ * VM turn.
+ */
+ scheduleEnd(task) {
+ this._createScheduleIfNeeded();
+ this._currentSchedule.endTasks.push(task);
+ }
+ /** Prevent any further tasks from running. */
+ ngOnDestroy() {
+ this._destroyed.next();
+ this._destroyed.complete();
+ }
+ _createScheduleIfNeeded() {
+ if (this._currentSchedule) {
+ return;
+ }
+ this._currentSchedule = new _Schedule();
+ this._getScheduleObservable()
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(
+ this._destroyed
+ )
+ )
+ .subscribe(() => {
+ while (
+ this._currentSchedule.tasks.length ||
+ this._currentSchedule.endTasks.length
+ ) {
+ const schedule = this._currentSchedule;
+ // Capture new tasks scheduled by the current set of tasks.
+ this._currentSchedule = new _Schedule();
+ for (const task of schedule.tasks) {
+ task();
+ }
+ for (const task of schedule.endTasks) {
+ task();
+ }
+ }
+ this._currentSchedule = null;
+ });
+ }
+ _getScheduleObservable() {
+ // Use onStable when in the context of an ongoing change detection cycle so that we
+ // do not accidentally trigger additional cycles.
+ return this._ngZone.isStable
+ ? (0, rxjs__WEBPACK_IMPORTED_MODULE_5__.from)(
+ Promise.resolve(undefined)
+ )
+ : this._ngZone.onStable.pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.take)(1)
+ );
+ }
+ }
+ _CoalescedStyleScheduler.ɵfac =
+ function _CoalescedStyleScheduler_Factory(t) {
+ return new (t || _CoalescedStyleScheduler)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone
+ )
+ );
+ };
+ _CoalescedStyleScheduler.ɵprov =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineInjectable"
+ ]({
+ token: _CoalescedStyleScheduler,
+ factory: _CoalescedStyleScheduler.ɵfac,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ _CoalescedStyleScheduler,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injectable,
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone,
+ },
+ ];
+ },
+ null
+ );
+ })();
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * The row template that can be used by the mat-table. Should not be used outside of the
+ * material library.
+ */
+ const CDK_ROW_TEMPLATE = ``;
+ /**
+ * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
+ * for changes and notifying the table.
+ */
+ class BaseRowDef {
+ constructor(/** @docs-private */ template, _differs) {
+ this.template = template;
+ this._differs = _differs;
+ }
+ ngOnChanges(changes) {
+ // Create a new columns differ if one does not yet exist. Initialize it based on initial value
+ // of the columns property or an empty array if none is provided.
+ if (!this._columnsDiffer) {
+ const columns =
+ (changes["columns"] && changes["columns"].currentValue) || [];
+ this._columnsDiffer = this._differs.find(columns).create();
+ this._columnsDiffer.diff(columns);
+ }
+ }
+ /**
+ * Returns the difference between the current columns and the columns from the last diff, or null
+ * if there is no difference.
+ */
+ getColumnsDiff() {
+ return this._columnsDiffer.diff(this.columns);
+ }
+ /** Gets this row def's relevant cell template from the provided column def. */
+ extractCellTemplate(column) {
+ if (this instanceof CdkHeaderRowDef) {
+ return column.headerCell.template;
+ }
+ if (this instanceof CdkFooterRowDef) {
+ return column.footerCell.template;
+ } else {
+ return column.cell.template;
+ }
+ }
+ }
+ BaseRowDef.ɵfac = function BaseRowDef_Factory(t) {
+ return new (t || BaseRowDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers
+ )
+ );
+ };
+ BaseRowDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: BaseRowDef,
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵNgOnChangesFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ BaseRowDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ // Boilerplate for applying mixins to CdkHeaderRowDef.
+ /** @docs-private */
+ class CdkHeaderRowDefBase extends BaseRowDef {}
+ const _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);
+ /**
+ * Header row definition for the CDK table.
+ * Captures the header row's template and other header properties such as the columns to display.
+ */
+ class CdkHeaderRowDef extends _CdkHeaderRowDefBase {
+ constructor(template, _differs, _table) {
+ super(template, _differs);
+ this._table = _table;
+ }
+ // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
+ // Explicitly define it so that the method is called as part of the Angular lifecycle.
+ ngOnChanges(changes) {
+ super.ngOnChanges(changes);
+ }
+ }
+ CdkHeaderRowDef.ɵfac = function CdkHeaderRowDef_Factory(t) {
+ return new (t || CdkHeaderRowDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CDK_TABLE,
+ 8
+ )
+ );
+ };
+ CdkHeaderRowDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkHeaderRowDef,
+ selectors: [["", "cdkHeaderRowDef", ""]],
+ inputs: {
+ columns: ["cdkHeaderRowDef", "columns"],
+ sticky: ["cdkHeaderRowDefSticky", "sticky"],
+ },
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵNgOnChangesFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkHeaderRowDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkHeaderRowDef]",
+ inputs: [
+ "columns: cdkHeaderRowDef",
+ "sticky: cdkHeaderRowDefSticky",
+ ],
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [CDK_TABLE],
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ ];
+ },
+ null
+ );
+ })();
+ // Boilerplate for applying mixins to CdkFooterRowDef.
+ /** @docs-private */
+ class CdkFooterRowDefBase extends BaseRowDef {}
+ const _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);
+ /**
+ * Footer row definition for the CDK table.
+ * Captures the footer row's template and other footer properties such as the columns to display.
+ */
+ class CdkFooterRowDef extends _CdkFooterRowDefBase {
+ constructor(template, _differs, _table) {
+ super(template, _differs);
+ this._table = _table;
+ }
+ // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.
+ // Explicitly define it so that the method is called as part of the Angular lifecycle.
+ ngOnChanges(changes) {
+ super.ngOnChanges(changes);
+ }
+ }
+ CdkFooterRowDef.ɵfac = function CdkFooterRowDef_Factory(t) {
+ return new (t || CdkFooterRowDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CDK_TABLE,
+ 8
+ )
+ );
+ };
+ CdkFooterRowDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkFooterRowDef,
+ selectors: [["", "cdkFooterRowDef", ""]],
+ inputs: {
+ columns: ["cdkFooterRowDef", "columns"],
+ sticky: ["cdkFooterRowDefSticky", "sticky"],
+ },
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵNgOnChangesFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkFooterRowDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkFooterRowDef]",
+ inputs: [
+ "columns: cdkFooterRowDef",
+ "sticky: cdkFooterRowDefSticky",
+ ],
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [CDK_TABLE],
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Data row definition for the CDK table.
+ * Captures the header row's template and other row properties such as the columns to display and
+ * a when predicate that describes when this row should be used.
+ */
+ class CdkRowDef extends BaseRowDef {
+ // TODO(andrewseguin): Add an input for providing a switch function to determine
+ // if this template should be used.
+ constructor(template, _differs, _table) {
+ super(template, _differs);
+ this._table = _table;
+ }
+ }
+ CdkRowDef.ɵfac = function CdkRowDef_Factory(t) {
+ return new (t || CdkRowDef)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CDK_TABLE,
+ 8
+ )
+ );
+ };
+ CdkRowDef.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkRowDef,
+ selectors: [["", "cdkRowDef", ""]],
+ inputs: {
+ columns: ["cdkRowDefColumns", "columns"],
+ when: ["cdkRowDefWhen", "when"],
+ },
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkRowDef,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkRowDef]",
+ inputs: [
+ "columns: cdkRowDefColumns",
+ "when: cdkRowDefWhen",
+ ],
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [CDK_TABLE],
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Outlet for rendering cells inside of a row or header row.
+ * @docs-private
+ */
+ class CdkCellOutlet {
+ constructor(_viewContainer) {
+ this._viewContainer = _viewContainer;
+ CdkCellOutlet.mostRecentCellOutlet = this;
+ }
+ ngOnDestroy() {
+ // If this was the last outlet being rendered in the view, remove the reference
+ // from the static property after it has been destroyed to avoid leaking memory.
+ if (CdkCellOutlet.mostRecentCellOutlet === this) {
+ CdkCellOutlet.mostRecentCellOutlet = null;
+ }
+ }
+ }
+ /**
+ * Static property containing the latest constructed instance of this class.
+ * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using
+ * createEmbeddedView. After one of these components are created, this property will provide
+ * a handle to provide that component's cells and context. After init, the CdkCellOutlet will
+ * construct the cells with the provided context.
+ */
+ CdkCellOutlet.mostRecentCellOutlet = null;
+ CdkCellOutlet.ɵfac = function CdkCellOutlet_Factory(t) {
+ return new (t || CdkCellOutlet)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef
+ )
+ );
+ };
+ CdkCellOutlet.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkCellOutlet,
+ selectors: [["", "cdkCellOutlet", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkCellOutlet,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[cdkCellOutlet]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /** Header template container that contains the cell outlet. Adds the right class and role. */
+ class CdkHeaderRow {}
+ CdkHeaderRow.ɵfac = function CdkHeaderRow_Factory(t) {
+ return new (t || CdkHeaderRow)();
+ };
+ CdkHeaderRow.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: CdkHeaderRow,
+ selectors: [["cdk-header-row"], ["tr", "cdk-header-row", ""]],
+ hostAttrs: ["role", "row", 1, "cdk-header-row"],
+ decls: 1,
+ vars: 0,
+ consts: [["cdkCellOutlet", ""]],
+ template: function CdkHeaderRow_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainer"
+ ](0, 0);
+ }
+ },
+ dependencies: [CdkCellOutlet],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkHeaderRow,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component,
+ args: [
+ {
+ selector: "cdk-header-row, tr[cdk-header-row]",
+ template: CDK_ROW_TEMPLATE,
+ host: {
+ class: "cdk-header-row",
+ role: "row",
+ },
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
+ // tslint:disable-next-line:validate-decorators
+ changeDetection:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ChangeDetectionStrategy.Default,
+ encapsulation:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ViewEncapsulation.None,
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+ /** Footer template container that contains the cell outlet. Adds the right class and role. */
+ class CdkFooterRow {}
+ CdkFooterRow.ɵfac = function CdkFooterRow_Factory(t) {
+ return new (t || CdkFooterRow)();
+ };
+ CdkFooterRow.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: CdkFooterRow,
+ selectors: [["cdk-footer-row"], ["tr", "cdk-footer-row", ""]],
+ hostAttrs: ["role", "row", 1, "cdk-footer-row"],
+ decls: 1,
+ vars: 0,
+ consts: [["cdkCellOutlet", ""]],
+ template: function CdkFooterRow_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainer"
+ ](0, 0);
+ }
+ },
+ dependencies: [CdkCellOutlet],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkFooterRow,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component,
+ args: [
+ {
+ selector: "cdk-footer-row, tr[cdk-footer-row]",
+ template: CDK_ROW_TEMPLATE,
+ host: {
+ class: "cdk-footer-row",
+ role: "row",
+ },
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
+ // tslint:disable-next-line:validate-decorators
+ changeDetection:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ChangeDetectionStrategy.Default,
+ encapsulation:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ViewEncapsulation.None,
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+ /** Data row template container that contains the cell outlet. Adds the right class and role. */
+ class CdkRow {}
+ CdkRow.ɵfac = function CdkRow_Factory(t) {
+ return new (t || CdkRow)();
+ };
+ CdkRow.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: CdkRow,
+ selectors: [["cdk-row"], ["tr", "cdk-row", ""]],
+ hostAttrs: ["role", "row", 1, "cdk-row"],
+ decls: 1,
+ vars: 0,
+ consts: [["cdkCellOutlet", ""]],
+ template: function CdkRow_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainer"
+ ](0, 0);
+ }
+ },
+ dependencies: [CdkCellOutlet],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkRow,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component,
+ args: [
+ {
+ selector: "cdk-row, tr[cdk-row]",
+ template: CDK_ROW_TEMPLATE,
+ host: {
+ class: "cdk-row",
+ role: "row",
+ },
+ // See note on CdkTable for explanation on why this uses the default change detection strategy.
+ // tslint:disable-next-line:validate-decorators
+ changeDetection:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ChangeDetectionStrategy.Default,
+ encapsulation:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ViewEncapsulation.None,
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+ /** Row that can be used to display a message when no data is shown in the table. */
+ class CdkNoDataRow {
+ constructor(templateRef) {
+ this.templateRef = templateRef;
+ this._contentClassName = "cdk-no-data-row";
+ }
+ }
+ CdkNoDataRow.ɵfac = function CdkNoDataRow_Factory(t) {
+ return new (t || CdkNoDataRow)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef
+ )
+ );
+ };
+ CdkNoDataRow.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkNoDataRow,
+ selectors: [["ng-template", "cdkNoDataRow", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkNoDataRow,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "ng-template[cdkNoDataRow]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * List of all possible directions that can be used for sticky positioning.
+ * @docs-private
+ */
+ const STICKY_DIRECTIONS = ["top", "bottom", "left", "right"];
+ /**
+ * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.
+ * @docs-private
+ */
+ class StickyStyler {
+ /**
+ * @param _isNativeHtmlTable Whether the sticky logic should be based on a table
+ * that uses the native `
` element.
+ * @param _stickCellCss The CSS class that will be applied to every row/cell that has
+ * sticky positioning applied.
+ * @param direction The directionality context of the table (ltr/rtl); affects column positioning
+ * by reversing left/right positions.
+ * @param _isBrowser Whether the table is currently being rendered on the server or the client.
+ * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells
+ * using inline styles. If false, it is assumed that position: sticky is included in
+ * the component stylesheet for _stickCellCss.
+ * @param _positionListener A listener that is notified of changes to sticky rows/columns
+ * and their dimensions.
+ */
+ constructor(
+ _isNativeHtmlTable,
+ _stickCellCss,
+ direction,
+ _coalescedStyleScheduler,
+ _isBrowser = true,
+ _needsPositionStickyOnElement = true,
+ _positionListener
+ ) {
+ this._isNativeHtmlTable = _isNativeHtmlTable;
+ this._stickCellCss = _stickCellCss;
+ this.direction = direction;
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
+ this._isBrowser = _isBrowser;
+ this._needsPositionStickyOnElement = _needsPositionStickyOnElement;
+ this._positionListener = _positionListener;
+ this._cachedCellWidths = [];
+ this._borderCellCss = {
+ top: `${_stickCellCss}-border-elem-top`,
+ bottom: `${_stickCellCss}-border-elem-bottom`,
+ left: `${_stickCellCss}-border-elem-left`,
+ right: `${_stickCellCss}-border-elem-right`,
+ };
+ }
+ /**
+ * Clears the sticky positioning styles from the row and its cells by resetting the `position`
+ * style, setting the zIndex to 0, and unsetting each provided sticky direction.
+ * @param rows The list of rows that should be cleared from sticking in the provided directions
+ * @param stickyDirections The directions that should no longer be set as sticky on the rows.
+ */
+ clearStickyPositioning(rows, stickyDirections) {
+ const elementsToClear = [];
+ for (const row of rows) {
+ // If the row isn't an element (e.g. if it's an `ng-container`),
+ // it won't have inline styles or `children` so we skip it.
+ if (row.nodeType !== row.ELEMENT_NODE) {
+ continue;
+ }
+ elementsToClear.push(row);
+ for (let i = 0; i < row.children.length; i++) {
+ elementsToClear.push(row.children[i]);
+ }
+ }
+ // Coalesce with sticky row/column updates (and potentially other changes like column resize).
+ this._coalescedStyleScheduler.schedule(() => {
+ for (const element of elementsToClear) {
+ this._removeStickyStyle(element, stickyDirections);
+ }
+ });
+ }
+ /**
+ * Applies sticky left and right positions to the cells of each row according to the sticky
+ * states of the rendered column definitions.
+ * @param rows The rows that should have its set of cells stuck according to the sticky states.
+ * @param stickyStartStates A list of boolean states where each state represents whether the cell
+ * in this index position should be stuck to the start of the row.
+ * @param stickyEndStates A list of boolean states where each state represents whether the cell
+ * in this index position should be stuck to the end of the row.
+ * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each
+ * column cell. If `false` cached widths will be used instead.
+ */
+ updateStickyColumns(
+ rows,
+ stickyStartStates,
+ stickyEndStates,
+ recalculateCellWidths = true
+ ) {
+ if (
+ !rows.length ||
+ !this._isBrowser ||
+ !(
+ stickyStartStates.some((state) => state) ||
+ stickyEndStates.some((state) => state)
+ )
+ ) {
+ if (this._positionListener) {
+ this._positionListener.stickyColumnsUpdated({
+ sizes: [],
+ });
+ this._positionListener.stickyEndColumnsUpdated({
+ sizes: [],
+ });
+ }
+ return;
+ }
+ const firstRow = rows[0];
+ const numCells = firstRow.children.length;
+ const cellWidths = this._getCellWidths(
+ firstRow,
+ recalculateCellWidths
+ );
+ const startPositions = this._getStickyStartColumnPositions(
+ cellWidths,
+ stickyStartStates
+ );
+ const endPositions = this._getStickyEndColumnPositions(
+ cellWidths,
+ stickyEndStates
+ );
+ const lastStickyStart = stickyStartStates.lastIndexOf(true);
+ const firstStickyEnd = stickyEndStates.indexOf(true);
+ // Coalesce with sticky row updates (and potentially other changes like column resize).
+ this._coalescedStyleScheduler.schedule(() => {
+ const isRtl = this.direction === "rtl";
+ const start = isRtl ? "right" : "left";
+ const end = isRtl ? "left" : "right";
+ for (const row of rows) {
+ for (let i = 0; i < numCells; i++) {
+ const cell = row.children[i];
+ if (stickyStartStates[i]) {
+ this._addStickyStyle(
+ cell,
+ start,
+ startPositions[i],
+ i === lastStickyStart
+ );
+ }
+ if (stickyEndStates[i]) {
+ this._addStickyStyle(
+ cell,
+ end,
+ endPositions[i],
+ i === firstStickyEnd
+ );
+ }
+ }
+ }
+ if (this._positionListener) {
+ this._positionListener.stickyColumnsUpdated({
+ sizes:
+ lastStickyStart === -1
+ ? []
+ : cellWidths
+ .slice(0, lastStickyStart + 1)
+ .map((width, index) =>
+ stickyStartStates[index] ? width : null
+ ),
+ });
+ this._positionListener.stickyEndColumnsUpdated({
+ sizes:
+ firstStickyEnd === -1
+ ? []
+ : cellWidths
+ .slice(firstStickyEnd)
+ .map((width, index) =>
+ stickyEndStates[index + firstStickyEnd]
+ ? width
+ : null
+ )
+ .reverse(),
+ });
+ }
+ });
+ }
+ /**
+ * Applies sticky positioning to the row's cells if using the native table layout, and to the
+ * row itself otherwise.
+ * @param rowsToStick The list of rows that should be stuck according to their corresponding
+ * sticky state and to the provided top or bottom position.
+ * @param stickyStates A list of boolean states where each state represents whether the row
+ * should be stuck in the particular top or bottom position.
+ * @param position The position direction in which the row should be stuck if that row should be
+ * sticky.
+ *
+ */
+ stickRows(rowsToStick, stickyStates, position) {
+ // Since we can't measure the rows on the server, we can't stick the rows properly.
+ if (!this._isBrowser) {
+ return;
+ }
+ // If positioning the rows to the bottom, reverse their order when evaluating the sticky
+ // position such that the last row stuck will be "bottom: 0px" and so on. Note that the
+ // sticky states need to be reversed as well.
+ const rows =
+ position === "bottom"
+ ? rowsToStick.slice().reverse()
+ : rowsToStick;
+ const states =
+ position === "bottom"
+ ? stickyStates.slice().reverse()
+ : stickyStates;
+ // Measure row heights all at once before adding sticky styles to reduce layout thrashing.
+ const stickyOffsets = [];
+ const stickyCellHeights = [];
+ const elementsToStick = [];
+ for (
+ let rowIndex = 0, stickyOffset = 0;
+ rowIndex < rows.length;
+ rowIndex++
+ ) {
+ if (!states[rowIndex]) {
+ continue;
+ }
+ stickyOffsets[rowIndex] = stickyOffset;
+ const row = rows[rowIndex];
+ elementsToStick[rowIndex] = this._isNativeHtmlTable
+ ? Array.from(row.children)
+ : [row];
+ const height = row.getBoundingClientRect().height;
+ stickyOffset += height;
+ stickyCellHeights[rowIndex] = height;
+ }
+ const borderedRowIndex = states.lastIndexOf(true);
+ // Coalesce with other sticky row updates (top/bottom), sticky columns updates
+ // (and potentially other changes like column resize).
+ this._coalescedStyleScheduler.schedule(() => {
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
+ if (!states[rowIndex]) {
+ continue;
+ }
+ const offset = stickyOffsets[rowIndex];
+ const isBorderedRowIndex = rowIndex === borderedRowIndex;
+ for (const element of elementsToStick[rowIndex]) {
+ this._addStickyStyle(
+ element,
+ position,
+ offset,
+ isBorderedRowIndex
+ );
+ }
+ }
+ if (position === "top") {
+ this._positionListener?.stickyHeaderRowsUpdated({
+ sizes: stickyCellHeights,
+ offsets: stickyOffsets,
+ elements: elementsToStick,
+ });
+ } else {
+ this._positionListener?.stickyFooterRowsUpdated({
+ sizes: stickyCellHeights,
+ offsets: stickyOffsets,
+ elements: elementsToStick,
+ });
+ }
+ });
+ }
+ /**
+ * When using the native table in Safari, sticky footer cells do not stick. The only way to stick
+ * footer rows is to apply sticky styling to the tfoot container. This should only be done if
+ * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from
+ * the tfoot element.
+ */
+ updateStickyFooterContainer(tableElement, stickyStates) {
+ if (!this._isNativeHtmlTable) {
+ return;
+ }
+ const tfoot = tableElement.querySelector("tfoot");
+ // Coalesce with other sticky updates (and potentially other changes like column resize).
+ this._coalescedStyleScheduler.schedule(() => {
+ if (stickyStates.some((state) => !state)) {
+ this._removeStickyStyle(tfoot, ["bottom"]);
+ } else {
+ this._addStickyStyle(tfoot, "bottom", 0, false);
+ }
+ });
+ }
+ /**
+ * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating
+ * the zIndex, removing each of the provided sticky directions, and removing the
+ * sticky position if there are no more directions.
+ */
+ _removeStickyStyle(element, stickyDirections) {
+ for (const dir of stickyDirections) {
+ element.style[dir] = "";
+ element.classList.remove(this._borderCellCss[dir]);
+ }
+ // If the element no longer has any more sticky directions, remove sticky positioning and
+ // the sticky CSS class.
+ // Short-circuit checking element.style[dir] for stickyDirections as they
+ // were already removed above.
+ const hasDirection = STICKY_DIRECTIONS.some(
+ (dir) =>
+ stickyDirections.indexOf(dir) === -1 && element.style[dir]
+ );
+ if (hasDirection) {
+ element.style.zIndex = this._getCalculatedZIndex(element);
+ } else {
+ // When not hasDirection, _getCalculatedZIndex will always return ''.
+ element.style.zIndex = "";
+ if (this._needsPositionStickyOnElement) {
+ element.style.position = "";
+ }
+ element.classList.remove(this._stickCellCss);
+ }
+ }
+ /**
+ * Adds the sticky styling to the element by adding the sticky style class, changing position
+ * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky
+ * direction and value.
+ */
+ _addStickyStyle(element, dir, dirValue, isBorderElement) {
+ element.classList.add(this._stickCellCss);
+ if (isBorderElement) {
+ element.classList.add(this._borderCellCss[dir]);
+ }
+ element.style[dir] = `${dirValue}px`;
+ element.style.zIndex = this._getCalculatedZIndex(element);
+ if (this._needsPositionStickyOnElement) {
+ element.style.cssText +=
+ "position: -webkit-sticky; position: sticky; ";
+ }
+ }
+ /**
+ * Calculate what the z-index should be for the element, depending on what directions (top,
+ * bottom, left, right) have been set. It should be true that elements with a top direction
+ * should have the highest index since these are elements like a table header. If any of those
+ * elements are also sticky in another direction, then they should appear above other elements
+ * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements
+ * (e.g. footer rows) should then be next in the ordering such that they are below the header
+ * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)
+ * should minimally increment so that they are above non-sticky elements but below top and bottom
+ * elements.
+ */
+ _getCalculatedZIndex(element) {
+ const zIndexIncrements = {
+ top: 100,
+ bottom: 10,
+ left: 1,
+ right: 1,
+ };
+ let zIndex = 0;
+ // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,
+ // loses the array generic type in the `for of`. But we *also* have to use `Array` because
+ // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`
+ for (const dir of STICKY_DIRECTIONS) {
+ if (element.style[dir]) {
+ zIndex += zIndexIncrements[dir];
+ }
+ }
+ return zIndex ? `${zIndex}` : "";
+ }
+ /** Gets the widths for each cell in the provided row. */
+ _getCellWidths(row, recalculateCellWidths = true) {
+ if (!recalculateCellWidths && this._cachedCellWidths.length) {
+ return this._cachedCellWidths;
+ }
+ const cellWidths = [];
+ const firstRowCells = row.children;
+ for (let i = 0; i < firstRowCells.length; i++) {
+ let cell = firstRowCells[i];
+ cellWidths.push(cell.getBoundingClientRect().width);
+ }
+ this._cachedCellWidths = cellWidths;
+ return cellWidths;
+ }
+ /**
+ * Determines the left and right positions of each sticky column cell, which will be the
+ * accumulation of all sticky column cell widths to the left and right, respectively.
+ * Non-sticky cells do not need to have a value set since their positions will not be applied.
+ */
+ _getStickyStartColumnPositions(widths, stickyStates) {
+ const positions = [];
+ let nextPosition = 0;
+ for (let i = 0; i < widths.length; i++) {
+ if (stickyStates[i]) {
+ positions[i] = nextPosition;
+ nextPosition += widths[i];
+ }
+ }
+ return positions;
+ }
+ /**
+ * Determines the left and right positions of each sticky column cell, which will be the
+ * accumulation of all sticky column cell widths to the left and right, respectively.
+ * Non-sticky cells do not need to have a value set since their positions will not be applied.
+ */
+ _getStickyEndColumnPositions(widths, stickyStates) {
+ const positions = [];
+ let nextPosition = 0;
+ for (let i = widths.length; i > 0; i--) {
+ if (stickyStates[i]) {
+ positions[i] = nextPosition;
+ nextPosition += widths[i];
+ }
+ }
+ return positions;
+ }
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Returns an error to be thrown when attempting to find an nonexistent column.
+ * @param id Id whose lookup failed.
+ * @docs-private
+ */
+ function getTableUnknownColumnError(id) {
+ return Error(`Could not find column with id "${id}".`);
+ }
+ /**
+ * Returns an error to be thrown when two column definitions have the same name.
+ * @docs-private
+ */
+ function getTableDuplicateColumnNameError(name) {
+ return Error(`Duplicate column definition name provided: "${name}".`);
+ }
+ /**
+ * Returns an error to be thrown when there are multiple rows that are missing a when function.
+ * @docs-private
+ */
+ function getTableMultipleDefaultRowDefsError() {
+ return Error(
+ `There can only be one default row without a when predicate function.`
+ );
+ }
+ /**
+ * Returns an error to be thrown when there are no matching row defs for a particular set of data.
+ * @docs-private
+ */
+ function getTableMissingMatchingRowDefError(data) {
+ return Error(
+ `Could not find a matching row definition for the` +
+ `provided row data: ${JSON.stringify(data)}`
+ );
+ }
+ /**
+ * Returns an error to be thrown when there is no row definitions present in the content.
+ * @docs-private
+ */
+ function getTableMissingRowDefsError() {
+ return Error(
+ "Missing definitions for header, footer, and row; " +
+ "cannot determine which columns should be rendered."
+ );
+ }
+ /**
+ * Returns an error to be thrown when the data source does not match the compatible types.
+ * @docs-private
+ */
+ function getTableUnknownDataSourceError() {
+ return Error(
+ `Provided data source did not match an array, Observable, or DataSource`
+ );
+ }
+ /**
+ * Returns an error to be thrown when the text column cannot find a parent table to inject.
+ * @docs-private
+ */
+ function getTableTextColumnMissingParentTableError() {
+ return Error(
+ `Text column could not find a parent table for registration.`
+ );
+ }
+ /**
+ * Returns an error to be thrown when a table text column doesn't have a name.
+ * @docs-private
+ */
+ function getTableTextColumnMissingNameError() {
+ return Error(`Table text column must have a name.`);
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /** The injection token used to specify the StickyPositioningListener. */
+ const STICKY_POSITIONING_LISTENER =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken(
+ "CDK_SPL"
+ );
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with
+ * tables that animate rows.
+ */
+ class CdkRecycleRows {}
+ CdkRecycleRows.ɵfac = function CdkRecycleRows_Factory(t) {
+ return new (t || CdkRecycleRows)();
+ };
+ CdkRecycleRows.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: CdkRecycleRows,
+ selectors: [
+ ["cdk-table", "recycleRows", ""],
+ ["table", "cdk-table", "", "recycleRows", ""],
+ ],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([
+ {
+ provide:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY,
+ useClass:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._RecycleViewRepeaterStrategy,
+ },
+ ]),
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkRecycleRows,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector:
+ "cdk-table[recycleRows], table[cdk-table][recycleRows]",
+ providers: [
+ {
+ provide:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY,
+ useClass:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._RecycleViewRepeaterStrategy,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+ /**
+ * Provides a handle for the table to grab the view container's ng-container to insert data rows.
+ * @docs-private
+ */
+ class DataRowOutlet {
+ constructor(viewContainer, elementRef) {
+ this.viewContainer = viewContainer;
+ this.elementRef = elementRef;
+ }
+ }
+ DataRowOutlet.ɵfac = function DataRowOutlet_Factory(t) {
+ return new (t || DataRowOutlet)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ DataRowOutlet.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: DataRowOutlet,
+ selectors: [["", "rowOutlet", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ DataRowOutlet,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[rowOutlet]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Provides a handle for the table to grab the view container's ng-container to insert the header.
+ * @docs-private
+ */
+ class HeaderRowOutlet {
+ constructor(viewContainer, elementRef) {
+ this.viewContainer = viewContainer;
+ this.elementRef = elementRef;
+ }
+ }
+ HeaderRowOutlet.ɵfac = function HeaderRowOutlet_Factory(t) {
+ return new (t || HeaderRowOutlet)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ HeaderRowOutlet.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: HeaderRowOutlet,
+ selectors: [["", "headerRowOutlet", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ HeaderRowOutlet,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[headerRowOutlet]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Provides a handle for the table to grab the view container's ng-container to insert the footer.
+ * @docs-private
+ */
+ class FooterRowOutlet {
+ constructor(viewContainer, elementRef) {
+ this.viewContainer = viewContainer;
+ this.elementRef = elementRef;
+ }
+ }
+ FooterRowOutlet.ɵfac = function FooterRowOutlet_Factory(t) {
+ return new (t || FooterRowOutlet)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ FooterRowOutlet.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: FooterRowOutlet,
+ selectors: [["", "footerRowOutlet", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ FooterRowOutlet,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[footerRowOutlet]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * Provides a handle for the table to grab the view
+ * container's ng-container to insert the no data row.
+ * @docs-private
+ */
+ class NoDataRowOutlet {
+ constructor(viewContainer, elementRef) {
+ this.viewContainer = viewContainer;
+ this.elementRef = elementRef;
+ }
+ }
+ NoDataRowOutlet.ɵfac = function NoDataRowOutlet_Factory(t) {
+ return new (t || NoDataRowOutlet)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ )
+ );
+ };
+ NoDataRowOutlet.ɵdir =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineDirective"
+ ]({
+ type: NoDataRowOutlet,
+ selectors: [["", "noDataRowOutlet", ""]],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ NoDataRowOutlet,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Directive,
+ args: [
+ {
+ selector: "[noDataRowOutlet]",
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewContainerRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ ];
+ },
+ null
+ );
+ })();
+ /**
+ * The table template that can be used by the mat-table. Should not be used outside of the
+ * material library.
+ * @docs-private
+ */
+ const CDK_TABLE_TEMPLATE =
+ // Note that according to MDN, the `caption` element has to be projected as the **first**
+ // element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
+ `
+
+
+
+
+
+
+`;
+ /**
+ * Class used to conveniently type the embedded view ref for rows with a context.
+ * @docs-private
+ */
+ class RowViewRef extends _angular_core__WEBPACK_IMPORTED_MODULE_1__.EmbeddedViewRef {}
+ /**
+ * A data table that can render a header row, data rows, and a footer row.
+ * Uses the dataSource input to determine the data to be rendered. The data can be provided either
+ * as a data array, an Observable stream that emits the data array to render, or a DataSource with a
+ * connect function that will return an Observable stream that emits the data array to render.
+ */
+ class CdkTable {
+ /**
+ * Tracking function that will be used to check the differences in data changes. Used similarly
+ * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
+ * relative to the function to know if a row should be added/removed/moved.
+ * Accepts a function that takes two parameters, `index` and `item`.
+ */
+ get trackBy() {
+ return this._trackByFn;
+ }
+ set trackBy(fn) {
+ if (
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ fn != null &&
+ typeof fn !== "function"
+ ) {
+ console.warn(
+ `trackBy must be a function, but received ${JSON.stringify(
+ fn
+ )}.`
+ );
+ }
+ this._trackByFn = fn;
+ }
+ /**
+ * The table's source of data, which can be provided in three ways (in order of complexity):
+ * - Simple data array (each object represents one table row)
+ * - Stream that emits a data array each time the array changes
+ * - `DataSource` object that implements the connect/disconnect interface.
+ *
+ * If a data array is provided, the table must be notified when the array's objects are
+ * added, removed, or moved. This can be done by calling the `renderRows()` function which will
+ * render the diff since the last table render. If the data array reference is changed, the table
+ * will automatically trigger an update to the rows.
+ *
+ * When providing an Observable stream, the table will trigger an update automatically when the
+ * stream emits a new array of data.
+ *
+ * Finally, when providing a `DataSource` object, the table will use the Observable stream
+ * provided by the connect function and trigger updates when that stream emits new data array
+ * values. During the table's ngOnDestroy or when the data source is removed from the table, the
+ * table will call the DataSource's `disconnect` function (may be useful for cleaning up any
+ * subscriptions registered during the connect process).
+ */
+ get dataSource() {
+ return this._dataSource;
+ }
+ set dataSource(dataSource) {
+ if (this._dataSource !== dataSource) {
+ this._switchDataSource(dataSource);
+ }
+ }
+ /**
+ * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'
+ * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each
+ * dataobject will render the first row that evaluates its when predicate to true, in the order
+ * defined in the table, or otherwise the default row which does not have a when predicate.
+ */
+ get multiTemplateDataRows() {
+ return this._multiTemplateDataRows;
+ }
+ set multiTemplateDataRows(v) {
+ this._multiTemplateDataRows = (0,
+ _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceBooleanProperty)(
+ v
+ );
+ // In Ivy if this value is set via a static attribute (e.g.
),
+ // this setter will be invoked before the row outlet has been defined hence the null check.
+ if (this._rowOutlet && this._rowOutlet.viewContainer.length) {
+ this._forceRenderDataRows();
+ this.updateStickyColumnStyles();
+ }
+ }
+ /**
+ * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths
+ * and optimize rendering sticky styles for native tables. No-op for flex tables.
+ */
+ get fixedLayout() {
+ return this._fixedLayout;
+ }
+ set fixedLayout(v) {
+ this._fixedLayout = (0,
+ _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceBooleanProperty)(
+ v
+ );
+ // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.
+ this._forceRecalculateCellWidths = true;
+ this._stickyColumnStylesNeedReset = true;
+ }
+ constructor(
+ _differs,
+ _changeDetectorRef,
+ _elementRef,
+ role,
+ _dir,
+ _document,
+ _platform,
+ _viewRepeater,
+ _coalescedStyleScheduler,
+ _viewportRuler,
+ /**
+ * @deprecated `_stickyPositioningListener` parameter to become required.
+ * @breaking-change 13.0.0
+ */
+ _stickyPositioningListener,
+ /**
+ * @deprecated `_ngZone` parameter to become required.
+ * @breaking-change 14.0.0
+ */
+ _ngZone
+ ) {
+ this._differs = _differs;
+ this._changeDetectorRef = _changeDetectorRef;
+ this._elementRef = _elementRef;
+ this._dir = _dir;
+ this._platform = _platform;
+ this._viewRepeater = _viewRepeater;
+ this._coalescedStyleScheduler = _coalescedStyleScheduler;
+ this._viewportRuler = _viewportRuler;
+ this._stickyPositioningListener = _stickyPositioningListener;
+ this._ngZone = _ngZone;
+ /** Subject that emits when the component has been destroyed. */
+ this._onDestroy = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject();
+ /**
+ * Map of all the user's defined columns (header, data, and footer cell template) identified by
+ * name. Collection populated by the column definitions gathered by `ContentChildren` as well as
+ * any custom column definitions added to `_customColumnDefs`.
+ */
+ this._columnDefsByName = new Map();
+ /**
+ * Column definitions that were defined outside of the direct content children of the table.
+ * These will be defined when, e.g., creating a wrapper around the cdkTable that has
+ * column definitions as *its* content child.
+ */
+ this._customColumnDefs = new Set();
+ /**
+ * Data row definitions that were defined outside of the direct content children of the table.
+ * These will be defined when, e.g., creating a wrapper around the cdkTable that has
+ * built-in data rows as *its* content child.
+ */
+ this._customRowDefs = new Set();
+ /**
+ * Header row definitions that were defined outside of the direct content children of the table.
+ * These will be defined when, e.g., creating a wrapper around the cdkTable that has
+ * built-in header rows as *its* content child.
+ */
+ this._customHeaderRowDefs = new Set();
+ /**
+ * Footer row definitions that were defined outside of the direct content children of the table.
+ * These will be defined when, e.g., creating a wrapper around the cdkTable that has a
+ * built-in footer row as *its* content child.
+ */
+ this._customFooterRowDefs = new Set();
+ /**
+ * Whether the header row definition has been changed. Triggers an update to the header row after
+ * content is checked. Initialized as true so that the table renders the initial set of rows.
+ */
+ this._headerRowDefChanged = true;
+ /**
+ * Whether the footer row definition has been changed. Triggers an update to the footer row after
+ * content is checked. Initialized as true so that the table renders the initial set of rows.
+ */
+ this._footerRowDefChanged = true;
+ /**
+ * Whether the sticky column styles need to be updated. Set to `true` when the visible columns
+ * change.
+ */
+ this._stickyColumnStylesNeedReset = true;
+ /**
+ * Whether the sticky styler should recalculate cell widths when applying sticky styles. If
+ * `false`, cached values will be used instead. This is only applicable to tables with
+ * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.
+ */
+ this._forceRecalculateCellWidths = true;
+ /**
+ * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing
+ * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with
+ * the cached `RenderRow` objects when possible, the row identity is preserved when the data
+ * and row template matches, which allows the `IterableDiffer` to check rows by reference
+ * and understand which rows are added/moved/removed.
+ *
+ * Implemented as a map of maps where the first key is the `data: T` object and the second is the
+ * `CdkRowDef` object. With the two keys, the cache points to a `RenderRow` object that
+ * contains an array of created pairs. The array is necessary to handle cases where the data
+ * array contains multiple duplicate data objects and each instantiated `RenderRow` must be
+ * stored.
+ */
+ this._cachedRenderRowsMap = new Map();
+ /**
+ * CSS class added to any row or cell that has sticky positioning applied. May be overridden by
+ * table subclasses.
+ */
+ this.stickyCssClass = "cdk-table-sticky";
+ /**
+ * Whether to manually add position: sticky to all sticky cell elements. Not needed if
+ * the position is set in a selector associated with the value of stickyCssClass. May be
+ * overridden by table subclasses
+ */
+ this.needsPositionStickyOnElement = true;
+ /** Whether the no data row is currently showing anything. */
+ this._isShowingNoDataRow = false;
+ this._multiTemplateDataRows = false;
+ this._fixedLayout = false;
+ /**
+ * Emits when the table completes rendering a set of data rows based on the latest data from the
+ * data source, even if the set of rows is empty.
+ */
+ this.contentChanged =
+ new _angular_core__WEBPACK_IMPORTED_MODULE_1__.EventEmitter();
+ // TODO(andrewseguin): Remove max value as the end index
+ // and instead calculate the view on init and scroll.
+ /**
+ * Stream containing the latest information on what rows are being displayed on screen.
+ * Can be used by the data source to as a heuristic of what data should be provided.
+ *
+ * @docs-private
+ */
+ this.viewChange =
+ new rxjs__WEBPACK_IMPORTED_MODULE_7__.BehaviorSubject({
+ start: 0,
+ end: Number.MAX_VALUE,
+ });
+ if (!role) {
+ this._elementRef.nativeElement.setAttribute("role", "table");
+ }
+ this._document = _document;
+ this._isNativeHtmlTable =
+ this._elementRef.nativeElement.nodeName === "TABLE";
+ }
+ ngOnInit() {
+ this._setupStickyStyler();
+ if (this._isNativeHtmlTable) {
+ this._applyNativeTableSections();
+ }
+ // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If
+ // the user has provided a custom trackBy, return the result of that function as evaluated
+ // with the values of the `RenderRow`'s data and index.
+ this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {
+ return this.trackBy
+ ? this.trackBy(dataRow.dataIndex, dataRow.data)
+ : dataRow;
+ });
+ this._viewportRuler
+ .change()
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(
+ this._onDestroy
+ )
+ )
+ .subscribe(() => {
+ this._forceRecalculateCellWidths = true;
+ });
+ }
+ ngAfterContentChecked() {
+ // Cache the row and column definitions gathered by ContentChildren and programmatic injection.
+ this._cacheRowDefs();
+ this._cacheColumnDefs();
+ // Make sure that the user has at least added header, footer, or data row def.
+ if (
+ !this._headerRowDefs.length &&
+ !this._footerRowDefs.length &&
+ !this._rowDefs.length &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableMissingRowDefsError();
+ }
+ // Render updates if the list of columns have been changed for the header, row, or footer defs.
+ const columnsChanged = this._renderUpdatedColumns();
+ const rowDefsChanged =
+ columnsChanged ||
+ this._headerRowDefChanged ||
+ this._footerRowDefChanged;
+ // Ensure sticky column styles are reset if set to `true` elsewhere.
+ this._stickyColumnStylesNeedReset =
+ this._stickyColumnStylesNeedReset || rowDefsChanged;
+ this._forceRecalculateCellWidths = rowDefsChanged;
+ // If the header row definition has been changed, trigger a render to the header row.
+ if (this._headerRowDefChanged) {
+ this._forceRenderHeaderRows();
+ this._headerRowDefChanged = false;
+ }
+ // If the footer row definition has been changed, trigger a render to the footer row.
+ if (this._footerRowDefChanged) {
+ this._forceRenderFooterRows();
+ this._footerRowDefChanged = false;
+ }
+ // If there is a data source and row definitions, connect to the data source unless a
+ // connection has already been made.
+ if (
+ this.dataSource &&
+ this._rowDefs.length > 0 &&
+ !this._renderChangeSubscription
+ ) {
+ this._observeRenderChanges();
+ } else if (this._stickyColumnStylesNeedReset) {
+ // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being
+ // called when it row data arrives. Otherwise, we need to call it proactively.
+ this.updateStickyColumnStyles();
+ }
+ this._checkStickyStates();
+ }
+ ngOnDestroy() {
+ [
+ this._rowOutlet.viewContainer,
+ this._headerRowOutlet.viewContainer,
+ this._footerRowOutlet.viewContainer,
+ this._cachedRenderRowsMap,
+ this._customColumnDefs,
+ this._customRowDefs,
+ this._customHeaderRowDefs,
+ this._customFooterRowDefs,
+ this._columnDefsByName,
+ ].forEach((def) => {
+ def.clear();
+ });
+ this._headerRowDefs = [];
+ this._footerRowDefs = [];
+ this._defaultRowDef = null;
+ this._onDestroy.next();
+ this._onDestroy.complete();
+ if (
+ (0,
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__.isDataSource)(
+ this.dataSource
+ )
+ ) {
+ this.dataSource.disconnect(this);
+ }
+ }
+ /**
+ * Renders rows based on the table's latest set of data, which was either provided directly as an
+ * input or retrieved through an Observable stream (directly or from a DataSource).
+ * Checks for differences in the data since the last diff to perform only the necessary
+ * changes (add/remove/move rows).
+ *
+ * If the table's data source is a DataSource or Observable, this will be invoked automatically
+ * each time the provided Observable stream emits a new data array. Otherwise if your data is
+ * an array, this function will need to be called to render any changes.
+ */
+ renderRows() {
+ this._renderRows = this._getAllRenderRows();
+ const changes = this._dataDiffer.diff(this._renderRows);
+ if (!changes) {
+ this._updateNoDataRow();
+ this.contentChanged.next();
+ return;
+ }
+ const viewContainer = this._rowOutlet.viewContainer;
+ this._viewRepeater.applyChanges(
+ changes,
+ viewContainer,
+ (record, _adjustedPreviousIndex, currentIndex) =>
+ this._getEmbeddedViewArgs(record.item, currentIndex),
+ (record) => record.item.data,
+ (change) => {
+ if (
+ change.operation ===
+ 1 /* _ViewRepeaterOperation.INSERTED */ &&
+ change.context
+ ) {
+ this._renderCellTemplateForItem(
+ change.record.item.rowDef,
+ change.context
+ );
+ }
+ }
+ );
+ // Update the meta context of a row's context data (index, count, first, last, ...)
+ this._updateRowIndexContext();
+ // Update rows that did not get added/removed/moved but may have had their identity changed,
+ // e.g. if trackBy matched data on some property but the actual data reference changed.
+ changes.forEachIdentityChange((record) => {
+ const rowView = viewContainer.get(record.currentIndex);
+ rowView.context.$implicit = record.item.data;
+ });
+ this._updateNoDataRow();
+ // Allow the new row data to render before measuring it.
+ // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.
+ if (
+ this._ngZone &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone.isInAngularZone()
+ ) {
+ this._ngZone.onStable
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.take)(1),
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(
+ this._onDestroy
+ )
+ )
+ .subscribe(() => {
+ this.updateStickyColumnStyles();
+ });
+ } else {
+ this.updateStickyColumnStyles();
+ }
+ this.contentChanged.next();
+ }
+ /** Adds a column definition that was not included as part of the content children. */
+ addColumnDef(columnDef) {
+ this._customColumnDefs.add(columnDef);
+ }
+ /** Removes a column definition that was not included as part of the content children. */
+ removeColumnDef(columnDef) {
+ this._customColumnDefs.delete(columnDef);
+ }
+ /** Adds a row definition that was not included as part of the content children. */
+ addRowDef(rowDef) {
+ this._customRowDefs.add(rowDef);
+ }
+ /** Removes a row definition that was not included as part of the content children. */
+ removeRowDef(rowDef) {
+ this._customRowDefs.delete(rowDef);
+ }
+ /** Adds a header row definition that was not included as part of the content children. */
+ addHeaderRowDef(headerRowDef) {
+ this._customHeaderRowDefs.add(headerRowDef);
+ this._headerRowDefChanged = true;
+ }
+ /** Removes a header row definition that was not included as part of the content children. */
+ removeHeaderRowDef(headerRowDef) {
+ this._customHeaderRowDefs.delete(headerRowDef);
+ this._headerRowDefChanged = true;
+ }
+ /** Adds a footer row definition that was not included as part of the content children. */
+ addFooterRowDef(footerRowDef) {
+ this._customFooterRowDefs.add(footerRowDef);
+ this._footerRowDefChanged = true;
+ }
+ /** Removes a footer row definition that was not included as part of the content children. */
+ removeFooterRowDef(footerRowDef) {
+ this._customFooterRowDefs.delete(footerRowDef);
+ this._footerRowDefChanged = true;
+ }
+ /** Sets a no data row definition that was not included as a part of the content children. */
+ setNoDataRow(noDataRow) {
+ this._customNoDataRow = noDataRow;
+ }
+ /**
+ * Updates the header sticky styles. First resets all applied styles with respect to the cells
+ * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is
+ * automatically called when the header row changes its displayed set of columns, or if its
+ * sticky input changes. May be called manually for cases where the cell content changes outside
+ * of these events.
+ */
+ updateStickyHeaderRowStyles() {
+ const headerRows = this._getRenderedRows(this._headerRowOutlet);
+ const tableElement = this._elementRef.nativeElement;
+ // Hide the thead element if there are no header rows. This is necessary to satisfy
+ // overzealous a11y checkers that fail because the `rowgroup` element does not contain
+ // required child `row`.
+ const thead = tableElement.querySelector("thead");
+ if (thead) {
+ thead.style.display = headerRows.length ? "" : "none";
+ }
+ const stickyStates = this._headerRowDefs.map((def) => def.sticky);
+ this._stickyStyler.clearStickyPositioning(headerRows, ["top"]);
+ this._stickyStyler.stickRows(headerRows, stickyStates, "top");
+ // Reset the dirty state of the sticky input change since it has been used.
+ this._headerRowDefs.forEach((def) => def.resetStickyChanged());
+ }
+ /**
+ * Updates the footer sticky styles. First resets all applied styles with respect to the cells
+ * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is
+ * automatically called when the footer row changes its displayed set of columns, or if its
+ * sticky input changes. May be called manually for cases where the cell content changes outside
+ * of these events.
+ */
+ updateStickyFooterRowStyles() {
+ const footerRows = this._getRenderedRows(this._footerRowOutlet);
+ const tableElement = this._elementRef.nativeElement;
+ // Hide the tfoot element if there are no footer rows. This is necessary to satisfy
+ // overzealous a11y checkers that fail because the `rowgroup` element does not contain
+ // required child `row`.
+ const tfoot = tableElement.querySelector("tfoot");
+ if (tfoot) {
+ tfoot.style.display = footerRows.length ? "" : "none";
+ }
+ const stickyStates = this._footerRowDefs.map((def) => def.sticky);
+ this._stickyStyler.clearStickyPositioning(footerRows, ["bottom"]);
+ this._stickyStyler.stickRows(footerRows, stickyStates, "bottom");
+ this._stickyStyler.updateStickyFooterContainer(
+ this._elementRef.nativeElement,
+ stickyStates
+ );
+ // Reset the dirty state of the sticky input change since it has been used.
+ this._footerRowDefs.forEach((def) => def.resetStickyChanged());
+ }
+ /**
+ * Updates the column sticky styles. First resets all applied styles with respect to the cells
+ * sticking to the left and right. Then sticky styles are added for the left and right according
+ * to the column definitions for each cell in each row. This is automatically called when
+ * the data source provides a new set of data or when a column definition changes its sticky
+ * input. May be called manually for cases where the cell content changes outside of these events.
+ */
+ updateStickyColumnStyles() {
+ const headerRows = this._getRenderedRows(this._headerRowOutlet);
+ const dataRows = this._getRenderedRows(this._rowOutlet);
+ const footerRows = this._getRenderedRows(this._footerRowOutlet);
+ // For tables not using a fixed layout, the column widths may change when new rows are rendered.
+ // In a table using a fixed layout, row content won't affect column width, so sticky styles
+ // don't need to be cleared unless either the sticky column config changes or one of the row
+ // defs change.
+ if (
+ (this._isNativeHtmlTable && !this._fixedLayout) ||
+ this._stickyColumnStylesNeedReset
+ ) {
+ // Clear the left and right positioning from all columns in the table across all rows since
+ // sticky columns span across all table sections (header, data, footer)
+ this._stickyStyler.clearStickyPositioning(
+ [...headerRows, ...dataRows, ...footerRows],
+ ["left", "right"]
+ );
+ this._stickyColumnStylesNeedReset = false;
+ }
+ // Update the sticky styles for each header row depending on the def's sticky state
+ headerRows.forEach((headerRow, i) => {
+ this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);
+ });
+ // Update the sticky styles for each data row depending on its def's sticky state
+ this._rowDefs.forEach((rowDef) => {
+ // Collect all the rows rendered with this row definition.
+ const rows = [];
+ for (let i = 0; i < dataRows.length; i++) {
+ if (this._renderRows[i].rowDef === rowDef) {
+ rows.push(dataRows[i]);
+ }
+ }
+ this._addStickyColumnStyles(rows, rowDef);
+ });
+ // Update the sticky styles for each footer row depending on the def's sticky state
+ footerRows.forEach((footerRow, i) => {
+ this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);
+ });
+ // Reset the dirty state of the sticky input change since it has been used.
+ Array.from(this._columnDefsByName.values()).forEach((def) =>
+ def.resetStickyChanged()
+ );
+ }
+ /**
+ * Get the list of RenderRow objects to render according to the current list of data and defined
+ * row definitions. If the previous list already contained a particular pair, it should be reused
+ * so that the differ equates their references.
+ */
+ _getAllRenderRows() {
+ const renderRows = [];
+ // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the
+ // new cache while unused ones can be picked up by garbage collection.
+ const prevCachedRenderRows = this._cachedRenderRowsMap;
+ this._cachedRenderRowsMap = new Map();
+ // For each data object, get the list of rows that should be rendered, represented by the
+ // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.
+ for (let i = 0; i < this._data.length; i++) {
+ let data = this._data[i];
+ const renderRowsForData = this._getRenderRowsForData(
+ data,
+ i,
+ prevCachedRenderRows.get(data)
+ );
+ if (!this._cachedRenderRowsMap.has(data)) {
+ this._cachedRenderRowsMap.set(data, new WeakMap());
+ }
+ for (let j = 0; j < renderRowsForData.length; j++) {
+ let renderRow = renderRowsForData[j];
+ const cache = this._cachedRenderRowsMap.get(renderRow.data);
+ if (cache.has(renderRow.rowDef)) {
+ cache.get(renderRow.rowDef).push(renderRow);
+ } else {
+ cache.set(renderRow.rowDef, [renderRow]);
+ }
+ renderRows.push(renderRow);
+ }
+ }
+ return renderRows;
+ }
+ /**
+ * Gets a list of `RenderRow` for the provided data object and any `CdkRowDef` objects that
+ * should be rendered for this data. Reuses the cached RenderRow objects if they match the same
+ * `(T, CdkRowDef)` pair.
+ */
+ _getRenderRowsForData(data, dataIndex, cache) {
+ const rowDefs = this._getRowDefs(data, dataIndex);
+ return rowDefs.map((rowDef) => {
+ const cachedRenderRows =
+ cache && cache.has(rowDef) ? cache.get(rowDef) : [];
+ if (cachedRenderRows.length) {
+ const dataRow = cachedRenderRows.shift();
+ dataRow.dataIndex = dataIndex;
+ return dataRow;
+ } else {
+ return {
+ data,
+ rowDef,
+ dataIndex,
+ };
+ }
+ });
+ }
+ /** Update the map containing the content's column definitions. */
+ _cacheColumnDefs() {
+ this._columnDefsByName.clear();
+ const columnDefs = mergeArrayAndSet(
+ this._getOwnDefs(this._contentColumnDefs),
+ this._customColumnDefs
+ );
+ columnDefs.forEach((columnDef) => {
+ if (
+ this._columnDefsByName.has(columnDef.name) &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableDuplicateColumnNameError(columnDef.name);
+ }
+ this._columnDefsByName.set(columnDef.name, columnDef);
+ });
+ }
+ /** Update the list of all available row definitions that can be used. */
+ _cacheRowDefs() {
+ this._headerRowDefs = mergeArrayAndSet(
+ this._getOwnDefs(this._contentHeaderRowDefs),
+ this._customHeaderRowDefs
+ );
+ this._footerRowDefs = mergeArrayAndSet(
+ this._getOwnDefs(this._contentFooterRowDefs),
+ this._customFooterRowDefs
+ );
+ this._rowDefs = mergeArrayAndSet(
+ this._getOwnDefs(this._contentRowDefs),
+ this._customRowDefs
+ );
+ // After all row definitions are determined, find the row definition to be considered default.
+ const defaultRowDefs = this._rowDefs.filter((def) => !def.when);
+ if (
+ !this.multiTemplateDataRows &&
+ defaultRowDefs.length > 1 &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableMultipleDefaultRowDefsError();
+ }
+ this._defaultRowDef = defaultRowDefs[0];
+ }
+ /**
+ * Check if the header, data, or footer rows have changed what columns they want to display or
+ * whether the sticky states have changed for the header or footer. If there is a diff, then
+ * re-render that section.
+ */
+ _renderUpdatedColumns() {
+ const columnsDiffReducer = (acc, def) =>
+ acc || !!def.getColumnsDiff();
+ // Force re-render data rows if the list of column definitions have changed.
+ const dataColumnsChanged = this._rowDefs.reduce(
+ columnsDiffReducer,
+ false
+ );
+ if (dataColumnsChanged) {
+ this._forceRenderDataRows();
+ }
+ // Force re-render header/footer rows if the list of column definitions have changed.
+ const headerColumnsChanged = this._headerRowDefs.reduce(
+ columnsDiffReducer,
+ false
+ );
+ if (headerColumnsChanged) {
+ this._forceRenderHeaderRows();
+ }
+ const footerColumnsChanged = this._footerRowDefs.reduce(
+ columnsDiffReducer,
+ false
+ );
+ if (footerColumnsChanged) {
+ this._forceRenderFooterRows();
+ }
+ return (
+ dataColumnsChanged || headerColumnsChanged || footerColumnsChanged
+ );
+ }
+ /**
+ * Switch to the provided data source by resetting the data and unsubscribing from the current
+ * render change subscription if one exists. If the data source is null, interpret this by
+ * clearing the row outlet. Otherwise start listening for new data.
+ */
+ _switchDataSource(dataSource) {
+ this._data = [];
+ if (
+ (0,
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__.isDataSource)(
+ this.dataSource
+ )
+ ) {
+ this.dataSource.disconnect(this);
+ }
+ // Stop listening for data from the previous data source.
+ if (this._renderChangeSubscription) {
+ this._renderChangeSubscription.unsubscribe();
+ this._renderChangeSubscription = null;
+ }
+ if (!dataSource) {
+ if (this._dataDiffer) {
+ this._dataDiffer.diff([]);
+ }
+ this._rowOutlet.viewContainer.clear();
+ }
+ this._dataSource = dataSource;
+ }
+ /** Set up a subscription for the data provided by the data source. */
+ _observeRenderChanges() {
+ // If no data source has been set, there is nothing to observe for changes.
+ if (!this.dataSource) {
+ return;
+ }
+ let dataStream;
+ if (
+ (0,
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__.isDataSource)(
+ this.dataSource
+ )
+ ) {
+ dataStream = this.dataSource.connect(this);
+ } else if (
+ (0, rxjs__WEBPACK_IMPORTED_MODULE_8__.isObservable)(
+ this.dataSource
+ )
+ ) {
+ dataStream = this.dataSource;
+ } else if (Array.isArray(this.dataSource)) {
+ dataStream = (0, rxjs__WEBPACK_IMPORTED_MODULE_9__.of)(
+ this.dataSource
+ );
+ }
+ if (
+ dataStream === undefined &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableUnknownDataSourceError();
+ }
+ this._renderChangeSubscription = dataStream
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(
+ this._onDestroy
+ )
+ )
+ .subscribe((data) => {
+ this._data = data || [];
+ this.renderRows();
+ });
+ }
+ /**
+ * Clears any existing content in the header row outlet and creates a new embedded view
+ * in the outlet using the header row definition.
+ */
+ _forceRenderHeaderRows() {
+ // Clear the header row outlet if any content exists.
+ if (this._headerRowOutlet.viewContainer.length > 0) {
+ this._headerRowOutlet.viewContainer.clear();
+ }
+ this._headerRowDefs.forEach((def, i) =>
+ this._renderRow(this._headerRowOutlet, def, i)
+ );
+ this.updateStickyHeaderRowStyles();
+ }
+ /**
+ * Clears any existing content in the footer row outlet and creates a new embedded view
+ * in the outlet using the footer row definition.
+ */
+ _forceRenderFooterRows() {
+ // Clear the footer row outlet if any content exists.
+ if (this._footerRowOutlet.viewContainer.length > 0) {
+ this._footerRowOutlet.viewContainer.clear();
+ }
+ this._footerRowDefs.forEach((def, i) =>
+ this._renderRow(this._footerRowOutlet, def, i)
+ );
+ this.updateStickyFooterRowStyles();
+ }
+ /** Adds the sticky column styles for the rows according to the columns' stick states. */
+ _addStickyColumnStyles(rows, rowDef) {
+ const columnDefs = Array.from(rowDef.columns || []).map(
+ (columnName) => {
+ const columnDef = this._columnDefsByName.get(columnName);
+ if (
+ !columnDef &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableUnknownColumnError(columnName);
+ }
+ return columnDef;
+ }
+ );
+ const stickyStartStates = columnDefs.map(
+ (columnDef) => columnDef.sticky
+ );
+ const stickyEndStates = columnDefs.map(
+ (columnDef) => columnDef.stickyEnd
+ );
+ this._stickyStyler.updateStickyColumns(
+ rows,
+ stickyStartStates,
+ stickyEndStates,
+ !this._fixedLayout || this._forceRecalculateCellWidths
+ );
+ }
+ /** Gets the list of rows that have been rendered in the row outlet. */
+ _getRenderedRows(rowOutlet) {
+ const renderedRows = [];
+ for (let i = 0; i < rowOutlet.viewContainer.length; i++) {
+ const viewRef = rowOutlet.viewContainer.get(i);
+ renderedRows.push(viewRef.rootNodes[0]);
+ }
+ return renderedRows;
+ }
+ /**
+ * Get the matching row definitions that should be used for this row data. If there is only
+ * one row definition, it is returned. Otherwise, find the row definitions that has a when
+ * predicate that returns true with the data. If none return true, return the default row
+ * definition.
+ */
+ _getRowDefs(data, dataIndex) {
+ if (this._rowDefs.length == 1) {
+ return [this._rowDefs[0]];
+ }
+ let rowDefs = [];
+ if (this.multiTemplateDataRows) {
+ rowDefs = this._rowDefs.filter(
+ (def) => !def.when || def.when(dataIndex, data)
+ );
+ } else {
+ let rowDef =
+ this._rowDefs.find(
+ (def) => def.when && def.when(dataIndex, data)
+ ) || this._defaultRowDef;
+ if (rowDef) {
+ rowDefs.push(rowDef);
+ }
+ }
+ if (
+ !rowDefs.length &&
+ (typeof ngDevMode === "undefined" || ngDevMode)
+ ) {
+ throw getTableMissingMatchingRowDefError(data);
+ }
+ return rowDefs;
+ }
+ _getEmbeddedViewArgs(renderRow, index) {
+ const rowDef = renderRow.rowDef;
+ const context = {
+ $implicit: renderRow.data,
+ };
+ return {
+ templateRef: rowDef.template,
+ context,
+ index,
+ };
+ }
+ /**
+ * Creates a new row template in the outlet and fills it with the set of cell templates.
+ * Optionally takes a context to provide to the row and cells, as well as an optional index
+ * of where to place the new row template in the outlet.
+ */
+ _renderRow(outlet, rowDef, index, context = {}) {
+ // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView
+ const view = outlet.viewContainer.createEmbeddedView(
+ rowDef.template,
+ context,
+ index
+ );
+ this._renderCellTemplateForItem(rowDef, context);
+ return view;
+ }
+ _renderCellTemplateForItem(rowDef, context) {
+ for (let cellTemplate of this._getCellTemplates(rowDef)) {
+ if (CdkCellOutlet.mostRecentCellOutlet) {
+ CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(
+ cellTemplate,
+ context
+ );
+ }
+ }
+ this._changeDetectorRef.markForCheck();
+ }
+ /**
+ * Updates the index-related context for each row to reflect any changes in the index of the rows,
+ * e.g. first/last/even/odd.
+ */
+ _updateRowIndexContext() {
+ const viewContainer = this._rowOutlet.viewContainer;
+ for (
+ let renderIndex = 0, count = viewContainer.length;
+ renderIndex < count;
+ renderIndex++
+ ) {
+ const viewRef = viewContainer.get(renderIndex);
+ const context = viewRef.context;
+ context.count = count;
+ context.first = renderIndex === 0;
+ context.last = renderIndex === count - 1;
+ context.even = renderIndex % 2 === 0;
+ context.odd = !context.even;
+ if (this.multiTemplateDataRows) {
+ context.dataIndex = this._renderRows[renderIndex].dataIndex;
+ context.renderIndex = renderIndex;
+ } else {
+ context.index = this._renderRows[renderIndex].dataIndex;
+ }
+ }
+ }
+ /** Gets the column definitions for the provided row def. */
+ _getCellTemplates(rowDef) {
+ if (!rowDef || !rowDef.columns) {
+ return [];
+ }
+ return Array.from(rowDef.columns, (columnId) => {
+ const column = this._columnDefsByName.get(columnId);
+ if (!column && (typeof ngDevMode === "undefined" || ngDevMode)) {
+ throw getTableUnknownColumnError(columnId);
+ }
+ return rowDef.extractCellTemplate(column);
+ });
+ }
+ /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */
+ _applyNativeTableSections() {
+ const documentFragment = this._document.createDocumentFragment();
+ const sections = [
+ {
+ tag: "thead",
+ outlets: [this._headerRowOutlet],
+ },
+ {
+ tag: "tbody",
+ outlets: [this._rowOutlet, this._noDataRowOutlet],
+ },
+ {
+ tag: "tfoot",
+ outlets: [this._footerRowOutlet],
+ },
+ ];
+ for (const section of sections) {
+ const element = this._document.createElement(section.tag);
+ element.setAttribute("role", "rowgroup");
+ for (const outlet of section.outlets) {
+ element.appendChild(outlet.elementRef.nativeElement);
+ }
+ documentFragment.appendChild(element);
+ }
+ // Use a DocumentFragment so we don't hit the DOM on each iteration.
+ this._elementRef.nativeElement.appendChild(documentFragment);
+ }
+ /**
+ * Forces a re-render of the data rows. Should be called in cases where there has been an input
+ * change that affects the evaluation of which rows should be rendered, e.g. toggling
+ * `multiTemplateDataRows` or adding/removing row definitions.
+ */
+ _forceRenderDataRows() {
+ this._dataDiffer.diff([]);
+ this._rowOutlet.viewContainer.clear();
+ this.renderRows();
+ }
+ /**
+ * Checks if there has been a change in sticky states since last check and applies the correct
+ * sticky styles. Since checking resets the "dirty" state, this should only be performed once
+ * during a change detection and after the inputs are settled (after content check).
+ */
+ _checkStickyStates() {
+ const stickyCheckReducer = (acc, d) => {
+ return acc || d.hasStickyChanged();
+ };
+ // Note that the check needs to occur for every definition since it notifies the definition
+ // that it can reset its dirty state. Using another operator like `some` may short-circuit
+ // remaining definitions and leave them in an unchecked state.
+ if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {
+ this.updateStickyHeaderRowStyles();
+ }
+ if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {
+ this.updateStickyFooterRowStyles();
+ }
+ if (
+ Array.from(this._columnDefsByName.values()).reduce(
+ stickyCheckReducer,
+ false
+ )
+ ) {
+ this._stickyColumnStylesNeedReset = true;
+ this.updateStickyColumnStyles();
+ }
+ }
+ /**
+ * Creates the sticky styler that will be used for sticky rows and columns. Listens
+ * for directionality changes and provides the latest direction to the styler. Re-applies column
+ * stickiness when directionality changes.
+ */
+ _setupStickyStyler() {
+ const direction = this._dir ? this._dir.value : "ltr";
+ this._stickyStyler = new StickyStyler(
+ this._isNativeHtmlTable,
+ this.stickyCssClass,
+ direction,
+ this._coalescedStyleScheduler,
+ this._platform.isBrowser,
+ this.needsPositionStickyOnElement,
+ this._stickyPositioningListener
+ );
+ (this._dir
+ ? this._dir.change
+ : (0, rxjs__WEBPACK_IMPORTED_MODULE_9__.of)()
+ )
+ .pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(
+ this._onDestroy
+ )
+ )
+ .subscribe((value) => {
+ this._stickyStyler.direction = value;
+ this.updateStickyColumnStyles();
+ });
+ }
+ /** Filters definitions that belong to this table from a QueryList. */
+ _getOwnDefs(items) {
+ return items.filter((item) => !item._table || item._table === this);
+ }
+ /** Creates or removes the no data row, depending on whether any data is being shown. */
+ _updateNoDataRow() {
+ const noDataRow = this._customNoDataRow || this._noDataRow;
+ if (!noDataRow) {
+ return;
+ }
+ const shouldShow = this._rowOutlet.viewContainer.length === 0;
+ if (shouldShow === this._isShowingNoDataRow) {
+ return;
+ }
+ const container = this._noDataRowOutlet.viewContainer;
+ if (shouldShow) {
+ const view = container.createEmbeddedView(noDataRow.templateRef);
+ const rootNode = view.rootNodes[0];
+ // Only add the attributes if we have a single root node since it's hard
+ // to figure out which one to add it to when there are multiple.
+ if (
+ view.rootNodes.length === 1 &&
+ rootNode?.nodeType === this._document.ELEMENT_NODE
+ ) {
+ rootNode.setAttribute("role", "row");
+ rootNode.classList.add(noDataRow._contentClassName);
+ }
+ } else {
+ container.clear();
+ }
+ this._isShowingNoDataRow = shouldShow;
+ }
+ }
+ CdkTable.ɵfac = function CdkTable_Factory(t) {
+ return new (t || CdkTable)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ChangeDetectorRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"](
+ "role"
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__.Directionality,
+ 8
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_common__WEBPACK_IMPORTED_MODULE_11__.DOCUMENT
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_12__.Platform
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _COALESCED_STYLE_SCHEDULER
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_13__.ViewportRuler
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ STICKY_POSITIONING_LISTENER,
+ 12
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone,
+ 8
+ )
+ );
+ };
+ CdkTable.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: CdkTable,
+ selectors: [["cdk-table"], ["table", "cdk-table", ""]],
+ contentQueries: function CdkTable_ContentQueries(
+ rf,
+ ctx,
+ dirIndex
+ ) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkNoDataRow,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkColumnDef,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkRowDef,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkHeaderRowDef,
+ 5
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵcontentQuery"](
+ dirIndex,
+ CdkFooterRowDef,
+ 5
+ );
+ }
+ if (rf & 2) {
+ let _t;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._noDataRow = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._contentColumnDefs = _t);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._contentRowDefs = _t);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._contentHeaderRowDefs = _t);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._contentFooterRowDefs = _t);
+ }
+ },
+ viewQuery: function CdkTable_Query(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ DataRowOutlet,
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ HeaderRowOutlet,
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ FooterRowOutlet,
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ NoDataRowOutlet,
+ 7
+ );
+ }
+ if (rf & 2) {
+ let _t;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._rowOutlet = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._headerRowOutlet = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._footerRowOutlet = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx._noDataRowOutlet = _t.first);
+ }
+ },
+ hostAttrs: [1, "cdk-table"],
+ hostVars: 2,
+ hostBindings: function CdkTable_HostBindings(rf, ctx) {
+ if (rf & 2) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵclassProp"](
+ "cdk-table-fixed-layout",
+ ctx.fixedLayout
+ );
+ }
+ },
+ inputs: {
+ trackBy: "trackBy",
+ dataSource: "dataSource",
+ multiTemplateDataRows: "multiTemplateDataRows",
+ fixedLayout: "fixedLayout",
+ },
+ outputs: {
+ contentChanged: "contentChanged",
+ },
+ exportAs: ["cdkTable"],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([
+ {
+ provide: CDK_TABLE,
+ useExisting: CdkTable,
+ },
+ {
+ provide:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY,
+ useClass:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._DisposeViewRepeaterStrategy,
+ },
+ {
+ provide: _COALESCED_STYLE_SCHEDULER,
+ useClass: _CoalescedStyleScheduler,
+ },
+ // Prevent nested tables from seeing this table's StickyPositioningListener.
+ {
+ provide: STICKY_POSITIONING_LISTENER,
+ useValue: null,
+ },
+ ]),
+ ],
+ ngContentSelectors: _c1,
+ decls: 6,
+ vars: 0,
+ consts: [
+ ["headerRowOutlet", ""],
+ ["rowOutlet", ""],
+ ["noDataRowOutlet", ""],
+ ["footerRowOutlet", ""],
+ ],
+ template: function CdkTable_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"](
+ _c0
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](0);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](
+ 1,
+ 1
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainer"
+ ](2, 0)(3, 1)(4, 2)(5, 3);
+ }
+ },
+ dependencies: [
+ DataRowOutlet,
+ HeaderRowOutlet,
+ FooterRowOutlet,
+ NoDataRowOutlet,
+ ],
+ styles: [".cdk-table-fixed-layout{table-layout:fixed}"],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkTable,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component,
+ args: [
+ {
+ selector: "cdk-table, table[cdk-table]",
+ exportAs: "cdkTable",
+ template: CDK_TABLE_TEMPLATE,
+ host: {
+ class: "cdk-table",
+ "[class.cdk-table-fixed-layout]": "fixedLayout",
+ },
+ encapsulation:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ViewEncapsulation.None,
+ changeDetection:
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__
+ .ChangeDetectionStrategy.Default,
+ providers: [
+ {
+ provide: CDK_TABLE,
+ useExisting: CdkTable,
+ },
+ {
+ provide:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY,
+ useClass:
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._DisposeViewRepeaterStrategy,
+ },
+ {
+ provide: _COALESCED_STYLE_SCHEDULER,
+ useClass: _CoalescedStyleScheduler,
+ },
+ // Prevent nested tables from seeing this table's StickyPositioningListener.
+ {
+ provide: STICKY_POSITIONING_LISTENER,
+ useValue: null,
+ },
+ ],
+ styles: [".cdk-table-fixed-layout{table-layout:fixed}"],
+ },
+ ],
+ },
+ ],
+ function () {
+ return [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.IterableDiffers,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ChangeDetectorRef,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Attribute,
+ args: ["role"],
+ },
+ ],
+ },
+ {
+ type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__.Directionality,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [
+ _angular_common__WEBPACK_IMPORTED_MODULE_11__.DOCUMENT,
+ ],
+ },
+ ],
+ },
+ {
+ type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_12__.Platform,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [
+ _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_0__._VIEW_REPEATER_STRATEGY,
+ ],
+ },
+ ],
+ },
+ {
+ type: _CoalescedStyleScheduler,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [_COALESCED_STYLE_SCHEDULER],
+ },
+ ],
+ },
+ {
+ type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_13__.ViewportRuler,
+ },
+ {
+ type: undefined,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.SkipSelf,
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject,
+ args: [STICKY_POSITIONING_LISTENER],
+ },
+ ],
+ },
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone,
+ decorators: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional,
+ },
+ ],
+ },
+ ];
+ },
+ {
+ trackBy: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ },
+ ],
+ dataSource: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ },
+ ],
+ multiTemplateDataRows: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ },
+ ],
+ fixedLayout: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Input,
+ },
+ ],
+ contentChanged: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Output,
+ },
+ ],
+ _rowOutlet: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewChild,
+ args: [
+ DataRowOutlet,
+ {
+ static: true,
+ },
+ ],
+ },
+ ],
+ _headerRowOutlet: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewChild,
+ args: [
+ HeaderRowOutlet,
+ {
+ static: true,
+ },
+ ],
+ },
+ ],
+ _footerRowOutlet: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewChild,
+ args: [
+ FooterRowOutlet,
+ {
+ static: true,
+ },
+ ],
+ },
+ ],
+ _noDataRowOutlet: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewChild,
+ args: [
+ NoDataRowOutlet,
+ {
+ static: true,
+ },
+ ],
+ },
+ ],
+ _contentColumnDefs: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChildren,
+ args: [
+ CdkColumnDef,
+ {
+ descendants: true,
+ },
+ ],
+ },
+ ],
+ _contentRowDefs: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChildren,
+ args: [
+ CdkRowDef,
+ {
+ descendants: true,
+ },
+ ],
+ },
+ ],
+ _contentHeaderRowDefs: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChildren,
+ args: [
+ CdkHeaderRowDef,
+ {
+ descendants: true,
+ },
+ ],
+ },
+ ],
+ _contentFooterRowDefs: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChildren,
+ args: [
+ CdkFooterRowDef,
+ {
+ descendants: true,
+ },
+ ],
+ },
+ ],
+ _noDataRow: [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ContentChild,
+ args: [CdkNoDataRow],
+ },
+ ],
+ }
+ );
+ })();
+ /** Utility function that gets a merged list of the entries in an array and values of a Set. */
+ function mergeArrayAndSet(array, set) {
+ return array.concat(Array.from(set));
+ }
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Column that simply shows text content for the header and row cells. Assumes that the table
+ * is using the native table implementation (`
`).
+ *
+ * By default, the name of this column will be the header text and data property accessor.
+ * The header text can be overridden with the `headerText` input. Cell values can be overridden with
+ * the `dataAccessor` input. Change the text justification to the start or end using the `justify`
+ * input.
+ */
+ class CdkTextColumn {
+ /** Column name that should be used to reference this column. */
+ get name() {
+ return this._name;
+ }
+ set name(name) {
+ this._name = name;
+ // With Ivy, inputs can be initialized before static query results are
+ // available. In that case, we defer the synchronization until "ngOnInit" fires.
+ this._syncColumnDefName();
+ }
+ constructor(
+ // `CdkTextColumn` is always requiring a table, but we just assert it manually
+ // for better error reporting.
+ // tslint:disable-next-line: lightweight-tokens
+ _table,
+ _options
+ ) {
+ this._table = _table;
+ this._options = _options;
+ /** Alignment of the cell values. */
+ this.justify = "start";
+ this._options = _options || {};
+ }
+ ngOnInit() {
+ this._syncColumnDefName();
+ if (this.headerText === undefined) {
+ this.headerText = this._createDefaultHeaderText();
+ }
+ if (!this.dataAccessor) {
+ this.dataAccessor =
+ this._options.defaultDataAccessor ||
+ ((data, name) => data[name]);
+ }
+ if (this._table) {
+ // Provide the cell and headerCell directly to the table with the static `ViewChild` query,
+ // since the columnDef will not pick up its content by the time the table finishes checking
+ // its content and initializing the rows.
+ this.columnDef.cell = this.cell;
+ this.columnDef.headerCell = this.headerCell;
+ this._table.addColumnDef(this.columnDef);
+ } else if (typeof ngDevMode === "undefined" || ngDevMode) {
+ throw getTableTextColumnMissingParentTableError();
+ }
+ }
+ ngOnDestroy() {
+ if (this._table) {
+ this._table.removeColumnDef(this.columnDef);
+ }
+ }
+ /**
+ * Creates a default header text. Use the options' header text transformation function if one
+ * has been provided. Otherwise simply capitalize the column name.
+ */
+ _createDefaultHeaderText() {
+ const name = this.name;
+ if (!name && (typeof ngDevMode === "undefined" || ngDevMode)) {
+ throw getTableTextColumnMissingNameError();
+ }
+ if (this._options && this._options.defaultHeaderTextTransform) {
+ return this._options.defaultHeaderTextTransform(name);
+ }
+ return name[0].toUpperCase() + name.slice(1);
+ }
+ /** Synchronizes the column definition name with the text column name. */
+ _syncColumnDefName() {
+ if (this.columnDef) {
+ this.columnDef.name = this.name;
+ }
+ }
+ }
+ CdkTextColumn.ɵfac = function CdkTextColumn_Factory(t) {
+ return new (t || CdkTextColumn)(
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ CdkTable,
+ 8
+ ),
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](
+ TEXT_COLUMN_OPTIONS,
+ 8
+ )
+ );
+ };
+ CdkTextColumn.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵdefineComponent"
+ ]({
+ type: CdkTextColumn,
+ selectors: [["cdk-text-column"]],
+ viewQuery: function CdkTextColumn_Query(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ CdkColumnDef,
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ CdkCellDef,
+ 7
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](
+ CdkHeaderCellDef,
+ 7
+ );
+ }
+ if (rf & 2) {
+ let _t;
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.columnDef = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.cell = _t.first);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](
+ (_t =
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]())
+ ) && (ctx.headerCell = _t.first);
+ }
+ },
+ inputs: {
+ name: "name",
+ headerText: "headerText",
+ dataAccessor: "dataAccessor",
+ justify: "justify",
+ },
+ decls: 3,
+ vars: 0,
+ consts: [
+ ["cdkColumnDef", ""],
+ ["cdk-header-cell", "", 3, "text-align", 4, "cdkHeaderCellDef"],
+ ["cdk-cell", "", 3, "text-align", 4, "cdkCellDef"],
+ ["cdk-header-cell", ""],
+ ["cdk-cell", ""],
+ ],
+ template: function CdkTextColumn_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerStart"
+ ](0, 0);
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 1,
+ CdkTextColumn_th_1_Template,
+ 2,
+ 3,
+ "th",
+ 1
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](
+ 2,
+ CdkTextColumn_td_2_Template,
+ 2,
+ 3,
+ "td",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__[
+ "ɵɵelementContainerEnd"
+ ]();
+ }
+ },
+ dependencies: [
+ CdkCellDef,
+ CdkHeaderCellDef,
+ CdkColumnDef,
+ CdkCell,
+ CdkHeaderCell,
+ ],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](
+ CdkTextColumn,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component,
+ args: [
+ {
+ selector: "cdk-text-column",
+ template: `
+
+
`).
+ *
+ * By default, the name of this column will be the header text and data property accessor.
+ * The header text can be overridden with the `headerText` input. Cell values can be overridden with
+ * the `dataAccessor` input. Change the text justification to the start or end using the `justify`
+ * input.
+ */
+ class MatTextColumn extends _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__.CdkTextColumn {}
+ MatTextColumn.ɵfac = /* @__PURE__ */ (function () {
+ let ɵMatTextColumn_BaseFactory;
+ return function MatTextColumn_Factory(t) {
+ return (
+ ɵMatTextColumn_BaseFactory ||
+ (ɵMatTextColumn_BaseFactory =
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵgetInheritedFactory"
+ ](MatTextColumn))
+ )(t || MatTextColumn);
+ };
+ })();
+ MatTextColumn.ɵcmp =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵdefineComponent"
+ ]({
+ type: MatTextColumn,
+ selectors: [["mat-text-column"]],
+ features: [
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵInheritDefinitionFeature"
+ ],
+ ],
+ decls: 3,
+ vars: 0,
+ consts: [
+ ["matColumnDef", ""],
+ ["mat-header-cell", "", 3, "text-align", 4, "matHeaderCellDef"],
+ ["mat-cell", "", 3, "text-align", 4, "matCellDef"],
+ ["mat-header-cell", ""],
+ ["mat-cell", ""],
+ ],
+ template: function MatTextColumn_Template(rf, ctx) {
+ if (rf & 1) {
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵelementContainerStart"
+ ](0, 0);
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](
+ 1,
+ MatTextColumn_th_1_Template,
+ 2,
+ 3,
+ "th",
+ 1
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](
+ 2,
+ MatTextColumn_td_2_Template,
+ 2,
+ 3,
+ "td",
+ 2
+ );
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵelementContainerEnd"
+ ]();
+ }
+ },
+ dependencies: [
+ MatHeaderCellDef,
+ MatColumnDef,
+ MatCellDef,
+ MatHeaderCell,
+ MatCell,
+ ],
+ encapsulation: 2,
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](
+ MatTextColumn,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component,
+ args: [
+ {
+ selector: "mat-text-column",
+ template: `
+
+
+ {{headerText}}
+
+
+ {{dataAccessor(data, name)}}
+
+
+ `,
+ encapsulation:
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__
+ .ViewEncapsulation.None,
+ // Change detection is intentionally not set to OnPush. This component's template will be provided
+ // to the table to be inserted into its view. This is problematic when change detection runs since
+ // the bindings in this template will be evaluated _after_ the table's view is evaluated, which
+ // mean's the template in the table's view will not have the updated value (and in fact will cause
+ // an ExpressionChangedAfterItHasBeenCheckedError).
+ // tslint:disable-next-line:validate-decorators
+ changeDetection:
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__
+ .ChangeDetectionStrategy.Default,
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ const EXPORTED_DECLARATIONS = [
+ // Table
+ MatTable,
+ MatRecycleRows,
+ // Template defs
+ MatHeaderCellDef,
+ MatHeaderRowDef,
+ MatColumnDef,
+ MatCellDef,
+ MatRowDef,
+ MatFooterCellDef,
+ MatFooterRowDef,
+ // Cell directives
+ MatHeaderCell,
+ MatCell,
+ MatFooterCell,
+ // Row directives
+ MatHeaderRow,
+ MatRow,
+ MatFooterRow,
+ MatNoDataRow,
+ MatTextColumn,
+ ];
+ class MatTableModule {}
+ MatTableModule.ɵfac = function MatTableModule_Factory(t) {
+ return new (t || MatTableModule)();
+ };
+ MatTableModule.ɵmod =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵdefineNgModule"
+ ]({
+ type: MatTableModule,
+ });
+ MatTableModule.ɵinj =
+ /* @__PURE__ */ _angular_core__WEBPACK_IMPORTED_MODULE_0__[
+ "ɵɵdefineInjector"
+ ]({
+ imports: [
+ _angular_material_core__WEBPACK_IMPORTED_MODULE_3__.MatCommonModule,
+ _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__.CdkTableModule,
+ _angular_material_core__WEBPACK_IMPORTED_MODULE_3__.MatCommonModule,
+ ],
+ });
+ (function () {
+ (typeof ngDevMode === "undefined" || ngDevMode) &&
+ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](
+ MatTableModule,
+ [
+ {
+ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule,
+ args: [
+ {
+ imports: [
+ _angular_material_core__WEBPACK_IMPORTED_MODULE_3__.MatCommonModule,
+ _angular_cdk_table__WEBPACK_IMPORTED_MODULE_2__.CdkTableModule,
+ ],
+ exports: [
+ _angular_material_core__WEBPACK_IMPORTED_MODULE_3__.MatCommonModule,
+ EXPORTED_DECLARATIONS,
+ ],
+ declarations: EXPORTED_DECLARATIONS,
+ },
+ ],
+ },
+ ],
+ null,
+ null
+ );
+ })();
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+ /**
+ * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to
+ * flaky browser support and the value not being defined in Closure's typings.
+ */
+ const MAX_SAFE_INTEGER = 9007199254740991;
+ /** Shared base class with MDC-based implementation. */
+ class _MatTableDataSource extends _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_1__.DataSource {
+ /** Array of data that should be rendered by the table, where each object represents one row. */
+ get data() {
+ return this._data.value;
+ }
+ set data(data) {
+ data = Array.isArray(data) ? data : [];
+ this._data.next(data);
+ // Normally the `filteredData` is updated by the re-render
+ // subscription, but that won't happen if it's inactive.
+ if (!this._renderChangesSubscription) {
+ this._filterData(data);
+ }
+ }
+ /**
+ * Filter term that should be used to filter out objects from the data array. To override how
+ * data objects match to this filter string, provide a custom function for filterPredicate.
+ */
+ get filter() {
+ return this._filter.value;
+ }
+ set filter(filter) {
+ this._filter.next(filter);
+ // Normally the `filteredData` is updated by the re-render
+ // subscription, but that won't happen if it's inactive.
+ if (!this._renderChangesSubscription) {
+ this._filterData(this.data);
+ }
+ }
+ /**
+ * Instance of the MatSort directive used by the table to control its sorting. Sort changes
+ * emitted by the MatSort will trigger an update to the table's rendered data.
+ */
+ get sort() {
+ return this._sort;
+ }
+ set sort(sort) {
+ this._sort = sort;
+ this._updateChangeSubscription();
+ }
+ /**
+ * Instance of the paginator component used by the table to control what page of the data is
+ * displayed. Page changes emitted by the paginator will trigger an update to the
+ * table's rendered data.
+ *
+ * Note that the data source uses the paginator's properties to calculate which page of data
+ * should be displayed. If the paginator receives its properties as template inputs,
+ * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been
+ * initialized before assigning it to this data source.
+ */
+ get paginator() {
+ return this._paginator;
+ }
+ set paginator(paginator) {
+ this._paginator = paginator;
+ this._updateChangeSubscription();
+ }
+ constructor(initialData = []) {
+ super();
+ /** Stream emitting render data to the table (depends on ordered data changes). */
+ this._renderData =
+ new rxjs__WEBPACK_IMPORTED_MODULE_4__.BehaviorSubject([]);
+ /** Stream that emits when a new filter string is set on the data source. */
+ this._filter =
+ new rxjs__WEBPACK_IMPORTED_MODULE_4__.BehaviorSubject("");
+ /** Used to react to internal changes of the paginator that are made by the data source itself. */
+ this._internalPageChanges =
+ new rxjs__WEBPACK_IMPORTED_MODULE_5__.Subject();
+ /**
+ * Subscription to the changes that should trigger an update to the table's rendered rows, such
+ * as filtering, sorting, pagination, or base data changes.
+ */
+ this._renderChangesSubscription = null;
+ /**
+ * Data accessor function that is used for accessing data properties for sorting through
+ * the default sortData function.
+ * This default function assumes that the sort header IDs (which defaults to the column name)
+ * matches the data's properties (e.g. column Xyz represents data['Xyz']).
+ * May be set to a custom function for different behavior.
+ * @param data Data object that is being accessed.
+ * @param sortHeaderId The name of the column that represents the data.
+ */
+ this.sortingDataAccessor = (data, sortHeaderId) => {
+ const value = data[sortHeaderId];
+ if (
+ (0,
+ _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_6__._isNumberValue)(
+ value
+ )
+ ) {
+ const numberValue = Number(value);
+ // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we
+ // leave them as strings. For more info: https://goo.gl/y5vbSg
+ return numberValue < MAX_SAFE_INTEGER ? numberValue : value;
+ }
+ return value;
+ };
+ /**
+ * Gets a sorted copy of the data array based on the state of the MatSort. Called
+ * after changes are made to the filtered data or when sort changes are emitted from MatSort.
+ * By default, the function retrieves the active sort and its direction and compares data
+ * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation
+ * of data ordering.
+ * @param data The array of data that should be sorted.
+ * @param sort The connected MatSort that holds the current sort state.
+ */
+ this.sortData = (data, sort) => {
+ const active = sort.active;
+ const direction = sort.direction;
+ if (!active || direction == "") {
+ return data;
+ }
+ return data.sort((a, b) => {
+ let valueA = this.sortingDataAccessor(a, active);
+ let valueB = this.sortingDataAccessor(b, active);
+ // If there are data in the column that can be converted to a number,
+ // it must be ensured that the rest of the data
+ // is of the same type so as not to order incorrectly.
+ const valueAType = typeof valueA;
+ const valueBType = typeof valueB;
+ if (valueAType !== valueBType) {
+ if (valueAType === "number") {
+ valueA += "";
+ }
+ if (valueBType === "number") {
+ valueB += "";
+ }
+ }
+ // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if
+ // one value exists while the other doesn't. In this case, existing value should come last.
+ // This avoids inconsistent results when comparing values to undefined/null.
+ // If neither value exists, return 0 (equal).
+ let comparatorResult = 0;
+ if (valueA != null && valueB != null) {
+ // Check if one value is greater than the other; if equal, comparatorResult should remain 0.
+ if (valueA > valueB) {
+ comparatorResult = 1;
+ } else if (valueA < valueB) {
+ comparatorResult = -1;
+ }
+ } else if (valueA != null) {
+ comparatorResult = 1;
+ } else if (valueB != null) {
+ comparatorResult = -1;
+ }
+ return comparatorResult * (direction == "asc" ? 1 : -1);
+ });
+ };
+ /**
+ * Checks if a data object matches the data source's filter string. By default, each data object
+ * is converted to a string of its properties and returns true if the filter has
+ * at least one occurrence in that string. By default, the filter string has its whitespace
+ * trimmed and the match is case-insensitive. May be overridden for a custom implementation of
+ * filter matching.
+ * @param data Data object used to check against the filter.
+ * @param filter Filter string that has been set on the data source.
+ * @returns Whether the filter matches against the data
+ */
+ this.filterPredicate = (data, filter) => {
+ // Transform the data into a lowercase string of all property values.
+ const dataStr = Object.keys(data)
+ .reduce((currentTerm, key) => {
+ // Use an obscure Unicode character to delimit the words in the concatenated string.
+ // This avoids matches where the values of two columns combined will match the user's query
+ // (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something
+ // that has a very low chance of being typed in by somebody in a text field. This one in
+ // particular is "White up-pointing triangle with dot" from
+ // https://en.wikipedia.org/wiki/List_of_Unicode_characters
+ return currentTerm + data[key] + "◬";
+ }, "")
+ .toLowerCase();
+ // Transform the filter by converting it to lowercase and removing whitespace.
+ const transformedFilter = filter.trim().toLowerCase();
+ return dataStr.indexOf(transformedFilter) != -1;
+ };
+ this._data = new rxjs__WEBPACK_IMPORTED_MODULE_4__.BehaviorSubject(
+ initialData
+ );
+ this._updateChangeSubscription();
+ }
+ /**
+ * Subscribe to changes that should trigger an update to the table's rendered rows. When the
+ * changes occur, process the current state of the filter, sort, and pagination along with
+ * the provided base data and send it to the table for rendering.
+ */
+ _updateChangeSubscription() {
+ // Sorting and/or pagination should be watched if sort and/or paginator are provided.
+ // The events should emit whenever the component emits a change or initializes, or if no
+ // component is provided, a stream with just a null event should be provided.
+ // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the
+ // pipeline can progress to the next step. Note that the value from these streams are not used,
+ // they purely act as a signal to progress in the pipeline.
+ const sortChange = this._sort
+ ? (0, rxjs__WEBPACK_IMPORTED_MODULE_7__.merge)(
+ this._sort.sortChange,
+ this._sort.initialized
+ )
+ : (0, rxjs__WEBPACK_IMPORTED_MODULE_8__.of)(null);
+ const pageChange = this._paginator
+ ? (0, rxjs__WEBPACK_IMPORTED_MODULE_7__.merge)(
+ this._paginator.page,
+ this._internalPageChanges,
+ this._paginator.initialized
+ )
+ : (0, rxjs__WEBPACK_IMPORTED_MODULE_8__.of)(null);
+ const dataStream = this._data;
+ // Watch for base data or filter changes to provide a filtered set of data.
+ const filteredData = (0,
+ rxjs__WEBPACK_IMPORTED_MODULE_9__.combineLatest)([
+ dataStream,
+ this._filter,
+ ]).pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.map)(([data]) =>
+ this._filterData(data)
+ )
+ );
+ // Watch for filtered data or sort changes to provide an ordered set of data.
+ const orderedData = (0,
+ rxjs__WEBPACK_IMPORTED_MODULE_9__.combineLatest)([
+ filteredData,
+ sortChange,
+ ]).pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.map)(([data]) =>
+ this._orderData(data)
+ )
+ );
+ // Watch for ordered data or page changes to provide a paged set of data.
+ const paginatedData = (0,
+ rxjs__WEBPACK_IMPORTED_MODULE_9__.combineLatest)([
+ orderedData,
+ pageChange,
+ ]).pipe(
+ (0, rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.map)(([data]) =>
+ this._pageData(data)
+ )
+ );
+ // Watched for paged data changes and send the result to the table to render.
+ this._renderChangesSubscription?.unsubscribe();
+ this._renderChangesSubscription = paginatedData.subscribe((data) =>
+ this._renderData.next(data)
+ );
+ }
+ /**
+ * Returns a filtered data array where each filter object contains the filter string within
+ * the result of the filterTermAccessor function. If no filter is set, returns the data array
+ * as provided.
+ */
+ _filterData(data) {
+ // If there is a filter string, filter out data that does not contain it.
+ // Each data object is converted to a string using the function defined by filterTermAccessor.
+ // May be overridden for customization.
+ this.filteredData =
+ this.filter == null || this.filter === ""
+ ? data
+ : data.filter((obj) => this.filterPredicate(obj, this.filter));
+ if (this.paginator) {
+ this._updatePaginator(this.filteredData.length);
+ }
+ return this.filteredData;
+ }
+ /**
+ * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the
+ * data array as provided. Uses the default data accessor for data lookup, unless a
+ * sortDataAccessor function is defined.
+ */
+ _orderData(data) {
+ // If there is no active sort or direction, return the data without trying to sort.
+ if (!this.sort) {
+ return data;
+ }
+ return this.sortData(data.slice(), this.sort);
+ }
+ /**
+ * Returns a paged slice of the provided data array according to the provided paginator's page
+ * index and length. If there is no paginator provided, returns the data array as provided.
+ */
+ _pageData(data) {
+ if (!this.paginator) {
+ return data;
+ }
+ const startIndex =
+ this.paginator.pageIndex * this.paginator.pageSize;
+ return data.slice(startIndex, startIndex + this.paginator.pageSize);
+ }
+ /**
+ * Updates the paginator to reflect the length of the filtered data, and makes sure that the page
+ * index does not exceed the paginator's last page. Values are changed in a resolved promise to
+ * guard against making property changes within a round of change detection.
+ */
+ _updatePaginator(filteredDataLength) {
+ Promise.resolve().then(() => {
+ const paginator = this.paginator;
+ if (!paginator) {
+ return;
+ }
+ paginator.length = filteredDataLength;
+ // If the page index is set beyond the page, reduce it to the last page.
+ if (paginator.pageIndex > 0) {
+ const lastPageIndex =
+ Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;
+ const newPageIndex = Math.min(
+ paginator.pageIndex,
+ lastPageIndex
+ );
+ if (newPageIndex !== paginator.pageIndex) {
+ paginator.pageIndex = newPageIndex;
+ // Since the paginator only emits after user-generated changes,
+ // we need our own stream so we know to should re-render the data.
+ this._internalPageChanges.next();
+ }
+ }
+ });
+ }
+ /**
+ * Used by the MatTable. Called when it connects to the data source.
+ * @docs-private
+ */
+ connect() {
+ if (!this._renderChangesSubscription) {
+ this._updateChangeSubscription();
+ }
+ return this._renderData;
+ }
+ /**
+ * Used by the MatTable. Called when it disconnects from the data source.
+ * @docs-private
+ */
+ disconnect() {
+ this._renderChangesSubscription?.unsubscribe();
+ this._renderChangesSubscription = null;
+ }
+ }
+ /**
+ * Data source that accepts a client-side data array and includes native support of filtering,
+ * sorting (using MatSort), and pagination (using MatPaginator).
+ *
+ * Allows for sort customization by overriding sortingDataAccessor, which defines how data
+ * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
+ * which defines how row data is converted to a string for filter matching.
+ *
+ * **Note:** This class is meant to be a simple data source to help you get started. As such
+ * it isn't equipped to handle some more advanced cases like robust i18n support or server-side
+ * interactions. If your app needs to support more advanced use cases, consider implementing your
+ * own `DataSource`.
+ */
+ class MatTableDataSource extends _MatTableDataSource {}
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+ /**
+ * @license
+ * Copyright Google LLC All Rights Reserved.
+ *
+ * Use of this source code is governed by an MIT-style license that can be
+ * found in the LICENSE file at https://angular.io/license
+ */
+
+ /**
+ * Generated bundle index. Do not edit.
+ */
+
+ /***/
+ },
+ },
+]);
+//# sourceMappingURL=src_app_admin_admin_module_ts.js.map
diff --git a/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js.map b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js.map
new file mode 100644
index 00000000..16028fc1
--- /dev/null
+++ b/cdk/cdk.out/asset.705042e10eb8fb6d7d7475c39e61e09836398336585ba5ef9814a4a774e8e009/src_app_admin_admin_module_ts.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"src_app_admin_admin_module_ts.js","mappings":";;;;;;;;;;;;;;;;;;AACuD;AACK;AAC0B;AACT;;;AAE7E,MAAMI,MAAM,GAAW,CACrB;EACEC,IAAI,EAAE,QAAQ;EACdC,SAAS,EAAEL,qEAAeA;CAC3B,EACD;EACEI,IAAI,EAAE,UAAU;EAChBC,SAAS,EAAEJ,+FAAuBA;CACnC,EACD;EACEG,IAAI,EAAE,cAAc;EACpBC,SAAS,EAAEH,sFAAoBA;CAChC,EACD;EACEE,IAAI,EAAE,qBAAqB;EAC3BC,SAAS,EAAEH,sFAAoBA;CAChC,CACF;AAMK,MAAOI,kBAAkB;;mBAAlBA,kBAAkB;AAAA;;QAAlBA;AAAkB;;YAHnBP,kEAAqB,CAACI,MAAM,CAAC,EAC7BJ,yDAAY;AAAA;;sHAEXO,kBAAkB;IAAAE,UAAAA,yDAAAA;IAAAC,UAFnBV,yDAAY;EAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BuB;AACM;AACE;AACE;AACqB;AAElB;AACA;AACH;AACD;AAC8B;AAC3B;AACiB;AACM;AACL;;AAqBvE,MAAOqB,WAAW;;mBAAXA,WAAW;AAAA;;QAAXA;AAAW;;aAFX,CAACJ,iEAAa,EAAEG,2FAAqB,CAAC;EAAAX,UAV/CF,qEAAkB,EAClBI,yDAAY,EACZQ,oFAAgB,EAChBN,iEAAa,EACbC,oEAAc,EACdE,oEAAc,EACdE,sEAAe,EACfH,yFAAwB,EACxBH,gEAAmB;AAAA;;sHAIVS,WAAW;IAAAC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ClC;UACA;UACA,IAAI,CAACzC,oBAAoB,CAAC5jB,IAAI,EAAE;QACpC;MACJ;IACJ,CAAC,CAAC;EACN;EACA;AACJ;AACA;AACA;EACI4d,OAAO,GAAG;IACN,IAAI,CAAC,IAAI,CAACsF,0BAA0B,EAAE;MAClC,IAAI,CAACK,yBAAyB,EAAE;IACpC;IACA,OAAO,IAAI,CAACI,WAAW;EAC3B;EACA;AACJ;AACA;AACA;EACI7K,UAAU,GAAG;IACT,IAAI,CAACoK,0BAA0B,EAAExF,WAAW,EAAE;IAC9C,IAAI,CAACwF,0BAA0B,GAAG,IAAI;EAC1C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMqD,kBAAkB,SAAStD,mBAAmB,CAAC;;AAGrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","sources":["./src/app/admin/admin-routing.module.ts","./src/app/admin/admin.module.ts","./src/app/admin/edit-product/edit-product.component.ts","./src/app/admin/edit-product/edit-product.component.html","./src/app/admin/manage-products/manage-products.component.html","./src/app/admin/manage-products/manage-products.component.ts","./src/app/admin/manage-products/manage-products.service.ts","./src/app/admin/orders/orders.component.html","./src/app/admin/orders/orders.component.ts","./src/app/admin/orders/orders.service.ts","./src/app/shared/file-picker/file-picker.component.ts","./src/app/shared/file-picker/file-picker.component.html","./src/app/shared/file-picker/file-picker.module.ts","./node_modules/@angular/cdk/fesm2020/table.mjs","./node_modules/@angular/material/fesm2020/table.mjs"],"sourcesContent":["import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { OrdersComponent } from './orders/orders.component';\r\nimport { ManageProductsComponent } from './manage-products/manage-products.component';\r\nimport { EditProductComponent } from './edit-product/edit-product.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: 'orders',\r\n component: OrdersComponent,\r\n },\r\n {\r\n path: 'products',\r\n component: ManageProductsComponent,\r\n },\r\n {\r\n path: 'products/new',\r\n component: EditProductComponent,\r\n },\r\n {\r\n path: 'products/:productId',\r\n component: EditProductComponent,\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class AdminRoutingModule {}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\n\r\nimport { AdminRoutingModule } from './admin-routing.module';\r\nimport { OrdersComponent } from './orders/orders.component';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { OrdersService } from './orders/orders.service';\r\nimport { ManageProductsComponent } from './manage-products/manage-products.component';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { FilePickerModule } from '../shared/file-picker/file-picker.module';\r\nimport { ManageProductsService } from './manage-products/manage-products.service';\r\nimport { EditProductComponent } from './edit-product/edit-product.component';\r\n\r\n@NgModule({\r\n declarations: [\r\n OrdersComponent,\r\n ManageProductsComponent,\r\n EditProductComponent,\r\n ],\r\n imports: [\r\n AdminRoutingModule,\r\n CommonModule,\r\n FilePickerModule,\r\n MatCardModule,\r\n MatInputModule,\r\n MatTableModule,\r\n MatButtonModule,\r\n MatProgressSpinnerModule,\r\n ReactiveFormsModule,\r\n ],\r\n providers: [OrdersService, ManageProductsService],\r\n})\r\nexport class AdminModule {}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n OnDestroy,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {\r\n AbstractControl,\r\n UntypedFormBuilder,\r\n UntypedFormGroup,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\n\r\nimport { BehaviorSubject, Subject } from 'rxjs';\r\nimport { finalize, takeUntil } from 'rxjs/operators';\r\n\r\nimport { Product } from '../../products/product.interface';\r\nimport { ProductsService } from '../../products/products.service';\r\nimport { NotificationService } from '../../core/notification.service';\r\n\r\n@Component({\r\n selector: 'app-edit-product',\r\n templateUrl: './edit-product.component.html',\r\n styleUrls: ['./edit-product.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class EditProductComponent implements OnInit, OnDestroy {\r\n form: UntypedFormGroup;\r\n productId: string | null = null;\r\n requestInProgress = false;\r\n\r\n loaded$ = new BehaviorSubject(false);\r\n\r\n private readonly onDestroy$: Subject = new Subject();\r\n\r\n constructor(\r\n private readonly activatedRoute: ActivatedRoute,\r\n private readonly fb: UntypedFormBuilder,\r\n private readonly notificationService: NotificationService,\r\n private readonly productsService: ProductsService,\r\n private readonly router: Router\r\n ) {\r\n this.form = this.fb.group({\r\n title: ['', Validators.required],\r\n description: ['', Validators.required],\r\n price: ['', Validators.required],\r\n count: ['', Validators.required],\r\n });\r\n }\r\n\r\n get countCtrl(): AbstractControl {\r\n return this.form.get('count') as AbstractControl;\r\n }\r\n\r\n get descriptionCtrl(): AbstractControl {\r\n return this.form.get('description') as AbstractControl;\r\n }\r\n\r\n get priceCtrl(): AbstractControl {\r\n return this.form.get('price') as AbstractControl;\r\n }\r\n\r\n get titleCtrl(): AbstractControl {\r\n return this.form.get('title') as AbstractControl;\r\n }\r\n\r\n ngOnInit(): void {\r\n const productId = this.activatedRoute.snapshot.paramMap.get('productId');\r\n\r\n if (!productId) {\r\n this.loaded$.next(true);\r\n return;\r\n }\r\n\r\n this.productsService\r\n .getProductById(productId)\r\n .pipe(\r\n finalize(() => this.loaded$.next(true)),\r\n takeUntil(this.onDestroy$)\r\n )\r\n .subscribe((product) => {\r\n if (product) {\r\n this.form.patchValue(product);\r\n this.productId = product.id;\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n this.onDestroy$.complete();\r\n }\r\n\r\n editProduct(): void {\r\n const product: Product = this.form.value;\r\n if (!product) {\r\n return;\r\n }\r\n\r\n const editProduct$ = this.productId\r\n ? this.productsService.editProduct(this.productId, product)\r\n : this.productsService.createNewProduct(product);\r\n\r\n this.requestInProgress = true;\r\n editProduct$.subscribe(\r\n () => this.router.navigate(['../'], { relativeTo: this.activatedRoute }),\r\n (error: unknown) => {\r\n console.warn(error);\r\n this.requestInProgress = false;\r\n this.notificationService.showError(\r\n `Failed to ${this.productId ? 'edit' : 'create'} product`\r\n );\r\n }\r\n );\r\n }\r\n}\r\n","\r\n
\r\n\r\n\r\n Select file to upload\r\n \r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FilePickerComponent } from './file-picker.component';\r\nimport { MatButtonModule } from '@angular/material/button';\r\n\r\n@NgModule({\r\n declarations: [FilePickerComponent],\r\n imports: [CommonModule, MatButtonModule],\r\n exports: [FilePickerComponent],\r\n})\r\nexport class FilePickerModule {}\r\n","import * as i1 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, isDataSource, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nexport { DataSource } from '@angular/cdk/collections';\nimport * as i2 from '@angular/cdk/platform';\nimport * as i3 from '@angular/cdk/scrolling';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, Input, ContentChild, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, EventEmitter, NgZone, Attribute, SkipSelf, Output, ViewChild, ContentChildren, NgModule } from '@angular/core';\nimport { Subject, from, BehaviorSubject, isObservable, of } from 'rxjs';\nimport { takeUntil, take } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nfunction mixinHasStickyInput(base) {\n return class extends base {\n /** Whether sticky positioning should be applied. */\n get sticky() {\n return this._sticky;\n }\n set sticky(v) {\n const prevValue = this._sticky;\n this._sticky = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._sticky;\n }\n /** Whether the sticky value has changed since this was last called. */\n hasStickyChanged() {\n const hasStickyChanged = this._hasStickyChanged;\n this._hasStickyChanged = false;\n return hasStickyChanged;\n }\n /** Resets the dirty check for cases where the sticky state has been used without checking. */\n resetStickyChanged() {\n this._hasStickyChanged = false;\n }\n constructor(...args) {\n super(...args);\n this._sticky = false;\n /** Whether the sticky input has changed since it was last checked. */\n this._hasStickyChanged = false;\n }\n };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nconst CDK_TABLE = new InjectionToken('CDK_TABLE');\n/** Injection token that can be used to specify the text column options. */\nconst TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass CdkCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkCellDef, selector: \"[cdkCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass CdkHeaderCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkHeaderCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass CdkFooterCellDef {\n constructor(/** @docs-private */ template) {\n this.template = template;\n }\n}\nCdkFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterCellDef, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkFooterCellDef, selector: \"[cdkFooterCellDef]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterCellDef, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkFooterCellDef]' }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n// Boilerplate for applying mixins to CdkColumnDef.\n/** @docs-private */\nclass CdkColumnDefBase {\n}\nconst _CdkColumnDefBase = mixinHasStickyInput(CdkColumnDefBase);\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\nclass CdkColumnDef extends _CdkColumnDefBase {\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Whether this column should be sticky positioned on the end of the row. Should make sure\n * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n * has been changed.\n */\n get stickyEnd() {\n return this._stickyEnd;\n }\n set stickyEnd(v) {\n const prevValue = this._stickyEnd;\n this._stickyEnd = coerceBooleanProperty(v);\n this._hasStickyChanged = prevValue !== this._stickyEnd;\n }\n constructor(_table) {\n super();\n this._table = _table;\n this._stickyEnd = false;\n }\n /**\n * Overridable method that sets the css classes that will be added to every cell in this\n * column.\n * In the future, columnCssClassName will change from type string[] to string and this\n * will set a single string value.\n * @docs-private\n */\n _updateColumnCssClassName() {\n this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setNameInput(value) {\n // If the directive is set without a name (updated programmatically), then this setter will\n // trigger with an empty string and should not overwrite the programmatically set value.\n if (value) {\n this._name = value;\n this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n this._updateColumnCssClassName();\n }\n }\n}\nCdkColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkColumnDef, deps: [{ token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: { sticky: \"sticky\", name: [\"cdkColumnDef\", \"name\"], stickyEnd: \"stickyEnd\" }, providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }], queries: [{ propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true }, { propertyName: \"footerCell\", first: true, predicate: CdkFooterCellDef, descendants: true }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkColumnDef]',\n inputs: ['sticky'],\n providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],\n }]\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; }, propDecorators: { name: [{\n type: Input,\n args: ['cdkColumnDef']\n }], stickyEnd: [{\n type: Input,\n args: ['stickyEnd']\n }], cell: [{\n type: ContentChild,\n args: [CdkCellDef]\n }], headerCell: [{\n type: ContentChild,\n args: [CdkHeaderCellDef]\n }], footerCell: [{\n type: ContentChild,\n args: [CdkFooterCellDef]\n }] } });\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nclass BaseCdkCell {\n constructor(columnDef, elementRef) {\n elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\n }\n}\n/** Header cell template container that adds the right classes and role. */\nclass CdkHeaderCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n }\n}\nCdkHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"cdk-header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-header-cell, th[cdk-header-cell]',\n host: {\n 'class': 'cdk-header-cell',\n 'role': 'columnheader',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Footer cell template container that adds the right classes and role. */\nclass CdkFooterCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkFooterCell, selector: \"cdk-footer-cell, td[cdk-footer-cell]\", host: { classAttribute: \"cdk-footer-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n host: {\n 'class': 'cdk-footer-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n/** Cell template container that adds the right classes and role. */\nclass CdkCell extends BaseCdkCell {\n constructor(columnDef, elementRef) {\n super(columnDef, elementRef);\n if (columnDef._table?._elementRef.nativeElement.nodeType === 1) {\n const tableRole = columnDef._table._elementRef.nativeElement.getAttribute('role');\n const role = tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n elementRef.nativeElement.setAttribute('role', role);\n }\n }\n}\nCdkCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCell, deps: [{ token: CdkColumnDef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\", host: { classAttribute: \"cdk-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-cell, td[cdk-cell]',\n host: {\n 'class': 'cdk-cell',\n },\n }]\n }], ctorParameters: function () { return [{ type: CdkColumnDef }, { type: i0.ElementRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @docs-private\n */\nclass _Schedule {\n constructor() {\n this.tasks = [];\n this.endTasks = [];\n }\n}\n/** Injection token used to provide a coalesced style scheduler. */\nconst _COALESCED_STYLE_SCHEDULER = new InjectionToken('_COALESCED_STYLE_SCHEDULER');\n/**\n * Allows grouping up CSSDom mutations after the current execution context.\n * This can significantly improve performance when separate consecutive functions are\n * reading from the CSSDom and then mutating it.\n *\n * @docs-private\n */\nclass _CoalescedStyleScheduler {\n constructor(_ngZone) {\n this._ngZone = _ngZone;\n this._currentSchedule = null;\n this._destroyed = new Subject();\n }\n /**\n * Schedules the specified task to run at the end of the current VM turn.\n */\n schedule(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.tasks.push(task);\n }\n /**\n * Schedules the specified task to run after other scheduled tasks at the end of the current\n * VM turn.\n */\n scheduleEnd(task) {\n this._createScheduleIfNeeded();\n this._currentSchedule.endTasks.push(task);\n }\n /** Prevent any further tasks from running. */\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n _createScheduleIfNeeded() {\n if (this._currentSchedule) {\n return;\n }\n this._currentSchedule = new _Schedule();\n this._getScheduleObservable()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => {\n while (this._currentSchedule.tasks.length || this._currentSchedule.endTasks.length) {\n const schedule = this._currentSchedule;\n // Capture new tasks scheduled by the current set of tasks.\n this._currentSchedule = new _Schedule();\n for (const task of schedule.tasks) {\n task();\n }\n for (const task of schedule.endTasks) {\n task();\n }\n }\n this._currentSchedule = null;\n });\n }\n _getScheduleObservable() {\n // Use onStable when in the context of an ongoing change detection cycle so that we\n // do not accidentally trigger additional cycles.\n return this._ngZone.isStable\n ? from(Promise.resolve(undefined))\n : this._ngZone.onStable.pipe(take(1));\n }\n}\n_CoalescedStyleScheduler.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: _CoalescedStyleScheduler, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\n_CoalescedStyleScheduler.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: _CoalescedStyleScheduler });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: _CoalescedStyleScheduler, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nconst CDK_ROW_TEMPLATE = ``;\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\nclass BaseRowDef {\n constructor(\n /** @docs-private */ template, _differs) {\n this.template = template;\n this._differs = _differs;\n }\n ngOnChanges(changes) {\n // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n // of the columns property or an empty array if none is provided.\n if (!this._columnsDiffer) {\n const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n this._columnsDiffer = this._differs.find(columns).create();\n this._columnsDiffer.diff(columns);\n }\n }\n /**\n * Returns the difference between the current columns and the columns from the last diff, or null\n * if there is no difference.\n */\n getColumnsDiff() {\n return this._columnsDiffer.diff(this.columns);\n }\n /** Gets this row def's relevant cell template from the provided column def. */\n extractCellTemplate(column) {\n if (this instanceof CdkHeaderRowDef) {\n return column.headerCell.template;\n }\n if (this instanceof CdkFooterRowDef) {\n return column.footerCell.template;\n }\n else {\n return column.cell.template;\n }\n }\n}\nBaseRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BaseRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\nBaseRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: BaseRowDef, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: BaseRowDef, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }]; } });\n// Boilerplate for applying mixins to CdkHeaderRowDef.\n/** @docs-private */\nclass CdkHeaderRowDefBase extends BaseRowDef {\n}\nconst _CdkHeaderRowDefBase = mixinHasStickyInput(CdkHeaderRowDefBase);\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass CdkHeaderRowDef extends _CdkHeaderRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkHeaderRowDef, selector: \"[cdkHeaderRowDef]\", inputs: { columns: [\"cdkHeaderRowDef\", \"columns\"], sticky: [\"cdkHeaderRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkHeaderRowDef]',\n inputs: ['columns: cdkHeaderRowDef', 'sticky: cdkHeaderRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n// Boilerplate for applying mixins to CdkFooterRowDef.\n/** @docs-private */\nclass CdkFooterRowDefBase extends BaseRowDef {\n}\nconst _CdkFooterRowDefBase = mixinHasStickyInput(CdkFooterRowDefBase);\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass CdkFooterRowDef extends _CdkFooterRowDefBase {\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n // Explicitly define it so that the method is called as part of the Angular lifecycle.\n ngOnChanges(changes) {\n super.ngOnChanges(changes);\n }\n}\nCdkFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkFooterRowDef, selector: \"[cdkFooterRowDef]\", inputs: { columns: [\"cdkFooterRowDef\", \"columns\"], sticky: [\"cdkFooterRowDefSticky\", \"sticky\"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkFooterRowDef]',\n inputs: ['columns: cdkFooterRowDef', 'sticky: cdkFooterRowDefSticky'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass CdkRowDef extends BaseRowDef {\n // TODO(andrewseguin): Add an input for providing a switch function to determine\n // if this template should be used.\n constructor(template, _differs, _table) {\n super(template, _differs);\n this._table = _table;\n }\n}\nCdkRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRowDef, deps: [{ token: i0.TemplateRef }, { token: i0.IterableDiffers }, { token: CDK_TABLE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nCdkRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkRowDef, selector: \"[cdkRowDef]\", inputs: { columns: [\"cdkRowDefColumns\", \"columns\"], when: [\"cdkRowDefWhen\", \"when\"] }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkRowDef]',\n inputs: ['columns: cdkRowDefColumns', 'when: cdkRowDefWhen'],\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.IterableDiffers }, { type: undefined, decorators: [{\n type: Inject,\n args: [CDK_TABLE]\n }, {\n type: Optional\n }] }]; } });\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\nclass CdkCellOutlet {\n constructor(_viewContainer) {\n this._viewContainer = _viewContainer;\n CdkCellOutlet.mostRecentCellOutlet = this;\n }\n ngOnDestroy() {\n // If this was the last outlet being rendered in the view, remove the reference\n // from the static property after it has been destroyed to avoid leaking memory.\n if (CdkCellOutlet.mostRecentCellOutlet === this) {\n CdkCellOutlet.mostRecentCellOutlet = null;\n }\n }\n}\n/**\n * Static property containing the latest constructed instance of this class.\n * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n * createEmbeddedView. After one of these components are created, this property will provide\n * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n * construct the cells with the provided context.\n */\nCdkCellOutlet.mostRecentCellOutlet = null;\nCdkCellOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCellOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkCellOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkCellOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[cdkCellOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass CdkHeaderRow {\n}\nCdkHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkHeaderRow, selector: \"cdk-header-row, tr[cdk-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-header-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-header-row, tr[cdk-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass CdkFooterRow {\n}\nCdkFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkFooterRow, selector: \"cdk-footer-row, tr[cdk-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-footer-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-footer-row, tr[cdk-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-footer-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass CdkRow {\n}\nCdkRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\nCdkRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkRow, selector: \"cdk-row, tr[cdk-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-row\" }, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRow, decorators: [{\n type: Component,\n args: [{\n selector: 'cdk-row, tr[cdk-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'cdk-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass CdkNoDataRow {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._contentClassName = 'cdk-no-data-row';\n }\n}\nCdkNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkNoDataRow, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\nCdkNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkNoDataRow, selector: \"ng-template[cdkNoDataRow]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[cdkNoDataRow]',\n }]\n }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nconst STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nclass StickyStyler {\n /**\n * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n * that uses the native `
` element.\n * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n * sticky positioning applied.\n * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n * by reversing left/right positions.\n * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n * using inline styles. If false, it is assumed that position: sticky is included in\n * the component stylesheet for _stickCellCss.\n * @param _positionListener A listener that is notified of changes to sticky rows/columns\n * and their dimensions.\n */\n constructor(_isNativeHtmlTable, _stickCellCss, direction, _coalescedStyleScheduler, _isBrowser = true, _needsPositionStickyOnElement = true, _positionListener) {\n this._isNativeHtmlTable = _isNativeHtmlTable;\n this._stickCellCss = _stickCellCss;\n this.direction = direction;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._isBrowser = _isBrowser;\n this._needsPositionStickyOnElement = _needsPositionStickyOnElement;\n this._positionListener = _positionListener;\n this._cachedCellWidths = [];\n this._borderCellCss = {\n 'top': `${_stickCellCss}-border-elem-top`,\n 'bottom': `${_stickCellCss}-border-elem-bottom`,\n 'left': `${_stickCellCss}-border-elem-left`,\n 'right': `${_stickCellCss}-border-elem-right`,\n };\n }\n /**\n * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n * @param rows The list of rows that should be cleared from sticking in the provided directions\n * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n */\n clearStickyPositioning(rows, stickyDirections) {\n const elementsToClear = [];\n for (const row of rows) {\n // If the row isn't an element (e.g. if it's an `ng-container`),\n // it won't have inline styles or `children` so we skip it.\n if (row.nodeType !== row.ELEMENT_NODE) {\n continue;\n }\n elementsToClear.push(row);\n for (let i = 0; i < row.children.length; i++) {\n elementsToClear.push(row.children[i]);\n }\n }\n // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (const element of elementsToClear) {\n this._removeStickyStyle(element, stickyDirections);\n }\n });\n }\n /**\n * Applies sticky left and right positions to the cells of each row according to the sticky\n * states of the rendered column definitions.\n * @param rows The rows that should have its set of cells stuck according to the sticky states.\n * @param stickyStartStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the start of the row.\n * @param stickyEndStates A list of boolean states where each state represents whether the cell\n * in this index position should be stuck to the end of the row.\n * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n * column cell. If `false` cached widths will be used instead.\n */\n updateStickyColumns(rows, stickyStartStates, stickyEndStates, recalculateCellWidths = true) {\n if (!rows.length ||\n !this._isBrowser ||\n !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))) {\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({ sizes: [] });\n this._positionListener.stickyEndColumnsUpdated({ sizes: [] });\n }\n return;\n }\n const firstRow = rows[0];\n const numCells = firstRow.children.length;\n const cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n const startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n const endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n const lastStickyStart = stickyStartStates.lastIndexOf(true);\n const firstStickyEnd = stickyEndStates.indexOf(true);\n // Coalesce with sticky row updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n const isRtl = this.direction === 'rtl';\n const start = isRtl ? 'right' : 'left';\n const end = isRtl ? 'left' : 'right';\n for (const row of rows) {\n for (let i = 0; i < numCells; i++) {\n const cell = row.children[i];\n if (stickyStartStates[i]) {\n this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);\n }\n if (stickyEndStates[i]) {\n this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n }\n }\n }\n if (this._positionListener) {\n this._positionListener.stickyColumnsUpdated({\n sizes: lastStickyStart === -1\n ? []\n : cellWidths\n .slice(0, lastStickyStart + 1)\n .map((width, index) => (stickyStartStates[index] ? width : null)),\n });\n this._positionListener.stickyEndColumnsUpdated({\n sizes: firstStickyEnd === -1\n ? []\n : cellWidths\n .slice(firstStickyEnd)\n .map((width, index) => (stickyEndStates[index + firstStickyEnd] ? width : null))\n .reverse(),\n });\n }\n });\n }\n /**\n * Applies sticky positioning to the row's cells if using the native table layout, and to the\n * row itself otherwise.\n * @param rowsToStick The list of rows that should be stuck according to their corresponding\n * sticky state and to the provided top or bottom position.\n * @param stickyStates A list of boolean states where each state represents whether the row\n * should be stuck in the particular top or bottom position.\n * @param position The position direction in which the row should be stuck if that row should be\n * sticky.\n *\n */\n stickRows(rowsToStick, stickyStates, position) {\n // Since we can't measure the rows on the server, we can't stick the rows properly.\n if (!this._isBrowser) {\n return;\n }\n // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n // position such that the last row stuck will be \"bottom: 0px\" and so on. Note that the\n // sticky states need to be reversed as well.\n const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n const stickyOffsets = [];\n const stickyCellHeights = [];\n const elementsToStick = [];\n for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n stickyOffsets[rowIndex] = stickyOffset;\n const row = rows[rowIndex];\n elementsToStick[rowIndex] = this._isNativeHtmlTable\n ? Array.from(row.children)\n : [row];\n const height = row.getBoundingClientRect().height;\n stickyOffset += height;\n stickyCellHeights[rowIndex] = height;\n }\n const borderedRowIndex = states.lastIndexOf(true);\n // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n // (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n if (!states[rowIndex]) {\n continue;\n }\n const offset = stickyOffsets[rowIndex];\n const isBorderedRowIndex = rowIndex === borderedRowIndex;\n for (const element of elementsToStick[rowIndex]) {\n this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n }\n }\n if (position === 'top') {\n this._positionListener?.stickyHeaderRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n else {\n this._positionListener?.stickyFooterRowsUpdated({\n sizes: stickyCellHeights,\n offsets: stickyOffsets,\n elements: elementsToStick,\n });\n }\n });\n }\n /**\n * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n * the tfoot element.\n */\n updateStickyFooterContainer(tableElement, stickyStates) {\n if (!this._isNativeHtmlTable) {\n return;\n }\n const tfoot = tableElement.querySelector('tfoot');\n // Coalesce with other sticky updates (and potentially other changes like column resize).\n this._coalescedStyleScheduler.schedule(() => {\n if (stickyStates.some(state => !state)) {\n this._removeStickyStyle(tfoot, ['bottom']);\n }\n else {\n this._addStickyStyle(tfoot, 'bottom', 0, false);\n }\n });\n }\n /**\n * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n * the zIndex, removing each of the provided sticky directions, and removing the\n * sticky position if there are no more directions.\n */\n _removeStickyStyle(element, stickyDirections) {\n for (const dir of stickyDirections) {\n element.style[dir] = '';\n element.classList.remove(this._borderCellCss[dir]);\n }\n // If the element no longer has any more sticky directions, remove sticky positioning and\n // the sticky CSS class.\n // Short-circuit checking element.style[dir] for stickyDirections as they\n // were already removed above.\n const hasDirection = STICKY_DIRECTIONS.some(dir => stickyDirections.indexOf(dir) === -1 && element.style[dir]);\n if (hasDirection) {\n element.style.zIndex = this._getCalculatedZIndex(element);\n }\n else {\n // When not hasDirection, _getCalculatedZIndex will always return ''.\n element.style.zIndex = '';\n if (this._needsPositionStickyOnElement) {\n element.style.position = '';\n }\n element.classList.remove(this._stickCellCss);\n }\n }\n /**\n * Adds the sticky styling to the element by adding the sticky style class, changing position\n * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n * direction and value.\n */\n _addStickyStyle(element, dir, dirValue, isBorderElement) {\n element.classList.add(this._stickCellCss);\n if (isBorderElement) {\n element.classList.add(this._borderCellCss[dir]);\n }\n element.style[dir] = `${dirValue}px`;\n element.style.zIndex = this._getCalculatedZIndex(element);\n if (this._needsPositionStickyOnElement) {\n element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n }\n }\n /**\n * Calculate what the z-index should be for the element, depending on what directions (top,\n * bottom, left, right) have been set. It should be true that elements with a top direction\n * should have the highest index since these are elements like a table header. If any of those\n * elements are also sticky in another direction, then they should appear above other elements\n * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n * (e.g. footer rows) should then be next in the ordering such that they are below the header\n * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n * should minimally increment so that they are above non-sticky elements but below top and bottom\n * elements.\n */\n _getCalculatedZIndex(element) {\n const zIndexIncrements = {\n top: 100,\n bottom: 10,\n left: 1,\n right: 1,\n };\n let zIndex = 0;\n // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n for (const dir of STICKY_DIRECTIONS) {\n if (element.style[dir]) {\n zIndex += zIndexIncrements[dir];\n }\n }\n return zIndex ? `${zIndex}` : '';\n }\n /** Gets the widths for each cell in the provided row. */\n _getCellWidths(row, recalculateCellWidths = true) {\n if (!recalculateCellWidths && this._cachedCellWidths.length) {\n return this._cachedCellWidths;\n }\n const cellWidths = [];\n const firstRowCells = row.children;\n for (let i = 0; i < firstRowCells.length; i++) {\n let cell = firstRowCells[i];\n cellWidths.push(cell.getBoundingClientRect().width);\n }\n this._cachedCellWidths = cellWidths;\n return cellWidths;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyStartColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = 0; i < widths.length; i++) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }\n /**\n * Determines the left and right positions of each sticky column cell, which will be the\n * accumulation of all sticky column cell widths to the left and right, respectively.\n * Non-sticky cells do not need to have a value set since their positions will not be applied.\n */\n _getStickyEndColumnPositions(widths, stickyStates) {\n const positions = [];\n let nextPosition = 0;\n for (let i = widths.length; i > 0; i--) {\n if (stickyStates[i]) {\n positions[i] = nextPosition;\n nextPosition += widths[i];\n }\n }\n return positions;\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an error to be thrown when attempting to find an nonexistent column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nfunction getTableUnknownColumnError(id) {\n return Error(`Could not find column with id \"${id}\".`);\n}\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nfunction getTableDuplicateColumnNameError(name) {\n return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nfunction getTableMultipleDefaultRowDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nfunction getTableMissingMatchingRowDefError(data) {\n return Error(`Could not find a matching row definition for the` +\n `provided row data: ${JSON.stringify(data)}`);\n}\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nfunction getTableMissingRowDefsError() {\n return Error('Missing definitions for header, footer, and row; ' +\n 'cannot determine which columns should be rendered.');\n}\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nfunction getTableUnknownDataSourceError() {\n return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nfunction getTableTextColumnMissingParentTableError() {\n return Error(`Text column could not find a parent table for registration.`);\n}\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nfunction getTableTextColumnMissingNameError() {\n return Error(`Table text column must have a name.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** The injection token used to specify the StickyPositioningListener. */\nconst STICKY_POSITIONING_LISTENER = new InjectionToken('CDK_SPL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass CdkRecycleRows {\n}\nCdkRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nCdkRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkRecycleRows, selector: \"cdk-table[recycleRows], table[cdk-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\nclass DataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: DataRowOutlet, selector: \"[rowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: DataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[rowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\nclass HeaderRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nHeaderRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HeaderRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nHeaderRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: HeaderRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[headerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\nclass FooterRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nFooterRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: FooterRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nFooterRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: FooterRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[footerRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\nclass NoDataRowOutlet {\n constructor(viewContainer, elementRef) {\n this.viewContainer = viewContainer;\n this.elementRef = elementRef;\n }\n}\nNoDataRowOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoDataRowOutlet, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\nNoDataRowOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\", ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: NoDataRowOutlet, decorators: [{\n type: Directive,\n args: [{ selector: '[noDataRowOutlet]' }]\n }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ElementRef }]; } });\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nconst CDK_TABLE_TEMPLATE = \n// Note that according to MDN, the `caption` element has to be projected as the **first**\n// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n`\n \n \n \n \n \n \n`;\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nclass RowViewRef extends EmbeddedViewRef {\n}\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\nclass CdkTable {\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n * relative to the function to know if a row should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n get trackBy() {\n return this._trackByFn;\n }\n set trackBy(fn) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n }\n this._trackByFn = fn;\n }\n /**\n * The table's source of data, which can be provided in three ways (in order of complexity):\n * - Simple data array (each object represents one table row)\n * - Stream that emits a data array each time the array changes\n * - `DataSource` object that implements the connect/disconnect interface.\n *\n * If a data array is provided, the table must be notified when the array's objects are\n * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n * render the diff since the last table render. If the data array reference is changed, the table\n * will automatically trigger an update to the rows.\n *\n * When providing an Observable stream, the table will trigger an update automatically when the\n * stream emits a new array of data.\n *\n * Finally, when providing a `DataSource` object, the table will use the Observable stream\n * provided by the connect function and trigger updates when that stream emits new data array\n * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n * subscriptions registered during the connect process).\n */\n get dataSource() {\n return this._dataSource;\n }\n set dataSource(dataSource) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n /**\n * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n * dataobject will render the first row that evaluates its when predicate to true, in the order\n * defined in the table, or otherwise the default row which does not have a when predicate.\n */\n get multiTemplateDataRows() {\n return this._multiTemplateDataRows;\n }\n set multiTemplateDataRows(v) {\n this._multiTemplateDataRows = coerceBooleanProperty(v);\n // In Ivy if this value is set via a static attribute (e.g.
),\n // this setter will be invoked before the row outlet has been defined hence the null check.\n if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n this._forceRenderDataRows();\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n * and optimize rendering sticky styles for native tables. No-op for flex tables.\n */\n get fixedLayout() {\n return this._fixedLayout;\n }\n set fixedLayout(v) {\n this._fixedLayout = coerceBooleanProperty(v);\n // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n this._forceRecalculateCellWidths = true;\n this._stickyColumnStylesNeedReset = true;\n }\n constructor(_differs, _changeDetectorRef, _elementRef, role, _dir, _document, _platform, _viewRepeater, _coalescedStyleScheduler, _viewportRuler, \n /**\n * @deprecated `_stickyPositioningListener` parameter to become required.\n * @breaking-change 13.0.0\n */\n _stickyPositioningListener, \n /**\n * @deprecated `_ngZone` parameter to become required.\n * @breaking-change 14.0.0\n */\n _ngZone) {\n this._differs = _differs;\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._dir = _dir;\n this._platform = _platform;\n this._viewRepeater = _viewRepeater;\n this._coalescedStyleScheduler = _coalescedStyleScheduler;\n this._viewportRuler = _viewportRuler;\n this._stickyPositioningListener = _stickyPositioningListener;\n this._ngZone = _ngZone;\n /** Subject that emits when the component has been destroyed. */\n this._onDestroy = new Subject();\n /**\n * Map of all the user's defined columns (header, data, and footer cell template) identified by\n * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n * any custom column definitions added to `_customColumnDefs`.\n */\n this._columnDefsByName = new Map();\n /**\n * Column definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * column definitions as *its* content child.\n */\n this._customColumnDefs = new Set();\n /**\n * Data row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in data rows as *its* content child.\n */\n this._customRowDefs = new Set();\n /**\n * Header row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n * built-in header rows as *its* content child.\n */\n this._customHeaderRowDefs = new Set();\n /**\n * Footer row definitions that were defined outside of the direct content children of the table.\n * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n * built-in footer row as *its* content child.\n */\n this._customFooterRowDefs = new Set();\n /**\n * Whether the header row definition has been changed. Triggers an update to the header row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._headerRowDefChanged = true;\n /**\n * Whether the footer row definition has been changed. Triggers an update to the footer row after\n * content is checked. Initialized as true so that the table renders the initial set of rows.\n */\n this._footerRowDefChanged = true;\n /**\n * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n * change.\n */\n this._stickyColumnStylesNeedReset = true;\n /**\n * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n * `false`, cached values will be used instead. This is only applicable to tables with\n * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.\n */\n this._forceRecalculateCellWidths = true;\n /**\n * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n * and row template matches, which allows the `IterableDiffer` to check rows by reference\n * and understand which rows are added/moved/removed.\n *\n * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n * `CdkRowDef` object. With the two keys, the cache points to a `RenderRow` object that\n * contains an array of created pairs. The array is necessary to handle cases where the data\n * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n * stored.\n */\n this._cachedRenderRowsMap = new Map();\n /**\n * CSS class added to any row or cell that has sticky positioning applied. May be overridden by\n * table subclasses.\n */\n this.stickyCssClass = 'cdk-table-sticky';\n /**\n * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n * the position is set in a selector associated with the value of stickyCssClass. May be\n * overridden by table subclasses\n */\n this.needsPositionStickyOnElement = true;\n /** Whether the no data row is currently showing anything. */\n this._isShowingNoDataRow = false;\n this._multiTemplateDataRows = false;\n this._fixedLayout = false;\n /**\n * Emits when the table completes rendering a set of data rows based on the latest data from the\n * data source, even if the set of rows is empty.\n */\n this.contentChanged = new EventEmitter();\n // TODO(andrewseguin): Remove max value as the end index\n // and instead calculate the view on init and scroll.\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n *\n * @docs-private\n */\n this.viewChange = new BehaviorSubject({\n start: 0,\n end: Number.MAX_VALUE,\n });\n if (!role) {\n this._elementRef.nativeElement.setAttribute('role', 'table');\n }\n this._document = _document;\n this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n }\n ngOnInit() {\n this._setupStickyStyler();\n if (this._isNativeHtmlTable) {\n this._applyNativeTableSections();\n }\n // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n // the user has provided a custom trackBy, return the result of that function as evaluated\n // with the values of the `RenderRow`'s data and index.\n this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {\n return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n });\n this._viewportRuler\n .change()\n .pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this._forceRecalculateCellWidths = true;\n });\n }\n ngAfterContentChecked() {\n // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n this._cacheRowDefs();\n this._cacheColumnDefs();\n // Make sure that the user has at least added header, footer, or data row def.\n if (!this._headerRowDefs.length &&\n !this._footerRowDefs.length &&\n !this._rowDefs.length &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingRowDefsError();\n }\n // Render updates if the list of columns have been changed for the header, row, or footer defs.\n const columnsChanged = this._renderUpdatedColumns();\n const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n // Ensure sticky column styles are reset if set to `true` elsewhere.\n this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n this._forceRecalculateCellWidths = rowDefsChanged;\n // If the header row definition has been changed, trigger a render to the header row.\n if (this._headerRowDefChanged) {\n this._forceRenderHeaderRows();\n this._headerRowDefChanged = false;\n }\n // If the footer row definition has been changed, trigger a render to the footer row.\n if (this._footerRowDefChanged) {\n this._forceRenderFooterRows();\n this._footerRowDefChanged = false;\n }\n // If there is a data source and row definitions, connect to the data source unless a\n // connection has already been made.\n if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n this._observeRenderChanges();\n }\n else if (this._stickyColumnStylesNeedReset) {\n // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n // called when it row data arrives. Otherwise, we need to call it proactively.\n this.updateStickyColumnStyles();\n }\n this._checkStickyStates();\n }\n ngOnDestroy() {\n [\n this._rowOutlet.viewContainer,\n this._headerRowOutlet.viewContainer,\n this._footerRowOutlet.viewContainer,\n this._cachedRenderRowsMap,\n this._customColumnDefs,\n this._customRowDefs,\n this._customHeaderRowDefs,\n this._customFooterRowDefs,\n this._columnDefsByName,\n ].forEach(def => {\n def.clear();\n });\n this._headerRowDefs = [];\n this._footerRowDefs = [];\n this._defaultRowDef = null;\n this._onDestroy.next();\n this._onDestroy.complete();\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n }\n /**\n * Renders rows based on the table's latest set of data, which was either provided directly as an\n * input or retrieved through an Observable stream (directly or from a DataSource).\n * Checks for differences in the data since the last diff to perform only the necessary\n * changes (add/remove/move rows).\n *\n * If the table's data source is a DataSource or Observable, this will be invoked automatically\n * each time the provided Observable stream emits a new data array. Otherwise if your data is\n * an array, this function will need to be called to render any changes.\n */\n renderRows() {\n this._renderRows = this._getAllRenderRows();\n const changes = this._dataDiffer.diff(this._renderRows);\n if (!changes) {\n this._updateNoDataRow();\n this.contentChanged.next();\n return;\n }\n const viewContainer = this._rowOutlet.viewContainer;\n this._viewRepeater.applyChanges(changes, viewContainer, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record.item, currentIndex), record => record.item.data, (change) => {\n if (change.operation === 1 /* _ViewRepeaterOperation.INSERTED */ && change.context) {\n this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n }\n });\n // Update the meta context of a row's context data (index, count, first, last, ...)\n this._updateRowIndexContext();\n // Update rows that did not get added/removed/moved but may have had their identity changed,\n // e.g. if trackBy matched data on some property but the actual data reference changed.\n changes.forEachIdentityChange((record) => {\n const rowView = viewContainer.get(record.currentIndex);\n rowView.context.$implicit = record.item.data;\n });\n this._updateNoDataRow();\n // Allow the new row data to render before measuring it.\n // @breaking-change 14.0.0 Remove undefined check once _ngZone is required.\n if (this._ngZone && NgZone.isInAngularZone()) {\n this._ngZone.onStable.pipe(take(1), takeUntil(this._onDestroy)).subscribe(() => {\n this.updateStickyColumnStyles();\n });\n }\n else {\n this.updateStickyColumnStyles();\n }\n this.contentChanged.next();\n }\n /** Adds a column definition that was not included as part of the content children. */\n addColumnDef(columnDef) {\n this._customColumnDefs.add(columnDef);\n }\n /** Removes a column definition that was not included as part of the content children. */\n removeColumnDef(columnDef) {\n this._customColumnDefs.delete(columnDef);\n }\n /** Adds a row definition that was not included as part of the content children. */\n addRowDef(rowDef) {\n this._customRowDefs.add(rowDef);\n }\n /** Removes a row definition that was not included as part of the content children. */\n removeRowDef(rowDef) {\n this._customRowDefs.delete(rowDef);\n }\n /** Adds a header row definition that was not included as part of the content children. */\n addHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.add(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Removes a header row definition that was not included as part of the content children. */\n removeHeaderRowDef(headerRowDef) {\n this._customHeaderRowDefs.delete(headerRowDef);\n this._headerRowDefChanged = true;\n }\n /** Adds a footer row definition that was not included as part of the content children. */\n addFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.add(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Removes a footer row definition that was not included as part of the content children. */\n removeFooterRowDef(footerRowDef) {\n this._customFooterRowDefs.delete(footerRowDef);\n this._footerRowDefChanged = true;\n }\n /** Sets a no data row definition that was not included as a part of the content children. */\n setNoDataRow(noDataRow) {\n this._customNoDataRow = noDataRow;\n }\n /**\n * Updates the header sticky styles. First resets all applied styles with respect to the cells\n * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n * automatically called when the header row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyHeaderRowStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the thead element if there are no header rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const thead = tableElement.querySelector('thead');\n if (thead) {\n thead.style.display = headerRows.length ? '' : 'none';\n }\n const stickyStates = this._headerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n // Reset the dirty state of the sticky input change since it has been used.\n this._headerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n * automatically called when the footer row changes its displayed set of columns, or if its\n * sticky input changes. May be called manually for cases where the cell content changes outside\n * of these events.\n */\n updateStickyFooterRowStyles() {\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n const tableElement = this._elementRef.nativeElement;\n // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n // required child `row`.\n const tfoot = tableElement.querySelector('tfoot');\n if (tfoot) {\n tfoot.style.display = footerRows.length ? '' : 'none';\n }\n const stickyStates = this._footerRowDefs.map(def => def.sticky);\n this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n // Reset the dirty state of the sticky input change since it has been used.\n this._footerRowDefs.forEach(def => def.resetStickyChanged());\n }\n /**\n * Updates the column sticky styles. First resets all applied styles with respect to the cells\n * sticking to the left and right. Then sticky styles are added for the left and right according\n * to the column definitions for each cell in each row. This is automatically called when\n * the data source provides a new set of data or when a column definition changes its sticky\n * input. May be called manually for cases where the cell content changes outside of these events.\n */\n updateStickyColumnStyles() {\n const headerRows = this._getRenderedRows(this._headerRowOutlet);\n const dataRows = this._getRenderedRows(this._rowOutlet);\n const footerRows = this._getRenderedRows(this._footerRowOutlet);\n // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n // In a table using a fixed layout, row content won't affect column width, so sticky styles\n // don't need to be cleared unless either the sticky column config changes or one of the row\n // defs change.\n if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\n // Clear the left and right positioning from all columns in the table across all rows since\n // sticky columns span across all table sections (header, data, footer)\n this._stickyStyler.clearStickyPositioning([...headerRows, ...dataRows, ...footerRows], ['left', 'right']);\n this._stickyColumnStylesNeedReset = false;\n }\n // Update the sticky styles for each header row depending on the def's sticky state\n headerRows.forEach((headerRow, i) => {\n this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n });\n // Update the sticky styles for each data row depending on its def's sticky state\n this._rowDefs.forEach(rowDef => {\n // Collect all the rows rendered with this row definition.\n const rows = [];\n for (let i = 0; i < dataRows.length; i++) {\n if (this._renderRows[i].rowDef === rowDef) {\n rows.push(dataRows[i]);\n }\n }\n this._addStickyColumnStyles(rows, rowDef);\n });\n // Update the sticky styles for each footer row depending on the def's sticky state\n footerRows.forEach((footerRow, i) => {\n this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n });\n // Reset the dirty state of the sticky input change since it has been used.\n Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n }\n /**\n * Get the list of RenderRow objects to render according to the current list of data and defined\n * row definitions. If the previous list already contained a particular pair, it should be reused\n * so that the differ equates their references.\n */\n _getAllRenderRows() {\n const renderRows = [];\n // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n // new cache while unused ones can be picked up by garbage collection.\n const prevCachedRenderRows = this._cachedRenderRowsMap;\n this._cachedRenderRowsMap = new Map();\n // For each data object, get the list of rows that should be rendered, represented by the\n // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n for (let i = 0; i < this._data.length; i++) {\n let data = this._data[i];\n const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n if (!this._cachedRenderRowsMap.has(data)) {\n this._cachedRenderRowsMap.set(data, new WeakMap());\n }\n for (let j = 0; j < renderRowsForData.length; j++) {\n let renderRow = renderRowsForData[j];\n const cache = this._cachedRenderRowsMap.get(renderRow.data);\n if (cache.has(renderRow.rowDef)) {\n cache.get(renderRow.rowDef).push(renderRow);\n }\n else {\n cache.set(renderRow.rowDef, [renderRow]);\n }\n renderRows.push(renderRow);\n }\n }\n return renderRows;\n }\n /**\n * Gets a list of `RenderRow` for the provided data object and any `CdkRowDef` objects that\n * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n * `(T, CdkRowDef)` pair.\n */\n _getRenderRowsForData(data, dataIndex, cache) {\n const rowDefs = this._getRowDefs(data, dataIndex);\n return rowDefs.map(rowDef => {\n const cachedRenderRows = cache && cache.has(rowDef) ? cache.get(rowDef) : [];\n if (cachedRenderRows.length) {\n const dataRow = cachedRenderRows.shift();\n dataRow.dataIndex = dataIndex;\n return dataRow;\n }\n else {\n return { data, rowDef, dataIndex };\n }\n });\n }\n /** Update the map containing the content's column definitions. */\n _cacheColumnDefs() {\n this._columnDefsByName.clear();\n const columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);\n columnDefs.forEach(columnDef => {\n if (this._columnDefsByName.has(columnDef.name) &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableDuplicateColumnNameError(columnDef.name);\n }\n this._columnDefsByName.set(columnDef.name, columnDef);\n });\n }\n /** Update the list of all available row definitions that can be used. */\n _cacheRowDefs() {\n this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n // After all row definitions are determined, find the row definition to be considered default.\n const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n if (!this.multiTemplateDataRows &&\n defaultRowDefs.length > 1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMultipleDefaultRowDefsError();\n }\n this._defaultRowDef = defaultRowDefs[0];\n }\n /**\n * Check if the header, data, or footer rows have changed what columns they want to display or\n * whether the sticky states have changed for the header or footer. If there is a diff, then\n * re-render that section.\n */\n _renderUpdatedColumns() {\n const columnsDiffReducer = (acc, def) => acc || !!def.getColumnsDiff();\n // Force re-render data rows if the list of column definitions have changed.\n const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n if (dataColumnsChanged) {\n this._forceRenderDataRows();\n }\n // Force re-render header/footer rows if the list of column definitions have changed.\n const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n if (headerColumnsChanged) {\n this._forceRenderHeaderRows();\n }\n const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n if (footerColumnsChanged) {\n this._forceRenderFooterRows();\n }\n return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n }\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the row outlet. Otherwise start listening for new data.\n */\n _switchDataSource(dataSource) {\n this._data = [];\n if (isDataSource(this.dataSource)) {\n this.dataSource.disconnect(this);\n }\n // Stop listening for data from the previous data source.\n if (this._renderChangeSubscription) {\n this._renderChangeSubscription.unsubscribe();\n this._renderChangeSubscription = null;\n }\n if (!dataSource) {\n if (this._dataDiffer) {\n this._dataDiffer.diff([]);\n }\n this._rowOutlet.viewContainer.clear();\n }\n this._dataSource = dataSource;\n }\n /** Set up a subscription for the data provided by the data source. */\n _observeRenderChanges() {\n // If no data source has been set, there is nothing to observe for changes.\n if (!this.dataSource) {\n return;\n }\n let dataStream;\n if (isDataSource(this.dataSource)) {\n dataStream = this.dataSource.connect(this);\n }\n else if (isObservable(this.dataSource)) {\n dataStream = this.dataSource;\n }\n else if (Array.isArray(this.dataSource)) {\n dataStream = of(this.dataSource);\n }\n if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownDataSourceError();\n }\n this._renderChangeSubscription = dataStream\n .pipe(takeUntil(this._onDestroy))\n .subscribe(data => {\n this._data = data || [];\n this.renderRows();\n });\n }\n /**\n * Clears any existing content in the header row outlet and creates a new embedded view\n * in the outlet using the header row definition.\n */\n _forceRenderHeaderRows() {\n // Clear the header row outlet if any content exists.\n if (this._headerRowOutlet.viewContainer.length > 0) {\n this._headerRowOutlet.viewContainer.clear();\n }\n this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n this.updateStickyHeaderRowStyles();\n }\n /**\n * Clears any existing content in the footer row outlet and creates a new embedded view\n * in the outlet using the footer row definition.\n */\n _forceRenderFooterRows() {\n // Clear the footer row outlet if any content exists.\n if (this._footerRowOutlet.viewContainer.length > 0) {\n this._footerRowOutlet.viewContainer.clear();\n }\n this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n this.updateStickyFooterRowStyles();\n }\n /** Adds the sticky column styles for the rows according to the columns' stick states. */\n _addStickyColumnStyles(rows, rowDef) {\n const columnDefs = Array.from(rowDef.columns || []).map(columnName => {\n const columnDef = this._columnDefsByName.get(columnName);\n if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnName);\n }\n return columnDef;\n });\n const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates, !this._fixedLayout || this._forceRecalculateCellWidths);\n }\n /** Gets the list of rows that have been rendered in the row outlet. */\n _getRenderedRows(rowOutlet) {\n const renderedRows = [];\n for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n const viewRef = rowOutlet.viewContainer.get(i);\n renderedRows.push(viewRef.rootNodes[0]);\n }\n return renderedRows;\n }\n /**\n * Get the matching row definitions that should be used for this row data. If there is only\n * one row definition, it is returned. Otherwise, find the row definitions that has a when\n * predicate that returns true with the data. If none return true, return the default row\n * definition.\n */\n _getRowDefs(data, dataIndex) {\n if (this._rowDefs.length == 1) {\n return [this._rowDefs[0]];\n }\n let rowDefs = [];\n if (this.multiTemplateDataRows) {\n rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n }\n else {\n let rowDef = this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n if (rowDef) {\n rowDefs.push(rowDef);\n }\n }\n if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableMissingMatchingRowDefError(data);\n }\n return rowDefs;\n }\n _getEmbeddedViewArgs(renderRow, index) {\n const rowDef = renderRow.rowDef;\n const context = { $implicit: renderRow.data };\n return {\n templateRef: rowDef.template,\n context,\n index,\n };\n }\n /**\n * Creates a new row template in the outlet and fills it with the set of cell templates.\n * Optionally takes a context to provide to the row and cells, as well as an optional index\n * of where to place the new row template in the outlet.\n */\n _renderRow(outlet, rowDef, index, context = {}) {\n // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n this._renderCellTemplateForItem(rowDef, context);\n return view;\n }\n _renderCellTemplateForItem(rowDef, context) {\n for (let cellTemplate of this._getCellTemplates(rowDef)) {\n if (CdkCellOutlet.mostRecentCellOutlet) {\n CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n }\n }\n this._changeDetectorRef.markForCheck();\n }\n /**\n * Updates the index-related context for each row to reflect any changes in the index of the rows,\n * e.g. first/last/even/odd.\n */\n _updateRowIndexContext() {\n const viewContainer = this._rowOutlet.viewContainer;\n for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n const viewRef = viewContainer.get(renderIndex);\n const context = viewRef.context;\n context.count = count;\n context.first = renderIndex === 0;\n context.last = renderIndex === count - 1;\n context.even = renderIndex % 2 === 0;\n context.odd = !context.even;\n if (this.multiTemplateDataRows) {\n context.dataIndex = this._renderRows[renderIndex].dataIndex;\n context.renderIndex = renderIndex;\n }\n else {\n context.index = this._renderRows[renderIndex].dataIndex;\n }\n }\n }\n /** Gets the column definitions for the provided row def. */\n _getCellTemplates(rowDef) {\n if (!rowDef || !rowDef.columns) {\n return [];\n }\n return Array.from(rowDef.columns, columnId => {\n const column = this._columnDefsByName.get(columnId);\n if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableUnknownColumnError(columnId);\n }\n return rowDef.extractCellTemplate(column);\n });\n }\n /** Adds native table sections (e.g. tbody) and moves the row outlets into them. */\n _applyNativeTableSections() {\n const documentFragment = this._document.createDocumentFragment();\n const sections = [\n { tag: 'thead', outlets: [this._headerRowOutlet] },\n { tag: 'tbody', outlets: [this._rowOutlet, this._noDataRowOutlet] },\n { tag: 'tfoot', outlets: [this._footerRowOutlet] },\n ];\n for (const section of sections) {\n const element = this._document.createElement(section.tag);\n element.setAttribute('role', 'rowgroup');\n for (const outlet of section.outlets) {\n element.appendChild(outlet.elementRef.nativeElement);\n }\n documentFragment.appendChild(element);\n }\n // Use a DocumentFragment so we don't hit the DOM on each iteration.\n this._elementRef.nativeElement.appendChild(documentFragment);\n }\n /**\n * Forces a re-render of the data rows. Should be called in cases where there has been an input\n * change that affects the evaluation of which rows should be rendered, e.g. toggling\n * `multiTemplateDataRows` or adding/removing row definitions.\n */\n _forceRenderDataRows() {\n this._dataDiffer.diff([]);\n this._rowOutlet.viewContainer.clear();\n this.renderRows();\n }\n /**\n * Checks if there has been a change in sticky states since last check and applies the correct\n * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n * during a change detection and after the inputs are settled (after content check).\n */\n _checkStickyStates() {\n const stickyCheckReducer = (acc, d) => {\n return acc || d.hasStickyChanged();\n };\n // Note that the check needs to occur for every definition since it notifies the definition\n // that it can reset its dirty state. Using another operator like `some` may short-circuit\n // remaining definitions and leave them in an unchecked state.\n if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyHeaderRowStyles();\n }\n if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n this.updateStickyFooterRowStyles();\n }\n if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n this._stickyColumnStylesNeedReset = true;\n this.updateStickyColumnStyles();\n }\n }\n /**\n * Creates the sticky styler that will be used for sticky rows and columns. Listens\n * for directionality changes and provides the latest direction to the styler. Re-applies column\n * stickiness when directionality changes.\n */\n _setupStickyStyler() {\n const direction = this._dir ? this._dir.value : 'ltr';\n this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);\n (this._dir ? this._dir.change : of())\n .pipe(takeUntil(this._onDestroy))\n .subscribe(value => {\n this._stickyStyler.direction = value;\n this.updateStickyColumnStyles();\n });\n }\n /** Filters definitions that belong to this table from a QueryList. */\n _getOwnDefs(items) {\n return items.filter(item => !item._table || item._table === this);\n }\n /** Creates or removes the no data row, depending on whether any data is being shown. */\n _updateNoDataRow() {\n const noDataRow = this._customNoDataRow || this._noDataRow;\n if (!noDataRow) {\n return;\n }\n const shouldShow = this._rowOutlet.viewContainer.length === 0;\n if (shouldShow === this._isShowingNoDataRow) {\n return;\n }\n const container = this._noDataRowOutlet.viewContainer;\n if (shouldShow) {\n const view = container.createEmbeddedView(noDataRow.templateRef);\n const rootNode = view.rootNodes[0];\n // Only add the attributes if we have a single root node since it's hard\n // to figure out which one to add it to when there are multiple.\n if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n rootNode.setAttribute('role', 'row');\n rootNode.classList.add(noDataRow._contentClassName);\n }\n }\n else {\n container.clear();\n }\n this._isShowingNoDataRow = shouldShow;\n }\n}\nCdkTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTable, deps: [{ token: i0.IterableDiffers }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: 'role', attribute: true }, { token: i1.Directionality, optional: true }, { token: DOCUMENT }, { token: i2.Platform }, { token: _VIEW_REPEATER_STRATEGY }, { token: _COALESCED_STYLE_SCHEDULER }, { token: i3.ViewportRuler }, { token: STICKY_POSITIONING_LISTENER, optional: true, skipSelf: true }, { token: i0.NgZone, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkTable, selector: \"cdk-table, table[cdk-table]\", inputs: { trackBy: \"trackBy\", dataSource: \"dataSource\", multiTemplateDataRows: \"multiTemplateDataRows\", fixedLayout: \"fixedLayout\" }, outputs: { contentChanged: \"contentChanged\" }, host: { properties: { \"class.cdk-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"cdk-table\" }, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], queries: [{ propertyName: \"_noDataRow\", first: true, predicate: CdkNoDataRow, descendants: true }, { propertyName: \"_contentColumnDefs\", predicate: CdkColumnDef, descendants: true }, { propertyName: \"_contentRowDefs\", predicate: CdkRowDef, descendants: true }, { propertyName: \"_contentHeaderRowDefs\", predicate: CdkHeaderRowDef, descendants: true }, { propertyName: \"_contentFooterRowDefs\", predicate: CdkFooterRowDef, descendants: true }], viewQueries: [{ propertyName: \"_rowOutlet\", first: true, predicate: DataRowOutlet, descendants: true, static: true }, { propertyName: \"_headerRowOutlet\", first: true, predicate: HeaderRowOutlet, descendants: true, static: true }, { propertyName: \"_footerRowOutlet\", first: true, predicate: FooterRowOutlet, descendants: true, static: true }, { propertyName: \"_noDataRowOutlet\", first: true, predicate: NoDataRowOutlet, descendants: true, static: true }], exportAs: [\"cdkTable\"], ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n\", isInline: true, styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTable, decorators: [{\n type: Component,\n args: [{ selector: 'cdk-table, table[cdk-table]', exportAs: 'cdkTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'cdk-table',\n '[class.cdk-table-fixed-layout]': 'fixedLayout',\n }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [\n { provide: CDK_TABLE, useExisting: CdkTable },\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"] }]\n }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n type: Attribute,\n args: ['role']\n }] }, { type: i1.Directionality, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: i2.Platform }, { type: undefined, decorators: [{\n type: Inject,\n args: [_VIEW_REPEATER_STRATEGY]\n }] }, { type: _CoalescedStyleScheduler, decorators: [{\n type: Inject,\n args: [_COALESCED_STYLE_SCHEDULER]\n }] }, { type: i3.ViewportRuler }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [STICKY_POSITIONING_LISTENER]\n }] }, { type: i0.NgZone, decorators: [{\n type: Optional\n }] }]; }, propDecorators: { trackBy: [{\n type: Input\n }], dataSource: [{\n type: Input\n }], multiTemplateDataRows: [{\n type: Input\n }], fixedLayout: [{\n type: Input\n }], contentChanged: [{\n type: Output\n }], _rowOutlet: [{\n type: ViewChild,\n args: [DataRowOutlet, { static: true }]\n }], _headerRowOutlet: [{\n type: ViewChild,\n args: [HeaderRowOutlet, { static: true }]\n }], _footerRowOutlet: [{\n type: ViewChild,\n args: [FooterRowOutlet, { static: true }]\n }], _noDataRowOutlet: [{\n type: ViewChild,\n args: [NoDataRowOutlet, { static: true }]\n }], _contentColumnDefs: [{\n type: ContentChildren,\n args: [CdkColumnDef, { descendants: true }]\n }], _contentRowDefs: [{\n type: ContentChildren,\n args: [CdkRowDef, { descendants: true }]\n }], _contentHeaderRowDefs: [{\n type: ContentChildren,\n args: [CdkHeaderRowDef, {\n descendants: true,\n }]\n }], _contentFooterRowDefs: [{\n type: ContentChildren,\n args: [CdkFooterRowDef, {\n descendants: true,\n }]\n }], _noDataRow: [{\n type: ContentChild,\n args: [CdkNoDataRow]\n }] } });\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet(array, set) {\n return array.concat(Array.from(set));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`
`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass CdkTextColumn {\n /** Column name that should be used to reference this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._name = name;\n // With Ivy, inputs can be initialized before static query results are\n // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n this._syncColumnDefName();\n }\n constructor(\n // `CdkTextColumn` is always requiring a table, but we just assert it manually\n // for better error reporting.\n // tslint:disable-next-line: lightweight-tokens\n _table, _options) {\n this._table = _table;\n this._options = _options;\n /** Alignment of the cell values. */\n this.justify = 'start';\n this._options = _options || {};\n }\n ngOnInit() {\n this._syncColumnDefName();\n if (this.headerText === undefined) {\n this.headerText = this._createDefaultHeaderText();\n }\n if (!this.dataAccessor) {\n this.dataAccessor =\n this._options.defaultDataAccessor || ((data, name) => data[name]);\n }\n if (this._table) {\n // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n // since the columnDef will not pick up its content by the time the table finishes checking\n // its content and initializing the rows.\n this.columnDef.cell = this.cell;\n this.columnDef.headerCell = this.headerCell;\n this._table.addColumnDef(this.columnDef);\n }\n else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throw getTableTextColumnMissingParentTableError();\n }\n }\n ngOnDestroy() {\n if (this._table) {\n this._table.removeColumnDef(this.columnDef);\n }\n }\n /**\n * Creates a default header text. Use the options' header text transformation function if one\n * has been provided. Otherwise simply capitalize the column name.\n */\n _createDefaultHeaderText() {\n const name = this.name;\n if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getTableTextColumnMissingNameError();\n }\n if (this._options && this._options.defaultHeaderTextTransform) {\n return this._options.defaultHeaderTextTransform(name);\n }\n return name[0].toUpperCase() + name.slice(1);\n }\n /** Synchronizes the column definition name with the text column name. */\n _syncColumnDefName() {\n if (this.columnDef) {\n this.columnDef.name = this.name;\n }\n }\n}\nCdkTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTextColumn, deps: [{ token: CdkTable, optional: true }, { token: TEXT_COLUMN_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });\nCdkTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: CdkTextColumn, selector: \"cdk-text-column\", inputs: { name: \"name\", headerText: \"headerText\", dataAccessor: \"dataAccessor\", justify: \"justify\" }, viewQueries: [{ propertyName: \"columnDef\", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `\n \n
\n \n `,\n encapsulation: ViewEncapsulation.None,\n // Change detection is intentionally not set to OnPush. This component's template will be provided\n // to the table to be inserted into its view. This is problematic when change detection runs since\n // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n // mean's the template in the table's view will not have the updated value (and in fact will cause\n // an ExpressionChangedAfterItHasBeenCheckedError).\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n }]\n }], ctorParameters: function () { return [{ type: CdkTable, decorators: [{\n type: Optional\n }] }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [TEXT_COLUMN_OPTIONS]\n }] }]; }, propDecorators: { name: [{\n type: Input\n }], headerText: [{\n type: Input\n }], dataAccessor: [{\n type: Input\n }], justify: [{\n type: Input\n }], columnDef: [{\n type: ViewChild,\n args: [CdkColumnDef, { static: true }]\n }], cell: [{\n type: ViewChild,\n args: [CdkCellDef, { static: true }]\n }], headerCell: [{\n type: ViewChild,\n args: [CdkHeaderCellDef, { static: true }]\n }] } });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EXPORTED_DECLARATIONS = [\n CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet,\n];\nclass CdkTableModule {\n}\nCdkTableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nCdkTableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTableModule, declarations: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet], imports: [ScrollingModule], exports: [CdkTable,\n CdkRowDef,\n CdkCellDef,\n CdkCellOutlet,\n CdkHeaderCellDef,\n CdkFooterCellDef,\n CdkColumnDef,\n CdkCell,\n CdkRow,\n CdkHeaderCell,\n CdkFooterCell,\n CdkHeaderRow,\n CdkHeaderRowDef,\n CdkFooterRow,\n CdkFooterRowDef,\n DataRowOutlet,\n HeaderRowOutlet,\n FooterRowOutlet,\n CdkTextColumn,\n CdkNoDataRow,\n CdkRecycleRows,\n NoDataRowOutlet] });\nCdkTableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTableModule, imports: [ScrollingModule] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: CdkTableModule, decorators: [{\n type: NgModule,\n args: [{\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n imports: [ScrollingModule],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRecycleRows, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOutlet, STICKY_DIRECTIONS, STICKY_POSITIONING_LISTENER, StickyStyler, TEXT_COLUMN_OPTIONS, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule, mixinHasStickyInput };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/table';\nimport { CdkTable, CDK_TABLE, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, STICKY_POSITIONING_LISTENER, CDK_TABLE_TEMPLATE, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CDK_ROW_TEMPLATE, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTextColumn, CdkTableModule } from '@angular/cdk/table';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';\nimport { MatCommonModule } from '@angular/material/core';\nimport { BehaviorSubject, Subject, merge, of, combineLatest } from 'rxjs';\nimport { _isNumberValue } from '@angular/cdk/coercion';\nimport { map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass MatRecycleRows {\n}\nMatRecycleRows.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\nMatRecycleRows.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatRecycleRows, selector: \"mat-table[recycleRows], table[mat-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRecycleRows, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',\n providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n }]\n }] });\nclass MatTable extends CdkTable {\n constructor() {\n super(...arguments);\n /** Overrides the sticky CSS class set by the `CdkTable`. */\n this.stickyCssClass = 'mat-mdc-table-sticky';\n /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */\n this.needsPositionStickyOnElement = false;\n }\n ngOnInit() {\n super.ngOnInit();\n // After ngOnInit, the `CdkTable` has created and inserted the table sections (thead, tbody,\n // tfoot). MDC requires the `mdc-data-table__content` class to be added to the body. Note that\n // this only applies to native tables, because we don't wrap the content of flexbox-based ones.\n if (this._isNativeHtmlTable) {\n const tbody = this._elementRef.nativeElement.querySelector('tbody');\n tbody.classList.add('mdc-data-table__content');\n }\n }\n}\nMatTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatTable, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatTable, selector: \"mat-table, table[mat-table]\", host: { properties: { \"class.mdc-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"mat-mdc-table mdc-data-table__table\" }, providers: [\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], exportAs: [\"matTable\"], usesInheritance: true, ngImport: i0, template: \"\\n \\n \\n \\n \\n \\n \\n\", isInline: true, styles: [\".mdc-data-table{border-radius:var(--mdc-shape-medium, 4px);border-width:1px;border-style:solid}.mdc-data-table .mdc-data-table__header-cell:first-child{border-top-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:first-child,.mdc-data-table .mdc-data-table__header-cell:first-child[dir=rtl]{border-top-right-radius:var(--mdc-shape-medium, 4px);border-top-left-radius:0}.mdc-data-table .mdc-data-table__header-cell:last-child{border-top-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:last-child,.mdc-data-table .mdc-data-table__header-cell:last-child[dir=rtl]{border-top-left-radius:var(--mdc-shape-medium, 4px);border-top-right-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child{border-bottom-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child[dir=rtl]{border-bottom-right-radius:var(--mdc-shape-medium, 4px);border-bottom-left-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child{border-bottom-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child[dir=rtl]{border-bottom-left-radius:var(--mdc-shape-medium, 4px);border-bottom-right-radius:0}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-width:1px;border-bottom-style:solid}.mdc-data-table__pagination{border-top-width:1px;border-top-style:solid}.mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:none}.mdc-data-table__row{height:52px}.mdc-data-table__pagination{min-height:52px}.mdc-data-table__header-row{height:56px}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table--sticky-header .mdc-data-table__header-cell{position:sticky;top:0;z-index:1}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__pagination{box-sizing:border-box;display:flex;justify-content:flex-end}.mdc-data-table__pagination-trailing{margin-left:4px;margin-right:0;align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end}[dir=rtl] .mdc-data-table__pagination-trailing,.mdc-data-table__pagination-trailing[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__pagination-navigation{align-items:center;display:flex}.mdc-data-table__pagination-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__pagination-button .mdc-button__icon,.mdc-data-table__pagination-button .mdc-button__icon[dir=rtl]{transform:rotate(180deg)}[dir=rtl] .mdc-data-table__pagination-button,.mdc-data-table__pagination-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__pagination-total{margin-left:14px;margin-right:36px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-total,.mdc-data-table__pagination-total[dir=rtl]{margin-left:36px;margin-right:14px}.mdc-data-table__pagination-rows-per-page{margin-left:0;margin-right:22px;align-items:center;display:inline-flex}[dir=rtl] .mdc-data-table__pagination-rows-per-page,.mdc-data-table__pagination-rows-per-page[dir=rtl]{margin-left:22px;margin-right:0}.mdc-data-table__pagination-rows-per-page-label{margin-left:0;margin-right:12px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__pagination-rows-per-page-label[dir=rtl]{margin-left:12px;margin-right:0}.mdc-data-table__pagination-rows-per-page-select{min-width:var(--mdc-menu-min-width, 80px);margin:8px 0}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{width:100%;min-width:80px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{height:36px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon{width:20px;height:20px}.mdc-data-table__pagination-rows-per-page-select.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 56px)}.mdc-data-table__pagination-rows-per-page-select .mdc-list-item.mdc-list-item--with-one-line{height:36px}.mdc-data-table__progress-indicator{display:none;position:absolute;width:100%}.mdc-data-table--in-progress .mdc-data-table__progress-indicator{display:block}.mdc-data-table__scrim{background-color:var(--mdc-theme-surface, #fff);height:100%;opacity:.32;position:absolute;top:0;width:100%}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table-sticky{position:sticky !important}.mat-mdc-table{table-layout:auto;white-space:normal}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table .mat-mdc-row:hover,.mat-mdc-table .mat-mdc-footer-row:hover{background-color:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}\"], dependencies: [{ kind: \"directive\", type: i1.DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: i1.HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: i1.FooterRowOutlet, selector: \"[footerRowOutlet]\" }, { kind: \"directive\", type: i1.NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatTable, decorators: [{\n type: Component,\n args: [{ selector: 'mat-table, table[mat-table]', exportAs: 'matTable', template: CDK_TABLE_TEMPLATE, host: {\n 'class': 'mat-mdc-table mdc-data-table__table',\n '[class.mdc-table-fixed-layout]': 'fixedLayout',\n }, providers: [\n { provide: CdkTable, useExisting: MatTable },\n { provide: CDK_TABLE, useExisting: MatTable },\n { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n // is only included in the build if used.\n { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n // Prevent nested tables from seeing this table's StickyPositioningListener.\n { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, styles: [\".mdc-data-table{border-radius:var(--mdc-shape-medium, 4px);border-width:1px;border-style:solid}.mdc-data-table .mdc-data-table__header-cell:first-child{border-top-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:first-child,.mdc-data-table .mdc-data-table__header-cell:first-child[dir=rtl]{border-top-right-radius:var(--mdc-shape-medium, 4px);border-top-left-radius:0}.mdc-data-table .mdc-data-table__header-cell:last-child{border-top-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table .mdc-data-table__header-cell:last-child,.mdc-data-table .mdc-data-table__header-cell:last-child[dir=rtl]{border-top-left-radius:var(--mdc-shape-medium, 4px);border-top-right-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child{border-bottom-left-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:first-child[dir=rtl]{border-bottom-right-radius:var(--mdc-shape-medium, 4px);border-bottom-left-radius:0}.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child{border-bottom-right-radius:var(--mdc-shape-medium, 4px)}[dir=rtl] .mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child,.mdc-data-table.mdc-data-table--without-footer .mdc-data-table__row:last-child .mdc-data-table__cell:last-child[dir=rtl]{border-bottom-left-radius:var(--mdc-shape-medium, 4px);border-bottom-right-radius:0}.mdc-data-table__cell,.mdc-data-table__header-cell{border-bottom-width:1px;border-bottom-style:solid}.mdc-data-table__pagination{border-top-width:1px;border-top-style:solid}.mdc-data-table__row:last-child .mdc-data-table__cell{border-bottom:none}.mdc-data-table__row{height:52px}.mdc-data-table__pagination{min-height:52px}.mdc-data-table__header-row{height:56px}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table--sticky-header .mdc-data-table__header-cell{position:sticky;top:0;z-index:1}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--checkbox{width:1px}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__sort-icon-button{width:28px;height:28px;padding:2px;transform:rotate(0.0001deg);margin-left:4px;margin-right:0;opacity:0}.mdc-data-table__sort-icon-button .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:28px;height:28px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-data-table__sort-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:28px;max-width:28px}.mdc-data-table__sort-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:28px;left:50%;width:28px;transform:translate(-50%, -50%)}[dir=rtl] .mdc-data-table__sort-icon-button,.mdc-data-table__sort-icon-button[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--numeric .mdc-data-table__sort-icon-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__header-cell--sorted-descending .mdc-data-table__sort-icon-button{transform:rotate(-180deg)}.mdc-data-table__sort-icon-button:focus,.mdc-data-table__header-cell:hover .mdc-data-table__sort-icon-button,.mdc-data-table__header-cell--sorted .mdc-data-table__sort-icon-button{opacity:1}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__header-cell--with-sort{cursor:pointer}.mdc-data-table__sort-status-label{clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__cell--checkbox{width:1px}.mdc-data-table__pagination{box-sizing:border-box;display:flex;justify-content:flex-end}.mdc-data-table__pagination-trailing{margin-left:4px;margin-right:0;align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-end}[dir=rtl] .mdc-data-table__pagination-trailing,.mdc-data-table__pagination-trailing[dir=rtl]{margin-left:0;margin-right:4px}.mdc-data-table__pagination-navigation{align-items:center;display:flex}.mdc-data-table__pagination-button{margin-left:0;margin-right:4px}[dir=rtl] .mdc-data-table__pagination-button .mdc-button__icon,.mdc-data-table__pagination-button .mdc-button__icon[dir=rtl]{transform:rotate(180deg)}[dir=rtl] .mdc-data-table__pagination-button,.mdc-data-table__pagination-button[dir=rtl]{margin-left:4px;margin-right:0}.mdc-data-table__pagination-total{margin-left:14px;margin-right:36px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-total,.mdc-data-table__pagination-total[dir=rtl]{margin-left:36px;margin-right:14px}.mdc-data-table__pagination-rows-per-page{margin-left:0;margin-right:22px;align-items:center;display:inline-flex}[dir=rtl] .mdc-data-table__pagination-rows-per-page,.mdc-data-table__pagination-rows-per-page[dir=rtl]{margin-left:22px;margin-right:0}.mdc-data-table__pagination-rows-per-page-label{margin-left:0;margin-right:12px;white-space:nowrap}[dir=rtl] .mdc-data-table__pagination-rows-per-page-label,.mdc-data-table__pagination-rows-per-page-label[dir=rtl]{margin-left:12px;margin-right:0}.mdc-data-table__pagination-rows-per-page-select{min-width:var(--mdc-menu-min-width, 80px);margin:8px 0}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{width:100%;min-width:80px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor{height:36px}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-data-table__pagination-rows-per-page-select .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-data-table__pagination-rows-per-page-select .mdc-select__dropdown-icon{width:20px;height:20px}.mdc-data-table__pagination-rows-per-page-select.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 56px)}.mdc-data-table__pagination-rows-per-page-select .mdc-list-item.mdc-list-item--with-one-line{height:36px}.mdc-data-table__progress-indicator{display:none;position:absolute;width:100%}.mdc-data-table--in-progress .mdc-data-table__progress-indicator{display:block}.mdc-data-table__scrim{background-color:var(--mdc-theme-surface, #fff);height:100%;opacity:.32;position:absolute;top:0;width:100%}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table-sticky{position:sticky !important}.mat-mdc-table{table-layout:auto;white-space:normal}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table .mat-mdc-row:hover,.mat-mdc-table .mat-mdc-footer-row:hover{background-color:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}\"] }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Cell definition for the mat-table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass MatCellDef extends CdkCellDef {\n}\nMatCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatCellDef, selector: \"[matCellDef]\", providers: [{ provide: CdkCellDef, useExisting: MatCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matCellDef]',\n providers: [{ provide: CdkCellDef, useExisting: MatCellDef }],\n }]\n }] });\n/**\n * Header cell definition for the mat-table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass MatHeaderCellDef extends CdkHeaderCellDef {\n}\nMatHeaderCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\", providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderCellDef]',\n providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }],\n }]\n }] });\n/**\n * Footer cell definition for the mat-table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass MatFooterCellDef extends CdkFooterCellDef {\n}\nMatFooterCellDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCellDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatFooterCellDef, selector: \"[matFooterCellDef]\", providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterCellDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterCellDef]',\n providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }],\n }]\n }] });\n/**\n * Column definition for the mat-table.\n * Defines a set of cells available for a table column.\n */\nclass MatColumnDef extends CdkColumnDef {\n /** Unique name for this column. */\n get name() {\n return this._name;\n }\n set name(name) {\n this._setNameInput(name);\n }\n /**\n * Add \"mat-column-\" prefix in addition to \"cdk-column-\" prefix.\n * In the future, this will only add \"mat-column-\" and columnCssClassName\n * will change from type string[] to string.\n * @docs-private\n */\n _updateColumnCssClassName() {\n super._updateColumnCssClassName();\n this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);\n }\n}\nMatColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: { sticky: \"sticky\", name: [\"matColumnDef\", \"name\"] }, providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatColumnDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matColumnDef]',\n inputs: ['sticky'],\n providers: [\n { provide: CdkColumnDef, useExisting: MatColumnDef },\n { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n ],\n }]\n }], propDecorators: { name: [{\n type: Input,\n args: ['matColumnDef']\n }] } });\n/** Header cell template container that adds the right classes and role. */\nclass MatHeaderCell extends CdkHeaderCell {\n}\nMatHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"mat-mdc-header-cell mdc-data-table__header-cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-header-cell, th[mat-header-cell]',\n host: {\n 'class': 'mat-mdc-header-cell mdc-data-table__header-cell',\n 'role': 'columnheader',\n },\n }]\n }] });\n/** Footer cell template container that adds the right classes and role. */\nclass MatFooterCell extends CdkFooterCell {\n}\nMatFooterCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatFooterCell, selector: \"mat-footer-cell, td[mat-footer-cell]\", host: { classAttribute: \"mat-mdc-footer-cell mdc-data-table__cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-footer-cell, td[mat-footer-cell]',\n host: {\n 'class': 'mat-mdc-footer-cell mdc-data-table__cell',\n },\n }]\n }] });\n/** Cell template container that adds the right classes and role. */\nclass MatCell extends CdkCell {\n}\nMatCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatCell.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatCell, selector: \"mat-cell, td[mat-cell]\", host: { classAttribute: \"mat-mdc-cell mdc-data-table__cell\" }, usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatCell, decorators: [{\n type: Directive,\n args: [{\n selector: 'mat-cell, td[mat-cell]',\n host: {\n 'class': 'mat-mdc-cell mdc-data-table__cell',\n },\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Header row definition for the mat-table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass MatHeaderRowDef extends CdkHeaderRowDef {\n}\nMatHeaderRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatHeaderRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatHeaderRowDef, selector: \"[matHeaderRowDef]\", inputs: { columns: [\"matHeaderRowDef\", \"columns\"], sticky: [\"matHeaderRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matHeaderRowDef]',\n providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }],\n inputs: ['columns: matHeaderRowDef', 'sticky: matHeaderRowDefSticky'],\n }]\n }] });\n/**\n * Footer row definition for the mat-table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass MatFooterRowDef extends CdkFooterRowDef {\n}\nMatFooterRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatFooterRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatFooterRowDef, selector: \"[matFooterRowDef]\", inputs: { columns: [\"matFooterRowDef\", \"columns\"], sticky: [\"matFooterRowDefSticky\", \"sticky\"] }, providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matFooterRowDef]',\n providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }],\n inputs: ['columns: matFooterRowDef', 'sticky: matFooterRowDefSticky'],\n }]\n }] });\n/**\n * Data row definition for the mat-table.\n * Captures the data row's template and other properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass MatRowDef extends CdkRowDef {\n}\nMatRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatRowDef, selector: \"[matRowDef]\", inputs: { columns: [\"matRowDefColumns\", \"columns\"], when: [\"matRowDefWhen\", \"when\"] }, providers: [{ provide: CdkRowDef, useExisting: MatRowDef }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRowDef, decorators: [{\n type: Directive,\n args: [{\n selector: '[matRowDef]',\n providers: [{ provide: CdkRowDef, useExisting: MatRowDef }],\n inputs: ['columns: matRowDefColumns', 'when: matRowDefWhen'],\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass MatHeaderRow extends CdkHeaderRow {\n}\nMatHeaderRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatHeaderRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatHeaderRow, selector: \"mat-header-row, tr[mat-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-header-row mdc-data-table__header-row\" }, providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }], exportAs: [\"matHeaderRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatHeaderRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-header-row, tr[mat-header-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-mdc-header-row mdc-data-table__header-row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matHeaderRow',\n providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }],\n }]\n }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass MatFooterRow extends CdkFooterRow {\n}\nMatFooterRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatFooterRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatFooterRow, selector: \"mat-footer-row, tr[mat-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-footer-row mdc-data-table__row\" }, providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }], exportAs: [\"matFooterRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatFooterRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-footer-row, tr[mat-footer-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-mdc-footer-row mdc-data-table__row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matFooterRow',\n providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }],\n }]\n }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass MatRow extends CdkRow {\n}\nMatRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatRow, selector: \"mat-row, tr[mat-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-row mdc-data-table__row\" }, providers: [{ provide: CdkRow, useExisting: MatRow }], exportAs: [\"matRow\"], usesInheritance: true, ngImport: i0, template: \"\", isInline: true, dependencies: [{ kind: \"directive\", type: i1.CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatRow, decorators: [{\n type: Component,\n args: [{\n selector: 'mat-row, tr[mat-row]',\n template: CDK_ROW_TEMPLATE,\n host: {\n 'class': 'mat-mdc-row mdc-data-table__row',\n 'role': 'row',\n },\n // See note on CdkTable for explanation on why this uses the default change detection strategy.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRow',\n providers: [{ provide: CdkRow, useExisting: MatRow }],\n }]\n }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass MatNoDataRow extends CdkNoDataRow {\n constructor() {\n super(...arguments);\n this._contentClassName = 'mat-mdc-no-data-row';\n }\n}\nMatNoDataRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive });\nMatNoDataRow.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatNoDataRow, selector: \"ng-template[matNoDataRow]\", providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }], usesInheritance: true, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatNoDataRow, decorators: [{\n type: Directive,\n args: [{\n selector: 'ng-template[matNoDataRow]',\n providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }],\n }]\n }] });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`
`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass MatTextColumn extends CdkTextColumn {\n}\nMatTextColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"15.1.0\", ngImport: i0, type: MatTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });\nMatTextColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"15.1.0\", type: MatTextColumn, selector: \"mat-text-column\", usesInheritance: true, ngImport: i0, template: `\n \n
` elements.\n\nbody {\n margin: 0; // 1\n font-family: $font-family-base;\n @include font-size($font-size-base);\n font-weight: $font-weight-base;\n line-height: $line-height-base;\n color: $body-color;\n text-align: left; // 3\n background-color: $body-bg; // 2\n}\n\n// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline\n// on elements that programmatically receive focus but wouldn't normally show a visible\n// focus outline. In general, this would mean that the outline is only applied if the\n// interaction that led to the element receiving programmatic focus was a keyboard interaction,\n// or the browser has somehow determined that the user is primarily a keyboard user and/or\n// wants focus outlines to always be presented.\n//\n// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible\n// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/\n[tabindex=\"-1\"]:focus:not(:focus-visible) {\n outline: 0 !important;\n}\n\n\n// Content grouping\n//\n// 1. Add the correct box sizing in Firefox.\n// 2. Show the overflow in Edge and IE.\n\nhr {\n box-sizing: content-box; // 1\n height: 0; // 1\n overflow: visible; // 2\n}\n\n\n//\n// Typography\n//\n\n// Remove top margins from headings\n//\n// By default, `
`-`
` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n// stylelint-disable-next-line selector-list-comma-newline-after\nh1, h2, h3, h4, h5, h6 {\n margin-top: 0;\n margin-bottom: $headings-margin-bottom;\n}\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `
`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Remove the bottom border in Firefox 39-.\n// 5. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-original-title] { // 1\n text-decoration: underline; // 2\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n border-bottom: 0; // 4\n text-decoration-skip-ink: none; // 5\n}\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // Undo browser default\n}\n\nblockquote {\n margin: 0 0 1rem;\n}\n\nb,\nstrong {\n font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari\n}\n\nsmall {\n @include font-size(80%); // Add the correct font size in all browsers\n}\n\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n//\n\nsub,\nsup {\n position: relative;\n @include font-size(75%);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n//\n// Links\n//\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n background-color: transparent; // Remove the gray background on active links in IE 10.\n\n @include hover() {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n color: inherit;\n text-decoration: none;\n\n @include hover() {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n//\n// Code\n//\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-monospace;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n}\n\npre {\n // Remove browser default top margin\n margin-top: 0;\n // Reset browser default of `1em` to use `rem`s\n margin-bottom: 1rem;\n // Don't allow content to break outside\n overflow: auto;\n // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,\n // making it impossible to interact with the content\n -ms-overflow-style: scrollbar;\n}\n\n\n//\n// Figures\n//\n\nfigure {\n // Apply a consistent margin strategy (matches our type styles).\n margin: 0 0 1rem;\n}\n\n\n//\n// Images and content\n//\n\nimg {\n vertical-align: middle;\n border-style: none; // Remove the border on images inside links in IE 10-.\n}\n\nsvg {\n // Workaround for the SVG overflow bug in IE10/11 is still required.\n // See https://github.com/twbs/bootstrap/issues/26878\n overflow: hidden;\n vertical-align: middle;\n}\n\n\n//\n// Tables\n//\n\ntable {\n border-collapse: collapse; // Prevent double borders\n}\n\ncaption {\n padding-top: $table-cell-padding;\n padding-bottom: $table-cell-padding;\n color: $table-caption-color;\n text-align: left;\n caption-side: bottom;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `
` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\n\n//\n// Forms\n//\n\nlabel {\n // Allow labels to use `margin` for spacing.\n display: inline-block;\n margin-bottom: $label-margin-bottom;\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n//\n// Details at https://github.com/twbs/bootstrap/issues/24093\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Explicitly remove focus outline in Chromium when it shouldn't be\n// visible (e.g. as result of mouse click or touch tap). It already\n// should be doing this automatically, but seems to currently be\n// confused and applies its very visible two-tone outline anyway.\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // Remove the margin in Firefox and Safari\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\nbutton,\ninput {\n overflow: visible; // Show the overflow in Edge\n}\n\nbutton,\nselect {\n text-transform: none; // Remove the inheritance of text transform in Firefox\n}\n\n// Set the cursor for non-`