@verifiedinc-public/shared-ui-elements 7.10.0 → 7.12.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.
@@ -18,7 +18,6 @@ export interface CredentialRequestsEditorFeatures {
18
18
  export interface CredentialRequestsEditorProps {
19
19
  addButtonText?: string;
20
20
  credentialRequests: CredentialRequestsWithNew[];
21
- schemas: Record<string, any>;
22
21
  children: ReactNode;
23
22
  integrationType: SdkIntegrationType;
24
23
  riskSignals: 'none' | 'basic' | 'advanced';
@@ -28,7 +27,6 @@ export interface CredentialRequestsEditorProps {
28
27
  export interface CredentialRequestsEditorContext {
29
28
  addButtonText?: string;
30
29
  riskSignals: 'none' | 'basic' | 'advanced';
31
- schemas: Record<string, any>;
32
30
  features?: CredentialRequestsEditorFeatures;
33
31
  integrationType: SdkIntegrationType;
34
32
  }
@@ -1,3 +1,7 @@
1
1
  import { CredentialRequests } from '../types/form';
2
- import { CredentialSchemaDto } from '../types/credentialSchemasDto';
3
- export declare function buildDataFieldValue(type: string, schema: CredentialSchemaDto['schemas']): CredentialRequests;
2
+ /**
3
+ * Recursively builds a CredentialRequests object from a field key
4
+ * @param fieldKey - The key of the field to build (e.g., 'fullName', 'address')
5
+ * @returns A CredentialRequests object with nested children if applicable
6
+ */
7
+ export declare function buildDataFieldValue(fieldKey: string): CredentialRequests;
@@ -131,32 +131,32 @@ export declare const address: {
131
131
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
132
132
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
133
133
  }, "strip", import('zod').ZodTypeAny, {
134
- country?: "US" | undefined;
135
- state?: string | undefined;
136
134
  line1?: string | undefined;
137
135
  line2?: string | undefined;
138
136
  city?: string | undefined;
137
+ state?: string | undefined;
138
+ country?: "US" | undefined;
139
139
  zipCode?: string | undefined;
140
140
  }, {
141
- country?: string | undefined;
142
- state?: string | undefined;
143
141
  line1?: string | undefined;
144
142
  line2?: string | undefined;
145
143
  city?: string | undefined;
144
+ state?: string | undefined;
145
+ country?: string | undefined;
146
146
  zipCode?: string | undefined;
147
147
  }>, {
148
- country?: "US" | undefined;
149
- state?: string | undefined;
150
148
  line1?: string | undefined;
151
149
  line2?: string | undefined;
152
150
  city?: string | undefined;
151
+ state?: string | undefined;
152
+ country?: "US" | undefined;
153
153
  zipCode?: string | undefined;
154
154
  }, {
155
- country?: string | undefined;
156
- state?: string | undefined;
157
155
  line1?: string | undefined;
158
156
  line2?: string | undefined;
159
157
  city?: string | undefined;
158
+ state?: string | undefined;
159
+ country?: string | undefined;
160
160
  zipCode?: string | undefined;
161
161
  }>;
162
162
  format: (value: {
@@ -169,32 +169,32 @@ export declare const driversLicense: {
169
169
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
170
170
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
171
171
  }, "strip", import('zod').ZodTypeAny, {
172
- country?: "US" | undefined;
173
- state?: string | undefined;
174
172
  line1?: string | undefined;
175
173
  line2?: string | undefined;
176
174
  city?: string | undefined;
175
+ state?: string | undefined;
176
+ country?: "US" | undefined;
177
177
  zipCode?: string | undefined;
178
178
  }, {
179
- country?: string | undefined;
180
- state?: string | undefined;
181
179
  line1?: string | undefined;
182
180
  line2?: string | undefined;
183
181
  city?: string | undefined;
182
+ state?: string | undefined;
183
+ country?: string | undefined;
184
184
  zipCode?: string | undefined;
185
185
  }>, {
186
- country?: "US" | undefined;
187
- state?: string | undefined;
188
186
  line1?: string | undefined;
189
187
  line2?: string | undefined;
190
188
  city?: string | undefined;
189
+ state?: string | undefined;
190
+ country?: "US" | undefined;
191
191
  zipCode?: string | undefined;
192
192
  }, {
193
- country?: string | undefined;
194
- state?: string | undefined;
195
193
  line1?: string | undefined;
196
194
  line2?: string | undefined;
197
195
  city?: string | undefined;
196
+ state?: string | undefined;
197
+ country?: string | undefined;
198
198
  zipCode?: string | undefined;
199
199
  }>;
200
200
  format: (value: {
@@ -220,41 +220,41 @@ export declare const driversLicense: {
220
220
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
221
221
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
222
222
  }, "strip", import('zod').ZodTypeAny, {
223
- country?: "US" | undefined;
224
- state?: string | undefined;
225
223
  line1?: string | undefined;
226
224
  line2?: string | undefined;
227
225
  city?: string | undefined;
226
+ state?: string | undefined;
227
+ country?: "US" | undefined;
228
228
  zipCode?: string | undefined;
229
229
  }, {
230
- country?: string | undefined;
231
- state?: string | undefined;
232
230
  line1?: string | undefined;
233
231
  line2?: string | undefined;
234
232
  city?: string | undefined;
233
+ state?: string | undefined;
234
+ country?: string | undefined;
235
235
  zipCode?: string | undefined;
236
236
  }>, {
237
- country?: "US" | undefined;
238
- state?: string | undefined;
239
237
  line1?: string | undefined;
240
238
  line2?: string | undefined;
241
239
  city?: string | undefined;
240
+ state?: string | undefined;
241
+ country?: "US" | undefined;
242
242
  zipCode?: string | undefined;
243
243
  }, {
244
- country?: string | undefined;
245
- state?: string | undefined;
246
244
  line1?: string | undefined;
247
245
  line2?: string | undefined;
248
246
  city?: string | undefined;
247
+ state?: string | undefined;
248
+ country?: string | undefined;
249
249
  zipCode?: string | undefined;
250
250
  }>;
251
251
  }, "strip", import('zod').ZodTypeAny, {
252
252
  address: {
253
- country?: "US" | undefined;
254
- state?: string | undefined;
255
253
  line1?: string | undefined;
256
254
  line2?: string | undefined;
257
255
  city?: string | undefined;
256
+ state?: string | undefined;
257
+ country?: "US" | undefined;
258
258
  zipCode?: string | undefined;
259
259
  };
260
260
  documentNumber: string;
@@ -263,11 +263,11 @@ export declare const driversLicense: {
263
263
  expirationDate: string;
264
264
  }, {
265
265
  address: {
266
- country?: string | undefined;
267
- state?: string | undefined;
268
266
  line1?: string | undefined;
269
267
  line2?: string | undefined;
270
268
  city?: string | undefined;
269
+ state?: string | undefined;
270
+ country?: string | undefined;
271
271
  zipCode?: string | undefined;
272
272
  };
273
273
  documentNumber: string;
@@ -149,32 +149,32 @@ export declare const fields: {
149
149
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
150
150
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
151
151
  }, "strip", import('zod').ZodTypeAny, {
152
- country?: "US" | undefined;
153
- state?: string | undefined;
154
152
  line1?: string | undefined;
155
153
  line2?: string | undefined;
156
154
  city?: string | undefined;
155
+ state?: string | undefined;
156
+ country?: "US" | undefined;
157
157
  zipCode?: string | undefined;
158
158
  }, {
159
- country?: string | undefined;
160
- state?: string | undefined;
161
159
  line1?: string | undefined;
162
160
  line2?: string | undefined;
163
161
  city?: string | undefined;
162
+ state?: string | undefined;
163
+ country?: string | undefined;
164
164
  zipCode?: string | undefined;
165
165
  }>, {
166
- country?: "US" | undefined;
167
- state?: string | undefined;
168
166
  line1?: string | undefined;
169
167
  line2?: string | undefined;
170
168
  city?: string | undefined;
169
+ state?: string | undefined;
170
+ country?: "US" | undefined;
171
171
  zipCode?: string | undefined;
172
172
  }, {
173
- country?: string | undefined;
174
- state?: string | undefined;
175
173
  line1?: string | undefined;
176
174
  line2?: string | undefined;
177
175
  city?: string | undefined;
176
+ state?: string | undefined;
177
+ country?: string | undefined;
178
178
  zipCode?: string | undefined;
179
179
  }>;
180
180
  format: (value: {
@@ -362,32 +362,32 @@ export declare const fields: {
362
362
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
363
363
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
364
364
  }, "strip", import('zod').ZodTypeAny, {
365
- country?: "US" | undefined;
366
- state?: string | undefined;
367
365
  line1?: string | undefined;
368
366
  line2?: string | undefined;
369
367
  city?: string | undefined;
368
+ state?: string | undefined;
369
+ country?: "US" | undefined;
370
370
  zipCode?: string | undefined;
371
371
  }, {
372
- country?: string | undefined;
373
- state?: string | undefined;
374
372
  line1?: string | undefined;
375
373
  line2?: string | undefined;
376
374
  city?: string | undefined;
375
+ state?: string | undefined;
376
+ country?: string | undefined;
377
377
  zipCode?: string | undefined;
378
378
  }>, {
379
- country?: "US" | undefined;
380
- state?: string | undefined;
381
379
  line1?: string | undefined;
382
380
  line2?: string | undefined;
383
381
  city?: string | undefined;
382
+ state?: string | undefined;
383
+ country?: "US" | undefined;
384
384
  zipCode?: string | undefined;
385
385
  }, {
386
- country?: string | undefined;
387
- state?: string | undefined;
388
386
  line1?: string | undefined;
389
387
  line2?: string | undefined;
390
388
  city?: string | undefined;
389
+ state?: string | undefined;
390
+ country?: string | undefined;
391
391
  zipCode?: string | undefined;
392
392
  }>;
393
393
  format: (value: {
@@ -413,41 +413,41 @@ export declare const fields: {
413
413
  country: import('zod').ZodOptional<import('zod').ZodEffects<import('zod').ZodString, "US", string>>;
414
414
  zipCode: import('zod').ZodOptional<import('zod').ZodString>;
415
415
  }, "strip", import('zod').ZodTypeAny, {
416
- country?: "US" | undefined;
417
- state?: string | undefined;
418
416
  line1?: string | undefined;
419
417
  line2?: string | undefined;
420
418
  city?: string | undefined;
419
+ state?: string | undefined;
420
+ country?: "US" | undefined;
421
421
  zipCode?: string | undefined;
422
422
  }, {
423
- country?: string | undefined;
424
- state?: string | undefined;
425
423
  line1?: string | undefined;
426
424
  line2?: string | undefined;
427
425
  city?: string | undefined;
426
+ state?: string | undefined;
427
+ country?: string | undefined;
428
428
  zipCode?: string | undefined;
429
429
  }>, {
430
- country?: "US" | undefined;
431
- state?: string | undefined;
432
430
  line1?: string | undefined;
433
431
  line2?: string | undefined;
434
432
  city?: string | undefined;
433
+ state?: string | undefined;
434
+ country?: "US" | undefined;
435
435
  zipCode?: string | undefined;
436
436
  }, {
437
- country?: string | undefined;
438
- state?: string | undefined;
439
437
  line1?: string | undefined;
440
438
  line2?: string | undefined;
441
439
  city?: string | undefined;
440
+ state?: string | undefined;
441
+ country?: string | undefined;
442
442
  zipCode?: string | undefined;
443
443
  }>;
444
444
  }, "strip", import('zod').ZodTypeAny, {
445
445
  address: {
446
- country?: "US" | undefined;
447
- state?: string | undefined;
448
446
  line1?: string | undefined;
449
447
  line2?: string | undefined;
450
448
  city?: string | undefined;
449
+ state?: string | undefined;
450
+ country?: "US" | undefined;
451
451
  zipCode?: string | undefined;
452
452
  };
453
453
  documentNumber: string;
@@ -456,11 +456,11 @@ export declare const fields: {
456
456
  expirationDate: string;
457
457
  }, {
458
458
  address: {
459
- country?: string | undefined;
460
- state?: string | undefined;
461
459
  line1?: string | undefined;
462
460
  line2?: string | undefined;
463
461
  city?: string | undefined;
462
+ state?: string | undefined;
463
+ country?: string | undefined;
464
464
  zipCode?: string | undefined;
465
465
  };
466
466
  documentNumber: string;
@@ -7,31 +7,31 @@ export declare const addressSchema: z.ZodEffects<z.ZodObject<{
7
7
  country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
8
8
  zipCode: z.ZodOptional<z.ZodString>;
9
9
  }, "strip", z.ZodTypeAny, {
10
- country?: "US" | undefined;
11
- state?: string | undefined;
12
10
  line1?: string | undefined;
13
11
  line2?: string | undefined;
14
12
  city?: string | undefined;
13
+ state?: string | undefined;
14
+ country?: "US" | undefined;
15
15
  zipCode?: string | undefined;
16
16
  }, {
17
- country?: string | undefined;
18
- state?: string | undefined;
19
17
  line1?: string | undefined;
20
18
  line2?: string | undefined;
21
19
  city?: string | undefined;
20
+ state?: string | undefined;
21
+ country?: string | undefined;
22
22
  zipCode?: string | undefined;
23
23
  }>, {
24
- country?: "US" | undefined;
25
- state?: string | undefined;
26
24
  line1?: string | undefined;
27
25
  line2?: string | undefined;
28
26
  city?: string | undefined;
27
+ state?: string | undefined;
28
+ country?: "US" | undefined;
29
29
  zipCode?: string | undefined;
30
30
  }, {
31
- country?: string | undefined;
32
- state?: string | undefined;
33
31
  line1?: string | undefined;
34
32
  line2?: string | undefined;
35
33
  city?: string | undefined;
34
+ state?: string | undefined;
35
+ country?: string | undefined;
36
36
  zipCode?: string | undefined;
37
37
  }>;
@@ -12,41 +12,41 @@ export declare const driversLicenseSchema: z.ZodObject<{
12
12
  country: z.ZodOptional<z.ZodEffects<z.ZodString, "US", string>>;
13
13
  zipCode: z.ZodOptional<z.ZodString>;
14
14
  }, "strip", z.ZodTypeAny, {
15
- country?: "US" | undefined;
16
- state?: string | undefined;
17
15
  line1?: string | undefined;
18
16
  line2?: string | undefined;
19
17
  city?: string | undefined;
18
+ state?: string | undefined;
19
+ country?: "US" | undefined;
20
20
  zipCode?: string | undefined;
21
21
  }, {
22
- country?: string | undefined;
23
- state?: string | undefined;
24
22
  line1?: string | undefined;
25
23
  line2?: string | undefined;
26
24
  city?: string | undefined;
25
+ state?: string | undefined;
26
+ country?: string | undefined;
27
27
  zipCode?: string | undefined;
28
28
  }>, {
29
- country?: "US" | undefined;
30
- state?: string | undefined;
31
29
  line1?: string | undefined;
32
30
  line2?: string | undefined;
33
31
  city?: string | undefined;
32
+ state?: string | undefined;
33
+ country?: "US" | undefined;
34
34
  zipCode?: string | undefined;
35
35
  }, {
36
- country?: string | undefined;
37
- state?: string | undefined;
38
36
  line1?: string | undefined;
39
37
  line2?: string | undefined;
40
38
  city?: string | undefined;
39
+ state?: string | undefined;
40
+ country?: string | undefined;
41
41
  zipCode?: string | undefined;
42
42
  }>;
43
43
  }, "strip", z.ZodTypeAny, {
44
44
  address: {
45
- country?: "US" | undefined;
46
- state?: string | undefined;
47
45
  line1?: string | undefined;
48
46
  line2?: string | undefined;
49
47
  city?: string | undefined;
48
+ state?: string | undefined;
49
+ country?: "US" | undefined;
50
50
  zipCode?: string | undefined;
51
51
  };
52
52
  documentNumber: string;
@@ -55,11 +55,11 @@ export declare const driversLicenseSchema: z.ZodObject<{
55
55
  expirationDate: string;
56
56
  }, {
57
57
  address: {
58
- country?: string | undefined;
59
- state?: string | undefined;
60
58
  line1?: string | undefined;
61
59
  line2?: string | undefined;
62
60
  city?: string | undefined;
61
+ state?: string | undefined;
62
+ country?: string | undefined;
63
63
  zipCode?: string | undefined;
64
64
  };
65
65
  documentNumber: string;
@@ -1 +1 @@
1
- "use strict";import{A as a,am as s,a0 as e,c as t,aa as r,a6 as i,B as n,ac as o,ab as d,ai as l,ah as m,an as p,C,af as c,D as u,i as h,$ as g,h as S,a8 as P,E as T,N as y,R as B,Q as I,U as f,Z as F,F as k,al as L,I as O,b as D,L as b,M as R,X as v,g as N,k as M,a3 as A,O as E,ag as w,e as x,a4 as V,f as W,P as q,a5 as j,_ as H,ak as Q,a7 as z,S as U,d as G,ao as J,aq as K,ap as X,a9 as Y,T as Z,j as _,a as $,a1 as aa,a2 as sa,aj as ea,H as ta,v as ra,t as ia,p as na,u as oa,l as da,r as la,G as ma,z as pa,q as Ca,J as ca,s as ua,m as ha,K as ga,n as Sa,o as Pa,w as Ta,V as ya,ad as Ba,W as Ia,x as fa,y as Fa,ae as ka,Y as La}from"../shared/magic-legal-language-h1RRan_O.mjs";import{a as Oa,b as Da,P as ba,S as Ra}from"../shared/PageSectionHeader-lc9WunC-.mjs";import{B as va,C as Na,i as Ma,E as Aa,L as Ea,j as wa,M as xa,g as Va,O as Wa,P as qa,R as ja,e as Ha,d as Qa,S as za,a as Ua,b as Ga,k as Ja,c as Ka,f as Xa,n as Ya,T as Za,W as _a,h as $a,l as as,m as ss,u as es}from"../shared/TTSBigNumbers-CWUApa7c.mjs";import{SnackbarProvider as ts}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,t as Alert,r as Backdrop,i as Banner,n as BasePhoneInput,va as BigNumber,o as BrandFilterInput,d as Button,l as CalendlyDialog,m as CalendlyDialogComponent,p as ContentWithLoader,C as CredentialRequestsEditor,Na as CustomAlertComponent,c as CustomDialog,u as DateInput,h as DateRangeInput,g as DefaultInput,S as EmailInput,Ma as EmptyChartSection,Aa as ErrorCodesChart,P as ExactBirthdayBanner,T as ExportToPdfButton,y as Form,B as FormBuilder,I as FormField,f as FormFieldBuilder,F as FormProvider,k as FullWidthAlert,L as IconPlayer,O as Image,D as LegalLink,b as LinkButton,Ea as LoadingChartSection,R as MandatoryEnum,wa as MetricLastUpdated,xa as MonthlySignupsOverviewTable,v as NewOneClickForm,N as OTPInput,M as OneClickForm,Va as OneClickOverTimeChart,Wa as OneClickPercentageChart,A as OneClickPoweredByVerified,E as OriginalButton,Oa as PageHeader,Da as PageSectionHeader,ba as Paragraph,w as PersistentDialog,x as PhoneInput,qa as PieChart,V as PoweredByVerified,W as PrettyPhoneInput,q as PrivacyPolicyNotice,j as QRCodeDisplay,H as RadioOption,ja as ReasonCodesChart,Q as RequiredLabel,z as ResendPhoneBanner,Ha as RiskScoreBarChart,Qa as RiskScorePieChart,U as SSNInput,Ra as SectionHeader,G as SelectInput,za as SeriesChart,Ua as SeriesChartLegend,Ga as SeriesPercentageChart,Ja as SignupBigNumbers,Ka as SimpleBarChart,Xa as SimpleLegend,ts as SnackbarProvider,Ya as TTSBigNumbers,J as TTSMagicButton,K as TTSMagicLegalLanguage,X as TTSMagicQRCode,Za as TTSOverTimeChart,Y as TestPhoneNumbersBanner,Z as TextButton,_ as TimezoneInput,$ as Typography,aa as VerifiedImage,sa as VerifiedIncLogo,_a as When,ea as WhenStyled,ta as extractChildrenFromCredentialFieldSet,ra as extractTypesFromSchema,ia as filterRepeatedCredentials,na as findCorrectSchemaProperty,oa as findCredentialsByType,da as getCredentialTypeDisplayInfo,la as getCredentialValues,ma as getLastPathName,pa as getParentPath,Ca as getReferencedSchemaNames,ca as hasMandatoryFieldEmpty,ua as isNewCredentialAgainstInstance,ha as isRequiredCredentialDisplayInfo,ga as isSomeFieldInputAllowed,Sa as isValidInputCredential,Pa as makeCredentialDisplayInfoList,$a as mapMonthlySignupsOverviewTableData,as as mapTTSTimeSeriesData,ss as mapTimeSeriesData,Ta as sortCredentialsBySchema,ya as toCreatePatchCredentials,Ba as toOption,Ia as toShareCredentials,fa as transformToFormObject,Fa as transformToFormSchema,ka as useBrandFilterInput,La as useForm,es as useSnackbar};
1
+ "use strict";import{A as a,am as s,a0 as e,c as t,aa as r,a6 as i,B as n,ac as o,ab as d,ai as l,ah as m,an as p,C,af as c,D as u,i as h,$ as g,h as S,a8 as P,E as T,N as y,R as B,Q as I,U as f,Z as F,F as k,al as L,I as O,b as D,L as b,M as R,X as v,g as N,k as M,a3 as A,O as E,ag as w,e as x,a4 as V,f as W,P as q,a5 as j,_ as H,ak as Q,a7 as z,S as U,d as G,ao as J,aq as K,ap as X,a9 as Y,T as Z,j as _,a as $,a1 as aa,a2 as sa,aj as ea,H as ta,v as ra,t as ia,p as na,u as oa,l as da,r as la,G as ma,z as pa,q as Ca,J as ca,s as ua,m as ha,K as ga,n as Sa,o as Pa,w as Ta,V as ya,ad as Ba,W as Ia,x as fa,y as Fa,ae as ka,Y as La}from"../shared/magic-legal-language-COI850W8.mjs";import{a as Oa,b as Da,P as ba,S as Ra}from"../shared/PageSectionHeader-lc9WunC-.mjs";import{B as va,C as Na,i as Ma,E as Aa,L as Ea,j as wa,M as xa,g as Va,O as Wa,P as qa,R as ja,e as Ha,d as Qa,S as za,a as Ua,b as Ga,k as Ja,c as Ka,f as Xa,n as Ya,T as Za,W as _a,h as $a,l as as,m as ss,u as es}from"../shared/TTSBigNumbers-CWUApa7c.mjs";import{SnackbarProvider as ts}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,t as Alert,r as Backdrop,i as Banner,n as BasePhoneInput,va as BigNumber,o as BrandFilterInput,d as Button,l as CalendlyDialog,m as CalendlyDialogComponent,p as ContentWithLoader,C as CredentialRequestsEditor,Na as CustomAlertComponent,c as CustomDialog,u as DateInput,h as DateRangeInput,g as DefaultInput,S as EmailInput,Ma as EmptyChartSection,Aa as ErrorCodesChart,P as ExactBirthdayBanner,T as ExportToPdfButton,y as Form,B as FormBuilder,I as FormField,f as FormFieldBuilder,F as FormProvider,k as FullWidthAlert,L as IconPlayer,O as Image,D as LegalLink,b as LinkButton,Ea as LoadingChartSection,R as MandatoryEnum,wa as MetricLastUpdated,xa as MonthlySignupsOverviewTable,v as NewOneClickForm,N as OTPInput,M as OneClickForm,Va as OneClickOverTimeChart,Wa as OneClickPercentageChart,A as OneClickPoweredByVerified,E as OriginalButton,Oa as PageHeader,Da as PageSectionHeader,ba as Paragraph,w as PersistentDialog,x as PhoneInput,qa as PieChart,V as PoweredByVerified,W as PrettyPhoneInput,q as PrivacyPolicyNotice,j as QRCodeDisplay,H as RadioOption,ja as ReasonCodesChart,Q as RequiredLabel,z as ResendPhoneBanner,Ha as RiskScoreBarChart,Qa as RiskScorePieChart,U as SSNInput,Ra as SectionHeader,G as SelectInput,za as SeriesChart,Ua as SeriesChartLegend,Ga as SeriesPercentageChart,Ja as SignupBigNumbers,Ka as SimpleBarChart,Xa as SimpleLegend,ts as SnackbarProvider,Ya as TTSBigNumbers,J as TTSMagicButton,K as TTSMagicLegalLanguage,X as TTSMagicQRCode,Za as TTSOverTimeChart,Y as TestPhoneNumbersBanner,Z as TextButton,_ as TimezoneInput,$ as Typography,aa as VerifiedImage,sa as VerifiedIncLogo,_a as When,ea as WhenStyled,ta as extractChildrenFromCredentialFieldSet,ra as extractTypesFromSchema,ia as filterRepeatedCredentials,na as findCorrectSchemaProperty,oa as findCredentialsByType,da as getCredentialTypeDisplayInfo,la as getCredentialValues,ma as getLastPathName,pa as getParentPath,Ca as getReferencedSchemaNames,ca as hasMandatoryFieldEmpty,ua as isNewCredentialAgainstInstance,ha as isRequiredCredentialDisplayInfo,ga as isSomeFieldInputAllowed,Sa as isValidInputCredential,Pa as makeCredentialDisplayInfoList,$a as mapMonthlySignupsOverviewTableData,as as mapTTSTimeSeriesData,ss as mapTimeSeriesData,Ta as sortCredentialsBySchema,ya as toCreatePatchCredentials,Ba as toOption,Ia as toShareCredentials,fa as transformToFormObject,Fa as transformToFormSchema,ka as useBrandFilterInput,La as useForm,es as useSnackbar};
@@ -0,0 +1 @@
1
+ export * from './tunnel';
@@ -0,0 +1 @@
1
+ "use strict";import{T as o}from"../shared/index-CgwlGvef.mjs";export{o as Tunnel};
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ import { StackProps } from '@mui/material';
3
+ export type TunnelContext = {
4
+ register: (id: string, element: HTMLElement) => void;
5
+ unregister: (id: string) => void;
6
+ getTarget: (id: string) => HTMLElement | null;
7
+ subscribe: (id: string, callback: (element: HTMLElement | null) => void) => () => void;
8
+ };
9
+ declare function useTunnel(): TunnelContext;
10
+ declare function Provider({ children }: {
11
+ children: ReactNode;
12
+ }): import("react").JSX.Element;
13
+ declare function Target({ id, ...stackProps }: StackProps & {
14
+ id: string;
15
+ }): import("react").JSX.Element;
16
+ declare function Source({ id, children }: {
17
+ id: string;
18
+ children: ReactNode;
19
+ }): import('react').ReactPortal | null;
20
+ export declare const Tunnel: {
21
+ Provider: typeof Provider;
22
+ Target: typeof Target;
23
+ Source: typeof Source;
24
+ useTunnel: typeof useTunnel;
25
+ };
26
+ export {};
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * @packageDocumentation
7
7
  */
8
8
  export * from './components';
9
+ export * from './contexts';
9
10
  export * from './hooks';
10
11
  export * from './styles';
11
12
  export * from './utils';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use strict";import{A as a,am as s,a0 as e,c as r,aa as t,a6 as o,B as i,ac as n,ab as m,ai as d,ah as l,an as p,C as u,af as c,D as C,i as h,$ as g,h as S,a8 as T,E as f,N as y,R as P,Q as k,U as F,Z as B,F as D,al as b,I,b as R,L as O,M as L,X as M,g as N,k as v,a3 as w,O as A,ag as U,e as E,a4 as x,f as G,P as Y,a5 as W,_ as V,ak as H,a7 as Q,S as j,d as q,ao as z,aq as _,ap as K,a9 as J,T as X,j as Z,a as $,a1 as aa,a2 as sa,aj as ea,H as ra,v as ta,t as oa,p as ia,u as na,l as ma,r as da,G as la,z as pa,q as ua,J as ca,s as Ca,m as ha,K as ga,n as Sa,o as Ta,w as fa,V as ya,ad as Pa,W as ka,x as Fa,y as Ba,ae as Da,Y as ba}from"./shared/magic-legal-language-h1RRan_O.mjs";import{a as Ia,b as Ra,P as Oa,S as La}from"./shared/PageSectionHeader-lc9WunC-.mjs";import{B as Ma,C as Na,i as va,E as wa,L as Aa,j as Ua,M as Ea,g as xa,O as Ga,P as Ya,R as Wa,e as Va,d as Ha,S as Qa,a as ja,b as qa,k as za,c as _a,f as Ka,n as Ja,T as Xa,W as Za,h as $a,l as as,m as ss,u as es}from"./shared/TTSBigNumbers-CWUApa7c.mjs";import{b as rs,k as ts,a as os,i as is,u as ns,j as ms,d as ds,c as ls,m as ps,l as us,e as cs,f as Cs,g as hs,h as gs}from"./shared/magic-link-Dr2o0qhW.mjs";import{u as Ss,a as Ts}from"./shared/usePrevious-Dppy11px.mjs";import{b as fs,u as ys,c as Ps,a as ks,d as Fs,e as Bs,f as Ds}from"./shared/magic-qr-code-DEnCvbjS.mjs";import{u as bs}from"./shared/useCounter-BV32zXDQ.mjs";import{u as Is}from"./shared/useResizeObserver-D7K4jTvT.mjs";import{b as Rs,a as Os,x as Ls,m as Ms,e as Ns,d as vs,q as ws,v as As,h as Us,j as Es,g as xs,p as Gs,u as Ys,n as Ws,c as Vs,l as Hs,o as Qs,s as js,f as qs,i as zs,r as _s,t as Ks,k as Js,w as Xs,y as Zs}from"./shared/colors-CSvtCJK4.mjs";import{s as $s,t as ae}from"./shared/shadows-levwxV7v.mjs";import{wrapPromise as se}from"./utils/wrapPromise/index.mjs";import{f as ee,b as re,a as te,c as oe,s as ie,t as ne,u as me}from"./shared/uuidColor-CbuBMrIl.mjs";import{c as de,g as le,a as pe,p as ue,s as ce,v as Ce}from"./shared/phone-cSkbYk4g.mjs";import{masks as he}from"./utils/masks/index.mjs";import{o as ge,s as Se,a as Te}from"./shared/ssn-I4gN8M-_.mjs";import{toCapitalize as fe,toSentenceCase as ye}from"./utils/string/index.mjs";import{k as Pe}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{g as ke}from"./shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as Fe,contrastColor as Be,darken as De,getThemeFromPrimaryColor as be,lighten as Ie}from"./utils/color/index.mjs";import{addressFormatter as Re,fromUSAddress as Oe,parseCountryCode as Le,toUSaddress as Me,toUSaddressPretty as Ne}from"./utils/address/index.mjs";import{D as ve,a as we,m as Ae}from"./shared/makeGoogleFont-pok2oDWs.mjs";import{p as Ue}from"./shared/notification-sBaCxCY5.mjs";import{M as Ee,S as xe,U as Ge,g as Ye,p as We}from"./shared/date.schema-CmPHY0OU.mjs";import{d as Ve,e as He,f as Qe,g as je,s as qe}from"./shared/unix.schema-D7g4VIKT.mjs";import{SnackbarProvider as ze}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,r as Alert,t as Backdrop,o as Banner,i as BasePhoneInput,Ma as BigNumber,n as BrandFilterInput,m as Button,d as CalendlyDialog,l as CalendlyDialogComponent,p as ContentWithLoader,u as CredentialRequestsEditor,Na as CustomAlertComponent,c as CustomDialog,ve as DEFAULT_FONT_FAMILY,we as DEFAULT_FONT_WEIGHTS,C as DateInput,h as DateRangeInput,g as DefaultInput,S as EmailInput,va as EmptyChartSection,wa as ErrorCodesChart,T as ExactBirthdayBanner,f as ExportToPdfButton,y as Form,P as FormBuilder,k as FormField,F as FormFieldBuilder,B as FormProvider,D as FullWidthAlert,b as IconPlayer,I as Image,R as LegalLink,O as LinkButton,Aa as LoadingChartSection,L as MandatoryEnum,Ee as MaskedAndUnmaskedSSNSchema,Ua as MetricLastUpdated,Ea as MonthlySignupsOverviewTable,M as NewOneClickForm,N as OTPInput,v as OneClickForm,xa as OneClickOverTimeChart,Ga as OneClickPercentageChart,w as OneClickPoweredByVerified,A as OriginalButton,Ia as PageHeader,Ra as PageSectionHeader,Oa as Paragraph,U as PersistentDialog,E as PhoneInput,Ya as PieChart,x as PoweredByVerified,G as PrettyPhoneInput,Y as PrivacyPolicyNotice,W as QRCodeDisplay,V as RadioOption,Wa as ReasonCodesChart,H as RequiredLabel,Q as ResendPhoneBanner,Va as RiskScoreBarChart,Ha as RiskScorePieChart,j as SSNInput,xe as SSNSchema,La as SectionHeader,q as SelectInput,Qa as SeriesChart,ja as SeriesChartLegend,qa as SeriesPercentageChart,za as SignupBigNumbers,_a as SimpleBarChart,Ka as SimpleLegend,ze as SnackbarProvider,Ja as TTSBigNumbers,z as TTSMagicButton,_ as TTSMagicLegalLanguage,K as TTSMagicQRCode,Xa as TTSOverTimeChart,J as TestPhoneNumbersBanner,X as TextButton,Z as TimezoneInput,$ as Typography,Ge as USDateSchema,aa as VerifiedImage,sa as VerifiedIncLogo,Za as When,ea as WhenStyled,Re as addressFormatter,Fe as alpha,Rs as black,Os as blue,Ls as colors,Be as contrastColor,de as countries,Ms as dangerContrast,Ns as darkBlue,vs as darkGreen,ws as darkGrey,As as darkGreyContrast,Us as darkRed,Es as darkYellow,De as darken,Ve as descriptionSchema,He as emailSchema,ra as extractChildrenFromCredentialFieldSet,ta as extractTypesFromSchema,Qe as fieldSchema,oa as filterRepeatedCredentials,ia as findCorrectSchemaProperty,na as findCredentialsByType,ee as formatDateMMDDYYYY,re as formatDateMMYY,te as formatDateToTimestamp,oe as formatExtendedDate,Oe as fromUSAddress,ke as generateKeyFromString,ma as getCredentialTypeDisplayInfo,da as getCredentialValues,Ye as getDateSchemaWithPastValidation,la as getLastPathName,pa as getParentPath,le as getPhoneData,pe as getPhoneDataByFieldName,ua as getReferencedSchemaNames,be as getThemeFromPrimaryColor,je as getUnixSchema,xs as green,Gs as grey,Ys as greyContrast,ca as hasMandatoryFieldEmpty,Ws as infoContrast,Ca as isNewCredentialAgainstInstance,ha as isRequiredCredentialDisplayInfo,ga as isSomeFieldInputAllowed,Sa as isValidInputCredential,Pe as kebabCaseToPretty,Vs as lightBlue,Hs as lightGreen,Qs as lightGrey,js as lightGreyContrast,qs as lightRed,zs as lightYellow,Ie as lighten,Ta as makeCredentialDisplayInfoList,Ae as makeGoogleFontUrl,$a as mapMonthlySignupsOverviewTableData,as as mapTTSTimeSeriesData,ss as mapTimeSeriesData,he as masks,ge as omitProperties,Le as parseCountryCode,ue as parseToPhoneNational,We as phoneSchema,Ue as prepareNotification,_s as red,$s as shadows,ce as sortByCountryName,fa as sortCredentialsBySchema,Se as ssnFormatter,Te as ssnRegex,qe as stateSchema,ie as stringToHashedColor,Ks as textDisabled,ae as theme,fe as toCapitalize,ya as toCreatePatchCredentials,Pa as toOption,ye as toSentenceCase,ka as toShareCredentials,Me as toUSaddress,Ne as toUSaddressPretty,ne as toUTCMilliseconds,Fa as transformToFormObject,Ba as transformToFormSchema,Da as useBrandFilterInput,rs as useCallbackRef,Ss as useCopyToClipboard,bs as useCounter,ts as useDebounceCallback,fs as useDebounceValue,os as useDisclosure,ba as useForm,ys as useGoogleFont,is as useIntersectionObserver,ns as useLocalStorage,ms as useNavigatorOnline,Ps as useOnClickOutside,Ts as usePrevious,ks as useQRCode,Is as useResizeObserver,ds as useScript,ls as useSearchParams,es as useSnackbar,Fs as useStyledQRCode,ps as useTTSMagicLink,Bs as useTTSMagicQRCode,Ds as useTTSMagicQRCodeOptions,us as useTTSMagicText,cs as useThrottle,Cs as useToggle,hs as useWindowScroll,gs as useWindowSize,me as uuidToHashedColor,Ce as validatePhone,Js as warningContrast,Xs as white,se as wrapPromise,Zs as yellow};
1
+ "use strict";import{A as a,am as s,a0 as e,c as r,aa as t,a6 as o,B as i,ac as n,ab as m,ai as d,ah as l,an as p,C as u,af as c,D as C,i as h,$ as g,h as S,a8 as T,E as f,N as y,R as P,Q as k,U as F,Z as D,F as B,al as b,I,b as R,L as O,M as L,X as M,g as N,k as v,a3 as w,O as U,ag as A,e as x,a4 as E,f as Y,P as G,a5 as W,_ as V,ak as H,a7 as j,S as q,d as z,ao as Q,aq as _,ap as K,a9 as X,T as Z,j as $,a as J,a1 as aa,a2 as sa,aj as ea,H as ra,v as ta,t as oa,p as ia,u as na,l as ma,r as da,G as la,z as pa,q as ua,J as ca,s as Ca,m as ha,K as ga,n as Sa,o as Ta,w as fa,V as ya,ad as Pa,W as ka,x as Fa,y as Da,ae as Ba,Y as ba}from"./shared/magic-legal-language-COI850W8.mjs";import{a as Ia,b as Ra,P as Oa,S as La}from"./shared/PageSectionHeader-lc9WunC-.mjs";import{B as Ma,C as Na,i as va,E as wa,L as Ua,j as Aa,M as xa,g as Ea,O as Ya,P as Ga,R as Wa,e as Va,d as Ha,S as ja,a as qa,b as za,k as Qa,c as _a,f as Ka,n as Xa,T as Za,W as $a,h as Ja,l as as,m as ss,u as es}from"./shared/TTSBigNumbers-CWUApa7c.mjs";import{T as rs}from"./shared/index-CgwlGvef.mjs";import{b as ts,k as os,a as is,i as ns,u as ms,j as ds,d as ls,c as ps,m as us,l as cs,e as Cs,f as hs,g as gs,h as Ss}from"./shared/magic-link-Dr2o0qhW.mjs";import{u as Ts,a as fs}from"./shared/usePrevious-Dppy11px.mjs";import{b as ys,u as Ps,c as ks,a as Fs,d as Ds,e as Bs,f as bs}from"./shared/magic-qr-code-DEnCvbjS.mjs";import{u as Is}from"./shared/useCounter-BV32zXDQ.mjs";import{u as Rs}from"./shared/useResizeObserver-D7K4jTvT.mjs";import{b as Os,a as Ls,x as Ms,m as Ns,e as vs,d as ws,q as Us,v as As,h as xs,j as Es,g as Ys,p as Gs,u as Ws,n as Vs,c as Hs,l as js,o as qs,s as zs,f as Qs,i as _s,r as Ks,t as Xs,k as Zs,w as $s,y as Js}from"./shared/colors-CSvtCJK4.mjs";import{s as ae,t as se}from"./shared/shadows-levwxV7v.mjs";import{wrapPromise as ee}from"./utils/wrapPromise/index.mjs";import{f as re,b as te,a as oe,c as ie,s as ne,t as me,u as de}from"./shared/uuidColor-CbuBMrIl.mjs";import{c as le,g as pe,a as ue,p as ce,s as Ce,v as he}from"./shared/phone-cSkbYk4g.mjs";import{masks as ge}from"./utils/masks/index.mjs";import{o as Se,s as Te,a as fe}from"./shared/ssn-I4gN8M-_.mjs";import{toCapitalize as ye,toSentenceCase as Pe}from"./utils/string/index.mjs";import{k as ke}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{g as Fe}from"./shared/generateKeyFromString-D1AuwK4y.mjs";import{alpha as De,contrastColor as Be,darken as be,getThemeFromPrimaryColor as Ie,lighten as Re}from"./utils/color/index.mjs";import{addressFormatter as Oe,fromUSAddress as Le,parseCountryCode as Me,toUSaddress as Ne,toUSaddressPretty as ve}from"./utils/address/index.mjs";import{D as we,a as Ue,m as Ae}from"./shared/makeGoogleFont-pok2oDWs.mjs";import{p as xe}from"./shared/notification-sBaCxCY5.mjs";import{M as Ee,S as Ye,U as Ge,g as We,p as Ve}from"./shared/date.schema-CmPHY0OU.mjs";import{d as He,e as je,f as qe,g as ze,s as Qe}from"./shared/unix.schema-D7g4VIKT.mjs";import{SnackbarProvider as _e}from"notistack";export{a as AcceptTermsNotice,s as AdaptativeBox,e as AddressInput,r as Alert,t as Backdrop,o as Banner,i as BasePhoneInput,Ma as BigNumber,n as BrandFilterInput,m as Button,d as CalendlyDialog,l as CalendlyDialogComponent,p as ContentWithLoader,u as CredentialRequestsEditor,Na as CustomAlertComponent,c as CustomDialog,we as DEFAULT_FONT_FAMILY,Ue as DEFAULT_FONT_WEIGHTS,C as DateInput,h as DateRangeInput,g as DefaultInput,S as EmailInput,va as EmptyChartSection,wa as ErrorCodesChart,T as ExactBirthdayBanner,f as ExportToPdfButton,y as Form,P as FormBuilder,k as FormField,F as FormFieldBuilder,D as FormProvider,B as FullWidthAlert,b as IconPlayer,I as Image,R as LegalLink,O as LinkButton,Ua as LoadingChartSection,L as MandatoryEnum,Ee as MaskedAndUnmaskedSSNSchema,Aa as MetricLastUpdated,xa as MonthlySignupsOverviewTable,M as NewOneClickForm,N as OTPInput,v as OneClickForm,Ea as OneClickOverTimeChart,Ya as OneClickPercentageChart,w as OneClickPoweredByVerified,U as OriginalButton,Ia as PageHeader,Ra as PageSectionHeader,Oa as Paragraph,A as PersistentDialog,x as PhoneInput,Ga as PieChart,E as PoweredByVerified,Y as PrettyPhoneInput,G as PrivacyPolicyNotice,W as QRCodeDisplay,V as RadioOption,Wa as ReasonCodesChart,H as RequiredLabel,j as ResendPhoneBanner,Va as RiskScoreBarChart,Ha as RiskScorePieChart,q as SSNInput,Ye as SSNSchema,La as SectionHeader,z as SelectInput,ja as SeriesChart,qa as SeriesChartLegend,za as SeriesPercentageChart,Qa as SignupBigNumbers,_a as SimpleBarChart,Ka as SimpleLegend,_e as SnackbarProvider,Xa as TTSBigNumbers,Q as TTSMagicButton,_ as TTSMagicLegalLanguage,K as TTSMagicQRCode,Za as TTSOverTimeChart,X as TestPhoneNumbersBanner,Z as TextButton,$ as TimezoneInput,rs as Tunnel,J as Typography,Ge as USDateSchema,aa as VerifiedImage,sa as VerifiedIncLogo,$a as When,ea as WhenStyled,Oe as addressFormatter,De as alpha,Os as black,Ls as blue,Ms as colors,Be as contrastColor,le as countries,Ns as dangerContrast,vs as darkBlue,ws as darkGreen,Us as darkGrey,As as darkGreyContrast,xs as darkRed,Es as darkYellow,be as darken,He as descriptionSchema,je as emailSchema,ra as extractChildrenFromCredentialFieldSet,ta as extractTypesFromSchema,qe as fieldSchema,oa as filterRepeatedCredentials,ia as findCorrectSchemaProperty,na as findCredentialsByType,re as formatDateMMDDYYYY,te as formatDateMMYY,oe as formatDateToTimestamp,ie as formatExtendedDate,Le as fromUSAddress,Fe as generateKeyFromString,ma as getCredentialTypeDisplayInfo,da as getCredentialValues,We as getDateSchemaWithPastValidation,la as getLastPathName,pa as getParentPath,pe as getPhoneData,ue as getPhoneDataByFieldName,ua as getReferencedSchemaNames,Ie as getThemeFromPrimaryColor,ze as getUnixSchema,Ys as green,Gs as grey,Ws as greyContrast,ca as hasMandatoryFieldEmpty,Vs as infoContrast,Ca as isNewCredentialAgainstInstance,ha as isRequiredCredentialDisplayInfo,ga as isSomeFieldInputAllowed,Sa as isValidInputCredential,ke as kebabCaseToPretty,Hs as lightBlue,js as lightGreen,qs as lightGrey,zs as lightGreyContrast,Qs as lightRed,_s as lightYellow,Re as lighten,Ta as makeCredentialDisplayInfoList,Ae as makeGoogleFontUrl,Ja as mapMonthlySignupsOverviewTableData,as as mapTTSTimeSeriesData,ss as mapTimeSeriesData,ge as masks,Se as omitProperties,Me as parseCountryCode,ce as parseToPhoneNational,Ve as phoneSchema,xe as prepareNotification,Ks as red,ae as shadows,Ce as sortByCountryName,fa as sortCredentialsBySchema,Te as ssnFormatter,fe as ssnRegex,Qe as stateSchema,ne as stringToHashedColor,Xs as textDisabled,se as theme,ye as toCapitalize,ya as toCreatePatchCredentials,Pa as toOption,Pe as toSentenceCase,ka as toShareCredentials,Ne as toUSaddress,ve as toUSaddressPretty,me as toUTCMilliseconds,Fa as transformToFormObject,Da as transformToFormSchema,Ba as useBrandFilterInput,ts as useCallbackRef,Ts as useCopyToClipboard,Is as useCounter,os as useDebounceCallback,ys as useDebounceValue,is as useDisclosure,ba as useForm,Ps as useGoogleFont,ns as useIntersectionObserver,ms as useLocalStorage,ds as useNavigatorOnline,ks as useOnClickOutside,fs as usePrevious,Fs as useQRCode,Rs as useResizeObserver,ls as useScript,ps as useSearchParams,es as useSnackbar,Ds as useStyledQRCode,us as useTTSMagicLink,Bs as useTTSMagicQRCode,bs as useTTSMagicQRCodeOptions,cs as useTTSMagicText,Cs as useThrottle,hs as useToggle,gs as useWindowScroll,Ss as useWindowSize,de as uuidToHashedColor,he as validatePhone,Zs as warningContrast,$s as white,ee as wrapPromise,Js as yellow};
@@ -0,0 +1 @@
1
+ "use strict";import{createContext as b,useContext as T,useState as g,useLayoutEffect as v,useCallback as i,useRef as x}from"react";import{createPortal as E}from"react-dom";import{Stack as M}from"@mui/material";import{j as m}from"./jsx-runtime-Bwwz4kRH.mjs";const p=b(null);function f(){const r=T(p);if(!r)throw new Error("useTunnel must be used within a TunnelProvider");return r}function P({children:r}){const[u,c]=g(new Map),t=x(new Map),l=i((e,n)=>{c(o=>{const a=new Map(o);return a.set(e,n),a});const s=t.current.get(e);s&&s.forEach(o=>o(n))},[]),d=i(e=>{c(s=>{const o=new Map(s);return o.delete(e),o});const n=t.current.get(e);n&&n.forEach(s=>s(null))},[]),h=i(e=>u.get(e)??null,[u]),w=i((e,n)=>{var s;t.current.has(e)||t.current.set(e,new Set),(s=t.current.get(e))==null||s.add(n);const o=u.get(e)??null;return n(o),()=>{const a=t.current.get(e);a&&(a.delete(n),a.size===0&&t.current.delete(e))}},[u]);return m.jsx(p.Provider,{value:{register:l,unregister:d,getTarget:h,subscribe:w},children:r})}function S({id:r,...u}){const{register:c,unregister:t}=f(),l=i(d=>{d?c(r,d):t(r)},[r,c,t]);return m.jsx(M,{...u,ref:l,"data-tunnel-target":r})}function j({id:r,children:u}){const{subscribe:c}=f(),[t,l]=g(null);return v(()=>c(r,l),[r,c]),t?E(u,t):null}const C={Provider:P,Target:S,Source:j,useTunnel:f};export{C as T};