@angular/platform-browser
Advanced tools
+359
-473
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -12,528 +12,414 @@ * License: MIT | ||
| /** | ||
| * A `DomAdapter` powered by full browser DOM APIs. | ||
| * | ||
| * @security Tread carefully! Interacting with the DOM directly is dangerous and | ||
| * can introduce XSS risks. | ||
| */ | ||
| class BrowserDomAdapter extends _DomAdapter { | ||
| supportsDOMEvents = true; | ||
| static makeCurrent() { | ||
| _setRootDomAdapter(new BrowserDomAdapter()); | ||
| supportsDOMEvents = true; | ||
| static makeCurrent() { | ||
| _setRootDomAdapter(new BrowserDomAdapter()); | ||
| } | ||
| onAndCancel(el, evt, listener, options) { | ||
| el.addEventListener(evt, listener, options); | ||
| return () => { | ||
| el.removeEventListener(evt, listener, options); | ||
| }; | ||
| } | ||
| dispatchEvent(el, evt) { | ||
| el.dispatchEvent(evt); | ||
| } | ||
| remove(node) { | ||
| node.remove(); | ||
| } | ||
| createElement(tagName, doc) { | ||
| doc = doc || this.getDefaultDocument(); | ||
| return doc.createElement(tagName); | ||
| } | ||
| createHtmlDocument() { | ||
| return document.implementation.createHTMLDocument('fakeTitle'); | ||
| } | ||
| getDefaultDocument() { | ||
| return document; | ||
| } | ||
| isElementNode(node) { | ||
| return node.nodeType === Node.ELEMENT_NODE; | ||
| } | ||
| isShadowRoot(node) { | ||
| return node instanceof DocumentFragment; | ||
| } | ||
| getGlobalEventTarget(doc, target) { | ||
| if (target === 'window') { | ||
| return window; | ||
| } | ||
| onAndCancel(el, evt, listener, options) { | ||
| el.addEventListener(evt, listener, options); | ||
| return () => { | ||
| el.removeEventListener(evt, listener, options); | ||
| }; | ||
| if (target === 'document') { | ||
| return doc; | ||
| } | ||
| dispatchEvent(el, evt) { | ||
| el.dispatchEvent(evt); | ||
| if (target === 'body') { | ||
| return doc.body; | ||
| } | ||
| remove(node) { | ||
| node.remove(); | ||
| } | ||
| createElement(tagName, doc) { | ||
| doc = doc || this.getDefaultDocument(); | ||
| return doc.createElement(tagName); | ||
| } | ||
| createHtmlDocument() { | ||
| return document.implementation.createHTMLDocument('fakeTitle'); | ||
| } | ||
| getDefaultDocument() { | ||
| return document; | ||
| } | ||
| isElementNode(node) { | ||
| return node.nodeType === Node.ELEMENT_NODE; | ||
| } | ||
| isShadowRoot(node) { | ||
| return node instanceof DocumentFragment; | ||
| } | ||
| /** @deprecated No longer being used in Ivy code. To be removed in version 14. */ | ||
| getGlobalEventTarget(doc, target) { | ||
| if (target === 'window') { | ||
| return window; | ||
| } | ||
| if (target === 'document') { | ||
| return doc; | ||
| } | ||
| if (target === 'body') { | ||
| return doc.body; | ||
| } | ||
| return null; | ||
| } | ||
| getBaseHref(doc) { | ||
| const href = getBaseElementHref(); | ||
| return href == null ? null : relativePath(href); | ||
| } | ||
| resetBaseElement() { | ||
| baseElement = null; | ||
| } | ||
| getUserAgent() { | ||
| return window.navigator.userAgent; | ||
| } | ||
| getCookie(name) { | ||
| return _parseCookieValue(document.cookie, name); | ||
| } | ||
| return null; | ||
| } | ||
| getBaseHref(doc) { | ||
| const href = getBaseElementHref(); | ||
| return href == null ? null : relativePath(href); | ||
| } | ||
| resetBaseElement() { | ||
| baseElement = null; | ||
| } | ||
| getUserAgent() { | ||
| return window.navigator.userAgent; | ||
| } | ||
| getCookie(name) { | ||
| return _parseCookieValue(document.cookie, name); | ||
| } | ||
| } | ||
| let baseElement = null; | ||
| function getBaseElementHref() { | ||
| baseElement = baseElement || document.head.querySelector('base'); | ||
| return baseElement ? baseElement.getAttribute('href') : null; | ||
| baseElement = baseElement || document.head.querySelector('base'); | ||
| return baseElement ? baseElement.getAttribute('href') : null; | ||
| } | ||
| function relativePath(url) { | ||
| // The base URL doesn't really matter, we just need it so relative paths have something | ||
| // to resolve against. In the browser `HTMLBaseElement.href` is always absolute. | ||
| return new URL(url, document.baseURI).pathname; | ||
| return new URL(url, document.baseURI).pathname; | ||
| } | ||
| class BrowserGetTestability { | ||
| addToWindow(registry) { | ||
| _global['getAngularTestability'] = (elem, findInAncestors = true) => { | ||
| const testability = registry.findTestabilityInTree(elem, findInAncestors); | ||
| if (testability == null) { | ||
| throw new _RuntimeError(5103 /* RuntimeErrorCode.TESTABILITY_NOT_FOUND */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| 'Could not find testability for element.'); | ||
| } | ||
| return testability; | ||
| }; | ||
| _global['getAllAngularTestabilities'] = () => registry.getAllTestabilities(); | ||
| _global['getAllAngularRootElements'] = () => registry.getAllRootElements(); | ||
| const whenAllStable = (callback) => { | ||
| const testabilities = _global['getAllAngularTestabilities'](); | ||
| let count = testabilities.length; | ||
| const decrement = function () { | ||
| count--; | ||
| if (count == 0) { | ||
| callback(); | ||
| } | ||
| }; | ||
| testabilities.forEach((testability) => { | ||
| testability.whenStable(decrement); | ||
| }); | ||
| }; | ||
| if (!_global['frameworkStabilizers']) { | ||
| _global['frameworkStabilizers'] = []; | ||
| addToWindow(registry) { | ||
| _global['getAngularTestability'] = (elem, findInAncestors = true) => { | ||
| const testability = registry.findTestabilityInTree(elem, findInAncestors); | ||
| if (testability == null) { | ||
| throw new _RuntimeError(5103, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Could not find testability for element.'); | ||
| } | ||
| return testability; | ||
| }; | ||
| _global['getAllAngularTestabilities'] = () => registry.getAllTestabilities(); | ||
| _global['getAllAngularRootElements'] = () => registry.getAllRootElements(); | ||
| const whenAllStable = callback => { | ||
| const testabilities = _global['getAllAngularTestabilities'](); | ||
| let count = testabilities.length; | ||
| const decrement = function () { | ||
| count--; | ||
| if (count == 0) { | ||
| callback(); | ||
| } | ||
| _global['frameworkStabilizers'].push(whenAllStable); | ||
| }; | ||
| testabilities.forEach(testability => { | ||
| testability.whenStable(decrement); | ||
| }); | ||
| }; | ||
| if (!_global['frameworkStabilizers']) { | ||
| _global['frameworkStabilizers'] = []; | ||
| } | ||
| findTestabilityInTree(registry, elem, findInAncestors) { | ||
| if (elem == null) { | ||
| return null; | ||
| } | ||
| const t = registry.getTestability(elem); | ||
| if (t != null) { | ||
| return t; | ||
| } | ||
| else if (!findInAncestors) { | ||
| return null; | ||
| } | ||
| if (_getDOM().isShadowRoot(elem)) { | ||
| return this.findTestabilityInTree(registry, elem.host, true); | ||
| } | ||
| return this.findTestabilityInTree(registry, elem.parentElement, true); | ||
| _global['frameworkStabilizers'].push(whenAllStable); | ||
| } | ||
| findTestabilityInTree(registry, elem, findInAncestors) { | ||
| if (elem == null) { | ||
| return null; | ||
| } | ||
| const t = registry.getTestability(elem); | ||
| if (t != null) { | ||
| return t; | ||
| } else if (!findInAncestors) { | ||
| return null; | ||
| } | ||
| if (_getDOM().isShadowRoot(elem)) { | ||
| return this.findTestabilityInTree(registry, elem.host, true); | ||
| } | ||
| return this.findTestabilityInTree(registry, elem.parentElement, true); | ||
| } | ||
| } | ||
| /** | ||
| * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API. | ||
| */ | ||
| class BrowserXhr { | ||
| build() { | ||
| return new XMLHttpRequest(); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserXhr }); | ||
| build() { | ||
| return new XMLHttpRequest(); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserXhr, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserXhr | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserXhr, decorators: [{ | ||
| type: Injectable | ||
| }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserXhr, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }] | ||
| }); | ||
| /** | ||
| * Defines supported modifiers for key events. | ||
| */ | ||
| const MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift']; | ||
| // The following values are here for cross-browser compatibility and to match the W3C standard | ||
| // cf https://www.w3.org/TR/DOM-Level-3-Events-key/ | ||
| const _keyMap = { | ||
| '\b': 'Backspace', | ||
| '\t': 'Tab', | ||
| '\x7F': 'Delete', | ||
| '\x1B': 'Escape', | ||
| 'Del': 'Delete', | ||
| 'Esc': 'Escape', | ||
| 'Left': 'ArrowLeft', | ||
| 'Right': 'ArrowRight', | ||
| 'Up': 'ArrowUp', | ||
| 'Down': 'ArrowDown', | ||
| 'Menu': 'ContextMenu', | ||
| 'Scroll': 'ScrollLock', | ||
| 'Win': 'OS', | ||
| '\b': 'Backspace', | ||
| '\t': 'Tab', | ||
| '\x7F': 'Delete', | ||
| '\x1B': 'Escape', | ||
| 'Del': 'Delete', | ||
| 'Esc': 'Escape', | ||
| 'Left': 'ArrowLeft', | ||
| 'Right': 'ArrowRight', | ||
| 'Up': 'ArrowUp', | ||
| 'Down': 'ArrowDown', | ||
| 'Menu': 'ContextMenu', | ||
| 'Scroll': 'ScrollLock', | ||
| 'Win': 'OS' | ||
| }; | ||
| /** | ||
| * Retrieves modifiers from key-event objects. | ||
| */ | ||
| const MODIFIER_KEY_GETTERS = { | ||
| 'alt': (event) => event.altKey, | ||
| 'control': (event) => event.ctrlKey, | ||
| 'meta': (event) => event.metaKey, | ||
| 'shift': (event) => event.shiftKey, | ||
| 'alt': event => event.altKey, | ||
| 'control': event => event.ctrlKey, | ||
| 'meta': event => event.metaKey, | ||
| 'shift': event => event.shiftKey | ||
| }; | ||
| /** | ||
| * A browser plug-in that provides support for handling of key events in Angular. | ||
| */ | ||
| class KeyEventsPlugin extends EventManagerPlugin { | ||
| /** | ||
| * Initializes an instance of the browser plug-in. | ||
| * @param doc The document in which key events will be detected. | ||
| */ | ||
| constructor(doc) { | ||
| super(doc); | ||
| constructor(doc) { | ||
| super(doc); | ||
| } | ||
| supports(eventName) { | ||
| return KeyEventsPlugin.parseEventName(eventName) != null; | ||
| } | ||
| addEventListener(element, eventName, handler, options) { | ||
| const parsedEvent = KeyEventsPlugin.parseEventName(eventName); | ||
| const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone()); | ||
| return this.manager.getZone().runOutsideAngular(() => { | ||
| return _getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler, options); | ||
| }); | ||
| } | ||
| static parseEventName(eventName) { | ||
| const parts = eventName.toLowerCase().split('.'); | ||
| const domEventName = parts.shift(); | ||
| if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) { | ||
| return null; | ||
| } | ||
| /** | ||
| * Reports whether a named key event is supported. | ||
| * @param eventName The event name to query. | ||
| * @return True if the named key event is supported. | ||
| */ | ||
| supports(eventName) { | ||
| return KeyEventsPlugin.parseEventName(eventName) != null; | ||
| const key = KeyEventsPlugin._normalizeKey(parts.pop()); | ||
| let fullKey = ''; | ||
| let codeIX = parts.indexOf('code'); | ||
| if (codeIX > -1) { | ||
| parts.splice(codeIX, 1); | ||
| fullKey = 'code.'; | ||
| } | ||
| /** | ||
| * Registers a handler for a specific element and key event. | ||
| * @param element The HTML element to receive event notifications. | ||
| * @param eventName The name of the key event to listen for. | ||
| * @param handler A function to call when the notification occurs. Receives the | ||
| * event object as an argument. | ||
| * @returns The key event that was registered. | ||
| */ | ||
| addEventListener(element, eventName, handler, options) { | ||
| const parsedEvent = KeyEventsPlugin.parseEventName(eventName); | ||
| const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone()); | ||
| return this.manager.getZone().runOutsideAngular(() => { | ||
| return _getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler, options); | ||
| }); | ||
| MODIFIER_KEYS.forEach(modifierName => { | ||
| const index = parts.indexOf(modifierName); | ||
| if (index > -1) { | ||
| parts.splice(index, 1); | ||
| fullKey += modifierName + '.'; | ||
| } | ||
| }); | ||
| fullKey += key; | ||
| if (parts.length != 0 || key.length === 0) { | ||
| return null; | ||
| } | ||
| /** | ||
| * Parses the user provided full keyboard event definition and normalizes it for | ||
| * later internal use. It ensures the string is all lowercase, converts special | ||
| * characters to a standard spelling, and orders all the values consistently. | ||
| * | ||
| * @param eventName The name of the key event to listen for. | ||
| * @returns an object with the full, normalized string, and the dom event name | ||
| * or null in the case when the event doesn't match a keyboard event. | ||
| */ | ||
| static parseEventName(eventName) { | ||
| const parts = eventName.toLowerCase().split('.'); | ||
| const domEventName = parts.shift(); | ||
| if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) { | ||
| return null; | ||
| } | ||
| const key = KeyEventsPlugin._normalizeKey(parts.pop()); | ||
| let fullKey = ''; | ||
| let codeIX = parts.indexOf('code'); | ||
| if (codeIX > -1) { | ||
| parts.splice(codeIX, 1); | ||
| fullKey = 'code.'; | ||
| } | ||
| MODIFIER_KEYS.forEach((modifierName) => { | ||
| const index = parts.indexOf(modifierName); | ||
| if (index > -1) { | ||
| parts.splice(index, 1); | ||
| fullKey += modifierName + '.'; | ||
| } | ||
| }); | ||
| fullKey += key; | ||
| if (parts.length != 0 || key.length === 0) { | ||
| // returning null instead of throwing to let another plugin process the event | ||
| return null; | ||
| } | ||
| // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming. | ||
| // The code must remain in the `result['domEventName']` form. | ||
| // return {domEventName, fullKey}; | ||
| const result = {}; | ||
| result['domEventName'] = domEventName; | ||
| result['fullKey'] = fullKey; | ||
| return result; | ||
| const result = {}; | ||
| result['domEventName'] = domEventName; | ||
| result['fullKey'] = fullKey; | ||
| return result; | ||
| } | ||
| static matchEventFullKeyCode(event, fullKeyCode) { | ||
| let keycode = _keyMap[event.key] || event.key; | ||
| let key = ''; | ||
| if (fullKeyCode.indexOf('code.') > -1) { | ||
| keycode = event.code; | ||
| key = 'code.'; | ||
| } | ||
| /** | ||
| * Determines whether the actual keys pressed match the configured key code string. | ||
| * The `fullKeyCode` event is normalized in the `parseEventName` method when the | ||
| * event is attached to the DOM during the `addEventListener` call. This is unseen | ||
| * by the end user and is normalized for internal consistency and parsing. | ||
| * | ||
| * @param event The keyboard event. | ||
| * @param fullKeyCode The normalized user defined expected key event string | ||
| * @returns boolean. | ||
| */ | ||
| static matchEventFullKeyCode(event, fullKeyCode) { | ||
| let keycode = _keyMap[event.key] || event.key; | ||
| let key = ''; | ||
| if (fullKeyCode.indexOf('code.') > -1) { | ||
| keycode = event.code; | ||
| key = 'code.'; | ||
| if (keycode == null || !keycode) return false; | ||
| keycode = keycode.toLowerCase(); | ||
| if (keycode === ' ') { | ||
| keycode = 'space'; | ||
| } else if (keycode === '.') { | ||
| keycode = 'dot'; | ||
| } | ||
| MODIFIER_KEYS.forEach(modifierName => { | ||
| if (modifierName !== keycode) { | ||
| const modifierGetter = MODIFIER_KEY_GETTERS[modifierName]; | ||
| if (modifierGetter(event)) { | ||
| key += modifierName + '.'; | ||
| } | ||
| // the keycode could be unidentified so we have to check here | ||
| if (keycode == null || !keycode) | ||
| return false; | ||
| keycode = keycode.toLowerCase(); | ||
| if (keycode === ' ') { | ||
| keycode = 'space'; // for readability | ||
| } | ||
| else if (keycode === '.') { | ||
| keycode = 'dot'; // because '.' is used as a separator in event names | ||
| } | ||
| MODIFIER_KEYS.forEach((modifierName) => { | ||
| if (modifierName !== keycode) { | ||
| const modifierGetter = MODIFIER_KEY_GETTERS[modifierName]; | ||
| if (modifierGetter(event)) { | ||
| key += modifierName + '.'; | ||
| } | ||
| } | ||
| }); | ||
| key += keycode; | ||
| return key === fullKeyCode; | ||
| } | ||
| /** | ||
| * Configures a handler callback for a key event. | ||
| * @param fullKey The event name that combines all simultaneous keystrokes. | ||
| * @param handler The function that responds to the key event. | ||
| * @param zone The zone in which the event occurred. | ||
| * @returns A callback function. | ||
| */ | ||
| static eventCallback(fullKey, handler, zone) { | ||
| return (event) => { | ||
| if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) { | ||
| zone.runGuarded(() => handler(event)); | ||
| } | ||
| }; | ||
| } | ||
| /** @internal */ | ||
| static _normalizeKey(keyName) { | ||
| return keyName === 'esc' ? 'escape' : keyName; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: KeyEventsPlugin }); | ||
| } | ||
| }); | ||
| key += keycode; | ||
| return key === fullKeyCode; | ||
| } | ||
| static eventCallback(fullKey, handler, zone) { | ||
| return event => { | ||
| if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) { | ||
| zone.runGuarded(() => handler(event)); | ||
| } | ||
| }; | ||
| } | ||
| static _normalizeKey(keyName) { | ||
| return keyName === 'esc' ? 'escape' : keyName; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: KeyEventsPlugin, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: KeyEventsPlugin | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: KeyEventsPlugin, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: KeyEventsPlugin, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| /** | ||
| * Bootstraps an instance of an Angular application and renders a standalone component as the | ||
| * application's root component. More information about standalone components can be found in [this | ||
| * guide](guide/components/importing). | ||
| * | ||
| * @usageNotes | ||
| * The root component passed into this function *must* be a standalone one (should have the | ||
| * `standalone: true` flag in the `@Component` decorator config). | ||
| * | ||
| * ```angular-ts | ||
| * @Component({ | ||
| * standalone: true, | ||
| * template: 'Hello world!' | ||
| * }) | ||
| * class RootComponent {} | ||
| * | ||
| * const appRef: ApplicationRef = await bootstrapApplication(RootComponent); | ||
| * ``` | ||
| * | ||
| * You can add the list of providers that should be available in the application injector by | ||
| * specifying the `providers` field in an object passed as the second argument: | ||
| * | ||
| * ```ts | ||
| * await bootstrapApplication(RootComponent, { | ||
| * providers: [ | ||
| * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'} | ||
| * ] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * The `importProvidersFrom` helper method can be used to collect all providers from any | ||
| * existing NgModule (and transitively from all NgModules that it imports): | ||
| * | ||
| * ```ts | ||
| * await bootstrapApplication(RootComponent, { | ||
| * providers: [ | ||
| * importProvidersFrom(SomeNgModule) | ||
| * ] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by | ||
| * default. You can add [Testability](api/core/Testability) by getting the list of necessary | ||
| * providers using `provideProtractorTestingSupport()` function and adding them into the `providers` | ||
| * array, for example: | ||
| * | ||
| * ```ts | ||
| * import {provideProtractorTestingSupport} from '@angular/platform-browser'; | ||
| * | ||
| * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]}); | ||
| * ``` | ||
| * | ||
| * @param rootComponent A reference to a standalone component that should be rendered. | ||
| * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for | ||
| * additional info. | ||
| * @param context Optional context object that can be used to provide a pre-existing | ||
| * platform injector. This is useful for advanced use-cases, for example, server-side | ||
| * rendering, where the platform is created for each request. | ||
| * @returns A promise that returns an `ApplicationRef` instance once resolved. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function bootstrapApplication(rootComponent, options, context) { | ||
| const config = { | ||
| rootComponent, | ||
| platformRef: context?.platformRef, | ||
| ...createProvidersConfig(options), | ||
| }; | ||
| // Attempt to resolve component resources before bootstrapping in JIT mode, | ||
| // however don't interrupt the bootstrapping process. | ||
| if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') { | ||
| return _resolveComponentResources(fetch) | ||
| .catch((error) => { | ||
| console.error(error); | ||
| return Promise.resolve(); | ||
| }) | ||
| .then(() => _internalCreateApplication(config)); | ||
| } | ||
| return _internalCreateApplication(config); | ||
| const config = { | ||
| rootComponent, | ||
| platformRef: context?.platformRef, | ||
| ...createProvidersConfig(options) | ||
| }; | ||
| if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') { | ||
| return _resolveComponentResources(fetch).catch(error => { | ||
| console.error(error); | ||
| return Promise.resolve(); | ||
| }).then(() => _internalCreateApplication(config)); | ||
| } | ||
| return _internalCreateApplication(config); | ||
| } | ||
| /** | ||
| * Create an instance of an Angular application without bootstrapping any components. This is useful | ||
| * for the situation where one wants to decouple application environment creation (a platform and | ||
| * associated injectors) from rendering components on a screen. Components can be subsequently | ||
| * bootstrapped on the returned `ApplicationRef`. | ||
| * | ||
| * @param options Extra configuration for the application environment, see `ApplicationConfig` for | ||
| * additional info. | ||
| * @returns A promise that returns an `ApplicationRef` instance once resolved. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function createApplication(options) { | ||
| return _internalCreateApplication(createProvidersConfig(options)); | ||
| return _internalCreateApplication(createProvidersConfig(options)); | ||
| } | ||
| function createProvidersConfig(options) { | ||
| return { | ||
| appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])], | ||
| platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS, | ||
| }; | ||
| return { | ||
| appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])], | ||
| platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS | ||
| }; | ||
| } | ||
| /** | ||
| * Returns a set of providers required to setup [Testability](api/core/Testability) for an | ||
| * application bootstrapped using the `bootstrapApplication` function. The set of providers is | ||
| * needed to support testing an application with Protractor (which relies on the Testability APIs | ||
| * to be present). | ||
| * | ||
| * @returns An array of providers required to setup Testability for an application and make it | ||
| * available for testing using Protractor. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function provideProtractorTestingSupport() { | ||
| // Return a copy to prevent changes to the original array in case any in-place | ||
| // alterations are performed to the `provideProtractorTestingSupport` call results in app | ||
| // code. | ||
| return [...TESTABILITY_PROVIDERS]; | ||
| return [...TESTABILITY_PROVIDERS]; | ||
| } | ||
| function initDomAdapter() { | ||
| BrowserDomAdapter.makeCurrent(); | ||
| BrowserDomAdapter.makeCurrent(); | ||
| } | ||
| function errorHandler() { | ||
| return new ErrorHandler(); | ||
| return new ErrorHandler(); | ||
| } | ||
| function _document() { | ||
| // Tell ivy about the global document | ||
| _setDocument(document); | ||
| return document; | ||
| _setDocument(document); | ||
| return document; | ||
| } | ||
| const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [ | ||
| { provide: PLATFORM_ID, useValue: _PLATFORM_BROWSER_ID }, | ||
| { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true }, | ||
| { provide: DOCUMENT, useFactory: _document }, | ||
| ]; | ||
| /** | ||
| * A factory function that returns a `PlatformRef` instance associated with browser service | ||
| * providers. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| const INTERNAL_BROWSER_PLATFORM_PROVIDERS = [{ | ||
| provide: PLATFORM_ID, | ||
| useValue: _PLATFORM_BROWSER_ID | ||
| }, { | ||
| provide: PLATFORM_INITIALIZER, | ||
| useValue: initDomAdapter, | ||
| multi: true | ||
| }, { | ||
| provide: DOCUMENT, | ||
| useFactory: _document | ||
| }]; | ||
| const platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS); | ||
| /** | ||
| * Internal marker to signal whether providers from the `BrowserModule` are already present in DI. | ||
| * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the | ||
| * `BrowserModule` presence itself, since the standalone-based bootstrap just imports | ||
| * `BrowserModule` providers without referencing the module itself. | ||
| */ | ||
| const BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'BrowserModule Providers Marker' : ''); | ||
| const TESTABILITY_PROVIDERS = [ | ||
| { | ||
| provide: _TESTABILITY_GETTER, | ||
| useClass: BrowserGetTestability, | ||
| }, | ||
| { | ||
| provide: _TESTABILITY, | ||
| useClass: Testability, | ||
| }, | ||
| { | ||
| provide: Testability, // Also provide as `Testability` for backwards-compatibility. | ||
| useClass: Testability, | ||
| }, | ||
| ]; | ||
| const BROWSER_MODULE_PROVIDERS = [ | ||
| { provide: _INJECTOR_SCOPE, useValue: 'root' }, | ||
| { provide: ErrorHandler, useFactory: errorHandler }, | ||
| { | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: DomEventsPlugin, | ||
| multi: true, | ||
| }, | ||
| { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true }, | ||
| DomRendererFactory2, | ||
| SharedStylesHost, | ||
| EventManager, | ||
| { provide: RendererFactory2, useExisting: DomRendererFactory2 }, | ||
| { provide: XhrFactory, useClass: BrowserXhr }, | ||
| typeof ngDevMode === 'undefined' || ngDevMode | ||
| ? { provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true } | ||
| : [], | ||
| ]; | ||
| /** | ||
| * Exports required infrastructure for all Angular apps. | ||
| * Included by default in all Angular apps created with the CLI | ||
| * `new` command. | ||
| * Re-exports `CommonModule` and `ApplicationModule`, making their | ||
| * exports and providers available to all apps. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| const TESTABILITY_PROVIDERS = [{ | ||
| provide: _TESTABILITY_GETTER, | ||
| useClass: BrowserGetTestability | ||
| }, { | ||
| provide: _TESTABILITY, | ||
| useClass: Testability | ||
| }, { | ||
| provide: Testability, | ||
| useClass: Testability | ||
| }]; | ||
| const BROWSER_MODULE_PROVIDERS = [{ | ||
| provide: _INJECTOR_SCOPE, | ||
| useValue: 'root' | ||
| }, { | ||
| provide: ErrorHandler, | ||
| useFactory: errorHandler | ||
| }, { | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: DomEventsPlugin, | ||
| multi: true | ||
| }, { | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: KeyEventsPlugin, | ||
| multi: true | ||
| }, DomRendererFactory2, SharedStylesHost, EventManager, { | ||
| provide: RendererFactory2, | ||
| useExisting: DomRendererFactory2 | ||
| }, { | ||
| provide: XhrFactory, | ||
| useClass: BrowserXhr | ||
| }, typeof ngDevMode === 'undefined' || ngDevMode ? { | ||
| provide: BROWSER_MODULE_PROVIDERS_MARKER, | ||
| useValue: true | ||
| } : []]; | ||
| class BrowserModule { | ||
| constructor() { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const providersAlreadyPresent = inject(BROWSER_MODULE_PROVIDERS_MARKER, { | ||
| optional: true, | ||
| skipSelf: true, | ||
| }); | ||
| if (providersAlreadyPresent) { | ||
| throw new _RuntimeError(5100 /* RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED */, `Providers from the \`BrowserModule\` have already been loaded. If you need access ` + | ||
| `to common directives such as NgIf and NgFor, import the \`CommonModule\` instead.`); | ||
| } | ||
| } | ||
| constructor() { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const providersAlreadyPresent = inject(BROWSER_MODULE_PROVIDERS_MARKER, { | ||
| optional: true, | ||
| skipSelf: true | ||
| }); | ||
| if (providersAlreadyPresent) { | ||
| throw new _RuntimeError(5100, `Providers from the \`BrowserModule\` have already been loaded. If you need access ` + `to common directives such as NgIf and NgFor, import the \`CommonModule\` instead.`); | ||
| } | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserModule, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.NgModule | ||
| }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ | ||
| minVersion: "14.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserModule, | ||
| exports: [CommonModule, ApplicationModule] | ||
| }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserModule, | ||
| providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], | ||
| imports: [CommonModule, ApplicationModule] | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserModule, decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], | ||
| exports: [CommonModule, ApplicationModule], | ||
| }] | ||
| }], ctorParameters: () => [] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserModule, | ||
| decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], | ||
| exports: [CommonModule, ApplicationModule] | ||
| }] | ||
| }], | ||
| ctorParameters: () => [] | ||
| }); | ||
| export { BrowserDomAdapter, BrowserGetTestability, BrowserModule, KeyEventsPlugin, bootstrapApplication, createApplication, platformBrowser, provideProtractorTestingSupport }; | ||
| //# sourceMappingURL=_browser-chunk.mjs.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"_browser-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/browser_adapter.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/testability.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/xhr.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/key_events.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ɵparseCookieValue as parseCookieValue,\n ɵsetRootDomAdapter as setRootDomAdapter,\n ɵDomAdapter as DomAdapter,\n} from '@angular/common';\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport class BrowserDomAdapter extends DomAdapter {\n override readonly supportsDOMEvents: boolean = true;\n\n static makeCurrent() {\n setRootDomAdapter(new BrowserDomAdapter());\n }\n\n override onAndCancel(el: Node, evt: any, listener: any, options: any): Function {\n el.addEventListener(evt, listener, options);\n return () => {\n el.removeEventListener(evt, listener, options);\n };\n }\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n }\n override remove(node: Node): void {\n (node as Element | Text | Comment).remove();\n }\n override createElement(tagName: string, doc?: Document): HTMLElement {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n override createHtmlDocument(): Document {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n override getDefaultDocument(): Document {\n return document;\n }\n\n override isElementNode(node: Node): boolean {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n\n override isShadowRoot(node: any): boolean {\n return node instanceof DocumentFragment;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n override getBaseHref(doc: Document): string | null {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n override resetBaseElement(): void {\n baseElement = null;\n }\n override getUserAgent(): string {\n return window.navigator.userAgent;\n }\n override getCookie(name: string): string | null {\n return parseCookieValue(document.cookie, name);\n }\n}\n\nlet baseElement: HTMLElement | null = null;\nfunction getBaseElementHref(): string | null {\n baseElement = baseElement || document.head.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n}\n\nfunction relativePath(url: string): string {\n // The base URL doesn't really matter, we just need it so relative paths have something\n // to resolve against. In the browser `HTMLBaseElement.href` is always absolute.\n return new URL(url, document.baseURI).pathname;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {\n GetTestability,\n Testability,\n TestabilityRegistry,\n ɵglobal as global,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport class BrowserGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {\n global['getAngularTestability'] = (elem: any, findInAncestors: boolean = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new RuntimeError(\n RuntimeErrorCode.TESTABILITY_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Could not find testability for element.',\n );\n }\n return testability;\n };\n\n global['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n global['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n const whenAllStable = (callback: () => void) => {\n const testabilities = global['getAllAngularTestabilities']() as Testability[];\n let count = testabilities.length;\n const decrement = function () {\n count--;\n if (count == 0) {\n callback();\n }\n };\n testabilities.forEach((testability) => {\n testability.whenStable(decrement);\n });\n };\n\n if (!global['frameworkStabilizers']) {\n global['frameworkStabilizers'] = [];\n }\n global['frameworkStabilizers'].push(whenAllStable);\n }\n\n findTestabilityInTree(\n registry: TestabilityRegistry,\n elem: any,\n findInAncestors: boolean,\n ): Testability | null {\n if (elem == null) {\n return null;\n }\n const t = registry.getTestability(elem);\n if (t != null) {\n return t;\n } else if (!findInAncestors) {\n return null;\n }\n if (getDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, (<any>elem).host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {XhrFactory} from '@angular/common';\nimport {Injectable} from '@angular/core';\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\n@Injectable()\nexport class BrowserXhr implements XhrFactory {\n build(): XMLHttpRequest {\n return new XMLHttpRequest();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions, NgZone} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap: {[k: string]: string} = {\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS',\n};\n\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS: {[key: string]: (event: KeyboardEvent) => boolean} = {\n 'alt': (event: KeyboardEvent) => event.altKey,\n 'control': (event: KeyboardEvent) => event.ctrlKey,\n 'meta': (event: KeyboardEvent) => event.metaKey,\n 'shift': (event: KeyboardEvent) => event.shiftKey,\n};\n\n/**\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n@Injectable()\nexport class KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n override supports(eventName: string): boolean {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\n\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName)!;\n\n const outsideHandler = KeyEventsPlugin.eventCallback(\n parsedEvent['fullKey'],\n handler,\n this.manager.getZone(),\n );\n\n return this.manager.getZone().runOutsideAngular(() => {\n return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler, options);\n });\n }\n\n /**\n * Parses the user provided full keyboard event definition and normalizes it for\n * later internal use. It ensures the string is all lowercase, converts special\n * characters to a standard spelling, and orders all the values consistently.\n *\n * @param eventName The name of the key event to listen for.\n * @returns an object with the full, normalized string, and the dom event name\n * or null in the case when the event doesn't match a keyboard event.\n */\n static parseEventName(eventName: string): {fullKey: string; domEventName: string} | null {\n const parts: string[] = eventName.toLowerCase().split('.');\n\n const domEventName = parts.shift();\n if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n\n const key = KeyEventsPlugin._normalizeKey(parts.pop()!);\n\n let fullKey = '';\n let codeIX = parts.indexOf('code');\n if (codeIX > -1) {\n parts.splice(codeIX, 1);\n fullKey = 'code.';\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n const index: number = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n\n // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n const result: {fullKey: string; domEventName: string} = {} as any;\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n\n /**\n * Determines whether the actual keys pressed match the configured key code string.\n * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n * event is attached to the DOM during the `addEventListener` call. This is unseen\n * by the end user and is normalized for internal consistency and parsing.\n *\n * @param event The keyboard event.\n * @param fullKeyCode The normalized user defined expected key event string\n * @returns boolean.\n */\n static matchEventFullKeyCode(event: KeyboardEvent, fullKeyCode: string): boolean {\n let keycode = _keyMap[event.key] || event.key;\n let key = '';\n if (fullKeyCode.indexOf('code.') > -1) {\n keycode = event.code;\n key = 'code.';\n }\n // the keycode could be unidentified so we have to check here\n if (keycode == null || !keycode) return false;\n keycode = keycode.toLowerCase();\n if (keycode === ' ') {\n keycode = 'space'; // for readability\n } else if (keycode === '.') {\n keycode = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n if (modifierName !== keycode) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n key += modifierName + '.';\n }\n }\n });\n key += keycode;\n return key === fullKeyCode;\n }\n\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n static eventCallback(fullKey: string, handler: Function, zone: NgZone): Function {\n return (event: KeyboardEvent) => {\n if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n\n /** @internal */\n static _normalizeKey(keyName: string): string {\n return keyName === 'esc' ? 'escape' : keyName;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n CommonModule,\n DOCUMENT,\n XhrFactory,\n ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID,\n} from '@angular/common';\nimport {\n ApplicationConfig,\n ApplicationModule,\n ApplicationRef,\n createPlatformFactory,\n ErrorHandler,\n InjectionToken,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n RendererFactory2,\n StaticProvider,\n Testability,\n Type,\n ɵINJECTOR_SCOPE as INJECTOR_SCOPE,\n ɵinternalCreateApplication as internalCreateApplication,\n ɵRuntimeError as RuntimeError,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n ɵTESTABILITY_GETTER as TESTABILITY_GETTER,\n inject,\n ɵresolveComponentResources as resolveComponentResources,\n} from '@angular/core';\n\nimport {BrowserDomAdapter} from './browser/browser_adapter';\nimport {BrowserGetTestability} from './browser/testability';\nimport {BrowserXhr} from './browser/xhr';\nimport {DomRendererFactory2} from './dom/dom_renderer';\nimport {DomEventsPlugin} from './dom/events/dom_events';\nimport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nimport {KeyEventsPlugin} from './dom/events/key_events';\nimport {SharedStylesHost} from './dom/shared_styles_host';\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * A context object that can be passed to `bootstrapApplication` to provide a pre-existing platform\n * injector.\n *\n * @publicApi\n */\nexport interface BootstrapContext {\n /**\n * A reference to a platform.\n */\n platformRef: PlatformRef;\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```angular-ts\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```ts\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @param context Optional context object that can be used to provide a pre-existing\n * platform injector. This is useful for advanced use-cases, for example, server-side\n * rendering, where the platform is created for each request.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function bootstrapApplication(\n rootComponent: Type<unknown>,\n options?: ApplicationConfig,\n context?: BootstrapContext,\n): Promise<ApplicationRef> {\n const config = {\n rootComponent,\n platformRef: context?.platformRef,\n ...createProvidersConfig(options),\n };\n\n // Attempt to resolve component resources before bootstrapping in JIT mode,\n // however don't interrupt the bootstrapping process.\n if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') {\n return resolveComponentResources(fetch)\n .catch((error) => {\n console.error(error);\n return Promise.resolve();\n })\n .then(() => internalCreateApplication(config));\n }\n\n return internalCreateApplication(config);\n}\n\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function createApplication(options?: ApplicationConfig): Promise<ApplicationRef> {\n return internalCreateApplication(createProvidersConfig(options));\n}\n\nfunction createProvidersConfig(options?: ApplicationConfig) {\n return {\n appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n };\n}\n\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @publicApi\n */\nexport function provideProtractorTestingSupport(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app\n // code.\n return [...TESTABILITY_PROVIDERS];\n}\n\nexport function initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n}\n\nexport function errorHandler(): ErrorHandler {\n return new ErrorHandler();\n}\n\nexport function _document(): any {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},\n {provide: DOCUMENT, useFactory: _document},\n];\n\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nexport const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'BrowserModule Providers Marker' : '',\n);\n\nconst TESTABILITY_PROVIDERS = [\n {\n provide: TESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n },\n {\n provide: TESTABILITY,\n useClass: Testability,\n },\n {\n provide: Testability, // Also provide as `Testability` for backwards-compatibility.\n useClass: Testability,\n },\n];\n\nconst BROWSER_MODULE_PROVIDERS: Provider[] = [\n {provide: INJECTOR_SCOPE, useValue: 'root'},\n {provide: ErrorHandler, useFactory: errorHandler},\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n },\n {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true},\n DomRendererFactory2,\n SharedStylesHost,\n EventManager,\n {provide: RendererFactory2, useExisting: DomRendererFactory2},\n {provide: XhrFactory, useClass: BrowserXhr},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? {provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true}\n : [],\n];\n\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\n@NgModule({\n providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],\n exports: [CommonModule, ApplicationModule],\n})\nexport class BrowserModule {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const providersAlreadyPresent = inject(BROWSER_MODULE_PROVIDERS_MARKER, {\n optional: true,\n skipSelf: true,\n });\n\n if (providersAlreadyPresent) {\n throw new RuntimeError(\n RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED,\n `Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`,\n );\n }\n }\n }\n}\n"],"names":["DomAdapter","setRootDomAdapter","parseCookieValue","global","RuntimeError","getDOM","resolveCompon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","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/browser_adapter.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/testability.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/key_events.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ɵparseCookieValue as parseCookieValue,\n ɵsetRootDomAdapter as setRootDomAdapter,\n ɵDomAdapter as DomAdapter,\n} from '@angular/common';\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport class BrowserDomAdapter extends DomAdapter {\n override readonly supportsDOMEvents: boolean = true;\n\n static makeCurrent() {\n setRootDomAdapter(new BrowserDomAdapter());\n }\n\n override onAndCancel(el: Node, evt: any, listener: any, options: any): Function {\n el.addEventListener(evt, listener, options);\n return () => {\n el.removeEventListener(evt, listener, options);\n };\n }\n override dispatchEvent(el: Node, evt: any) {\n el.dispatchEvent(evt);\n }\n override remove(node: Node): void {\n (node as Element | Text | Comment).remove();\n }\n override createElement(tagName: string, doc?: Document): HTMLElement {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n }\n override createHtmlDocument(): Document {\n return document.implementation.createHTMLDocument('fakeTitle');\n }\n override getDefaultDocument(): Document {\n return document;\n }\n\n override isElementNode(node: Node): boolean {\n return node.nodeType === Node.ELEMENT_NODE;\n }\n\n override isShadowRoot(node: any): boolean {\n return node instanceof DocumentFragment;\n }\n\n /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n override getGlobalEventTarget(doc: Document, target: string): EventTarget | null {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n }\n override getBaseHref(doc: Document): string | null {\n const href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n }\n override resetBaseElement(): void {\n baseElement = null;\n }\n override getUserAgent(): string {\n return window.navigator.userAgent;\n }\n override getCookie(name: string): string | null {\n return parseCookieValue(document.cookie, name);\n }\n}\n\nlet baseElement: HTMLElement | null = null;\nfunction getBaseElementHref(): string | null {\n baseElement = baseElement || document.head.querySelector('base');\n return baseElement ? baseElement.getAttribute('href') : null;\n}\n\nfunction relativePath(url: string): string {\n // The base URL doesn't really matter, we just need it so relative paths have something\n // to resolve against. In the browser `HTMLBaseElement.href` is always absolute.\n return new URL(url, document.baseURI).pathname;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {\n GetTestability,\n Testability,\n TestabilityRegistry,\n ɵglobal as global,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport class BrowserGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {\n global['getAngularTestability'] = (elem: any, findInAncestors: boolean = true) => {\n const testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new RuntimeError(\n RuntimeErrorCode.TESTABILITY_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Could not find testability for element.',\n );\n }\n return testability;\n };\n\n global['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n global['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n const whenAllStable = (callback: () => void) => {\n const testabilities = global['getAllAngularTestabilities']() as Testability[];\n let count = testabilities.length;\n const decrement = function () {\n count--;\n if (count == 0) {\n callback();\n }\n };\n testabilities.forEach((testability) => {\n testability.whenStable(decrement);\n });\n };\n\n if (!global['frameworkStabilizers']) {\n global['frameworkStabilizers'] = [];\n }\n global['frameworkStabilizers'].push(whenAllStable);\n }\n\n findTestabilityInTree(\n registry: TestabilityRegistry,\n elem: any,\n findInAncestors: boolean,\n ): Testability | null {\n if (elem == null) {\n return null;\n }\n const t = registry.getTestability(elem);\n if (t != null) {\n return t;\n } else if (!findInAncestors) {\n return null;\n }\n if (getDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, (<any>elem).host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions, NgZone} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap: {[k: string]: string} = {\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS',\n};\n\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS: {[key: string]: (event: KeyboardEvent) => boolean} = {\n 'alt': (event: KeyboardEvent) => event.altKey,\n 'control': (event: KeyboardEvent) => event.ctrlKey,\n 'meta': (event: KeyboardEvent) => event.metaKey,\n 'shift': (event: KeyboardEvent) => event.shiftKey,\n};\n\n/**\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n@Injectable()\nexport class KeyEventsPlugin extends EventManagerPlugin {\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n override supports(eventName: string): boolean {\n return KeyEventsPlugin.parseEventName(eventName) != null;\n }\n\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n const parsedEvent = KeyEventsPlugin.parseEventName(eventName)!;\n\n const outsideHandler = KeyEventsPlugin.eventCallback(\n parsedEvent['fullKey'],\n handler,\n this.manager.getZone(),\n );\n\n return this.manager.getZone().runOutsideAngular(() => {\n return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler, options);\n });\n }\n\n /**\n * Parses the user provided full keyboard event definition and normalizes it for\n * later internal use. It ensures the string is all lowercase, converts special\n * characters to a standard spelling, and orders all the values consistently.\n *\n * @param eventName The name of the key event to listen for.\n * @returns an object with the full, normalized string, and the dom event name\n * or null in the case when the event doesn't match a keyboard event.\n */\n static parseEventName(eventName: string): {fullKey: string; domEventName: string} | null {\n const parts: string[] = eventName.toLowerCase().split('.');\n\n const domEventName = parts.shift();\n if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n\n const key = KeyEventsPlugin._normalizeKey(parts.pop()!);\n\n let fullKey = '';\n let codeIX = parts.indexOf('code');\n if (codeIX > -1) {\n parts.splice(codeIX, 1);\n fullKey = 'code.';\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n const index: number = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n\n // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n // The code must remain in the `result['domEventName']` form.\n // return {domEventName, fullKey};\n const result: {fullKey: string; domEventName: string} = {} as any;\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n }\n\n /**\n * Determines whether the actual keys pressed match the configured key code string.\n * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n * event is attached to the DOM during the `addEventListener` call. This is unseen\n * by the end user and is normalized for internal consistency and parsing.\n *\n * @param event The keyboard event.\n * @param fullKeyCode The normalized user defined expected key event string\n * @returns boolean.\n */\n static matchEventFullKeyCode(event: KeyboardEvent, fullKeyCode: string): boolean {\n let keycode = _keyMap[event.key] || event.key;\n let key = '';\n if (fullKeyCode.indexOf('code.') > -1) {\n keycode = event.code;\n key = 'code.';\n }\n // the keycode could be unidentified so we have to check here\n if (keycode == null || !keycode) return false;\n keycode = keycode.toLowerCase();\n if (keycode === ' ') {\n keycode = 'space'; // for readability\n } else if (keycode === '.') {\n keycode = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach((modifierName) => {\n if (modifierName !== keycode) {\n const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n key += modifierName + '.';\n }\n }\n });\n key += keycode;\n return key === fullKeyCode;\n }\n\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n static eventCallback(fullKey: string, handler: Function, zone: NgZone): Function {\n return (event: KeyboardEvent) => {\n if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n zone.runGuarded(() => handler(event));\n }\n };\n }\n\n /** @internal */\n static _normalizeKey(keyName: string): string {\n return keyName === 'esc' ? 'escape' : keyName;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n CommonModule,\n DOCUMENT,\n XhrFactory,\n ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID,\n} from '@angular/common';\nimport {\n ApplicationConfig,\n ApplicationModule,\n ApplicationRef,\n createPlatformFactory,\n ErrorHandler,\n InjectionToken,\n NgModule,\n PLATFORM_ID,\n PLATFORM_INITIALIZER,\n platformCore,\n PlatformRef,\n Provider,\n RendererFactory2,\n StaticProvider,\n Testability,\n Type,\n ɵINJECTOR_SCOPE as INJECTOR_SCOPE,\n ɵinternalCreateApplication as internalCreateApplication,\n ɵRuntimeError as RuntimeError,\n ɵsetDocument,\n ɵTESTABILITY as TESTABILITY,\n ɵTESTABILITY_GETTER as TESTABILITY_GETTER,\n inject,\n ɵresolveComponentResources as resolveComponentResources,\n} from '@angular/core';\n\nimport {BrowserDomAdapter} from './browser/browser_adapter';\nimport {BrowserGetTestability} from './browser/testability';\nimport {BrowserXhr} from './browser/xhr';\nimport {DomRendererFactory2} from './dom/dom_renderer';\nimport {DomEventsPlugin} from './dom/events/dom_events';\nimport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nimport {KeyEventsPlugin} from './dom/events/key_events';\nimport {SharedStylesHost} from './dom/shared_styles_host';\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * A context object that can be passed to `bootstrapApplication` to provide a pre-existing platform\n * injector.\n *\n * @publicApi\n */\nexport interface BootstrapContext {\n /**\n * A reference to a platform.\n */\n platformRef: PlatformRef;\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```angular-ts\n * @Component({\n * standalone: true,\n * template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n * ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(SomeNgModule)\n * ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```ts\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n * additional info.\n * @param context Optional context object that can be used to provide a pre-existing\n * platform injector. This is useful for advanced use-cases, for example, server-side\n * rendering, where the platform is created for each request.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function bootstrapApplication(\n rootComponent: Type<unknown>,\n options?: ApplicationConfig,\n context?: BootstrapContext,\n): Promise<ApplicationRef> {\n const config = {\n rootComponent,\n platformRef: context?.platformRef,\n ...createProvidersConfig(options),\n };\n\n // Attempt to resolve component resources before bootstrapping in JIT mode,\n // however don't interrupt the bootstrapping process.\n if ((typeof ngJitMode === 'undefined' || ngJitMode) && typeof fetch === 'function') {\n return resolveComponentResources(fetch)\n .catch((error) => {\n console.error(error);\n return Promise.resolve();\n })\n .then(() => internalCreateApplication(config));\n }\n\n return internalCreateApplication(config);\n}\n\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n * additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nexport function createApplication(options?: ApplicationConfig): Promise<ApplicationRef> {\n return internalCreateApplication(createProvidersConfig(options));\n}\n\nfunction createProvidersConfig(options?: ApplicationConfig) {\n return {\n appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])],\n platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n };\n}\n\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n * available for testing using Protractor.\n *\n * @publicApi\n */\nexport function provideProtractorTestingSupport(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideProtractorTestingSupport` call results in app\n // code.\n return [...TESTABILITY_PROVIDERS];\n}\n\nexport function initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n}\n\nexport function errorHandler(): ErrorHandler {\n return new ErrorHandler();\n}\n\nexport function _document(): any {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\n\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [\n {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},\n {provide: DOCUMENT, useFactory: _document},\n];\n\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nexport const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'BrowserModule Providers Marker' : '',\n);\n\nconst TESTABILITY_PROVIDERS = [\n {\n provide: TESTABILITY_GETTER,\n useClass: BrowserGetTestability,\n },\n {\n provide: TESTABILITY,\n useClass: Testability,\n },\n {\n provide: Testability, // Also provide as `Testability` for backwards-compatibility.\n useClass: Testability,\n },\n];\n\nconst BROWSER_MODULE_PROVIDERS: Provider[] = [\n {provide: INJECTOR_SCOPE, useValue: 'root'},\n {provide: ErrorHandler, useFactory: errorHandler},\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n },\n {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true},\n DomRendererFactory2,\n SharedStylesHost,\n EventManager,\n {provide: RendererFactory2, useExisting: DomRendererFactory2},\n {provide: XhrFactory, useClass: BrowserXhr},\n typeof ngDevMode === 'undefined' || ngDevMode\n ? {provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true}\n : [],\n];\n\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\n@NgModule({\n providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],\n exports: [CommonModule, ApplicationModule],\n})\nexport class BrowserModule {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const providersAlreadyPresent = inject(BROWSER_MODULE_PROVIDERS_MARKER, {\n optional: true,\n skipSelf: true,\n });\n\n if (providersAlreadyPresent) {\n throw new RuntimeError(\n RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED,\n `Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`,\n );\n }\n }\n }\n}\n"],"names":["BrowserDomAdapter","DomAdapter","supportsDOMEvents","el","addEventListener","evt","listener","options","removeEventListener","dispatchEvent","remove","createElement","tagName","doc","getDefaultDocument","createHtmlDocument","document","implementation","createHTMLDocument","isElementNode","node","nodeType","Node","ELEMENT_NODE","isShadowRoot","DocumentFragment","getGlobalEventTarget","target","body","href","getBaseElementHref","relativePath","resetBaseElement","baseElement","getUserAgent","window","navigator","userAgent","parseCookieValue","cookie","name","testability","RuntimeError","ngDevMode","registry","getAllTestabilities","getAllRootElements","callback","global","count","forEach","whenStable","decrement","push","whenAllStable","findTestabilityInTree","elem","findInAncestors","MODIFIER_KEYS","event","altKey","ctrlKey","metaKey","shiftKey","KeyEventsPlugin","EventManagerPlugin","fullKey","parts","indexOf","codeIX","splice","key","length","result","domEventName","keycode","toLowerCase","modifierName","modifierGetter","MODIFIER_KEY_GETTERS","ngJitMode","fetch","resolveComponentResources","catch","error","console","Promise","resolve","then","internalCreateApplication","config","platformProviders","INTERNAL_BROWSER_PLATFORM_PROVIDERS","makeCurrent","errorHandler","ErrorHandler","_document","provide","PLATFORM_INITIALIZER","useValue","initDomAdapter","multi","DOCUMENT","useFactory","InjectionToken","TESTABILITY_PROVIDERS"],"mappings":";;;;;;;;;;;AAqBqC,MAEnCA,iBAAkB,SAAAC,WAChB,CAAA;EAKAC,iBAAA,GAAA,IAAA;;;;;AAKAC,IAAAA,EAAA,CAAAC,gBAAA,CAAAC,GAAA,EAAAC,QAAA,EAAAC,OAAA,CAAA;IACF,OAAA,MAAA;AAC0BJ,MAAAA,EAAA,CAAAK,mBAAA,CAAAH,GAAA,EAAAC,QAAA,EAAAC,OAAA,CAAA;;;EAIxBE,aAAAA,CAAAN,EAAA,EAAAE,GAAA,EAAA;IAEFF,EAAA,CAAAM,aAAA,CAAAJ,GAAA,CAAA;;aAES,EAAA;AACT,IAAA,IAAA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;;;;;;;;;;;;;;;;;;;;;;ACgJb,EAAA,IAAA,CAAA,OAAAG,SAAA,KAAA,WAAA,IAAAA,SAAA,KAAA,OAAAC,KAAA,KAAA,UAAA,EAAA;AAEA,IAAA,OAAAC,0BAA4B,CAAAD,KAAA,EAC1BE,KAAA,CAAWC,KAAY,IAAA;AACzBC,MAAAA,OAAA,CAAAD,KAAA,CAAAA,KAAA,CAAA;MAEA,OAAAE,OAAA,CAAAC,OAAA,EAAA;OAGEC,IAAA,CAAA,MAAAC,0BAAA,CAAAC,MAAA,CAAe,CAAA;AACjB;AAEAD,EAAAA,OAAAA;;;;;;;;AA4BIE,IAAAA,iBAAA,EAAAC;AACD,GAAA;;;;;;AAuBD5F,EAAAA,iBAAU,CAAA6F,WAAA,EAAA;;AAEV,SAAAC,YAAA,GAAA;aACIC,YAAA,EAAA;;AAEL,SAAAC,SAAA,GAAA;;;;;;;CAeD,EAAA;AAAMC,EAAAA,OAAA,EAAAC,oBAAoB;AAAAC,EAAAA,QAAA,EAAAC,cAAA;EAAAC,KAAA,EAAA;AAAA,CACxB,EAAA;AAAAJ,EAAAA,OAAA,EAAAK,QAAA;AAAAC,EAAAA,UAAA,EAAAP;AAAA;;qCALQ,OAAAQ,cAAA,CAAA,OAAA7D,SAAA,KAAA,WAAA,IAAAA,SAAA,GAAA,gCAAA,GAAA,EAAA,CAAA;AAER,MAAA8D,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
+688
-724
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -11,334 +11,320 @@ * License: MIT | ||
| /** | ||
| * The plugin definition for the `EventManager` class | ||
| * | ||
| * It can be used as a base class to create custom manager plugins, i.e. you can create your own | ||
| * class that extends the `EventManagerPlugin` one. | ||
| * | ||
| * @see [Extend event handling](guide/templates/event-listeners#extend-event-handling) | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class EventManagerPlugin { | ||
| _doc; | ||
| // TODO: remove (has some usage in G3) | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| } | ||
| // Using non-null assertion because it's set by EventManager's constructor | ||
| manager; | ||
| _doc; | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| } | ||
| manager; | ||
| } | ||
| class DomEventsPlugin extends EventManagerPlugin { | ||
| constructor(doc) { | ||
| super(doc); | ||
| } | ||
| // This plugin should come last in the list of plugins, because it accepts all | ||
| // events. | ||
| supports(eventName) { | ||
| return true; | ||
| } | ||
| addEventListener(element, eventName, handler, options) { | ||
| element.addEventListener(eventName, handler, options); | ||
| return () => this.removeEventListener(element, eventName, handler, options); | ||
| } | ||
| removeEventListener(target, eventName, callback, options) { | ||
| return target.removeEventListener(eventName, callback, options); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomEventsPlugin }); | ||
| constructor(doc) { | ||
| super(doc); | ||
| } | ||
| supports(eventName) { | ||
| return true; | ||
| } | ||
| addEventListener(element, eventName, handler, options) { | ||
| element.addEventListener(eventName, handler, options); | ||
| return () => this.removeEventListener(element, eventName, handler, options); | ||
| } | ||
| removeEventListener(target, eventName, callback, options) { | ||
| return target.removeEventListener(eventName, callback, options); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomEventsPlugin, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomEventsPlugin | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomEventsPlugin, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomEventsPlugin, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| /** | ||
| * The injection token for plugins of the `EventManager` service. | ||
| * | ||
| * @see [Extend event handling](guide/templates/event-listeners#extend-event-handling) | ||
| * | ||
| * @publicApi | ||
| */ | ||
| const EVENT_MANAGER_PLUGINS = new InjectionToken(typeof ngDevMode !== undefined && ngDevMode ? 'EventManagerPlugins' : ''); | ||
| /** | ||
| * An injectable service that provides event management for Angular | ||
| * through a browser plug-in. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class EventManager { | ||
| _zone; | ||
| _plugins; | ||
| _eventNameToPlugin = new Map(); | ||
| /** | ||
| * Initializes an instance of the event-manager service. | ||
| */ | ||
| constructor(plugins, _zone) { | ||
| this._zone = _zone; | ||
| plugins.forEach((plugin) => { | ||
| plugin.manager = this; | ||
| }); | ||
| const otherPlugins = plugins.filter((p) => !(p instanceof DomEventsPlugin)); | ||
| this._plugins = otherPlugins.slice().reverse(); | ||
| // DomEventsPlugin.supports() always returns true, it should always be the last plugin. | ||
| const domEventPlugin = plugins.find((p) => p instanceof DomEventsPlugin); | ||
| if (domEventPlugin) { | ||
| this._plugins.push(domEventPlugin); | ||
| } | ||
| _zone; | ||
| _plugins; | ||
| _eventNameToPlugin = new Map(); | ||
| constructor(plugins, _zone) { | ||
| this._zone = _zone; | ||
| plugins.forEach(plugin => { | ||
| plugin.manager = this; | ||
| }); | ||
| const otherPlugins = plugins.filter(p => !(p instanceof DomEventsPlugin)); | ||
| this._plugins = otherPlugins.slice().reverse(); | ||
| const domEventPlugin = plugins.find(p => p instanceof DomEventsPlugin); | ||
| if (domEventPlugin) { | ||
| this._plugins.push(domEventPlugin); | ||
| } | ||
| /** | ||
| * Registers a handler for a specific element and event. | ||
| * | ||
| * @param element The HTML element to receive event notifications. | ||
| * @param eventName The name of the event to listen for. | ||
| * @param handler A function to call when the notification occurs. Receives the | ||
| * event object as an argument. | ||
| * @param options Options that configure how the event listener is bound. | ||
| * @returns A callback function that can be used to remove the handler. | ||
| */ | ||
| addEventListener(element, eventName, handler, options) { | ||
| const plugin = this._findPluginFor(eventName); | ||
| return plugin.addEventListener(element, eventName, handler, options); | ||
| } | ||
| addEventListener(element, eventName, handler, options) { | ||
| const plugin = this._findPluginFor(eventName); | ||
| return plugin.addEventListener(element, eventName, handler, options); | ||
| } | ||
| getZone() { | ||
| return this._zone; | ||
| } | ||
| _findPluginFor(eventName) { | ||
| let plugin = this._eventNameToPlugin.get(eventName); | ||
| if (plugin) { | ||
| return plugin; | ||
| } | ||
| /** | ||
| * Retrieves the compilation zone in which event listeners are registered. | ||
| */ | ||
| getZone() { | ||
| return this._zone; | ||
| const plugins = this._plugins; | ||
| plugin = plugins.find(plugin => plugin.supports(eventName)); | ||
| if (!plugin) { | ||
| throw new _RuntimeError(5101, (typeof ngDevMode === 'undefined' || ngDevMode) && `No event manager plugin found for event ${eventName}`); | ||
| } | ||
| /** @internal */ | ||
| _findPluginFor(eventName) { | ||
| let plugin = this._eventNameToPlugin.get(eventName); | ||
| if (plugin) { | ||
| return plugin; | ||
| } | ||
| const plugins = this._plugins; | ||
| plugin = plugins.find((plugin) => plugin.supports(eventName)); | ||
| if (!plugin) { | ||
| throw new _RuntimeError(5101 /* RuntimeErrorCode.NO_PLUGIN_FOR_EVENT */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| `No event manager plugin found for event ${eventName}`); | ||
| } | ||
| this._eventNameToPlugin.set(eventName, plugin); | ||
| return plugin; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: EventManager }); | ||
| this._eventNameToPlugin.set(eventName, plugin); | ||
| return plugin; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: EventManager, | ||
| deps: [{ | ||
| token: EVENT_MANAGER_PLUGINS | ||
| }, { | ||
| token: i0.NgZone | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: EventManager | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: EventManager, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [EVENT_MANAGER_PLUGINS] | ||
| }] }, { type: i0.NgZone }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: EventManager, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [EVENT_MANAGER_PLUGINS] | ||
| }] | ||
| }, { | ||
| type: i0.NgZone | ||
| }] | ||
| }); | ||
| /** The style elements attribute name used to set value of `APP_ID` token. */ | ||
| const APP_ID_ATTRIBUTE_NAME = 'ng-app-id'; | ||
| /** | ||
| * Removes all provided elements from the document. | ||
| * @param elements An array of HTML Elements. | ||
| */ | ||
| function removeElements(elements) { | ||
| for (const element of elements) { | ||
| element.remove(); | ||
| } | ||
| for (const element of elements) { | ||
| element.remove(); | ||
| } | ||
| } | ||
| /** | ||
| * Creates a `style` element with the provided inline style content. | ||
| * @param style A string of the inline style content. | ||
| * @param doc A DOM Document to use to create the element. | ||
| * @returns An HTMLStyleElement instance. | ||
| */ | ||
| function createStyleElement(style, doc) { | ||
| const styleElement = doc.createElement('style'); | ||
| styleElement.textContent = style; | ||
| return styleElement; | ||
| const styleElement = doc.createElement('style'); | ||
| styleElement.textContent = style; | ||
| return styleElement; | ||
| } | ||
| /** | ||
| * Searches a DOM document's head element for style elements with a matching application | ||
| * identifier attribute (`ng-app-id`) to the provide identifier and adds usage records for each. | ||
| * @param doc An HTML DOM document instance. | ||
| * @param appId A string containing an Angular application identifer. | ||
| * @param inline A Map object for tracking inline (defined via `styles` in component decorator) style usage. | ||
| * @param external A Map object for tracking external (defined via `styleUrls` in component decorator) style usage. | ||
| */ | ||
| function addServerStyles(doc, appId, inline, external) { | ||
| const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"],link[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`); | ||
| if (elements) { | ||
| for (const styleElement of elements) { | ||
| styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME); | ||
| if (styleElement instanceof HTMLLinkElement) { | ||
| // Only use filename from href | ||
| // The href is build time generated with a unique value to prevent duplicates. | ||
| external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), { | ||
| usage: 0, | ||
| elements: [styleElement], | ||
| }); | ||
| } | ||
| else if (styleElement.textContent) { | ||
| inline.set(styleElement.textContent, { usage: 0, elements: [styleElement] }); | ||
| } | ||
| } | ||
| const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${appId}"],link[${APP_ID_ATTRIBUTE_NAME}="${appId}"]`); | ||
| if (elements) { | ||
| for (const styleElement of elements) { | ||
| styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME); | ||
| if (styleElement instanceof HTMLLinkElement) { | ||
| external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), { | ||
| usage: 0, | ||
| elements: [styleElement] | ||
| }); | ||
| } else if (styleElement.textContent) { | ||
| inline.set(styleElement.textContent, { | ||
| usage: 0, | ||
| elements: [styleElement] | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| /** | ||
| * Creates a `link` element for the provided external style URL. | ||
| * @param url A string of the URL for the stylesheet. | ||
| * @param doc A DOM Document to use to create the element. | ||
| * @returns An HTMLLinkElement instance. | ||
| */ | ||
| function createLinkElement(url, doc) { | ||
| const linkElement = doc.createElement('link'); | ||
| linkElement.setAttribute('rel', 'stylesheet'); | ||
| linkElement.setAttribute('href', url); | ||
| return linkElement; | ||
| const linkElement = doc.createElement('link'); | ||
| linkElement.setAttribute('rel', 'stylesheet'); | ||
| linkElement.setAttribute('href', url); | ||
| return linkElement; | ||
| } | ||
| class SharedStylesHost { | ||
| doc; | ||
| appId; | ||
| nonce; | ||
| /** | ||
| * Provides usage information for active inline style content and associated HTML <style> elements. | ||
| * Embedded styles typically originate from the `styles` metadata of a rendered component. | ||
| */ | ||
| inline = new Map(); | ||
| /** | ||
| * Provides usage information for active external style URLs and the associated HTML <link> elements. | ||
| * External styles typically originate from the `ɵɵExternalStylesFeature` of a rendered component. | ||
| */ | ||
| external = new Map(); | ||
| /** | ||
| * Set of host DOM nodes that will have styles attached. | ||
| */ | ||
| hosts = new Set(); | ||
| constructor(doc, appId, nonce, | ||
| // Cannot remove it due to backward compatibility | ||
| // (it seems some TGP targets might be calling this constructor directly). | ||
| platformId = {}) { | ||
| this.doc = doc; | ||
| this.appId = appId; | ||
| this.nonce = nonce; | ||
| addServerStyles(doc, appId, this.inline, this.external); | ||
| this.hosts.add(doc.head); | ||
| doc; | ||
| appId; | ||
| nonce; | ||
| inline = new Map(); | ||
| external = new Map(); | ||
| hosts = new Set(); | ||
| constructor(doc, appId, nonce, platformId = {}) { | ||
| this.doc = doc; | ||
| this.appId = appId; | ||
| this.nonce = nonce; | ||
| addServerStyles(doc, appId, this.inline, this.external); | ||
| this.hosts.add(doc.head); | ||
| } | ||
| addStyles(styles, urls) { | ||
| for (const value of styles) { | ||
| this.addUsage(value, this.inline, createStyleElement); | ||
| } | ||
| /** | ||
| * Adds embedded styles to the DOM via HTML `style` elements. | ||
| * @param styles An array of style content strings. | ||
| */ | ||
| addStyles(styles, urls) { | ||
| for (const value of styles) { | ||
| this.addUsage(value, this.inline, createStyleElement); | ||
| } | ||
| urls?.forEach((value) => this.addUsage(value, this.external, createLinkElement)); | ||
| urls?.forEach(value => this.addUsage(value, this.external, createLinkElement)); | ||
| } | ||
| removeStyles(styles, urls) { | ||
| for (const value of styles) { | ||
| this.removeUsage(value, this.inline); | ||
| } | ||
| /** | ||
| * Removes embedded styles from the DOM that were added as HTML `style` elements. | ||
| * @param styles An array of style content strings. | ||
| */ | ||
| removeStyles(styles, urls) { | ||
| for (const value of styles) { | ||
| this.removeUsage(value, this.inline); | ||
| } | ||
| urls?.forEach((value) => this.removeUsage(value, this.external)); | ||
| urls?.forEach(value => this.removeUsage(value, this.external)); | ||
| } | ||
| addUsage(value, usages, creator) { | ||
| const record = usages.get(value); | ||
| if (record) { | ||
| if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) { | ||
| record.elements.forEach(element => element.setAttribute('ng-style-reused', '')); | ||
| } | ||
| record.usage++; | ||
| } else { | ||
| usages.set(value, { | ||
| usage: 1, | ||
| elements: [...this.hosts].map(host => this.addElement(host, creator(value, this.doc))) | ||
| }); | ||
| } | ||
| addUsage(value, usages, creator) { | ||
| // Attempt to get any current usage of the value | ||
| const record = usages.get(value); | ||
| // If existing, just increment the usage count | ||
| if (record) { | ||
| if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) { | ||
| // A usage count of zero indicates a preexisting server generated style. | ||
| // This attribute is solely used for debugging purposes of SSR style reuse. | ||
| record.elements.forEach((element) => element.setAttribute('ng-style-reused', '')); | ||
| } | ||
| record.usage++; | ||
| } | ||
| else { | ||
| // Otherwise, create an entry to track the elements and add element for each host | ||
| usages.set(value, { | ||
| usage: 1, | ||
| elements: [...this.hosts].map((host) => this.addElement(host, creator(value, this.doc))), | ||
| }); | ||
| } | ||
| } | ||
| removeUsage(value, usages) { | ||
| const record = usages.get(value); | ||
| if (record) { | ||
| record.usage--; | ||
| if (record.usage <= 0) { | ||
| removeElements(record.elements); | ||
| usages.delete(value); | ||
| } | ||
| } | ||
| removeUsage(value, usages) { | ||
| // Attempt to get any current usage of the value | ||
| const record = usages.get(value); | ||
| // If there is a record, reduce the usage count and if no longer used, | ||
| // remove from DOM and delete usage record. | ||
| if (record) { | ||
| record.usage--; | ||
| if (record.usage <= 0) { | ||
| removeElements(record.elements); | ||
| usages.delete(value); | ||
| } | ||
| } | ||
| } | ||
| ngOnDestroy() { | ||
| for (const [, { | ||
| elements | ||
| }] of [...this.inline, ...this.external]) { | ||
| removeElements(elements); | ||
| } | ||
| ngOnDestroy() { | ||
| for (const [, { elements }] of [...this.inline, ...this.external]) { | ||
| removeElements(elements); | ||
| } | ||
| this.hosts.clear(); | ||
| this.hosts.clear(); | ||
| } | ||
| addHost(hostNode) { | ||
| this.hosts.add(hostNode); | ||
| for (const [style, { | ||
| elements | ||
| }] of this.inline) { | ||
| elements.push(this.addElement(hostNode, createStyleElement(style, this.doc))); | ||
| } | ||
| /** | ||
| * Adds a host node to the set of style hosts and adds all existing style usage to | ||
| * the newly added host node. | ||
| * | ||
| * This is currently only used for Shadow DOM encapsulation mode. | ||
| */ | ||
| addHost(hostNode) { | ||
| this.hosts.add(hostNode); | ||
| // Add existing styles to new host | ||
| for (const [style, { elements }] of this.inline) { | ||
| elements.push(this.addElement(hostNode, createStyleElement(style, this.doc))); | ||
| } | ||
| for (const [url, { elements }] of this.external) { | ||
| elements.push(this.addElement(hostNode, createLinkElement(url, this.doc))); | ||
| } | ||
| for (const [url, { | ||
| elements | ||
| }] of this.external) { | ||
| elements.push(this.addElement(hostNode, createLinkElement(url, this.doc))); | ||
| } | ||
| removeHost(hostNode) { | ||
| this.hosts.delete(hostNode); | ||
| } | ||
| removeHost(hostNode) { | ||
| this.hosts.delete(hostNode); | ||
| } | ||
| addElement(host, element) { | ||
| if (this.nonce) { | ||
| element.setAttribute('nonce', this.nonce); | ||
| } | ||
| addElement(host, element) { | ||
| // Add a nonce if present | ||
| if (this.nonce) { | ||
| element.setAttribute('nonce', this.nonce); | ||
| } | ||
| // Add application identifier when on the server to support client-side reuse | ||
| if (typeof ngServerMode !== 'undefined' && ngServerMode) { | ||
| element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId); | ||
| } | ||
| // Insert the element into the DOM with the host node as parent | ||
| return host.appendChild(element); | ||
| if (typeof ngServerMode !== 'undefined' && ngServerMode) { | ||
| element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: SharedStylesHost }); | ||
| return host.appendChild(element); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: SharedStylesHost, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }, { | ||
| token: APP_ID | ||
| }, { | ||
| token: CSP_NONCE, | ||
| optional: true | ||
| }, { | ||
| token: PLATFORM_ID | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: SharedStylesHost | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: SharedStylesHost, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: Document, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [APP_ID] | ||
| }] }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [CSP_NONCE] | ||
| }, { | ||
| type: Optional | ||
| }] }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [PLATFORM_ID] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: SharedStylesHost, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: Document, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [APP_ID] | ||
| }] | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [CSP_NONCE] | ||
| }, { | ||
| type: Optional | ||
| }] | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [PLATFORM_ID] | ||
| }] | ||
| }] | ||
| }); | ||
| const NAMESPACE_URIS = { | ||
| 'svg': 'http://www.w3.org/2000/svg', | ||
| 'xhtml': 'http://www.w3.org/1999/xhtml', | ||
| 'xlink': 'http://www.w3.org/1999/xlink', | ||
| 'xml': 'http://www.w3.org/XML/1998/namespace', | ||
| 'xmlns': 'http://www.w3.org/2000/xmlns/', | ||
| 'math': 'http://www.w3.org/1998/Math/MathML', | ||
| 'svg': 'http://www.w3.org/2000/svg', | ||
| 'xhtml': 'http://www.w3.org/1999/xhtml', | ||
| 'xlink': 'http://www.w3.org/1999/xlink', | ||
| 'xml': 'http://www.w3.org/XML/1998/namespace', | ||
| 'xmlns': 'http://www.w3.org/2000/xmlns/', | ||
| 'math': 'http://www.w3.org/1998/Math/MathML' | ||
| }; | ||
@@ -351,481 +337,459 @@ const COMPONENT_REGEX = /%COMP%/g; | ||
| const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`; | ||
| /** | ||
| * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token. | ||
| */ | ||
| const REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true; | ||
| /** | ||
| * A DI token that indicates whether styles | ||
| * of destroyed components should be removed from DOM. | ||
| * | ||
| * By default, the value is set to `true`. | ||
| * @publicApi | ||
| */ | ||
| const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(typeof ngDevMode !== undefined && ngDevMode ? 'RemoveStylesOnCompDestroy' : '', { | ||
| providedIn: 'root', | ||
| factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT, | ||
| providedIn: 'root', | ||
| factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT | ||
| }); | ||
| function shimContentAttribute(componentShortId) { | ||
| return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId); | ||
| return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId); | ||
| } | ||
| function shimHostAttribute(componentShortId) { | ||
| return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId); | ||
| return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId); | ||
| } | ||
| function shimStylesContent(compId, styles) { | ||
| return styles.map((s) => s.replace(COMPONENT_REGEX, compId)); | ||
| return styles.map(s => s.replace(COMPONENT_REGEX, compId)); | ||
| } | ||
| /** | ||
| * Prepends a baseHref to the `sourceMappingURL` within the provided CSS content. | ||
| * If the `sourceMappingURL` contains an inline (encoded) map, the function skips processing. | ||
| * | ||
| * @note For inline stylesheets, the `sourceMappingURL` is relative to the page's origin | ||
| * and not the provided baseHref. This function is needed as when accessing the page with a URL | ||
| * containing two or more segments. | ||
| * For example, if the baseHref is set to `/`, and you visit a URL like `http://localhost/foo/bar`, | ||
| * the map would be requested from `http://localhost/foo/bar/comp.css.map` instead of what you'd expect, | ||
| * which is `http://localhost/comp.css.map`. This behavior is corrected by modifying the `sourceMappingURL` | ||
| * to ensure external source maps are loaded relative to the baseHref. | ||
| * | ||
| * @param baseHref - The base URL to prepend to the `sourceMappingURL`. | ||
| * @param styles - An array of CSS content strings, each potentially containing a `sourceMappingURL`. | ||
| * @returns The updated array of CSS content strings with modified `sourceMappingURL` values, | ||
| * or the original content if no modification is needed. | ||
| */ | ||
| function addBaseHrefToCssSourceMap(baseHref, styles) { | ||
| if (!baseHref) { | ||
| return styles; | ||
| if (!baseHref) { | ||
| return styles; | ||
| } | ||
| const absoluteBaseHrefUrl = new URL(baseHref, 'http://localhost'); | ||
| return styles.map(cssContent => { | ||
| if (!cssContent.includes('sourceMappingURL=')) { | ||
| return cssContent; | ||
| } | ||
| const absoluteBaseHrefUrl = new URL(baseHref, 'http://localhost'); | ||
| return styles.map((cssContent) => { | ||
| if (!cssContent.includes('sourceMappingURL=')) { | ||
| return cssContent; | ||
| } | ||
| return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => { | ||
| if (sourceMapUrl[0] === '/' || | ||
| sourceMapUrl.startsWith('data:') || | ||
| PROTOCOL_REGEXP.test(sourceMapUrl)) { | ||
| return `/*# sourceMappingURL=${sourceMapUrl} */`; | ||
| } | ||
| const { pathname: resolvedSourceMapUrl } = new URL(sourceMapUrl, absoluteBaseHrefUrl); | ||
| return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`; | ||
| }); | ||
| return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => { | ||
| if (sourceMapUrl[0] === '/' || sourceMapUrl.startsWith('data:') || PROTOCOL_REGEXP.test(sourceMapUrl)) { | ||
| return `/*# sourceMappingURL=${sourceMapUrl} */`; | ||
| } | ||
| const { | ||
| pathname: resolvedSourceMapUrl | ||
| } = new URL(sourceMapUrl, absoluteBaseHrefUrl); | ||
| return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`; | ||
| }); | ||
| }); | ||
| } | ||
| class DomRendererFactory2 { | ||
| eventManager; | ||
| sharedStylesHost; | ||
| appId; | ||
| removeStylesOnCompDestroy; | ||
| doc; | ||
| platformId; | ||
| ngZone; | ||
| nonce; | ||
| tracingService; | ||
| rendererByCompId = new Map(); | ||
| defaultRenderer; | ||
| platformIsServer; | ||
| constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, platformId, ngZone, nonce = null, tracingService = null) { | ||
| this.eventManager = eventManager; | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.appId = appId; | ||
| this.removeStylesOnCompDestroy = removeStylesOnCompDestroy; | ||
| this.doc = doc; | ||
| this.platformId = platformId; | ||
| this.ngZone = ngZone; | ||
| this.nonce = nonce; | ||
| this.tracingService = tracingService; | ||
| this.platformIsServer = typeof ngServerMode !== 'undefined' && ngServerMode; | ||
| this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.platformIsServer, this.tracingService); | ||
| eventManager; | ||
| sharedStylesHost; | ||
| appId; | ||
| removeStylesOnCompDestroy; | ||
| doc; | ||
| platformId; | ||
| ngZone; | ||
| nonce; | ||
| tracingService; | ||
| rendererByCompId = new Map(); | ||
| defaultRenderer; | ||
| platformIsServer; | ||
| constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, platformId, ngZone, nonce = null, tracingService = null) { | ||
| this.eventManager = eventManager; | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.appId = appId; | ||
| this.removeStylesOnCompDestroy = removeStylesOnCompDestroy; | ||
| this.doc = doc; | ||
| this.platformId = platformId; | ||
| this.ngZone = ngZone; | ||
| this.nonce = nonce; | ||
| this.tracingService = tracingService; | ||
| this.platformIsServer = typeof ngServerMode !== 'undefined' && ngServerMode; | ||
| this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.platformIsServer, this.tracingService); | ||
| } | ||
| createRenderer(element, type) { | ||
| if (!element || !type) { | ||
| return this.defaultRenderer; | ||
| } | ||
| createRenderer(element, type) { | ||
| if (!element || !type) { | ||
| return this.defaultRenderer; | ||
| } | ||
| if (typeof ngServerMode !== 'undefined' && | ||
| ngServerMode && | ||
| (type.encapsulation === ViewEncapsulation.ShadowDom || | ||
| type.encapsulation === ViewEncapsulation.IsolatedShadowDom)) { | ||
| // Domino does not support shadow DOM. | ||
| type = { ...type, encapsulation: ViewEncapsulation.Emulated }; | ||
| } | ||
| const renderer = this.getOrCreateRenderer(element, type); | ||
| // Renderers have different logic due to different encapsulation behaviours. | ||
| // Ex: for emulated, an attribute is added to the element. | ||
| if (renderer instanceof EmulatedEncapsulationDomRenderer2) { | ||
| renderer.applyToHost(element); | ||
| } | ||
| else if (renderer instanceof NoneEncapsulationDomRenderer) { | ||
| renderer.applyStyles(); | ||
| } | ||
| return renderer; | ||
| if (typeof ngServerMode !== 'undefined' && ngServerMode && (type.encapsulation === ViewEncapsulation.ShadowDom || type.encapsulation === ViewEncapsulation.IsolatedShadowDom)) { | ||
| type = { | ||
| ...type, | ||
| encapsulation: ViewEncapsulation.Emulated | ||
| }; | ||
| } | ||
| getOrCreateRenderer(element, type) { | ||
| const rendererByCompId = this.rendererByCompId; | ||
| let renderer = rendererByCompId.get(type.id); | ||
| if (!renderer) { | ||
| const doc = this.doc; | ||
| const ngZone = this.ngZone; | ||
| const eventManager = this.eventManager; | ||
| const sharedStylesHost = this.sharedStylesHost; | ||
| const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy; | ||
| const platformIsServer = this.platformIsServer; | ||
| const tracingService = this.tracingService; | ||
| switch (type.encapsulation) { | ||
| case ViewEncapsulation.Emulated: | ||
| renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService); | ||
| break; | ||
| case ViewEncapsulation.ShadowDom: | ||
| return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, platformIsServer, tracingService, sharedStylesHost); | ||
| case ViewEncapsulation.IsolatedShadowDom: | ||
| return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, platformIsServer, tracingService); | ||
| default: | ||
| renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService); | ||
| break; | ||
| } | ||
| rendererByCompId.set(type.id, renderer); | ||
| } | ||
| return renderer; | ||
| const renderer = this.getOrCreateRenderer(element, type); | ||
| if (renderer instanceof EmulatedEncapsulationDomRenderer2) { | ||
| renderer.applyToHost(element); | ||
| } else if (renderer instanceof NoneEncapsulationDomRenderer) { | ||
| renderer.applyStyles(); | ||
| } | ||
| ngOnDestroy() { | ||
| this.rendererByCompId.clear(); | ||
| return renderer; | ||
| } | ||
| getOrCreateRenderer(element, type) { | ||
| const rendererByCompId = this.rendererByCompId; | ||
| let renderer = rendererByCompId.get(type.id); | ||
| if (!renderer) { | ||
| const doc = this.doc; | ||
| const ngZone = this.ngZone; | ||
| const eventManager = this.eventManager; | ||
| const sharedStylesHost = this.sharedStylesHost; | ||
| const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy; | ||
| const platformIsServer = this.platformIsServer; | ||
| const tracingService = this.tracingService; | ||
| switch (type.encapsulation) { | ||
| case ViewEncapsulation.Emulated: | ||
| renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService); | ||
| break; | ||
| case ViewEncapsulation.ShadowDom: | ||
| return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, platformIsServer, tracingService, sharedStylesHost); | ||
| case ViewEncapsulation.IsolatedShadowDom: | ||
| return new ShadowDomRenderer(eventManager, element, type, doc, ngZone, this.nonce, platformIsServer, tracingService); | ||
| default: | ||
| renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService); | ||
| break; | ||
| } | ||
| rendererByCompId.set(type.id, renderer); | ||
| } | ||
| /** | ||
| * Used during HMR to clear any cached data about a component. | ||
| * @param componentId ID of the component that is being replaced. | ||
| */ | ||
| componentReplaced(componentId) { | ||
| this.rendererByCompId.delete(componentId); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }, { token: _TracingService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomRendererFactory2 }); | ||
| return renderer; | ||
| } | ||
| ngOnDestroy() { | ||
| this.rendererByCompId.clear(); | ||
| } | ||
| componentReplaced(componentId) { | ||
| this.rendererByCompId.delete(componentId); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomRendererFactory2, | ||
| deps: [{ | ||
| token: EventManager | ||
| }, { | ||
| token: SharedStylesHost | ||
| }, { | ||
| token: APP_ID | ||
| }, { | ||
| token: REMOVE_STYLES_ON_COMPONENT_DESTROY | ||
| }, { | ||
| token: DOCUMENT | ||
| }, { | ||
| token: PLATFORM_ID | ||
| }, { | ||
| token: i0.NgZone | ||
| }, { | ||
| token: CSP_NONCE | ||
| }, { | ||
| token: _TracingService, | ||
| optional: true | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomRendererFactory2 | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomRendererFactory2, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: EventManager }, { type: SharedStylesHost }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [APP_ID] | ||
| }] }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [REMOVE_STYLES_ON_COMPONENT_DESTROY] | ||
| }] }, { type: Document, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }, { type: Object, decorators: [{ | ||
| type: Inject, | ||
| args: [PLATFORM_ID] | ||
| }] }, { type: i0.NgZone }, { type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [CSP_NONCE] | ||
| }] }, { type: i0.ɵTracingService, decorators: [{ | ||
| type: Inject, | ||
| args: [_TracingService] | ||
| }, { | ||
| type: Optional | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomRendererFactory2, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: EventManager | ||
| }, { | ||
| type: SharedStylesHost | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [APP_ID] | ||
| }] | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [REMOVE_STYLES_ON_COMPONENT_DESTROY] | ||
| }] | ||
| }, { | ||
| type: Document, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }, { | ||
| type: Object, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [PLATFORM_ID] | ||
| }] | ||
| }, { | ||
| type: i0.NgZone | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [CSP_NONCE] | ||
| }] | ||
| }, { | ||
| type: i0.ɵTracingService, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [_TracingService] | ||
| }, { | ||
| type: Optional | ||
| }] | ||
| }] | ||
| }); | ||
| class DefaultDomRenderer2 { | ||
| eventManager; | ||
| doc; | ||
| ngZone; | ||
| platformIsServer; | ||
| tracingService; | ||
| data = Object.create(null); | ||
| /** | ||
| * By default this renderer throws when encountering synthetic properties | ||
| * This can be disabled for example by the AsyncAnimationRendererFactory | ||
| */ | ||
| throwOnSyntheticProps = true; | ||
| constructor(eventManager, doc, ngZone, platformIsServer, tracingService) { | ||
| this.eventManager = eventManager; | ||
| this.doc = doc; | ||
| this.ngZone = ngZone; | ||
| this.platformIsServer = platformIsServer; | ||
| this.tracingService = tracingService; | ||
| eventManager; | ||
| doc; | ||
| ngZone; | ||
| platformIsServer; | ||
| tracingService; | ||
| data = Object.create(null); | ||
| throwOnSyntheticProps = true; | ||
| constructor(eventManager, doc, ngZone, platformIsServer, tracingService) { | ||
| this.eventManager = eventManager; | ||
| this.doc = doc; | ||
| this.ngZone = ngZone; | ||
| this.platformIsServer = platformIsServer; | ||
| this.tracingService = tracingService; | ||
| } | ||
| destroy() {} | ||
| destroyNode = null; | ||
| createElement(name, namespace) { | ||
| if (namespace) { | ||
| return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name); | ||
| } | ||
| destroy() { } | ||
| destroyNode = null; | ||
| createElement(name, namespace) { | ||
| if (namespace) { | ||
| // TODO: `|| namespace` was added in | ||
| // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to | ||
| // support how Ivy passed around the namespace URI rather than short name at the time. It did | ||
| // not, however extend the support to other parts of the system (setAttribute, setAttribute, | ||
| // and the ServerRenderer). We should decide what exactly the semantics for dealing with | ||
| // namespaces should be and make it consistent. | ||
| // Related issues: | ||
| // https://github.com/angular/angular/issues/44028 | ||
| // https://github.com/angular/angular/issues/44883 | ||
| return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name); | ||
| } | ||
| return this.doc.createElement(name); | ||
| return this.doc.createElement(name); | ||
| } | ||
| createComment(value) { | ||
| return this.doc.createComment(value); | ||
| } | ||
| createText(value) { | ||
| return this.doc.createTextNode(value); | ||
| } | ||
| appendChild(parent, newChild) { | ||
| const targetParent = isTemplateNode(parent) ? parent.content : parent; | ||
| targetParent.appendChild(newChild); | ||
| } | ||
| insertBefore(parent, newChild, refChild) { | ||
| if (parent) { | ||
| const targetParent = isTemplateNode(parent) ? parent.content : parent; | ||
| targetParent.insertBefore(newChild, refChild); | ||
| } | ||
| createComment(value) { | ||
| return this.doc.createComment(value); | ||
| } | ||
| removeChild(_parent, oldChild) { | ||
| oldChild.remove(); | ||
| } | ||
| selectRootElement(selectorOrNode, preserveContent) { | ||
| let el = typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode; | ||
| if (!el) { | ||
| throw new _RuntimeError(-5104, (typeof ngDevMode === 'undefined' || ngDevMode) && `The selector "${selectorOrNode}" did not match any elements`); | ||
| } | ||
| createText(value) { | ||
| return this.doc.createTextNode(value); | ||
| if (!preserveContent) { | ||
| el.textContent = ''; | ||
| } | ||
| appendChild(parent, newChild) { | ||
| const targetParent = isTemplateNode(parent) ? parent.content : parent; | ||
| targetParent.appendChild(newChild); | ||
| return el; | ||
| } | ||
| parentNode(node) { | ||
| return node.parentNode; | ||
| } | ||
| nextSibling(node) { | ||
| return node.nextSibling; | ||
| } | ||
| setAttribute(el, name, value, namespace) { | ||
| if (namespace) { | ||
| name = namespace + ':' + name; | ||
| const namespaceUri = NAMESPACE_URIS[namespace]; | ||
| if (namespaceUri) { | ||
| el.setAttributeNS(namespaceUri, name, value); | ||
| } else { | ||
| el.setAttribute(name, value); | ||
| } | ||
| } else { | ||
| el.setAttribute(name, value); | ||
| } | ||
| insertBefore(parent, newChild, refChild) { | ||
| if (parent) { | ||
| const targetParent = isTemplateNode(parent) ? parent.content : parent; | ||
| targetParent.insertBefore(newChild, refChild); | ||
| } | ||
| } | ||
| removeAttribute(el, name, namespace) { | ||
| if (namespace) { | ||
| const namespaceUri = NAMESPACE_URIS[namespace]; | ||
| if (namespaceUri) { | ||
| el.removeAttributeNS(namespaceUri, name); | ||
| } else { | ||
| el.removeAttribute(`${namespace}:${name}`); | ||
| } | ||
| } else { | ||
| el.removeAttribute(name); | ||
| } | ||
| removeChild(_parent, oldChild) { | ||
| // child was removed | ||
| oldChild.remove(); | ||
| } | ||
| addClass(el, name) { | ||
| el.classList.add(name); | ||
| } | ||
| removeClass(el, name) { | ||
| el.classList.remove(name); | ||
| } | ||
| setStyle(el, style, value, flags) { | ||
| if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) { | ||
| el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : ''); | ||
| } else { | ||
| el.style[style] = value; | ||
| } | ||
| selectRootElement(selectorOrNode, preserveContent) { | ||
| let el = typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode; | ||
| if (!el) { | ||
| throw new _RuntimeError(-5104 /* RuntimeErrorCode.ROOT_NODE_NOT_FOUND */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| `The selector "${selectorOrNode}" did not match any elements`); | ||
| } | ||
| if (!preserveContent) { | ||
| el.textContent = ''; | ||
| } | ||
| return el; | ||
| } | ||
| removeStyle(el, style, flags) { | ||
| if (flags & RendererStyleFlags2.DashCase) { | ||
| el.style.removeProperty(style); | ||
| } else { | ||
| el.style[style] = ''; | ||
| } | ||
| parentNode(node) { | ||
| return node.parentNode; | ||
| } | ||
| setProperty(el, name, value) { | ||
| if (el == null) { | ||
| return; | ||
| } | ||
| nextSibling(node) { | ||
| return node.nextSibling; | ||
| (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(name, 'property'); | ||
| el[name] = value; | ||
| } | ||
| setValue(node, value) { | ||
| node.nodeValue = value; | ||
| } | ||
| listen(target, event, callback, options) { | ||
| (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps && checkNoSyntheticProp(event, 'listener'); | ||
| if (typeof target === 'string') { | ||
| target = _getDOM().getGlobalEventTarget(this.doc, target); | ||
| if (!target) { | ||
| throw new _RuntimeError(5102, (typeof ngDevMode === 'undefined' || ngDevMode) && `Unsupported event target ${target} for event ${event}`); | ||
| } | ||
| } | ||
| setAttribute(el, name, value, namespace) { | ||
| if (namespace) { | ||
| name = namespace + ':' + name; | ||
| const namespaceUri = NAMESPACE_URIS[namespace]; | ||
| if (namespaceUri) { | ||
| el.setAttributeNS(namespaceUri, name, value); | ||
| } | ||
| else { | ||
| el.setAttribute(name, value); | ||
| } | ||
| } | ||
| else { | ||
| el.setAttribute(name, value); | ||
| } | ||
| let wrappedCallback = this.decoratePreventDefault(callback); | ||
| if (this.tracingService?.wrapEventListener) { | ||
| wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback); | ||
| } | ||
| removeAttribute(el, name, namespace) { | ||
| if (namespace) { | ||
| const namespaceUri = NAMESPACE_URIS[namespace]; | ||
| if (namespaceUri) { | ||
| el.removeAttributeNS(namespaceUri, name); | ||
| } | ||
| else { | ||
| el.removeAttribute(`${namespace}:${name}`); | ||
| } | ||
| } | ||
| else { | ||
| el.removeAttribute(name); | ||
| } | ||
| } | ||
| addClass(el, name) { | ||
| el.classList.add(name); | ||
| } | ||
| removeClass(el, name) { | ||
| el.classList.remove(name); | ||
| } | ||
| setStyle(el, style, value, flags) { | ||
| if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) { | ||
| el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : ''); | ||
| } | ||
| else { | ||
| el.style[style] = value; | ||
| } | ||
| } | ||
| removeStyle(el, style, flags) { | ||
| if (flags & RendererStyleFlags2.DashCase) { | ||
| // removeProperty has no effect when used on camelCased properties. | ||
| el.style.removeProperty(style); | ||
| } | ||
| else { | ||
| el.style[style] = ''; | ||
| } | ||
| } | ||
| setProperty(el, name, value) { | ||
| if (el == null) { | ||
| return; | ||
| } | ||
| (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| this.throwOnSyntheticProps && | ||
| checkNoSyntheticProp(name, 'property'); | ||
| el[name] = value; | ||
| } | ||
| setValue(node, value) { | ||
| node.nodeValue = value; | ||
| } | ||
| listen(target, event, callback, options) { | ||
| (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| this.throwOnSyntheticProps && | ||
| checkNoSyntheticProp(event, 'listener'); | ||
| if (typeof target === 'string') { | ||
| target = _getDOM().getGlobalEventTarget(this.doc, target); | ||
| if (!target) { | ||
| throw new _RuntimeError(5102 /* RuntimeErrorCode.UNSUPPORTED_EVENT_TARGET */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| `Unsupported event target ${target} for event ${event}`); | ||
| } | ||
| } | ||
| let wrappedCallback = this.decoratePreventDefault(callback); | ||
| if (this.tracingService?.wrapEventListener) { | ||
| wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback); | ||
| } | ||
| return this.eventManager.addEventListener(target, event, wrappedCallback, options); | ||
| } | ||
| decoratePreventDefault(eventHandler) { | ||
| // `DebugNode.triggerEventHandler` needs to know if the listener was created with | ||
| // decoratePreventDefault or is a listener added outside the Angular context so it can handle | ||
| // the two differently. In the first case, the special '__ngUnwrap__' token is passed to the | ||
| // unwrap the listener (see below). | ||
| return (event) => { | ||
| // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function | ||
| // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The | ||
| // debug_node can inspect the listener toString contents for the existence of this special | ||
| // token. Because the token is a string literal, it is ensured to not be modified by compiled | ||
| // code. | ||
| if (event === '__ngUnwrap__') { | ||
| return eventHandler; | ||
| } | ||
| // Run the event handler inside the ngZone because event handlers are not patched | ||
| // by Zone on the server. This is required only for tests. | ||
| const allowDefaultBehavior = typeof ngServerMode !== 'undefined' && ngServerMode | ||
| ? this.ngZone.runGuarded(() => eventHandler(event)) | ||
| : eventHandler(event); | ||
| if (allowDefaultBehavior === false) { | ||
| event.preventDefault(); | ||
| } | ||
| return undefined; | ||
| }; | ||
| } | ||
| return this.eventManager.addEventListener(target, event, wrappedCallback, options); | ||
| } | ||
| decoratePreventDefault(eventHandler) { | ||
| return event => { | ||
| if (event === '__ngUnwrap__') { | ||
| return eventHandler; | ||
| } | ||
| const allowDefaultBehavior = typeof ngServerMode !== 'undefined' && ngServerMode ? this.ngZone.runGuarded(() => eventHandler(event)) : eventHandler(event); | ||
| if (allowDefaultBehavior === false) { | ||
| event.preventDefault(); | ||
| } | ||
| return undefined; | ||
| }; | ||
| } | ||
| } | ||
| const AT_CHARCODE = (() => '@'.charCodeAt(0))(); | ||
| function checkNoSyntheticProp(name, nameKind) { | ||
| if (name.charCodeAt(0) === AT_CHARCODE) { | ||
| throw new _RuntimeError(5105 /* RuntimeErrorCode.UNEXPECTED_SYNTHETIC_PROPERTY */, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that: | ||
| if (name.charCodeAt(0) === AT_CHARCODE) { | ||
| throw new _RuntimeError(5105, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that: | ||
| - Make sure \`provideAnimationsAsync()\`, \`provideAnimations()\` or \`provideNoopAnimations()\` call was added to a list of providers used to bootstrap an application. | ||
| - There is a corresponding animation configuration named \`${name}\` defined in the \`animations\` field of the \`@Component\` decorator (see https://angular.dev/api/core/Component#animations).`); | ||
| } | ||
| } | ||
| } | ||
| function isTemplateNode(node) { | ||
| return node.tagName === 'TEMPLATE' && node.content !== undefined; | ||
| return node.tagName === 'TEMPLATE' && node.content !== undefined; | ||
| } | ||
| class ShadowDomRenderer extends DefaultDomRenderer2 { | ||
| hostEl; | ||
| sharedStylesHost; | ||
| shadowRoot; | ||
| constructor(eventManager, hostEl, component, doc, ngZone, nonce, platformIsServer, tracingService, sharedStylesHost) { | ||
| super(eventManager, doc, ngZone, platformIsServer, tracingService); | ||
| this.hostEl = hostEl; | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.shadowRoot = hostEl.attachShadow({ mode: 'open' }); | ||
| // SharedStylesHost is used to add styles to the shadow root by ShadowDom. | ||
| // This is optional as it is not used by IsolatedShadowDom. | ||
| if (this.sharedStylesHost) { | ||
| this.sharedStylesHost.addHost(this.shadowRoot); | ||
| } | ||
| let styles = component.styles; | ||
| if (ngDevMode) { | ||
| // We only do this in development, as for production users should not add CSS sourcemaps to components. | ||
| const baseHref = _getDOM().getBaseHref(doc) ?? ''; | ||
| styles = addBaseHrefToCssSourceMap(baseHref, styles); | ||
| } | ||
| styles = shimStylesContent(component.id, styles); | ||
| for (const style of styles) { | ||
| const styleEl = document.createElement('style'); | ||
| if (nonce) { | ||
| styleEl.setAttribute('nonce', nonce); | ||
| } | ||
| styleEl.textContent = style; | ||
| this.shadowRoot.appendChild(styleEl); | ||
| } | ||
| // Apply any external component styles to the shadow root for the component's element. | ||
| // The ShadowDOM renderer uses an alternative execution path for component styles that | ||
| // does not use the SharedStylesHost that other encapsulation modes leverage. Much like | ||
| // the manual addition of embedded styles directly above, any external stylesheets | ||
| // must be manually added here to ensure ShadowDOM components are correctly styled. | ||
| // TODO: Consider reworking the DOM Renderers to consolidate style handling. | ||
| const styleUrls = component.getExternalStyles?.(); | ||
| if (styleUrls) { | ||
| for (const styleUrl of styleUrls) { | ||
| const linkEl = createLinkElement(styleUrl, doc); | ||
| if (nonce) { | ||
| linkEl.setAttribute('nonce', nonce); | ||
| } | ||
| this.shadowRoot.appendChild(linkEl); | ||
| } | ||
| } | ||
| hostEl; | ||
| sharedStylesHost; | ||
| shadowRoot; | ||
| constructor(eventManager, hostEl, component, doc, ngZone, nonce, platformIsServer, tracingService, sharedStylesHost) { | ||
| super(eventManager, doc, ngZone, platformIsServer, tracingService); | ||
| this.hostEl = hostEl; | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.shadowRoot = hostEl.attachShadow({ | ||
| mode: 'open' | ||
| }); | ||
| if (this.sharedStylesHost) { | ||
| this.sharedStylesHost.addHost(this.shadowRoot); | ||
| } | ||
| nodeOrShadowRoot(node) { | ||
| return node === this.hostEl ? this.shadowRoot : node; | ||
| let styles = component.styles; | ||
| if (ngDevMode) { | ||
| const baseHref = _getDOM().getBaseHref(doc) ?? ''; | ||
| styles = addBaseHrefToCssSourceMap(baseHref, styles); | ||
| } | ||
| appendChild(parent, newChild) { | ||
| return super.appendChild(this.nodeOrShadowRoot(parent), newChild); | ||
| styles = shimStylesContent(component.id, styles); | ||
| for (const style of styles) { | ||
| const styleEl = document.createElement('style'); | ||
| if (nonce) { | ||
| styleEl.setAttribute('nonce', nonce); | ||
| } | ||
| styleEl.textContent = style; | ||
| this.shadowRoot.appendChild(styleEl); | ||
| } | ||
| insertBefore(parent, newChild, refChild) { | ||
| return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild); | ||
| const styleUrls = component.getExternalStyles?.(); | ||
| if (styleUrls) { | ||
| for (const styleUrl of styleUrls) { | ||
| const linkEl = createLinkElement(styleUrl, doc); | ||
| if (nonce) { | ||
| linkEl.setAttribute('nonce', nonce); | ||
| } | ||
| this.shadowRoot.appendChild(linkEl); | ||
| } | ||
| } | ||
| removeChild(_parent, oldChild) { | ||
| return super.removeChild(null, oldChild); | ||
| } | ||
| nodeOrShadowRoot(node) { | ||
| return node === this.hostEl ? this.shadowRoot : node; | ||
| } | ||
| appendChild(parent, newChild) { | ||
| return super.appendChild(this.nodeOrShadowRoot(parent), newChild); | ||
| } | ||
| insertBefore(parent, newChild, refChild) { | ||
| return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild); | ||
| } | ||
| removeChild(_parent, oldChild) { | ||
| return super.removeChild(null, oldChild); | ||
| } | ||
| parentNode(node) { | ||
| return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node))); | ||
| } | ||
| destroy() { | ||
| if (this.sharedStylesHost) { | ||
| this.sharedStylesHost.removeHost(this.shadowRoot); | ||
| } | ||
| parentNode(node) { | ||
| return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node))); | ||
| } | ||
| destroy() { | ||
| if (this.sharedStylesHost) { | ||
| this.sharedStylesHost.removeHost(this.shadowRoot); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| class NoneEncapsulationDomRenderer extends DefaultDomRenderer2 { | ||
| sharedStylesHost; | ||
| removeStylesOnCompDestroy; | ||
| styles; | ||
| styleUrls; | ||
| constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId) { | ||
| super(eventManager, doc, ngZone, platformIsServer, tracingService); | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.removeStylesOnCompDestroy = removeStylesOnCompDestroy; | ||
| let styles = component.styles; | ||
| if (ngDevMode) { | ||
| // We only do this in development, as for production users should not add CSS sourcemaps to components. | ||
| const baseHref = _getDOM().getBaseHref(doc) ?? ''; | ||
| styles = addBaseHrefToCssSourceMap(baseHref, styles); | ||
| } | ||
| this.styles = compId ? shimStylesContent(compId, styles) : styles; | ||
| this.styleUrls = component.getExternalStyles?.(compId); | ||
| sharedStylesHost; | ||
| removeStylesOnCompDestroy; | ||
| styles; | ||
| styleUrls; | ||
| constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId) { | ||
| super(eventManager, doc, ngZone, platformIsServer, tracingService); | ||
| this.sharedStylesHost = sharedStylesHost; | ||
| this.removeStylesOnCompDestroy = removeStylesOnCompDestroy; | ||
| let styles = component.styles; | ||
| if (ngDevMode) { | ||
| const baseHref = _getDOM().getBaseHref(doc) ?? ''; | ||
| styles = addBaseHrefToCssSourceMap(baseHref, styles); | ||
| } | ||
| applyStyles() { | ||
| this.sharedStylesHost.addStyles(this.styles, this.styleUrls); | ||
| this.styles = compId ? shimStylesContent(compId, styles) : styles; | ||
| this.styleUrls = component.getExternalStyles?.(compId); | ||
| } | ||
| applyStyles() { | ||
| this.sharedStylesHost.addStyles(this.styles, this.styleUrls); | ||
| } | ||
| destroy() { | ||
| if (!this.removeStylesOnCompDestroy) { | ||
| return; | ||
| } | ||
| destroy() { | ||
| if (!this.removeStylesOnCompDestroy) { | ||
| return; | ||
| } | ||
| if (_allLeavingAnimations.size === 0) { | ||
| this.sharedStylesHost.removeStyles(this.styles, this.styleUrls); | ||
| } | ||
| if (_allLeavingAnimations.size === 0) { | ||
| this.sharedStylesHost.removeStyles(this.styles, this.styleUrls); | ||
| } | ||
| } | ||
| } | ||
| class EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer { | ||
| contentAttr; | ||
| hostAttr; | ||
| constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService) { | ||
| const compId = appId + '-' + component.id; | ||
| super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId); | ||
| this.contentAttr = shimContentAttribute(compId); | ||
| this.hostAttr = shimHostAttribute(compId); | ||
| } | ||
| applyToHost(element) { | ||
| this.applyStyles(); | ||
| this.setAttribute(element, this.hostAttr, ''); | ||
| } | ||
| createElement(parent, name) { | ||
| const el = super.createElement(parent, name); | ||
| super.setAttribute(el, this.contentAttr, ''); | ||
| return el; | ||
| } | ||
| contentAttr; | ||
| hostAttr; | ||
| constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService) { | ||
| const compId = appId + '-' + component.id; | ||
| super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, tracingService, compId); | ||
| this.contentAttr = shimContentAttribute(compId); | ||
| this.hostAttr = shimHostAttribute(compId); | ||
| } | ||
| applyToHost(element) { | ||
| this.applyStyles(); | ||
| this.setAttribute(element, this.hostAttr, ''); | ||
| } | ||
| createElement(parent, name) { | ||
| const el = super.createElement(parent, name); | ||
| super.setAttribute(el, this.contentAttr, ''); | ||
| return el; | ||
| } | ||
| } | ||
@@ -832,0 +796,0 @@ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"_dom_renderer-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/event_manager_plugin.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/dom_events.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/event_manager.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/shared_styles_host.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/dom_renderer.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type {ListenerOptions} from '@angular/core';\nimport type {EventManager} from './event_manager';\n\n/**\n * The plugin definition for the `EventManager` class\n *\n * It can be used as a base class to create custom manager plugins, i.e. you can create your own\n * class that extends the `EventManagerPlugin` one.\n *\n * @see [Extend event handling](guide/templates/event-listeners#extend-event-handling)\n *\n * @publicApi\n */\nexport abstract class EventManagerPlugin {\n // TODO: remove (has some usage in G3)\n constructor(private _doc: any) {}\n\n // Using non-null assertion because it's set by EventManager's constructor\n manager!: EventManager;\n\n /**\n * Should return `true` for every event name that should be supported by this plugin\n */\n abstract supports(eventName: string): boolean;\n\n /**\n * Implement the behaviour for the supported events\n */\n abstract addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n@Injectable()\nexport class DomEventsPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n override supports(eventName: string): boolean {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n element.addEventListener(eventName, handler as EventListener, options);\n return () => this.removeEventListener(element, eventName, handler as EventListener, options);\n }\n\n removeEventListener(\n target: any,\n eventName: string,\n callback: Function,\n options?: ListenerOptions,\n ): void {\n return target.removeEventListener(eventName, callback as EventListener, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../../errors';\n\nimport type {EventManagerPlugin} from './event_manager_plugin';\n\nimport {DomEventsPlugin} from './dom_events';\n\n/**\n * The injection token for plugins of the `EventManager` service.\n *\n * @see [Extend event handling](guide/templates/event-listeners#extend-event-handling)\n *\n * @publicApi\n */\nexport const EVENT_MANAGER_PLUGINS = new InjectionToken<EventManagerPlugin[]>(\n typeof ngDevMode !== undefined && ngDevMode ? 'EventManagerPlugins' : '',\n);\n\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\n@Injectable()\nexport class EventManager {\n private _plugins: EventManagerPlugin[];\n private _eventNameToPlugin = new Map<string, EventManagerPlugin>();\n\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(\n @Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[],\n private _zone: NgZone,\n ) {\n plugins.forEach((plugin) => {\n plugin.manager = this;\n });\n\n const otherPlugins = plugins.filter((p) => !(p instanceof DomEventsPlugin));\n this._plugins = otherPlugins.slice().reverse();\n\n // DomEventsPlugin.supports() always returns true, it should always be the last plugin.\n const domEventPlugin = plugins.find((p) => p instanceof DomEventsPlugin);\n if (domEventPlugin) {\n this._plugins.push(domEventPlugin);\n }\n }\n\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @param options Options that configure how the event listener is bound.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler, options);\n }\n\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone(): NgZone {\n return this._zone;\n }\n\n /** @internal */\n _findPluginFor(eventName: string): EventManagerPlugin {\n let plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n\n const plugins = this._plugins;\n plugin = plugins.find((plugin) => plugin.supports(eventName));\n if (!plugin) {\n throw new RuntimeError(\n RuntimeErrorCode.NO_PLUGIN_FOR_EVENT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `No event manager plugin found for event ${eventName}`,\n );\n }\n\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n PLATFORM_ID,\n} from '@angular/core';\n\n/** The style elements attribute name used to set value of `APP_ID` token. */\nconst APP_ID_ATTRIBUTE_NAME = 'ng-app-id';\n\n/**\n * A record of usage for a specific style including all elements added to the DOM\n * that contain a given style.\n */\ninterface UsageRecord<T> {\n elements: T[];\n usage: number;\n}\n\n/**\n * Removes all provided elements from the document.\n * @param elements An array of HTML Elements.\n */\nfunction removeElements(elements: Iterable<HTMLElement>): void {\n for (const element of elements) {\n element.remove();\n }\n}\n\n/**\n * Creates a `style` element with the provided inline style content.\n * @param style A string of the inline style content.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLStyleElement instance.\n */\nfunction createStyleElement(style: string, doc: Document): HTMLStyleElement {\n const styleElement = doc.createElement('style');\n styleElement.textContent = style;\n\n return styleElement;\n}\n\n/**\n * Searches a DOM document's head element for style elements with a matching application\n * identifier attribute (`ng-app-id`) to the provide identifier and adds usage records for each.\n * @param doc An HTML DOM document instance.\n * @param appId A string containing an Angular application identifer.\n * @param inline A Map object for tracking inline (defined via `styles` in component decorator) style usage.\n * @param external A Map object for tracking external (defined via `styleUrls` in component decorator) style usage.\n */\nfunction addServerStyles(\n doc: Document,\n appId: string,\n inline: Map<string, UsageRecord<HTMLStyleElement>>,\n external: Map<string, UsageRecord<HTMLLinkElement>>,\n): void {\n const elements = doc.head?.querySelectorAll<HTMLStyleElement | HTMLLinkElement>(\n `style[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"],link[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"]`,\n );\n\n if (elements) {\n for (const styleElement of elements) {\n styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME);\n if (styleElement instanceof HTMLLinkElement) {\n // Only use filename from href\n // The href is build time generated with a unique value to prevent duplicates.\n external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), {\n usage: 0,\n elements: [styleElement],\n });\n } else if (styleElement.textContent) {\n inline.set(styleElement.textContent, {usage: 0, elements: [styleElement]});\n }\n }\n }\n}\n\n/**\n * Creates a `link` element for the provided external style URL.\n * @param url A string of the URL for the stylesheet.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLLinkElement instance.\n */\nexport function createLinkElement(url: string, doc: Document): HTMLLinkElement {\n const linkElement = doc.createElement('link');\n linkElement.setAttribute('rel', 'stylesheet');\n linkElement.setAttribute('href', url);\n\n return linkElement;\n}\n\n@Injectable()\nexport class SharedStylesHost implements OnDestroy {\n /**\n * Provides usage information for active inline style content and associated HTML <style> elements.\n * Embedded styles typically originate from the `styles` metadata of a rendered component.\n */\n private readonly inline = new Map<string /** content */, UsageRecord<HTMLStyleElement>>();\n\n /**\n * Provides usage information for active external style URLs and the associated HTML <link> elements.\n * External styles typically originate from the `ɵɵExternalStylesFeature` of a rendered component.\n */\n private readonly external = new Map<string /** URL */, UsageRecord<HTMLLinkElement>>();\n\n /**\n * Set of host DOM nodes that will have styles attached.\n */\n private readonly hosts = new Set<Node>();\n\n constructor(\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(CSP_NONCE) @Optional() private readonly nonce?: string | null,\n // Cannot remove it due to backward compatibility\n // (it seems some TGP targets might be calling this constructor directly).\n @Inject(PLATFORM_ID) platformId: object = {},\n ) {\n addServerStyles(doc, appId, this.inline, this.external);\n this.hosts.add(doc.head);\n }\n\n /**\n * Adds embedded styles to the DOM via HTML `style` elements.\n * @param styles An array of style content strings.\n */\n addStyles(styles: string[], urls?: string[]): void {\n for (const value of styles) {\n this.addUsage(value, this.inline, createStyleElement);\n }\n\n urls?.forEach((value) => this.addUsage(value, this.external, createLinkElement));\n }\n\n /**\n * Removes embedded styles from the DOM that were added as HTML `style` elements.\n * @param styles An array of style content strings.\n */\n removeStyles(styles: string[], urls?: string[]): void {\n for (const value of styles) {\n this.removeUsage(value, this.inline);\n }\n\n urls?.forEach((value) => this.removeUsage(value, this.external));\n }\n\n protected addUsage<T extends HTMLElement>(\n value: string,\n usages: Map<string, UsageRecord<T>>,\n creator: (value: string, doc: Document) => T,\n ): void {\n // Attempt to get any current usage of the value\n const record = usages.get(value);\n\n // If existing, just increment the usage count\n if (record) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) {\n // A usage count of zero indicates a preexisting server generated style.\n // This attribute is solely used for debugging purposes of SSR style reuse.\n record.elements.forEach((element) => element.setAttribute('ng-style-reused', ''));\n }\n record.usage++;\n } else {\n // Otherwise, create an entry to track the elements and add element for each host\n usages.set(value, {\n usage: 1,\n elements: [...this.hosts].map((host) => this.addElement(host, creator(value, this.doc))),\n });\n }\n }\n\n protected removeUsage<T extends HTMLElement>(\n value: string,\n usages: Map<string, UsageRecord<T>>,\n ): void {\n // Attempt to get any current usage of the value\n const record = usages.get(value);\n\n // If there is a record, reduce the usage count and if no longer used,\n // remove from DOM and delete usage record.\n if (record) {\n record.usage--;\n if (record.usage <= 0) {\n removeElements(record.elements);\n usages.delete(value);\n }\n }\n }\n\n ngOnDestroy(): void {\n for (const [, {elements}] of [...this.inline, ...this.external]) {\n removeElements(elements);\n }\n this.hosts.clear();\n }\n\n /**\n * Adds a host node to the set of style hosts and adds all existing style usage to\n * the newly added host node.\n *\n * This is currently only used for Shadow DOM encapsulation mode.\n */\n addHost(hostNode: Node): void {\n this.hosts.add(hostNode);\n\n // Add existing styles to new host\n for (const [style, {elements}] of this.inline) {\n elements.push(this.addElement(hostNode, createStyleElement(style, this.doc)));\n }\n for (const [url, {elements}] of this.external) {\n elements.push(this.addElement(hostNode, createLinkElement(url, this.doc)));\n }\n }\n\n removeHost(hostNode: Node): void {\n this.hosts.delete(hostNode);\n }\n\n private addElement<T extends HTMLElement>(host: Node, element: T): T {\n // Add a nonce if present\n if (this.nonce) {\n element.setAttribute('nonce', this.nonce);\n }\n\n // Add application identifier when on the server to support client-side reuse\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);\n }\n\n // Insert the element into the DOM with the host node as parent\n return host.appendChild(element);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ViewEncapsulation,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n ɵTracingService as TracingService,\n ɵTracingSnapshot as TracingSnapshot,\n Optional,\n ɵallLeavingAnimations as allLeavingAnimations,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {EventManager} from './events/event_manager';\nimport {createLinkElement, SharedStylesHost} from './shared_styles_host';\n\nexport const NAMESPACE_URIS: {[ns: string]: string} = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/Math/MathML',\n};\n\nconst COMPONENT_REGEX = /%COMP%/g;\nconst SOURCEMAP_URL_REGEXP = /\\/\\*#\\s*sourceMappingURL=(.+?)\\s*\\*\\//;\nconst PROTOCOL_REGEXP = /^https?:/;\n\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;\n\n/**\n * A DI token that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `true`.\n * @publicApi\n */\nexport const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken<boolean>(\n typeof ngDevMode !== undefined && ngDevMode ? 'RemoveStylesOnCompDestroy' : '',\n {\n providedIn: 'root',\n factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n },\n);\n\nexport function shimContentAttribute(componentShortId: string): string {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimHostAttribute(componentShortId: string): string {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimStylesContent(compId: string, styles: string[]): string[] {\n return styles.map((s) => s.replace(COMPONENT_REGEX, compId));\n}\n\n/**\n * Prepends a baseHref to the `sourceMappingURL` within the provided CSS content.\n * If the `sourceMappingURL` contains an inline (encoded) map, the function skips processing.\n *\n * @note For inline stylesheets, the `sourceMappingURL` is relative to the page's origin\n * and not the provided baseHref. This function is needed as when accessing the page with a URL\n * containing two or more segments.\n * For example, if the baseHref is set to `/`, and you visit a URL like `http://localhost/foo/bar`,\n * the map would be requested from `http://localhost/foo/bar/comp.css.map` instead of what you'd expect,\n * which is `http://localhost/comp.css.map`. This behavior is corrected by modifying the `sourceMappingURL`\n * to ensure external source maps are loaded relative to the baseHref.\n *\n\n * @param baseHref - The base URL to prepend to the `sourceMappingURL`.\n * @param styles - An array of CSS content strings, each potentially containing a `sourceMappingURL`.\n * @returns The updated array of CSS content strings with modified `sourceMappingURL` values,\n * or the original content if no modification is needed.\n */\nexport function addBaseHrefToCssSourceMap(baseHref: string, styles: string[]): string[] {\n if (!baseHref) {\n return styles;\n }\n\n const absoluteBaseHrefUrl = new URL(baseHref, 'http://localhost');\n\n return styles.map((cssContent) => {\n if (!cssContent.includes('sourceMappingURL=')) {\n return cssContent;\n }\n\n return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => {\n if (\n sourceMapUrl[0] === '/' ||\n sourceMapUrl.startsWith('data:') ||\n PROTOCOL_REGEXP.test(sourceMapUrl)\n ) {\n return `/*# sourceMappingURL=${sourceMapUrl} */`;\n }\n\n const {pathname: resolvedSourceMapUrl} = new URL(sourceMapUrl, absoluteBaseHrefUrl);\n\n return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`;\n });\n });\n}\n\n@Injectable()\nexport class DomRendererFactory2 implements RendererFactory2, OnDestroy {\n private readonly rendererByCompId = new Map<\n string,\n EmulatedEncapsulationDomRenderer2 | NoneEncapsulationDomRenderer\n >();\n private readonly defaultRenderer: Renderer2;\n private readonly platformIsServer: boolean;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(REMOVE_STYLES_ON_COMPONENT_DESTROY) private removeStylesOnCompDestroy: boolean,\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(PLATFORM_ID) readonly platformId: Object,\n readonly ngZone: NgZone,\n @Inject(CSP_NONCE) private readonly nonce: string | null = null,\n @Inject(TracingService)\n @Optional()\n private readonly tracingService: TracingService<TracingSnapshot> | null = null,\n ) {\n this.platformIsServer = typeof ngServerMode !== 'undefined' && ngServerMode;\n this.defaultRenderer = new DefaultDomRenderer2(\n eventManager,\n doc,\n ngZone,\n this.platformIsServer,\n this.tracingService,\n );\n }\n\n createRenderer(element: any, type: RendererType2 | null): Renderer2 {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n\n if (\n typeof ngServerMode !== 'undefined' &&\n ngServerMode &&\n (type.encapsulation === ViewEncapsulation.ShadowDom ||\n type.encapsulation === ViewEncapsulation.IsolatedShadowDom)\n ) {\n // Domino does not support shadow DOM.\n type = {...type, encapsulation: ViewEncapsulation.Emulated};\n }\n\n const renderer = this.getOrCreateRenderer(element, type);\n // Renderers have different logic due to different encapsulation behaviours.\n // Ex: for emulated, an attribute is added to the element.\n if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n renderer.applyToHost(element);\n } else if (renderer instanceof NoneEncapsulationDomRenderer) {\n renderer.applyStyles();\n }\n\n return renderer;\n }\n\n private getOrCreateRenderer(element: any, type: RendererType2): Renderer2 {\n const rendererByCompId = this.rendererByCompId;\n let renderer = rendererByCompId.get(type.id);\n\n if (!renderer) {\n const doc = this.doc;\n const ngZone = this.ngZone;\n const eventManager = this.eventManager;\n const sharedStylesHost = this.sharedStylesHost;\n const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;\n const platformIsServer = this.platformIsServer;\n const tracingService = this.tracingService;\n\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n renderer = new EmulatedEncapsulationDomRenderer2(\n eventManager,\n sharedStylesHost,\n type,\n this.appId,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n );\n break;\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(\n eventManager,\n element,\n type,\n doc,\n ngZone,\n this.nonce,\n platformIsServer,\n tracingService,\n sharedStylesHost,\n );\n case ViewEncapsulation.IsolatedShadowDom:\n return new ShadowDomRenderer(\n eventManager,\n element,\n type,\n doc,\n ngZone,\n this.nonce,\n platformIsServer,\n tracingService,\n );\n\n default:\n renderer = new NoneEncapsulationDomRenderer(\n eventManager,\n sharedStylesHost,\n type,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n );\n break;\n }\n\n rendererByCompId.set(type.id, renderer);\n }\n\n return renderer;\n }\n\n ngOnDestroy() {\n this.rendererByCompId.clear();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n this.rendererByCompId.delete(componentId);\n }\n}\n\nclass DefaultDomRenderer2 implements Renderer2 {\n data: {[key: string]: any} = Object.create(null);\n\n /**\n * By default this renderer throws when encountering synthetic properties\n * This can be disabled for example by the AsyncAnimationRendererFactory\n */\n throwOnSyntheticProps = true;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly doc: Document,\n protected readonly ngZone: NgZone,\n private readonly platformIsServer: boolean,\n private readonly tracingService: TracingService<TracingSnapshot> | null,\n ) {}\n\n destroy(): void {}\n\n destroyNode = null;\n\n createElement(name: string, namespace?: string): any {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n\n return this.doc.createElement(name);\n }\n\n createComment(value: string): any {\n return this.doc.createComment(value);\n }\n\n createText(value: string): any {\n return this.doc.createTextNode(value);\n }\n\n appendChild(parent: any, newChild: any): void {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any): void {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n\n removeChild(_parent: any, oldChild: any): void {\n // child was removed\n oldChild.remove();\n }\n\n selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any {\n let el: any =\n typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode;\n if (!el) {\n throw new RuntimeError(\n RuntimeErrorCode.ROOT_NODE_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The selector \"${selectorOrNode}\" did not match any elements`,\n );\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n\n parentNode(node: any): any {\n return node.parentNode;\n }\n\n nextSibling(node: any): any {\n return node.nextSibling;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n } else {\n el.setAttribute(name, value);\n }\n } else {\n el.setAttribute(name, value);\n }\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n } else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n } else {\n el.removeAttribute(name);\n }\n }\n\n addClass(el: any, name: string): void {\n el.classList.add(name);\n }\n\n removeClass(el: any, name: string): void {\n el.classList.remove(name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n } else {\n el.style[style] = value;\n }\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n if (flags & RendererStyleFlags2.DashCase) {\n // removeProperty has no effect when used on camelCased properties.\n el.style.removeProperty(style);\n } else {\n el.style[style] = '';\n }\n }\n\n setProperty(el: any, name: string, value: any): void {\n if (el == null) {\n return;\n }\n\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n\n setValue(node: any, value: string): void {\n node.nodeValue = value;\n }\n\n listen(\n target: 'window' | 'document' | 'body' | any,\n event: string,\n callback: (event: any) => boolean,\n options?: ListenerOptions,\n ): () => void {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n target = getDOM().getGlobalEventTarget(this.doc, target);\n if (!target) {\n throw new RuntimeError(\n RuntimeErrorCode.UNSUPPORTED_EVENT_TARGET,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unsupported event target ${target} for event ${event}`,\n );\n }\n }\n\n let wrappedCallback = this.decoratePreventDefault(callback);\n\n if (this.tracingService?.wrapEventListener) {\n wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback);\n }\n\n return this.eventManager.addEventListener(\n target,\n event,\n wrappedCallback,\n options,\n ) as VoidFunction;\n }\n\n private decoratePreventDefault(eventHandler: Function): Function {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle\n // the two differently. In the first case, the special '__ngUnwrap__' token is passed to the\n // unwrap the listener (see below).\n return (event: any) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The\n // debug_node can inspect the listener toString contents for the existence of this special\n // token. Because the token is a string literal, it is ensured to not be modified by compiled\n // code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n\n // Run the event handler inside the ngZone because event handlers are not patched\n // by Zone on the server. This is required only for tests.\n const allowDefaultBehavior =\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? this.ngZone.runGuarded(() => eventHandler(event))\n : eventHandler(event);\n if (allowDefaultBehavior === false) {\n event.preventDefault();\n }\n\n return undefined;\n };\n }\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\n\nfunction checkNoSyntheticProp(name: string, nameKind: string) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_SYNTHETIC_PROPERTY,\n `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Make sure \\`provideAnimationsAsync()\\`, \\`provideAnimations()\\` or \\`provideNoopAnimations()\\` call was added to a list of providers used to bootstrap an application.\n - There is a corresponding animation configuration named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.dev/api/core/Component#animations).`,\n );\n }\n}\n\nfunction isTemplateNode(node: any): node is HTMLTemplateElement {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n private shadowRoot: any;\n\n constructor(\n eventManager: EventManager,\n private hostEl: any,\n component: RendererType2,\n doc: Document,\n ngZone: NgZone,\n nonce: string | null,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n private sharedStylesHost?: SharedStylesHost,\n ) {\n super(eventManager, doc, ngZone, platformIsServer, tracingService);\n this.shadowRoot = (hostEl as any).attachShadow({mode: 'open'});\n\n // SharedStylesHost is used to add styles to the shadow root by ShadowDom.\n // This is optional as it is not used by IsolatedShadowDom.\n if (this.sharedStylesHost) {\n this.sharedStylesHost.addHost(this.shadowRoot);\n }\n let styles = component.styles;\n if (ngDevMode) {\n // We only do this in development, as for production users should not add CSS sourcemaps to components.\n const baseHref = getDOM().getBaseHref(doc) ?? '';\n styles = addBaseHrefToCssSourceMap(baseHref, styles);\n }\n\n styles = shimStylesContent(component.id, styles);\n\n for (const style of styles) {\n const styleEl = document.createElement('style');\n\n if (nonce) {\n styleEl.setAttribute('nonce', nonce);\n }\n\n styleEl.textContent = style;\n this.shadowRoot.appendChild(styleEl);\n }\n\n // Apply any external component styles to the shadow root for the component's element.\n // The ShadowDOM renderer uses an alternative execution path for component styles that\n // does not use the SharedStylesHost that other encapsulation modes leverage. Much like\n // the manual addition of embedded styles directly above, any external stylesheets\n // must be manually added here to ensure ShadowDOM components are correctly styled.\n // TODO: Consider reworking the DOM Renderers to consolidate style handling.\n const styleUrls = component.getExternalStyles?.();\n if (styleUrls) {\n for (const styleUrl of styleUrls) {\n const linkEl = createLinkElement(styleUrl, doc);\n if (nonce) {\n linkEl.setAttribute('nonce', nonce);\n }\n this.shadowRoot.appendChild(linkEl);\n }\n }\n }\n\n private nodeOrShadowRoot(node: any): any {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n\n override appendChild(parent: any, newChild: any): void {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n\n override insertBefore(parent: any, newChild: any, refChild: any): void {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n\n override removeChild(_parent: any, oldChild: any): void {\n return super.removeChild(null, oldChild);\n }\n\n override parentNode(node: any): any {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n\n override destroy() {\n if (this.sharedStylesHost) {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n }\n}\n\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n private readonly styles: string[];\n private readonly styleUrls?: string[];\n\n constructor(\n eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n private removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n compId?: string,\n ) {\n super(eventManager, doc, ngZone, platformIsServer, tracingService);\n let styles = component.styles;\n if (ngDevMode) {\n // We only do this in development, as for production users should not add CSS sourcemaps to components.\n const baseHref = getDOM().getBaseHref(doc) ?? '';\n styles = addBaseHrefToCssSourceMap(baseHref, styles);\n }\n\n this.styles = compId ? shimStylesContent(compId, styles) : styles;\n this.styleUrls = component.getExternalStyles?.(compId);\n }\n\n applyStyles(): void {\n this.sharedStylesHost.addStyles(this.styles, this.styleUrls);\n }\n\n override destroy(): void {\n if (!this.removeStylesOnCompDestroy) {\n return;\n }\n if (allLeavingAnimations.size === 0) {\n this.sharedStylesHost.removeStyles(this.styles, this.styleUrls);\n }\n }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n private contentAttr: string;\n private hostAttr: string;\n\n constructor(\n eventManager: EventManager,\n sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n appId: string,\n removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n ) {\n const compId = appId + '-' + component.id;\n super(\n eventManager,\n sharedStylesHost,\n component,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n compId,\n );\n this.contentAttr = shimContentAttribute(compId);\n this.hostAttr = shimHostAttribute(compId);\n }\n\n applyToHost(element: any): void {\n this.applyStyles();\n this.setAttribute(element, this.hostAttr, '');\n }\n\n override createElement(parent: any, name: string): Element {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n}\n"],"names":["RuntimeError","i1.EventManager","i2.SharedStylesHost","TracingService","getDOM","allLeavingAnimations"],"mappings":";;;;;;;;;;AAWA;;;;;;;;;AASG;MACmB,kBAAkB,CAAA;AAElB,IAAA,IAAA;;AAApB,IAAA,WAAA,CAAoB,IAAS,EAAA;QAAT,IAAI,CAAA,IAAA,GAAJ,IAAI;;;AAGxB,IAAA,OAAO;AAgBR;;AC7BK,MAAO,eAAgB,SAAQ,kBAAkB,CAAA;AACrD,IAAA,WAAA,CAA8B,GAAQ,EAAA;QACpC,KAAK,CAAC,GAAG,CAAC;;;;AAKH,IAAA,QAAQ,CAAC,SAAiB,EAAA;AACjC,QAAA,OAAO,IAAI;;AAGJ,IAAA,gBAAgB,CACvB,OAAoB,EACpB,SAAiB,EACjB,OAAiB,EACjB,OAAyB,EAAA;QAEzB,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAwB,EAAE,OAAO,CAAC;AACtE,QAAA,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAwB,EAAE,OAAO,CAAC;;AAG9F,IAAA,mBAAmB,CACjB,MAAW,EACX,SAAiB,EACjB,QAAkB,EAClB,OAAyB,EAAA;QAEzB,OAAO,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAyB,EAAE,OAAO,CAAC;;AA3BvE,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAA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M,EAAE,IAAI,CAAC,SAAS,CAAC;;;AAGpE;AAED,MAAM,iCAAkC,SAAQ,4BAA4B,CAAA;AAClE,IAAA,WAAW;AACX,IAAA,QAAQ;AAEhB,IAAA,WAAA,CACE,YAA0B,EAC1B,gBAAkC,EAClC,SAAwB,EACxB,KAAa,EACb,yBAAkC,EAClC,GAAa,EACb,MAAc,EACd,gBAAyB,EACzB,cAAsD,EAAA;QAEtD,MAAM,MAAM,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,CAAC,EAAE;AACzC,QAAA,KAAK,CACH,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,yBAAyB,EACzB,GAAG,EACH,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,MAAM,CACP;AACD,QAAA,IAAI,CAAC,WAAW,GAAG,oBAAoB,CAAC,MAAM,CAAC;AAC/C,QAAA,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC;;AAG3C,IAAA,WAAW,CAAC,OAAY,EAAA;QACtB,IAAI,CAAC,WAAW,EAAE;QAClB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC;;IAGtC,aAAa,CAAC,MAAW,EAAE,IAAY,EAAA;QAC9C,MAAM,EAAE,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC;QAC5C,KAAK,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;AAC5C,QAAA,OAAO,EAAE;;AAEZ;;;;"} | ||
| {"version":3,"file":"_dom_renderer-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/dom_events.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/event_manager.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/shared_styles_host.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/dom_renderer.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, type ListenerOptions} from '@angular/core';\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n@Injectable()\nexport class DomEventsPlugin extends EventManagerPlugin {\n constructor(@Inject(DOCUMENT) doc: any) {\n super(doc);\n }\n\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n override supports(eventName: string): boolean {\n return true;\n }\n\n override addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n element.addEventListener(eventName, handler as EventListener, options);\n return () => this.removeEventListener(element, eventName, handler as EventListener, options);\n }\n\n removeEventListener(\n target: any,\n eventName: string,\n callback: Function,\n options?: ListenerOptions,\n ): void {\n return target.removeEventListener(eventName, callback as EventListener, options);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../../errors';\n\nimport type {EventManagerPlugin} from './event_manager_plugin';\n\nimport {DomEventsPlugin} from './dom_events';\n\n/**\n * The injection token for plugins of the `EventManager` service.\n *\n * @see [Extend event handling](guide/templates/event-listeners#extend-event-handling)\n *\n * @publicApi\n */\nexport const EVENT_MANAGER_PLUGINS = new InjectionToken<EventManagerPlugin[]>(\n typeof ngDevMode !== undefined && ngDevMode ? 'EventManagerPlugins' : '',\n);\n\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\n@Injectable()\nexport class EventManager {\n private _plugins: EventManagerPlugin[];\n private _eventNameToPlugin = new Map<string, EventManagerPlugin>();\n\n /**\n * Initializes an instance of the event-manager service.\n */\n constructor(\n @Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[],\n private _zone: NgZone,\n ) {\n plugins.forEach((plugin) => {\n plugin.manager = this;\n });\n\n const otherPlugins = plugins.filter((p) => !(p instanceof DomEventsPlugin));\n this._plugins = otherPlugins.slice().reverse();\n\n // DomEventsPlugin.supports() always returns true, it should always be the last plugin.\n const domEventPlugin = plugins.find((p) => p instanceof DomEventsPlugin);\n if (domEventPlugin) {\n this._plugins.push(domEventPlugin);\n }\n }\n\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @param options Options that configure how the event listener is bound.\n * @returns A callback function that can be used to remove the handler.\n */\n addEventListener(\n element: HTMLElement,\n eventName: string,\n handler: Function,\n options?: ListenerOptions,\n ): Function {\n const plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler, options);\n }\n\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n getZone(): NgZone {\n return this._zone;\n }\n\n /** @internal */\n _findPluginFor(eventName: string): EventManagerPlugin {\n let plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n\n const plugins = this._plugins;\n plugin = plugins.find((plugin) => plugin.supports(eventName));\n if (!plugin) {\n throw new RuntimeError(\n RuntimeErrorCode.NO_PLUGIN_FOR_EVENT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `No event manager plugin found for event ${eventName}`,\n );\n }\n\n this._eventNameToPlugin.set(eventName, plugin);\n return plugin;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n PLATFORM_ID,\n} from '@angular/core';\n\n/** The style elements attribute name used to set value of `APP_ID` token. */\nconst APP_ID_ATTRIBUTE_NAME = 'ng-app-id';\n\n/**\n * A record of usage for a specific style including all elements added to the DOM\n * that contain a given style.\n */\ninterface UsageRecord<T> {\n elements: T[];\n usage: number;\n}\n\n/**\n * Removes all provided elements from the document.\n * @param elements An array of HTML Elements.\n */\nfunction removeElements(elements: Iterable<HTMLElement>): void {\n for (const element of elements) {\n element.remove();\n }\n}\n\n/**\n * Creates a `style` element with the provided inline style content.\n * @param style A string of the inline style content.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLStyleElement instance.\n */\nfunction createStyleElement(style: string, doc: Document): HTMLStyleElement {\n const styleElement = doc.createElement('style');\n styleElement.textContent = style;\n\n return styleElement;\n}\n\n/**\n * Searches a DOM document's head element for style elements with a matching application\n * identifier attribute (`ng-app-id`) to the provide identifier and adds usage records for each.\n * @param doc An HTML DOM document instance.\n * @param appId A string containing an Angular application identifer.\n * @param inline A Map object for tracking inline (defined via `styles` in component decorator) style usage.\n * @param external A Map object for tracking external (defined via `styleUrls` in component decorator) style usage.\n */\nfunction addServerStyles(\n doc: Document,\n appId: string,\n inline: Map<string, UsageRecord<HTMLStyleElement>>,\n external: Map<string, UsageRecord<HTMLLinkElement>>,\n): void {\n const elements = doc.head?.querySelectorAll<HTMLStyleElement | HTMLLinkElement>(\n `style[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"],link[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"]`,\n );\n\n if (elements) {\n for (const styleElement of elements) {\n styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME);\n if (styleElement instanceof HTMLLinkElement) {\n // Only use filename from href\n // The href is build time generated with a unique value to prevent duplicates.\n external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), {\n usage: 0,\n elements: [styleElement],\n });\n } else if (styleElement.textContent) {\n inline.set(styleElement.textContent, {usage: 0, elements: [styleElement]});\n }\n }\n }\n}\n\n/**\n * Creates a `link` element for the provided external style URL.\n * @param url A string of the URL for the stylesheet.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLLinkElement instance.\n */\nexport function createLinkElement(url: string, doc: Document): HTMLLinkElement {\n const linkElement = doc.createElement('link');\n linkElement.setAttribute('rel', 'stylesheet');\n linkElement.setAttribute('href', url);\n\n return linkElement;\n}\n\n@Injectable()\nexport class SharedStylesHost implements OnDestroy {\n /**\n * Provides usage information for active inline style content and associated HTML <style> elements.\n * Embedded styles typically originate from the `styles` metadata of a rendered component.\n */\n private readonly inline = new Map<string /** content */, UsageRecord<HTMLStyleElement>>();\n\n /**\n * Provides usage information for active external style URLs and the associated HTML <link> elements.\n * External styles typically originate from the `ɵɵExternalStylesFeature` of a rendered component.\n */\n private readonly external = new Map<string /** URL */, UsageRecord<HTMLLinkElement>>();\n\n /**\n * Set of host DOM nodes that will have styles attached.\n */\n private readonly hosts = new Set<Node>();\n\n constructor(\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(CSP_NONCE) @Optional() private readonly nonce?: string | null,\n // Cannot remove it due to backward compatibility\n // (it seems some TGP targets might be calling this constructor directly).\n @Inject(PLATFORM_ID) platformId: object = {},\n ) {\n addServerStyles(doc, appId, this.inline, this.external);\n this.hosts.add(doc.head);\n }\n\n /**\n * Adds embedded styles to the DOM via HTML `style` elements.\n * @param styles An array of style content strings.\n */\n addStyles(styles: string[], urls?: string[]): void {\n for (const value of styles) {\n this.addUsage(value, this.inline, createStyleElement);\n }\n\n urls?.forEach((value) => this.addUsage(value, this.external, createLinkElement));\n }\n\n /**\n * Removes embedded styles from the DOM that were added as HTML `style` elements.\n * @param styles An array of style content strings.\n */\n removeStyles(styles: string[], urls?: string[]): void {\n for (const value of styles) {\n this.removeUsage(value, this.inline);\n }\n\n urls?.forEach((value) => this.removeUsage(value, this.external));\n }\n\n protected addUsage<T extends HTMLElement>(\n value: string,\n usages: Map<string, UsageRecord<T>>,\n creator: (value: string, doc: Document) => T,\n ): void {\n // Attempt to get any current usage of the value\n const record = usages.get(value);\n\n // If existing, just increment the usage count\n if (record) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) {\n // A usage count of zero indicates a preexisting server generated style.\n // This attribute is solely used for debugging purposes of SSR style reuse.\n record.elements.forEach((element) => element.setAttribute('ng-style-reused', ''));\n }\n record.usage++;\n } else {\n // Otherwise, create an entry to track the elements and add element for each host\n usages.set(value, {\n usage: 1,\n elements: [...this.hosts].map((host) => this.addElement(host, creator(value, this.doc))),\n });\n }\n }\n\n protected removeUsage<T extends HTMLElement>(\n value: string,\n usages: Map<string, UsageRecord<T>>,\n ): void {\n // Attempt to get any current usage of the value\n const record = usages.get(value);\n\n // If there is a record, reduce the usage count and if no longer used,\n // remove from DOM and delete usage record.\n if (record) {\n record.usage--;\n if (record.usage <= 0) {\n removeElements(record.elements);\n usages.delete(value);\n }\n }\n }\n\n ngOnDestroy(): void {\n for (const [, {elements}] of [...this.inline, ...this.external]) {\n removeElements(elements);\n }\n this.hosts.clear();\n }\n\n /**\n * Adds a host node to the set of style hosts and adds all existing style usage to\n * the newly added host node.\n *\n * This is currently only used for Shadow DOM encapsulation mode.\n */\n addHost(hostNode: Node): void {\n this.hosts.add(hostNode);\n\n // Add existing styles to new host\n for (const [style, {elements}] of this.inline) {\n elements.push(this.addElement(hostNode, createStyleElement(style, this.doc)));\n }\n for (const [url, {elements}] of this.external) {\n elements.push(this.addElement(hostNode, createLinkElement(url, this.doc)));\n }\n }\n\n removeHost(hostNode: Node): void {\n this.hosts.delete(hostNode);\n }\n\n private addElement<T extends HTMLElement>(host: Node, element: T): T {\n // Add a nonce if present\n if (this.nonce) {\n element.setAttribute('nonce', this.nonce);\n }\n\n // Add application identifier when on the server to support client-side reuse\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);\n }\n\n // Insert the element into the DOM with the host node as parent\n return host.appendChild(element);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {\n APP_ID,\n CSP_NONCE,\n Inject,\n Injectable,\n InjectionToken,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ViewEncapsulation,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n ɵTracingService as TracingService,\n ɵTracingSnapshot as TracingSnapshot,\n Optional,\n ɵallLeavingAnimations as allLeavingAnimations,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nimport {EventManager} from './events/event_manager';\nimport {createLinkElement, SharedStylesHost} from './shared_styles_host';\n\nexport const NAMESPACE_URIS: {[ns: string]: string} = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n 'math': 'http://www.w3.org/1998/Math/MathML',\n};\n\nconst COMPONENT_REGEX = /%COMP%/g;\nconst SOURCEMAP_URL_REGEXP = /\\/\\*#\\s*sourceMappingURL=(.+?)\\s*\\*\\//;\nconst PROTOCOL_REGEXP = /^https?:/;\n\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;\n\n/**\n * A DI token that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `true`.\n * @publicApi\n */\nexport const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken<boolean>(\n typeof ngDevMode !== undefined && ngDevMode ? 'RemoveStylesOnCompDestroy' : '',\n {\n providedIn: 'root',\n factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n },\n);\n\nexport function shimContentAttribute(componentShortId: string): string {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimHostAttribute(componentShortId: string): string {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimStylesContent(compId: string, styles: string[]): string[] {\n return styles.map((s) => s.replace(COMPONENT_REGEX, compId));\n}\n\n/**\n * Prepends a baseHref to the `sourceMappingURL` within the provided CSS content.\n * If the `sourceMappingURL` contains an inline (encoded) map, the function skips processing.\n *\n * @note For inline stylesheets, the `sourceMappingURL` is relative to the page's origin\n * and not the provided baseHref. This function is needed as when accessing the page with a URL\n * containing two or more segments.\n * For example, if the baseHref is set to `/`, and you visit a URL like `http://localhost/foo/bar`,\n * the map would be requested from `http://localhost/foo/bar/comp.css.map` instead of what you'd expect,\n * which is `http://localhost/comp.css.map`. This behavior is corrected by modifying the `sourceMappingURL`\n * to ensure external source maps are loaded relative to the baseHref.\n *\n\n * @param baseHref - The base URL to prepend to the `sourceMappingURL`.\n * @param styles - An array of CSS content strings, each potentially containing a `sourceMappingURL`.\n * @returns The updated array of CSS content strings with modified `sourceMappingURL` values,\n * or the original content if no modification is needed.\n */\nexport function addBaseHrefToCssSourceMap(baseHref: string, styles: string[]): string[] {\n if (!baseHref) {\n return styles;\n }\n\n const absoluteBaseHrefUrl = new URL(baseHref, 'http://localhost');\n\n return styles.map((cssContent) => {\n if (!cssContent.includes('sourceMappingURL=')) {\n return cssContent;\n }\n\n return cssContent.replace(SOURCEMAP_URL_REGEXP, (_, sourceMapUrl) => {\n if (\n sourceMapUrl[0] === '/' ||\n sourceMapUrl.startsWith('data:') ||\n PROTOCOL_REGEXP.test(sourceMapUrl)\n ) {\n return `/*# sourceMappingURL=${sourceMapUrl} */`;\n }\n\n const {pathname: resolvedSourceMapUrl} = new URL(sourceMapUrl, absoluteBaseHrefUrl);\n\n return `/*# sourceMappingURL=${resolvedSourceMapUrl} */`;\n });\n });\n}\n\n@Injectable()\nexport class DomRendererFactory2 implements RendererFactory2, OnDestroy {\n private readonly rendererByCompId = new Map<\n string,\n EmulatedEncapsulationDomRenderer2 | NoneEncapsulationDomRenderer\n >();\n private readonly defaultRenderer: Renderer2;\n private readonly platformIsServer: boolean;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n @Inject(APP_ID) private readonly appId: string,\n @Inject(REMOVE_STYLES_ON_COMPONENT_DESTROY) private removeStylesOnCompDestroy: boolean,\n @Inject(DOCUMENT) private readonly doc: Document,\n @Inject(PLATFORM_ID) readonly platformId: Object,\n readonly ngZone: NgZone,\n @Inject(CSP_NONCE) private readonly nonce: string | null = null,\n @Inject(TracingService)\n @Optional()\n private readonly tracingService: TracingService<TracingSnapshot> | null = null,\n ) {\n this.platformIsServer = typeof ngServerMode !== 'undefined' && ngServerMode;\n this.defaultRenderer = new DefaultDomRenderer2(\n eventManager,\n doc,\n ngZone,\n this.platformIsServer,\n this.tracingService,\n );\n }\n\n createRenderer(element: any, type: RendererType2 | null): Renderer2 {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n\n if (\n typeof ngServerMode !== 'undefined' &&\n ngServerMode &&\n (type.encapsulation === ViewEncapsulation.ShadowDom ||\n type.encapsulation === ViewEncapsulation.IsolatedShadowDom)\n ) {\n // Domino does not support shadow DOM.\n type = {...type, encapsulation: ViewEncapsulation.Emulated};\n }\n\n const renderer = this.getOrCreateRenderer(element, type);\n // Renderers have different logic due to different encapsulation behaviours.\n // Ex: for emulated, an attribute is added to the element.\n if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n renderer.applyToHost(element);\n } else if (renderer instanceof NoneEncapsulationDomRenderer) {\n renderer.applyStyles();\n }\n\n return renderer;\n }\n\n private getOrCreateRenderer(element: any, type: RendererType2): Renderer2 {\n const rendererByCompId = this.rendererByCompId;\n let renderer = rendererByCompId.get(type.id);\n\n if (!renderer) {\n const doc = this.doc;\n const ngZone = this.ngZone;\n const eventManager = this.eventManager;\n const sharedStylesHost = this.sharedStylesHost;\n const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;\n const platformIsServer = this.platformIsServer;\n const tracingService = this.tracingService;\n\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated:\n renderer = new EmulatedEncapsulationDomRenderer2(\n eventManager,\n sharedStylesHost,\n type,\n this.appId,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n );\n break;\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(\n eventManager,\n element,\n type,\n doc,\n ngZone,\n this.nonce,\n platformIsServer,\n tracingService,\n sharedStylesHost,\n );\n case ViewEncapsulation.IsolatedShadowDom:\n return new ShadowDomRenderer(\n eventManager,\n element,\n type,\n doc,\n ngZone,\n this.nonce,\n platformIsServer,\n tracingService,\n );\n\n default:\n renderer = new NoneEncapsulationDomRenderer(\n eventManager,\n sharedStylesHost,\n type,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n );\n break;\n }\n\n rendererByCompId.set(type.id, renderer);\n }\n\n return renderer;\n }\n\n ngOnDestroy() {\n this.rendererByCompId.clear();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n this.rendererByCompId.delete(componentId);\n }\n}\n\nclass DefaultDomRenderer2 implements Renderer2 {\n data: {[key: string]: any} = Object.create(null);\n\n /**\n * By default this renderer throws when encountering synthetic properties\n * This can be disabled for example by the AsyncAnimationRendererFactory\n */\n throwOnSyntheticProps = true;\n\n constructor(\n private readonly eventManager: EventManager,\n private readonly doc: Document,\n protected readonly ngZone: NgZone,\n private readonly platformIsServer: boolean,\n private readonly tracingService: TracingService<TracingSnapshot> | null,\n ) {}\n\n destroy(): void {}\n\n destroyNode = null;\n\n createElement(name: string, namespace?: string): any {\n if (namespace) {\n // TODO: `|| namespace` was added in\n // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n // support how Ivy passed around the namespace URI rather than short name at the time. It did\n // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n // namespaces should be and make it consistent.\n // Related issues:\n // https://github.com/angular/angular/issues/44028\n // https://github.com/angular/angular/issues/44883\n return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n\n return this.doc.createElement(name);\n }\n\n createComment(value: string): any {\n return this.doc.createComment(value);\n }\n\n createText(value: string): any {\n return this.doc.createTextNode(value);\n }\n\n appendChild(parent: any, newChild: any): void {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.appendChild(newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any): void {\n if (parent) {\n const targetParent = isTemplateNode(parent) ? parent.content : parent;\n targetParent.insertBefore(newChild, refChild);\n }\n }\n\n removeChild(_parent: any, oldChild: any): void {\n // child was removed\n oldChild.remove();\n }\n\n selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any {\n let el: any =\n typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode;\n if (!el) {\n throw new RuntimeError(\n RuntimeErrorCode.ROOT_NODE_NOT_FOUND,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `The selector \"${selectorOrNode}\" did not match any elements`,\n );\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n }\n\n parentNode(node: any): any {\n return node.parentNode;\n }\n\n nextSibling(node: any): any {\n return node.nextSibling;\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n if (namespace) {\n name = namespace + ':' + name;\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n } else {\n el.setAttribute(name, value);\n }\n } else {\n el.setAttribute(name, value);\n }\n }\n\n removeAttribute(el: any, name: string, namespace?: string): void {\n if (namespace) {\n const namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n } else {\n el.removeAttribute(`${namespace}:${name}`);\n }\n } else {\n el.removeAttribute(name);\n }\n }\n\n addClass(el: any, name: string): void {\n el.classList.add(name);\n }\n\n removeClass(el: any, name: string): void {\n el.classList.remove(name);\n }\n\n setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n } else {\n el.style[style] = value;\n }\n }\n\n removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n if (flags & RendererStyleFlags2.DashCase) {\n // removeProperty has no effect when used on camelCased properties.\n el.style.removeProperty(style);\n } else {\n el.style[style] = '';\n }\n }\n\n setProperty(el: any, name: string, value: any): void {\n if (el == null) {\n return;\n }\n\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(name, 'property');\n el[name] = value;\n }\n\n setValue(node: any, value: string): void {\n node.nodeValue = value;\n }\n\n listen(\n target: 'window' | 'document' | 'body' | any,\n event: string,\n callback: (event: any) => boolean,\n options?: ListenerOptions,\n ): () => void {\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n this.throwOnSyntheticProps &&\n checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n target = getDOM().getGlobalEventTarget(this.doc, target);\n if (!target) {\n throw new RuntimeError(\n RuntimeErrorCode.UNSUPPORTED_EVENT_TARGET,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unsupported event target ${target} for event ${event}`,\n );\n }\n }\n\n let wrappedCallback = this.decoratePreventDefault(callback);\n\n if (this.tracingService?.wrapEventListener) {\n wrappedCallback = this.tracingService.wrapEventListener(target, event, wrappedCallback);\n }\n\n return this.eventManager.addEventListener(\n target,\n event,\n wrappedCallback,\n options,\n ) as VoidFunction;\n }\n\n private decoratePreventDefault(eventHandler: Function): Function {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle\n // the two differently. In the first case, the special '__ngUnwrap__' token is passed to the\n // unwrap the listener (see below).\n return (event: any) => {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The\n // debug_node can inspect the listener toString contents for the existence of this special\n // token. Because the token is a string literal, it is ensured to not be modified by compiled\n // code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n\n // Run the event handler inside the ngZone because event handlers are not patched\n // by Zone on the server. This is required only for tests.\n const allowDefaultBehavior =\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? this.ngZone.runGuarded(() => eventHandler(event))\n : eventHandler(event);\n if (allowDefaultBehavior === false) {\n event.preventDefault();\n }\n\n return undefined;\n };\n }\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\n\nfunction checkNoSyntheticProp(name: string, nameKind: string) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new RuntimeError(\n RuntimeErrorCode.UNEXPECTED_SYNTHETIC_PROPERTY,\n `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n - Make sure \\`provideAnimationsAsync()\\`, \\`provideAnimations()\\` or \\`provideNoopAnimations()\\` call was added to a list of providers used to bootstrap an application.\n - There is a corresponding animation configuration named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.dev/api/core/Component#animations).`,\n );\n }\n}\n\nfunction isTemplateNode(node: any): node is HTMLTemplateElement {\n return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n private shadowRoot: any;\n\n constructor(\n eventManager: EventManager,\n private hostEl: any,\n component: RendererType2,\n doc: Document,\n ngZone: NgZone,\n nonce: string | null,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n private sharedStylesHost?: SharedStylesHost,\n ) {\n super(eventManager, doc, ngZone, platformIsServer, tracingService);\n this.shadowRoot = (hostEl as any).attachShadow({mode: 'open'});\n\n // SharedStylesHost is used to add styles to the shadow root by ShadowDom.\n // This is optional as it is not used by IsolatedShadowDom.\n if (this.sharedStylesHost) {\n this.sharedStylesHost.addHost(this.shadowRoot);\n }\n let styles = component.styles;\n if (ngDevMode) {\n // We only do this in development, as for production users should not add CSS sourcemaps to components.\n const baseHref = getDOM().getBaseHref(doc) ?? '';\n styles = addBaseHrefToCssSourceMap(baseHref, styles);\n }\n\n styles = shimStylesContent(component.id, styles);\n\n for (const style of styles) {\n const styleEl = document.createElement('style');\n\n if (nonce) {\n styleEl.setAttribute('nonce', nonce);\n }\n\n styleEl.textContent = style;\n this.shadowRoot.appendChild(styleEl);\n }\n\n // Apply any external component styles to the shadow root for the component's element.\n // The ShadowDOM renderer uses an alternative execution path for component styles that\n // does not use the SharedStylesHost that other encapsulation modes leverage. Much like\n // the manual addition of embedded styles directly above, any external stylesheets\n // must be manually added here to ensure ShadowDOM components are correctly styled.\n // TODO: Consider reworking the DOM Renderers to consolidate style handling.\n const styleUrls = component.getExternalStyles?.();\n if (styleUrls) {\n for (const styleUrl of styleUrls) {\n const linkEl = createLinkElement(styleUrl, doc);\n if (nonce) {\n linkEl.setAttribute('nonce', nonce);\n }\n this.shadowRoot.appendChild(linkEl);\n }\n }\n }\n\n private nodeOrShadowRoot(node: any): any {\n return node === this.hostEl ? this.shadowRoot : node;\n }\n\n override appendChild(parent: any, newChild: any): void {\n return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n }\n\n override insertBefore(parent: any, newChild: any, refChild: any): void {\n return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n }\n\n override removeChild(_parent: any, oldChild: any): void {\n return super.removeChild(null, oldChild);\n }\n\n override parentNode(node: any): any {\n return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n }\n\n override destroy() {\n if (this.sharedStylesHost) {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n }\n }\n}\n\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n private readonly styles: string[];\n private readonly styleUrls?: string[];\n\n constructor(\n eventManager: EventManager,\n private readonly sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n private removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n compId?: string,\n ) {\n super(eventManager, doc, ngZone, platformIsServer, tracingService);\n let styles = component.styles;\n if (ngDevMode) {\n // We only do this in development, as for production users should not add CSS sourcemaps to components.\n const baseHref = getDOM().getBaseHref(doc) ?? '';\n styles = addBaseHrefToCssSourceMap(baseHref, styles);\n }\n\n this.styles = compId ? shimStylesContent(compId, styles) : styles;\n this.styleUrls = component.getExternalStyles?.(compId);\n }\n\n applyStyles(): void {\n this.sharedStylesHost.addStyles(this.styles, this.styleUrls);\n }\n\n override destroy(): void {\n if (!this.removeStylesOnCompDestroy) {\n return;\n }\n if (allLeavingAnimations.size === 0) {\n this.sharedStylesHost.removeStyles(this.styles, this.styleUrls);\n }\n }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n private contentAttr: string;\n private hostAttr: string;\n\n constructor(\n eventManager: EventManager,\n sharedStylesHost: SharedStylesHost,\n component: RendererType2,\n appId: string,\n removeStylesOnCompDestroy: boolean,\n doc: Document,\n ngZone: NgZone,\n platformIsServer: boolean,\n tracingService: TracingService<TracingSnapshot> | null,\n ) {\n const compId = appId + '-' + component.id;\n super(\n eventManager,\n sharedStylesHost,\n component,\n removeStylesOnCompDestroy,\n doc,\n ngZone,\n platformIsServer,\n tracingService,\n compId,\n );\n this.contentAttr = shimContentAttribute(compId);\n this.hostAttr = shimHostAttribute(compId);\n }\n\n applyToHost(element: any): void {\n this.applyStyles();\n this.setAttribute(element, this.hostAttr, '');\n }\n\n override createElement(parent: any, name: string): Element {\n const el = super.createElement(parent, name);\n super.setAttribute(el, this.contentAttr, '');\n return el;\n }\n}\n"],"names":["addEventListener","element","eventName","handler","options","removeEventListener","target","callback","EVENT_MANAGER_PLUGINS","InjectionToken","ngDevMode","undefined","EventManager","_zone","_plugins","otherPlugins","slice","reverse","domEventPlugin","plugins","find","p","DomEventsPlugin","push","elements","remove","external","set","styleElement","href","usage","textContent","inline","linkElement","doc","createElement","nonce","Map","platformId","appId","hosts","add","head","value","styles","removeStyles","urls","addUsage","usages","creator","record","get","forEach","setAttribute","map","host","addElement","NAMESPACE_URIS","SOURCEMAP_URL_REGEXP","PROTOCOL_REGEXP","COMPONENT_VARIABLE","HOST_ATTR","CONTENT_ATTR","shimHostAttribute","componentShortId","COMPONENT_REGEX","s","replace","compId","cssContent","_","sourceMapUrl","startsWith","test","resolvedSourceMapUrl","ngZone","tracingService","rendererByCompId","defaultRenderer","platformIsServer","constructor","eventManager","sharedStylesHost","removeStylesOnCompDestroy","ngServerMode","DefaultDomRenderer2","createRenderer","type","encapsulation","ViewEncapsulation","ShadowDom","Emulated","id","renderer","EmulatedEncapsulationDomRenderer2","ShadowDomRenderer","IsolatedShadowDom","NoneEncapsulationDomRenderer","clear","componentReplaced","componentId","delete","Injectable","ctorParameters","i1","i2","decorators","Document","throwOnSyntheticProps","name","namespace","createElementNS","createComment","createTextNode","appendChild","parent","newChild","isTemplateNode","content","targetParent","insertBefore","refChild","removeChild","_parent","oldChild","selectRootElement","selectorOrNode","preserveContent","el","querySelector","node","parentNode","nextSibling","namespaceUri","setAttributeNS","removeAttributeNS","removeAttribute","removeClass","setStyle","style","flags","RendererStyleFlags2","DashCase","Important","removeProperty","setProperty","checkNoSyntheticProp","event","getDOM","getGlobalEventTarget","RuntimeError","wrapped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AAAM,MAAA,EAAA6I,KAAA,EAAAI,eAC3B,EAAAnJ,OAAA,CAAA;;AAGcoJ,EAAAA,sBAAAA,CAAAE,YAAA,EAAA;AAeN,IAAA,OAAAP,KAAA,IAAA;;AAeJ,QAAA,OAAgBO,YAAA;;AAKpB,MAAA,MAAAC,oBAAA,GAAAvE,OAAAA,YAAA,oBAAAA,YAAA,GACF,IAAA,CAAAT,MAAA,CAAAiF,UAAA,OAAAF,YAAA,CAAAP,KAAA,CAEgBO,CAAAA,GAAAA,YAAA,CAAAP,KAAA,CAAA;UACdQ,oBAAU,KAAA,KAAA,EAAA;;AAGV;AACE,MAAA,OAAAhJ,SAAA;;;;AAMI,MAAA,WAAA,GAAA,CAAA,MAAA,GAAA,CAAAkJ,UAAW,CAAA,CAAA,CAAA,GAAA;6BACHX,CAAArC,IAAA,EAAAiD,QAAA,EAAA;UAEhB,CAAAD,UAAA,QAAAE,WAAA,EAAA;AAYE,IAAA,MAAA,IAAAT,aACc,CAAA,IAAA,EAAA,CAAA,qBAAA,EAAAQ,QAAA,CAAA,CAAA,EAAAjD,IAAA,CAAA;;+DAWdA,IAAA,CAAA,+HAAA,CAAA,CAAA;;;SAMFQ,cAAAA,CAAAa,IAAA,EAAA;SAEsBA,IAAA,CAAA8B,OAAY,KAAA,UAAc,IAAA9B,IAAA,CAAAZ,OAAA,KAAA3G,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} |
+207
-271
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -14,286 +14,222 @@ * License: MIT | ||
| class AsyncAnimationRendererFactory { | ||
| doc; | ||
| delegate; | ||
| zone; | ||
| animationType; | ||
| moduleImpl; | ||
| _rendererFactoryPromise = null; | ||
| scheduler = null; | ||
| injector = inject(Injector); | ||
| loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, { | ||
| optional: true, | ||
| doc; | ||
| delegate; | ||
| zone; | ||
| animationType; | ||
| moduleImpl; | ||
| _rendererFactoryPromise = null; | ||
| scheduler = null; | ||
| injector = inject(Injector); | ||
| loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, { | ||
| optional: true | ||
| }); | ||
| _engine; | ||
| constructor(doc, delegate, zone, animationType, moduleImpl) { | ||
| this.doc = doc; | ||
| this.delegate = delegate; | ||
| this.zone = zone; | ||
| this.animationType = animationType; | ||
| this.moduleImpl = moduleImpl; | ||
| } | ||
| ngOnDestroy() { | ||
| this._engine?.flush(); | ||
| } | ||
| loadImpl() { | ||
| const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then(m => m); | ||
| let moduleImplPromise; | ||
| if (this.loadingSchedulerFn) { | ||
| moduleImplPromise = this.loadingSchedulerFn(loadFn); | ||
| } else { | ||
| moduleImplPromise = loadFn(); | ||
| } | ||
| return moduleImplPromise.catch(e => { | ||
| throw new _RuntimeError(5300, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Async loading for animations package was ' + 'enabled, but loading failed. Angular falls back to using regular rendering. ' + "No animations will be displayed and their styles won't be applied."); | ||
| }).then(({ | ||
| ɵcreateEngine, | ||
| ɵAnimationRendererFactory | ||
| }) => { | ||
| this._engine = ɵcreateEngine(this.animationType, this.doc); | ||
| const rendererFactory = new ɵAnimationRendererFactory(this.delegate, this._engine, this.zone); | ||
| this.delegate = rendererFactory; | ||
| return rendererFactory; | ||
| }); | ||
| _engine; | ||
| /** | ||
| * | ||
| * @param moduleImpl allows to provide a mock implmentation (or will load the animation module) | ||
| */ | ||
| constructor(doc, delegate, zone, animationType, moduleImpl) { | ||
| this.doc = doc; | ||
| this.delegate = delegate; | ||
| this.zone = zone; | ||
| this.animationType = animationType; | ||
| this.moduleImpl = moduleImpl; | ||
| } | ||
| createRenderer(hostElement, rendererType) { | ||
| const renderer = this.delegate.createRenderer(hostElement, rendererType); | ||
| if (renderer.ɵtype === 0) { | ||
| return renderer; | ||
| } | ||
| /** @docs-private */ | ||
| ngOnDestroy() { | ||
| // When the root view is removed, the renderer defers the actual work to the | ||
| // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually | ||
| // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not | ||
| // removed until `TransitionAnimationEngine` "flushes". | ||
| // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable | ||
| // engine is not provided when async animations are used. | ||
| this._engine?.flush(); | ||
| if (typeof renderer.throwOnSyntheticProps === 'boolean') { | ||
| renderer.throwOnSyntheticProps = false; | ||
| } | ||
| /** | ||
| * @internal | ||
| */ | ||
| loadImpl() { | ||
| // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require | ||
| // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect | ||
| // the set of imported symbols. | ||
| const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m); | ||
| let moduleImplPromise; | ||
| if (this.loadingSchedulerFn) { | ||
| moduleImplPromise = this.loadingSchedulerFn(loadFn); | ||
| } | ||
| else { | ||
| moduleImplPromise = loadFn(); | ||
| } | ||
| return moduleImplPromise | ||
| .catch((e) => { | ||
| throw new _RuntimeError(5300 /* RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| 'Async loading for animations package was ' + | ||
| 'enabled, but loading failed. Angular falls back to using regular rendering. ' + | ||
| "No animations will be displayed and their styles won't be applied."); | ||
| }) | ||
| .then(({ ɵcreateEngine, ɵAnimationRendererFactory }) => { | ||
| // We can't create the renderer yet because we might need the hostElement and the type | ||
| // Both are provided in createRenderer(). | ||
| this._engine = ɵcreateEngine(this.animationType, this.doc); | ||
| const rendererFactory = new ɵAnimationRendererFactory(this.delegate, this._engine, this.zone); | ||
| this.delegate = rendererFactory; | ||
| return rendererFactory; | ||
| }); | ||
| const dynamicRenderer = new DynamicDelegationRenderer(renderer); | ||
| if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) { | ||
| this._rendererFactoryPromise = this.loadImpl(); | ||
| } | ||
| /** | ||
| * This method is delegating the renderer creation to the factories. | ||
| * It uses default factory while the animation factory isn't loaded | ||
| * and will rely on the animation factory once it is loaded. | ||
| * | ||
| * Calling this method will trigger as side effect the loading of the animation module | ||
| * if the renderered component uses animations. | ||
| */ | ||
| createRenderer(hostElement, rendererType) { | ||
| const renderer = this.delegate.createRenderer(hostElement, rendererType); | ||
| if (renderer.ɵtype === 0 /* AnimationRendererType.Regular */) { | ||
| // The factory is already loaded, this is an animation renderer | ||
| return renderer; | ||
| } | ||
| // We need to prevent the DomRenderer to throw an error because of synthetic properties | ||
| if (typeof renderer.throwOnSyntheticProps === 'boolean') { | ||
| renderer.throwOnSyntheticProps = false; | ||
| } | ||
| // Using a dynamic renderer to switch the renderer implementation once the module is loaded. | ||
| const dynamicRenderer = new DynamicDelegationRenderer(renderer); | ||
| // Kick off the module loading if the component uses animations but the module hasn't been | ||
| // loaded yet. | ||
| if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) { | ||
| this._rendererFactoryPromise = this.loadImpl(); | ||
| } | ||
| this._rendererFactoryPromise | ||
| ?.then((animationRendererFactory) => { | ||
| const animationRenderer = animationRendererFactory.createRenderer(hostElement, rendererType); | ||
| dynamicRenderer.use(animationRenderer); | ||
| this.scheduler ??= this.injector.get(_ChangeDetectionScheduler, null, { optional: true }); | ||
| this.scheduler?.notify(10 /* NotificationSource.AsyncAnimationsLoaded */); | ||
| }) | ||
| .catch((e) => { | ||
| // Permanently use regular renderer when loading fails. | ||
| dynamicRenderer.use(renderer); | ||
| }); | ||
| return dynamicRenderer; | ||
| } | ||
| begin() { | ||
| this.delegate.begin?.(); | ||
| } | ||
| end() { | ||
| this.delegate.end?.(); | ||
| } | ||
| whenRenderingDone() { | ||
| return this.delegate.whenRenderingDone?.() ?? Promise.resolve(); | ||
| } | ||
| /** | ||
| * Used during HMR to clear any cached data about a component. | ||
| * @param componentId ID of the component that is being replaced. | ||
| */ | ||
| componentReplaced(componentId) { | ||
| // Flush the engine since the renderer destruction waits for animations to be done. | ||
| this._engine?.flush(); | ||
| this.delegate.componentReplaced?.(componentId); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: AsyncAnimationRendererFactory, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: AsyncAnimationRendererFactory }); | ||
| this._rendererFactoryPromise?.then(animationRendererFactory => { | ||
| const animationRenderer = animationRendererFactory.createRenderer(hostElement, rendererType); | ||
| dynamicRenderer.use(animationRenderer); | ||
| this.scheduler ??= this.injector.get(_ChangeDetectionScheduler, null, { | ||
| optional: true | ||
| }); | ||
| this.scheduler?.notify(10); | ||
| }).catch(e => { | ||
| dynamicRenderer.use(renderer); | ||
| }); | ||
| return dynamicRenderer; | ||
| } | ||
| begin() { | ||
| this.delegate.begin?.(); | ||
| } | ||
| end() { | ||
| this.delegate.end?.(); | ||
| } | ||
| whenRenderingDone() { | ||
| return this.delegate.whenRenderingDone?.() ?? Promise.resolve(); | ||
| } | ||
| componentReplaced(componentId) { | ||
| this._engine?.flush(); | ||
| this.delegate.componentReplaced?.(componentId); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: AsyncAnimationRendererFactory, | ||
| deps: "invalid", | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: AsyncAnimationRendererFactory | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: AsyncAnimationRendererFactory, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: Document }, { type: i0.RendererFactory2 }, { type: i0.NgZone }, { type: undefined }, { type: Promise }] }); | ||
| /** | ||
| * The class allows to dynamicly switch between different renderer implementations | ||
| * by changing the delegate renderer. | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: AsyncAnimationRendererFactory, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: Document | ||
| }, { | ||
| type: i0.RendererFactory2 | ||
| }, { | ||
| type: i0.NgZone | ||
| }, { | ||
| type: undefined | ||
| }, { | ||
| type: Promise | ||
| }] | ||
| }); | ||
| class DynamicDelegationRenderer { | ||
| delegate; | ||
| // List of callbacks that need to be replayed on the animation renderer once its loaded | ||
| replay = []; | ||
| ɵtype = 1 /* AnimationRendererType.Delegated */; | ||
| constructor(delegate) { | ||
| this.delegate = delegate; | ||
| delegate; | ||
| replay = []; | ||
| ɵtype = 1; | ||
| constructor(delegate) { | ||
| this.delegate = delegate; | ||
| } | ||
| use(impl) { | ||
| this.delegate = impl; | ||
| if (this.replay !== null) { | ||
| for (const fn of this.replay) { | ||
| fn(impl); | ||
| } | ||
| this.replay = null; | ||
| } | ||
| use(impl) { | ||
| this.delegate = impl; | ||
| if (this.replay !== null) { | ||
| // Replay queued actions using the animation renderer to apply | ||
| // all events and properties collected while loading was in progress. | ||
| for (const fn of this.replay) { | ||
| fn(impl); | ||
| } | ||
| // Set to `null` to indicate that the queue was processed | ||
| // and we no longer need to collect events and properties. | ||
| this.replay = null; | ||
| } | ||
| } | ||
| get data() { | ||
| return this.delegate.data; | ||
| } | ||
| destroy() { | ||
| this.replay = null; | ||
| this.delegate.destroy(); | ||
| } | ||
| createElement(name, namespace) { | ||
| return this.delegate.createElement(name, namespace); | ||
| } | ||
| createComment(value) { | ||
| return this.delegate.createComment(value); | ||
| } | ||
| createText(value) { | ||
| return this.delegate.createText(value); | ||
| } | ||
| get destroyNode() { | ||
| return this.delegate.destroyNode; | ||
| } | ||
| appendChild(parent, newChild) { | ||
| this.delegate.appendChild(parent, newChild); | ||
| } | ||
| insertBefore(parent, newChild, refChild, isMove) { | ||
| this.delegate.insertBefore(parent, newChild, refChild, isMove); | ||
| } | ||
| removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval) { | ||
| this.delegate.removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval); | ||
| } | ||
| selectRootElement(selectorOrNode, preserveContent) { | ||
| return this.delegate.selectRootElement(selectorOrNode, preserveContent); | ||
| } | ||
| parentNode(node) { | ||
| return this.delegate.parentNode(node); | ||
| } | ||
| nextSibling(node) { | ||
| return this.delegate.nextSibling(node); | ||
| } | ||
| setAttribute(el, name, value, namespace) { | ||
| this.delegate.setAttribute(el, name, value, namespace); | ||
| } | ||
| removeAttribute(el, name, namespace) { | ||
| this.delegate.removeAttribute(el, name, namespace); | ||
| } | ||
| addClass(el, name) { | ||
| this.delegate.addClass(el, name); | ||
| } | ||
| removeClass(el, name) { | ||
| this.delegate.removeClass(el, name); | ||
| } | ||
| setStyle(el, style, value, flags) { | ||
| this.delegate.setStyle(el, style, value, flags); | ||
| } | ||
| removeStyle(el, style, flags) { | ||
| this.delegate.removeStyle(el, style, flags); | ||
| } | ||
| setProperty(el, name, value) { | ||
| if (this.shouldReplay(name)) { | ||
| this.replay.push(renderer => renderer.setProperty(el, name, value)); | ||
| } | ||
| get data() { | ||
| return this.delegate.data; | ||
| this.delegate.setProperty(el, name, value); | ||
| } | ||
| setValue(node, value) { | ||
| this.delegate.setValue(node, value); | ||
| } | ||
| listen(target, eventName, callback, options) { | ||
| if (this.shouldReplay(eventName)) { | ||
| this.replay.push(renderer => renderer.listen(target, eventName, callback, options)); | ||
| } | ||
| destroy() { | ||
| this.replay = null; | ||
| this.delegate.destroy(); | ||
| } | ||
| createElement(name, namespace) { | ||
| return this.delegate.createElement(name, namespace); | ||
| } | ||
| createComment(value) { | ||
| return this.delegate.createComment(value); | ||
| } | ||
| createText(value) { | ||
| return this.delegate.createText(value); | ||
| } | ||
| get destroyNode() { | ||
| return this.delegate.destroyNode; | ||
| } | ||
| appendChild(parent, newChild) { | ||
| this.delegate.appendChild(parent, newChild); | ||
| } | ||
| insertBefore(parent, newChild, refChild, isMove) { | ||
| this.delegate.insertBefore(parent, newChild, refChild, isMove); | ||
| } | ||
| removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval) { | ||
| this.delegate.removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval); | ||
| } | ||
| selectRootElement(selectorOrNode, preserveContent) { | ||
| return this.delegate.selectRootElement(selectorOrNode, preserveContent); | ||
| } | ||
| parentNode(node) { | ||
| return this.delegate.parentNode(node); | ||
| } | ||
| nextSibling(node) { | ||
| return this.delegate.nextSibling(node); | ||
| } | ||
| setAttribute(el, name, value, namespace) { | ||
| this.delegate.setAttribute(el, name, value, namespace); | ||
| } | ||
| removeAttribute(el, name, namespace) { | ||
| this.delegate.removeAttribute(el, name, namespace); | ||
| } | ||
| addClass(el, name) { | ||
| this.delegate.addClass(el, name); | ||
| } | ||
| removeClass(el, name) { | ||
| this.delegate.removeClass(el, name); | ||
| } | ||
| setStyle(el, style, value, flags) { | ||
| this.delegate.setStyle(el, style, value, flags); | ||
| } | ||
| removeStyle(el, style, flags) { | ||
| this.delegate.removeStyle(el, style, flags); | ||
| } | ||
| setProperty(el, name, value) { | ||
| // We need to keep track of animation properties set on default renderer | ||
| // So we can also set them also on the animation renderer | ||
| if (this.shouldReplay(name)) { | ||
| this.replay.push((renderer) => renderer.setProperty(el, name, value)); | ||
| } | ||
| this.delegate.setProperty(el, name, value); | ||
| } | ||
| setValue(node, value) { | ||
| this.delegate.setValue(node, value); | ||
| } | ||
| listen(target, eventName, callback, options) { | ||
| // We need to keep track of animation events registred by the default renderer | ||
| // So we can also register them against the animation renderer | ||
| if (this.shouldReplay(eventName)) { | ||
| this.replay.push((renderer) => renderer.listen(target, eventName, callback, options)); | ||
| } | ||
| return this.delegate.listen(target, eventName, callback, options); | ||
| } | ||
| shouldReplay(propOrEventName) { | ||
| //`null` indicates that we no longer need to collect events and properties | ||
| return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX); | ||
| } | ||
| return this.delegate.listen(target, eventName, callback, options); | ||
| } | ||
| shouldReplay(propOrEventName) { | ||
| return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX); | ||
| } | ||
| } | ||
| /** | ||
| * Provides a custom scheduler function for the async loading of the animation package. | ||
| * | ||
| * Private token for investigation purposes | ||
| */ | ||
| const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken(typeof ngDevMode !== undefined && ngDevMode ? 'async_animation_loading_scheduler_fn' : ''); | ||
| /** | ||
| * Returns the set of dependency-injection providers | ||
| * to enable animations in an application. See [animations guide](guide/animations) | ||
| * to learn more about animations in Angular. | ||
| * | ||
| * When you use this function instead of the eager `provideAnimations()`, animations won't be | ||
| * rendered until the renderer is loaded. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * The function is useful when you want to enable animations in an application | ||
| * bootstrapped using the `bootstrapApplication` function. In this scenario there | ||
| * is no need to import the `BrowserAnimationsModule` NgModule at all, just add | ||
| * providers returned by this function to the `providers` list as show below. | ||
| * | ||
| * ```ts | ||
| * bootstrapApplication(RootComponent, { | ||
| * providers: [ | ||
| * provideAnimationsAsync() | ||
| * ] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * @param type pass `'noop'` as argument to disable animations. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| function provideAnimationsAsync(type = 'animations') { | ||
| _performanceMarkFeature('NgAsyncAnimations'); | ||
| // Animations don't work on the server so we switch them over to no-op automatically. | ||
| if (typeof ngServerMode !== 'undefined' && ngServerMode) { | ||
| type = 'noop'; | ||
| _performanceMarkFeature('NgAsyncAnimations'); | ||
| if (typeof ngServerMode !== 'undefined' && ngServerMode) { | ||
| type = 'noop'; | ||
| } | ||
| return makeEnvironmentProviders([{ | ||
| provide: RendererFactory2, | ||
| useFactory: () => { | ||
| return new AsyncAnimationRendererFactory(inject(DOCUMENT), inject(DomRendererFactory2), inject(NgZone), type); | ||
| } | ||
| return makeEnvironmentProviders([ | ||
| { | ||
| provide: RendererFactory2, | ||
| useFactory: () => { | ||
| return new AsyncAnimationRendererFactory(inject(DOCUMENT), inject(DomRendererFactory2), inject(NgZone), type); | ||
| }, | ||
| }, | ||
| { | ||
| provide: ANIMATION_MODULE_TYPE, | ||
| useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations', | ||
| }, | ||
| ]); | ||
| }, { | ||
| provide: ANIMATION_MODULE_TYPE, | ||
| useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations' | ||
| }]); | ||
| } | ||
@@ -300,0 +236,0 @@ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"animations-async.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/async/src/async_animation_renderer.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/async/src/providers.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRenderer as AnimationRenderer,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n} from '@angular/animations/browser';\nimport {\n ɵAnimationRendererType as AnimationRendererType,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n NgZone,\n ɵNotificationSource as NotificationSource,\n OnDestroy,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n} from '@angular/core';\nimport {ɵRuntimeErrorCode as RuntimeErrorCode} from '../../../index';\n\nconst ANIMATION_PREFIX = '@';\n\n@Injectable()\nexport class AsyncAnimationRendererFactory implements OnDestroy, RendererFactory2 {\n private _rendererFactoryPromise: Promise<AnimationRendererFactory> | null = null;\n private scheduler: ChangeDetectionScheduler | null = null;\n private readonly injector = inject(Injector);\n private readonly loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, {\n optional: true,\n });\n private _engine?: AnimationEngine;\n\n /**\n *\n * @param moduleImpl allows to provide a mock implmentation (or will load the animation module)\n */\n constructor(\n private doc: Document,\n private delegate: RendererFactory2,\n private zone: NgZone,\n private animationType: 'animations' | 'noop',\n private moduleImpl?: Promise<{\n ɵcreateEngine: (type: 'animations' | 'noop', doc: Document) => AnimationEngine;\n ɵAnimationRendererFactory: typeof AnimationRendererFactory;\n }>,\n ) {}\n\n /** @docs-private */\n ngOnDestroy(): void {\n // When the root view is removed, the renderer defers the actual work to the\n // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually\n // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not\n // removed until `TransitionAnimationEngine` \"flushes\".\n // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable\n // engine is not provided when async animations are used.\n this._engine?.flush();\n }\n\n /**\n * @internal\n */\n private loadImpl(): Promise<AnimationRendererFactory> {\n // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require\n // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect\n // the set of imported symbols.\n const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m);\n\n let moduleImplPromise: typeof this.moduleImpl;\n if (this.loadingSchedulerFn) {\n moduleImplPromise = this.loadingSchedulerFn(loadFn);\n } else {\n moduleImplPromise = loadFn();\n }\n\n return moduleImplPromise\n .catch((e) => {\n throw new RuntimeError(\n RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Async loading for animations package was ' +\n 'enabled, but loading failed. Angular falls back to using regular rendering. ' +\n \"No animations will be displayed and their styles won't be applied.\",\n );\n })\n .then(({ɵcreateEngine, ɵAnimationRendererFactory}) => {\n // We can't create the renderer yet because we might need the hostElement and the type\n // Both are provided in createRenderer().\n this._engine = ɵcreateEngine(this.animationType, this.doc);\n const rendererFactory = new ɵAnimationRendererFactory(\n this.delegate,\n this._engine,\n this.zone,\n );\n this.delegate = rendererFactory;\n return rendererFactory;\n });\n }\n\n /**\n * This method is delegating the renderer creation to the factories.\n * It uses default factory while the animation factory isn't loaded\n * and will rely on the animation factory once it is loaded.\n *\n * Calling this method will trigger as side effect the loading of the animation module\n * if the renderered component uses animations.\n */\n createRenderer(hostElement: any, rendererType: RendererType2): Renderer2 {\n const renderer = this.delegate.createRenderer(hostElement, rendererType);\n\n if ((renderer as AnimationRenderer).ɵtype === AnimationRendererType.Regular) {\n // The factory is already loaded, this is an animation renderer\n return renderer;\n }\n\n // We need to prevent the DomRenderer to throw an error because of synthetic properties\n if (typeof (renderer as any).throwOnSyntheticProps === 'boolean') {\n (renderer as any).throwOnSyntheticProps = false;\n }\n\n // Using a dynamic renderer to switch the renderer implementation once the module is loaded.\n const dynamicRenderer = new DynamicDelegationRenderer(renderer);\n\n // Kick off the module loading if the component uses animations but the module hasn't been\n // loaded yet.\n if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) {\n this._rendererFactoryPromise = this.loadImpl();\n }\n\n this._rendererFactoryPromise\n ?.then((animationRendererFactory) => {\n const animationRenderer = animationRendererFactory.createRenderer(\n hostElement,\n rendererType,\n );\n dynamicRenderer.use(animationRenderer);\n this.scheduler ??= this.injector.get(ChangeDetectionScheduler, null, {optional: true});\n this.scheduler?.notify(NotificationSource.AsyncAnimationsLoaded);\n })\n .catch((e) => {\n // Permanently use regular renderer when loading fails.\n dynamicRenderer.use(renderer);\n });\n\n return dynamicRenderer;\n }\n\n begin(): void {\n this.delegate.begin?.();\n }\n\n end(): void {\n this.delegate.end?.();\n }\n\n whenRenderingDone?(): Promise<any> {\n return this.delegate.whenRenderingDone?.() ?? Promise.resolve();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n // Flush the engine since the renderer destruction waits for animations to be done.\n this._engine?.flush();\n (this.delegate as {componentReplaced?: (id: string) => void}).componentReplaced?.(componentId);\n }\n}\n\n/**\n * The class allows to dynamicly switch between different renderer implementations\n * by changing the delegate renderer.\n */\nexport class DynamicDelegationRenderer implements Renderer2 {\n // List of callbacks that need to be replayed on the animation renderer once its loaded\n private replay: ((renderer: Renderer2) => void)[] | null = [];\n readonly ɵtype = AnimationRendererType.Delegated;\n\n constructor(private delegate: Renderer2) {}\n\n use(impl: Renderer2) {\n this.delegate = impl;\n\n if (this.replay !== null) {\n // Replay queued actions using the animation renderer to apply\n // all events and properties collected while loading was in progress.\n for (const fn of this.replay) {\n fn(impl);\n }\n // Set to `null` to indicate that the queue was processed\n // and we no longer need to collect events and properties.\n this.replay = null;\n }\n }\n\n get data(): {[key: string]: any} {\n return this.delegate.data;\n }\n\n destroy(): void {\n this.replay = null;\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string | null) {\n return this.delegate.createElement(name, namespace);\n }\n\n createComment(value: string): void {\n return this.delegate.createComment(value);\n }\n\n createText(value: string): any {\n return this.delegate.createText(value);\n }\n\n get destroyNode(): ((node: any) => void) | null {\n return this.delegate.destroyNode;\n }\n\n appendChild(parent: any, newChild: any): void {\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean | undefined): void {\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(\n parent: any,\n oldChild: any,\n isHostElement?: boolean | undefined,\n requireSynchronousElementRemoval?: boolean,\n ): void {\n this.delegate.removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval);\n }\n\n selectRootElement(selectorOrNode: any, preserveContent?: boolean | undefined): any {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string | null | undefined): void {\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n // We need to keep track of animation properties set on default renderer\n // So we can also set them also on the animation renderer\n if (this.shouldReplay(name)) {\n this.replay!.push((renderer: Renderer2) => renderer.setProperty(el, name, value));\n }\n this.delegate.setProperty(el, name, value);\n }\n\n setValue(node: any, value: string): void {\n this.delegate.setValue(node, value);\n }\n\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n options?: ListenerOptions,\n ): () => void {\n // We need to keep track of animation events registred by the default renderer\n // So we can also register them against the animation renderer\n if (this.shouldReplay(eventName)) {\n this.replay!.push((renderer: Renderer2) =>\n renderer.listen(target, eventName, callback, options),\n );\n }\n return this.delegate.listen(target, eventName, callback, options);\n }\n\n private shouldReplay(propOrEventName: string): boolean {\n //`null` indicates that we no longer need to collect events and properties\n return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX);\n }\n}\n\n/**\n * Provides a custom scheduler function for the async loading of the animation package.\n *\n * Private token for investigation purposes\n */\nexport const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken<<T>(loadFn: () => T) => T>(\n typeof ngDevMode !== undefined && ngDevMode ? 'async_animation_loading_scheduler_fn' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n EnvironmentProviders,\n makeEnvironmentProviders,\n NgZone,\n RendererFactory2,\n ɵperformanceMarkFeature as performanceMarkFeature,\n inject,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../../index';\n\nimport {AsyncAnimationRendererFactory} from './async_animation_renderer';\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * When you use this function instead of the eager `provideAnimations()`, animations won't be\n * rendered until the renderer is loaded.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimationsAsync()\n * ]\n * });\n * ```\n *\n * @param type pass `'noop'` as argument to disable animations.\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport function provideAnimationsAsync(\n type: 'animations' | 'noop' = 'animations',\n): EnvironmentProviders {\n performanceMarkFeature('NgAsyncAnimations');\n\n // Animations don't work on the server so we switch them over to no-op automatically.\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n type = 'noop';\n }\n\n return makeEnvironmentProviders([\n {\n provide: RendererFactory2,\n useFactory: () => {\n return new AsyncAnimationRendererFactory(\n inject(DOCUMENT),\n inject(DomRendererFactory2),\n inject(NgZone),\n type,\n );\n },\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ]);\n}\n"],"names":["RuntimeError","ChangeDetectionScheduler","performanceMarkFeature"],"mappings":";;;;;;;;;;;AAgCA,MAAM,gBAAgB,GAAG,GAAG;MAGf,6BAA6B,CAAA;AAc9B,IAAA,GAAA;AACA,IAAA,QAAA;AACA,IAAA,IAAA;AACA,IAAA,aAAA;AACA,IAAA,UAAA;IAjBF,uBAAuB,GAA6C,IAAI;IACxE,SAAS,GAAoC,IAAI;AACxC,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,kBAAkB,GAAG,MAAM,CAAC,qCAAqC,EAAE;AAClF,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACM,IAAA,OAAO;AAEf;;;AAGG;IACH,WACU,CAAA,GAAa,EACb,QAA0B,EAC1B,IAAY,EACZ,aAAoC,EACpC,UAGN,EAAA;QAPM,IAAG,CAAA,GAAA,GAAH,GAAG;QACH,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAa,CAAA,aAAA,GAAb,aAAa;QACb,IAAU,CAAA,UAAA,GAAV,UAAU;;;IAOpB,WAAW,GAAA;;;;;;;AAOT,QAAA,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE;;AAGvB;;AAEG;IACK,QAAQ,GAAA;;;;QAId,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,IAAI,OAAO,6BAA6B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE5F,QAAA,IAAI,iBAAyC;AAC7C,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;AAC3B,YAAA,iBAAiB,GAAG,IAAI,CAAC,kBAA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sCAAsC,GAAG,EAAE;;AChT3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACa,SAAA,sBAAsB,CACpC,IAAA,GAA8B,YAAY,EAAA;IAE1CC,uBAAsB,CAAC,mBAAmB,CAAC;;AAG3C,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,IAAI,YAAY,EAAE;QACvD,IAAI,GAAG,MAAM;;AAGf,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE,MAAK;gBACf,OAAO,IAAI,6BAA6B,CACtC,MAAM,CAAC,QAAQ,CAAC,EAChB,MAAM,CAAC,mBAAmB,CAAC,EAC3B,MAAM,CAAC,MAAM,CAAC,EACd,IAAI,CACL;aACF;AACF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,IAAI,KAAK,MAAM,GAAG,gBAAgB,GAAG,mBAAmB;AACnE,SAAA;AACF,KAAA,CAAC;AACJ;;;;"} | ||
| {"version":3,"file":"animations-async.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/async/src/async_animation_renderer.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/async/src/providers.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRenderer as AnimationRenderer,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n} from '@angular/animations/browser';\nimport {\n ɵAnimationRendererType as AnimationRendererType,\n ɵChangeDetectionScheduler as ChangeDetectionScheduler,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n NgZone,\n ɵNotificationSource as NotificationSource,\n OnDestroy,\n Renderer2,\n RendererFactory2,\n RendererStyleFlags2,\n RendererType2,\n ɵRuntimeError as RuntimeError,\n type ListenerOptions,\n} from '@angular/core';\nimport {ɵRuntimeErrorCode as RuntimeErrorCode} from '../../../index';\n\nconst ANIMATION_PREFIX = '@';\n\n@Injectable()\nexport class AsyncAnimationRendererFactory implements OnDestroy, RendererFactory2 {\n private _rendererFactoryPromise: Promise<AnimationRendererFactory> | null = null;\n private scheduler: ChangeDetectionScheduler | null = null;\n private readonly injector = inject(Injector);\n private readonly loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, {\n optional: true,\n });\n private _engine?: AnimationEngine;\n\n /**\n *\n * @param moduleImpl allows to provide a mock implmentation (or will load the animation module)\n */\n constructor(\n private doc: Document,\n private delegate: RendererFactory2,\n private zone: NgZone,\n private animationType: 'animations' | 'noop',\n private moduleImpl?: Promise<{\n ɵcreateEngine: (type: 'animations' | 'noop', doc: Document) => AnimationEngine;\n ɵAnimationRendererFactory: typeof AnimationRendererFactory;\n }>,\n ) {}\n\n /** @docs-private */\n ngOnDestroy(): void {\n // When the root view is removed, the renderer defers the actual work to the\n // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually\n // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not\n // removed until `TransitionAnimationEngine` \"flushes\".\n // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable\n // engine is not provided when async animations are used.\n this._engine?.flush();\n }\n\n /**\n * @internal\n */\n private loadImpl(): Promise<AnimationRendererFactory> {\n // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require\n // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect\n // the set of imported symbols.\n const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m);\n\n let moduleImplPromise: typeof this.moduleImpl;\n if (this.loadingSchedulerFn) {\n moduleImplPromise = this.loadingSchedulerFn(loadFn);\n } else {\n moduleImplPromise = loadFn();\n }\n\n return moduleImplPromise\n .catch((e) => {\n throw new RuntimeError(\n RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Async loading for animations package was ' +\n 'enabled, but loading failed. Angular falls back to using regular rendering. ' +\n \"No animations will be displayed and their styles won't be applied.\",\n );\n })\n .then(({ɵcreateEngine, ɵAnimationRendererFactory}) => {\n // We can't create the renderer yet because we might need the hostElement and the type\n // Both are provided in createRenderer().\n this._engine = ɵcreateEngine(this.animationType, this.doc);\n const rendererFactory = new ɵAnimationRendererFactory(\n this.delegate,\n this._engine,\n this.zone,\n );\n this.delegate = rendererFactory;\n return rendererFactory;\n });\n }\n\n /**\n * This method is delegating the renderer creation to the factories.\n * It uses default factory while the animation factory isn't loaded\n * and will rely on the animation factory once it is loaded.\n *\n * Calling this method will trigger as side effect the loading of the animation module\n * if the renderered component uses animations.\n */\n createRenderer(hostElement: any, rendererType: RendererType2): Renderer2 {\n const renderer = this.delegate.createRenderer(hostElement, rendererType);\n\n if ((renderer as AnimationRenderer).ɵtype === AnimationRendererType.Regular) {\n // The factory is already loaded, this is an animation renderer\n return renderer;\n }\n\n // We need to prevent the DomRenderer to throw an error because of synthetic properties\n if (typeof (renderer as any).throwOnSyntheticProps === 'boolean') {\n (renderer as any).throwOnSyntheticProps = false;\n }\n\n // Using a dynamic renderer to switch the renderer implementation once the module is loaded.\n const dynamicRenderer = new DynamicDelegationRenderer(renderer);\n\n // Kick off the module loading if the component uses animations but the module hasn't been\n // loaded yet.\n if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) {\n this._rendererFactoryPromise = this.loadImpl();\n }\n\n this._rendererFactoryPromise\n ?.then((animationRendererFactory) => {\n const animationRenderer = animationRendererFactory.createRenderer(\n hostElement,\n rendererType,\n );\n dynamicRenderer.use(animationRenderer);\n this.scheduler ??= this.injector.get(ChangeDetectionScheduler, null, {optional: true});\n this.scheduler?.notify(NotificationSource.AsyncAnimationsLoaded);\n })\n .catch((e) => {\n // Permanently use regular renderer when loading fails.\n dynamicRenderer.use(renderer);\n });\n\n return dynamicRenderer;\n }\n\n begin(): void {\n this.delegate.begin?.();\n }\n\n end(): void {\n this.delegate.end?.();\n }\n\n whenRenderingDone?(): Promise<any> {\n return this.delegate.whenRenderingDone?.() ?? Promise.resolve();\n }\n\n /**\n * Used during HMR to clear any cached data about a component.\n * @param componentId ID of the component that is being replaced.\n */\n protected componentReplaced(componentId: string) {\n // Flush the engine since the renderer destruction waits for animations to be done.\n this._engine?.flush();\n (this.delegate as {componentReplaced?: (id: string) => void}).componentReplaced?.(componentId);\n }\n}\n\n/**\n * The class allows to dynamicly switch between different renderer implementations\n * by changing the delegate renderer.\n */\nexport class DynamicDelegationRenderer implements Renderer2 {\n // List of callbacks that need to be replayed on the animation renderer once its loaded\n private replay: ((renderer: Renderer2) => void)[] | null = [];\n readonly ɵtype = AnimationRendererType.Delegated;\n\n constructor(private delegate: Renderer2) {}\n\n use(impl: Renderer2) {\n this.delegate = impl;\n\n if (this.replay !== null) {\n // Replay queued actions using the animation renderer to apply\n // all events and properties collected while loading was in progress.\n for (const fn of this.replay) {\n fn(impl);\n }\n // Set to `null` to indicate that the queue was processed\n // and we no longer need to collect events and properties.\n this.replay = null;\n }\n }\n\n get data(): {[key: string]: any} {\n return this.delegate.data;\n }\n\n destroy(): void {\n this.replay = null;\n this.delegate.destroy();\n }\n\n createElement(name: string, namespace?: string | null) {\n return this.delegate.createElement(name, namespace);\n }\n\n createComment(value: string): void {\n return this.delegate.createComment(value);\n }\n\n createText(value: string): any {\n return this.delegate.createText(value);\n }\n\n get destroyNode(): ((node: any) => void) | null {\n return this.delegate.destroyNode;\n }\n\n appendChild(parent: any, newChild: any): void {\n this.delegate.appendChild(parent, newChild);\n }\n\n insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean | undefined): void {\n this.delegate.insertBefore(parent, newChild, refChild, isMove);\n }\n\n removeChild(\n parent: any,\n oldChild: any,\n isHostElement?: boolean | undefined,\n requireSynchronousElementRemoval?: boolean,\n ): void {\n this.delegate.removeChild(parent, oldChild, isHostElement, requireSynchronousElementRemoval);\n }\n\n selectRootElement(selectorOrNode: any, preserveContent?: boolean | undefined): any {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n }\n\n parentNode(node: any): any {\n return this.delegate.parentNode(node);\n }\n\n nextSibling(node: any): any {\n return this.delegate.nextSibling(node);\n }\n\n setAttribute(el: any, name: string, value: string, namespace?: string | null | undefined): void {\n this.delegate.setAttribute(el, name, value, namespace);\n }\n\n removeAttribute(el: any, name: string, namespace?: string | null | undefined): void {\n this.delegate.removeAttribute(el, name, namespace);\n }\n\n addClass(el: any, name: string): void {\n this.delegate.addClass(el, name);\n }\n\n removeClass(el: any, name: string): void {\n this.delegate.removeClass(el, name);\n }\n\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.setStyle(el, style, value, flags);\n }\n\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2 | undefined): void {\n this.delegate.removeStyle(el, style, flags);\n }\n\n setProperty(el: any, name: string, value: any): void {\n // We need to keep track of animation properties set on default renderer\n // So we can also set them also on the animation renderer\n if (this.shouldReplay(name)) {\n this.replay!.push((renderer: Renderer2) => renderer.setProperty(el, name, value));\n }\n this.delegate.setProperty(el, name, value);\n }\n\n setValue(node: any, value: string): void {\n this.delegate.setValue(node, value);\n }\n\n listen(\n target: any,\n eventName: string,\n callback: (event: any) => boolean | void,\n options?: ListenerOptions,\n ): () => void {\n // We need to keep track of animation events registred by the default renderer\n // So we can also register them against the animation renderer\n if (this.shouldReplay(eventName)) {\n this.replay!.push((renderer: Renderer2) =>\n renderer.listen(target, eventName, callback, options),\n );\n }\n return this.delegate.listen(target, eventName, callback, options);\n }\n\n private shouldReplay(propOrEventName: string): boolean {\n //`null` indicates that we no longer need to collect events and properties\n return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX);\n }\n}\n\n/**\n * Provides a custom scheduler function for the async loading of the animation package.\n *\n * Private token for investigation purposes\n */\nexport const ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken<<T>(loadFn: () => T) => T>(\n typeof ngDevMode !== undefined && ngDevMode ? 'async_animation_loading_scheduler_fn' : '',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n EnvironmentProviders,\n makeEnvironmentProviders,\n NgZone,\n RendererFactory2,\n ɵperformanceMarkFeature as performanceMarkFeature,\n inject,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../../index';\n\nimport {AsyncAnimationRendererFactory} from './async_animation_renderer';\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * When you use this function instead of the eager `provideAnimations()`, animations won't be\n * rendered until the renderer is loaded.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimationsAsync()\n * ]\n * });\n * ```\n *\n * @param type pass `'noop'` as argument to disable animations.\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport function provideAnimationsAsync(\n type: 'animations' | 'noop' = 'animations',\n): EnvironmentProviders {\n performanceMarkFeature('NgAsyncAnimations');\n\n // Animations don't work on the server so we switch them over to no-op automatically.\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n type = 'noop';\n }\n\n return makeEnvironmentProviders([\n {\n provide: RendererFactory2,\n useFactory: () => {\n return new AsyncAnimationRendererFactory(\n inject(DOCUMENT),\n inject(DomRendererFactory2),\n inject(NgZone),\n type,\n );\n },\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ]);\n}\n"],"names":["AsyncAnimationRendererFactory","delegate","zone","animationType","moduleImpl","_rendererFactoryPromise","scheduler","loadingSchedulerFn","inject","ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN","optional","_engine","ngOnDestroy","flush","loadFn","then","m","moduleImplPromise","catch","e","RuntimeError","ngDevMode","ɵcreateEngine","ɵAnimationRendererFactory","doc","rendererFactory","createRenderer","hostElement","rendererType","renderer","ɵtype","throwOnSyntheticProps","data","loadImpl","animationRendererFactory","animationRenderer","use","ChangeDetectionScheduler","notify","dynamicRenderer","begin","end","whenRenderingDone","Promise","resolve","componentReplaced","componentId","deps","target","i0","ɵɵFactoryTarget","Injectable","decorators","DynamicDelegationRenderer","replay","impl","fn","destroy","createElement","name","namespace","createComment","value","createText","destroyNode","appendChild","parent","newChild","makeEnvironmentProviders"],"mappings":";;;;;;;;;;;sBAgE2D,GAAA,GAAA;AAGvD,MAAKA,6BAAiB,CAAA;;EAgBpBC,QAAA;EACDC,IAAA;EAEDC,aAAA;EACGC,UAAA;AAnBJC,EAAAA,uBAAA,GAAA,IAAA;AAEDC,EAAAA,SAAA,GAAA,IAAA;;AAEGC,EAAAA,kBAAA,GAAAC,MAAA,CAAAC,qCAAA,EAAA;AACKC,IAAAA,QAAQ,EAAA;;EAE4EC,OAAA;iBAOlF,EACNV,QAA0B,EAC3BC,IAAA,EAEDC,aAAwB,EACrBC;YALK,MAAA;IACN,IAAAH,CAAAA,QAAiB,GAAjBA,QAAiB;IAClB,IAAAC,CAAAA,IAAA,GAAAA,IAAA;IAED,IAAAC,CAAAA,aAAwB,GAAxBA,aAAwB;IACrB,IAAAC,CAAAA,UAAQ,GAARA,UAAQ;AAMD;aAIgFQ,GAAA;AAW5F,IAAA,IAAC,CAAAD,OAAA,EAAAE,KAAA,EAAA;AAED;;AASE,IAAA,MAAAC,MAAc,GAAAA,MAAG,IAAI,CAAC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A;AAAa;AAGnCmC,EAAAA,GAAAA,CAAAmB,IAAsB,EAAA;IACpB,IAAA,CAAAtD,QAAK,GAAAsD,IAAS;AAGhB,IAAA,IAAA,IAAA,CAAAD,MAAe,KAAU,IAAY,EAAE;AAI/B,MAAA,KAAA,MAAUE,EAAY,IAAA,IAAA,CAAAF,MAAA,EAAA;QAC5BE,EAAI,CAAAD;AACL;MAIA,IAAA,CAAAD,MAAA,GAAA,IAAA;AAED;AACE;AAGF,EAAA,IAAAtB,IAAAA,GAAA;WACM,IAAS,CAAA/B,QAAY,CAAA+B,IAAA;;SAI+CyB,GAAA;QACxE,CAAyDH,MAAA,GAAA,IAAA;AACzD,IAAA,IAAA,CAAArD,QAAS,CAAAwD,OAAA,EAAA;;eAGIC,CAAAC,IAAY,EAAAC,SAAkB,EAAA;IAC7C,OAAC,IAAA,CAAA3D,QAAA,CAAAyD,aAAA,CAAAC,IAAA,EAAAC,SAAA,CAAA;;eAIAC,CAAAC,KAAA,EAAA;AAED,IAAA,OACE,IAAW,CAAA7D,sBAE6B,MACf,CAAA;;AAIzB8D,EAAAA,UAAIA,MAAK,EAAA;eACH,CAAA9D,QAAS,CAAA8D,UAAM,CAAAD,KAAqB,CAAE;;MAK7CE,WAAAA,GAAA;AAEO,IAAA,OAAA,IAAA,CAAY/D,QAAwB,CAAA+D,WAAA;;aAG3CC,CAAAC,MAAA,EAAAC,QAAA,EAAA;IACF,IAAA,CAAAlE,QAAA,CAAAgE,WAAA,CAAAC,MAAA,EAAAC,QAAA,CAAA;AAED;;;AAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvPA,EAAA,OAAAC,wBAAA,CACH,CAAA;;;;;;;;;;;;;"} |
+154
-167
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -17,181 +17,168 @@ * License: MIT | ||
| class InjectableAnimationEngine extends _AnimationEngine { | ||
| // The `ApplicationRef` is injected here explicitly to force the dependency ordering. | ||
| // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they | ||
| // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed. | ||
| constructor(doc, driver, normalizer) { | ||
| super(doc, driver, normalizer); | ||
| } | ||
| ngOnDestroy() { | ||
| this.flush(); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: InjectableAnimationEngine, deps: [{ token: DOCUMENT }, { token: i1.AnimationDriver }, { token: i1.ɵAnimationStyleNormalizer }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: InjectableAnimationEngine }); | ||
| constructor(doc, driver, normalizer) { | ||
| super(doc, driver, normalizer); | ||
| } | ||
| ngOnDestroy() { | ||
| this.flush(); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: InjectableAnimationEngine, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }, { | ||
| token: i1.AnimationDriver | ||
| }, { | ||
| token: i1.ɵAnimationStyleNormalizer | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: InjectableAnimationEngine | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: InjectableAnimationEngine, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: Document, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }, { type: i1.AnimationDriver }, { type: i1.ɵAnimationStyleNormalizer }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: InjectableAnimationEngine, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: Document, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }, { | ||
| type: i1.AnimationDriver | ||
| }, { | ||
| type: i1.ɵAnimationStyleNormalizer | ||
| }] | ||
| }); | ||
| function instantiateDefaultStyleNormalizer() { | ||
| return new _WebAnimationsStyleNormalizer(); | ||
| return new _WebAnimationsStyleNormalizer(); | ||
| } | ||
| function instantiateRendererFactory() { | ||
| return new _AnimationRendererFactory(inject(DomRendererFactory2), inject(_AnimationEngine), inject(NgZone)); | ||
| return new _AnimationRendererFactory(inject(DomRendererFactory2), inject(_AnimationEngine), inject(NgZone)); | ||
| } | ||
| const SHARED_ANIMATION_PROVIDERS = [ | ||
| { provide: _AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer }, | ||
| { provide: _AnimationEngine, useClass: InjectableAnimationEngine }, | ||
| { | ||
| provide: RendererFactory2, | ||
| useFactory: instantiateRendererFactory, | ||
| }, | ||
| ]; | ||
| /** | ||
| * Separate providers from the actual module so that we can do a local modification in Google3 to | ||
| * include them in the BrowserTestingModule. | ||
| */ | ||
| const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [ | ||
| { provide: AnimationDriver, useClass: NoopAnimationDriver }, | ||
| { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }, | ||
| ...SHARED_ANIMATION_PROVIDERS, | ||
| ]; | ||
| /** | ||
| * Separate providers from the actual module so that we can do a local modification in Google3 to | ||
| * include them in the BrowserModule. | ||
| */ | ||
| const BROWSER_ANIMATIONS_PROVIDERS = [ | ||
| // Note: the `ngServerMode` happen inside factories to give the variable time to initialize. | ||
| { | ||
| provide: AnimationDriver, | ||
| useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode | ||
| ? new NoopAnimationDriver() | ||
| : new _WebAnimationsDriver(), | ||
| }, | ||
| { | ||
| provide: ANIMATION_MODULE_TYPE, | ||
| useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations', | ||
| }, | ||
| ...SHARED_ANIMATION_PROVIDERS, | ||
| ]; | ||
| const SHARED_ANIMATION_PROVIDERS = [{ | ||
| provide: _AnimationStyleNormalizer, | ||
| useFactory: instantiateDefaultStyleNormalizer | ||
| }, { | ||
| provide: _AnimationEngine, | ||
| useClass: InjectableAnimationEngine | ||
| }, { | ||
| provide: RendererFactory2, | ||
| useFactory: instantiateRendererFactory | ||
| }]; | ||
| const BROWSER_NOOP_ANIMATIONS_PROVIDERS = [{ | ||
| provide: AnimationDriver, | ||
| useClass: NoopAnimationDriver | ||
| }, { | ||
| provide: ANIMATION_MODULE_TYPE, | ||
| useValue: 'NoopAnimations' | ||
| }, ...SHARED_ANIMATION_PROVIDERS]; | ||
| const BROWSER_ANIMATIONS_PROVIDERS = [{ | ||
| provide: AnimationDriver, | ||
| useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? new NoopAnimationDriver() : new _WebAnimationsDriver() | ||
| }, { | ||
| provide: ANIMATION_MODULE_TYPE, | ||
| useFactory: () => typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations' | ||
| }, ...SHARED_ANIMATION_PROVIDERS]; | ||
| /** | ||
| * Exports `BrowserModule` with additional dependency-injection providers | ||
| * for use with animations. See [Animations](guide/animations). | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class BrowserAnimationsModule { | ||
| /** | ||
| * Configures the module based on the specified object. | ||
| * | ||
| * @param config Object used to configure the behavior of the `BrowserAnimationsModule`. | ||
| * @see {@link BrowserAnimationsModuleConfig} | ||
| * | ||
| * @usageNotes | ||
| * When registering the `BrowserAnimationsModule`, you can use the `withConfig` | ||
| * function as follows: | ||
| * ```ts | ||
| * @NgModule({ | ||
| * imports: [BrowserAnimationsModule.withConfig(config)] | ||
| * }) | ||
| * class MyNgModule {} | ||
| * ``` | ||
| */ | ||
| static withConfig(config) { | ||
| return { | ||
| ngModule: BrowserAnimationsModule, | ||
| providers: config.disableAnimations | ||
| ? BROWSER_NOOP_ANIMATIONS_PROVIDERS | ||
| : BROWSER_ANIMATIONS_PROVIDERS, | ||
| }; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserAnimationsModule, exports: [BrowserModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserAnimationsModule, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] }); | ||
| static withConfig(config) { | ||
| return { | ||
| ngModule: BrowserAnimationsModule, | ||
| providers: config.disableAnimations ? BROWSER_NOOP_ANIMATIONS_PROVIDERS : BROWSER_ANIMATIONS_PROVIDERS | ||
| }; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserAnimationsModule, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.NgModule | ||
| }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ | ||
| minVersion: "14.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserAnimationsModule, | ||
| exports: [BrowserModule] | ||
| }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserAnimationsModule, | ||
| providers: BROWSER_ANIMATIONS_PROVIDERS, | ||
| imports: [BrowserModule] | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserAnimationsModule, decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: BROWSER_ANIMATIONS_PROVIDERS, | ||
| }] | ||
| }] }); | ||
| /** | ||
| * Returns the set of dependency-injection providers | ||
| * to enable animations in an application. See [animations guide](guide/animations) | ||
| * to learn more about animations in Angular. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * The function is useful when you want to enable animations in an application | ||
| * bootstrapped using the `bootstrapApplication` function. In this scenario there | ||
| * is no need to import the `BrowserAnimationsModule` NgModule at all, just add | ||
| * providers returned by this function to the `providers` list as show below. | ||
| * | ||
| * ```ts | ||
| * bootstrapApplication(RootComponent, { | ||
| * providers: [ | ||
| * provideAnimations() | ||
| * ] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| * | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserAnimationsModule, | ||
| decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: BROWSER_ANIMATIONS_PROVIDERS | ||
| }] | ||
| }] | ||
| }); | ||
| function provideAnimations() { | ||
| _performanceMarkFeature('NgEagerAnimations'); | ||
| // Return a copy to prevent changes to the original array in case any in-place | ||
| // alterations are performed to the `provideAnimations` call results in app code. | ||
| return [...BROWSER_ANIMATIONS_PROVIDERS]; | ||
| _performanceMarkFeature('NgEagerAnimations'); | ||
| return [...BROWSER_ANIMATIONS_PROVIDERS]; | ||
| } | ||
| /** | ||
| * A null player that must be imported to allow disabling of animations. | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| class NoopAnimationsModule { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: NoopAnimationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.9", ngImport: i0, type: NoopAnimationsModule, exports: [BrowserModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: NoopAnimationsModule, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: NoopAnimationsModule, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.NgModule | ||
| }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ | ||
| minVersion: "14.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: NoopAnimationsModule, | ||
| exports: [BrowserModule] | ||
| }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: NoopAnimationsModule, | ||
| providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, | ||
| imports: [BrowserModule] | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: NoopAnimationsModule, decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, | ||
| }] | ||
| }] }); | ||
| /** | ||
| * Returns the set of dependency-injection providers | ||
| * to disable animations in an application. See [animations guide](guide/animations) | ||
| * to learn more about animations in Angular. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * The function is useful when you want to bootstrap an application using | ||
| * the `bootstrapApplication` function, but you need to disable animations | ||
| * (for example, when running tests). | ||
| * | ||
| * ```ts | ||
| * bootstrapApplication(RootComponent, { | ||
| * providers: [ | ||
| * provideNoopAnimations() | ||
| * ] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23 | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: NoopAnimationsModule, | ||
| decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS | ||
| }] | ||
| }] | ||
| }); | ||
| function provideNoopAnimations() { | ||
| // Return a copy to prevent changes to the original array in case any in-place | ||
| // alterations are performed to the `provideNoopAnimations` call results in app code. | ||
| return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS]; | ||
| return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS]; | ||
| } | ||
@@ -198,0 +185,0 @@ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"animations.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/providers.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AnimationDriver,\n NoopAnimationDriver,\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n ɵAnimationStyleNormalizer as AnimationStyleNormalizer,\n ɵWebAnimationsDriver as WebAnimationsDriver,\n ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,\n} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n inject,\n Inject,\n Injectable,\n NgZone,\n OnDestroy,\n Provider,\n RendererFactory2,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../index';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document,\n driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer,\n ) {\n super(doc, driver, normalizer);\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory() {\n return new AnimationRendererFactory(\n inject(DomRendererFactory2),\n inject(AnimationEngine),\n inject(NgZone),\n );\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine},\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n },\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n // Note: the `ngServerMode` happen inside factories to give the variable time to initialize.\n {\n provide: AnimationDriver,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? new NoopAnimationDriver()\n : new WebAnimationsDriver(),\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ...SHARED_ANIMATION_PROVIDERS,\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {\n ModuleWithProviders,\n NgModule,\n Provider,\n ɵperformanceMarkFeature as performanceMarkFeature,\n} from '@angular/core';\nimport {BrowserModule} from '../../index';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Object used to configure the behavior of {@link BrowserAnimationsModule}\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport interface BrowserAnimationsModuleConfig {\n /**\n * Whether animations should be disabled. Passing this is identical to providing the\n * `NoopAnimationsModule`, but it can be controlled based on a runtime value.\n */\n disableAnimations?: boolean;\n}\n\n/**\n * Exports `BrowserModule` with additional dependency-injection providers\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n})\nexport class BrowserAnimationsModule {\n /**\n * Configures the module based on the specified object.\n *\n * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.\n * @see {@link BrowserAnimationsModuleConfig}\n *\n * @usageNotes\n * When registering the `BrowserAnimationsModule`, you can use the `withConfig`\n * function as follows:\n * ```ts\n * @NgModule({\n * imports: [BrowserAnimationsModule.withConfig(config)]\n * })\n * class MyNgModule {}\n * ```\n */\n static withConfig(\n config: BrowserAnimationsModuleConfig,\n ): ModuleWithProviders<BrowserAnimationsModule> {\n return {\n ngModule: BrowserAnimationsModule,\n providers: config.disableAnimations\n ? BROWSER_NOOP_ANIMATIONS_PROVIDERS\n : BROWSER_ANIMATIONS_PROVIDERS,\n };\n }\n}\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n *\n */\nexport function provideAnimations(): Provider[] {\n performanceMarkFeature('NgEagerAnimations');\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideAnimations` call results in app code.\n return [...BROWSER_ANIMATIONS_PROVIDERS];\n}\n\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\n@NgModule({\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n})\nexport class NoopAnimationsModule {}\n\n/**\n * Returns the set of dependency-injection providers\n * to disable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * @usageNotes\n *\n * The function is useful when you want to bootstrap an application using\n * the `bootstrapApplication` function, but you need to disable animations\n * (for example, when running tests).\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n * providers: [\n * provideNoopAnimations()\n * ]\n * });\n * ```\n *\n * @publicApi\n *\n * @deprecated 20.2 Use `animate.enter` or `animate.leave` instead. Intent to remove in v23\n */\nexport function provideNoopAnimations(): Provider[] {\n // Return a copy to prevent changes to the original array in case any in-place\n // alterations are performed to the `provideNoopAnimations` call results in app code.\n return [...BROWSER_NOOP_ANIMATIONS_PROVIDERS];\n}\n"],"names":["AnimationEngine","WebAnimationsStyleNormalizer","AnimationRendererFactory","AnimationStyleNormalizer","WebAnimationsDriver","performanceMarkFeature"],"mappings":";;;;;;;;;;;;;;;AA+BM,MAAO,yBAA0B,SAAQA,gBAAe,CAAA;;;;AAI5D,IAAA,WAAA,CACoB,GAAa,EAC/B,MAAuB,EACvB,UAAoC,EAAA;AAEpC,QAAA,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC;;IAGhC,WAAW,GAAA;QACT,IAAI,CAAC,KAAK,EAAE;;AAbH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,kBAK1B,QAAQ,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,yBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;sHALP,yBAAyB,EAAA,CAAA;;sGAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;0BAMI,MAAM;2BAAC,QAAQ;;SAYJ,iCAAiC,GAAA;IAC/C,OAAO,IAAIC,6BAA4B,EAAE;AAC3C;SAEgB,0BAA0B,GAAA;AACxC,IAAA,OAAO,IAAIC,yBAAwB,CACjC,MAAM,CAAC,mBAAmB,CAAC,EAC3B,MAAM,CAACF,gBAAe,CAAC,EACvB,MAAM,CAAC,MAAM,CAAC,CACf;AACH;AAEA,MAAM,0BAA0B,GAAe;AAC7C,IAAA,EAAC,OAAO,EAAEG,yBAAwB,EAAE,UAA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64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/animations/src/providers.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n AnimationDriver,\n NoopAnimationDriver,\n ɵAnimationEngine as AnimationEngine,\n ɵAnimationRendererFactory as AnimationRendererFactory,\n ɵAnimationStyleNormalizer as AnimationStyleNormalizer,\n ɵWebAnimationsDriver as WebAnimationsDriver,\n ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,\n} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ANIMATION_MODULE_TYPE,\n inject,\n Inject,\n Injectable,\n NgZone,\n OnDestroy,\n Provider,\n RendererFactory2,\n} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '../../index';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine implements OnDestroy {\n // The `ApplicationRef` is injected here explicitly to force the dependency ordering.\n // Since the `ApplicationRef` should be created earlier before the `AnimationEngine`, they\n // both have `ngOnDestroy` hooks and `flush()` must be called after all views are destroyed.\n constructor(\n @Inject(DOCUMENT) doc: Document,\n driver: AnimationDriver,\n normalizer: AnimationStyleNormalizer,\n ) {\n super(doc, driver, normalizer);\n }\n\n ngOnDestroy(): void {\n this.flush();\n }\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory() {\n return new AnimationRendererFactory(\n inject(DomRendererFactory2),\n inject(AnimationEngine),\n inject(NgZone),\n );\n}\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n {provide: AnimationEngine, useClass: InjectableAnimationEngine},\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n },\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n {provide: AnimationDriver, useClass: NoopAnimationDriver},\n {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'},\n ...SHARED_ANIMATION_PROVIDERS,\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n // Note: the `ngServerMode` happen inside factories to give the variable time to initialize.\n {\n provide: AnimationDriver,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode\n ? new NoopAnimationDriver()\n : new WebAnimationsDriver(),\n },\n {\n provide: ANIMATION_MODULE_TYPE,\n useFactory: () =>\n typeof ngServerMode !== 'undefined' && ngServerMode ? 'NoopAnimations' : 'BrowserAnimations',\n },\n ...SHARED_ANIMATION_PROVIDERS,\n];\n"],"names":["InjectableAnimationEngine","AnimationEngine","constructor","normalizer","ngOnDestroy","flush","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","deps","token","DOCUMENT","i1","AnimationDriver","ɵAnimationStyleNormalizer","target","ɵɵFactoryTarget","Injectable","ɵprov","ɵɵngDeclareInjectable","ctorParameters","Document","decorators","Inject","inject","DomRendererFactory2","NgZone","provide","AnimationStyleNormalizer","useFactory","instantiateDefaultStyleNormalizer","RendererFactory2","instantiateRendererFactory","BROWSER_NOOP_ANIMATIONS_PROVIDERS"],"mappings":";;;;;;;;;;;;;;;AA+BM,MAAAA,yBAAA,SAAAC,gBAAA,CAAA;AAqBNC,EAAAA,yBAA0CC,UAAA,EAAA;;;AAQ1CC,EAAAA;AACE,IAAA,IAAA,CAAAC,KAAA,EAAA;AACA;AACA,EAAA,OAAAC,IAAA,GAAAC,EAAA,CAAAC,kBAAA,CAAA;IAAAC,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAJ,EAAA;AAAAK,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/** | ||
| * A service for managing HTML `<meta>` tags. | ||
| * | ||
| * Properties of the `MetaDefinition` object match the attributes of the | ||
| * HTML `<meta>` tag. These tags define document metadata that is important for | ||
| * things like configuring a Content Security Policy, defining browser compatibility | ||
| * and security settings, setting HTTP Headers, defining rich content for social sharing, | ||
| * and Search Engine Optimization (SEO). | ||
| * | ||
| * To identify specific `<meta>` tags in a document, use an attribute selection | ||
| * string in the format `"tag_attribute='value string'"`. | ||
| * For example, an `attrSelector` value of `"name='description'"` matches a tag | ||
| * whose `name` attribute has the value `"description"`. | ||
| * Selectors are used with the `querySelector()` Document method, | ||
| * in the format `meta[{attrSelector}]`. | ||
| * | ||
| * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta) | ||
| * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector) | ||
| * | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class Meta { | ||
| _doc; | ||
| _dom; | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| this._dom = _getDOM(); | ||
| _doc; | ||
| _dom; | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| this._dom = _getDOM(); | ||
| } | ||
| addTag(tag, forceCreation = false) { | ||
| if (!tag) return null; | ||
| return this._getOrCreateElement(tag, forceCreation); | ||
| } | ||
| addTags(tags, forceCreation = false) { | ||
| if (!tags) return []; | ||
| return tags.reduce((result, tag) => { | ||
| if (tag) { | ||
| result.push(this._getOrCreateElement(tag, forceCreation)); | ||
| } | ||
| return result; | ||
| }, []); | ||
| } | ||
| getTag(attrSelector) { | ||
| if (!attrSelector) return null; | ||
| return this._doc.querySelector(`meta[${attrSelector}]`) || null; | ||
| } | ||
| getTags(attrSelector) { | ||
| if (!attrSelector) return []; | ||
| const list = this._doc.querySelectorAll(`meta[${attrSelector}]`); | ||
| return list ? [].slice.call(list) : []; | ||
| } | ||
| updateTag(tag, selector) { | ||
| if (!tag) return null; | ||
| selector = selector || this._parseSelector(tag); | ||
| const meta = this.getTag(selector); | ||
| if (meta) { | ||
| return this._setMetaElementAttributes(tag, meta); | ||
| } | ||
| /** | ||
| * Retrieves or creates a specific `<meta>` tag element in the current HTML document. | ||
| * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute | ||
| * values in the provided tag definition, and verifies that all other attribute values are equal. | ||
| * If an existing element is found, it is returned and is not modified in any way. | ||
| * @param tag The definition of a `<meta>` element to match or create. | ||
| * @param forceCreation True to create a new element without checking whether one already exists. | ||
| * @returns The existing element with the same attributes and values if found, | ||
| * the new element if no match is found, or `null` if the tag parameter is not defined. | ||
| */ | ||
| addTag(tag, forceCreation = false) { | ||
| if (!tag) | ||
| return null; | ||
| return this._getOrCreateElement(tag, forceCreation); | ||
| return this._getOrCreateElement(tag, true); | ||
| } | ||
| removeTag(attrSelector) { | ||
| this.removeTagElement(this.getTag(attrSelector)); | ||
| } | ||
| removeTagElement(meta) { | ||
| if (meta) { | ||
| this._dom.remove(meta); | ||
| } | ||
| /** | ||
| * Retrieves or creates a set of `<meta>` tag elements in the current HTML document. | ||
| * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute | ||
| * values in the provided tag definition, and verifies that all other attribute values are equal. | ||
| * @param tags An array of tag definitions to match or create. | ||
| * @param forceCreation True to create new elements without checking whether they already exist. | ||
| * @returns The matching elements if found, or the new elements. | ||
| */ | ||
| addTags(tags, forceCreation = false) { | ||
| if (!tags) | ||
| return []; | ||
| return tags.reduce((result, tag) => { | ||
| if (tag) { | ||
| result.push(this._getOrCreateElement(tag, forceCreation)); | ||
| } | ||
| return result; | ||
| }, []); | ||
| } | ||
| _getOrCreateElement(meta, forceCreation = false) { | ||
| if (!forceCreation) { | ||
| const selector = this._parseSelector(meta); | ||
| const elem = this.getTags(selector).filter(elem => this._containsAttributes(meta, elem))[0]; | ||
| if (elem !== undefined) return elem; | ||
| } | ||
| /** | ||
| * Retrieves a `<meta>` tag element in the current HTML document. | ||
| * @param attrSelector The tag attribute and value to match against, in the format | ||
| * `"tag_attribute='value string'"`. | ||
| * @returns The matching element, if any. | ||
| */ | ||
| getTag(attrSelector) { | ||
| if (!attrSelector) | ||
| return null; | ||
| return this._doc.querySelector(`meta[${attrSelector}]`) || null; | ||
| } | ||
| /** | ||
| * Retrieves a set of `<meta>` tag elements in the current HTML document. | ||
| * @param attrSelector The tag attribute and value to match against, in the format | ||
| * `"tag_attribute='value string'"`. | ||
| * @returns The matching elements, if any. | ||
| */ | ||
| getTags(attrSelector) { | ||
| if (!attrSelector) | ||
| return []; | ||
| const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`); | ||
| return list ? [].slice.call(list) : []; | ||
| } | ||
| /** | ||
| * Modifies an existing `<meta>` tag element in the current HTML document. | ||
| * @param tag The tag description with which to replace the existing tag content. | ||
| * @param selector A tag attribute and value to match against, to identify | ||
| * an existing tag. A string in the format `"tag_attribute=`value string`"`. | ||
| * If not supplied, matches a tag with the same `name` or `property` attribute value as the | ||
| * replacement tag. | ||
| * @return The modified element. | ||
| */ | ||
| updateTag(tag, selector) { | ||
| if (!tag) | ||
| return null; | ||
| selector = selector || this._parseSelector(tag); | ||
| const meta = this.getTag(selector); | ||
| if (meta) { | ||
| return this._setMetaElementAttributes(tag, meta); | ||
| } | ||
| return this._getOrCreateElement(tag, true); | ||
| } | ||
| /** | ||
| * Removes an existing `<meta>` tag element from the current HTML document. | ||
| * @param attrSelector A tag attribute and value to match against, to identify | ||
| * an existing tag. A string in the format `"tag_attribute=`value string`"`. | ||
| */ | ||
| removeTag(attrSelector) { | ||
| this.removeTagElement(this.getTag(attrSelector)); | ||
| } | ||
| /** | ||
| * Removes an existing `<meta>` tag element from the current HTML document. | ||
| * @param meta The tag definition to match against to identify an existing tag. | ||
| */ | ||
| removeTagElement(meta) { | ||
| if (meta) { | ||
| this._dom.remove(meta); | ||
| } | ||
| } | ||
| _getOrCreateElement(meta, forceCreation = false) { | ||
| if (!forceCreation) { | ||
| const selector = this._parseSelector(meta); | ||
| // It's allowed to have multiple elements with the same name so it's not enough to | ||
| // just check that element with the same name already present on the page. We also need to | ||
| // check if element has tag attributes | ||
| const elem = this.getTags(selector).filter((elem) => this._containsAttributes(meta, elem))[0]; | ||
| if (elem !== undefined) | ||
| return elem; | ||
| } | ||
| const element = this._dom.createElement('meta'); | ||
| this._setMetaElementAttributes(meta, element); | ||
| const head = this._doc.getElementsByTagName('head')[0]; | ||
| head.appendChild(element); | ||
| return element; | ||
| } | ||
| _setMetaElementAttributes(tag, el) { | ||
| Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop])); | ||
| return el; | ||
| } | ||
| _parseSelector(tag) { | ||
| const attr = tag.name ? 'name' : 'property'; | ||
| return `${attr}="${tag[attr]}"`; | ||
| } | ||
| _containsAttributes(tag, elem) { | ||
| return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]); | ||
| } | ||
| _getMetaKeyMap(prop) { | ||
| return META_KEYS_MAP[prop] || prop; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Meta, providedIn: 'root' }); | ||
| const element = this._dom.createElement('meta'); | ||
| this._setMetaElementAttributes(meta, element); | ||
| const head = this._doc.getElementsByTagName('head')[0]; | ||
| head.appendChild(element); | ||
| return element; | ||
| } | ||
| _setMetaElementAttributes(tag, el) { | ||
| Object.keys(tag).forEach(prop => el.setAttribute(this._getMetaKeyMap(prop), tag[prop])); | ||
| return el; | ||
| } | ||
| _parseSelector(tag) { | ||
| const attr = tag.name ? 'name' : 'property'; | ||
| return `${attr}="${tag[attr]}"`; | ||
| } | ||
| _containsAttributes(tag, elem) { | ||
| return Object.keys(tag).every(key => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]); | ||
| } | ||
| _getMetaKeyMap(prop) { | ||
| return META_KEYS_MAP[prop] || prop; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Meta, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Meta, | ||
| providedIn: 'root' | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Meta, decorators: [{ | ||
| type: Injectable, | ||
| args: [{ providedIn: 'root' }] | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| /** | ||
| * Mapping for MetaDefinition properties with their correct meta attribute names | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Meta, | ||
| decorators: [{ | ||
| type: Injectable, | ||
| args: [{ | ||
| providedIn: 'root' | ||
| }] | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| const META_KEYS_MAP = { | ||
| httpEquiv: 'http-equiv', | ||
| httpEquiv: 'http-equiv' | ||
| }; | ||
| /** | ||
| * A service that can be used to get and set the title of a current HTML document. | ||
| * | ||
| * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag) | ||
| * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements | ||
| * (representing the `<title>` tag). Instead, this service can be used to set and get the current | ||
| * title value. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class Title { | ||
| _doc; | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| } | ||
| /** | ||
| * Get the title of the current HTML document. | ||
| */ | ||
| getTitle() { | ||
| return this._doc.title; | ||
| } | ||
| /** | ||
| * Set the title of the current HTML document. | ||
| * @param newTitle | ||
| */ | ||
| setTitle(newTitle) { | ||
| this._doc.title = newTitle || ''; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Title, providedIn: 'root' }); | ||
| _doc; | ||
| constructor(_doc) { | ||
| this._doc = _doc; | ||
| } | ||
| getTitle() { | ||
| return this._doc.title; | ||
| } | ||
| setTitle(newTitle) { | ||
| this._doc.title = newTitle || ''; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Title, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Title, | ||
| providedIn: 'root' | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: Title, decorators: [{ | ||
| type: Injectable, | ||
| args: [{ providedIn: 'root' }] | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: Title, | ||
| decorators: [{ | ||
| type: Injectable, | ||
| args: [{ | ||
| providedIn: 'root' | ||
| }] | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| /// <reference path="../../../goog.d.ts" /> | ||
| /** | ||
| * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if | ||
| * `name` is `'probe'`. | ||
| * @param name Name under which it will be exported. Keep in mind this will be a property of the | ||
| * global `ng` object. | ||
| * @param value The value to export. | ||
| */ | ||
| function exportNgVar(name, value) { | ||
| if (typeof COMPILED === 'undefined' || !COMPILED) { | ||
| // Note: we can't export `ng` when using closure enhanced optimization as: | ||
| // - closure declares globals itself for minified names, which sometimes clobber our `ng` global | ||
| // - we can't declare a closure extern as the namespace `ng` is already used within Google | ||
| // for typings for angularJS (via `goog.provide('ng....')`). | ||
| const ng = (_global['ng'] = _global['ng'] || {}); | ||
| ng[name] = value; | ||
| } | ||
| if (typeof COMPILED === 'undefined' || !COMPILED) { | ||
| const ng = _global['ng'] = _global['ng'] || {}; | ||
| ng[name] = value; | ||
| } | ||
| } | ||
| class ChangeDetectionPerfRecord { | ||
| msPerTick; | ||
| numTicks; | ||
| constructor(msPerTick, numTicks) { | ||
| this.msPerTick = msPerTick; | ||
| this.numTicks = numTicks; | ||
| } | ||
| msPerTick; | ||
| numTicks; | ||
| constructor(msPerTick, numTicks) { | ||
| this.msPerTick = msPerTick; | ||
| this.numTicks = numTicks; | ||
| } | ||
| } | ||
| /** | ||
| * Entry point for all Angular profiling-related debug tools. This object | ||
| * corresponds to the `ng.profiler` in the dev console. | ||
| */ | ||
| class AngularProfiler { | ||
| appRef; | ||
| constructor(ref) { | ||
| this.appRef = ref.injector.get(ApplicationRef); | ||
| appRef; | ||
| constructor(ref) { | ||
| this.appRef = ref.injector.get(ApplicationRef); | ||
| } | ||
| timeChangeDetection(config) { | ||
| const record = config && config['record']; | ||
| const profileName = 'Change Detection'; | ||
| if (record && 'profile' in console && typeof console.profile === 'function') { | ||
| console.profile(profileName); | ||
| } | ||
| // tslint:disable:no-console | ||
| /** | ||
| * Exercises change detection in a loop and then prints the average amount of | ||
| * time in milliseconds how long a single round of change detection takes for | ||
| * the current state of the UI. It runs a minimum of 5 rounds for a minimum | ||
| * of 500 milliseconds. | ||
| * | ||
| * Optionally, a user may pass a `config` parameter containing a map of | ||
| * options. Supported options are: | ||
| * | ||
| * `record` (boolean) - causes the profiler to record a CPU profile while | ||
| * it exercises the change detector. Example: | ||
| * | ||
| * ```ts | ||
| * ng.profiler.timeChangeDetection({record: true}) | ||
| * ``` | ||
| */ | ||
| timeChangeDetection(config) { | ||
| const record = config && config['record']; | ||
| const profileName = 'Change Detection'; | ||
| // Profiler is not available in Android browsers without dev tools opened | ||
| if (record && 'profile' in console && typeof console.profile === 'function') { | ||
| console.profile(profileName); | ||
| } | ||
| const start = performance.now(); | ||
| let numTicks = 0; | ||
| while (numTicks < 5 || performance.now() - start < 500) { | ||
| this.appRef.tick(); | ||
| numTicks++; | ||
| } | ||
| const end = performance.now(); | ||
| if (record && 'profileEnd' in console && typeof console.profileEnd === 'function') { | ||
| console.profileEnd(profileName); | ||
| } | ||
| const msPerTick = (end - start) / numTicks; | ||
| console.log(`ran ${numTicks} change detection cycles`); | ||
| console.log(`${msPerTick.toFixed(2)} ms per check`); | ||
| return new ChangeDetectionPerfRecord(msPerTick, numTicks); | ||
| const start = performance.now(); | ||
| let numTicks = 0; | ||
| while (numTicks < 5 || performance.now() - start < 500) { | ||
| this.appRef.tick(); | ||
| numTicks++; | ||
| } | ||
| const end = performance.now(); | ||
| if (record && 'profileEnd' in console && typeof console.profileEnd === 'function') { | ||
| console.profileEnd(profileName); | ||
| } | ||
| const msPerTick = (end - start) / numTicks; | ||
| console.log(`ran ${numTicks} change detection cycles`); | ||
| console.log(`${msPerTick.toFixed(2)} ms per check`); | ||
| return new ChangeDetectionPerfRecord(msPerTick, numTicks); | ||
| } | ||
| } | ||
| const PROFILER_GLOBAL_NAME = 'profiler'; | ||
| /** | ||
| * Enabled Angular debug tools that are accessible via your browser's | ||
| * developer console. | ||
| * | ||
| * Usage: | ||
| * | ||
| * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j) | ||
| * 1. Type `ng.` (usually the console will show auto-complete suggestion) | ||
| * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` | ||
| * then hit Enter. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function enableDebugTools(ref) { | ||
| exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref)); | ||
| return ref; | ||
| exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref)); | ||
| return ref; | ||
| } | ||
| /** | ||
| * Disables Angular tools. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function disableDebugTools() { | ||
| exportNgVar(PROFILER_GLOBAL_NAME, null); | ||
| exportNgVar(PROFILER_GLOBAL_NAME, null); | ||
| } | ||
| /** | ||
| * Predicates for use with {@link DebugElement}'s query functions. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class By { | ||
| /** | ||
| * Match all nodes. | ||
| * | ||
| * @usageNotes | ||
| * ### Example | ||
| * | ||
| * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'} | ||
| */ | ||
| static all() { | ||
| return () => true; | ||
| } | ||
| /** | ||
| * Match elements by the given CSS selector. | ||
| * | ||
| * @usageNotes | ||
| * ### Example | ||
| * | ||
| * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'} | ||
| */ | ||
| static css(selector) { | ||
| return (debugElement) => { | ||
| return debugElement.nativeElement != null | ||
| ? elementMatches(debugElement.nativeElement, selector) | ||
| : false; | ||
| }; | ||
| } | ||
| /** | ||
| * Match nodes that have the given directive present. | ||
| * | ||
| * @usageNotes | ||
| * ### Example | ||
| * | ||
| * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'} | ||
| */ | ||
| static directive(type) { | ||
| return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1; | ||
| } | ||
| static all() { | ||
| return () => true; | ||
| } | ||
| static css(selector) { | ||
| return debugElement => { | ||
| return debugElement.nativeElement != null ? elementMatches(debugElement.nativeElement, selector) : false; | ||
| }; | ||
| } | ||
| static directive(type) { | ||
| return debugNode => debugNode.providerTokens.indexOf(type) !== -1; | ||
| } | ||
| } | ||
| function elementMatches(n, selector) { | ||
| if (_getDOM().isElementNode(n)) { | ||
| return ((n.matches && n.matches(selector)) || | ||
| (n.msMatchesSelector && n.msMatchesSelector(selector)) || | ||
| (n.webkitMatchesSelector && n.webkitMatchesSelector(selector))); | ||
| } | ||
| return false; | ||
| if (_getDOM().isElementNode(n)) { | ||
| return n.matches && n.matches(selector) || n.msMatchesSelector && n.msMatchesSelector(selector) || n.webkitMatchesSelector && n.webkitMatchesSelector(selector); | ||
| } | ||
| return false; | ||
| } | ||
| /// <reference types="hammerjs" /> | ||
| /** | ||
| * Supported HammerJS recognizer event names. | ||
| */ | ||
| const EVENT_NAMES = { | ||
| // pan | ||
| 'pan': true, | ||
| 'panstart': true, | ||
| 'panmove': true, | ||
| 'panend': true, | ||
| 'pancancel': true, | ||
| 'panleft': true, | ||
| 'panright': true, | ||
| 'panup': true, | ||
| 'pandown': true, | ||
| // pinch | ||
| 'pinch': true, | ||
| 'pinchstart': true, | ||
| 'pinchmove': true, | ||
| 'pinchend': true, | ||
| 'pinchcancel': true, | ||
| 'pinchin': true, | ||
| 'pinchout': true, | ||
| // press | ||
| 'press': true, | ||
| 'pressup': true, | ||
| // rotate | ||
| 'rotate': true, | ||
| 'rotatestart': true, | ||
| 'rotatemove': true, | ||
| 'rotateend': true, | ||
| 'rotatecancel': true, | ||
| // swipe | ||
| 'swipe': true, | ||
| 'swipeleft': true, | ||
| 'swiperight': true, | ||
| 'swipeup': true, | ||
| 'swipedown': true, | ||
| // tap | ||
| 'tap': true, | ||
| 'doubletap': true, | ||
| 'pan': true, | ||
| 'panstart': true, | ||
| 'panmove': true, | ||
| 'panend': true, | ||
| 'pancancel': true, | ||
| 'panleft': true, | ||
| 'panright': true, | ||
| 'panup': true, | ||
| 'pandown': true, | ||
| 'pinch': true, | ||
| 'pinchstart': true, | ||
| 'pinchmove': true, | ||
| 'pinchend': true, | ||
| 'pinchcancel': true, | ||
| 'pinchin': true, | ||
| 'pinchout': true, | ||
| 'press': true, | ||
| 'pressup': true, | ||
| 'rotate': true, | ||
| 'rotatestart': true, | ||
| 'rotatemove': true, | ||
| 'rotateend': true, | ||
| 'rotatecancel': true, | ||
| 'swipe': true, | ||
| 'swipeleft': true, | ||
| 'swiperight': true, | ||
| 'swipeup': true, | ||
| 'swipedown': true, | ||
| 'tap': true, | ||
| 'doubletap': true | ||
| }; | ||
| /** | ||
| * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular. | ||
| * @see {@link HammerGestureConfig} | ||
| * | ||
| * @ngModule HammerModule | ||
| * @publicApi | ||
| * | ||
| * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation. | ||
| */ | ||
| const HAMMER_GESTURE_CONFIG = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerGestureConfig' : ''); | ||
| /** | ||
| * Injection token used to provide a HammerLoader to Angular. | ||
| * | ||
| * @see {@link HammerLoader} | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation. | ||
| */ | ||
| const HAMMER_LOADER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerLoader' : ''); | ||
| /** | ||
| * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) | ||
| * for gesture recognition. Configures specific event recognition. | ||
| * @publicApi | ||
| * | ||
| * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation. | ||
| */ | ||
| class HammerGestureConfig { | ||
| /** | ||
| * A set of supported event names for gestures to be used in Angular. | ||
| * Angular supports all built-in recognizers, as listed in | ||
| * [HammerJS documentation](https://hammerjs.github.io/). | ||
| */ | ||
| events = []; | ||
| /** | ||
| * Maps gesture event names to a set of configuration options | ||
| * that specify overrides to the default values for specific properties. | ||
| * | ||
| * The key is a supported event name to be configured, | ||
| * and the options object contains a set of properties, with override values | ||
| * to be applied to the named recognizer event. | ||
| * For example, to disable recognition of the rotate event, specify | ||
| * `{"rotate": {"enable": false}}`. | ||
| * | ||
| * Properties that are not present take the HammerJS default values. | ||
| * For information about which properties are supported for which events, | ||
| * and their allowed and default values, see | ||
| * [HammerJS documentation](https://hammerjs.github.io/). | ||
| * | ||
| */ | ||
| overrides = {}; | ||
| /** | ||
| * Properties whose default values can be overridden for a given event. | ||
| * Different sets of properties apply to different events. | ||
| * For information about which properties are supported for which events, | ||
| * and their allowed and default values, see | ||
| * [HammerJS documentation](https://hammerjs.github.io/). | ||
| */ | ||
| options; | ||
| /** | ||
| * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager) | ||
| * and attaches it to a given HTML element. | ||
| * @param element The element that will recognize gestures. | ||
| * @returns A HammerJS event-manager object. | ||
| */ | ||
| buildHammer(element) { | ||
| const mc = new Hammer(element, this.options); | ||
| mc.get('pinch').set({ enable: true }); | ||
| mc.get('rotate').set({ enable: true }); | ||
| for (const eventName in this.overrides) { | ||
| mc.get(eventName).set(this.overrides[eventName]); | ||
| } | ||
| return mc; | ||
| events = []; | ||
| overrides = {}; | ||
| options; | ||
| buildHammer(element) { | ||
| const mc = new Hammer(element, this.options); | ||
| mc.get('pinch').set({ | ||
| enable: true | ||
| }); | ||
| mc.get('rotate').set({ | ||
| enable: true | ||
| }); | ||
| for (const eventName in this.overrides) { | ||
| mc.get(eventName).set(this.overrides[eventName]); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGestureConfig }); | ||
| return mc; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGestureConfig, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGestureConfig | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGestureConfig, decorators: [{ | ||
| type: Injectable | ||
| }] }); | ||
| /** | ||
| * Event plugin that adds Hammer support to an application. | ||
| * | ||
| * @ngModule HammerModule | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGestureConfig, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }] | ||
| }); | ||
| class HammerGesturesPlugin extends EventManagerPlugin { | ||
| _config; | ||
| _injector; | ||
| loader; | ||
| _loaderPromise = null; | ||
| constructor(doc, _config, _injector, loader) { | ||
| super(doc); | ||
| this._config = _config; | ||
| this._injector = _injector; | ||
| this.loader = loader; | ||
| _config; | ||
| _injector; | ||
| loader; | ||
| _loaderPromise = null; | ||
| constructor(doc, _config, _injector, loader) { | ||
| super(doc); | ||
| this._config = _config; | ||
| this._injector = _injector; | ||
| this.loader = loader; | ||
| } | ||
| supports(eventName) { | ||
| if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) { | ||
| return false; | ||
| } | ||
| supports(eventName) { | ||
| if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) { | ||
| return false; | ||
| if (!window.Hammer && !this.loader) { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` + `loaded and no custom loader has been specified.`); | ||
| } | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| addEventListener(element, eventName, handler) { | ||
| const zone = this.manager.getZone(); | ||
| eventName = eventName.toLowerCase(); | ||
| if (!window.Hammer && this.loader) { | ||
| this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader()); | ||
| let cancelRegistration = false; | ||
| let deregister = () => { | ||
| cancelRegistration = true; | ||
| }; | ||
| zone.runOutsideAngular(() => this._loaderPromise.then(() => { | ||
| if (!window.Hammer) { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`); | ||
| } | ||
| deregister = () => {}; | ||
| return; | ||
| } | ||
| if (!window.Hammer && !this.loader) { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| // Get a `Console` through an injector to tree-shake the | ||
| // class when it is unused in production. | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The "${eventName}" event cannot be bound because Hammer.JS is not ` + | ||
| `loaded and no custom loader has been specified.`); | ||
| } | ||
| return false; | ||
| if (!cancelRegistration) { | ||
| deregister = this.addEventListener(element, eventName, handler); | ||
| } | ||
| return true; | ||
| }).catch(() => { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The "${eventName}" event cannot be bound because the custom ` + `Hammer.JS loader failed.`); | ||
| } | ||
| deregister = () => {}; | ||
| })); | ||
| return () => { | ||
| deregister(); | ||
| }; | ||
| } | ||
| addEventListener(element, eventName, handler) { | ||
| const zone = this.manager.getZone(); | ||
| eventName = eventName.toLowerCase(); | ||
| // If Hammer is not present but a loader is specified, we defer adding the event listener | ||
| // until Hammer is loaded. | ||
| if (!window.Hammer && this.loader) { | ||
| this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader()); | ||
| // This `addEventListener` method returns a function to remove the added listener. | ||
| // Until Hammer is loaded, the returned function needs to *cancel* the registration rather | ||
| // than remove anything. | ||
| let cancelRegistration = false; | ||
| let deregister = () => { | ||
| cancelRegistration = true; | ||
| }; | ||
| zone.runOutsideAngular(() => this._loaderPromise.then(() => { | ||
| // If Hammer isn't actually loaded when the custom loader resolves, give up. | ||
| if (!window.Hammer) { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`); | ||
| } | ||
| deregister = () => { }; | ||
| return; | ||
| } | ||
| if (!cancelRegistration) { | ||
| // Now that Hammer is loaded and the listener is being loaded for real, | ||
| // the deregistration function changes from canceling registration to | ||
| // removal. | ||
| deregister = this.addEventListener(element, eventName, handler); | ||
| } | ||
| }).catch(() => { | ||
| if (typeof ngDevMode === 'undefined' || ngDevMode) { | ||
| const _console = this._injector.get(_Console); | ||
| _console.warn(`The "${eventName}" event cannot be bound because the custom ` + | ||
| `Hammer.JS loader failed.`); | ||
| } | ||
| deregister = () => { }; | ||
| })); | ||
| // Return a function that *executes* `deregister` (and not `deregister` itself) so that we | ||
| // can change the behavior of `deregister` once the listener is added. Using a closure in | ||
| // this way allows us to avoid any additional data structures to track listener removal. | ||
| return () => { | ||
| deregister(); | ||
| }; | ||
| return zone.runOutsideAngular(() => { | ||
| const mc = this._config.buildHammer(element); | ||
| const callback = function (eventObj) { | ||
| zone.runGuarded(function () { | ||
| handler(eventObj); | ||
| }); | ||
| }; | ||
| mc.on(eventName, callback); | ||
| return () => { | ||
| mc.off(eventName, callback); | ||
| if (typeof mc.destroy === 'function') { | ||
| mc.destroy(); | ||
| } | ||
| return zone.runOutsideAngular(() => { | ||
| // Creating the manager bind events, must be done outside of angular | ||
| const mc = this._config.buildHammer(element); | ||
| const callback = function (eventObj) { | ||
| zone.runGuarded(function () { | ||
| handler(eventObj); | ||
| }); | ||
| }; | ||
| mc.on(eventName, callback); | ||
| return () => { | ||
| mc.off(eventName, callback); | ||
| // destroy mc to prevent memory leak | ||
| if (typeof mc.destroy === 'function') { | ||
| mc.destroy(); | ||
| } | ||
| }; | ||
| }); | ||
| } | ||
| isCustomEvent(eventName) { | ||
| return this._config.events.indexOf(eventName) > -1; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.Injector }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGesturesPlugin }); | ||
| }; | ||
| }); | ||
| } | ||
| isCustomEvent(eventName) { | ||
| return this._config.events.indexOf(eventName) > -1; | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGesturesPlugin, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }, { | ||
| token: HAMMER_GESTURE_CONFIG | ||
| }, { | ||
| token: i0.Injector | ||
| }, { | ||
| token: HAMMER_LOADER, | ||
| optional: true | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGesturesPlugin | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerGesturesPlugin, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }, { type: HammerGestureConfig, decorators: [{ | ||
| type: Inject, | ||
| args: [HAMMER_GESTURE_CONFIG] | ||
| }] }, { type: i0.Injector }, { type: undefined, decorators: [{ | ||
| type: Optional | ||
| }, { | ||
| type: Inject, | ||
| args: [HAMMER_LOADER] | ||
| }] }] }); | ||
| /** | ||
| * Adds support for HammerJS. | ||
| * | ||
| * Import this module at the root of your application so that Angular can work with | ||
| * HammerJS to detect gesture events. | ||
| * | ||
| * Note that applications still need to include the HammerJS script itself. This module | ||
| * simply sets up the coordination layer between HammerJS and Angular's `EventManager`. | ||
| * | ||
| * @publicApi | ||
| * | ||
| * @deprecated The hammer integration is deprecated. Replace it by your own implementation. | ||
| */ | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerGesturesPlugin, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }, { | ||
| type: HammerGestureConfig, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [HAMMER_GESTURE_CONFIG] | ||
| }] | ||
| }, { | ||
| type: i0.Injector | ||
| }, { | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Optional | ||
| }, { | ||
| type: Inject, | ||
| args: [HAMMER_LOADER] | ||
| }] | ||
| }] | ||
| }); | ||
| class HammerModule { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerModule }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerModule, providers: [ | ||
| { | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: HammerGesturesPlugin, | ||
| multi: true, | ||
| deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]], | ||
| }, | ||
| { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig }, | ||
| ] }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerModule, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.NgModule | ||
| }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ | ||
| minVersion: "14.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerModule | ||
| }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerModule, | ||
| providers: [{ | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: HammerGesturesPlugin, | ||
| multi: true, | ||
| deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]] | ||
| }, { | ||
| provide: HAMMER_GESTURE_CONFIG, | ||
| useClass: HammerGestureConfig | ||
| }] | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: HammerModule, decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| providers: [ | ||
| { | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: HammerGesturesPlugin, | ||
| multi: true, | ||
| deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]], | ||
| }, | ||
| { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig }, | ||
| ], | ||
| }] | ||
| }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: HammerModule, | ||
| decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| providers: [{ | ||
| provide: EVENT_MANAGER_PLUGINS, | ||
| useClass: HammerGesturesPlugin, | ||
| multi: true, | ||
| deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]] | ||
| }, { | ||
| provide: HAMMER_GESTURE_CONFIG, | ||
| useClass: HammerGestureConfig | ||
| }] | ||
| }] | ||
| }] | ||
| }); | ||
| /** | ||
| * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing | ||
| * values to be safe to use in the different DOM contexts. | ||
| * | ||
| * For example, when binding a URL in an `<a [href]="someValue">` hyperlink, `someValue` will be | ||
| * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on | ||
| * the website. | ||
| * | ||
| * In specific situations, it might be necessary to disable sanitization, for example if the | ||
| * application genuinely needs to produce a `javascript:` style link with a dynamic value in it. | ||
| * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...` | ||
| * methods, and then binding to that value from the template. | ||
| * | ||
| * These situations should be very rare, and extraordinary care must be taken to avoid creating a | ||
| * Cross Site Scripting (XSS) security bug! | ||
| * | ||
| * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as | ||
| * close as possible to the source of the value, to make it easy to verify no security bug is | ||
| * created by its use. | ||
| * | ||
| * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that | ||
| * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous | ||
| * code. The sanitizer leaves safe values intact. | ||
| * | ||
| * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in | ||
| * sanitization for the value passed in. Carefully check and audit all values and code paths going | ||
| * into this call. Make sure any user data is appropriately escaped for this security context. | ||
| * For more detail, see the [Security Guide](https://g.co/ng/security). | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class DomSanitizer { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizer, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizer, | ||
| providedIn: 'root', | ||
| useExisting: i0.forwardRef(() => DomSanitizerImpl) | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizer, decorators: [{ | ||
| type: Injectable, | ||
| args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }] | ||
| }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizer, | ||
| decorators: [{ | ||
| type: Injectable, | ||
| args: [{ | ||
| providedIn: 'root', | ||
| useExisting: forwardRef(() => DomSanitizerImpl) | ||
| }] | ||
| }] | ||
| }); | ||
| class DomSanitizerImpl extends DomSanitizer { | ||
| _doc; | ||
| constructor(_doc) { | ||
| super(); | ||
| this._doc = _doc; | ||
| } | ||
| sanitize(ctx, value) { | ||
| if (value == null) | ||
| return null; | ||
| switch (ctx) { | ||
| case SecurityContext.NONE: | ||
| return value; | ||
| case SecurityContext.HTML: | ||
| if (_allowSanitizationBypassAndThrow(value, "HTML" /* BypassType.Html */)) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return __sanitizeHtml(this._doc, String(value)).toString(); | ||
| case SecurityContext.STYLE: | ||
| if (_allowSanitizationBypassAndThrow(value, "Style" /* BypassType.Style */)) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return value; | ||
| case SecurityContext.SCRIPT: | ||
| if (_allowSanitizationBypassAndThrow(value, "Script" /* BypassType.Script */)) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| throw new _RuntimeError(5200 /* RuntimeErrorCode.SANITIZATION_UNSAFE_SCRIPT */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| 'unsafe value used in a script context'); | ||
| case SecurityContext.URL: | ||
| if (_allowSanitizationBypassAndThrow(value, "URL" /* BypassType.Url */)) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return __sanitizeUrl(String(value)); | ||
| case SecurityContext.RESOURCE_URL: | ||
| if (_allowSanitizationBypassAndThrow(value, "ResourceURL" /* BypassType.ResourceUrl */)) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| throw new _RuntimeError(5201 /* RuntimeErrorCode.SANITIZATION_UNSAFE_RESOURCE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| `unsafe value used in a resource URL context (see ${_XSS_SECURITY_URL})`); | ||
| default: | ||
| throw new _RuntimeError(5202 /* RuntimeErrorCode.SANITIZATION_UNEXPECTED_CTX */, (typeof ngDevMode === 'undefined' || ngDevMode) && | ||
| `Unexpected SecurityContext ${ctx} (see ${_XSS_SECURITY_URL})`); | ||
| _doc; | ||
| constructor(_doc) { | ||
| super(); | ||
| this._doc = _doc; | ||
| } | ||
| sanitize(ctx, value) { | ||
| if (value == null) return null; | ||
| switch (ctx) { | ||
| case SecurityContext.NONE: | ||
| return value; | ||
| case SecurityContext.HTML: | ||
| if (_allowSanitizationBypassAndThrow(value, "HTML")) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return __sanitizeHtml(this._doc, String(value)).toString(); | ||
| case SecurityContext.STYLE: | ||
| if (_allowSanitizationBypassAndThrow(value, "Style")) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return value; | ||
| case SecurityContext.SCRIPT: | ||
| if (_allowSanitizationBypassAndThrow(value, "Script")) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| throw new _RuntimeError(5200, (typeof ngDevMode === 'undefined' || ngDevMode) && 'unsafe value used in a script context'); | ||
| case SecurityContext.URL: | ||
| if (_allowSanitizationBypassAndThrow(value, "URL")) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| return __sanitizeUrl(String(value)); | ||
| case SecurityContext.RESOURCE_URL: | ||
| if (_allowSanitizationBypassAndThrow(value, "ResourceURL")) { | ||
| return _unwrapSafeValue(value); | ||
| } | ||
| throw new _RuntimeError(5201, (typeof ngDevMode === 'undefined' || ngDevMode) && `unsafe value used in a resource URL context (see ${_XSS_SECURITY_URL})`); | ||
| default: | ||
| throw new _RuntimeError(5202, (typeof ngDevMode === 'undefined' || ngDevMode) && `Unexpected SecurityContext ${ctx} (see ${_XSS_SECURITY_URL})`); | ||
| } | ||
| bypassSecurityTrustHtml(value) { | ||
| return _bypassSanitizationTrustHtml(value); | ||
| } | ||
| bypassSecurityTrustStyle(value) { | ||
| return _bypassSanitizationTrustStyle(value); | ||
| } | ||
| bypassSecurityTrustScript(value) { | ||
| return _bypassSanitizationTrustScript(value); | ||
| } | ||
| bypassSecurityTrustUrl(value) { | ||
| return _bypassSanitizationTrustUrl(value); | ||
| } | ||
| bypassSecurityTrustResourceUrl(value) { | ||
| return _bypassSanitizationTrustResourceUrl(value); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root' }); | ||
| } | ||
| bypassSecurityTrustHtml(value) { | ||
| return _bypassSanitizationTrustHtml(value); | ||
| } | ||
| bypassSecurityTrustStyle(value) { | ||
| return _bypassSanitizationTrustStyle(value); | ||
| } | ||
| bypassSecurityTrustScript(value) { | ||
| return _bypassSanitizationTrustScript(value); | ||
| } | ||
| bypassSecurityTrustUrl(value) { | ||
| return _bypassSanitizationTrustUrl(value); | ||
| } | ||
| bypassSecurityTrustResourceUrl(value) { | ||
| return _bypassSanitizationTrustResourceUrl(value); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizerImpl, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizerImpl, | ||
| providedIn: 'root' | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DomSanitizerImpl, decorators: [{ | ||
| type: Injectable, | ||
| args: [{ providedIn: 'root' }] | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DomSanitizerImpl, | ||
| decorators: [{ | ||
| type: Injectable, | ||
| args: [{ | ||
| providedIn: 'root' | ||
| }] | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| /** | ||
| * The list of features as an enum to uniquely type each `HydrationFeature`. | ||
| * @see {@link HydrationFeature} | ||
| * | ||
| * @publicApi | ||
| */ | ||
| var HydrationFeatureKind; | ||
| (function (HydrationFeatureKind) { | ||
| HydrationFeatureKind[HydrationFeatureKind["NoHttpTransferCache"] = 0] = "NoHttpTransferCache"; | ||
| HydrationFeatureKind[HydrationFeatureKind["HttpTransferCacheOptions"] = 1] = "HttpTransferCacheOptions"; | ||
| HydrationFeatureKind[HydrationFeatureKind["I18nSupport"] = 2] = "I18nSupport"; | ||
| HydrationFeatureKind[HydrationFeatureKind["EventReplay"] = 3] = "EventReplay"; | ||
| HydrationFeatureKind[HydrationFeatureKind["IncrementalHydration"] = 4] = "IncrementalHydration"; | ||
| HydrationFeatureKind[HydrationFeatureKind["NoHttpTransferCache"] = 0] = "NoHttpTransferCache"; | ||
| HydrationFeatureKind[HydrationFeatureKind["HttpTransferCacheOptions"] = 1] = "HttpTransferCacheOptions"; | ||
| HydrationFeatureKind[HydrationFeatureKind["I18nSupport"] = 2] = "I18nSupport"; | ||
| HydrationFeatureKind[HydrationFeatureKind["EventReplay"] = 3] = "EventReplay"; | ||
| HydrationFeatureKind[HydrationFeatureKind["IncrementalHydration"] = 4] = "IncrementalHydration"; | ||
| })(HydrationFeatureKind || (HydrationFeatureKind = {})); | ||
| /** | ||
| * Helper function to create an object that represents a Hydration feature. | ||
| */ | ||
| function hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) { | ||
| return { ɵkind, ɵproviders }; | ||
| return { | ||
| ɵkind, | ||
| ɵproviders | ||
| }; | ||
| } | ||
| /** | ||
| * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the | ||
| * server and other one on the browser. | ||
| * | ||
| * @see [Disabling Caching](guide/ssr#disabling-caching) | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function withNoHttpTransferCache() { | ||
| // This feature has no providers and acts as a flag that turns off | ||
| // HTTP transfer cache (which otherwise is turned on by default). | ||
| return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache); | ||
| return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache); | ||
| } | ||
| /** | ||
| * The function accepts an object, which allows to configure cache parameters, | ||
| * such as which headers should be included (no headers are included by default), | ||
| * whether POST requests should be cached or a callback function to determine if a | ||
| * particular request should be cached. | ||
| * | ||
| * @see [Configuring HTTP transfer cache options](guide/ssr#caching-data-when-using-httpclient) | ||
| * | ||
| * @publicApi | ||
| */ | ||
| function withHttpTransferCacheOptions(options) { | ||
| // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache. | ||
| return hydrationFeature(HydrationFeatureKind.HttpTransferCacheOptions, _withHttpTransferCache(options)); | ||
| return hydrationFeature(HydrationFeatureKind.HttpTransferCacheOptions, _withHttpTransferCache(options)); | ||
| } | ||
| /** | ||
| * Enables support for hydrating i18n blocks. | ||
| * | ||
| * @publicApi 20.0 | ||
| */ | ||
| function withI18nSupport() { | ||
| return hydrationFeature(HydrationFeatureKind.I18nSupport, _withI18nSupport()); | ||
| return hydrationFeature(HydrationFeatureKind.I18nSupport, _withI18nSupport()); | ||
| } | ||
| /** | ||
| * Enables support for replaying user events (e.g. `click`s) that happened on a page | ||
| * before hydration logic has completed. Once an application is hydrated, all captured | ||
| * events are replayed and relevant event listeners are executed. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * Basic example of how you can enable event replay in your application when | ||
| * `bootstrapApplication` function is used: | ||
| * ```ts | ||
| * bootstrapApplication(AppComponent, { | ||
| * providers: [provideClientHydration(withEventReplay())] | ||
| * }); | ||
| * ``` | ||
| * @publicApi | ||
| * @see {@link provideClientHydration} | ||
| */ | ||
| function withEventReplay() { | ||
| return hydrationFeature(HydrationFeatureKind.EventReplay, _withEventReplay()); | ||
| return hydrationFeature(HydrationFeatureKind.EventReplay, _withEventReplay()); | ||
| } | ||
| /** | ||
| * Enables support for incremental hydration using the `hydrate` trigger syntax. | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * Basic example of how you can enable incremental hydration in your application when | ||
| * the `bootstrapApplication` function is used: | ||
| * ```ts | ||
| * bootstrapApplication(AppComponent, { | ||
| * providers: [provideClientHydration(withIncrementalHydration())] | ||
| * }); | ||
| * ``` | ||
| * @publicApi 20.0 | ||
| * @see {@link provideClientHydration} | ||
| */ | ||
| function withIncrementalHydration() { | ||
| return hydrationFeature(HydrationFeatureKind.IncrementalHydration, _withIncrementalHydration()); | ||
| return hydrationFeature(HydrationFeatureKind.IncrementalHydration, _withIncrementalHydration()); | ||
| } | ||
| /** | ||
| * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function | ||
| * that verifies whether enabledBlocking initial navigation is used in an application | ||
| * and logs a warning in a console if it's not compatible with hydration. | ||
| */ | ||
| function provideEnabledBlockingInitialNavigationDetector() { | ||
| return [ | ||
| { | ||
| provide: ENVIRONMENT_INITIALIZER, | ||
| useValue: () => { | ||
| const isEnabledBlockingInitialNavigation = inject(_IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, { | ||
| optional: true, | ||
| }); | ||
| if (isEnabledBlockingInitialNavigation) { | ||
| const console = inject(_Console); | ||
| const message = _formatRuntimeError(5001 /* RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES */, 'Configuration error: found both hydration and enabledBlocking initial navigation ' + | ||
| 'in the same application, which is a contradiction.'); | ||
| console.warn(message); | ||
| } | ||
| }, | ||
| multi: true, | ||
| }, | ||
| ]; | ||
| return [{ | ||
| provide: ENVIRONMENT_INITIALIZER, | ||
| useValue: () => { | ||
| const isEnabledBlockingInitialNavigation = inject(_IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, { | ||
| optional: true | ||
| }); | ||
| if (isEnabledBlockingInitialNavigation) { | ||
| const console = inject(_Console); | ||
| const message = _formatRuntimeError(5001, 'Configuration error: found both hydration and enabledBlocking initial navigation ' + 'in the same application, which is a contradiction.'); | ||
| console.warn(message); | ||
| } | ||
| }, | ||
| multi: true | ||
| }]; | ||
| } | ||
| /** | ||
| * Sets up providers necessary to enable hydration functionality for the application. | ||
| * | ||
| * By default, the function enables the recommended set of features for the optimal | ||
| * performance for most of the applications. It includes the following features: | ||
| * | ||
| * * Reconciling DOM hydration. Learn more about it [here](guide/hydration). | ||
| * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and | ||
| * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching | ||
| * [here](guide/ssr#caching-data-when-using-httpclient). | ||
| * | ||
| * These functions allow you to disable some of the default features or enable new ones: | ||
| * | ||
| * * {@link withNoHttpTransferCache} to disable HTTP transfer cache | ||
| * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options | ||
| * * {@link withI18nSupport} to enable hydration support for i18n blocks | ||
| * * {@link withEventReplay} to enable support for replaying user events | ||
| * | ||
| * @usageNotes | ||
| * | ||
| * Basic example of how you can enable hydration in your application when | ||
| * `bootstrapApplication` function is used: | ||
| * ```ts | ||
| * bootstrapApplication(AppComponent, { | ||
| * providers: [provideClientHydration()] | ||
| * }); | ||
| * ``` | ||
| * | ||
| * Alternatively if you are using NgModules, you would add `provideClientHydration` | ||
| * to your root app module's provider list. | ||
| * ```ts | ||
| * @NgModule({ | ||
| * declarations: [RootCmp], | ||
| * bootstrap: [RootCmp], | ||
| * providers: [provideClientHydration()], | ||
| * }) | ||
| * export class AppModule {} | ||
| * ``` | ||
| * | ||
| * @see {@link withNoHttpTransferCache} | ||
| * @see {@link withHttpTransferCacheOptions} | ||
| * @see {@link withI18nSupport} | ||
| * @see {@link withEventReplay} | ||
| * | ||
| * @param features Optional features to configure additional hydration behaviors. | ||
| * @returns A set of providers to enable hydration. | ||
| * | ||
| * @publicApi 17.0 | ||
| */ | ||
| function provideClientHydration(...features) { | ||
| const providers = []; | ||
| const featuresKind = new Set(); | ||
| for (const { ɵproviders, ɵkind } of features) { | ||
| featuresKind.add(ɵkind); | ||
| if (ɵproviders.length) { | ||
| providers.push(ɵproviders); | ||
| } | ||
| const providers = []; | ||
| const featuresKind = new Set(); | ||
| for (const { | ||
| ɵproviders, | ||
| ɵkind | ||
| } of features) { | ||
| featuresKind.add(ɵkind); | ||
| if (ɵproviders.length) { | ||
| providers.push(ɵproviders); | ||
| } | ||
| const hasHttpTransferCacheOptions = featuresKind.has(HydrationFeatureKind.HttpTransferCacheOptions); | ||
| if (typeof ngDevMode !== 'undefined' && | ||
| ngDevMode && | ||
| featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) && | ||
| hasHttpTransferCacheOptions) { | ||
| throw new _RuntimeError(5001 /* RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES */, 'Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.'); | ||
| } | ||
| return makeEnvironmentProviders([ | ||
| typeof ngDevMode !== 'undefined' && ngDevMode | ||
| ? provideEnabledBlockingInitialNavigationDetector() | ||
| : [], | ||
| _withDomHydration(), | ||
| featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions | ||
| ? [] | ||
| : _withHttpTransferCache({}), | ||
| providers, | ||
| ]); | ||
| } | ||
| const hasHttpTransferCacheOptions = featuresKind.has(HydrationFeatureKind.HttpTransferCacheOptions); | ||
| if (typeof ngDevMode !== 'undefined' && ngDevMode && featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) && hasHttpTransferCacheOptions) { | ||
| throw new _RuntimeError(5001, 'Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.'); | ||
| } | ||
| return makeEnvironmentProviders([typeof ngDevMode !== 'undefined' && ngDevMode ? provideEnabledBlockingInitialNavigationDetector() : [], _withDomHydration(), featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions ? [] : _withHttpTransferCache({}), providers]); | ||
| } | ||
| /** | ||
| * @module | ||
| * @description | ||
| * Entry point for all public APIs of the platform-browser package. | ||
| */ | ||
| /** | ||
| * @publicApi | ||
| */ | ||
| const VERSION = new Version('21.0.0-next.9'); | ||
| const VERSION = new Version('21.0.0-next.10'); | ||
| export { By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManagerPlugin, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, HydrationFeatureKind, Meta, Title, VERSION, disableDebugTools, enableDebugTools, provideClientHydration, withEventReplay, withHttpTransferCacheOptions, withI18nSupport, withIncrementalHydration, withNoHttpTransferCache, DomSanitizerImpl as ɵDomSanitizerImpl, HammerGesturesPlugin as ɵHammerGesturesPlugin }; | ||
| //# sourceMappingURL=platform-browser.mjs.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"platform-browser.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/meta.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/title.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/util.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/tools/common_tools.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/tools/tools.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/debug/by.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/hammer_gestures.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/security/dom_sanitization_service.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/hydration.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵDomAdapter as DomAdapter, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * Represents the attributes of an HTML `<meta>` element. The element itself is\n * represented by the internal `HTMLMetaElement`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see {@link Meta}\n *\n * @publicApi\n */\nexport type MetaDefinition = {\n charset?: string;\n content?: string;\n httpEquiv?: string;\n id?: string;\n itemprop?: string;\n name?: string;\n property?: string;\n scheme?: string;\n url?: string;\n} & {\n // TODO(IgorMinar): this type looks wrong\n [prop: string]: string;\n};\n\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Meta {\n private _dom: DomAdapter;\n constructor(@Inject(DOCUMENT) private _doc: any) {\n this._dom = getDOM();\n }\n /**\n * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `<meta>` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n addTag(tag: MetaDefinition, forceCreation: boolean = false): HTMLMetaElement | null {\n if (!tag) return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n\n /**\n * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n addTags(tags: MetaDefinition[], forceCreation: boolean = false): HTMLMetaElement[] {\n if (!tags) return [];\n return tags.reduce((result: HTMLMetaElement[], tag: MetaDefinition) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n }\n\n /**\n * Retrieves a `<meta>` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n getTag(attrSelector: string): HTMLMetaElement | null {\n if (!attrSelector) return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n\n /**\n * Retrieves a set of `<meta>` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n getTags(attrSelector: string): HTMLMetaElement[] {\n if (!attrSelector) return [];\n const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n return list ? [].slice.call(list) : [];\n }\n\n /**\n * Modifies an existing `<meta>` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null {\n if (!tag) return null;\n selector = selector || this._parseSelector(tag);\n const meta: HTMLMetaElement = this.getTag(selector)!;\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n removeTag(attrSelector: string): void {\n this.removeTagElement(this.getTag(attrSelector)!);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n removeTagElement(meta: HTMLMetaElement): void {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n\n private _getOrCreateElement(\n meta: MetaDefinition,\n forceCreation: boolean = false,\n ): HTMLMetaElement {\n if (!forceCreation) {\n const selector: string = this._parseSelector(meta);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n const elem = this.getTags(selector).filter((elem) => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined) return elem;\n }\n const element: HTMLMetaElement = this._dom.createElement('meta') as HTMLMetaElement;\n this._setMetaElementAttributes(meta, element);\n const head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n }\n\n private _setMetaElementAttributes(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\n Object.keys(tag).forEach((prop: string) =>\n el.setAttribute(this._getMetaKeyMap(prop), tag[prop]),\n );\n return el;\n }\n\n private _parseSelector(tag: MetaDefinition): string {\n const attr: string = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n\n private _containsAttributes(tag: MetaDefinition, elem: HTMLMetaElement): boolean {\n return Object.keys(tag).every(\n (key: string) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key],\n );\n }\n\n private _getMetaKeyMap(prop: string): string {\n return META_KEYS_MAP[prop] || prop;\n }\n}\n\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP: {[prop: string]: string} = {\n httpEquiv: 'http-equiv',\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Title {\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n /**\n * Get the title of the current HTML document.\n */\n getTitle(): string {\n return this._doc.title;\n }\n\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n setTitle(newTitle: string) {\n this._doc.title = newTitle || '';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference path=\"../../../goog.d.ts\" />\n\nimport {ɵglobal as global} from '@angular/core';\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nexport function exportNgVar(name: string, value: any): void {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n const ng = (global['ng'] = (global['ng'] as {[key: string]: any} | undefined) || {});\n ng[name] = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ApplicationRef, ComponentRef} from '@angular/core';\n\nexport class ChangeDetectionPerfRecord {\n constructor(\n public msPerTick: number,\n public numTicks: number,\n ) {}\n}\n\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nexport class AngularProfiler {\n appRef: ApplicationRef;\n\n constructor(ref: ComponentRef<any>) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```ts\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n timeChangeDetection(config: any): ChangeDetectionPerfRecord {\n const record = config && config['record'];\n const profileName = 'Change Detection';\n // Profiler is not available in Android browsers without dev tools opened\n if (record && 'profile' in console && typeof console.profile === 'function') {\n console.profile(profileName);\n }\n const start = performance.now();\n let numTicks = 0;\n while (numTicks < 5 || performance.now() - start < 500) {\n this.appRef.tick();\n numTicks++;\n }\n const end = performance.now();\n if (record && 'profileEnd' in console && typeof console.profileEnd === 'function') {\n console.profileEnd(profileName);\n }\n const msPerTick = (end - start) / numTicks;\n console.log(`ran ${numTicks} change detection cycles`);\n console.log(`${msPerTick.toFixed(2)} ms per check`);\n\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {exportNgVar} from '../../dom/util';\n\nimport {AngularProfiler} from './common_tools';\n\nconst PROFILER_GLOBAL_NAME = 'profiler';\n\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n * then hit Enter.\n *\n * @publicApi\n */\nexport function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nexport function disableDebugTools(): void {\n exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {DebugElement, DebugNode, Predicate, Type} from '@angular/core';\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nexport class By {\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n static all(): Predicate<DebugNode> {\n return () => true;\n }\n\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n static css(selector: string): Predicate<DebugElement> {\n return (debugElement) => {\n return debugElement.nativeElement != null\n ? elementMatches(debugElement.nativeElement, selector)\n : false;\n };\n }\n\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n static directive(type: Type<any>): Predicate<DebugNode> {\n return (debugNode) => debugNode.providerTokens!.indexOf(type) !== -1;\n }\n}\n\nfunction elementMatches(n: any, selector: string): boolean {\n if (getDOM().isElementNode(n)) {\n return (\n (n.matches && n.matches(selector)) ||\n (n.msMatchesSelector && n.msMatchesSelector(selector)) ||\n (n.webkitMatchesSelector && n.webkitMatchesSelector(selector))\n );\n }\n\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference types=\"hammerjs\" />\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n NgModule,\n Optional,\n ɵConsole as Console,\n} from '@angular/core';\n\nimport {EVENT_MANAGER_PLUGINS} from './event_manager';\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n 'doubletap': true,\n};\n\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see {@link HammerGestureConfig}\n *\n * @ngModule HammerModule\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\nexport const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerGestureConfig' : '',\n);\n\n/**\n * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.\n *\n * @publicApi\n *\n * @deprecated The hammerjs integration is deprecated. Replace it by your own implementation.\n */\nexport type HammerLoader = () => Promise<void>;\n\n/**\n * Injection token used to provide a HammerLoader to Angular.\n *\n * @see {@link HammerLoader}\n *\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\nexport const HAMMER_LOADER = new InjectionToken<HammerLoader>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerLoader' : '',\n);\n\nexport interface HammerInstance {\n on(eventName: string, callback?: Function): void;\n off(eventName: string, callback?: Function): void;\n destroy?(): void;\n}\n\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\n@Injectable()\nexport class HammerGestureConfig {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n events: string[] = [];\n\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n *\n */\n overrides: {[key: string]: Object} = {};\n\n /**\n * Properties whose default values can be overridden for a given event.\n * Different sets of properties apply to different events.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n options?: {\n cssProps?: any;\n domEvents?: boolean;\n enable?: boolean | ((manager: any) => boolean);\n preset?: any[];\n touchAction?: string;\n recognizers?: any[];\n inputClass?: any;\n inputTarget?: EventTarget;\n };\n\n /**\n * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n buildHammer(element: HTMLElement): HammerInstance {\n const mc = new Hammer!(element, this.options);\n\n mc.get('pinch').set({enable: true});\n mc.get('rotate').set({enable: true});\n\n for (const eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n\n return mc;\n }\n}\n\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\n@Injectable()\nexport class HammerGesturesPlugin extends EventManagerPlugin {\n private _loaderPromise: Promise<void> | null = null;\n\n constructor(\n @Inject(DOCUMENT) doc: any,\n @Inject(HAMMER_GESTURE_CONFIG) private _config: HammerGestureConfig,\n private _injector: Injector,\n @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader | null,\n ) {\n super(doc);\n }\n\n override supports(eventName: string): boolean {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n\n if (!(window as any).Hammer && !this.loader) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Get a `Console` through an injector to tree-shake the\n // class when it is unused in production.\n const _console = this._injector.get(Console);\n _console.warn(\n `The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n `loaded and no custom loader has been specified.`,\n );\n }\n return false;\n }\n\n return true;\n }\n\n override addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n const zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!(window as any).Hammer && this.loader) {\n this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader!());\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n let cancelRegistration = false;\n let deregister: Function = () => {\n cancelRegistration = true;\n };\n\n zone.runOutsideAngular(() =>\n this._loaderPromise!.then(() => {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!(window as any).Hammer) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n }\n deregister = () => {};\n return;\n }\n\n if (!cancelRegistration) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to\n // removal.\n deregister = this.addEventListener(element, eventName, handler);\n }\n }).catch(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.warn(\n `The \"${eventName}\" event cannot be bound because the custom ` +\n `Hammer.JS loader failed.`,\n );\n }\n deregister = () => {};\n }),\n );\n\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return () => {\n deregister();\n };\n }\n\n return zone.runOutsideAngular(() => {\n // Creating the manager bind events, must be done outside of angular\n const mc = this._config.buildHammer(element);\n const callback = function (eventObj: HammerInput) {\n zone.runGuarded(function () {\n handler(eventObj);\n });\n };\n mc.on(eventName, callback);\n return () => {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n }\n\n isCustomEvent(eventName: string): boolean {\n return this._config.events.indexOf(eventName) > -1;\n }\n}\n\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's `EventManager`.\n *\n * @publicApi\n *\n * @deprecated The hammer integration is deprecated. Replace it by your own implementation.\n */\n@NgModule({\n providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]],\n },\n {provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig},\n ],\n})\nexport class HammerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n forwardRef,\n Inject,\n Injectable,\n Sanitizer,\n SecurityContext,\n ɵ_sanitizeHtml as _sanitizeHtml,\n ɵ_sanitizeUrl as _sanitizeUrl,\n ɵallowSanitizationBypassAndThrow as allowSanitizationBypassOrThrow,\n ɵbypassSanitizationTrustHtml as bypassSanitizationTrustHtml,\n ɵbypassSanitizationTrustResourceUrl as bypassSanitizationTrustResourceUrl,\n ɵbypassSanitizationTrustScript as bypassSanitizationTrustScript,\n ɵbypassSanitizationTrustStyle as bypassSanitizationTrustStyle,\n ɵbypassSanitizationTrustUrl as bypassSanitizationTrustUrl,\n ɵBypassType as BypassType,\n ɵRuntimeError as RuntimeError,\n ɵunwrapSafeValue as unwrapSafeValue,\n ɵXSS_SECURITY_URL as XSS_SECURITY_URL,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport {SecurityContext};\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl)})\nexport abstract class DomSanitizer implements Sanitizer {\n /**\n * Gets a safe value from either a known safe value or a value with unknown safety.\n *\n * If the given value is already a `SafeValue`, this method returns the unwrapped value.\n * If the security context is HTML and the given value is a plain string, this method\n * sanitizes the string, removing any potentially unsafe content.\n * For any other security context, this method throws an error if provided\n * with a plain string.\n */\n abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;\n\n /**\n * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML\n * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will\n * leave safe HTML intact, so in most situations this method should not be used.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustHtml(value: string): SafeHtml;\n\n /**\n * Bypass security and trust the given value to be safe style value (CSS).\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustStyle(value: string): SafeStyle;\n\n /**\n * Bypass security and trust the given value to be safe JavaScript.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustScript(value: string): SafeScript;\n\n /**\n * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used\n * in hyperlinks or `<img src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustUrl(value: string): SafeUrl;\n\n /**\n * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may\n * be used to load executable code from, like `<script src>`, or `<iframe src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;\n}\n\n@Injectable({providedIn: 'root'})\nexport class DomSanitizerImpl extends DomSanitizer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null {\n if (value == null) return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value as string;\n case SecurityContext.HTML:\n if (allowSanitizationBypassOrThrow(value, BypassType.Html)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (allowSanitizationBypassOrThrow(value, BypassType.Style)) {\n return unwrapSafeValue(value);\n }\n return value as string;\n case SecurityContext.SCRIPT:\n if (allowSanitizationBypassOrThrow(value, BypassType.Script)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_SCRIPT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'unsafe value used in a script context',\n );\n case SecurityContext.URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.Url)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.ResourceUrl)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_RESOURCE_URL,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`,\n );\n default:\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNEXPECTED_CTX,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unexpected SecurityContext ${ctx} (see ${XSS_SECURITY_URL})`,\n );\n }\n }\n\n override bypassSecurityTrustHtml(value: string): SafeHtml {\n return bypassSanitizationTrustHtml(value);\n }\n override bypassSecurityTrustStyle(value: string): SafeStyle {\n return bypassSanitizationTrustStyle(value);\n }\n override bypassSecurityTrustScript(value: string): SafeScript {\n return bypassSanitizationTrustScript(value);\n }\n override bypassSecurityTrustUrl(value: string): SafeUrl {\n return bypassSanitizationTrustUrl(value);\n }\n override bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl {\n return bypassSanitizationTrustResourceUrl(value);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {HttpTransferCacheOptions, ɵwithHttpTransferCache} from '@angular/common/http';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n NgZone,\n Provider,\n ɵConsole as Console,\n ɵRuntimeError as RuntimeError,\n ɵformatRuntimeError as formatRuntimeError,\n ɵwithDomHydration as withDomHydration,\n ɵwithEventReplay,\n ɵwithI18nSupport,\n ɵZONELESS_ENABLED as ZONELESS_ENABLED,\n ɵwithIncrementalHydration,\n ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as IS_ENABLED_BLOCKING_INITIAL_NAVIGATION,\n} from '@angular/core';\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * The list of features as an enum to uniquely type each `HydrationFeature`.\n * @see {@link HydrationFeature}\n *\n * @publicApi\n */\nexport enum HydrationFeatureKind {\n NoHttpTransferCache,\n HttpTransferCacheOptions,\n I18nSupport,\n EventReplay,\n IncrementalHydration,\n}\n\n/**\n * Helper type to represent a Hydration feature.\n *\n * @publicApi\n */\nexport interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a Hydration feature.\n */\nfunction hydrationFeature<FeatureKind extends HydrationFeatureKind>(\n ɵkind: FeatureKind,\n ɵproviders: Provider[] = [],\n ɵoptions: unknown = {},\n): HydrationFeature<FeatureKind> {\n return {ɵkind, ɵproviders};\n}\n\n/**\n * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the\n * server and other one on the browser.\n *\n * @see [Disabling Caching](guide/ssr#disabling-caching)\n *\n * @publicApi\n */\nexport function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache> {\n // This feature has no providers and acts as a flag that turns off\n // HTTP transfer cache (which otherwise is turned on by default).\n return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache);\n}\n\n/**\n * The function accepts an object, which allows to configure cache parameters,\n * such as which headers should be included (no headers are included by default),\n * whether POST requests should be cached or a callback function to determine if a\n * particular request should be cached.\n *\n * @see [Configuring HTTP transfer cache options](guide/ssr#caching-data-when-using-httpclient)\n *\n * @publicApi\n */\nexport function withHttpTransferCacheOptions(\n options: HttpTransferCacheOptions,\n): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions> {\n // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.\n return hydrationFeature(\n HydrationFeatureKind.HttpTransferCacheOptions,\n ɵwithHttpTransferCache(options),\n );\n}\n\n/**\n * Enables support for hydrating i18n blocks.\n *\n * @publicApi 20.0\n */\nexport function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport> {\n return hydrationFeature(HydrationFeatureKind.I18nSupport, ɵwithI18nSupport());\n}\n\n/**\n * Enables support for replaying user events (e.g. `click`s) that happened on a page\n * before hydration logic has completed. Once an application is hydrated, all captured\n * events are replayed and relevant event listeners are executed.\n *\n * @usageNotes\n *\n * Basic example of how you can enable event replay in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration(withEventReplay())]\n * });\n * ```\n * @publicApi\n * @see {@link provideClientHydration}\n */\nexport function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay> {\n return hydrationFeature(HydrationFeatureKind.EventReplay, ɵwithEventReplay());\n}\n\n/**\n * Enables support for incremental hydration using the `hydrate` trigger syntax.\n *\n * @usageNotes\n *\n * Basic example of how you can enable incremental hydration in your application when\n * the `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration(withIncrementalHydration())]\n * });\n * ```\n * @publicApi 20.0\n * @see {@link provideClientHydration}\n */\nexport function withIncrementalHydration(): HydrationFeature<HydrationFeatureKind.IncrementalHydration> {\n return hydrationFeature(HydrationFeatureKind.IncrementalHydration, ɵwithIncrementalHydration());\n}\n\n/**\n * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function\n * that verifies whether enabledBlocking initial navigation is used in an application\n * and logs a warning in a console if it's not compatible with hydration.\n */\nfunction provideEnabledBlockingInitialNavigationDetector(): Provider[] {\n return [\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n const isEnabledBlockingInitialNavigation = inject(IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, {\n optional: true,\n });\n\n if (isEnabledBlockingInitialNavigation) {\n const console = inject(Console);\n const message = formatRuntimeError(\n RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES,\n 'Configuration error: found both hydration and enabledBlocking initial navigation ' +\n 'in the same application, which is a contradiction.',\n );\n console.warn(message);\n }\n },\n multi: true,\n },\n ];\n}\n\n/**\n * Sets up providers necessary to enable hydration functionality for the application.\n *\n * By default, the function enables the recommended set of features for the optimal\n * performance for most of the applications. It includes the following features:\n *\n * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).\n * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and\n * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching\n * [here](guide/ssr#caching-data-when-using-httpclient).\n *\n * These functions allow you to disable some of the default features or enable new ones:\n *\n * * {@link withNoHttpTransferCache} to disable HTTP transfer cache\n * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options\n * * {@link withI18nSupport} to enable hydration support for i18n blocks\n * * {@link withEventReplay} to enable support for replaying user events\n *\n * @usageNotes\n *\n * Basic example of how you can enable hydration in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration()]\n * });\n * ```\n *\n * Alternatively if you are using NgModules, you would add `provideClientHydration`\n * to your root app module's provider list.\n * ```ts\n * @NgModule({\n * declarations: [RootCmp],\n * bootstrap: [RootCmp],\n * providers: [provideClientHydration()],\n * })\n * export class AppModule {}\n * ```\n *\n * @see {@link withNoHttpTransferCache}\n * @see {@link withHttpTransferCacheOptions}\n * @see {@link withI18nSupport}\n * @see {@link withEventReplay}\n *\n * @param features Optional features to configure additional hydration behaviors.\n * @returns A set of providers to enable hydration.\n *\n * @publicApi 17.0\n */\nexport function provideClientHydration(\n ...features: HydrationFeature<HydrationFeatureKind>[]\n): EnvironmentProviders {\n const providers: Provider[] = [];\n const featuresKind = new Set<HydrationFeatureKind>();\n\n for (const {ɵproviders, ɵkind} of features) {\n featuresKind.add(ɵkind);\n\n if (ɵproviders.length) {\n providers.push(ɵproviders);\n }\n }\n\n const hasHttpTransferCacheOptions = featuresKind.has(\n HydrationFeatureKind.HttpTransferCacheOptions,\n );\n\n if (\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) &&\n hasHttpTransferCacheOptions\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES,\n 'Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.',\n );\n }\n\n return makeEnvironmentProviders([\n typeof ngDevMode !== 'undefined' && ngDevMode\n ? provideEnabledBlockingInitialNavigationDetector()\n : [],\n withDomHydration(),\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions\n ? []\n : ɵwithHttpTransferCache({}),\n providers,\n ]);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('21.0.0-next.9');\n"],"names":["getDOM","global","Console","allowSanitizationBypassOrThrow","unwrapSafeValue","_sanitizeHtml","RuntimeError","_sanitizeUrl","XSS_SECURITY_URL","bypassSanitizationTrustHtml","bypassSanitizationTrustStyle","bypassSanitizationTrustScript","bypassSanitizationTrustUrl","bypassSanitizationTrustResourceUrl","ɵwithHttpTransferCache","ɵwithI18nSupport","ɵwithEventReplay","ɵwithIncrementalHydration","IS_ENABLED_BLOCKING_INITIAL_NAVIGATION","formatRuntimeError","withDomHydration"],"mappings":";;;;;;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;AAqBG;MAEU,IAAI,CAAA;AAEuB,IAAA,IAAA;AAD9B,IAAA,IAAI;AACZ,IAAA,WAAA,CAAsC,IAAS,EAAA;QAAT,IAAI,CAAA,IAAA,GAAJ,IAAI;AACxC,QAAA,IAAI,CAAC,IAAI,GAAGA,OAAM,EAAE;;AAEtB;;;;;;;;;AASG;AACH,IAAA,MAAM,CAAC,GAAmB,EAAE,aAAA,GAAyB,KAAK,EAAA;AACxD,QAAA,IAAI,CAAC,GAAG;AAAE,YAAA,OAAO,IAAI;QACrB,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,EAAE,aAAa,CAAC;;AAGrD;;;;;;;AAOG;AACH,IAAA,OAAO,CAAC,IAAsB,EAAE,aAAA,GAAyB,KAAK,EAAA;AAC5D,QAAA,IAAI,CAAC,IAAI;AAAE,YAAA,OAAO,EAAE;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,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A2B,EAC3B;AACA,QAAA,MAAM,IAAIb,aAAY,CAEpB,IAAA,wDAAA,sKAAsK,CACvK;;AAGH,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,OAAO,SAAS,KAAK,WAAW,IAAI;cAChC,+CAA+C;AACjD,cAAE,EAAE;AACN,QAAAc,iBAAgB,EAAE;QAClB,YAAY,CAAC,GAAG,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,IAAI;AAC5D,cAAE;AACF,cAAEN,sBAAsB,CAAC,EAAE,CAAC;QAC9B,SAAS;AACV,KAAA,CAAC;AACJ;;AChQA;;;;AAIG;AAIH;;AAEG;MACU,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"} | ||
| {"version":3,"file":"platform-browser.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/meta.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/title.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/util.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/browser/tools/common_tools.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/debug/by.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/dom/events/hammer_gestures.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/security/dom_sanitization_service.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/src/hydration.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵDomAdapter as DomAdapter, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * Represents the attributes of an HTML `<meta>` element. The element itself is\n * represented by the internal `HTMLMetaElement`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see {@link Meta}\n *\n * @publicApi\n */\nexport type MetaDefinition = {\n charset?: string;\n content?: string;\n httpEquiv?: string;\n id?: string;\n itemprop?: string;\n name?: string;\n property?: string;\n scheme?: string;\n url?: string;\n} & {\n // TODO(IgorMinar): this type looks wrong\n [prop: string]: string;\n};\n\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Meta {\n private _dom: DomAdapter;\n constructor(@Inject(DOCUMENT) private _doc: any) {\n this._dom = getDOM();\n }\n /**\n * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * If an existing element is found, it is returned and is not modified in any way.\n * @param tag The definition of a `<meta>` element to match or create.\n * @param forceCreation True to create a new element without checking whether one already exists.\n * @returns The existing element with the same attributes and values if found,\n * the new element if no match is found, or `null` if the tag parameter is not defined.\n */\n addTag(tag: MetaDefinition, forceCreation: boolean = false): HTMLMetaElement | null {\n if (!tag) return null;\n return this._getOrCreateElement(tag, forceCreation);\n }\n\n /**\n * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n * values in the provided tag definition, and verifies that all other attribute values are equal.\n * @param tags An array of tag definitions to match or create.\n * @param forceCreation True to create new elements without checking whether they already exist.\n * @returns The matching elements if found, or the new elements.\n */\n addTags(tags: MetaDefinition[], forceCreation: boolean = false): HTMLMetaElement[] {\n if (!tags) return [];\n return tags.reduce((result: HTMLMetaElement[], tag: MetaDefinition) => {\n if (tag) {\n result.push(this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n }\n\n /**\n * Retrieves a `<meta>` tag element in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching element, if any.\n */\n getTag(attrSelector: string): HTMLMetaElement | null {\n if (!attrSelector) return null;\n return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n }\n\n /**\n * Retrieves a set of `<meta>` tag elements in the current HTML document.\n * @param attrSelector The tag attribute and value to match against, in the format\n * `\"tag_attribute='value string'\"`.\n * @returns The matching elements, if any.\n */\n getTags(attrSelector: string): HTMLMetaElement[] {\n if (!attrSelector) return [];\n const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n return list ? [].slice.call(list) : [];\n }\n\n /**\n * Modifies an existing `<meta>` tag element in the current HTML document.\n * @param tag The tag description with which to replace the existing tag content.\n * @param selector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n * replacement tag.\n * @return The modified element.\n */\n updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement | null {\n if (!tag) return null;\n selector = selector || this._parseSelector(tag);\n const meta: HTMLMetaElement = this.getTag(selector)!;\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param attrSelector A tag attribute and value to match against, to identify\n * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n */\n removeTag(attrSelector: string): void {\n this.removeTagElement(this.getTag(attrSelector)!);\n }\n\n /**\n * Removes an existing `<meta>` tag element from the current HTML document.\n * @param meta The tag definition to match against to identify an existing tag.\n */\n removeTagElement(meta: HTMLMetaElement): void {\n if (meta) {\n this._dom.remove(meta);\n }\n }\n\n private _getOrCreateElement(\n meta: MetaDefinition,\n forceCreation: boolean = false,\n ): HTMLMetaElement {\n if (!forceCreation) {\n const selector: string = this._parseSelector(meta);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n const elem = this.getTags(selector).filter((elem) => this._containsAttributes(meta, elem))[0];\n if (elem !== undefined) return elem;\n }\n const element: HTMLMetaElement = this._dom.createElement('meta') as HTMLMetaElement;\n this._setMetaElementAttributes(meta, element);\n const head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n }\n\n private _setMetaElementAttributes(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\n Object.keys(tag).forEach((prop: string) =>\n el.setAttribute(this._getMetaKeyMap(prop), tag[prop]),\n );\n return el;\n }\n\n private _parseSelector(tag: MetaDefinition): string {\n const attr: string = tag.name ? 'name' : 'property';\n return `${attr}=\"${tag[attr]}\"`;\n }\n\n private _containsAttributes(tag: MetaDefinition, elem: HTMLMetaElement): boolean {\n return Object.keys(tag).every(\n (key: string) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key],\n );\n }\n\n private _getMetaKeyMap(prop: string): string {\n return META_KEYS_MAP[prop] || prop;\n }\n}\n\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP: {[prop: string]: string} = {\n httpEquiv: 'http-equiv',\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root'})\nexport class Title {\n constructor(@Inject(DOCUMENT) private _doc: any) {}\n /**\n * Get the title of the current HTML document.\n */\n getTitle(): string {\n return this._doc.title;\n }\n\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n setTitle(newTitle: string) {\n this._doc.title = newTitle || '';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference path=\"../../../goog.d.ts\" />\n\nimport {ɵglobal as global} from '@angular/core';\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nexport function exportNgVar(name: string, value: any): void {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n const ng = (global['ng'] = (global['ng'] as {[key: string]: any} | undefined) || {});\n ng[name] = value;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ApplicationRef, ComponentRef} from '@angular/core';\n\nexport class ChangeDetectionPerfRecord {\n constructor(\n public msPerTick: number,\n public numTicks: number,\n ) {}\n}\n\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nexport class AngularProfiler {\n appRef: ApplicationRef;\n\n constructor(ref: ComponentRef<any>) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```ts\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n timeChangeDetection(config: any): ChangeDetectionPerfRecord {\n const record = config && config['record'];\n const profileName = 'Change Detection';\n // Profiler is not available in Android browsers without dev tools opened\n if (record && 'profile' in console && typeof console.profile === 'function') {\n console.profile(profileName);\n }\n const start = performance.now();\n let numTicks = 0;\n while (numTicks < 5 || performance.now() - start < 500) {\n this.appRef.tick();\n numTicks++;\n }\n const end = performance.now();\n if (record && 'profileEnd' in console && typeof console.profileEnd === 'function') {\n console.profileEnd(profileName);\n }\n const msPerTick = (end - start) / numTicks;\n console.log(`ran ${numTicks} change detection cycles`);\n console.log(`${msPerTick.toFixed(2)} ms per check`);\n\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {DebugElement, DebugNode, Predicate, Type} from '@angular/core';\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nexport class By {\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n static all(): Predicate<DebugNode> {\n return () => true;\n }\n\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n static css(selector: string): Predicate<DebugElement> {\n return (debugElement) => {\n return debugElement.nativeElement != null\n ? elementMatches(debugElement.nativeElement, selector)\n : false;\n };\n }\n\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n static directive(type: Type<any>): Predicate<DebugNode> {\n return (debugNode) => debugNode.providerTokens!.indexOf(type) !== -1;\n }\n}\n\nfunction elementMatches(n: any, selector: string): boolean {\n if (getDOM().isElementNode(n)) {\n return (\n (n.matches && n.matches(selector)) ||\n (n.msMatchesSelector && n.msMatchesSelector(selector)) ||\n (n.webkitMatchesSelector && n.webkitMatchesSelector(selector))\n );\n }\n\n return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/// <reference types=\"hammerjs\" />\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n Inject,\n Injectable,\n InjectionToken,\n Injector,\n NgModule,\n Optional,\n ɵConsole as Console,\n} from '@angular/core';\n\nimport {EVENT_MANAGER_PLUGINS} from './event_manager';\nimport {EventManagerPlugin} from './event_manager_plugin';\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n 'doubletap': true,\n};\n\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see {@link HammerGestureConfig}\n *\n * @ngModule HammerModule\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\nexport const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerGestureConfig' : '',\n);\n\n/**\n * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.\n *\n * @publicApi\n *\n * @deprecated The hammerjs integration is deprecated. Replace it by your own implementation.\n */\nexport type HammerLoader = () => Promise<void>;\n\n/**\n * Injection token used to provide a HammerLoader to Angular.\n *\n * @see {@link HammerLoader}\n *\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\nexport const HAMMER_LOADER = new InjectionToken<HammerLoader>(\n typeof ngDevMode === 'undefined' || ngDevMode ? 'HammerLoader' : '',\n);\n\nexport interface HammerInstance {\n on(eventName: string, callback?: Function): void;\n off(eventName: string, callback?: Function): void;\n destroy?(): void;\n}\n\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n *\n * @deprecated The HammerJS integration is deprecated. Replace it by your own implementation.\n */\n@Injectable()\nexport class HammerGestureConfig {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n events: string[] = [];\n\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n *\n */\n overrides: {[key: string]: Object} = {};\n\n /**\n * Properties whose default values can be overridden for a given event.\n * Different sets of properties apply to different events.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](https://hammerjs.github.io/).\n */\n options?: {\n cssProps?: any;\n domEvents?: boolean;\n enable?: boolean | ((manager: any) => boolean);\n preset?: any[];\n touchAction?: string;\n recognizers?: any[];\n inputClass?: any;\n inputTarget?: EventTarget;\n };\n\n /**\n * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n buildHammer(element: HTMLElement): HammerInstance {\n const mc = new Hammer!(element, this.options);\n\n mc.get('pinch').set({enable: true});\n mc.get('rotate').set({enable: true});\n\n for (const eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n\n return mc;\n }\n}\n\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\n@Injectable()\nexport class HammerGesturesPlugin extends EventManagerPlugin {\n private _loaderPromise: Promise<void> | null = null;\n\n constructor(\n @Inject(DOCUMENT) doc: any,\n @Inject(HAMMER_GESTURE_CONFIG) private _config: HammerGestureConfig,\n private _injector: Injector,\n @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader | null,\n ) {\n super(doc);\n }\n\n override supports(eventName: string): boolean {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n\n if (!(window as any).Hammer && !this.loader) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Get a `Console` through an injector to tree-shake the\n // class when it is unused in production.\n const _console = this._injector.get(Console);\n _console.warn(\n `The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n `loaded and no custom loader has been specified.`,\n );\n }\n return false;\n }\n\n return true;\n }\n\n override addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n const zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!(window as any).Hammer && this.loader) {\n this._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => this.loader!());\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n let cancelRegistration = false;\n let deregister: Function = () => {\n cancelRegistration = true;\n };\n\n zone.runOutsideAngular(() =>\n this._loaderPromise!.then(() => {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!(window as any).Hammer) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n }\n deregister = () => {};\n return;\n }\n\n if (!cancelRegistration) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to\n // removal.\n deregister = this.addEventListener(element, eventName, handler);\n }\n }).catch(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const _console = this._injector.get(Console);\n _console.warn(\n `The \"${eventName}\" event cannot be bound because the custom ` +\n `Hammer.JS loader failed.`,\n );\n }\n deregister = () => {};\n }),\n );\n\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return () => {\n deregister();\n };\n }\n\n return zone.runOutsideAngular(() => {\n // Creating the manager bind events, must be done outside of angular\n const mc = this._config.buildHammer(element);\n const callback = function (eventObj: HammerInput) {\n zone.runGuarded(function () {\n handler(eventObj);\n });\n };\n mc.on(eventName, callback);\n return () => {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n }\n\n isCustomEvent(eventName: string): boolean {\n return this._config.events.indexOf(eventName) > -1;\n }\n}\n\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's `EventManager`.\n *\n * @publicApi\n *\n * @deprecated The hammer integration is deprecated. Replace it by your own implementation.\n */\n@NgModule({\n providers: [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Injector, [new Optional(), HAMMER_LOADER]],\n },\n {provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig},\n ],\n})\nexport class HammerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {\n forwardRef,\n Inject,\n Injectable,\n Sanitizer,\n SecurityContext,\n ɵ_sanitizeHtml as _sanitizeHtml,\n ɵ_sanitizeUrl as _sanitizeUrl,\n ɵallowSanitizationBypassAndThrow as allowSanitizationBypassOrThrow,\n ɵbypassSanitizationTrustHtml as bypassSanitizationTrustHtml,\n ɵbypassSanitizationTrustResourceUrl as bypassSanitizationTrustResourceUrl,\n ɵbypassSanitizationTrustScript as bypassSanitizationTrustScript,\n ɵbypassSanitizationTrustStyle as bypassSanitizationTrustStyle,\n ɵbypassSanitizationTrustUrl as bypassSanitizationTrustUrl,\n ɵBypassType as BypassType,\n ɵRuntimeError as RuntimeError,\n ɵunwrapSafeValue as unwrapSafeValue,\n ɵXSS_SECURITY_URL as XSS_SECURITY_URL,\n} from '@angular/core';\n\nimport {RuntimeErrorCode} from '../errors';\n\nexport {SecurityContext};\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](https://g.co/ng/security).\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl)})\nexport abstract class DomSanitizer implements Sanitizer {\n /**\n * Gets a safe value from either a known safe value or a value with unknown safety.\n *\n * If the given value is already a `SafeValue`, this method returns the unwrapped value.\n * If the security context is HTML and the given value is a plain string, this method\n * sanitizes the string, removing any potentially unsafe content.\n * For any other security context, this method throws an error if provided\n * with a plain string.\n */\n abstract sanitize(context: SecurityContext, value: SafeValue | string | null): string | null;\n\n /**\n * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML\n * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will\n * leave safe HTML intact, so in most situations this method should not be used.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustHtml(value: string): SafeHtml;\n\n /**\n * Bypass security and trust the given value to be safe style value (CSS).\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustStyle(value: string): SafeStyle;\n\n /**\n * Bypass security and trust the given value to be safe JavaScript.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustScript(value: string): SafeScript;\n\n /**\n * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used\n * in hyperlinks or `<img src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustUrl(value: string): SafeUrl;\n\n /**\n * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may\n * be used to load executable code from, like `<script src>`, or `<iframe src>`.\n *\n * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n * security risks!\n */\n abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;\n}\n\n@Injectable({providedIn: 'root'})\nexport class DomSanitizerImpl extends DomSanitizer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override sanitize(ctx: SecurityContext, value: SafeValue | string | null): string | null {\n if (value == null) return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value as string;\n case SecurityContext.HTML:\n if (allowSanitizationBypassOrThrow(value, BypassType.Html)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeHtml(this._doc, String(value)).toString();\n case SecurityContext.STYLE:\n if (allowSanitizationBypassOrThrow(value, BypassType.Style)) {\n return unwrapSafeValue(value);\n }\n return value as string;\n case SecurityContext.SCRIPT:\n if (allowSanitizationBypassOrThrow(value, BypassType.Script)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_SCRIPT,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'unsafe value used in a script context',\n );\n case SecurityContext.URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.Url)) {\n return unwrapSafeValue(value);\n }\n return _sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (allowSanitizationBypassOrThrow(value, BypassType.ResourceUrl)) {\n return unwrapSafeValue(value);\n }\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNSAFE_RESOURCE_URL,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`,\n );\n default:\n throw new RuntimeError(\n RuntimeErrorCode.SANITIZATION_UNEXPECTED_CTX,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unexpected SecurityContext ${ctx} (see ${XSS_SECURITY_URL})`,\n );\n }\n }\n\n override bypassSecurityTrustHtml(value: string): SafeHtml {\n return bypassSanitizationTrustHtml(value);\n }\n override bypassSecurityTrustStyle(value: string): SafeStyle {\n return bypassSanitizationTrustStyle(value);\n }\n override bypassSecurityTrustScript(value: string): SafeScript {\n return bypassSanitizationTrustScript(value);\n }\n override bypassSecurityTrustUrl(value: string): SafeUrl {\n return bypassSanitizationTrustUrl(value);\n }\n override bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl {\n return bypassSanitizationTrustResourceUrl(value);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {HttpTransferCacheOptions, ɵwithHttpTransferCache} from '@angular/common/http';\nimport {\n ENVIRONMENT_INITIALIZER,\n EnvironmentProviders,\n inject,\n makeEnvironmentProviders,\n NgZone,\n Provider,\n ɵConsole as Console,\n ɵRuntimeError as RuntimeError,\n ɵformatRuntimeError as formatRuntimeError,\n ɵwithDomHydration as withDomHydration,\n ɵwithEventReplay,\n ɵwithI18nSupport,\n ɵZONELESS_ENABLED as ZONELESS_ENABLED,\n ɵwithIncrementalHydration,\n ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION as IS_ENABLED_BLOCKING_INITIAL_NAVIGATION,\n} from '@angular/core';\nimport {RuntimeErrorCode} from './errors';\n\n/**\n * The list of features as an enum to uniquely type each `HydrationFeature`.\n * @see {@link HydrationFeature}\n *\n * @publicApi\n */\nexport enum HydrationFeatureKind {\n NoHttpTransferCache,\n HttpTransferCacheOptions,\n I18nSupport,\n EventReplay,\n IncrementalHydration,\n}\n\n/**\n * Helper type to represent a Hydration feature.\n *\n * @publicApi\n */\nexport interface HydrationFeature<FeatureKind extends HydrationFeatureKind> {\n ɵkind: FeatureKind;\n ɵproviders: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a Hydration feature.\n */\nfunction hydrationFeature<FeatureKind extends HydrationFeatureKind>(\n ɵkind: FeatureKind,\n ɵproviders: Provider[] = [],\n ɵoptions: unknown = {},\n): HydrationFeature<FeatureKind> {\n return {ɵkind, ɵproviders};\n}\n\n/**\n * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the\n * server and other one on the browser.\n *\n * @see [Disabling Caching](guide/ssr#disabling-caching)\n *\n * @publicApi\n */\nexport function withNoHttpTransferCache(): HydrationFeature<HydrationFeatureKind.NoHttpTransferCache> {\n // This feature has no providers and acts as a flag that turns off\n // HTTP transfer cache (which otherwise is turned on by default).\n return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache);\n}\n\n/**\n * The function accepts an object, which allows to configure cache parameters,\n * such as which headers should be included (no headers are included by default),\n * whether POST requests should be cached or a callback function to determine if a\n * particular request should be cached.\n *\n * @see [Configuring HTTP transfer cache options](guide/ssr#caching-data-when-using-httpclient)\n *\n * @publicApi\n */\nexport function withHttpTransferCacheOptions(\n options: HttpTransferCacheOptions,\n): HydrationFeature<HydrationFeatureKind.HttpTransferCacheOptions> {\n // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.\n return hydrationFeature(\n HydrationFeatureKind.HttpTransferCacheOptions,\n ɵwithHttpTransferCache(options),\n );\n}\n\n/**\n * Enables support for hydrating i18n blocks.\n *\n * @publicApi 20.0\n */\nexport function withI18nSupport(): HydrationFeature<HydrationFeatureKind.I18nSupport> {\n return hydrationFeature(HydrationFeatureKind.I18nSupport, ɵwithI18nSupport());\n}\n\n/**\n * Enables support for replaying user events (e.g. `click`s) that happened on a page\n * before hydration logic has completed. Once an application is hydrated, all captured\n * events are replayed and relevant event listeners are executed.\n *\n * @usageNotes\n *\n * Basic example of how you can enable event replay in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration(withEventReplay())]\n * });\n * ```\n * @publicApi\n * @see {@link provideClientHydration}\n */\nexport function withEventReplay(): HydrationFeature<HydrationFeatureKind.EventReplay> {\n return hydrationFeature(HydrationFeatureKind.EventReplay, ɵwithEventReplay());\n}\n\n/**\n * Enables support for incremental hydration using the `hydrate` trigger syntax.\n *\n * @usageNotes\n *\n * Basic example of how you can enable incremental hydration in your application when\n * the `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration(withIncrementalHydration())]\n * });\n * ```\n * @publicApi 20.0\n * @see {@link provideClientHydration}\n */\nexport function withIncrementalHydration(): HydrationFeature<HydrationFeatureKind.IncrementalHydration> {\n return hydrationFeature(HydrationFeatureKind.IncrementalHydration, ɵwithIncrementalHydration());\n}\n\n/**\n * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function\n * that verifies whether enabledBlocking initial navigation is used in an application\n * and logs a warning in a console if it's not compatible with hydration.\n */\nfunction provideEnabledBlockingInitialNavigationDetector(): Provider[] {\n return [\n {\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => {\n const isEnabledBlockingInitialNavigation = inject(IS_ENABLED_BLOCKING_INITIAL_NAVIGATION, {\n optional: true,\n });\n\n if (isEnabledBlockingInitialNavigation) {\n const console = inject(Console);\n const message = formatRuntimeError(\n RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES,\n 'Configuration error: found both hydration and enabledBlocking initial navigation ' +\n 'in the same application, which is a contradiction.',\n );\n console.warn(message);\n }\n },\n multi: true,\n },\n ];\n}\n\n/**\n * Sets up providers necessary to enable hydration functionality for the application.\n *\n * By default, the function enables the recommended set of features for the optimal\n * performance for most of the applications. It includes the following features:\n *\n * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).\n * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and\n * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching\n * [here](guide/ssr#caching-data-when-using-httpclient).\n *\n * These functions allow you to disable some of the default features or enable new ones:\n *\n * * {@link withNoHttpTransferCache} to disable HTTP transfer cache\n * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options\n * * {@link withI18nSupport} to enable hydration support for i18n blocks\n * * {@link withEventReplay} to enable support for replaying user events\n *\n * @usageNotes\n *\n * Basic example of how you can enable hydration in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideClientHydration()]\n * });\n * ```\n *\n * Alternatively if you are using NgModules, you would add `provideClientHydration`\n * to your root app module's provider list.\n * ```ts\n * @NgModule({\n * declarations: [RootCmp],\n * bootstrap: [RootCmp],\n * providers: [provideClientHydration()],\n * })\n * export class AppModule {}\n * ```\n *\n * @see {@link withNoHttpTransferCache}\n * @see {@link withHttpTransferCacheOptions}\n * @see {@link withI18nSupport}\n * @see {@link withEventReplay}\n *\n * @param features Optional features to configure additional hydration behaviors.\n * @returns A set of providers to enable hydration.\n *\n * @publicApi 17.0\n */\nexport function provideClientHydration(\n ...features: HydrationFeature<HydrationFeatureKind>[]\n): EnvironmentProviders {\n const providers: Provider[] = [];\n const featuresKind = new Set<HydrationFeatureKind>();\n\n for (const {ɵproviders, ɵkind} of features) {\n featuresKind.add(ɵkind);\n\n if (ɵproviders.length) {\n providers.push(ɵproviders);\n }\n }\n\n const hasHttpTransferCacheOptions = featuresKind.has(\n HydrationFeatureKind.HttpTransferCacheOptions,\n );\n\n if (\n typeof ngDevMode !== 'undefined' &&\n ngDevMode &&\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) &&\n hasHttpTransferCacheOptions\n ) {\n throw new RuntimeError(\n RuntimeErrorCode.HYDRATION_CONFLICTING_FEATURES,\n 'Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.',\n );\n }\n\n return makeEnvironmentProviders([\n typeof ngDevMode !== 'undefined' && ngDevMode\n ? provideEnabledBlockingInitialNavigationDetector()\n : [],\n withDomHydration(),\n featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions\n ? []\n : ɵwithHttpTransferCache({}),\n providers,\n ]);\n}\n"],"names":["result","attrSelector","_getOrCreateElement","tag","removeTag","removeTagElement","getTag","meta","_dom","remove","forceCreation","selector","_parseSelector","elem","getTags","filter","_containsAttributes","_setMetaElementAttributes","element","appendChild","el","Object","keys","forEach","prop","setAttribute","_getMetaKeyMap","getTitle","_doc","title","setTitle","newTitle","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","Title","deps","token","DOCUMENT","target","ɵɵFactoryTarget","Injectable","ng","global","appRef","constructor","ref","start","performance","now","numTicks","tick","console","profileEnd","msPerTick","log","toFixed","By","n","matches","EVENT_NAMES","buildHammer","mc","Hammer","options","HammerGestureConfig","decorators","EventManagerPlugin","eventName","toLowerCase","isCustomEvent","loader","ngDevMode","_injector","get","Console","warn","handler","_loaderPromise","zone","runOutsideAngular","cancelRegistration","deregister","addEventListener","_config","on","callback","off","destroy","HydrationFeatureKind","withI18nSupport","hydr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;;;;;;;;;;;;;;;"} |
+101
-65
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -15,76 +15,112 @@ * License: MIT | ||
| /** | ||
| * A DOM based implementation of the TestComponentRenderer. | ||
| */ | ||
| class DOMTestComponentRenderer extends TestComponentRenderer { | ||
| _doc; | ||
| constructor(_doc) { | ||
| super(); | ||
| this._doc = _doc; | ||
| _doc; | ||
| constructor(_doc) { | ||
| super(); | ||
| this._doc = _doc; | ||
| } | ||
| insertRootElement(rootElId, tagName = 'div') { | ||
| this.removeAllRootElementsImpl(); | ||
| const rootElement = _getDOM().getDefaultDocument().createElement(tagName); | ||
| rootElement.setAttribute('id', rootElId); | ||
| this._doc.body.appendChild(rootElement); | ||
| } | ||
| removeAllRootElements() { | ||
| if (typeof this._doc.querySelectorAll === 'function') { | ||
| this.removeAllRootElementsImpl(); | ||
| } | ||
| insertRootElement(rootElId, tagName = 'div') { | ||
| this.removeAllRootElementsImpl(); | ||
| const rootElement = _getDOM().getDefaultDocument().createElement(tagName); | ||
| rootElement.setAttribute('id', rootElId); | ||
| this._doc.body.appendChild(rootElement); | ||
| } | ||
| removeAllRootElementsImpl() { | ||
| const oldRoots = this._doc.querySelectorAll('[id^=root]'); | ||
| for (let i = 0; i < oldRoots.length; i++) { | ||
| _getDOM().remove(oldRoots[i]); | ||
| } | ||
| removeAllRootElements() { | ||
| // Check whether the `DOCUMENT` instance retrieved from DI contains | ||
| // the necessary function to complete the cleanup. In tests that don't | ||
| // interact with DOM, the `DOCUMENT` might be mocked and some functions | ||
| // might be missing. For such tests, DOM cleanup is not required and | ||
| // we skip the logic if there are missing functions. | ||
| if (typeof this._doc.querySelectorAll === 'function') { | ||
| this.removeAllRootElementsImpl(); | ||
| } | ||
| } | ||
| removeAllRootElementsImpl() { | ||
| const oldRoots = this._doc.querySelectorAll('[id^=root]'); | ||
| for (let i = 0; i < oldRoots.length; i++) { | ||
| _getDOM().remove(oldRoots[i]); | ||
| } | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DOMTestComponentRenderer, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DOMTestComponentRenderer }); | ||
| } | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DOMTestComponentRenderer, | ||
| deps: [{ | ||
| token: DOCUMENT | ||
| }], | ||
| target: i0.ɵɵFactoryTarget.Injectable | ||
| }); | ||
| static ɵprov = i0.ɵɵngDeclareInjectable({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DOMTestComponentRenderer | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: DOMTestComponentRenderer, decorators: [{ | ||
| type: Injectable | ||
| }], ctorParameters: () => [{ type: undefined, decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: DOMTestComponentRenderer, | ||
| decorators: [{ | ||
| type: Injectable | ||
| }], | ||
| ctorParameters: () => [{ | ||
| type: undefined, | ||
| decorators: [{ | ||
| type: Inject, | ||
| args: [DOCUMENT] | ||
| }] | ||
| }] | ||
| }); | ||
| /** | ||
| * Platform for testing | ||
| * | ||
| * @publicApi | ||
| */ | ||
| const platformBrowserTesting = createPlatformFactory(platformBrowser, 'browserTesting'); | ||
| /** | ||
| * NgModule for testing. | ||
| * | ||
| * @publicApi | ||
| */ | ||
| class BrowserTestingModule { | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserTestingModule, providers: [ | ||
| { provide: APP_ID, useValue: 'a' }, | ||
| _provideFakePlatformNavigation(), | ||
| { provide: TestComponentRenderer, useClass: DOMTestComponentRenderer }, | ||
| ], imports: [BrowserModule] }); | ||
| static ɵfac = i0.ɵɵngDeclareFactory({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserTestingModule, | ||
| deps: [], | ||
| target: i0.ɵɵFactoryTarget.NgModule | ||
| }); | ||
| static ɵmod = i0.ɵɵngDeclareNgModule({ | ||
| minVersion: "14.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserTestingModule, | ||
| exports: [BrowserModule] | ||
| }); | ||
| static ɵinj = i0.ɵɵngDeclareInjector({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserTestingModule, | ||
| providers: [{ | ||
| provide: APP_ID, | ||
| useValue: 'a' | ||
| }, _provideFakePlatformNavigation(), { | ||
| provide: TestComponentRenderer, | ||
| useClass: DOMTestComponentRenderer | ||
| }], | ||
| imports: [BrowserModule] | ||
| }); | ||
| } | ||
| i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0-next.9", ngImport: i0, type: BrowserTestingModule, decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: [ | ||
| { provide: APP_ID, useValue: 'a' }, | ||
| _provideFakePlatformNavigation(), | ||
| { provide: TestComponentRenderer, useClass: DOMTestComponentRenderer }, | ||
| ], | ||
| }] | ||
| }] }); | ||
| i0.ɵɵngDeclareClassMetadata({ | ||
| minVersion: "12.0.0", | ||
| version: "21.0.0-next.10", | ||
| ngImport: i0, | ||
| type: BrowserTestingModule, | ||
| decorators: [{ | ||
| type: NgModule, | ||
| args: [{ | ||
| exports: [BrowserModule], | ||
| providers: [{ | ||
| provide: APP_ID, | ||
| useValue: 'a' | ||
| }, _provideFakePlatformNavigation(), { | ||
| provide: TestComponentRenderer, | ||
| useClass: DOMTestComponentRenderer | ||
| }] | ||
| }] | ||
| }] | ||
| }); | ||
| export { BrowserTestingModule, platformBrowserTesting }; | ||
| //# sourceMappingURL=testing.mjs.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"testing.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/testing/src/dom_test_component_renderer.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/testing/src/browser.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\n\n/**\n * A DOM based implementation of the TestComponentRenderer.\n */\n@Injectable()\nexport class DOMTestComponentRenderer extends TestComponentRenderer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override insertRootElement(rootElId: string, tagName = 'div') {\n this.removeAllRootElementsImpl();\n const rootElement = getDOM().getDefaultDocument().createElement(tagName);\n rootElement.setAttribute('id', rootElId);\n this._doc.body.appendChild(rootElement);\n }\n\n override removeAllRootElements() {\n // Check whether the `DOCUMENT` instance retrieved from DI contains\n // the necessary function to complete the cleanup. In tests that don't\n // interact with DOM, the `DOCUMENT` might be mocked and some functions\n // might be missing. For such tests, DOM cleanup is not required and\n // we skip the logic if there are missing functions.\n if (typeof this._doc.querySelectorAll === 'function') {\n this.removeAllRootElementsImpl();\n }\n }\n\n private removeAllRootElementsImpl() {\n const oldRoots = this._doc.querySelectorAll('[id^=root]');\n for (let i = 0; i < oldRoots.length; i++) {\n getDOM().remove(oldRoots[i]);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ɵprovideFakePlatformNavigation} from '@angular/common/testing';\nimport {\n APP_ID,\n createPlatformFactory,\n NgModule,\n StaticProvider,\n ɵprovideZonelessChangeDetectionInternal as provideZonelessChangeDetectionInternal,\n ɵinternalProvideZoneChangeDetection as internalProvideZoneChangeDetection,\n PlatformRef,\n} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\nimport {BrowserModule, platformBrowser} from '../../index';\nimport {DOMTestComponentRenderer} from './dom_test_component_renderer';\n\nconst ZONELESS_BY_DEFAULT = true;\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformBrowserTesting: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(platformBrowser, 'browserTesting');\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: [\n {provide: APP_ID, useValue: 'a'},\n ɵprovideFakePlatformNavigation(),\n {provide: TestComponentRenderer, useClass: DOMTestComponentRenderer},\n ],\n})\nexport class BrowserTestingModule {}\n"],"names":["getDOM","ɵprovideFakePlatformNavigation"],"mappings":";;;;;;;;;;;;;;AAYA;;AAEG;AAEG,MAAO,wBAAyB,SAAQ,qBAAqB,CAAA;AAC3B,IAAA,IAAA;AAAtC,IAAA,WAAA,CAAsC,IAAS,EAAA;AAC7C,QAAA,KAAK,EAAE;QAD6B,IAAI,CAAA,IAAA,GAAJ,IAAI;;AAIjC,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AA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAPrB,aAAa,CAAA,EAAA,CAAA;AAOZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EANpB,SAAA,EAAA;AACT,YAAA,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAC;AAChC,YAAAC,8BAA8B,EAAE;AAChC,YAAA,EAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,wBAAwB,EAAC;AACrE,SAAA,EAAA,OAAA,EAAA,CALS,aAAa,CAAA,EAAA,CAAA;;sGAOZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,CAAC;AACxB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAC;AAChC,wBAAAA,8BAA8B,EAAE;AAChC,wBAAA,EAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,wBAAwB,EAAC;AACrE,qBAAA;AACF,iBAAA;;;;;"} | ||
| {"version":3,"file":"testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/testing/src/dom_test_component_renderer.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/platform-browser/testing/src/browser.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\n\n/**\n * A DOM based implementation of the TestComponentRenderer.\n */\n@Injectable()\nexport class DOMTestComponentRenderer extends TestComponentRenderer {\n constructor(@Inject(DOCUMENT) private _doc: any) {\n super();\n }\n\n override insertRootElement(rootElId: string, tagName = 'div') {\n this.removeAllRootElementsImpl();\n const rootElement = getDOM().getDefaultDocument().createElement(tagName);\n rootElement.setAttribute('id', rootElId);\n this._doc.body.appendChild(rootElement);\n }\n\n override removeAllRootElements() {\n // Check whether the `DOCUMENT` instance retrieved from DI contains\n // the necessary function to complete the cleanup. In tests that don't\n // interact with DOM, the `DOCUMENT` might be mocked and some functions\n // might be missing. For such tests, DOM cleanup is not required and\n // we skip the logic if there are missing functions.\n if (typeof this._doc.querySelectorAll === 'function') {\n this.removeAllRootElementsImpl();\n }\n }\n\n private removeAllRootElementsImpl() {\n const oldRoots = this._doc.querySelectorAll('[id^=root]');\n for (let i = 0; i < oldRoots.length; i++) {\n getDOM().remove(oldRoots[i]);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport {ɵprovideFakePlatformNavigation} from '@angular/common/testing';\nimport {APP_ID, createPlatformFactory, NgModule, StaticProvider, PlatformRef} from '@angular/core';\nimport {TestComponentRenderer} from '@angular/core/testing';\nimport {BrowserModule, platformBrowser} from '../../index';\nimport {DOMTestComponentRenderer} from './dom_test_component_renderer';\n\n/**\n * Platform for testing\n *\n * @publicApi\n */\nexport const platformBrowserTesting: (extraProviders?: StaticProvider[]) => PlatformRef =\n createPlatformFactory(platformBrowser, 'browserTesting');\n\n/**\n * NgModule for testing.\n *\n * @publicApi\n */\n@NgModule({\n exports: [BrowserModule],\n providers: [\n {provide: APP_ID, useValue: 'a'},\n ɵprovideFakePlatformNavigation(),\n {provide: TestComponentRenderer, useClass: DOMTestComponentRenderer},\n ],\n})\nexport class BrowserTestingModule {}\n"],"names":["DOMTestComponentRenderer","TestComponentRenderer","_doc","constructor","removeAllRootElementsImpl","rootElement","getDOM","getDefaultDocument","createElement","tagName","setAttribute","rootElId","body","appendChild","remove","oldRoots","i","minVersion","version","ngImport","i0","type","decorators","platformBrowserTesting","createPlatformFactory","platformBrowser","BrowserTestingModule","deps","target","ɵɵFactoryTarget","NgModule","ɵmod","ɵɵngDeclareNgModule","exports","BrowserModule","imports","providers","APP_ID","useValue"],"mappings":";;;;;;;;;;;;;;AAiBwC,MAAAA,wBAAA,SAAAC,qBAAA,CAAA;EAAtCC,IAAA;AACEC,EAAAA,WAAAA,CAAAD,IAAA,EAAA;;;;;AAMA,IAAA,IAAA,CAAAE,yBAA+B,EAAA;IACO,MAAAC,WAAA,GAAAC,OAAA,EAAA,CAAAC,kBAAA,EAAAC,CAAAA,aAAA,CAAAC,OAAA,CAAA;eAAA,CAACC,YAAA,CAAA,IAAA,EAAAC,QAAA,CAAA;AACzC,IAAA,IAAA,CAAAT,IAAA,CAAAU,IAAA,CAAAC,WAAA,CAAAR,WAAA,CAAA;;;;AAWA,MAAA,IAAA,CAAAD,yBAAA,EAAA;AAEQ;;2BAENA,GAAA;;;AAGFE,MAAAA,OAAA,EAAAQ,CAAAA,MAAA,CAAAC,QAAA,CAAAC,CAAA,CAAA,CAAA;;;;;;;;;;;;;yCA7BS,CAAA;IAAAC,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAC,EAAA;AAAAC,IAAAA,IAAA,EAAArB;AAAA,GAAA,CAAA;;;YAEU,EAAA,QAAA;EAAAkB,OAAA,EAAA,mBAAA;AAAAC,EAAAA,QAAA,EAAAC,EAAA;AAAAC,EAAAA,IAAA,EAAArB,wBAAA;EAAAsB,UAAA,EAAA,CAAA;;;;;;;;;;;;ACCRC,MAAAA,sBAAA,GAAAC,qBACX,CAAAC,eAAqC,EAAA,gBAAA;AAevC,MAAAC,oBAAA,CAAA;qCAAa,CAAA;AAAAT,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAC,EAAA;AAAAC,IAAAA,IAAA,EAAAK,oBAAA;IAAAC,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAR,EAAA,CAAAS,eAAA,CAAAC;AAAA,GAAA,CAAA;AALT,EAAA,OAAAC,IAAA,GAAAX,EAAA,CAAAY,mBAAA,CAAA;IAAAf,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAAC,EAAA;AAAAC,IAAAA,IAAA,EAAAK,oBAAA;AAAAO,IAAAA,OAAA,GAAAC,aAAA;AAAA,GAAA,CAAA;;;;;;;;;;;;KAGD,CAAA;AAAAC,IAAAA,OAAA,GAAAD,aAAA;AAAA,GAAA,CAAA;;;;;;AAAA,EAAA,IAAA,EAAA,oBAAA;AAAAZ,EAAAA,UAAA,EAAA,CAAA;;;MAJDW,OAAA,EAAA,CAAAC,aAAW,CAAA;AACTE,MAAAA,SAAA;iBAHKC,MAAA;QAAAC,QAAA,EAAA;;;;;;;;;;;"} |
+4
-4
| { | ||
| "name": "@angular/platform-browser", | ||
| "version": "21.0.0-next.9", | ||
| "version": "21.0.0-next.10", | ||
| "description": "Angular - library for using Angular in a web browser", | ||
@@ -14,5 +14,5 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/animations": "21.0.0-next.9", | ||
| "@angular/core": "21.0.0-next.9", | ||
| "@angular/common": "21.0.0-next.9" | ||
| "@angular/animations": "21.0.0-next.10", | ||
| "@angular/core": "21.0.0-next.10", | ||
| "@angular/common": "21.0.0-next.10" | ||
| }, | ||
@@ -19,0 +19,0 @@ "peerDependenciesMeta": { |
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.0.0-next.9 | ||
| * @license Angular v21.0.0-next.10 | ||
| * (c) 2010-2025 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
4
-78.95%283834
-23.81%3678
-11.2%