@latticexyz/entrykit 2.2.22-66b053c8bc9cfa25c1b60d00dd208a5b2cd9d9f7 → 2.2.22-689708688d9215c3441ffeac029236023d05c25f

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.
@@ -22,7 +22,7 @@ import { forwardRef, useEffect, useRef, useState } from "react";
22
22
  import ReactDOM from "react-dom";
23
23
 
24
24
  // ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/tailwind.css?inline
25
- var tailwind_default = '*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. 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)\n2. 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)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type=\'button\']),\ninput:where([type=\'reset\']),\ninput:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n\n.grid-cols-2.divide-y > :not([hidden]) ~ :not([hidden]):nth-child(-n + 2) {\n border-top-width: 0;\n border-bottom-width: 0;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0px;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.col-start-1 {\n grid-column-start: 1;\n}\n\n.row-start-1 {\n grid-row-start: 1;\n}\n\n.m-0 {\n margin: 0px;\n}\n\n.m-2 {\n margin: 0.5rem;\n}\n\n.-mx-0\\.5 {\n margin-left: -0.125rem;\n margin-right: -0.125rem;\n}\n\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n\n.-my-\\[0\\.125em\\] {\n margin-top: -0.125em;\n margin-bottom: -0.125em;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-3 {\n margin-left: -0.75rem;\n}\n\n.-mr-1 {\n margin-right: -0.25rem;\n}\n\n.-mt-2 {\n margin-top: -0.5rem;\n}\n\n.mt-1 {\n margin-top: 0.25rem;\n}\n\n.mt-4 {\n margin-top: 1rem;\n}\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.inline-grid {\n display: inline-grid;\n}\n\n.contents {\n display: contents;\n}\n\n.hidden {\n display: none;\n}\n\n.aspect-square {\n aspect-ratio: 1 / 1;\n}\n\n.h-10 {\n height: 2.5rem;\n}\n\n.h-12 {\n height: 3rem;\n}\n\n.h-16 {\n height: 4rem;\n}\n\n.h-3\\.5 {\n height: 0.875rem;\n}\n\n.h-4 {\n height: 1rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-64 {\n height: 16rem;\n}\n\n.h-\\[1\\.25em\\] {\n height: 1.25em;\n}\n\n.h-\\[1em\\] {\n height: 1em;\n}\n\n.h-\\[2px\\] {\n height: 2px;\n}\n\n.h-full {\n height: 100%;\n}\n\n.max-h-full {\n max-height: 100%;\n}\n\n.w-10 {\n width: 2.5rem;\n}\n\n.w-16 {\n width: 4rem;\n}\n\n.w-24 {\n width: 6rem;\n}\n\n.w-28 {\n width: 7rem;\n}\n\n.w-3\\.5 {\n width: 0.875rem;\n}\n\n.w-4 {\n width: 1rem;\n}\n\n.w-48 {\n width: 12rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-\\[0\\.6em\\] {\n width: 0.6em;\n}\n\n.w-\\[1\\.25em\\] {\n width: 1.25em;\n}\n\n.w-\\[352px\\] {\n width: 352px;\n}\n\n.w-full {\n width: 100%;\n}\n\n.max-w-\\[26rem\\] {\n max-width: 26rem;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.-translate-y-2 {\n --tw-translate-y: -0.5rem;\n 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));\n}\n\n.-translate-y-4 {\n --tw-translate-y: -1rem;\n 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));\n}\n\n.translate-x-2 {\n --tw-translate-x: 0.5rem;\n 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));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n 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));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.scale-50 {\n --tw-scale-x: .5;\n --tw-scale-y: .5;\n 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));\n}\n\n.transform {\n 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));\n}\n\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-text {\n cursor: text;\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.grid-cols-\\[1fr_auto_1fr\\] {\n grid-template-columns: 1fr auto 1fr;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.place-items-center {\n place-items: center;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-1 {\n gap: 0.25rem;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.gap-2\\.5 {\n gap: 0.625rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-6 {\n gap: 1.5rem;\n}\n\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n\n.divide-neutral-200 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(229 229 229 / var(--tw-divide-opacity));\n}\n\n.divide-neutral-300 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-divide-opacity));\n}\n\n.divide-neutral-800 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(38 38 38 / var(--tw-divide-opacity));\n}\n\n.self-auto {\n align-self: auto;\n}\n\n.self-center {\n align-self: center;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-clip {\n overflow: clip;\n}\n\n.whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-4 {\n border-width: 4px;\n}\n\n.border-dashed {\n border-style: dashed;\n}\n\n.border-black\\/20 {\n border-color: rgb(0 0 0 / 0.2);\n}\n\n.border-neutral-300 {\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n\n.bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700\\/60 {\n background-color: rgb(29 78 216 / 0.6);\n}\n\n.bg-green-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(34 197 94 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800\\/85 {\n background-color: rgb(38 38 38 / 0.85);\n}\n\n.bg-neutral-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-orange-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 115 22 / var(--tw-bg-opacity));\n}\n\n.bg-orange-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: transparent;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n\n.from-transparent {\n --tw-gradient-from: transparent var(--tw-gradient-from-position);\n --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n}\n\n.to-blue-700 {\n --tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position);\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.bg-center {\n background-position: center;\n}\n\n.bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-1 {\n padding: 0.25rem;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-2\\.5 {\n padding: 0.625rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.p-6 {\n padding: 1.5rem;\n}\n\n.p-\\[\\.75em\\] {\n padding: .75em;\n}\n\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-8 {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.pt-10 {\n padding-top: 2.5rem;\n}\n\n.pt-8 {\n padding-top: 2rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n}\n\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n\n.text-\\[\\.75em\\] {\n font-size: .75em;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.leading-loose {\n line-height: 2;\n}\n\n.leading-none {\n line-height: 1;\n}\n\n.tracking-\\[-1ch\\] {\n letter-spacing: -1ch;\n}\n\n.text-amber-500 {\n --tw-text-opacity: 1;\n color: rgb(245 158 11 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity));\n}\n\n.text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.text-neutral-500 {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.text-neutral-700 {\n --tw-text-opacity: 1;\n color: rgb(64 64 64 / var(--tw-text-opacity));\n}\n\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity));\n}\n\n.text-transparent {\n color: transparent;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/20 {\n color: rgb(255 255 255 / 0.2);\n}\n\n.text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-25 {\n opacity: 0.25;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-50 {\n opacity: 0.5;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-neutral-700\\/50 {\n --tw-ring-color: rgb(64 64 64 / 0.5);\n}\n\n.ring-transparent {\n --tw-ring-color: transparent;\n}\n\n.filter {\n 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);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n.ease-linear {\n transition-timing-function: linear;\n}\n\n@keyframes enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n 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));\n }\n}\n\n@keyframes exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n 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));\n }\n}\n\n.animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n\n.animate-out {\n animation-name: exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n}\n\n.fade-in {\n --tw-enter-opacity: 0;\n}\n\n.fade-out {\n --tw-exit-opacity: 0;\n}\n\n.slide-in-from-bottom-16 {\n --tw-enter-translate-y: 4rem;\n}\n\n.slide-in-from-bottom-2 {\n --tw-enter-translate-y: 0.5rem;\n}\n\n.slide-in-from-bottom-8 {\n --tw-enter-translate-y: 2rem;\n}\n\n.slide-in-from-top-2 {\n --tw-enter-translate-y: -0.5rem;\n}\n\n.animate-duration-300 {\n animation-duration: 300ms;\n}\n\n.ease-linear {\n animation-timing-function: linear;\n}\n\n@property --tw-border-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@property --tw-conic-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@keyframes border-gradient {\n\n to {\n --tw-border-gradient-angle: 360deg;\n }\n}\n\n.placeholder\\:text-neutral-400::placeholder {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.after\\:select-none::after {\n content: var(--tw-content);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.after\\:content-\\[\\\'\\2026\\\'\\]::after {\n --tw-content: \'\u2026\';\n content: var(--tw-content);\n}\n\n.focus-within\\:border-transparent:focus-within {\n border-color: transparent;\n}\n\n.focus-within\\:ring-orange-500:focus-within {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity));\n}\n\n.hover\\:bg-blue-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-neutral-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-orange-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n\n.hover\\:text-black:hover {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white\\/40:hover {\n color: rgb(255 255 255 / 0.4);\n}\n\n.hover\\:text-white\\/80:hover {\n color: rgb(255 255 255 / 0.8);\n}\n\n.hover\\:brightness-125:hover {\n --tw-brightness: brightness(1.25);\n 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);\n}\n\n.focus\\:border-orange-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(249 115 22 / var(--tw-border-opacity));\n}\n\n.focus\\:border-yellow-400:focus {\n --tw-border-opacity: 1;\n border-color: rgb(250 204 21 / var(--tw-border-opacity));\n}\n\n.focus\\:bg-white:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.active\\:bg-orange-600:active {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.active\\:brightness-150:active {\n --tw-brightness: brightness(1.5);\n 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);\n}\n\n.group:hover .group-hover\\:pointer-events-none {\n pointer-events: none;\n}\n\n.group:hover .group-hover\\:pointer-events-auto {\n pointer-events: auto;\n}\n\n.group:hover .group-hover\\:rotate-90 {\n --tw-rotate: 90deg;\n 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));\n}\n\n.group:hover .group-hover\\:opacity-0 {\n opacity: 0;\n}\n\n.group:hover .group-hover\\:opacity-100 {\n opacity: 1;\n}\n\n.peer:placeholder-shown ~ .peer-placeholder-shown\\:text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.aria-busy\\:pointer-events-none[aria-busy="true"] {\n pointer-events: none;\n}\n\n.aria-busy\\:bg-blue-500[aria-busy="true"] {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.aria-disabled\\:pointer-events-none[aria-disabled="true"] {\n pointer-events: none;\n}\n\n.aria-disabled\\:opacity-50[aria-disabled="true"] {\n opacity: 0.5;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:inline {\n display: inline;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:hidden {\n display: none;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:translate-x-0 {\n --tw-translate-x: 0px;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-125 {\n --tw-scale-x: 1.25;\n --tw-scale-y: 1.25;\n 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));\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:opacity-100 {\n opacity: 1;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-0 {\n opacity: 0;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-100 {\n opacity: 1;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:duration-300 {\n transition-duration: 300ms;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:inline {\n display: inline;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:hidden {\n display: none;\n}\n\n.data-\\[highlighted\\]\\:bg-neutral-200[data-highlighted] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.data-\\[state\\=checked\\]\\:bg-neutral-200[data-state="checked"] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.links\\:font-medium a[href]:not(.links-unset) {\n font-weight: 500;\n}\n\n.links\\:text-white a[href]:not(.links-unset) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.links\\:underline a[href]:not(.links-unset) {\n text-decoration-line: underline;\n}\n\n.links\\:decoration-neutral-500 a[href]:not(.links-unset) {\n text-decoration-color: #737373;\n}\n\n.links\\:underline-offset-4 a[href]:not(.links-unset) {\n text-underline-offset: 4px;\n}\n\n.hover\\:links\\:decoration-orange-500 a[href]:not(.links-unset):hover {\n text-decoration-color: #f97316;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:items-center {\n align-items: center;\n }\n}\n\n.dark\\:divide-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-divide-opacity));\n}\n\n.dark\\:border-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.dark\\:border-white\\/50:where([data-theme="dark"], [data-theme="dark"] *) {\n border-color: rgb(255 255 255 / 0.5);\n}\n\n.dark\\:bg-blue-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-green-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(22 163 74 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-neutral-800:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-neutral-900:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-red-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-white\\/10:where([data-theme="dark"], [data-theme="dark"] *) {\n background-color: rgb(255 255 255 / 0.1);\n}\n\n.dark\\:text-neutral-300:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.dark\\:text-neutral-400:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.dark\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:placeholder\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *)::placeholder {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:hover\\:bg-neutral-700:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.dark\\:hover\\:text-white:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:focus\\:bg-neutral-700:focus:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.peer:placeholder-shown ~ .dark\\:peer-placeholder-shown\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:data-\\[state\\=checked\\]\\:bg-neutral-900[data-state="checked"]:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.\\[\\&_\\>_\\:is\\(dt\\2c dd\\)\\]\\:px-1 > :is(dt,dd) {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.\\[\\&_\\>_dd\\]\\:text-right > dd {\n text-align: right;\n}\n';
25
+ var tailwind_default = '*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. 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)\n2. 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)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type=\'button\']),\ninput:where([type=\'reset\']),\ninput:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n\n.grid-cols-2.divide-y > :not([hidden]) ~ :not([hidden]):nth-child(-n + 2) {\n border-top-width: 0;\n border-bottom-width: 0;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0px;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.col-start-1 {\n grid-column-start: 1;\n}\n\n.row-start-1 {\n grid-row-start: 1;\n}\n\n.m-0 {\n margin: 0px;\n}\n\n.m-2 {\n margin: 0.5rem;\n}\n\n.-mx-0\\.5 {\n margin-left: -0.125rem;\n margin-right: -0.125rem;\n}\n\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n\n.-my-\\[0\\.125em\\] {\n margin-top: -0.125em;\n margin-bottom: -0.125em;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-3 {\n margin-left: -0.75rem;\n}\n\n.-mr-1 {\n margin-right: -0.25rem;\n}\n\n.-mt-2 {\n margin-top: -0.5rem;\n}\n\n.mt-1 {\n margin-top: 0.25rem;\n}\n\n.mt-4 {\n margin-top: 1rem;\n}\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.inline-grid {\n display: inline-grid;\n}\n\n.contents {\n display: contents;\n}\n\n.hidden {\n display: none;\n}\n\n.aspect-square {\n aspect-ratio: 1 / 1;\n}\n\n.h-10 {\n height: 2.5rem;\n}\n\n.h-12 {\n height: 3rem;\n}\n\n.h-16 {\n height: 4rem;\n}\n\n.h-3 {\n height: 0.75rem;\n}\n\n.h-3\\.5 {\n height: 0.875rem;\n}\n\n.h-4 {\n height: 1rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-64 {\n height: 16rem;\n}\n\n.h-\\[1\\.25em\\] {\n height: 1.25em;\n}\n\n.h-\\[1em\\] {\n height: 1em;\n}\n\n.h-\\[2px\\] {\n height: 2px;\n}\n\n.h-full {\n height: 100%;\n}\n\n.max-h-\\[230px\\] {\n max-height: 230px;\n}\n\n.max-h-full {\n max-height: 100%;\n}\n\n.w-10 {\n width: 2.5rem;\n}\n\n.w-16 {\n width: 4rem;\n}\n\n.w-24 {\n width: 6rem;\n}\n\n.w-28 {\n width: 7rem;\n}\n\n.w-3 {\n width: 0.75rem;\n}\n\n.w-3\\.5 {\n width: 0.875rem;\n}\n\n.w-4 {\n width: 1rem;\n}\n\n.w-48 {\n width: 12rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-\\[0\\.6em\\] {\n width: 0.6em;\n}\n\n.w-\\[1\\.25em\\] {\n width: 1.25em;\n}\n\n.w-\\[352px\\] {\n width: 352px;\n}\n\n.w-full {\n width: 100%;\n}\n\n.max-w-\\[26rem\\] {\n max-width: 26rem;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.-translate-y-2 {\n --tw-translate-y: -0.5rem;\n 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));\n}\n\n.-translate-y-4 {\n --tw-translate-y: -1rem;\n 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));\n}\n\n.translate-x-2 {\n --tw-translate-x: 0.5rem;\n 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));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n 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));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.scale-50 {\n --tw-scale-x: .5;\n --tw-scale-y: .5;\n 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));\n}\n\n.transform {\n 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));\n}\n\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-text {\n cursor: text;\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.grid-cols-\\[1fr_auto_1fr\\] {\n grid-template-columns: 1fr auto 1fr;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.place-items-center {\n place-items: center;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-1 {\n gap: 0.25rem;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.gap-2\\.5 {\n gap: 0.625rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-6 {\n gap: 1.5rem;\n}\n\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n\n.divide-neutral-700 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-divide-opacity));\n}\n\n.divide-neutral-800 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(38 38 38 / var(--tw-divide-opacity));\n}\n\n.self-auto {\n align-self: auto;\n}\n\n.self-center {\n align-self: center;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-clip {\n overflow: clip;\n}\n\n.overflow-y-auto {\n overflow-y: auto;\n}\n\n.whitespace-nowrap {\n white-space: nowrap;\n}\n\n.whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-4 {\n border-width: 4px;\n}\n\n.border-dashed {\n border-style: dashed;\n}\n\n.border-neutral-300 {\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n\n.border-neutral-700 {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.border-white\\/50 {\n border-color: rgb(255 255 255 / 0.5);\n}\n\n.bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700\\/60 {\n background-color: rgb(29 78 216 / 0.6);\n}\n\n.bg-green-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(22 163 74 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800\\/85 {\n background-color: rgb(38 38 38 / 0.85);\n}\n\n.bg-neutral-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-orange-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 115 22 / var(--tw-bg-opacity));\n}\n\n.bg-orange-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: transparent;\n}\n\n.bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n\n.from-transparent {\n --tw-gradient-from: transparent var(--tw-gradient-from-position);\n --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n}\n\n.to-blue-700 {\n --tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position);\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.bg-center {\n background-position: center;\n}\n\n.bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-1 {\n padding: 0.25rem;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-2\\.5 {\n padding: 0.625rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.p-6 {\n padding: 1.5rem;\n}\n\n.p-\\[\\.75em\\] {\n padding: .75em;\n}\n\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-8 {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.pt-10 {\n padding-top: 2.5rem;\n}\n\n.pt-8 {\n padding-top: 2rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n}\n\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n\n.text-\\[\\.75em\\] {\n font-size: .75em;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.leading-loose {\n line-height: 2;\n}\n\n.leading-none {\n line-height: 1;\n}\n\n.tracking-\\[-1ch\\] {\n letter-spacing: -1ch;\n}\n\n.text-amber-500 {\n --tw-text-opacity: 1;\n color: rgb(245 158 11 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity));\n}\n\n.text-neutral-300 {\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.text-neutral-500 {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity));\n}\n\n.text-transparent {\n color: transparent;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/20 {\n color: rgb(255 255 255 / 0.2);\n}\n\n.text-white\\/50 {\n color: rgb(255 255 255 / 0.5);\n}\n\n.text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.decoration-neutral-500 {\n text-decoration-color: #737373;\n}\n\n.underline-offset-4 {\n text-underline-offset: 4px;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-25 {\n opacity: 0.25;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-50 {\n opacity: 0.5;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-neutral-700\\/50 {\n --tw-ring-color: rgb(64 64 64 / 0.5);\n}\n\n.ring-transparent {\n --tw-ring-color: transparent;\n}\n\n.filter {\n 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);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n.ease-linear {\n transition-timing-function: linear;\n}\n\n@keyframes enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n 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));\n }\n}\n\n@keyframes exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n 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));\n }\n}\n\n.animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n\n.animate-out {\n animation-name: exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n}\n\n.fade-in {\n --tw-enter-opacity: 0;\n}\n\n.fade-out {\n --tw-exit-opacity: 0;\n}\n\n.slide-in-from-bottom-16 {\n --tw-enter-translate-y: 4rem;\n}\n\n.slide-in-from-bottom-2 {\n --tw-enter-translate-y: 0.5rem;\n}\n\n.slide-in-from-bottom-8 {\n --tw-enter-translate-y: 2rem;\n}\n\n.slide-in-from-top-2 {\n --tw-enter-translate-y: -0.5rem;\n}\n\n.animate-duration-300 {\n animation-duration: 300ms;\n}\n\n.ease-linear {\n animation-timing-function: linear;\n}\n\n@property --tw-border-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@property --tw-conic-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@keyframes border-gradient {\n\n to {\n --tw-border-gradient-angle: 360deg;\n }\n}\n\n.placeholder\\:text-neutral-500::placeholder {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.after\\:select-none::after {\n content: var(--tw-content);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.after\\:content-\\[\\\'\\2026\\\'\\]::after {\n --tw-content: \'\u2026\';\n content: var(--tw-content);\n}\n\n.focus-within\\:border-transparent:focus-within {\n border-color: transparent;\n}\n\n.focus-within\\:ring-orange-500:focus-within {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity));\n}\n\n.hover\\:bg-blue-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-neutral-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-orange-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white\\/40:hover {\n color: rgb(255 255 255 / 0.4);\n}\n\n.hover\\:text-white\\/80:hover {\n color: rgb(255 255 255 / 0.8);\n}\n\n.hover\\:decoration-orange-500:hover {\n text-decoration-color: #f97316;\n}\n\n.hover\\:brightness-125:hover {\n --tw-brightness: brightness(1.25);\n 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);\n}\n\n.focus\\:border-orange-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(249 115 22 / var(--tw-border-opacity));\n}\n\n.focus\\:border-yellow-400:focus {\n --tw-border-opacity: 1;\n border-color: rgb(250 204 21 / var(--tw-border-opacity));\n}\n\n.focus\\:bg-neutral-700:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.active\\:bg-orange-600:active {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.active\\:brightness-150:active {\n --tw-brightness: brightness(1.5);\n 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);\n}\n\n.group:hover .group-hover\\:pointer-events-none {\n pointer-events: none;\n}\n\n.group:hover .group-hover\\:pointer-events-auto {\n pointer-events: auto;\n}\n\n.group:hover .group-hover\\:inline-block {\n display: inline-block;\n}\n\n.group:hover .group-hover\\:hidden {\n display: none;\n}\n\n.group:hover .group-hover\\:rotate-90 {\n --tw-rotate: 90deg;\n 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));\n}\n\n.group:hover .group-hover\\:opacity-0 {\n opacity: 0;\n}\n\n.group:hover .group-hover\\:opacity-100 {\n opacity: 1;\n}\n\n.peer:placeholder-shown ~ .peer-placeholder-shown\\:text-neutral-500 {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.aria-busy\\:pointer-events-none[aria-busy="true"] {\n pointer-events: none;\n}\n\n.aria-busy\\:bg-blue-500[aria-busy="true"] {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.aria-disabled\\:pointer-events-none[aria-disabled="true"] {\n pointer-events: none;\n}\n\n.aria-disabled\\:opacity-50[aria-disabled="true"] {\n opacity: 0.5;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:inline {\n display: inline;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:hidden {\n display: none;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:translate-x-0 {\n --tw-translate-x: 0px;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-125 {\n --tw-scale-x: 1.25;\n --tw-scale-y: 1.25;\n 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));\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:opacity-100 {\n opacity: 1;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-0 {\n opacity: 0;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-100 {\n opacity: 1;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:duration-300 {\n transition-duration: 300ms;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:inline {\n display: inline;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:hidden {\n display: none;\n}\n\n.data-\\[highlighted\\]\\:bg-neutral-200[data-highlighted] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.data-\\[state\\=checked\\]\\:bg-neutral-900[data-state="checked"] {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.links\\:font-medium a[href]:not(.links-unset) {\n font-weight: 500;\n}\n\n.links\\:text-white a[href]:not(.links-unset) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.links\\:underline a[href]:not(.links-unset) {\n text-decoration-line: underline;\n}\n\n.links\\:decoration-neutral-500 a[href]:not(.links-unset) {\n text-decoration-color: #737373;\n}\n\n.links\\:underline-offset-4 a[href]:not(.links-unset) {\n text-underline-offset: 4px;\n}\n\n.hover\\:links\\:decoration-orange-500 a[href]:not(.links-unset):hover {\n text-decoration-color: #f97316;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:items-center {\n align-items: center;\n }\n}\n\n.dark\\:border-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.dark\\:bg-neutral-800:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-white\\/10:where([data-theme="dark"], [data-theme="dark"] *) {\n background-color: rgb(255 255 255 / 0.1);\n}\n\n.dark\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:hover\\:bg-neutral-700:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.\\[\\&_\\>_\\:is\\(dt\\2c dd\\)\\]\\:px-1 > :is(dt,dd) {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.\\[\\&_\\>_dd\\]\\:text-right > dd {\n text-align: right;\n}\n';
26
26
 
