{"version":3,"sources":["node_modules/ngx-localstorage/fesm2022/ngx-localstorage.mjs"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { EventEmitter, inject, DestroyRef, Directive, ElementRef, numberAttribute, Input, InjectionToken, Injectable, Inject, booleanAttribute, Output, makeEnvironmentProviders } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent, debounceTime, map, Observable, filter, Subscription } from 'rxjs';\nimport { filter as filter$1 } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * string Guard\n */\nconst isString = value => {\n return typeof value === 'string';\n};\n\n/**\n * Directive handling `ReactiveForms` binding.\n *\n * @usageNotes\n *\n * ### Example binding a text input\n *\n * ```html\n * \n * ```\n */\nlet ControlValueAccessorDirective = /*#__PURE__*/(() => {\n class ControlValueAccessorDirective {\n constructor() {\n /**\n * Emitter for value changes.\n */\n this.valueChange = new EventEmitter();\n /**\n * The control to bind to.\n */\n this.ngControl = inject(NgControl, {\n optional: true,\n self: true\n });\n this.destroyRef = inject(DestroyRef);\n }\n /**\n * Sets up event observer for value changes.\n */\n ngOnInit() {\n this.ngControl?.valueChanges?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => {\n this.valueChange.emit(value);\n });\n }\n /**\n * Writes the value to the control.\n * @param value Value to write\n * @param falsyTransformer *optional* transformer handling falsy values\n */\n writeValue(value, falsyTransformer) {\n const transformedValue = (!value || isString(value) && value === 'false') && !!falsyTransformer ? falsyTransformer() : value;\n this.ngControl?.valueAccessor?.writeValue(transformedValue);\n }\n /**\n * Gets the current control value.\n */\n getValue() {\n return this.ngControl?.value;\n }\n static {\n this.ɵfac = function ControlValueAccessorDirective_Factory(t) {\n return new (t || ControlValueAccessorDirective)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: ControlValueAccessorDirective,\n standalone: true\n });\n }\n }\n return ControlValueAccessorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Returns an array representation of the input value.\n *\n * @param value - the input value\n * @return array representation of the input value\n */\nfunction valuePathAttribute(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (value != null) {\n return value.toString().split(',');\n } else {\n return [];\n }\n}\n\n/**\n * Gets an objects property based on its path.\n * @param object Object to access\n * @param path Path to the property\n */\nconst getPropByPath = (object, path) => {\n const checkProperty = (o, key) => typeof o === 'object' ? o[key] : undefined;\n return path.slice(0).reduce((prev, curr, _i, arr) => {\n if (prev === undefined) {\n arr.splice(1);\n }\n return checkProperty(prev, curr);\n }, object);\n};\n/**\n* Sets an objects property based on its path.\n* @param object Object whose value to set\n* @param path Path to the property\n* @param value Value to set\n* @param falsyTransformer optional transformer handling falsy values\n*/\nconst setPropByPath = (object, path, value, falsyTransformer) => {\n const checkProperty = (o, key) => typeof o === 'object' ? o[key] : undefined;\n path.slice(0).reduce((prev, curr, i, arr) => {\n if (prev === undefined) {\n arr.splice(1);\n }\n // last path segment\n if (i === path.length - 1) {\n object[curr] = (!value || isString(value) && value === 'false') && !!falsyTransformer ? falsyTransformer() : value;\n arr.splice(1);\n }\n return checkProperty(prev, curr);\n }, object);\n};\n\n/**\n * Directive handling native control binding.\n *\n * @usageNotes\n *\n * ### Example binding a text input\n *\n * ```html\n * \n * ```\n *\n */\nlet NativeValueAccessorDirective = /*#__PURE__*/(() => {\n class NativeValueAccessorDirective {\n constructor() {\n /**\n * Provides a path to access the bound elements value property.\n */\n this.valuePath = [];\n /**\n * An optional debounce for storage write access after value changes.\n */\n this.storageDebounce = 0;\n /**\n * Emitter for value changes.\n */\n this.valueChange = new EventEmitter();\n this.elementRef = inject(ElementRef);\n this.destroyRef = inject(DestroyRef);\n }\n /**\n * Sets up event observer for value changes.\n */\n ngAfterViewInit() {\n if (this.forEvent) {\n fromEvent(this.elementRef.nativeElement, this.forEvent).pipe(takeUntilDestroyed(this.destroyRef), debounceTime(this.storageDebounce), map(() => this.getValue())).subscribe(this.valueChange);\n }\n }\n /**\n * Writes the value to the control.\n * @param value Value to write\n * @param falsyTransformer *optional* transformer handling falsy values\n */\n writeValue(value, falsyTransformer) {\n setPropByPath(this.elementRef.nativeElement, this.getValuePath(), value, falsyTransformer);\n }\n /**\n * Gets the current control value.\n */\n getValue() {\n return getPropByPath(this.elementRef.nativeElement, this.getValuePath());\n }\n getValuePath() {\n return this.valuePath.length ? this.valuePath : ['value'];\n }\n static {\n this.ɵfac = function NativeValueAccessorDirective_Factory(t) {\n return new (t || NativeValueAccessorDirective)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: NativeValueAccessorDirective,\n inputs: {\n forEvent: \"forEvent\",\n valuePath: [2, \"valuePath\", \"valuePath\", valuePathAttribute],\n storageDebounce: [2, \"storageDebounce\", \"storageDebounce\", numberAttribute]\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return NativeValueAccessorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst NGX_LOCAL_STORAGE_DEFAULT_CONFIG = () => {\n return {\n allowNull: true,\n storageType: 'localStorage',\n delimiter: '_'\n };\n};\n/**\n * Provides an injection token for the service configuration.\n */\nconst NGX_LOCAL_STORAGE_CONFIG = new InjectionToken('NgxLocalstorageConfiguration', {\n providedIn: 'root',\n factory: NGX_LOCAL_STORAGE_DEFAULT_CONFIG\n});\n\n/**\n * Provides a default serialization mechanism using JSON.\n */\nlet DefaultSerializer = /*#__PURE__*/(() => {\n class DefaultSerializer {\n /**\n * @inheritdoc\n */\n serialize(value) {\n return JSON.stringify(value);\n }\n /**\n * @inheritdoc\n */\n deserialize(storedValue) {\n return JSON.parse(storedValue);\n }\n static {\n this.ɵfac = function DefaultSerializer_Factory(t) {\n return new (t || DefaultSerializer)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultSerializer,\n factory: DefaultSerializer.ɵfac\n });\n }\n }\n return DefaultSerializer;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Provides an injection token for the services serializer.\n */\nconst NGX_LOCAL_STORAGE_SERIALIZER = new InjectionToken('StorageSerializer', {\n providedIn: 'root',\n factory: () => new DefaultSerializer()\n});\n\n/**\n * Provides an abstraction to WINDOW.\n */\nconst WINDOW = new InjectionToken('Abstraction token for global window access', {\n factory: () => {\n const {\n defaultView\n } = inject(DOCUMENT);\n if (!defaultView) {\n throw new Error('Window is not available');\n }\n return defaultView;\n }\n});\n\n/**\n * Provides information if localstorage is available.\n */\nconst LOCALSTORAGE_SUPPORT = new InjectionToken('Token providing information if localStorage is available', {\n factory: () => !!inject(LOCALSTORAGE)\n});\n/**\n * Provides access to localstorage.\n */\nconst LOCALSTORAGE = new InjectionToken('Token for accessing localStorage', {\n factory: () => inject(WINDOW).localStorage\n});\n\n/**\n * Provides information if sessionstorage is available.\n */\nconst SESSIONSTORAGE_SUPPORT = new InjectionToken('Token providing information if sessionStorage is available', {\n factory: () => !!inject(SESSIONSTORAGE)\n});\n/**\n * Provides access to sessionstorage.\n */\nconst SESSIONSTORAGE = new InjectionToken('Token for accessing sessionStorage', {\n factory: () => inject(WINDOW).sessionStorage\n});\n\n/**\n * Provides information if choosen stoarge is available.\n */\nconst STORAGE_SUPPORT = new InjectionToken('Token providing information is choosen storage is available', {\n factory: () => {\n const {\n storageType\n } = inject(NGX_LOCAL_STORAGE_CONFIG);\n return storageType === 'sessionStorage' ? inject(SESSIONSTORAGE_SUPPORT) : inject(LOCALSTORAGE_SUPPORT);\n }\n});\n/**\n * Provides choosen storage.\n */\nconst STORAGE = new InjectionToken('Token providing choosen storage', {\n factory: () => {\n const {\n storageType\n } = inject(NGX_LOCAL_STORAGE_CONFIG);\n return storageType === 'sessionStorage' ? inject(SESSIONSTORAGE) : inject(LOCALSTORAGE);\n }\n});\n\n/**\n * Constructs the storage key based on a prefix - if given - and the key itself\n */\nconst constructKey = (key, prefix, configuredPrefix, delimiter) => {\n const prefixToUse = prefix || configuredPrefix;\n if (prefixToUse) {\n return `${prefixToUse}${delimiter || ''}${key}`;\n }\n return key;\n};\nconst defaultConfig = NGX_LOCAL_STORAGE_DEFAULT_CONFIG();\n/**\n * Provides a service to access the localstorage.\n */\nlet LocalStorageService = /*#__PURE__*/(() => {\n class LocalStorageService extends Observable {\n /**\n * Creates a new instance.\n */\n constructor(_config) {\n super(subscriber => {\n if (!this.storageSupport) {\n subscriber.error(new Error(`Choosen storage '${this.config?.storageType}' is not available`));\n }\n if (this.window) {\n this.subscriptions.add(fromEvent(this.window, 'storage').pipe(filter(event => !!event)).subscribe(event => subscriber.next(event)));\n }\n this.subscriptions.add(this.onError.subscribe(error => subscriber.error(error)));\n });\n this.onError = new EventEmitter();\n this.subscriptions = new Subscription();\n this.serializer = inject(NGX_LOCAL_STORAGE_SERIALIZER);\n this.storageSupport = inject(STORAGE_SUPPORT);\n this.storage = inject(STORAGE, {\n optional: true\n });\n this.window = inject(WINDOW, {\n optional: true\n });\n this.config = {\n ...defaultConfig,\n ..._config\n };\n }\n ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n /**\n * Gets the number of entries in the applications storage.\n */\n count() {\n try {\n return this.storage?.length;\n } catch (error) {\n this.error(error);\n return undefined;\n }\n }\n /**\n * Returns the nth (defined by the index parameter) key in the storage.\n * The order of keys is user-agent defined, so you should not rely on it.\n * @param index An integer representing the number of the key you want to get the name of. This is a zero-based index.\n */\n getKey(index) {\n if (index < 0) {\n this.error(new Error('index has to be 0 or greater'));\n }\n try {\n return this.storage?.key(index);\n } catch (error) {\n this.error(error);\n return undefined;\n }\n }\n /**\n * Adds the value with the given key or updates an existing entry.\n * @param key Key identifying the wanted entry.\n * @param value Value to store.\n * @param options Options for overwriting configuration with the following properties:\n * * `prefix`: (Optional) Prefix to overwrite the configured one.\n * * `serializer`: (Optional) Serializer to overwrite the configured one.\n */\n set(key, value, options) {\n const [prefix, storageSerializer] = [options?.prefix, options?.serializer || this.serializer];\n if (this.config.allowNull || !this.config.allowNull && `${value}` !== 'null' && value !== null && value !== undefined) {\n this.storage?.setItem(constructKey(key, prefix, this.config.prefix, this.config.delimiter), storageSerializer.serialize(value));\n } else {\n this.remove(key, prefix);\n }\n }\n /**\n * Gets the entry specified by the given key if existing - otherwise `null`.\n * @param key Key identifying the wanted entry.\n * @param options Options for overwriting configuration with the following properties:\n * * `prefix`: (Optional) Prefix to overwrite the configured one.\n * * `serializer`: (Optional) Serializer to overwrite the configured one.\n */\n get(key, options) {\n const [prefix, storageSerializer] = [options?.prefix, options?.serializer || this.serializer];\n try {\n const constructedKey = constructKey(key, prefix, this.config.prefix, this.config.delimiter);\n const storageItem = this.storage?.getItem(constructedKey);\n return storageItem ? storageSerializer.deserialize(storageItem) : null;\n } catch (error) {\n this.error(error);\n return null;\n }\n }\n /**\n * Removes the entry specified by the given key.\n * @param key Key identifying the entry to remove.\n * @param prefix Optional prefix to overwrite the configured one.\n */\n remove(key, prefix) {\n try {\n this.storage?.removeItem(constructKey(key, prefix, this.config.prefix, this.config.delimiter));\n } catch (error) {\n this.error(error);\n }\n }\n /**\n * Clears all entries of the storage.\n */\n clear() {\n try {\n this.storage?.clear();\n } catch (error) {\n this.error(error);\n }\n }\n /**\n * Triggers the service to emit the given error.\n * @param error Error to emit through the service.\n */\n error(error) {\n this.onError.emit(error);\n }\n static {\n this.ɵfac = function LocalStorageService_Factory(t) {\n return new (t || LocalStorageService)(i0.ɵɵinject(NGX_LOCAL_STORAGE_CONFIG));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LocalStorageService,\n factory: LocalStorageService.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return LocalStorageService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injects the matching value accessor depending on whether an `NgControl` is bound or not.\n * @returns directive mathing the binding mode\n */\nfunction injectAccessor() {\n const controlAccessor = inject(ControlValueAccessorDirective);\n if (controlAccessor.ngControl) {\n return controlAccessor;\n }\n return inject(NativeValueAccessorDirective);\n}\n\n/**\n * Provide a directive to directly interact with stored values.\n */\nlet LocalStorageDirective = /*#__PURE__*/(() => {\n class LocalStorageDirective {\n constructor() {\n /**\n * The key to use with localstorage.\n */\n this.key = '';\n /**\n * Flag if the bound elements value should be initialized from storage.\n */\n this.initFromStorage = false;\n /**\n * Event which gets fired when a bound value got stored.\n */\n this.storedValue = new EventEmitter();\n this.destroyRef = inject(DestroyRef);\n this.accessor = injectAccessor();\n this.elementRef = inject(ElementRef);\n this.storageService = inject(LocalStorageService);\n }\n /**\n * Sets up:\n * * the key to use\n * * storage observer\n * * initalization from storage\n * * value change observer\n */\n ngAfterViewInit() {\n this.initKey();\n this.storageService.pipe(takeUntilDestroyed(this.destroyRef),\n // TODO: filter should be more accurate\n filter$1(ev => !!ev.key && ev.key.indexOf(this.key) >= 0)).subscribe(ev => {\n this.accessor.writeValue(ev.newValue, this.falsyTransformer);\n });\n this.checkInitFromStorage();\n this.accessor.valueChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => {\n this.storageService.set(this.key, value, {\n prefix: this.prefix\n });\n this.storedValue.emit(value);\n });\n }\n /**\n * Initalizes the key from either the given value or the elements id or name property.\n */\n initKey() {\n if (!this.key) {\n if (!this.elementRef.nativeElement.id && !this.elementRef.nativeElement.name) {\n this.storageService.error(new Error('No key or element id or name supplied!'));\n }\n this.key = this.elementRef.nativeElement.id || this.elementRef.nativeElement.name;\n }\n }\n /**\n * Initializes the elements value from storage.\n */\n checkInitFromStorage() {\n if (this.initFromStorage) {\n const storedValue = this.storageService.get(this.key, {\n prefix: this.prefix\n });\n try {\n this.accessor.writeValue(storedValue, this.falsyTransformer);\n } catch (error) {\n this.storageService.error(error);\n }\n }\n }\n static {\n this.ɵfac = function LocalStorageDirective_Factory(t) {\n return new (t || LocalStorageDirective)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: LocalStorageDirective,\n selectors: [[\"\", \"ngxLocalStorage\", \"\"]],\n inputs: {\n key: [0, \"ngxLocalStorage\", \"key\"],\n prefix: \"prefix\",\n initFromStorage: [2, \"initFromStorage\", \"initFromStorage\", booleanAttribute],\n falsyTransformer: \"falsyTransformer\"\n },\n outputs: {\n storedValue: \"storedValue\"\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵHostDirectivesFeature([ControlValueAccessorDirective, {\n directive: NativeValueAccessorDirective,\n inputs: [\"forEvent\", \"forEvent\", \"valuePath\", \"valuePath\", \"storageDebounce\", \"storageDebounce\"]\n }])]\n });\n }\n }\n return LocalStorageDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar FeatureKind = /*#__PURE__*/function (FeatureKind) {\n FeatureKind[FeatureKind[\"Serializer\"] = 0] = \"Serializer\";\n return FeatureKind;\n}(FeatureKind || {});\n/**\n * Provides the basic configuration and optional additional features.\n * @param configuration configuration used by the service and directive\n * @param features optional features; e.g. a custom serializer\n * @returns providers used by `ngx-localstorage`\n */\nconst provideNgxLocalstorage = (configuration, ...features) => {\n if (features?.filter(feature => feature.kind === FeatureKind.Serializer)?.length > 1) {\n throw new Error('Only one serializer feature is allowed!');\n }\n return makeEnvironmentProviders([{\n provide: NGX_LOCAL_STORAGE_CONFIG,\n useValue: configuration\n }, features?.map(feature => feature.providers)]);\n};\n/**\n * Provides a custom serializer.\n */\nconst withSerializer = serializer => ({\n kind: FeatureKind.Serializer,\n providers: [{\n provide: NGX_LOCAL_STORAGE_SERIALIZER,\n useClass: serializer\n }]\n});\nclass Version {\n constructor(fullVersion) {\n this.fullVersion = fullVersion;\n const [major, minor, patch] = fullVersion.split('.');\n this.major = major;\n this.minor = minor;\n this.patch = patch;\n }\n}\nconst VERSION = new Version('6.0.0');\n\n/*\n * Public API Surface of ngx-localstorage\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ControlValueAccessorDirective, LocalStorageDirective, LocalStorageService, NGX_LOCAL_STORAGE_CONFIG, NGX_LOCAL_STORAGE_SERIALIZER, NativeValueAccessorDirective, STORAGE_SUPPORT, VERSION, provideNgxLocalstorage, withSerializer };\n"],"mappings":"mHAoOA,IAAMA,EAAmC,KAChC,CACL,UAAW,GACX,YAAa,eACb,UAAW,GACb,GAKIC,EAA2B,IAAIC,EAAe,+BAAgC,CAClF,WAAY,OACZ,QAASF,CACX,CAAC,EAKGG,GAAkC,IAAM,CAC1C,IAAMC,EAAN,MAAMA,CAAkB,CAItB,UAAUC,EAAO,CACf,OAAO,KAAK,UAAUA,CAAK,CAC7B,CAIA,YAAYC,EAAa,CACvB,OAAO,KAAK,MAAMA,CAAW,CAC/B,CAYF,EAVIF,EAAK,UAAO,SAAmC,EAAG,CAChD,OAAO,IAAK,GAAKA,EACnB,EAGAA,EAAK,WAA0BG,EAAmB,CAChD,MAAOH,EACP,QAASA,EAAkB,SAC7B,CAAC,EAtBL,IAAMD,EAANC,EAyBA,OAAOD,CACT,GAAG,EAQGK,EAA+B,IAAIN,EAAe,oBAAqB,CAC3E,WAAY,OACZ,QAAS,IAAM,IAAIC,CACrB,CAAC,EAKKM,EAAS,IAAIP,EAAe,6CAA8C,CAC9E,QAAS,IAAM,CACb,GAAM,CACJ,YAAAQ,CACF,EAAIC,EAAOC,CAAQ,EACnB,GAAI,CAACF,EACH,MAAM,IAAI,MAAM,yBAAyB,EAE3C,OAAOA,CACT,CACF,CAAC,EAKKG,EAAuB,IAAIX,EAAe,2DAA4D,CAC1G,QAAS,IAAM,CAAC,CAACS,EAAOG,CAAY,CACtC,CAAC,EAIKA,EAAe,IAAIZ,EAAe,mCAAoC,CAC1E,QAAS,IAAMS,EAAOF,CAAM,EAAE,YAChC,CAAC,EAKKM,EAAyB,IAAIb,EAAe,6DAA8D,CAC9G,QAAS,IAAM,CAAC,CAACS,EAAOK,CAAc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CAClB,GAAI,CACF,KAAK,SAAS,WAAWF,EAAaC,EAAKC,EAAQ,KAAK,OAAO,OAAQ,KAAK,OAAO,SAAS,CAAC,CAC/F,OAASa,EAAO,CACd,KAAK,MAAMA,CAAK,CAClB,CACF,CAIA,OAAQ,CACN,GAAI,CACF,KAAK,SAAS,MAAM,CACtB,OAASA,EAAO,CACd,KAAK,MAAMA,CAAK,CAClB,CACF,CAKA,MAAMA,EAAO,CACX,KAAK,QAAQ,KAAKA,CAAK,CACzB,CAaF,EAXIP,EAAK,UAAO,SAAqC,EAAG,CAClD,OAAO,IAAK,GAAKA,GAAwBgB,EAAS3C,CAAwB,CAAC,CAC7E,EAGA2B,EAAK,WAA0BrB,EAAmB,CAChD,MAAOqB,EACP,QAASA,EAAoB,UAC7B,WAAY,MACd,CAAC,EApIL,IAAMD,EAANC,EAuIA,OAAOD,CACT,GAAG,EAoJH,IAAMkB,EAAN,KAAc,CACZ,YAAYC,EAAa,CACvB,KAAK,YAAcA,EACnB,GAAM,CAACC,EAAOC,EAAOC,CAAK,EAAIH,EAAY,MAAM,GAAG,EACnD,KAAK,MAAQC,EACb,KAAK,MAAQC,EACb,KAAK,MAAQC,CACf,CACF,EACMC,GAAU,IAAIL,EAAQ,OAAO","names":["NGX_LOCAL_STORAGE_DEFAULT_CONFIG","NGX_LOCAL_STORAGE_CONFIG","InjectionToken","DefaultSerializer","_DefaultSerializer","value","storedValue","ɵɵdefineInjectable","NGX_LOCAL_STORAGE_SERIALIZER","WINDOW","defaultView","inject","DOCUMENT","LOCALSTORAGE_SUPPORT","LOCALSTORAGE","SESSIONSTORAGE_SUPPORT","SESSIONSTORAGE","STORAGE_SUPPORT","storageType","STORAGE","constructKey","key","prefix","configuredPrefix","delimiter","prefixToUse","defaultConfig","LocalStorageService","_LocalStorageService","Observable","_config","subscriber","fromEvent","filter","event","error","EventEmitter","Subscription","__spreadValues","index","options","storageSerializer","constructedKey","storageItem","ɵɵinject","Version","fullVersion","major","minor","patch","VERSION"],"x_google_ignoreList":[0]}