@openzeppelin/ui-react 1.2.0 → 2.0.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/version.ts","../src/hooks/AdapterContext.tsx","../src/hooks/AdapterProvider.tsx","../src/hooks/WalletStateContext.ts","../src/hooks/WalletStateProvider.tsx","../src/hooks/AnalyticsContext.tsx","../src/hooks/AnalyticsProvider.tsx","../src/hooks/useAnalytics.ts","../src/hooks/useAdapterContext.ts","../src/hooks/useWalletComponents.ts","../src/hooks/useDerivedAccountStatus.ts","../src/hooks/useDerivedSwitchChainStatus.ts","../src/hooks/useDerivedChainInfo.ts","../src/hooks/useDerivedConnectStatus.ts","../src/hooks/useDerivedDisconnect.ts","../src/hooks/useWalletReconnectionHandler.ts","../src/components/WalletConnectionHeader.tsx","../src/components/WalletConnectionUI.tsx","../src/components/NetworkSwitchManager.tsx"],"sourcesContent":[],"mappings":";;;;;;cACa;;;;;;;UCkBI,eAAA;EDlBJ,CAAA,SAAqC,EAAA,MAAA,CAAA,ECmB3B,eDnB2B;;;;ACkBlD;AASA;AAWA;UAXiB,mBAAA;wCACuB;aAC3B;ICRI,SAAA,EAAA,OAAA;EACL,CAAA;;;;;AAeZ;AAAkC,cDCrB,cCDqB,EDCP,MAAA,CAAA,OCDO,CDCP,mBCDO,GAAA,IAAA,CAAA;;;;AAftB,UADK,oBAAA,CACL;EAEsB,QAAA,EAFtB,SAEsB;EAA0B;EAAR,cAAA,EAAA,CAAA,aAAA,EAAlB,aAAkB,EAAA,GAAA,OAAA,CAAQ,eAAR,CAAA;;AAapD;;;;;;;;;AC7BA;AAIuB,iBDyBP,eAAA,CCzBO;EAAA,QAAA;EAAA;AAAA,CAAA,EDyBuC,oBCzBvC,CAAA,EDyB2D,kBAAA,CAAA,GAAA,CAAA,OCzB3D;;;UAJN,uBAAA;;;uBAIM;EHZV,aAAqC,EGejC,e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,CAAA;;;;;;UeXtC,yBAAA;ElBVJ;WkBYF;;;EjBMM;EASA,uBAAmB,CAAA,EAAA,GAAA,GAAA,IACI;AAUxC;;;;ACjBA;;;;;;AAgBA;;;;;AAAkF,cgBJrE,oBhBIqE,EgBJ/C,KAAA,CAAM,EhBIyC,CgBJtC,yBhBIsC,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/version.ts","../src/hooks/AdapterContext.tsx","../src/hooks/AdapterProvider.tsx","../src/hooks/WalletStateContext.ts","../src/hooks/WalletStateProvider.tsx","../src/hooks/AnalyticsContext.tsx","../src/hooks/AnalyticsProvider.tsx","../src/hooks/useAnalytics.ts","../src/hooks/useAdapterContext.ts","../src/hooks/useWalletComponents.ts","../src/hooks/useDerivedAccountStatus.ts","../src/hooks/useDerivedSwitchChainStatus.ts","../src/hooks/useDerivedChainInfo.ts","../src/hooks/useDerivedConnectStatus.ts","../src/hooks/useDerivedDisconnect.ts","../src/hooks/useWalletReconnectionHandler.ts","../src/components/WalletConnectionHeader.tsx","../src/components/WalletConnectionUI.tsx","../src/components/NetworkSwitchManager.tsx"],"sourcesContent":[],"mappings":";;;;;;cACa;;;;;;UCiBI,eAAA;uBACM;ADlBvB;;;;ACiBA;AASA;AAgBa,UAhBI,mBAAA,CAgBU;wCAfa;aAC3B;;ECPI,CAAA;EACL;;;;EAE+C,cAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,GAAA,IAAA;AAa3D;;;;;AAAkF,cDKrE,cCLqE,EDKvD,MAAA,CAAA,OCLuD,CDKvD,mBCLuD,GAAA,IAAA,CAAA;;;;AAftE,UADK,oBAAA,CACL;EAEsB,QAAA,EAFtB,SAEsB;EAA0B;EAAR,cAAA,EAAA,CAAA,aAAA,EAAlB,aAAkB,EAAA,GAAA,OAAA,CAAQ,gBAAR,CAAA;;AAapD;;;;;;;;;AC7BA;AAIuB,iBDyBP,eAAA,CCzBO;EAAA,QAAA;EAAA;AAAA,CAAA,EDyBuC,o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AA,EgBVO,kBhBWgB;EAe3B;yBgBxBY;;;AfGzB;;;;;;AAgBA;;;;;;;;;AC7BA;;;;;;AAagD,ccsBnC,kBdtBmC,EcsBf,KAAA,CAAM,EdtBS,CcsBN,uBdtBM,CAAA;;;;;;UeX/B,yBAAA;ElBVJ;UkBYH;;kBAEQ;EjBGD;EASA,eAAA,EAAA,MAAmB;EAgBvB;;;;ACrBb;;;;;;AAgBA;;;;;;;cgBFa,sBAAsB,KAAA,CAAM,GAAG"}
package/dist/index.d.mts CHANGED
@@ -1,67 +1,71 @@
1
1
  import * as react0 from "react";
