@rdlabo/ionic-angular-kit 21.7.0 → 22.0.0-0

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.
@@ -145,10 +145,10 @@ class KitThemeController {
145
145
  }
146
146
  this.themeSubject.next(isDark ? 'dark' : 'light');
147
147
  }
148
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitThemeController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
149
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitThemeController, providedIn: 'root' }); }
148
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitThemeController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
149
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitThemeController, providedIn: 'root' }); }
150
150
  }
151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitThemeController, decorators: [{
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitThemeController, decorators: [{
152
152
  type: Injectable,
153
153
  args: [{
154
154
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"rdlabo-ionic-angular-kit-theme.mjs","sources":["../../../projects/kit/theme/src/theme-config.ts","../../../projects/kit/theme/src/kit-theme.controller.ts","../../../projects/kit/theme/src/public-api.ts","../../../projects/kit/theme/src/rdlabo-ionic-angular-kit-theme.ts"],"sourcesContent":["import type { EnvironmentProviders } from '@angular/core';\nimport { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * Theme configuration injected via `provideKitTheme()` and consumed by `KitThemeController`.\n *\n * @remarks\n * All fields are required; the consuming application supplies a complete configuration so every app\n * in the fleet has the same shape. The class lists absorb the per-app CSS drift: the kit toggles\n * `darkClasses` on when dark and `lightClasses` on when light, so an app that only uses Ionic's\n * palette passes `darkClasses: ['ion-palette-dark'], lightClasses: []`, while an app with an extra\n * design-system palette adds its own classes (e.g. `darkClasses: ['ion-palette-dark', 'a2ui-dark']`,\n * `lightClasses: ['a2ui-light']`).\n *\n * Prefer `KIT_THEME_STORAGE_KEY` (from `@rdlabo/ionic-angular-kit`) as `storageKey` so logout\n * clear-preserving lists stay in sync.\n */\nexport interface KitThemeConfig {\n /** Key under which the chosen theme (`'light'` | `'dark'`) is persisted via `KitStorageService`. */\n readonly storageKey: string;\n /** Classes toggled **on** the document element when the dark theme is active. */\n readonly darkClasses: readonly string[];\n /** Classes toggled **on** the document element when the light theme is active. */\n readonly lightClasses: readonly string[];\n}\n\n/**\n * Injection token carrying the {@link KitThemeConfig} for `KitThemeController`.\n *\n * @remarks\n * Provide it through {@link provideKitTheme} rather than registering it directly.\n */\nexport const KIT_THEME_CONFIG = new InjectionToken<KitThemeConfig>('@rdlabo/ionic-angular-kit:theme');\n\n/**\n * Wire `KitThemeController` into the application.\n *\n * @param config - theme configuration: the storage key and the light/dark class lists\n * @returns environment providers to add to the application's provider list\n * @example\n * ```ts\n * import { KIT_THEME_STORAGE_KEY } from '@rdlabo/ionic-angular-kit';\n * import { provideKitTheme } from '@rdlabo/ionic-angular-kit/theme';\n *\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideKitTheme({\n * storageKey: KIT_THEME_STORAGE_KEY,\n * darkClasses: ['ion-palette-dark', 'a2ui-dark'],\n * lightClasses: ['a2ui-light'],\n * }),\n * ],\n * });\n * ```\n */\nexport const provideKitTheme = (config: KitThemeConfig): EnvironmentProviders =>\n makeEnvironmentProviders([{ provide: KIT_THEME_CONFIG, useValue: config }]);\n","import { DOCUMENT, inject, Injectable } from '@angular/core';\nimport { Capacitor } from '@capacitor/core';\nimport { StatusBar, Style } from '@capacitor/status-bar';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { KitStorageService } from '@rdlabo/ionic-angular-kit';\n\nimport { KIT_THEME_CONFIG } from './theme-config';\n\n/** The active theme mode. */\nexport type KitThemeMode = 'light' | 'dark';\n\n/**\n * Light/dark theme controller: persists the user's choice, follows the OS setting until the user\n * overrides it, toggles the configured palette classes, and syncs the native Android status bar.\n *\n * @remarks\n * Consolidates the theme logic that had drifted across the fleet into one behavior. Notably it fixes\n * a latent leak in one variant where the system-theme listener stayed registered after a manual\n * toggle: {@link changeTheme} always detaches the listener via {@link removeEventListener} before\n * applying the forced theme, so a later OS change can no longer silently flip an app the user pinned.\n *\n * - **Persistence** — the chosen mode is stored via {@link KitStorageService} under the configured key.\n * - **Follow OS until overridden** — on boot with nothing stored, it tracks\n * `prefers-color-scheme` (idempotent registration); once the user calls {@link changeTheme} it stops\n * following and honors the explicit choice.\n * - **Class toggling** — toggles {@link KitThemeConfig.darkClasses} on when dark and\n * {@link KitThemeConfig.lightClasses} on when light, absorbing per-app CSS differences via config.\n * - **Native status bar** — on Android native only, mirrors the Ionic behavior of setting the status\n * bar style to match (iOS derives it from the web content, so it is intentionally left untouched).\n *\n * Subscribe to {@link themeSubject} to reflect the current mode in the UI (e.g. a settings toggle).\n *\n * @example\n * ```ts\n * // On boot (app.component):\n * inject(KitThemeController).setDefaultThemeMode();\n *\n * // From a settings toggle:\n * const theme = inject(KitThemeController);\n * theme.themeSubject.subscribe((mode) => this.isDark.set(mode === 'dark'));\n * theme.changeTheme(true);\n * ```\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class KitThemeController {\n readonly #storage = inject(KitStorageService);\n readonly #document = inject(DOCUMENT);\n readonly #config = inject(KIT_THEME_CONFIG);\n\n /**\n * Emits the active theme, seeded with `'light'`.\n *\n * @remarks\n * A `BehaviorSubject`, so a late subscriber immediately receives the current mode; it emits again\n * on every {@link setDefaultThemeMode} / {@link changeTheme} and on OS theme changes while following.\n */\n readonly themeSubject = new BehaviorSubject<KitThemeMode>('light');\n\n #prefersDark?: MediaQueryList;\n #onSystemThemeChange?: (e: MediaQueryListEvent) => void;\n\n /**\n * Apply the persisted theme, or start following the OS setting when nothing is stored yet.\n *\n * @remarks\n * Call once on boot (e.g. from `app.component`).\n *\n * @returns a Promise that resolves once the initial theme has been applied\n */\n async setDefaultThemeMode(): Promise<void> {\n const stored = await this.#storage.get<KitThemeMode>(this.#config.storageKey);\n if (stored) {\n // 保存済みの選択を強制し、OS 追従は解除する。\n this.#unwatchSystemTheme();\n return this.#applyTheme(stored === 'dark');\n }\n\n // 未保存 → OS の設定に追従する。\n this.#watchSystemTheme();\n }\n\n /**\n * Force a theme, persist it, and stop following the OS setting.\n *\n * @param isDark - `true` for the dark theme, `false` for light\n * @returns a Promise that resolves once the theme has been persisted and applied\n */\n async changeTheme(isDark: boolean): Promise<void> {\n this.#unwatchSystemTheme();\n await this.#storage.set(this.#config.storageKey, isDark ? 'dark' : 'light');\n await this.#applyTheme(isDark);\n }\n\n #watchSystemTheme(): void {\n if (this.#prefersDark) {\n // 既に監視中なら二重登録しない(冪等)。\n return;\n }\n this.#prefersDark = window.matchMedia('(prefers-color-scheme: dark)');\n this.#onSystemThemeChange = (e) => void this.#applyTheme(e.matches);\n this.#prefersDark.addEventListener('change', this.#onSystemThemeChange, { passive: true });\n void this.#applyTheme(this.#prefersDark.matches);\n }\n\n #unwatchSystemTheme(): void {\n if (this.#prefersDark && this.#onSystemThemeChange) {\n this.#prefersDark.removeEventListener('change', this.#onSystemThemeChange);\n }\n this.#prefersDark = undefined;\n this.#onSystemThemeChange = undefined;\n }\n\n async #applyTheme(isDark: boolean): Promise<void> {\n if (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'android') {\n await StatusBar.setStyle({ style: isDark ? Style.Dark : Style.Light });\n }\n const root = this.#document.documentElement;\n for (const cls of this.#config.darkClasses) {\n root.classList.toggle(cls, isDark);\n }\n for (const cls of this.#config.lightClasses) {\n root.classList.toggle(cls, !isDark);\n }\n this.themeSubject.next(isDark ? 'dark' : 'light');\n }\n}\n","// Theme: light/dark controller with OS-follow and native status-bar sync.\n// Its own entry point so only apps that theme pull in `@capacitor/status-bar`.\nexport * from './theme-config';\nexport * from './kit-theme.controller';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA0BA;;;;;AAKG;MACU,gBAAgB,GAAG,IAAI,cAAc,CAAiB,iCAAiC;AAEpG;;;;;;;;;;;;;;;;;;;;AAoBG;MACU,eAAe,GAAG,CAAC,MAAsB,KACpD,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;;AC5C5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MAIU,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACpC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3C;;;;;;AAMG;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAAe,OAAO,CAAC;AAqEnE,IAAA;AAhFU,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,OAAO;AAWhB,IAAA,YAAY;AACZ,IAAA,oBAAoB;AAEpB;;;;;;;AAOG;AACH,IAAA,MAAM,mBAAmB,GAAA;AACvB,QAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAe,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QAC7E,IAAI,MAAM,EAAE;;YAEV,IAAI,CAAC,mBAAmB,EAAE;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC;QAC5C;;QAGA,IAAI,CAAC,iBAAiB,EAAE;IAC1B;AAE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AE,CAAC;QACxE;AACA,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe;QAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC;QACpC;QACA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YAC3C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;QACrC;AACA,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACnD;+GAhFW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;4FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC9CD;AACA;;ACDA;;AAEG;;;;"}
1
+ {"version":3,"file":"rdlabo-ionic-angular-kit-theme.mjs","sources":["../../../projects/kit/theme/src/theme-config.ts","../../../projects/kit/theme/src/kit-theme.controller.ts","../../../projects/kit/theme/src/public-api.ts","../../../projects/kit/theme/src/rdlabo-ionic-angular-kit-theme.ts"],"sourcesContent":["import type { EnvironmentProviders } from '@angular/core';\nimport { InjectionToken, makeEnvironmentProviders } from '@angular/core';\n\n/**\n * Theme configuration injected via `provideKitTheme()` and consumed by `KitThemeController`.\n *\n * @remarks\n * All fields are required; the consuming application supplies a complete configuration so every app\n * in the fleet has the same shape. The class lists absorb the per-app CSS drift: the kit toggles\n * `darkClasses` on when dark and `lightClasses` on when light, so an app that only uses Ionic's\n * palette passes `darkClasses: ['ion-palette-dark'], lightClasses: []`, while an app with an extra\n * design-system palette adds its own classes (e.g. `darkClasses: ['ion-palette-dark', 'a2ui-dark']`,\n * `lightClasses: ['a2ui-light']`).\n *\n * Prefer `KIT_THEME_STORAGE_KEY` (from `@rdlabo/ionic-angular-kit`) as `storageKey` so logout\n * clear-preserving lists stay in sync.\n */\nexport interface KitThemeConfig {\n /** Key under which the chosen theme (`'light'` | `'dark'`) is persisted via `KitStorageService`. */\n readonly storageKey: string;\n /** Classes toggled **on** the document element when the dark theme is active. */\n readonly darkClasses: readonly string[];\n /** Classes toggled **on** the document element when the light theme is active. */\n readonly lightClasses: readonly string[];\n}\n\n/**\n * Injection token carrying the {@link KitThemeConfig} for `KitThemeController`.\n *\n * @remarks\n * Provide it through {@link provideKitTheme} rather than registering it directly.\n */\nexport const KIT_THEME_CONFIG = new InjectionToken<KitThemeConfig>('@rdlabo/ionic-angular-kit:theme');\n\n/**\n * Wire `KitThemeController` into the application.\n *\n * @param config - theme configuration: the storage key and the light/dark class lists\n * @returns environment providers to add to the application's provider list\n * @example\n * ```ts\n * import { KIT_THEME_STORAGE_KEY } from '@rdlabo/ionic-angular-kit';\n * import { provideKitTheme } from '@rdlabo/ionic-angular-kit/theme';\n *\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideKitTheme({\n * storageKey: KIT_THEME_STORAGE_KEY,\n * darkClasses: ['ion-palette-dark', 'a2ui-dark'],\n * lightClasses: ['a2ui-light'],\n * }),\n * ],\n * });\n * ```\n */\nexport const provideKitTheme = (config: KitThemeConfig): EnvironmentProviders =>\n makeEnvironmentProviders([{ provide: KIT_THEME_CONFIG, useValue: config }]);\n","import { DOCUMENT, inject, Injectable } from '@angular/core';\nimport { Capacitor } from '@capacitor/core';\nimport { StatusBar, Style } from '@capacitor/status-bar';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { KitStorageService } from '@rdlabo/ionic-angular-kit';\n\nimport { KIT_THEME_CONFIG } from './theme-config';\n\n/** The active theme mode. */\nexport type KitThemeMode = 'light' | 'dark';\n\n/**\n * Light/dark theme controller: persists the user's choice, follows the OS setting until the user\n * overrides it, toggles the configured palette classes, and syncs the native Android status bar.\n *\n * @remarks\n * Consolidates the theme logic that had drifted across the fleet into one behavior. Notably it fixes\n * a latent leak in one variant where the system-theme listener stayed registered after a manual\n * toggle: {@link changeTheme} always detaches the listener via {@link removeEventListener} before\n * applying the forced theme, so a later OS change can no longer silently flip an app the user pinned.\n *\n * - **Persistence** — the chosen mode is stored via {@link KitStorageService} under the configured key.\n * - **Follow OS until overridden** — on boot with nothing stored, it tracks\n * `prefers-color-scheme` (idempotent registration); once the user calls {@link changeTheme} it stops\n * following and honors the explicit choice.\n * - **Class toggling** — toggles {@link KitThemeConfig.darkClasses} on when dark and\n * {@link KitThemeConfig.lightClasses} on when light, absorbing per-app CSS differences via config.\n * - **Native status bar** — on Android native only, mirrors the Ionic behavior of setting the status\n * bar style to match (iOS derives it from the web content, so it is intentionally left untouched).\n *\n * Subscribe to {@link themeSubject} to reflect the current mode in the UI (e.g. a settings toggle).\n *\n * @example\n * ```ts\n * // On boot (app.component):\n * inject(KitThemeController).setDefaultThemeMode();\n *\n * // From a settings toggle:\n * const theme = inject(KitThemeController);\n * theme.themeSubject.subscribe((mode) => this.isDark.set(mode === 'dark'));\n * theme.changeTheme(true);\n * ```\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class KitThemeController {\n readonly #storage = inject(KitStorageService);\n readonly #document = inject(DOCUMENT);\n readonly #config = inject(KIT_THEME_CONFIG);\n\n /**\n * Emits the active theme, seeded with `'light'`.\n *\n * @remarks\n * A `BehaviorSubject`, so a late subscriber immediately receives the current mode; it emits again\n * on every {@link setDefaultThemeMode} / {@link changeTheme} and on OS theme changes while following.\n */\n readonly themeSubject = new BehaviorSubject<KitThemeMode>('light');\n\n #prefersDark?: MediaQueryList;\n #onSystemThemeChange?: (e: MediaQueryListEvent) => void;\n\n /**\n * Apply the persisted theme, or start following the OS setting when nothing is stored yet.\n *\n * @remarks\n * Call once on boot (e.g. from `app.component`).\n *\n * @returns a Promise that resolves once the initial theme has been applied\n */\n async setDefaultThemeMode(): Promise<void> {\n const stored = await this.#storage.get<KitThemeMode>(this.#config.storageKey);\n if (stored) {\n // 保存済みの選択を強制し、OS 追従は解除する。\n this.#unwatchSystemTheme();\n return this.#applyTheme(stored === 'dark');\n }\n\n // 未保存 → OS の設定に追従する。\n this.#watchSystemTheme();\n }\n\n /**\n * Force a theme, persist it, and stop following the OS setting.\n *\n * @param isDark - `true` for the dark theme, `false` for light\n * @returns a Promise that resolves once the theme has been persisted and applied\n */\n async changeTheme(isDark: boolean): Promise<void> {\n this.#unwatchSystemTheme();\n await this.#storage.set(this.#config.storageKey, isDark ? 'dark' : 'light');\n await this.#applyTheme(isDark);\n }\n\n #watchSystemTheme(): void {\n if (this.#prefersDark) {\n // 既に監視中なら二重登録しない(冪等)。\n return;\n }\n this.#prefersDark = window.matchMedia('(prefers-color-scheme: dark)');\n this.#onSystemThemeChange = (e) => void this.#applyTheme(e.matches);\n this.#prefersDark.addEventListener('change', this.#onSystemThemeChange, { passive: true });\n void this.#applyTheme(this.#prefersDark.matches);\n }\n\n #unwatchSystemTheme(): void {\n if (this.#prefersDark && this.#onSystemThemeChange) {\n this.#prefersDark.removeEventListener('change', this.#onSystemThemeChange);\n }\n this.#prefersDark = undefined;\n this.#onSystemThemeChange = undefined;\n }\n\n async #applyTheme(isDark: boolean): Promise<void> {\n if (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'android') {\n await StatusBar.setStyle({ style: isDark ? Style.Dark : Style.Light });\n }\n const root = this.#document.documentElement;\n for (const cls of this.#config.darkClasses) {\n root.classList.toggle(cls, isDark);\n }\n for (const cls of this.#config.lightClasses) {\n root.classList.toggle(cls, !isDark);\n }\n this.themeSubject.next(isDark ? 'dark' : 'light');\n }\n}\n","// Theme: light/dark controller with OS-follow and native status-bar sync.\n// Its own entry point so only apps that theme pull in `@capacitor/status-bar`.\nexport * from './theme-config';\nexport * from './kit-theme.controller';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AA0BA;;;;;AAKG;MACU,gBAAgB,GAAG,IAAI,cAAc,CAAiB,iCAAiC;AAEpG;;;;;;;;;;;;;;;;;;;;AAoBG;MACU,eAAe,GAAG,CAAC,MAAsB,KACpD,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;;AC5C5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MAIU,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIW,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACpC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAE3C;;;;;;AAMG;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAAe,OAAO,CAAC;AAqEnE,IAAA;AAhFU,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,OAAO;AAWhB,IAAA,YAAY;AACZ,IAAA,oBAAoB;AAEpB;;;;;;;AAOG;AACH,IAAA,MAAM,mBAAmB,GAAA;AACvB,QAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAe,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QAC7E,IAAI,MAAM,EAAE;;YAEV,IAAI,CAAC,mBAAmB,EAAE;YAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC;QAC5C;;QAGA,IA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C,IAAI,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;QACxE;AACA,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,eAAe;QAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YAC1C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC;QACpC;QACA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YAC3C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;QACrC;AACA,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACnD;8GAhFW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC9CD;AACA;;ACDA;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, InjectionToken, makeEnvironmentProviders, ElementRef, Injector, input, computed, HostListener, Directive, ErrorHandler, DestroyRef, provideAppInitializer, Optional, afterNextRender } from '@angular/core';
3
3
  import { Storage } from '@ionic/storage-angular';
4
- import { ModalController, PopoverController, ToastController, AlertController, LoadingController, NavController } from '@ionic/angular/standalone';
4
+ import { ModalController, PopoverController, ToastController, AlertController, LoadingController, NavController } from '@ionic/angular';
5
5
  import { Capacitor } from '@capacitor/core';
6
6
  import { Keyboard } from '@capacitor/keyboard';
7
7
  import { ImpactStyle, Haptics } from '@capacitor/haptics';
@@ -92,10 +92,10 @@ class KitStorageService {
92
92
  async keys() {
93
93
  return (await this.#ready).keys();
94
94
  }
95
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
96
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitStorageService, providedIn: 'root' }); }
95
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
96
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitStorageService, providedIn: 'root' }); }
97
97
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitStorageService, decorators: [{
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitStorageService, decorators: [{
99
99
  type: Injectable,
100
100
  args: [{
101
101
  providedIn: 'root',
@@ -485,10 +485,10 @@ class KitOverlayController {
485
485
  };
486
486
  return present().finally(() => (this.#alertPresenting = false));
487
487
  }
488
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitOverlayController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
489
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitOverlayController, providedIn: 'root' }); }
488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitOverlayController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
489
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitOverlayController, providedIn: 'root' }); }
490
490
  }
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitOverlayController, decorators: [{
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitOverlayController, decorators: [{
492
492
  type: Injectable,
493
493
  args: [{
494
494
  providedIn: 'root',
@@ -596,10 +596,10 @@ class KitLoadingController {
596
596
  this.#queue = run.then(() => undefined, () => undefined);
597
597
  return run;
598
598
  }
599
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitLoadingController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
600
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitLoadingController, providedIn: 'root' }); }
599
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitLoadingController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
600
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitLoadingController, providedIn: 'root' }); }
601
601
  }
602
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitLoadingController, decorators: [{
602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitLoadingController, decorators: [{
603
603
  type: Injectable,
604
604
  args: [{
605
605
  providedIn: 'root',
@@ -686,10 +686,10 @@ class KitReloadAlertController {
686
686
  this.#alert = null;
687
687
  await alert?.dismiss();
688
688
  }
689
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitReloadAlertController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
690
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitReloadAlertController, providedIn: 'root' }); }
689
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitReloadAlertController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
690
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitReloadAlertController, providedIn: 'root' }); }
691
691
  }
692
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitReloadAlertController, decorators: [{
692
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitReloadAlertController, decorators: [{
693
693
  type: Injectable,
694
694
  args: [{
695
695
  providedIn: 'root',
@@ -837,10 +837,10 @@ class KitMaintenanceController {
837
837
  source.close();
838
838
  }
839
839
  }
840
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitMaintenanceController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
841
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitMaintenanceController, providedIn: 'root' }); }
840
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitMaintenanceController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
841
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitMaintenanceController, providedIn: 'root' }); }
842
842
  }
