@angular/fire 21.0.0-rc.0-canary.f54c0fe → 21.0.0-rc.0-canary.b551b5f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,6 +74,8 @@ export class AppComponent {
74
74
 
75
75
  [Upgrading from v6.0? Check out our guide.](docs/version-7-upgrade.md)
76
76
 
77
+ [Upgrading from AngularFire 20? See the v21 upgrade guide.](docs/version-21-upgrade.md)
78
+
77
79
  ### Sample app
78
80
 
79
81
  The [`sample`](sample) folder contains a kitchen sink application that demonstrates use of the "modular" API, in a zoneless server-rendered application, with all the bells and whistles.
@@ -144,11 +146,20 @@ import { } from '@angular/fire/storage';
144
146
  <tr>
145
147
  <td>
146
148
 
149
+ #### [Data Connect](docs/data-connect.md#data-connect)
150
+ ```ts
151
+ import { } from '@angular/fire/data-connect';
152
+ ```
153
+ </td>
154
+ <td>
155
+
147
156
  #### [Performance Monitoring](docs/performance.md#performance-monitoring)
148
157
  ```ts
149
158
  import { } from '@angular/fire/performance';
150
159
  ```
151
160
  </td>
161
+ </tr>
162
+ <tr>
152
163
  <td>
153
164
 
154
165
  #### [Realtime Database](docs/database.md#realtime-database)
@@ -156,8 +167,6 @@ import { } from '@angular/fire/performance';
156
167
  import { } from '@angular/fire/database';
157
168
  ```
158
169
  </td>
159
- </tr>
160
- <tr>
161
170
  <td>
162
171
 
163
172
  #### [Remote Config](docs/remote-config.md#remote-config)
@@ -165,6 +174,8 @@ import { } from '@angular/fire/database';
165
174
  import { } from '@angular/fire/remote-config';
166
175
  ```
167
176
  </td>
177
+ </tr>
178
+ <tr>
168
179
  <td>
169
180
 
170
181
  #### [App Check](docs/app-check.md#app-check)
@@ -172,8 +183,6 @@ import { } from '@angular/fire/remote-config';
172
183
  import { } from '@angular/fire/app-check';
173
184
  ```
174
185
  </td>
175
- </tr>
176
- <tr>
177
186
  <td>
178
187
 
179
188
  #### [AI Logic](docs/ai.md#ai-logic)
@@ -181,6 +190,5 @@ import { } from '@angular/fire/app-check';
181
190
  import { } from '@angular/fire/ai';
182
191
  ```
183
192
  </td>
184
-
185
193
  </tr>
186
194
  </table>
package/docs/ai.md CHANGED
@@ -8,6 +8,8 @@ Firebase AI Logic gives you access to the latest generative AI models from Googl
8
8
 
9
9
  [Learn more](https://firebase.google.com/docs/ai-logic)
10
10
 
11
+ > Firebase AI Logic was previously called **Vertex AI in Firebase**. If you are upgrading from AngularFire 20, the module moved from `@angular/fire/vertexai` to `@angular/fire/ai` and most symbols were renamed (`provideVertexAI` to `provideAI`, `VertexAI` to `AI`). One is not a rename: plain `getAI()` uses the Gemini Developer API backend, so the old `getVertexAI()` maps to `getAI(app, { backend: new VertexAIBackend() })`. Running `ng update @angular/fire` rewrites all of this for you and keeps your app on the Vertex AI backend. See the [AngularFire 20 to 21 upgrade guide](./version-21-upgrade.md).
12
+
11
13
  ## Dependency Injection
12
14
 
13
15
  As a prerequisite, ensure that `AngularFire` has been added to your project via
@@ -0,0 +1,59 @@
1
+ <small>
2
+ <a href="https://github.com/angular/angularfire">AngularFire</a> &#10097; <a href="../README.md#developer-guide">Developer Guide</a> &#10097; Data Connect
3
+ </small>
4
+
5
+ # Data Connect
6
+
7
+ Firebase Data Connect (now known as "Firebase SQL Connect" in the Firebase documentation) is a backend service that pairs a Cloud SQL for PostgreSQL database with GraphQL, generating type-safe SDKs to query and mutate your data.
8
+
9
+ [Learn more](https://firebase.google.com/docs/data-connect)
10
+
11
+ ## Dependency Injection
12
+
13
+ As a prerequisite, ensure that `AngularFire` has been added to your project via
14
+ ```bash
15
+ ng add @angular/fire
16
+ ```
17
+
18
+ Provide a Data Connect instance in the application's `app.config.ts`. `getDataConnect` takes a connector config that identifies your service, connector, and location; this is generated for you when you set up Data Connect and is also exported from your generated SDK:
19
+
20
+ ```ts
21
+ import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
22
+ import { provideDataConnect, getDataConnect } from '@angular/fire/data-connect';
23
+
24
+ const connectorConfig = {
25
+ connector: 'my-connector',
26
+ service: 'my-service',
27
+ location: 'us-central1',
28
+ };
29
+
30
+ export const appConfig: ApplicationConfig = {
31
+ providers: [
32
+ provideFirebaseApp(() => initializeApp({ ... })),
33
+ provideDataConnect(() => getDataConnect(connectorConfig)),
34
+ ...
35
+ ],
36
+ ...,
37
+ }
38
+ ```
39
+
40
+ Next inject `DataConnect` into your component:
41
+
42
+ ```typescript
43
+ import { Component, inject } from '@angular/core';
44
+ import { DataConnect } from '@angular/fire/data-connect';
45
+
46
+ @Component({ ... })
47
+ export class MyComponent {
48
+ private dataConnect = inject(DataConnect);
49
+ ...
50
+ }
51
+ ```
52
+
53
+ ## Firebase API
54
+
55
+ AngularFire wraps the Firebase JS SDK to ensure proper functionality in Angular, while providing the same API.
56
+
57
+ Update the imports from `import { ... } from 'firebase/data-connect'` to `import { ... } from '@angular/fire/data-connect'` and follow the official documentation.
58
+
59
+ [Getting Started](https://firebase.google.com/docs/data-connect/quickstart)
@@ -0,0 +1,42 @@
1
+ # Upgrading to AngularFire 21
2
+
3
+ AngularFire 21 targets **Angular 21** and the **Firebase JS SDK v12**. Most of the upgrade is handled for you by `ng update`.
4
+
5
+ ## Run the update
6
+
7
+ ```bash
8
+ ng update @angular/core @angular/cli # move your app to Angular 21 first
9
+ ng update @angular/fire # then AngularFire 21
10
+ ```
11
+
12
+ `ng update @angular/fire` runs a migration that:
13
+
14
+ - **Aligns your `firebase` dependency to `^12.4.0`.** AngularFire 21 requires Firebase JS SDK 12. If your app still requested `firebase` 11, npm would install both 11 and 12 side by side, and the two copies reject each other's objects at runtime. The migration updates the dependency and reinstalls so you end up with a single copy. Verify with `npm ls firebase`.
15
+ - **Rewrites Vertex AI imports to AI Logic** (see below).
16
+
17
+ ## Vertex AI is now Firebase AI Logic
18
+
19
+ The Vertex AI module has been renamed to Firebase AI Logic. The `@angular/fire/vertexai` entry point (and the older `@angular/fire/vertexai-preview`) are removed in favor of `@angular/fire/ai`:
20
+
21
+ | Before (`@angular/fire/vertexai`) | After (`@angular/fire/ai`) |
22
+ |---|---|
23
+ | `getVertexAI(app?, { location? })` | `getAI(app, { backend: new VertexAIBackend(location?) })` |
24
+ | `provideVertexAI` | `provideAI` |
25
+ | `VertexAI` | `AI` |
26
+ | `VertexAIError` | `AIError` |
27
+ | `VertexAIErrorCode` | `AIErrorCode` |
28
+ | `VertexAIModel` | `AIModel` |
29
+ | `VertexAIInstances` | `AIInstances` |
30
+ | `vertexAIInstance$` | `AIInstance$` |
31
+ | `VertexAIModule` | `AIModule` |
32
+
33
+ **`getVertexAI` is not a plain rename.** `getAI` already existed alongside it, and a plain `getAI()` call talks to the Gemini Developer API backend, not to Vertex AI. The equivalent of `getVertexAI()` is `getAI(app, { backend: new VertexAIBackend() })`, which is what the migration writes, so your app keeps calling the Vertex AI backend it was configured, enabled, and billed for. A `location` option moves into the `VertexAIBackend` constructor.
34
+
35
+ `ng update @angular/fire` rewrites these imports and identifiers for you and logs every `getVertexAI` call it rewrites. Code it cannot rewrite safely (for example when the options are not a literal `{ location }` object or that literal references other rewritten symbols, when the function itself is handed around as a value, when a local declaration in the file reuses an imported symbol's name, or when the file already binds `getAI` or `VertexAIBackend` from a source other than AI Logic) is left in place with a warning. The import path itself still moves to the new entry point, so the leftover code fails to compile there, and nothing changes backends silently. A file where a named `getVertexAI` import has any use that cannot be rewritten keeps every use of its named `getVertexAI` imports in place (namespace-style `ns.getVertexAI(...)` calls are judged per call), and each skipped call is logged. `export * from '@angular/fire/vertexai'` is also left alone (rewriting it would silently rename your re-exported public symbols), so replace it with named re-exports by hand. `VertexAIOptions` was removed rather than renamed (the new `AIOptions` takes a `backend` instead of a `location`), so imports of it are left and warned about. Migrate those sites using the table above. `getGenerativeModel` and `getImagenModel` keep their names.
36
+
37
+ Imports straight from the Firebase SDK (`firebase/vertexai`, gone in SDK 12) are rewritten to `firebase/ai` under the same rules. The rewrite parses your sources with the `typescript` package (an optional peer dependency of `@angular/fire`). Every Angular workspace already has it, but if the migration warns that it could not be resolved, install `typescript` and re-run. See [ai.md](./ai.md) for current usage.
38
+
39
+ ## Other notes
40
+
41
+ - **Angular 21 is required.** AngularFire 21 peers `@angular/* ^21.0.0` and does not support Angular 22 (a future AngularFire 22 will).
42
+ - The obsolete `@angular/platform-browser-dynamic` peer dependency was removed. No action is needed.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "../node_modules/ng-packagr/package.schema.json",
3
3
  "name": "@angular/fire",
4
- "version": "21.0.0-rc.0-canary.f54c0fe",
4
+ "version": "21.0.0-rc.0-canary.b551b5f",
5
5
  "description": "Angular + Firebase = ❤️",
6
6
  "publishConfig": {
7
7
  "registry": "https://wombat-dressing-room.appspot.com",
@@ -32,7 +32,8 @@
32
32
  "@angular/platform-browser": "^21.0.0",
33
33
  "@angular/platform-server": "^21.0.0",
34
34
  "rxjs": "~7.8.0",
35
- "firebase-tools": "^14.0.0 || ^15.0.0"
35
+ "firebase-tools": "^14.0.0 || ^15.0.0",
36
+ "typescript": ">=5.8 <6.0"
36
37
  },
37
38
  "peerDependenciesMeta": {
38
39
  "firebase-tools": {
@@ -40,6 +41,9 @@
40
41
  },
41
42
  "@angular/platform-server": {
42
43
  "optional": true
44
+ },
45
+ "typescript": {
46
+ "optional": true
43
47
  }
44
48
  },
45
49
  "dependencies": {
@@ -1 +1 @@
1
- var mt=Object.create;var G=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},ge=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!It.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=$t(e,n))||s.enumerable});return t};var Lt=(t,e,r)=>(r=t!=null?mt(dt(t)):{},ge(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>ge(G({},"__esModule",{value:!0}),t);var P=p((Oi,Le)=>{"use strict";var St="2.0.0",Ot=Number.MAX_SAFE_INTEGER||9007199254740991,Tt=16,At=250,wt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Le.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tt,MAX_SAFE_BUILD_LENGTH:At,MAX_SAFE_INTEGER:Ot,RELEASE_TYPES:wt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((Ti,Ne)=>{"use strict";var qt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ne.exports=qt});var q=p((T,Se)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ee,MAX_SAFE_BUILD_LENGTH:vt,MAX_LENGTH:Pt}=P(),xt=x();T=Se.exports={};var Ct=T.re=[],Dt=T.safeRe=[],c=T.src=[],yt=T.safeSrc=[],l=T.t={},jt=0,re="[a-zA-Z0-9-]",Ft=[["\\s",1],["\\d",Pt],[re,vt]],Gt=t=>{for(let[e,r]of Ft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Gt(e),n=jt++;xt(t,n,e),l[t]=n,c[n]=e,yt[n]=s,Ct[n]=new RegExp(e,r?"g":void 0),Dt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${re}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${re}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ee}})(?:\\.(\\d{1,${ee}}))?(?:\\.(\\d{1,${ee}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=p((Ai,Oe)=>{"use strict";var bt=Object.freeze({loose:!0}),Ut=Object.freeze({}),Vt=t=>t?typeof t!="object"?bt:t:Ut;Oe.exports=Vt});var te=p((wi,we)=>{"use strict";var Te=/^[0-9]+$/,Ae=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Te.test(t),s=Te.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xt=(t,e)=>Ae(e,t);we.exports={compareIdentifiers:Ae,rcompareIdentifiers:Xt}});var I=p((qi,ve)=>{"use strict";var U=x(),{MAX_LENGTH:qe,MAX_SAFE_INTEGER:V}=P(),{safeRe:X,t:k}=q(),kt=b(),{compareIdentifiers:se}=te(),ne=class t{constructor(e,r){if(r=kt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>qe)throw new TypeError(`version is longer than ${qe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),se(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ve.exports=ne});var w=p((vi,xe)=>{"use strict";var Pe=I(),_t=(t,e,r=!1)=>{if(t instanceof Pe)return t;try{return new Pe(t,e)}catch(s){if(!r)return null;throw s}};xe.exports=_t});var De=p((Pi,Ce)=>{"use strict";var Ht=w(),Wt=(t,e)=>{let r=Ht(t,e);return r?r.version:null};Ce.exports=Wt});var je=p((xi,ye)=>{"use strict";var Mt=w(),Yt=(t,e)=>{let r=Mt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ye.exports=Yt});var be=p((Ci,Ge)=>{"use strict";var Fe=I(),Bt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Fe(t instanceof Fe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ge.exports=Bt});var Xe=p((Di,Ve)=>{"use strict";var Ue=w(),zt=(t,e)=>{let r=Ue(t,null,!0),s=Ue(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ve.exports=zt});var _e=p((yi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).major;ke.exports=Zt});var We=p((ji,He)=>{"use strict";var Jt=I(),Qt=(t,e)=>new Jt(t,e).minor;He.exports=Qt});var Ye=p((Fi,Me)=>{"use strict";var es=I(),rs=(t,e)=>new es(t,e).patch;Me.exports=rs});var ze=p((Gi,Be)=>{"use strict";var ts=w(),ss=(t,e)=>{let r=ts(t,e);return r&&r.prerelease.length?r.prerelease:null};Be.exports=ss});var S=p((bi,Ze)=>{"use strict";var Ke=I(),ns=(t,e,r)=>new Ke(t,r).compare(new Ke(e,r));Ze.exports=ns});var Qe=p((Ui,Je)=>{"use strict";var is=S(),os=(t,e,r)=>is(e,t,r);Je.exports=os});var rr=p((Vi,er)=>{"use strict";var as=S(),cs=(t,e)=>as(t,e,!0);er.exports=cs});var _=p((Xi,sr)=>{"use strict";var tr=I(),ls=(t,e,r)=>{let s=new tr(t,r),n=new tr(e,r);return s.compare(n)||s.compareBuild(n)};sr.exports=ls});var ir=p((ki,nr)=>{"use strict";var us=_(),fs=(t,e)=>t.sort((r,s)=>us(r,s,e));nr.exports=fs});var ar=p((_i,or)=>{"use strict";var hs=_(),Es=(t,e)=>t.sort((r,s)=>hs(s,r,e));or.exports=Es});var C=p((Hi,cr)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)>0;cr.exports=ms});var H=p((Wi,lr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)<0;lr.exports=Rs});var ie=p((Mi,ur)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)===0;ur.exports=Is});var oe=p((Yi,fr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)!==0;fr.exports=Ls});var W=p((Bi,hr)=>{"use strict";var Ns=S(),Ss=(t,e,r)=>Ns(t,e,r)>=0;hr.exports=Ss});var M=p((zi,Er)=>{"use strict";var Os=S(),Ts=(t,e,r)=>Os(t,e,r)<=0;Er.exports=Ts});var ae=p((Ki,pr)=>{"use strict";var As=ie(),ws=oe(),qs=C(),vs=W(),Ps=H(),xs=M(),Cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return As(t,r,s);case"!=":return ws(t,r,s);case">":return qs(t,r,s);case">=":return vs(t,r,s);case"<":return Ps(t,r,s);case"<=":return xs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};pr.exports=Cs});var $r=p((Zi,mr)=>{"use strict";var Ds=I(),ys=w(),{safeRe:Y,t:B}=q(),js=(t,e)=>{if(t instanceof Ds)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ys(`${s}.${n}.${i}${o}${a}`,e)};mr.exports=js});var dr=p((Ji,Rr)=>{"use strict";var ce=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Rr.exports=ce});var O=p((Qi,Nr)=>{"use strict";var Fs=/\s+/g,le=class t{constructor(e,r){if(r=bs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ue)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Fs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!gr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Ws(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&_s)|(this.options.loose&&Hs))+":"+e,n=Ir.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,rn(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Vs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Xs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],ks),R("caret trim",e);let a=e.split(" ").map(h=>Ms(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));i&&(a=a.filter(h=>(R("loose invalid filter",h,this.options),!!h.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,f=a.map(h=>new ue(h,this.options));for(let h of f){if(gr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Ir.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Lr(s,r)&&e.set.some(n=>Lr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Us(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(tn(this.set[r],e,this.options))return!0;return!1}};Nr.exports=le;var Gs=dr(),Ir=new Gs,bs=b(),ue=D(),R=x(),Us=I(),{safeRe:L,t:g,comparatorTrimReplace:Vs,tildeTrimReplace:Xs,caretTrimReplace:ks}=q(),{FLAG_INCLUDE_PRERELEASE:_s,FLAG_LOOSE:Hs}=P(),gr=t=>t.value==="<0.0.0-0",Ws=t=>t.value==="",Lr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ms=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=zs(t,e),R("caret",t),t=Ys(t,e),R("tildes",t),t=Zs(t,e),R("xrange",t),t=Qs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Ys=(t,e)=>t.trim().split(/\s+/).map(r=>Bs(r,e)).join(" "),Bs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},zs=(t,e)=>t.trim().split(/\s+/).map(r=>Ks(r,e)).join(" "),Ks=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let f;return N(i)?f="":N(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",f),f})},Zs=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Js(r,e)).join(" ")),Js=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let f=N(i),$=f||N(o),h=$||N(a),d=h;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Qs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),en=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),rn=t=>(e,r,s,n,i,o,a,u,f,$,h,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(f)?u="":N($)?u=`<${+f+1}.0.0-0`:N(h)?u=`<${f}.${+$+1}.0-0`:d?u=`<=${f}.${$}.${h}-${d}`:t?u=`<${f}.${$}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),tn=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ue.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((eo,qr)=>{"use strict";var y=Symbol("SemVer ANY"),Ee=class t{static get ANY(){return y}constructor(e,r){if(r=Sr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),he("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,he("comp",this)}parse(e){let r=this.options.loose?Or[Tr.COMPARATORLOOSE]:Or[Tr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(he("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch(r){return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new wr(this.value,r).test(e.semver):(r=Sr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};qr.exports=Ee;var Sr=b(),{safeRe:Or,t:Tr}=q(),fe=ae(),he=x(),Ar=I(),wr=O()});var j=p((ro,vr)=>{"use strict";var sn=O(),nn=(t,e,r)=>{try{e=new sn(e,r)}catch(s){return!1}return e.test(t)};vr.exports=nn});var xr=p((to,Pr)=>{"use strict";var on=O(),an=(t,e)=>new on(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Pr.exports=an});var Dr=p((so,Cr)=>{"use strict";var cn=I(),ln=O(),un=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ln(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new cn(s,r))}),s};Cr.exports=un});var jr=p((no,yr)=>{"use strict";var fn=I(),hn=O(),En=(t,e,r)=>{let s=null,n=null,i=null;try{i=new hn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new fn(s,r))}),s};yr.exports=En});var br=p((io,Gr)=>{"use strict";var pe=I(),pn=O(),Fr=C(),mn=(t,e)=>{t=new pn(t,e);let r=new pe("0.0.0");if(t.test(r)||(r=new pe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new pe(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Fr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Fr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Gr.exports=mn});var Vr=p((oo,Ur)=>{"use strict";var $n=O(),Rn=(t,e)=>{try{return new $n(t,e).range||"*"}catch(r){return null}};Ur.exports=Rn});var z=p((ao,Hr)=>{"use strict";var dn=I(),_r=D(),{ANY:In}=_r,gn=O(),Ln=j(),Xr=C(),kr=H(),Nn=M(),Sn=W(),On=(t,e,r,s)=>{t=new dn(t,s),e=new gn(e,s);let n,i,o,a,u;switch(r){case">":n=Xr,i=Nn,o=kr,a=">",u=">=";break;case"<":n=kr,i=Sn,o=Xr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ln(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],h=null,d=null;if($.forEach(E=>{E.semver===In&&(E=new _r(">=0.0.0")),h=h||E,d=d||E,n(E.semver,h.semver,s)?h=E:o(E.semver,d.semver,s)&&(d=E)}),h.operator===a||h.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Hr.exports=On});var Mr=p((co,Wr)=>{"use strict";var Tn=z(),An=(t,e,r)=>Tn(t,e,">",r);Wr.exports=An});var Br=p((lo,Yr)=>{"use strict";var wn=z(),qn=(t,e,r)=>wn(t,e,"<",r);Yr.exports=qn});var Zr=p((uo,Kr)=>{"use strict";var zr=O(),vn=(t,e,r)=>(t=new zr(t,r),e=new zr(e,r),t.intersects(e,r));Kr.exports=vn});var Qr=p((fo,Jr)=>{"use strict";var Pn=j(),xn=S();Jr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,h)=>xn($,h,r));for(let $ of o)Pn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,h]of s)$===h?a.push($):!h&&$===o[0]?a.push("*"):h?$===o[0]?a.push(`<=${h}`):a.push(`${$} - ${h}`):a.push(`>=${$}`);let u=a.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var it=p((ho,nt)=>{"use strict";var et=O(),$e=D(),{ANY:me}=$e,F=j(),Re=S(),Cn=(t,e,r={})=>{if(t===e)return!0;t=new et(t,r),e=new et(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=yn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Dn=[new $e(">=0.0.0-0")],rt=[new $e(">=0.0.0")],yn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===me){if(e.length===1&&e[0].semver===me)return!0;r.includePrerelease?t=Dn:t=rt}if(e.length===1&&e[0].semver===me){if(r.includePrerelease)return!0;e=rt}let s=new Set,n,i;for(let E of t)E.operator===">"||E.operator===">="?n=tt(n,E,r):E.operator==="<"||E.operator==="<="?i=st(i,E,r):s.add(E.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Re(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let E of s){if(n&&!F(E,String(n),r)||i&&!F(E,String(i),r))return null;for(let pt of e)if(!F(E,String(pt),r))return!1;return!0}let a,u,f,$,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let E of e){if($=$||E.operator===">"||E.operator===">=",f=f||E.operator==="<"||E.operator==="<=",n){if(d&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===d.major&&E.semver.minor===d.minor&&E.semver.patch===d.patch&&(d=!1),E.operator===">"||E.operator===">="){if(a=tt(n,E,r),a===E&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(E),r))return!1}if(i){if(h&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===h.major&&E.semver.minor===h.minor&&E.semver.patch===h.patch&&(h=!1),E.operator==="<"||E.operator==="<="){if(u=st(i,E,r),u===E&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(E),r))return!1}if(!E.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||d||h)},tt=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},st=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};nt.exports=Cn});var lt=p((Eo,ct)=>{"use strict";var de=q(),ot=P(),jn=I(),at=te(),Fn=w(),Gn=De(),bn=je(),Un=be(),Vn=Xe(),Xn=_e(),kn=We(),_n=Ye(),Hn=ze(),Wn=S(),Mn=Qe(),Yn=rr(),Bn=_(),zn=ir(),Kn=ar(),Zn=C(),Jn=H(),Qn=ie(),ei=oe(),ri=W(),ti=M(),si=ae(),ni=$r(),ii=D(),oi=O(),ai=j(),ci=xr(),li=Dr(),ui=jr(),fi=br(),hi=Vr(),Ei=z(),pi=Mr(),mi=Br(),$i=Zr(),Ri=Qr(),di=it();ct.exports={parse:Fn,valid:Gn,clean:bn,inc:Un,diff:Vn,major:Xn,minor:kn,patch:_n,prerelease:Hn,compare:Wn,rcompare:Mn,compareLoose:Yn,compareBuild:Bn,sort:zn,rsort:Kn,gt:Zn,lt:Jn,eq:Qn,neq:ei,gte:ri,lte:ti,cmp:si,coerce:ni,Comparator:ii,Range:oi,satisfies:ai,toComparators:ci,maxSatisfying:li,minSatisfying:ui,minVersion:fi,validRange:hi,outside:Ei,gtr:pi,ltr:mi,intersects:$i,simplifyRange:Ri,subset:di,SemVer:jn,re:de.re,src:de.src,tokens:de.t,SEMVER_SPEC_VERSION:ot.SEMVER_SPEC_VERSION,RELEASE_TYPES:ot.RELEASE_TYPES,compareIdentifiers:at.compareIdentifiers,rcompareIdentifiers:at.rcompareIdentifiers}});var Ni={};gt(Ni,{ngAdd:()=>Li});module.exports=Nt(Ni);var Q=require("@angular-devkit/schematics/tasks");var J=require("@angular-devkit/schematics"),A=Lt(lt());var K=t=>JSON.stringify(t,null,2),Z=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function Ie(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new J.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ut=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&Ie("package.json",t);if(s===void 0)throw new J.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let a=e[o],u=a.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,A.intersects)(f,a.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}catch($){f!==a.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}else u[o]=a.version}),Z(t,"package.json",K(s))},v="^12.4.0",ft=(t,e)=>{var i;if(!t.exists("package.json"))throw new J.SchematicsException("Could not locate package.json");let r=Ie("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=v,e.logger.info(`Added firebase ${v} to your package.json.`),Z(t,"package.json",K(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,A.subset)(a,v)}catch(f){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${v}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=v,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${v}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&Z(t,"package.json",K(r)),n},Ii="21.0.0-rc.0-canary.f54c0fe",ht=(t,e,r=Ii)=>{if(!t.exists("package.json"))return;let s=Ie("package.json",t),n=["dependencies","devDependencies"].find(o=>{var a;return typeof((a=s[o])==null?void 0:a["@angular/fire"])=="string"});if(!n)return;let i=s[n]["@angular/fire"];if(i.startsWith("^")||i.startsWith("~")){if(!(0,A.valid)(r)){e.logger.warn("Could not determine the installed @angular/fire version; leaving the declared version range as-is.");return}(0,A.prerelease)(r)&&(0,A.satisfies)(r,i,{includePrerelease:!0})&&(s[n]["@angular/fire"]=r,Z(t,"package.json",K(s)),e.logger.info(`Pinned @angular/fire to the exact version ${r} \u2014 a prerelease range like ${i} also matches unreviewed canary builds, so a later install could silently change versions.`))}};var Et={};var Li=t=>(e,r)=>{ut(e,Et,r),ft(e,r),ht(e,r);let s=r.addTask(new Q.NodePackageInstallTask);return r.addTask(new Q.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});
1
+ var mt=Object.create;var G=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},ge=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!It.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=$t(e,n))||s.enumerable});return t};var Lt=(t,e,r)=>(r=t!=null?mt(dt(t)):{},ge(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>ge(G({},"__esModule",{value:!0}),t);var P=p((Oi,Le)=>{"use strict";var St="2.0.0",Ot=Number.MAX_SAFE_INTEGER||9007199254740991,Tt=16,At=250,wt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Le.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tt,MAX_SAFE_BUILD_LENGTH:At,MAX_SAFE_INTEGER:Ot,RELEASE_TYPES:wt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((Ti,Ne)=>{"use strict";var qt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ne.exports=qt});var q=p((T,Se)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ee,MAX_SAFE_BUILD_LENGTH:vt,MAX_LENGTH:Pt}=P(),xt=x();T=Se.exports={};var Ct=T.re=[],Dt=T.safeRe=[],c=T.src=[],yt=T.safeSrc=[],l=T.t={},jt=0,re="[a-zA-Z0-9-]",Ft=[["\\s",1],["\\d",Pt],[re,vt]],Gt=t=>{for(let[e,r]of Ft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Gt(e),n=jt++;xt(t,n,e),l[t]=n,c[n]=e,yt[n]=s,Ct[n]=new RegExp(e,r?"g":void 0),Dt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${re}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${re}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ee}})(?:\\.(\\d{1,${ee}}))?(?:\\.(\\d{1,${ee}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=p((Ai,Oe)=>{"use strict";var bt=Object.freeze({loose:!0}),Ut=Object.freeze({}),Vt=t=>t?typeof t!="object"?bt:t:Ut;Oe.exports=Vt});var te=p((wi,we)=>{"use strict";var Te=/^[0-9]+$/,Ae=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Te.test(t),s=Te.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xt=(t,e)=>Ae(e,t);we.exports={compareIdentifiers:Ae,rcompareIdentifiers:Xt}});var I=p((qi,ve)=>{"use strict";var U=x(),{MAX_LENGTH:qe,MAX_SAFE_INTEGER:V}=P(),{safeRe:X,t:k}=q(),kt=b(),{compareIdentifiers:se}=te(),ne=class t{constructor(e,r){if(r=kt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>qe)throw new TypeError(`version is longer than ${qe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),se(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ve.exports=ne});var w=p((vi,xe)=>{"use strict";var Pe=I(),_t=(t,e,r=!1)=>{if(t instanceof Pe)return t;try{return new Pe(t,e)}catch(s){if(!r)return null;throw s}};xe.exports=_t});var De=p((Pi,Ce)=>{"use strict";var Ht=w(),Wt=(t,e)=>{let r=Ht(t,e);return r?r.version:null};Ce.exports=Wt});var je=p((xi,ye)=>{"use strict";var Mt=w(),Yt=(t,e)=>{let r=Mt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ye.exports=Yt});var be=p((Ci,Ge)=>{"use strict";var Fe=I(),Bt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Fe(t instanceof Fe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ge.exports=Bt});var Xe=p((Di,Ve)=>{"use strict";var Ue=w(),zt=(t,e)=>{let r=Ue(t,null,!0),s=Ue(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ve.exports=zt});var _e=p((yi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).major;ke.exports=Zt});var We=p((ji,He)=>{"use strict";var Jt=I(),Qt=(t,e)=>new Jt(t,e).minor;He.exports=Qt});var Ye=p((Fi,Me)=>{"use strict";var es=I(),rs=(t,e)=>new es(t,e).patch;Me.exports=rs});var ze=p((Gi,Be)=>{"use strict";var ts=w(),ss=(t,e)=>{let r=ts(t,e);return r&&r.prerelease.length?r.prerelease:null};Be.exports=ss});var S=p((bi,Ze)=>{"use strict";var Ke=I(),ns=(t,e,r)=>new Ke(t,r).compare(new Ke(e,r));Ze.exports=ns});var Qe=p((Ui,Je)=>{"use strict";var is=S(),os=(t,e,r)=>is(e,t,r);Je.exports=os});var rr=p((Vi,er)=>{"use strict";var as=S(),cs=(t,e)=>as(t,e,!0);er.exports=cs});var _=p((Xi,sr)=>{"use strict";var tr=I(),ls=(t,e,r)=>{let s=new tr(t,r),n=new tr(e,r);return s.compare(n)||s.compareBuild(n)};sr.exports=ls});var ir=p((ki,nr)=>{"use strict";var us=_(),fs=(t,e)=>t.sort((r,s)=>us(r,s,e));nr.exports=fs});var ar=p((_i,or)=>{"use strict";var hs=_(),Es=(t,e)=>t.sort((r,s)=>hs(s,r,e));or.exports=Es});var C=p((Hi,cr)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)>0;cr.exports=ms});var H=p((Wi,lr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)<0;lr.exports=Rs});var ie=p((Mi,ur)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)===0;ur.exports=Is});var oe=p((Yi,fr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)!==0;fr.exports=Ls});var W=p((Bi,hr)=>{"use strict";var Ns=S(),Ss=(t,e,r)=>Ns(t,e,r)>=0;hr.exports=Ss});var M=p((zi,Er)=>{"use strict";var Os=S(),Ts=(t,e,r)=>Os(t,e,r)<=0;Er.exports=Ts});var ae=p((Ki,pr)=>{"use strict";var As=ie(),ws=oe(),qs=C(),vs=W(),Ps=H(),xs=M(),Cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return As(t,r,s);case"!=":return ws(t,r,s);case">":return qs(t,r,s);case">=":return vs(t,r,s);case"<":return Ps(t,r,s);case"<=":return xs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};pr.exports=Cs});var $r=p((Zi,mr)=>{"use strict";var Ds=I(),ys=w(),{safeRe:Y,t:B}=q(),js=(t,e)=>{if(t instanceof Ds)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ys(`${s}.${n}.${i}${o}${a}`,e)};mr.exports=js});var dr=p((Ji,Rr)=>{"use strict";var ce=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Rr.exports=ce});var O=p((Qi,Nr)=>{"use strict";var Fs=/\s+/g,le=class t{constructor(e,r){if(r=bs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ue)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Fs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!gr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Ws(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&_s)|(this.options.loose&&Hs))+":"+e,n=Ir.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,rn(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Vs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Xs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],ks),R("caret trim",e);let a=e.split(" ").map(h=>Ms(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));i&&(a=a.filter(h=>(R("loose invalid filter",h,this.options),!!h.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,f=a.map(h=>new ue(h,this.options));for(let h of f){if(gr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Ir.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Lr(s,r)&&e.set.some(n=>Lr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Us(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(tn(this.set[r],e,this.options))return!0;return!1}};Nr.exports=le;var Gs=dr(),Ir=new Gs,bs=b(),ue=D(),R=x(),Us=I(),{safeRe:L,t:g,comparatorTrimReplace:Vs,tildeTrimReplace:Xs,caretTrimReplace:ks}=q(),{FLAG_INCLUDE_PRERELEASE:_s,FLAG_LOOSE:Hs}=P(),gr=t=>t.value==="<0.0.0-0",Ws=t=>t.value==="",Lr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ms=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=zs(t,e),R("caret",t),t=Ys(t,e),R("tildes",t),t=Zs(t,e),R("xrange",t),t=Qs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Ys=(t,e)=>t.trim().split(/\s+/).map(r=>Bs(r,e)).join(" "),Bs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},zs=(t,e)=>t.trim().split(/\s+/).map(r=>Ks(r,e)).join(" "),Ks=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let f;return N(i)?f="":N(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",f),f})},Zs=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Js(r,e)).join(" ")),Js=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let f=N(i),$=f||N(o),h=$||N(a),d=h;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Qs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),en=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),rn=t=>(e,r,s,n,i,o,a,u,f,$,h,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(f)?u="":N($)?u=`<${+f+1}.0.0-0`:N(h)?u=`<${f}.${+$+1}.0-0`:d?u=`<=${f}.${$}.${h}-${d}`:t?u=`<${f}.${$}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),tn=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ue.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((eo,qr)=>{"use strict";var y=Symbol("SemVer ANY"),Ee=class t{static get ANY(){return y}constructor(e,r){if(r=Sr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),he("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,he("comp",this)}parse(e){let r=this.options.loose?Or[Tr.COMPARATORLOOSE]:Or[Tr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(he("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch(r){return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new wr(this.value,r).test(e.semver):(r=Sr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};qr.exports=Ee;var Sr=b(),{safeRe:Or,t:Tr}=q(),fe=ae(),he=x(),Ar=I(),wr=O()});var j=p((ro,vr)=>{"use strict";var sn=O(),nn=(t,e,r)=>{try{e=new sn(e,r)}catch(s){return!1}return e.test(t)};vr.exports=nn});var xr=p((to,Pr)=>{"use strict";var on=O(),an=(t,e)=>new on(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Pr.exports=an});var Dr=p((so,Cr)=>{"use strict";var cn=I(),ln=O(),un=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ln(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new cn(s,r))}),s};Cr.exports=un});var jr=p((no,yr)=>{"use strict";var fn=I(),hn=O(),En=(t,e,r)=>{let s=null,n=null,i=null;try{i=new hn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new fn(s,r))}),s};yr.exports=En});var br=p((io,Gr)=>{"use strict";var pe=I(),pn=O(),Fr=C(),mn=(t,e)=>{t=new pn(t,e);let r=new pe("0.0.0");if(t.test(r)||(r=new pe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new pe(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Fr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Fr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Gr.exports=mn});var Vr=p((oo,Ur)=>{"use strict";var $n=O(),Rn=(t,e)=>{try{return new $n(t,e).range||"*"}catch(r){return null}};Ur.exports=Rn});var z=p((ao,Hr)=>{"use strict";var dn=I(),_r=D(),{ANY:In}=_r,gn=O(),Ln=j(),Xr=C(),kr=H(),Nn=M(),Sn=W(),On=(t,e,r,s)=>{t=new dn(t,s),e=new gn(e,s);let n,i,o,a,u;switch(r){case">":n=Xr,i=Nn,o=kr,a=">",u=">=";break;case"<":n=kr,i=Sn,o=Xr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ln(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],h=null,d=null;if($.forEach(E=>{E.semver===In&&(E=new _r(">=0.0.0")),h=h||E,d=d||E,n(E.semver,h.semver,s)?h=E:o(E.semver,d.semver,s)&&(d=E)}),h.operator===a||h.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Hr.exports=On});var Mr=p((co,Wr)=>{"use strict";var Tn=z(),An=(t,e,r)=>Tn(t,e,">",r);Wr.exports=An});var Br=p((lo,Yr)=>{"use strict";var wn=z(),qn=(t,e,r)=>wn(t,e,"<",r);Yr.exports=qn});var Zr=p((uo,Kr)=>{"use strict";var zr=O(),vn=(t,e,r)=>(t=new zr(t,r),e=new zr(e,r),t.intersects(e,r));Kr.exports=vn});var Qr=p((fo,Jr)=>{"use strict";var Pn=j(),xn=S();Jr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,h)=>xn($,h,r));for(let $ of o)Pn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,h]of s)$===h?a.push($):!h&&$===o[0]?a.push("*"):h?$===o[0]?a.push(`<=${h}`):a.push(`${$} - ${h}`):a.push(`>=${$}`);let u=a.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var it=p((ho,nt)=>{"use strict";var et=O(),$e=D(),{ANY:me}=$e,F=j(),Re=S(),Cn=(t,e,r={})=>{if(t===e)return!0;t=new et(t,r),e=new et(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=yn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Dn=[new $e(">=0.0.0-0")],rt=[new $e(">=0.0.0")],yn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===me){if(e.length===1&&e[0].semver===me)return!0;r.includePrerelease?t=Dn:t=rt}if(e.length===1&&e[0].semver===me){if(r.includePrerelease)return!0;e=rt}let s=new Set,n,i;for(let E of t)E.operator===">"||E.operator===">="?n=tt(n,E,r):E.operator==="<"||E.operator==="<="?i=st(i,E,r):s.add(E.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Re(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let E of s){if(n&&!F(E,String(n),r)||i&&!F(E,String(i),r))return null;for(let pt of e)if(!F(E,String(pt),r))return!1;return!0}let a,u,f,$,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let E of e){if($=$||E.operator===">"||E.operator===">=",f=f||E.operator==="<"||E.operator==="<=",n){if(d&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===d.major&&E.semver.minor===d.minor&&E.semver.patch===d.patch&&(d=!1),E.operator===">"||E.operator===">="){if(a=tt(n,E,r),a===E&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(E),r))return!1}if(i){if(h&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===h.major&&E.semver.minor===h.minor&&E.semver.patch===h.patch&&(h=!1),E.operator==="<"||E.operator==="<="){if(u=st(i,E,r),u===E&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(E),r))return!1}if(!E.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||d||h)},tt=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},st=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};nt.exports=Cn});var lt=p((Eo,ct)=>{"use strict";var de=q(),ot=P(),jn=I(),at=te(),Fn=w(),Gn=De(),bn=je(),Un=be(),Vn=Xe(),Xn=_e(),kn=We(),_n=Ye(),Hn=ze(),Wn=S(),Mn=Qe(),Yn=rr(),Bn=_(),zn=ir(),Kn=ar(),Zn=C(),Jn=H(),Qn=ie(),ei=oe(),ri=W(),ti=M(),si=ae(),ni=$r(),ii=D(),oi=O(),ai=j(),ci=xr(),li=Dr(),ui=jr(),fi=br(),hi=Vr(),Ei=z(),pi=Mr(),mi=Br(),$i=Zr(),Ri=Qr(),di=it();ct.exports={parse:Fn,valid:Gn,clean:bn,inc:Un,diff:Vn,major:Xn,minor:kn,patch:_n,prerelease:Hn,compare:Wn,rcompare:Mn,compareLoose:Yn,compareBuild:Bn,sort:zn,rsort:Kn,gt:Zn,lt:Jn,eq:Qn,neq:ei,gte:ri,lte:ti,cmp:si,coerce:ni,Comparator:ii,Range:oi,satisfies:ai,toComparators:ci,maxSatisfying:li,minSatisfying:ui,minVersion:fi,validRange:hi,outside:Ei,gtr:pi,ltr:mi,intersects:$i,simplifyRange:Ri,subset:di,SemVer:jn,re:de.re,src:de.src,tokens:de.t,SEMVER_SPEC_VERSION:ot.SEMVER_SPEC_VERSION,RELEASE_TYPES:ot.RELEASE_TYPES,compareIdentifiers:at.compareIdentifiers,rcompareIdentifiers:at.rcompareIdentifiers}});var Ni={};gt(Ni,{ngAdd:()=>Li});module.exports=Nt(Ni);var Q=require("@angular-devkit/schematics/tasks");var J=require("@angular-devkit/schematics"),A=Lt(lt());var K=t=>JSON.stringify(t,null,2),Z=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function Ie(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new J.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ut=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&Ie("package.json",t);if(s===void 0)throw new J.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let a=e[o],u=a.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,A.intersects)(f,a.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}catch($){f!==a.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}else u[o]=a.version}),Z(t,"package.json",K(s))},v="^12.4.0",ft=(t,e)=>{var i;if(!t.exists("package.json"))throw new J.SchematicsException("Could not locate package.json");let r=Ie("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=v,e.logger.info(`Added firebase ${v} to your package.json.`),Z(t,"package.json",K(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,A.subset)(a,v)}catch(f){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${v}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=v,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${v}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&Z(t,"package.json",K(r)),n},Ii="21.0.0-rc.0-canary.b551b5f",ht=(t,e,r=Ii)=>{if(!t.exists("package.json"))return;let s=Ie("package.json",t),n=["dependencies","devDependencies"].find(o=>{var a;return typeof((a=s[o])==null?void 0:a["@angular/fire"])=="string"});if(!n)return;let i=s[n]["@angular/fire"];if(i.startsWith("^")||i.startsWith("~")){if(!(0,A.valid)(r)){e.logger.warn("Could not determine the installed @angular/fire version; leaving the declared version range as-is.");return}(0,A.prerelease)(r)&&(0,A.satisfies)(r,i,{includePrerelease:!0})&&(s[n]["@angular/fire"]=r,Z(t,"package.json",K(s)),e.logger.info(`Pinned @angular/fire to the exact version ${r} \u2014 a prerelease range like ${i} also matches unreviewed canary builds, so a later install could silently change versions.`))}};var Et={};var Li=t=>(e,r)=>{ut(e,Et,r),ft(e,r),ht(e,r);let s=r.addTask(new Q.NodePackageInstallTask);return r.addTask(new Q.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "migration-v21": {
10
10
  "version": "21.0.0",
11
- "description": "Align the workspace's firebase dependency with the range @angular/fire 21 requires, so the install cannot contain two copies of the firebase SDK",
11
+ "description": "Align the workspace's firebase dependency with the range @angular/fire 21 requires, and rewrite Vertex AI imports to Firebase AI Logic (getVertexAI callers keep the Vertex AI backend)",
12
12
  "factory": "./update/v21#ngUpdate"
13
13
  },
14
14
  "ng-post-upgate": {
@@ -1 +1 @@
1
- var ft=Object.create;var G=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var pt=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$t=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},$e=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Et(e))!mt.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=ht(e,n))||s.enumerable});return t};var Rt=(t,e,r)=>(r=t!=null?ft(pt(t)):{},$e(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),dt=t=>$e(G({},"__esModule",{value:!0}),t);var x=E((Ii,Re)=>{"use strict";var It="2.0.0",gt=Number.MAX_SAFE_INTEGER||9007199254740991,Lt=16,Nt=250,St=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Re.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Lt,MAX_SAFE_BUILD_LENGTH:Nt,MAX_SAFE_INTEGER:gt,RELEASE_TYPES:St,SEMVER_SPEC_VERSION:It,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var P=E((gi,de)=>{"use strict";var Ot=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};de.exports=Ot});var w=E((T,Ie)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:K,MAX_SAFE_BUILD_LENGTH:Tt,MAX_LENGTH:At}=x(),wt=P();T=Ie.exports={};var qt=T.re=[],vt=T.safeRe=[],c=T.src=[],xt=T.safeSrc=[],l=T.t={},Pt=0,Z="[a-zA-Z0-9-]",Ct=[["\\s",1],["\\d",At],[Z,Tt]],yt=t=>{for(let[e,r]of Ct)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=yt(e),n=Pt++;wt(t,n,e),l[t]=n,c[n]=e,xt[n]=s,qt[n]=new RegExp(e,r?"g":void 0),vt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Z}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${Z}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${K}})(?:\\.(\\d{1,${K}}))?(?:\\.(\\d{1,${K}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=E((Li,ge)=>{"use strict";var Dt=Object.freeze({loose:!0}),jt=Object.freeze({}),Ft=t=>t?typeof t!="object"?Dt:t:jt;ge.exports=Ft});var J=E((Ni,Se)=>{"use strict";var Le=/^[0-9]+$/,Ne=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Le.test(t),s=Le.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Gt=(t,e)=>Ne(e,t);Se.exports={compareIdentifiers:Ne,rcompareIdentifiers:Gt}});var I=E((Si,Te)=>{"use strict";var U=P(),{MAX_LENGTH:Oe,MAX_SAFE_INTEGER:V}=x(),{safeRe:X,t:k}=w(),bt=b(),{compareIdentifiers:Q}=J(),ee=class t{constructor(e,r){if(r=bt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Oe)throw new TypeError(`version is longer than ${Oe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return Q(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return Q(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),Q(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Te.exports=ee});var A=E((Oi,we)=>{"use strict";var Ae=I(),Ut=(t,e,r=!1)=>{if(t instanceof Ae)return t;try{return new Ae(t,e)}catch(s){if(!r)return null;throw s}};we.exports=Ut});var ve=E((Ti,qe)=>{"use strict";var Vt=A(),Xt=(t,e)=>{let r=Vt(t,e);return r?r.version:null};qe.exports=Xt});var Pe=E((Ai,xe)=>{"use strict";var kt=A(),_t=(t,e)=>{let r=kt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};xe.exports=_t});var De=E((wi,ye)=>{"use strict";var Ce=I(),Ht=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Ce(t instanceof Ce?t.version:t,r).inc(e,s,n).version}catch(i){return null}};ye.exports=Ht});var Ge=E((qi,Fe)=>{"use strict";var je=A(),Wt=(t,e)=>{let r=je(t,null,!0),s=je(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Fe.exports=Wt});var Ue=E((vi,be)=>{"use strict";var Mt=I(),Yt=(t,e)=>new Mt(t,e).major;be.exports=Yt});var Xe=E((xi,Ve)=>{"use strict";var Bt=I(),zt=(t,e)=>new Bt(t,e).minor;Ve.exports=zt});var _e=E((Pi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).patch;ke.exports=Zt});var We=E((Ci,He)=>{"use strict";var Jt=A(),Qt=(t,e)=>{let r=Jt(t,e);return r&&r.prerelease.length?r.prerelease:null};He.exports=Qt});var S=E((yi,Ye)=>{"use strict";var Me=I(),es=(t,e,r)=>new Me(t,r).compare(new Me(e,r));Ye.exports=es});var ze=E((Di,Be)=>{"use strict";var rs=S(),ts=(t,e,r)=>rs(e,t,r);Be.exports=ts});var Ze=E((ji,Ke)=>{"use strict";var ss=S(),ns=(t,e)=>ss(t,e,!0);Ke.exports=ns});var _=E((Fi,Qe)=>{"use strict";var Je=I(),is=(t,e,r)=>{let s=new Je(t,r),n=new Je(e,r);return s.compare(n)||s.compareBuild(n)};Qe.exports=is});var rr=E((Gi,er)=>{"use strict";var os=_(),as=(t,e)=>t.sort((r,s)=>os(r,s,e));er.exports=as});var sr=E((bi,tr)=>{"use strict";var cs=_(),ls=(t,e)=>t.sort((r,s)=>cs(s,r,e));tr.exports=ls});var C=E((Ui,nr)=>{"use strict";var us=S(),fs=(t,e,r)=>us(t,e,r)>0;nr.exports=fs});var H=E((Vi,ir)=>{"use strict";var hs=S(),Es=(t,e,r)=>hs(t,e,r)<0;ir.exports=Es});var re=E((Xi,or)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)===0;or.exports=ms});var te=E((ki,ar)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)!==0;ar.exports=Rs});var W=E((_i,cr)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)>=0;cr.exports=Is});var M=E((Hi,lr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)<=0;lr.exports=Ls});var se=E((Wi,ur)=>{"use strict";var Ns=re(),Ss=te(),Os=C(),Ts=W(),As=H(),ws=M(),qs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Ns(t,r,s);case"!=":return Ss(t,r,s);case">":return Os(t,r,s);case">=":return Ts(t,r,s);case"<":return As(t,r,s);case"<=":return ws(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};ur.exports=qs});var hr=E((Mi,fr)=>{"use strict";var vs=I(),xs=A(),{safeRe:Y,t:B}=w(),Ps=(t,e)=>{if(t instanceof vs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],p;for(;(p=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||p.index+p[0].length!==r.index+r[0].length)&&(r=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return xs(`${s}.${n}.${i}${o}${a}`,e)};fr.exports=Ps});var pr=E((Yi,Er)=>{"use strict";var ne=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Er.exports=ne});var O=E((Bi,dr)=>{"use strict";var Cs=/\s+/g,ie=class t{constructor(e,r){if(r=Ds(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof oe)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Cs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!$r(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Xs(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Us)|(this.options.loose&&Vs))+":"+e,n=mr.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,Zs(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Fs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Gs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],bs),R("caret trim",e);let a=e.split(" ").map(f=>ks(f,this.options)).join(" ").split(/\s+/).map(f=>Ks(f,this.options));i&&(a=a.filter(f=>(R("loose invalid filter",f,this.options),!!f.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,p=a.map(f=>new oe(f,this.options));for(let f of p){if($r(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return mr.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Rr(s,r)&&e.set.some(n=>Rr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new js(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(Js(this.set[r],e,this.options))return!0;return!1}};dr.exports=ie;var ys=pr(),mr=new ys,Ds=b(),oe=y(),R=P(),js=I(),{safeRe:L,t:g,comparatorTrimReplace:Fs,tildeTrimReplace:Gs,caretTrimReplace:bs}=w(),{FLAG_INCLUDE_PRERELEASE:Us,FLAG_LOOSE:Vs}=x(),$r=t=>t.value==="<0.0.0-0",Xs=t=>t.value==="",Rr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},ks=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=Ws(t,e),R("caret",t),t=_s(t,e),R("tildes",t),t=Ys(t,e),R("xrange",t),t=zs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",_s=(t,e)=>t.trim().split(/\s+/).map(r=>Hs(r,e)).join(" "),Hs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},Ws=(t,e)=>t.trim().split(/\s+/).map(r=>Ms(r,e)).join(" "),Ms=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let p;return N(i)?p="":N(o)?p=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?p=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:p=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?p=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:p=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:p=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?p=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:p=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:p=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",p),p})},Ys=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Bs(r,e)).join(" ")),Bs=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let p=N(i),$=p||N(o),f=$||N(a),d=f;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",p?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:f&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},zs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),Ks=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),Zs=t=>(e,r,s,n,i,o,a,u,p,$,f,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(p)?u="":N($)?u=`<${+p+1}.0.0-0`:N(f)?u=`<${p}.${+$+1}.0-0`:d?u=`<=${p}.${$}.${f}-${d}`:t?u=`<${p}.${$}.${+f+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),Js=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==oe.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var y=E((zi,Or)=>{"use strict";var D=Symbol("SemVer ANY"),le=class t{static get ANY(){return D}constructor(e,r){if(r=Ir(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ce("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,ce("comp",this)}parse(e){let r=this.options.loose?gr[Lr.COMPARATORLOOSE]:gr[Lr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Nr(s[2],this.options.loose):this.semver=D}toString(){return this.value}test(e){if(ce("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if(typeof e=="string")try{e=new Nr(e,this.options)}catch(r){return!1}return ae(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Sr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Sr(this.value,r).test(e.semver):(r=Ir(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ae(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ae(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Or.exports=le;var Ir=b(),{safeRe:gr,t:Lr}=w(),ae=se(),ce=P(),Nr=I(),Sr=O()});var j=E((Ki,Tr)=>{"use strict";var Qs=O(),en=(t,e,r)=>{try{e=new Qs(e,r)}catch(s){return!1}return e.test(t)};Tr.exports=en});var wr=E((Zi,Ar)=>{"use strict";var rn=O(),tn=(t,e)=>new rn(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Ar.exports=tn});var vr=E((Ji,qr)=>{"use strict";var sn=I(),nn=O(),on=(t,e,r)=>{let s=null,n=null,i=null;try{i=new nn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new sn(s,r))}),s};qr.exports=on});var Pr=E((Qi,xr)=>{"use strict";var an=I(),cn=O(),ln=(t,e,r)=>{let s=null,n=null,i=null;try{i=new cn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new an(s,r))}),s};xr.exports=ln});var Dr=E((eo,yr)=>{"use strict";var ue=I(),un=O(),Cr=C(),fn=(t,e)=>{t=new un(t,e);let r=new ue("0.0.0");if(t.test(r)||(r=new ue("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new ue(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Cr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Cr(r,i))&&(r=i)}return r&&t.test(r)?r:null};yr.exports=fn});var Fr=E((ro,jr)=>{"use strict";var hn=O(),En=(t,e)=>{try{return new hn(t,e).range||"*"}catch(r){return null}};jr.exports=En});var z=E((to,Vr)=>{"use strict";var pn=I(),Ur=y(),{ANY:mn}=Ur,$n=O(),Rn=j(),Gr=C(),br=H(),dn=M(),In=W(),gn=(t,e,r,s)=>{t=new pn(t,s),e=new $n(e,s);let n,i,o,a,u;switch(r){case">":n=Gr,i=dn,o=br,a=">",u=">=";break;case"<":n=br,i=In,o=Gr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Rn(t,e,s))return!1;for(let p=0;p<e.set.length;++p){let $=e.set[p],f=null,d=null;if($.forEach(h=>{h.semver===mn&&(h=new Ur(">=0.0.0")),f=f||h,d=d||h,n(h.semver,f.semver,s)?f=h:o(h.semver,d.semver,s)&&(d=h)}),f.operator===a||f.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Vr.exports=gn});var kr=E((so,Xr)=>{"use strict";var Ln=z(),Nn=(t,e,r)=>Ln(t,e,">",r);Xr.exports=Nn});var Hr=E((no,_r)=>{"use strict";var Sn=z(),On=(t,e,r)=>Sn(t,e,"<",r);_r.exports=On});var Yr=E((io,Mr)=>{"use strict";var Wr=O(),Tn=(t,e,r)=>(t=new Wr(t,r),e=new Wr(e,r),t.intersects(e,r));Mr.exports=Tn});var zr=E((oo,Br)=>{"use strict";var An=j(),wn=S();Br.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,f)=>wn($,f,r));for(let $ of o)An($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,f]of s)$===f?a.push($):!f&&$===o[0]?a.push("*"):f?$===o[0]?a.push(`<=${f}`):a.push(`${$} - ${f}`):a.push(`>=${$}`);let u=a.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var rt=E((ao,et)=>{"use strict";var Kr=O(),he=y(),{ANY:fe}=he,F=j(),Ee=S(),qn=(t,e,r={})=>{if(t===e)return!0;t=new Kr(t,r),e=new Kr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=xn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},vn=[new he(">=0.0.0-0")],Zr=[new he(">=0.0.0")],xn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===fe){if(e.length===1&&e[0].semver===fe)return!0;r.includePrerelease?t=vn:t=Zr}if(e.length===1&&e[0].semver===fe){if(r.includePrerelease)return!0;e=Zr}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Jr(n,h,r):h.operator==="<"||h.operator==="<="?i=Qr(i,h,r):s.add(h.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Ee(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!F(h,String(n),r)||i&&!F(h,String(i),r))return null;for(let ut of e)if(!F(h,String(ut),r))return!1;return!0}let a,u,p,$,f=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if($=$||h.operator===">"||h.operator===">=",p=p||h.operator==="<"||h.operator==="<=",n){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator===">"||h.operator===">="){if(a=Jr(n,h,r),a===h&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(h),r))return!1}if(i){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(u=Qr(i,h,r),u===h&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(h),r))return!1}if(!h.operator&&(i||n)&&o!==0)return!1}return!(n&&p&&!i&&o!==0||i&&$&&!n&&o!==0||d||f)},Jr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Qr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};et.exports=qn});var it=E((co,nt)=>{"use strict";var pe=w(),tt=x(),Pn=I(),st=J(),Cn=A(),yn=ve(),Dn=Pe(),jn=De(),Fn=Ge(),Gn=Ue(),bn=Xe(),Un=_e(),Vn=We(),Xn=S(),kn=ze(),_n=Ze(),Hn=_(),Wn=rr(),Mn=sr(),Yn=C(),Bn=H(),zn=re(),Kn=te(),Zn=W(),Jn=M(),Qn=se(),ei=hr(),ri=y(),ti=O(),si=j(),ni=wr(),ii=vr(),oi=Pr(),ai=Dr(),ci=Fr(),li=z(),ui=kr(),fi=Hr(),hi=Yr(),Ei=zr(),pi=rt();nt.exports={parse:Cn,valid:yn,clean:Dn,inc:jn,diff:Fn,major:Gn,minor:bn,patch:Un,prerelease:Vn,compare:Xn,rcompare:kn,compareLoose:_n,compareBuild:Hn,sort:Wn,rsort:Mn,gt:Yn,lt:Bn,eq:zn,neq:Kn,gte:Zn,lte:Jn,cmp:Qn,coerce:ei,Comparator:ri,Range:ti,satisfies:si,toComparators:ni,maxSatisfying:ii,minSatisfying:oi,minVersion:ai,validRange:ci,outside:li,gtr:ui,ltr:fi,intersects:hi,simplifyRange:Ei,subset:pi,SemVer:Pn,re:pe.re,src:pe.src,tokens:pe.t,SEMVER_SPEC_VERSION:tt.SEMVER_SPEC_VERSION,RELEASE_TYPES:tt.RELEASE_TYPES,compareIdentifiers:st.compareIdentifiers,rcompareIdentifiers:st.rcompareIdentifiers}});var Ri={};$t(Ri,{ngUpdate:()=>$i});module.exports=dt(Ri);var lt=require("@angular-devkit/schematics/tasks/index.js");var me=require("@angular-devkit/schematics"),v=Rt(it());var ot=t=>JSON.stringify(t,null,2),at=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function mi(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new me.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var q="^12.4.0",ct=(t,e)=>{var i;if(!t.exists("package.json"))throw new me.SchematicsException("Could not locate package.json");let r=mi("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=q,e.logger.info(`Added firebase ${q} to your package.json.`),at(t,"package.json",ot(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,v.subset)(a,q)}catch(p){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${q}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=q,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${q}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&at(t,"package.json",ot(r)),n};var $i=()=>(t,e)=>(ct(t,e)&&e.addTask(new lt.NodePackageInstallTask),t);0&&(module.exports={ngUpdate});
1
+ var jr=Object.create;var j=Object.defineProperty,kr=Object.defineProperties,Gr=Object.getOwnPropertyDescriptor,_r=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,Br=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable;var Oe=(t,e,r)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oe=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&Oe(t,r,e[r]);if(ve)for(var r of ve(e))Mr.call(e,r)&&Oe(t,r,e[r]);return t},be=(t,e)=>kr(t,_r(e));var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xr=(t,e)=>{for(var r in e)j(t,r,{get:e[r],enumerable:!0})},Fe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ur(e))!Ce.call(t,i)&&i!==r&&j(t,i,{get:()=>e[i],enumerable:!(s=Gr(e,i))||s.enumerable});return t};var Hr=(t,e,r)=>(r=t!=null?jr(Br(t)):{},Fe(e||!t||!t.__esModule?j(r,"default",{value:t,enumerable:!0}):r,t)),Wr=t=>Fe(j({},"__esModule",{value:!0}),t);var k=E((go,De)=>{"use strict";var Yr="2.0.0",zr=Number.MAX_SAFE_INTEGER||9007199254740991,Kr=16,Qr=250,Zr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];De.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Kr,MAX_SAFE_BUILD_LENGTH:Qr,MAX_SAFE_INTEGER:zr,RELEASE_TYPES:Zr,SEMVER_SPEC_VERSION:Yr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var G=E((Io,qe)=>{"use strict";var Jr=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};qe.exports=Jr});var F=E((w,Pe)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ae,MAX_SAFE_BUILD_LENGTH:es,MAX_LENGTH:ts}=k(),rs=G();w=Pe.exports={};var ss=w.re=[],is=w.safeRe=[],p=w.src=[],ns=w.safeSrc=[],f=w.t={},os=0,ce="[a-zA-Z0-9-]",as=[["\\s",1],["\\d",ts],[ce,es]],cs=t=>{for(let[e,r]of as)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},h=(t,e,r)=>{let s=cs(e),i=os++;rs(t,i,e),f[t]=i,p[i]=e,ns[i]=s,ss[i]=new RegExp(e,r?"g":void 0),is[i]=new RegExp(s,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*");h("NUMERICIDENTIFIERLOOSE","\\d+");h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ce}*`);h("MAINVERSION",`(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})\\.(${p[f.NUMERICIDENTIFIER]})`);h("MAINVERSIONLOOSE",`(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})\\.(${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASEIDENTIFIER",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIER]})`);h("PRERELEASEIDENTIFIERLOOSE",`(?:${p[f.NONNUMERICIDENTIFIER]}|${p[f.NUMERICIDENTIFIERLOOSE]})`);h("PRERELEASE",`(?:-(${p[f.PRERELEASEIDENTIFIER]}(?:\\.${p[f.PRERELEASEIDENTIFIER]})*))`);h("PRERELEASELOOSE",`(?:-?(${p[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[f.PRERELEASEIDENTIFIERLOOSE]})*))`);h("BUILDIDENTIFIER",`${ce}+`);h("BUILD",`(?:\\+(${p[f.BUILDIDENTIFIER]}(?:\\.${p[f.BUILDIDENTIFIER]})*))`);h("FULLPLAIN",`v?${p[f.MAINVERSION]}${p[f.PRERELEASE]}?${p[f.BUILD]}?`);h("FULL",`^${p[f.FULLPLAIN]}$`);h("LOOSEPLAIN",`[v=\\s]*${p[f.MAINVERSIONLOOSE]}${p[f.PRERELEASELOOSE]}?${p[f.BUILD]}?`);h("LOOSE",`^${p[f.LOOSEPLAIN]}$`);h("GTLT","((?:<|>)?=?)");h("XRANGEIDENTIFIERLOOSE",`${p[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);h("XRANGEIDENTIFIER",`${p[f.NUMERICIDENTIFIER]}|x|X|\\*`);h("XRANGEPLAIN",`[v=\\s]*(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:\\.(${p[f.XRANGEIDENTIFIER]})(?:${p[f.PRERELEASE]})?${p[f.BUILD]}?)?)?`);h("XRANGEPLAINLOOSE",`[v=\\s]*(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[f.XRANGEIDENTIFIERLOOSE]})(?:${p[f.PRERELEASELOOSE]})?${p[f.BUILD]}?)?)?`);h("XRANGE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAIN]}$`);h("XRANGELOOSE",`^${p[f.GTLT]}\\s*${p[f.XRANGEPLAINLOOSE]}$`);h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ae}})(?:\\.(\\d{1,${ae}}))?(?:\\.(\\d{1,${ae}}))?`);h("COERCE",`${p[f.COERCEPLAIN]}(?:$|[^\\d])`);h("COERCEFULL",p[f.COERCEPLAIN]+`(?:${p[f.PRERELEASE]})?(?:${p[f.BUILD]})?(?:$|[^\\d])`);h("COERCERTL",p[f.COERCE],!0);h("COERCERTLFULL",p[f.COERCEFULL],!0);h("LONETILDE","(?:~>?)");h("TILDETRIM",`(\\s*)${p[f.LONETILDE]}\\s+`,!0);w.tildeTrimReplace="$1~";h("TILDE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAIN]}$`);h("TILDELOOSE",`^${p[f.LONETILDE]}${p[f.XRANGEPLAINLOOSE]}$`);h("LONECARET","(?:\\^)");h("CARETTRIM",`(\\s*)${p[f.LONECARET]}\\s+`,!0);w.caretTrimReplace="$1^";h("CARET",`^${p[f.LONECARET]}${p[f.XRANGEPLAIN]}$`);h("CARETLOOSE",`^${p[f.LONECARET]}${p[f.XRANGEPLAINLOOSE]}$`);h("COMPARATORLOOSE",`^${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]})$|^$`);h("COMPARATOR",`^${p[f.GTLT]}\\s*(${p[f.FULLPLAIN]})$|^$`);h("COMPARATORTRIM",`(\\s*)${p[f.GTLT]}\\s*(${p[f.LOOSEPLAIN]}|${p[f.XRANGEPLAIN]})`,!0);w.comparatorTrimReplace="$1$2$3";h("HYPHENRANGE",`^\\s*(${p[f.XRANGEPLAIN]})\\s+-\\s+(${p[f.XRANGEPLAIN]})\\s*$`);h("HYPHENRANGELOOSE",`^\\s*(${p[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[f.XRANGEPLAINLOOSE]})\\s*$`);h("STAR","(<|>)?=?\\s*\\*");h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var W=E((xo,Ve)=>{"use strict";var ls=Object.freeze({loose:!0}),us=Object.freeze({}),ps=t=>t?typeof t!="object"?ls:t:us;Ve.exports=ps});var le=E((So,Ge)=>{"use strict";var je=/^[0-9]+$/,ke=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=je.test(t),s=je.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},fs=(t,e)=>ke(e,t);Ge.exports={compareIdentifiers:ke,rcompareIdentifiers:fs}});var x=E(($o,Ue)=>{"use strict";var Y=G(),{MAX_LENGTH:_e,MAX_SAFE_INTEGER:z}=k(),{safeRe:K,t:Q}=F(),ms=W(),{compareIdentifiers:ue}=le(),pe=class t{constructor(e,r){if(r=ms(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>_e)throw new TypeError(`version is longer than ${_e} characters`);Y("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?K[Q.LOOSE]:K[Q.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>z||this.major<0)throw new TypeError("Invalid major version");if(this.minor>z||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>z||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<z)return n}return i}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Y("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(Y("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(Y("build compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return ue(s,i)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?K[Q.PRERELEASELOOSE]:K[Q.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let n=[r,i];s===!1&&(n=[r]),ue(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ue.exports=pe});var O=E((Ro,Me)=>{"use strict";var Be=x(),ds=(t,e,r=!1)=>{if(t instanceof Be)return t;try{return new Be(t,e)}catch(s){if(!r)return null;throw s}};Me.exports=ds});var He=E((Ao,Xe)=>{"use strict";var Es=O(),hs=(t,e)=>{let r=Es(t,e);return r?r.version:null};Xe.exports=hs});var Ye=E((No,We)=>{"use strict";var gs=O(),Is=(t,e)=>{let r=gs(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};We.exports=Is});var Qe=E((wo,Ke)=>{"use strict";var ze=x(),xs=(t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new ze(t instanceof ze?t.version:t,r).inc(e,s,i).version}catch(n){return null}};Ke.exports=xs});var et=E((Lo,Je)=>{"use strict";var Ze=O(),Ss=(t,e)=>{let r=Ze(t,null,!0),s=Ze(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,o=n?r:s,a=n?s:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let m=c?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Je.exports=Ss});var rt=E((yo,tt)=>{"use strict";var $s=x(),Rs=(t,e)=>new $s(t,e).major;tt.exports=Rs});var it=E((To,st)=>{"use strict";var As=x(),Ns=(t,e)=>new As(t,e).minor;st.exports=Ns});var ot=E((vo,nt)=>{"use strict";var ws=x(),Ls=(t,e)=>new ws(t,e).patch;nt.exports=Ls});var ct=E((Oo,at)=>{"use strict";var ys=O(),Ts=(t,e)=>{let r=ys(t,e);return r&&r.prerelease.length?r.prerelease:null};at.exports=Ts});var A=E((Co,ut)=>{"use strict";var lt=x(),vs=(t,e,r)=>new lt(t,r).compare(new lt(e,r));ut.exports=vs});var ft=E((bo,pt)=>{"use strict";var Os=A(),Cs=(t,e,r)=>Os(e,t,r);pt.exports=Cs});var dt=E((Fo,mt)=>{"use strict";var bs=A(),Fs=(t,e)=>bs(t,e,!0);mt.exports=Fs});var Z=E((Do,ht)=>{"use strict";var Et=x(),Ds=(t,e,r)=>{let s=new Et(t,r),i=new Et(e,r);return s.compare(i)||s.compareBuild(i)};ht.exports=Ds});var It=E((qo,gt)=>{"use strict";var qs=Z(),Ps=(t,e)=>t.sort((r,s)=>qs(r,s,e));gt.exports=Ps});var St=E((Po,xt)=>{"use strict";var Vs=Z(),js=(t,e)=>t.sort((r,s)=>Vs(s,r,e));xt.exports=js});var _=E((Vo,$t)=>{"use strict";var ks=A(),Gs=(t,e,r)=>ks(t,e,r)>0;$t.exports=Gs});var J=E((jo,Rt)=>{"use strict";var _s=A(),Us=(t,e,r)=>_s(t,e,r)<0;Rt.exports=Us});var fe=E((ko,At)=>{"use strict";var Bs=A(),Ms=(t,e,r)=>Bs(t,e,r)===0;At.exports=Ms});var me=E((Go,Nt)=>{"use strict";var Xs=A(),Hs=(t,e,r)=>Xs(t,e,r)!==0;Nt.exports=Hs});var ee=E((_o,wt)=>{"use strict";var Ws=A(),Ys=(t,e,r)=>Ws(t,e,r)>=0;wt.exports=Ys});var te=E((Uo,Lt)=>{"use strict";var zs=A(),Ks=(t,e,r)=>zs(t,e,r)<=0;Lt.exports=Ks});var de=E((Bo,yt)=>{"use strict";var Qs=fe(),Zs=me(),Js=_(),ei=ee(),ti=J(),ri=te(),si=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Qs(t,r,s);case"!=":return Zs(t,r,s);case">":return Js(t,r,s);case">=":return ei(t,r,s);case"<":return ti(t,r,s);case"<=":return ri(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};yt.exports=si});var vt=E((Mo,Tt)=>{"use strict";var ii=x(),ni=O(),{safeRe:re,t:se}=F(),oi=(t,e)=>{if(t instanceof ii)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?re[se.COERCEFULL]:re[se.COERCE]);else{let c=e.includePrerelease?re[se.COERCERTLFULL]:re[se.COERCERTL],l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ni(`${s}.${i}.${n}${o}${a}`,e)};Tt.exports=oi});var Ct=E((Xo,Ot)=>{"use strict";var Ee=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Ot.exports=Ee});var N=E((Ho,qt)=>{"use strict";var ai=/\s+/g,he=class t{constructor(e,r){if(r=li(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ge)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(ai," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!Ft(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&hi(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&di)|(this.options.loose&&Ei))+":"+e,i=bt.get(s);if(i)return i;let n=this.options.loose,o=n?$[S.HYPHENRANGELOOSE]:$[S.HYPHENRANGE];e=e.replace(o,Li(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace($[S.COMPARATORTRIM],pi),I("comparator trim",e),e=e.replace($[S.TILDETRIM],fi),I("tilde trim",e),e=e.replace($[S.CARETTRIM],mi),I("caret trim",e);let a=e.split(" ").map(u=>gi(u,this.options)).join(" ").split(/\s+/).map(u=>wi(u,this.options));n&&(a=a.filter(u=>(I("loose invalid filter",u,this.options),!!u.match($[S.COMPARATORLOOSE])))),I("range list",a);let c=new Map,l=a.map(u=>new ge(u,this.options));for(let u of l){if(Ft(u))return[u];c.set(u.value,u)}c.size>1&&c.has("")&&c.delete("");let m=[...c.values()];return bt.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Dt(s,r)&&e.set.some(i=>Dt(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ui(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(yi(this.set[r],e,this.options))return!0;return!1}};qt.exports=he;var ci=Ct(),bt=new ci,li=W(),ge=U(),I=G(),ui=x(),{safeRe:$,t:S,comparatorTrimReplace:pi,tildeTrimReplace:fi,caretTrimReplace:mi}=F(),{FLAG_INCLUDE_PRERELEASE:di,FLAG_LOOSE:Ei}=k(),Ft=t=>t.value==="<0.0.0-0",hi=t=>t.value==="",Dt=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},gi=(t,e)=>(t=t.replace($[S.BUILD],""),I("comp",t,e),t=Si(t,e),I("caret",t),t=Ii(t,e),I("tildes",t),t=Ri(t,e),I("xrange",t),t=Ni(t,e),I("stars",t),t),R=t=>!t||t.toLowerCase()==="x"||t==="*",Ii=(t,e)=>t.trim().split(/\s+/).map(r=>xi(r,e)).join(" "),xi=(t,e)=>{let r=e.loose?$[S.TILDELOOSE]:$[S.TILDE];return t.replace(r,(s,i,n,o,a)=>{I("tilde",t,s,i,n,o,a);let c;return R(i)?c="":R(n)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:R(o)?c=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(I("replaceTilde pr",a),c=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):c=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,I("tilde return",c),c})},Si=(t,e)=>t.trim().split(/\s+/).map(r=>$i(r,e)).join(" "),$i=(t,e)=>{I("caret",t,e);let r=e.loose?$[S.CARETLOOSE]:$[S.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,c)=>{I("caret",t,i,n,o,a,c);let l;return R(n)?l="":R(o)?l=`>=${n}.0.0${s} <${+n+1}.0.0-0`:R(a)?n==="0"?l=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:c?(I("replaceCaret pr",c),n==="0"?o==="0"?l=`>=${n}.${o}.${a}-${c} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}-${c} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a}-${c} <${+n+1}.0.0-0`):(I("no pr"),n==="0"?o==="0"?l=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:l=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:l=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),I("caret return",l),l})},Ri=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ai(r,e)).join(" ")),Ai=(t,e)=>{t=t.trim();let r=e.loose?$[S.XRANGELOOSE]:$[S.XRANGE];return t.replace(r,(s,i,n,o,a,c)=>{I("xRange",t,s,i,n,o,a,c);let l=R(n),m=l||R(o),u=m||R(a),g=u;return i==="="&&g&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&g?(m&&(o=0),a=0,i===">"?(i=">=",m?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",m?n=+n+1:o=+o+1),i==="<"&&(c="-0"),s=`${i+n}.${o}.${a}${c}`):m?s=`>=${n}.0.0${c} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`),I("xRange return",s),s})},Ni=(t,e)=>(I("replaceStars",t,e),t.trim().replace($[S.STAR],"")),wi=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace($[e.includePrerelease?S.GTE0PRE:S.GTE0],"")),Li=t=>(e,r,s,i,n,o,a,c,l,m,u,g)=>(R(s)?r="":R(i)?r=`>=${s}.0.0${t?"-0":""}`:R(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,R(l)?c="":R(m)?c=`<${+l+1}.0.0-0`:R(u)?c=`<${l}.${+m+1}.0-0`:g?c=`<=${l}.${m}.${u}-${g}`:t?c=`<${l}.${m}.${+u+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),yi=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==ge.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var U=E((Wo,_t)=>{"use strict";var B=Symbol("SemVer ANY"),Se=class t{static get ANY(){return B}constructor(e,r){if(r=Pt(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),xe("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===B?this.value="":this.value=this.operator+this.semver.version,xe("comp",this)}parse(e){let r=this.options.loose?Vt[jt.COMPARATORLOOSE]:Vt[jt.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new kt(s[2],this.options.loose):this.semver=B}toString(){return this.value}test(e){if(xe("Comparator.test",e,this.options.loose),this.semver===B||e===B)return!0;if(typeof e=="string")try{e=new kt(e,this.options)}catch(r){return!1}return Ie(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Gt(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Gt(this.value,r).test(e.semver):(r=Pt(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Ie(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Ie(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};_t.exports=Se;var Pt=W(),{safeRe:Vt,t:jt}=F(),Ie=de(),xe=G(),kt=x(),Gt=N()});var M=E((Yo,Ut)=>{"use strict";var Ti=N(),vi=(t,e,r)=>{try{e=new Ti(e,r)}catch(s){return!1}return e.test(t)};Ut.exports=vi});var Mt=E((zo,Bt)=>{"use strict";var Oi=N(),Ci=(t,e)=>new Oi(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Bt.exports=Ci});var Ht=E((Ko,Xt)=>{"use strict";var bi=x(),Fi=N(),Di=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Fi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new bi(s,r))}),s};Xt.exports=Di});var Yt=E((Qo,Wt)=>{"use strict";var qi=x(),Pi=N(),Vi=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Pi(e,r)}catch(o){return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new qi(s,r))}),s};Wt.exports=Vi});var Qt=E((Zo,Kt)=>{"use strict";var $e=x(),ji=N(),zt=_(),ki=(t,e)=>{t=new ji(t,e);let r=new $e("0.0.0");if(t.test(r)||(r=new $e("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new $e(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||zt(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||zt(r,n))&&(r=n)}return r&&t.test(r)?r:null};Kt.exports=ki});var Jt=E((Jo,Zt)=>{"use strict";var Gi=N(),_i=(t,e)=>{try{return new Gi(t,e).range||"*"}catch(r){return null}};Zt.exports=_i});var ie=E((ea,sr)=>{"use strict";var Ui=x(),rr=U(),{ANY:Bi}=rr,Mi=N(),Xi=M(),er=_(),tr=J(),Hi=te(),Wi=ee(),Yi=(t,e,r,s)=>{t=new Ui(t,s),e=new Mi(e,s);let i,n,o,a,c;switch(r){case">":i=er,n=Hi,o=tr,a=">",c=">=";break;case"<":i=tr,n=Wi,o=er,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Xi(t,e,s))return!1;for(let l=0;l<e.set.length;++l){let m=e.set[l],u=null,g=null;if(m.forEach(d=>{d.semver===Bi&&(d=new rr(">=0.0.0")),u=u||d,g=g||d,i(d.semver,u.semver,s)?u=d:o(d.semver,g.semver,s)&&(g=d)}),u.operator===a||u.operator===c||(!g.operator||g.operator===a)&&n(t,g.semver))return!1;if(g.operator===c&&o(t,g.semver))return!1}return!0};sr.exports=Yi});var nr=E((ta,ir)=>{"use strict";var zi=ie(),Ki=(t,e,r)=>zi(t,e,">",r);ir.exports=Ki});var ar=E((ra,or)=>{"use strict";var Qi=ie(),Zi=(t,e,r)=>Qi(t,e,"<",r);or.exports=Zi});var ur=E((sa,lr)=>{"use strict";var cr=N(),Ji=(t,e,r)=>(t=new cr(t,r),e=new cr(e,r),t.intersects(e,r));lr.exports=Ji});var fr=E((ia,pr)=>{"use strict";var en=M(),tn=A();pr.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((m,u)=>tn(m,u,r));for(let m of o)en(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[m,u]of s)m===u?a.push(m):!u&&m===o[0]?a.push("*"):u?m===o[0]?a.push(`<=${u}`):a.push(`${m} - ${u}`):a.push(`>=${m}`);let c=a.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var Ir=E((na,gr)=>{"use strict";var mr=N(),Ae=U(),{ANY:Re}=Ae,X=M(),Ne=A(),rn=(t,e,r={})=>{if(t===e)return!0;t=new mr(t,r),e=new mr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=nn(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},sn=[new Ae(">=0.0.0-0")],dr=[new Ae(">=0.0.0")],nn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Re){if(e.length===1&&e[0].semver===Re)return!0;r.includePrerelease?t=sn:t=dr}if(e.length===1&&e[0].semver===Re){if(r.includePrerelease)return!0;e=dr}let s=new Set,i,n;for(let d of t)d.operator===">"||d.operator===">="?i=Er(i,d,r):d.operator==="<"||d.operator==="<="?n=hr(n,d,r):s.add(d.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Ne(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let d of s){if(i&&!X(d,String(i),r)||n&&!X(d,String(n),r))return null;for(let H of e)if(!X(d,String(H),r))return!1;return!0}let a,c,l,m,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,g=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let d of e){if(m=m||d.operator===">"||d.operator===">=",l=l||d.operator==="<"||d.operator==="<=",i){if(g&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===g.major&&d.semver.minor===g.minor&&d.semver.patch===g.patch&&(g=!1),d.operator===">"||d.operator===">="){if(a=Er(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!X(i.semver,String(d),r))return!1}if(n){if(u&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===u.major&&d.semver.minor===u.minor&&d.semver.patch===u.patch&&(u=!1),d.operator==="<"||d.operator==="<="){if(c=hr(n,d,r),c===d&&c!==n)return!1}else if(n.operator==="<="&&!X(n.semver,String(d),r))return!1}if(!d.operator&&(n||i)&&o!==0)return!1}return!(i&&l&&!n&&o!==0||n&&m&&!i&&o!==0||g||u)},Er=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},hr=(t,e,r)=>{if(!t)return e;let s=Ne(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};gr.exports=rn});var Rr=E((oa,$r)=>{"use strict";var we=F(),xr=k(),on=x(),Sr=le(),an=O(),cn=He(),ln=Ye(),un=Qe(),pn=et(),fn=rt(),mn=it(),dn=ot(),En=ct(),hn=A(),gn=ft(),In=dt(),xn=Z(),Sn=It(),$n=St(),Rn=_(),An=J(),Nn=fe(),wn=me(),Ln=ee(),yn=te(),Tn=de(),vn=vt(),On=U(),Cn=N(),bn=M(),Fn=Mt(),Dn=Ht(),qn=Yt(),Pn=Qt(),Vn=Jt(),jn=ie(),kn=nr(),Gn=ar(),_n=ur(),Un=fr(),Bn=Ir();$r.exports={parse:an,valid:cn,clean:ln,inc:un,diff:pn,major:fn,minor:mn,patch:dn,prerelease:En,compare:hn,rcompare:gn,compareLoose:In,compareBuild:xn,sort:Sn,rsort:$n,gt:Rn,lt:An,eq:Nn,neq:wn,gte:Ln,lte:yn,cmp:Tn,coerce:vn,Comparator:On,Range:Cn,satisfies:bn,toComparators:Fn,maxSatisfying:Dn,minSatisfying:qn,minVersion:Pn,validRange:Vn,outside:jn,gtr:kn,ltr:Gn,intersects:_n,simplifyRange:Un,subset:Bn,SemVer:on,re:we.re,src:we.src,tokens:we.t,SEMVER_SPEC_VERSION:xr.SEMVER_SPEC_VERSION,RELEASE_TYPES:xr.RELEASE_TYPES,compareIdentifiers:Sr.compareIdentifiers,rcompareIdentifiers:Sr.rcompareIdentifiers}});var Eo={};Xr(Eo,{ngUpdate:()=>mo});module.exports=Wr(Eo);var Vr=require("@angular-devkit/schematics/tasks/index.js");var Le=require("@angular-devkit/schematics"),q=Hr(Rr());var Ar=t=>JSON.stringify(t,null,2),ne=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function ye(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new Le.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var D="^12.4.0",Nr=(t,e)=>{var n;if(!t.exists("package.json"))throw new Le.SchematicsException("Could not locate package.json");let r=ye("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(n=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=D,e.logger.info(`Added firebase ${D} to your package.json.`),ne(t,"package.json",Ar(r)),!0;let i=!1;for(let o of s){let a=r[o].firebase,c;try{c=(0,q.subset)(a,D)}catch(l){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${D}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}c||(r[o].firebase=D,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${D}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),i=!0)}return i&&ne(t,"package.json",Ar(r)),i};var qr=require("path");var wr=require("path"),Lr=()=>{if(typeof require!="function")return;let t=[()=>require("typescript"),()=>require("module").createRequire((0,wr.join)(process.cwd(),"package.json"))("typescript")];for(let e of t)try{return e()}catch(r){}};var P=(t,e,r)=>{let s=[e];for(;s.length>0;){let i=s.pop();if(!i||r(i)===!1)continue;let n=[];t.forEachChild(i,o=>{n.push(o)});for(let o=n.length-1;o>=0;o--)s.push(n[o])}};var y={"@angular/fire/vertexai":"@angular/fire/ai","@angular/fire/vertexai-preview":"@angular/fire/ai","firebase/vertexai":"firebase/ai","firebase/vertexai-preview":"firebase/ai"},L={provideVertexAI:"provideAI",VertexAI:"AI",VertexAIError:"AIError",VertexAIErrorCode:"AIErrorCode",VertexAIModel:"AIModel",VertexAIInstances:"AIInstances",vertexAIInstance$:"AIInstance$",VertexAIModule:"AIModule"},V={VertexAIOptions:"the new AIOptions takes a backend instead of a location, rebuild the options by hand"},T="getVertexAI",C="getAI",v="VertexAIBackend",yr=new Set([...Object.keys(y),...Object.values(y)]);var Tr=(t,e)=>{let{sourceFile:r}=t,s={edits:[],renamedLocalBindings:new Map,namespaceBindings:new Set,editedSpecifierTokenStarts:new Set,vertexImports:[],vertexExportSpecifiers:[],shadowedImports:[],starExportPositions:[],removedSymbols:[]};for(let i of r.statements)Mn(i,t,s,e);return s},Mn=(t,e,r,s)=>{var u;let{compiler:i,sourceFile:n}=e,o=i.isImportDeclaration(t),a=i.isExportDeclaration(t);if(!o&&!a)return;let c=t.moduleSpecifier,l=c&&i.isStringLiteral(c)&&y[c.text];if(!l)return;if(a&&(!t.exportClause||i.isNamespaceExport(t.exportClause))){r.starExportPositions.push(t.getStart(n));return}r.edits.push({start:c.getStart(n)+1,end:c.getEnd()-1,replacement:l});let m=o?(u=t.importClause)==null?void 0:u.namedBindings:t.exportClause;if(m&&i.isNamespaceImport(m)){s.has(m.name.text)?r.shadowedImports.push({position:m.getStart(n),name:m.name.text}):r.namespaceBindings.add(m.name.text);return}if(m&&(i.isNamedImports(m)||i.isNamedExports(m)))for(let g of m.elements)Xn(g,t,e,r,s)},Xn=(t,e,r,s,i)=>{var m;let{compiler:n,sourceFile:o}=r,a=(m=t.propertyName)!=null?m:t.name;if(n.isImportSpecifier(t)&&i.has(t.name.text)){s.shadowedImports.push({position:t.getStart(o),name:t.name.text});return}if(a.text===T){n.isImportSpecifier(t)&&n.isImportDeclaration(e)?s.vertexImports.push({element:t,statement:e,localName:t.name.text}):n.isExportSpecifier(t)&&s.vertexExportSpecifiers.push(t);return}if(V[a.text]!==void 0){s.removedSymbols.push({position:a.getStart(o),name:a.text});return}let c=L[a.text];if(!c)return;let l=n.isExportSpecifier(t)&&!t.propertyName;s.edits.push({start:a.getStart(o),end:a.getEnd(),replacement:l?`${c} as ${a.text}`:c}),s.editedSpecifierTokenStarts.add(a.getStart(o)),n.isImportSpecifier(t)&&!t.propertyName&&s.renamedLocalBindings.set(t.name.text,c)},vr=(t,e,r,s)=>{let{compiler:i,sourceFile:n}=t,o={renamedNames:new Set(e.renamedLocalBindings.keys()),namespaceNames:e.namespaceBindings,vertexNames:new Set(r.keys())};P(i,n,a=>{let c=Zn(a,e.namespaceBindings,t);c&&e.edits.push(c);let l=Hn(a,e.namespaceBindings,t);if(l&&e.removedSymbols.push(l),Wn(a,e.namespaceBindings,t,s,o),i.isIdentifier(a)){Yn(a,r,t,s,o);let m=Jn(a,e,t);m&&e.edits.push(m)}})},Hn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&V[t.name.text]!==void 0)return{position:t.name.getStart(i),name:t.name.text};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&V[t.right.text]!==void 0)return{position:t.right.getStart(i),name:t.right.text}},Wn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r;if(!n.isPropertyAccessExpression(t)||!n.isIdentifier(t.expression)||!e.has(t.expression.text)||t.name.text!==T)return;let a=t.parent;if(n.isCallExpression(a)&&a.expression===t){Or(a,{namespaceAccess:t},r,s,"namespace",i);return}s.unsupported.push({position:t.getStart(o),reason:`a use of ${t.expression.text}.getVertexAI that is not a direct call`,origin:"namespace"})},Yn=(t,e,r,s,i)=>{let{compiler:n,sourceFile:o}=r,a=e.get(t.text);if(!a||Te(r,t))return;let c=t.parent;if(n.isCallExpression(c)&&c.expression===t){Or(c,{binding:a},r,s,"binding",i);return}s.unsupported.push({position:t.getStart(o),reason:n.isExportSpecifier(c)?"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)":"a use of getVertexAI that is not a direct call (only direct calls can be rewritten safely)",origin:"binding"})},zn=(t,e,r)=>{let{compiler:s}=e;if(Te(e,t))return!1;if(r.renamedNames.has(t.text)||r.vertexNames.has(t.text))return!0;if(!r.namespaceNames.has(t.text))return!1;let i=t.parent;return s.isPropertyAccessExpression(i)&&i.expression===t?L[i.name.text]!==void 0||i.name.text===T:s.isQualifiedName(i)&&i.left===t?L[i.right.text]!==void 0:!1},Kn=(t,e,r)=>{let{compiler:s}=e,i=!1;return P(s,t,n=>{if(i)return!1;if(s.isIdentifier(n)&&zn(n,e,r))return i=!0,!1}),i},Qn=(t,e,r)=>{let{compiler:s,sourceFile:i}=e;if(!s.isObjectLiteralExpression(t))return{supported:!1};if(Kn(t,e,r))return{supported:!1,conflicting:!0};if(t.properties.length===0)return{supported:!0};let n=t.properties.length===1?t.properties[0]:void 0;return n&&s.isPropertyAssignment(n)&&s.isIdentifier(n.name)&&n.name.text==="location"?{supported:!0,locationText:n.initializer.getText(i)}:n&&s.isShorthandPropertyAssignment(n)&&n.name.text==="location"?{supported:!0,locationText:"location"}:{supported:!1}},Or=(t,e,r,s,i,n)=>{let{compiler:o,sourceFile:a}=r,c=t.arguments,l=c.some(o.isSpreadElement);if(c.length<=1&&!l){s.supportedCalls.push(oe({call:t},e));return}let m=!1;if(c.length===2&&!l){let u=Qn(c[1],r,n);if(u.supported){s.supportedCalls.push(be(oe({call:t},e),{locationText:u.locationText}));return}m=u.conflicting===!0}s.unsupported.push({position:t.getStart(a),reason:m?"a getVertexAI call whose options mention other symbols this migration rewrites (replacing both at once would conflict)":"a getVertexAI call whose arguments do not map onto getAI safely (only an optional app argument plus an optional literal `{ location }` object are rewritten)",origin:i})},Zn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r;if(s.isPropertyAccessExpression(t)&&s.isIdentifier(t.expression)&&e.has(t.expression.text)&&L[t.name.text])return{start:t.name.getStart(i),end:t.name.getEnd(),replacement:L[t.name.text]};if(s.isQualifiedName(t)&&s.isIdentifier(t.left)&&e.has(t.left.text)&&L[t.right.text])return{start:t.right.getStart(i),end:t.right.getEnd(),replacement:L[t.right.text]}},Jn=(t,e,r)=>{let{compiler:s,sourceFile:i}=r,n=e.renamedLocalBindings.get(t.text);if(n===void 0)return;let o=t.getStart(i);if(e.editedSpecifierTokenStarts.has(o)||Te(r,t))return;let a=t.parent;if(s.isExportSpecifier(a)&&a.name===t&&!a.propertyName){let c=a.parent.parent;return s.isExportDeclaration(c)&&!c.moduleSpecifier?{start:o,end:t.getEnd(),replacement:`${n} as ${t.text}`}:void 0}return s.isShorthandPropertyAssignment(a)&&a.name===t?{start:t.getEnd(),end:t.getEnd(),replacement:`: ${n}`}:{start:o,end:t.getEnd(),replacement:n}},Te=(t,e)=>{let{compiler:r}=t,s=e.parent;return r.isImportSpecifier(s)&&(s.propertyName===e||s.name===e)||r.isBindingElement(s)&&(s.propertyName===e||s.name===e&&!s.propertyName)?!0:eo(t,e,s)},eo=(t,e,r)=>{let{compiler:s}=t,i=s.isPropertyAccessExpression(r)&&r.name===e||s.isQualifiedName(r)&&r.right===e,n=(s.isPropertyAssignment(r)||s.isPropertyDeclaration(r)||s.isPropertySignature(r)||s.isMethodDeclaration(r)||s.isGetAccessorDeclaration(r)||s.isSetAccessorDeclaration(r)||s.isEnumMember(r))&&r.name===e;return i||n};var to=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements)(e.isImportDeclaration(i)||e.isExportDeclaration(i))&&i.moduleSpecifier&&e.isStringLiteral(i.moduleSpecifier)&&y[i.moduleSpecifier.text]&&s.add(i);return s},ro=(t,e)=>{var i,n;let{compiler:r}=t,s=new Set;for(let o of e){if(!r.isImportDeclaration(o))continue;let a=(i=o.importClause)==null?void 0:i.namedBindings;if(a){if(r.isNamespaceImport(a)){s.add(a.name.text);continue}for(let c of a.elements){let l=((n=c.propertyName)!=null?n:c.name).text;(l===T||L[l]&&!c.propertyName)&&s.add(c.name.text)}}}return s},Cr=(t,e)=>{let{compiler:r}=t;if((r.isVariableDeclaration(e)||r.isParameter(e)||r.isBindingElement(e))&&r.isIdentifier(e.name)||(r.isFunctionDeclaration(e)||r.isFunctionExpression(e)||r.isClassDeclaration(e)||r.isClassExpression(e)||r.isInterfaceDeclaration(e)||r.isTypeAliasDeclaration(e)||r.isEnumDeclaration(e))&&e.name||r.isTypeParameterDeclaration(e)||r.isImportSpecifier(e)||r.isNamespaceImport(e)||r.isImportClause(e)&&e.name)return e.name.text},so=(t,e)=>{let{compiler:r}=t;if(!r.isImportSpecifier(e)||e.propertyName)return!1;let s=e;for(;s&&!r.isImportDeclaration(s);)s=s.parent;return!s||!r.isImportDeclaration(s)?!1:r.isStringLiteral(s.moduleSpecifier)&&yr.has(s.moduleSpecifier.text)},br=t=>{let{compiler:e,sourceFile:r}=t,s=to(t),i=ro(t,s),n=new Set;return i.size===0||P(e,r,o=>{if(s.has(o))return!1;let a=Cr(t,o);a&&i.has(a)&&n.add(a)}),n},Fr=t=>{let{compiler:e,sourceFile:r}=t,s=[];return P(e,r,i=>{let n=Cr(t,i);(n===C||n===v)&&!so(t,i)&&s.push({position:i.getStart(r),name:n})}),s};var Dr=(t,e,r,s)=>{let{sourceFile:i}=t,n=[],o=[],a=[],c=s.length>0&&e.vertexImports.length>0,l=r.unsupported.some(u=>u.origin==="binding")||c,m=new Set;for(let u of r.supportedCalls){if(u.binding&&l){a.push(u.call.getStart(i));continue}let g=u.namespaceAccess?`${u.namespaceAccess.expression.getText(i)}.${v}`:v;if(u.binding&&(m.add(u.binding.statement),u.binding.localName===T)){let d=u.call.expression;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}if(u.namespaceAccess){let d=u.namespaceAccess.name;n.push({start:d.getStart(i),end:d.getEnd(),replacement:C})}n.push(...no(u,t,g)),o.push(u.call.getStart(i))}if(!l){let u=io(t),g=u.has(v);for(let d of e.vertexImports){let H=m.has(d.statement)&&!g;n.push(...oo(d,H,u.has(C),t)),H&&(g=!0)}}return{edits:n,callPositions:o,blockedCallPositions:a,injectionBlocked:c}},io=t=>{let{compiler:e,sourceFile:r}=t,s=new Set;for(let i of r.statements){if(!e.isImportDeclaration(i)||!i.importClause)continue;i.importClause.name&&s.add(i.importClause.name.text);let n=i.importClause.namedBindings;if(n)if(e.isNamespaceImport(n))s.add(n.name.text);else for(let o of n.elements)s.add(o.name.text)}return s},no=(t,e,r)=>{var a;let{sourceFile:s}=e,i=`{ backend: new ${r}(${(a=t.locationText)!=null?a:""}) }`,n=t.call.arguments;if(n.length===0)return[{start:t.call.getEnd()-1,end:t.call.getEnd()-1,replacement:`undefined, ${i}`}];if(n.length===1){let c=n[0];return[{start:c.getEnd(),end:c.getEnd(),replacement:`, ${i}`}]}let o=n[1];return[{start:o.getStart(s),end:o.getEnd(),replacement:i}]},oo=(t,e,r,s)=>{var u,g;let{compiler:i,sourceFile:n}=s,o=[],a=(u=t.statement.importClause)==null?void 0:u.namedBindings;if(!a||!i.isNamedImports(a))return o;let c=a.elements,l=t.element,m=(g=l.propertyName)!=null?g:l.name;if(!l.propertyName&&r){if(e)return[{start:l.getStart(n),end:l.getEnd(),replacement:v}];if(c.length===1)return[{start:l.getStart(n),end:l.getEnd(),replacement:""}];let d=c.indexOf(l);return d>0?[{start:c[d-1].getEnd(),end:l.getEnd(),replacement:""}]:[{start:l.getStart(n),end:c[1].getStart(n),replacement:""}]}return o.push({start:m.getStart(n),end:m.getEnd(),replacement:C}),e&&o.push({start:l.getEnd(),end:l.getEnd(),replacement:`, ${v}`}),o};var b="see the AngularFire v21 upgrade guide (docs/version-21-upgrade.md)",ao=t=>{let{sourceFile:e}=t,r=Tr(t,br(t)),s=new Map;for(let a of r.vertexImports)s.set(a.localName,a);let i={supportedCalls:[],unsupported:[]};(r.renamedLocalBindings.size>0||r.namespaceBindings.size>0||s.size>0)&&vr(t,r,s,i);for(let a of r.vertexExportSpecifiers)i.unsupported.push({position:a.getStart(e),reason:"a re-export of getVertexAI (rewriting it to getAI would silently change its callers' backend)",origin:"export"});let n=r.vertexImports.length>0?Fr(t):[],o=Dr(t,r,i,n);return{edits:r.edits.concat(o.edits),vertexCallPositions:o.callPositions,blockedCallPositions:o.blockedCallPositions,unsupportedVertexUsages:i.unsupported,shadowedImports:r.shadowedImports,injectionConflicts:o.injectionBlocked?n:[],starExportPositions:r.starExportPositions,removedSymbols:r.removedSymbols}},co=t=>[...t.vertexCallPositions.map(e=>({level:"info",position:e,text:"rewrote getVertexAI(...) to getAI(..., { backend: new VertexAIBackend(...) }) to keep the call on the Vertex AI backend"})),...t.unsupportedVertexUsages.map(e=>({level:"warn",position:e.position,text:`left ${e.reason}. Plain getAI() uses the Gemini Developer API backend, NOT Vertex AI. Migrate this site by hand, ${b}`})),...t.shadowedImports.map(e=>({level:"warn",position:e.position,text:`left the \`${e.name}\` import name and its usages unrenamed: this file also declares a local named \`${e.name}\`, and name-based rewriting cannot tell the two apart. The import path itself still moves to the new entry point, so the leftover name fails to compile there. Migrate this file by hand, ${b}`})),...t.injectionConflicts.map(e=>({level:"warn",position:e.position,text:`\`${e.name}\` is already bound here from a source other than AI Logic, so the backend-preserving rewrite cannot inject or reuse it. The file's getVertexAI code was left as is, and its import path still moves to the new entry point, so the leftover getVertexAI fails to compile there. Migrate it by hand, ${b}`})),...t.blockedCallPositions.map(e=>({level:"warn",position:e,text:t.injectionConflicts.length>0?"left a rewritable getVertexAI call unrewritten because this file binds getAI or VertexAIBackend from another source (see that warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand":"left a rewritable getVertexAI call unrewritten because another getVertexAI use in this file cannot be rewritten (see its own warning). Every use of the file's named getVertexAI imports is kept together so the pieces stay consistent, migrate them by hand"})),...t.starExportPositions.map(e=>({level:"warn",position:e,text:`left \`export *\` from an old Vertex AI entry point unmigrated: rewriting it would silently rename this file's re-exported public symbols. Re-export what you need by name from '@angular/fire/ai' instead, ${b}`})),...t.removedSymbols.map(e=>({level:"warn",position:e.position,text:`left \`${e.name}\`, which no longer exists in the new entry point (${V[e.name]}). The leftover name fails to compile, migrate it by hand, ${b}`}))],lo=(t,e,r,s,i)=>{let n={compiler:r,sourceFile:r.createSourceFile(s,i,r.ScriptTarget.Latest,!0)},o=n.sourceFile;if(o.parseDiagnostics&&o.parseDiagnostics.length>0)return e.logger.warn(`${s}: skipped, the file has syntax errors, so the Vertex AI -> AI Logic rewrite cannot run on it safely. Fix the syntax and re-run ng update, or migrate it by hand, ${b}`),!1;let a=ao(n);for(let l of co(a)){let m=n.sourceFile.getLineAndCharacterOfPosition(l.position).line+1;e.logger[l.level](`${s}:${m}: ${l.text}`)}if(a.edits.length===0)return!1;let c;try{c=uo(i,a.edits)}catch(l){return e.logger.warn(`${s}: the Vertex AI -> AI Logic rewrite was skipped for this file (${l}). Migrate it by hand, ${b}`),!1}return c===i?!1:(ne(t,s,c),!0)},uo=(t,e)=>{let r=e.slice().sort((s,i)=>i.start-s.start||i.end-s.end);for(let s=1;s<r.length;s++)if(r[s].end>r[s-1].start)throw new Error(`conflicting rewrite edits at offsets ${r[s].start} and ${r[s-1].start}`);return r.reduce((s,i)=>s.slice(0,i.start)+i.replacement+s.slice(i.end),t)},po=t=>Object.values(t.projects).map(e=>(e==null?void 0:e.sourceRoot)||(e==null?void 0:e.root)).filter(e=>typeof e=="string").map(e=>{let r=qr.posix.join("/",e);return r==="/"?r:r.replace(/\/+$/,"")}),fo=(t,e)=>t.endsWith(".ts")&&!t.endsWith(".d.ts")&&!t.split("/").includes("node_modules")&&e.some(r=>r==="/"||t===r||t.startsWith(r+"/")),Pr=(t,e,r)=>{let s=r!=null?r:Lr(),i=t.exists("angular.json")&&ye("angular.json",t);if(!(i!=null&&i.projects))return!1;let n=po(i);if(n.length===0)return!1;let o=!1;return t.visit(a=>{var l;if(!fo(a,n))return;let c=(l=t.read(a))==null?void 0:l.toString();if(!(!c||!Object.keys(y).some(m=>c.includes(m)))){if(!s){e.logger.warn(`${a} imports a removed Vertex AI entry point, but the Vertex AI -> AI Logic rewrite was skipped: the \`typescript\` package could not be resolved (it is an optional peer dependency of @angular/fire). Install typescript and re-run, or migrate by hand - see the v21 upgrade guide (docs/version-21-upgrade.md).`);return}o=lo(t,e,s,a,c)||o}}),o};var mo=t=>(e,r)=>{Nr(e,r)&&r.addTask(new Vr.NodePackageInstallTask);try{Pr(e,r,t==null?void 0:t.compiler)}catch(s){r.logger.warn(`Skipped the Vertex AI -> AI Logic source rewrite: ${s}. Any remaining @angular/fire/vertexai imports need a manual migration - see the v21 upgrade guide (docs/version-21-upgrade.md).`)}return e};0&&(module.exports={ngUpdate});