Kargi-Sitesi/.angular/cache/18.2.11/babel-webpack/e5525b0e48ca89b8f1cb1555342784a0848656c88d8102d791cfd3e5301e7cb8.json

1 line
16 KiB
JSON
Raw Normal View History

{"ast":null,"code":"/**\n * @license Angular v18.2.10\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Compiler, ViewEncapsulation, Injector, createPlatformFactory, platformCore, COMPILER_OPTIONS, CompilerFactory, Injectable, PLATFORM_ID, Version } from '@angular/core';\nimport { CompilerConfig, ResourceLoader } from '@angular/compiler';\nimport { ɵPLATFORM_BROWSER_ID } from '@angular/common';\nimport { ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS } from '@angular/platform-browser';\nconst COMPILER_PROVIDERS = [{\n provide: Compiler,\n useFactory: () => new Compiler()\n}];\n/**\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nclass JitCompilerFactory {\n /** @internal */\n constructor(defaultOptions) {\n const compilerOptions = {\n defaultEncapsulation: ViewEncapsulation.Emulated\n };\n this._defaultOptions = [compilerOptions, ...defaultOptions];\n }\n createCompiler(options = []) {\n const opts = _mergeOptions(this._defaultOptions.concat(options));\n const injector = Injector.create({\n providers: [COMPILER_PROVIDERS, {\n provide: CompilerConfig,\n useFactory: () => {\n return new CompilerConfig({\n defaultEncapsulation: opts.defaultEncapsulation,\n preserveWhitespaces: opts.preserveWhitespaces\n });\n },\n deps: []\n }, opts.providers]\n });\n return injector.get(Compiler);\n }\n}\nfunction _mergeOptions(optionsArr) {\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}\nfunction _lastDefined(args) {\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}\nfunction _mergeArrays(parts) {\n const result = [];\n parts.forEach(part => part && result.push(...part));\n return result;\n}\n\n/**\n * A platform that included corePlatform and the compiler.\n *\n * @publicApi\n */\nconst platformCoreDynamic = createPlatformFactory(platformCore, 'coreDynamic', [{\n provide: COMPILER_OPTIONS,\n useValue: {},\n multi: true\n}, {\n provide: CompilerFactory,\n useClass: JitCompilerFactory,\n deps: [COMPILER_OPTIONS]\n}]);\nclass ResourceLoaderImpl extends ResourceLoader {\n get(url) {\n let resolve;\n let reject;\n const promise = new Promise((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 xhr.onload = function () {\n const response = xhr.response;\n let status = xhr.status;\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 if (200 <= status && status <= 300) {\n resolve(response);\n } else {\n reject(`Failed to load ${url}`);\n }\n };\n xhr.onerror = function () {\n reject(`Failed to load ${url}`);\n };\n xhr.send();\n return promise;\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵResourceLoaderImpl_BaseFactory;\n return function ResourceLoaderImpl_Factory(__ngFactoryType__) {\n return (ɵResourceLoaderImpl_BaseFactory || (ɵResourceLoaderImpl_BaseFactory = i0.ɵɵgetInheritedFactory(ResourceLoaderImpl)))(__ngFactoryType__ || ResourceLoaderImpl);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ResourceLoaderImpl,\n factory: ResourceLoaderImpl.ɵfac\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(ResourceLoad