843
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitMaintenanceController, decorators: [{
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitMaintenanceController, decorators: [{
844
844
  type: Injectable,
845
845
  args: [{
846
846
  providedIn: 'root',
@@ -990,16 +990,20 @@ class KitAuthInputDirective {
990
990
  /** The Signal Forms field bound on this same element, if any (used to seed the prefill). */
991
991
  this.#field = inject(FORM_FIELD, { optional: true, self: true });
992
992
  /** Mode selector; see {@link KitAuthInputMode}. */
993
- this.kitAuthInput = input('autofill', ...(ngDevMode ? [{ debugName: "kitAuthInput" }] : /* istanbul ignore next */ []));
993
+ this.kitAuthInput = input('autofill', /* @ts-ignore */
994
+ ...(ngDevMode ? [{ debugName: "kitAuthInput" }] : /* istanbul ignore next */ []));
994
995
  /** Whether this instance persists the entered email (`'email'` or `'email-remember'`). */
995
996
  this.#remembers = computed(() => {
996
997
  const mode = this.kitAuthInput();
997
998
  return mode === 'email' || mode === 'email-remember';
998
- }, ...(ngDevMode ? [{ debugName: "#remembers" }] : /* istanbul ignore next */ []));
999
+ }, /* @ts-ignore */
1000
+ ...(ngDevMode ? [{ debugName: "#remembers" }] : /* istanbul ignore next */ []));
999
1001
  /** Whether this instance prefills the field from storage (`'email'` only). */
1000
- this.#prefills = computed(() => this.kitAuthInput() === 'email', ...(ngDevMode ? [{ debugName: "#prefills" }] : /* istanbul ignore next */ []));
1002
+ this.#prefills = computed(() => this.kitAuthInput() === 'email', /* @ts-ignore */
1003
+ ...(ngDevMode ? [{ debugName: "#prefills" }] : /* istanbul ignore next */ []));
1001
1004
  /** Whether clearing/invalidating the field forgets the stored email (`'email'` only). */
1002
- this.#forgetsOnClear = computed(() => this.kitAuthInput() === 'email', ...(ngDevMode ? [{ debugName: "#forgetsOnClear" }] : /* istanbul ignore next */ []));
1005
+ this.#forgetsOnClear = computed(() => this.kitAuthInput() === 'email', /* @ts-ignore */
1006
+ ...(ngDevMode ? [{ debugName: "#forgetsOnClear" }] : /* istanbul ignore next */ []));
1003
1007
  }
