UNPKG

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