@angular/platform-server 20.0.0-next.9 → 20.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.9
2
+ * @license Angular v20.0.0-rc.1
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { PLATFORM_SERVER_PROVIDERS, PlatformState, BEFORE_APP_SERIALIZED, platformServer, INITIAL_CONFIG, createScript } from './server-BPmC12ZL.mjs';
8
- export { ServerModule, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS } from './server-BPmC12ZL.mjs';
7
+ import { PLATFORM_SERVER_PROVIDERS, PlatformState, BEFORE_APP_SERIALIZED, platformServer, INITIAL_CONFIG, createScript } from './server-Djcde0Qr.mjs';
8
+ export { ServerModule, ENABLE_DOM_EMULATION as ɵENABLE_DOM_EMULATION, INTERNAL_SERVER_PLATFORM_PROVIDERS as ɵINTERNAL_SERVER_PLATFORM_PROVIDERS, SERVER_RENDER_PROVIDERS as ɵSERVER_RENDER_PROVIDERS } from './server-Djcde0Qr.mjs';
9
9
  import { makeEnvironmentProviders, InjectionToken, ɵstartMeasuring as _startMeasuring, ɵstopMeasuring as _stopMeasuring, ApplicationRef, ɵIS_HYDRATION_DOM_REUSE_ENABLED as _IS_HYDRATION_DOM_REUSE_ENABLED, ɵannotateForHydration as _annotateForHydration, CSP_NONCE, APP_ID, Renderer2, ɵSSR_CONTENT_INTEGRITY_MARKER as _SSR_CONTENT_INTEGRITY_MARKER, Version } from '@angular/core';
10
10
  import '@angular/common';
11
11
  import '@angular/platform-browser';
