UNPKG

105 kBJavaScriptView Raw
1/**
2 * @license Angular v10.0.1
3 * (c) 2010-2020 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7(function (global, factory) {
8 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core')) :
9 typeof define === 'function' && define.amd ? define('@angular/platform-browser', ['exports', '@angular/common', '@angular/core'], factory) :
10 (global = global || self, factory((global.ng = global.ng || {}, global.ng.platformBrowser = {}), global.ng.common, global.ng.core));
11}(this, (function (exports, common, i0) { 'use strict';
12
13 /*! *****************************************************************************
14 Copyright (c) Microsoft Corporation.
15
16 Permission to use, copy, modify, and/or distribute this software for any
17 purpose with or without fee is hereby granted.
18
19 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
20 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
22 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
23 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25 PERFORMANCE OF THIS SOFTWARE.
26 ***************************************************************************** */
27 /* global Reflect, Promise */
28
29 var extendStatics = function(d, b) {
30 extendStatics = Object.setPrototypeOf ||
31 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
32 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
33 return extendStatics(d, b);
34 };
35
36 function __extends(d, b) {
37 extendStatics(d, b);
38 function __() { this.constructor = d; }
39 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
40 }
41
42 var __assign = function() {
43 __assign = Object.assign || function __assign(t) {
44 for (var s, i = 1, n = arguments.length; i < n; i++) {
45 s = arguments[i];
46 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
47 }
48 return t;
49 };
50 return __assign.apply(this, arguments);
51 };
52
53 function __rest(s, e) {
54 var t = {};
55 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
56 t[p] = s[p];
57 if (s != null && typeof Object.getOwnPropertySymbols === "function")
58 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
59 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
60 t[p[i]] = s[p[i]];
61 }
62 return t;
63 }
64
65 function __decorate(decorators, target, key, desc) {
66 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
67 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
68 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
69 return c > 3 && r && Object.defineProperty(target, key, r), r;
70 }
71
72 function __param(paramIndex, decorator) {
73 return function (target, key) { decorator(target, key, paramIndex); }
74 }
75
76 function __metadata(metadataKey, metadataValue) {
77 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
78 }
79
80 function __awaiter(thisArg, _arguments, P, generator) {
81 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
82 return new (P || (P = Promise))(function (resolve, reject) {
83 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
84 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
85 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
86 step((generator = generator.apply(thisArg, _arguments || [])).next());
87 });
88 }
89
90 function __generator(thisArg, body) {
91 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
92 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
93 function verb(n) { return function (v) { return step([n, v]); }; }
94 function step(op) {
95 if (f) throw new TypeError("Generator is already executing.");
96 while (_) try {
97 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
98 if (y = 0, t) op = [op[0] & 2, t.value];
99 switch (op[0]) {
100 case 0: case 1: t = op; break;
101 case 4: _.label++; return { value: op[1], done: false };
102 case 5: _.label++; y = op[1]; op = [0]; continue;
103 case 7: op = _.ops.pop(); _.trys.pop(); continue;
104 default:
105 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
106 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
107 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
108 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
109 if (t[2]) _.ops.pop();
110 _.trys.pop(); continue;
111 }
112 op = body.call(thisArg, _);
113 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
114 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
115 }
116 }
117
118 var __createBinding = Object.create ? (function(o, m, k, k2) {
119 if (k2 === undefined) k2 = k;
120 Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
121 }) : (function(o, m, k, k2) {
122 if (k2 === undefined) k2 = k;
123 o[k2] = m[k];
124 });
125
126 function __exportStar(m, exports) {
127 for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
128 }
129
130 function __values(o) {
131 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
132 if (m) return m.call(o);
133 if (o && typeof o.length === "number") return {
134 next: function () {
135 if (o && i >= o.length) o = void 0;
136 return { value: o && o[i++], done: !o };
137 }
138 };
139 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
140 }
141
142 function __read(o, n) {
143 var m = typeof Symbol === "function" && o[Symbol.iterator];
144 if (!m) return o;
145 var i = m.call(o), r, ar = [], e;
146 try {
147 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
148 }
149 catch (error) { e = { error: error }; }
150 finally {
151 try {
152 if (r && !r.done && (m = i["return"])) m.call(i);
153 }
154 finally { if (e) throw e.error; }
155 }
156 return ar;
157 }
158
159 function __spread() {
160 for (var ar = [], i = 0; i < arguments.length; i++)
161 ar = ar.concat(__read(arguments[i]));
162 return ar;
163 }
164
165 function __spreadArrays() {
166 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
167 for (var r = Array(s), k = 0, i = 0; i < il; i++)
168 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
169 r[k] = a[j];
170 return r;
171 };
172
173 function __await(v) {
174 return this instanceof __await ? (this.v = v, this) : new __await(v);
175 }
176
177 function __asyncGenerator(thisArg, _arguments, generator) {
178 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
179 var g = generator.apply(thisArg, _arguments || []), i, q = [];
180 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
181 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
182 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
183 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
184 function fulfill(value) { resume("next", value); }
185 function reject(value) { resume("throw", value); }
186 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
187 }
188
189 function __asyncDelegator(o) {
190 var i, p;
191 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
192 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
193 }
194
195 function __asyncValues(o) {
196 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
197 var m = o[Symbol.asyncIterator], i;
198 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
199 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
200 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
201 }
202
203 function __makeTemplateObject(cooked, raw) {
204 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
205 return cooked;
206 };
207
208 var __setModuleDefault = Object.create ? (function(o, v) {
209 Object.defineProperty(o, "default", { enumerable: true, value: v });
210 }) : function(o, v) {
211 o["default"] = v;
212 };
213
214 function __importStar(mod) {
215 if (mod && mod.__esModule) return mod;
216 var result = {};
217 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
218 __setModuleDefault(result, mod);
219 return result;
220 }
221
222 function __importDefault(mod) {
223 return (mod && mod.__esModule) ? mod : { default: mod };
224 }
225
226 function __classPrivateFieldGet(receiver, privateMap) {
227 if (!privateMap.has(receiver)) {
228 throw new TypeError("attempted to get private field on non-instance");
229 }
230 return privateMap.get(receiver);
231 }
232
233 function __classPrivateFieldSet(receiver, privateMap, value) {
234 if (!privateMap.has(receiver)) {
235 throw new TypeError("attempted to set private field on non-instance");
236 }
237 privateMap.set(receiver, value);
238 return value;
239 }
240
241 /**
242 * @license
243 * Copyright Google LLC All Rights Reserved.
244 *
245 * Use of this source code is governed by an MIT-style license that can be
246 * found in the LICENSE file at https://angular.io/license
247 */
248 /**
249 * Provides DOM operations in any browser environment.
250 *
251 * @security Tread carefully! Interacting with the DOM directly is dangerous and
252 * can introduce XSS risks.
253 */
254 var GenericBrowserDomAdapter = /** @class */ (function (_super) {
255 __extends(GenericBrowserDomAdapter, _super);
256 function GenericBrowserDomAdapter() {
257 return _super.call(this) || this;
258 }
259 GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () {
260 return true;
261 };
262 return GenericBrowserDomAdapter;
263 }(common.ɵDomAdapter));
264
265 /**
266 * @license
267 * Copyright Google LLC All Rights Reserved.
268 *
269 * Use of this source code is governed by an MIT-style license that can be
270 * found in the LICENSE file at https://angular.io/license
271 */
272 var ɵ0 = function () {
273 if (i0.ɵglobal['Node']) {
274 return i0.ɵglobal['Node'].prototype.contains || function (node) {
275 return !!(this.compareDocumentPosition(node) & 16);
276 };
277 }
278 return undefined;
279 };
280 var nodeContains = (ɵ0)();
281 /**
282 * A `DomAdapter` powered by full browser DOM APIs.
283 *
284 * @security Tread carefully! Interacting with the DOM directly is dangerous and
285 * can introduce XSS risks.
286 */
287 /* tslint:disable:requireParameterType no-console */
288 var BrowserDomAdapter = /** @class */ (function (_super) {
289 __extends(BrowserDomAdapter, _super);
290 function BrowserDomAdapter() {
291 return _super !== null && _super.apply(this, arguments) || this;
292 }
293 BrowserDomAdapter.makeCurrent = function () {
294 common.ɵsetRootDomAdapter(new BrowserDomAdapter());
295 };
296 BrowserDomAdapter.prototype.getProperty = function (el, name) {
297 return el[name];
298 };
299 BrowserDomAdapter.prototype.log = function (error) {
300 if (window.console) {
301 window.console.log && window.console.log(error);
302 }
303 };
304 BrowserDomAdapter.prototype.logGroup = function (error) {
305 if (window.console) {
306 window.console.group && window.console.group(error);
307 }
308 };
309 BrowserDomAdapter.prototype.logGroupEnd = function () {
310 if (window.console) {
311 window.console.groupEnd && window.console.groupEnd();
312 }
313 };
314 BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {
315 el.addEventListener(evt, listener, false);
316 // Needed to follow Dart's subscription semantic, until fix of
317 // https://code.google.com/p/dart/issues/detail?id=17406
318 return function () {
319 el.removeEventListener(evt, listener, false);
320 };
321 };
322 BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) {
323 el.dispatchEvent(evt);
324 };
325 BrowserDomAdapter.prototype.remove = function (node) {
326 if (node.parentNode) {
327 node.parentNode.removeChild(node);
328 }
329 return node;
330 };
331 BrowserDomAdapter.prototype.getValue = function (el) {
332 return el.value;
333 };
334 BrowserDomAdapter.prototype.createElement = function (tagName, doc) {
335 doc = doc || this.getDefaultDocument();
336 return doc.createElement(tagName);
337 };
338 BrowserDomAdapter.prototype.createHtmlDocument = function () {
339 return document.implementation.createHTMLDocument('fakeTitle');
340 };
341 BrowserDomAdapter.prototype.getDefaultDocument = function () {
342 return document;
343 };
344 BrowserDomAdapter.prototype.isElementNode = function (node) {
345 return node.nodeType === Node.ELEMENT_NODE;
346 };
347 BrowserDomAdapter.prototype.isShadowRoot = function (node) {
348 return node instanceof DocumentFragment;
349 };
350 BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {
351 if (target === 'window') {
352 return window;
353 }
354 if (target === 'document') {
355 return doc;
356 }
357 if (target === 'body') {
358 return doc.body;
359 }
360 return null;
361 };
362 BrowserDomAdapter.prototype.getHistory = function () {
363 return window.history;
364 };
365 BrowserDomAdapter.prototype.getLocation = function () {
366 return window.location;
367 };
368 BrowserDomAdapter.prototype.getBaseHref = function (doc) {
369 var href = getBaseElementHref();
370 return href == null ? null : relativePath(href);
371 };
372 BrowserDomAdapter.prototype.resetBaseElement = function () {
373 baseElement = null;
374 };
375 BrowserDomAdapter.prototype.getUserAgent = function () {
376 return window.navigator.userAgent;
377 };
378 BrowserDomAdapter.prototype.performanceNow = function () {
379 // performance.now() is not available in all browsers, see
380 // http://caniuse.com/#search=performance.now
381 return window.performance && window.performance.now ? window.performance.now() :
382 new Date().getTime();
383 };
384 BrowserDomAdapter.prototype.supportsCookies = function () {
385 return true;
386 };
387 BrowserDomAdapter.prototype.getCookie = function (name) {
388 return common.ɵparseCookieValue(document.cookie, name);
389 };
390 return BrowserDomAdapter;
391 }(GenericBrowserDomAdapter));
392 var baseElement = null;
393 function getBaseElementHref() {
394 if (!baseElement) {
395 baseElement = document.querySelector('base');
396 if (!baseElement) {
397 return null;
398 }
399 }
400 return baseElement.getAttribute('href');
401 }
402 // based on urlUtils.js in AngularJS 1
403 var urlParsingNode;
404 function relativePath(url) {
405 if (!urlParsingNode) {
406 urlParsingNode = document.createElement('a');
407 }
408 urlParsingNode.setAttribute('href', url);
409 return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :
410 '/' + urlParsingNode.pathname;
411 }
412
413 /**
414 * @license
415 * Copyright Google LLC All Rights Reserved.
416 *
417 * Use of this source code is governed by an MIT-style license that can be
418 * found in the LICENSE file at https://angular.io/license
419 */
420 /**
421 * An id that identifies a particular application being bootstrapped, that should
422 * match across the client/server boundary.
423 */
424 var TRANSITION_ID = new i0.InjectionToken('TRANSITION_ID');
425 function appInitializerFactory(transitionId, document, injector) {
426 return function () {
427 // Wait for all application initializers to be completed before removing the styles set by
428 // the server.
429 injector.get(i0.ApplicationInitStatus).donePromise.then(function () {
430 var dom = common.ɵgetDOM();
431 var styles = Array.prototype.slice.apply(document.querySelectorAll("style[ng-transition]"));
432 styles.filter(function (el) { return el.getAttribute('ng-transition') === transitionId; })
433 .forEach(function (el) { return dom.remove(el); });
434 });
435 };
436 }
437 var SERVER_TRANSITION_PROVIDERS = [
438 {
439 provide: i0.APP_INITIALIZER,
440 useFactory: appInitializerFactory,
441 deps: [TRANSITION_ID, common.DOCUMENT, i0.Injector],
442 multi: true
443 },
444 ];
445
446 /**
447 * @license
448 * Copyright Google LLC All Rights Reserved.
449 *
450 * Use of this source code is governed by an MIT-style license that can be
451 * found in the LICENSE file at https://angular.io/license
452 */
453 var BrowserGetTestability = /** @class */ (function () {
454 function BrowserGetTestability() {
455 }
456 BrowserGetTestability.init = function () {
457 i0.setTestabilityGetter(new BrowserGetTestability());
458 };
459 BrowserGetTestability.prototype.addToWindow = function (registry) {
460 i0.ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {
461 if (findInAncestors === void 0) { findInAncestors = true; }
462 var testability = registry.findTestabilityInTree(elem, findInAncestors);
463 if (testability == null) {
464 throw new Error('Could not find testability for element.');
465 }
466 return testability;
467 };
468 i0.ɵglobal['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };
469 i0.ɵglobal['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };
470 var whenAllStable = function (callback /** TODO #9100 */) {
471 var testabilities = i0.ɵglobal['getAllAngularTestabilities']();
472 var count = testabilities.length;
473 var didWork = false;
474 var decrement = function (didWork_ /** TODO #9100 */) {
475 didWork = didWork || didWork_;
476 count--;
477 if (count == 0) {
478 callback(didWork);
479 }
480 };
481 testabilities.forEach(function (testability /** TODO #9100 */) {
482 testability.whenStable(decrement);
483 });
484 };
485 if (!i0.ɵglobal['frameworkStabilizers']) {
486 i0.ɵglobal['frameworkStabilizers'] = [];
487 }
488 i0.ɵglobal['frameworkStabilizers'].push(whenAllStable);
489 };
490 BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {
491 if (elem == null) {
492 return null;
493 }
494 var t = registry.getTestability(elem);
495 if (t != null) {
496 return t;
497 }
498 else if (!findInAncestors) {
499 return null;
500 }
501 if (common.ɵgetDOM().isShadowRoot(elem)) {
502 return this.findTestabilityInTree(registry, elem.host, true);
503 }
504 return this.findTestabilityInTree(registry, elem.parentElement, true);
505 };
506 return BrowserGetTestability;
507 }());
508
509 /**
510 * @license
511 * Copyright Google LLC All Rights Reserved.
512 *
513 * Use of this source code is governed by an MIT-style license that can be
514 * found in the LICENSE file at https://angular.io/license
515 */
516 var CAMEL_CASE_REGEXP = /([A-Z])/g;
517 var DASH_CASE_REGEXP = /-([a-z])/g;
518 function camelCaseToDashCase(input) {
519 return input.replace(CAMEL_CASE_REGEXP, function () {
520 var m = [];
521 for (var _i = 0; _i < arguments.length; _i++) {
522 m[_i] = arguments[_i];
523 }
524 return '-' + m[1].toLowerCase();
525 });
526 }
527 function dashCaseToCamelCase(input) {
528 return input.replace(DASH_CASE_REGEXP, function () {
529 var m = [];
530 for (var _i = 0; _i < arguments.length; _i++) {
531 m[_i] = arguments[_i];
532 }
533 return m[1].toUpperCase();
534 });
535 }
536 /**
537 * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if
538 * `name` is `'probe'`.
539 * @param name Name under which it will be exported. Keep in mind this will be a property of the
540 * global `ng` object.
541 * @param value The value to export.
542 */
543 function exportNgVar(name, value) {
544 if (typeof COMPILED === 'undefined' || !COMPILED) {
545 // Note: we can't export `ng` when using closure enhanced optimization as:
546 // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
547 // - we can't declare a closure extern as the namespace `ng` is already used within Google
548 // for typings for angularJS (via `goog.provide('ng....')`).
549 var ng = i0.ɵglobal['ng'] = i0.ɵglobal['ng'] || {};
550 ng[name] = value;
551 }
552 }
553
554 /**
555 * @license
556 * Copyright Google LLC All Rights Reserved.
557 *
558 * Use of this source code is governed by an MIT-style license that can be
559 * found in the LICENSE file at https://angular.io/license
560 */
561 var ɵ0$1 = function () { return ({
562 'ApplicationRef': i0.ApplicationRef,
563 'NgZone': i0.NgZone,
564 }); };
565 var CORE_TOKENS = (ɵ0$1)();
566 var INSPECT_GLOBAL_NAME = 'probe';
567 var CORE_TOKENS_GLOBAL_NAME = 'coreTokens';
568 /**
569 * Returns a {@link DebugElement} for the given native DOM element, or
570 * null if the given native element does not have an Angular view associated
571 * with it.
572 */
573 function inspectNativeElementR2(element) {
574 return i0.ɵgetDebugNodeR2(element);
575 }
576 function _createNgProbeR2(coreTokens) {
577 exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);
578 exportNgVar(CORE_TOKENS_GLOBAL_NAME, __assign(__assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || [])));
579 return function () { return inspectNativeElementR2; };
580 }
581 function _ngProbeTokensToMap(tokens) {
582 return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});
583 }
584 /**
585 * In Ivy, we don't support NgProbe because we have our own set of testing utilities
586 * with more robust functionality.
587 *
588 * We shouldn't bring in NgProbe because it prevents DebugNode and friends from
589 * tree-shaking properly.
590 */
591 var ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];
592 /**
593 * Providers which support debugging Angular applications (e.g. via `ng.probe`).
594 */
595 var ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [
596 {
597 provide: i0.APP_INITIALIZER,
598 useFactory: _createNgProbeR2,
599 deps: [
600 [i0.NgProbeToken, new i0.Optional()],
601 ],
602 multi: true,
603 },
604 ];
605 var ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
606
607 /**
608 * @license
609 * Copyright Google LLC All Rights Reserved.
610 *
611 * Use of this source code is governed by an MIT-style license that can be
612 * found in the LICENSE file at https://angular.io/license
613 */
614 /**
615 * The injection token for the event-manager plug-in service.
616 *
617 * @publicApi
618 */
619 var EVENT_MANAGER_PLUGINS = new i0.InjectionToken('EventManagerPlugins');
620 /**
621 * An injectable service that provides event management for Angular
622 * through a browser plug-in.
623 *
624 * @publicApi
625 */
626 var EventManager = /** @class */ (function () {
627 /**
628 * Initializes an instance of the event-manager service.
629 */
630 function EventManager(plugins, _zone) {
631 var _this = this;
632 this._zone = _zone;
633 this._eventNameToPlugin = new Map();
634 plugins.forEach(function (p) { return p.manager = _this; });
635 this._plugins = plugins.slice().reverse();
636 }
637 /**
638 * Registers a handler for a specific element and event.
639 *
640 * @param element The HTML element to receive event notifications.
641 * @param eventName The name of the event to listen for.
642 * @param handler A function to call when the notification occurs. Receives the
643 * event object as an argument.
644 * @returns A callback function that can be used to remove the handler.
645 */
646 EventManager.prototype.addEventListener = function (element, eventName, handler) {
647 var plugin = this._findPluginFor(eventName);
648 return plugin.addEventListener(element, eventName, handler);
649 };
650 /**
651 * Registers a global handler for an event in a target view.
652 *
653 * @param target A target for global event notifications. One of "window", "document", or "body".
654 * @param eventName The name of the event to listen for.
655 * @param handler A function to call when the notification occurs. Receives the
656 * event object as an argument.
657 * @returns A callback function that can be used to remove the handler.
658 */
659 EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {
660 var plugin = this._findPluginFor(eventName);
661 return plugin.addGlobalEventListener(target, eventName, handler);
662 };
663 /**
664 * Retrieves the compilation zone in which event listeners are registered.
665 */
666 EventManager.prototype.getZone = function () {
667 return this._zone;
668 };
669 /** @internal */
670 EventManager.prototype._findPluginFor = function (eventName) {
671 var plugin = this._eventNameToPlugin.get(eventName);
672 if (plugin) {
673 return plugin;
674 }
675 var plugins = this._plugins;
676 for (var i = 0; i < plugins.length; i++) {
677 var plugin_1 = plugins[i];
678 if (plugin_1.supports(eventName)) {
679 this._eventNameToPlugin.set(eventName, plugin_1);
680 return plugin_1;
681 }
682 }
683 throw new Error("No event manager plugin found for event " + eventName);
684 };
685 EventManager.decorators = [
686 { type: i0.Injectable }
687 ];
688 EventManager.ctorParameters = function () { return [
689 { type: Array, decorators: [{ type: i0.Inject, args: [EVENT_MANAGER_PLUGINS,] }] },
690 { type: i0.NgZone }
691 ]; };
692 return EventManager;
693 }());
694 var EventManagerPlugin = /** @class */ (function () {
695 function EventManagerPlugin(_doc) {
696 this._doc = _doc;
697 }
698 EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {
699 var target = common.ɵgetDOM().getGlobalEventTarget(this._doc, element);
700 if (!target) {
701 throw new Error("Unsupported event target " + target + " for event " + eventName);
702 }
703 return this.addEventListener(target, eventName, handler);
704 };
705 return EventManagerPlugin;
706 }());
707
708 /**
709 * @license
710 * Copyright Google LLC All Rights Reserved.
711 *
712 * Use of this source code is governed by an MIT-style license that can be
713 * found in the LICENSE file at https://angular.io/license
714 */
715 var SharedStylesHost = /** @class */ (function () {
716 function SharedStylesHost() {
717 /** @internal */
718 this._stylesSet = new Set();
719 }
720 SharedStylesHost.prototype.addStyles = function (styles) {
721 var _this = this;
722 var additions = new Set();
723 styles.forEach(function (style) {
724 if (!_this._stylesSet.has(style)) {
725 _this._stylesSet.add(style);
726 additions.add(style);
727 }
728 });
729 this.onStylesAdded(additions);
730 };
731 SharedStylesHost.prototype.onStylesAdded = function (additions) { };
732 SharedStylesHost.prototype.getAllStyles = function () {
733 return Array.from(this._stylesSet);
734 };
735 SharedStylesHost.decorators = [
736 { type: i0.Injectable }
737 ];
738 return SharedStylesHost;
739 }());
740 var DomSharedStylesHost = /** @class */ (function (_super) {
741 __extends(DomSharedStylesHost, _super);
742 function DomSharedStylesHost(_doc) {
743 var _this = _super.call(this) || this;
744 _this._doc = _doc;
745 _this._hostNodes = new Set();
746 _this._styleNodes = new Set();
747 _this._hostNodes.add(_doc.head);
748 return _this;
749 }
750 DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {
751 var _this = this;
752 styles.forEach(function (style) {
753 var styleEl = _this._doc.createElement('style');
754 styleEl.textContent = style;
755 _this._styleNodes.add(host.appendChild(styleEl));
756 });
757 };
758 DomSharedStylesHost.prototype.addHost = function (hostNode) {
759 this._addStylesToHost(this._stylesSet, hostNode);
760 this._hostNodes.add(hostNode);
761 };
762 DomSharedStylesHost.prototype.removeHost = function (hostNode) {
763 this._hostNodes.delete(hostNode);
764 };
765 DomSharedStylesHost.prototype.onStylesAdded = function (additions) {
766 var _this = this;
767 this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });
768 };
769 DomSharedStylesHost.prototype.ngOnDestroy = function () {
770 this._styleNodes.forEach(function (styleNode) { return common.ɵgetDOM().remove(styleNode); });
771 };
772 DomSharedStylesHost.decorators = [
773 { type: i0.Injectable }
774 ];
775 DomSharedStylesHost.ctorParameters = function () { return [
776 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
777 ]; };
778 return DomSharedStylesHost;
779 }(SharedStylesHost));
780
781 /**
782 * @license
783 * Copyright Google LLC All Rights Reserved.
784 *
785 * Use of this source code is governed by an MIT-style license that can be
786 * found in the LICENSE file at https://angular.io/license
787 */
788 var NAMESPACE_URIS = {
789 'svg': 'http://www.w3.org/2000/svg',
790 'xhtml': 'http://www.w3.org/1999/xhtml',
791 'xlink': 'http://www.w3.org/1999/xlink',
792 'xml': 'http://www.w3.org/XML/1998/namespace',
793 'xmlns': 'http://www.w3.org/2000/xmlns/',
794 };
795 var COMPONENT_REGEX = /%COMP%/g;
796 var NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;
797 var COMPONENT_VARIABLE = '%COMP%';
798 var HOST_ATTR = "_nghost-" + COMPONENT_VARIABLE;
799 var CONTENT_ATTR = "_ngcontent-" + COMPONENT_VARIABLE;
800 function shimContentAttribute(componentShortId) {
801 return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);
802 }
803 function shimHostAttribute(componentShortId) {
804 return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);
805 }
806 function flattenStyles(compId, styles, target) {
807 for (var i = 0; i < styles.length; i++) {
808 var style = styles[i];
809 if (Array.isArray(style)) {
810 flattenStyles(compId, style, target);
811 }
812 else {
813 style = style.replace(COMPONENT_REGEX, compId);
814 target.push(style);
815 }
816 }
817 return target;
818 }
819 function decoratePreventDefault(eventHandler) {
820 // `DebugNode.triggerEventHandler` needs to know if the listener was created with
821 // decoratePreventDefault or is a listener added outside the Angular context so it can handle the
822 // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap
823 // the listener (see below).
824 return function (event) {
825 // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function
826 // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node
827 // can inspect the listener toString contents for the existence of this special token. Because
828 // the token is a string literal, it is ensured to not be modified by compiled code.
829 if (event === '__ngUnwrap__') {
830 return eventHandler;
831 }
832 var allowDefaultBehavior = eventHandler(event);
833 if (allowDefaultBehavior === false) {
834 // TODO(tbosch): move preventDefault into event plugins...
835 event.preventDefault();
836 event.returnValue = false;
837 }
838 return undefined;
839 };
840 }
841 var DomRendererFactory2 = /** @class */ (function () {
842 function DomRendererFactory2(eventManager, sharedStylesHost, appId) {
843 this.eventManager = eventManager;
844 this.sharedStylesHost = sharedStylesHost;
845 this.appId = appId;
846 this.rendererByCompId = new Map();
847 this.defaultRenderer = new DefaultDomRenderer2(eventManager);
848 }
849 DomRendererFactory2.prototype.createRenderer = function (element, type) {
850 if (!element || !type) {
851 return this.defaultRenderer;
852 }
853 switch (type.encapsulation) {
854 case i0.ViewEncapsulation.Emulated: {
855 var renderer = this.rendererByCompId.get(type.id);
856 if (!renderer) {
857 renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);
858 this.rendererByCompId.set(type.id, renderer);
859 }
860 renderer.applyToHost(element);
861 return renderer;
862 }
863 case i0.ViewEncapsulation.Native:
864 case i0.ViewEncapsulation.ShadowDom:
865 return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);
866 default: {
867 if (!this.rendererByCompId.has(type.id)) {
868 var styles = flattenStyles(type.id, type.styles, []);
869 this.sharedStylesHost.addStyles(styles);
870 this.rendererByCompId.set(type.id, this.defaultRenderer);
871 }
872 return this.defaultRenderer;
873 }
874 }
875 };
876 DomRendererFactory2.prototype.begin = function () { };
877 DomRendererFactory2.prototype.end = function () { };
878 DomRendererFactory2.decorators = [
879 { type: i0.Injectable }
880 ];
881 DomRendererFactory2.ctorParameters = function () { return [
882 { type: EventManager },
883 { type: DomSharedStylesHost },
884 { type: String, decorators: [{ type: i0.Inject, args: [i0.APP_ID,] }] }
885 ]; };
886 return DomRendererFactory2;
887 }());
888 var DefaultDomRenderer2 = /** @class */ (function () {
889 function DefaultDomRenderer2(eventManager) {
890 this.eventManager = eventManager;
891 this.data = Object.create(null);
892 }
893 DefaultDomRenderer2.prototype.destroy = function () { };
894 DefaultDomRenderer2.prototype.createElement = function (name, namespace) {
895 if (namespace) {
896 // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key
897 // will result in undefined, so we just return the namespace here.
898 return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);
899 }
900 return document.createElement(name);
901 };
902 DefaultDomRenderer2.prototype.createComment = function (value) {
903 return document.createComment(value);
904 };
905 DefaultDomRenderer2.prototype.createText = function (value) {
906 return document.createTextNode(value);
907 };
908 DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) {
909 parent.appendChild(newChild);
910 };
911 DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
912 if (parent) {
913 parent.insertBefore(newChild, refChild);
914 }
915 };
916 DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {
917 if (parent) {
918 parent.removeChild(oldChild);
919 }
920 };
921 DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {
922 var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :
923 selectorOrNode;
924 if (!el) {
925 throw new Error("The selector \"" + selectorOrNode + "\" did not match any elements");
926 }
927 if (!preserveContent) {
928 el.textContent = '';
929 }
930 return el;
931 };
932 DefaultDomRenderer2.prototype.parentNode = function (node) {
933 return node.parentNode;
934 };
935 DefaultDomRenderer2.prototype.nextSibling = function (node) {
936 return node.nextSibling;
937 };
938 DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {
939 if (namespace) {
940 name = namespace + ':' + name;
941 // TODO(FW-811): Ivy may cause issues here because it's passing around
942 // full URIs for namespaces, therefore this lookup will fail.
943 var namespaceUri = NAMESPACE_URIS[namespace];
944 if (namespaceUri) {
945 el.setAttributeNS(namespaceUri, name, value);
946 }
947 else {
948 el.setAttribute(name, value);
949 }
950 }
951 else {
952 el.setAttribute(name, value);
953 }
954 };
955 DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {
956 if (namespace) {
957 // TODO(FW-811): Ivy may cause issues here because it's passing around
958 // full URIs for namespaces, therefore this lookup will fail.
959 var namespaceUri = NAMESPACE_URIS[namespace];
960 if (namespaceUri) {
961 el.removeAttributeNS(namespaceUri, name);
962 }
963 else {
964 // TODO(FW-811): Since ivy is passing around full URIs for namespaces
965 // this could result in properties like `http://www.w3.org/2000/svg:cx="123"`,
966 // which is wrong.
967 el.removeAttribute(namespace + ":" + name);
968 }
969 }
970 else {
971 el.removeAttribute(name);
972 }
973 };
974 DefaultDomRenderer2.prototype.addClass = function (el, name) {
975 el.classList.add(name);
976 };
977 DefaultDomRenderer2.prototype.removeClass = function (el, name) {
978 el.classList.remove(name);
979 };
980 DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {
981 if (flags & i0.RendererStyleFlags2.DashCase) {
982 el.style.setProperty(style, value, !!(flags & i0.RendererStyleFlags2.Important) ? 'important' : '');
983 }
984 else {
985 el.style[style] = value;
986 }
987 };
988 DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {
989 if (flags & i0.RendererStyleFlags2.DashCase) {
990 el.style.removeProperty(style);
991 }
992 else {
993 // IE requires '' instead of null
994 // see https://github.com/angular/angular/issues/7916
995 el.style[style] = '';
996 }
997 };
998 DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {
999 NG_DEV_MODE && checkNoSyntheticProp(name, 'property');
1000 el[name] = value;
1001 };
1002 DefaultDomRenderer2.prototype.setValue = function (node, value) {
1003 node.nodeValue = value;
1004 };
1005 DefaultDomRenderer2.prototype.listen = function (target, event, callback) {
1006 NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');
1007 if (typeof target === 'string') {
1008 return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));
1009 }
1010 return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));
1011 };
1012 return DefaultDomRenderer2;
1013 }());
1014 var ɵ0$2 = function () { return '@'.charCodeAt(0); };
1015 var AT_CHARCODE = (ɵ0$2)();
1016 function checkNoSyntheticProp(name, nameKind) {
1017 if (name.charCodeAt(0) === AT_CHARCODE) {
1018 throw new Error("Found the synthetic " + nameKind + " " + name + ". Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.");
1019 }
1020 }
1021 var EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {
1022 __extends(EmulatedEncapsulationDomRenderer2, _super);
1023 function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {
1024 var _this = _super.call(this, eventManager) || this;
1025 _this.component = component;
1026 var styles = flattenStyles(appId + '-' + component.id, component.styles, []);
1027 sharedStylesHost.addStyles(styles);
1028 _this.contentAttr = shimContentAttribute(appId + '-' + component.id);
1029 _this.hostAttr = shimHostAttribute(appId + '-' + component.id);
1030 return _this;
1031 }
1032 EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) {
1033 _super.prototype.setAttribute.call(this, element, this.hostAttr, '');
1034 };
1035 EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {
1036 var el = _super.prototype.createElement.call(this, parent, name);
1037 _super.prototype.setAttribute.call(this, el, this.contentAttr, '');
1038 return el;
1039 };
1040 return EmulatedEncapsulationDomRenderer2;
1041 }(DefaultDomRenderer2));
1042 var ShadowDomRenderer = /** @class */ (function (_super) {
1043 __extends(ShadowDomRenderer, _super);
1044 function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {
1045 var _this = _super.call(this, eventManager) || this;
1046 _this.sharedStylesHost = sharedStylesHost;
1047 _this.hostEl = hostEl;
1048 _this.component = component;
1049 if (component.encapsulation === i0.ViewEncapsulation.ShadowDom) {
1050 _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });
1051 }
1052 else {
1053 _this.shadowRoot = hostEl.createShadowRoot();
1054 }
1055 _this.sharedStylesHost.addHost(_this.shadowRoot);
1056 var styles = flattenStyles(component.id, component.styles, []);
1057 for (var i = 0; i < styles.length; i++) {
1058 var styleEl = document.createElement('style');
1059 styleEl.textContent = styles[i];
1060 _this.shadowRoot.appendChild(styleEl);
1061 }
1062 return _this;
1063 }
1064 ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) {
1065 return node === this.hostEl ? this.shadowRoot : node;
1066 };
1067 ShadowDomRenderer.prototype.destroy = function () {
1068 this.sharedStylesHost.removeHost(this.shadowRoot);
1069 };
1070 ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {
1071 return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);
1072 };
1073 ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {
1074 return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);
1075 };
1076 ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {
1077 return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);
1078 };
1079 ShadowDomRenderer.prototype.parentNode = function (node) {
1080 return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));
1081 };
1082 return ShadowDomRenderer;
1083 }(DefaultDomRenderer2));
1084
1085 /**
1086 * @license
1087 * Copyright Google LLC All Rights Reserved.
1088 *
1089 * Use of this source code is governed by an MIT-style license that can be
1090 * found in the LICENSE file at https://angular.io/license
1091 */
1092 var DomEventsPlugin = /** @class */ (function (_super) {
1093 __extends(DomEventsPlugin, _super);
1094 function DomEventsPlugin(doc) {
1095 return _super.call(this, doc) || this;
1096 }
1097 // This plugin should come last in the list of plugins, because it accepts all
1098 // events.
1099 DomEventsPlugin.prototype.supports = function (eventName) {
1100 return true;
1101 };
1102 DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1103 var _this = this;
1104 element.addEventListener(eventName, handler, false);
1105 return function () { return _this.removeEventListener(element, eventName, handler); };
1106 };
1107 DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {
1108 return target.removeEventListener(eventName, callback);
1109 };
1110 DomEventsPlugin.decorators = [
1111 { type: i0.Injectable }
1112 ];
1113 DomEventsPlugin.ctorParameters = function () { return [
1114 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1115 ]; };
1116 return DomEventsPlugin;
1117 }(EventManagerPlugin));
1118
1119 /**
1120 * @license
1121 * Copyright Google LLC All Rights Reserved.
1122 *
1123 * Use of this source code is governed by an MIT-style license that can be
1124 * found in the LICENSE file at https://angular.io/license
1125 */
1126 /**
1127 * Supported HammerJS recognizer event names.
1128 */
1129 var EVENT_NAMES = {
1130 // pan
1131 'pan': true,
1132 'panstart': true,
1133 'panmove': true,
1134 'panend': true,
1135 'pancancel': true,
1136 'panleft': true,
1137 'panright': true,
1138 'panup': true,
1139 'pandown': true,
1140 // pinch
1141 'pinch': true,
1142 'pinchstart': true,
1143 'pinchmove': true,
1144 'pinchend': true,
1145 'pinchcancel': true,
1146 'pinchin': true,
1147 'pinchout': true,
1148 // press
1149 'press': true,
1150 'pressup': true,
1151 // rotate
1152 'rotate': true,
1153 'rotatestart': true,
1154 'rotatemove': true,
1155 'rotateend': true,
1156 'rotatecancel': true,
1157 // swipe
1158 'swipe': true,
1159 'swipeleft': true,
1160 'swiperight': true,
1161 'swipeup': true,
1162 'swipedown': true,
1163 // tap
1164 'tap': true,
1165 };
1166 /**
1167 * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.
1168 * @see `HammerGestureConfig`
1169 *
1170 * @ngModule HammerModule
1171 * @publicApi
1172 */
1173 var HAMMER_GESTURE_CONFIG = new i0.InjectionToken('HammerGestureConfig');
1174 /**
1175 * Injection token used to provide a {@link HammerLoader} to Angular.
1176 *
1177 * @publicApi
1178 */
1179 var HAMMER_LOADER = new i0.InjectionToken('HammerLoader');
1180 /**
1181 * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1182 * for gesture recognition. Configures specific event recognition.
1183 * @publicApi
1184 */
1185 var HammerGestureConfig = /** @class */ (function () {
1186 function HammerGestureConfig() {
1187 /**
1188 * A set of supported event names for gestures to be used in Angular.
1189 * Angular supports all built-in recognizers, as listed in
1190 * [HammerJS documentation](http://hammerjs.github.io/).
1191 */
1192 this.events = [];
1193 /**
1194 * Maps gesture event names to a set of configuration options
1195 * that specify overrides to the default values for specific properties.
1196 *
1197 * The key is a supported event name to be configured,
1198 * and the options object contains a set of properties, with override values
1199 * to be applied to the named recognizer event.
1200 * For example, to disable recognition of the rotate event, specify
1201 * `{"rotate": {"enable": false}}`.
1202 *
1203 * Properties that are not present take the HammerJS default values.
1204 * For information about which properties are supported for which events,
1205 * and their allowed and default values, see
1206 * [HammerJS documentation](http://hammerjs.github.io/).
1207 *
1208 */
1209 this.overrides = {};
1210 }
1211 /**
1212 * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)
1213 * and attaches it to a given HTML element.
1214 * @param element The element that will recognize gestures.
1215 * @returns A HammerJS event-manager object.
1216 */
1217 HammerGestureConfig.prototype.buildHammer = function (element) {
1218 var mc = new Hammer(element, this.options);
1219 mc.get('pinch').set({ enable: true });
1220 mc.get('rotate').set({ enable: true });
1221 for (var eventName in this.overrides) {
1222 mc.get(eventName).set(this.overrides[eventName]);
1223 }
1224 return mc;
1225 };
1226 HammerGestureConfig.decorators = [
1227 { type: i0.Injectable }
1228 ];
1229 return HammerGestureConfig;
1230 }());
1231 /**
1232 * Event plugin that adds Hammer support to an application.
1233 *
1234 * @ngModule HammerModule
1235 */
1236 var HammerGesturesPlugin = /** @class */ (function (_super) {
1237 __extends(HammerGesturesPlugin, _super);
1238 function HammerGesturesPlugin(doc, _config, console, loader) {
1239 var _this = _super.call(this, doc) || this;
1240 _this._config = _config;
1241 _this.console = console;
1242 _this.loader = loader;
1243 return _this;
1244 }
1245 HammerGesturesPlugin.prototype.supports = function (eventName) {
1246 if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {
1247 return false;
1248 }
1249 if (!window.Hammer && !this.loader) {
1250 this.console.warn("The \"" + eventName + "\" event cannot be bound because Hammer.JS is not " +
1251 "loaded and no custom loader has been specified.");
1252 return false;
1253 }
1254 return true;
1255 };
1256 HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {
1257 var _this = this;
1258 var zone = this.manager.getZone();
1259 eventName = eventName.toLowerCase();
1260 // If Hammer is not present but a loader is specified, we defer adding the event listener
1261 // until Hammer is loaded.
1262 if (!window.Hammer && this.loader) {
1263 // This `addEventListener` method returns a function to remove the added listener.
1264 // Until Hammer is loaded, the returned function needs to *cancel* the registration rather
1265 // than remove anything.
1266 var cancelRegistration_1 = false;
1267 var deregister_1 = function () {
1268 cancelRegistration_1 = true;
1269 };
1270 this.loader()
1271 .then(function () {
1272 // If Hammer isn't actually loaded when the custom loader resolves, give up.
1273 if (!window.Hammer) {
1274 _this.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present.");
1275 deregister_1 = function () { };
1276 return;
1277 }
1278 if (!cancelRegistration_1) {
1279 // Now that Hammer is loaded and the listener is being loaded for real,
1280 // the deregistration function changes from canceling registration to removal.
1281 deregister_1 = _this.addEventListener(element, eventName, handler);
1282 }
1283 })
1284 .catch(function () {
1285 _this.console.warn("The \"" + eventName + "\" event cannot be bound because the custom " +
1286 "Hammer.JS loader failed.");
1287 deregister_1 = function () { };
1288 });
1289 // Return a function that *executes* `deregister` (and not `deregister` itself) so that we
1290 // can change the behavior of `deregister` once the listener is added. Using a closure in
1291 // this way allows us to avoid any additional data structures to track listener removal.
1292 return function () {
1293 deregister_1();
1294 };
1295 }
1296 return zone.runOutsideAngular(function () {
1297 // Creating the manager bind events, must be done outside of angular
1298 var mc = _this._config.buildHammer(element);
1299 var callback = function (eventObj) {
1300 zone.runGuarded(function () {
1301 handler(eventObj);
1302 });
1303 };
1304 mc.on(eventName, callback);
1305 return function () {
1306 mc.off(eventName, callback);
1307 // destroy mc to prevent memory leak
1308 if (typeof mc.destroy === 'function') {
1309 mc.destroy();
1310 }
1311 };
1312 });
1313 };
1314 HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) {
1315 return this._config.events.indexOf(eventName) > -1;
1316 };
1317 HammerGesturesPlugin.decorators = [
1318 { type: i0.Injectable }
1319 ];
1320 HammerGesturesPlugin.ctorParameters = function () { return [
1321 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] },
1322 { type: HammerGestureConfig, decorators: [{ type: i0.Inject, args: [HAMMER_GESTURE_CONFIG,] }] },
1323 { type: i0.ɵConsole },
1324 { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [HAMMER_LOADER,] }] }
1325 ]; };
1326 return HammerGesturesPlugin;
1327 }(EventManagerPlugin));
1328 /**
1329 * In Ivy, support for Hammer gestures is optional, so applications must
1330 * import the `HammerModule` at root to turn on support. This means that
1331 * Hammer-specific code can be tree-shaken away if not needed.
1332 */
1333 var HAMMER_PROVIDERS__POST_R3__ = [];
1334 /**
1335 * In View Engine, support for Hammer gestures is built-in by default.
1336 */
1337 var HAMMER_PROVIDERS__PRE_R3__ = [
1338 {
1339 provide: EVENT_MANAGER_PLUGINS,
1340 useClass: HammerGesturesPlugin,
1341 multi: true,
1342 deps: [common.DOCUMENT, HAMMER_GESTURE_CONFIG, i0.ɵConsole, [new i0.Optional(), HAMMER_LOADER]]
1343 },
1344 { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
1345 ];
1346 var HAMMER_PROVIDERS = HAMMER_PROVIDERS__PRE_R3__;
1347 /**
1348 * Adds support for HammerJS.
1349 *
1350 * Import this module at the root of your application so that Angular can work with
1351 * HammerJS to detect gesture events.
1352 *
1353 * Note that applications still need to include the HammerJS script itself. This module
1354 * simply sets up the coordination layer between HammerJS and Angular's EventManager.
1355 *
1356 * @publicApi
1357 */
1358 var HammerModule = /** @class */ (function () {
1359 function HammerModule() {
1360 }
1361 HammerModule.decorators = [
1362 { type: i0.NgModule, args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ },] }
1363 ];
1364 return HammerModule;
1365 }());
1366
1367 /**
1368 * @license
1369 * Copyright Google LLC All Rights Reserved.
1370 *
1371 * Use of this source code is governed by an MIT-style license that can be
1372 * found in the LICENSE file at https://angular.io/license
1373 */
1374 /**
1375 * Defines supported modifiers for key events.
1376 */
1377 var MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];
1378 var DOM_KEY_LOCATION_NUMPAD = 3;
1379 // Map to convert some key or keyIdentifier values to what will be returned by getEventKey
1380 var _keyMap = {
1381 // The following values are here for cross-browser compatibility and to match the W3C standard
1382 // cf http://www.w3.org/TR/DOM-Level-3-Events-key/
1383 '\b': 'Backspace',
1384 '\t': 'Tab',
1385 '\x7F': 'Delete',
1386 '\x1B': 'Escape',
1387 'Del': 'Delete',
1388 'Esc': 'Escape',
1389 'Left': 'ArrowLeft',
1390 'Right': 'ArrowRight',
1391 'Up': 'ArrowUp',
1392 'Down': 'ArrowDown',
1393 'Menu': 'ContextMenu',
1394 'Scroll': 'ScrollLock',
1395 'Win': 'OS'
1396 };
1397 // There is a bug in Chrome for numeric keypad keys:
1398 // https://code.google.com/p/chromium/issues/detail?id=155654
1399 // 1, 2, 3 ... are reported as A, B, C ...
1400 var _chromeNumKeyPadMap = {
1401 'A': '1',
1402 'B': '2',
1403 'C': '3',
1404 'D': '4',
1405 'E': '5',
1406 'F': '6',
1407 'G': '7',
1408 'H': '8',
1409 'I': '9',
1410 'J': '*',
1411 'K': '+',
1412 'M': '-',
1413 'N': '.',
1414 'O': '/',
1415 '\x60': '0',
1416 '\x90': 'NumLock'
1417 };
1418 var ɵ0$3 = function (event) { return event.altKey; }, ɵ1 = function (event) { return event.ctrlKey; }, ɵ2 = function (event) { return event.metaKey; }, ɵ3 = function (event) { return event.shiftKey; };
1419 /**
1420 * Retrieves modifiers from key-event objects.
1421 */
1422 var MODIFIER_KEY_GETTERS = {
1423 'alt': ɵ0$3,
1424 'control': ɵ1,
1425 'meta': ɵ2,
1426 'shift': ɵ3
1427 };
1428 /**
1429 * @publicApi
1430 * A browser plug-in that provides support for handling of key events in Angular.
1431 */
1432 var KeyEventsPlugin = /** @class */ (function (_super) {
1433 __extends(KeyEventsPlugin, _super);
1434 /**
1435 * Initializes an instance of the browser plug-in.
1436 * @param doc The document in which key events will be detected.
1437 */
1438 function KeyEventsPlugin(doc) {
1439 return _super.call(this, doc) || this;
1440 }
1441 /**
1442 * Reports whether a named key event is supported.
1443 * @param eventName The event name to query.
1444 * @return True if the named key event is supported.
1445 */
1446 KeyEventsPlugin.prototype.supports = function (eventName) {
1447 return KeyEventsPlugin.parseEventName(eventName) != null;
1448 };
1449 /**
1450 * Registers a handler for a specific element and key event.
1451 * @param element The HTML element to receive event notifications.
1452 * @param eventName The name of the key event to listen for.
1453 * @param handler A function to call when the notification occurs. Receives the
1454 * event object as an argument.
1455 * @returns The key event that was registered.
1456 */
1457 KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {
1458 var parsedEvent = KeyEventsPlugin.parseEventName(eventName);
1459 var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());
1460 return this.manager.getZone().runOutsideAngular(function () {
1461 return common.ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);
1462 });
1463 };
1464 KeyEventsPlugin.parseEventName = function (eventName) {
1465 var parts = eventName.toLowerCase().split('.');
1466 var domEventName = parts.shift();
1467 if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {
1468 return null;
1469 }
1470 var key = KeyEventsPlugin._normalizeKey(parts.pop());
1471 var fullKey = '';
1472 MODIFIER_KEYS.forEach(function (modifierName) {
1473 var index = parts.indexOf(modifierName);
1474 if (index > -1) {
1475 parts.splice(index, 1);
1476 fullKey += modifierName + '.';
1477 }
1478 });
1479 fullKey += key;
1480 if (parts.length != 0 || key.length === 0) {
1481 // returning null instead of throwing to let another plugin process the event
1482 return null;
1483 }
1484 var result = {};
1485 result['domEventName'] = domEventName;
1486 result['fullKey'] = fullKey;
1487 return result;
1488 };
1489 KeyEventsPlugin.getEventFullKey = function (event) {
1490 var fullKey = '';
1491 var key = getEventKey(event);
1492 key = key.toLowerCase();
1493 if (key === ' ') {
1494 key = 'space'; // for readability
1495 }
1496 else if (key === '.') {
1497 key = 'dot'; // because '.' is used as a separator in event names
1498 }
1499 MODIFIER_KEYS.forEach(function (modifierName) {
1500 if (modifierName != key) {
1501 var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];
1502 if (modifierGetter(event)) {
1503 fullKey += modifierName + '.';
1504 }
1505 }
1506 });
1507 fullKey += key;
1508 return fullKey;
1509 };
1510 /**
1511 * Configures a handler callback for a key event.
1512 * @param fullKey The event name that combines all simultaneous keystrokes.
1513 * @param handler The function that responds to the key event.
1514 * @param zone The zone in which the event occurred.
1515 * @returns A callback function.
1516 */
1517 KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {
1518 return function (event /** TODO #9100 */) {
1519 if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {
1520 zone.runGuarded(function () { return handler(event); });
1521 }
1522 };
1523 };
1524 /** @internal */
1525 KeyEventsPlugin._normalizeKey = function (keyName) {
1526 // TODO: switch to a Map if the mapping grows too much
1527 switch (keyName) {
1528 case 'esc':
1529 return 'escape';
1530 default:
1531 return keyName;
1532 }
1533 };
1534 KeyEventsPlugin.decorators = [
1535 { type: i0.Injectable }
1536 ];
1537 KeyEventsPlugin.ctorParameters = function () { return [
1538 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1539 ]; };
1540 return KeyEventsPlugin;
1541 }(EventManagerPlugin));
1542 function getEventKey(event) {
1543 var key = event.key;
1544 if (key == null) {
1545 key = event.keyIdentifier;
1546 // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and
1547 // Safari cf
1548 // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces
1549 if (key == null) {
1550 return 'Unidentified';
1551 }
1552 if (key.startsWith('U+')) {
1553 key = String.fromCharCode(parseInt(key.substring(2), 16));
1554 if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {
1555 // There is a bug in Chrome for numeric keypad keys:
1556 // https://code.google.com/p/chromium/issues/detail?id=155654
1557 // 1, 2, 3 ... are reported as A, B, C ...
1558 key = _chromeNumKeyPadMap[key];
1559 }
1560 }
1561 }
1562 return _keyMap[key] || key;
1563 }
1564
1565 /**
1566 * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing
1567 * values to be safe to use in the different DOM contexts.
1568 *
1569 * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be
1570 * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on
1571 * the website.
1572 *
1573 * In specific situations, it might be necessary to disable sanitization, for example if the
1574 * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.
1575 * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`
1576 * methods, and then binding to that value from the template.
1577 *
1578 * These situations should be very rare, and extraordinary care must be taken to avoid creating a
1579 * Cross Site Scripting (XSS) security bug!
1580 *
1581 * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as
1582 * close as possible to the source of the value, to make it easy to verify no security bug is
1583 * created by its use.
1584 *
1585 * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that
1586 * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous
1587 * code. The sanitizer leaves safe values intact.
1588 *
1589 * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in
1590 * sanitization for the value passed in. Carefully check and audit all values and code paths going
1591 * into this call. Make sure any user data is appropriately escaped for this security context.
1592 * For more detail, see the [Security Guide](http://g.co/ng/security).
1593 *
1594 * @publicApi
1595 */
1596 var DomSanitizer = /** @class */ (function () {
1597 function DomSanitizer() {
1598 }
1599 DomSanitizer.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizer_Factory() { return i0.ɵɵinject(DomSanitizerImpl); }, token: DomSanitizer, providedIn: "root" });
1600 DomSanitizer.decorators = [
1601 { type: i0.Injectable, args: [{ providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) },] }
1602 ];
1603 return DomSanitizer;
1604 }());
1605 function domSanitizerImplFactory(injector) {
1606 return new DomSanitizerImpl(injector.get(common.DOCUMENT));
1607 }
1608 var DomSanitizerImpl = /** @class */ (function (_super) {
1609 __extends(DomSanitizerImpl, _super);
1610 function DomSanitizerImpl(_doc) {
1611 var _this = _super.call(this) || this;
1612 _this._doc = _doc;
1613 return _this;
1614 }
1615 DomSanitizerImpl.prototype.sanitize = function (ctx, value) {
1616 if (value == null)
1617 return null;
1618 switch (ctx) {
1619 case i0.SecurityContext.NONE:
1620 return value;
1621 case i0.SecurityContext.HTML:
1622 if (i0.ɵallowSanitizationBypassAndThrow(value, "HTML" /* Html */)) {
1623 return i0.ɵunwrapSafeValue(value);
1624 }
1625 return i0.ɵ_sanitizeHtml(this._doc, String(value));
1626 case i0.SecurityContext.STYLE:
1627 if (i0.ɵallowSanitizationBypassAndThrow(value, "Style" /* Style */)) {
1628 return i0.ɵunwrapSafeValue(value);
1629 }
1630 return value;
1631 case i0.SecurityContext.SCRIPT:
1632 if (i0.ɵallowSanitizationBypassAndThrow(value, "Script" /* Script */)) {
1633 return i0.ɵunwrapSafeValue(value);
1634 }
1635 throw new Error('unsafe value used in a script context');
1636 case i0.SecurityContext.URL:
1637 var type = i0.ɵgetSanitizationBypassType(value);
1638 if (i0.ɵallowSanitizationBypassAndThrow(value, "URL" /* Url */)) {
1639 return i0.ɵunwrapSafeValue(value);
1640 }
1641 return i0.ɵ_sanitizeUrl(String(value));
1642 case i0.SecurityContext.RESOURCE_URL:
1643 if (i0.ɵallowSanitizationBypassAndThrow(value, "ResourceURL" /* ResourceUrl */)) {
1644 return i0.ɵunwrapSafeValue(value);
1645 }
1646 throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');
1647 default:
1648 throw new Error("Unexpected SecurityContext " + ctx + " (see http://g.co/ng/security#xss)");
1649 }
1650 };
1651 DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {
1652 return i0.ɵbypassSanitizationTrustHtml(value);
1653 };
1654 DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) {
1655 return i0.ɵbypassSanitizationTrustStyle(value);
1656 };
1657 DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) {
1658 return i0.ɵbypassSanitizationTrustScript(value);
1659 };
1660 DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {
1661 return i0.ɵbypassSanitizationTrustUrl(value);
1662 };
1663 DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {
1664 return i0.ɵbypassSanitizationTrustResourceUrl(value);
1665 };
1666 DomSanitizerImpl.ɵprov = i0.ɵɵdefineInjectable({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(i0.ɵɵinject(i0.INJECTOR)); }, token: DomSanitizerImpl, providedIn: "root" });
1667 DomSanitizerImpl.decorators = [
1668 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [i0.Injector] },] }
1669 ];
1670 DomSanitizerImpl.ctorParameters = function () { return [
1671 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1672 ]; };
1673 return DomSanitizerImpl;
1674 }(DomSanitizer));
1675
1676 /**
1677 * @license
1678 * Copyright Google LLC All Rights Reserved.
1679 *
1680 * Use of this source code is governed by an MIT-style license that can be
1681 * found in the LICENSE file at https://angular.io/license
1682 */
1683 function initDomAdapter() {
1684 BrowserDomAdapter.makeCurrent();
1685 BrowserGetTestability.init();
1686 }
1687 function errorHandler() {
1688 return new i0.ErrorHandler();
1689 }
1690 function _document() {
1691 // Tell ivy about the global document
1692 i0.ɵsetDocument(document);
1693 return document;
1694 }
1695 var ɵ0$4 = common.ɵPLATFORM_BROWSER_ID;
1696 var INTERNAL_BROWSER_PLATFORM_PROVIDERS = [
1697 { provide: i0.PLATFORM_ID, useValue: ɵ0$4 },
1698 { provide: i0.PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },
1699 { provide: common.DOCUMENT, useFactory: _document, deps: [] },
1700 ];
1701 var BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [
1702 { provide: i0.Sanitizer, useExisting: DomSanitizer },
1703 { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [common.DOCUMENT] },
1704 ];
1705 var BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];
1706 /**
1707 * @security Replacing built-in sanitization providers exposes the application to XSS risks.
1708 * Attacker-controlled data introduced by an unsanitized provider could expose your
1709 * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).
1710 * @publicApi
1711 */
1712 var BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__PRE_R3__;
1713 /**
1714 * A factory function that returns a `PlatformRef` instance associated with browser service
1715 * providers.
1716 *
1717 * @publicApi
1718 */
1719 var platformBrowser = i0.createPlatformFactory(i0.platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);
1720 var BROWSER_MODULE_PROVIDERS = [
1721 BROWSER_SANITIZATION_PROVIDERS,
1722 { provide: i0.ɵINJECTOR_SCOPE, useValue: 'root' },
1723 { provide: i0.ErrorHandler, useFactory: errorHandler, deps: [] },
1724 {
1725 provide: EVENT_MANAGER_PLUGINS,
1726 useClass: DomEventsPlugin,
1727 multi: true,
1728 deps: [common.DOCUMENT, i0.NgZone, i0.PLATFORM_ID]
1729 },
1730 { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [common.DOCUMENT] },
1731 HAMMER_PROVIDERS,
1732 {
1733 provide: DomRendererFactory2,
1734 useClass: DomRendererFactory2,
1735 deps: [EventManager, DomSharedStylesHost, i0.APP_ID]
1736 },
1737 { provide: i0.RendererFactory2, useExisting: DomRendererFactory2 },
1738 { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
1739 { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [common.DOCUMENT] },
1740 { provide: i0.Testability, useClass: i0.Testability, deps: [i0.NgZone] },
1741 { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, i0.NgZone] },
1742 ELEMENT_PROBE_PROVIDERS,
1743 ];
1744 /**
1745 * Exports required infrastructure for all Angular apps.
1746 * Included by default in all Angular apps created with the CLI
1747 * `new` command.
1748 * Re-exports `CommonModule` and `ApplicationModule`, making their
1749 * exports and providers available to all apps.
1750 *
1751 * @publicApi
1752 */
1753 var BrowserModule = /** @class */ (function () {
1754 function BrowserModule(parentModule) {
1755 if (parentModule) {
1756 throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.");
1757 }
1758 }
1759 /**
1760 * Configures a browser-based app to transition from a server-rendered app, if
1761 * one is present on the page.
1762 *
1763 * @param params An object containing an identifier for the app to transition.
1764 * The ID must match between the client and server versions of the app.
1765 * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.
1766 */
1767 BrowserModule.withServerTransition = function (params) {
1768 return {
1769 ngModule: BrowserModule,
1770 providers: [
1771 { provide: i0.APP_ID, useValue: params.appId },
1772 { provide: TRANSITION_ID, useExisting: i0.APP_ID },
1773 SERVER_TRANSITION_PROVIDERS,
1774 ],
1775 };
1776 };
1777 BrowserModule.decorators = [
1778 { type: i0.NgModule, args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [common.CommonModule, i0.ApplicationModule] },] }
1779 ];
1780 BrowserModule.ctorParameters = function () { return [
1781 { type: BrowserModule, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }, { type: i0.Inject, args: [BrowserModule,] }] }
1782 ]; };
1783 return BrowserModule;
1784 }());
1785
1786 /**
1787 * @license
1788 * Copyright Google LLC All Rights Reserved.
1789 *
1790 * Use of this source code is governed by an MIT-style license that can be
1791 * found in the LICENSE file at https://angular.io/license
1792 */
1793 /**
1794 * Factory to create a `Meta` service instance for the current DOM document.
1795 */
1796 function createMeta() {
1797 return new Meta(i0.ɵɵinject(common.DOCUMENT));
1798 }
1799 /**
1800 * A service for managing HTML `<meta>` tags.
1801 *
1802 * Properties of the `MetaDefinition` object match the attributes of the
1803 * HTML `<meta>` tag. These tags define document metadata that is important for
1804 * things like configuring a Content Security Policy, defining browser compatibility
1805 * and security settings, setting HTTP Headers, defining rich content for social sharing,
1806 * and Search Engine Optimization (SEO).
1807 *
1808 * To identify specific `<meta>` tags in a document, use an attribute selection
1809 * string in the format `"tag_attribute='value string'"`.
1810 * For example, an `attrSelector` value of `"name='description'"` matches a tag
1811 * whose `name` attribute has the value `"description"`.
1812 * Selectors are used with the `querySelector()` Document method,
1813 * in the format `meta[{attrSelector}]`.
1814 *
1815 * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)
1816 * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)
1817 *
1818 *
1819 * @publicApi
1820 */
1821 var Meta = /** @class */ (function () {
1822 function Meta(_doc) {
1823 this._doc = _doc;
1824 this._dom = common.ɵgetDOM();
1825 }
1826 /**
1827 * Retrieves or creates a specific `<meta>` tag element in the current HTML document.
1828 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1829 * values in the provided tag definition, and verifies that all other attribute values are equal.
1830 * If an existing element is found, it is returned and is not modified in any way.
1831 * @param tag The definition of a `<meta>` element to match or create.
1832 * @param forceCreation True to create a new element without checking whether one already exists.
1833 * @returns The existing element with the same attributes and values if found,
1834 * the new element if no match is found, or `null` if the tag parameter is not defined.
1835 */
1836 Meta.prototype.addTag = function (tag, forceCreation) {
1837 if (forceCreation === void 0) { forceCreation = false; }
1838 if (!tag)
1839 return null;
1840 return this._getOrCreateElement(tag, forceCreation);
1841 };
1842 /**
1843 * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.
1844 * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute
1845 * values in the provided tag definition, and verifies that all other attribute values are equal.
1846 * @param tags An array of tag definitions to match or create.
1847 * @param forceCreation True to create new elements without checking whether they already exist.
1848 * @returns The matching elements if found, or the new elements.
1849 */
1850 Meta.prototype.addTags = function (tags, forceCreation) {
1851 var _this = this;
1852 if (forceCreation === void 0) { forceCreation = false; }
1853 if (!tags)
1854 return [];
1855 return tags.reduce(function (result, tag) {
1856 if (tag) {
1857 result.push(_this._getOrCreateElement(tag, forceCreation));
1858 }
1859 return result;
1860 }, []);
1861 };
1862 /**
1863 * Retrieves a `<meta>` tag element in the current HTML document.
1864 * @param attrSelector The tag attribute and value to match against, in the format
1865 * `"tag_attribute='value string'"`.
1866 * @returns The matching element, if any.
1867 */
1868 Meta.prototype.getTag = function (attrSelector) {
1869 if (!attrSelector)
1870 return null;
1871 return this._doc.querySelector("meta[" + attrSelector + "]") || null;
1872 };
1873 /**
1874 * Retrieves a set of `<meta>` tag elements in the current HTML document.
1875 * @param attrSelector The tag attribute and value to match against, in the format
1876 * `"tag_attribute='value string'"`.
1877 * @returns The matching elements, if any.
1878 */
1879 Meta.prototype.getTags = function (attrSelector) {
1880 if (!attrSelector)
1881 return [];
1882 var list /*NodeList*/ = this._doc.querySelectorAll("meta[" + attrSelector + "]");
1883 return list ? [].slice.call(list) : [];
1884 };
1885 /**
1886 * Modifies an existing `<meta>` tag element in the current HTML document.
1887 * @param tag The tag description with which to replace the existing tag content.
1888 * @param selector A tag attribute and value to match against, to identify
1889 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1890 * If not supplied, matches a tag with the same `name` or `property` attribute value as the
1891 * replacement tag.
1892 * @return The modified element.
1893 */
1894 Meta.prototype.updateTag = function (tag, selector) {
1895 if (!tag)
1896 return null;
1897 selector = selector || this._parseSelector(tag);
1898 var meta = this.getTag(selector);
1899 if (meta) {
1900 return this._setMetaElementAttributes(tag, meta);
1901 }
1902 return this._getOrCreateElement(tag, true);
1903 };
1904 /**
1905 * Removes an existing `<meta>` tag element from the current HTML document.
1906 * @param attrSelector A tag attribute and value to match against, to identify
1907 * an existing tag. A string in the format `"tag_attribute=`value string`"`.
1908 */
1909 Meta.prototype.removeTag = function (attrSelector) {
1910 this.removeTagElement(this.getTag(attrSelector));
1911 };
1912 /**
1913 * Removes an existing `<meta>` tag element from the current HTML document.
1914 * @param meta The tag definition to match against to identify an existing tag.
1915 */
1916 Meta.prototype.removeTagElement = function (meta) {
1917 if (meta) {
1918 this._dom.remove(meta);
1919 }
1920 };
1921 Meta.prototype._getOrCreateElement = function (meta, forceCreation) {
1922 if (forceCreation === void 0) { forceCreation = false; }
1923 if (!forceCreation) {
1924 var selector = this._parseSelector(meta);
1925 var elem = this.getTag(selector);
1926 // It's allowed to have multiple elements with the same name so it's not enough to
1927 // just check that element with the same name already present on the page. We also need to
1928 // check if element has tag attributes
1929 if (elem && this._containsAttributes(meta, elem))
1930 return elem;
1931 }
1932 var element = this._dom.createElement('meta');
1933 this._setMetaElementAttributes(meta, element);
1934 var head = this._doc.getElementsByTagName('head')[0];
1935 head.appendChild(element);
1936 return element;
1937 };
1938 Meta.prototype._setMetaElementAttributes = function (tag, el) {
1939 Object.keys(tag).forEach(function (prop) { return el.setAttribute(prop, tag[prop]); });
1940 return el;
1941 };
1942 Meta.prototype._parseSelector = function (tag) {
1943 var attr = tag.name ? 'name' : 'property';
1944 return attr + "=\"" + tag[attr] + "\"";
1945 };
1946 Meta.prototype._containsAttributes = function (tag, elem) {
1947 return Object.keys(tag).every(function (key) { return elem.getAttribute(key) === tag[key]; });
1948 };
1949 Meta.ɵprov = i0.ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: "root" });
1950 Meta.decorators = [
1951 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createMeta, deps: [] },] }
1952 ];
1953 Meta.ctorParameters = function () { return [
1954 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1955 ]; };
1956 return Meta;
1957 }());
1958
1959 /**
1960 * @license
1961 * Copyright Google LLC All Rights Reserved.
1962 *
1963 * Use of this source code is governed by an MIT-style license that can be
1964 * found in the LICENSE file at https://angular.io/license
1965 */
1966 /**
1967 * Factory to create Title service.
1968 */
1969 function createTitle() {
1970 return new Title(i0.ɵɵinject(common.DOCUMENT));
1971 }
1972 /**
1973 * A service that can be used to get and set the title of a current HTML document.
1974 *
1975 * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)
1976 * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements
1977 * (representing the `<title>` tag). Instead, this service can be used to set and get the current
1978 * title value.
1979 *
1980 * @publicApi
1981 */
1982 var Title = /** @class */ (function () {
1983 function Title(_doc) {
1984 this._doc = _doc;
1985 }
1986 /**
1987 * Get the title of the current HTML document.
1988 */
1989 Title.prototype.getTitle = function () {
1990 return this._doc.title;
1991 };
1992 /**
1993 * Set the title of the current HTML document.
1994 * @param newTitle
1995 */
1996 Title.prototype.setTitle = function (newTitle) {
1997 this._doc.title = newTitle || '';
1998 };
1999 Title.ɵprov = i0.ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: "root" });
2000 Title.decorators = [
2001 { type: i0.Injectable, args: [{ providedIn: 'root', useFactory: createTitle, deps: [] },] }
2002 ];
2003 Title.ctorParameters = function () { return [
2004 { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
2005 ]; };
2006 return Title;
2007 }());
2008
2009 /**
2010 * @license
2011 * Copyright Google LLC All Rights Reserved.
2012 *
2013 * Use of this source code is governed by an MIT-style license that can be
2014 * found in the LICENSE file at https://angular.io/license
2015 */
2016 var win = typeof window !== 'undefined' && window || {};
2017
2018 /**
2019 * @license
2020 * Copyright Google LLC All Rights Reserved.
2021 *
2022 * Use of this source code is governed by an MIT-style license that can be
2023 * found in the LICENSE file at https://angular.io/license
2024 */
2025 var ChangeDetectionPerfRecord = /** @class */ (function () {
2026 function ChangeDetectionPerfRecord(msPerTick, numTicks) {
2027 this.msPerTick = msPerTick;
2028 this.numTicks = numTicks;
2029 }
2030 return ChangeDetectionPerfRecord;
2031 }());
2032 /**
2033 * Entry point for all Angular profiling-related debug tools. This object
2034 * corresponds to the `ng.profiler` in the dev console.
2035 */
2036 var AngularProfiler = /** @class */ (function () {
2037 function AngularProfiler(ref) {
2038 this.appRef = ref.injector.get(i0.ApplicationRef);
2039 }
2040 // tslint:disable:no-console
2041 /**
2042 * Exercises change detection in a loop and then prints the average amount of
2043 * time in milliseconds how long a single round of change detection takes for
2044 * the current state of the UI. It runs a minimum of 5 rounds for a minimum
2045 * of 500 milliseconds.
2046 *
2047 * Optionally, a user may pass a `config` parameter containing a map of
2048 * options. Supported options are:
2049 *
2050 * `record` (boolean) - causes the profiler to record a CPU profile while
2051 * it exercises the change detector. Example:
2052 *
2053 * ```
2054 * ng.profiler.timeChangeDetection({record: true})
2055 * ```
2056 */
2057 AngularProfiler.prototype.timeChangeDetection = function (config) {
2058 var record = config && config['record'];
2059 var profileName = 'Change Detection';
2060 // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened
2061 var isProfilerAvailable = win.console.profile != null;
2062 if (record && isProfilerAvailable) {
2063 win.console.profile(profileName);
2064 }
2065 var start = common.ɵgetDOM().performanceNow();
2066 var numTicks = 0;
2067 while (numTicks < 5 || (common.ɵgetDOM().performanceNow() - start) < 500) {
2068 this.appRef.tick();
2069 numTicks++;
2070 }
2071 var end = common.ɵgetDOM().performanceNow();
2072 if (record && isProfilerAvailable) {
2073 win.console.profileEnd(profileName);
2074 }
2075 var msPerTick = (end - start) / numTicks;
2076 win.console.log("ran " + numTicks + " change detection cycles");
2077 win.console.log(msPerTick.toFixed(2) + " ms per check");
2078 return new ChangeDetectionPerfRecord(msPerTick, numTicks);
2079 };
2080 return AngularProfiler;
2081 }());
2082
2083 /**
2084 * @license
2085 * Copyright Google LLC All Rights Reserved.
2086 *
2087 * Use of this source code is governed by an MIT-style license that can be
2088 * found in the LICENSE file at https://angular.io/license
2089 */
2090 var PROFILER_GLOBAL_NAME = 'profiler';
2091 /**
2092 * Enabled Angular debug tools that are accessible via your browser's
2093 * developer console.
2094 *
2095 * Usage:
2096 *
2097 * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)
2098 * 1. Type `ng.` (usually the console will show auto-complete suggestion)
2099 * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`
2100 * then hit Enter.
2101 *
2102 * @publicApi
2103 */
2104 function enableDebugTools(ref) {
2105 exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));
2106 return ref;
2107 }
2108 /**
2109 * Disables Angular tools.
2110 *
2111 * @publicApi
2112 */
2113 function disableDebugTools() {
2114 exportNgVar(PROFILER_GLOBAL_NAME, null);
2115 }
2116
2117 /**
2118 * @license
2119 * Copyright Google LLC All Rights Reserved.
2120 *
2121 * Use of this source code is governed by an MIT-style license that can be
2122 * found in the LICENSE file at https://angular.io/license
2123 */
2124 function escapeHtml(text) {
2125 var escapedText = {
2126 '&': '&a;',
2127 '"': '&q;',
2128 '\'': '&s;',
2129 '<': '&l;',
2130 '>': '&g;',
2131 };
2132 return text.replace(/[&"'<>]/g, function (s) { return escapedText[s]; });
2133 }
2134 function unescapeHtml(text) {
2135 var unescapedText = {
2136 '&a;': '&',
2137 '&q;': '"',
2138 '&s;': '\'',
2139 '&l;': '<',
2140 '&g;': '>',
2141 };
2142 return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });
2143 }
2144 /**
2145 * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
2146 *
2147 * Example:
2148 *
2149 * ```
2150 * const COUNTER_KEY = makeStateKey<number>('counter');
2151 * let value = 10;
2152 *
2153 * transferState.set(COUNTER_KEY, value);
2154 * ```
2155 *
2156 * @publicApi
2157 */
2158 function makeStateKey(key) {
2159 return key;
2160 }
2161 /**
2162 * A key value store that is transferred from the application on the server side to the application
2163 * on the client side.
2164 *
2165 * `TransferState` will be available as an injectable token. To use it import
2166 * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.
2167 *
2168 * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
2169 * boolean, number, string, null and non-class objects will be serialized and deserialzied in a
2170 * non-lossy manner.
2171 *
2172 * @publicApi
2173 */
2174 var TransferState = /** @class */ (function () {
2175 function TransferState() {
2176 this.store = {};
2177 this.onSerializeCallbacks = {};
2178 }
2179 /** @internal */
2180 TransferState.init = function (initState) {
2181 var transferState = new TransferState();
2182 transferState.store = initState;
2183 return transferState;
2184 };
2185 /**
2186 * Get the value corresponding to a key. Return `defaultValue` if key is not found.
2187 */
2188 TransferState.prototype.get = function (key, defaultValue) {
2189 return this.store[key] !== undefined ? this.store[key] : defaultValue;
2190 };
2191 /**
2192 * Set the value corresponding to a key.
2193 */
2194 TransferState.prototype.set = function (key, value) {
2195 this.store[key] = value;
2196 };
2197 /**
2198 * Remove a key from the store.
2199 */
2200 TransferState.prototype.remove = function (key) {
2201 delete this.store[key];
2202 };
2203 /**
2204 * Test whether a key exists in the store.
2205 */
2206 TransferState.prototype.hasKey = function (key) {
2207 return this.store.hasOwnProperty(key);
2208 };
2209 /**
2210 * Register a callback to provide the value for a key when `toJson` is called.
2211 */
2212 TransferState.prototype.onSerialize = function (key, callback) {
2213 this.onSerializeCallbacks[key] = callback;
2214 };
2215 /**
2216 * Serialize the current state of the store to JSON.
2217 */
2218 TransferState.prototype.toJson = function () {
2219 // Call the onSerialize callbacks and put those values into the store.
2220 for (var key in this.onSerializeCallbacks) {
2221 if (this.onSerializeCallbacks.hasOwnProperty(key)) {
2222 try {
2223 this.store[key] = this.onSerializeCallbacks[key]();
2224 }
2225 catch (e) {
2226 console.warn('Exception in onSerialize callback: ', e);
2227 }
2228 }
2229 }
2230 return JSON.stringify(this.store);
2231 };
2232 TransferState.decorators = [
2233 { type: i0.Injectable }
2234 ];
2235 return TransferState;
2236 }());
2237 function initTransferState(doc, appId) {
2238 // Locate the script tag with the JSON data transferred from the server.
2239 // The id of the script tag is set to the Angular appId + 'state'.
2240 var script = doc.getElementById(appId + '-state');
2241 var initialState = {};
2242 if (script && script.textContent) {
2243 try {
2244 initialState = JSON.parse(unescapeHtml(script.textContent));
2245 }
2246 catch (e) {
2247 console.warn('Exception while restoring TransferState for app ' + appId, e);
2248 }
2249 }
2250 return TransferState.init(initialState);
2251 }
2252 /**
2253 * NgModule to install on the client side while using the `TransferState` to transfer state from
2254 * server to client.
2255 *
2256 * @publicApi
2257 */
2258 var BrowserTransferStateModule = /** @class */ (function () {
2259 function BrowserTransferStateModule() {
2260 }
2261 BrowserTransferStateModule.decorators = [
2262 { type: i0.NgModule, args: [{
2263 providers: [{ provide: TransferState, useFactory: initTransferState, deps: [common.DOCUMENT, i0.APP_ID] }],
2264 },] }
2265 ];
2266 return BrowserTransferStateModule;
2267 }());
2268
2269 /**
2270 * @license
2271 * Copyright Google LLC All Rights Reserved.
2272 *
2273 * Use of this source code is governed by an MIT-style license that can be
2274 * found in the LICENSE file at https://angular.io/license
2275 */
2276 /**
2277 * Predicates for use with {@link DebugElement}'s query functions.
2278 *
2279 * @publicApi
2280 */
2281 var By = /** @class */ (function () {
2282 function By() {
2283 }
2284 /**
2285 * Match all nodes.
2286 *
2287 * @usageNotes
2288 * ### Example
2289 *
2290 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
2291 */
2292 By.all = function () {
2293 return function () { return true; };
2294 };
2295 /**
2296 * Match elements by the given CSS selector.
2297 *
2298 * @usageNotes
2299 * ### Example
2300 *
2301 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
2302 */
2303 By.css = function (selector) {
2304 return function (debugElement) {
2305 return debugElement.nativeElement != null ?
2306 elementMatches(debugElement.nativeElement, selector) :
2307 false;
2308 };
2309 };
2310 /**
2311 * Match nodes that have the given directive present.
2312 *
2313 * @usageNotes
2314 * ### Example
2315 *
2316 * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
2317 */
2318 By.directive = function (type) {
2319 return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };
2320 };
2321 return By;
2322 }());
2323 function elementMatches(n, selector) {
2324 if (common.ɵgetDOM().isElementNode(n)) {
2325 return n.matches && n.matches(selector) ||
2326 n.msMatchesSelector && n.msMatchesSelector(selector) ||
2327 n.webkitMatchesSelector && n.webkitMatchesSelector(selector);
2328 }
2329 return false;
2330 }
2331
2332 /**
2333 * @license
2334 * Copyright Google LLC All Rights Reserved.
2335 *
2336 * Use of this source code is governed by an MIT-style license that can be
2337 * found in the LICENSE file at https://angular.io/license
2338 */
2339
2340 /**
2341 * @license
2342 * Copyright Google LLC All Rights Reserved.
2343 *
2344 * Use of this source code is governed by an MIT-style license that can be
2345 * found in the LICENSE file at https://angular.io/license
2346 */
2347 /**
2348 * @publicApi
2349 */
2350 var VERSION = new i0.Version('10.0.1');
2351
2352 /**
2353 * @license
2354 * Copyright Google LLC All Rights Reserved.
2355 *
2356 * Use of this source code is governed by an MIT-style license that can be
2357 * found in the LICENSE file at https://angular.io/license
2358 */
2359
2360 /**
2361 * @license
2362 * Copyright Google LLC All Rights Reserved.
2363 *
2364 * Use of this source code is governed by an MIT-style license that can be
2365 * found in the LICENSE file at https://angular.io/license
2366 */
2367 // This file only reexports content of the `src` folder. Keep it that way.
2368
2369 /**
2370 * @license
2371 * Copyright Google LLC All Rights Reserved.
2372 *
2373 * Use of this source code is governed by an MIT-style license that can be
2374 * found in the LICENSE file at https://angular.io/license
2375 */
2376
2377 /**
2378 * Generated bundle index. Do not edit.
2379 */
2380
2381 Object.defineProperty(exports, 'ɵgetDOM', {
2382 enumerable: true,
2383 get: function () {
2384 return common.ɵgetDOM;
2385 }
2386 });
2387 exports.BrowserModule = BrowserModule;
2388 exports.BrowserTransferStateModule = BrowserTransferStateModule;
2389 exports.By = By;
2390 exports.DomSanitizer = DomSanitizer;
2391 exports.EVENT_MANAGER_PLUGINS = EVENT_MANAGER_PLUGINS;
2392 exports.EventManager = EventManager;
2393 exports.HAMMER_GESTURE_CONFIG = HAMMER_GESTURE_CONFIG;
2394 exports.HAMMER_LOADER = HAMMER_LOADER;
2395 exports.HammerGestureConfig = HammerGestureConfig;
2396 exports.HammerModule = HammerModule;
2397 exports.Meta = Meta;
2398 exports.Title = Title;
2399 exports.TransferState = TransferState;
2400 exports.VERSION = VERSION;
2401 exports.disableDebugTools = disableDebugTools;
2402 exports.enableDebugTools = enableDebugTools;
2403 exports.makeStateKey = makeStateKey;
2404 exports.platformBrowser = platformBrowser;
2405 exports.ɵBROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS;
2406 exports.ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__ = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;
2407 exports.ɵBrowserDomAdapter = BrowserDomAdapter;
2408 exports.ɵBrowserGetTestability = BrowserGetTestability;
2409 exports.ɵDomEventsPlugin = DomEventsPlugin;
2410 exports.ɵDomRendererFactory2 = DomRendererFactory2;
2411 exports.ɵDomSanitizerImpl = DomSanitizerImpl;
2412 exports.ɵDomSharedStylesHost = DomSharedStylesHost;
2413 exports.ɵELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS;
2414 exports.ɵELEMENT_PROBE_PROVIDERS__POST_R3__ = ELEMENT_PROBE_PROVIDERS__POST_R3__;
2415 exports.ɵHAMMER_PROVIDERS__POST_R3__ = HAMMER_PROVIDERS__POST_R3__;
2416 exports.ɵHammerGesturesPlugin = HammerGesturesPlugin;
2417 exports.ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS = INTERNAL_BROWSER_PLATFORM_PROVIDERS;
2418 exports.ɵKeyEventsPlugin = KeyEventsPlugin;
2419 exports.ɵNAMESPACE_URIS = NAMESPACE_URIS;
2420 exports.ɵSharedStylesHost = SharedStylesHost;
2421 exports.ɵTRANSITION_ID = TRANSITION_ID;
2422 exports.ɵangular_packages_platform_browser_platform_browser_a = errorHandler;
2423 exports.ɵangular_packages_platform_browser_platform_browser_b = _document;
2424 exports.ɵangular_packages_platform_browser_platform_browser_c = BROWSER_MODULE_PROVIDERS;
2425 exports.ɵangular_packages_platform_browser_platform_browser_d = createMeta;
2426 exports.ɵangular_packages_platform_browser_platform_browser_e = createTitle;
2427 exports.ɵangular_packages_platform_browser_platform_browser_f = initTransferState;
2428 exports.ɵangular_packages_platform_browser_platform_browser_g = EventManagerPlugin;
2429 exports.ɵangular_packages_platform_browser_platform_browser_h = HAMMER_PROVIDERS__PRE_R3__;
2430 exports.ɵangular_packages_platform_browser_platform_browser_i = HAMMER_PROVIDERS;
2431 exports.ɵangular_packages_platform_browser_platform_browser_j = domSanitizerImplFactory;
2432 exports.ɵangular_packages_platform_browser_platform_browser_k = appInitializerFactory;
2433 exports.ɵangular_packages_platform_browser_platform_browser_l = SERVER_TRANSITION_PROVIDERS;
2434 exports.ɵangular_packages_platform_browser_platform_browser_m = _createNgProbeR2;
2435 exports.ɵangular_packages_platform_browser_platform_browser_n = ELEMENT_PROBE_PROVIDERS__PRE_R3__;
2436 exports.ɵangular_packages_platform_browser_platform_browser_o = GenericBrowserDomAdapter;
2437 exports.ɵescapeHtml = escapeHtml;
2438 exports.ɵflattenStyles = flattenStyles;
2439 exports.ɵinitDomAdapter = initDomAdapter;
2440 exports.ɵshimContentAttribute = shimContentAttribute;
2441 exports.ɵshimHostAttribute = shimHostAttribute;
2442
2443 Object.defineProperty(exports, '__esModule', { value: true });
2444
2445})));
2446//# sourceMappingURL=platform-browser.umd.js.map