fac6c8fc937c4d466e53660fc0f98a4a136df81b9d753c17537a9ee3b26fa9b9.json 57 KB

1
  1. {"ast":null,"code":"/**\n * @license Angular v16.2.1\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { EventEmitter, Injectable, InjectionToken, Inject, Optional } from '@angular/core';\nimport { LocationStrategy, Location } from '@angular/common';\nimport { Subject } from 'rxjs';\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * A spy for {@link Location} that allows tests to fire simulated location events.\n *\n * @publicApi\n */\nclass SpyLocation {\n constructor() {\n this.urlChanges = [];\n this._history = [new LocationState('', '', null)];\n this._historyIndex = 0;\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._basePath = '';\n /** @internal */\n this._locationStrategy = null;\n /** @internal */\n this._urlChangeListeners = [];\n /** @internal */\n this._urlChangeSubscription = null;\n }\n /** @nodoc */\n ngOnDestroy() {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n setInitialPath(url) {\n this._history[this._historyIndex].path = url;\n }\n setBaseHref(url) {\n this._basePath = url;\n }\n path() {\n return this._history[this._historyIndex].path;\n }\n getState() {\n return this._history[this._historyIndex].state;\n }\n isCurrentPathEqualTo(path, query = '') {\n const givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;\n const currPath = this.path().endsWith('/') ? this.path().substring(0, this.path().length - 1) : this.path();\n return currPath == givenPath + (query.length > 0 ? '?' + query : '');\n }\n simulateUrlPop(pathname) {\n this._subject.emit({\n 'url': pathname,\n 'pop': true,\n 'type': 'popstate'\n });\n }\n simulateHashChange(pathname) {\n const path = this.prepareExternalUrl(pathname);\n this.pushHistory(path, '', null);\n this.urlChanges.push('hash: ' + pathname);\n // the browser will automatically fire popstate event before each `hashchange` event, so we need\n // to simulate it.\n this._subject.emit({\n 'url': pathname,\n 'pop': true,\n 'type': 'popstate'\n });\n this._subject.emit({\n 'url': pathname,\n 'pop': true,\n 'type': 'hashchange'\n });\n }\n prepareExternalUrl(url) {\n if (url.length > 0 && !url.startsWith('/')) {\n url = '/' + url;\n }\n return this._basePath + url;\n }\n go(path, query = '', state = null) {\n path = this.prepareExternalUrl(path);\n this.pushHistory(path, query, state);\n const locationState = this._history[this._historyIndex - 1];\n if (locationState.path == path && locationState.query == query) {\n return;\n }\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push(url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n replaceState(path, query = '', state = null) {\n path = this.prepareExternalUrl(path);\n const history = this._history[this._historyIndex];\n history.state = state;\n if (history.path == path && history.query == query) {\n return;\n }\n history.path = path;\n history.query = query;\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push('replace: ' + url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n forward() {\n if (this._historyIndex < this._history.length - 1) {\n this._historyIndex++;\n this._subject.emit({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate'\n });\n }\n }\n back() {\n if (this._historyIndex > 0) {\n this._historyIndex--;\n this._subject.emit({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate'\n });\n }\n }\n historyGo(relativePosition = 0) {\n const nextPageIndex = this._historyIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this._history.length) {\n this._historyIndex = nextPageIndex;\n this._subject.emit({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate'\n });\n }\n }\n onUrlChange(fn) {\n this._urlChangeListeners.push(fn);\n if (!this._urlChangeSubscription) {\n this._urlChangeSubscription = this.subscribe(v => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n }\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n /** @internal */\n _notifyUrlChangeListeners(url = '', state) {\n this._urlChangeListeners.forEach(fn => fn(url, state));\n }\n subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({\n next: onNext,\n error: onThrow,\n complete: onReturn\n });\n }\n normalize(url) {\n return null;\n }\n pushHistory(path, query, state) {\n if (this._historyIndex > 0) {\n this._history.splice(this._historyIndex + 1);\n }\n this._history.push(new LocationState(path, query, state));\n this._historyIndex = this._history.length - 1;\n }\n static #_ = this.ɵfac = function SpyLocation_Factory(t) {\n return new (t || SpyLocation)();\n };\n static #_2 = this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SpyLocation,\n factory: SpyLocation.ɵfac\n });\n}\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(SpyLocation, [{\n type: Injectable\n }], null, null);\n})();\nclass LocationState {\n constructor(path, query, state) {\n this.path = path;\n this.query = query;\n this.state = state;\n }\n}\n\n/**\n * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated\n * location events.\n *\n * @publicApi\n */\nclass MockLocationStrategy extends LocationStrategy {\n constructor() {\n super();\n this.internalBaseHref = '/';\n this.internalPath = '/';\n this.internalTitle = '';\n this.urlChanges = [];\n /** @internal */\n this._subject = new EventEmitter();\n this.stateChanges = [];\n }\n simulatePopState(url) {\n this.internalPath = url;\n this._subject.emit(new _MockPopStateEvent(this.path()));\n }\n path(includeHash = false) {\n return this.internalPath;\n }\n prepareExternalUrl(internal) {\n if (internal.startsWith('/') && this.internalBaseHref.endsWith('/')) {\n return this.internalBaseHref + internal.substring(1);\n }\n return this.internalBaseHref + internal;\n }\n pushState(ctx, title, path, query) {\n // Add state change to changes array\n this.stateChanges.push(ctx);\n this.internalTitle = title;\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push(externalUrl);\n }\n replaceState(ctx, title, path, query) {\n // Reset the last index of stateChanges to the ctx (state) object\n this.stateChanges[(this.stateChanges.length || 1) - 1] = ctx;\n this.internalTitle = title;\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push('replace: ' + externalUrl);\n }\n onPopState(fn) {\n this._subject.subscribe({\n next: fn\n });\n }\n getBaseHref() {\n return this.internalBaseHref;\n }\n back() {\n if (this.urlChanges.length > 0) {\n this.urlChanges.pop();\n this.stateChanges.pop();\n const nextUrl = this.urlChanges.length > 0 ? this.urlChanges[this.urlChanges.length - 1] : '';\n this.simulatePopState(nextUrl);\n }\n }\n forward() {\n throw 'not implemented';\n }\n getState() {\n return this.stateChanges[(this.stateChanges.length || 1) - 1];\n }\n static #_ = this.ɵfac = function MockLocationStrategy_Factory(t) {\n return new (t || MockLocationStrategy)();\n };\n static #_2 = this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MockLocationStrategy,\n factory: MockLocationStrategy.ɵfac\n });\n}\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(MockLocationStrategy, [{\n type: Injectable\n }], function () {\n return [];\n }, null);\n})();\nclass _MockPopStateEvent {\n constructor(newUrl) {\n this.newUrl = newUrl;\n this.pop = true;\n this.type = 'popstate';\n }\n}\n\n/**\n * Parser from https://tools.ietf.org/html/rfc3986#appendix-B\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n * 12 3 4 5 6 7 8 9\n *\n * Example: http://www.ics.uci.edu/pub/ietf/uri/#Related\n *\n * Results in:\n *\n * $1 = http:\n * $2 = http\n * $3 = //www.ics.uci.edu\n * $4 = www.ics.uci.edu\n * $5 = /pub/ietf/uri/\n * $6 = <undefined>\n * $7 = <undefined>\n * $8 = #Related\n * $9 = Related\n */\nconst urlParse = /^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\nfunction parseUrl(urlStr, baseHref) {\n const verifyProtocol = /^((http[s]?|ftp):\\/\\/)/;\n let serverBase;\n // URL class requires full URL. If the URL string doesn't start with protocol, we need to add\n // an arbitrary base URL which can be removed afterward.\n if (!verifyProtocol.test(urlStr)) {\n serverBase = 'http://empty.com/';\n }\n let parsedUrl;\n try {\n parsedUrl = new URL(urlStr, serverBase);\n } catch (e) {\n const result = urlParse.exec(serverBase || '' + urlStr);\n if (!result) {\n throw new Error(`Invalid URL: ${urlStr} with base: ${baseHref}`);\n }\n const hostSplit = result[4].split(':');\n parsedUrl = {\n protocol: result[1],\n hostname: hostSplit[0],\n port: hostSplit[1] || '',\n pathname: result[5],\n search: result[6],\n hash: result[8]\n };\n }\n if (parsedUrl.pathname && parsedUrl.pathname.indexOf(baseHref) === 0) {\n parsedUrl.pathname = parsedUrl.pathname.substring(baseHref.length);\n }\n return {\n hostname: !serverBase && parsedUrl.hostname || '',\n protocol: !serverBase && parsedUrl.protocol || '',\n port: !serverBase && parsedUrl.port || '',\n pathname: parsedUrl.pathname || '/',\n search: parsedUrl.search || '',\n hash: parsedUrl.hash || ''\n };\n}\n/**\n * Provider for mock platform location config\n *\n * @publicApi\n */\nconst MOCK_PLATFORM_LOCATION_CONFIG = new InjectionToken('MOCK_PLATFORM_LOCATION_CONFIG');\n/**\n * Mock implementation of URL state.\n *\n * @publicApi\n */\nclass MockPlatformLocation {\n constructor(config) {\n this.baseHref = '';\n this.hashUpdate = new Subject();\n this.popStateSubject = new Subject();\n this.urlChangeIndex = 0;\n this.urlChanges = [{\n hostname: '',\n protocol: '',\n port: '',\n pathname: '/',\n search: '',\n hash: '',\n state: null\n }];\n if (config) {\n this.baseHref = config.appBaseHref || '';\n const parsedChanges = this.parseChanges(null, config.startUrl || 'http://_empty_/', this.baseHref);\n this.urlChanges[0] = {\n ...parsedChanges\n };\n }\n }\n get hostname() {\n return this.urlChanges[this.urlChangeIndex].hostname;\n }\n get protocol() {\n return this.urlChanges[this.urlChangeIndex].protocol;\n }\n get port() {\n return this.urlChanges[this.urlChangeIndex].port;\n }\n get pathname() {\n return this.urlChanges[this.urlChangeIndex].pathname;\n }\n get search() {\n return this.urlChanges[this.urlChangeIndex].search;\n }\n get hash() {\n return this.urlChanges[this.urlChangeIndex].hash;\n }\n get state() {\n return this.urlChanges[this.urlChangeIndex].state;\n }\n getBaseHrefFromDOM() {\n return this.baseHref;\n }\n onPopState(fn) {\n const subscription = this.popStateSubject.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n onHashChange(fn) {\n const subscription = this.hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n get href() {\n let url = `${this.protocol}//${this.hostname}${this.port ? ':' + this.port : ''}`;\n url += `${this.pathname === '/' ? '' : this.pathname}${this.search}${this.hash}`;\n return url;\n }\n get url() {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n parseChanges(state, url, baseHref = '') {\n // When the `history.state` value is stored, it is always copied.\n state = JSON.parse(JSON.stringify(state));\n return {\n ...parseUrl(url, baseHref),\n state\n };\n }\n replaceState(state, title, newUrl) {\n const {\n pathname,\n search,\n state: parsedState,\n hash\n } = this.parseChanges(state, newUrl);\n this.urlChanges[this.urlChangeIndex] = {\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState\n };\n }\n pushState(state, title, newUrl) {\n const {\n pathname,\n search,\n state: parsedState,\n hash\n } = this.parseChanges(state, newUrl);\n if (this.urlChangeIndex > 0) {\n this.urlChanges.splice(this.urlChangeIndex + 1);\n }\n this.urlChanges.push({\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState\n });\n this.urlChangeIndex = this.urlChanges.length - 1;\n }\n forward() {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex < this.urlChanges.length) {\n this.urlChangeIndex++;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n back() {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex > 0) {\n this.urlChangeIndex--;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n historyGo(relativePosition = 0) {\n const oldUrl = this.url;\n const oldHash = this.hash;\n const nextPageIndex = this.urlChangeIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this.urlChanges.length) {\n this.urlChangeIndex = nextPageIndex;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n getState() {\n return this.state;\n }\n /**\n * Browsers are inconsistent in when they fire events and perform the state updates\n * The most easiest thing to do in our mock is synchronous and that happens to match\n * Firefox and Chrome, at least somewhat closely\n *\n * https://github.com/WICG/navigation-api#watching-for-navigations\n * https://docs.google.com/document/d/1Pdve-DJ1JCGilj9Yqf5HxRJyBKSel5owgOvUJqTauwU/edit#heading=h.3ye4v71wsz94\n * popstate is always sent before hashchange:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#when_popstate_is_sent\n */\n emitEvents(oldHash, oldUrl) {\n this.popStateSubject.next({\n type: 'popstate',\n state: this.getState(),\n oldUrl,\n newUrl: this.url\n });\n if (oldHash !== this.hash) {\n this.hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl: this.url\n });\n }\n }\n static #_ = this.ɵfac = function MockPlatformLocation_Factory(t) {\n return new (t || MockPlatformLocation)(i0.ɵɵinject(MOCK_PLATFORM_LOCATION_CONFIG, 8));\n };\n static #_2 = this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MockPlatformLocation,\n factory: MockPlatformLocation.ɵfac\n });\n}\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(MockPlatformLocation, [{\n type: Injectable\n }], function () {\n return [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [MOCK_PLATFORM_LOCATION_CONFIG]\n }, {\n type: Optional\n }]\n }];\n }, null);\n})();\n\n/**\n * Returns mock providers for the `Location` and `LocationStrategy` classes.\n * The mocks are helpful in tests to fire simulated location events.\n *\n * @publicApi\n */\nfunction provideLocationMocks() {\n return [{\n provide: Location,\n useClass: SpyLocation\n }, {\n provide: LocationStrategy,\n useClass: MockLocationStrategy\n }];\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common/testing package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MOCK_PLATFORM_LOCATION_CONFIG, MockLocationStrategy, MockPlatformLocation, SpyLocation, provideLocationMocks };","map":{"version":3,"names":["i0","EventEmitter","Injectable","InjectionToken","Inject","Optional","LocationStrategy","Location","Subject","joinWithSlash","start","end","length","slashes","endsWith","startsWith","substring","stripTrailingSlash","url","match","pathEndIdx","index","droppedSlashIdx","slice","normalizeQueryParams","params","SpyLocation","constructor","urlChanges","_history","LocationState","_historyIndex","_subject","_basePath","_locationStrategy","_urlChangeListeners","_urlChangeSubscription","ngOnDestroy","unsubscribe","setInitialPath","path","setBaseHref","getState","state","isCurrentPathEqualTo","query","givenPath","currPath","simulateUrlPop","pathname","emit","simulateHashChange","prepareExternalUrl","pushHistory","push","go","locationState","_notifyUrlChangeListeners","replaceState","history","forward","back","historyGo","relativePosition","nextPageIndex","onUrlChange","fn","subscribe","v","fnIndex","indexOf","splice","forEach","onNext","onThrow","onReturn","next","error","complete","normalize","_","ɵfac","SpyLocation_Factory","t","_2","ɵprov","ɵɵdefineInjectable","token","factory","ngDevMode","ɵsetClassMetadata","type","MockLocationStrategy","internalBaseHref","internalPath","internalTitle","stateChanges","simulatePopState","_MockPopStateEvent","includeHash","internal","pushState","ctx","title","externalUrl","onPopState","getBaseHref","pop","nextUrl","MockLocationStrategy_Factory","newUrl","urlParse","parseUrl","urlStr","baseHref","verifyProtocol","serverBase","test","parsedUrl","URL","e","result","exec","Error","hostSplit","split","protocol","hostname","port","search","hash","MOCK_PLATFORM_LOCATION_CONFIG","MockPlatformLocation","config","hashUpdate","popStateSubject","urlChangeIndex","appBaseHref","parsedChanges","parseChanges","startUrl","getBaseHrefFromDOM","subscription","onHashChange","href","JSON","parse","stringify","parsedState","oldUrl","oldHash","emitEvents","MockPlatformLocation_Factory","ɵɵinject","undefined","decorators","args","provideLocationMocks","provide","useClass"],"sources":["C:/FatboarProject/angular-client/node_modules/@angular/common/fesm2022/testing.mjs"],"sourcesContent":["/**\n * @license Angular v16.2.1\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { EventEmitter, Injectable, InjectionToken, Inject, Optional } from '@angular/core';\nimport { LocationStrategy, Location } from '@angular/common';\nimport { Subject } from 'rxjs';\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * A spy for {@link Location} that allows tests to fire simulated location events.\n *\n * @publicApi\n */\nclass SpyLocation {\n constructor() {\n this.urlChanges = [];\n this._history = [new LocationState('', '', null)];\n this._historyIndex = 0;\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._basePath = '';\n /** @internal */\n this._locationStrategy = null;\n /** @internal */\n this._urlChangeListeners = [];\n /** @internal */\n this._urlChangeSubscription = null;\n }\n /** @nodoc */\n ngOnDestroy() {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n setInitialPath(url) {\n this._history[this._historyIndex].path = url;\n }\n setBaseHref(url) {\n this._basePath = url;\n }\n path() {\n return this._history[this._historyIndex].path;\n }\n getState() {\n return this._history[this._historyIndex].state;\n }\n isCurrentPathEqualTo(path, query = '') {\n const givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;\n const currPath = this.path().endsWith('/') ? this.path().substring(0, this.path().length - 1) : this.path();\n return currPath == givenPath + (query.length > 0 ? ('?' + query) : '');\n }\n simulateUrlPop(pathname) {\n this._subject.emit({ 'url': pathname, 'pop': true, 'type': 'popstate' });\n }\n simulateHashChange(pathname) {\n const path = this.prepareExternalUrl(pathname);\n this.pushHistory(path, '', null);\n this.urlChanges.push('hash: ' + pathname);\n // the browser will automatically fire popstate event before each `hashchange` event, so we need\n // to simulate it.\n this._subject.emit({ 'url': pathname, 'pop': true, 'type': 'popstate' });\n this._subject.emit({ 'url': pathname, 'pop': true, 'type': 'hashchange' });\n }\n prepareExternalUrl(url) {\n if (url.length > 0 && !url.startsWith('/')) {\n url = '/' + url;\n }\n return this._basePath + url;\n }\n go(path, query = '', state = null) {\n path = this.prepareExternalUrl(path);\n this.pushHistory(path, query, state);\n const locationState = this._history[this._historyIndex - 1];\n if (locationState.path == path && locationState.query == query) {\n return;\n }\n const url = path + (query.length > 0 ? ('?' + query) : '');\n this.urlChanges.push(url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n replaceState(path, query = '', state = null) {\n path = this.prepareExternalUrl(path);\n const history = this._history[this._historyIndex];\n history.state = state;\n if (history.path == path && history.query == query) {\n return;\n }\n history.path = path;\n history.query = query;\n const url = path + (query.length > 0 ? ('?' + query) : '');\n this.urlChanges.push('replace: ' + url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n forward() {\n if (this._historyIndex < (this._history.length - 1)) {\n this._historyIndex++;\n this._subject.emit({ 'url': this.path(), 'state': this.getState(), 'pop': true, 'type': 'popstate' });\n }\n }\n back() {\n if (this._historyIndex > 0) {\n this._historyIndex--;\n this._subject.emit({ 'url': this.path(), 'state': this.getState(), 'pop': true, 'type': 'popstate' });\n }\n }\n historyGo(relativePosition = 0) {\n const nextPageIndex = this._historyIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this._history.length) {\n this._historyIndex = nextPageIndex;\n this._subject.emit({ 'url': this.path(), 'state': this.getState(), 'pop': true, 'type': 'popstate' });\n }\n }\n onUrlChange(fn) {\n this._urlChangeListeners.push(fn);\n if (!this._urlChangeSubscription) {\n this._urlChangeSubscription = this.subscribe(v => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n }\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n /** @internal */\n _notifyUrlChangeListeners(url = '', state) {\n this._urlChangeListeners.forEach(fn => fn(url, state));\n }\n subscribe(onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n }\n normalize(url) {\n return null;\n }\n pushHistory(path, query, state) {\n if (this._historyIndex > 0) {\n this._history.splice(this._historyIndex + 1);\n }\n this._history.push(new LocationState(path, query, state));\n this._historyIndex = this._history.length - 1;\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: SpyLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: SpyLocation }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: SpyLocation, decorators: [{\n type: Injectable\n }] });\nclass LocationState {\n constructor(path, query, state) {\n this.path = path;\n this.query = query;\n this.state = state;\n }\n}\n\n/**\n * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated\n * location events.\n *\n * @publicApi\n */\nclass MockLocationStrategy extends LocationStrategy {\n constructor() {\n super();\n this.internalBaseHref = '/';\n this.internalPath = '/';\n this.internalTitle = '';\n this.urlChanges = [];\n /** @internal */\n this._subject = new EventEmitter();\n this.stateChanges = [];\n }\n simulatePopState(url) {\n this.internalPath = url;\n this._subject.emit(new _MockPopStateEvent(this.path()));\n }\n path(includeHash = false) {\n return this.internalPath;\n }\n prepareExternalUrl(internal) {\n if (internal.startsWith('/') && this.internalBaseHref.endsWith('/')) {\n return this.internalBaseHref + internal.substring(1);\n }\n return this.internalBaseHref + internal;\n }\n pushState(ctx, title, path, query) {\n // Add state change to changes array\n this.stateChanges.push(ctx);\n this.internalTitle = title;\n const url = path + (query.length > 0 ? ('?' + query) : '');\n this.internalPath = url;\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push(externalUrl);\n }\n replaceState(ctx, title, path, query) {\n // Reset the last index of stateChanges to the ctx (state) object\n this.stateChanges[(this.stateChanges.length || 1) - 1] = ctx;\n this.internalTitle = title;\n const url = path + (query.length > 0 ? ('?' + query) : '');\n this.internalPath = url;\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push('replace: ' + externalUrl);\n }\n onPopState(fn) {\n this._subject.subscribe({ next: fn });\n }\n getBaseHref() {\n return this.internalBaseHref;\n }\n back() {\n if (this.urlChanges.length > 0) {\n this.urlChanges.pop();\n this.stateChanges.pop();\n const nextUrl = this.urlChanges.length > 0 ? this.urlChanges[this.urlChanges.length - 1] : '';\n this.simulatePopState(nextUrl);\n }\n }\n forward() {\n throw 'not implemented';\n }\n getState() {\n return this.stateChanges[(this.stateChanges.length || 1) - 1];\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockLocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockLocationStrategy }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockLocationStrategy, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return []; } });\nclass _MockPopStateEvent {\n constructor(newUrl) {\n this.newUrl = newUrl;\n this.pop = true;\n this.type = 'popstate';\n }\n}\n\n/**\n * Parser from https://tools.ietf.org/html/rfc3986#appendix-B\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n * 12 3 4 5 6 7 8 9\n *\n * Example: http://www.ics.uci.edu/pub/ietf/uri/#Related\n *\n * Results in:\n *\n * $1 = http:\n * $2 = http\n * $3 = //www.ics.uci.edu\n * $4 = www.ics.uci.edu\n * $5 = /pub/ietf/uri/\n * $6 = <undefined>\n * $7 = <undefined>\n * $8 = #Related\n * $9 = Related\n */\nconst urlParse = /^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\nfunction parseUrl(urlStr, baseHref) {\n const verifyProtocol = /^((http[s]?|ftp):\\/\\/)/;\n let serverBase;\n // URL class requires full URL. If the URL string doesn't start with protocol, we need to add\n // an arbitrary base URL which can be removed afterward.\n if (!verifyProtocol.test(urlStr)) {\n serverBase = 'http://empty.com/';\n }\n let parsedUrl;\n try {\n parsedUrl = new URL(urlStr, serverBase);\n }\n catch (e) {\n const result = urlParse.exec(serverBase || '' + urlStr);\n if (!result) {\n throw new Error(`Invalid URL: ${urlStr} with base: ${baseHref}`);\n }\n const hostSplit = result[4].split(':');\n parsedUrl = {\n protocol: result[1],\n hostname: hostSplit[0],\n port: hostSplit[1] || '',\n pathname: result[5],\n search: result[6],\n hash: result[8],\n };\n }\n if (parsedUrl.pathname && parsedUrl.pathname.indexOf(baseHref) === 0) {\n parsedUrl.pathname = parsedUrl.pathname.substring(baseHref.length);\n }\n return {\n hostname: !serverBase && parsedUrl.hostname || '',\n protocol: !serverBase && parsedUrl.protocol || '',\n port: !serverBase && parsedUrl.port || '',\n pathname: parsedUrl.pathname || '/',\n search: parsedUrl.search || '',\n hash: parsedUrl.hash || '',\n };\n}\n/**\n * Provider for mock platform location config\n *\n * @publicApi\n */\nconst MOCK_PLATFORM_LOCATION_CONFIG = new InjectionToken('MOCK_PLATFORM_LOCATION_CONFIG');\n/**\n * Mock implementation of URL state.\n *\n * @publicApi\n */\nclass MockPlatformLocation {\n constructor(config) {\n this.baseHref = '';\n this.hashUpdate = new Subject();\n this.popStateSubject = new Subject();\n this.urlChangeIndex = 0;\n this.urlChanges = [{ hostname: '', protocol: '', port: '', pathname: '/', search: '', hash: '', state: null }];\n if (config) {\n this.baseHref = config.appBaseHref || '';\n const parsedChanges = this.parseChanges(null, config.startUrl || 'http://_empty_/', this.baseHref);\n this.urlChanges[0] = { ...parsedChanges };\n }\n }\n get hostname() {\n return this.urlChanges[this.urlChangeIndex].hostname;\n }\n get protocol() {\n return this.urlChanges[this.urlChangeIndex].protocol;\n }\n get port() {\n return this.urlChanges[this.urlChangeIndex].port;\n }\n get pathname() {\n return this.urlChanges[this.urlChangeIndex].pathname;\n }\n get search() {\n return this.urlChanges[this.urlChangeIndex].search;\n }\n get hash() {\n return this.urlChanges[this.urlChangeIndex].hash;\n }\n get state() {\n return this.urlChanges[this.urlChangeIndex].state;\n }\n getBaseHrefFromDOM() {\n return this.baseHref;\n }\n onPopState(fn) {\n const subscription = this.popStateSubject.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n onHashChange(fn) {\n const subscription = this.hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n get href() {\n let url = `${this.protocol}//${this.hostname}${this.port ? ':' + this.port : ''}`;\n url += `${this.pathname === '/' ? '' : this.pathname}${this.search}${this.hash}`;\n return url;\n }\n get url() {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n parseChanges(state, url, baseHref = '') {\n // When the `history.state` value is stored, it is always copied.\n state = JSON.parse(JSON.stringify(state));\n return { ...parseUrl(url, baseHref), state };\n }\n replaceState(state, title, newUrl) {\n const { pathname, search, state: parsedState, hash } = this.parseChanges(state, newUrl);\n this.urlChanges[this.urlChangeIndex] =\n { ...this.urlChanges[this.urlChangeIndex], pathname, search, hash, state: parsedState };\n }\n pushState(state, title, newUrl) {\n const { pathname, search, state: parsedState, hash } = this.parseChanges(state, newUrl);\n if (this.urlChangeIndex > 0) {\n this.urlChanges.splice(this.urlChangeIndex + 1);\n }\n this.urlChanges.push({ ...this.urlChanges[this.urlChangeIndex], pathname, search, hash, state: parsedState });\n this.urlChangeIndex = this.urlChanges.length - 1;\n }\n forward() {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex < this.urlChanges.length) {\n this.urlChangeIndex++;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n back() {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex > 0) {\n this.urlChangeIndex--;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n historyGo(relativePosition = 0) {\n const oldUrl = this.url;\n const oldHash = this.hash;\n const nextPageIndex = this.urlChangeIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this.urlChanges.length) {\n this.urlChangeIndex = nextPageIndex;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n getState() {\n return this.state;\n }\n /**\n * Browsers are inconsistent in when they fire events and perform the state updates\n * The most easiest thing to do in our mock is synchronous and that happens to match\n * Firefox and Chrome, at least somewhat closely\n *\n * https://github.com/WICG/navigation-api#watching-for-navigations\n * https://docs.google.com/document/d/1Pdve-DJ1JCGilj9Yqf5HxRJyBKSel5owgOvUJqTauwU/edit#heading=h.3ye4v71wsz94\n * popstate is always sent before hashchange:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#when_popstate_is_sent\n */\n emitEvents(oldHash, oldUrl) {\n this.popStateSubject.next({ type: 'popstate', state: this.getState(), oldUrl, newUrl: this.url });\n if (oldHash !== this.hash) {\n this.hashUpdate.next({ type: 'hashchange', state: null, oldUrl, newUrl: this.url });\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockPlatformLocation, deps: [{ token: MOCK_PLATFORM_LOCATION_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockPlatformLocation }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"16.2.1\", ngImport: i0, type: MockPlatformLocation, decorators: [{\n type: Injectable\n }], ctorParameters: function () { return [{ type: undefined, decorators: [{\n type: Inject,\n args: [MOCK_PLATFORM_LOCATION_CONFIG]\n }, {\n type: Optional\n }] }]; } });\n\n/**\n * Returns mock providers for the `Location` and `LocationStrategy` classes.\n * The mocks are helpful in tests to fire simulated location events.\n *\n * @publicApi\n */\nfunction provideLocationMocks() {\n return [\n { provide: Location, useClass: SpyLocation },\n { provide: LocationStrategy, useClass: MockLocationStrategy },\n ];\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common/testing package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MOCK_PLATFORM_LOCATION_CONFIG, MockLocationStrategy, MockPlatformLocation, SpyLocation, provideLocationMocks };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,eAAe;AACnC,SAASC,YAAY,EAAEC,UAAU,EAAEC,cAAc,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,eAAe;AAC1F,SAASC,gBAAgB,EAAEC,QAAQ,QAAQ,iBAAiB;AAC5D,SAASC,OAAO,QAAQ,MAAM;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,aAAaA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAC/B,IAAID,KAAK,CAACE,MAAM,IAAI,CAAC,EAAE;IACnB,OAAOD,GAAG;EACd;EACA,IAAIA,GAAG,CAACC,MAAM,IAAI,CAAC,EAAE;IACjB,OAAOF,KAAK;EAChB;EACA,IAAIG,OAAO,GAAG,CAA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