@@ -301,7 +301,7 @@ async function renderApplication(bootstrap, options) {
301
301
  /**
302
302
  * @publicApi
303
303
  */
304
- const VERSION = new Version('20.0.0-next.9');
304
+ const VERSION = new Version('20.0.0-rc.1');
305
305
 
306
306
  export { BEFORE_APP_SERIALIZED, INITIAL_CONFIG, PlatformState, VERSION, platformServer, provideServerRendering, renderApplication, renderModule, SERVER_CONTEXT as ɵSERVER_CONTEXT, renderInternal as ɵrenderInternal };
307
307
  //# sourceMappingURL=platform-server.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-server.mjs","sources":["../../../../../../packages/platform-server/src/provide_server.ts","../../../../../../packages/platform-server/src/utils.ts","../../../../../../packages/platform-server/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 {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nimport {PLATFORM_SERVER_PROVIDERS} from './server';\n\n/**\n * Sets up providers necessary to enable server rendering functionality for the application.\n *\n * @usageNotes\n *\n * Basic example of how you can add server support to your application:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideServerRendering()]\n * });\n * ```\n *\n * @publicApi\n * @returns A set of providers to setup the server.\n */\nexport function provideServerRendering(): EnvironmentProviders {\n if (typeof ngServerMode === 'undefined') {\n globalThis['ngServerMode'] = true;\n }\n\n return makeEnvironmentProviders([...PLATFORM_SERVER_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 */\n\nimport {\n APP_ID,\n ApplicationRef,\n CSP_NONCE,\n InjectionToken,\n PlatformRef,\n Provider,\n Renderer2,\n StaticProvider,\n Type,\n ɵannotateForHydration as annotateForHydration,\n ɵIS_HYDRATION_DOM_REUSE_ENABLED as IS_HYDRATION_DOM_REUSE_ENABLED,\n ɵSSR_CONTENT_INTEGRITY_MARKER as SSR_CONTENT_INTEGRITY_MARKER,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {PlatformState} from './platform_state';\nimport {platformServer} from './server';\nimport {BEFORE_APP_SERIALIZED, INITIAL_CONFIG} from './tokens';\nimport {createScript} from './transfer_state';\n\n/**\n * Event dispatch (JSAction) script is inlined into the HTML by the build\n * process to avoid extra blocking request on a page. The script looks like this:\n * ```html\n * <script type=\"text/javascript\" id=\"ng-event-dispatch-contract\">...</script>\n * ```\n * This const represents the \"id\" attribute value.\n */\nexport const EVENT_DISPATCH_SCRIPT_ID = 'ng-event-dispatch-contract';\n\ninterface PlatformOptions {\n document?: string | Document;\n url?: string;\n platformProviders?: Provider[];\n}\n\n/**\n * Creates an instance of a server platform (with or without JIT compiler support\n * depending on the `ngJitMode` global const value), using provided options.\n */\nfunction createServerPlatform(options: PlatformOptions): PlatformRef {\n const extraProviders = options.platformProviders ?? [];\n const measuringLabel = 'createServerPlatform';\n startMeasuring(measuringLabel);\n\n const platform = platformServer([\n {provide: INITIAL_CONFIG, useValue: {document: options.document, url: options.url}},\n extraProviders,\n ]);\n\n stopMeasuring(measuringLabel);\n return platform;\n}\n\n/**\n * Finds and returns inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction findEventDispatchScript(doc: Document) {\n return doc.getElementById(EVENT_DISPATCH_SCRIPT_ID);\n}\n\n/**\n * Removes inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction removeEventDispatchScript(doc: Document) {\n findEventDispatchScript(doc)?.remove();\n}\n\n/**\n * Annotate nodes for hydration and remove event dispatch script when not needed.\n */\nfunction prepareForHydration(platformState: PlatformState, applicationRef: ApplicationRef): void {\n const measuringLabel = 'prepareForHydration';\n startMeasuring(measuringLabel);\n const environmentInjector = applicationRef.injector;\n const doc = platformState.getDocument();\n\n if (!environmentInjector.get(IS_HYDRATION_DOM_REUSE_ENABLED, false)) {\n // Hydration is diabled, remove inlined event dispatch script.\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n\n return;\n }\n\n appendSsrContentIntegrityMarker(doc);\n\n const eventTypesToReplay = annotateForHydration(applicationRef, doc);\n if (eventTypesToReplay.regular.size || eventTypesToReplay.capture.size) {\n insertEventRecordScript(\n environmentInjector.get(APP_ID),\n doc,\n eventTypesToReplay,\n environmentInjector.get(CSP_NONCE, null),\n );\n } else {\n // No events to replay, we should remove inlined event dispatch script\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Creates a marker comment node and append it into the `<body>`.\n * Some CDNs have mechanisms to remove all comment node from HTML.\n * This behaviour breaks hydration, so we'll detect on the client side if this\n * marker comment is still available or else throw an error\n */\nfunction appendSsrContentIntegrityMarker(doc: Document) {\n // Adding a ng hydration marker comment\n const comment = doc.createComment(SSR_CONTENT_INTEGRITY_MARKER);\n doc.body.firstChild\n ? doc.body.insertBefore(comment, doc.body.firstChild)\n : doc.body.append(comment);\n}\n\n/**\n * Adds the `ng-server-context` attribute to host elements of all bootstrapped components\n * within a given application.\n */\nfunction appendServerContextInfo(applicationRef: ApplicationRef) {\n const injector = applicationRef.injector;\n let serverContext = sanitizeServerContext(injector.get(SERVER_CONTEXT, DEFAULT_SERVER_CONTEXT));\n applicationRef.components.forEach((componentRef) => {\n const renderer = componentRef.injector.get(Renderer2);\n const element = componentRef.location.nativeElement;\n if (element) {\n renderer.setAttribute(element, 'ng-server-context', serverContext);\n }\n });\n}\n\nfunction insertEventRecordScript(\n appId: string,\n doc: Document,\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>},\n nonce: string | null,\n): void {\n const measuringLabel = 'insertEventRecordScript';\n startMeasuring(measuringLabel);\n const {regular, capture} = eventTypesToReplay;\n const eventDispatchScript = findEventDispatchScript(doc);\n\n // Note: this is only true when build with the CLI tooling, which inserts the script in the HTML\n if (eventDispatchScript) {\n // This is defined in packages/core/primitives/event-dispatch/contract_binary.ts\n const replayScriptContents =\n `window.__jsaction_bootstrap(` +\n `document.body,` +\n `\"${appId}\",` +\n `${JSON.stringify(Array.from(regular))},` +\n `${JSON.stringify(Array.from(capture))}` +\n `);`;\n\n const replayScript = createScript(doc, replayScriptContents, nonce);\n\n // Insert replay script right after inlined event dispatch script, since it\n // relies on `__jsaction_bootstrap` to be defined in the global scope.\n eventDispatchScript.after(replayScript);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Renders an Angular application to a string.\n *\n * @private\n *\n * @param platformRef - Reference to the Angular platform.\n * @param applicationRef - Reference to the Angular application.\n * @returns A promise that resolves to the rendered string.\n */\nexport async function renderInternal(\n platformRef: PlatformRef,\n applicationRef: ApplicationRef,\n): Promise<string> {\n const platformState = platformRef.injector.get(PlatformState);\n prepareForHydration(platformState, applicationRef);\n appendServerContextInfo(applicationRef);\n\n // Run any BEFORE_APP_SERIALIZED callbacks just before rendering to string.\n const environmentInjector = applicationRef.injector;\n const callbacks = environmentInjector.get(BEFORE_APP_SERIALIZED, null);\n if (callbacks) {\n const asyncCallbacks: Promise<void>[] = [];\n for (const callback of callbacks) {\n try {\n const callbackResult = callback();\n if (callbackResult) {\n asyncCallbacks.push(callbackResult);\n }\n } catch (e) {\n // Ignore exceptions.\n console.warn('Ignoring BEFORE_APP_SERIALIZED Exception: ', e);\n }\n }\n\n if (asyncCallbacks.length) {\n for (const result of await Promise.allSettled(asyncCallbacks)) {\n if (result.status === 'rejected') {\n console.warn('Ignoring BEFORE_APP_SERIALIZED Exception: ', result.reason);\n }\n }\n }\n }\n\n return platformState.renderToString();\n}\n\n/**\n * Destroy the application in a macrotask, this allows pending promises to be settled and errors\n * to be surfaced to the users.\n */\nfunction asyncDestroyPlatform(platformRef: PlatformRef): Promise<void> {\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n platformRef.destroy();\n resolve();\n }, 0);\n });\n}\n\n/**\n * Specifies the value that should be used if no server context value has been provided.\n */\nconst DEFAULT_SERVER_CONTEXT = 'other';\n\n/**\n * An internal token that allows providing extra information about the server context\n * (e.g. whether SSR or SSG was used). The value is a string and characters other\n * than [a-zA-Z0-9\\-] are removed. See the default value in `DEFAULT_SERVER_CONTEXT` const.\n */\nexport const SERVER_CONTEXT = new InjectionToken<string>('SERVER_CONTEXT');\n\n/**\n * Sanitizes provided server context:\n * - removes all characters other than a-z, A-Z, 0-9 and `-`\n * - returns `other` if nothing is provided or the string is empty after sanitization\n */\nfunction sanitizeServerContext(serverContext: string): string {\n const context = serverContext.replace(/[^a-zA-Z0-9\\-]/g, '');\n return context.length > 0 ? context : DEFAULT_SERVER_CONTEXT;\n}\n\n/**\n * Bootstraps an application using provided NgModule and serializes the page content to string.\n *\n * @param moduleType A reference to an NgModule that should be used for bootstrap.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `extraProviders` - set of platform level providers for the current render request.\n *\n * @publicApi\n */\nexport async function renderModule<T>(\n moduleType: Type<T>,\n options: {document?: string | Document; url?: string; extraProviders?: StaticProvider[]},\n): Promise<string> {\n const {document, url, extraProviders: platformProviders} = options;\n const platformRef = createServerPlatform({document, url, platformProviders});\n try {\n const moduleRef = await platformRef.bootstrapModule(moduleType);\n const applicationRef = moduleRef.injector.get(ApplicationRef);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n return await renderInternal(platformRef, applicationRef);\n } finally {\n await asyncDestroyPlatform(platformRef);\n }\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders it to a string.\n\n * ```ts\n * const bootstrap = () => bootstrapApplication(RootComponent, appConfig);\n * const output: string = await renderApplication(bootstrap);\n * ```\n *\n * @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`\n * instance once resolved.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `platformProviders` - the platform level providers for the current render request.\n *\n * @returns A Promise, that returns serialized (to a string) rendered page, once resolved.\n *\n * @publicApi\n */\nexport async function renderApplication<T>(\n bootstrap: () => Promise<ApplicationRef>,\n options: {document?: string | Document; url?: string; platformProviders?: Provider[]},\n): Promise<string> {\n const renderAppLabel = 'renderApplication';\n const bootstrapLabel = 'bootstrap';\n const _renderLabel = '_render';\n\n startMeasuring(renderAppLabel);\n const platformRef = createServerPlatform(options);\n try {\n startMeasuring(bootstrapLabel);\n const applicationRef = await bootstrap();\n stopMeasuring(bootstrapLabel);\n\n startMeasuring(_renderLabel);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n const rendered = await renderInternal(platformRef, applicationRef);\n stopMeasuring(_renderLabel);\n return rendered;\n } finally {\n await asyncDestroyPlatform(platformRef);\n stopMeasuring(renderAppLabel);\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-server package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('20.0.0-next.9');\n"],"names":["startMeasuring","stopMeasuring","IS_HYDRATION_DOM_REUSE_ENABLED","annotateForHydration","SSR_CONTENT_INTEGRITY_MARKER"],"mappings":";;;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;AAcG;SACa,sBAAsB,GAAA;AACpC,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;AACvC,QAAA,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI;;AAGnC,IAAA,OAAO,wBAAwB,CAAC,CAAC,GAAG,yBAAyB,CAAC,CAAC;AACjE;;ACHA;;;;;;;AAOG;AACI,MAAM,wBAAwB,GAAG,4BA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O,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"platform-server.mjs","sources":["../../../../../../packages/platform-server/src/provide_server.ts","../../../../../../packages/platform-server/src/utils.ts","../../../../../../packages/platform-server/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 {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nimport {PLATFORM_SERVER_PROVIDERS} from './server';\n\n/**\n * Sets up providers necessary to enable server rendering functionality for the application.\n *\n * @usageNotes\n *\n * Basic example of how you can add server support to your application:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideServerRendering()]\n * });\n * ```\n *\n * @publicApi\n * @returns A set of providers to setup the server.\n */\nexport function provideServerRendering(): EnvironmentProviders {\n if (typeof ngServerMode === 'undefined') {\n globalThis['ngServerMode'] = true;\n }\n\n return makeEnvironmentProviders([...PLATFORM_SERVER_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 */\n\nimport {\n APP_ID,\n ApplicationRef,\n CSP_NONCE,\n InjectionToken,\n PlatformRef,\n Provider,\n Renderer2,\n StaticProvider,\n Type,\n ɵannotateForHydration as annotateForHydration,\n ɵIS_HYDRATION_DOM_REUSE_ENABLED as IS_HYDRATION_DOM_REUSE_ENABLED,\n ɵSSR_CONTENT_INTEGRITY_MARKER as SSR_CONTENT_INTEGRITY_MARKER,\n ɵstartMeasuring as startMeasuring,\n ɵstopMeasuring as stopMeasuring,\n} from '@angular/core';\n\nimport {PlatformState} from './platform_state';\nimport {platformServer} from './server';\nimport {BEFORE_APP_SERIALIZED, INITIAL_CONFIG} from './tokens';\nimport {createScript} from './transfer_state';\n\n/**\n * Event dispatch (JSAction) script is inlined into the HTML by the build\n * process to avoid extra blocking request on a page. The script looks like this:\n * ```html\n * <script type=\"text/javascript\" id=\"ng-event-dispatch-contract\">...</script>\n * ```\n * This const represents the \"id\" attribute value.\n */\nexport const EVENT_DISPATCH_SCRIPT_ID = 'ng-event-dispatch-contract';\n\ninterface PlatformOptions {\n document?: string | Document;\n url?: string;\n platformProviders?: Provider[];\n}\n\n/**\n * Creates an instance of a server platform (with or without JIT compiler support\n * depending on the `ngJitMode` global const value), using provided options.\n */\nfunction createServerPlatform(options: PlatformOptions): PlatformRef {\n const extraProviders = options.platformProviders ?? [];\n const measuringLabel = 'createServerPlatform';\n startMeasuring(measuringLabel);\n\n const platform = platformServer([\n {provide: INITIAL_CONFIG, useValue: {document: options.document, url: options.url}},\n extraProviders,\n ]);\n\n stopMeasuring(measuringLabel);\n return platform;\n}\n\n/**\n * Finds and returns inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction findEventDispatchScript(doc: Document) {\n return doc.getElementById(EVENT_DISPATCH_SCRIPT_ID);\n}\n\n/**\n * Removes inlined event dispatch script if it exists.\n * See the `EVENT_DISPATCH_SCRIPT_ID` const docs for additional info.\n */\nfunction removeEventDispatchScript(doc: Document) {\n findEventDispatchScript(doc)?.remove();\n}\n\n/**\n * Annotate nodes for hydration and remove event dispatch script when not needed.\n */\nfunction prepareForHydration(platformState: PlatformState, applicationRef: ApplicationRef): void {\n const measuringLabel = 'prepareForHydration';\n startMeasuring(measuringLabel);\n const environmentInjector = applicationRef.injector;\n const doc = platformState.getDocument();\n\n if (!environmentInjector.get(IS_HYDRATION_DOM_REUSE_ENABLED, false)) {\n // Hydration is diabled, remove inlined event dispatch script.\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n\n return;\n }\n\n appendSsrContentIntegrityMarker(doc);\n\n const eventTypesToReplay = annotateForHydration(applicationRef, doc);\n if (eventTypesToReplay.regular.size || eventTypesToReplay.capture.size) {\n insertEventRecordScript(\n environmentInjector.get(APP_ID),\n doc,\n eventTypesToReplay,\n environmentInjector.get(CSP_NONCE, null),\n );\n } else {\n // No events to replay, we should remove inlined event dispatch script\n // (which was injected by the build process) from the HTML.\n removeEventDispatchScript(doc);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Creates a marker comment node and append it into the `<body>`.\n * Some CDNs have mechanisms to remove all comment node from HTML.\n * This behaviour breaks hydration, so we'll detect on the client side if this\n * marker comment is still available or else throw an error\n */\nfunction appendSsrContentIntegrityMarker(doc: Document) {\n // Adding a ng hydration marker comment\n const comment = doc.createComment(SSR_CONTENT_INTEGRITY_MARKER);\n doc.body.firstChild\n ? doc.body.insertBefore(comment, doc.body.firstChild)\n : doc.body.append(comment);\n}\n\n/**\n * Adds the `ng-server-context` attribute to host elements of all bootstrapped components\n * within a given application.\n */\nfunction appendServerContextInfo(applicationRef: ApplicationRef) {\n const injector = applicationRef.injector;\n let serverContext = sanitizeServerContext(injector.get(SERVER_CONTEXT, DEFAULT_SERVER_CONTEXT));\n applicationRef.components.forEach((componentRef) => {\n const renderer = componentRef.injector.get(Renderer2);\n const element = componentRef.location.nativeElement;\n if (element) {\n renderer.setAttribute(element, 'ng-server-context', serverContext);\n }\n });\n}\n\nfunction insertEventRecordScript(\n appId: string,\n doc: Document,\n eventTypesToReplay: {regular: Set<string>; capture: Set<string>},\n nonce: string | null,\n): void {\n const measuringLabel = 'insertEventRecordScript';\n startMeasuring(measuringLabel);\n const {regular, capture} = eventTypesToReplay;\n const eventDispatchScript = findEventDispatchScript(doc);\n\n // Note: this is only true when build with the CLI tooling, which inserts the script in the HTML\n if (eventDispatchScript) {\n // This is defined in packages/core/primitives/event-dispatch/contract_binary.ts\n const replayScriptContents =\n `window.__jsaction_bootstrap(` +\n `document.body,` +\n `\"${appId}\",` +\n `${JSON.stringify(Array.from(regular))},` +\n `${JSON.stringify(Array.from(capture))}` +\n `);`;\n\n const replayScript = createScript(doc, replayScriptContents, nonce);\n\n // Insert replay script right after inlined event dispatch script, since it\n // relies on `__jsaction_bootstrap` to be defined in the global scope.\n eventDispatchScript.after(replayScript);\n }\n stopMeasuring(measuringLabel);\n}\n\n/**\n * Renders an Angular application to a string.\n *\n * @private\n *\n * @param platformRef - Reference to the Angular platform.\n * @param applicationRef - Reference to the Angular application.\n * @returns A promise that resolves to the rendered string.\n */\nexport async function renderInternal(\n platformRef: PlatformRef,\n applicationRef: ApplicationRef,\n): Promise<string> {\n const platformState = platformRef.injector.get(PlatformState);\n prepareForHydration(platformState, applicationRef);\n appendServerContextInfo(applicationRef);\n\n // Run any BEFORE_APP_SERIALIZED callbacks just before rendering to string.\n const environmentInjector = applicationRef.injector;\n const callbacks = environmentInjector.get(BEFORE_APP_SERIALIZED, null);\n if (callbacks) {\n const asyncCallbacks: Promise<void>[] = [];\n for (const callback of callbacks) {\n try {\n const callbackResult = callback();\n if (callbackResult) {\n asyncCallbacks.push(callbackResult);\n }\n } catch (e) {\n // Ignore exceptions.\n console.warn('Ignoring BEFORE_APP_SERIALIZED Exception: ', e);\n }\n }\n\n if (asyncCallbacks.length) {\n for (const result of await Promise.allSettled(asyncCallbacks)) {\n if (result.status === 'rejected') {\n console.warn('Ignoring BEFORE_APP_SERIALIZED Exception: ', result.reason);\n }\n }\n }\n }\n\n return platformState.renderToString();\n}\n\n/**\n * Destroy the application in a macrotask, this allows pending promises to be settled and errors\n * to be surfaced to the users.\n */\nfunction asyncDestroyPlatform(platformRef: PlatformRef): Promise<void> {\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n platformRef.destroy();\n resolve();\n }, 0);\n });\n}\n\n/**\n * Specifies the value that should be used if no server context value has been provided.\n */\nconst DEFAULT_SERVER_CONTEXT = 'other';\n\n/**\n * An internal token that allows providing extra information about the server context\n * (e.g. whether SSR or SSG was used). The value is a string and characters other\n * than [a-zA-Z0-9\\-] are removed. See the default value in `DEFAULT_SERVER_CONTEXT` const.\n */\nexport const SERVER_CONTEXT = new InjectionToken<string>('SERVER_CONTEXT');\n\n/**\n * Sanitizes provided server context:\n * - removes all characters other than a-z, A-Z, 0-9 and `-`\n * - returns `other` if nothing is provided or the string is empty after sanitization\n */\nfunction sanitizeServerContext(serverContext: string): string {\n const context = serverContext.replace(/[^a-zA-Z0-9\\-]/g, '');\n return context.length > 0 ? context : DEFAULT_SERVER_CONTEXT;\n}\n\n/**\n * Bootstraps an application using provided NgModule and serializes the page content to string.\n *\n * @param moduleType A reference to an NgModule that should be used for bootstrap.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `extraProviders` - set of platform level providers for the current render request.\n *\n * @publicApi\n */\nexport async function renderModule<T>(\n moduleType: Type<T>,\n options: {document?: string | Document; url?: string; extraProviders?: StaticProvider[]},\n): Promise<string> {\n const {document, url, extraProviders: platformProviders} = options;\n const platformRef = createServerPlatform({document, url, platformProviders});\n try {\n const moduleRef = await platformRef.bootstrapModule(moduleType);\n const applicationRef = moduleRef.injector.get(ApplicationRef);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n return await renderInternal(platformRef, applicationRef);\n } finally {\n await asyncDestroyPlatform(platformRef);\n }\n}\n\n/**\n * Bootstraps an instance of an Angular application and renders it to a string.\n\n * ```ts\n * const bootstrap = () => bootstrapApplication(RootComponent, appConfig);\n * const output: string = await renderApplication(bootstrap);\n * ```\n *\n * @param bootstrap A method that when invoked returns a promise that returns an `ApplicationRef`\n * instance once resolved.\n * @param options Additional configuration for the render operation:\n * - `document` - the document of the page to render, either as an HTML string or\n * as a reference to the `document` instance.\n * - `url` - the URL for the current render request.\n * - `platformProviders` - the platform level providers for the current render request.\n *\n * @returns A Promise, that returns serialized (to a string) rendered page, once resolved.\n *\n * @publicApi\n */\nexport async function renderApplication<T>(\n bootstrap: () => Promise<ApplicationRef>,\n options: {document?: string | Document; url?: string; platformProviders?: Provider[]},\n): Promise<string> {\n const renderAppLabel = 'renderApplication';\n const bootstrapLabel = 'bootstrap';\n const _renderLabel = '_render';\n\n startMeasuring(renderAppLabel);\n const platformRef = createServerPlatform(options);\n try {\n startMeasuring(bootstrapLabel);\n const applicationRef = await bootstrap();\n stopMeasuring(bootstrapLabel);\n\n startMeasuring(_renderLabel);\n\n const measuringLabel = 'whenStable';\n startMeasuring(measuringLabel);\n // Block until application is stable.\n await applicationRef.whenStable();\n stopMeasuring(measuringLabel);\n\n const rendered = await renderInternal(platformRef, applicationRef);\n stopMeasuring(_renderLabel);\n return rendered;\n } finally {\n await asyncDestroyPlatform(platformRef);\n stopMeasuring(renderAppLabel);\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-server package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('20.0.0-rc.1');\n"],"names":["startMeasuring","stopMeasuring","IS_HYDRATION_DOM_REUSE_ENABLED","annotateForHydration","SSR_CONTENT_INTEGRITY_MARKER"],"mappings":";;;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;AAcG;SACa,sBAAsB,GAAA;AACpC,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;AACvC,QAAA,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI;;AAGnC,IAAA,OAAO,wBAAwB,CAAC,CAAC,GAAG,yBAAyB,CAAC,CAAC;AACjE;;ACHA;;;;;;;AAOG;AACI,MAAM,wBAAwB,GAAG,4BAA4B;AAQpE;;;AAGG;AACH,SAAS,oBAAoB,CAAC,OAAwB,EAAA;AACpD,IAAA,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,IAAI,EAAE;IACtD,MAAM,cAAc,GAAG,sBAAsB;IAC7CA,eAAc,CAAC,cAAc,CAAC;IAE9B,MAAM,QAAQ,GAAG,cAAc,CAAC;A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AAM,cAAc,CAAC,UAAU,EAAE;QACjCC,cAAa,CAAC,cAAc,CAAC;AAE7B,QAAA,OAAO,MAAM,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC;;YAChD;AACR,QAAA,MAAM,oBAAoB,CAAC,WAAW,CAAC;;AAE3C;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;AACI,eAAe,iBAAiB,CACrC,SAAwC,EACxC,OAAqF,EAAA;IAErF,MAAM,cAAc,GAAG,mBAAmB;IAC1C,MAAM,cAAc,GAAG,WAAW;IAClC,MAAM,YAAY,GAAG,SAAS;IAE9BD,eAAc,CAAC,cAAc,CAAC;AAC9B,IAAA,MAAM,WAAW,GAAG,oBAAoB,CAAC,OAAO,CAAC;AACjD,IAAA,IAAI;QACFA,eAAc,CAAC,cAAc,CAAC;AAC9B,QAAA,MAAM,cAAc,GAAG,MAAM,SAAS,EAAE;QACxCC,cAAa,CAAC,cAAc,CAAC;QAE7BD,eAAc,CAAC,YAAY,CAAC;QAE5B,MAAM,cAAc,GAAG,YAAY;QACnCA,eAAc,CAAC,cAAc,CAAC;;AAE9B,QAAA,MAAM,cAAc,CAAC,UAAU,EAAE;QACjCC,cAAa,CAAC,cAAc,CAAC;QAE7B,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,WAAW,EAAE,cAAc,CAAC;QAClEA,cAAa,CAAC,YAAY,CAAC;AAC3B,QAAA,OAAO,QAAQ;;YACP;AACR,QAAA,MAAM,oBAAoB,CAAC,WAAW,CAAC;QACvCA,cAAa,CAAC,cAAc,CAAC;;AAEjC;;AC7UA;;;;AAIG;AAIH;;AAEG;MACU,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.9
2
+ * @license Angular v20.0.0-rc.1
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -156,132 +156,6 @@ var require_MouseEvent = __commonJS({
156
156
  }
157
157
  });