1004
1008
  #el;
1005
1009
  #injector;
@@ -1085,10 +1089,10 @@ class KitAuthInputDirective {
1085
1089
  state.value.set(last);
1086
1090
  }
1087
1091
  }
1088
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1089
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: KitAuthInputDirective, isStandalone: true, selector: "[kitAuthInput]", inputs: { kitAuthInput: { classPropertyName: "kitAuthInput", publicName: "kitAuthInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "ionChange": "onIonChange($event)" } }, ngImport: i0 }); }
1092
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1093
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: KitAuthInputDirective, isStandalone: true, selector: "[kitAuthInput]", inputs: { kitAuthInput: { classPropertyName: "kitAuthInput", publicName: "kitAuthInput", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "ionChange": "onIonChange($event)" } }, ngImport: i0 }); }
1090
1094
  }
1091
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthInputDirective, decorators: [{
1095
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthInputDirective, decorators: [{
1092
1096
  type: Directive,
1093
1097
  args: [{
1094
1098
  selector: '[kitAuthInput]',
@@ -1265,10 +1269,10 @@ class KitAuthAccessService {
1265
1269
  this.#mode.next(mode);
1266
1270
  return { isCurrent: () => this.#revision === revision };
1267
1271
  }
1268
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthAccessService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1269
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthAccessService, providedIn: 'root' }); }
1272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthAccessService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1273
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthAccessService, providedIn: 'root' }); }
1270
1274
  }
