@latticexyz/entrykit 2.2.22-ab837ceb49fa77cc29487bb9df0c487975b37afe → 2.2.22-bc1e7cb9cfb39fc8c81201b15f8f5528df778192

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.-mt-2 {\n margin-top: -0.5rem;\n}\n\n.block {\n display: 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.h-12 {\n height: 3rem;\n}\n\n.h-16 {\n height: 4rem;\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-full {\n height: 100%;\n}\n\n.max-h-full {\n max-height: 100%;\n}\n\n.min-h-\\[22rem\\] {\n min-height: 22rem;\n}\n\n.min-h-\\[26rem\\] {\n min-height: 26rem;\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-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-\\[0\\.6em\\] {\n width: 0.6em;\n}\n\n.w-\\[1\\.25em\\] {\n width: 1.25em;\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@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.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-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-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-4 {\n border-width: 4px;\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-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-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-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-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-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-8 {\n padding-bottom: 2rem;\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-none {\n line-height: 1;\n}\n\n.tracking-\\[-1ch\\] {\n letter-spacing: -1ch;\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / 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-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-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-neutral-700\\/50 {\n --tw-ring-color: rgb(64 64 64 / 0.5);\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.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-300 {\n transition-duration: 300ms;\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.fade-in {\n --tw-enter-opacity: 0;\n}\n\n.slide-in-from-bottom-16 {\n --tw-enter-translate-y: 4rem;\n}\n\n.slide-in-from-bottom-8 {\n --tw-enter-translate-y: 2rem;\n}\n\n.animate-duration-300 {\n animation-duration: 300ms;\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.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.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\\: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.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\\: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.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.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.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';
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';
26
26
 
27
27
  // src/ui/Shadow.tsx
28
28
  import { useResizeObserver } from "usehooks-ts";
@@ -37,6 +37,11 @@ function FrameProvider({ frame, children }) {
37
37
  if (value) throw new Error("`FrameProvider` can only be used once.");
38
38
  return /* @__PURE__ */ jsx(Context.Provider, { value: { frame }, children });
39
39
  }
40
+ function useFrame() {
41
+ const value = useContext(Context);
42
+ if (!value) throw new Error("`useFrame` can only be used within a `FrameProvider`.");
43
+ return value;
44
+ }
40
45
 
41
46
  // src/useTheme.ts
42
47
  import { useMediaQuery } from "usehooks-ts";
@@ -184,20 +189,40 @@ function userOpExecutor({ executor }) {
184
189
  }
185
190
 
186
191
  // src/getBundlerTransport.ts
192
+ import { wiresaw } from "@latticexyz/common/internal";
187
193
  function getBundlerTransport(chain) {
194
+ const ethRpcUrl = chain.rpcUrls.default.http[0];
188
195
  const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
189
- const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
190
- executor: createClient({
191
- chain,
192
- transport: fallback([webSocket(), http()]),
193
- account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
194
- pollingInterval: 10
195
- }).extend(transactionQueue())
196
- }) : null;
197
- if (!bundlerTransport) {
198
- throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
196
+ const wiresawWebSocketUrl = chain.rpcUrls.wiresaw?.webSocket?.[0];
197
+ if (wiresawWebSocketUrl) {
198
+ return wiresaw({
199
+ wiresaw: webSocket(wiresawWebSocketUrl),
200
+ fallbackBundler: http(bundlerHttpUrl),
201
+ fallbackEth: http(ethRpcUrl)
202
+ });
203
+ }
204
+ const wiresawHttpUrl = chain.rpcUrls.wiresaw?.http[0];
205
+ if (wiresawHttpUrl) {
206
+ return wiresaw({
207
+ wiresaw: http(wiresawHttpUrl),
208
+ fallbackBundler: http(bundlerHttpUrl),
209
+ fallbackEth: http(ethRpcUrl)
210
+ });
211
+ }
212
+ if (bundlerHttpUrl) {
213
+ return http(bundlerHttpUrl);
214
+ }
215
+ if (chain.id === 31337) {
216
+ return userOpExecutor({
217
+ executor: createClient({
218
+ chain,
219
+ transport: fallback([webSocket(), http()]),
220
+ account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
221
+ pollingInterval: 10
222
+ }).extend(transactionQueue())
223
+ });
199
224
  }
200
- return bundlerTransport;
225
+ throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
201
226
  }
202
227
 
203
228
  // src/EntryKitConfigProvider.tsx
@@ -368,10 +393,10 @@ function useAccountModal() {
368
393
  }
369
394
 
370
395
  // src/AccountModal.tsx
371
- import { twMerge as twMerge10 } from "tailwind-merge";
396
+ import { twMerge as twMerge19 } from "tailwind-merge";
372
397
 
373
398
  // src/AccountModalContent.tsx
374
- import { useAccount as useAccount2, useConnectorClient } from "wagmi";
399
+ import { useAccount as useAccount8, useConnectorClient } from "wagmi";
375
400
 
376
401
  // src/ConnectWallet.tsx
377
402
  import { useAccount } from "wagmi";
@@ -545,16 +570,39 @@ function ConnectWallet() {
545
570
  }
546
571
 
547
572
  // src/onboarding/ConnectedSteps.tsx
548
- import { useEffect as useEffect8, useMemo as useMemo2, useRef as useRef2, useState as useState3 } from "react";
549
- import { twMerge as twMerge7 } from "tailwind-merge";
573
+ import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef4, useState as useState6 } from "react";
574
+ import { twMerge as twMerge17 } from "tailwind-merge";
550
575
 
551
- // src/onboarding/common.ts
552
- import { parseEther as parseEther2 } from "viem";
553
- var minGasBalance = parseEther2("0.01");
576
+ // src/onboarding/usePrerequisites.ts
577
+ import { useClient as useClient6, useConfig } from "wagmi";
578
+ import { getBalanceQueryOptions as getBalanceQueryOptions2 } from "wagmi/query";
579
+ import { queryOptions as queryOptions6, skipToken as skipToken6, useQuery as useQuery7, useQueryClient } from "@tanstack/react-query";
580
+
581
+ // src/getPaymaster.ts
582
+ function getPaymaster(chain) {
583
+ const contracts = chain.contracts ?? {};
584
+ if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
585
+ if ("address" in contracts.quarryPaymaster) {
586
+ return {
587
+ type: "quarry",
588
+ address: contracts.quarryPaymaster.address,
589
+ isGasPass: !!chain.rpcUrls.quarryPassIssuer?.http?.[0]
590
+ };
591
+ }
592
+ }
593
+ if ("paymaster" in contracts && contracts.paymaster != null) {
594
+ if ("address" in contracts.paymaster) {
595
+ return {
596
+ type: "simple",
597
+ address: contracts.paymaster.address
598
+ };
599
+ }
600
+ }
601
+ }
554
602
 
555
603
  // src/onboarding/quarry/useAllowance.ts
556
604
  import { useClient } from "wagmi";
557
- import { queryOptions, useQuery as useQuery2 } from "@tanstack/react-query";
605
+ import { queryOptions, skipToken, useQuery as useQuery2 } from "@tanstack/react-query";
558
606
 
559
607
  // src/quarry/getAllowance.ts
560
608
  import { numberToHex as numberToHex2 } from "viem";
@@ -565,7 +613,10 @@ import { parseAbi } from "viem";
565
613
  var paymasterAbi = parseAbi([
566
614
  "error SpenderSystem_AlreadyRegistered(address spender, address user)",
567
615
  "error SpenderSystem_HasOwnBalance(address spender)",
568
- "function registerSpender(address spender)"
616
+ "error BalanceSystem_BalanceTooHigh(address user, uint256 balance, uint256 max)",
617
+ "error BalanceSystem_InsufficientBalance(address user, uint256 amount, uint256 balance)",
618
+ "function registerSpender(address spender)",
619
+ "function depositTo(address to) payable"
569
620
  ]);
570
621
  var paymasterConfig = defineStore({
571
622
  namespaces: {
@@ -579,6 +630,13 @@ var paymasterConfig = defineStore({
579
630
  },
580
631
  key: ["user"]
581
632
  },
633
+ Balance: {
634
+ schema: {
635
+ user: "address",
636
+ balance: "uint256"
637
+ },
638
+ key: ["user"]
639
+ },
582
640
  Grantor: {
583
641
  schema: {
584
642
  grantor: "address",
@@ -628,29 +686,6 @@ var paymasterTables = paymasterConfig.namespaces.root.tables;
628
686
  import { getRecord, getStaticDataLocation } from "@latticexyz/store/internal";
629
687
  import { getKeyTuple } from "@latticexyz/protocol-parser/internal";
630
688
  import { setStorageAt } from "viem/actions";
631
-
632
- // src/getPaymaster.ts
633
- function getPaymaster(chain) {
634
- const contracts = chain.contracts ?? {};
635
- if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
636
- if ("address" in contracts.quarryPaymaster) {
637
- return {
638
- type: "quarry",
639
- address: contracts.quarryPaymaster.address
640
- };
641
- }
642
- }
643
- if ("paymaster" in contracts && contracts.paymaster != null) {
644
- if ("address" in contracts.paymaster) {
645
- return {
646
- type: "simple",
647
- address: contracts.paymaster.address
648
- };
649
- }
650
- }
651
- }
652
-
653
- // src/quarry/getAllowance.ts
654
689
  async function getAllowance({ client, userAddress }) {
655
690
  const paymaster = getPaymaster(client.chain);
656
691
  if (paymaster?.type !== "quarry") return null;
@@ -684,13 +719,10 @@ function getAllowanceQueryOptions({
684
719
  client,
685
720
  userAddress
686
721
  }) {
687
- const queryKey = ["getAllowance", client?.uid, userAddress];
688
- return queryOptions(
689
- client && userAddress ? {
690
- queryKey,
691
- queryFn: () => getAllowance({ client, userAddress })
692
- } : { queryKey, enabled: false }
693
- );
722
+ return queryOptions({
723
+ queryKey: ["getAllowance", client?.uid, userAddress],
724
+ queryFn: client && userAddress ? () => getAllowance({ client, userAddress }) : skipToken
725
+ });
694
726
  }
695
727
  function useAllowance(userAddress) {
696
728
  const { chainId } = useEntryKitConfig();
@@ -700,7 +732,7 @@ function useAllowance(userAddress) {
700
732
 
701
733
  // src/onboarding/quarry/useSpender.ts
702
734
  import { useClient as useClient2 } from "wagmi";
703
- import { queryOptions as queryOptions2, useQuery as useQuery3 } from "@tanstack/react-query";
735
+ import { queryOptions as queryOptions2, skipToken as skipToken2, useQuery as useQuery3 } from "@tanstack/react-query";
704
736
 
705
737
  // src/onboarding/quarry/getSpender.ts
706
738
  import { getRecord as getRecord2 } from "@latticexyz/store/internal";
@@ -722,18 +754,15 @@ function getSpenderQueryOptions({
722
754
  userAddress,
723
755
  sessionAddress
724
756
  }) {
725
- const queryKey = ["getSpender", client?.uid, userAddress, sessionAddress];
726
- return queryOptions2(
727
- client && userAddress && sessionAddress ? {
728
- queryKey,
729
- queryFn: () => getSpender({ client, userAddress, sessionAddress })
730
- } : { queryKey, enabled: false }
731
- );
757
+ return queryOptions2({
758
+ queryKey: ["getSpender", client?.uid, userAddress, sessionAddress],
759
+ queryFn: client && userAddress && sessionAddress ? () => getSpender({ client, userAddress, sessionAddress }) : skipToken2
760
+ });
732
761
  }
733
762
 
734
763
  // src/onboarding/useDelegation.ts
735
764
  import { useClient as useClient3 } from "wagmi";
736
- import { queryOptions as queryOptions3, useQuery as useQuery4 } from "@tanstack/react-query";
765
+ import { queryOptions as queryOptions3, skipToken as skipToken3, useQuery as useQuery4 } from "@tanstack/react-query";
737
766
 
738
767
  // src/onboarding/getDelegation.ts
739
768
  import { getRecord as getRecord3 } from "@latticexyz/store/internal";
@@ -776,22 +805,15 @@ function getDelegationQueryOptions({
776
805
  userAddress,
777
806
  sessionAddress
778
807
  }) {
779
- const queryKey = ["getDelegation", client?.uid, worldAddress, userAddress, sessionAddress];
780
- return queryOptions3(
781
- client && userAddress && sessionAddress ? {
782
- queryKey,
783
- queryFn: () => getDelegation({ client, worldAddress, userAddress, sessionAddress })
784
- } : { queryKey, enabled: false }
785
- );
808
+ return queryOptions3({
809
+ queryKey: ["getDelegation", client?.uid, worldAddress, userAddress, sessionAddress],
810
+ queryFn: client && userAddress && sessionAddress ? () => getDelegation({ client, worldAddress, userAddress, sessionAddress }) : skipToken3
811
+ });
786
812
  }
787
813
 
788
- // src/onboarding/usePrerequisites.ts
789
- import { queryOptions as queryOptions5, useQuery as useQuery6, useQueryClient } from "@tanstack/react-query";
790
- import { useClient as useClient5, useConfig } from "wagmi";
791
-
792
814
  // src/useSessionAccount.ts
793
815
  import { useClient as useClient4 } from "wagmi";
794
- import { queryOptions as queryOptions4, useQuery as useQuery5 } from "@tanstack/react-query";
816
+ import { queryOptions as queryOptions4, skipToken as skipToken4, useQuery as useQuery5 } from "@tanstack/react-query";
795
817
 
796
818
  // src/getSessionAccount.ts
797
819
  import { toSimpleSmartAccount } from "permissionless/accounts";
@@ -855,20 +877,50 @@ function getSessionAccountQueryOptions({
855
877
  client,
856
878
  userAddress
857
879
  }) {
858
- const queryKey = ["getSessionAccount", client?.uid, userAddress];
859
- return queryOptions4(
860
- client && userAddress ? {
861
- queryKey,
862
- queryFn: () => getSessionAccount({ client, userAddress }),
863
- staleTime: Infinity,
864
- // TODO: replace with function to retry only connection errors
865
- retry: false
866
- } : { queryKey, enabled: false }
867
- );
880
+ return queryOptions4({
881
+ queryKey: ["getSessionAccount", client?.uid, userAddress],
882
+ queryFn: client && userAddress ? () => getSessionAccount({ client, userAddress }) : skipToken4,
883
+ staleTime: Infinity,
884
+ // TODO: replace with function to retry only connection errors
885
+ retry: false
886
+ });
887
+ }
888
+
889
+ // src/onboarding/quarry/useBalance.ts
890
+ import { useClient as useClient5 } from "wagmi";
891
+ import { queryOptions as queryOptions5, skipToken as skipToken5, useQuery as useQuery6 } from "@tanstack/react-query";
892
+
893
+ // src/quarry/getBalance.ts
894
+ import { getRecord as getRecord4 } from "@latticexyz/store/internal";
895
+ async function getBalance({ client, userAddress }) {
896
+ const paymaster = getPaymaster(client.chain);
897
+ if (paymaster?.type !== "quarry") return null;
898
+ const record = await getRecord4(client, {
899
+ address: paymaster.address,
900
+ table: paymasterTables.Balance,
901
+ key: { user: userAddress },
902
+ blockTag: "pending"
903
+ });
904
+ return record.balance;
905
+ }
906
+
907
+ // src/onboarding/quarry/useBalance.ts
908
+ function getBalanceQueryOptions({
909
+ client,
910
+ userAddress
911
+ }) {
912
+ return queryOptions5({
913
+ queryKey: ["getBalance", client?.uid, userAddress],
914
+ queryFn: client && userAddress ? () => getBalance({ client, userAddress }) : skipToken5
915
+ });
916
+ }
917
+ function useBalance(userAddress) {
918
+ const { chainId } = useEntryKitConfig();
919
+ const client = useClient5({ chainId });
920
+ return useQuery6(getBalanceQueryOptions({ client, userAddress }));
868
921
  }
869
922
 
870
923
  // src/onboarding/usePrerequisites.ts
871
- import { getBalanceQueryOptions } from "wagmi/query";
872
924
  function getPrequisitesQueryOptions({
873
925
  queryClient,
874
926
  config,
@@ -876,46 +928,46 @@ function getPrequisitesQueryOptions({
876
928
  userAddress,
877
929
  worldAddress
878
930
  }) {
879
- const queryKey = ["getPrerequisites", client?.uid, userAddress];
880
- return queryOptions5(
881
- client && userAddress ? {
882
- queryKey,
883
- async queryFn() {
884
- const paymaster = getPaymaster(client.chain);
885
- const {
886
- account: { address: sessionAddress }
887
- } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
888
- const [sessionBalance, allowance, spender, hasDelegation] = await Promise.all([
889
- !paymaster ? queryClient.fetchQuery(
890
- getBalanceQueryOptions(config, { chainId: client.chain.id, address: sessionAddress })
891
- ) : null,
892
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })) : null,
893
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })) : null,
894
- queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress }))
895
- ]);
896
- const hasAllowance = allowance == null || allowance >= minGasBalance;
897
- const isSpender = spender == null ? true : spender;
898
- const hasGasBalance = sessionBalance == null || sessionBalance.value >= minGasBalance;
899
- return {
900
- sessionAddress,
901
- hasAllowance,
902
- isSpender,
903
- hasGasBalance,
904
- hasDelegation,
905
- // we intentionally don't enforce an allowance/gas balance here
906
- complete: isSpender && hasDelegation
907
- };
908
- },
909
- retry: false
910
- } : { queryKey, enabled: false }
911
- );
931
+ return queryOptions6({
932
+ queryKey: ["getPrerequisites", client?.uid, userAddress],
933
+ queryFn: client && userAddress ? async () => {
934
+ const paymaster = getPaymaster(client.chain);
935
+ const {
936
+ account: { address: sessionAddress }
937
+ } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
938
+ const [sessionBalance, allowance, spender, quarryBalance, hasDelegation] = await Promise.all([
939
+ !paymaster ? queryClient.fetchQuery(
940
+ getBalanceQueryOptions2(config, { chainId: client.chain.id, address: sessionAddress })
941
+ ) : null,
942
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })) : null,
943
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })) : null,
944
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getBalanceQueryOptions({ client, userAddress })) : null,
945
+ queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress }))
946
+ ]);
947
+ const hasAllowance = allowance == null || allowance > 0n;
948
+ const isSpender = spender == null ? true : spender;
949
+ const hasGasBalance = sessionBalance == null || sessionBalance.value > 0n;
950
+ const hasQuarryGasBalance = quarryBalance == null || quarryBalance > 0n;
951
+ return {
952
+ sessionAddress,
953
+ hasAllowance,
954
+ isSpender,
955
+ hasGasBalance,
956
+ hasQuarryGasBalance,
957
+ hasDelegation,
958
+ // we intentionally don't enforce an allowance/gas balance here
959
+ complete: isSpender && hasDelegation
960
+ };
961
+ } : skipToken6,
962
+ retry: false
963
+ });
912
964
  }