158
158
 
159
- // external/npm/node_modules/domino/lib/DOMException.js
160
- var require_DOMException = __commonJS({
161
- "external/npm/node_modules/domino/lib/DOMException.js"(exports, module) {
162
- module.exports = DOMException;
163
- var INDEX_SIZE_ERR = 1;
164
- var HIERARCHY_REQUEST_ERR = 3;
165
- var WRONG_DOCUMENT_ERR = 4;
166
- var INVALID_CHARACTER_ERR = 5;
167
- var NO_MODIFICATION_ALLOWED_ERR = 7;
168
- var NOT_FOUND_ERR = 8;
169
- var NOT_SUPPORTED_ERR = 9;
170
- var INVALID_STATE_ERR = 11;
171
- var SYNTAX_ERR = 12;
172
- var INVALID_MODIFICATION_ERR = 13;
173
- var NAMESPACE_ERR = 14;
174
- var INVALID_ACCESS_ERR = 15;
175
- var TYPE_MISMATCH_ERR = 17;
176
- var SECURITY_ERR = 18;
177
- var NETWORK_ERR = 19;
178
- var ABORT_ERR = 20;
179
- var URL_MISMATCH_ERR = 21;
180
- var QUOTA_EXCEEDED_ERR = 22;
181
- var TIMEOUT_ERR = 23;
182
- var INVALID_NODE_TYPE_ERR = 24;
183
- var DATA_CLONE_ERR = 25;
184
- var names = [
185
- null,
186
- "INDEX_SIZE_ERR",
187
- null,
188
- "HIERARCHY_REQUEST_ERR",
189
- "WRONG_DOCUMENT_ERR",
190
- "INVALID_CHARACTER_ERR",
191
- null,
192
- "NO_MODIFICATION_ALLOWED_ERR",
193
- "NOT_FOUND_ERR",
194
- "NOT_SUPPORTED_ERR",
195
- "INUSE_ATTRIBUTE_ERR",
196
- "INVALID_STATE_ERR",
197
- "SYNTAX_ERR",
198
- "INVALID_MODIFICATION_ERR",
199
- "NAMESPACE_ERR",
200
- "INVALID_ACCESS_ERR",
201
- null,
202
- "TYPE_MISMATCH_ERR",
203
- "SECURITY_ERR",
204
- "NETWORK_ERR",
205
- "ABORT_ERR",
206
- "URL_MISMATCH_ERR",
207
- "QUOTA_EXCEEDED_ERR",
208
- "TIMEOUT_ERR",
209
- "INVALID_NODE_TYPE_ERR",
210
- "DATA_CLONE_ERR"
211
- ];
212
- var messages = [
213
- null,
214
- "INDEX_SIZE_ERR (1): the index is not in the allowed range",
215
- null,
216
- "HIERARCHY_REQUEST_ERR (3): the operation would yield an incorrect nodes model",
217
- "WRONG_DOCUMENT_ERR (4): the object is in the wrong Document, a call to importNode is required",
218
- "INVALID_CHARACTER_ERR (5): the string contains invalid characters",
219
- null,
220
- "NO_MODIFICATION_ALLOWED_ERR (7): the object can not be modified",
221
- "NOT_FOUND_ERR (8): the object can not be found here",
222
- "NOT_SUPPORTED_ERR (9): this operation is not supported",
223
- "INUSE_ATTRIBUTE_ERR (10): setAttributeNode called on owned Attribute",
224
- "INVALID_STATE_ERR (11): the object is in an invalid state",
225
- "SYNTAX_ERR (12): the string did not match the expected pattern",
226
- "INVALID_MODIFICATION_ERR (13): the object can not be modified in this way",
227
- "NAMESPACE_ERR (14): the operation is not allowed by Namespaces in XML",
228
- "INVALID_ACCESS_ERR (15): the object does not support the operation or argument",
229
- null,
230
- "TYPE_MISMATCH_ERR (17): the type of the object does not match the expected type",
231
- "SECURITY_ERR (18): the operation is insecure",
232
- "NETWORK_ERR (19): a network error occurred",
233
- "ABORT_ERR (20): the user aborted an operation",
234
- "URL_MISMATCH_ERR (21): the given URL does not match another URL",
235
- "QUOTA_EXCEEDED_ERR (22): the quota has been exceeded",
236
- "TIMEOUT_ERR (23): a timeout occurred",
237
- "INVALID_NODE_TYPE_ERR (24): the supplied node is invalid or has an invalid ancestor for this operation",
238
- "DATA_CLONE_ERR (25): the object can not be cloned."
239
- ];
240
- var constants = {
241
- INDEX_SIZE_ERR,
242
- DOMSTRING_SIZE_ERR: 2,
243
- HIERARCHY_REQUEST_ERR,
244
- WRONG_DOCUMENT_ERR,
245
- INVALID_CHARACTER_ERR,
246
- NO_DATA_ALLOWED_ERR: 6,
247
- NO_MODIFICATION_ALLOWED_ERR,
248
- NOT_FOUND_ERR,
249
- NOT_SUPPORTED_ERR,
250
- INUSE_ATTRIBUTE_ERR: 10,
251
- INVALID_STATE_ERR,
252
- SYNTAX_ERR,
253
- INVALID_MODIFICATION_ERR,
254
- NAMESPACE_ERR,
255
- INVALID_ACCESS_ERR,
256
- VALIDATION_ERR: 16,
257
- TYPE_MISMATCH_ERR,
258
- SECURITY_ERR,
259
- NETWORK_ERR,
260
- ABORT_ERR,
261
- URL_MISMATCH_ERR,
262
- QUOTA_EXCEEDED_ERR,
263
- TIMEOUT_ERR,
264
- INVALID_NODE_TYPE_ERR,
265
- DATA_CLONE_ERR
266
- };
267
- function DOMException(code) {
268
- Error.call(this);
269
- Error.captureStackTrace(this, this.constructor);
270
- this.code = code;
271
- this.message = messages[code];
272
- this.name = names[code];
273
- }
274
- DOMException.prototype.__proto__ = Error.prototype;
275
- for (c in constants) {
276
- v = { value: constants[c] };
277
- Object.defineProperty(DOMException, c, v);
278
- Object.defineProperty(DOMException.prototype, c, v);
279
- }
280
- var v;
281
- var c;
282
- }
283
- });
284
-
285
159
  // external/npm/node_modules/domino/lib/config.js
