@explorins/pers-sdk-react-native 2.2.0-beta.1 → 2.2.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.
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=PersSDKProvider.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersSDKProvider.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/PersSDKProvider.test.tsx"],"names":[],"mappings":"AAEA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,290 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { render, act, waitFor } from '@testing-library/react';
4
+ import '@testing-library/jest-dom';
5
+ import { PersSDKProvider, usePersSDK } from '../providers/PersSDKProvider';
6
+ // Store SDK instances for event emission
7
+ let mockSdkInstance = null;
8
+ // Mock the SDK core module BEFORE any imports use it
9
+ jest.mock('@explorins/pers-sdk/core', () => {
10
+ const createMockEventEmitter = () => {
11
+ const subscribers = [];
12
+ return {
13
+ subscribe: jest.fn((callback, options) => {
14
+ subscribers.push({ callback, options });
15
+ return () => {
16
+ const index = subscribers.findIndex(s => s.callback === callback);
17
+ if (index > -1)
18
+ subscribers.splice(index, 1);
19
+ };
20
+ }),
21
+ emit: (event) => {
22
+ subscribers.forEach(({ callback, options }) => {
23
+ if (!options?.domains || options.domains.includes(event.domain)) {
24
+ callback(event);
25
+ }
26
+ });
27
+ },
28
+ _subscribers: subscribers
29
+ };
30
+ };
31
+ const MockPersSDK = jest.fn().mockImplementation(() => {
32
+ const events = createMockEventEmitter();
33
+ mockSdkInstance = {
34
+ events,
35
+ auth: {
36
+ ensureValidToken: jest.fn().mockResolvedValue(true)
37
+ },
38
+ users: {
39
+ getCurrentUser: jest.fn().mockResolvedValue({ id: 'refreshed-user', email: 'refreshed@test.com' })
40
+ },
41
+ restoreSession: jest.fn().mockResolvedValue(null)
42
+ };
43
+ return mockSdkInstance;
44
+ });
45
+ return {
46
+ PersSDK: MockPersSDK,
47
+ DefaultAuthProvider: jest.fn().mockImplementation(() => ({
48
+ getToken: jest.fn().mockResolvedValue('mock-token')
49
+ }))
50
+ };
51
+ });
52
+ // Mock platform-specific providers
53
+ jest.mock('../providers/react-native-http-client', () => ({
54
+ ReactNativeHttpClient: jest.fn().mockImplementation(() => ({}))
55
+ }));
56
+ jest.mock('../providers/react-native-auth-provider', () => ({
57
+ createReactNativeAuthProvider: jest.fn().mockReturnValue({
58
+ getToken: jest.fn().mockResolvedValue('mock-token')
59
+ })
60
+ }));
61
+ jest.mock('../providers/rn-dpop-provider', () => ({
62
+ ReactNativeDPoPProvider: jest.fn().mockImplementation(() => ({}))
63
+ }));
64
+ // Helper component to access context
65
+ const TestConsumer = ({ onContext }) => {
66
+ const context = usePersSDK();
67
+ React.useEffect(() => {
68
+ onContext(context);
69
+ }, [context, onContext]);
70
+ return _jsx("div", { "data-testid": "consumer", children: "Consumer" });
71
+ };
72
+ // Helper to emit events on the mock SDK
73
+ const emitAuthEvent = (type, details = {}) => {
74
+ if (mockSdkInstance?.events) {
75
+ mockSdkInstance.events.emit({
76
+ type,
77
+ domain: 'authentication',
78
+ details
79
+ });
80
+ }
81
+ };
82
+ describe('PersSDKProvider', () => {
83
+ beforeEach(() => {
84
+ jest.clearAllMocks();
85
+ mockSdkInstance = null;
86
+ });
87
+ describe('initialization', () => {
88
+ it('should initialize with null SDK when no config provided', async () => {
89
+ let capturedContext = null;
90
+ render(_jsx(PersSDKProvider, { children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
91
+ await waitFor(() => {
92
+ expect(capturedContext).not.toBeNull();
93
+ });
94
+ expect(capturedContext.sdk).toBeNull();
95
+ expect(capturedContext.isInitialized).toBe(false);
96
+ expect(capturedContext.isAuthenticated).toBe(false);
97
+ expect(capturedContext.user).toBeNull();
98
+ });
99
+ it('should auto-initialize when config is provided', async () => {
100
+ let capturedContext = null;
101
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
102
+ await waitFor(() => {
103
+ expect(capturedContext?.isInitialized).toBe(true);
104
+ });
105
+ expect(capturedContext.sdk).not.toBeNull();
106
+ });
107
+ it('should prevent multiple initializations', async () => {
108
+ const { PersSDK } = require('@explorins/pers-sdk/core');
109
+ let capturedContext = null;
110
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
111
+ await waitFor(() => {
112
+ expect(capturedContext?.isInitialized).toBe(true);
113
+ });
114
+ // Try to initialize again - should be ignored
115
+ await act(async () => {
116
+ await capturedContext.initialize({ apiProjectKey: 'different-project' });
117
+ });
118
+ // Should only have been called once
119
+ expect(PersSDK).toHaveBeenCalledTimes(1);
120
+ });
121
+ });
122
+ describe('event handling', () => {
123
+ it('should set user on session_restored event', async () => {
124
+ let capturedContext = null;
125
+ const mockUser = { id: 'user-123', email: 'test@example.com' };
126
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
127
+ await waitFor(() => {
128
+ expect(capturedContext?.sdk).not.toBeNull();
129
+ });
130
+ // Emit session_restored event
131
+ await act(async () => {
132
+ emitAuthEvent('session_restored', { user: mockUser });
133
+ });
134
+ await waitFor(() => {
135
+ expect(capturedContext?.isAuthenticated).toBe(true);
136
+ expect(capturedContext?.user).toEqual(mockUser);
137
+ });
138
+ });
139
+ it('should set user on login_success event', async () => {
140
+ let capturedContext = null;
141
+ const mockUser = { id: 'user-456', email: 'login@example.com' };
142
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
143
+ await waitFor(() => {
144
+ expect(capturedContext?.sdk).not.toBeNull();
145
+ });
146
+ await act(async () => {
147
+ emitAuthEvent('login_success', { user: mockUser });
148
+ });
149
+ await waitFor(() => {
150
+ expect(capturedContext?.isAuthenticated).toBe(true);
151
+ expect(capturedContext?.user).toEqual(mockUser);
152
+ });
153
+ });
154
+ it('should clear user on logout_success event', async () => {
155
+ let capturedContext = null;
156
+ const mockUser = { id: 'user-789', email: 'logout@example.com' };
157
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
158
+ await waitFor(() => {
159
+ expect(capturedContext?.sdk).not.toBeNull();
160
+ });
161
+ // First, log in
162
+ await act(async () => {
163
+ emitAuthEvent('login_success', { user: mockUser });
164
+ });
165
+ await waitFor(() => {
166
+ expect(capturedContext?.isAuthenticated).toBe(true);
167
+ });
168
+ // Then logout
169
+ await act(async () => {
170
+ emitAuthEvent('logout_success', {});
171
+ });
172
+ await waitFor(() => {
173
+ expect(capturedContext?.isAuthenticated).toBe(false);
174
+ expect(capturedContext?.user).toBeNull();
175
+ });
176
+ });
177
+ it('should clear user on session_restoration_failed event', async () => {
178
+ let capturedContext = null;
179
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
180
+ await waitFor(() => {
181
+ expect(capturedContext?.sdk).not.toBeNull();
182
+ });
183
+ // Set initial authenticated state
184
+ await act(async () => {
185
+ capturedContext.setAuthenticationState({ id: 'temp-user' }, true);
186
+ });
187
+ await waitFor(() => {
188
+ expect(capturedContext?.isAuthenticated).toBe(true);
189
+ });
190
+ // Emit session_restoration_failed
191
+ await act(async () => {
192
+ emitAuthEvent('session_restoration_failed', { error: 'Token expired' });
193
+ });
194
+ await waitFor(() => {
195
+ expect(capturedContext?.isAuthenticated).toBe(false);
196
+ expect(capturedContext?.user).toBeNull();
197
+ });
198
+ });
199
+ it('should NOT respond to AUTH_FAILED code (dead code was removed)', async () => {
200
+ // This test verifies that we no longer check for event.code === 'AUTH_FAILED'
201
+ // which was dead code that never triggered
202
+ let capturedContext = null;
203
+ const mockUser = { id: 'user-stay', email: 'stay@example.com' };
204
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
205
+ await waitFor(() => {
206
+ expect(capturedContext?.sdk).not.toBeNull();
207
+ });
208
+ // Log in first
209
+ await act(async () => {
210
+ emitAuthEvent('login_success', { user: mockUser });
211
+ });
212
+ await waitFor(() => {
213
+ expect(capturedContext?.isAuthenticated).toBe(true);
214
+ });
215
+ // Emit an event with code: 'AUTH_FAILED' - this should NOT clear user
216
+ // because we removed the dead code that checked for this
217
+ await act(async () => {
218
+ if (mockSdkInstance?.events) {
219
+ mockSdkInstance.events.emit({
220
+ type: 'some_other_event',
221
+ code: 'AUTH_FAILED', // This was the dead code path we removed
222
+ domain: 'authentication',
223
+ details: {}
224
+ });
225
+ }
226
+ });
227
+ // User should STILL be authenticated - the code: 'AUTH_FAILED' check is gone
228
+ expect(capturedContext.isAuthenticated).toBe(true);
229
+ expect(capturedContext.user).toEqual(mockUser);
230
+ });
231
+ });
232
+ describe('usePersSDK hook', () => {
233
+ it('should throw error when used outside provider', () => {
234
+ // Suppress the expected error
235
+ const spy = jest.spyOn(console, 'error').mockImplementation(() => { });
236
+ const TestComponent = () => {
237
+ usePersSDK();
238
+ return null;
239
+ };
240
+ expect(() => render(_jsx(TestComponent, {}))).toThrow('usePersSDK must be used within a PersSDKProvider');
241
+ spy.mockRestore();
242
+ });
243
+ });
244
+ describe('context methods', () => {
245
+ it('should allow manual authentication state updates', async () => {
246
+ let capturedContext = null;
247
+ const mockUser = { id: 'manual-user', email: 'manual@example.com' };
248
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
249
+ await waitFor(() => {
250
+ expect(capturedContext?.isInitialized).toBe(true);
251
+ });
252
+ await act(async () => {
253
+ capturedContext.setAuthenticationState(mockUser, true);
254
+ });
255
+ await waitFor(() => {
256
+ expect(capturedContext?.isAuthenticated).toBe(true);
257
+ expect(capturedContext?.user).toEqual(mockUser);
258
+ });
259
+ });
260
+ it('should refresh user data from SDK', async () => {
261
+ let capturedContext = null;
262
+ render(_jsx(PersSDKProvider, { config: { apiProjectKey: 'test-project' }, children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
263
+ await waitFor(() => {
264
+ expect(capturedContext?.isInitialized).toBe(true);
265
+ });
266
+ await act(async () => {
267
+ await capturedContext.refreshUserData();
268
+ });
269
+ await waitFor(() => {
270
+ expect(capturedContext?.user).toEqual({ id: 'refreshed-user', email: 'refreshed@test.com' });
271
+ });
272
+ });
273
+ it('should throw error when refreshUserData called before init', async () => {
274
+ let capturedContext = null;
275
+ render(_jsx(PersSDKProvider, { children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
276
+ await waitFor(() => {
277
+ expect(capturedContext).not.toBeNull();
278
+ });
279
+ await expect(capturedContext.refreshUserData()).rejects.toThrow('SDK not initialized');
280
+ });
281
+ it('should throw error when restoreSession called before init', async () => {
282
+ let capturedContext = null;
283
+ render(_jsx(PersSDKProvider, { children: _jsx(TestConsumer, { onContext: (ctx) => { capturedContext = ctx; } }) }));
284
+ await waitFor(() => {
285
+ expect(capturedContext).not.toBeNull();
286
+ });
287
+ await expect(capturedContext.restoreSession()).rejects.toThrow('SDK not initialized');
288
+ });
289
+ });
290
+ });
@@ -0,0 +1,42 @@
1
+ /// <reference types="jest" />
2
+ export interface PersConfig {
3
+ apiProjectKey?: string;
4
+ environment?: 'staging' | 'production';
5
+ captureWalletEvents?: boolean;
6
+ authProvider?: any;
7
+ dpop?: {
8
+ enabled?: boolean;
9
+ cryptoProvider?: any;
10
+ };
11
+ }
12
+ export declare const createMockEventEmitter: () => {
13
+ subscribe: jest.Mock<() => void, [callback: (event: any) => void, options?: any], any>;
14
+ emit: (event: any) => void;
15
+ _subscribers: {
16
+ callback: (event: any) => void;
17
+ options?: any;
18
+ }[];
19
+ };
20
+ export declare class PersSDK {
21
+ events: ReturnType<typeof createMockEventEmitter>;
22
+ auth: any;
23
+ users: any;
24
+ constructor(_httpClient: any, _config: PersConfig);
25
+ restoreSession: jest.Mock<any, any, any>;
26
+ _mockEmitEvent(event: any): void;
27
+ }
28
+ export declare class DefaultAuthProvider {
29
+ constructor(_projectKey?: string, _options?: any);
30
+ }
31
+ export type AuthManager = any;
32
+ export type UserManager = any;
33
+ export type TokenManager = any;
34
+ export type BusinessManager = any;
35
+ export type CampaignManager = any;
36
+ export type RedemptionManager = any;
37
+ export type TransactionManager = any;
38
+ export type PurchaseManager = any;
39
+ export type TenantManager = any;
40
+ export type AnalyticsManager = any;
41
+ export type DonationManager = any;
42
+ //# sourceMappingURL=pers-sdk-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pers-sdk-core.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__mocks__/pers-sdk-core.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,UAAU;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IACvC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,GAAG,CAAC;KACtB,CAAC;CACH;AAGD,eAAO,MAAM,sBAAsB;wDAIO,GAAG,KAAK,IAAI;kBAapC,GAAG;;kBAhBkB,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI;kBAAY,GAAG;;CAyBzE,CAAC;AAGF,qBAAa,OAAO;IAClB,MAAM,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IAClD,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,GAAG,CAAC;gBAEC,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU;IAUjD,cAAc,2BAAqC;IAGnD,cAAc,CAAC,KAAK,EAAE,GAAG;CAG1B;AAGD,qBAAa,mBAAmB;gBAClB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG;CACjD;AAGD,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAC9B,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAC9B,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC;AAC/B,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC;AAClC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC;AAClC,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AACpC,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACrC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC;AAClC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACnC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC"}
@@ -0,0 +1,48 @@
1
+ // Mock @explorins/pers-sdk/core
2
+ // Create mock event emitter factory
3
+ export const createMockEventEmitter = () => {
4
+ const subscribers = [];
5
+ return {
6
+ subscribe: jest.fn((callback, options) => {
7
+ subscribers.push({ callback, options });
8
+ // Replay immediately if requested
9
+ if (options?.replay) {
10
+ // No events to replay in mock
11
+ }
12
+ return () => {
13
+ const index = subscribers.findIndex(s => s.callback === callback);
14
+ if (index > -1)
15
+ subscribers.splice(index, 1);
16
+ };
17
+ }),
18
+ emit: (event) => {
19
+ subscribers.forEach(({ callback, options }) => {
20
+ if (!options?.domains || options.domains.includes(event.domain)) {
21
+ callback(event);
22
+ }
23
+ });
24
+ },
25
+ _subscribers: subscribers
26
+ };
27
+ };
28
+ // Mock PersSDK class
29
+ export class PersSDK {
30
+ constructor(_httpClient, _config) {
31
+ this.restoreSession = jest.fn().mockResolvedValue(null);
32
+ this.events = createMockEventEmitter();
33
+ this.auth = {
34
+ ensureValidToken: jest.fn().mockResolvedValue(true)
35
+ };
36
+ this.users = {
37
+ getCurrentUser: jest.fn().mockResolvedValue({ id: 'user-1', email: 'test@test.com' })
38
+ };
39
+ }
40
+ // Helper for tests to emit events
41
+ _mockEmitEvent(event) {
42
+ this.events.emit(event);
43
+ }
44
+ }
45
+ // Mock DefaultAuthProvider
46
+ export class DefaultAuthProvider {
47
+ constructor(_projectKey, _options) { }
48
+ }
@@ -0,0 +1,15 @@
1
+ export interface UserDTO {
2
+ id: string;
3
+ email?: string;
4
+ firstName?: string;
5
+ lastName?: string;
6
+ walletAddress?: string;
7
+ createdAt?: string;
8
+ updatedAt?: string;
9
+ }
10
+ export interface AdminDTO {
11
+ id: string;
12
+ email?: string;
13
+ role?: string;
14
+ }
15
+ //# sourceMappingURL=pers-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pers-shared.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__mocks__/pers-shared.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ // Mock @explorins/pers-shared
2
+ export {};
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import '@testing-library/jest-dom';
2
+ // Mock React Native modules
3
+ jest.mock('react-native', () => ({
4
+ Platform: {
5
+ OS: 'ios',
6
+ select: jest.fn((obj) => obj.ios || obj.default)
7
+ },
8
+ AppState: {
9
+ addEventListener: jest.fn(() => ({
10
+ remove: jest.fn()
11
+ })),
12
+ currentState: 'active'
13
+ }
14
+ }));
15
+ // Mock AsyncStorage
16
+ jest.mock('@react-native-async-storage/async-storage', () => ({
17
+ default: {
18
+ getItem: jest.fn(),
19
+ setItem: jest.fn(),
20
+ removeItem: jest.fn(),
21
+ clear: jest.fn(),
22
+ getAllKeys: jest.fn(() => Promise.resolve([]))
23
+ }
24
+ }));
25
+ // Silence console errors in tests unless explicitly needed
26
+ const originalConsoleError = console.error;
27
+ const originalConsoleWarn = console.warn;
28
+ beforeAll(() => {
29
+ console.error = jest.fn();
30
+ console.warn = jest.fn();
31
+ });
32
+ afterAll(() => {
33
+ console.error = originalConsoleError;
34
+ console.warn = originalConsoleWarn;
35
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"useRedemptions.d.ts","sourceRoot":"","sources":["../../src/hooks/useRedemptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0C,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,KAAK,EACV,0BAA0B,EAC1B,aAAa,EACb,mBAAmB,EACnB,kCAAkC,EAClC,iBAAiB,EACjB,oBAAoB,EACpB,+BAA+B,EAC/B,yBAAyB,EACzB,mBAAmB,EACnB,cAAc,EACd,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,uBAAuB,EAA2B,MAAM,gCAAgC,CAAC;AACvG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,YAAY,EAAE,u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