27
27
  // src/ui/Shadow.tsx
28
28
  import { useResizeObserver } from "usehooks-ts";
@@ -47,9 +47,7 @@ function useFrame() {
47
47
  import { useMediaQuery } from "usehooks-ts";
48
48
 
49
49
  // src/EntryKitConfigProvider.tsx
50
- import "@rainbow-me/rainbowkit/styles.css";
51
50
  import { createContext as createContext2, useContext as useContext2 } from "react";
52
- import { RainbowKitProvider, midnightTheme } from "@rainbow-me/rainbowkit";
53
51
  import { useChains } from "wagmi";
54
52
 
55
53
  // src/getBundlerTransport.ts
@@ -141,8 +139,11 @@ var debug2 = debug.extend("quarry");
141
139
 
142
140
  // src/quarry/transports/userOpExecutor.ts
143
141
  import { setBalance } from "viem/actions";
144
- function userOpExecutor({ executor }) {
145
- return () => {
142
+ function userOpExecutor({
143
+ executor,
144
+ fallbackDefaultTransport
145
+ }) {
146
+ return (opts) => {
146
147
  debug2("using a local user op executor", executor.account.address);
147
148
  if (executor.chain.id === 31337) {
148
149
  debug2("setting executor balance");
@@ -177,7 +178,9 @@ function userOpExecutor({ executor }) {
177
178
  if (method === "eth_estimateUserOperationGas") {
178
179
  return await estimateUserOperationGas(params);
179
180
  }
180
- throw new Error(`userOpExecutor: method "${method}" not supported`);
181
+ debug2(`userOpExecutor: method "${method}" not overridden, falling back to fallback transport`);
182
+ const { request: fallbackRequest } = fallbackDefaultTransport(opts);
183
+ return fallbackRequest({ method, params });
181
184
  };
182
185
  return createTransport({
183
186
  key: "userOpExecutor",
@@ -189,23 +192,31 @@ function userOpExecutor({ executor }) {
189
192
  }
190
193
 
191
194
  // src/getBundlerTransport.ts
195
+ import { wiresaw } from "@latticexyz/common/internal";
192
196
  function getBundlerTransport(chain) {
197
+ if ("wiresaw" in chain.rpcUrls) {
198
+ return wiresaw();
199
+ }
193
200
  const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
194
- const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
195
- executor: createClient({
196
- chain,
197
- transport: fallback([webSocket(), http()]),
198
- account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
199
- pollingInterval: 10
200
- }).extend(transactionQueue())
201
- }) : null;
202
- if (!bundlerTransport) {
203
- throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
201
+ if (bundlerHttpUrl) {
202
+ return http(bundlerHttpUrl);
204
203
  }
205
- return bundlerTransport;
204
+ if (chain.id === 31337) {
205
+ return userOpExecutor({
206
+ executor: createClient({
207
+ chain,
208
+ transport: fallback([webSocket(), http()]),
209
+ account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
210
+ pollingInterval: 10
211
+ }).extend(transactionQueue()),
212
+ fallbackDefaultTransport: http()
213
+ });
214
+ }
215
+ throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
206
216
  }
207
217
 
208
218
  // src/EntryKitConfigProvider.tsx
219
+ import { ConnectKitProvider } from "connectkit";
209
220
  import { jsx as jsx2 } from "react/jsx-runtime";
210
221
  var Context2 = createContext2(null);
211
222
  function EntryKitConfigProvider({ config, children }) {
@@ -216,14 +227,14 @@ function EntryKitConfigProvider({ config, children }) {
216
227
  if (!chain) throw new Error(`Could not find configured chain for chain ID ${config.chainId}.`);
217
228
  getBundlerTransport(chain);
218
229
  return /* @__PURE__ */ jsx2(
219
- RainbowKitProvider,
230
+ ConnectKitProvider,
220
231
  {
221
- initialChain: 0,
222
- appInfo: {
223
- appName: config.appName
224
- // TODO: learn more and disclaimer
232
+ theme: "midnight",
233
+ options: {
234
+ // Prevent Wagmi trying to switch chains after connection
235
+ // https://github.com/wevm/wagmi/blob/f5b717ccf8a5b283263cadc984ba00b354bcefae/packages/core/src/connectors/injected.ts#L174-L182
236
+ initialChainId: 0
225
237
  },
226
- theme: midnightTheme({ borderRadius: "none" }),
227
238
  children: /* @__PURE__ */ jsx2(Context2.Provider, { value: { ...config, chain }, children })
228
239
  }
229
240
  );
@@ -274,7 +285,9 @@ var Shadow = forwardRef(function Shadow2({ mode, children }, forwardedRef) {
274
285
  inset: "0",
275
286
  width: "100%",
276
287
  height: "100%",
277
- zIndex: "2147483646"
288
+ // one less than ConnectKit's modal z-index
289
+ // so that ConnectKit can overlap properly
290
+ zIndex: "2147483645"
278
291
  } : frameSize.width && frameSize.height ? {
279
292
  all: "unset",
280
293
  display: "inline-grid",
@@ -373,14 +386,11 @@ function useAccountModal() {
373
386
  }
374
387
 
375
388
  // src/AccountModal.tsx
376
- import { twMerge as twMerge19 } from "tailwind-merge";
389
+ import { twMerge as twMerge20 } from "tailwind-merge";
377
390
 
378
391
  // src/AccountModalContent.tsx
379
392
  import { useAccount as useAccount8, useConnectorClient } from "wagmi";
380
393
 
381
- // src/ConnectWallet.tsx
382
- import { useAccount } from "wagmi";
383
-
384
394
  // src/ui/Button.tsx
385
395
  import { twMerge as twMerge3 } from "tailwind-merge";
386
396
 
@@ -446,7 +456,7 @@ var Button = ({ pending, variant, type, className, children, disabled, ...props
446
456
  };
447
457
 
448
458
  // src/ConnectWallet.tsx
449
- import { useConnectModal } from "@rainbow-me/rainbowkit";
459
+ import { useModal } from "connectkit";
450
460
 
451
461
  // src/icons/Logo.tsx
452
462
  import { twMerge as twMerge4 } from "tailwind-merge";
@@ -506,7 +516,7 @@ function AppInfo() {
506
516
  return /* @__PURE__ */ jsxs6("div", { className: "flex-grow flex flex-col items-center justify-center gap-2", children: [
507
517
  /* @__PURE__ */ jsx8("div", { className: "w-16 h-16 m-2", children: !appIconLoading ? hasAppIcon ? /* @__PURE__ */ jsx8("img", { src: appIcon, className: "w-full h-full object-cover" }) : (
508
518
  // TODO: swap with favicon
509
- /* @__PURE__ */ jsx8(Logo, { className: "w-full h-full text-orange-500 dark:bg-neutral-800" })
519
+ /* @__PURE__ */ jsx8(Logo, { className: "w-full h-full text-orange-500 bg-neutral-800" })
510
520
  ) : null }),
511
521
  /* @__PURE__ */ jsx8("div", { className: "text-2xl text-white text-center", children: appName })
512
522
  ] });
@@ -514,18 +524,17 @@ function AppInfo() {
514
524
 
515
525
  // src/ConnectWallet.tsx
516
526
  import { twMerge as twMerge5 } from "tailwind-merge";
517
- import { useEffect as useEffect3, useState as useState2 } from "react";
527
+ import { useEffect as useEffect3, useRef as useRef2 } from "react";
518
528
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
519
529
  function ConnectWallet() {
520
- const userAccount = useAccount();
521
- const { openConnectModal, connectModalOpen } = useConnectModal();
522
- const [hasAutoOpened, setHasAutoOpened] = useState2(false);
530
+ const { open, setOpen } = useModal();
531
+ const hasAutoOpenedRef = useRef2(false);
523
532
  useEffect3(() => {
524
- if (!connectModalOpen && !hasAutoOpened) {
525
- openConnectModal?.();
526
- setHasAutoOpened(true);
533
+ if (!open && !hasAutoOpenedRef.current) {
534
+ setOpen(true);
535
+ hasAutoOpenedRef.current = true;
527
536
  }
528
- }, [connectModalOpen, hasAutoOpened, openConnectModal]);
537
+ }, [open, setOpen]);
529
538
  return /* @__PURE__ */ jsxs7(
530
539
  "div",
531
540
  {
@@ -537,8 +546,7 @@ function ConnectWallet() {
537
546
  {
538
547
  variant: "secondary",
539
548
  className: "self-auto flex justify-center",
540
- disabled: userAccount.status === "connecting",
541
- onClick: openConnectModal,
549
+ onClick: () => setOpen(true),
542
550
  autoFocus: true,
543
551
  children: "Connect wallet"
544
552
  },
@@ -550,43 +558,17 @@ function ConnectWallet() {
550
558
  }
551
559
 
552
560
  // src/onboarding/ConnectedSteps.tsx
553
- import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef4, useState as useState6 } from "react";
554
- import { twMerge as twMerge17 } from "tailwind-merge";
561
+ import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef5, useState as useState5 } from "react";
562
+ import { twMerge as twMerge18 } from "tailwind-merge";
555
563
 
556
564
  // src/onboarding/usePrerequisites.ts
557
- import { useClient as useClient6, useConfig } from "wagmi";
558
- import { getBalanceQueryOptions as getBalanceQueryOptions2 } from "wagmi/query";
559
- import { queryOptions as queryOptions6, skipToken as skipToken6, useQuery as useQuery7, useQueryClient } from "@tanstack/react-query";
560
-
561
- // src/getPaymaster.ts
562
- function getPaymaster(chain) {
563
- const contracts = chain.contracts ?? {};
564
- if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
565
- if ("address" in contracts.quarryPaymaster) {
566
- return {
567
- type: "quarry",
568
- address: contracts.quarryPaymaster.address,
569
- isGasPass: !!chain.rpcUrls.quarryPassIssuer?.http?.[0]
570
- };
571
- }
572
- }
573
- if ("paymaster" in contracts && contracts.paymaster != null) {
574
- if ("address" in contracts.paymaster) {
575
- return {
576
- type: "simple",
577
- address: contracts.paymaster.address
578
- };
579
- }
580
- }
581
- }
565
+ import { useClient as useClient7, useConfig as useConfig2 } from "wagmi";
566
+ import { queryOptions as queryOptions7, useQuery as useQuery8, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
582
567
 
583
- // src/onboarding/quarry/useAllowance.ts
568
+ // src/onboarding/quarry/useSpender.ts
584
569
  import { useClient } from "wagmi";
585
570
  import { queryOptions, skipToken, useQuery as useQuery2 } from "@tanstack/react-query";
586
571
 
587
- // src/quarry/getAllowance.ts
588
- import { numberToHex as numberToHex2 } from "viem";
589
-
590
572
  // src/quarry/common.ts
591
573
  import { defineStore } from "@latticexyz/store";
592
574
  import { parseAbi } from "viem";
@@ -596,7 +578,8 @@ var paymasterAbi = parseAbi([
596
578
  "error BalanceSystem_BalanceTooHigh(address user, uint256 balance, uint256 max)",
597
579
  "error BalanceSystem_InsufficientBalance(address user, uint256 amount, uint256 balance)",
598
580
  "function registerSpender(address spender)",
599
- "function depositTo(address to) payable"
581
+ "function depositTo(address to) payable",
582
+ "function withdrawTo(address to, uint256 amount)"
600
583
  ]);
601
584
  var paymasterConfig = defineStore({
602
585
  namespaces: {
@@ -662,64 +645,36 @@ var paymasterConfig = defineStore({
662
645
  });
663
646
  var paymasterTables = paymasterConfig.namespaces.root.tables;
664
647
 
665
- // src/quarry/getAllowance.ts
666
- import { getRecord, getStaticDataLocation } from "@latticexyz/store/internal";
667
- import { getKeyTuple } from "@latticexyz/protocol-parser/internal";
668
- import { setStorageAt } from "viem/actions";
669
- async function getAllowance({ client, userAddress }) {
670
- const paymaster = getPaymaster(client.chain);
671
- if (paymaster?.type !== "quarry") return null;
672
- const record = await getRecord(client, {
673
- address: paymaster.address,
674
- table: paymasterTables.Allowance,
675
- key: { user: userAddress },
676
- blockTag: "pending"
677
- });
678
- return record.allowance;
679
- }
680
- async function setAllowanceSlot({ client, userAddress, allowance }) {
681
- const paymaster = getPaymaster(client.chain);
682
- if (paymaster?.type !== "quarry") return;
683
- const slot = getStaticDataLocation(
684
- paymasterTables.Allowance.tableId,
685
- getKeyTuple(paymasterTables.Allowance, { user: userAddress })
686
- );
687
- await setStorageAt(
688
- client.extend(() => ({ mode: "anvil" })),
689
- {
690
- address: paymaster.address,
691
- index: slot,
692
- value: numberToHex2(allowance, { size: 32 })
693
- }
694
- );
695
- }
648
+ // src/onboarding/quarry/getSpender.ts
649
+ import { getRecord } from "@latticexyz/store/internal";
696
650
 
697
- // src/onboarding/quarry/useAllowance.ts
698
- function getAllowanceQueryOptions({
699
- client,
700
- userAddress
701
- }) {
702
- return queryOptions({
703
- queryKey: ["getAllowance", client?.uid, userAddress],
704
- queryFn: client && userAddress ? () => getAllowance({ client, userAddress }) : skipToken
705
- });
706
- }
707
- function useAllowance(userAddress) {
708
- const { chainId } = useEntryKitConfig();
709
- const client = useClient({ chainId });
710
- return useQuery2(getAllowanceQueryOptions({ client, userAddress }));
651
+ // src/getPaymaster.ts
652
+ function getPaymaster(chain) {
653
+ const contracts = chain.contracts ?? {};
654
+ if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
655
+ if ("address" in contracts.quarryPaymaster) {
656
+ return {
657
+ type: "quarry",
658
+ address: contracts.quarryPaymaster.address,
659
+ isGasPass: !!chain.rpcUrls.quarryPassIssuer?.http?.[0]
660
+ };
661
+ }
662
+ }
663
+ if ("paymaster" in contracts && contracts.paymaster != null) {
664
+ if ("address" in contracts.paymaster) {
665
+ return {
666
+ type: "simple",
667
+ address: contracts.paymaster.address
668
+ };
669
+ }
670
+ }
711
671
  }
712
672
 
713
- // src/onboarding/quarry/useSpender.ts
714
- import { useClient as useClient2 } from "wagmi";
715
- import { queryOptions as queryOptions2, skipToken as skipToken2, useQuery as useQuery3 } from "@tanstack/react-query";
716
-
717
673
  // src/onboarding/quarry/getSpender.ts
718
- import { getRecord as getRecord2 } from "@latticexyz/store/internal";
719
674
  async function getSpender({ client, userAddress, sessionAddress }) {
720
675
  const paymaster = getPaymaster(client.chain);
721
676
  if (paymaster?.type !== "quarry") return null;
722
- const record = await getRecord2(client, {
677
+ const record = await getRecord(client, {
723
678
  address: paymaster.address,
724
679
  table: paymasterTables.Spender,
725
680
  key: { spender: sessionAddress },
@@ -734,18 +689,18 @@ function getSpenderQueryOptions({
734
689
  userAddress,
735
690
  sessionAddress
736
691
  }) {
737
- return queryOptions2({
692
+ return queryOptions({
738
693
  queryKey: ["getSpender", client?.uid, userAddress, sessionAddress],
739
- queryFn: client && userAddress && sessionAddress ? () => getSpender({ client, userAddress, sessionAddress }) : skipToken2
694
+ queryFn: client && userAddress && sessionAddress ? () => getSpender({ client, userAddress, sessionAddress }) : skipToken
740
695
  });
741
696
  }
742
697
 
743
698
  // src/onboarding/useDelegation.ts
744
- import { useClient as useClient3 } from "wagmi";
745
- import { queryOptions as queryOptions3, skipToken as skipToken3, useQuery as useQuery4 } from "@tanstack/react-query";
699
+ import { useClient as useClient2 } from "wagmi";
700
+ import { queryOptions as queryOptions2, skipToken as skipToken2, useQuery as useQuery3 } from "@tanstack/react-query";
746
701
 
747
702
  // src/onboarding/getDelegation.ts
748
- import { getRecord as getRecord3 } from "@latticexyz/store/internal";
703
+ import { getRecord as getRecord2 } from "@latticexyz/store/internal";
749
704
 
750
705
  // src/common.ts
751
706
  import { resourceToHex } from "@latticexyz/common";
@@ -769,7 +724,7 @@ async function getDelegation({
769
724
  // TODO: move everything to latest instead of pending
770
725
  blockTag = "pending"
771
726
  }) {
772
- const record = await getRecord3(client, {
727
+ const record = await getRecord2(client, {
773
728
  address: worldAddress,
774
729
  table: worldTables.UserDelegationControl,
775
730
  key: { delegator: userAddress, delegatee: sessionAddress },
@@ -785,15 +740,15 @@ function getDelegationQueryOptions({
785
740
  userAddress,
786
741
  sessionAddress
787
742
  }) {
788
- return queryOptions3({
743
+ return queryOptions2({
789
744
  queryKey: ["getDelegation", client?.uid, worldAddress, userAddress, sessionAddress],
790
- queryFn: client && userAddress && sessionAddress ? () => getDelegation({ client, worldAddress, userAddress, sessionAddress }) : skipToken3
745
+ queryFn: client && userAddress && sessionAddress ? () => getDelegation({ client, worldAddress, userAddress, sessionAddress }) : skipToken2
791
746
  });
792
747
  }
793
748
 
794
749
  // src/useSessionAccount.ts
795
- import { useClient as useClient4 } from "wagmi";
796
- import { queryOptions as queryOptions4, skipToken as skipToken4, useQuery as useQuery5 } from "@tanstack/react-query";
750
+ import { useClient as useClient3 } from "wagmi";
751
+ import { queryOptions as queryOptions3, skipToken as skipToken3, useQuery as useQuery4 } from "@tanstack/react-query";
797
752
 
798
753
  // src/getSessionAccount.ts
799
754
  import { toSimpleSmartAccount } from "permissionless/accounts";
@@ -857,15 +812,73 @@ function getSessionAccountQueryOptions({
857
812
  client,
858
813
  userAddress
859
814
  }) {
860
- return queryOptions4({
815
+ return queryOptions3({
861
816
  queryKey: ["getSessionAccount", client?.uid, userAddress],
862
- queryFn: client && userAddress ? () => getSessionAccount({ client, userAddress }) : skipToken4,
817
+ queryFn: client && userAddress ? () => getSessionAccount({ client, userAddress }) : skipToken3,
863
818
  staleTime: Infinity,
864
819
  // TODO: replace with function to retry only connection errors
865
820
  retry: false
866
821
  });
867
822
  }
868
823
 
824
+ // src/useFunds.ts
825
+ import { useClient as useClient6, useConfig } from "wagmi";
826
+ import { getBalanceQueryOptions as getBalanceQueryOptions2 } from "wagmi/query";
827
+ import { queryOptions as queryOptions6, useQuery as useQuery7, useQueryClient } from "@tanstack/react-query";
828
+
829
+ // src/onboarding/quarry/useAllowance.ts
830
+ import { useClient as useClient4 } from "wagmi";
831
+ import { queryOptions as queryOptions4, skipToken as skipToken4, useQuery as useQuery5 } from "@tanstack/react-query";
832
+
833
+ // src/quarry/getAllowance.ts
834
+ import { numberToHex as numberToHex2 } from "viem";
835
+ import { getRecord as getRecord3, getStaticDataLocation } from "@latticexyz/store/internal";
836
+ import { getKeyTuple } from "@latticexyz/protocol-parser/internal";
837
+ import { setStorageAt } from "viem/actions";
838
+ async function getAllowance({ client, userAddress }) {
839
+ const paymaster = getPaymaster(client.chain);
840
+ if (paymaster?.type !== "quarry") return null;
841
+ const record = await getRecord3(client, {
842
+ address: paymaster.address,
843
+ table: paymasterTables.Allowance,
844
+ key: { user: userAddress },
845
+ blockTag: "pending"
846
+ });
847
+ return record.allowance;
848
+ }
849
+ async function setAllowanceSlot({ client, userAddress, allowance }) {
850
+ const paymaster = getPaymaster(client.chain);
851
+ if (paymaster?.type !== "quarry") return;
852
+ const slot = getStaticDataLocation(
853
+ paymasterTables.Allowance.tableId,
854
+ getKeyTuple(paymasterTables.Allowance, { user: userAddress })
855
+ );
856
+ await setStorageAt(
857
+ client.extend(() => ({ mode: "anvil" })),
858
+ {
859
+ address: paymaster.address,
860
+ index: slot,
861
+ value: numberToHex2(allowance, { size: 32 })
862
+ }
863
+ );
864
+ }
865
+
866
+ // src/onboarding/quarry/useAllowance.ts
867
+ function getAllowanceQueryOptions({
868
+ client,
869
+ userAddress
870
+ }) {
871
+ return queryOptions4({
872
+ queryKey: ["getAllowance", client?.uid, userAddress],
873
+ queryFn: client && userAddress ? () => getAllowance({ client, userAddress }) : skipToken4
874
+ });
875
+ }
876
+ function useAllowance(userAddress) {
877
+ const { chainId } = useEntryKitConfig();
878
+ const client = useClient4({ chainId });
879
+ return useQuery5(getAllowanceQueryOptions({ client, userAddress }));
880
+ }
881
+
869
882
  // src/onboarding/quarry/useBalance.ts
870
883
  import { useClient as useClient5 } from "wagmi";
871
884
  import { queryOptions as queryOptions5, skipToken as skipToken5, useQuery as useQuery6 } from "@tanstack/react-query";
@@ -900,6 +913,43 @@ function useBalance(userAddress) {
900
913
  return useQuery6(getBalanceQueryOptions({ client, userAddress }));
901
914
  }
902
915
 
916
+ // src/useFunds.ts
917
+ function getFundsQueryOptions({
918
+ queryClient,
919
+ config,
920
+ client,
921
+ userAddress
922
+ }) {
923
+ return queryOptions6({
924
+ queryKey: ["getFunds", client?.uid, userAddress],
925
+ queryFn: async () => {
926
+ if (!client) throw new Error("Viem client not ready.");
927
+ if (!userAddress) throw new Error("User not connected.");
928
+ const {
929
+ account: { address: sessionAddress }
930
+ } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
931
+ const [sessionBalance, paymasterAllowance, paymasterBalance] = await Promise.all([
932
+ queryClient.fetchQuery(getBalanceQueryOptions2(config, { chainId: client.chain.id, address: sessionAddress })),
933
+ queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })),
934
+ queryClient.fetchQuery(getBalanceQueryOptions({ client, userAddress }))
935
+ ]);
936
+ return {
937
+ sessionBalance: sessionBalance?.value ?? null,
938
+ paymasterAllowance,
939
+ paymasterBalance
940
+ };
941
+ },
942
+ retry: false
943
+ });
944
+ }
945
+ function useFunds(userAddress) {
946
+ const queryClient = useQueryClient();
947
+ const config = useConfig();
948
+ const { chainId } = useEntryKitConfig();
949
+ const client = useClient6({ chainId });
950
+ return useQuery7(getFundsQueryOptions({ queryClient, config, client, userAddress }), queryClient);
951
+ }
952
+
903
953
  // src/onboarding/usePrerequisites.ts
904
954
  function getPrequisitesQueryOptions({
905
955
  queryClient,
@@ -908,26 +958,23 @@ function getPrequisitesQueryOptions({
908
958
  userAddress,
909
959
  worldAddress
910
960
  }) {
911
- return queryOptions6({
961
+ return queryOptions7({
912
962
  queryKey: ["getPrerequisites", client?.uid, userAddress],
913
- queryFn: client && userAddress ? async () => {
914
- const paymaster = getPaymaster(client.chain);
963
+ queryFn: async () => {
964
+ if (!client) throw new Error("Viem client not ready.");
965
+ if (!userAddress) throw new Error("User not connected.");
915
966
  const {
916
967
  account: { address: sessionAddress }
917
968
  } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
918
- const [sessionBalance, allowance, spender, quarryBalance, hasDelegation] = await Promise.all([
919
- !paymaster ? queryClient.fetchQuery(
920
- getBalanceQueryOptions2(config, { chainId: client.chain.id, address: sessionAddress })
921
- ) : null,
922
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })) : null,
923
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })) : null,
924
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getBalanceQueryOptions({ client, userAddress })) : null,
969
+ const [funds, spender, hasDelegation] = await Promise.all([
970
+ queryClient.fetchQuery(getFundsQueryOptions({ queryClient, config, client, userAddress })),
971
+ queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })),
925
972
  queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress }))
926
973
  ]);
927
- const hasAllowance = allowance == null || allowance > 0n;
974
+ const hasAllowance = funds.paymasterAllowance == null || funds.paymasterAllowance > 0n;
928
975
  const isSpender = spender == null ? true : spender;
929
- const hasGasBalance = sessionBalance == null || sessionBalance.value > 0n;
930
- const hasQuarryGasBalance = quarryBalance == null || quarryBalance > 0n;
976
+ const hasGasBalance = funds.sessionBalance == null || funds.sessionBalance > 0n;
977
+ const hasQuarryGasBalance = funds.paymasterBalance == null || funds.paymasterBalance > 0n;
931
978
  return {
932
979
  sessionAddress,
933
980
  hasAllowance,
@@ -938,16 +985,16 @@ function getPrequisitesQueryOptions({
938
985
  // we intentionally don't enforce an allowance/gas balance here
939
986
  complete: isSpender && hasDelegation
940
987
  };
941
- } : skipToken6,
988
+ },
942
989
  retry: false
943
990
  });
944
991
  }
945
992
  function usePrerequisites(userAddress) {
946
- const queryClient = useQueryClient();
947
- const config = useConfig();
993
+ const queryClient = useQueryClient2();
994
+ const config = useConfig2();
948
995
  const { chainId, worldAddress } = useEntryKitConfig();
949
- const client = useClient6({ chainId });
950
- const prereqs = useQuery7(
996
+ const client = useClient7({ chainId });
997
+ const prereqs = useQuery8(
951
998
  getPrequisitesQueryOptions({
952
999
  queryClient,
953
1000
  config,
@@ -964,10 +1011,10 @@ function usePrerequisites(userAddress) {
964
1011
  import { useDisconnect } from "wagmi";
965
1012
 
966
1013
  // src/useENS.ts
967
- import { useQuery as useQuery8 } from "@tanstack/react-query";
1014
+ import { useQuery as useQuery9 } from "@tanstack/react-query";
968
1015
  function useENS(address) {
969
1016
  const normalizedAddress = address?.toLowerCase();
970
- return useQuery8({
1017
+ return useQuery9({
971
1018
  enabled: !!normalizedAddress,
972
1019
  queryKey: ["ens", normalizedAddress],
973
1020
  queryFn: async () => {
@@ -1091,7 +1138,7 @@ import { parseEther as parseEther3 } from "viem";
1091
1138
 
1092
1139
  // src/onboarding/quarry/useClaimGasPass.ts
1093
1140
  import { parseEther as parseEther2 } from "viem";
1094
- import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
1141
+ import { useMutation, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
1095
1142
 
1096
1143
  // src/quarry/transports/quarryPassIssuer.ts
1097
1144
  import { http as http2 } from "viem";
@@ -1120,11 +1167,11 @@ async function claimGasPass({ chain, userAddress }) {
1120
1167
  }
1121
1168
 
1122
1169
  // src/onboarding/quarry/useClaimGasPass.ts
1123
- import { useClient as useClient7 } from "wagmi";
1170
+ import { useClient as useClient8 } from "wagmi";
1124
1171
  function useClaimGasPass() {
1125
- const queryClient = useQueryClient2();
1172
+ const queryClient = useQueryClient3();
1126
1173
  const { chain } = useEntryKitConfig();
1127
- const client = useClient7({ chainId: chain.id });
1174
+ const client = useClient8({ chainId: chain.id });
1128
1175
  const mutationKey = ["claimGasPass", chain.id];
1129
1176
  return useMutation({
1130
1177
  retry: 0,
@@ -1138,6 +1185,7 @@ function useClaimGasPass() {
1138
1185
  }
1139
1186
  await Promise.all([
1140
1187
  queryClient.invalidateQueries({ queryKey: ["getAllowance"] }),
1188
+ queryClient.invalidateQueries({ queryKey: ["getFunds"] }),
1141
1189
  queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] })
1142
1190
  ]);
1143
1191
  }
@@ -1170,8 +1218,12 @@ function EthIcon({ className, ...props }) {
1170
1218
  import { formatEther } from "viem";
1171
1219
  function formatBalance(wei) {
1172
1220
  const formatted = formatEther(wei);
1173
- const magnitude = Math.floor(parseFloat(formatted)).toString().length;
1174
- return parseFloat(formatted).toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
1221
+ const parsed = parseFloat(formatted);
1222
+ if (parsed > 0 && parsed < 1e-5) {
1223
+ return "<0.00001";
1224
+ }
1225
+ const magnitude = Math.floor(parsed).toString().length;
1226
+ return parsed.toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
1175
1227
  }
1176
1228
 
1177
1229
  // src/ui/Balance.tsx
@@ -1240,7 +1292,7 @@ import { useEffect as useEffect7 } from "react";
1240
1292
 
1241
1293
  // src/onboarding/useSetupSession.ts
1242
1294
  import { encodeFunctionData } from "viem";
1243
- import { useMutation as useMutation2, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
1295
+ import { useMutation as useMutation2, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
1244
1296
  import { getAction as getAction4 } from "viem/utils";
1245
1297
  import { sendUserOperation as sendUserOperation2, waitForUserOperationReceipt } from "viem/account-abstraction";
1246
1298
  import { waitForTransactionReceipt as waitForTransactionReceipt2 } from "viem/actions";
@@ -1251,11 +1303,12 @@ function defineCall(call) {
1251
1303
  }
1252
1304
 
1253
1305
  // src/onboarding/useSetupSession.ts
1254
- import { useClient as useClient8 } from "wagmi";
1306
+ import { useClient as useClient9 } from "wagmi";
1255
1307
  import { resourceToHex as resourceToHex2 } from "@latticexyz/common";
1256
1308
  import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json";
1257
1309
 
1258
1310
  // src/utils/callWithSignature.ts
1311
+ import { parseErc6492Signature } from "viem";
1259
1312
  import { writeContract as viem_writeContract } from "viem/actions";
1260
1313
  import { getAction as getAction3 } from "viem/utils";
1261
1314
 
@@ -1310,7 +1363,13 @@ async function callWithSignature({
1310
1363
  sessionClient,
1311
1364
  ...opts
1312
1365
  }) {
1313
- const signature = await signCall(opts);
1366
+ const rawSignature = await signCall(opts);
1367
+ const { address, signature } = parseErc6492Signature(rawSignature);
1368
+ if (address != null) {
1369
+ throw new Error(
1370
+ "ERC-6492 signatures, like from Coinbase Smart Wallet, are not yet supported. Try using a different wallet?"
1371
+ );
1372
+ }
1314
1373
  return getAction3(
1315
1374
  sessionClient,
1316
1375
  viem_writeContract,
@@ -1326,9 +1385,9 @@ async function callWithSignature({
1326
1385
  // src/onboarding/useSetupSession.ts
1327
1386
  import { systemsConfig as worldSystemsConfig } from "@latticexyz/world/mud.config";
1328
1387
  function useSetupSession({ userClient }) {
1329
- const queryClient = useQueryClient3();
1388
+ const queryClient = useQueryClient4();
1330
1389
  const { chainId, worldAddress } = useEntryKitConfig();
1331
- const client = useClient8({ chainId });
1390
+ const client = useClient9({ chainId });
1332
1391
  const mutationKey = ["setupSession", client?.chain.id, userClient.account.address];
1333
1392
  return useMutation2({
1334
1393
  retry: 0,
@@ -1435,12 +1494,11 @@ function useSetupSession({ userClient }) {
1435
1494
  }
1436
1495
 
1437
1496
  // src/useSessionClient.ts
1438
- import { useClient as useClient9 } from "wagmi";
1497
+ import { useClient as useClient10 } from "wagmi";
1439
1498
  import {
1440
- queryOptions as queryOptions7,
1441
- skipToken as skipToken7,
1442
- useQuery as useQuery9,
1443
- useQueryClient as useQueryClient4
1499
+ queryOptions as queryOptions8,
1500
+ useQuery as useQuery10,
1501
+ useQueryClient as useQueryClient5
1444
1502
  } from "@tanstack/react-query";
1445
1503
 
1446
1504
  // src/getSessionClient.ts
@@ -1477,7 +1535,7 @@ function createFeeEstimator(client) {
1477
1535
  if (client.chain.id === 31337) {
1478
1536
  return async () => ({ maxFeePerGas: 100000n, maxPriorityFeePerGas: 0n });
1479
1537
  }
1480
- if ([690, 17069, 17420, 695569].includes(client.chain.id)) {
1538
+ if ([690, 17069, 695569].includes(client.chain.id)) {
1481
1539
  return () => getAction5(client, estimateFeesPerGas, "estimateFeesPerGas")({ chain: client.chain });
1482
1540
  }
1483
1541
  }
@@ -1524,9 +1582,10 @@ function getSessionClientQueryOptions({
1524
1582
  userAddress,
1525
1583
  worldAddress
1526
1584
  }) {
1527
- return queryOptions7({
1585
+ return queryOptions8({
1528
1586
  queryKey: ["getSessionClient", client?.uid, userAddress, worldAddress],
1529
- queryFn: userAddress ? async () => {
1587
+ queryFn: async () => {
1588
+ if (!userAddress) throw new Error("User not connected.");
1530
1589
  const { account: sessionAccount, signer: sessionSigner } = await queryClient.fetchQuery(
1531
1590
  getSessionAccountQueryOptions({ client, userAddress })
1532
1591
  );
@@ -1536,17 +1595,17 @@ function getSessionClientQueryOptions({
1536
1595
  userAddress,
1537
1596
  worldAddress
1538
1597
  });
1539
- } : skipToken7,
1598
+ },
1540
1599
  staleTime: Infinity,
1541
1600
  // TODO: replace with function to retry only connection errors
1542
1601
  retry: false
1543
1602
  });
1544
1603
  }
1545
1604
  function useSessionClient(userAddress) {
1546
- const queryClient = useQueryClient4();
1605
+ const queryClient = useQueryClient5();
1547
1606
  const { chainId, worldAddress } = useEntryKitConfig();
1548
- const client = useClient9({ chainId });
1549
- return useQuery9(
1607
+ const client = useClient10({ chainId });
1608
+ return useQuery10(
1550
1609
  getSessionClientQueryOptions({
1551
1610
  queryClient,
1552
1611
  client,
@@ -1613,9 +1672,9 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1613
1672
  }
1614
1673
 
1615
1674
  // src/onboarding/GasBalance.tsx
1616
- import { useEffect as useEffect9, useState as useState3 } from "react";
1675
+ import { useEffect as useEffect9, useState as useState2 } from "react";
1617
1676
  import { parseEther as parseEther4 } from "viem";
1618
- import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
1677
+ import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
1619
1678
  import { useBalance as useBalance2, useWatchBlockNumber } from "wagmi";
1620
1679
 
1621
1680
  // src/data/relayChains.json
@@ -1899,13 +1958,13 @@ var relayChains_default = {
1899
1958
  };
1900
1959
 
1901
1960
  // src/onboarding/useSetBalance.ts
1902
- import { useQueryClient as useQueryClient5, useMutation as useMutation3 } from "@tanstack/react-query";
1961
+ import { useQueryClient as useQueryClient6, useMutation as useMutation3 } from "@tanstack/react-query";
1903
1962
  import { setBalance as setBalance2 } from "viem/actions";
1904
- import { useClient as useClient10 } from "wagmi";
1963
+ import { useClient as useClient11 } from "wagmi";
1905
1964
  function useSetBalance() {
1906
- const queryClient = useQueryClient5();
1965
+ const queryClient = useQueryClient6();
1907
1966
  const { chainId } = useEntryKitConfig();
1908
- const client = useClient10({ chainId });
1967
+ const client = useClient11({ chainId });
1909
1968
  return useMutation3({
1910
1969
  retry: 0,
1911
1970
  mutationKey: ["setBalance", chainId],
@@ -1914,6 +1973,7 @@ function useSetBalance() {
1914
1973
  await setBalance2({ ...client, mode: "anvil" }, params);
1915
1974
  await Promise.all([
1916
1975
  queryClient.invalidateQueries({ queryKey: ["balance"] }),
1976
+ queryClient.invalidateQueries({ queryKey: ["getFunds"] }),
1917
1977
  queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] })
1918
1978
  ]);
1919
1979
  return null;
@@ -1922,9 +1982,9 @@ function useSetBalance() {
1922
1982
  }
1923
1983
 
1924
1984
  // src/errors/usePrevious.ts
1925
- import { useEffect as useEffect8, useRef as useRef2 } from "react";
1985
+ import { useEffect as useEffect8, useRef as useRef3 } from "react";
1926
1986
  function usePrevious(value, initialValue) {
1927
- const ref = useRef2();
1987
+ const ref = useRef3();
1928
1988
  useEffect8(() => {
1929
1989
  ref.current = { value };
1930
1990
  }, [value]);
@@ -1983,9 +2043,9 @@ function CheckIcon(props) {
1983
2043
  // src/onboarding/GasBalance.tsx
1984
2044
  import { Fragment, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
1985
2045
  function GasBalance({ isActive, isExpanded, sessionAddress }) {
1986
- const queryClient = useQueryClient6();
2046
+ const queryClient = useQueryClient7();
1987
2047
  const { chain } = useEntryKitConfig();
1988
- const [copied, setCopied] = useState3(false);
2048
+ const [copied, setCopied] = useState2(false);
1989
2049
  const balance = useShowQueryError(useBalance2({ chainId: chain.id, address: sessionAddress }));
1990
2050
  const prevBalance = usePrevious(balance.data);
1991
2051
  useWatchBlockNumber({ onBlockNumber: () => balance.refetch() });
@@ -1998,6 +2058,7 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1998
2058
  };
1999
2059
  useEffect9(() => {
2000
2060
  if (balance.data != null && prevBalance?.value === 0n && balance.data.value > 0n) {
2061
+ queryClient.invalidateQueries({ queryKey: ["getFunds"] });
2001
2062
  queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] });
2002
2063
  }
2003
2064
  }, [balance.data, prevBalance, setBalance3, sessionAddress, queryClient]);
@@ -2069,24 +2130,28 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
2069
2130
  ] });
2070
2131
  }
2071
2132
 
2133
+ // src/onboarding/quarry/GasBalance.tsx
2134
+ import { useEffect as useEffect14 } from "react";
2135
+ import { useQueryClient as useQueryClient10 } from "@tanstack/react-query";
2136
+
2072
2137
  // src/onboarding/deposit/DepositFormContainer.tsx
2073
- import { useState as useState5 } from "react";
2138
+ import { useState as useState4 } from "react";
2074
2139
  import { useChains as useChains4, useChainId } from "wagmi";
2075
2140
 
2076
2141
  // src/onboarding/deposit/DepositViaTransferForm.tsx
2077
- import { useAccount as useAccount5, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2142
+ import { useAccount as useAccount4, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2078
2143
  import { encodeFunctionData as encodeFunctionData2 } from "viem";
2079
- import { useMutation as useMutation4, useQuery as useQuery11 } from "@tanstack/react-query";
2144
+ import { useMutation as useMutation4, useQuery as useQuery13 } from "@tanstack/react-query";
2080
2145
 
2081
2146
  // src/onboarding/deposit/DepositForm.tsx
2082
- import { useEffect as useEffect11, useRef as useRef3 } from "react";
2083
- import { useAccount as useAccount4, useBalance as useBalance5, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2147
+ import { useEffect as useEffect11, useRef as useRef4 } from "react";
2148
+ import { useAccount as useAccount3, useBalance as useBalance4, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2084
2149
  import { useIsMounted } from "usehooks-ts";
2085
2150
  import { twMerge as twMerge15 } from "tailwind-merge";
2086
2151
 
2087
2152
  // src/onboarding/deposit/ChainSelect.tsx
2088
2153
  import { useEffect as useEffect10, useMemo as useMemo2 } from "react";
2089
- import { useAccount as useAccount2, useSwitchChain } from "wagmi";
2154
+ import { useSwitchChain } from "wagmi";
2090
2155
  import { twMerge as twMerge12 } from "tailwind-merge";
2091
2156
  import * as Select from "@radix-ui/react-select";
2092
2157
 
@@ -2151,8 +2216,7 @@ function Input({ asChild, className, ...props }) {
2151
2216
  className: twMerge9(
2152
2217
  "p-2.5 gap-1 border text-lg font-medium transition",
2153
2218
  "outline-none ring-2 ring-transparent focus-within:ring-orange-500 focus-within:border-transparent",
2154
- "bg-white border-neutral-300 text-black placeholder:text-neutral-400",
2155
- "dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:placeholder:text-neutral-500",
2219
+ "bg-neutral-900 border-neutral-700 text-white placeholder:text-neutral-500",
2156
2220
  className
2157
2221
  ),
2158
2222
  ...props
@@ -2160,42 +2224,34 @@ function Input({ asChild, className, ...props }) {
2160
2224
  );
2161
2225
  }
2162
2226
 
2163
- // src/onboarding/deposit/ChainBalance.tsx
2164
- import { useBalance as useBalance3 } from "wagmi";
2165
- import { Fragment as Fragment2, jsx as jsx23 } from "react/jsx-runtime";
2166
- function ChainBalance({ chainId, address }) {
2167
- const balance = useBalance3({ chainId, address });
2168
- return /* @__PURE__ */ jsx23(Fragment2, { children: balance.data ? /* @__PURE__ */ jsx23(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx23(PendingIcon, {}) });
2169
- }
2170
-
2171
2227
  // src/onboarding/deposit/ChainIcon.tsx
2172
2228
  import { twMerge as twMerge11 } from "tailwind-merge";
2173
2229
 
2174
2230
  // src/onboarding/deposit/PreloadedImage.tsx
2175
2231
  import { twMerge as twMerge10 } from "tailwind-merge";
2176
- import { jsx as jsx24 } from "react/jsx-runtime";
2232
+ import { jsx as jsx23 } from "react/jsx-runtime";
2177
2233
  function PreloadedImage({ url, fallback: fallback2, className }) {
2178
2234
  const { isSuccess, isLoading } = usePreloadImage(url);
2179
- return /* @__PURE__ */ jsx24("span", { className: twMerge10("inline-flex w-full h-full items-center justify-center overflow-clip", className), children: !isLoading ? isSuccess ? /* @__PURE__ */ jsx24("img", { src: url, className: "w-full h-full object-cover" }) : fallback2 : null });
2235
+ return /* @__PURE__ */ jsx23("span", { className: twMerge10("inline-flex w-full h-full items-center justify-center overflow-clip", className), children: !isLoading ? isSuccess ? /* @__PURE__ */ jsx23("img", { src: url, className: "w-full h-full object-cover" }) : fallback2 : null });
2180
2236
  }
2181
2237
 
2182
2238
  // src/onboarding/deposit/ChainIcon.tsx
2183
2239
  import { forwardRef as forwardRef2 } from "react";
2184
- import { jsx as jsx25 } from "react/jsx-runtime";
2240
+ import { jsx as jsx24 } from "react/jsx-runtime";
2185
2241
  var ChainIcon = forwardRef2(function ChainIcon2({ name, url, className }, forwardedRef) {
2186
- return /* @__PURE__ */ jsx25(
2242
+ return /* @__PURE__ */ jsx24(
2187
2243
  "span",
2188
2244
  {
2189
2245
  ref: forwardedRef,
2190
2246
  className: twMerge11("flex-shrink-0 inline-flex w-6 aspect-square rounded-full overflow-clip", className),
2191
- children: url ? /* @__PURE__ */ jsx25(PreloadedImage, { url }) : (
2247
+ children: url ? /* @__PURE__ */ jsx24(PreloadedImage, { url }) : (
2192
2248
  // TODO: better placeholder
2193
- /* @__PURE__ */ jsx25(
2249
+ /* @__PURE__ */ jsx24(
2194
2250
  "span",
2195
2251
  {
2196
2252
  className: twMerge11(
2197
2253
  "inline-flex items-center justify-center w-full h-full rounded-full",
2198
- "border-2 border-dashed border-black/20 dark:border-white/50 opacity-50"
2254
+ "border-2 border-dashed border-white/50 opacity-50"
2199
2255
  ),
2200
2256
  children: name?.slice(0, 1)
2201
2257
  }
@@ -2213,12 +2269,12 @@ import {
2213
2269
  createClient as createClient2,
2214
2270
  LogLevel
2215
2271
  } from "@reservoir0x/relay-sdk";
2216
- import { useQuery as useQuery10 } from "@tanstack/react-query";
2272
+ import { useQuery as useQuery11 } from "@tanstack/react-query";
2217
2273
  function useRelay() {
2218
2274
  const { chain } = useEntryKitConfig();
2219
2275
  const appOrigin = location.host;
2220
2276
  const baseApiUrl = chain.testnet ? TESTNET_RELAY_API : MAINNET_RELAY_API;
2221
- return useQuery10({
2277
+ return useQuery11({
2222
2278
  queryKey: ["relayChains", baseApiUrl, appOrigin],
2223
2279
  queryFn: async () => {
2224
2280
  debug("fetching relay chains from", baseApiUrl);
@@ -2239,12 +2295,36 @@ function useRelay() {
2239
2295
  });
2240
2296
  }
2241
2297
 
2298
+ // src/onboarding/deposit/useChainBalances.ts
2299
+ import { useAccount, useConfig as useWagmiConfig } from "wagmi";
2300
+ import { getBalance as getBalance2 } from "wagmi/actions";
2301
+ import { useQuery as useQuery12, skipToken as skipToken6 } from "@tanstack/react-query";
2302
+ import { isNotNull } from "@latticexyz/common/utils";
2303
+ function useChainBalances({ chains }) {
2304
+ const { address: userAddress } = useAccount();
2305
+ const wagmiConfig = useWagmiConfig();
2306
+ const chainIds = chains.map((chain) => chain.id);
2307
+ return useQuery12({
2308
+ queryKey: ["chainBalances", chainIds, userAddress],
2309
+ queryFn: userAddress ? async () => {
2310
+ const chainBalances = await Promise.allSettled(
2311
+ chains.map(async (chain) => {
2312
+ const balance = await getBalance2(wagmiConfig, { chainId: chain.id, address: userAddress });
2313
+ return { chain, balance };
2314
+ })
2315
+ );
2316
+ return chainBalances.map((result) => result.status === "fulfilled" ? result.value : null).filter(isNotNull);
2317
+ } : skipToken6,
2318
+ refetchInterval: 1e3 * 60,
2319
+ retry: 1
2320
+ });
2321
+ }
2322
+
2242
2323
  // src/onboarding/deposit/ChainSelect.tsx
2243
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
2324
+ import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2244
2325
  function ChainSelect({ value, onChange }) {
2245
2326
  const theme = useTheme();
2246
2327
  const { frame } = useFrame();
2247
- const userAccount = useAccount2();
2248
2328
  const { chains, switchChain } = useSwitchChain();
2249
2329
  const relay = useRelay();
2250
2330
  const relayChains = relay.data?.chains;
@@ -2258,27 +2338,33 @@ function ChainSelect({ value, onChange }) {
2258
2338
  }).filter((c) => c.relayChain);
2259
2339
  }, [chains, relayChains]);
2260
2340
  const selectedChain = sourceChains.find((c) => c.id === value);
2341
+ const { data: chainsBalances, isLoading } = useShowQueryError(useChainBalances({ chains: sourceChains }));
2342
+ const renderedChains = useMemo2(() => {
2343
+ if (!chainsBalances) return [];
2344
+ const chainsWithBalance = chainsBalances.filter(({ balance }) => balance.value > 0n).map(({ chain, balance }) => ({ chain, balance: balance.value }));
2345
+ return chainsWithBalance.length > 0 ? chainsWithBalance : sourceChains.map((chain) => ({ chain, balance: 0n }));
2346
+ }, [chainsBalances, sourceChains]);
2261
2347
  useEffect10(() => {
2262
- if (sourceChains.length > 0 && !selectedChain) {
2263
- const defaultChain = sourceChains[0];
2348
+ if (renderedChains.length > 0 && (!selectedChain || !renderedChains.find((c) => c.chain.id === selectedChain?.id))) {
2349
+ const defaultChain = renderedChains[0].chain;
2264
2350
  onChange(defaultChain.id);
2265
2351
  switchChain({ chainId: defaultChain.id });
2266
2352
  }
2267
- }, [value, selectedChain, sourceChains, onChange, switchChain]);
2353
+ }, [value, selectedChain, renderedChains, onChange, switchChain]);
2268
2354
  return /* @__PURE__ */ jsxs15(
2269
2355
  Select.Root,
2270
2356
  {
2271
2357
  value: value.toString(),
2272
2358
  onValueChange: (value2) => {
2273
2359
  if (value2) {
2274
- const chain = sourceChains.find((chain2) => chain2.id.toString() === value2);
2360
+ const chain = renderedChains.find((item) => item.chain.id.toString() === value2)?.chain;
2275
2361
  if (!chain) throw new Error(`Unknown chain selected: ${value2}`);
2276
2362
  onChange(chain.id);
2277
2363
  }
2278
2364
  },
2279
2365
  children: [
2280
- /* @__PURE__ */ jsx26(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2281
- /* @__PURE__ */ jsx26(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx26(
2366
+ /* @__PURE__ */ jsx25(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2367
+ /* @__PURE__ */ jsx25(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx25(
2282
2368
  ChainIcon,
2283
2369
  {
2284
2370
  id: selectedChain?.id,
@@ -2287,42 +2373,45 @@ function ChainSelect({ value, onChange }) {
2287
2373
  className: "w-8"
2288
2374
  }
2289
2375
  ) }),
2290
- /* @__PURE__ */ jsx26(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
2291
- /* @__PURE__ */ jsx26(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2292
- /* @__PURE__ */ jsx26(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2376
+ /* @__PURE__ */ jsx25(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment2, { children: [
2377
+ /* @__PURE__ */ jsx25(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2378
+ /* @__PURE__ */ jsx25(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2293
2379
  ] }) })
2294
2380
  ] }) }),
2295
- frame.contentDocument ? /* @__PURE__ */ jsx26(Select.Portal, { container: frame.contentDocument.body, children: /* @__PURE__ */ jsx26(Select.Content, { position: "popper", className: "w-[352px] mt-1 animate-in fade-in slide-in-from-top-2", children: /* @__PURE__ */ jsx26(Select.Viewport, { children: /* @__PURE__ */ jsx26(
2296
- Select.Group,
2381
+ frame.contentDocument ? /* @__PURE__ */ jsx25(Select.Portal, { container: frame.contentDocument.body, children: /* @__PURE__ */ jsx25(
2382
+ Select.Content,
2297
2383
  {
2298
- className: twMerge12(
2299
- "flex flex-col border divide-y",
2300
- "bg-neutral-100 text-neutral-700 border-neutral-300 divide-neutral-300",
2301
- "dark:bg-neutral-800 dark:text-neutral-300 dark:border-neutral-700 dark:divide-neutral-700"
2302
- ),
2303
- children: sourceChains.map((chain) => (
2304
- // TODO: figure out why up/down arrow jump to top/bottom rather than cycling through items
2305
- /* @__PURE__ */ jsxs15(
2306
- Select.Item,
2307
- {
2308
- value: chain.id.toString(),
2309
- className: twMerge12(
2310
- "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2311
- // TODO: different style for checked/active state
2312
- "text-black focus:bg-white data-[state=checked]:bg-neutral-200",
2313
- "dark:text-white dark:focus:bg-neutral-700 dark:data-[state=checked]:bg-neutral-900"
2314
- ),
2315
- children: [
2316
- /* @__PURE__ */ jsx26(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2317
- /* @__PURE__ */ jsx26("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2318
- /* @__PURE__ */ jsx26("span", { className: "flex-shrink-0 font-mono text-sm text-neutral-500 dark:text-neutral-400", children: /* @__PURE__ */ jsx26(ChainBalance, { chainId: chain.id, address: userAccount.address }) })
2319
- ]
2320
- },
2321
- chain.id
2322
- )
2323
- ))
2384
+ position: "popper",
2385
+ className: "w-[352px] max-h-[230px] overflow-y-auto mt-1 animate-in fade-in slide-in-from-top-2",
2386
+ children: /* @__PURE__ */ jsx25(Select.Viewport, { children: /* @__PURE__ */ jsx25(
2387
+ Select.Group,
2388
+ {
2389
+ className: twMerge12(
2390
+ "flex flex-col border divide-y",
2391
+ "bg-neutral-800 text-neutral-300 border-neutral-700 divide-neutral-700"
2392
+ ),
2393
+ children: isLoading ? /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ jsx25(PendingIcon, { className: "h-6 w-6 animate-spin text-gray-400" }) }) : renderedChains.map(({ chain, balance }) => {
2394
+ return /* @__PURE__ */ jsxs15(
2395
+ Select.Item,
2396
+ {
2397
+ value: chain.id.toString(),
2398
+ className: twMerge12(
2399
+ "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2400
+ "text-white focus:bg-neutral-700 data-[state=checked]:bg-neutral-900"
2401
+ ),
2402
+ children: [
2403
+ /* @__PURE__ */ jsx25(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2404
+ /* @__PURE__ */ jsx25("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2405
+ /* @__PURE__ */ jsx25("span", { className: "flex-shrink-0 font-mono text-sm text-neutral-400", children: /* @__PURE__ */ jsx25(Balance, { wei: balance }) })
2406
+ ]
2407
+ },
2408
+ chain.id
2409
+ );
2410
+ })
2411
+ }
2412
+ ) })
2324
2413
  }
2325
- ) }) }) }) : null
2414
+ ) }) : null
2326
2415
  ]
2327
2416
  }
2328
2417
  );
@@ -2332,18 +2421,14 @@ function ChainSelect({ value, onChange }) {
2332
2421
  import { formatEther as formatEther3, parseEther as parseEther5 } from "viem";
2333
2422
  import { twMerge as twMerge13 } from "tailwind-merge";
2334
2423
  import { forwardRef as forwardRef3 } from "react";
2335
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2424
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2336
2425
  var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange }, forwardedRef) {
2337
- return /* @__PURE__ */ jsx27(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2338
- /* @__PURE__ */ jsx27(
2426
+ return /* @__PURE__ */ jsx26(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2427
+ /* @__PURE__ */ jsx26(
2339
2428
  "input",
2340
2429
  {
2341
2430
  ref: forwardedRef,
2342
- className: twMerge13(
2343
- "peer flex-grow outline-none bg-transparent",
2344
- "placeholder:text-neutral-400",
2345
- "dark:placeholder:text-neutral-500"
2346
- ),
2431
+ className: twMerge13("peer flex-grow outline-none bg-transparent", "placeholder:text-neutral-500"),
2347
2432
  placeholder: "0.005",
2348
2433
  required: true,
2349
2434
  autoFocus: true,
@@ -2364,33 +2449,23 @@ var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange },
2364
2449
  }
2365
2450
  }
2366
2451
  ),
2367
- /* @__PURE__ */ jsx27(
2368
- "span",
2369
- {
2370
- className: twMerge13(
2371
- "flex-shrink-0 text-2xl",
2372
- "peer-placeholder-shown:text-neutral-400",
2373
- "dark:peer-placeholder-shown:text-neutral-500"
2374
- ),
2375
- children: /* @__PURE__ */ jsx27(EthIcon, {})
2376
- }
2377
- )
2452
+ /* @__PURE__ */ jsx26("span", { className: twMerge13("flex-shrink-0 text-2xl", "peer-placeholder-shown:text-neutral-500"), children: /* @__PURE__ */ jsx26(EthIcon, {}) })
2378
2453
  ] }) });
2379
2454
  });
2380
2455
 
2381
2456
  // src/onboarding/deposit/SubmitButton.tsx
2382
- import { useAccount as useAccount3, useBalance as useBalance4, useSwitchChain as useSwitchChain2 } from "wagmi";
2457
+ import { useAccount as useAccount2, useBalance as useBalance3, useSwitchChain as useSwitchChain2 } from "wagmi";
2383
2458
  import { twMerge as twMerge14 } from "tailwind-merge";
2384
2459
  import { parseEther as parseEther6 } from "viem";
2385
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2460
+ import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2386
2461
  var MAX_DEPOSIT_AMOUNT = "0.1";
2387
2462
  function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2388
- const { chainId: userChainId, address: userAddress } = useAccount3();
2389
- const { data: userBalance } = useBalance4({ address: userAddress });
2463
+ const { chainId: userChainId, address: userAddress } = useAccount2();
2464
+ const { data: userBalance } = useBalance3({ address: userAddress });
2390
2465
  const shouldSwitchChain = chainId != null && chainId !== userChainId;
2391
2466
  const switchChain = useSwitchChain2();
2392
2467
  if (shouldSwitchChain) {
2393
- return /* @__PURE__ */ jsx28(
2468
+ return /* @__PURE__ */ jsx27(
2394
2469
  Button,
2395
2470
  {
2396
2471
  type: "button",
@@ -2409,16 +2484,16 @@ function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2409
2484
  " ETH"
2410
2485
  ] });
2411
2486
  } else if (amount > (userBalance?.value ?? 0n)) {
2412
- return /* @__PURE__ */ jsx28(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2487
+ return /* @__PURE__ */ jsx27(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2413
2488
  }
2414
2489
  }
2415
- return /* @__PURE__ */ jsx28(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2490
+ return /* @__PURE__ */ jsx27(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2416
2491
  }
2417
2492
 
2418
2493
  // src/icons/WarningIcon.tsx
2419
- import { jsx as jsx29 } from "react/jsx-runtime";
2494
+ import { jsx as jsx28 } from "react/jsx-runtime";
2420
2495
  function WarningIcon(props) {
2421
- return /* @__PURE__ */ jsx29(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx29(
2496
+ return /* @__PURE__ */ jsx28(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx28(
2422
2497
  "path",
2423
2498
  {
2424
2499
  d: "M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z",
@@ -2439,7 +2514,7 @@ function formatGas(wei) {
2439
2514
  }
2440
2515
 
2441
2516
  // src/onboarding/deposit/DepositForm.tsx
2442
- import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
2517
+ import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
2443
2518
  function DepositForm({
2444
2519
  sourceChain,
2445
2520
  setSourceChainId,
@@ -2450,10 +2525,10 @@ function DepositForm({
2450
2525
  onSubmit,
2451
2526
  submitButton
2452
2527
  }) {
2453
- const amountInputRef = useRef3(null);
2528
+ const amountInputRef = useRef4(null);
2454
2529
  const isMounted = useIsMounted();
2455
- const { address: userAddress, chainId: userChainId } = useAccount4();
2456
- const balance = useShowQueryError(useBalance5({ chainId: sourceChain.id, address: userAddress }));
2530
+ const { address: userAddress, chainId: userChainId } = useAccount3();
2531
+ const balance = useShowQueryError(useBalance4({ chainId: sourceChain.id, address: userAddress }));
2457
2532
  const quarryBalance = useShowQueryError(useBalance(userAddress));
2458
2533
  useWatchBlockNumber2({
2459
2534
  onBlockNumber: () => {
@@ -2488,33 +2563,32 @@ function DepositForm({
2488
2563
  },
2489
2564
  children: [
2490
2565
  /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
2491
- /* @__PURE__ */ jsx30(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2492
- /* @__PURE__ */ jsx30(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2566
+ /* @__PURE__ */ jsx29(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2567
+ /* @__PURE__ */ jsx29(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2493
2568
  ] }),
2494
2569
  /* @__PURE__ */ jsxs18(
2495
2570
  "dl",
2496
2571
  {
2497
2572
  className: twMerge15(
2498
2573
  "grid grid-cols-2 divide-y text-sm leading-loose [&_>_:is(dt,dd)]:px-1 [&_>_dd]:text-right",
2499
- "divide-neutral-200 text-neutral-500",
2500
- "dark:divide-neutral-700 dark:text-neutral-400"
2574
+ "divide-neutral-700 text-neutral-400"
2501
2575
  ),
2502
2576
  children: [
2503
- /* @__PURE__ */ jsx30("dt", { children: "Available to deposit" }),
2504
- /* @__PURE__ */ jsx30("dd", { children: balance.isSuccess ? /* @__PURE__ */ jsx30(Balance, { wei: balance.data.value }) : balance.isError ? /* @__PURE__ */ jsx30("span", { title: String(balance.error), children: /* @__PURE__ */ jsx30(WarningIcon, { className: "inline-block text-amber-500" }) }) : balance.isLoading ? /* @__PURE__ */ jsx30(PendingIcon, { className: "inline-block text-xs" }) : null }),
2505
- /* @__PURE__ */ jsx30("dt", { children: "Gas balance after deposit" }),
2506
- /* @__PURE__ */ jsx30("dd", { children: /* @__PURE__ */ jsx30(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2507
- /* @__PURE__ */ jsx30("dt", { children: "Estimated fee" }),
2508
- /* @__PURE__ */ jsx30("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment4, { children: [
2577
+ /* @__PURE__ */ jsx29("dt", { children: "Available to deposit" }),
2578
+ /* @__PURE__ */ jsx29("dd", { children: balance.isSuccess ? /* @__PURE__ */ jsx29(Balance, { wei: balance.data.value }) : balance.isError ? /* @__PURE__ */ jsx29("span", { title: String(balance.error), children: /* @__PURE__ */ jsx29(WarningIcon, { className: "inline-block text-amber-500" }) }) : balance.isLoading ? /* @__PURE__ */ jsx29(PendingIcon, { className: "inline-block text-xs" }) : null }),
2579
+ /* @__PURE__ */ jsx29("dt", { children: "Gas balance after deposit" }),
2580
+ /* @__PURE__ */ jsx29("dd", { children: /* @__PURE__ */ jsx29(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2581
+ /* @__PURE__ */ jsx29("dt", { children: "Estimated fee" }),
2582
+ /* @__PURE__ */ jsx29("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment3, { children: [
2509
2583
  formatGas(estimatedFee.fee),
2510
2584
  " gwei"
2511
- ] }) : estimatedFee.error ? /* @__PURE__ */ jsx30("span", { title: String(estimatedFee.error), children: /* @__PURE__ */ jsx30(WarningIcon, { className: "inline-block text-amber-500" }) }) : estimatedFee.isLoading ? /* @__PURE__ */ jsx30(PendingIcon, { className: "inline-block text-xs" }) : null }),
2512
- /* @__PURE__ */ jsx30("dt", { children: "Time to deposit" }),
2513
- /* @__PURE__ */ jsx30("dd", { children: estimatedTime })
2585
+ ] }) : estimatedFee.error ? /* @__PURE__ */ jsx29("span", { title: String(estimatedFee.error), children: /* @__PURE__ */ jsx29(WarningIcon, { className: "inline-block text-amber-500" }) }) : estimatedFee.isLoading ? /* @__PURE__ */ jsx29(PendingIcon, { className: "inline-block text-xs" }) : null }),
2586
+ /* @__PURE__ */ jsx29("dt", { children: "Time to deposit" }),
2587
+ /* @__PURE__ */ jsx29("dd", { children: estimatedTime })
2514
2588
  ]
2515
2589
  }
2516
2590
  ),
2517
- hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx30(SubmitButton, { disabled: true, children: "Not enough funds" })
2591
+ hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx29(SubmitButton, { disabled: true, children: "Not enough funds" })
2518
2592
  ]
2519
2593
  }
2520
2594
  );
@@ -2568,18 +2642,18 @@ function useDeposits() {
2568
2642
  }
2569
2643
 
2570
2644
  // src/onboarding/deposit/DepositViaTransferForm.tsx
2571
- import { jsx as jsx31 } from "react/jsx-runtime";
2645
+ import { jsx as jsx30 } from "react/jsx-runtime";
2572
2646
  function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2573
2647
  const { chain } = useEntryKitConfig();
2574
2648
  const paymaster = getPaymaster(chain);
2575
2649
  const publicClient = usePublicClient();
2576
- const { address: userAddress } = useAccount5();
2650
+ const { address: userAddress } = useAccount4();
2577
2651
  const { writeContractAsync } = useWriteContract();
2578
2652
  const { addDeposit } = useDeposits();
2579
2653
  if (!userAddress) {
2580
2654
  throw new Error("User address not found");
2581
2655
  }
2582
- const { data: gasPrice } = useQuery11({
2656
+ const { data: gasPrice } = useQuery13({
2583
2657
  queryKey: ["gasPrice", sourceChain.id],
2584
2658
  queryFn: async () => {
2585
2659
  if (!publicClient) throw new Error("Public client not available");
@@ -2636,7 +2710,7 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2636
2710
  }
2637
2711
  });
2638
2712
  const estimatedFee = prepareData?.gas && gasPrice ? prepareData.gas * gasPrice : void 0;
2639
- return /* @__PURE__ */ jsx31(
2713
+ return /* @__PURE__ */ jsx30(
2640
2714
  DepositForm,
2641
2715
  {
2642
2716
  sourceChain,
@@ -2652,7 +2726,7 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2652
2726
  onSubmit: async () => {
2653
2727
  await deposit.mutateAsync();
2654
2728
  },
2655
- submitButton: /* @__PURE__ */ jsx31(
2729
+ submitButton: /* @__PURE__ */ jsx30(
2656
2730
  SubmitButton,
2657
2731
  {
2658
2732
  variant: "primary",
@@ -2669,19 +2743,19 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2669
2743
 
2670
2744
  // src/onboarding/deposit/DepositViaRelayForm.tsx
2671
2745
  import { encodeFunctionData as encodeFunctionData3 } from "viem";
2672
- import { useAccount as useAccount6, useWalletClient } from "wagmi";
2673
- import { useMutation as useMutation5, useQuery as useQuery12 } from "@tanstack/react-query";
2674
- import { jsx as jsx32 } from "react/jsx-runtime";
2746
+ import { useAccount as useAccount5, useWalletClient } from "wagmi";
2747
+ import { useMutation as useMutation5, useQuery as useQuery14 } from "@tanstack/react-query";
2748
+ import { jsx as jsx31 } from "react/jsx-runtime";
2675
2749
  var ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
2676
2750
  function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2677
2751
  const { chain, chainId: destinationChainId } = useEntryKitConfig();
2678
2752
  const paymaster = getPaymaster(chain);
2679
2753
  const { data: wallet } = useWalletClient();
2680
- const { address: userAddress } = useAccount6();
2754
+ const { address: userAddress } = useAccount5();
2681
2755
  const { addDeposit } = useDeposits();
2682
2756
  const { data: relay } = useRelay();
2683
2757
  const relayClient = relay?.client;
2684
- const quote = useQuery12({
2758
+ const quote = useQuery14({
2685
2759
  queryKey: ["relayBridgeQuote", sourceChain.id, amount?.toString()],
2686
2760
  queryFn: async () => {
2687
2761
  if (!relayClient) throw new Error("No Relay client found.");
@@ -2757,7 +2831,7 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2757
2831
  const gasFee = BigInt(fees?.gas?.amount ?? 0);
2758
2832
  const relayerFee = BigInt(fees?.relayer?.amount ?? 0);
2759
2833
  const fee = gasFee + relayerFee;
2760
- return /* @__PURE__ */ jsx32(
2834
+ return /* @__PURE__ */ jsx31(
2761
2835
  DepositForm,
2762
2836
  {
2763
2837
  sourceChain,
@@ -2774,7 +2848,7 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2774
2848
  if (!quote.data || !amount) return;
2775
2849
  await deposit.mutateAsync({ quote: quote.data, amount });
2776
2850
  },
2777
- submitButton: /* @__PURE__ */ jsx32(
2851
+ submitButton: /* @__PURE__ */ jsx31(
2778
2852
  SubmitButton,
2779
2853
  {
2780
2854
  variant: "primary",
@@ -2791,19 +2865,19 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2791
2865
 
2792
2866
  // src/onboarding/deposit/Deposits.tsx
2793
2867
  import { useEffect as useEffect13 } from "react";
2794
- import { useQuery as useQuery15, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
2868
+ import { useQuery as useQuery17, useQueryClient as useQueryClient8 } from "@tanstack/react-query";
2795
2869
 
2796
2870
  // src/onboarding/deposit/TransferDepositStatus.tsx
2797
- import { useQuery as useQuery13 } from "@tanstack/react-query";
2871
+ import { useQuery as useQuery15 } from "@tanstack/react-query";
2798
2872
 
2799
2873
  // src/onboarding/deposit/DepositStatus.tsx
2800
- import { useEffect as useEffect12, useState as useState4 } from "react";
2874
+ import { useEffect as useEffect12, useState as useState3 } from "react";
2801
2875
  import { twMerge as twMerge16 } from "tailwind-merge";
2802
2876
 
2803
2877
  // src/icons/CloseIcon.tsx
2804
- import { jsx as jsx33 } from "react/jsx-runtime";
2878
+ import { jsx as jsx32 } from "react/jsx-runtime";
2805
2879
  function CloseIcon(props) {
2806
- return /* @__PURE__ */ jsx33(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx33(
2880
+ return /* @__PURE__ */ jsx32(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx32(
2807
2881
  "path",
2808
2882
  {
2809
2883
  d: "M6 18L18 6M6 6L18 18",
@@ -2817,18 +2891,18 @@ function CloseIcon(props) {
2817
2891
  }
2818
2892
 
2819
2893
  // src/onboarding/deposit/DepositStatus.tsx
2820
- import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
2894
+ import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
2821
2895
  function DepositStatus({ status, progress, children, onDismiss }) {
2822
- const [appear, setAppear] = useState4(false);
2896
+ const [appear, setAppear] = useState3(false);
2823
2897
  useEffect12(() => {
2824
2898
  setAppear(true);
2825
2899
  }, []);
2826
- return /* @__PURE__ */ jsxs19("div", { className: "group bg-white dark:bg-neutral-900 flex flex-col animate-in fade-in slide-in-from-bottom-2 animate-out fade-out", children: [
2900
+ return /* @__PURE__ */ jsxs19("div", { className: "group bg-neutral-900 flex flex-col animate-in fade-in slide-in-from-bottom-2 animate-out fade-out", children: [
2827
2901
  /* @__PURE__ */ jsxs19("div", { className: "py-1 text-sm flex items-center gap-2", children: [
2828
- /* @__PURE__ */ jsx34("div", { className: "flex-grow", children }),
2902
+ /* @__PURE__ */ jsx33("div", { className: "flex-grow", children }),
2829
2903
  /* @__PURE__ */ jsxs19("div", { className: "flex-shrink-0 grid", children: [
2830
- /* @__PURE__ */ jsx34("span", { className: "col-start-1 row-start-1 transition opacity-100 group-hover:opacity-0 group-hover:pointer-events-none", children: status === "success" ? /* @__PURE__ */ jsx34(CheckIcon, { className: "text-green-600" }) : status === "error" ? /* @__PURE__ */ jsx34(WarningIcon, { className: "text-amber-500" }) : /* @__PURE__ */ jsx34(PendingIcon, { className: "text-neutral-400 dark:text-neutral-500 transition" }) }),
2831
- /* @__PURE__ */ jsx34(
2904
+ /* @__PURE__ */ jsx33("span", { className: "col-start-1 row-start-1 transition opacity-100 group-hover:opacity-0 group-hover:pointer-events-none", children: status === "success" ? /* @__PURE__ */ jsx33(CheckIcon, { className: "text-green-600" }) : status === "error" ? /* @__PURE__ */ jsx33(WarningIcon, { className: "text-amber-500" }) : /* @__PURE__ */ jsx33(PendingIcon, { className: "text-neutral-500 transition" }) }),
2905
+ /* @__PURE__ */ jsx33(
2832
2906
  "button",
2833
2907
  {
2834
2908
  type: "button",
@@ -2836,22 +2910,21 @@ function DepositStatus({ status, progress, children, onDismiss }) {
2836
2910
  "col-start-1 row-start-1 flex items-center justify-center transition",
2837
2911
  "opacity-0 pointer-events-none",
2838
2912
  "group-hover:opacity-100 group-hover:pointer-events-auto",
2839
- "text-neutral-400 hover:text-black",
2840
- "dark:text-neutral-500 dark:hover:text-white"
2913
+ "text-neutral-500 hover:text-white"
2841
2914
  ),
2842
2915
  title: "Dismiss",
2843
2916
  onClick: onDismiss,
2844
- children: /* @__PURE__ */ jsx34(CloseIcon, {})
2917
+ children: /* @__PURE__ */ jsx33(CloseIcon, {})
2845
2918
  }
2846
2919
  )
2847
2920
  ] })
2848
2921
  ] }),
2849
- /* @__PURE__ */ jsx34("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx34(
2922
+ /* @__PURE__ */ jsx33("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx33(
2850
2923
  "div",
2851
2924
  {
2852
2925
  className: twMerge16(
2853
2926
  "w-full h-full transition ease-linear",
2854
- status === "success" ? "bg-green-500 dark:bg-green-600" : status === "error" ? "bg-red-500 dark:bg-red-600" : "bg-blue-500 dark:bg-blue-600",
2927
+ status === "success" ? "bg-green-600" : status === "error" ? "bg-red-600" : "bg-blue-600",
2855
2928
  status === "pending" ? "opacity-100" : "opacity-0"
2856
2929
  ),
2857
2930
  style: status === "pending" ? {
@@ -2866,7 +2939,7 @@ function DepositStatus({ status, progress, children, onDismiss }) {
2866
2939
 
2867
2940
  // src/onboarding/deposit/TransferDepositStatus.tsx
2868
2941
  import { useChains as useChains2 } from "wagmi";
2869
- import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
2942
+ import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
2870
2943
  function TransferDepositStatus({
2871
2944
  amount,
2872
2945
  chainL1Id,
@@ -2878,11 +2951,11 @@ function TransferDepositStatus({
2878
2951
  }) {
2879
2952
  const chains = useChains2();
2880
2953
  const chain = chains.find((chain2) => chain2.id === chainL1Id);
2881
- const receipt = useQuery13({
2954
+ const receipt = useQuery15({
2882
2955
  queryKey: ["transferDepositStatus", hash],
2883
2956
  queryFn: () => receiptPromise
2884
2957
  });
2885
- return /* @__PURE__ */ jsx35(
2958
+ return /* @__PURE__ */ jsx34(
2886
2959
  DepositStatus,
2887
2960
  {
2888
2961
  status: receipt.status,
@@ -2894,10 +2967,10 @@ function TransferDepositStatus({
2894
2967
  children: (() => {
2895
2968
  const blockExplorer = chain.blockExplorers?.default.url;
2896
2969
  if (receipt.status === "pending") {
2897
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2970
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
2898
2971
  "Confirming deposit on",
2899
2972
  " ",
2900
- /* @__PURE__ */ jsx35(
2973
+ /* @__PURE__ */ jsx34(
2901
2974
  "a",
2902
2975
  {
2903
2976
  href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
@@ -2910,10 +2983,10 @@ function TransferDepositStatus({
2910
2983
  ] });
2911
2984
  }
2912
2985
  if (receipt.status === "error") {
2913
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2986
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
2914
2987
  "Could not find deposit on",
2915
2988
  " ",
2916
- /* @__PURE__ */ jsx35(
2989
+ /* @__PURE__ */ jsx34(
2917
2990
  "a",
2918
2991
  {
2919
2992
  href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
@@ -2925,10 +2998,10 @@ function TransferDepositStatus({
2925
2998
  "."
2926
2999
  ] });
2927
3000
  }
2928
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
3001
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
2929
3002
  "Successfully",
2930
3003
  " ",
2931
- /* @__PURE__ */ jsx35(
3004
+ /* @__PURE__ */ jsx34(
2932
3005
  "a",
2933
3006
  {
2934
3007
  href: blockExplorer ? `${blockExplorer}/tx/${receipt.data.transactionHash}` : void 0,
@@ -2938,7 +3011,7 @@ function TransferDepositStatus({
2938
3011
  }
2939
3012
  ),
2940
3013
  " ",
2941
- /* @__PURE__ */ jsx35(Balance, { wei: amount })
3014
+ /* @__PURE__ */ jsx34(Balance, { wei: amount })
2942
3015
  ] });
2943
3016
  })()
2944
3017
  }
@@ -2946,9 +3019,9 @@ function TransferDepositStatus({
2946
3019
  }
2947
3020
 
2948
3021
  // src/onboarding/deposit/RelayDepositStatus.tsx
2949
- import { useQuery as useQuery14 } from "@tanstack/react-query";
3022
+ import { useQuery as useQuery16 } from "@tanstack/react-query";
2950
3023
  import { useChains as useChains3 } from "wagmi";
2951
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
3024
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
2952
3025
  function RelayDepositStatus({
2953
3026
  amount,
2954
3027
  chainL1Id,
@@ -2961,11 +3034,11 @@ function RelayDepositStatus({
2961
3034
  const chains = useChains3();
2962
3035
  const chainL1 = chains.find((chain) => chain.id === chainL1Id);
2963
3036
  const chainL2 = chains.find((chain) => chain.id === chainL2Id);
2964
- const deposit = useQuery14({
3037
+ const deposit = useQuery16({
2965
3038
  queryKey: ["relayDepositPromise", chainL1Id, chainL2Id, amount.toString(), start.toISOString()],
2966
3039
  queryFn: () => depositPromise
2967
3040
  });
2968
- return /* @__PURE__ */ jsx36(
3041
+ return /* @__PURE__ */ jsx35(
2969
3042
  DepositStatus,
2970
3043
  {
2971
3044
  status: deposit.status,
@@ -2976,22 +3049,22 @@ function RelayDepositStatus({
2976
3049
  onDismiss,
2977
3050
  children: (() => {
2978
3051
  if (deposit.status === "pending") {
2979
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3052
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
2980
3053
  "Relay bridge deposit pending on ",
2981
3054
  chainL1.name,
2982
3055
  "\u2026"
2983
3056
  ] });
2984
3057
  }
2985
3058
  if (deposit.status === "error") {
2986
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3059
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
2987
3060
  "Relay bridge deposit to ",
2988
3061
  chainL2.name,
2989
3062
  " failed."
2990
3063
  ] });
2991
3064
  }
2992
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3065
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
2993
3066
  "Successfully bridged ",
2994
- /* @__PURE__ */ jsx36(Balance, { wei: amount }),
3067
+ /* @__PURE__ */ jsx35(Balance, { wei: amount }),
2995
3068
  " to ",
2996
3069
  chainL2.name,
2997
3070
  "!"
@@ -3002,15 +3075,15 @@ function RelayDepositStatus({
3002
3075
  }
3003
3076
 
3004
3077
  // src/onboarding/deposit/Deposits.tsx
3005
- import { useAccount as useAccount7, useClient as useClient11 } from "wagmi";
3006
- import { jsx as jsx37 } from "react/jsx-runtime";
3078
+ import { useAccount as useAccount6, useClient as useClient12 } from "wagmi";
3079
+ import { jsx as jsx36 } from "react/jsx-runtime";
3007
3080
  function Deposits() {
3008
- const queryClient = useQueryClient7();
3081
+ const queryClient = useQueryClient8();
3009
3082
  const { chainId } = useEntryKitConfig();
3010
- const client = useClient11({ chainId });
3011
- const { address: userAddress } = useAccount7();
3083
+ const client = useClient12({ chainId });
3084
+ const { address: userAddress } = useAccount6();
3012
3085
  const { deposits, removeDeposit } = useDeposits();
3013
- const { data: isComplete } = useQuery15({
3086
+ const { data: isComplete } = useQuery17({
3014
3087
  queryKey: ["depositsComplete", deposits.map((deposit) => deposit.uid)],
3015
3088
  queryFn: async () => {
3016
3089
  if (!deposits.length) return false;
@@ -3025,26 +3098,26 @@ function Deposits() {
3025
3098
  }
3026
3099
  }, [client?.uid, isComplete, queryClient, userAddress]);
3027
3100
  if (!deposits.length) return null;
3028
- return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3101
+ return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3029
3102
  if (deposit.type === "transfer") {
3030
- return /* @__PURE__ */ jsx37(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3103
+ return /* @__PURE__ */ jsx36(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3031
3104
  } else if (deposit.type === "relay") {
3032
- return /* @__PURE__ */ jsx37(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3105
+ return /* @__PURE__ */ jsx36(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3033
3106
  }
3034
3107
  }) });
3035
3108
  }
3036
3109
 
3037
3110
  // src/onboarding/deposit/DepositFormContainer.tsx
3038
- import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
3111
+ import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
3039
3112
  function DepositFormContainer() {
3040
3113
  const { chainId: destinationChainId } = useEntryKitConfig();
3041
3114
  const chainId = useChainId();
3042
3115
  const chains = useChains4();
3043
- const [amount, setAmount] = useState5(void 0);
3044
- const [sourceChainId, setSourceChainId] = useState5(chainId);
3116
+ const [amount, setAmount] = useState4(void 0);
3117
+ const [sourceChainId, setSourceChainId] = useState4(chainId);
3045
3118
  const sourceChain = chains.find(({ id }) => id === sourceChainId);
3046
3119
  return /* @__PURE__ */ jsxs22("div", { className: "pt-10 pb-2", children: [
3047
- destinationChainId === sourceChainId ? /* @__PURE__ */ jsx38(
3120
+ destinationChainId === sourceChainId ? /* @__PURE__ */ jsx37(
3048
3121
  DepositViaTransferForm,
3049
3122
  {
3050
3123
  amount,
@@ -3052,7 +3125,7 @@ function DepositFormContainer() {
3052
3125
  sourceChain,
3053
3126
  setSourceChainId
3054
3127
  }
3055
- ) : /* @__PURE__ */ jsx38(
3128
+ ) : /* @__PURE__ */ jsx37(
3056
3129
  DepositViaRelayForm,
3057
3130
  {
3058
3131
  amount,
@@ -3061,14 +3134,14 @@ function DepositFormContainer() {
3061
3134
  setSourceChainId
3062
3135
  }
3063
3136
  ),
3064
- /* @__PURE__ */ jsx38(Deposits, {})
3137
+ /* @__PURE__ */ jsx37(Deposits, {})
3065
3138
  ] });
3066
3139
  }
3067
3140
 
3068
3141
  // src/icons/ArrowLeftIcon.tsx
3069
- import { jsx as jsx39 } from "react/jsx-runtime";
3142
+ import { jsx as jsx38 } from "react/jsx-runtime";
3070
3143
  function ArrowLeftIcon(props) {
3071
- return /* @__PURE__ */ jsx39(IconSVG, { ...props, children: /* @__PURE__ */ jsx39(
3144
+ return /* @__PURE__ */ jsx38(IconSVG, { ...props, children: /* @__PURE__ */ jsx38(
3072
3145
  "path",
3073
3146
  {
3074
3147
  d: "M19 12H5M12 19l-7-7 7-7",
@@ -3081,12 +3154,92 @@ function ArrowLeftIcon(props) {
3081
3154
  ) });
3082
3155
  }
3083
3156
 
3157
+ // src/onboarding/quarry/WithdrawGasBalanceButton.tsx
3158
+ import { getAction as getAction6 } from "viem/utils";
3159
+ import { waitForTransactionReceipt as waitForTransactionReceipt3 } from "viem/actions";
3160
+ import { useAccount as useAccount7, useClient as useClient13, useSwitchChain as useSwitchChain3, useWriteContract as useWriteContract2 } from "wagmi";
3161
+ import { twMerge as twMerge17 } from "tailwind-merge";
3162
+ import { useMutation as useMutation6 } from "@tanstack/react-query";
3163
+ import { useQueryClient as useQueryClient9 } from "@tanstack/react-query";
3164
+ import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
3165
+ function WithdrawGasBalanceButton({ userAddress }) {
3166
+ const { writeContractAsync } = useWriteContract2();
3167
+ const { switchChain } = useSwitchChain3();
3168
+ const { chain, chainId } = useEntryKitConfig();
3169
+ const { chainId: userChainId } = useAccount7();
3170
+ const queryClient = useQueryClient9();
3171
+ const client = useClient13({ chainId });
3172
+ const paymaster = getPaymaster(chain);
3173
+ const balance = useShowQueryError(useBalance(userAddress));
3174
+ const shouldSwitchChain = chainId != null && chainId !== userChainId;
3175
+ const withdraw = useMutation6({
3176
+ mutationKey: ["withdraw", userAddress],
3177
+ mutationFn: async () => {
3178
+ if (!client) throw new Error("Client not ready.");
3179
+ if (!paymaster) throw new Error("Paymaster not found");
3180
+ if (!balance.data) throw new Error("No gas balance to withdraw.");
3181
+ try {
3182
+ const hash = await writeContractAsync({
3183
+ address: paymaster.address,
3184
+ abi: paymasterAbi,
3185
+ functionName: "withdrawTo",
3186
+ args: [userAddress, balance.data],
3187
+ chainId
3188
+ });
3189
+ await getAction6(client, waitForTransactionReceipt3, "waitForTransactionReceipt")({ hash });
3190
+ await Promise.all([
3191
+ queryClient.invalidateQueries({ queryKey: ["balance"] }),
3192
+ queryClient.invalidateQueries({ queryKey: ["getFunds"] }),
3193
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] })
3194
+ ]);
3195
+ } catch (error2) {
3196
+ console.error("Error while withdrawing", error2);
3197
+ throw error2;
3198
+ }
3199
+ }
3200
+ });
3201
+ if (balance.data == null || balance.data === 0n) {
3202
+ return null;
3203
+ }
3204
+ return /* @__PURE__ */ jsx39(
3205
+ "button",
3206
+ {
3207
+ onClick: () => {
3208
+ if (shouldSwitchChain) {
3209
+ return switchChain({ chainId });
3210
+ }
3211
+ withdraw.mutate();
3212
+ },
3213
+ className: twMerge17(
3214
+ "text-sm font-medium text-white/50 group whitespace-nowrap",
3215
+ withdraw.isPending ? "opacity-50 pointer-events-none" : "cursor-pointer hover:text-white"
3216
+ ),
3217
+ disabled: withdraw.isPending,
3218
+ children: /* @__PURE__ */ jsxs23("span", { className: "inline-block", children: [
3219
+ /* @__PURE__ */ jsxs23(
3220
+ "span",
3221
+ {
3222
+ className: twMerge17(
3223
+ "inline-flex items-center gap-1 underline decoration-neutral-500 underline-offset-4",
3224
+ !withdraw.isPending && "hover:decoration-orange-500",
3225
+ shouldSwitchChain && "group-hover:hidden"
3226
+ ),
3227
+ children: [
3228
+ withdraw.isPending && /* @__PURE__ */ jsx39(PendingIcon, { className: "w-3 h-3" }),
3229
+ "Withdraw"
3230
+ ]
3231
+ }
3232
+ ),
3233
+ shouldSwitchChain && /* @__PURE__ */ jsx39("span", { className: "hidden group-hover:inline-block underline decoration-neutral-500 underline-offset-4 hover:decoration-orange-500", children: "Switch chain" })
3234
+ ] })
3235
+ }
3236
+ );
3237
+ }
3238
+
3084
3239
  // src/onboarding/quarry/GasBalance.tsx
3085
- import { useEffect as useEffect14 } from "react";
3086
- import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
3087
- import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
3240
+ import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
3088
3241
  function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress }) {
3089
- const queryClient = useQueryClient8();
3242
+ const queryClient = useQueryClient10();
3090
3243
  const balance = useShowQueryError(useBalance(userAddress));
3091
3244
  const prevBalance = usePrevious(balance.data || 0n);
3092
3245
  useEffect14(() => {
@@ -3096,7 +3249,7 @@ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress
3096
3249
  }
3097
3250
  }, [balance.data, prevBalance, setFocused, queryClient, userAddress]);
3098
3251
  if (isFocused) {
3099
- return /* @__PURE__ */ jsxs23(Fragment7, { children: [
3252
+ return /* @__PURE__ */ jsxs24("div", { children: [
3100
3253
  isFocused && /* @__PURE__ */ jsx40("div", { className: "absolute top-0 left-0", children: /* @__PURE__ */ jsx40(
3101
3254
  "div",
3102
3255
  {
@@ -3108,23 +3261,26 @@ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress
3108
3261
  /* @__PURE__ */ jsx40(DepositFormContainer, {})
3109
3262
  ] });
3110
3263
  }
3111
- return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4", children: [
3112
- /* @__PURE__ */ jsxs23("div", { className: "flex justify-between gap-4", children: [
3113
- /* @__PURE__ */ jsxs23("div", { children: [
3264
+ return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4", children: [
3265
+ /* @__PURE__ */ jsxs24("div", { className: "flex justify-between gap-4", children: [
3266
+ /* @__PURE__ */ jsxs24("div", { children: [
3114
3267
  /* @__PURE__ */ jsx40("div", { children: "Gas balance" }),
3115
3268
  /* @__PURE__ */ jsx40("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx40(Balance, { wei: balance.data }) : /* @__PURE__ */ jsx40(PendingIcon, { className: "text-sm" }) })
3116
3269
  ] }),
3117
- /* @__PURE__ */ jsx40(
3118
- Button,
3119
- {
3120
- variant: isActive ? "primary" : "tertiary",
3121
- className: "flex-shrink-0 text-sm p-1 w-28",
3122
- autoFocus: isActive || isExpanded,
3123
- pending: balance.status === "pending",
3124
- onClick: () => setFocused(true),
3125
- children: "Top up"
3126
- }
3127
- )
3270
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1 justify-center items-center", children: [
3271
+ /* @__PURE__ */ jsx40(
3272
+ Button,
3273
+ {
3274
+ variant: isActive ? "primary" : "tertiary",
3275
+ className: "flex-shrink-0 text-sm p-1 w-28",
3276
+ autoFocus: isActive || isExpanded,
3277
+ pending: balance.status === "pending",
3278
+ onClick: () => setFocused(true),
3279
+ children: "Top up"
3280
+ }
3281
+ ),
3282
+ /* @__PURE__ */ jsx40(WithdrawGasBalanceButton, { userAddress })
3283
+ ] })
3128
3284
  ] }),
3129
3285
  isExpanded ? /* @__PURE__ */ jsx40("p", { className: "text-sm", children: "Your gas balance is used to pay for onchain computation." }) : null
3130
3286
  ] });
@@ -3135,7 +3291,7 @@ import { jsx as jsx41 } from "react/jsx-runtime";
3135
3291
  function ConnectedSteps({ userClient, initialUserAddress }) {
3136
3292
  const { chain } = useEntryKitConfig();
3137
3293
  const paymaster = getPaymaster(chain);
3138
- const [focusedId, setFocusedId] = useState6(null);
3294
+ const [focusedId, setFocusedId] = useState5(null);
3139
3295
  const userAddress = userClient.account.address;
3140
3296
  const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
3141
3297
  useEffect15(() => {
@@ -3145,7 +3301,7 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3145
3301
  }, [prerequisitesError]);
3146
3302
  const { closeAccountModal } = useAccountModal();
3147
3303
  const isNewConnection = userAddress !== initialUserAddress;
3148
- const initialPrerequisites = useRef4(prerequisites);
3304
+ const initialPrerequisites = useRef5(prerequisites);
3149
3305
  useEffect15(() => {
3150
3306
  if (prerequisites == null) return;
3151
3307
  if (initialPrerequisites.current == null) {
@@ -3215,7 +3371,7 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3215
3371
  userAddress,
3216
3372
  userClient
3217
3373
  ]);
3218
- const [selectedStepId] = useState6(null);
3374
+ const [selectedStepId] = useState5(null);
3219
3375
  const nextStep = steps.find((step) => step.content != null && !step.isComplete);
3220
3376
  const completedSteps = steps.filter((step) => step.isComplete);
3221
3377
  const activeStep = (selectedStepId != null ? steps.find((step) => step.id === selectedStepId) : null) ?? nextStep ?? (completedSteps.length < steps.length ? completedSteps.at(-1) : null);
@@ -3223,9 +3379,9 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3223
3379
  return /* @__PURE__ */ jsx41(
3224
3380
  "div",
3225
3381
  {
3226
- className: twMerge17(
3382
+ className: twMerge18(
3227
3383
  "px-8 flex flex-col",
3228
- focusedId && "divide-y divide-neutral-800",
3384
+ "divide-y divide-neutral-800",
3229
3385
  "animate-in animate-duration-300 fade-in slide-in-from-bottom-8"
3230
3386
  ),
3231
3387
  children: steps.map((step, i) => {
@@ -3245,20 +3401,20 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3245
3401
  }
3246
3402
  return null;
3247
3403
  }
3248
- return /* @__PURE__ */ jsx41("div", { className: twMerge17("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx41("div", { className: twMerge17("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: content }) }, step.id);
3404
+ return /* @__PURE__ */ jsx41("div", { className: twMerge18("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx41("div", { className: twMerge18("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: content }) }, step.id);
3249
3405
  })
3250
3406
  }
3251
3407
  );
3252
3408
  }
3253
3409
 
3254
3410
  // src/AccountModalContent.tsx
3255
- import { useRef as useRef5 } from "react";
3411
+ import { useRef as useRef6 } from "react";
3256
3412
  import { jsx as jsx42 } from "react/jsx-runtime";
3257
3413
  function AccountModalContent() {
3258
3414
  const { chainId } = useEntryKitConfig();
3259
3415
  const userClient = useConnectorClient({ chainId });
3260
3416
  const { address: userAddress } = useAccount8();
3261
- const initialUserAddress = useRef5(userAddress);
3417
+ const initialUserAddress = useRef6(userAddress);
3262
3418
  if (userClient.status !== "success") {
3263
3419
  return /* @__PURE__ */ jsx42(ConnectWallet, {});
3264
3420
  }
@@ -3272,19 +3428,19 @@ import { ErrorBoundary } from "react-error-boundary";
3272
3428
  // src/errors/ErrorOverlay.tsx
3273
3429
  import { wait } from "@latticexyz/common/utils";
3274
3430
  import { useEffect as useEffect16 } from "react";
3275
- import { twMerge as twMerge18 } from "tailwind-merge";
3276
- import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
3431
+ import { twMerge as twMerge19 } from "tailwind-merge";
3432
+ import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
3277
3433
  function ErrorOverlay({ error: error2, retry, dismiss }) {
3278
3434
  useEffect16(() => {
3279
3435
  if (error2) {
3280
3436
  console.error(error2);
3281
3437
  }
3282
3438
  }, [error2]);
3283
- return /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3439
+ return /* @__PURE__ */ jsxs25("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3284
3440
  /* @__PURE__ */ jsx43(
3285
3441
  "div",
3286
3442
  {
3287
- className: twMerge18(
3443
+ className: twMerge19(
3288
3444
  "absolute inset-0 bg-blue-700/60",
3289
3445
  "transition duration-300",
3290
3446
  error2 ? "opacity-100 pointer-events-auto" : "opacity-0"
@@ -3294,24 +3450,24 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
3294
3450
  /* @__PURE__ */ jsx43(
3295
3451
  "div",
3296
3452
  {
3297
- className: twMerge18(
3453
+ className: twMerge19(
3298
3454
  "absolute inset-0 pb-8",
3299
3455
  "transition duration-300",
3300
3456
  error2 ? "translate-y-0 opacity-100 pointer-events-auto" : "-translate-y-4 opacity-0"
3301
3457
  ),
3302
- children: error2 ? /* @__PURE__ */ jsx43(Fragment8, { children: /* @__PURE__ */ jsxs24("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3303
- /* @__PURE__ */ jsxs24("div", { className: "space-y-6 px-8 pt-8", children: [
3458
+ children: error2 ? /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsxs25("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3459
+ /* @__PURE__ */ jsxs25("div", { className: "space-y-6 px-8 pt-8", children: [
3304
3460
  /* @__PURE__ */ jsx43("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
3305
3461
  /* @__PURE__ */ jsx43("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
3306
3462
  /* @__PURE__ */ jsx43("div", { className: "text-sm", children: "See the console for more info." })
3307
3463
  ] }),
3308
- /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3464
+ /* @__PURE__ */ jsxs25("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3309
3465
  /* @__PURE__ */ jsx43("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
3310
- retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs24(
3466
+ retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs25(
3311
3467
  "button",
3312
3468
  {
3313
3469
  type: "button",
3314
- className: twMerge18(
3470
+ className: twMerge19(
3315
3471
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
3316
3472
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
3317
3473
  "text-white text-sm font-medium",
@@ -3334,7 +3490,7 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
3334
3490
  "button",
3335
3491
  {
3336
3492
  type: "button",
3337
- className: twMerge18(
3493
+ className: twMerge19(
3338
3494
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
3339
3495
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
3340
3496
  "text-white text-sm font-medium",
@@ -3366,13 +3522,13 @@ function ErrorsOverlay() {
3366
3522
  }
3367
3523
 
3368
3524
  // src/AccountModal.tsx
3369
- import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
3525
+ import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3370
3526
  function AccountModal() {
3371
3527
  const { accountModalOpen, toggleAccountModal } = useAccountModal();
3372
- return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs25(
3528
+ return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs26(
3373
3529
  "div",
3374
3530
  {
3375
- className: twMerge19(
3531
+ className: twMerge20(
3376
3532
  "relative py-2 ring-1",
3377
3533
  "bg-neutral-900 text-neutral-400 ring-neutral-700/50",
3378
3534
  "links:font-medium links:underline links:underline-offset-4",
@@ -3380,11 +3536,11 @@ function AccountModal() {
3380
3536
  "links:decoration-neutral-500 hover:links:decoration-orange-500"
3381
3537
  ),
3382
3538
  children: [
3383
- /* @__PURE__ */ jsxs25(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3539
+ /* @__PURE__ */ jsxs26(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3384
3540
  /* @__PURE__ */ jsx46(AccountModalContent, {}),
3385
3541
  /* @__PURE__ */ jsx46(ErrorsOverlay, {})
3386
3542
  ] }),
3387
- /* @__PURE__ */ jsxs25(
3543
+ /* @__PURE__ */ jsxs26(
3388
3544
  "a",
3389
3545
  {
3390
3546
  href: "https://mud.dev",
@@ -3400,7 +3556,7 @@ function AccountModal() {
3400
3556
  /* @__PURE__ */ jsx46("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx46(
3401
3557
  DialogClose,
3402
3558
  {
3403
- className: twMerge19(
3559
+ className: twMerge20(
3404
3560
  "pointer-events-auto leading-none p-2 transition",
3405
3561
  "text-white/20 hover:text-white/40"
3406
3562
  ),
@@ -3414,9 +3570,9 @@ function AccountModal() {
3414
3570
  }
3415
3571
 
3416
3572
  // src/EntryKitProvider.tsx
3417
- import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
3573
+ import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3418
3574
  function EntryKitProvider({ config, children }) {
3419
- return /* @__PURE__ */ jsxs26(EntryKitConfigProvider, { config, children: [
3575
+ return /* @__PURE__ */ jsxs27(EntryKitConfigProvider, { config, children: [
3420
3576
  children,
3421
3577
  /* @__PURE__ */ jsx47(AccountModal, {})
3422
3578
  ] });
@@ -3424,21 +3580,21 @@ function EntryKitProvider({ config, children }) {
3424
3580
 
3425
3581
  // src/AccountButton.tsx
3426
3582
  import { useAccount as useAccount9 } from "wagmi";
3427
- import { twMerge as twMerge21 } from "tailwind-merge";
3583
+ import { twMerge as twMerge22 } from "tailwind-merge";
3428
3584
 
3429
3585
  // src/AccountName.tsx
3430
- import { twMerge as twMerge20 } from "tailwind-merge";
3431
- import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
3586
+ import { twMerge as twMerge21 } from "tailwind-merge";
3587
+ import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3432
3588
  function AccountName({ address }) {
3433
3589
  const { data: ens } = useENS(address);
3434
3590
  const avatar = usePreloadImage(ens?.avatar);
3435
- return /* @__PURE__ */ jsxs27(Fragment9, { children: [
3436
- /* @__PURE__ */ jsxs27("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3591
+ return /* @__PURE__ */ jsxs28(Fragment7, { children: [
3592
+ /* @__PURE__ */ jsxs28("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3437
3593
  /* @__PURE__ */ jsx48(
3438
3594
  "img",
3439
3595
  {
3440
3596
  src: ens?.avatar && avatar.isSuccess ? ens.avatar : void 0,
3441
- className: twMerge20(
3597
+ className: twMerge21(
3442
3598
  "col-start-1 row-start-1",
3443
3599
  "inline-flex w-full h-full rounded-full bg-black/10 dark:bg-white/10 bg-cover bg-no-repeat bg-center",
3444
3600
  "transtion duration-300",
@@ -3449,7 +3605,7 @@ function AccountName({ address }) {
3449
3605
  /* @__PURE__ */ jsx48(
3450
3606
  Logo,
3451
3607
  {
3452
- className: twMerge20(
3608
+ className: twMerge21(
3453
3609
  "col-start-1 row-start-1 text-orange-500",
3454
3610
  "transition duration-300",
3455
3611
  ens && (!ens.avatar || avatar.isError) ? "opacity-100" : "opacity-0"
@@ -3462,24 +3618,24 @@ function AccountName({ address }) {
3462
3618
  }
3463
3619
 
3464
3620
  // src/AccountButton.tsx
3465
- import { useRef as useRef6 } from "react";
3466
- import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3467
- var containerClassNames = twMerge21(
3621
+ import { useRef as useRef7 } from "react";
3622
+ import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
3623
+ var containerClassNames = twMerge22(
3468
3624
  "w-48 p-3 inline-flex outline-none transition",
3469
3625
  "border border-transparent",
3470
3626
  "text-base leading-none"
3471
3627
  );
3472
- var secondaryClassNames = twMerge21(
3628
+ var secondaryClassNames = twMerge22(
3473
3629
  "bg-neutral-100 border-neutral-300 text-black",
3474
3630
  "dark:bg-neutral-800 dark:border-neutral-700 dark:text-white"
3475
3631
  );
3476
- var secondaryInteractiveClassNames = twMerge21(
3632
+ var secondaryInteractiveClassNames = twMerge22(
3477
3633
  "cursor-pointer outline-none hover:bg-neutral-200 data-[highlighted]:bg-neutral-200 dark:hover:bg-neutral-700"
3478
3634
  );
3479
3635
  function AccountButton() {
3480
3636
  const { openAccountModal, accountModalOpen } = useAccountModal();
3481
3637
  const { status, address: userAddress } = useAccount9();
3482
- const initialUserAddress = useRef6(userAddress);
3638
+ const initialUserAddress = useRef7(userAddress);
3483
3639
  const prereqs = usePrerequisites(userAddress);
3484
3640
  const isConnected = status === "connected" || status === "reconnecting" && userAddress;
3485
3641
  const isNewConnection = userAddress !== initialUserAddress.current;
@@ -3495,16 +3651,16 @@ function AccountButton() {
3495
3651
  "button",
3496
3652
  {
3497
3653
  type: "button",
3498
- className: twMerge21(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3654
+ className: twMerge22(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3499
3655
  onClick: openAccountModal,
3500
3656
  children: /* @__PURE__ */ jsx49("span", { className: "flex-grow inline-flex gap-2.5 items-center text-left font-medium", children: userAddress ? /* @__PURE__ */ jsx49(AccountName, { address: userAddress }) : null })
3501
3657
  },
3502
3658
  "connected"
3503
- ) : /* @__PURE__ */ jsxs28(
3659
+ ) : /* @__PURE__ */ jsxs29(
3504
3660
  "button",
3505
3661
  {
3506
3662
  type: "button",
3507
- className: twMerge21(
3663
+ className: twMerge22(
3508
3664
  containerClassNames,
3509
3665
  "group",
3510
3666
  "items-center justify-center gap-2.5",
@@ -3512,14 +3668,14 @@ function AccountButton() {
3512
3668
  "hover:bg-orange-400",
3513
3669
  "active:bg-orange-600"
3514
3670
  ),
3515
- "aria-busy": accountModalOpen,
3671
+ "aria-busy": accountModalOpen || prereqs.isPending,
3516
3672
  onClick: openAccountModal,
3517
3673
  children: [
3518
- /* @__PURE__ */ jsxs28("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3674
+ /* @__PURE__ */ jsxs29("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3519
3675
  /* @__PURE__ */ jsx49(
3520
3676
  "span",
3521
3677
  {
3522
- className: twMerge21(
3678
+ className: twMerge22(
3523
3679
  "col-start-1 row-start-1 leading-none",
3524
3680
  "scale-100 opacity-100 transition duration-300",
3525
3681
  "group-aria-busy:scale-125 group-aria-busy:opacity-0"
@@ -3531,7 +3687,7 @@ function AccountButton() {
3531
3687
  "span",
3532
3688
  {
3533
3689
  "aria-hidden": true,
3534
- className: twMerge21(
3690
+ className: twMerge22(
3535
3691
  "col-start-1 row-start-1",
3536
3692
  "scale-50 opacity-0 transition duration-300 delay-50",
3537
3693
  "group-aria-busy:scale-100 group-aria-busy:opacity-100"
@@ -3556,50 +3712,386 @@ function useSessionClientReady() {
3556
3712
  const userAddress = userClient.data?.account.address;
3557
3713
  const prerequisites = usePrerequisites(userAddress);
3558
3714
  const sessionClient = useSessionClient(userAddress);
3559
- if (!userClient.isSuccess) return { ...userClient, data: void 0 };
3560
- if (!prerequisites.isSuccess || !prerequisites.data.complete) return { ...prerequisites, data: void 0 };
3715
+ if (!prerequisites.isSuccess || !prerequisites.data.complete) {
3716
+ return { ...prerequisites, data: void 0 };
3717
+ }
3561
3718
  return sessionClient;
3562
3719
  }
3563
3720
 
3564
3721
  // src/createWagmiConfig.ts
3565
- import { connectorsForWallets } from "@rainbow-me/rainbowkit";
3566
3722
  import { createConfig } from "wagmi";
3723
+ import { getDefaultConfig } from "connectkit";
3724
+ import { injected, coinbaseWallet, safe } from "wagmi/connectors";
3567
3725
 
3568
- // src/getWallets.ts
3569
- import { getDefaultWallets } from "@rainbow-me/rainbowkit";
3570
- function getWallets(_config) {
3571
- const { wallets: defaultWallets } = getDefaultWallets();
3572
- return [
3573
- // TODO: passkey wallet
3574
- ...defaultWallets
3575
- ];
3726
+ // src/connectors/walletConnect.ts
3727
+ import { ChainNotConfiguredError, ProviderNotFoundError, createConnector } from "wagmi";
3728
+ import {
3729
+ SwitchChainError,
3730
+ UserRejectedRequestError,
3731
+ getAddress,
3732
+ numberToHex as numberToHex3
3733
+ } from "viem";
3734
+ walletConnect.type = "walletConnect";
3735
+ function walletConnect(parameters) {
3736
+ const isNewChainsStale = parameters.isNewChainsStale ?? true;
3737
+ let provider_;
3738
+ let providerPromise;
3739
+ const NAMESPACE = "eip155";
3740
+ let accountsChanged;
3741
+ let chainChanged;
3742
+ let connect;
3743
+ let displayUri;
3744
+ let sessionDelete;
3745
+ let disconnect;
3746
+ return createConnector((config) => ({
3747
+ id: "walletConnect",
3748
+ name: "WalletConnect",
3749
+ type: walletConnect.type,
3750
+ async setup() {
3751
+ const provider = await this.getProvider().catch(() => null);
3752
+ if (!provider) return;
3753
+ if (!connect) {
3754
+ connect = this.onConnect.bind(this);
3755
+ provider.on("connect", connect);
3756
+ }
3757
+ if (!sessionDelete) {
3758
+ sessionDelete = this.onSessionDelete.bind(this);
3759
+ provider.on("session_delete", sessionDelete);
3760
+ }
3761
+ },
3762
+ async connect({ chainId, ...rest } = {}) {
3763
+ try {
3764
+ const provider = await this.getProvider();
3765
+ if (!provider) throw new ProviderNotFoundError();
3766
+ if (!displayUri) {
3767
+ displayUri = this.onDisplayUri;
3768
+ provider.on("display_uri", displayUri);
3769
+ }
3770
+ let targetChainId = chainId;
3771
+ if (!targetChainId) {
3772
+ const state = await config.storage?.getItem("state") ?? {};
3773
+ const isChainSupported = config.chains.some((x) => x.id === state.chainId);
3774
+ if (isChainSupported) targetChainId = state.chainId;
3775
+ else targetChainId = config.chains[0]?.id;
3776
+ }
3777
+ if (!targetChainId) throw new Error("No chains found on connector.");
3778
+ const isChainsStale = await this.isChainsStale();
3779
+ if (provider.session && isChainsStale) await provider.disconnect();
3780
+ if (!provider.session || isChainsStale) {
3781
+ const optionalChains = config.chains.filter((chain) => chain.id !== targetChainId).map((optionalChain) => optionalChain.id);
3782
+ await provider.connect({
3783
+ optionalChains: [targetChainId, ...optionalChains],
3784
+ ..."pairingTopic" in rest ? { pairingTopic: rest.pairingTopic } : {}
3785
+ });
3786
+ this.setRequestedChainsIds(config.chains.map((x) => x.id));
3787
+ }
3788
+ const accounts = (await provider.enable()).map((x) => getAddress(x));
3789
+ let currentChainId = await this.getChainId();
3790
+ if (chainId && currentChainId !== chainId) {
3791
+ const chain = await this.switchChain({ chainId }).catch((error2) => {
3792
+ if (error2.code === UserRejectedRequestError.code) throw error2;
3793
+ return { id: currentChainId };
3794
+ });
3795
+ currentChainId = chain?.id ?? currentChainId;
3796
+ }
3797
+ if (displayUri) {
3798
+ provider.removeListener("display_uri", displayUri);
3799
+ displayUri = void 0;
3800
+ }
3801
+ if (connect) {
3802
+ provider.removeListener("connect", connect);
3803
+ connect = void 0;
3804
+ }
3805
+ if (!accountsChanged) {
3806
+ accountsChanged = this.onAccountsChanged.bind(this);
3807
+ provider.on("accountsChanged", accountsChanged);
3808
+ }
3809
+ if (!chainChanged) {
3810
+ chainChanged = this.onChainChanged.bind(this);
3811
+ provider.on("chainChanged", chainChanged);
3812
+ }
3813
+ if (!disconnect) {
3814
+ disconnect = this.onDisconnect.bind(this);
3815
+ provider.on("disconnect", disconnect);
3816
+ }
3817
+ if (!sessionDelete) {
3818
+ sessionDelete = this.onSessionDelete.bind(this);
3819
+ provider.on("session_delete", sessionDelete);
3820
+ }
3821
+ return { accounts, chainId: currentChainId };
3822
+ } catch (error2) {
3823
+ if (/(user rejected|connection request reset)/i.test(error2?.message)) {
3824
+ throw new UserRejectedRequestError(error2);
3825
+ }
3826
+ throw error2;
3827
+ }
3828
+ },
3829
+ async disconnect() {
3830
+ const provider = await this.getProvider();
3831
+ try {
3832
+ await provider?.disconnect();
3833
+ } catch (error2) {
3834
+ if (!/No matching key/i.test(error2.message)) throw error2;
3835
+ } finally {
3836
+ if (chainChanged) {
3837
+ provider?.removeListener("chainChanged", chainChanged);
3838
+ chainChanged = void 0;
3839
+ }
3840
+ if (disconnect) {
3841
+ provider?.removeListener("disconnect", disconnect);
3842
+ disconnect = void 0;
3843
+ }
3844
+ if (!connect) {
3845
+ connect = this.onConnect.bind(this);
3846
+ provider?.on("connect", connect);
3847
+ }
3848
+ if (accountsChanged) {
3849
+ provider?.removeListener("accountsChanged", accountsChanged);
3850
+ accountsChanged = void 0;
3851
+ }
3852
+ if (sessionDelete) {
3853
+ provider?.removeListener("session_delete", sessionDelete);
3854
+ sessionDelete = void 0;
3855
+ }
3856
+ this.setRequestedChainsIds([]);
3857
+ }
3858
+ },
3859
+ async getAccounts() {
3860
+ const provider = await this.getProvider();
3861
+ return provider.accounts.map((x) => getAddress(x));
3862
+ },
3863
+ async getProvider() {
3864
+ async function initProvider() {
3865
+ const optionalChains = config.chains.map((x) => x.id);
3866
+ if (!optionalChains.length) return;
3867
+ const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
3868
+ return await EthereumProvider.init({
3869
+ ...parameters,
3870
+ disableProviderPing: true,
3871
+ optionalChains,
3872
+ projectId: parameters.projectId,
3873
+ rpcMap: Object.fromEntries(
3874
+ config.chains.map((chain) => {
3875
+ const [url] = extractRpcUrls({
3876
+ chain,
3877
+ transports: config.transports
3878
+ });
3879
+ return [chain.id, url];
3880
+ })
3881
+ ),
3882
+ showQrModal: parameters.showQrModal ?? true
3883
+ });
3884
+ }
3885
+ if (!provider_) {
3886
+ if (!providerPromise) providerPromise = initProvider();
3887
+ provider_ = await providerPromise;
3888
+ provider_?.events.setMaxListeners(Number.POSITIVE_INFINITY);
3889
+ }
3890
+ return provider_;
3891
+ },
3892
+ async getChainId() {
3893
+ const provider = await this.getProvider();
3894
+ return provider.chainId;
3895
+ },
3896
+ async isAuthorized() {
3897
+ try {
3898
+ const [accounts, provider] = await Promise.all([this.getAccounts(), this.getProvider()]);
3899
+ if (!accounts.length) return false;
3900
+ const isChainsStale = await this.isChainsStale();
3901
+ if (isChainsStale && provider.session) {
3902
+ await provider.disconnect().catch(() => {
3903
+ });
3904
+ return false;
3905
+ }
3906
+ return true;
3907
+ } catch {
3908
+ return false;
3909
+ }
3910
+ },
3911
+ async switchChain({ addEthereumChainParameter, chainId }) {
3912
+ const provider = await this.getProvider();
3913
+ if (!provider) throw new ProviderNotFoundError();
3914
+ const chain = config.chains.find((x) => x.id === chainId);
3915
+ if (!chain) throw new SwitchChainError(new ChainNotConfiguredError());
3916
+ try {
3917
+ await Promise.all([
3918
+ new Promise((resolve) => {
3919
+ const listener2 = ({ chainId: currentChainId }) => {
3920
+ if (currentChainId === chainId) {
3921
+ config.emitter.off("change", listener2);
3922
+ resolve();
3923
+ }
3924
+ };
3925
+ config.emitter.on("change", listener2);
3926
+ }),
3927
+ provider.request({
3928
+ method: "wallet_switchEthereumChain",
3929
+ params: [{ chainId: numberToHex3(chainId) }]
3930
+ })
3931
+ ]);
3932
+ const requestedChains = await this.getRequestedChainsIds();
3933
+ this.setRequestedChainsIds([...requestedChains, chainId]);
3934
+ return chain;
3935
+ } catch (err) {
3936
+ const error2 = err;
3937
+ if (/(user rejected)/i.test(error2.message)) throw new UserRejectedRequestError(error2);
3938
+ try {
3939
+ let blockExplorerUrls;
3940
+ if (addEthereumChainParameter?.blockExplorerUrls)
3941
+ blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls;
3942
+ else blockExplorerUrls = chain.blockExplorers?.default.url ? [chain.blockExplorers?.default.url] : [];
3943
+ let rpcUrls;
3944
+ if (addEthereumChainParameter?.rpcUrls?.length) rpcUrls = addEthereumChainParameter.rpcUrls;
3945
+ else rpcUrls = [...chain.rpcUrls.default.http];
3946
+ const addEthereumChain = {
3947
+ blockExplorerUrls,
3948
+ chainId: numberToHex3(chainId),
3949
+ chainName: addEthereumChainParameter?.chainName ?? chain.name,
3950
+ iconUrls: addEthereumChainParameter?.iconUrls,
3951
+ nativeCurrency: addEthereumChainParameter?.nativeCurrency ?? chain.nativeCurrency,
3952
+ rpcUrls
3953
+ };
3954
+ await provider.request({
3955
+ method: "wallet_addEthereumChain",
3956
+ params: [addEthereumChain]
3957
+ });
3958
+ const requestedChains = await this.getRequestedChainsIds();
3959
+ this.setRequestedChainsIds([...requestedChains, chainId]);
3960
+ return chain;
3961
+ } catch (error3) {
3962
+ throw new UserRejectedRequestError(error3);
3963
+ }
3964
+ }
3965
+ },
3966
+ onAccountsChanged(accounts) {
3967
+ if (accounts.length === 0) this.onDisconnect();
3968
+ else
3969
+ config.emitter.emit("change", {
3970
+ accounts: accounts.map((x) => getAddress(x))
3971
+ });
3972
+ },
3973
+ onChainChanged(chain) {
3974
+ const chainId = Number(chain);
3975
+ config.emitter.emit("change", { chainId });
3976
+ },
3977
+ async onConnect(connectInfo) {
3978
+ const chainId = Number(connectInfo.chainId);
3979
+ const accounts = await this.getAccounts();
3980
+ config.emitter.emit("connect", { accounts, chainId });
3981
+ },
3982
+ async onDisconnect(_error) {
3983
+ this.setRequestedChainsIds([]);
3984
+ config.emitter.emit("disconnect");
3985
+ const provider = await this.getProvider();
3986
+ if (accountsChanged) {
3987
+ provider.removeListener("accountsChanged", accountsChanged);
3988
+ accountsChanged = void 0;
3989
+ }
3990
+ if (chainChanged) {
3991
+ provider.removeListener("chainChanged", chainChanged);
3992
+ chainChanged = void 0;
3993
+ }
3994
+ if (disconnect) {
3995
+ provider.removeListener("disconnect", disconnect);
3996
+ disconnect = void 0;
3997
+ }
3998
+ if (sessionDelete) {
3999
+ provider.removeListener("session_delete", sessionDelete);
4000
+ sessionDelete = void 0;
4001
+ }
4002
+ if (!connect) {
4003
+ connect = this.onConnect.bind(this);
4004
+ provider.on("connect", connect);
4005
+ }
4006
+ },
4007
+ onDisplayUri(uri) {
4008
+ config.emitter.emit("message", { type: "display_uri", data: uri });
4009
+ },
4010
+ onSessionDelete() {
4011
+ this.onDisconnect();
4012
+ },
4013
+ getNamespaceChainsIds() {
4014
+ if (!provider_) return [];
4015
+ const chainIds = provider_.session?.namespaces[NAMESPACE]?.accounts?.map(
4016
+ (account) => Number.parseInt(account.split(":")[1] || "")
4017
+ );
4018
+ return chainIds ?? [];
4019
+ },
4020
+ async getRequestedChainsIds() {
4021
+ return await config.storage?.getItem(this.requestedChainsStorageKey) ?? [];
4022
+ },
4023
+ /**
4024
+ * Checks if the target chains match the chains that were
4025
+ * initially requested by the connector for the WalletConnect session.
4026
+ * If there is a mismatch, this means that the chains on the connector
4027
+ * are considered stale, and need to be revalidated at a later point (via
4028
+ * connection).
4029
+ *
4030
+ * There may be a scenario where a dapp adds a chain to the
4031
+ * connector later on, however, this chain will not have been approved or rejected
4032
+ * by the wallet. In this case, the chain is considered stale.
4033
+ */
4034
+ async isChainsStale() {
4035
+ if (!isNewChainsStale) return false;
4036
+ const connectorChains = config.chains.map((x) => x.id);
4037
+ const namespaceChains = this.getNamespaceChainsIds();
4038
+ if (namespaceChains.length && !namespaceChains.some((id) => connectorChains.includes(id))) return false;
4039
+ const requestedChains = await this.getRequestedChainsIds();
4040
+ return !connectorChains.every((id) => requestedChains.includes(id));
4041
+ },
4042
+ async setRequestedChainsIds(chains) {
4043
+ await config.storage?.setItem(this.requestedChainsStorageKey, chains);
4044
+ },
4045
+ get requestedChainsStorageKey() {
4046
+ return `${this.id}.requestedChains`;
4047
+ }
4048
+ }));
4049
+ }
4050
+ function extractRpcUrls(parameters) {
4051
+ const { chain } = parameters;
4052
+ const fallbackUrl = chain.rpcUrls.default.http[0];
4053
+ if (!parameters.transports) return [fallbackUrl];
4054
+ const transport = parameters.transports?.[chain.id]?.({ chain });
4055
+ const transports = transport?.value?.transports || [transport];
4056
+ return transports.map(({ value }) => value?.url || fallbackUrl);
3576
4057
  }
3577
4058
 
3578
4059
  // src/createWagmiConfig.ts
3579
4060
  function createWagmiConfig(config) {
3580
- const wallets = getWallets(config);
3581
- const connectors = connectorsForWallets(wallets, {
3582
- appName: config.appName,
3583
- projectId: config.walletConnectProjectId
3584
- });
3585
- return createConfig({
3586
- connectors,
4061
+ const connectors = [];
4062
+ const shouldUseSafeConnector = !(typeof window === "undefined") && window?.parent !== window;
4063
+ if (shouldUseSafeConnector) {
4064
+ connectors.push(
4065
+ safe({
4066
+ allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/]
4067
+ })
4068
+ );
4069
+ }
4070
+ connectors.push(
4071
+ injected({ target: "metaMask" }),
4072
+ coinbaseWallet({
4073
+ appName: config.appName,
4074
+ overrideIsMetaMask: false
4075
+ })
4076
+ );
4077
+ if (config.walletConnectProjectId) {
4078
+ connectors.push(
4079
+ walletConnect({
4080
+ showQrModal: false,
4081
+ projectId: config.walletConnectProjectId
4082
+ })
4083
+ );
4084
+ }
4085
+ const configParams = getDefaultConfig({
3587
4086
  chains: config.chains,
3588
4087
  transports: config.transports,
3589
- pollingInterval: config.pollingInterval
3590
- });
3591
- }
3592
-
3593
- // src/getConnectors.ts
3594
- import { connectorsForWallets as connectorsForWallets2 } from "@rainbow-me/rainbowkit";
3595
- function getConnectors({
3596
- wallets,
3597
- ...config
3598
- }) {
3599
- return connectorsForWallets2(wallets ?? getWallets(config), {
4088
+ pollingInterval: config.pollingInterval,
3600
4089
  appName: config.appName,
3601
- projectId: config.walletConnectProjectId
4090
+ walletConnectProjectId: config.walletConnectProjectId,
4091
+ enableFamily: false,
4092
+ connectors
3602
4093
  });
4094
+ return createConfig(configParams);
3603
4095
  }
3604
4096
 
3605
4097
  // src/validateSigner.ts
@@ -3650,11 +4142,11 @@ export {
3650
4142
  EntryKitProvider,
3651
4143
  createWagmiConfig,
3652
4144
  defineConfig,
3653
- getConnectors,
3654
- getWallets,
4145
+ getFundsQueryOptions,
3655
4146
  internal_validateSigner,
3656
4147
  useAccountModal,
3657
4148
  useEntryKitConfig,
4149
+ useFunds,
3658
4150
  useSessionClientReady as useSessionClient
3659
4151
  };
3660
4152
  //# sourceMappingURL=internal.js.map