286
160
  var require_config = __commonJS({
287
161
  "external/npm/node_modules/domino/lib/config.js"(exports) {
@@ -292,8 +166,6 @@ var require_config = __commonJS({
292
166
  // external/npm/node_modules/domino/lib/utils.js
293
167
  var require_utils = __commonJS({
294
168
  "external/npm/node_modules/domino/lib/utils.js"(exports) {
295
- var DOMException = require_DOMException();
296
- var ERR = DOMException;
297
169
  var isApiWritable = require_config().isApiWritable;
298
170
  exports.NAMESPACE = {
299
171
  HTML: "http://www.w3.org/1999/xhtml",
@@ -303,68 +175,77 @@ var require_utils = __commonJS({
303
175
  SVG: "http://www.w3.org/2000/svg",
304
176
  XLINK: "http://www.w3.org/1999/xlink"
305
177
  };
306
- exports.IndexSizeError = function() {
307
- throw new DOMException(ERR.INDEX_SIZE_ERR);
178
+ exports.IndexSizeError = () => {
179
+ throw new DOMException("The index is not in the allowed range", "IndexSizeError");
180
+ };
181
+ exports.HierarchyRequestError = () => {
182
+ throw new DOMException("The node tree hierarchy is not correct", "HierarchyRequestError");
308
183
  };
309
- exports.HierarchyRequestError = function() {
310
- throw new DOMException(ERR.HIERARCHY_REQUEST_ERR);
184
+ exports.WrongDocumentError = () => {
185
+ throw new DOMException("The object is in the wrong Document", "WrongDocumentError");
311
186
  };
312
- exports.WrongDocumentError = function() {
313
- throw new DOMException(ERR.WRONG_DOCUMENT_ERR);
187
+ exports.InvalidCharacterError = () => {
188
+ throw new DOMException("The string contains invalid characters", "InvalidCharacterError");
314
189
  };
315
- exports.InvalidCharacterError = function() {
316
- throw new DOMException(ERR.INVALID_CHARACTER_ERR);
190
+ exports.NoModificationAllowedError = () => {
191
+ throw new DOMException("The object cannot be modified", "NoModificationAllowedError");
317
192
  };
318
- exports.NoModificationAllowedError = function() {
319
- throw new DOMException(ERR.NO_MODIFICATION_ALLOWED_ERR);
193
+ exports.NotFoundError = () => {
194
+ throw new DOMException("The object can not be found here", "NotFoundError");
320
195
  };
321
- exports.NotFoundError = function() {
322
- throw new DOMException(ERR.NOT_FOUND_ERR);
196
+ exports.NotSupportedError = () => {
197
+ throw new DOMException("The operation is not supported", "NotSupportedError");
323
198
  };
324
- exports.NotSupportedError = function() {
325
- throw new DOMException(ERR.NOT_SUPPORTED_ERR);
199
+ exports.InvalidStateError = () => {
200
+ throw new DOMException("The object is in an invalid state", "InvalidStateError");
326
201
  };
327
- exports.InvalidStateError = function() {
328
- throw new DOMException(ERR.INVALID_STATE_ERR);
202
+ exports.SyntaxError = () => {
203
+ throw new DOMException("The string did not match the expected pattern", "SyntaxError");
329
204
  };
330
- exports.SyntaxError = function() {
331
- throw new DOMException(ERR.SYNTAX_ERR);
205
+ exports.InvalidModificationError = () => {
206
+ throw new DOMException("The object can not be modified in this way", "InvalidModificationError");
332
207
  };
333
- exports.InvalidModificationError = function() {
334
- throw new DOMException(ERR.INVALID_MODIFICATION_ERR);
208
+ exports.NamespaceError = () => {
209
+ throw new DOMException("The operation is not allowed by Namespaces in XML", "NamespaceError");
335
210
  };
336
- exports.NamespaceError = function() {
337
- throw new DOMException(ERR.NAMESPACE_ERR);
211
+ exports.InvalidAccessError = () => {
212
+ throw new DOMException(
213
+ "The object does not support the operation or argument",
214
+ "InvalidAccessError"
215
+ );
338
216
  };
339
- exports.InvalidAccessError = function() {
340
- throw new DOMException(ERR.INVALID_ACCESS_ERR);
217
+ exports.TypeMismatchError = () => {
218
+ throw new DOMException(
219
+ "The type of the object does not match the expected type",
220
+ "TypeMismatchError"
221
+ );
341
222
  };
342
- exports.TypeMismatchError = function() {
343
- throw new DOMException(ERR.TYPE_MISMATCH_ERR);
223
+ exports.SecurityError = () => {
224
+ throw new DOMException("The operation is insecure", "SecurityError");
344
225
  };
345
- exports.SecurityError = function() {
346
- throw new DOMException(ERR.SECURITY_ERR);
226
+ exports.NetworkError = () => {
227
+ throw new DOMException("A network error occurred", "NetworkError");
347
228
  };
348
- exports.NetworkError = function() {
349
- throw new DOMException(ERR.NETWORK_ERR);
229
+ exports.AbortError = () => {
230
+ throw new DOMException("The operation was aborted", "AbortError");
350
231
  };
351
- exports.AbortError = function() {
352
- throw new DOMException(ERR.ABORT_ERR);
232
+ exports.UrlMismatchError = () => {
233
+ throw new DOMException("The given URL does not match another URL", "URLMismatchError");
353
234
  };
354
- exports.UrlMismatchError = function() {
355
- throw new DOMException(ERR.URL_MISMATCH_ERR);
235
+ exports.QuotaExceededError = () => {
236
+ throw new DOMException("The quota has been exceeded", "QuotaExceededError");
356
237
  };
357
- exports.QuotaExceededError = function() {
358
- throw new DOMException(ERR.QUOTA_EXCEEDED_ERR);
238
+ exports.TimeoutError = () => {
239
+ throw new DOMException("The operation timed out", "TimeoutError");
359
240
  };
360
- exports.TimeoutError = function() {
361
- throw new DOMException(ERR.TIMEOUT_ERR);
241
+ exports.InvalidNodeTypeError = () => {
242
+ throw new DOMException("The node is of an invalid type", "InvalidNodeTypeError");
362
243
  };
363
- exports.InvalidNodeTypeError = function() {
364
- throw new DOMException(ERR.INVALID_NODE_TYPE_ERR);
244
+ exports.DataCloneError = () => {
245
+ throw new DOMException("The object can not be cloned", "DataCloneError");
365
246
  };
366
- exports.DataCloneError = function() {
367
- throw new DOMException(ERR.DATA_CLONE_ERR);
247
+ exports.InUseAttributeError = () => {
248
+ throw new DOMException("The attribute is already in use", "InUseAttributeError");
368
249
  };
369
250
  exports.nyi = function() {
370
251
  throw new Error("NotYetImplemented");
@@ -379,7 +260,10 @@ var require_utils = __commonJS({
379
260
  };
380
261
  exports.expose = function(src, c) {
381
262
  for (var n in src) {
382
- Object.defineProperty(c.prototype, n, { value: src[n], writable: isApiWritable });
263
+ Object.defineProperty(c.prototype, n, {
264
+ value: src[n],
265
+ writable: isApiWritable
266
+ });
383
267
  }
384
268
  };
385
269
  exports.merge = function(a, b) {
@@ -2849,7 +2733,6 @@ var require_Element = __commonJS({
2849
2733
  var NodeList = require_NodeList();
2850
2734
  var NodeUtils = require_NodeUtils();
2851
2735
  var FilteredElementList = require_FilteredElementList();
2852
- var DOMException = require_DOMException();
2853
2736
  var DOMTokenList = require_DOMTokenList();
2854
2737
  var select = require_select();
2855
2738
  var ContainerNode = require_ContainerNode();
@@ -3302,7 +3185,7 @@ var require_Element = __commonJS({
3302
3185
  } },
3303
3186
  setAttributeNode: { value: function setAttributeNode(attr) {
3304
3187
  if (attr.ownerElement !== null && attr.ownerElement !== this) {
3305
- throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR);
3188
+ utils.InUseAttributeError();
3306
3189
  }
3307
3190
  var result = null;
3308
3191
  var oldAttrs = this._attrsByQName[attr.name];
@@ -3315,7 +3198,7 @@ var require_Element = __commonJS({
3315
3198
  })) {
3316
3199
  return attr;
3317
3200
  } else if (attr.ownerElement !== null) {
3318
- throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR);
3201
+ utils.InUseAttributeError();
3319
3202
  }
3320
3203
  oldAttrs.forEach(function(a) {
3321
3204
  this.removeAttributeNode(a);
@@ -3327,7 +3210,7 @@ var require_Element = __commonJS({
3327
3210
  } },
3328
3211
  setAttributeNodeNS: { value: function setAttributeNodeNS(attr) {
3329
3212
  if (attr.ownerElement !== null) {
3330
- throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR);
3213
+ utils.InUseAttributeError();
3331
3214
  }
3332
3215
  var ns = attr.namespaceURI;
3333
3216
  var key = (ns === null ? "" : ns) + "|" + attr.localName;
@@ -15891,7 +15774,6 @@ var require_impl = __commonJS({
15891
15774
  CSSStyleDeclaration: require_CSSStyleDeclaration(),
15892
15775
  CharacterData: require_CharacterData(),
15893
15776
  Comment: require_Comment(),
15894
- DOMException: require_DOMException(),
15895
15777
  DOMImplementation: require_DOMImplementation(),
15896
15778
  DOMTokenList: require_DOMTokenList(),
15897
15779
  Document: require_Document(),
@@ -16151,10 +16033,10 @@ class PlatformState {
16151
16033
  getDocument() {
16152
16034
  return this._doc;
16153
16035
  }
16154
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16155
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PlatformState });
16036
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: PlatformState, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16037
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: PlatformState });
16156
16038
  }
16157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: PlatformState, decorators: [{
16039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: PlatformState, decorators: [{
16158
16040
  type: Injectable
16159
16041
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16160
16042
  type: Inject,
@@ -16183,10 +16065,10 @@ class ServerXhr {
16183
16065
  }
16184
16066
  return new impl.XMLHttpRequest();
16185
16067
  }
16186
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16187
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerXhr });
16068
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16069
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerXhr });
16188
16070
  }
16189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerXhr, decorators: [{
16071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerXhr, decorators: [{
16190
16072
  type: Injectable
16191
16073
  }] });
16192
16074
  function relativeUrlsTransformerInterceptorFn(request, next) {
@@ -16305,10 +16187,10 @@ class ServerPlatformLocation {
16305
16187
  getState() {
16306
16188
  return undefined;
16307
16189
  }
16308
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
16309
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerPlatformLocation });
16190
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerPlatformLocation, deps: [{ token: DOCUMENT }, { token: INITIAL_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
16191
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerPlatformLocation });
16310
16192
  }
16311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerPlatformLocation, decorators: [{
16312
16194
  type: Injectable
16313
16195
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16314
16196
  type: Inject,
@@ -16333,10 +16215,10 @@ class ServerEventManagerPlugin extends EventManagerPlugin {
16333
16215
  addEventListener(element, eventName, handler, options) {
16334
16216
  return _getDOM().onAndCancel(element, eventName, handler, options);
16335
16217
  }
16336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16337
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin });
16218
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerEventManagerPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
16219
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerEventManagerPlugin });
16338
16220
  }
16339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerEventManagerPlugin, decorators: [{
16340
16222
  type: Injectable
16341
16223
  }], ctorParameters: () => [{ type: undefined, decorators: [{
16342
16224
  type: Inject,
@@ -16452,11 +16334,11 @@ const PLATFORM_SERVER_PROVIDERS = [
16452
16334
  * @publicApi
16453
16335
  */
16454
16336
  class ServerModule {
16455
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16456
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerModule, exports: [BrowserModule] });
16457
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [BrowserModule] });
16337
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16338
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerModule, exports: [BrowserModule] });
16339
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerModule, providers: PLATFORM_SERVER_PROVIDERS, imports: [BrowserModule] });
16458
16340
  }
16459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: ServerModule, decorators: [{
16341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-rc.1", ngImport: i0, type: ServerModule, decorators: [{
16460
16342
  type: NgModule,
16461
16343
  args: [{
16462
16344
  exports: [BrowserModule],
@@ -16486,15 +16368,18 @@ function _document(injector) {
16486
16368
  * @publicApi
16487
16369
  */
16488
16370
  function platformServer(extraProviders) {
16489
- if (typeof ngServerMode === 'undefined') {
16371
+ const noServerModeSet = typeof ngServerMode === 'undefined';
16372
+ if (noServerModeSet) {
16490
16373
  globalThis['ngServerMode'] = true;
16491
16374
  }
16492
16375
  const platform = createPlatformFactory(platformCore, 'server', INTERNAL_SERVER_PLATFORM_PROVIDERS)(extraProviders);
16493
- platform.onDestroy(() => {
16494
- globalThis['ngServerMode'] = undefined;
16495
- });
16376
+ if (noServerModeSet) {
16377
+ platform.onDestroy(() => {
16378
+ globalThis['ngServerMode'] = undefined;
16379
+ });
16380
+ }
16496
16381
  return platform;
16497
16382
  }
16498
16383
 
16499
16384
  export { BEFORE_APP_SERIALIZED, ENABLE_DOM_EMULATION, INITIAL_CONFIG, INTERNAL_SERVER_PLATFORM_PROVIDERS, PLATFORM_SERVER_PROVIDERS, PlatformState, SERVER_RENDER_PROVIDERS, ServerModule, createScript, platformServer };
16500
- //# sourceMappingURL=server-BPmC12ZL.mjs.map
16385
+ //# sourceMappingURL=server-Djcde0Qr.mjs.map