1271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthAccessService, decorators: [{
1275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthAccessService, decorators: [{
1272
1276
  type: Injectable,
1273
1277
  args: [{ providedIn: 'root' }]
1274
1278
  }] });
@@ -1422,10 +1426,10 @@ class KitAuthRecoveryService {
1422
1426
  return 30_000;
1423
1427
  return Math.max(1_000, configured);
1424
1428
  }
1425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthRecoveryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1426
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthRecoveryService, providedIn: 'root' }); }
1429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthRecoveryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1430
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthRecoveryService, providedIn: 'root' }); }
1427
1431
  }
1428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitAuthRecoveryService, decorators: [{
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitAuthRecoveryService, decorators: [{
1429
1433
  type: Injectable,
1430
1434
  args: [{ providedIn: 'root' }]
1431
1435
  }], ctorParameters: () => [] });
@@ -2514,10 +2518,10 @@ class KitRealtimeConnection {
2514
2518
  clearTimeout(this.#reconnectTimer);
2515
2519
  this.#reconnectTimer = null;
2516
2520
  }
2517
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitRealtimeConnection, deps: [{ token: KitAuthAccessService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2518
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitRealtimeConnection }); }
2521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitRealtimeConnection, deps: [{ token: KitAuthAccessService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitRealtimeConnection }); }
2519
2523
  }
2520
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: KitRealtimeConnection, decorators: [{
2524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: KitRealtimeConnection, decorators: [{
2521
2525
  type: Injectable
2522
2526
  }], ctorParameters: () => [{ type: KitAuthAccessService, decorators: [{
2523
2527
  type: Optional