{"version":3,"file":"platform-browser-dynamic.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/platform-browser-dynamic/src/version.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/platform-browser-dynamic/src/compiler_factory.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/platform-browser-dynamic/src/resource_loader/resource_loader_impl.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/platform-browser-dynamic/src/platform_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\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser-dynamic package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = /* @__PURE__ */ new Version('22.1.3');\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 {CompilerConfig} from '@angular/compiler';\nimport {\n  Compiler,\n  CompilerFactory,\n  CompilerOptions,\n  Injector,\n  StaticProvider,\n  ViewEncapsulation,\n} from '@angular/core';\n\nexport const COMPILER_PROVIDERS = <StaticProvider[]>[\n  {provide: Compiler, useFactory: () => new Compiler()},\n];\n/**\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nexport class JitCompilerFactory implements CompilerFactory {\n  private _defaultOptions: CompilerOptions[];\n\n  /** @internal */\n  constructor(defaultOptions: CompilerOptions[]) {\n    const compilerOptions: CompilerOptions = {\n      defaultEncapsulation: ViewEncapsulation.Emulated,\n    };\n\n    this._defaultOptions = [compilerOptions, ...defaultOptions];\n  }\n\n  createCompiler(options: CompilerOptions[] = []): Compiler {\n    const opts = _mergeOptions(this._defaultOptions.concat(options));\n    const injector = Injector.create({\n      providers: [\n        COMPILER_PROVIDERS,\n        {\n          provide: CompilerConfig,\n          useFactory: () => {\n            return new CompilerConfig({\n              defaultEncapsulation: opts.defaultEncapsulation,\n              preserveWhitespaces: opts.preserveWhitespaces,\n            });\n          },\n          deps: [],\n        },\n        opts.providers!,\n      ],\n    });\n    return injector.get(Compiler);\n  }\n}\n\nfunction _mergeOptions(optionsArr: CompilerOptions[]): CompilerOptions {\n  return {\n    defaultEncapsulation: _lastDefined(optionsArr.map((options) => options.defaultEncapsulation)),\n    providers: _mergeArrays(optionsArr.map((options) => options.providers!)),\n    preserveWhitespaces: _lastDefined(optionsArr.map((options) => options.preserveWhitespaces)),\n  };\n}\n\nfunction _lastDefined<T>(args: T[]): T | undefined {\n  for (let i = args.length - 1; i >= 0; i--) {\n    if (args[i] !== undefined) {\n      return args[i];\n    }\n  }\n  return undefined;\n}\n\nfunction _mergeArrays(parts: any[][]): any[] {\n  const result: any[] = [];\n  parts.forEach((part) => part && result.push(...part));\n  return result;\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 {ResourceLoader} from '@angular/compiler';\nimport {Injectable} from '@angular/core';\n\n@Injectable()\nexport class ResourceLoaderImpl extends ResourceLoader {\n  override get(url: string): Promise<string> {\n    let resolve: (result: any) => void;\n    let reject: (error: any) => void;\n    const promise = new Promise<string>((res, rej) => {\n      resolve = res;\n      reject = rej;\n    });\n    const xhr = new XMLHttpRequest();\n    xhr.open('GET', url, true);\n    xhr.responseType = 'text';\n\n    xhr.onload = function () {\n      const response = xhr.response;\n\n      let status = xhr.status;\n\n      // fix status code when it is 0 (0 status is undocumented).\n      // Occurs when accessing file resources or on Android 4.1 stock browser\n      // while retrieving files from application cache.\n      if (status === 0) {\n        status = response ? 200 : 0;\n      }\n\n      if (200 <= status && status <= 300) {\n        resolve(response);\n      } else {\n        reject(`Failed to load ${url}`);\n      }\n    };\n\n    xhr.onerror = function () {\n      reject(`Failed to load ${url}`);\n    };\n\n    xhr.send();\n    return promise;\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  COMPILER_OPTIONS,\n  CompilerFactory,\n  createPlatformFactory,\n  PlatformRef,\n  StaticProvider,\n} from '@angular/core';\nimport {platformBrowser} from '@angular/platform-browser';\nimport {ResourceLoader} from '@angular/compiler';\nimport {ResourceLoaderImpl} from './resource_loader/resource_loader_impl';\nimport {JitCompilerFactory} from './compiler_factory';\n\nconst INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: StaticProvider[] = [\n  {\n    provide: COMPILER_OPTIONS,\n    useValue: {providers: [{provide: ResourceLoader, useClass: ResourceLoaderImpl, deps: []}]},\n    multi: true,\n  },\n  {provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS]},\n];\n\n/**\n * @deprecated Use the `platformBrowser` function instead from `@angular/platform-browser`.\n * In case you are not in a CLI app and rely on JIT compilation, you will also need to import `@angular/compiler`\n */\nexport const platformBrowserDynamic: (extraProviders?: StaticProvider[]) => PlatformRef =\n  createPlatformFactory(\n    platformBrowser,\n    'browserDynamic',\n    INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,\n  );\n"],"names":[],"mappings":";;;;;;;;;;;AAmBO,MAAM,OAAO,kBAAmB,IAAI,OAAO,CAAC,mBAAmB;;ACD/D,MAAM,kBAAkB,GAAqB,CAClD;AAAC,EAAA,OAAO,EAAE,QAAQ;AAAE,EAAA,UAAU,EAAE,MAAM,IAAI,QAAQ;AAAE,CAAC,CACtD;MAOY,kBAAkB,CAAA;EACrB,eAAe;EAGvB,WAAA,CAAY,cAAiC,EAAA;AAC3C,IAAA,MAAM,eAAe,GAAoB;MACvC,oBAAoB,EAAE,iBAAiB,CAAC;KACzC;IAED,IAAI,CAAC,eAAe,GAAG,CAAC,eAAe,EAAE,GAAG,cAAc,CAAC;AAC7D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