2
2
  import React, { ReactNode } from "react";
3
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
- import { BaseComponentProps, Connector, ContractAdapter, EcosystemSpecificReactHooks, EcosystemWalletComponents, NativeConfigLoader, NetworkConfig, UiKitConfiguration } from "@openzeppelin/ui-types";
4
+ import { BaseComponentProps, Connector, EcosystemRuntime, EcosystemSpecificReactHooks, EcosystemWalletComponents, NativeConfigLoader, NetworkCatalogCapability, NetworkConfig, RuntimeCapability, UiKitConfiguration, WalletCapability } from "@openzeppelin/ui-types";
5
5
 
6
6
  //#region src/version.d.ts
7
7
  declare const VERSION: string;
8
8
  //#endregion
9
9
  //#region src/hooks/AdapterContext.d.ts
10
10
  /**
11
- * Registry type that maps network IDs to their corresponding adapter instances
12
- * This is the core data structure for the singleton pattern
11
+ * Registry type that maps network IDs to their corresponding runtime instances.
13
12
  */
14
- interface AdapterRegistry {
15
- [networkId: string]: ContractAdapter;
13
+ interface RuntimeRegistry {
14
+ [networkId: string]: EcosystemRuntime;
16
15
  }
17
16
  /**
18
- * Context value interface defining what's provided through the context
19
- * The main functionality is getAdapterForNetwork which either returns
20
- * an existing adapter or initiates loading of a new one
17
+ * Context value interface defining what's provided through the context.
18
+ * The main functionality is `getRuntimeForNetwork`, which either returns an existing
19
+ * runtime or initiates loading of a new one.
21
20
  */
22
- interface AdapterContextValue {
23
- getAdapterForNetwork: (networkConfig: NetworkConfig | null) => {
24
- adapter: ContractAdapter | null;
21
+ interface RuntimeContextValue {
22
+ getRuntimeForNetwork: (networkConfig: NetworkConfig | null) => {
23
+ runtime: EcosystemRuntime | null;
25
24
  isLoading: boolean;
26
25
  };
26
+ /**
27
+ * Evicts a runtime from the registry and calls `dispose()` on it.
28
+ * Used by WalletStateProvider to release superseded runtimes after a safe handoff.
29
+ */
30
+ releaseRuntime: (networkId: string) => void;
27
31
  }
28
32
  /**
29
- * The React Context that provides adapter registry access throughout the app
30
- * Components can access this through the useAdapterContext hook
33
+ * The React Context that provides runtime registry access throughout the app.
34
+ * Components can access this through the `useRuntimeContext` hook.
31
35
  */
32
- declare const AdapterContext: react0.Context<AdapterContextValue | null>;
36
+ declare const RuntimeContext: react0.Context<RuntimeContextValue | null>;
33
37
  //#endregion
34
38
  //#region src/hooks/AdapterProvider.d.ts
35
39
 
36
- interface AdapterProviderProps {
40
+ interface RuntimeProviderProps {
37
41
  children: ReactNode;
38
- /** Function to resolve/create an adapter instance for a given NetworkConfig. */
39
- resolveAdapter: (networkConfig: NetworkConfig) => Promise<ContractAdapter>;
42
+ /** Function to resolve/create a runtime instance for a given NetworkConfig. */
43
+ resolveRuntime: (networkConfig: NetworkConfig) => Promise<EcosystemRuntime>;
40
44
  }
41
45
  /**
42
- * Provider component that manages adapter instances centrally
43
- * to avoid creating multiple instances of the same adapter.
46
+ * Provider component that manages runtime instances centrally
47
+ * to avoid creating multiple instances of the same runtime.
44
48
  *
45
49
  * This component:
46
- * 1. Maintains a registry of adapter instances by network ID
47
- * 2. Tracks loading states for adapters being initialized
48
- * 3. Provides a function to get or load adapters for specific networks
49
- * 4. Ensures adapter instances are reused when possible
50
+ * 1. Maintains a registry of runtime instances by network ID
51
+ * 2. Tracks loading states for runtimes being initialized
52
+ * 3. Provides a function to get or load runtimes for specific networks
53
+ * 4. Ensures runtime instances are reused when possible
50
54
  */
51
- declare function AdapterProvider({
55
+ declare function RuntimeProvider({
52
56
  children,
53
- resolveAdapter
54
- }: AdapterProviderProps): react_jsx_runtime0.JSX.Element;
57
+ resolveRuntime
58
+ }: RuntimeProviderProps): react_jsx_runtime0.JSX.Element;
55
59
  //#endregion
56
60
  //#region src/hooks/WalletStateContext.d.ts
57
61
  interface WalletStateContextValue {
58
62
  activeNetworkId: string | null;
59
63
  setActiveNetworkId: (networkId: string | null) => void;
60
64
  activeNetworkConfig: NetworkConfig | null;
61
- activeAdapter: ContractAdapter | null;
62
- isAdapterLoading: boolean;
65
+ activeRuntime: EcosystemRuntime | null;
66
+ isRuntimeLoading: boolean;
63
67
  walletFacadeHooks: EcosystemSpecificReactHooks | null;
64
- reconfigureActiveAdapterUiKit: (uiKitConfig?: Partial<UiKitConfiguration>) => void;
68
+ reconfigureActiveUiKit: (uiKitConfig?: Partial<UiKitConfiguration>) => void;
65
69
  }
66
70
  declare const WalletStateContext: React.Context<WalletStateContextValue | undefined>;
67
71
  /**
@@ -91,15 +95,16 @@ interface WalletStateProviderProps {
91
95
  * It is responsible for:
92
96
  * 1. Managing the globally selected active network ID (`activeNetworkId`).
93
97
  * 2. Deriving the full `NetworkConfig` object (`activeNetworkConfig`) for the active network.
94
- * 3. Fetching and providing the corresponding `ContractAdapter` instance (`activeAdapter`) for the active network,
95
- * leveraging the `AdapterProvider` to ensure adapter singletons.
96
- * 4. Storing and providing the `EcosystemSpecificReactHooks` (`walletFacadeHooks`) from the active adapter.
97
- * 5. Rendering the adapter-specific UI context provider (e.g., WagmiProvider for EVM) around its children,
98
- * which is essential for the facade hooks to function correctly.
98
+ * 3. Fetching and providing the corresponding `EcosystemRuntime` (`activeRuntime`) for the active network,
99
+ * leveraging the `RuntimeProvider` to ensure runtime singletons.
100
+ * 4. Caching ecosystem-scoped wallet session artifacts (provider roots and facade hooks)
101
+ * independently from the network-scoped runtime.
102
+ * 5. Rendering the active ecosystem wallet provider (e.g., WagmiProvider for EVM) around its
103
+ * children, which is essential for the facade hooks to function correctly.
99
104
  * 6. Providing a function (`setActiveNetworkId`) to change the globally active network.
100
105
  *
101
106
  * Consumers use the `useWalletState()` hook to access this global state.
102
- * It should be placed high in the component tree, inside an `<AdapterProvider>`.
107
+ * It should be placed high in the component tree, inside a `<RuntimeProvider>`.
103
108
  */
104
109
  declare function WalletStateProvider({
105
110
  children,
@@ -238,29 +243,29 @@ declare const useAnalytics: () => AnalyticsContextValue;
238
243
  //#endregion
239
244
  //#region src/hooks/useAdapterContext.d.ts
240
245
  /**
241
- * Hook to access the adapter context
246
+ * Hook to access the runtime context
242
247
  *
243
- * This hook provides access to the getAdapterForNetwork function which
244
- * retrieves or creates adapter instances from the singleton registry.
248
+ * This hook provides access to the `getRuntimeForNetwork` function which
249
+ * retrieves or creates runtime instances from the singleton registry.
245
250
  *
246
- * Components should typically use useConfiguredAdapterSingleton instead
251
+ * Components should typically use the higher-level wallet/runtime hooks instead
247
252
  * of this hook directly, as it handles React state update timing properly.
248
253
  *
249
- * @throws Error if used outside of an AdapterProvider context
250
- * @returns The adapter context value
254
+ * @throws Error if used outside of a RuntimeProvider context
255
+ * @returns The runtime context value
251
256
  */
252
- declare function useAdapterContext(): AdapterContextValue;
257
+ declare function useRuntimeContext(): RuntimeContextValue;
253
258
  //#endregion
254
259
  //#region src/hooks/useWalletComponents.d.ts
255
260
  /**
256
- * Hook that provides direct access to wallet UI components from the active adapter.
261
+ * Hook that provides direct access to wallet UI components from the active runtime.
257
262
  *
258
263
  * Use this hook when you need full control over the layout and composition of
259
264
  * wallet components. For standard layouts, prefer using `WalletConnectionUI`
260
265
  * with its props forwarding capabilities.
261
266
  *
262
- * @returns The wallet components object, or null if no adapter is active or
263
- * the adapter doesn't provide wallet components.
267
+ * @returns The wallet components object, or null if no runtime is active or
268
+ * the runtime doesn't provide wallet components.
264
269
  *
265
270
  * @example
266
271
  * ```tsx
@@ -299,6 +304,10 @@ declare function useWalletComponents(): EcosystemWalletComponents | null;
299
304
  //#region src/hooks/useDerivedAccountStatus.d.ts
300
305
  interface DerivedAccountStatus {
301
306
  isConnected: boolean;
307
+ isConnecting: boolean;
308
+ isDisconnected: boolean;
309
+ isReconnecting: boolean;
310
+ status: string;
302
311
  address?: string;
303
312
  chainId?: number;
304
313
  }
@@ -391,11 +400,11 @@ declare function useDerivedDisconnect(): DerivedDisconnectStatus;
391
400
  * This hook detects that scenario and invokes a callback to re-queue the network switch.
392
401
  *
393
402
  * @param selectedNetworkConfigId - Currently selected network in the app
394
- * @param selectedAdapter - Currently active adapter instance
403
+ * @param selectedCapability - Currently active wallet capability instance
395
404
  * @param networkToSwitchTo - Current network switch queue state (null if no switch pending)
396
405
  * @param onRequeueSwitch - Callback invoked when a network switch should be re-queued
397
406
  */
398
- declare function useWalletReconnectionHandler(selectedNetworkConfigId: string | null, selectedAdapter: ContractAdapter | null, networkToSwitchTo: string | null, onRequeueSwitch: (networkId: string) => void): void;
407
+ declare function useWalletReconnectionHandler(selectedNetworkConfigId: string | null, selectedCapability: RuntimeCapability | null, networkToSwitchTo: string | null, onRequeueSwitch: (networkId: string) => void): void;
399
408
  //#endregion
400
409
  //#region src/components/WalletConnectionHeader.d.ts
401
410
  /**
@@ -447,8 +456,10 @@ declare const WalletConnectionUI: React.FC<WalletConnectionUIProps>;
447
456
  * Props for the NetworkSwitchManager component.
448
457
  */
449
458
  interface NetworkSwitchManagerProps {
450
- /** The adapter instance for the target network */
451
- adapter: ContractAdapter;
459
+ /** Wallet capability for the target network */
460
+ wallet: WalletCapability;
461
+ /** Network catalog capability used to validate the target network id */
462
+ networkCatalog: NetworkCatalogCapability;
452
463
  /** The network ID we want to switch to */
453
464
  targetNetworkId: string;
454
465
  /** Callback when network switch completes (success or error) */
@@ -470,5 +481,5 @@ interface NetworkSwitchManagerProps {
470
481
  */
471
482
  declare const NetworkSwitchManager: React.FC<NetworkSwitchManagerProps>;
472
483
  //#endregion
473
- export { AdapterContext, type AdapterContextValue, AdapterProvider, type AdapterProviderProps, type AdapterRegistry, AnalyticsContext, type AnalyticsContextValue, AnalyticsProvider, type AnalyticsProviderProps, type DerivedAccountStatus, type DerivedChainInfo, type DerivedConnectStatus, type DerivedDisconnectStatus, type DerivedSwitchChainStatus, NetworkSwitchManager, type NetworkSwitchManagerProps, VERSION, WalletConnectionHeader, WalletConnectionUI, type WalletConnectionUIProps, WalletStateContext, type WalletStateContextValue, WalletStateProvider, type WalletStateProviderProps, useAdapterContext, useAnalytics, useDerivedAccountStatus, useDerivedChainInfo, useDerivedConnectStatus, useDerivedDisconnect, useDerivedSwitchChainStatus, useWalletComponents, useWalletReconnectionHandler, useWalletState };
484
+ export { AnalyticsContext, type AnalyticsContextValue, AnalyticsProvider, type AnalyticsProviderProps, type DerivedAccountStatus, type DerivedChainInfo, type DerivedConnectStatus, type DerivedDisconnectStatus, type DerivedSwitchChainStatus, NetworkSwitchManager, type NetworkSwitchManagerProps, RuntimeContext, type RuntimeContextValue, RuntimeProvider, type RuntimeProviderProps, type RuntimeRegistry, VERSION, WalletConnectionHeader, WalletConnectionUI, type WalletConnectionUIProps, WalletStateContext, type WalletStateContextValue, WalletStateProvider, type WalletStateProviderProps, useAnalytics, useDerivedAccountStatus, useDerivedChainInfo, useDerivedConnectStatus, useDerivedDisconnect, useDerivedSwitchChainStatus, useRuntimeContext, useWalletComponents, useWalletReconnectionHandler, useWalletState };
474
485
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/version.ts","../src/hooks/AdapterContext.tsx","../src/hooks/AdapterProvider.tsx","../src/hooks/WalletStateContext.ts","../src/hooks/WalletStateProvider.tsx","../src/hooks/AnalyticsContext.tsx","../src/hooks/AnalyticsProvider.tsx","../src/hooks/useAnalytics.ts","../src/hooks/useAdapterContext.ts","../src/hooks/useWalletComponents.ts","../src/hooks/useDerivedAccountStatus.ts","../src/hooks/useDerivedSwitchChainStatus.ts","../src/hooks/useDerivedChainInfo.ts","../src/hooks/useDerivedConnectStatus.ts","../src/hooks/useDerivedDisconnect.ts","../src/hooks/useWalletReconnectionHandler.ts","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V;;;UUlBpB,gBAAA;;;;;;AZHjB;;;;ACkBA;AASA;AAWa,iBWjBG,mBAAA,CAAA,CXiBW,EWjBY,gBXiBZ;;;UYhCV,oBAAA;;;gBAEiB;;EbRrB;caUC;;;EZQG;EASA,KAAA,EYbR,KZaQ,GAAA,IAAA;EAWJ;qBYtBQ;;;AXKrB;;;;AAGoD,iBWQpC,uBAAA,CAAA,CXRoC,EWQT,oBXRS;;;UYrBnC,uBAAA;;4BAEW;;;;EdLf,KAAA,EcSJ,KdTyC,GAAA,IAAA;;;;ACkBlD;AASA;AAWA;iBafgB,oBAAA,CAAA,GAAwB;;;;;;;;AdvBxC;;;;ACkBA;AASA;AAWA;iBcpBgB,4BAAA,0DAEG;;;;;;;cCVN,wBAAwB,KAAA,CAAM;;;;;;UCA1B,uBAAA;EjBVJ;;;uBiBcU;EhBIN;EASA,mBAAA,CAAA,EgBXO,kBhBYgB;EAU3B;yBgBpBY;;;AfGzB;;;;;;AAgBA;;;;;;;;;AC7BA;;;;;;AAauD,ccsB1C,kBdtB0C,EcsBtB,KAAA,CAAM,EdtBgB,CcsBb,uBdtBa,CAAA;;;;;;UeXtC,yBAAA;ElBVJ;WkBYF;;;EjBMM;EASA,uBAAmB,CAAA,EAAA,GAAA,GAAA,IACI;AAUxC;;;;ACjBA;;;;;;AAgBA;;;;;AAAkF,cgBJrE,oBhBIqE,EgBJ/C,KAAA,CAAM,EhBIyC,CgBJtC,yBhBIsC,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/version.ts","../src/hooks/AdapterContext.tsx","../src/hooks/AdapterProvider.tsx","../src/hooks/WalletStateContext.ts","../src/hooks/WalletStateProvider.tsx","../src/hooks/AnalyticsContext.tsx","../src/hooks/AnalyticsProvider.tsx","../src/hooks/useAnalytics.ts","../src/hooks/useAdapterContext.ts","../src/hooks/useWalletComponents.ts","../src/hooks/useDerivedAccountStatus.ts","../src/hooks/useDerivedSwitchChainStatus.ts","../src/hooks/useDerivedChainInfo.ts","../src/hooks/useDerivedConnectStatus.ts","../src/hooks/useDerivedDisconnect.ts","../src/hooks/useWalletReconnectionHandler.ts","../src/components/WalletConnectionHeader.tsx","../src/components/WalletConnectionUI.tsx","../src/components/NetworkSwitchManager.tsx"],"sourcesContent":[],"mappings":";;;;;;cACa;;;;;;UCiBI,eAAA;uBACM;ADlBvB;;;;ACiBA;AASA;AAgBa,UAhBI,mBAAA,CAgBU;wCAfa;aAC3B;;ECPI,CAAA;EACL;;;;EAE+C,cAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,GAAA,IAAA;AAa3D;;;;;AAAkF,cDKrE,cCLqE,EDKvD,MAAA,CAAA,OCLuD,CDKvD,mBCLuD,GAAA,IAAA,CAAA;;;;AAftE,UADK,oBAAA,CACL;EAEsB,QAAA,EAFtB,SAEsB;EAA0B;EAAR,cAAA,EAAA,CAAA,aAAA,EAAlB,aAAkB,EAAA,GAAA,OAAA,CAAQ,gBAAR,CAAA;;AAapD;;;;;;;;;AC7BA;AAIuB,iBDyBP,eAAA,CCzBO;EAAA,QAAA;EAAA;AAAA,CAAA,EDyBuC,oBCzBvC,CAAA,EDyB2D,kBAAA,CAAA,GAAA,CAAA,OCzB3D;;;UAJN,uBAAA;;;uBAIM;EHZV,aAAqC,EGejC,gBHfiC,GAAA,IAAA;;qBGoB7B;yCACoB,QAAQ;AFJjD;AASiB,cEuEJ,kBFtE2B,EEsET,KAAA,CAAA,OFrElB,CEqEkB,uBFrEF,GAAA,SAAA,CAAA;AAc7B;;;;ACrBiB,iBCkFD,cAAA,CAAA,CDlFqB,ECkFH,uBDlFG;;;UEFpB,wBAAA;YACL;;;EJpBC;+CI0BN,QAAQ,oCAAoC;;;AHTnD;AASA;AAgBA;;qBGTqB;;AFZrB;;;;;;AAgBA;;;;;;;;;AC7BA;;AAOiB,iBCwFD,mBAAA,CDxFC;EAAA,QAAA;EAAA,gBAAA;EAAA,oBAAA;EAAA;AAAA,CAAA,EC6Fd,wBD7Fc,CAAA,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