@latticexyz/entrykit 2.2.14-entrykit-0033091d2b5b5121bd189a276f2e781140ccf2d0 → 2.2.15-32f30918b8ccc259dd6b8c6869b221a8f82ad337

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,1433 +0,0 @@
1
- import{Root as jt,DialogPortal as Jt,DialogContent as Zt}from"@radix-ui/react-dialog";import{forwardRef as Vt,useEffect as _t,useRef as Ke,useState as ze}from"react";import qt from"react-dom";var Me=`*, ::before, ::after {
2
- --tw-border-spacing-x: 0;
3
- --tw-border-spacing-y: 0;
4
- --tw-translate-x: 0;
5
- --tw-translate-y: 0;
6
- --tw-rotate: 0;
7
- --tw-skew-x: 0;
8
- --tw-skew-y: 0;
9
- --tw-scale-x: 1;
10
- --tw-scale-y: 1;
11
- --tw-pan-x: ;
12
- --tw-pan-y: ;
13
- --tw-pinch-zoom: ;
14
- --tw-scroll-snap-strictness: proximity;
15
- --tw-gradient-from-position: ;
16
- --tw-gradient-via-position: ;
17
- --tw-gradient-to-position: ;
18
- --tw-ordinal: ;
19
- --tw-slashed-zero: ;
20
- --tw-numeric-figure: ;
21
- --tw-numeric-spacing: ;
22
- --tw-numeric-fraction: ;
23
- --tw-ring-inset: ;
24
- --tw-ring-offset-width: 0px;
25
- --tw-ring-offset-color: #fff;
26
- --tw-ring-color: rgb(59 130 246 / 0.5);
27
- --tw-ring-offset-shadow: 0 0 #0000;
28
- --tw-ring-shadow: 0 0 #0000;
29
- --tw-shadow: 0 0 #0000;
30
- --tw-shadow-colored: 0 0 #0000;
31
- --tw-blur: ;
32
- --tw-brightness: ;
33
- --tw-contrast: ;
34
- --tw-grayscale: ;
35
- --tw-hue-rotate: ;
36
- --tw-invert: ;
37
- --tw-saturate: ;
38
- --tw-sepia: ;
39
- --tw-drop-shadow: ;
40
- --tw-backdrop-blur: ;
41
- --tw-backdrop-brightness: ;
42
- --tw-backdrop-contrast: ;
43
- --tw-backdrop-grayscale: ;
44
- --tw-backdrop-hue-rotate: ;
45
- --tw-backdrop-invert: ;
46
- --tw-backdrop-opacity: ;
47
- --tw-backdrop-saturate: ;
48
- --tw-backdrop-sepia: ;
49
- --tw-contain-size: ;
50
- --tw-contain-layout: ;
51
- --tw-contain-paint: ;
52
- --tw-contain-style: ;
53
- }
54
-
55
- ::backdrop {
56
- --tw-border-spacing-x: 0;
57
- --tw-border-spacing-y: 0;
58
- --tw-translate-x: 0;
59
- --tw-translate-y: 0;
60
- --tw-rotate: 0;
61
- --tw-skew-x: 0;
62
- --tw-skew-y: 0;
63
- --tw-scale-x: 1;
64
- --tw-scale-y: 1;
65
- --tw-pan-x: ;
66
- --tw-pan-y: ;
67
- --tw-pinch-zoom: ;
68
- --tw-scroll-snap-strictness: proximity;
69
- --tw-gradient-from-position: ;
70
- --tw-gradient-via-position: ;
71
- --tw-gradient-to-position: ;
72
- --tw-ordinal: ;
73
- --tw-slashed-zero: ;
74
- --tw-numeric-figure: ;
75
- --tw-numeric-spacing: ;
76
- --tw-numeric-fraction: ;
77
- --tw-ring-inset: ;
78
- --tw-ring-offset-width: 0px;
79
- --tw-ring-offset-color: #fff;
80
- --tw-ring-color: rgb(59 130 246 / 0.5);
81
- --tw-ring-offset-shadow: 0 0 #0000;
82
- --tw-ring-shadow: 0 0 #0000;
83
- --tw-shadow: 0 0 #0000;
84
- --tw-shadow-colored: 0 0 #0000;
85
- --tw-blur: ;
86
- --tw-brightness: ;
87
- --tw-contrast: ;
88
- --tw-grayscale: ;
89
- --tw-hue-rotate: ;
90
- --tw-invert: ;
91
- --tw-saturate: ;
92
- --tw-sepia: ;
93
- --tw-drop-shadow: ;
94
- --tw-backdrop-blur: ;
95
- --tw-backdrop-brightness: ;
96
- --tw-backdrop-contrast: ;
97
- --tw-backdrop-grayscale: ;
98
- --tw-backdrop-hue-rotate: ;
99
- --tw-backdrop-invert: ;
100
- --tw-backdrop-opacity: ;
101
- --tw-backdrop-saturate: ;
102
- --tw-backdrop-sepia: ;
103
- --tw-contain-size: ;
104
- --tw-contain-layout: ;
105
- --tw-contain-paint: ;
106
- --tw-contain-style: ;
107
- }/*
108
- ! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com
109
- *//*
110
- 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
111
- 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
112
- */
113
-
114
- *,
115
- ::before,
116
- ::after {
117
- box-sizing: border-box; /* 1 */
118
- border-width: 0; /* 2 */
119
- border-style: solid; /* 2 */
120
- border-color: #e5e7eb; /* 2 */
121
- }
122
-
123
- ::before,
124
- ::after {
125
- --tw-content: '';
126
- }
127
-
128
- /*
129
- 1. Use a consistent sensible line-height in all browsers.
130
- 2. Prevent adjustments of font size after orientation changes in iOS.
131
- 3. Use a more readable tab size.
132
- 4. Use the user's configured \`sans\` font-family by default.
133
- 5. Use the user's configured \`sans\` font-feature-settings by default.
134
- 6. Use the user's configured \`sans\` font-variation-settings by default.
135
- 7. Disable tap highlights on iOS
136
- */
137
-
138
- html,
139
- :host {
140
- line-height: 1.5; /* 1 */
141
- -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */
142
- tab-size: 4; /* 3 */
143
- font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
144
- font-feature-settings: normal; /* 5 */
145
- font-variation-settings: normal; /* 6 */
146
- -webkit-tap-highlight-color: transparent; /* 7 */
147
- }
148
-
149
- /*
150
- 1. Remove the margin in all browsers.
151
- 2. Inherit line-height from \`html\` so users can set them as a class directly on the \`html\` element.
152
- */
153
-
154
- body {
155
- margin: 0; /* 1 */
156
- line-height: inherit; /* 2 */
157
- }
158
-
159
- /*
160
- 1. Add the correct height in Firefox.
161
- 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
162
- 3. Ensure horizontal rules are visible by default.
163
- */
164
-
165
- hr {
166
- height: 0; /* 1 */
167
- color: inherit; /* 2 */
168
- border-top-width: 1px; /* 3 */
169
- }
170
-
171
- /*
172
- Add the correct text decoration in Chrome, Edge, and Safari.
173
- */
174
-
175
- abbr:where([title]) {
176
- -webkit-text-decoration: underline dotted;
177
- text-decoration: underline dotted;
178
- }
179
-
180
- /*
181
- Remove the default font size and weight for headings.
182
- */
183
-
184
- h1,
185
- h2,
186
- h3,
187
- h4,
188
- h5,
189
- h6 {
190
- font-size: inherit;
191
- font-weight: inherit;
192
- }
193
-
194
- /*
195
- Reset links to optimize for opt-in styling instead of opt-out.
196
- */
197
-
198
- a {
199
- color: inherit;
200
- text-decoration: inherit;
201
- }
202
-
203
- /*
204
- Add the correct font weight in Edge and Safari.
205
- */
206
-
207
- b,
208
- strong {
209
- font-weight: bolder;
210
- }
211
-
212
- /*
213
- 1. Use the user's configured \`mono\` font-family by default.
214
- 2. Use the user's configured \`mono\` font-feature-settings by default.
215
- 3. Use the user's configured \`mono\` font-variation-settings by default.
216
- 4. Correct the odd \`em\` font sizing in all browsers.
217
- */
218
-
219
- code,
220
- kbd,
221
- samp,
222
- pre {
223
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
224
- font-feature-settings: normal; /* 2 */
225
- font-variation-settings: normal; /* 3 */
226
- font-size: 1em; /* 4 */
227
- }
228
-
229
- /*
230
- Add the correct font size in all browsers.
231
- */
232
-
233
- small {
234
- font-size: 80%;
235
- }
236
-
237
- /*
238
- Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
239
- */
240
-
241
- sub,
242
- sup {
243
- font-size: 75%;
244
- line-height: 0;
245
- position: relative;
246
- vertical-align: baseline;
247
- }
248
-
249
- sub {
250
- bottom: -0.25em;
251
- }
252
-
253
- sup {
254
- top: -0.5em;
255
- }
256
-
257
- /*
258
- 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
259
- 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
260
- 3. Remove gaps between table borders by default.
261
- */
262
-
263
- table {
264
- text-indent: 0; /* 1 */
265
- border-color: inherit; /* 2 */
266
- border-collapse: collapse; /* 3 */
267
- }
268
-
269
- /*
270
- 1. Change the font styles in all browsers.
271
- 2. Remove the margin in Firefox and Safari.
272
- 3. Remove default padding in all browsers.
273
- */
274
-
275
- button,
276
- input,
277
- optgroup,
278
- select,
279
- textarea {
280
- font-family: inherit; /* 1 */
281
- font-feature-settings: inherit; /* 1 */
282
- font-variation-settings: inherit; /* 1 */
283
- font-size: 100%; /* 1 */
284
- font-weight: inherit; /* 1 */
285
- line-height: inherit; /* 1 */
286
- letter-spacing: inherit; /* 1 */
287
- color: inherit; /* 1 */
288
- margin: 0; /* 2 */
289
- padding: 0; /* 3 */
290
- }
291
-
292
- /*
293
- Remove the inheritance of text transform in Edge and Firefox.
294
- */
295
-
296
- button,
297
- select {
298
- text-transform: none;
299
- }
300
-
301
- /*
302
- 1. Correct the inability to style clickable types in iOS and Safari.
303
- 2. Remove default button styles.
304
- */
305
-
306
- button,
307
- input:where([type='button']),
308
- input:where([type='reset']),
309
- input:where([type='submit']) {
310
- -webkit-appearance: button; /* 1 */
311
- background-color: transparent; /* 2 */
312
- background-image: none; /* 2 */
313
- }
314
-
315
- /*
316
- Use the modern Firefox focus style for all focusable elements.
317
- */
318
-
319
- :-moz-focusring {
320
- outline: auto;
321
- }
322
-
323
- /*
324
- Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
325
- */
326
-
327
- :-moz-ui-invalid {
328
- box-shadow: none;
329
- }
330
-
331
- /*
332
- Add the correct vertical alignment in Chrome and Firefox.
333
- */
334
-
335
- progress {
336
- vertical-align: baseline;
337
- }
338
-
339
- /*
340
- Correct the cursor style of increment and decrement buttons in Safari.
341
- */
342
-
343
- ::-webkit-inner-spin-button,
344
- ::-webkit-outer-spin-button {
345
- height: auto;
346
- }
347
-
348
- /*
349
- 1. Correct the odd appearance in Chrome and Safari.
350
- 2. Correct the outline style in Safari.
351
- */
352
-
353
- [type='search'] {
354
- -webkit-appearance: textfield; /* 1 */
355
- outline-offset: -2px; /* 2 */
356
- }
357
-
358
- /*
359
- Remove the inner padding in Chrome and Safari on macOS.
360
- */
361
-
362
- ::-webkit-search-decoration {
363
- -webkit-appearance: none;
364
- }
365
-
366
- /*
367
- 1. Correct the inability to style clickable types in iOS and Safari.
368
- 2. Change font properties to \`inherit\` in Safari.
369
- */
370
-
371
- ::-webkit-file-upload-button {
372
- -webkit-appearance: button; /* 1 */
373
- font: inherit; /* 2 */
374
- }
375
-
376
- /*
377
- Add the correct display in Chrome and Safari.
378
- */
379
-
380
- summary {
381
- display: list-item;
382
- }
383
-
384
- /*
385
- Removes the default spacing and border for appropriate elements.
386
- */
387
-
388
- blockquote,
389
- dl,
390
- dd,
391
- h1,
392
- h2,
393
- h3,
394
- h4,
395
- h5,
396
- h6,
397
- hr,
398
- figure,
399
- p,
400
- pre {
401
- margin: 0;
402
- }
403
-
404
- fieldset {
405
- margin: 0;
406
- padding: 0;
407
- }
408
-
409
- legend {
410
- padding: 0;
411
- }
412
-
413
- ol,
414
- ul,
415
- menu {
416
- list-style: none;
417
- margin: 0;
418
- padding: 0;
419
- }
420
-
421
- /*
422
- Reset default styling for dialogs.
423
- */
424
- dialog {
425
- padding: 0;
426
- }
427
-
428
- /*
429
- Prevent resizing textareas horizontally by default.
430
- */
431
-
432
- textarea {
433
- resize: vertical;
434
- }
435
-
436
- /*
437
- 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
438
- 2. Set the default placeholder color to the user's configured gray 400 color.
439
- */
440
-
441
- input::placeholder,
442
- textarea::placeholder {
443
- opacity: 1; /* 1 */
444
- color: #9ca3af; /* 2 */
445
- }
446
-
447
- /*
448
- Set the default cursor for buttons.
449
- */
450
-
451
- button,
452
- [role="button"] {
453
- cursor: pointer;
454
- }
455
-
456
- /*
457
- Make sure disabled buttons don't get the pointer cursor.
458
- */
459
- :disabled {
460
- cursor: default;
461
- }
462
-
463
- /*
464
- 1. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
465
- 2. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
466
- This can trigger a poorly considered lint error in some tools but is included by design.
467
- */
468
-
469
- img,
470
- svg,
471
- video,
472
- canvas,
473
- audio,
474
- iframe,
475
- embed,
476
- object {
477
- display: block; /* 1 */
478
- vertical-align: middle; /* 2 */
479
- }
480
-
481
- /*
482
- Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
483
- */
484
-
485
- img,
486
- video {
487
- max-width: 100%;
488
- height: auto;
489
- }
490
-
491
- /* Make elements with the HTML hidden attribute stay hidden by default */
492
- [hidden] {
493
- display: none;
494
- }
495
-
496
- .container {
497
- width: 100%;
498
- }
499
-
500
- @media (min-width: 640px) {
501
-
502
- .container {
503
- max-width: 640px;
504
- }
505
- }
506
-
507
- @media (min-width: 768px) {
508
-
509
- .container {
510
- max-width: 768px;
511
- }
512
- }
513
-
514
- @media (min-width: 1024px) {
515
-
516
- .container {
517
- max-width: 1024px;
518
- }
519
- }
520
-
521
- @media (min-width: 1280px) {
522
-
523
- .container {
524
- max-width: 1280px;
525
- }
526
- }
527
-
528
- @media (min-width: 1536px) {
529
-
530
- .container {
531
- max-width: 1536px;
532
- }
533
- }
534
-
535
- .grid-cols-2.divide-y > :not([hidden]) ~ :not([hidden]):nth-child(-n + 2) {
536
- border-top-width: 0;
537
- border-bottom-width: 0;
538
- }
539
-
540
- .sr-only {
541
- position: absolute;
542
- width: 1px;
543
- height: 1px;
544
- padding: 0;
545
- margin: -1px;
546
- overflow: hidden;
547
- clip: rect(0, 0, 0, 0);
548
- white-space: nowrap;
549
- border-width: 0;
550
- }
551
-
552
- .pointer-events-none {
553
- pointer-events: none;
554
- }
555
-
556
- .pointer-events-auto {
557
- pointer-events: auto;
558
- }
559
-
560
- .fixed {
561
- position: fixed;
562
- }
563
-
564
- .absolute {
565
- position: absolute;
566
- }
567
-
568
- .relative {
569
- position: relative;
570
- }
571
-
572
- .inset-0 {
573
- inset: 0px;
574
- }
575
-
576
- .right-0 {
577
- right: 0px;
578
- }
579
-
580
- .top-0 {
581
- top: 0px;
582
- }
583
-
584
- .col-start-1 {
585
- grid-column-start: 1;
586
- }
587
-
588
- .row-start-1 {
589
- grid-row-start: 1;
590
- }
591
-
592
- .m-0 {
593
- margin: 0px;
594
- }
595
-
596
- .m-2 {
597
- margin: 0.5rem;
598
- }
599
-
600
- .-mx-0\\.5 {
601
- margin-left: -0.125rem;
602
- margin-right: -0.125rem;
603
- }
604
-
605
- .-my-1 {
606
- margin-top: -0.25rem;
607
- margin-bottom: -0.25rem;
608
- }
609
-
610
- .-my-\\[0\\.125em\\] {
611
- margin-top: -0.125em;
612
- margin-bottom: -0.125em;
613
- }
614
-
615
- .mx-auto {
616
- margin-left: auto;
617
- margin-right: auto;
618
- }
619
-
620
- .-ml-3 {
621
- margin-left: -0.75rem;
622
- }
623
-
624
- .block {
625
- display: block;
626
- }
627
-
628
- .flex {
629
- display: flex;
630
- }
631
-
632
- .inline-flex {
633
- display: inline-flex;
634
- }
635
-
636
- .table {
637
- display: table;
638
- }
639
-
640
- .grid {
641
- display: grid;
642
- }
643
-
644
- .inline-grid {
645
- display: inline-grid;
646
- }
647
-
648
- .contents {
649
- display: contents;
650
- }
651
-
652
- .h-16 {
653
- height: 4rem;
654
- }
655
-
656
- .h-4 {
657
- height: 1rem;
658
- }
659
-
660
- .h-6 {
661
- height: 1.5rem;
662
- }
663
-
664
- .h-\\[1\\.25em\\] {
665
- height: 1.25em;
666
- }
667
-
668
- .h-\\[1em\\] {
669
- height: 1em;
670
- }
671
-
672
- .h-full {
673
- height: 100%;
674
- }
675
-
676
- .max-h-32 {
677
- max-height: 8rem;
678
- }
679
-
680
- .min-h-\\[26rem\\] {
681
- min-height: 26rem;
682
- }
683
-
684
- .w-16 {
685
- width: 4rem;
686
- }
687
-
688
- .w-28 {
689
- width: 7rem;
690
- }
691
-
692
- .w-4 {
693
- width: 1rem;
694
- }
695
-
696
- .w-48 {
697
- width: 12rem;
698
- }
699
-
700
- .w-6 {
701
- width: 1.5rem;
702
- }
703
-
704
- .w-60 {
705
- width: 15rem;
706
- }
707
-
708
- .w-\\[0\\.6em\\] {
709
- width: 0.6em;
710
- }
711
-
712
- .w-\\[1\\.25em\\] {
713
- width: 1.25em;
714
- }
715
-
716
- .w-full {
717
- width: 100%;
718
- }
719
-
720
- .max-w-\\[26rem\\] {
721
- max-width: 26rem;
722
- }
723
-
724
- .flex-shrink-0 {
725
- flex-shrink: 0;
726
- }
727
-
728
- .flex-grow {
729
- flex-grow: 1;
730
- }
731
-
732
- .translate-x-2 {
733
- --tw-translate-x: 0.5rem;
734
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
735
- }
736
-
737
- .scale-100 {
738
- --tw-scale-x: 1;
739
- --tw-scale-y: 1;
740
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
741
- }
742
-
743
- .scale-50 {
744
- --tw-scale-x: .5;
745
- --tw-scale-y: .5;
746
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
747
- }
748
-
749
- @keyframes spin {
750
-
751
- to {
752
- transform: rotate(360deg);
753
- }
754
- }
755
-
756
- .animate-spin {
757
- animation: spin 1s linear infinite;
758
- }
759
-
760
- .cursor-pointer {
761
- cursor: pointer;
762
- }
763
-
764
- .grid-cols-\\[1fr_auto_1fr\\] {
765
- grid-template-columns: 1fr auto 1fr;
766
- }
767
-
768
- .flex-col {
769
- flex-direction: column;
770
- }
771
-
772
- .place-items-center {
773
- place-items: center;
774
- }
775
-
776
- .items-end {
777
- align-items: flex-end;
778
- }
779
-
780
- .items-center {
781
- align-items: center;
782
- }
783
-
784
- .justify-end {
785
- justify-content: flex-end;
786
- }
787
-
788
- .justify-center {
789
- justify-content: center;
790
- }
791
-
792
- .justify-between {
793
- justify-content: space-between;
794
- }
795
-
796
- .gap-1 {
797
- gap: 0.25rem;
798
- }
799
-
800
- .gap-2 {
801
- gap: 0.5rem;
802
- }
803
-
804
- .gap-2\\.5 {
805
- gap: 0.625rem;
806
- }
807
-
808
- .gap-4 {
809
- gap: 1rem;
810
- }
811
-
812
- .gap-6 {
813
- gap: 1.5rem;
814
- }
815
-
816
- .divide-y > :not([hidden]) ~ :not([hidden]) {
817
- --tw-divide-y-reverse: 0;
818
- border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
819
- border-bottom-width: calc(1px * var(--tw-divide-y-reverse));
820
- }
821
-
822
- .divide-neutral-700 > :not([hidden]) ~ :not([hidden]) {
823
- --tw-divide-opacity: 1;
824
- border-color: rgb(64 64 64 / var(--tw-divide-opacity));
825
- }
826
-
827
- .divide-neutral-800 > :not([hidden]) ~ :not([hidden]) {
828
- --tw-divide-opacity: 1;
829
- border-color: rgb(38 38 38 / var(--tw-divide-opacity));
830
- }
831
-
832
- .self-auto {
833
- align-self: auto;
834
- }
835
-
836
- .self-end {
837
- align-self: flex-end;
838
- }
839
-
840
- .self-center {
841
- align-self: center;
842
- }
843
-
844
- .overflow-y-scroll {
845
- overflow-y: scroll;
846
- }
847
-
848
- .whitespace-break-spaces {
849
- white-space: break-spaces;
850
- }
851
-
852
- .break-all {
853
- word-break: break-all;
854
- }
855
-
856
- .rounded-full {
857
- border-radius: 9999px;
858
- }
859
-
860
- .border {
861
- border-width: 1px;
862
- }
863
-
864
- .border-4 {
865
- border-width: 4px;
866
- }
867
-
868
- .border-l-4 {
869
- border-left-width: 4px;
870
- }
871
-
872
- .border-neutral-300 {
873
- --tw-border-opacity: 1;
874
- border-color: rgb(212 212 212 / var(--tw-border-opacity));
875
- }
876
-
877
- .border-red-500 {
878
- --tw-border-opacity: 1;
879
- border-color: rgb(239 68 68 / var(--tw-border-opacity));
880
- }
881
-
882
- .border-transparent {
883
- border-color: transparent;
884
- }
885
-
886
- .bg-black\\/10 {
887
- background-color: rgb(0 0 0 / 0.1);
888
- }
889
-
890
- .bg-neutral-100 {
891
- --tw-bg-opacity: 1;
892
- background-color: rgb(245 245 245 / var(--tw-bg-opacity));
893
- }
894
-
895
- .bg-neutral-700 {
896
- --tw-bg-opacity: 1;
897
- background-color: rgb(64 64 64 / var(--tw-bg-opacity));
898
- }
899
-
900
- .bg-neutral-800 {
901
- --tw-bg-opacity: 1;
902
- background-color: rgb(38 38 38 / var(--tw-bg-opacity));
903
- }
904
-
905
- .bg-neutral-800\\/85 {
906
- background-color: rgb(38 38 38 / 0.85);
907
- }
908
-
909
- .bg-neutral-900 {
910
- --tw-bg-opacity: 1;
911
- background-color: rgb(23 23 23 / var(--tw-bg-opacity));
912
- }
913
-
914
- .bg-orange-500 {
915
- --tw-bg-opacity: 1;
916
- background-color: rgb(249 115 22 / var(--tw-bg-opacity));
917
- }
918
-
919
- .bg-red-100 {
920
- --tw-bg-opacity: 1;
921
- background-color: rgb(254 226 226 / var(--tw-bg-opacity));
922
- }
923
-
924
- .bg-white {
925
- --tw-bg-opacity: 1;
926
- background-color: rgb(255 255 255 / var(--tw-bg-opacity));
927
- }
928
-
929
- .bg-cover {
930
- background-size: cover;
931
- }
932
-
933
- .bg-center {
934
- background-position: center;
935
- }
936
-
937
- .bg-no-repeat {
938
- background-repeat: no-repeat;
939
- }
940
-
941
- .object-cover {
942
- object-fit: cover;
943
- }
944
-
945
- .p-1 {
946
- padding: 0.25rem;
947
- }
948
-
949
- .p-2 {
950
- padding: 0.5rem;
951
- }
952
-
953
- .p-2\\.5 {
954
- padding: 0.625rem;
955
- }
956
-
957
- .p-3 {
958
- padding: 0.75rem;
959
- }
960
-
961
- .p-4 {
962
- padding: 1rem;
963
- }
964
-
965
- .p-5 {
966
- padding: 1.25rem;
967
- }
968
-
969
- .p-6 {
970
- padding: 1.5rem;
971
- }
972
-
973
- .p-\\[\\.75em\\] {
974
- padding: .75em;
975
- }
976
-
977
- .px-3 {
978
- padding-left: 0.75rem;
979
- padding-right: 0.75rem;
980
- }
981
-
982
- .px-8 {
983
- padding-left: 2rem;
984
- padding-right: 2rem;
985
- }
986
-
987
- .py-2 {
988
- padding-top: 0.5rem;
989
- padding-bottom: 0.5rem;
990
- }
991
-
992
- .py-8 {
993
- padding-top: 2rem;
994
- padding-bottom: 2rem;
995
- }
996
-
997
- .text-left {
998
- text-align: left;
999
- }
1000
-
1001
- .text-center {
1002
- text-align: center;
1003
- }
1004
-
1005
- .font-mono {
1006
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1007
- }
1008
-
1009
- .text-2xl {
1010
- font-size: 1.5rem;
1011
- line-height: 2rem;
1012
- }
1013
-
1014
- .text-\\[\\.75em\\] {
1015
- font-size: .75em;
1016
- }
1017
-
1018
- .text-base {
1019
- font-size: 1rem;
1020
- line-height: 1.5rem;
1021
- }
1022
-
1023
- .text-lg {
1024
- font-size: 1.125rem;
1025
- line-height: 1.75rem;
1026
- }
1027
-
1028
- .text-sm {
1029
- font-size: 0.875rem;
1030
- line-height: 1.25rem;
1031
- }
1032
-
1033
- .text-xs {
1034
- font-size: 0.75rem;
1035
- line-height: 1rem;
1036
- }
1037
-
1038
- .font-medium {
1039
- font-weight: 500;
1040
- }
1041
-
1042
- .font-semibold {
1043
- font-weight: 600;
1044
- }
1045
-
1046
- .leading-none {
1047
- line-height: 1;
1048
- }
1049
-
1050
- .tracking-\\[-1ch\\] {
1051
- letter-spacing: -1ch;
1052
- }
1053
-
1054
- .text-black {
1055
- --tw-text-opacity: 1;
1056
- color: rgb(0 0 0 / var(--tw-text-opacity));
1057
- }
1058
-
1059
- .text-neutral-400 {
1060
- --tw-text-opacity: 1;
1061
- color: rgb(163 163 163 / var(--tw-text-opacity));
1062
- }
1063
-
1064
- .text-neutral-500 {
1065
- --tw-text-opacity: 1;
1066
- color: rgb(115 115 115 / var(--tw-text-opacity));
1067
- }
1068
-
1069
- .text-neutral-700 {
1070
- --tw-text-opacity: 1;
1071
- color: rgb(64 64 64 / var(--tw-text-opacity));
1072
- }
1073
-
1074
- .text-orange-500 {
1075
- --tw-text-opacity: 1;
1076
- color: rgb(249 115 22 / var(--tw-text-opacity));
1077
- }
1078
-
1079
- .text-red-900 {
1080
- --tw-text-opacity: 1;
1081
- color: rgb(127 29 29 / var(--tw-text-opacity));
1082
- }
1083
-
1084
- .text-transparent {
1085
- color: transparent;
1086
- }
1087
-
1088
- .text-white {
1089
- --tw-text-opacity: 1;
1090
- color: rgb(255 255 255 / var(--tw-text-opacity));
1091
- }
1092
-
1093
- .opacity-0 {
1094
- opacity: 0;
1095
- }
1096
-
1097
- .opacity-100 {
1098
- opacity: 1;
1099
- }
1100
-
1101
- .opacity-25 {
1102
- opacity: 0.25;
1103
- }
1104
-
1105
- .opacity-30 {
1106
- opacity: 0.3;
1107
- }
1108
-
1109
- .opacity-75 {
1110
- opacity: 0.75;
1111
- }
1112
-
1113
- .outline-none {
1114
- outline: 2px solid transparent;
1115
- outline-offset: 2px;
1116
- }
1117
-
1118
- .ring-1 {
1119
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1120
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1121
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1122
- }
1123
-
1124
- .ring-2 {
1125
- --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1126
- --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1127
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1128
- }
1129
-
1130
- .ring-neutral-700\\/50 {
1131
- --tw-ring-color: rgb(64 64 64 / 0.5);
1132
- }
1133
-
1134
- .ring-transparent {
1135
- --tw-ring-color: transparent;
1136
- }
1137
-
1138
- .filter {
1139
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1140
- }
1141
-
1142
- .transition {
1143
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
1144
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
1145
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
1146
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1147
- transition-duration: 150ms;
1148
- }
1149
-
1150
- .duration-100 {
1151
- transition-duration: 100ms;
1152
- }
1153
-
1154
- .duration-300 {
1155
- transition-duration: 300ms;
1156
- }
1157
-
1158
- @keyframes enter {
1159
-
1160
- from {
1161
- opacity: var(--tw-enter-opacity, 1);
1162
- transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));
1163
- }
1164
- }
1165
-
1166
- @keyframes exit {
1167
-
1168
- to {
1169
- opacity: var(--tw-exit-opacity, 1);
1170
- transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));
1171
- }
1172
- }
1173
-
1174
- .animate-in {
1175
- animation-name: enter;
1176
- animation-duration: 150ms;
1177
- --tw-enter-opacity: initial;
1178
- --tw-enter-scale: initial;
1179
- --tw-enter-rotate: initial;
1180
- --tw-enter-translate-x: initial;
1181
- --tw-enter-translate-y: initial;
1182
- }
1183
-
1184
- .fade-in {
1185
- --tw-enter-opacity: 0;
1186
- }
1187
-
1188
- .slide-in-from-bottom-16 {
1189
- --tw-enter-translate-y: 4rem;
1190
- }
1191
-
1192
- .slide-in-from-bottom-8 {
1193
- --tw-enter-translate-y: 2rem;
1194
- }
1195
-
1196
- .animate-duration-300 {
1197
- animation-duration: 300ms;
1198
- }
1199
-
1200
- @property --tw-border-gradient-angle {
1201
- syntax: '<angle>';
1202
- inherits: true;
1203
- initial-value: 0deg;
1204
- }
1205
-
1206
- @property --tw-conic-gradient-angle {
1207
- syntax: '<angle>';
1208
- inherits: true;
1209
- initial-value: 0deg;
1210
- }
1211
-
1212
- @keyframes border-gradient {
1213
-
1214
- to {
1215
- --tw-border-gradient-angle: 360deg;
1216
- }
1217
- }
1218
-
1219
- .placeholder\\:text-neutral-400::placeholder {
1220
- --tw-text-opacity: 1;
1221
- color: rgb(163 163 163 / var(--tw-text-opacity));
1222
- }
1223
-
1224
- .after\\:select-none::after {
1225
- content: var(--tw-content);
1226
- -webkit-user-select: none;
1227
- user-select: none;
1228
- }
1229
-
1230
- .after\\:content-\\[\\'\\2026\\'\\]::after {
1231
- --tw-content: '\u2026';
1232
- content: var(--tw-content);
1233
- }
1234
-
1235
- .focus-within\\:border-transparent:focus-within {
1236
- border-color: transparent;
1237
- }
1238
-
1239
- .focus-within\\:ring-orange-500:focus-within {
1240
- --tw-ring-opacity: 1;
1241
- --tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity));
1242
- }
1243
-
1244
- .hover\\:bg-neutral-200:hover {
1245
- --tw-bg-opacity: 1;
1246
- background-color: rgb(229 229 229 / var(--tw-bg-opacity));
1247
- }
1248
-
1249
- .hover\\:bg-orange-400:hover {
1250
- --tw-bg-opacity: 1;
1251
- background-color: rgb(251 146 60 / var(--tw-bg-opacity));
1252
- }
1253
-
1254
- .hover\\:text-neutral-500:hover {
1255
- --tw-text-opacity: 1;
1256
- color: rgb(115 115 115 / var(--tw-text-opacity));
1257
- }
1258
-
1259
- .hover\\:text-white:hover {
1260
- --tw-text-opacity: 1;
1261
- color: rgb(255 255 255 / var(--tw-text-opacity));
1262
- }
1263
-
1264
- .hover\\:brightness-125:hover {
1265
- --tw-brightness: brightness(1.25);
1266
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1267
- }
1268
-
1269
- .focus\\:border-orange-500:focus {
1270
- --tw-border-opacity: 1;
1271
- border-color: rgb(249 115 22 / var(--tw-border-opacity));
1272
- }
1273
-
1274
- .active\\:bg-orange-600:active {
1275
- --tw-bg-opacity: 1;
1276
- background-color: rgb(234 88 12 / var(--tw-bg-opacity));
1277
- }
1278
-
1279
- .active\\:brightness-150:active {
1280
- --tw-brightness: brightness(1.5);
1281
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1282
- }
1283
-
1284
- .group:hover .group-hover\\:rotate-90 {
1285
- --tw-rotate: 90deg;
1286
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1287
- }
1288
-
1289
- .group:hover .group-hover\\:text-black {
1290
- --tw-text-opacity: 1;
1291
- color: rgb(0 0 0 / var(--tw-text-opacity));
1292
- }
1293
-
1294
- .aria-busy\\:pointer-events-none[aria-busy="true"] {
1295
- pointer-events: none;
1296
- }
1297
-
1298
- .aria-busy\\:saturate-50[aria-busy="true"] {
1299
- --tw-saturate: saturate(.5);
1300
- filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1301
- }
1302
-
1303
- .aria-disabled\\:pointer-events-none[aria-disabled="true"] {
1304
- pointer-events: none;
1305
- }
1306
-
1307
- .aria-disabled\\:opacity-50[aria-disabled="true"] {
1308
- opacity: 0.5;
1309
- }
1310
-
1311
- .group[aria-busy="true"] .group-aria-busy\\:translate-x-0 {
1312
- --tw-translate-x: 0px;
1313
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1314
- }
1315
-
1316
- .group[aria-busy="true"] .group-aria-busy\\:scale-100 {
1317
- --tw-scale-x: 1;
1318
- --tw-scale-y: 1;
1319
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1320
- }
1321
-
1322
- .group[aria-busy="true"] .group-aria-busy\\:scale-125 {
1323
- --tw-scale-x: 1.25;
1324
- --tw-scale-y: 1.25;
1325
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1326
- }
1327
-
1328
- .group[aria-busy="true"] .group-aria-busy\\:opacity-0 {
1329
- opacity: 0;
1330
- }
1331
-
1332
- .group[aria-busy="true"] .group-aria-busy\\:opacity-100 {
1333
- opacity: 1;
1334
- }
1335
-
1336
- .group[aria-busy="true"] .group-aria-busy\\:duration-300 {
1337
- transition-duration: 300ms;
1338
- }
1339
-
1340
- .data-\\[highlighted\\]\\:bg-neutral-200[data-highlighted] {
1341
- --tw-bg-opacity: 1;
1342
- background-color: rgb(229 229 229 / var(--tw-bg-opacity));
1343
- }
1344
-
1345
- .links\\:font-medium a[href]:not(.links-unset) {
1346
- font-weight: 500;
1347
- }
1348
-
1349
- .links\\:text-white a[href]:not(.links-unset) {
1350
- --tw-text-opacity: 1;
1351
- color: rgb(255 255 255 / var(--tw-text-opacity));
1352
- }
1353
-
1354
- .links\\:underline a[href]:not(.links-unset) {
1355
- text-decoration-line: underline;
1356
- }
1357
-
1358
- .links\\:decoration-neutral-500 a[href]:not(.links-unset) {
1359
- text-decoration-color: #737373;
1360
- }
1361
-
1362
- .links\\:underline-offset-4 a[href]:not(.links-unset) {
1363
- text-underline-offset: 4px;
1364
- }
1365
-
1366
- .hover\\:links\\:decoration-orange-500 a[href]:not(.links-unset):hover {
1367
- text-decoration-color: #f97316;
1368
- }
1369
-
1370
- @media (min-width: 640px) {
1371
-
1372
- .sm\\:items-center {
1373
- align-items: center;
1374
- }
1375
- }
1376
-
1377
- .dark\\:border-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) {
1378
- --tw-border-opacity: 1;
1379
- border-color: rgb(64 64 64 / var(--tw-border-opacity));
1380
- }
1381
-
1382
- .dark\\:bg-neutral-800:where([data-theme="dark"], [data-theme="dark"] *) {
1383
- --tw-bg-opacity: 1;
1384
- background-color: rgb(38 38 38 / var(--tw-bg-opacity));
1385
- }
1386
-
1387
- .dark\\:bg-neutral-900:where([data-theme="dark"], [data-theme="dark"] *) {
1388
- --tw-bg-opacity: 1;
1389
- background-color: rgb(23 23 23 / var(--tw-bg-opacity));
1390
- }
1391
-
1392
- .dark\\:bg-red-900:where([data-theme="dark"], [data-theme="dark"] *) {
1393
- --tw-bg-opacity: 1;
1394
- background-color: rgb(127 29 29 / var(--tw-bg-opacity));
1395
- }
1396
-
1397
- .dark\\:bg-white\\/10:where([data-theme="dark"], [data-theme="dark"] *) {
1398
- background-color: rgb(255 255 255 / 0.1);
1399
- }
1400
-
1401
- .dark\\:text-neutral-400:where([data-theme="dark"], [data-theme="dark"] *) {
1402
- --tw-text-opacity: 1;
1403
- color: rgb(163 163 163 / var(--tw-text-opacity));
1404
- }
1405
-
1406
- .dark\\:text-red-50:where([data-theme="dark"], [data-theme="dark"] *) {
1407
- --tw-text-opacity: 1;
1408
- color: rgb(254 242 242 / var(--tw-text-opacity));
1409
- }
1410
-
1411
- .dark\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {
1412
- --tw-text-opacity: 1;
1413
- color: rgb(255 255 255 / var(--tw-text-opacity));
1414
- }
1415
-
1416
- .dark\\:placeholder\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *)::placeholder {
1417
- --tw-text-opacity: 1;
1418
- color: rgb(115 115 115 / var(--tw-text-opacity));
1419
- }
1420
-
1421
- .dark\\:hover\\:bg-neutral-700:hover:where([data-theme="dark"], [data-theme="dark"] *) {
1422
- --tw-bg-opacity: 1;
1423
- background-color: rgb(64 64 64 / var(--tw-bg-opacity));
1424
- }
1425
-
1426
- .group:hover .dark\\:group-hover\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {
1427
- --tw-text-opacity: 1;
1428
- color: rgb(255 255 255 / var(--tw-text-opacity));
1429
- }
1430
- `;import{useResizeObserver as Qt}from"usehooks-ts";import{mergeRefs as Yt}from"react-merge-refs";import{createContext as Lt,useContext as Bt}from"react";import{jsx as Ft}from"react/jsx-runtime";var Ie=Lt(null);function He({frame:e,children:t}){if(Bt(Ie))throw new Error("`FrameProvider` can only be used once.");return Ft(Ie.Provider,{value:{frame:e},children:t})}import{useMediaQuery as Gt}from"usehooks-ts";import"@rainbow-me/rainbowkit/styles.css";import{createContext as Wt,useContext as Re}from"react";import{RainbowKitProvider as Ut,lightTheme as Ne,midnightTheme as Ee}from"@rainbow-me/rainbowkit";import{jsx as Te}from"react/jsx-runtime";var se=Wt(null);function Oe({config:e,children:t}){if(Re(se))throw new Error("`EntryKitProvider` can only be used once.");return Te(Ut,{initialChain:e.chainId,appInfo:{appName:e.appInfo?.name},theme:e.theme==="light"?Ne({borderRadius:"none"}):e.theme==="dark"?Ee({borderRadius:"none"}):{lightMode:Ne({borderRadius:"none"}),darkMode:Ee({borderRadius:"none"})},children:Te(se.Provider,{value:e,children:t})})}function u(){let e=Re(se);if(!e)throw new Error("`useEntryKitConfig` can only be used within a `EntryKitProvider`.");return e}function De(){let{theme:e}=u(),t=Gt("(prefers-color-scheme: dark)");return e??(t?"dark":"light")}import{jsx as I,jsxs as $t}from"react/jsx-runtime";function Xt({onSize:e,...t}){let n=Ke(null);return Qt({ref:n,onResize:e}),I("div",{ref:n,...t,style:{...t.style,display:"inline-grid"}})}var K=Vt(function({mode:t,children:n},r){let a=Ke(null),[i,s]=ze(!1),o=i?a.current:null,[l,c]=ze({width:void 0,height:void 0}),d=o?.contentDocument,p=De();_t(()=>{d&&d.body.setAttribute("data-theme",p)},[d,p]);let f=t==="modal"?{all:"unset",display:"block",position:"fixed",inset:"0",width:"100%",height:"100%",zIndex:"2147483646"}:l.width&&l.height?{all:"unset",display:"inline-grid",width:`${l.width}px`,height:`${l.height}px`}:{all:"unset",display:"block",position:"fixed",inset:"0",width:"100%",height:"100%",opacity:0,pointerEvents:"none"};return I("iframe",{ref:Yt([r,a]),style:f,onLoad:()=>s(!0),srcDoc:"<!doctype html><title>\u2026</title>",children:d?qt.createPortal($t(He,{frame:o,children:[I("div",{children:t==="modal"?n:I(Xt,{onSize:c,children:n})}),I("style",{dangerouslySetInnerHTML:{__html:Me}})]}),d.body):null})});import{twMerge as Le}from"tailwind-merge";import{jsx as k,jsxs as en}from"react/jsx-runtime";function Be({open:e,onOpenChange:t,children:n}){return k(jt,{open:e,onOpenChange:t,children:k(Jt,{children:en(K,{mode:"modal",children:[k("div",{className:Le("fixed inset-0","bg-neutral-800/85","animate-in animate-duration-300 fade-in")}),k("div",{className:Le("fixed inset-0","grid items-end sm:items-center","animate-in animate-duration-300 fade-in slide-in-from-bottom-16"),children:k("div",{children:k(Zt,{className:"outline-none w-full max-w-[26rem] mx-auto","aria-describedby":void 0,onOpenAutoFocus:r=>{r.preventDefault()},children:n})})})]})})})}import{useCallback as ce,useMemo as tn}from"react";import{useStore as nn}from"zustand";import{createStore as rn}from"zustand/vanilla";var L=rn(()=>({open:!1}));function y(){let e=nn(L,a=>a.open),t=ce(()=>{L.setState({open:!0})},[]),n=ce(()=>{L.setState({open:!1})},[]),r=ce(a=>{L.setState({open:a})},[]);return tn(()=>({accountModalOpen:e,openAccountModal:t,closeAccountModal:n,toggleAccountModal:r}),[e,t,n,r])}import{twMerge as Mt}from"tailwind-merge";import{useConnectorClient as ea}from"wagmi";import{useAccount as rr}from"wagmi";import{twMerge as B}from"tailwind-merge";import{twMerge as an}from"tailwind-merge";import{jsx as Fe,jsxs as on}from"react/jsx-runtime";function x({className:e,...t}){return on("svg",{className:an("-my-[0.125em] h-[1.25em] w-[1.25em] animate-spin",e),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t,children:[Fe("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Fe("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}import{jsx as H,jsxs as cn}from"react/jsx-runtime";var sn=({variant:e="primary"}={})=>B("group self-center leading-none outline-none border-4 border-transparent","transition hover:brightness-125 active:brightness-150","focus:border-orange-500","aria-disabled:pointer-events-none aria-busy:pointer-events-none","aria-disabled:opacity-50","p-[.75em] font-medium",{primary:B("bg-neutral-700 text-white"),secondary:B("bg-neutral-800 text-white")}[e]),g=({pending:e,variant:t,type:n,className:r,children:a,disabled:i,...s})=>H("button",{type:n||"button",className:B(sn({variant:t,pending:e}),r),"aria-busy":e,"aria-disabled":i,disabled:i||e,...s,children:cn("span",{className:"grid grid-cols-[1fr_auto_1fr] gap-2",children:[H("span",{className:"flex items-center justify-end text-[.75em]",children:H("span",{className:"transition opacity-0 translate-x-2 group-aria-busy:opacity-100 group-aria-busy:translate-x-0 duration-100 group-aria-busy:duration-300",children:H(x,{})})}),H("span",{children:a})]})});import{useConnectModal as ar}from"@rainbow-me/rainbowkit";import{useMutation as et}from"@tanstack/react-query";import{useConnectors as Jn}from"wagmi";import{createClient as Vn,custom as _n,getAddress as qn,numberToHex as $e,SwitchChainError as Qn}from"viem";import{ChainNotConfiguredError as Yn,createConnector as Xn}from"wagmi";import{createStore as dn}from"zustand/vanilla";import{persist as ln}from"zustand/middleware";var m=dn(ln(()=>({publicKeys:{},addresses:{},activeCredential:null}),{name:"mud:passkey:cache"}));function pn(e){e.key===m.persist.getOptions().name&&m.persist.rehydrate()}window.addEventListener("storage",pn);import{smartAccountActions as $n}from"permissionless/clients";import{toWebAuthnAccount as Pn}from"viem/account-abstraction";import{BaseError as un}from"abitype";import{pad as mn,encodeFunctionData as de,hashMessage as fn,hashTypedData as Ue,encodeAbiParameters as Ge,stringToHex as yn,size as gn,encodePacked as hn,parseSignature as wn}from"viem";import{entryPoint07Abi as bn,entryPoint07Address as xn,getUserOperationHash as vn,toSmartAccount as Cn}from"viem/account-abstraction";import{readContract as We}from"viem/actions";import{parseSignature as kn}from"webauthn-p256";async function U(e){let{client:t,owners:n,nonce:r=0n}=e,a=e.address,i={abi:bn,address:xn,version:"0.7"},s={abi:Sn,address:"0x356336adA1619BeC1Ae4E6D94Dd9c0490DA414a8"};if(!n.length)throw new Error("`owners` must have at least one account.");function o(d){return d.type==="webAuthn"?d.publicKey:mn(d.address)}let l=e.signer??n[0],c=n.indexOf(l);if(c===-1)throw new Error("`signer` must be one of `owners`.");return Cn({client:t,entryPoint:i,extend:{__isCoinbaseSmartAccount:!0,abi:W,factory:s,signer:l},async encodeCalls(d){return d.length===1?de({abi:W,functionName:"execute",args:[d[0].to,d[0].value??0n,d[0].data??"0x"]}):de({abi:W,functionName:"executeBatch",args:[d.map(p=>({data:p.data??"0x",target:p.to,value:p.value??0n}))]})},async getAddress(){return a??=await We(t,{...s,functionName:"getAddress",args:[n.map(o),r]}),a},async getFactoryArgs(){let d=de({abi:s.abi,functionName:"createAccount",args:[n.map(o),r]});return{factory:s.address,factoryData:d}},async getStubSignature(){return l.type==="webAuthn"?"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000":N({signature:"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",ownerIndex:c})},async sign(d){let p=await this.getAddress(),f=le({address:p,chainId:t.chain.id,hash:d.hash}),h=await F({hash:f,owner:l});return N({signature:h,ownerIndex:c})},async signMessage(d){let{message:p}=d,f=await this.getAddress(),h=le({address:f,chainId:t.chain.id,hash:fn(p)}),M=await F({hash:h,owner:l});return N({signature:M,ownerIndex:c})},async signTypedData(d){let{domain:p,types:f,primaryType:h,message:M}=d,ie=await this.getAddress(),Dt=le({address:ie,chainId:t.chain.id,hash:Ue({domain:p,message:M,primaryType:h,types:f})}),zt=await F({hash:Dt,owner:l});return N({signature:zt,ownerIndex:c})},async signUserOperation(d){let{chainId:p=t.chain.id,...f}=d,h=await this.getAddress(),M=vn({chainId:p,entryPointAddress:i.address,entryPointVersion:i.version,userOperation:{...f,sender:h}}),ie=await F({hash:M,owner:l});return N({signature:ie,ownerIndex:c})},userOperation:{async estimateGas(d){if(l.type==="webAuthn")return{verificationGasLimit:BigInt(Math.max(Number(d.verificationGasLimit??0n),8e5))}}},async isOwner(d){return await We(t,{abi:W,address:await this.getAddress(),functionName:"isOwnerBytes",args:[o(d)]})}})}async function F({hash:e,owner:t}){if(t.type==="webAuthn"){let{signature:n,webauthn:r}=await t.sign({hash:e});return An({signature:n,webauthn:r})}if(t.sign)return t.sign({hash:e});throw new un("`owner` does not support raw sign.")}function le({address:e,chainId:t,hash:n}){return Ue({domain:{chainId:t,name:"Coinbase Smart Wallet",verifyingContract:e,version:"1"},types:{CoinbaseSmartWalletMessage:[{name:"hash",type:"bytes32"}]},primaryType:"CoinbaseSmartWalletMessage",message:{hash:n}})}function An({webauthn:e,signature:t}){let{r:n,s:r}=kn(t);return Ge([{components:[{name:"authenticatorData",type:"bytes"},{name:"clientDataJSON",type:"bytes"},{name:"challengeIndex",type:"uint256"},{name:"typeIndex",type:"uint256"},{name:"r",type:"uint256"},{name:"s",type:"uint256"}],type:"tuple"}],[{authenticatorData:e.authenticatorData,clientDataJSON:yn(e.clientDataJSON),challengeIndex:BigInt(e.challengeIndex),typeIndex:BigInt(e.typeIndex),r:n,s:r}])}function N(e){let{ownerIndex:t}=e,n=(()=>{if(gn(e.signature)!==65)return e.signature;let r=wn(e.signature);return hn(["bytes32","bytes32","uint8"],[r.r,r.s,r.yParity===0?27:28])})();return Ge([{components:[{name:"ownerIndex",type:"uint8"},{name:"signatureData",type:"bytes"}],type:"tuple"}],[{ownerIndex:t,signatureData:n}])}var W=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"owner",type:"bytes"}],name:"AlreadyOwner",type:"error"},{inputs:[],name:"Initialized",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidEthereumAddressOwner",type:"error"},{inputs:[{name:"key",type:"uint256"}],name:"InvalidNonceKey",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidOwnerBytesLength",type:"error"},{inputs:[],name:"LastOwner",type:"error"},{inputs:[{name:"index",type:"uint256"}],name:"NoOwnerAtIndex",type:"error"},{inputs:[{name:"ownersRemaining",type:"uint256"}],name:"NotLastOwner",type:"error"},{inputs:[{name:"selector",type:"bytes4"}],name:"SelectorNotAllowed",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"UnauthorizedCallContext",type:"error"},{inputs:[],name:"UpgradeFailed",type:"error"},{inputs:[{name:"index",type:"uint256"},{name:"expectedOwner",type:"bytes"},{name:"actualOwner",type:"bytes"}],name:"WrongOwnerAtIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"AddOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"RemoveOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"REPLAYABLE_NONCE_KEY",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"addOwnerAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"addOwnerPublicKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"functionSelector",type:"bytes4"}],name:"canSkipChainIdValidation",outputs:[{name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"entryPoint",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"executeBatch",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"calls",type:"bytes[]"}],name:"executeWithoutChainIdValidation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHashWithoutChainId",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"$",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"owners",type:"bytes[]"}],name:"initialize",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"isOwnerAddress",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"bytes"}],name:"isOwnerBytes",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"isOwnerPublicKey",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"result",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextOwnerIndex",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"}],name:"ownerAtIndex",outputs:[{name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownerCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeLastOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeOwnerAtIndex",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"removedOwnersCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"}],name:"replaySafeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"newImplementation",type:"address"},{name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"missingAccountFunds",type:"uint256"}],name:"validateUserOp",outputs:[{name:"validationData",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],Sn=[{inputs:[{name:"implementation_",type:"address"}],stateMutability:"payable",type:"constructor"},{inputs:[],name:"OwnerRequired",type:"error"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"createAccount",outputs:[{name:"account",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"getAddress",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"initCodeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"}];async function E(e,t){let{publicKeys:n}=m.getState(),r=n[t];if(!r)throw new Error("No public key found for passkey credential.");let i=[Pn({credential:{id:t,publicKey:r}})];return await U({client:e,owners:i})}import{bytesToHex as Dn,hashMessage as zn}from"viem";import{sign as Kn}from"webauthn-p256";import{bytesToHex as Mn,hexToBytes as Ve}from"webauthn-p256";import{concatBytes as In,utf8ToBytes as Hn}from"@noble/curves/abstract/utils";async function G(e){let{authenticatorData:t,challengeIndex:n,clientDataJSON:r,typeIndex:a,userVerificationRequired:i}=e,s=a||r.indexOf('"type"'),o=n||r.indexOf('"challenge"'),l=Ve(t);if(l.length<37)throw new Error("Invalid authenticatorData");let c=l[32];if((c&1)!==1)throw new Error("Invalid authenticatorData");if(i&&(c&4)!==4)throw new Error("Invalid authenticatorData");if((c&8)!==8&&(c&16)===16)throw new Error("Invalid authenticatorData");let d='"type":"webauthn.get"';if(d!==r.slice(Number(s),d.length+1))throw new Error("Invalid clientDataJSON");if(!r.slice(Number(o)).match(/^"challenge":"(.*?)"/))throw new Error("Invalid clientDataJSON");let f=new Uint8Array(await crypto.subtle.digest("SHA-256",Hn(r))),h=new Uint8Array(await crypto.subtle.digest("SHA-256",In(Ve(t),f)));return Mn(h)}import{sign as En}from"webauthn-p256";import{parseSignature as Nn,serializePublicKey as _e}from"webauthn-p256";import{secp256r1 as qe}from"@noble/curves/p256";function pe(e){let{r:t,s:n}=Nn(e.signatureHex),r=new qe.Signature(t,n).addRecoveryBit(1).recoverPublicKey(e.messageHash.slice(2)),a=new qe.Signature(t,n).addRecoveryBit(0).recoverPublicKey(e.messageHash.slice(2));return[_e(r),_e(a)]}import{hashMessage as Tn}from"viem";function Rn([e,t]){return On([...pe(e),...pe(t)])}async function Qe(e){let t=Tn(e.signatureHex),{signature:n,webauthn:r,raw:a}=await En({credentialId:e.credentialId,hash:t}),i=await G(r),s=Rn([e,{signatureHex:n,messageHash:i}]);if(s)return{publicKey:s,credential:a}}function On(e){let t=new Set;for(let n of e){if(t.has(n))return n;t.add(n)}}async function ue(){let e=Dn(crypto.getRandomValues(new Uint8Array(256))),t=zn(e),{signature:n,webauthn:r,raw:a}=await Kn({hash:t}),i=await(async()=>{let s=m.getState().publicKeys[a.id];if(s)return s;let o=await G(r),l=await Qe({credentialId:a.id,messageHash:o,signatureHex:n});if(!l)throw new Error("recovery failed");if(l.credential.id!==a.id)throw new Error("wrong credential");return m.setState(c=>({publicKeys:{...c.publicKeys,[a.id]:l.publicKey}})),l.publicKey})();return console.log("recovered passkey",a.id,i),m.setState(()=>({activeCredential:a.id})),{id:a.id,publicKey:i,raw:a}}import{createCredential as Ln}from"webauthn-p256";async function Ye(){let e=await Ln({name:"MUD Account"});return console.log("created passkey",e),m.setState(t=>({activeCredential:e.id,publicKeys:{...t.publicKeys,[e.id]:e.publicKey}})),e}import{resourceToHex as Bn}from"@latticexyz/common";import{parseAbi as Fn}from"viem";import Wn from"@latticexyz/world/mud.config";var V={pollingInterval:250},T=Bn({type:"system",namespace:"",name:"unlimited"}),Xe=Wn.namespaces.world.tables,me=Fn(["function registerDelegation(address delegatee, bytes32 delegationControlId, bytes initCallData)"]);import{createBundlerClient as Un}from"viem/account-abstraction";var Gn=new Set([31337,17420,17069,690]);function _({paymasterAddress:e,...t}){let n=t.chain??t.client?.chain;return Un({...V,paymaster:{getPaymasterData:async()=>({paymaster:e,paymasterData:"0x"})},userOperation:{estimateFeesPerGas:n&&Gn.has(n.id)?async()=>({maxFeePerGas:100000n,maxPriorityFeePerGas:0n}):void 0},...t})}import{observer as jn}from"@latticexyz/explorer/observer";A.type="passkey";function A({chainId:e,bundlerTransport:t,paymasterAddress:n,explorerUrl:r}){return Xn(a=>{if(!a.transports)throw new Error("Wagmi must be configured with transports to use the passkey connector.");let i=a.chains.find(c=>c.id===e);if(!i)throw new Error(`Could not find configured chain for chain ID ${e}.`);let s=a.transports[i.id];if(!s)throw new Error(`Could not find configured transport for chain ID ${e}.`);let o=Vn({...V,chain:i,transport:s}),l=m.getState().activeCredential!=null;return{id:"passkey",type:A.type,name:"Passkey",async createPasskey(){let{id:c}=await Ye(),d=await E(o,c);this.onAccountsChanged([d.address]),this.onConnect?.({chainId:$e(e)})},async reusePasskey(){let{id:c}=await ue(),d=await E(o,c);this.onAccountsChanged([d.address]),this.onConnect?.({chainId:$e(e)})},hasPasskey(){return Object.keys(m.getState().publicKeys).length>0},async connect(c){if(console.log("connect"),c?.chainId!=null&&c.chainId!==e)throw new Error(`Can't connect to chain ${c.chainId}. Passkey connector is bound to chain ${e}.`);!m.getState().activeCredential&&!c?.isReconnecting&&await ue();let d=await this.getAccounts();return l=d.length>0,{accounts:d,chainId:e}},async disconnect(){console.log("disconnect"),l=!1,m.setState({activeCredential:null})},async getAccounts(){console.log("getAccounts");let c=m.getState().activeCredential;if(!c)return[];try{console.log("getting account for credential",c);let d=await E(o,c);return console.log("got account",d),[d.address]}catch{console.log("could not get address for credential ID",c)}return[]},async getChainId(){return e},async isAuthorized(){return console.log("isAuthorized"),l?(await this.getAccounts()).length>0:!1},async switchChain(c){if(c.chainId!==e)throw new Error(`Can't connect to chain ${c.chainId}. Passkey connector is bound to chain ${e}.`);let d=a.chains.find(p=>p.id===c.chainId);if(!d)throw new Qn(new Yn);return d},onAccountsChanged(c){console.log("onAccountsChanged"),c.length>0?a.emitter.emit("change",{accounts:c.map(d=>qn(d))}):this.onDisconnect()},onChainChanged(c){console.log("onChainChanged"),a.emitter.emit("change",{chainId:Number(c)})},async onConnect(c){console.log("onConnect");let d=await this.getAccounts();a.emitter.emit("connect",{accounts:d,chainId:e})},async onDisconnect(c){console.log("onDisconnect"),a.emitter.emit("disconnect"),l=!1},async getClient(c){console.log("passkeyConnector.getClient",c);let d=m.getState().activeCredential;if(!d)throw new Error("Not connected.");let p=await E(o,d);return _({paymasterAddress:n,transport:t,client:o,account:p}).extend($n()).extend(f=>r?jn({explorerUrl:r})(f):{})},async getProvider(c){return _n({request:o.transport.request})({retryCount:0})}}})}function je(){let t=Jn().find(n=>n.type===A.type);if(!t)throw new Error("Could not find passkey connector. Did you configure Wagmi with the EntryKit passkey connector or passkey wallet?");return t}import{twMerge as Zn}from"tailwind-merge";import{jsx as fe,jsxs as er}from"react/jsx-runtime";function v({className:e,...t}){return er("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8",fill:"currentColor",shapeRendering:"crispEdges",className:Zn("-my-[0.125em] h-[1.25em] w-[1.25em]",e),...t,children:[fe("path",{d:"M0 0h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm0 1h1v1H0zm1 0h1v1H1zm1 0h1v1H2zm1 0h1v1H3zm1 0h1v1H4zm1 0h1v1H5zm2-1h1v1H7zm0 1h1v1H7zM6 7h1v1H6zm1-2h1v1H7zm0-1h1v1H7zm0-1h1v1H7z"}),fe("path",{d:"M2 2h1v1H2zm0 1h1v1H2zm0 1h1v1H2zm0 1h1v1H2zm1-3h1v1H3zm1 0h1v1H4zm1 0h1v1H5zm0 1h1v1H5zm0 1h1v1H5zm0 1h1v1H5zM4 5h1v1H4zM3 5h1v1H3z",opacity:".5"}),fe("path",{d:"M7 2h1v1H7zm0-1h1v1H7zM1 0h1v1H1zm1 0h1v1H2zm1 0h1v1H3zm1 0h1v1H4zm1 0h1v1H5zm1 0h1v1H6zm1 0h1v1H7z"})]})}function Je(){let{appInfo:e}=u(),t=e?.name??document.title,n=location.host,r=e?.icon??document.querySelector("link[rel~='icon']")?.getAttribute("href")??"/favico.ico",a=e?.image;return{appName:t,appOrigin:n,appIcon:r,appImage:a}}import{useQuery as tr}from"@tanstack/react-query";function q(e){return tr({enabled:!!e,retry:!1,retryOnMount:!1,refetchOnMount:!1,refetchOnWindowFocus:!1,queryKey:[e],queryFn:()=>new Promise((t,n)=>{if(!e)throw new Error("usePreloadImage: Must provide `url` to preload image.");let r=new Image;r.onload=()=>t(r),r.onerror=()=>n(new Error(`usePreloadImage: Could not load image.
1431
-
1432
- URL: ${e}`)),r.src=e})})}import{jsx as Q,jsxs as nr}from"react/jsx-runtime";function Ze(){let{appName:e,appIcon:t}=Je(),{data:n,isLoading:r}=q(t);return nr("div",{className:"flex-grow flex flex-col items-center justify-center gap-2",children:[Q("div",{className:"w-16 h-16 m-2",children:r?null:n?Q("img",{src:t,className:"w-full h-full object-cover"}):Q(v,{className:"w-full h-full text-orange-500 dark:bg-neutral-800"})}),Q("div",{className:"text-2xl text-white text-center",children:e})]})}import{twMerge as or}from"tailwind-merge";import{jsx as R,jsxs as tt}from"react/jsx-runtime";function nt(){let e=rr(),{accountModalOpen:t}=y(),{openConnectModal:n,connectModalOpen:r}=ar(),a=je(),i=et({onError:c=>console.error(c),mutationKey:["createPasskey",a.id,t,r,e.status],mutationFn:()=>a.createPasskey()}),s=et({onError:c=>console.error(c),mutationKey:["reusePasskey",a.id,t,r,e.status],mutationFn:()=>a.reusePasskey()}),o=a.hasPasskey(),l=[R(g,{variant:o?"secondary":"primary",className:"self-auto flex justify-center",pending:i.status==="pending",onClick:()=>i.mutate(),autoFocus:!o,children:"Create account"},"create"),R(g,{variant:o?"primary":"secondary",className:"self-auto flex justify-center",pending:s.status==="pending",onClick:()=>s.mutate(),autoFocus:o,children:"Sign in"},"signin")];return o&&l.reverse(),tt("div",{className:or("flex flex-col gap-6 p-6","animate-in animate-duration-300 fade-in slide-in-from-bottom-8"),children:[R("div",{className:"p-4",children:R(Ze,{})}),tt("div",{className:"self-center flex flex-col gap-2 w-60",children:[l,R("button",{className:"text-sm self-center transition text-neutral-500 hover:text-white p-2",disabled:e.status==="connecting",onClick:n,children:"Already have a wallet?"})]})]})}import{useState as Zr}from"react";import{useMemo as Jr}from"react";import{parseEther as ir}from"viem";var Y=ir("0.01");import{useReadContract as sr}from"wagmi";import cr from"@latticexyz/store/out/IStoreRead.sol/IStoreRead.abi.json";import{decodeValueArgs as dr,getKeyTuple as lr,getSchemaTypes as pr,getValueSchema as ur}from"@latticexyz/protocol-parser/internal";function rt({table:e,key:t,...n}){return sr(e&&t&&n.query?.enabled!==!1?{...n,abi:cr,functionName:"getRecord",args:[e.tableId,lr(e,t)],query:{...n.query,select:r=>({...t,...dr(pr(ur(e)),{staticData:r[0],encodedLengths:r[1],dynamicData:r[2]})})}}:{})}import{defineStore as mr}from"@latticexyz/store";import{parseAbi as fr}from"viem";var ye=fr(["error SpenderSystem_AlreadyRegistered(address spender, address user)","error SpenderSystem_HasOwnBalance(address spender)","function registerSpender(address spender)"]),yr=mr({namespaces:{root:{namespace:"",tables:{Allowance:{schema:{user:"address",allowance:"uint256"},key:["user"]},Grantor:{schema:{grantor:"address",allowance:"uint256"},key:["grantor"]},PassHolder:{schema:{user:"address",passId:"bytes32",lastRenewed:"uint256",lastClaimed:"uint256"},key:["user","passId"]},PassConfig:{schema:{passId:"bytes32",claimAmount:"uint256",claimInterval:"uint256",validityPeriod:"uint256",grantor:"address"},key:["passId"]},Spender:{schema:{spender:"address",user:"address"},key:["spender"]},SystemConfig:{schema:{entryPoint:"address"},key:[]}}}}}),X=yr.namespaces.root.tables;function $(e){let{chainId:t,paymasterAddress:n}=u();return rt({chainId:t,address:n,...e?{table:X.Allowance,key:{user:e}}:null})}import{useClient as Ar}from"wagmi";import{useQuery as Sr}from"@tanstack/react-query";import{createStore as gr}from"zustand/vanilla";import{persist as hr}from"zustand/middleware";var O=gr(hr(()=>({appSigners:{}}),{name:"mud:entrykit",partialize:({appSigners:e})=>({appSigners:e})}));function wr(e){e.key===O.persist.getOptions().name&&O.persist.rehydrate()}window.addEventListener("storage",wr);import{generatePrivateKey as br,privateKeyToAccount as xr}from"viem/accounts";function at(e){let t=O.getState().appSigners[e]??(()=>{let n=br();return O.setState(r=>({appSigners:{...r.appSigners,[e]:n}})),n})();return xr(t)}import{smartAccountActions as vr}from"permissionless";import{callFrom as Cr}from"@latticexyz/world/internal";import{observer as kr}from"@latticexyz/explorer/observer";async function ot({worldAddress:e,userAddress:t,client:n,bundlerTransport:r,paymasterAddress:a,explorerUrl:i}){let s=at(t),o=await U({client:n,owners:[s]});return _({paymasterAddress:a,transport:r,client:n,account:o}).extend(vr()).extend(Cr({worldAddress:e,delegatorAddress:t,publicClient:n})).extend(c=>i?kr({explorerUrl:i})(c):{}).extend(()=>({userAddress:t}))}function S(e){let{chainId:t,bundlerTransport:n,paymasterAddress:r,worldAddress:a,explorerUrl:i}=u(),s=Ar({chainId:t}),o=["appAccountClient",s?.uid,e];return Sr(s&&e?{queryKey:o,queryFn:async()=>await ot({worldAddress:a,userAddress:e,client:s,bundlerTransport:n,paymasterAddress:r,explorerUrl:i}),staleTime:1/0}:{queryKey:o,enabled:!1})}import{useClient as Rr}from"wagmi";import{decodeValueArgs as Pr,getKeyTuple as Mr,getSchemaTypes as Ir,getValueSchema as Hr}from"@latticexyz/protocol-parser/internal";import{readContract as Nr}from"viem/actions";import{getAction as Er}from"viem/utils";async function j(e,{address:t,table:n,key:r,blockTag:a}){let[i,s,o]=await Er(e,Nr,"readContract")({address:t,abi:Tr,functionName:"getRecord",args:[n.tableId,Mr(n,r)],blockTag:a});return{...r,...Pr(Ir(Hr(n)),{staticData:i,encodedLengths:s,dynamicData:o})}}var Tr=[{type:"function",name:"getRecord",inputs:[{name:"tableId",type:"bytes32",internalType:"ResourceId"},{name:"keyTuple",type:"bytes32[]",internalType:"bytes32[]"}],outputs:[{name:"staticData",type:"bytes",internalType:"bytes"},{name:"encodedLengths",type:"bytes32",internalType:"EncodedLengths"},{name:"dynamicData",type:"bytes",internalType:"bytes"}],stateMutability:"view"}];import{useQuery as Or}from"@tanstack/react-query";function ge({client:e,paymasterAddress:t,userAddress:n,appAccountAddress:r}){return["spender",e?.chain.id,t,n,r]}function it(e,t){let{chainId:n,paymasterAddress:r}=u(),a=Rr({chainId:n}),i=ge({client:a,paymasterAddress:r,userAddress:e,appAccountAddress:t});return Or(a&&e&&t?{queryKey:i,queryFn:async()=>(await j(a,{address:r,table:X.Spender,key:{spender:t}})).user.toLowerCase()===e.toLowerCase()}:{queryKey:i,enabled:!1})}import{useClient as Dr}from"wagmi";import{useQuery as zr}from"@tanstack/react-query";function he({client:e,worldAddress:t,userAddress:n,appAccountAddress:r}){return["delegation",e?.chain.id,t,n,r]}function st(e,t){let{chainId:n,worldAddress:r}=u(),a=Dr({chainId:n}),i=he({client:a,worldAddress:r,userAddress:e,appAccountAddress:t});return zr(a&&e&&t?{queryKey:i,queryFn:async()=>(await j(a,{address:r,table:Xe.UserDelegationControl,key:{delegator:e,delegatee:t}})).delegationControlId===T}:{queryKey:i,enabled:!1})}import{useDisconnect as Br}from"wagmi";import{useQuery as Kr}from"@tanstack/react-query";function J(e){let t=e?.toLowerCase();return Kr({enabled:!!t,queryKey:["ens",t],initialData:{address:void 0,name:void 0,displayName:void 0,avatar:void 0},queryFn:async()=>{let n=await fetch(`https://api.ensideas.com/ens/resolve/${t}`).then(r=>r.json());return{address:n.address??void 0,name:n.name??void 0,displayName:n.displayName??void 0,avatar:n.avatar??void 0}}})}import{jsx as we,jsxs as Lr}from"react/jsx-runtime";function Z({hex:e}){return e.length<=10?we("span",{title:e,children:e}):Lr("span",{title:e,children:[we("span",{className:"after:select-none after:content-['\u2026']",children:e.slice(0,6)}),we("span",{className:"tracking-[-1ch] text-transparent",children:e.slice(6,-4)}),e.slice(-4)]})}import{jsx as D,jsxs as be}from"react/jsx-runtime";function ct({isActive:e,isExpanded:t,userAddress:n}){let{data:r}=J(n),{disconnect:a,isPending:i}=Br(),{closeAccountModal:s}=y();return be("div",{className:"flex flex-col gap-4",children:[be("div",{className:"flex justify-between gap-4",children:[be("div",{children:[D("div",{children:"Account"}),D("div",{className:"font-mono text-white",children:r.name??D(Z,{hex:n})})]}),D(g,{variant:e?"primary":"secondary",className:"flex-shrink-0 text-sm p-1 w-28",pending:i,onClick:()=>{s(),a()},children:"Sign out"})]}),t?D("p",{className:"text-sm",children:"Each of your onchain actions in this app is associated with your account."}):null]})}import{useMutation as Fr,useQueryClient as Wr}from"@tanstack/react-query";function dt(){let e=Wr(),{passIssuerTransport:t}=u();return Fr({onError:n=>console.error(n),mutationKey:["claimGasPass"],mutationFn:async n=>{let r=t({retryCount:0});await r.request({method:"quarry_issuePass",params:["0x01",n]}),await r.request({method:"quarry_claimAllowance",params:["0x01",n]}),await e.invalidateQueries({queryKey:["readContract"]})}})}import{twMerge as Ur}from"tailwind-merge";import{jsx as ee,jsxs as Gr}from"react/jsx-runtime";function lt({className:e,...t}){return Gr("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 263 428",fill:"currentColor",className:Ur("w-[0.6em] h-[1em]",e),...t,children:[ee("path",{d:"M132 321V428L263 243L132 321Z"}),ee("path",{d:"M0 243L132 321V428",fillOpacity:"0.5"}),ee("path",{d:"M132 0V296L263 218"}),ee("path",{d:"M0 218L132 296V0L0 218Z",fillOpacity:"0.5"})]})}import{formatEther as Vr}from"viem";function pt(e){let t=Vr(e),n=Math.floor(parseFloat(t)).toString().length;return parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:Math.max(0,6-n)})}import{jsx as _r,jsxs as qr}from"react/jsx-runtime";function ut({wei:e}){return qr("span",{className:"inline-flex items-center gap-1",children:[pt(e)," ",_r(lt,{})]})}import{useEffect as Qr}from"react";import{jsx as P,jsxs as xe}from"react/jsx-runtime";function mt({isActive:e,isExpanded:t,userAddress:n}){let r=$(n),a=dt();return Qr(()=>{e&&a.status==="idle"&&r.data&&r.data.allowance<Y&&a.mutate(n)},[r.data,a,e,n]),xe("div",{className:"flex flex-col gap-4",children:[xe("div",{className:"flex justify-between gap-4",children:[xe("div",{children:[P("div",{children:"Allowance"}),P("div",{className:"font-mono text-white",children:r.data?P(ut,{wei:r.data.allowance}):P(x,{})})]}),P(g,{variant:e?"primary":"secondary",className:"flex-shrink-0 text-sm p-1 w-28",pending:a.status==="pending",onClick:()=>a.mutate(n),children:"Top up"})]}),t?P("p",{className:"text-sm",children:"Your allowance is used to pay for onchain computation."}):null]})}import{useMutation as Yr,useQueryClient as Xr}from"@tanstack/react-query";import{getAction as te}from"viem/utils";import{sendUserOperation as $r,waitForUserOperationReceipt as jr}from"viem/account-abstraction";import{writeContract as ft}from"viem/actions";function yt(){let{worldAddress:e,paymasterAddress:t}=u(),n=Xr();return Yr({onError:r=>console.error(r),mutationKey:["setupAppAccount"],mutationFn:async({userClient:r,appAccountAddress:a,registerSpender:i,registerDelegation:s})=>{r.account.type!=="smart"&&(await te(r,ft,"writeContract")({chain:r.chain,account:r.account,address:t,abi:ye,functionName:"registerSpender",args:[a]}),await te(r,ft,"writeContract")({chain:r.chain,account:r.account,address:e,abi:me,functionName:"registerDelegation",args:[a,T,"0x"]}));let o=[];if(i&&(console.log("registering spender"),o.push({to:t,abi:ye,functionName:"registerSpender",args:[a]})),s&&(console.log("registering delegation"),o.push({to:e,abi:me,functionName:"registerDelegation",args:[a,T,"0x"]})),!o.length)return;console.log("setting up account with",o);let l=await te(r,$r,"sendUserOperation")({calls:o});console.log("got user op hash",l);let c=await te(r,jr,"waitForUserOperationReceipt")({hash:l});if(console.log("got user op receipt",c),await n.invalidateQueries({queryKey:["readContract"]}),!!c.success){if(i){let d=ge({client:r,paymasterAddress:t,userAddress:r.account.address,appAccountAddress:a});n.setQueryData(d,!0)}if(s){let d=he({client:r,worldAddress:e,userAddress:r.account.address,appAccountAddress:a});n.setQueryData(d,!0)}}}})}import{jsx as z,jsxs as ve}from"react/jsx-runtime";function gt({isActive:e,isExpanded:t,userClient:n,registerSpender:r,registerDelegation:a}){let{closeAccountModal:i}=y(),s=S(n.account.address),o=yt(),l=!a&&!a;return ve("div",{className:"flex flex-col gap-4",children:[ve("div",{className:"flex justify-between gap-4",children:[ve("div",{children:[z("div",{children:"Session"}),z("div",{className:"font-mono text-white",children:l?"Enabled":"Set up"})]}),l?z(g,{variant:e?"primary":"secondary",className:"flex-shrink-0 text-sm p-1 w-28",disabled:!0,children:"Disable"}):z(g,{variant:e?"primary":"secondary",className:"flex-shrink-0 text-sm p-1 w-28",pending:!s.data||o.status==="pending",onClick:s.data?async()=>{await o.mutateAsync({userClient:n,appAccountAddress:s.data.account.address,registerSpender:r,registerDelegation:a}),i()}:void 0,children:"Enable"})]}),t?z("p",{className:"text-sm",children:"You can perform actions in this app without interruptions for approvals."}):null]})}import{jsx as Ce}from"react/jsx-runtime";function ne(e){let t=e?.account.address,n=$(t),r=S(t),i=it(t,r.data?.account.address).data===!0,o=st(t,r.data?.account.address).data===!0;return Jr(()=>t?[{id:"wallet",label:"Sign in",isComplete:!0,content:l=>Ce(ct,{...l,userAddress:t})},{id:"allowance",label:"Top up",isComplete:(n.data?.allowance??0n)>=Y,content:l=>Ce(mt,{...l,userAddress:t})},{id:"session",label:"Set up account",isComplete:i&&o,content:l=>Ce(gt,{...l,userClient:e,registerSpender:!i,registerDelegation:!o})}]:[{id:"wallet",label:"Sign in",isComplete:!1,content:()=>null}],[n.data?.allowance,o,i,t,e])}import{twMerge as ke}from"tailwind-merge";import{jsx as Ae}from"react/jsx-runtime";function ht({userClient:e}){let t=ne(e),[n]=Zr(null),r=t.find(o=>o.content!=null&&!o.isComplete),a=t.filter(o=>o.isComplete),i=(n!=null?t.find(o=>o.id===n):null)??r??(a.length<t.length?a.at(-1):null),s=i?t.indexOf(i):-1;return Ae("div",{className:ke("min-h-[26rem] px-8 flex flex-col divide-y divide-neutral-800","animate-in animate-duration-300 fade-in slide-in-from-bottom-8"),children:t.map((o,l)=>{let c=o===i,d=c||a.length===t.length,p=!o.isComplete&&s!==-1&&l>s;return Ae("div",{className:ke("py-8 flex flex-col justify-center",c?"flex-grow":null),children:Ae("div",{className:ke("flex flex-col",p?"opacity-30 pointer-events-none":null),children:o.content({isActive:c,isExpanded:d})})},o.id)})})}import{jsx as wt}from"react/jsx-runtime";function bt(){let{chainId:e}=u(),t=ea({chainId:e});return t.status!=="success"?wt(nt,{}):wt(ht,{userClient:t.data})}import{useState as oa}from"react";import{ErrorBoundary as ia}from"react-error-boundary";import{twMerge as ta}from"tailwind-merge";import{BaseError as na,UserRejectedRequestError as ra}from"viem";import{jsx as xt,jsxs as aa}from"react/jsx-runtime";function vt({title:e,error:t}){if(!t||t instanceof na&&t.walk(a=>a instanceof ra)!=null)return null;let n=e??"Error",r=typeof t=="string"?t:t instanceof Error?String(t):"Something unexpected happened.";return aa("div",{className:ta("text-sm border-l-4 border-red-500","bg-red-100 text-red-900","dark:bg-red-900 dark:text-red-50"),children:[xt("div",{className:"p-3 font-semibold",children:n}),xt("div",{className:"px-3 whitespace-break-spaces break-all max-h-32 overflow-y-scroll",children:r})]})}import{wait as sa}from"@latticexyz/common/utils";import{twMerge as ca}from"tailwind-merge";import{useIsMounted as da}from"usehooks-ts";import{jsx as re,jsxs as Ct}from"react/jsx-runtime";function kt({children:e}){let t=da(),[n,r]=oa(1);return re(ia,{fallbackRender:({error:a,resetErrorBoundary:i})=>Ct("div",{className:ca("flex-grow flex flex-col justify-center p-5 gap-2"),children:[re(vt,{error:a instanceof Error?a.stack??a.message:a}),n>0?Ct("button",{type:"button",onClick:async s=>{s.currentTarget.ariaBusy="true",await sa(1e3),i(),t()&&(r(o=>o-1),s.currentTarget.ariaBusy=null)},className:"group aria-busy:pointer-events-none self-end flex items-center gap-1",children:[re(x,{className:"transition opacity-0 group-aria-busy:opacity-100 text-xs text-neutral-500 dark:text-neutral-400"}),re("span",{className:"text-sm text-neutral-500 dark:text-neutral-400 group-hover:text-black dark:group-hover:text-white",children:"Retry?"})]}):null]}),children:e})}import{DialogClose as ua,DialogTitle as ma}from"@radix-ui/react-dialog";import{twMerge as la}from"tailwind-merge";import{jsx as pa}from"react/jsx-runtime";function At({className:e,children:t,...n}){return pa("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:la("-my-[0.125em] h-[1.25em] w-[1.25em]",e),...n,children:t})}import{jsx as St}from"react/jsx-runtime";function Pt(e){return St(At,{strokeWidth:"2",stroke:"currentColor",...e,children:St("path",{d:"M6 18L18 6M6 6L18 18",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{jsx as w,jsxs as Se}from"react/jsx-runtime";function It(){let{accountModalOpen:e,toggleAccountModal:t}=y();return Se(Be,{open:e,onOpenChange:t,children:[w(ma,{className:"sr-only",children:"Connect with EntryKit"}),e?Se("div",{className:Mt("relative py-2 ring-1","bg-neutral-900 text-neutral-400 ring-neutral-700/50 divide-neutral-700","links:font-medium links:underline links:underline-offset-4","links:text-white","links:decoration-neutral-500 hover:links:decoration-orange-500"),children:[w(kt,{children:w(bt,{})}),Se("a",{href:"https://mud.dev",target:"_blank",rel:"noreferrer noopener",className:"group self-center p-3 flex items-center justify-center gap-2 links-unset text-sm font-mono transition text-neutral-400 hover:text-white",children:[w("span",{className:"block w-4 h-4",children:w(v,{className:"w-full h-full text-orange-500 group-hover:rotate-90 transition duration-300"})}),w("span",{children:"Powered by MUD"})]}),w("div",{className:"absolute top-0 right-0",children:w(ua,{className:Mt("pointer-events-auto leading-none p-2 transition","text-neutral-700 hover:text-neutral-500"),title:"Close",children:w(Pt,{className:"m-0"})})})]}):null]})}import{jsx as ya,jsxs as ga}from"react/jsx-runtime";function fa({config:e,children:t}){return ga(Oe,{config:e,children:[t,ya(It,{})]})}import{useAccount as xa}from"wagmi";import{twMerge as C}from"tailwind-merge";import{twMerge as Ht}from"tailwind-merge";import{Fragment as ha,jsx as ae,jsxs as Nt}from"react/jsx-runtime";function Et({address:e}){let{data:t}=J(e),{isSuccess:n}=q(t.avatar);return Nt(ha,{children:[Nt("span",{className:"flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center",children:[ae("img",{src:n?t.avatar:void 0,className:Ht("col-start-1 row-start-1","inline-flex w-full h-full rounded-full bg-black/10 dark:bg-white/10 bg-cover bg-no-repeat bg-center",n?"opacity-100":"opacity-0")}),ae(v,{className:Ht("col-start-1 row-start-1 text-orange-500","transition duration-300",n?"opacity-0":"opacity-100")})]}),ae("span",{className:"flex-grow",children:t.name??(e?ae(Z,{hex:e}):null)})]})}import{useMemo as wa}from"react";import{useConnectorClient as ba}from"wagmi";function Pe(){let{chainId:e}=u(),{data:t,error:n}=ba({chainId:e});n&&console.error("Error retrieving user client",n);let r=S(t?.account.address),a=ne(t);return wa(()=>{if(a.every(i=>i.isComplete))return r.data},[r.data,a])}import{jsx as b,jsxs as Rt}from"react/jsx-runtime";var Tt=C("w-48 inline-flex outline-none transition","border border-transparent","text-base leading-none"),va=C("bg-neutral-100 border-neutral-300 text-black","dark:bg-neutral-800 dark:border-neutral-700 dark:text-white"),Ca=C("cursor-pointer outline-none hover:bg-neutral-200 data-[highlighted]:bg-neutral-200 dark:hover:bg-neutral-700");function ka(){let{openAccountModal:e,accountModalOpen:t}=y(),{status:n,address:r}=xa();return Pe(),b(K,{mode:"child",children:n==="connected"||n==="reconnecting"&&r?b("button",{type:"button",className:C(Tt,va,Ca,"p-3"),onClick:e,children:b("span",{className:"flex-grow inline-flex gap-2.5 items-center text-left font-medium",children:b(Et,{address:r})})},"connected"):Rt("button",{type:"button",className:C(Tt,"group","items-center justify-center gap-2.5 p-3","bg-orange-500 text-white font-medium","hover:bg-orange-400","active:bg-orange-600"),"aria-busy":t,onClick:e,children:[Rt("span",{className:"pointer-events-none inline-grid place-items-center -ml-3",children:[b("span",{className:C("col-start-1 row-start-1 leading-none","scale-100 opacity-100 transition duration-300","group-aria-busy:scale-125 group-aria-busy:opacity-0"),children:b(v,{})}),b("span",{"aria-hidden":!0,className:C("col-start-1 row-start-1","scale-50 opacity-0 transition duration-300 delay-50","group-aria-busy:scale-100 group-aria-busy:opacity-100"),children:b(x,{})})]}),b("span",{className:"font-medium",children:"Sign in"})]},"sign in")})}import{connectorsForWallets as Sa,getDefaultWallets as Pa}from"@rainbow-me/rainbowkit";import{createConfig as Ma}from"wagmi";var Aa=`data:image/svg+xml;base64,${btoa('<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" width="512" height="512" viewBox="-64 -32 608 512"><path d="M6.206 425.469A6.202 6.202 0 010 419.263c0-1.771.235-3.517.663-5.245 9.95-78.847 57.22-96.006 100.964-107.256 21.008-5.412 62.901-26.489 57.822-53.668-10.596-9.819-21.113-23.39-22.946-43.63l-1.274.026c-2.932-.044-5.778-.716-8.422-2.217-5.848-3.325-9.051-9.697-10.596-16.958-3.238-22.186-4.058-33.515 7.768-38.464l.096-.035c-1.467-27.37 3.159-67.64-24.944-76.141C154.622 7.1 218.597-30.203 266.627 30.805c53.519 2.801 77.389 78.611 44.154 121.046h-1.405c11.826 4.949 10.045 17.674 7.767 38.464-1.544 7.261-4.747 13.633-10.595 16.958-2.645 1.501-5.481 2.173-8.422 2.217l-1.275-.026c-1.833 20.24-12.376 33.811-22.972 43.63-4.459 23.871 27.275 43.011 49.33 50.997a139.442 139.442 0 004.268 5.525c-7.2 9.941-8.771 22.797-4.564 34.038-17.002 8.763-24.255 29.334-16.479 46.86-11.966 7.55-18.258 21.305-16.609 34.955H6.206zm419.058-105.362a86.778 86.778 0 0019.446-1.641c29.36-5.822 53.152-27.467 62.657-55.823 3.596-10.544 5.071-21.663 4.521-33.341-1.179-23.46-12.193-46.633-29.631-62.369-17.107-15.361-38.342-23.574-61.383-23.042-22.841.507-45.359 11.216-60.187 28.593-14.977 17.551-22.003 39.144-20.921 62.133.585 11.661 3.482 23.016 8.737 34.074 7.741 16.303 19.934 29.735 35.391 39.048l-22.457 20.711 13.232 27.86-29.413 13.973 13.991 29.456-26.769 12.717 16.81 35.374 35.601-16.915 40.375-110.808zm15.239-129.364c13.685 4.869 20.824 19.908 15.954 33.593-4.87 13.685-19.908 20.833-33.593 15.963-13.685-4.87-20.834-19.917-15.963-33.602 4.87-13.685 19.917-20.825 33.602-15.954z"/></svg>')}`,oe=e=>()=>({id:"passkey",name:"Passkey",iconUrl:Aa,iconBackground:"#fec",createConnector:t=>n=>({...A(e)(n),...t})});function Ia(e){let{wallets:t}=Pa(),n=[{groupName:"Recommended",wallets:[oe({chainId:e.chainId,bundlerTransport:e.bundlerTransport,paymasterAddress:e.paymasterAddress})]},...t],r=Sa(n,{appName:e.appInfo.name,projectId:e.walletConnectProjectId});return Ma({connectors:r,chains:e.chains,transports:e.transports})}function Xl(e){return e!=null&&"__isCoinbaseSmartAccount"in e&&e.__isCoinbaseSmartAccount===!0}var jl=new Set([17420,31337]);function Jl(e){return t=>{let{request:n,...r}=e(t),a=null,i=new Map;return{...r,async request(s){if(s.method==="eth_chainId")return a??(a=await n(s));if(s.method==="eth_getTransactionReceipt"){let o=s.params[0],l=i.get(o)??await n(s);return i.has(o)||i.set(o,l),l}if(s.method==="eth_sendUserOperation"){let o=await n({...s,method:"wiresaw_sendUserOperation"});return i.set(o.userOpHash,{success:!0,userOpHash:o.userOpHash,receipt:{transactionHash:o.txHash}}),o.userOpHash}if(s.method==="eth_getUserOperationReceipt"){let o=s.params[0],l=i.get(o)??await n(s);return i.has(o)||i.set(o,l),l}return n(s)}}}}import{connectorsForWallets as Na}from"@rainbow-me/rainbowkit";import{getDefaultWallets as Ha}from"@rainbow-me/rainbowkit";function Ot(e){let{wallets:t}=Ha();return[{groupName:"Recommended",wallets:[oe({chainId:e.chainId,bundlerTransport:e.bundlerTransport,paymasterAddress:e.paymasterAddress})]},...t]}function sp({wallets:e,...t}){return Na(e??Ot(t),{appName:t.appInfo?.name??document.title,projectId:t.walletConnectProjectId})}export{ka as AccountButton,fa as EntryKitProvider,W as abi,Ia as createWagmiConfig,sp as getConnectors,Ot as getWallets,Xl as isCoinbaseSmartAccount,A as passkeyConnector,oe as passkeyWallet,F as sign,U as toCoinbaseSmartAccount,le as toReplaySafeHash,An as toWebAuthnSignature,y as useAccountModal,Pe as useAppAccountClient,u as useEntryKitConfig,Jl as wiresaw,jl as wiresawChainIds,N as wrapSignature};
1433
- //# sourceMappingURL=internal.js.map