@angular/service-worker
Advanced tools
| /** | ||
| * @license Angular v21.2.18 | ||
| * @license Angular v21.2.19 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"config.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/duration.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/glob.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/generator.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\nconst PARSE_TO_PAIRS = /([0-9]+[^0-9]+)/g;\nconst PAIR_SPLIT = /^([0-9]+)([dhmsu]+)$/;\n\nexport function parseDurationToMs(duration: string): number {\n const matches: string[] = [];\n\n let array: RegExpExecArray | null;\n while ((array = PARSE_TO_PAIRS.exec(duration)) !== null) {\n matches.push(array[0]);\n }\n return matches\n .map((match) => {\n const res = PAIR_SPLIT.exec(match);\n if (res === null) {\n throw new Error(`Not a valid duration: ${match}`);\n }\n let factor: number = 0;\n switch (res[2]) {\n case 'd':\n factor = 86400000;\n break;\n case 'h':\n factor = 3600000;\n break;\n case 'm':\n factor = 60000;\n break;\n case 's':\n factor = 1000;\n break;\n case 'u':\n factor = 1;\n break;\n default:\n throw new Error(`Not a valid duration unit: ${res[2]}`);\n }\n return parseInt(res[1]) * factor;\n })\n .reduce((total, value) => total + value, 0);\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\nconst QUESTION_MARK = '[^/]';\nconst WILD_SINGLE = '[^/]*';\nconst WILD_OPEN = '(?:.+\\\\/)?';\n\nconst TO_ESCAPE_BASE = [\n {replace: /\\./g, with: '\\\\.'},\n {replace: /\\+/g, with: '\\\\+'},\n {replace: /\\*/g, with: WILD_SINGLE},\n];\nconst TO_ESCAPE_WILDCARD_QM = [...TO_ESCAPE_BASE, {replace: /\\?/g, with: QUESTION_MARK}];\nconst TO_ESCAPE_LITERAL_QM = [...TO_ESCAPE_BASE, {replace: /\\?/g, with: '\\\\?'}];\n\nexport function globToRegex(glob: string, literalQuestionMark = false): string {\n const toEscape = literalQuestionMark ? TO_ESCAPE_LITERAL_QM : TO_ESCAPE_WILDCARD_QM;\n const segments = glob.split('/').reverse();\n let regex: string = '';\n while (segments.length > 0) {\n const segment = segments.pop()!;\n if (segment === '**') {\n if (segments.length > 0) {\n regex += WILD_OPEN;\n } else {\n regex += '.*';\n }\n } else {\n const processed = toEscape.reduce(\n (segment, escape) => segment.replace(escape.replace, escape.with),\n segment,\n );\n regex += processed;\n if (segments.length > 0) {\n regex += '\\\\/';\n }\n }\n }\n return regex;\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 {parseDurationToMs} from './duration';\nimport {Filesystem} from './filesystem';\nimport {globToRegex} from './glob';\nimport {AssetGroup, Config} from './in';\n\nconst DEFAULT_NAVIGATION_URLS = [\n '/**', // Include all URLs.\n '!/**/*.*', // Exclude URLs to files (containing a file extension in the last segment).\n '!/**/*__*', // Exclude URLs containing `__` in the last segment.\n '!/**/*__*/**', // Exclude URLs containing `__` in any other segment.\n];\n\n/**\n * Consumes service worker configuration files and processes them into control files.\n *\n * @publicApi\n */\nexport class Generator {\n constructor(\n readonly fs: Filesystem,\n private baseHref: string,\n ) {}\n\n async process(config: Config): Promise<Object> {\n const unorderedHashTable = {};\n const assetGroups = await this.processAssetGroups(config, unorderedHashTable);\n\n return {\n configVersion: 1,\n timestamp: Date.now(),\n appData: config.appData,\n index: joinUrls(this.baseHref, config.index),\n assetGroups,\n dataGroups: this.processDataGroups(config),\n hashTable: withOrderedKeys(unorderedHashTable),\n navigationUrls: processNavigationUrls(this.baseHref, config.navigationUrls),\n navigationRequestStrategy: config.navigationRequestStrategy ?? 'performance',\n applicationMaxAge: config.applicationMaxAge\n ? parseDurationToMs(config.applicationMaxAge)\n : undefined,\n };\n }\n\n private async processAssetGroups(\n config: Config,\n hashTable: {[file: string]: string | undefined},\n ): Promise<Object[]> {\n // Retrieve all files of the build.\n const allFiles = await this.fs.list('/');\n const seenMap = new Set<string>();\n const filesPerGroup = new Map<AssetGroup, string[]>();\n\n // Computed which files belong to each asset-group.\n for (const group of config.assetGroups || []) {\n if ((group.resources as any).versionedFiles) {\n throw new Error(\n `Asset-group '${group.name}' in 'ngsw-config.json' uses the 'versionedFiles' option, ` +\n \"which is no longer supported. Use 'files' instead.\",\n );\n }\n\n const fileMatcher = globListToMatcher(group.resources.files || []);\n const matchedFiles = allFiles\n .filter(fileMatcher)\n .filter((file) => !seenMap.has(file))\n .sort();\n\n matchedFiles.forEach((file) => seenMap.add(file));\n filesPerGroup.set(group, matchedFiles);\n }\n\n // Compute hashes for all matched files and add them to the hash-table.\n const allMatchedFiles = ([] as string[]).concat(...Array.from(filesPerGroup.values())).sort();\n const allMatchedHashes = await processInBatches(allMatchedFiles, 500, (file) =>\n this.fs.hash(file),\n );\n allMatchedFiles.forEach((file, idx) => {\n hashTable[joinUrls(this.baseHref, file)] = allMatchedHashes[idx];\n });\n\n // Generate and return the processed asset-groups.\n return Array.from(filesPerGroup.entries()).map(([group, matchedFiles]) => ({\n name: group.name,\n installMode: group.installMode || 'prefetch',\n updateMode: group.updateMode || group.installMode || 'prefetch',\n cacheQueryOptions: buildCacheQueryOptions(group.cacheQueryOptions),\n urls: matchedFiles.map((url) => joinUrls(this.baseHref, url)),\n patterns: (group.resources.urls || []).map((url) => urlToRegex(url, this.baseHref, true)),\n }));\n }\n\n private processDataGroups(config: Config): Object[] {\n return (config.dataGroups || []).map((group) => {\n return {\n name: group.name,\n patterns: group.urls.map((url) => urlToRegex(url, this.baseHref, true)),\n strategy: group.cacheConfig.strategy || 'performance',\n maxSize: group.cacheConfig.maxSize,\n maxAge: parseDurationToMs(group.cacheConfig.maxAge),\n timeoutMs: group.cacheConfig.timeout && parseDurationToMs(group.cacheConfig.timeout),\n refreshAheadMs:\n group.cacheConfig.refreshAhead && parseDurationToMs(group.cacheConfig.refreshAhead),\n cacheOpaqueResponses: group.cacheConfig.cacheOpaqueResponses,\n cacheQueryOptions: buildCacheQueryOptions(group.cacheQueryOptions),\n version: group.version !== undefined ? group.version : 1,\n };\n });\n }\n}\n\nexport function processNavigationUrls(\n baseHref: string,\n urls = DEFAULT_NAVIGATION_URLS,\n): {positive: boolean; regex: string}[] {\n return urls.map((url) => {\n const positive = !url.startsWith('!');\n url = positive ? url : url.slice(1);\n return {positive, regex: `^${urlToRegex(url, baseHref)}$`};\n });\n}\n\nasync function processInBatches<I, O>(\n items: I[],\n batchSize: number,\n processFn: (item: I) => O | Promise<O>,\n): Promise<O[]> {\n const batches = [];\n\n for (let i = 0; i < items.length; i += batchSize) {\n batches.push(items.slice(i, i + batchSize));\n }\n\n return batches.reduce(\n async (prev, batch) =>\n (await prev).concat(await Promise.all(batch.map((item) => processFn(item)))),\n Promise.resolve<O[]>([]),\n );\n}\n\nfunction globListToMatcher(globs: string[]): (file: string) => boolean {\n const patterns = globs.map((pattern) => {\n if (pattern.startsWith('!')) {\n return {\n positive: false,\n regex: new RegExp('^' + globToRegex(pattern.slice(1)) + '$'),\n };\n } else {\n return {\n positive: true,\n regex: new RegExp('^' + globToRegex(pattern) + '$'),\n };\n }\n });\n return (file: string) => matches(file, patterns);\n}\n\nfunction matches(file: string, patterns: {positive: boolean; regex: RegExp}[]): boolean {\n return patterns.reduce((isMatch, pattern) => {\n if (pattern.positive) {\n return isMatch || pattern.regex.test(file);\n } else {\n return isMatch && !pattern.regex.test(file);\n }\n }, false);\n}\n\nfunction urlToRegex(url: string, baseHref: string, literalQuestionMark?: boolean): string {\n if (!url.startsWith('/') && url.indexOf('://') === -1) {\n // Prefix relative URLs with `baseHref`.\n // Strip a leading `.` from a relative `baseHref` (e.g. `./foo/`), since it would result in an\n // incorrect regex (matching a literal `.`).\n url = joinUrls(baseHref.replace(/^\\.(?=\\/)/, ''), url);\n }\n\n return globToRegex(url, literalQuestionMark);\n}\n\nfunction joinUrls(a: string, b: string): string {\n if (a.endsWith('/') && b.startsWith('/')) {\n return a + b.slice(1);\n } else if (!a.endsWith('/') && !b.startsWith('/')) {\n return a + '/' + b;\n }\n return a + b;\n}\n\nfunction withOrderedKeys<T extends {[key: string]: any}>(unorderedObj: T): T {\n const orderedObj = {} as {[key: string]: any};\n Object.keys(unorderedObj)\n .sort()\n .forEach((key) => (orderedObj[key] = unorderedObj[key]));\n return orderedObj as T;\n}\n\nfunction buildCacheQueryOptions(\n inOptions?: Pick<CacheQueryOptions, 'ignoreSearch'>,\n): CacheQueryOptions {\n return {\n ignoreVary: true,\n ...inOptions,\n };\n}\n"],"names":["PARSE_TO_PAIRS","PAIR_SPLIT","parseDurationToMs","duration","matches","array","exec","push","map","match","res","Error","factor","parseInt","reduce","total","value","QUESTION_MARK","WILD_SINGLE","WILD_OPEN","TO_ESCAPE_BASE","replace","with","TO_ESCAPE_WILDCARD_QM","TO_ESCAPE_LITERAL_QM","globToRegex","glob","literalQuestionMark","toEscape","segments","split","reverse","regex","length","segment","pop","processed","escape","DEFAULT_NAVIGATION_URLS","Generator","fs","baseHref","constructor","process","config","unorderedHashTable","assetGroups","processAssetGroups","configVersion","timestamp","Date","now","appData","index","joinUrls","dataGroups","processDataGroups","hashTable","withOrderedKeys","navigationUrls","processNavigationUrls","navigationRequestStrategy","applicationMaxAge","undefined","allFiles","list","seenMap","Set","filesPerGroup","Map","group","resources","versionedFiles","name","fileMatcher","globListToMatcher","files","matchedFiles","filter","file","has","sort","forEach","add","set","allMatchedFiles","concat","Array","from","values","allMatchedHashes","processInBatches","hash","idx","entries","installMode","updateMode","cacheQueryOptions","buildCacheQueryOptions","urls","url","patterns","urlToRegex","strategy","cacheConfig","maxSize","maxAge","timeoutMs","timeout","refreshAheadMs","refreshAhead","cacheOpaqueResponses","version","positive","startsWith","slice","items","batchSize","processFn","batches","i","prev","batch","Promise","all","item","resolve","globs","pattern","RegExp","isMatch","test","indexOf","a","b","endsWith","unorderedObj","orderedObj","Object","keys","key","inOptions","ignoreVary"],"mappings":";;;;;;AAQA,MAAMA,cAAc,GAAG,kBAAkB;AACzC,MAAMC,UAAU,GAAG,sBAAsB;AAEnC,SAAUC,iBAAiBA,CAACC,QAAgB,EAAA;EAChD,MAAMC,OAAO,GAAa,EAAE;AAE5B,EAAA,IAAIC,KAA6B;EACjC,OAAO,CAACA,KAAK,GAAGL,cAAc,CAACM,IAAI,CAACH,QAAQ,CAAC,MAAM,IAAI,EAAE;AACvDC,IAAAA,OAAO,CAACG,IAAI,CAACF,KAAK,CAAC,CAAC,CAAC,CAAC;AACxB,EAAA;AACA,EAAA,OAAOD,OAAA,CACJI,GAAG,CAAEC,KAAK,IAAI;AACb,IAAA,MAAMC,GAAG,GAAGT,UAAU,CAACK,IAAI,CAACG,KAAK,CAAC;IAClC,IAAIC,GAAG,KAAK,IAAI,EAAE;AAChB,MAAA,MAAM,IAAIC,KAAK,CAAC,CAAA,sBAAA,EAAyBF,KAAK,EAAE,CAAC;AACnD,IAAA;IACA,IAAIG,MAAM,GAAW,CAAC;IACtB,QAAQF,GAAG,CAAC,CAAC,CAAC;AACZ,MAAA,KAAK,GAAG;AACNE,QAAAA,MAAM,GAAG,QAAQ;AACjB,QAAA;AACF,MAAA,KAAK,GAAG;AACNA,QAAAA,MAAM,GAAG,OAAO;AAChB,QAAA;AACF,MAAA,KAAK,GAAG;AACNA,QAAAA,MAAM,GAAG,KAAK;AACd,QAAA;AACF,MAAA,KAAK,GAAG;AACNA,QAAAA,MAAM,GAAG,IAAI;AACb,QAAA;AACF,MAAA,KAAK,GAAG;AACNA,QAAAA,MAAM,GAAG,CAAC;AACV,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CAAC2E,GAAG,EAAEzE,mBAAmB,CAAC;AAC9C;AAEA,SAAS2B,QAAQA,CAAC+E,CAAS,EAAEC,CAAS,EAAA;AACpC,EAAA,IAAID,CAAC,CAACE,QAAQ,CAAC,GAAG,CAAC,IAAID,CAAC,CAACpB,UAAU,CAAC,GAAG,CAAC,EAAE;AACxC,IAAA,OAAOmB,CAAC,GAAGC,CAAC,CAACnB,KAAK,CAAC,CAAC,CAAC;AACvB,EAAA,CAAA,MAAO,IAAI,CAACkB,CAAC,CAACE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAACD,CAAC,CAACpB,UAAU,CAAC,GAAG,CAAC,EAAE;AACjD,IAAA,OAAOmB,CAAC,GAAG,GAAG,GAAGC,CAAC;AACpB,EAAA;EACA,OAAOD,CAAC,GAAGC,CAAC;AACd;AAEA,SAAS5E,eAAeA,CAAiC8E,YAAe,EAAA;EACtE,MAAMC,UAAU,GAAG,EAA0B;EAC7CC,MAAM,CAACC,IAAI,CAACH,YAAY,CAAA,CACrBvD,IAAI,EAAA,CACJC,OAAO,CAAE0D,GAAG,IAAMH,UAAU,CAACG,GAAG,CAAC,GAAGJ,YAAY,CAACI,GAAG,CAAE,CAAC;AAC1D,EAAA,OAAOH,UAAe;AACxB;AAEA,SAASvC,sBAAsBA,CAC7B2C,SAAmD,EAAA;EAEnD,OAAO;AACLC,IAAAA,UAAU,EAAE,IAAI;IAChB,GAAGD;GACJ;AACH;;;;"} | ||
| {"version":3,"file":"config.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/duration.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/glob.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/config/src/generator.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\nconst PARSE_TO_PAIRS = /([0-9]+[^0-9]+)/g;\nconst PAIR_SPLIT = /^([0-9]+)([dhmsu]+)$/;\n\nexport function parseDurationToMs(duration: string): number {\n const matches: string[] = [];\n\n let array: RegExpExecArray | null;\n while ((array = PARSE_TO_PAIRS.exec(duration)) !== null) {\n matches.push(array[0]);\n }\n return matches\n .map((match) => {\n const res = PAIR_SPLIT.exec(match);\n if (res === null) {\n throw new Error(`Not a valid duration: ${match}`);\n }\n let factor: number = 0;\n switch (res[2]) {\n case 'd':\n factor = 86400000;\n break;\n case 'h':\n factor = 3600000;\n break;\n case 'm':\n factor = 60000;\n break;\n case 's':\n factor = 1000;\n break;\n case 'u':\n factor = 1;\n break;\n default:\n throw new Error(`Not a valid duration unit: ${res[2]}`);\n }\n return parseInt(res[1]) * factor;\n })\n .reduce((total, value) => total + value, 0);\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\nconst QUESTION_MARK = '[^/]';\nconst WILD_SINGLE = '[^/]*';\nconst WILD_OPEN = '(?:.+\\\\/)?';\n\nconst TO_ESCAPE_BASE = [\n {replace: /\\./g, with: '\\\\.'},\n {replace: /\\+/g, with: '\\\\+'},\n {replace: /\\*/g, with: WILD_SINGLE},\n];\nconst TO_ESCAPE_WILDCARD_QM = [...TO_ESCAPE_BASE, {replace: /\\?/g, with: QUESTION_MARK}];\nconst TO_ESCAPE_LITERAL_QM = [...TO_ESCAPE_BASE, {replace: /\\?/g, with: '\\\\?'}];\n\nexport function globToRegex(glob: string, literalQuestionMark = false): string {\n const toEscape = literalQuestionMark ? TO_ESCAPE_LITERAL_QM : TO_ESCAPE_WILDCARD_QM;\n const segments = glob.split('/').reverse();\n let regex: string = '';\n while (segments.length > 0) {\n const segment = segments.pop()!;\n if (segment === '**') {\n if (segments.length > 0) {\n regex += WILD_OPEN;\n } else {\n regex += '.*';\n }\n } else {\n const processed = toEscape.reduce(\n (segment, escape) => segment.replace(escape.replace, escape.with),\n segment,\n );\n regex += processed;\n if (segments.length > 0) {\n regex += '\\\\/';\n }\n }\n }\n return regex;\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 {parseDurationToMs} from './duration';\nimport {Filesystem} from './filesystem';\nimport {globToRegex} from './glob';\nimport {AssetGroup, Config} from './in';\n\nconst DEFAULT_NAVIGATION_URLS = [\n '/**', // Include all URLs.\n '!/**/*.*', // Exclude URLs to files (containing a file extension in the last segment).\n '!/**/*__*', // Exclude URLs containing `__` in the last segment.\n '!/**/*__*/**', // Exclude URLs containing `__` in any other segment.\n];\n\n/**\n * Consumes service worker configuration files and processes them into control files.\n *\n * @publicApi\n */\nexport class Generator {\n constructor(\n readonly fs: Filesystem,\n private baseHref: string,\n ) {}\n\n async process(config: Config): Promise<Object> {\n const unorderedHashTable = {};\n const assetGroups = await this.processAssetGroups(config, unorderedHashTable);\n\n return {\n configVersion: 1,\n timestamp: Date.now(),\n appData: config.appData,\n index: joinUrls(this.baseHref, config.index),\n assetGroups,\n dataGroups: this.processDataGroups(config),\n hashTable: withOrderedKeys(unorderedHashTable),\n navigationUrls: processNavigationUrls(this.baseHref, config.navigationUrls),\n navigationRequestStrategy: config.navigationRequestStrategy ?? 'performance',\n applicationMaxAge: config.applicationMaxAge\n ? parseDurationToMs(config.applicationMaxAge)\n : undefined,\n };\n }\n\n private async processAssetGroups(\n config: Config,\n hashTable: {[file: string]: string | undefined},\n ): Promise<Object[]> {\n // Retrieve all files of the build.\n const allFiles = await this.fs.list('/');\n const seenMap = new Set<string>();\n const filesPerGroup = new Map<AssetGroup, string[]>();\n\n // Computed which files belong to each asset-group.\n for (const group of config.assetGroups || []) {\n if ((group.resources as any).versionedFiles) {\n throw new Error(\n `Asset-group '${group.name}' in 'ngsw-config.json' uses the 'versionedFiles' option, ` +\n \"which is no longer supported. Use 'files' instead.\",\n );\n }\n\n const fileMatcher = globListToMatcher(group.resources.files || []);\n const matchedFiles = allFiles\n .filter(fileMatcher)\n .filter((file) => !seenMap.has(file))\n .sort();\n\n matchedFiles.forEach((file) => seenMap.add(file));\n filesPerGroup.set(group, matchedFiles);\n }\n\n // Compute hashes for all matched files and add them to the hash-table.\n const allMatchedFiles = ([] as string[]).concat(...Array.from(filesPerGroup.values())).sort();\n const allMatchedHashes = await processInBatches(allMatchedFiles, 500, (file) =>\n this.fs.hash(file),\n );\n allMatchedFiles.forEach((file, idx) => {\n hashTable[joinUrls(this.baseHref, file)] = allMatchedHashes[idx];\n });\n\n // Generate and return the processed asset-groups.\n return Array.from(filesPerGroup.entries()).map(([group, matchedFiles]) => ({\n name: group.name,\n installMode: group.installMode || 'prefetch',\n updateMode: group.updateMode || group.installMode || 'prefetch',\n cacheQueryOptions: buildCacheQueryOptions(group.cacheQueryOptions),\n urls: matchedFiles.map((url) => joinUrls(this.baseHref, url)),\n patterns: (group.resources.urls || []).map((url) => urlToRegex(url, this.baseHref, true)),\n }));\n }\n\n private processDataGroups(config: Config): Object[] {\n return (config.dataGroups || []).map((group) => {\n return {\n name: group.name,\n patterns: group.urls.map((url) => urlToRegex(url, this.baseHref, true)),\n strategy: group.cacheConfig.strategy || 'performance',\n maxSize: group.cacheConfig.maxSize,\n maxAge: parseDurationToMs(group.cacheConfig.maxAge),\n timeoutMs: group.cacheConfig.timeout && parseDurationToMs(group.cacheConfig.timeout),\n refreshAheadMs:\n group.cacheConfig.refreshAhead && parseDurationToMs(group.cacheConfig.refreshAhead),\n cacheOpaqueResponses: group.cacheConfig.cacheOpaqueResponses,\n cacheQueryOptions: buildCacheQueryOptions(group.cacheQueryOptions),\n version: group.version !== undefined ? group.version : 1,\n };\n });\n }\n}\n\nexport function processNavigationUrls(\n baseHref: string,\n urls = DEFAULT_NAVIGATION_URLS,\n): {positive: boolean; regex: string}[] {\n return urls.map((url) => {\n const positive = !url.startsWith('!');\n url = positive ? url : url.slice(1);\n return {positive, regex: `^${urlToRegex(url, baseHref)}$`};\n });\n}\n\nasync function processInBatches<I, O>(\n items: I[],\n batchSize: number,\n processFn: (item: I) => O | Promise<O>,\n): Promise<O[]> {\n const batches = [];\n\n for (let i = 0; i < items.length; i += batchSize) {\n batches.push(items.slice(i, i + batchSize));\n }\n\n return batches.reduce(\n async (prev, batch) =>\n (await prev).concat(await Promise.all(batch.map((item) => processFn(item)))),\n Promise.resolve<O[]>([]),\n );\n}\n\nfunction globListToMatcher(globs: string[]): (file: string) => boolean {\n const patterns = globs.map((pattern) => {\n if (pattern.startsWith('!')) {\n return {\n positive: false,\n regex: new RegExp('^' + globToRegex(pattern.slice(1)) + '$'),\n };\n } else {\n return {\n positive: true,\n regex: new RegExp('^' + globToRegex(pattern) + '$'),\n };\n }\n });\n return (file: string) => matches(file, patterns);\n}\n\nfunction matches(file: string, patterns: {positive: boolean; regex: RegExp}[]): boolean {\n return patterns.reduce((isMatch, pattern) => {\n if (pattern.positive) {\n return isMatch || pattern.regex.test(file);\n } else {\n return isMatch && !pattern.regex.test(file);\n }\n }, false);\n}\n\nfunction urlToRegex(url: string, baseHref: string, literalQuestionMark?: boolean): string {\n if (!url.startsWith('/') && url.indexOf('://') === -1) {\n // Prefix relative URLs with `baseHref`.\n // Strip a leading `.` from a relative `baseHref` (e.g. `./foo/`), since it would result in an\n // incorrect regex (matching a literal `.`).\n url = joinUrls(baseHref.replace(/^\\.(?=\\/)/, ''), url);\n }\n\n return globToRegex(url, literalQuestionMark);\n}\n\nfunction joinUrls(a: string, b: string): string {\n if (a.endsWith('/') && b.startsWith('/')) {\n return a + b.slice(1);\n } else if (!a.endsWith('/') && !b.startsWith('/')) {\n return a + '/' + b;\n }\n return a + b;\n}\n\nfunction withOrderedKeys<T extends {[key: string]: any}>(unorderedObj: T): T {\n const orderedObj = {} as {[key: string]: any};\n Object.keys(unorderedObj)\n .sort()\n .forEach((key) => (orderedObj[key] = unorderedObj[key]));\n return orderedObj as T;\n}\n\nfunction buildCacheQueryOptions(\n inOptions?: Pick<CacheQueryOptions, 'ignoreSearch'>,\n): CacheQueryOptions {\n return {\n ignoreVary: true,\n ...inOptions,\n };\n}\n"],"names":["PARSE_TO_PAIRS","PAIR_SPLIT","parseDurationToMs","duration","matches","array","exec","push","map","match","res","Error","factor","parseInt","reduce","total","value","QUESTION_MARK","WILD_SINGLE","WILD_OPEN","TO_ESCAPE_BASE","replace","with","TO_ESCAPE_WILDCARD_QM","TO_ESCAPE_LITERAL_QM","globToRegex","glob","literalQuestionMark","toEscape","segments","split","reverse","regex","length","segment","pop","processed","escape","DEFAULT_NAVIGATION_URLS","Generator","fs","baseHref","constructor","process","config","unorderedHashTable","assetGroups","processAssetGroups","configVersion","timestamp","Date","now","appData","index","joinUrls","dataGroups","processDataGroups","hashTable","withOrderedKeys","navigationUrls","processNavigationUrls","navigationRequestStrategy","applicationMaxAge","undefined","allFiles","list","seenMap","Set","filesPerGroup","Map","group","resources","versionedFiles","name","fileMatcher","globListToMatcher","files","matchedFiles","filter","file","has","sort","forEach","add","set","allMatchedFiles","concat","Array","from","values","allMatchedHashes","processInBatches","hash","idx","entries","installMode","updateMode","cacheQueryOptions","buildCacheQueryOptions","urls","url","patterns","urlToRegex","strategy","cacheConfig","maxSize","maxAge","timeoutMs","timeout","refreshAheadMs","refreshAhead","cacheOpaqueResponses","version","positive","startsWith","slice","items","batchSize","processFn","batches","i","prev","batch","Promise","all","item","resolve","globs","pattern","RegExp","isMatch","test","indexOf","a","b","endsWith","unorderedObj","orderedObj","Object","keys","key","inOptions","ignoreVary"],"mappings":";;;;;;AAQA,MAAMA,cAAc,GAAG,kBAAkB;AACzC,MAAMC,UAAU,GAAG,sBAAsB;AAEnC,SAAUC,iBAAiBA,CAACC,QAAgB,EAAA;EAChD,MAAMC,OAAO,GAAa,EAAE;AAE5B,EAAA,IAAIC,KAA6B;EACjC,OAAO,CAACA,KAAK,GAAGL,cAAc,CAACM,IAAI,CAACH,QAAQ,CAAC,MAAM,IAAI,EAAE;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SAAS5E,eAAeA,CAAiC8E,YAAe,EAAA;EACtE,MAAMC,UAAU,GAAG,EAA0B;EAC7CC,MAAM,CAACC,IAAI,CAACH,YAAY,CAAA,CACrBvD,IAAI,EAAA,CACJC,OAAO,CAAE0D,GAAG,IAAMH,UAAU,CAACG,GAAG,CAAC,GAAGJ,YAAY,CAACI,GAAG,CAAE,CAAC;AAC1D,EAAA,OAAOH,UAAe;AACxB;AAEA,SAASvC,sBAAsBA,CAC7B2C,SAAmD,EAAA;EAEnD,OAAO;AACLC,IAAAA,UAAU,EAAE,IAAI;IAChB,GAAGD;GACJ;AACH;;;;"} |
| /** | ||
| * @license Angular v21.2.18 | ||
| * @license Angular v21.2.19 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -205,3 +205,3 @@ * License: MIT | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -216,3 +216,3 @@ type: SwPush, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -224,3 +224,3 @@ type: SwPush | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -280,3 +280,3 @@ type: SwPush, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -291,3 +291,3 @@ type: SwUpdate, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -299,3 +299,3 @@ type: SwUpdate | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -406,3 +406,3 @@ type: SwUpdate, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -415,3 +415,3 @@ type: ServiceWorkerModule, | ||
| minVersion: "14.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -422,3 +422,3 @@ type: ServiceWorkerModule | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -431,3 +431,3 @@ type: ServiceWorkerModule, | ||
| minVersion: "12.0.0", | ||
| version: "21.2.18", | ||
| version: "21.2.19", | ||
| ngImport: i0, | ||
@@ -434,0 +434,0 @@ type: ServiceWorkerModule, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"service-worker.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/low_level.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/push.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/update.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/provider.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/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 {ApplicationRef, type Injector, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, map, switchMap, take} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\n\nexport const ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\n\n/**\n * An event emitted when the service worker has checked the version of the app on the server and it\n * didn't find a new version that it doesn't have already downloaded.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface NoNewVersionDetectedEvent {\n type: 'NO_NEW_VERSION_DETECTED';\n version: {hash: string; appData?: Object};\n}\n\n/**\n * An event emitted when the service worker has detected a new version of the app on the server and\n * is about to start downloading it.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface VersionDetectedEvent {\n type: 'VERSION_DETECTED';\n version: {hash: string; appData?: object};\n}\n\n/**\n * An event emitted when the installation of a new version failed.\n * It may be used for logging/monitoring purposes.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n *a\n * @publicApi\n */\nexport interface VersionInstallationFailedEvent {\n type: 'VERSION_INSTALLATION_FAILED';\n version: {hash: string; appData?: object};\n error: string;\n}\n\n/**\n * An event emitted when a new version of the app is available.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface VersionReadyEvent {\n type: 'VERSION_READY';\n currentVersion: {hash: string; appData?: object};\n latestVersion: {hash: string; appData?: object};\n}\n\n/**\n * A union of all event types that can be emitted by\n * {@link SwUpdate#versionUpdates}.\n *\n * @publicApi\n */\nexport type VersionEvent =\n | VersionDetectedEvent\n | VersionInstallationFailedEvent\n | VersionReadyEvent\n | NoNewVersionDetectedEvent;\n\n/**\n * An event emitted when the version of the app used by the service worker to serve this client is\n * in a broken state that cannot be recovered from and a full page reload is required.\n *\n * For example, the service worker may not be able to retrieve a required resource, neither from the\n * cache nor from the server. This could happen if a new version is deployed to the server and the\n * service worker cache has been partially cleaned by the browser, removing some files of a previous\n * app version but not all.\n *\n * @see [Handling an unrecoverable state](ecosystem/service-workers/communications#handling-an-unrecoverable-state)\n\n *\n * @publicApi\n */\nexport interface UnrecoverableStateEvent {\n type: 'UNRECOVERABLE_STATE';\n reason: string;\n}\n\n/**\n * An event emitted when a `PushEvent` is received by the service worker.\n */\nexport interface PushEvent {\n type: 'PUSH';\n data: any;\n}\n\nexport type IncomingEvent = UnrecoverableStateEvent | VersionEvent;\n\nexport interface TypedEvent {\n type: string;\n}\n\ntype OperationCompletedEvent =\n | {\n type: 'OPERATION_COMPLETED';\n nonce: number;\n result: boolean;\n }\n | {\n type: 'OPERATION_COMPLETED';\n nonce: number;\n result?: undefined;\n error: string;\n };\n\n/**\n * @publicApi\n */\nexport class NgswCommChannel {\n readonly worker: Observable<ServiceWorker>;\n\n readonly registration: Observable<ServiceWorkerRegistration>;\n\n readonly events: Observable<TypedEvent>;\n\n constructor(\n private serviceWorker: ServiceWorkerContainer | undefined,\n injector?: Injector,\n ) {\n if (!serviceWorker) {\n this.worker =\n this.events =\n this.registration =\n new Observable<never>((subscriber) =>\n subscriber.error(\n new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n ),\n ),\n );\n } else {\n let currentWorker: ServiceWorker | null = null;\n const workerSubject = new Subject<ServiceWorker>();\n this.worker = new Observable((subscriber) => {\n if (currentWorker !== null) {\n subscriber.next(currentWorker);\n }\n return workerSubject.subscribe((v) => subscriber.next(v));\n });\n const updateController = () => {\n const {controller} = serviceWorker;\n if (controller === null) {\n return;\n }\n currentWorker = controller;\n workerSubject.next(currentWorker);\n };\n serviceWorker.addEventListener('controllerchange', updateController);\n updateController();\n\n this.registration = this.worker.pipe(\n switchMap(() =>\n serviceWorker.getRegistration().then((registration) => {\n // The `getRegistration()` method may return undefined in\n // non-secure contexts or incognito mode, where service worker\n // registration might not be allowed.\n if (!registration) {\n throw new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n );\n }\n\n return registration;\n }),\n ),\n );\n\n const _events = new Subject<TypedEvent>();\n this.events = _events.asObservable();\n\n const messageListener = (event: MessageEvent) => {\n const {data} = event;\n if (data?.type) {\n _events.next(data);\n }\n };\n serviceWorker.addEventListener('message', messageListener);\n\n // The injector is optional to avoid breaking changes.\n const appRef = injector?.get(ApplicationRef, null, {optional: true});\n appRef?.onDestroy(() => {\n serviceWorker.removeEventListener('controllerchange', updateController);\n serviceWorker.removeEventListener('message', messageListener);\n });\n }\n }\n\n postMessage(action: string, payload: Object): Promise<void> {\n return new Promise<void>((resolve) => {\n this.worker.pipe(take(1)).subscribe((sw) => {\n sw.postMessage({\n action,\n ...payload,\n });\n\n resolve();\n });\n });\n }\n\n postMessageWithOperation(\n type: string,\n payload: Object,\n operationNonce: number,\n ): Promise<boolean> {\n const waitForOperationCompleted = this.waitForOperationCompleted(operationNonce);\n const postMessage = this.postMessage(type, payload);\n return Promise.all([postMessage, waitForOperationCompleted]).then(([, result]) => result);\n }\n\n generateNonce(): number {\n return Math.round(Math.random() * 10000000);\n }\n\n eventsOfType<T extends TypedEvent>(type: T['type'] | T['type'][]): Observable<T> {\n let filterFn: (event: TypedEvent) => event is T;\n if (typeof type === 'string') {\n filterFn = (event: TypedEvent): event is T => event.type === type;\n } else {\n filterFn = (event: TypedEvent): event is T => type.includes(event.type);\n }\n return this.events.pipe(filter(filterFn));\n }\n\n nextEventOfType<T extends TypedEvent>(type: T['type']): Observable<T> {\n return this.eventsOfType(type).pipe(take(1));\n }\n\n waitForOperationCompleted(nonce: number): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.eventsOfType<OperationCompletedEvent>('OPERATION_COMPLETED')\n .pipe(\n filter((event) => event.nonce === nonce),\n take(1),\n map((event) => {\n if (event.result !== undefined) {\n return event.result;\n }\n throw new Error(event.error!);\n }),\n )\n .subscribe({\n next: resolve,\n error: reject,\n });\n });\n }\n\n get isEnabled(): boolean {\n return !!this.serviceWorker;\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 {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {NEVER, Observable, Subject} from 'rxjs';\nimport {map, switchMap, take} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\nimport {ERR_SW_NOT_SUPPORTED, NgswCommChannel, PushEvent} from './low_level';\n\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"inject-sw-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"subscribe-to-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n * \"notification\": {\n * \"actions\": NotificationAction[],\n * \"badge\": USVString,\n * \"body\": DOMString,\n * \"data\": any,\n * \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n * \"icon\": USVString,\n * \"image\": USVString,\n * \"lang\": DOMString,\n * \"renotify\": boolean,\n * \"requireInteraction\": boolean,\n * \"silent\": boolean,\n * \"tag\": DOMString,\n * \"timestamp\": DOMTimeStamp,\n * \"title\": DOMString,\n * \"vibrate\": number[]\n * }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"subscribe-to-notification-clicks\"\n * header=\"app.component.ts\"></code-example>\n *\n * You can read more on handling notification clicks in the [Service worker notifications\n * guide](ecosystem/service-workers/push-notifications).\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n * @see [Push notifications guide](ecosystem/service-workers/push-notifications)\n *\n * @publicApi\n */\n@Injectable()\nexport class SwPush {\n /**\n * Emits the payloads of the received push notification messages.\n */\n readonly messages: Observable<object>;\n\n /**\n * Emits the payloads of the received push notification messages as well as the action the user\n * interacted with. If no action was used the `action` property contains an empty string `''`.\n *\n * Note that the `notification` property does **not** contain a\n * [Notification][Mozilla Notification] object but rather a\n * [NotificationOptions](https://notifications.spec.whatwg.org/#dictdef-notificationoptions)\n * object that also includes the `title` of the [Notification][Mozilla Notification] object.\n *\n * [Mozilla Notification]: https://developer.mozilla.org/en-US/docs/Web/API/Notification\n *\n * @see [Notification click handling](ecosystem/service-workers/push-notifications#notification-click-handling)\n *\n */\n readonly notificationClicks: Observable<{\n action: string;\n notification: NotificationOptions & {\n title: string;\n };\n }>;\n\n /**\n * Emits the payloads of notifications that were closed, along with the action (if any)\n * associated with the close event. If no action was used, the `action` property contains\n * an empty string `''`.\n *\n * Note that the `notification` property does **not** contain a\n * [Notification][Mozilla Notification] object but rather a\n * [NotificationOptions](https://notifications.spec.whatwg.org/#dictdef-notificationoptions)\n * object that also includes the `title` of the [Notification][Mozilla Notification] object.\n *\n * [Mozilla Notification]: https://developer.mozilla.org/en-US/docs/Web/API/Notification\n */\n readonly notificationCloses: Observable<{\n action: string;\n notification: NotificationOptions & {\n title: string;\n };\n }>;\n\n /**\n * Emits updates to the push subscription, including both the previous (`oldSubscription`)\n * and current (`newSubscription`) values. Either subscription may be `null`, depending on\n * the context:\n *\n * - `oldSubscription` is `null` if no previous subscription existed.\n * - `newSubscription` is `null` if the subscription was invalidated and not replaced.\n *\n * This stream allows clients to react to automatic changes in push subscriptions,\n * such as those triggered by browser expiration or key rotation.\n *\n * [Push API]: https://w3c.github.io/push-api\n */\n readonly pushSubscriptionChanges: Observable<{\n oldSubscription: PushSubscription | null;\n newSubscription: PushSubscription | null;\n }>;\n\n /**\n * Emits the currently active\n * [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * associated to the Service Worker registration or `null` if there is no subscription.\n */\n readonly subscription: Observable<PushSubscription | null>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n private pushManager: Observable<PushManager> | null = null;\n private subscriptionChanges = new Subject<PushSubscription | null>();\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.messages = NEVER;\n this.notificationClicks = NEVER;\n this.notificationCloses = NEVER;\n this.pushSubscriptionChanges = NEVER;\n this.subscription = NEVER;\n return;\n }\n\n this.messages = this.sw.eventsOfType<PushEvent>('PUSH').pipe(map((message) => message.data));\n\n this.notificationClicks = this.sw\n .eventsOfType('NOTIFICATION_CLICK')\n .pipe(map((message: any) => message.data));\n\n this.notificationCloses = this.sw\n .eventsOfType('NOTIFICATION_CLOSE')\n .pipe(map((message: any) => message.data));\n\n this.pushSubscriptionChanges = this.sw\n .eventsOfType('PUSH_SUBSCRIPTION_CHANGE')\n .pipe(map((message: any) => message.data));\n\n this.pushManager = this.sw.registration.pipe(\n map(\n (registration) =>\n (registration as ServiceWorkerRegistration & {pushManager: PushManager}).pushManager,\n ),\n );\n\n const workerDrivenSubscriptions = this.pushManager.pipe(\n switchMap((pm) => pm.getSubscription()),\n );\n this.subscription = new Observable((subscriber) => {\n const workerDrivenSubscription = workerDrivenSubscriptions.subscribe(subscriber);\n const subscriptionChanges = this.subscriptionChanges.subscribe(subscriber);\n return () => {\n workerDrivenSubscription.unsubscribe();\n subscriptionChanges.unsubscribe();\n };\n });\n }\n\n /**\n * Subscribes to Web Push Notifications,\n * after requesting and receiving user permission.\n *\n * @param options An object containing the `serverPublicKey` string.\n * @returns A Promise that resolves to the new subscription object.\n */\n requestSubscription(options: {serverPublicKey: string}): Promise<PushSubscription> {\n if (!this.sw.isEnabled || this.pushManager === null) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const pushOptions: PushSubscriptionOptionsInit = {userVisibleOnly: true};\n let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n for (let i = 0; i < key.length; i++) {\n applicationServerKey[i] = key.charCodeAt(i);\n }\n pushOptions.applicationServerKey = applicationServerKey;\n\n return new Promise((resolve, reject) => {\n this.pushManager!.pipe(\n switchMap((pm) => pm.subscribe(pushOptions)),\n take(1),\n ).subscribe({\n next: (sub) => {\n this.subscriptionChanges.next(sub);\n resolve(sub);\n },\n error: reject,\n });\n });\n }\n\n /**\n * Unsubscribes from Service Worker push notifications.\n *\n * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n * active subscription or the unsubscribe operation fails.\n */\n unsubscribe(): Promise<void> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n\n const doUnsubscribe = (sub: PushSubscription | null) => {\n if (sub === null) {\n throw new RuntimeError(\n RuntimeErrorCode.NOT_SUBSCRIBED_TO_PUSH_NOTIFICATIONS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Not subscribed to push notifications.',\n );\n }\n\n return sub.unsubscribe().then((success) => {\n if (!success) {\n throw new RuntimeError(\n RuntimeErrorCode.PUSH_SUBSCRIPTION_UNSUBSCRIBE_FAILED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'Unsubscribe failed!',\n );\n }\n\n this.subscriptionChanges.next(null);\n });\n };\n\n return new Promise((resolve, reject) => {\n this.subscription\n .pipe(take(1), switchMap(doUnsubscribe))\n .subscribe({next: resolve, error: reject});\n });\n }\n\n private decodeBase64(input: string): string {\n return atob(input);\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 {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {NEVER, Observable} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {\n ERR_SW_NOT_SUPPORTED,\n NgswCommChannel,\n UnrecoverableStateEvent,\n VersionEvent,\n} from './low_level';\n\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n *\n * @publicApi\n */\n@Injectable()\nexport class SwUpdate {\n /**\n * Emits a `VersionDetectedEvent` event whenever a new version is detected on the server.\n *\n * Emits a `VersionInstallationFailedEvent` event whenever checking for or downloading a new\n * version fails.\n *\n * Emits a `VersionReadyEvent` event whenever a new version has been downloaded and is ready for\n * activation.\n *\n * @see [Version updates](ecosystem/service-workers/communications#version-updates)\n *\n */\n readonly versionUpdates: Observable<VersionEvent>;\n\n /**\n * Emits an `UnrecoverableStateEvent` event whenever the version of the app used by the service\n * worker to serve this client is in a broken state that cannot be recovered from without a full\n * page reload.\n */\n readonly unrecoverable: Observable<UnrecoverableStateEvent>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n private ongoingCheckForUpdate: Promise<boolean> | null = null;\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.versionUpdates = NEVER;\n this.unrecoverable = NEVER;\n return;\n }\n this.versionUpdates = this.sw.eventsOfType<VersionEvent>([\n 'VERSION_DETECTED',\n 'VERSION_INSTALLATION_FAILED',\n 'VERSION_READY',\n 'NO_NEW_VERSION_DETECTED',\n ]);\n this.unrecoverable = this.sw.eventsOfType<UnrecoverableStateEvent>('UNRECOVERABLE_STATE');\n }\n\n /**\n * Checks for an update and waits until the new version is downloaded from the server and ready\n * for activation.\n *\n * @returns a promise that\n * - resolves to `true` if a new version was found and is ready to be activated.\n * - resolves to `false` if no new version was found\n * - rejects if any error occurs\n */\n checkForUpdate(): Promise<boolean> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n if (this.ongoingCheckForUpdate) {\n return this.ongoingCheckForUpdate;\n }\n const nonce = this.sw.generateNonce();\n this.ongoingCheckForUpdate = this.sw\n .postMessageWithOperation('CHECK_FOR_UPDATES', {nonce}, nonce)\n .finally(() => {\n this.ongoingCheckForUpdate = null;\n });\n return this.ongoingCheckForUpdate;\n }\n\n /**\n * Updates the current client (i.e. browser tab) to the latest version that is ready for\n * activation.\n *\n * In most cases, you should not use this method and instead should update a client by reloading\n * the page.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Updating a client without reloading can easily result in a broken application due to a version\n * mismatch between the application shell and other page resources,\n * such as lazy-loaded chunks, whose filenames may change between\n * versions.\n *\n * Only use this method, if you are certain it is safe for your specific use case.\n *\n * </div>\n *\n * @returns a promise that\n * - resolves to `true` if an update was activated successfully\n * - resolves to `false` if no update was available (for example, the client was already on the\n * latest version).\n * - rejects if any error occurs\n */\n activateUpdate(): Promise<boolean> {\n if (!this.sw.isEnabled) {\n return Promise.reject(\n new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n ),\n );\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('ACTIVATE_UPDATE', {nonce}, nonce);\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 ApplicationRef,\n EnvironmentProviders,\n inject,\n InjectionToken,\n Injector,\n makeEnvironmentProviders,\n NgZone,\n provideAppInitializer,\n ɵRuntimeError as RuntimeError,\n ɵformatRuntimeError as formatRuntimeError,\n} from '@angular/core';\nimport type {Observable} from 'rxjs';\n\nimport {NgswCommChannel} from './low_level';\nimport {SwPush} from './push';\nimport {SwUpdate} from './update';\nimport {RuntimeErrorCode} from './errors';\n\nexport const SCRIPT = new InjectionToken<string>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGSW_REGISTER_SCRIPT' : '',\n);\n\nexport function ngswAppInitializer(): void {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return;\n }\n\n const options = inject(SwRegistrationOptions);\n\n if (!('serviceWorker' in navigator && options.enabled !== false)) {\n return;\n }\n\n const script = inject(SCRIPT);\n const ngZone = inject(NgZone);\n const appRef = inject(ApplicationRef);\n\n // Set up the `controllerchange` event listener outside of\n // the Angular zone to avoid unnecessary change detections,\n // as this event has no impact on view updates.\n ngZone.runOutsideAngular(() => {\n // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n // becomes active. This allows the SW to initialize itself even if there is no application\n // traffic.\n const sw = navigator.serviceWorker;\n const onControllerChange = () => sw.controller?.postMessage({action: 'INITIALIZE'});\n\n sw.addEventListener('controllerchange', onControllerChange);\n\n appRef.onDestroy(() => {\n sw.removeEventListener('controllerchange', onControllerChange);\n });\n });\n\n // Run outside the Angular zone to avoid preventing the app from stabilizing (especially\n // given that some registration strategies wait for the app to stabilize).\n ngZone.runOutsideAngular(() => {\n let readyToRegister: Promise<void>;\n\n const {registrationStrategy} = options;\n if (typeof registrationStrategy === 'function') {\n readyToRegister = new Promise((resolve) => registrationStrategy().subscribe(() => resolve()));\n } else {\n const [strategy, ...args] = (registrationStrategy || 'registerWhenStable:30000').split(':');\n\n switch (strategy) {\n case 'registerImmediately':\n readyToRegister = Promise.resolve();\n break;\n case 'registerWithDelay':\n readyToRegister = delayWithTimeout(+args[0] || 0);\n break;\n case 'registerWhenStable':\n readyToRegister = Promise.race([appRef.whenStable(), delayWithTimeout(+args[0])]);\n break;\n default:\n // Unknown strategy.\n throw new RuntimeError(\n RuntimeErrorCode.UNKNOWN_REGISTRATION_STRATEGY,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`,\n );\n }\n }\n\n // Don't return anything to avoid blocking the application until the SW is registered.\n // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n readyToRegister.then(() => {\n // If the registration strategy has resolved after the application has\n // been explicitly destroyed by the user (e.g., by navigating away to\n // another application), we simply should not register the worker.\n if (appRef.destroyed) {\n return;\n }\n\n navigator.serviceWorker\n .register(script, {\n scope: options.scope,\n updateViaCache: options.updateViaCache,\n type: options.type,\n })\n .catch((err) =>\n console.error(\n formatRuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_REGISTRATION_FAILED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Service worker registration failed with: ' + err,\n ),\n ),\n );\n });\n });\n}\n\nfunction delayWithTimeout(timeout: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, timeout));\n}\n\nexport function ngswCommChannelFactory(): NgswCommChannel {\n const opts = inject(SwRegistrationOptions);\n const injector = inject(Injector);\n const isBrowser = !(typeof ngServerMode !== 'undefined' && ngServerMode);\n\n return new NgswCommChannel(\n isBrowser && opts.enabled !== false ? navigator.serviceWorker : undefined,\n injector,\n );\n}\n\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n * header=\"app.module.ts\"}\n *\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n * @publicApi\n */\nexport abstract class SwRegistrationOptions {\n /**\n * Whether the ServiceWorker will be registered and the related services (such as `SwPush` and\n * `SwUpdate`) will attempt to communicate and interact with it.\n *\n * Default: true\n */\n enabled?: boolean;\n\n /**\n * The value of the setting used to determine the circumstances in which the browser\n * will consult the HTTP cache when it tries to update the service worker or any scripts that are imported via importScripts().\n * [ServiceWorkerRegistration.updateViaCache](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache)\n */\n updateViaCache?: ServiceWorkerUpdateViaCache;\n\n /**\n * The type of the ServiceWorker script to register.\n * [ServiceWorkerRegistration#type](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register#type)\n * - `classic`: Registers the script as a classic worker. ES module features such as `import` and `export` are NOT allowed in the script.\n * - `module`: Registers the script as an ES module. Allows use of `import`/`export` syntax and module features.\n *\n * @default 'classic'\n */\n type?: WorkerType;\n\n /**\n * A URL that defines the ServiceWorker's registration scope; that is, what range of URLs it can\n * control. It will be used when calling\n * [ServiceWorkerContainer#register()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n */\n scope?: string;\n\n /**\n * Defines the ServiceWorker registration strategy, which determines when it will be registered\n * with the browser.\n *\n * The default behavior of registering once the application stabilizes (i.e. as soon as there are\n * no pending micro- and macro-tasks) is designed to register the ServiceWorker as soon as\n * possible but without affecting the application's first time load.\n *\n * Still, there might be cases where you want more control over when the ServiceWorker is\n * registered (for example, there might be a long-running timeout or polling interval, preventing\n * the app from stabilizing). The available option are:\n *\n * - `registerWhenStable:<timeout>`: Register as soon as the application stabilizes (no pending\n * micro-/macro-tasks) but no later than `<timeout>` milliseconds. If the app hasn't\n * stabilized after `<timeout>` milliseconds (for example, due to a recurrent asynchronous\n * task), the ServiceWorker will be registered anyway.\n * If `<timeout>` is omitted, the ServiceWorker will only be registered once the app\n * stabilizes.\n * - `registerImmediately`: Register immediately.\n * - `registerWithDelay:<timeout>`: Register with a delay of `<timeout>` milliseconds. For\n * example, use `registerWithDelay:5000` to register the ServiceWorker after 5 seconds. If\n * `<timeout>` is omitted, is defaults to `0`, which will register the ServiceWorker as soon\n * as possible but still asynchronously, once all pending micro-tasks are completed.\n * - An Observable factory function: A function that returns an `Observable`.\n * The function will be used at runtime to obtain and subscribe to the `Observable` and the\n * ServiceWorker will be registered as soon as the first value is emitted.\n *\n * Default: 'registerWhenStable:30000'\n */\n registrationStrategy?: string | (() => Observable<unknown>);\n}\n\n/**\n * @publicApi\n *\n * Sets up providers to register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n *\n * Example usage:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideServiceWorker('ngsw-worker.js')\n * ],\n * });\n * ```\n *\n * @see [Custom service worker script](ecosystem/service-workers/custom-service-worker-scripts)\n *\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n */\nexport function provideServiceWorker(\n script: string,\n options: SwRegistrationOptions = {},\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n SwPush,\n SwUpdate,\n {provide: SCRIPT, useValue: script},\n {provide: SwRegistrationOptions, useValue: options},\n {\n provide: NgswCommChannel,\n useFactory: ngswCommChannelFactory,\n },\n provideAppInitializer(ngswAppInitializer),\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 {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {provideServiceWorker, SwRegistrationOptions} from './provider';\nimport {SwPush} from './push';\nimport {SwUpdate} from './update';\n\n/**\n *\n * @see [Custom service worker script](ecosystem/service-workers/custom-service-worker-scripts)\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n * @publicApi\n */\n@NgModule({providers: [SwPush, SwUpdate]})\nexport class ServiceWorkerModule {\n /**\n * Register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n */\n static register(\n script: string,\n options: SwRegistrationOptions = {},\n ): ModuleWithProviders<ServiceWorkerModule> {\n return {\n ngModule: ServiceWorkerModule,\n providers: [provideServiceWorker(script, options)],\n };\n }\n}\n"],"names":["ERR_SW_NOT_SUPPORTED","NgswCommChannel","serviceWorker","worker","registration","events","constructor","injector","Observable","subscriber","error","RuntimeError","ngDevMode","currentWorker","workerSubject","Subject","next","subscribe","v","updateController","controller","addEventListener","pipe","switchMap","getRegistration","then","_events","asObservable","messageListener","event","data","type","appRef","get","ApplicationRef","optional","onDestroy","removeEventListener","postMessage","action","payload","Promise","resolve","take","sw","postMessageWithOperation","operationNonce","waitForOperationCompleted","all","result","generateNonce","Math","round","random","eventsOfType","filterFn","includes","filter","nextEventOfType","nonce","reject","map","undefined","Error","isEnabled","SwPush","messages","notificationClicks","notificationCloses","pushSubscriptionChanges","subscription","pushManager","subscriptionChanges","NEVER","message","workerDrivenSubscriptions","pm","getSubscription","workerDrivenSubscription","unsubscribe","requestSubscription","options","pushOptions","userVisibleOnly","key","decodeBase64","serverPublicKey","replace","applicationServerKey","Uint8Array","ArrayBuffer","length","i","charCodeAt","sub","doUnsubscribe","success","input","atob","deps","token","i1","target","i0","ɵɵFactoryTarget","Injectable","decorators","SwUpdate","versionUpdates","unrecoverable","ongoingCheckForUpdate","checkForUpdate","finally","activateUpdate","SCRIPT","InjectionToken","ngswAppInitializer","ngServerMode","inject","SwRegistrationOptions","navigator","enabled","script","ngZone","NgZone","runOutsideAngular","onControllerChange","readyToRegister","registrationStrategy","strategy","args","split","delayWithTimeout","race","whenStable","destroyed","register","scope","updateViaCache","catch","err","console","formatRuntimeError","timeout","setTimeout","ngswCommChannelFactory","opts","Injector","isBrowser","provideServiceWorker","makeEnvironmentProviders","provide","useValue","useFactory","provideAppInitializer","ServiceWorkerModule","ngModule","providers","NgModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","ngImport"],"mappings":";;;;;;;;;;;AAcO,MAAMA,oBAAoB,GAAG,+DAA+D;MAuHtFC,eAAe,CAAA;EAQhBC,aAAA;EAPDC,MAAM;EAENC,YAAY;EAEZC,MAAM;AAEfC,EAAAA,WAAAA,CACUJ,aAAiD,EACzDK,QAAmB,EAAA;IADX,IAAA,CAAAL,aAAa,GAAbA,aAAa;IAGrB,IAAI,CAACA,aAAa,EAAE;AAClB,MAAA,IAAI,CAACC,MAAM,GACT,IAAI,CAACE,MAAM,GACX,IAAI,CAACD,YAAY,GACf,IAAII,UAAU,CAASC,UAAU,IAC/BA,UAAU,CAACC,KAAK,CACd,IAAIC,aAAY,CAAA,IAAA,EAEd,CAAC,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,KAAKZ,oBAAoB,CACxE,CACF,CACF;AACP,IAAA,CAAA,MAAO;MACL,IAAIa,aAAa,GAAyB,IAAI;AAC9C,MAAA,MAAMC,aAAa,GAAG,IAAIC,OAAO,EAAiB;AAClD,MAAA,IAAI,CAACZ,MAAM,GAAG,IAAIK,UAAU,CAAEC,UAAU,IAAI;QAC1C,IAAII,aAAa,KAAK,IAAI,EAAE;AAC1BJ,UAAAA,UAAU,CAACO,IAAI,CAACH,aAAa,CAAC;AAChC,QAAA;AACA,QAAA,OAAOC,aAAa,CAACG,SAAS,CAAEC,CAAC,IAAKT,UAAU,CAACO,IAAI,CAACE,CAAC,CAAC,CAAC;AAC3D,MAAA,CAAC,CAAC;MACF,MAAMC,gBAAgB,GAAGA,MAAK;QAC5B,MAAM;AAACC,UAAAA;AAAU,SAAC,GAAGlB,aAAa;QAClC,IAAIkB,UAAU,KAAK,IAAI,EAAE;AACvB,UAAA;AACF,QAAA;AACAP,QAAAA,aAAa,GAAGO,UAAU;AAC1BN,QAAAA,aAAa,CAACE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IAAAA,OAAO,EAAEtJ,eAAe;AACxBwJ,IAAAA,UAAU,EAAER;AACb,GAAA,EACDS,qBAAqB,CAACtC,kBAAkB,CAAC,CAC1C,CAAC;AACJ;;MCxOauC,mBAAmB,CAAA;EAO9B,OAAOnB,QAAQA,CACbd,MAAc,EACdzC,UAAiC,EAAE,EAAA;IAEnC,OAAO;AACL2E,MAAAA,QAAQ,EAAED,mBAAmB;AAC7BE,MAAAA,SAAS,EAAE,CAACR,oBAAoB,CAAC3B,MAAM,EAAEzC,OAAO,CAAC;KAClD;AACH,EAAA;;;;;UAfW0E,mBAAmB;AAAAxD,IAAAA,IAAA,EAAA,EAAA;AAAAG,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAsD;AAAA,GAAA,CAAA;;;;;UAAnBH;AAAmB,GAAA,CAAA;AAAnB,EAAA,OAAAI,IAAA,GAAAxD,EAAA,CAAAyD,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,mBAAA;AAAAC,IAAAA,QAAA,EAAA5D,EAAA;AAAAxE,IAAAA,IAAA,EAAA4H,mBAAmB;AAAAE,IAAAA,SAAA,EADV,CAAC5F,MAAM,EAAE0C,QAAQ;AAAC,GAAA,CAAA;;;;;;QAC3BgD,mBAAmB;AAAAjD,EAAAA,UAAA,EAAA,CAAA;UAD/BoD,QAAQ;AAAC5B,IAAAA,IAAA,EAAA,CAAA;AAAC2B,MAAAA,SAAS,EAAE,CAAC5F,MAAM,EAAE0C,QAAQ;KAAE;;;;;;"} | ||
| {"version":3,"file":"service-worker.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/low_level.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/push.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/update.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/src/provider.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/service-worker/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 {ApplicationRef, type Injector, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {filter, map, switchMap, take} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\n\nexport const ERR_SW_NOT_SUPPORTED = 'Service workers are disabled or not supported by this browser';\n\n/**\n * An event emitted when the service worker has checked the version of the app on the server and it\n * didn't find a new version that it doesn't have already downloaded.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface NoNewVersionDetectedEvent {\n type: 'NO_NEW_VERSION_DETECTED';\n version: {hash: string; appData?: Object};\n}\n\n/**\n * An event emitted when the service worker has detected a new version of the app on the server and\n * is about to start downloading it.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface VersionDetectedEvent {\n type: 'VERSION_DETECTED';\n version: {hash: string; appData?: object};\n}\n\n/**\n * An event emitted when the installation of a new version failed.\n * It may be used for logging/monitoring purposes.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n *a\n * @publicApi\n */\nexport interface VersionInstallationFailedEvent {\n type: 'VERSION_INSTALLATION_FAILED';\n version: {hash: string; appData?: object};\n error: string;\n}\n\n/**\n * An event emitted when a new version of the app is available.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n\n *\n * @publicApi\n */\nexport interface VersionReadyEvent {\n type: 'VERSION_READY';\n currentVersion: {hash: string; appData?: object};\n latestVersion: {hash: string; appData?: object};\n}\n\n/**\n * A union of all event types that can be emitted by\n * {@link SwUpdate#versionUpdates}.\n *\n * @publicApi\n */\nexport type VersionEvent =\n | VersionDetectedEvent\n | VersionInstallationFailedEvent\n | VersionReadyEvent\n | NoNewVersionDetectedEvent;\n\n/**\n * An event emitted when the version of the app used by the service worker to serve this client is\n * in a broken state that cannot be recovered from and a full page reload is required.\n *\n * For example, the service worker may not be able to retrieve a required resource, neither from the\n * cache nor from the server. This could happen if a new version is deployed to the server and the\n * service worker cache has been partially cleaned by the browser, removing some files of a previous\n * app version but not all.\n *\n * @see [Handling an unrecoverable state](ecosystem/service-workers/communications#handling-an-unrecoverable-state)\n\n *\n * @publicApi\n */\nexport interface UnrecoverableStateEvent {\n type: 'UNRECOVERABLE_STATE';\n reason: string;\n}\n\n/**\n * An event emitted when a `PushEvent` is received by the service worker.\n */\nexport interface PushEvent {\n type: 'PUSH';\n data: any;\n}\n\nexport type IncomingEvent = UnrecoverableStateEvent | VersionEvent;\n\nexport interface TypedEvent {\n type: string;\n}\n\ntype OperationCompletedEvent =\n | {\n type: 'OPERATION_COMPLETED';\n nonce: number;\n result: boolean;\n }\n | {\n type: 'OPERATION_COMPLETED';\n nonce: number;\n result?: undefined;\n error: string;\n };\n\n/**\n * @publicApi\n */\nexport class NgswCommChannel {\n readonly worker: Observable<ServiceWorker>;\n\n readonly registration: Observable<ServiceWorkerRegistration>;\n\n readonly events: Observable<TypedEvent>;\n\n constructor(\n private serviceWorker: ServiceWorkerContainer | undefined,\n injector?: Injector,\n ) {\n if (!serviceWorker) {\n this.worker =\n this.events =\n this.registration =\n new Observable<never>((subscriber) =>\n subscriber.error(\n new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n ),\n ),\n );\n } else {\n let currentWorker: ServiceWorker | null = null;\n const workerSubject = new Subject<ServiceWorker>();\n this.worker = new Observable((subscriber) => {\n if (currentWorker !== null) {\n subscriber.next(currentWorker);\n }\n return workerSubject.subscribe((v) => subscriber.next(v));\n });\n const updateController = () => {\n const {controller} = serviceWorker;\n if (controller === null) {\n return;\n }\n currentWorker = controller;\n workerSubject.next(currentWorker);\n };\n serviceWorker.addEventListener('controllerchange', updateController);\n updateController();\n\n this.registration = this.worker.pipe(\n switchMap(() =>\n serviceWorker.getRegistration().then((registration) => {\n // The `getRegistration()` method may return undefined in\n // non-secure contexts or incognito mode, where service worker\n // registration might not be allowed.\n if (!registration) {\n throw new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n );\n }\n\n return registration;\n }),\n ),\n );\n\n const _events = new Subject<TypedEvent>();\n this.events = _events.asObservable();\n\n const messageListener = (event: MessageEvent) => {\n const {data} = event;\n if (data?.type) {\n _events.next(data);\n }\n };\n serviceWorker.addEventListener('message', messageListener);\n\n // The injector is optional to avoid breaking changes.\n const appRef = injector?.get(ApplicationRef, null, {optional: true});\n appRef?.onDestroy(() => {\n serviceWorker.removeEventListener('controllerchange', updateController);\n serviceWorker.removeEventListener('message', messageListener);\n });\n }\n }\n\n postMessage(action: string, payload: Object): Promise<void> {\n return new Promise<void>((resolve) => {\n this.worker.pipe(take(1)).subscribe((sw) => {\n sw.postMessage({\n action,\n ...payload,\n });\n\n resolve();\n });\n });\n }\n\n postMessageWithOperation(\n type: string,\n payload: Object,\n operationNonce: number,\n ): Promise<boolean> {\n const waitForOperationCompleted = this.waitForOperationCompleted(operationNonce);\n const postMessage = this.postMessage(type, payload);\n return Promise.all([postMessage, waitForOperationCompleted]).then(([, result]) => result);\n }\n\n generateNonce(): number {\n return Math.round(Math.random() * 10000000);\n }\n\n eventsOfType<T extends TypedEvent>(type: T['type'] | T['type'][]): Observable<T> {\n let filterFn: (event: TypedEvent) => event is T;\n if (typeof type === 'string') {\n filterFn = (event: TypedEvent): event is T => event.type === type;\n } else {\n filterFn = (event: TypedEvent): event is T => type.includes(event.type);\n }\n return this.events.pipe(filter(filterFn));\n }\n\n nextEventOfType<T extends TypedEvent>(type: T['type']): Observable<T> {\n return this.eventsOfType(type).pipe(take(1));\n }\n\n waitForOperationCompleted(nonce: number): Promise<boolean> {\n return new Promise<boolean>((resolve, reject) => {\n this.eventsOfType<OperationCompletedEvent>('OPERATION_COMPLETED')\n .pipe(\n filter((event) => event.nonce === nonce),\n take(1),\n map((event) => {\n if (event.result !== undefined) {\n return event.result;\n }\n throw new Error(event.error!);\n }),\n )\n .subscribe({\n next: resolve,\n error: reject,\n });\n });\n }\n\n get isEnabled(): boolean {\n return !!this.serviceWorker;\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 {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {NEVER, Observable, Subject} from 'rxjs';\nimport {map, switchMap, take} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\nimport {ERR_SW_NOT_SUPPORTED, NgswCommChannel, PushEvent} from './low_level';\n\n/**\n * Subscribe and listen to\n * [Web Push\n * Notifications](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices) through\n * Angular Service Worker.\n *\n * @usageNotes\n *\n * You can inject a `SwPush` instance into any component or service\n * as a dependency.\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"inject-sw-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * To subscribe, call `SwPush.requestSubscription()`, which asks the user for permission.\n * The call returns a `Promise` with a new\n * [`PushSubscription`](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * instance.\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"subscribe-to-push\"\n * header=\"app.component.ts\"></code-example>\n *\n * A request is rejected if the user denies permission, or if the browser\n * blocks or does not support the Push API or ServiceWorkers.\n * Check `SwPush.isEnabled` to confirm status.\n *\n * Invoke Push Notifications by pushing a message with the following payload.\n *\n * ```ts\n * {\n * \"notification\": {\n * \"actions\": NotificationAction[],\n * \"badge\": USVString,\n * \"body\": DOMString,\n * \"data\": any,\n * \"dir\": \"auto\"|\"ltr\"|\"rtl\",\n * \"icon\": USVString,\n * \"image\": USVString,\n * \"lang\": DOMString,\n * \"renotify\": boolean,\n * \"requireInteraction\": boolean,\n * \"silent\": boolean,\n * \"tag\": DOMString,\n * \"timestamp\": DOMTimeStamp,\n * \"title\": DOMString,\n * \"vibrate\": number[]\n * }\n * }\n * ```\n *\n * Only `title` is required. See `Notification`\n * [instance\n * properties](https://developer.mozilla.org/en-US/docs/Web/API/Notification#Instance_properties).\n *\n * While the subscription is active, Service Worker listens for\n * [PushEvent](https://developer.mozilla.org/en-US/docs/Web/API/PushEvent)\n * occurrences and creates\n * [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification)\n * instances in response.\n *\n * Unsubscribe using `SwPush.unsubscribe()`.\n *\n * An application can subscribe to `SwPush.notificationClicks` observable to be notified when a user\n * clicks on a notification. For example:\n *\n * <code-example path=\"service-worker/push/service_worker_component.ts\" region=\"subscribe-to-notification-clicks\"\n * header=\"app.component.ts\"></code-example>\n *\n * You can read more on handling notification clicks in the [Service worker notifications\n * guide](ecosystem/service-workers/push-notifications).\n *\n * @see [Push Notifications](https://developers.google.com/web/fundamentals/codelabs/push-notifications/)\n * @see [Angular Push Notifications](https://blog.angular-university.io/angular-push-notifications/)\n * @see [MDN: Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API)\n * @see [MDN: Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API)\n * @see [MDN: Web Push API Notifications best practices](https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Best_Practices)\n * @see [Push notifications guide](ecosystem/service-workers/push-notifications)\n *\n * @publicApi\n */\n@Injectable()\nexport class SwPush {\n /**\n * Emits the payloads of the received push notification messages.\n */\n readonly messages: Observable<object>;\n\n /**\n * Emits the payloads of the received push notification messages as well as the action the user\n * interacted with. If no action was used the `action` property contains an empty string `''`.\n *\n * Note that the `notification` property does **not** contain a\n * [Notification][Mozilla Notification] object but rather a\n * [NotificationOptions](https://notifications.spec.whatwg.org/#dictdef-notificationoptions)\n * object that also includes the `title` of the [Notification][Mozilla Notification] object.\n *\n * [Mozilla Notification]: https://developer.mozilla.org/en-US/docs/Web/API/Notification\n *\n * @see [Notification click handling](ecosystem/service-workers/push-notifications#notification-click-handling)\n *\n */\n readonly notificationClicks: Observable<{\n action: string;\n notification: NotificationOptions & {\n title: string;\n };\n }>;\n\n /**\n * Emits the payloads of notifications that were closed, along with the action (if any)\n * associated with the close event. If no action was used, the `action` property contains\n * an empty string `''`.\n *\n * Note that the `notification` property does **not** contain a\n * [Notification][Mozilla Notification] object but rather a\n * [NotificationOptions](https://notifications.spec.whatwg.org/#dictdef-notificationoptions)\n * object that also includes the `title` of the [Notification][Mozilla Notification] object.\n *\n * [Mozilla Notification]: https://developer.mozilla.org/en-US/docs/Web/API/Notification\n */\n readonly notificationCloses: Observable<{\n action: string;\n notification: NotificationOptions & {\n title: string;\n };\n }>;\n\n /**\n * Emits updates to the push subscription, including both the previous (`oldSubscription`)\n * and current (`newSubscription`) values. Either subscription may be `null`, depending on\n * the context:\n *\n * - `oldSubscription` is `null` if no previous subscription existed.\n * - `newSubscription` is `null` if the subscription was invalidated and not replaced.\n *\n * This stream allows clients to react to automatic changes in push subscriptions,\n * such as those triggered by browser expiration or key rotation.\n *\n * [Push API]: https://w3c.github.io/push-api\n */\n readonly pushSubscriptionChanges: Observable<{\n oldSubscription: PushSubscription | null;\n newSubscription: PushSubscription | null;\n }>;\n\n /**\n * Emits the currently active\n * [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription)\n * associated to the Service Worker registration or `null` if there is no subscription.\n */\n readonly subscription: Observable<PushSubscription | null>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n private pushManager: Observable<PushManager> | null = null;\n private subscriptionChanges = new Subject<PushSubscription | null>();\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.messages = NEVER;\n this.notificationClicks = NEVER;\n this.notificationCloses = NEVER;\n this.pushSubscriptionChanges = NEVER;\n this.subscription = NEVER;\n return;\n }\n\n this.messages = this.sw.eventsOfType<PushEvent>('PUSH').pipe(map((message) => message.data));\n\n this.notificationClicks = this.sw\n .eventsOfType('NOTIFICATION_CLICK')\n .pipe(map((message: any) => message.data));\n\n this.notificationCloses = this.sw\n .eventsOfType('NOTIFICATION_CLOSE')\n .pipe(map((message: any) => message.data));\n\n this.pushSubscriptionChanges = this.sw\n .eventsOfType('PUSH_SUBSCRIPTION_CHANGE')\n .pipe(map((message: any) => message.data));\n\n this.pushManager = this.sw.registration.pipe(\n map(\n (registration) =>\n (registration as ServiceWorkerRegistration & {pushManager: PushManager}).pushManager,\n ),\n );\n\n const workerDrivenSubscriptions = this.pushManager.pipe(\n switchMap((pm) => pm.getSubscription()),\n );\n this.subscription = new Observable((subscriber) => {\n const workerDrivenSubscription = workerDrivenSubscriptions.subscribe(subscriber);\n const subscriptionChanges = this.subscriptionChanges.subscribe(subscriber);\n return () => {\n workerDrivenSubscription.unsubscribe();\n subscriptionChanges.unsubscribe();\n };\n });\n }\n\n /**\n * Subscribes to Web Push Notifications,\n * after requesting and receiving user permission.\n *\n * @param options An object containing the `serverPublicKey` string.\n * @returns A Promise that resolves to the new subscription object.\n */\n requestSubscription(options: {serverPublicKey: string}): Promise<PushSubscription> {\n if (!this.sw.isEnabled || this.pushManager === null) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n const pushOptions: PushSubscriptionOptionsInit = {userVisibleOnly: true};\n let key = this.decodeBase64(options.serverPublicKey.replace(/_/g, '/').replace(/-/g, '+'));\n let applicationServerKey = new Uint8Array(new ArrayBuffer(key.length));\n for (let i = 0; i < key.length; i++) {\n applicationServerKey[i] = key.charCodeAt(i);\n }\n pushOptions.applicationServerKey = applicationServerKey;\n\n return new Promise((resolve, reject) => {\n this.pushManager!.pipe(\n switchMap((pm) => pm.subscribe(pushOptions)),\n take(1),\n ).subscribe({\n next: (sub) => {\n this.subscriptionChanges.next(sub);\n resolve(sub);\n },\n error: reject,\n });\n });\n }\n\n /**\n * Unsubscribes from Service Worker push notifications.\n *\n * @returns A Promise that is resolved when the operation succeeds, or is rejected if there is no\n * active subscription or the unsubscribe operation fails.\n */\n unsubscribe(): Promise<void> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n\n const doUnsubscribe = (sub: PushSubscription | null) => {\n if (sub === null) {\n throw new RuntimeError(\n RuntimeErrorCode.NOT_SUBSCRIBED_TO_PUSH_NOTIFICATIONS,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Not subscribed to push notifications.',\n );\n }\n\n return sub.unsubscribe().then((success) => {\n if (!success) {\n throw new RuntimeError(\n RuntimeErrorCode.PUSH_SUBSCRIPTION_UNSUBSCRIBE_FAILED,\n (typeof ngDevMode === 'undefined' || ngDevMode) && 'Unsubscribe failed!',\n );\n }\n\n this.subscriptionChanges.next(null);\n });\n };\n\n return new Promise((resolve, reject) => {\n this.subscription\n .pipe(take(1), switchMap(doUnsubscribe))\n .subscribe({next: resolve, error: reject});\n });\n }\n\n private decodeBase64(input: string): string {\n return atob(input);\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 {Injectable, ɵRuntimeError as RuntimeError} from '@angular/core';\nimport {NEVER, Observable} from 'rxjs';\n\nimport {RuntimeErrorCode} from './errors';\nimport {\n ERR_SW_NOT_SUPPORTED,\n NgswCommChannel,\n UnrecoverableStateEvent,\n VersionEvent,\n} from './low_level';\n\n/**\n * Subscribe to update notifications from the Service Worker, trigger update\n * checks, and forcibly activate updates.\n *\n * @see {@link /ecosystem/service-workers/communications Service Worker Communication Guide}\n *\n * @publicApi\n */\n@Injectable()\nexport class SwUpdate {\n /**\n * Emits a `VersionDetectedEvent` event whenever a new version is detected on the server.\n *\n * Emits a `VersionInstallationFailedEvent` event whenever checking for or downloading a new\n * version fails.\n *\n * Emits a `VersionReadyEvent` event whenever a new version has been downloaded and is ready for\n * activation.\n *\n * @see [Version updates](ecosystem/service-workers/communications#version-updates)\n *\n */\n readonly versionUpdates: Observable<VersionEvent>;\n\n /**\n * Emits an `UnrecoverableStateEvent` event whenever the version of the app used by the service\n * worker to serve this client is in a broken state that cannot be recovered from without a full\n * page reload.\n */\n readonly unrecoverable: Observable<UnrecoverableStateEvent>;\n\n /**\n * True if the Service Worker is enabled (supported by the browser and enabled via\n * `ServiceWorkerModule`).\n */\n get isEnabled(): boolean {\n return this.sw.isEnabled;\n }\n\n private ongoingCheckForUpdate: Promise<boolean> | null = null;\n\n constructor(private sw: NgswCommChannel) {\n if (!sw.isEnabled) {\n this.versionUpdates = NEVER;\n this.unrecoverable = NEVER;\n return;\n }\n this.versionUpdates = this.sw.eventsOfType<VersionEvent>([\n 'VERSION_DETECTED',\n 'VERSION_INSTALLATION_FAILED',\n 'VERSION_READY',\n 'NO_NEW_VERSION_DETECTED',\n ]);\n this.unrecoverable = this.sw.eventsOfType<UnrecoverableStateEvent>('UNRECOVERABLE_STATE');\n }\n\n /**\n * Checks for an update and waits until the new version is downloaded from the server and ready\n * for activation.\n *\n * @returns a promise that\n * - resolves to `true` if a new version was found and is ready to be activated.\n * - resolves to `false` if no new version was found\n * - rejects if any error occurs\n */\n checkForUpdate(): Promise<boolean> {\n if (!this.sw.isEnabled) {\n return Promise.reject(new Error(ERR_SW_NOT_SUPPORTED));\n }\n if (this.ongoingCheckForUpdate) {\n return this.ongoingCheckForUpdate;\n }\n const nonce = this.sw.generateNonce();\n this.ongoingCheckForUpdate = this.sw\n .postMessageWithOperation('CHECK_FOR_UPDATES', {nonce}, nonce)\n .finally(() => {\n this.ongoingCheckForUpdate = null;\n });\n return this.ongoingCheckForUpdate;\n }\n\n /**\n * Updates the current client (i.e. browser tab) to the latest version that is ready for\n * activation.\n *\n * In most cases, you should not use this method and instead should update a client by reloading\n * the page.\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * Updating a client without reloading can easily result in a broken application due to a version\n * mismatch between the application shell and other page resources,\n * such as lazy-loaded chunks, whose filenames may change between\n * versions.\n *\n * Only use this method, if you are certain it is safe for your specific use case.\n *\n * </div>\n *\n * @returns a promise that\n * - resolves to `true` if an update was activated successfully\n * - resolves to `false` if no update was available (for example, the client was already on the\n * latest version).\n * - rejects if any error occurs\n */\n activateUpdate(): Promise<boolean> {\n if (!this.sw.isEnabled) {\n return Promise.reject(\n new RuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_DISABLED_OR_NOT_SUPPORTED_BY_THIS_BROWSER,\n (typeof ngDevMode === 'undefined' || ngDevMode) && ERR_SW_NOT_SUPPORTED,\n ),\n );\n }\n const nonce = this.sw.generateNonce();\n return this.sw.postMessageWithOperation('ACTIVATE_UPDATE', {nonce}, nonce);\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 ApplicationRef,\n EnvironmentProviders,\n inject,\n InjectionToken,\n Injector,\n makeEnvironmentProviders,\n NgZone,\n provideAppInitializer,\n ɵRuntimeError as RuntimeError,\n ɵformatRuntimeError as formatRuntimeError,\n} from '@angular/core';\nimport type {Observable} from 'rxjs';\n\nimport {NgswCommChannel} from './low_level';\nimport {SwPush} from './push';\nimport {SwUpdate} from './update';\nimport {RuntimeErrorCode} from './errors';\n\nexport const SCRIPT = new InjectionToken<string>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'NGSW_REGISTER_SCRIPT' : '',\n);\n\nexport function ngswAppInitializer(): void {\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n return;\n }\n\n const options = inject(SwRegistrationOptions);\n\n if (!('serviceWorker' in navigator && options.enabled !== false)) {\n return;\n }\n\n const script = inject(SCRIPT);\n const ngZone = inject(NgZone);\n const appRef = inject(ApplicationRef);\n\n // Set up the `controllerchange` event listener outside of\n // the Angular zone to avoid unnecessary change detections,\n // as this event has no impact on view updates.\n ngZone.runOutsideAngular(() => {\n // Wait for service worker controller changes, and fire an INITIALIZE action when a new SW\n // becomes active. This allows the SW to initialize itself even if there is no application\n // traffic.\n const sw = navigator.serviceWorker;\n const onControllerChange = () => sw.controller?.postMessage({action: 'INITIALIZE'});\n\n sw.addEventListener('controllerchange', onControllerChange);\n\n appRef.onDestroy(() => {\n sw.removeEventListener('controllerchange', onControllerChange);\n });\n });\n\n // Run outside the Angular zone to avoid preventing the app from stabilizing (especially\n // given that some registration strategies wait for the app to stabilize).\n ngZone.runOutsideAngular(() => {\n let readyToRegister: Promise<void>;\n\n const {registrationStrategy} = options;\n if (typeof registrationStrategy === 'function') {\n readyToRegister = new Promise((resolve) => registrationStrategy().subscribe(() => resolve()));\n } else {\n const [strategy, ...args] = (registrationStrategy || 'registerWhenStable:30000').split(':');\n\n switch (strategy) {\n case 'registerImmediately':\n readyToRegister = Promise.resolve();\n break;\n case 'registerWithDelay':\n readyToRegister = delayWithTimeout(+args[0] || 0);\n break;\n case 'registerWhenStable':\n readyToRegister = Promise.race([appRef.whenStable(), delayWithTimeout(+args[0])]);\n break;\n default:\n // Unknown strategy.\n throw new RuntimeError(\n RuntimeErrorCode.UNKNOWN_REGISTRATION_STRATEGY,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n `Unknown ServiceWorker registration strategy: ${options.registrationStrategy}`,\n );\n }\n }\n\n // Don't return anything to avoid blocking the application until the SW is registered.\n // Catch and log the error if SW registration fails to avoid uncaught rejection warning.\n readyToRegister.then(() => {\n // If the registration strategy has resolved after the application has\n // been explicitly destroyed by the user (e.g., by navigating away to\n // another application), we simply should not register the worker.\n if (appRef.destroyed) {\n return;\n }\n\n navigator.serviceWorker\n .register(script, {\n scope: options.scope,\n updateViaCache: options.updateViaCache,\n type: options.type,\n })\n .catch((err) =>\n console.error(\n formatRuntimeError(\n RuntimeErrorCode.SERVICE_WORKER_REGISTRATION_FAILED,\n (typeof ngDevMode === 'undefined' || ngDevMode) &&\n 'Service worker registration failed with: ' + err,\n ),\n ),\n );\n });\n });\n}\n\nfunction delayWithTimeout(timeout: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, timeout));\n}\n\nexport function ngswCommChannelFactory(): NgswCommChannel {\n const opts = inject(SwRegistrationOptions);\n const injector = inject(Injector);\n const isBrowser = !(typeof ngServerMode !== 'undefined' && ngServerMode);\n\n return new NgswCommChannel(\n isBrowser && opts.enabled !== false ? navigator.serviceWorker : undefined,\n injector,\n );\n}\n\n/**\n * Token that can be used to provide options for `ServiceWorkerModule` outside of\n * `ServiceWorkerModule.register()`.\n *\n * You can use this token to define a provider that generates the registration options at runtime,\n * for example via a function call:\n *\n * {@example service-worker/registration-options/module.ts region=\"registration-options\"\n * header=\"app.module.ts\"}\n *\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n * @publicApi\n */\nexport abstract class SwRegistrationOptions {\n /**\n * Whether the ServiceWorker will be registered and the related services (such as `SwPush` and\n * `SwUpdate`) will attempt to communicate and interact with it.\n *\n * Default: true\n */\n enabled?: boolean;\n\n /**\n * The value of the setting used to determine the circumstances in which the browser\n * will consult the HTTP cache when it tries to update the service worker or any scripts that are imported via importScripts().\n * [ServiceWorkerRegistration.updateViaCache](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache)\n */\n updateViaCache?: ServiceWorkerUpdateViaCache;\n\n /**\n * The type of the ServiceWorker script to register.\n * [ServiceWorkerRegistration#type](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register#type)\n * - `classic`: Registers the script as a classic worker. ES module features such as `import` and `export` are NOT allowed in the script.\n * - `module`: Registers the script as an ES module. Allows use of `import`/`export` syntax and module features.\n *\n * @default 'classic'\n */\n type?: WorkerType;\n\n /**\n * A URL that defines the ServiceWorker's registration scope; that is, what range of URLs it can\n * control. It will be used when calling\n * [ServiceWorkerContainer#register()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n */\n scope?: string;\n\n /**\n * Defines the ServiceWorker registration strategy, which determines when it will be registered\n * with the browser.\n *\n * The default behavior of registering once the application stabilizes (i.e. as soon as there are\n * no pending micro- and macro-tasks) is designed to register the ServiceWorker as soon as\n * possible but without affecting the application's first time load.\n *\n * Still, there might be cases where you want more control over when the ServiceWorker is\n * registered (for example, there might be a long-running timeout or polling interval, preventing\n * the app from stabilizing). The available option are:\n *\n * - `registerWhenStable:<timeout>`: Register as soon as the application stabilizes (no pending\n * micro-/macro-tasks) but no later than `<timeout>` milliseconds. If the app hasn't\n * stabilized after `<timeout>` milliseconds (for example, due to a recurrent asynchronous\n * task), the ServiceWorker will be registered anyway.\n * If `<timeout>` is omitted, the ServiceWorker will only be registered once the app\n * stabilizes.\n * - `registerImmediately`: Register immediately.\n * - `registerWithDelay:<timeout>`: Register with a delay of `<timeout>` milliseconds. For\n * example, use `registerWithDelay:5000` to register the ServiceWorker after 5 seconds. If\n * `<timeout>` is omitted, is defaults to `0`, which will register the ServiceWorker as soon\n * as possible but still asynchronously, once all pending micro-tasks are completed.\n * - An Observable factory function: A function that returns an `Observable`.\n * The function will be used at runtime to obtain and subscribe to the `Observable` and the\n * ServiceWorker will be registered as soon as the first value is emitted.\n *\n * Default: 'registerWhenStable:30000'\n */\n registrationStrategy?: string | (() => Observable<unknown>);\n}\n\n/**\n * @publicApi\n *\n * Sets up providers to register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n *\n * Example usage:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideServiceWorker('ngsw-worker.js')\n * ],\n * });\n * ```\n *\n * @see [Custom service worker script](ecosystem/service-workers/custom-service-worker-scripts)\n *\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n */\nexport function provideServiceWorker(\n script: string,\n options: SwRegistrationOptions = {},\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n SwPush,\n SwUpdate,\n {provide: SCRIPT, useValue: script},\n {provide: SwRegistrationOptions, useValue: options},\n {\n provide: NgswCommChannel,\n useFactory: ngswCommChannelFactory,\n },\n provideAppInitializer(ngswAppInitializer),\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 {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {provideServiceWorker, SwRegistrationOptions} from './provider';\nimport {SwPush} from './push';\nimport {SwUpdate} from './update';\n\n/**\n *\n * @see [Custom service worker script](ecosystem/service-workers/custom-service-worker-scripts)\n * @see [Service worker configuration](ecosystem/service-workers/getting-started#service-worker-configuration)\n *\n * @publicApi\n */\n@NgModule({providers: [SwPush, SwUpdate]})\nexport class ServiceWorkerModule {\n /**\n * Register the given Angular Service Worker script.\n *\n * If `enabled` is set to `false` in the given options, the module will behave as if service\n * workers are not supported by the browser, and the service worker will not be registered.\n */\n static register(\n script: string,\n options: SwRegistrationOptions = {},\n ): ModuleWithProviders<ServiceWorkerModule> {\n return {\n ngModule: ServiceWorkerModule,\n providers: [provideServiceWorker(script, options)],\n };\n }\n}\n"],"names":["ERR_SW_NOT_SUPPORTED","NgswCommChannel","serviceWorker","worker","registration","events","constructor","injector","Observable","subscriber","error","RuntimeError","ngDevMode","currentWorker","workerSubject","Subject","next","subscribe","v","updateController","controller","addEventListener","pipe","switchMap","getRegistration","then","_events","asObservable","messageListener","event","data","type","appRef","get","ApplicationRef","optional","onDestroy","removeEventListener","postMessage","action","payload","Promise","resolve","take","sw","postMessageWithOperation","operationNonce","waitForOperationCompleted","all","result","generateNonce","Math","round","random","eventsOfType","filterFn","includes","filter","nextEventOfType","nonce","reject","map","undefined","Error","isEnabled","SwPush","messages","notificationClicks","notificationCloses","pushSubscriptionChanges","subscription","pushManager","subscriptionChanges","NEVER","message","workerDrivenSubscriptions","pm","getSubscription","workerDrivenSubscription","unsubscribe","requestSubscription","options","pushOptions","userVisibleOnly","key","decodeBase64","serverPublicKey","replace","applicationServerKey","Uint8Array","ArrayBuffer","length","i","charCodeAt","sub","doUnsubscribe","success","input","atob","deps","token","i1","target","i0","ɵɵFactoryTarget","Injectable","decorators","SwUpdate","versionUpdates","unrecoverable","ongoingCheckForUpdate","checkForUpdate","finally","activateUpdate","SCRIPT","InjectionToken","ngswAppInitializer","ngServerMode","inject","SwRegistrationOptions","navigator","enabled","script","ngZone","NgZone","runOutsideAngular","onControllerChange","readyToRegister","registrationStrategy","strategy","args","split","delayWithTimeout","race","whenStable","destroyed","register","scope","updateViaCache","catch","err","console","formatRuntimeError","timeout","setTimeout","ngswCommChannelFactory","opts","Injector","isBrowser","provideServiceWorker","makeEnvironmentProviders","provide","useValue","useFactory","provideAppInitializer","ServiceWorkerModule","ngModule","providers","NgModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","ngImport"],"mappings":";;;;;;;;;;;AAcO,MAAMA,oBAAoB,GAAG,+DAA+D;MAuHtFC,eAAe,CAAA;EAQhBC,aAAA;EAPDC,MAAM;EAENC,YAAY;EAEZC,MAAM;AAEfC,EAAAA,WAAAA,CACUJ,aAAiD,EACzDK,QAAmB,EAAA;IADX,IAAA,CAAAL,aAAa,GAAbA,aAAa;IAGrB,IAAI,CAACA,aAAa,EAAE;AAClB,MAAA,IAAI,CAACC,MAAM,GACT,IAAI,CAACE,MAAM,GACX,IAAI,CAACD,YAAY,GACf,IAAII,UAAU,CAASC,UAAU,IAC/BA,UAAU,CAACC,KAAK,CACd,IAAIC,aAAY,CAAA,IAAA,EAEd,CAAC,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,KAAKZ,oBAAoB,CACxE,CACF,CACF;AACP,IAAA,CAAA,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AA;AAAAC,IAAAA,QAAA,EAAA5D,EAAA;AAAAxE,IAAAA,IAAA,EAAA4H,mBAAmB;AAAAE,IAAAA,SAAA,EADV,CAAC5F,MAAM,EAAE0C,QAAQ;AAAC,GAAA,CAAA;;;;;;QAC3BgD,mBAAmB;AAAAjD,EAAAA,UAAA,EAAA,CAAA;UAD/BoD,QAAQ;AAAC5B,IAAAA,IAAA,EAAA,CAAA;AAAC2B,MAAAA,SAAS,EAAE,CAAC5F,MAAM,EAAE0C,QAAQ;KAAE;;;;;;"} |
+2
-2
| { | ||
| "name": "@angular/service-worker", | ||
| "version": "21.2.18", | ||
| "version": "21.2.19", | ||
| "description": "Angular - service worker tooling!", | ||
@@ -36,3 +36,3 @@ "author": "angular", | ||
| "peerDependencies": { | ||
| "@angular/core": "21.2.18", | ||
| "@angular/core": "21.2.19", | ||
| "rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -39,0 +39,0 @@ }, |
| /** | ||
| * @license Angular v21.2.18 | ||
| * @license Angular v21.2.19 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
| /** | ||
| * @license Angular v21.2.18 | ||
| * @license Angular v21.2.19 | ||
| * (c) 2010-2026 Google LLC. https://angular.dev/ | ||
@@ -4,0 +4,0 @@ * License: MIT |
Sorry, the diff of this file is too big to display
228520
-0.03%