913
965
  function usePrerequisites(userAddress) {
914
966
  const queryClient = useQueryClient();
915
967
  const config = useConfig();
916
968
  const { chainId, worldAddress } = useEntryKitConfig();
917
- const client = useClient5({ chainId });
918
- const prereqs = useQuery6(
969
+ const client = useClient6({ chainId });
970
+ const prereqs = useQuery7(
919
971
  getPrequisitesQueryOptions({
920
972
  queryClient,
921
973
  config,
@@ -932,10 +984,10 @@ function usePrerequisites(userAddress) {
932
984
  import { useDisconnect } from "wagmi";
933
985
 
934
986
  // src/useENS.ts
935
- import { useQuery as useQuery7 } from "@tanstack/react-query";
987
+ import { useQuery as useQuery8 } from "@tanstack/react-query";
936
988
  function useENS(address) {
937
989
  const normalizedAddress = address?.toLowerCase();
938
- return useQuery7({
990
+ return useQuery8({
939
991
  enabled: !!normalizedAddress,
940
992
  queryKey: ["ens", normalizedAddress],
941
993
  queryFn: async () => {
@@ -1054,8 +1106,11 @@ function Wallet({ isActive, isExpanded, userAddress }) {
1054
1106
  ] });
1055
1107
  }
1056
1108
 
1057
- // src/onboarding/quarry/useClaimGasPass.ts
1109
+ // src/onboarding/quarry/Allowance.tsx
1058
1110
  import { parseEther as parseEther3 } from "viem";
1111
+
1112
+ // src/onboarding/quarry/useClaimGasPass.ts
1113
+ import { parseEther as parseEther2 } from "viem";
1059
1114
  import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
1060
1115
 
1061
1116
  // src/quarry/transports/quarryPassIssuer.ts
@@ -1085,11 +1140,11 @@ async function claimGasPass({ chain, userAddress }) {
1085
1140
  }
1086
1141
 
1087
1142
  // src/onboarding/quarry/useClaimGasPass.ts
1088
- import { useClient as useClient6 } from "wagmi";
1143
+ import { useClient as useClient7 } from "wagmi";
1089
1144
  function useClaimGasPass() {
1090
1145
  const queryClient = useQueryClient2();
1091
1146
  const { chain } = useEntryKitConfig();
1092
- const client = useClient6({ chainId: chain.id });
1147
+ const client = useClient7({ chainId: chain.id });
1093
1148
  const mutationKey = ["claimGasPass", chain.id];
1094
1149
  return useMutation({
1095
1150
  retry: 0,
@@ -1097,7 +1152,7 @@ function useClaimGasPass() {
1097
1152
  mutationFn: async (userAddress) => {
1098
1153
  if (chain.id === 31337) {
1099
1154
  if (!client) throw new Error("No client?");
1100
- await setAllowanceSlot({ client, userAddress, allowance: parseEther3("1") });
1155
+ await setAllowanceSlot({ client, userAddress, allowance: parseEther2("1") });
1101
1156
  } else {
1102
1157
  await claimGasPass({ chain, userAddress });
1103
1158
  }
@@ -1172,7 +1227,7 @@ function Allowance({ isActive, isExpanded, userAddress }) {
1172
1227
  const claimGasPass2 = useShowMutationError(useClaimGasPass());
1173
1228
  useEffect6(() => {
1174
1229
  const timer = setTimeout(() => {
1175
- if (isActive && claimGasPass2.status === "idle" && allowance.isSuccess && allowance.data != null && allowance.data < minGasBalance) {
1230
+ if (isActive && claimGasPass2.status === "idle" && allowance.isSuccess && allowance.data != null && allowance.data < parseEther3("0.01")) {
1176
1231
  claimGasPass2.mutate(userAddress);
1177
1232
  }
1178
1233
  });
@@ -1200,6 +1255,9 @@ function Allowance({ isActive, isExpanded, userAddress }) {
1200
1255
  ] });
1201
1256
  }
1202
1257
 
1258
+ // src/onboarding/Session.tsx
1259
+ import { useEffect as useEffect7 } from "react";
1260
+
1203
1261
  // src/onboarding/useSetupSession.ts
1204
1262
  import { encodeFunctionData } from "viem";
1205
1263
  import { useMutation as useMutation2, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
@@ -1213,7 +1271,7 @@ function defineCall(call) {
1213
1271
  }
1214
1272
 
1215
1273
  // src/onboarding/useSetupSession.ts
1216
- import { useClient as useClient7 } from "wagmi";
1274
+ import { useClient as useClient8 } from "wagmi";
1217
1275
  import { resourceToHex as resourceToHex2 } from "@latticexyz/common";
1218
1276
  import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json";
1219
1277
 
@@ -1225,7 +1283,7 @@ import { getAction as getAction3 } from "viem/utils";
1225
1283
  import { toHex } from "viem";
1226
1284
  import { signTypedData } from "viem/actions";
1227
1285
  import { callWithSignatureTypes } from "@latticexyz/world-module-callwithsignature/internal";
1228
- import { getRecord as getRecord4 } from "@latticexyz/store/internal";
1286
+ import { getRecord as getRecord5 } from "@latticexyz/store/internal";
1229
1287
  import moduleConfig from "@latticexyz/world-module-callwithsignature/mud.config";
1230
1288
  import { hexToResource } from "@latticexyz/common";
1231
1289
  import { getAction as getAction2 } from "viem/utils";
@@ -1237,7 +1295,7 @@ async function signCall({
1237
1295
  nonce: initialNonce,
1238
1296
  client
1239
1297
  }) {
1240
- const nonce = initialNonce ?? (client ? (await getRecord4(client, {
1298
+ const nonce = initialNonce ?? (client ? (await getRecord5(client, {
1241
1299
  address: worldAddress,
1242
1300
  table: moduleConfig.tables.CallWithSignatureNonces,
1243
1301
  key: { signer: userClient.account.address },
@@ -1290,7 +1348,7 @@ import { systemsConfig as worldSystemsConfig } from "@latticexyz/world/mud.confi
1290
1348
  function useSetupSession({ userClient }) {
1291
1349
  const queryClient = useQueryClient3();
1292
1350
  const { chainId, worldAddress } = useEntryKitConfig();
1293
- const client = useClient7({ chainId });
1351
+ const client = useClient8({ chainId });
1294
1352
  const mutationKey = ["setupSession", client?.chain.id, userClient.account.address];
1295
1353
  return useMutation2({
1296
1354
  retry: 0,
@@ -1396,20 +1454,18 @@ function useSetupSession({ userClient }) {
1396
1454
  });
1397
1455
  }
1398
1456
 
1399
- // src/onboarding/Session.tsx
1400
- import { useEffect as useEffect7 } from "react";
1401
-
1402
1457
  // src/useSessionClient.ts
1403
- import { useClient as useClient8 } from "wagmi";
1458
+ import { useClient as useClient9 } from "wagmi";
1404
1459
  import {
1405
- queryOptions as queryOptions6,
1406
- useQuery as useQuery8,
1460
+ queryOptions as queryOptions7,
1461
+ skipToken as skipToken7,
1462
+ useQuery as useQuery9,
1407
1463
  useQueryClient as useQueryClient4
1408
1464
  } from "@tanstack/react-query";
1409
1465
 
1410
1466
  // src/getSessionClient.ts
1411
1467
  import { smartAccountActions } from "permissionless";
1412
- import { callFrom } from "@latticexyz/world/internal";
1468
+ import { callFrom, sendUserOperationFrom } from "@latticexyz/world/internal";
1413
1469
 
1414
1470
  // src/createBundlerClient.ts
1415
1471
  import {
@@ -1468,6 +1524,12 @@ async function getSessionClient({
1468
1524
  delegatorAddress: userAddress,
1469
1525
  publicClient: client
1470
1526
  })
1527
+ ).extend(
1528
+ sendUserOperationFrom({
1529
+ worldAddress,
1530
+ delegatorAddress: userAddress,
1531
+ publicClient: client
1532
+ })
1471
1533
  ).extend(() => ({ userAddress, worldAddress, internal_signer: sessionSigner }));
1472
1534
  return sessionClient;
1473
1535
  }
@@ -1482,32 +1544,29 @@ function getSessionClientQueryOptions({
1482
1544
  userAddress,
1483
1545
  worldAddress
1484
1546
  }) {
1485
- const queryKey = ["getSessionClient", client?.uid, userAddress, worldAddress];
1486
- return queryOptions6(
1487
- userAddress ? {
1488
- queryKey,
1489
- async queryFn() {
1490
- const { account: sessionAccount, signer: sessionSigner } = await queryClient.fetchQuery(
1491
- getSessionAccountQueryOptions({ client, userAddress })
1492
- );
1493
- return await getSessionClient({
1494
- sessionAccount,
1495
- sessionSigner,
1496
- userAddress,
1497
- worldAddress
1498
- });
1499
- },
1500
- staleTime: Infinity,
1501
- // TODO: replace with function to retry only connection errors
1502
- retry: false
1503
- } : { queryKey, enabled: false }
1504
- );
1547
+ return queryOptions7({
1548
+ queryKey: ["getSessionClient", client?.uid, userAddress, worldAddress],
1549
+ queryFn: userAddress ? async () => {
1550
+ const { account: sessionAccount, signer: sessionSigner } = await queryClient.fetchQuery(
1551
+ getSessionAccountQueryOptions({ client, userAddress })
1552
+ );
1553
+ return await getSessionClient({
1554
+ sessionAccount,
1555
+ sessionSigner,
1556
+ userAddress,
1557
+ worldAddress
1558
+ });
1559
+ } : skipToken7,
1560
+ staleTime: Infinity,
1561
+ // TODO: replace with function to retry only connection errors
1562
+ retry: false
1563
+ });
1505
1564
  }
1506
1565
  function useSessionClient(userAddress) {
1507
1566
  const queryClient = useQueryClient4();
1508
1567
  const { chainId, worldAddress } = useEntryKitConfig();
1509
- const client = useClient8({ chainId });
1510
- return useQuery8(
1568
+ const client = useClient9({ chainId });
1569
+ return useQuery9(
1511
1570
  getSessionClientQueryOptions({
1512
1571
  queryClient,
1513
1572
  client,
@@ -1523,9 +1582,11 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1523
1582
  const sessionClient = useShowQueryError(useSessionClient(userClient.account.address));
1524
1583
  const setup = useShowMutationError(useSetupSession({ userClient }));
1525
1584
  const hasSession = !registerDelegation && !registerDelegation;
1585
+ const { data: prerequisites } = usePrerequisites(userClient.account.address);
1586
+ const { hasAllowance, hasGasBalance, hasQuarryGasBalance } = prerequisites ?? {};
1526
1587
  useEffect7(() => {
1527
1588
  const timer = setTimeout(() => {
1528
- if (isActive && setup.status === "idle" && sessionClient.data && !hasSession) {
1589
+ if (isActive && setup.status === "idle" && sessionClient.data && !hasSession && (hasAllowance || hasGasBalance || hasQuarryGasBalance)) {
1529
1590
  setup.mutate({
1530
1591
  sessionClient: sessionClient.data,
1531
1592
  registerSpender,
@@ -1534,7 +1595,17 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1534
1595
  }
1535
1596
  });
1536
1597
  return () => clearTimeout(timer);
1537
- }, [hasSession, isActive, registerDelegation, registerSpender, sessionClient, setup]);
1598
+ }, [
1599
+ hasSession,
1600
+ isActive,
1601
+ registerDelegation,
1602
+ registerSpender,
1603
+ sessionClient,
1604
+ setup,
1605
+ hasAllowance,
1606
+ hasGasBalance,
1607
+ hasQuarryGasBalance
1608
+ ]);
1538
1609
  return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-4", children: [
1539
1610
  /* @__PURE__ */ jsxs13("div", { className: "flex justify-between gap-4", children: [
1540
1611
  /* @__PURE__ */ jsxs13("div", { children: [
@@ -1562,7 +1633,10 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1562
1633
  }
1563
1634
 
1564
1635
  // src/onboarding/GasBalance.tsx
1565
- import { useBalance, useWatchBlockNumber } from "wagmi";
1636
+ import { useEffect as useEffect9, useState as useState3 } from "react";
1637
+ import { parseEther as parseEther4 } from "viem";
1638
+ import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
1639
+ import { useBalance as useBalance2, useWatchBlockNumber } from "wagmi";
1566
1640
 
1567
1641
  // src/data/relayChains.json
1568
1642
  var relayChains_default = {
@@ -1847,11 +1921,11 @@ var relayChains_default = {
1847
1921
  // src/onboarding/useSetBalance.ts
1848
1922
  import { useQueryClient as useQueryClient5, useMutation as useMutation3 } from "@tanstack/react-query";
1849
1923
  import { setBalance as setBalance2 } from "viem/actions";
1850
- import { useClient as useClient9 } from "wagmi";
1924
+ import { useClient as useClient10 } from "wagmi";
1851
1925
  function useSetBalance() {
1852
1926
  const queryClient = useQueryClient5();
1853
1927
  const { chainId } = useEntryKitConfig();
1854
- const client = useClient9({ chainId });
1928
+ const client = useClient10({ chainId });
1855
1929
  return useMutation3({
1856
1930
  retry: 0,
1857
1931
  mutationKey: ["setBalance", chainId],
@@ -1867,21 +1941,93 @@ function useSetBalance() {
1867
1941
  });
1868
1942
  }
1869
1943
 
1944
+ // src/errors/usePrevious.ts
1945
+ import { useEffect as useEffect8, useRef as useRef2 } from "react";
1946
+ function usePrevious(value, initialValue) {
1947
+ const ref = useRef2();
1948
+ useEffect8(() => {
1949
+ ref.current = { value };
1950
+ }, [value]);
1951
+ return ref.current ? ref.current.value : initialValue;
1952
+ }
1953
+
1954
+ // src/icons/IconSVG.tsx
1955
+ import { twMerge as twMerge7 } from "tailwind-merge";
1956
+ import { jsx as jsx16 } from "react/jsx-runtime";
1957
+ function IconSVG({ className, children, ...props }) {
1958
+ return /* @__PURE__ */ jsx16(
1959
+ "svg",
1960
+ {
1961
+ xmlns: "http://www.w3.org/2000/svg",
1962
+ viewBox: "0 0 24 24",
1963
+ fill: "currentColor",
1964
+ className: twMerge7("-my-[0.125em] h-[1.25em] w-[1.25em]", className),
1965
+ ...props,
1966
+ children
1967
+ }
1968
+ );
1969
+ }
1970
+
1971
+ // src/icons/CopyIcon.tsx
1972
+ import { jsx as jsx17 } from "react/jsx-runtime";
1973
+ function CopyIcon(props) {
1974
+ return /* @__PURE__ */ jsx17(IconSVG, { ...props, children: /* @__PURE__ */ jsx17(
1975
+ "path",
1976
+ {
1977
+ d: "M8 5H6C4.89543 5 4 5.89543 4 7V19C4 20.1046 4.89543 21 6 21H16C17.1046 21 18 20.1046 18 19V18M8 5C8 6.10457 8.89543 7 10 7H12C13.1046 7 14 6.10457 14 5M8 5C8 3.89543 8.89543 3 10 3H12C13.1046 3 14 3.89543 14 5M14 5H16C17.1046 5 18 5.89543 18 7V10M20 14H10M10 14L13 11M10 14L13 17",
1978
+ fill: "none",
1979
+ stroke: "currentColor",
1980
+ strokeWidth: "2",
1981
+ strokeLinecap: "round",
1982
+ strokeLinejoin: "round"
1983
+ }
1984
+ ) });
1985
+ }
1986
+
1987
+ // src/icons/CheckIcon.tsx
1988
+ import { jsx as jsx18 } from "react/jsx-runtime";
1989
+ function CheckIcon(props) {
1990
+ return /* @__PURE__ */ jsx18(IconSVG, { ...props, children: /* @__PURE__ */ jsx18(
1991
+ "path",
1992
+ {
1993
+ d: "M5 13L9 17L19 7",
1994
+ fill: "none",
1995
+ stroke: "currentColor",
1996
+ strokeWidth: "2",
1997
+ strokeLinecap: "round",
1998
+ strokeLinejoin: "round"
1999
+ }
2000
+ ) });
2001
+ }
2002
+
1870
2003
  // src/onboarding/GasBalance.tsx
1871
- import { Fragment, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
2004
+ import { Fragment, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
1872
2005
  function GasBalance({ isActive, isExpanded, sessionAddress }) {
2006
+ const queryClient = useQueryClient6();
1873
2007
  const { chain } = useEntryKitConfig();
1874
- const balance = useShowQueryError(useBalance({ chainId: chain.id, address: sessionAddress }));
2008
+ const [copied, setCopied] = useState3(false);
2009
+ const balance = useShowQueryError(useBalance2({ chainId: chain.id, address: sessionAddress }));
2010
+ const prevBalance = usePrevious(balance.data);
1875
2011
  useWatchBlockNumber({ onBlockNumber: () => balance.refetch() });
1876
2012
  const setBalance3 = useShowMutationError(useSetBalance());
1877
2013
  const relayChain = relayChains_default[chain.id];
2014
+ const handleCopy = () => {
2015
+ navigator.clipboard.writeText(sessionAddress);
2016
+ setCopied(true);
2017
+ setTimeout(() => setCopied(false), 2e3);
2018
+ };
2019
+ useEffect9(() => {
2020
+ if (balance.data != null && prevBalance?.value === 0n && balance.data.value > 0n) {
2021
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] });
2022
+ }
2023
+ }, [balance.data, prevBalance, setBalance3, sessionAddress, queryClient]);
1878
2024
  return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4", children: [
1879
2025
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between gap-4", children: [
1880
2026
  /* @__PURE__ */ jsxs14("div", { children: [
1881
- /* @__PURE__ */ jsx16("div", { children: "Gas balance" }),
1882
- /* @__PURE__ */ jsx16("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx16(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx16(PendingIcon, { className: "text-sm" }) })
2027
+ /* @__PURE__ */ jsx19("div", { children: "Gas balance" }),
2028
+ /* @__PURE__ */ jsx19("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx19(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx19(PendingIcon, { className: "text-sm" }) })
1883
2029
  ] }),
1884
- chain.id === 31337 ? /* @__PURE__ */ jsx16(
2030
+ chain.id === 31337 ? /* @__PURE__ */ jsx19(
1885
2031
  Button,
1886
2032
  {
1887
2033
  variant: isActive ? "primary" : "tertiary",
@@ -1890,19 +2036,19 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1890
2036
  pending: balance.status === "pending" || setBalance3.status === "pending",
1891
2037
  onClick: () => setBalance3.mutate({
1892
2038
  address: sessionAddress,
1893
- value: minGasBalance + (balance.data?.value ?? 0n)
2039
+ value: parseEther4("0.01") + (balance.data?.value ?? 0n)
1894
2040
  }),
1895
2041
  children: "Top up"
1896
2042
  }
1897
2043
  ) : relayChain != null ? (
1898
2044
  // TODO: convert this to a <ButtonLink>
1899
- /* @__PURE__ */ jsx16(
2045
+ /* @__PURE__ */ jsx19(
1900
2046
  "a",
1901
2047
  {
1902
- href: `${relayChain.bridgeUrl}?${new URLSearchParams({ toAddress: sessionAddress })}`,
2048
+ href: `${relayChain.bridgeUrl}?${new URLSearchParams({ toAddress: sessionAddress, amount: "0.01" })}`,
1903
2049
  target: "_blank",
1904
2050
  rel: "noopener noreferrer",
1905
- children: /* @__PURE__ */ jsx16(
2051
+ children: /* @__PURE__ */ jsx19(
1906
2052
  Button,
1907
2053
  {
1908
2054
  variant: isActive ? "primary" : "tertiary",
@@ -1917,11 +2063,23 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1917
2063
  ) : null
1918
2064
  ] }),
1919
2065
  isExpanded ? /* @__PURE__ */ jsxs14(Fragment, { children: [
1920
- /* @__PURE__ */ jsx16("p", { className: "text-sm", children: "Your session's gas balance is used to pay for onchain computation." }),
2066
+ /* @__PURE__ */ jsx19("p", { className: "text-sm", children: "Your session's gas balance is used to pay for onchain computation." }),
1921
2067
  /* @__PURE__ */ jsxs14("p", { className: "text-sm", children: [
1922
2068
  "Send funds to",
1923
2069
  " ",
1924
- /* @__PURE__ */ jsx16("span", { className: "font-mono text-white", children: /* @__PURE__ */ jsx16(TruncatedHex, { hex: sessionAddress }) }),
2070
+ /* @__PURE__ */ jsxs14(
2071
+ "span",
2072
+ {
2073
+ className: "inline-flex items-center gap-1 font-mono text-white cursor-pointer hover:text-white/80 transition-colors",
2074
+ onClick: handleCopy,
2075
+ title: "Click to copy",
2076
+ children: [
2077
+ /* @__PURE__ */ jsx19(TruncatedHex, { hex: sessionAddress }),
2078
+ " ",
2079
+ copied ? /* @__PURE__ */ jsx19(CheckIcon, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx19(CopyIcon, { className: "w-3.5 h-3.5" })
2080
+ ]
2081
+ }
2082
+ ),
1925
2083
  " ",
1926
2084
  "on ",
1927
2085
  chain.name,
@@ -1931,133 +2089,741 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1931
2089
  ] });
1932
2090
  }
1933
2091
 
1934
- // src/onboarding/ConnectedSteps.tsx
1935
- import { jsx as jsx17 } from "react/jsx-runtime";
1936
- function ConnectedSteps({ userClient, initialUserAddress }) {
1937
- const { chain } = useEntryKitConfig();
1938
- const paymaster = getPaymaster(chain);
1939
- const userAddress = userClient.account.address;
1940
- const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
1941
- useEffect8(() => {
1942
- if (prerequisitesError) {
1943
- console.error("Could not get prerequisites", prerequisitesError);
1944
- }
1945
- }, [prerequisitesError]);
1946
- const { closeAccountModal } = useAccountModal();
1947
- const isNewConnection = userAddress !== initialUserAddress;
1948
- const initialPrerequisites = useRef2(prerequisites);
1949
- useEffect8(() => {
1950
- if (prerequisites == null) return;
1951
- if (initialPrerequisites.current == null) {
1952
- initialPrerequisites.current = prerequisites;
1953
- }
1954
- if (prerequisites.complete) {
1955
- if (isNewConnection || !initialPrerequisites.current.complete) {
1956
- closeAccountModal();
1957
- }
1958
- }
1959
- }, [closeAccountModal, isNewConnection, prerequisites]);
1960
- const { sessionAddress, hasAllowance, isSpender, hasDelegation, hasGasBalance } = prerequisites ?? {};
1961
- const steps = useMemo2(() => {
1962
- if (!userAddress) {
1963
- return [
1964
- {
1965
- id: "wallet",
1966
- isComplete: false,
1967
- content: () => null
1968
- }
1969
- ];
1970
- }
1971
- const steps2 = [
1972
- {
1973
- id: "wallet",
1974
- isComplete: true,
1975
- content: (props) => /* @__PURE__ */ jsx17(Wallet, { ...props, userAddress })
1976
- }
1977
- ];
1978
- if (!paymaster) {
1979
- if (sessionAddress != null) {
1980
- steps2.push({
1981
- id: "gasBalance",
1982
- isComplete: !!hasGasBalance,
1983
- content: (props) => /* @__PURE__ */ jsx17(GasBalance, { ...props, sessionAddress })
1984
- });
1985
- }
1986
- } else if (paymaster.type === "quarry") {
1987
- steps2.push({
1988
- id: "allowance",
1989
- isComplete: !!hasAllowance,
1990
- content: (props) => /* @__PURE__ */ jsx17(Allowance, { ...props, userAddress })
1991
- });
1992
- }
1993
- steps2.push({
1994
- id: "session",
1995
- isComplete: !!isSpender && !!hasDelegation,
1996
- content: (props) => /* @__PURE__ */ jsx17(Session, { ...props, userClient, registerSpender: !isSpender, registerDelegation: !hasDelegation })
1997
- });
1998
- return steps2;
1999
- }, [hasAllowance, hasDelegation, hasGasBalance, isSpender, paymaster, sessionAddress, userAddress, userClient]);
2000
- const [selectedStepId] = useState3(null);
2001
- const nextStep = steps.find((step) => step.content != null && !step.isComplete);
2002
- const completedSteps = steps.filter((step) => step.isComplete);
2003
- const activeStep = (selectedStepId != null ? steps.find((step) => step.id === selectedStepId) : null) ?? nextStep ?? (completedSteps.length < steps.length ? completedSteps.at(-1) : null);
2004
- const activeStepIndex = activeStep ? steps.indexOf(activeStep) : -1;
2005
- return /* @__PURE__ */ jsx17(
2006
- "div",
2092
+ // src/onboarding/deposit/DepositFormContainer.tsx
2093
+ import { useState as useState5 } from "react";
2094
+ import { useChains as useChains4, useChainId } from "wagmi";
2095
+
2096
+ // src/onboarding/deposit/DepositViaTransferForm.tsx
2097
+ import { useAccount as useAccount5, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2098
+ import { encodeFunctionData as encodeFunctionData2 } from "viem";
2099
+ import { useMutation as useMutation4, useQuery as useQuery11 } from "@tanstack/react-query";
2100
+
2101
+ // src/onboarding/deposit/DepositForm.tsx
2102
+ import { useEffect as useEffect11, useRef as useRef3 } from "react";
2103
+ import { useAccount as useAccount4, useBalance as useBalance5, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2104
+ import { useIsMounted } from "usehooks-ts";
2105
+ import { twMerge as twMerge15 } from "tailwind-merge";
2106
+
2107
+ // src/onboarding/deposit/ChainSelect.tsx
2108
+ import { useEffect as useEffect10, useMemo as useMemo2 } from "react";
2109
+ import { useAccount as useAccount2, useSwitchChain } from "wagmi";
2110
+ import { twMerge as twMerge12 } from "tailwind-merge";
2111
+ import * as Select from "@radix-ui/react-select";
2112
+
2113
+ // src/icons/ChevronUpIcon.tsx
2114
+ import { jsx as jsx20 } from "react/jsx-runtime";
2115
+ function ChevronUpIcon(props) {
2116
+ return /* @__PURE__ */ jsx20(IconSVG, { viewBox: "0 0 20 20", ...props, children: /* @__PURE__ */ jsx20(
2117
+ "path",
2007
2118
  {
2008
- className: twMerge7(
2009
- // steps.length === 2 ? "min-h-[22rem]" : "min-h-[26rem]",
2010
- "px-8 flex flex-col divide-y divide-neutral-800",
2011
- "animate-in animate-duration-300 fade-in slide-in-from-bottom-8"
2012
- ),
2013
- children: steps.map((step, i) => {
2014
- const isActive = step === activeStep;
2015
- const isExpanded = isActive || completedSteps.length === steps.length;
2016
- const isDisabled = !step.isComplete && activeStepIndex !== -1 && i > activeStepIndex;
2017
- return /* @__PURE__ */ jsx17("div", { className: twMerge7("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx17("div", { className: twMerge7("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: step.content({ isActive, isExpanded }) }) }, step.id);
2018
- })
2119
+ d: "M14.7071 12.7071C14.3166 13.0976 13.6834 13.0976 13.2929 12.7071L10 9.41421L6.70711 12.7071C6.31658 13.0976 5.68342 13.0976 5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C15.0976 11.6834 15.0976 12.3166 14.7071 12.7071Z",
2120
+ fillRule: "evenodd",
2121
+ clipRule: "evenodd"
2019
2122
  }
2020
- );
2123
+ ) });
2021
2124
  }
2022
2125
 
2023
- // src/AccountModalContent.tsx
2024
- import { useRef as useRef3 } from "react";
2025
- import { jsx as jsx18 } from "react/jsx-runtime";
2026
- function AccountModalContent() {
2027
- const { chainId } = useEntryKitConfig();
2028
- const userClient = useConnectorClient({ chainId });
2029
- const { address: userAddress } = useAccount2();
2030
- const initialUserAddress = useRef3(userAddress);
2031
- if (userClient.status !== "success") {
2032
- return /* @__PURE__ */ jsx18(ConnectWallet, {});
2126
+ // src/icons/ChevronDownIcon.tsx
2127
+ import { jsx as jsx21 } from "react/jsx-runtime";
2128
+ function ChevronDownIcon(props) {
2129
+ return /* @__PURE__ */ jsx21(IconSVG, { viewBox: "0 0 20 20", ...props, children: /* @__PURE__ */ jsx21(
2130
+ "path",
2131
+ {
2132
+ d: "M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289L10 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68342 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z",
2133
+ fillRule: "evenodd",
2134
+ clipRule: "evenodd"
2135
+ }
2136
+ ) });
2137
+ }
2138
+
2139
+ // src/ui/Slot.tsx
2140
+ import { isValidElement, cloneElement, Children } from "react";
2141
+ import { twMerge as twMerge8 } from "tailwind-merge";
2142
+ function Slot({
2143
+ children,
2144
+ ...props
2145
+ }) {
2146
+ if (isValidElement(children)) {
2147
+ return cloneElement(children, {
2148
+ ...props,
2149
+ ...children.props,
2150
+ style: {
2151
+ ...props.style,
2152
+ ...children.props.style
2153
+ },
2154
+ className: twMerge8(props.className, children.props.className)
2155
+ });
2033
2156
  }
2034
- return /* @__PURE__ */ jsx18(ConnectedSteps, { userClient: userClient.data, initialUserAddress: initialUserAddress.current });
2157
+ if (Children.count(children) > 1) {
2158
+ Children.only(null);
2159
+ }
2160
+ return null;
2035
2161
  }
2036
2162
 
2037
- // src/AccountModal.tsx
2038
- import { DialogClose } from "@radix-ui/react-dialog";
2163
+ // src/ui/Input.tsx
2164
+ import { twMerge as twMerge9 } from "tailwind-merge";
2165
+ import { jsx as jsx22 } from "react/jsx-runtime";
2166
+ function Input({ asChild, className, ...props }) {
2167
+ const Child = asChild ? Slot : "input";
2168
+ return /* @__PURE__ */ jsx22(
2169
+ Child,
2170
+ {
2171
+ className: twMerge9(
2172
+ "p-2.5 gap-1 border text-lg font-medium transition",
2173
+ "outline-none ring-2 ring-transparent focus-within:ring-orange-500 focus-within:border-transparent",
2174
+ "bg-white border-neutral-300 text-black placeholder:text-neutral-400",
2175
+ "dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:placeholder:text-neutral-500",
2176
+ className
2177
+ ),
2178
+ ...props
2179
+ }
2180
+ );
2181
+ }
2039
2182
 
2040
- // src/icons/IconSVG.tsx
2041
- import { twMerge as twMerge8 } from "tailwind-merge";
2042
- import { jsx as jsx19 } from "react/jsx-runtime";
2043
- function IconSVG({ className, children, ...props }) {
2044
- return /* @__PURE__ */ jsx19(
2045
- "svg",
2183
+ // src/onboarding/deposit/ChainBalance.tsx
2184
+ import { useBalance as useBalance3 } from "wagmi";
2185
+ import { Fragment as Fragment2, jsx as jsx23 } from "react/jsx-runtime";
2186
+ function ChainBalance({ chainId, address }) {
2187
+ const balance = useBalance3({ chainId, address });
2188
+ return /* @__PURE__ */ jsx23(Fragment2, { children: balance.data ? /* @__PURE__ */ jsx23(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx23(PendingIcon, {}) });
2189
+ }
2190
+
2191
+ // src/onboarding/deposit/ChainIcon.tsx
2192
+ import { twMerge as twMerge11 } from "tailwind-merge";
2193
+
2194
+ // src/onboarding/deposit/PreloadedImage.tsx
2195
+ import { twMerge as twMerge10 } from "tailwind-merge";
2196
+ import { jsx as jsx24 } from "react/jsx-runtime";
2197
+ function PreloadedImage({ url, fallback: fallback2, className }) {
2198
+ const { isSuccess, isLoading } = usePreloadImage(url);
2199
+ 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 });
2200
+ }
2201
+
2202
+ // src/onboarding/deposit/ChainIcon.tsx
2203
+ import { forwardRef as forwardRef2 } from "react";
2204
+ import { jsx as jsx25 } from "react/jsx-runtime";
2205
+ var ChainIcon = forwardRef2(function ChainIcon2({ name, url, className }, forwardedRef) {
2206
+ return /* @__PURE__ */ jsx25(
2207
+ "span",
2046
2208
  {
2047
- xmlns: "http://www.w3.org/2000/svg",
2048
- viewBox: "0 0 24 24",
2049
- fill: "currentColor",
2050
- className: twMerge8("-my-[0.125em] h-[1.25em] w-[1.25em]", className),
2051
- ...props,
2052
- children
2209
+ ref: forwardedRef,
2210
+ className: twMerge11("flex-shrink-0 inline-flex w-6 aspect-square rounded-full overflow-clip", className),
2211
+ children: url ? /* @__PURE__ */ jsx25(PreloadedImage, { url }) : (
2212
+ // TODO: better placeholder
2213
+ /* @__PURE__ */ jsx25(
2214
+ "span",
2215
+ {
2216
+ className: twMerge11(
2217
+ "inline-flex items-center justify-center w-full h-full rounded-full",
2218
+ "border-2 border-dashed border-black/20 dark:border-white/50 opacity-50"
2219
+ ),
2220
+ children: name?.slice(0, 1)
2221
+ }
2222
+ )
2223
+ )
2224
+ }
2225
+ );
2226
+ });
2227
+
2228
+ // src/onboarding/deposit/useRelay.ts
2229
+ import {
2230
+ MAINNET_RELAY_API,
2231
+ TESTNET_RELAY_API,
2232
+ fetchChainConfigs,
2233
+ createClient as createClient2,
2234
+ LogLevel
2235
+ } from "@reservoir0x/relay-sdk";
2236
+ import { useQuery as useQuery10 } from "@tanstack/react-query";
2237
+ function useRelay() {
2238
+ const { chain } = useEntryKitConfig();
2239
+ const appOrigin = location.host;
2240
+ const baseApiUrl = chain.testnet ? TESTNET_RELAY_API : MAINNET_RELAY_API;
2241
+ return useQuery10({
2242
+ queryKey: ["relayChains", baseApiUrl, appOrigin],
2243
+ queryFn: async () => {
2244
+ debug("fetching relay chains from", baseApiUrl);
2245
+ const chains = await fetchChainConfigs(baseApiUrl);
2246
+ debug("got relay chains", chains);
2247
+ const client = createClient2({
2248
+ baseApiUrl,
2249
+ source: appOrigin,
2250
+ chains,
2251
+ logLevel: LogLevel.Verbose
2252
+ });
2253
+ return { client, chains };
2254
+ },
2255
+ refetchOnMount: false,
2256
+ refetchOnReconnect: false,
2257
+ refetchOnWindowFocus: false,
2258
+ staleTime: Infinity
2259
+ });
2260
+ }
2261
+
2262
+ // src/onboarding/deposit/ChainSelect.tsx
2263
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
2264
+ function ChainSelect({ value, onChange }) {
2265
+ const theme = useTheme();
2266
+ const { frame } = useFrame();
2267
+ const userAccount = useAccount2();
2268
+ const { chains, switchChain } = useSwitchChain();
2269
+ const relay = useRelay();
2270
+ const relayChains = relay.data?.chains;
2271
+ const sourceChains = useMemo2(() => {
2272
+ return chains.map((sourceChain) => {
2273
+ const relayChain = relayChains?.find((c) => c.id === sourceChain.id);
2274
+ return {
2275
+ ...sourceChain,
2276
+ relayChain
2277
+ };
2278
+ }).filter((c) => c.relayChain);
2279
+ }, [chains, relayChains]);
2280
+ const selectedChain = sourceChains.find((c) => c.id === value);
2281
+ useEffect10(() => {
2282
+ if (sourceChains.length > 0 && !selectedChain) {
2283
+ const defaultChain = sourceChains[0];
2284
+ onChange(defaultChain.id);
2285
+ switchChain({ chainId: defaultChain.id });
2286
+ }
2287
+ }, [value, selectedChain, sourceChains, onChange, switchChain]);
2288
+ return /* @__PURE__ */ jsxs15(
2289
+ Select.Root,
2290
+ {
2291
+ value: value.toString(),
2292
+ onValueChange: (value2) => {
2293
+ if (value2) {
2294
+ const chain = sourceChains.find((chain2) => chain2.id.toString() === value2);
2295
+ if (!chain) throw new Error(`Unknown chain selected: ${value2}`);
2296
+ onChange(chain.id);
2297
+ }
2298
+ },
2299
+ children: [
2300
+ /* @__PURE__ */ jsx26(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2301
+ /* @__PURE__ */ jsx26(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx26(
2302
+ ChainIcon,
2303
+ {
2304
+ id: selectedChain?.id,
2305
+ name: selectedChain?.name,
2306
+ url: selectedChain?.relayChain?.icon?.[theme],
2307
+ className: "w-8"
2308
+ }
2309
+ ) }),
2310
+ /* @__PURE__ */ jsx26(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
2311
+ /* @__PURE__ */ jsx26(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2312
+ /* @__PURE__ */ jsx26(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2313
+ ] }) })
2314
+ ] }) }),
2315
+ 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(
2316
+ Select.Group,
2317
+ {
2318
+ className: twMerge12(
2319
+ "flex flex-col border divide-y",
2320
+ "bg-neutral-100 text-neutral-700 border-neutral-300 divide-neutral-300",
2321
+ "dark:bg-neutral-800 dark:text-neutral-300 dark:border-neutral-700 dark:divide-neutral-700"
2322
+ ),
2323
+ children: sourceChains.map((chain) => (
2324
+ // TODO: figure out why up/down arrow jump to top/bottom rather than cycling through items
2325
+ /* @__PURE__ */ jsxs15(
2326
+ Select.Item,
2327
+ {
2328
+ value: chain.id.toString(),
2329
+ className: twMerge12(
2330
+ "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2331
+ // TODO: different style for checked/active state
2332
+ "text-black focus:bg-white data-[state=checked]:bg-neutral-200",
2333
+ "dark:text-white dark:focus:bg-neutral-700 dark:data-[state=checked]:bg-neutral-900"
2334
+ ),
2335
+ children: [
2336
+ /* @__PURE__ */ jsx26(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2337
+ /* @__PURE__ */ jsx26("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2338
+ /* @__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 }) })
2339
+ ]
2340
+ },
2341
+ chain.id
2342
+ )
2343
+ ))
2344
+ }
2345
+ ) }) }) }) : null
2346
+ ]
2347
+ }
2348
+ );
2349
+ }
2350
+
2351
+ // src/onboarding/deposit/AmountInput.tsx
2352
+ import { formatEther as formatEther3, parseEther as parseEther5 } from "viem";
2353
+ import { twMerge as twMerge13 } from "tailwind-merge";
2354
+ import { forwardRef as forwardRef3 } from "react";
2355
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2356
+ var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange }, forwardedRef) {
2357
+ return /* @__PURE__ */ jsx27(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2358
+ /* @__PURE__ */ jsx27(
2359
+ "input",
2360
+ {
2361
+ ref: forwardedRef,
2362
+ className: twMerge13(
2363
+ "peer flex-grow outline-none bg-transparent",
2364
+ "placeholder:text-neutral-400",
2365
+ "dark:placeholder:text-neutral-500"
2366
+ ),
2367
+ placeholder: "0.005",
2368
+ required: true,
2369
+ autoFocus: true,
2370
+ defaultValue: initialAmount == null ? "" : formatEther3(initialAmount),
2371
+ onChange: (event) => {
2372
+ const input = event.currentTarget;
2373
+ if (input.value.trim() === "") {
2374
+ input.setCustomValidity("");
2375
+ onChange(void 0);
2376
+ return;
2377
+ }
2378
+ const value = input.value.trim().replace(/\.$/, ".0");
2379
+ if (!/^\d*(\.\d+)?$/.test(value)) {
2380
+ return input.setCustomValidity("Invalid amount.");
2381
+ }
2382
+ input.setCustomValidity("");
2383
+ onChange(parseEther5(value));
2384
+ }
2385
+ }
2386
+ ),
2387
+ /* @__PURE__ */ jsx27(
2388
+ "span",
2389
+ {
2390
+ className: twMerge13(
2391
+ "flex-shrink-0 text-2xl",
2392
+ "peer-placeholder-shown:text-neutral-400",
2393
+ "dark:peer-placeholder-shown:text-neutral-500"
2394
+ ),
2395
+ children: /* @__PURE__ */ jsx27(EthIcon, {})
2396
+ }
2397
+ )
2398
+ ] }) });
2399
+ });
2400
+
2401
+ // src/onboarding/deposit/SubmitButton.tsx
2402
+ import { useAccount as useAccount3, useBalance as useBalance4, useSwitchChain as useSwitchChain2 } from "wagmi";
2403
+ import { twMerge as twMerge14 } from "tailwind-merge";
2404
+ import { parseEther as parseEther6 } from "viem";
2405
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2406
+ var MAX_DEPOSIT_AMOUNT = "0.1";
2407
+ function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2408
+ const { chainId: userChainId, address: userAddress } = useAccount3();
2409
+ const { data: userBalance } = useBalance4({ address: userAddress });
2410
+ const shouldSwitchChain = chainId != null && chainId !== userChainId;
2411
+ const switchChain = useSwitchChain2();
2412
+ if (shouldSwitchChain) {
2413
+ return /* @__PURE__ */ jsx28(
2414
+ Button,
2415
+ {
2416
+ type: "button",
2417
+ variant: "primary",
2418
+ className: twMerge14("w-full", className),
2419
+ pending: switchChain.isPending,
2420
+ onClick: () => switchChain.switchChain({ chainId }),
2421
+ children: "Switch chain"
2422
+ }
2423
+ );
2424
+ } else if (amount) {
2425
+ if (amount > parseEther6(MAX_DEPOSIT_AMOUNT)) {
2426
+ return /* @__PURE__ */ jsxs17(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: [
2427
+ "Max amount is ",
2428
+ MAX_DEPOSIT_AMOUNT,
2429
+ " ETH"
2430
+ ] });
2431
+ } else if (amount > (userBalance?.value ?? 0n)) {
2432
+ return /* @__PURE__ */ jsx28(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2433
+ }
2434
+ }
2435
+ return /* @__PURE__ */ jsx28(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2436
+ }
2437
+
2438
+ // src/icons/WarningIcon.tsx
2439
+ import { jsx as jsx29 } from "react/jsx-runtime";
2440
+ function WarningIcon(props) {
2441
+ return /* @__PURE__ */ jsx29(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx29(
2442
+ "path",
2443
+ {
2444
+ 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",
2445
+ stroke: "currentColor",
2446
+ strokeWidth: "2",
2447
+ strokeLinecap: "round",
2448
+ strokeLinejoin: "round"
2449
+ }
2450
+ ) });
2451
+ }
2452
+
2453
+ // src/formatGas.ts
2454
+ import { formatGwei } from "viem";
2455
+ function formatGas(wei) {
2456
+ const formatted = formatGwei(wei);
2457
+ const magnitude = Math.floor(parseFloat(formatted)).toString().length;
2458
+ return parseFloat(formatted).toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
2459
+ }
2460
+
2461
+ // src/onboarding/deposit/DepositForm.tsx
2462
+ import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
2463
+ function DepositForm({
2464
+ sourceChain,
2465
+ setSourceChainId,
2466
+ amount,
2467
+ setAmount,
2468
+ estimatedFee,
2469
+ estimatedTime,
2470
+ onSubmit,
2471
+ submitButton
2472
+ }) {
2473
+ const amountInputRef = useRef3(null);
2474
+ const isMounted = useIsMounted();
2475
+ const { address: userAddress, chainId: userChainId } = useAccount4();
2476
+ const balance = useShowQueryError(useBalance5({ chainId: sourceChain.id, address: userAddress }));
2477
+ const quarryBalance = useShowQueryError(useBalance(userAddress));
2478
+ useWatchBlockNumber2({
2479
+ onBlockNumber: () => {
2480
+ balance.refetch();
2481
+ quarryBalance.refetch();
2482
+ }
2483
+ });
2484
+ const minimumBalance = amount != null ? amount + (estimatedFee?.fee ?? 0n) : void 0;
2485
+ const hasMinimumBalance = balance.data != null ? balance.data.value > (minimumBalance ?? 0n) : void 0;
2486
+ useEffect11(() => {
2487
+ amountInputRef.current?.focus();
2488
+ }, [userChainId]);
2489
+ return /* @__PURE__ */ jsxs18(
2490
+ "form",
2491
+ {
2492
+ className: "flex flex-col gap-5",
2493
+ onSubmit: async (event) => {
2494
+ event.preventDefault();
2495
+ try {
2496
+ await onSubmit();
2497
+ if (isMounted()) {
2498
+ setAmount(void 0);
2499
+ if (amountInputRef.current) {
2500
+ amountInputRef.current.value = "";
2501
+ }
2502
+ }
2503
+ } catch (error2) {
2504
+ console.error("Error during deposit", error2);
2505
+ } finally {
2506
+ amountInputRef.current?.focus();
2507
+ }
2508
+ },
2509
+ children: [
2510
+ /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
2511
+ /* @__PURE__ */ jsx30(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2512
+ /* @__PURE__ */ jsx30(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2513
+ ] }),
2514
+ /* @__PURE__ */ jsxs18(
2515
+ "dl",
2516
+ {
2517
+ className: twMerge15(
2518
+ "grid grid-cols-2 divide-y text-sm leading-loose [&_>_:is(dt,dd)]:px-1 [&_>_dd]:text-right",
2519
+ "divide-neutral-200 text-neutral-500",
2520
+ "dark:divide-neutral-700 dark:text-neutral-400"
2521
+ ),
2522
+ children: [
2523
+ /* @__PURE__ */ jsx30("dt", { children: "Available to deposit" }),
2524
+ /* @__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 }),
2525
+ /* @__PURE__ */ jsx30("dt", { children: "Gas balance after deposit" }),
2526
+ /* @__PURE__ */ jsx30("dd", { children: /* @__PURE__ */ jsx30(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2527
+ /* @__PURE__ */ jsx30("dt", { children: "Estimated fee" }),
2528
+ /* @__PURE__ */ jsx30("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment4, { children: [
2529
+ formatGas(estimatedFee.fee),
2530
+ " gwei"
2531
+ ] }) : 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 }),
2532
+ /* @__PURE__ */ jsx30("dt", { children: "Time to deposit" }),
2533
+ /* @__PURE__ */ jsx30("dd", { children: estimatedTime })
2534
+ ]
2535
+ }
2536
+ ),
2537
+ hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx30(SubmitButton, { disabled: true, children: "Not enough funds" })
2538
+ ]
2539
+ }
2540
+ );
2541
+ }
2542
+
2543
+ // src/onboarding/deposit/useDeposits.ts
2544
+ import { createStore as createStore4 } from "zustand/vanilla";
2545
+ import { useStore as useStore2 } from "zustand";
2546
+ import { useCallback as useCallback2, useMemo as useMemo3 } from "react";
2547
+ var store4 = createStore4(() => ({
2548
+ count: 0,
2549
+ deposits: []
2550
+ }));
2551
+ function useDeposits() {
2552
+ const deposits = useStore2(store4, (state) => state.deposits);
2553
+ const addDeposit = useCallback2((transaction) => {
2554
+ store4.setState((state) => {
2555
+ if (transaction.type === "relay") {
2556
+ const existingDeposit = state.deposits.find(
2557
+ (deposit) => deposit.type === "relay" && deposit.requestId === transaction.requestId
2558
+ );
2559
+ if (existingDeposit) {
2560
+ return state;
2561
+ }
2562
+ }
2563
+ return {
2564
+ count: state.count + 1,
2565
+ deposits: [
2566
+ ...state.deposits,
2567
+ {
2568
+ ...transaction,
2569
+ uid: `deposit-${state.count}`
2570
+ }
2571
+ ]
2572
+ };
2573
+ });
2574
+ }, []);
2575
+ const removeDeposit = useCallback2((uid) => {
2576
+ store4.setState((state) => ({
2577
+ deposits: state.deposits.filter((deposit) => deposit.uid !== uid)
2578
+ }));
2579
+ }, []);
2580
+ return useMemo3(
2581
+ () => ({
2582
+ deposits,
2583
+ addDeposit,
2584
+ removeDeposit
2585
+ }),
2586
+ [addDeposit, deposits, removeDeposit]
2587
+ );
2588
+ }
2589
+
2590
+ // src/onboarding/deposit/DepositViaTransferForm.tsx
2591
+ import { jsx as jsx31 } from "react/jsx-runtime";
2592
+ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2593
+ const { chain } = useEntryKitConfig();
2594
+ const paymaster = getPaymaster(chain);
2595
+ const publicClient = usePublicClient();
2596
+ const { address: userAddress } = useAccount5();
2597
+ const { writeContractAsync } = useWriteContract();
2598
+ const { addDeposit } = useDeposits();
2599
+ if (!userAddress) {
2600
+ throw new Error("User address not found");
2601
+ }
2602
+ const { data: gasPrice } = useQuery11({
2603
+ queryKey: ["gasPrice", sourceChain.id],
2604
+ queryFn: async () => {
2605
+ if (!publicClient) throw new Error("Public client not available");
2606
+ return publicClient.getGasPrice();
2607
+ },
2608
+ refetchInterval: 15e3,
2609
+ enabled: !!publicClient
2610
+ });
2611
+ const { data: prepareData, error: prepareError } = usePrepareTransactionRequest({
2612
+ to: paymaster?.address,
2613
+ data: encodeFunctionData2({
2614
+ abi: paymasterAbi,
2615
+ functionName: "depositTo",
2616
+ args: [userAddress]
2617
+ }),
2618
+ value: amount
2619
+ });
2620
+ const deposit = useMutation4({
2621
+ mutationKey: ["depositViaTransfer", amount?.toString()],
2622
+ mutationFn: async () => {
2623
+ if (!paymaster) throw new Error("Paymaster not found");
2624
+ if (!publicClient) throw new Error("Public client not found");
2625
+ if (!amount) throw new Error("Amount cannot be 0");
2626
+ try {
2627
+ const hash = await writeContractAsync({
2628
+ address: paymaster.address,
2629
+ abi: paymasterAbi,
2630
+ functionName: "depositTo",
2631
+ args: [userAddress],
2632
+ value: amount
2633
+ });
2634
+ const receipt = publicClient.waitForTransactionReceipt({ hash }).then((receipt2) => {
2635
+ if (receipt2.status === "reverted") {
2636
+ throw new Error("Transfer transaction reverted.");
2637
+ }
2638
+ return receipt2;
2639
+ });
2640
+ const pendingDeposit = {
2641
+ type: "transfer",
2642
+ amount,
2643
+ chainL1Id: sourceChain.id,
2644
+ chainL2Id: chain.id,
2645
+ hash,
2646
+ receipt,
2647
+ start: /* @__PURE__ */ new Date(),
2648
+ estimatedTime: 1e3 * 12,
2649
+ isComplete: receipt.then(() => void 0)
2650
+ };
2651
+ addDeposit(pendingDeposit);
2652
+ } catch (error2) {
2653
+ console.error("Error while depositing via bridge", error2);
2654
+ throw error2;
2655
+ }
2656
+ }
2657
+ });
2658
+ const estimatedFee = prepareData?.gas && gasPrice ? prepareData.gas * gasPrice : void 0;
2659
+ return /* @__PURE__ */ jsx31(
2660
+ DepositForm,
2661
+ {
2662
+ sourceChain,
2663
+ setSourceChainId,
2664
+ amount,
2665
+ setAmount,
2666
+ estimatedFee: {
2667
+ fee: estimatedFee,
2668
+ isLoading: !prepareData && !prepareError || !gasPrice,
2669
+ error: prepareError instanceof Error ? prepareError : void 0
2670
+ },
2671
+ estimatedTime: "A few seconds",
2672
+ onSubmit: async () => {
2673
+ await deposit.mutateAsync();
2674
+ },
2675
+ submitButton: /* @__PURE__ */ jsx31(
2676
+ SubmitButton,
2677
+ {
2678
+ variant: "primary",
2679
+ amount,
2680
+ chainId: sourceChain.id,
2681
+ disabled: !!prepareError || !amount || !userAddress,
2682
+ pending: deposit.isPending,
2683
+ children: "Deposit"
2684
+ }
2685
+ )
2053
2686
  }
2054
2687
  );
2055
2688
  }
2056
2689
 
2690
+ // src/onboarding/deposit/DepositViaRelayForm.tsx
2691
+ import { encodeFunctionData as encodeFunctionData3 } from "viem";
2692
+ import { useAccount as useAccount6, useWalletClient } from "wagmi";
2693
+ import { useMutation as useMutation5, useQuery as useQuery12 } from "@tanstack/react-query";
2694
+ import { jsx as jsx32 } from "react/jsx-runtime";
2695
+ var ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
2696
+ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2697
+ const { chain, chainId: destinationChainId } = useEntryKitConfig();
2698
+ const paymaster = getPaymaster(chain);
2699
+ const { data: wallet } = useWalletClient();
2700
+ const { address: userAddress } = useAccount6();
2701
+ const { addDeposit } = useDeposits();
2702
+ const { data: relay } = useRelay();
2703
+ const relayClient = relay?.client;
2704
+ const quote = useQuery12({
2705
+ queryKey: ["relayBridgeQuote", sourceChain.id, amount?.toString()],
2706
+ queryFn: async () => {
2707
+ if (!relayClient) throw new Error("No Relay client found.");
2708
+ if (!userAddress) throw new Error("No user address found.");
2709
+ const result = await relayClient.actions.getQuote({
2710
+ chainId: sourceChain.id,
2711
+ toChainId: destinationChainId,
2712
+ currency: ETH_ADDRESS,
2713
+ toCurrency: ETH_ADDRESS,
2714
+ amount: amount?.toString(),
2715
+ tradeType: "EXACT_OUTPUT",
2716
+ recipient: paymaster?.address,
2717
+ wallet,
2718
+ txs: [
2719
+ {
2720
+ to: paymaster?.address,
2721
+ data: encodeFunctionData3({
2722
+ abi: paymasterAbi,
2723
+ functionName: "depositTo",
2724
+ args: [userAddress]
2725
+ }),
2726
+ value: amount?.toString()
2727
+ }
2728
+ ]
2729
+ });
2730
+ if (!result) {
2731
+ throw new Error("Failed to get relay quote");
2732
+ }
2733
+ return result;
2734
+ },
2735
+ retry: 1,
2736
+ refetchInterval: 15e3,
2737
+ enabled: !!amount && !!userAddress && !!relayClient
2738
+ });
2739
+ const deposit = useMutation5({
2740
+ mutationKey: ["depositViaRelay", sourceChain.id, amount?.toString()],
2741
+ mutationFn: async ({ quote: quote2, amount: amount2 }) => {
2742
+ if (!relayClient) throw new Error("No Relay client found.");
2743
+ if (!wallet) throw new Error("No wallet found.");
2744
+ try {
2745
+ return new Promise((resolve) => {
2746
+ const pendingDeposit = relayClient.actions.execute({
2747
+ quote: quote2,
2748
+ wallet,
2749
+ onProgress(progress) {
2750
+ const currentStep = progress.currentStep;
2751
+ const requestId = currentStep?.requestId;
2752
+ const currentState = currentStep?.items[0]?.progressState;
2753
+ if (requestId && currentState === "validating") {
2754
+ addDeposit({
2755
+ type: "relay",
2756
+ requestId,
2757
+ amount: amount2,
2758
+ chainL1Id: sourceChain.id,
2759
+ chainL2Id: destinationChainId,
2760
+ start: /* @__PURE__ */ new Date(),
2761
+ estimatedTime: 1e3 * 30,
2762
+ depositPromise: pendingDeposit,
2763
+ isComplete: pendingDeposit.then(() => void 0)
2764
+ });
2765
+ resolve(void 0);
2766
+ }
2767
+ }
2768
+ });
2769
+ });
2770
+ } catch (error2) {
2771
+ console.error("Error while depositing via Relay", error2);
2772
+ throw error2;
2773
+ }
2774
+ }
2775
+ });
2776
+ const fees = quote.data?.fees;
2777
+ const gasFee = BigInt(fees?.gas?.amount ?? 0);
2778
+ const relayerFee = BigInt(fees?.relayer?.amount ?? 0);
2779
+ const fee = gasFee + relayerFee;
2780
+ return /* @__PURE__ */ jsx32(
2781
+ DepositForm,
2782
+ {
2783
+ sourceChain,
2784
+ setSourceChainId,
2785
+ amount,
2786
+ setAmount,
2787
+ estimatedFee: {
2788
+ fee: fee != null ? BigInt(fee) : void 0,
2789
+ isLoading: quote.isLoading,
2790
+ error: quote.error instanceof Error ? quote.error : void 0
2791
+ },
2792
+ estimatedTime: "A few seconds",
2793
+ onSubmit: async () => {
2794
+ if (!quote.data || !amount) return;
2795
+ await deposit.mutateAsync({ quote: quote.data, amount });
2796
+ },
2797
+ submitButton: /* @__PURE__ */ jsx32(
2798
+ SubmitButton,
2799
+ {
2800
+ variant: "primary",
2801
+ amount,
2802
+ chainId: sourceChain.id,
2803
+ disabled: quote.isError || !amount,
2804
+ pending: deposit.isPending,
2805
+ children: "Deposit"
2806
+ }
2807
+ )
2808
+ }
2809
+ );
2810
+ }
2811
+
2812
+ // src/onboarding/deposit/Deposits.tsx
2813
+ import { useEffect as useEffect13 } from "react";
2814
+ import { useQuery as useQuery15, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
2815
+
2816
+ // src/onboarding/deposit/TransferDepositStatus.tsx
2817
+ import { useQuery as useQuery13 } from "@tanstack/react-query";
2818
+
2819
+ // src/onboarding/deposit/DepositStatus.tsx
2820
+ import { useEffect as useEffect12, useState as useState4 } from "react";
2821
+ import { twMerge as twMerge16 } from "tailwind-merge";
2822
+
2057
2823
  // src/icons/CloseIcon.tsx
2058
- import { jsx as jsx20 } from "react/jsx-runtime";
2824
+ import { jsx as jsx33 } from "react/jsx-runtime";
2059
2825
  function CloseIcon(props) {
2060
- return /* @__PURE__ */ jsx20(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx20(
2826
+ return /* @__PURE__ */ jsx33(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx33(
2061
2827
  "path",
2062
2828
  {
2063
2829
  d: "M6 18L18 6M6 6L18 18",
@@ -2070,52 +2836,502 @@ function CloseIcon(props) {
2070
2836
  ) });
2071
2837
  }
2072
2838
 
2839
+ // src/onboarding/deposit/DepositStatus.tsx
2840
+ import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
2841
+ function DepositStatus({ status, progress, children, onDismiss }) {
2842
+ const [appear, setAppear] = useState4(false);
2843
+ useEffect12(() => {
2844
+ setAppear(true);
2845
+ }, []);
2846
+ 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: [
2847
+ /* @__PURE__ */ jsxs19("div", { className: "py-1 text-sm flex items-center gap-2", children: [
2848
+ /* @__PURE__ */ jsx34("div", { className: "flex-grow", children }),
2849
+ /* @__PURE__ */ jsxs19("div", { className: "flex-shrink-0 grid", children: [
2850
+ /* @__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" }) }),
2851
+ /* @__PURE__ */ jsx34(
2852
+ "button",
2853
+ {
2854
+ type: "button",
2855
+ className: twMerge16(
2856
+ "col-start-1 row-start-1 flex items-center justify-center transition",
2857
+ "opacity-0 pointer-events-none",
2858
+ "group-hover:opacity-100 group-hover:pointer-events-auto",
2859
+ "text-neutral-400 hover:text-black",
2860
+ "dark:text-neutral-500 dark:hover:text-white"
2861
+ ),
2862
+ title: "Dismiss",
2863
+ onClick: onDismiss,
2864
+ children: /* @__PURE__ */ jsx34(CloseIcon, {})
2865
+ }
2866
+ )
2867
+ ] })
2868
+ ] }),
2869
+ /* @__PURE__ */ jsx34("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx34(
2870
+ "div",
2871
+ {
2872
+ className: twMerge16(
2873
+ "w-full h-full transition ease-linear",
2874
+ 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",
2875
+ status === "pending" ? "opacity-100" : "opacity-0"
2876
+ ),
2877
+ style: status === "pending" ? {
2878
+ transform: appear ? `translateX(0)` : "translate(-100%)",
2879
+ transitionDuration: `${progress.duration}ms`,
2880
+ transitionDelay: `-${Math.min(progress.duration, progress.elapsed)}ms`
2881
+ } : void 0
2882
+ }
2883
+ ) })
2884
+ ] });
2885
+ }
2886
+
2887
+ // src/onboarding/deposit/TransferDepositStatus.tsx
2888
+ import { useChains as useChains2 } from "wagmi";
2889
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
2890
+ function TransferDepositStatus({
2891
+ amount,
2892
+ chainL1Id,
2893
+ hash,
2894
+ receipt: receiptPromise,
2895
+ start,
2896
+ estimatedTime,
2897
+ onDismiss
2898
+ }) {
2899
+ const chains = useChains2();
2900
+ const chain = chains.find((chain2) => chain2.id === chainL1Id);
2901
+ const receipt = useQuery13({
2902
+ queryKey: ["transferDepositStatus", hash],
2903
+ queryFn: () => receiptPromise
2904
+ });
2905
+ return /* @__PURE__ */ jsx35(
2906
+ DepositStatus,
2907
+ {
2908
+ status: receipt.status,
2909
+ progress: {
2910
+ duration: estimatedTime,
2911
+ elapsed: Math.min(estimatedTime, Date.now() - start.getTime())
2912
+ },
2913
+ onDismiss,
2914
+ children: (() => {
2915
+ const blockExplorer = chain.blockExplorers?.default.url;
2916
+ if (receipt.status === "pending") {
2917
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2918
+ "Confirming deposit on",
2919
+ " ",
2920
+ /* @__PURE__ */ jsx35(
2921
+ "a",
2922
+ {
2923
+ href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
2924
+ target: "_blank",
2925
+ rel: "noreferrer noopener",
2926
+ children: chain.name
2927
+ }
2928
+ ),
2929
+ "\u2026"
2930
+ ] });
2931
+ }
2932
+ if (receipt.status === "error") {
2933
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2934
+ "Could not find deposit on",
2935
+ " ",
2936
+ /* @__PURE__ */ jsx35(
2937
+ "a",
2938
+ {
2939
+ href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
2940
+ target: "_blank",
2941
+ rel: "noreferrer noopener",
2942
+ children: chain.name
2943
+ }
2944
+ ),
2945
+ "."
2946
+ ] });
2947
+ }
2948
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2949
+ "Successfully",
2950
+ " ",
2951
+ /* @__PURE__ */ jsx35(
2952
+ "a",
2953
+ {
2954
+ href: blockExplorer ? `${blockExplorer}/tx/${receipt.data.transactionHash}` : void 0,
2955
+ target: "_blank",
2956
+ rel: "noreferrer noopener",
2957
+ children: "deposited"
2958
+ }
2959
+ ),
2960
+ " ",
2961
+ /* @__PURE__ */ jsx35(Balance, { wei: amount })
2962
+ ] });
2963
+ })()
2964
+ }
2965
+ );
2966
+ }
2967
+
2968
+ // src/onboarding/deposit/RelayDepositStatus.tsx
2969
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
2970
+ import { useChains as useChains3 } from "wagmi";
2971
+ import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
2972
+ function RelayDepositStatus({
2973
+ amount,
2974
+ chainL1Id,
2975
+ chainL2Id,
2976
+ start,
2977
+ estimatedTime,
2978
+ depositPromise,
2979
+ onDismiss
2980
+ }) {
2981
+ const chains = useChains3();
2982
+ const chainL1 = chains.find((chain) => chain.id === chainL1Id);
2983
+ const chainL2 = chains.find((chain) => chain.id === chainL2Id);
2984
+ const deposit = useQuery14({
2985
+ queryKey: ["relayDepositPromise", chainL1Id, chainL2Id, amount.toString(), start.toISOString()],
2986
+ queryFn: () => depositPromise
2987
+ });
2988
+ return /* @__PURE__ */ jsx36(
2989
+ DepositStatus,
2990
+ {
2991
+ status: deposit.status,
2992
+ progress: {
2993
+ duration: estimatedTime,
2994
+ elapsed: Math.min(estimatedTime, Date.now() - start.getTime())
2995
+ },
2996
+ onDismiss,
2997
+ children: (() => {
2998
+ if (deposit.status === "pending") {
2999
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3000
+ "Relay bridge deposit pending on ",
3001
+ chainL1.name,
3002
+ "\u2026"
3003
+ ] });
3004
+ }
3005
+ if (deposit.status === "error") {
3006
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3007
+ "Relay bridge deposit to ",
3008
+ chainL2.name,
3009
+ " failed."
3010
+ ] });
3011
+ }
3012
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3013
+ "Successfully bridged ",
3014
+ /* @__PURE__ */ jsx36(Balance, { wei: amount }),
3015
+ " to ",
3016
+ chainL2.name,
3017
+ "!"
3018
+ ] });
3019
+ })()
3020
+ }
3021
+ );
3022
+ }
3023
+
3024
+ // src/onboarding/deposit/Deposits.tsx
3025
+ import { useAccount as useAccount7, useClient as useClient11 } from "wagmi";
3026
+ import { jsx as jsx37 } from "react/jsx-runtime";
3027
+ function Deposits() {
3028
+ const queryClient = useQueryClient7();
3029
+ const { chainId } = useEntryKitConfig();
3030
+ const client = useClient11({ chainId });
3031
+ const { address: userAddress } = useAccount7();
3032
+ const { deposits, removeDeposit } = useDeposits();
3033
+ const { data: isComplete } = useQuery15({
3034
+ queryKey: ["depositsComplete", deposits.map((deposit) => deposit.uid)],
3035
+ queryFn: async () => {
3036
+ if (!deposits.length) return false;
3037
+ await Promise.all(deposits.map((deposit) => deposit.isComplete));
3038
+ return true;
3039
+ }
3040
+ });
3041
+ useEffect13(() => {
3042
+ if (isComplete) {
3043
+ queryClient.invalidateQueries({ queryKey: ["balance"] });
3044
+ queryClient.invalidateQueries({ queryKey: ["getBalance", client?.uid, userAddress] });
3045
+ }
3046
+ }, [client?.uid, isComplete, queryClient, userAddress]);
3047
+ if (!deposits.length) return null;
3048
+ return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3049
+ if (deposit.type === "transfer") {
3050
+ return /* @__PURE__ */ jsx37(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3051
+ } else if (deposit.type === "relay") {
3052
+ return /* @__PURE__ */ jsx37(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3053
+ }
3054
+ }) });
3055
+ }
3056
+
3057
+ // src/onboarding/deposit/DepositFormContainer.tsx
3058
+ import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
3059
+ function DepositFormContainer() {
3060
+ const { chainId: destinationChainId } = useEntryKitConfig();
3061
+ const chainId = useChainId();
3062
+ const chains = useChains4();
3063
+ const [amount, setAmount] = useState5(void 0);
3064
+ const [sourceChainId, setSourceChainId] = useState5(chainId);
3065
+ const sourceChain = chains.find(({ id }) => id === sourceChainId);
3066
+ return /* @__PURE__ */ jsxs22("div", { className: "pt-10 pb-2", children: [
3067
+ destinationChainId === sourceChainId ? /* @__PURE__ */ jsx38(
3068
+ DepositViaTransferForm,
3069
+ {
3070
+ amount,
3071
+ setAmount,
3072
+ sourceChain,
3073
+ setSourceChainId
3074
+ }
3075
+ ) : /* @__PURE__ */ jsx38(
3076
+ DepositViaRelayForm,
3077
+ {
3078
+ amount,
3079
+ setAmount,
3080
+ sourceChain,
3081
+ setSourceChainId
3082
+ }
3083
+ ),
3084
+ /* @__PURE__ */ jsx38(Deposits, {})
3085
+ ] });
3086
+ }
3087
+
3088
+ // src/icons/ArrowLeftIcon.tsx
3089
+ import { jsx as jsx39 } from "react/jsx-runtime";
3090
+ function ArrowLeftIcon(props) {
3091
+ return /* @__PURE__ */ jsx39(IconSVG, { ...props, children: /* @__PURE__ */ jsx39(
3092
+ "path",
3093
+ {
3094
+ d: "M19 12H5M12 19l-7-7 7-7",
3095
+ fill: "none",
3096
+ stroke: "currentColor",
3097
+ strokeWidth: "2",
3098
+ strokeLinecap: "round",
3099
+ strokeLinejoin: "round"
3100
+ }
3101
+ ) });
3102
+ }
3103
+
3104
+ // src/onboarding/quarry/GasBalance.tsx
3105
+ import { useEffect as useEffect14 } from "react";
3106
+ import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
3107
+ import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
3108
+ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress }) {
3109
+ const queryClient = useQueryClient8();
3110
+ const balance = useShowQueryError(useBalance(userAddress));
3111
+ const prevBalance = usePrevious(balance.data || 0n);
3112
+ useEffect14(() => {
3113
+ if (balance.data != null && prevBalance === 0n && balance.data > 0n) {
3114
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] });
3115
+ setFocused(false);
3116
+ }
3117
+ }, [balance.data, prevBalance, setFocused, queryClient, userAddress]);
3118
+ if (isFocused) {
3119
+ return /* @__PURE__ */ jsxs23(Fragment7, { children: [
3120
+ isFocused && /* @__PURE__ */ jsx40("div", { className: "absolute top-0 left-0", children: /* @__PURE__ */ jsx40(
3121
+ "div",
3122
+ {
3123
+ className: "flex items-center justify-center w-10 h-10 text-white/20 hover:text-white/40 cursor-pointer",
3124
+ onClick: () => setFocused(false),
3125
+ children: /* @__PURE__ */ jsx40(ArrowLeftIcon, { className: "m-0" })
3126
+ }
3127
+ ) }),
3128
+ /* @__PURE__ */ jsx40(DepositFormContainer, {})
3129
+ ] });
3130
+ }
3131
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4", children: [
3132
+ /* @__PURE__ */ jsxs23("div", { className: "flex justify-between gap-4", children: [
3133
+ /* @__PURE__ */ jsxs23("div", { children: [
3134
+ /* @__PURE__ */ jsx40("div", { children: "Gas balance" }),
3135
+ /* @__PURE__ */ jsx40("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx40(Balance, { wei: balance.data }) : /* @__PURE__ */ jsx40(PendingIcon, { className: "text-sm" }) })
3136
+ ] }),
3137
+ /* @__PURE__ */ jsx40(
3138
+ Button,
3139
+ {
3140
+ variant: isActive ? "primary" : "tertiary",
3141
+ className: "flex-shrink-0 text-sm p-1 w-28",
3142
+ autoFocus: isActive || isExpanded,
3143
+ pending: balance.status === "pending",
3144
+ onClick: () => setFocused(true),
3145
+ children: "Top up"
3146
+ }
3147
+ )
3148
+ ] }),
3149
+ isExpanded ? /* @__PURE__ */ jsx40("p", { className: "text-sm", children: "Your gas balance is used to pay for onchain computation." }) : null
3150
+ ] });
3151
+ }
3152
+
3153
+ // src/onboarding/ConnectedSteps.tsx
3154
+ import { jsx as jsx41 } from "react/jsx-runtime";
3155
+ function ConnectedSteps({ userClient, initialUserAddress }) {
3156
+ const { chain } = useEntryKitConfig();
3157
+ const paymaster = getPaymaster(chain);
3158
+ const [focusedId, setFocusedId] = useState6(null);
3159
+ const userAddress = userClient.account.address;
3160
+ const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
3161
+ useEffect15(() => {
3162
+ if (prerequisitesError) {
3163
+ console.error("Could not get prerequisites", prerequisitesError);
3164
+ }
3165
+ }, [prerequisitesError]);
3166
+ const { closeAccountModal } = useAccountModal();
3167
+ const isNewConnection = userAddress !== initialUserAddress;
3168
+ const initialPrerequisites = useRef4(prerequisites);
3169
+ useEffect15(() => {
3170
+ if (prerequisites == null) return;
3171
+ if (initialPrerequisites.current == null) {
3172
+ initialPrerequisites.current = prerequisites;
3173
+ }
3174
+ if (prerequisites.complete) {
3175
+ if (isNewConnection || !initialPrerequisites.current.complete) {
3176
+ closeAccountModal();
3177
+ }
3178
+ }
3179
+ }, [closeAccountModal, isNewConnection, prerequisites]);
3180
+ const { sessionAddress, hasAllowance, isSpender, hasDelegation, hasGasBalance, hasQuarryGasBalance } = prerequisites ?? {};
3181
+ const steps = useMemo4(() => {
3182
+ if (!userAddress) {
3183
+ return [
3184
+ {
3185
+ id: "wallet",
3186
+ isComplete: false,
3187
+ content: () => null
3188
+ }
3189
+ ];
3190
+ }
3191
+ const steps2 = [
3192
+ {
3193
+ id: "wallet",
3194
+ isComplete: true,
3195
+ content: (props) => /* @__PURE__ */ jsx41(Wallet, { ...props, userAddress })
3196
+ }
3197
+ ];
3198
+ if (!paymaster) {
3199
+ if (sessionAddress != null) {
3200
+ steps2.push({
3201
+ id: "gasBalance",
3202
+ isComplete: !!hasGasBalance,
3203
+ content: (props) => /* @__PURE__ */ jsx41(GasBalance, { ...props, sessionAddress })
3204
+ });
3205
+ }
3206
+ } else if (paymaster.type === "quarry") {
3207
+ if (paymaster.isGasPass) {
3208
+ steps2.push({
3209
+ id: "allowance",
3210
+ isComplete: !!hasAllowance,
3211
+ content: (props) => /* @__PURE__ */ jsx41(Allowance, { ...props, userAddress })
3212
+ });
3213
+ } else {
3214
+ steps2.push({
3215
+ id: "gasBalanceQuarry",
3216
+ isComplete: !!hasQuarryGasBalance,
3217
+ content: (props) => /* @__PURE__ */ jsx41(GasBalance2, { ...props, userAddress })
3218
+ });
3219
+ }
3220
+ }
3221
+ steps2.push({
3222
+ id: "session",
3223
+ isComplete: !!isSpender && !!hasDelegation,
3224
+ content: (props) => /* @__PURE__ */ jsx41(Session, { ...props, userClient, registerSpender: !isSpender, registerDelegation: !hasDelegation })
3225
+ });
3226
+ return steps2;
3227
+ }, [
3228
+ hasAllowance,
3229
+ hasDelegation,
3230
+ hasGasBalance,
3231
+ hasQuarryGasBalance,
3232
+ isSpender,
3233
+ paymaster,
3234
+ sessionAddress,
3235
+ userAddress,
3236
+ userClient
3237
+ ]);
3238
+ const [selectedStepId] = useState6(null);
3239
+ const nextStep = steps.find((step) => step.content != null && !step.isComplete);
3240
+ const completedSteps = steps.filter((step) => step.isComplete);
3241
+ const activeStep = (selectedStepId != null ? steps.find((step) => step.id === selectedStepId) : null) ?? nextStep ?? (completedSteps.length < steps.length ? completedSteps.at(-1) : null);
3242
+ const activeStepIndex = activeStep ? steps.indexOf(activeStep) : -1;
3243
+ return /* @__PURE__ */ jsx41(
3244
+ "div",
3245
+ {
3246
+ className: twMerge17(
3247
+ "px-8 flex flex-col",
3248
+ focusedId && "divide-y divide-neutral-800",
3249
+ "animate-in animate-duration-300 fade-in slide-in-from-bottom-8"
3250
+ ),
3251
+ children: steps.map((step, i) => {
3252
+ const isActive = step === activeStep;
3253
+ const isExpanded = isActive || completedSteps.length === steps.length;
3254
+ const isDisabled = !step.isComplete && activeStepIndex !== -1 && i > activeStepIndex;
3255
+ const isFocused = focusedId === step.id;
3256
+ const content = step.content({
3257
+ isActive,
3258
+ isExpanded,
3259
+ isFocused,
3260
+ setFocused: (focused) => setFocusedId(focused ? step.id : null)
3261
+ });
3262
+ if (focusedId) {
3263
+ if (step.id === focusedId) {
3264
+ return content;
3265
+ }
3266
+ return null;
3267
+ }
3268
+ 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);
3269
+ })
3270
+ }
3271
+ );
3272
+ }
3273
+
3274
+ // src/AccountModalContent.tsx
3275
+ import { useRef as useRef5 } from "react";
3276
+ import { jsx as jsx42 } from "react/jsx-runtime";
3277
+ function AccountModalContent() {
3278
+ const { chainId } = useEntryKitConfig();
3279
+ const userClient = useConnectorClient({ chainId });
3280
+ const { address: userAddress } = useAccount8();
3281
+ const initialUserAddress = useRef5(userAddress);
3282
+ if (userClient.status !== "success") {
3283
+ return /* @__PURE__ */ jsx42(ConnectWallet, {});
3284
+ }
3285
+ return /* @__PURE__ */ jsx42(ConnectedSteps, { userClient: userClient.data, initialUserAddress: initialUserAddress.current });
3286
+ }
3287
+
2073
3288
  // src/AccountModal.tsx
3289
+ import { DialogClose } from "@radix-ui/react-dialog";
2074
3290
  import { ErrorBoundary } from "react-error-boundary";
2075
3291
 
2076
3292
  // src/errors/ErrorOverlay.tsx
2077
3293
  import { wait } from "@latticexyz/common/utils";
2078
- import { useEffect as useEffect9 } from "react";
2079
- import { twMerge as twMerge9 } from "tailwind-merge";
2080
- import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3294
+ import { useEffect as useEffect16 } from "react";
3295
+ import { twMerge as twMerge18 } from "tailwind-merge";
3296
+ import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
2081
3297
  function ErrorOverlay({ error: error2, retry, dismiss }) {
2082
- useEffect9(() => {
3298
+ useEffect16(() => {
2083
3299
  if (error2) {
2084
3300
  console.error(error2);
2085
3301
  }
2086
3302
  }, [error2]);
2087
- return /* @__PURE__ */ jsxs15("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
2088
- /* @__PURE__ */ jsx21(
3303
+ return /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3304
+ /* @__PURE__ */ jsx43(
2089
3305
  "div",
2090
3306
  {
2091
- className: twMerge9(
3307
+ className: twMerge18(
2092
3308
  "absolute inset-0 bg-blue-700/60",
2093
3309
  "transition duration-300",
2094
3310
  error2 ? "opacity-100 pointer-events-auto" : "opacity-0"
2095
3311
  )
2096
3312
  }
2097
3313
  ),
2098
- /* @__PURE__ */ jsx21(
3314
+ /* @__PURE__ */ jsx43(
2099
3315
  "div",
2100
3316
  {
2101
- className: twMerge9(
3317
+ className: twMerge18(
2102
3318
  "absolute inset-0 pb-8",
2103
3319
  "transition duration-300",
2104
3320
  error2 ? "translate-y-0 opacity-100 pointer-events-auto" : "-translate-y-4 opacity-0"
2105
3321
  ),
2106
- children: error2 ? /* @__PURE__ */ jsx21(Fragment2, { children: /* @__PURE__ */ jsxs15("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
2107
- /* @__PURE__ */ jsxs15("div", { className: "space-y-6 px-8 pt-8", children: [
2108
- /* @__PURE__ */ jsx21("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
2109
- /* @__PURE__ */ jsx21("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
2110
- /* @__PURE__ */ jsx21("div", { className: "text-sm", children: "See the console for more info." })
3322
+ children: error2 ? /* @__PURE__ */ jsx43(Fragment8, { children: /* @__PURE__ */ jsxs24("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3323
+ /* @__PURE__ */ jsxs24("div", { className: "space-y-6 px-8 pt-8", children: [
3324
+ /* @__PURE__ */ jsx43("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
3325
+ /* @__PURE__ */ jsx43("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
3326
+ /* @__PURE__ */ jsx43("div", { className: "text-sm", children: "See the console for more info." })
2111
3327
  ] }),
2112
- /* @__PURE__ */ jsxs15("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
2113
- /* @__PURE__ */ jsx21("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
2114
- retry ? /* @__PURE__ */ jsx21("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs15(
3328
+ /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3329
+ /* @__PURE__ */ jsx43("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
3330
+ retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs24(
2115
3331
  "button",
2116
3332
  {
2117
3333
  type: "button",
2118
- className: twMerge9(
3334
+ className: twMerge18(
2119
3335
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
2120
3336
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
2121
3337
  "text-white text-sm font-medium",
@@ -2130,15 +3346,15 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
2130
3346
  }
2131
3347
  },
2132
3348
  children: [
2133
- /* @__PURE__ */ jsx21("span", { className: "group-aria-busy:hidden", children: "Retry" }),
2134
- /* @__PURE__ */ jsx21("span", { className: "hidden group-aria-busy:inline", children: "Retrying\u2026" })
3349
+ /* @__PURE__ */ jsx43("span", { className: "group-aria-busy:hidden", children: "Retry" }),
3350
+ /* @__PURE__ */ jsx43("span", { className: "hidden group-aria-busy:inline", children: "Retrying\u2026" })
2135
3351
  ]
2136
3352
  }
2137
- ) }) : dismiss ? /* @__PURE__ */ jsx21("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsx21(
3353
+ ) }) : dismiss ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsx43(
2138
3354
  "button",
2139
3355
  {
2140
3356
  type: "button",
2141
- className: twMerge9(
3357
+ className: twMerge18(
2142
3358
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
2143
3359
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
2144
3360
  "text-white text-sm font-medium",
@@ -2156,27 +3372,27 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
2156
3372
  }
2157
3373
 
2158
3374
  // src/errors/ErrorFallback.tsx
2159
- import { jsx as jsx22 } from "react/jsx-runtime";
3375
+ import { jsx as jsx44 } from "react/jsx-runtime";
2160
3376
  function ErrorFallback({ error: error2, resetErrorBoundary }) {
2161
- return /* @__PURE__ */ jsx22("div", { className: "h-64", children: /* @__PURE__ */ jsx22(ErrorOverlay, { error: error2, retry: resetErrorBoundary }) });
3377
+ return /* @__PURE__ */ jsx44("div", { className: "h-64", children: /* @__PURE__ */ jsx44(ErrorOverlay, { error: error2, retry: resetErrorBoundary }) });
2162
3378
  }
2163
3379
 
2164
3380
  // src/errors/ErrorsOverlay.tsx
2165
- import { useStore as useStore2 } from "zustand";
2166
- import { jsx as jsx23 } from "react/jsx-runtime";
3381
+ import { useStore as useStore3 } from "zustand";
3382
+ import { jsx as jsx45 } from "react/jsx-runtime";
2167
3383
  function ErrorsOverlay() {
2168
- const error2 = useStore2(store3, (state) => state.errors.at(0));
2169
- return /* @__PURE__ */ jsx23(ErrorOverlay, { error: error2?.error, retry: error2?.retry, dismiss: error2?.dismiss });
3384
+ const error2 = useStore3(store3, (state) => state.errors.at(0));
3385
+ return /* @__PURE__ */ jsx45(ErrorOverlay, { error: error2?.error, retry: error2?.retry, dismiss: error2?.dismiss });
2170
3386
  }
2171
3387
 
2172
3388
  // src/AccountModal.tsx
2173
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
3389
+ import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
2174
3390
  function AccountModal() {
2175
3391
  const { accountModalOpen, toggleAccountModal } = useAccountModal();
2176
- return /* @__PURE__ */ jsx24(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs16(
3392
+ return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs25(
2177
3393
  "div",
2178
3394
  {
2179
- className: twMerge10(
3395
+ className: twMerge19(
2180
3396
  "relative py-2 ring-1",
2181
3397
  "bg-neutral-900 text-neutral-400 ring-neutral-700/50",
2182
3398
  "links:font-medium links:underline links:underline-offset-4",
@@ -2184,11 +3400,11 @@ function AccountModal() {
2184
3400
  "links:decoration-neutral-500 hover:links:decoration-orange-500"
2185
3401
  ),
2186
3402
  children: [
2187
- /* @__PURE__ */ jsxs16(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
2188
- /* @__PURE__ */ jsx24(AccountModalContent, {}),
2189
- /* @__PURE__ */ jsx24(ErrorsOverlay, {})
3403
+ /* @__PURE__ */ jsxs25(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3404
+ /* @__PURE__ */ jsx46(AccountModalContent, {}),
3405
+ /* @__PURE__ */ jsx46(ErrorsOverlay, {})
2190
3406
  ] }),
2191
- /* @__PURE__ */ jsxs16(
3407
+ /* @__PURE__ */ jsxs25(
2192
3408
  "a",
2193
3409
  {
2194
3410
  href: "https://mud.dev",
@@ -2196,20 +3412,20 @@ function AccountModal() {
2196
3412
  rel: "noreferrer noopener",
2197
3413
  className: "group self-center p-3 flex items-center justify-center gap-2 links-unset text-sm font-mono transition text-neutral-400 hover:text-white",
2198
3414
  children: [
2199
- /* @__PURE__ */ jsx24("span", { className: "block w-4 h-4", children: /* @__PURE__ */ jsx24(Logo, { className: "w-full h-full text-orange-500 group-hover:rotate-90 transition duration-300" }) }),
2200
- /* @__PURE__ */ jsx24("span", { children: "Powered by MUD" })
3415
+ /* @__PURE__ */ jsx46("span", { className: "block w-4 h-4", children: /* @__PURE__ */ jsx46(Logo, { className: "w-full h-full text-orange-500 group-hover:rotate-90 transition duration-300" }) }),
3416
+ /* @__PURE__ */ jsx46("span", { children: "Powered by MUD" })
2201
3417
  ]
2202
3418
  }
2203
3419
  ),
2204
- /* @__PURE__ */ jsx24("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx24(
3420
+ /* @__PURE__ */ jsx46("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx46(
2205
3421
  DialogClose,
2206
3422
  {
2207
- className: twMerge10(
3423
+ className: twMerge19(
2208
3424
  "pointer-events-auto leading-none p-2 transition",
2209
3425
  "text-white/20 hover:text-white/40"
2210
3426
  ),
2211
3427
  title: "Close",
2212
- children: /* @__PURE__ */ jsx24(CloseIcon, { className: "m-0" })
3428
+ children: /* @__PURE__ */ jsx46(CloseIcon, { className: "m-0" })
2213
3429
  }
2214
3430
  ) })
2215
3431
  ]
@@ -2218,31 +3434,31 @@ function AccountModal() {
2218
3434
  }
2219
3435
 
2220
3436
  // src/EntryKitProvider.tsx
2221
- import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
3437
+ import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
2222
3438
  function EntryKitProvider({ config, children }) {
2223
- return /* @__PURE__ */ jsxs17(EntryKitConfigProvider, { config, children: [
3439
+ return /* @__PURE__ */ jsxs26(EntryKitConfigProvider, { config, children: [
2224
3440
  children,
2225
- /* @__PURE__ */ jsx25(AccountModal, {})
3441
+ /* @__PURE__ */ jsx47(AccountModal, {})
2226
3442
  ] });
2227
3443
  }
2228
3444
 
2229
3445
  // src/AccountButton.tsx
2230
- import { useAccount as useAccount3 } from "wagmi";
2231
- import { twMerge as twMerge12 } from "tailwind-merge";
3446
+ import { useAccount as useAccount9 } from "wagmi";
3447
+ import { twMerge as twMerge21 } from "tailwind-merge";
2232
3448
 
2233
3449
  // src/AccountName.tsx
2234
- import { twMerge as twMerge11 } from "tailwind-merge";
2235
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
3450
+ import { twMerge as twMerge20 } from "tailwind-merge";
3451
+ import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
2236
3452
  function AccountName({ address }) {
2237
3453
  const { data: ens } = useENS(address);
2238
3454
  const avatar = usePreloadImage(ens?.avatar);
2239
- return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2240
- /* @__PURE__ */ jsxs18("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
2241
- /* @__PURE__ */ jsx26(
3455
+ return /* @__PURE__ */ jsxs27(Fragment9, { children: [
3456
+ /* @__PURE__ */ jsxs27("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3457
+ /* @__PURE__ */ jsx48(
2242
3458
  "img",
2243
3459
  {
2244
3460
  src: ens?.avatar && avatar.isSuccess ? ens.avatar : void 0,
2245
- className: twMerge11(
3461
+ className: twMerge20(
2246
3462
  "col-start-1 row-start-1",
2247
3463
  "inline-flex w-full h-full rounded-full bg-black/10 dark:bg-white/10 bg-cover bg-no-repeat bg-center",
2248
3464
  "transtion duration-300",
@@ -2250,10 +3466,10 @@ function AccountName({ address }) {
2250
3466
  )
2251
3467
  }
2252
3468
  ),
2253
- /* @__PURE__ */ jsx26(
3469
+ /* @__PURE__ */ jsx48(
2254
3470
  Logo,
2255
3471
  {
2256
- className: twMerge11(
3472
+ className: twMerge20(
2257
3473
  "col-start-1 row-start-1 text-orange-500",
2258
3474
  "transition duration-300",
2259
3475
  ens && (!ens.avatar || avatar.isError) ? "opacity-100" : "opacity-0"
@@ -2261,29 +3477,29 @@ function AccountName({ address }) {
2261
3477
  }
2262
3478
  )
2263
3479
  ] }),
2264
- /* @__PURE__ */ jsx26("span", { className: "flex-grow", children: ens?.name ?? /* @__PURE__ */ jsx26(TruncatedHex, { hex: address }) })
3480
+ /* @__PURE__ */ jsx48("span", { className: "flex-grow", children: ens?.name ?? /* @__PURE__ */ jsx48(TruncatedHex, { hex: address }) })
2265
3481
  ] });
2266
3482
  }
2267
3483
 
2268
3484
  // src/AccountButton.tsx
2269
- import { useRef as useRef4 } from "react";
2270
- import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
2271
- var containerClassNames = twMerge12(
3485
+ import { useRef as useRef6 } from "react";
3486
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3487
+ var containerClassNames = twMerge21(
2272
3488
  "w-48 p-3 inline-flex outline-none transition",
2273
3489
  "border border-transparent",
2274
3490
  "text-base leading-none"
2275
3491
  );
2276
- var secondaryClassNames = twMerge12(
3492
+ var secondaryClassNames = twMerge21(
2277
3493
  "bg-neutral-100 border-neutral-300 text-black",
2278
3494
  "dark:bg-neutral-800 dark:border-neutral-700 dark:text-white"
2279
3495
  );
2280
- var secondaryInteractiveClassNames = twMerge12(
3496
+ var secondaryInteractiveClassNames = twMerge21(
2281
3497
  "cursor-pointer outline-none hover:bg-neutral-200 data-[highlighted]:bg-neutral-200 dark:hover:bg-neutral-700"
2282
3498
  );
2283
3499
  function AccountButton() {
2284
3500
  const { openAccountModal, accountModalOpen } = useAccountModal();
2285
- const { status, address: userAddress } = useAccount3();
2286
- const initialUserAddress = useRef4(userAddress);
3501
+ const { status, address: userAddress } = useAccount9();
3502
+ const initialUserAddress = useRef6(userAddress);
2287
3503
  const prereqs = usePrerequisites(userAddress);
2288
3504
  const isConnected = status === "connected" || status === "reconnecting" && userAddress;
2289
3505
  const isNewConnection = userAddress !== initialUserAddress.current;
@@ -2295,20 +3511,20 @@ function AccountButton() {
2295
3511
  }
2296
3512
  return "Sign in";
2297
3513
  })();
2298
- return /* @__PURE__ */ jsx27(Shadow, { mode: "child", children: isSignedIn ? /* @__PURE__ */ jsx27(
3514
+ return /* @__PURE__ */ jsx49(Shadow, { mode: "child", children: isSignedIn ? /* @__PURE__ */ jsx49(
2299
3515
  "button",
2300
3516
  {
2301
3517
  type: "button",
2302
- className: twMerge12(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3518
+ className: twMerge21(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
2303
3519
  onClick: openAccountModal,
2304
- children: /* @__PURE__ */ jsx27("span", { className: "flex-grow inline-flex gap-2.5 items-center text-left font-medium", children: userAddress ? /* @__PURE__ */ jsx27(AccountName, { address: userAddress }) : null })
3520
+ 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 })
2305
3521
  },
2306
3522
  "connected"
2307
- ) : /* @__PURE__ */ jsxs19(
3523
+ ) : /* @__PURE__ */ jsxs28(
2308
3524
  "button",
2309
3525
  {
2310
3526
  type: "button",
2311
- className: twMerge12(
3527
+ className: twMerge21(
2312
3528
  containerClassNames,
2313
3529
  "group",
2314
3530
  "items-center justify-center gap-2.5",
@@ -2319,32 +3535,32 @@ function AccountButton() {
2319
3535
  "aria-busy": accountModalOpen,
2320
3536
  onClick: openAccountModal,
2321
3537
  children: [
2322
- /* @__PURE__ */ jsxs19("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
2323
- /* @__PURE__ */ jsx27(
3538
+ /* @__PURE__ */ jsxs28("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3539
+ /* @__PURE__ */ jsx49(
2324
3540
  "span",
2325
3541
  {
2326
- className: twMerge12(
3542
+ className: twMerge21(
2327
3543
  "col-start-1 row-start-1 leading-none",
2328
3544
  "scale-100 opacity-100 transition duration-300",
2329
3545
  "group-aria-busy:scale-125 group-aria-busy:opacity-0"
2330
3546
  ),
2331
- children: /* @__PURE__ */ jsx27(Logo, {})
3547
+ children: /* @__PURE__ */ jsx49(Logo, {})
2332
3548
  }
2333
3549
  ),
2334
- /* @__PURE__ */ jsx27(
3550
+ /* @__PURE__ */ jsx49(
2335
3551
  "span",
2336
3552
  {
2337
3553
  "aria-hidden": true,
2338
- className: twMerge12(
3554
+ className: twMerge21(
2339
3555
  "col-start-1 row-start-1",
2340
3556
  "scale-50 opacity-0 transition duration-300 delay-50",
2341
3557
  "group-aria-busy:scale-100 group-aria-busy:opacity-100"
2342
3558
  ),
2343
- children: /* @__PURE__ */ jsx27(PendingIcon, {})
3559
+ children: /* @__PURE__ */ jsx49(PendingIcon, {})
2344
3560
  }
2345
3561
  )
2346
3562
  ] }),
2347
- /* @__PURE__ */ jsx27("span", { className: "font-medium", children: buttonLabel })
3563
+ /* @__PURE__ */ jsx49("span", { className: "font-medium", children: buttonLabel })
2348
3564
  ]
2349
3565
  },
2350
3566
  "sign in"