@tscircuit/runframe 0.0.827 → 0.0.828
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.
|
@@ -1333,7 +1333,7 @@ var useErrorTelemetry = ({
|
|
|
1333
1333
|
};
|
|
1334
1334
|
|
|
1335
1335
|
// package.json
|
|
1336
|
-
var version = "0.0.
|
|
1336
|
+
var version = "0.0.827";
|
|
1337
1337
|
|
|
1338
1338
|
// lib/hooks/use-eval-versions.ts
|
|
1339
1339
|
import { useEffect as useEffect5, useMemo as useMemo2, useState as useState6 } from "react";
|
package/dist/preview.js
CHANGED
package/dist/runner.d.ts
CHANGED
|
@@ -115,6 +115,10 @@ interface RunFrameProps {
|
|
|
115
115
|
onReportAutoroutingLog?: (name: string, data: {
|
|
116
116
|
simpleRouteJson: any;
|
|
117
117
|
}) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Enable fetch proxy for the web worker (useful for standalone bundles)
|
|
120
|
+
*/
|
|
121
|
+
enableFetchProxy?: boolean;
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
declare global {
|
|
@@ -140,6 +144,10 @@ interface RunFrameWithApiProps {
|
|
|
140
144
|
workerBlobUrl?: string;
|
|
141
145
|
evalWebWorkerBlobUrl?: string;
|
|
142
146
|
showFileMenu?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Enable fetch proxy for the web worker (useful for standalone bundles)
|
|
149
|
+
*/
|
|
150
|
+
enableFetchProxy?: boolean;
|
|
143
151
|
}
|
|
144
152
|
declare const RunFrameWithApi: (props: RunFrameWithApiProps) => react_jsx_runtime.JSX.Element;
|
|
145
153
|
|
|
@@ -147,6 +155,7 @@ declare const RunFrameForCli: (props: {
|
|
|
147
155
|
debug?: boolean;
|
|
148
156
|
scenarioSelectorContent?: React.ReactNode;
|
|
149
157
|
workerBlobUrl?: string;
|
|
158
|
+
enableFetchProxy?: boolean;
|
|
150
159
|
}) => react_jsx_runtime.JSX.Element;
|
|
151
160
|
|
|
152
161
|
interface ComponentSearchResult {
|
package/dist/runner.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
useRunFrameStore,
|
|
41
41
|
useRunnerStore,
|
|
42
42
|
useStyles
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-OXEJIJAP.js";
|
|
44
44
|
|
|
45
45
|
// lib/components/RunFrame/RunFrame.tsx
|
|
46
46
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -1548,7 +1548,10 @@ var RunFrame = (props) => {
|
|
|
1548
1548
|
const worker = await createCircuitWebWorker({
|
|
1549
1549
|
evalVersion,
|
|
1550
1550
|
webWorkerBlobUrl: props.evalWebWorkerBlobUrl,
|
|
1551
|
-
verbose: true
|
|
1551
|
+
verbose: true,
|
|
1552
|
+
...props.enableFetchProxy && {
|
|
1553
|
+
enableFetchProxy: props.enableFetchProxy
|
|
1554
|
+
}
|
|
1552
1555
|
});
|
|
1553
1556
|
if (cancelled) return;
|
|
1554
1557
|
globalThis.runFrameWorker = worker;
|
|
@@ -1630,7 +1633,10 @@ var RunFrame = (props) => {
|
|
|
1630
1633
|
const worker = globalThis.runFrameWorker ?? await createCircuitWebWorker({
|
|
1631
1634
|
evalVersion: resolvedEvalVersion,
|
|
1632
1635
|
webWorkerBlobUrl: props.evalWebWorkerBlobUrl,
|
|
1633
|
-
verbose: true
|
|
1636
|
+
verbose: true,
|
|
1637
|
+
...props.enableFetchProxy && {
|
|
1638
|
+
enableFetchProxy: props.enableFetchProxy
|
|
1639
|
+
}
|
|
1634
1640
|
});
|
|
1635
1641
|
globalThis.runFrameWorker = worker;
|
|
1636
1642
|
setLastRunEvalVersion(resolvedEvalVersion);
|
|
@@ -2274,6 +2280,7 @@ var RunFrameWithApi = (props) => {
|
|
|
2274
2280
|
evalVersion: props.evalVersion,
|
|
2275
2281
|
forceLatestEvalVersion: props.forceLatestEvalVersion,
|
|
2276
2282
|
evalWebWorkerBlobUrl: props.evalWebWorkerBlobUrl ?? props.workerBlobUrl,
|
|
2283
|
+
enableFetchProxy: props.enableFetchProxy,
|
|
2277
2284
|
leftHeaderContent: /* @__PURE__ */ jsxs11("div", { className: "rf-flex rf-items-center rf-justify-between rf-w-full", children: [
|
|
2278
2285
|
props.leftHeaderContent,
|
|
2279
2286
|
props.showFilesSwitch && /* @__PURE__ */ jsx13("div", { className: "rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2", children: /* @__PURE__ */ jsx13(
|
|
@@ -2352,6 +2359,7 @@ var RunFrameForCli = (props) => {
|
|
|
2352
2359
|
workerBlobUrl: props.workerBlobUrl,
|
|
2353
2360
|
showFilesSwitch: true,
|
|
2354
2361
|
showFileMenu: false,
|
|
2362
|
+
enableFetchProxy: props.enableFetchProxy,
|
|
2355
2363
|
leftHeaderContent: /* @__PURE__ */ jsxs12("div", { className: "rf-flex rf-items-center rf-justify-between", children: [
|
|
2356
2364
|
/* @__PURE__ */ jsx14(
|
|
2357
2365
|
FileMenuLeftHeader,
|
|
@@ -13844,7 +13844,7 @@ ${i.stack}`),t.complete=!0,"root"in this&&this.root&&this.root.emit("asyncEffect
|
|
|
13844
13844
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
13845
13845
|
* Released under the MIT License.
|
|
13846
13846
|
*)
|
|
13847
|
-
*/const TJn=({containerClassName:n,...e})=>{const t=pt.useRef(null),[i,r]=pt.useState(620);return pt.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),at.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:at.jsx(NJn,{...e,height:i})})},kJn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{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))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{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))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{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))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{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))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{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))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);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))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);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))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{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))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{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))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',PJn=()=>{pt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=kJn,document.head.appendChild(e)},[])},FJn=n=>{pt.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},ugt=n=>`hsl(${M2.indexOf(n)*137.5%360}, 70%, 50%)`,LJn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return at.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[at.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:M2.map(t=>{const i=n[t]||0,r=i/e*100;return at.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:ugt(t)},children:at.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),at.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},UJn=({renderLog:n})=>{const[e,t]=pt.useState("chronological");if(!n)return at.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?i.sort((o,s)=>M2.indexOf(o[0])-M2.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return at.jsxs("div",{className:"rf-bg-white",children:[at.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[at.jsx("div",{children:"Render Logs"}),at.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[at.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),at.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[at.jsx("option",{value:"chronological",children:"Phase Order"}),at.jsx("option",{value:"longest",children:"Duration"})]})]})]}),at.jsx(LJn,{phaseTimings:n.phaseTimings}),at.jsxs("table",{className:"rf-w-full rf-text-xs",children:[at.jsx("thead",{children:at.jsxs("tr",{children:[at.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),at.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),at.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),at.jsx("tbody",{children:i.map(([o,s])=>at.jsxs("tr",{children:[at.jsx("td",{className:"rf-p-2",children:M2.indexOf(o)}),at.jsx("td",{className:"rf-p-2",children:o}),at.jsx("td",{className:"rf-p-2",children:at.jsx("div",{className:"rf-w-8",children:at.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:ugt(o),width:`${s/r*100}%`}})})}),at.jsx("td",{className:"rf-p-2",children:at.jsxs("div",{className:"rf-flex w-full",children:[at.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),at.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},GJn=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{pt.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{yU.captureException(i)}catch{}}},[n,e]),pt.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{yU.captureException(r,{error_type:i.type})}catch{}}},[t])},OJn="0.0.826";function zJn(n,e){const[t,i]=pt.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return pt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const bEe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},EEe=new Map,Uq=n=>{const e=EEe.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},YJn=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=EEe.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return EEe.set(t.name,r),{type:"tracked",store:n,...r}},HJn=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(bEe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(bEe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=YJn(a,l,c);let A=!0;r.setState=(g,y,I)=>{const x=t(g,y);if(!A)return x;const b=I===void 0?{type:s||"anonymous"}:typeof I=="string"?{type:I}:I;return a===void 0?(u==null||u.send(b,i()),x):(u==null||u.send({...b,type:`${a}/${b.type}`},{...Uq(c.name),[a]:r.getState()}),x)};const f=(...g)=>{const y=A;A=!1,t(...g),A=y},p=n(r.setState,i,r);if(d.type==="untracked"?u==null||u.init(p):(d.stores[d.store]=r,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,y])=>[g,g===d.store?p:y.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let g=!1;const y=r.dispatch;r.dispatch=(...I)=>{(bEe?"production":void 0)!=="production"&&I[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),y(...I)}}return u.subscribe(g=>{var y;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return BEe(g.payload,I=>{if(I.type==="__setState"){if(a===void 0){f(I.state);return}Object.keys(I.state).length!==1&&console.error(`
|
|
13847
|
+
*/const TJn=({containerClassName:n,...e})=>{const t=pt.useRef(null),[i,r]=pt.useState(620);return pt.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),at.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:at.jsx(NJn,{...e,height:i})})},kJn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{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))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{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))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{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))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{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))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{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))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);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))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);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))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{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))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{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))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',PJn=()=>{pt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=kJn,document.head.appendChild(e)},[])},FJn=n=>{pt.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},ugt=n=>`hsl(${M2.indexOf(n)*137.5%360}, 70%, 50%)`,LJn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return at.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[at.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:M2.map(t=>{const i=n[t]||0,r=i/e*100;return at.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:ugt(t)},children:at.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),at.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},UJn=({renderLog:n})=>{const[e,t]=pt.useState("chronological");if(!n)return at.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?i.sort((o,s)=>M2.indexOf(o[0])-M2.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return at.jsxs("div",{className:"rf-bg-white",children:[at.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[at.jsx("div",{children:"Render Logs"}),at.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[at.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),at.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[at.jsx("option",{value:"chronological",children:"Phase Order"}),at.jsx("option",{value:"longest",children:"Duration"})]})]})]}),at.jsx(LJn,{phaseTimings:n.phaseTimings}),at.jsxs("table",{className:"rf-w-full rf-text-xs",children:[at.jsx("thead",{children:at.jsxs("tr",{children:[at.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),at.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),at.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),at.jsx("tbody",{children:i.map(([o,s])=>at.jsxs("tr",{children:[at.jsx("td",{className:"rf-p-2",children:M2.indexOf(o)}),at.jsx("td",{className:"rf-p-2",children:o}),at.jsx("td",{className:"rf-p-2",children:at.jsx("div",{className:"rf-w-8",children:at.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:ugt(o),width:`${s/r*100}%`}})})}),at.jsx("td",{className:"rf-p-2",children:at.jsxs("div",{className:"rf-flex w-full",children:[at.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),at.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},GJn=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{pt.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{yU.captureException(i)}catch{}}},[n,e]),pt.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{yU.captureException(r,{error_type:i.type})}catch{}}},[t])},OJn="0.0.827";function zJn(n,e){const[t,i]=pt.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return pt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const bEe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},EEe=new Map,Uq=n=>{const e=EEe.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},YJn=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=EEe.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return EEe.set(t.name,r),{type:"tracked",store:n,...r}},HJn=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(bEe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(bEe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=YJn(a,l,c);let A=!0;r.setState=(g,y,I)=>{const x=t(g,y);if(!A)return x;const b=I===void 0?{type:s||"anonymous"}:typeof I=="string"?{type:I}:I;return a===void 0?(u==null||u.send(b,i()),x):(u==null||u.send({...b,type:`${a}/${b.type}`},{...Uq(c.name),[a]:r.getState()}),x)};const f=(...g)=>{const y=A;A=!1,t(...g),A=y},p=n(r.setState,i,r);if(d.type==="untracked"?u==null||u.init(p):(d.stores[d.store]=r,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,y])=>[g,g===d.store?p:y.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let g=!1;const y=r.dispatch;r.dispatch=(...I)=>{(bEe?"production":void 0)!=="production"&&I[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),y(...I)}}return u.subscribe(g=>{var y;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return BEe(g.payload,I=>{if(I.type==="__setState"){if(a===void 0){f(I.state);return}Object.keys(I.state).length!==1&&console.error(`
|
|
13848
13848
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
13849
13849
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
13850
13850
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
package/dist/standalone.min.js
CHANGED
|
@@ -13878,7 +13878,7 @@ ${r.stack}`),i.complete=!0,"root"in this&&this.root&&this.root.emit("asyncEffect
|
|
|
13878
13878
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
13879
13879
|
* Released under the MIT License.
|
|
13880
13880
|
*)
|
|
13881
|
-
*/const Kbi=({containerClassName:n,...e})=>{const t=nt.useRef(null),[i,r]=nt.useState(620);return nt.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),Ve.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ve.jsx(jbi,{...e,height:i})})},Xbi='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{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))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{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))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{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))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{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))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{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))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);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))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);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))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{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))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{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))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',oBt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Xbi,document.head.appendChild(e)},[])},Wbi=n=>{nt.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},sBt=n=>`hsl(${EE.indexOf(n)*137.5%360}, 70%, 50%)`,$bi=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:EE.map(t=>{const i=n[t]||0,r=i/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:sBt(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},qbi=({renderLog:n})=>{const[e,t]=nt.useState("chronological");if(!n)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?i.sort((o,s)=>EE.indexOf(o[0])-EE.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx($bi,{phaseTimings:n.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:i.map(([o,s])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:EE.indexOf(o)}),Ve.jsx("td",{className:"rf-p-2",children:o}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:sBt(o),width:`${s/r*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},aBt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{nt.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{nW.captureException(i)}catch{}}},[n,e]),nt.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{nW.captureException(r,{error_type:i.type})}catch{}}},[t])},Jbi="0.0.826";function cBt(n,e){const[t,i]=nt.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const dre=RWe()(QWe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),Zbi=n=>{const[e,t]=nt.useState([]),[i,r]=nt.useState(null),[o,s]=nt.useState(""),[a,c]=cBt("eval-version-selection",null),l=dre(p=>p.setLastRunEvalVersion),u=dre(p=>p.lastRunEvalVersion);return nt.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{var g;if(Array.isArray(p==null?void 0:p.versions)){let _=[...p.versions];(g=p.tags)!=null&&g.latest&&(r(p.tags.latest),_=_.filter(y=>y!==p.tags.latest)),t(_)}}).catch(()=>{})},[n]),nt.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:nt.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},eCi=["assembly","bom","circuit_json","errors","render_log"],tCi=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:f,renderLog:p,showImportAndFormatButtons:g=!0,className:_,headerClassName:y,leftHeaderContent:v,readOnly:x,isStreaming:b,autoroutingLog:B,onReportAutoroutingLog:U,isRunningCode:N,hasCodeChangedSinceLastRun:Q,onEditEvent:R,editEvents:L,defaultActiveTab:P,defaultTab:K,availableTabs:G,autoRotate3dViewerDisabled:$,showSchematicDebugGrid:ie=!1,showToggleFullScreen:se=!0,defaultToFullScreen:ce=!1,activeEffectName:Ae,allowSelectingVersion:fe=!0})=>{var vt,mt;oBt();const{versions:be,latestVersion:Re,lastRunEvalVersion:Ie,search:xe,setSearch:Ne,selectVersion:Ke}=Zbi(fe),We=nt.useMemo(()=>o?o.filter(ht=>ht&&"error_type"in ht||ht.type.includes("error")):null,[o]),ot=nt.useMemo(()=>o?o.filter(ht=>ht&&"warning_type"in ht||ht.type.includes("warning")):null,[o]);aBt({errorMessage:i,errorStack:r,circuitJsonErrors:We});const[xt,it]=nt.useState(P??K??(G==null?void 0:G[0])??"pcb"),[Ee,Le]=nt.useState(null),[ze,st]=nt.useState(ce);Wbi(ze);const ct=nt.useCallback(ht=>{it(ht),f==null||f(ht)},[f]),at=()=>{st(!ze)};nt.useEffect(()=>{i&&(xt!=="errors"&&Le(xt),ct("errors"))},[i]),nt.useEffect(()=>{(xt==="code"||xt==="errors")&&o&&!i&&ct(Ee??P??K??(G==null?void 0:G[0])??"pcb")},[o]);const Xe=nt.useCallback(ht=>{window.TSCIRCUIT_3D_OBJECT_REF=ht===null?void 0:ht},[]);return Ve.jsx("div",{className:dp("flex flex-col relative rf-overflow-x-hidden rf-h-full",_),children:Ve.jsx("div",{className:dp("rf-md:sticky rf-md:top-2 rf-h-full",ze&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:Ve.jsxs(Qme,{value:xt,onValueChange:ct,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[Ve.jsxs("div",{className:dp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[v,v&&Ve.jsx("div",{className:"rf-flex-grow"}),!v&&N&&Ve.jsx(YR,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!v&&Ve.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!i&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[Ae?Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:Ae,children:Ae}):p.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:((vt=p.lastRenderEvent)==null?void 0:vt.phase)??"",children:((mt=p.lastRenderEvent)==null?void 0:mt.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:Ve.jsx(YR,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((p.progress??0)*100).toFixed(1),"%"]})]}),a&&Ve.jsxs(rW,{children:[c&&Ve.jsx(jw,{value:"code",children:"Code"}),!G||G.includes("pcb")?Ve.jsxs(jw,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&Ve.jsx("span",{className:dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!G||G.includes("schematic")?Ve.jsxs(jw,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&Ve.jsx("span",{className:dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!G||G.includes("cad")?Ve.jsxs(jw,{value:"cad",children:[o&&Ve.jsx("span",{className:dp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(xt)&&Ve.jsx(jw,{value:xt,children:OJe(xt)}),Ve.jsxs(Rwe,{children:[Ve.jsx(Qwe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(czn,{className:"rf-w-4 rf-h-4"}),(We&&We.length>0||i)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(GZ,{className:"rf-*:text-xs",children:[eCi.filter(ht=>!G||G.includes(ht)).map(ht=>Ve.jsxs(Z2,{onSelect:()=>ct(ht),children:[xt!==ht&&Ve.jsx(Wyt,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),xt===ht&&Ve.jsx(fZ,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:OJe(ht)}),ht==="errors"&&(We&&We.length>0||i)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:i?1:We==null?void 0:We.length})]},ht)),Ve.jsx(Z2,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Jbi.split(".").map((ht,zt)=>zt===2?parseInt(ht)+1:ht).join(".")]})}),fe?Ve.jsxs(Nwe,{onOpenChange:ht=>!ht&&Ne(""),children:[Ve.jsx(UZ,{className:"rf-text-xs rf-opacity-60",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Ie??Re??"latest"]})}),Ve.jsx(Dwe,{children:Ve.jsxs(OZ,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[Ve.jsx("div",{className:"rf-p-1",children:Ve.jsx(I4e,{value:xe,onChange:ht=>Ne(ht.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),Ve.jsx(Z9t,{}),Ve.jsx(Z2,{onSelect:()=>Ke(null),children:Re?`${Re} (latest)`:"latest"}),be.map(ht=>Ve.jsx(Z2,{onSelect:()=>Ke(ht),children:ht},ht))]})})]}):Ie&&Ve.jsx(Z2,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Ie]})})]})]})]}),se&&Ve.jsx(sI,{onClick:at,variant:"ghost",children:ze?Ve.jsx(hzn,{size:16}):Ve.jsx(uzn,{size:16})})]}),c&&Ve.jsx(K5,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),(!G||G.includes("pcb"))&&Ve.jsx(K5,{value:"pcb",children:Ve.jsx("div",{className:dp("rf-overflow-hidden",ze?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(Kbi,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:dp("rf-h-full rf-w-full",ze?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ht=>{if(R)for(const zt of ht)R(zt)}}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("assembly"))&&Ve.jsx(K5,{value:"assembly",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:o?Ve.jsx(rJn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("schematic"))&&Ve.jsx(K5,{value:"schematic",children:Ve.jsx("div",{className:dp("rf-overflow-auto rf-bg-white",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(tJn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ht=>{R==null||R(ht)},debugGrid:ie}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("cad"))&&Ve.jsx(K5,{value:"cad",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{FallbackComponent:WGn,children:o?Ve.jsx(KGn,{ref:Xe,circuitJson:o,autoRotateDisabled:$}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("bom"))&&Ve.jsx(K5,{value:"bom",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(lJn,{circuitJson:o}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("circuit_json"))&&Ve.jsx(K5,{value:"circuit_json",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:o?Ve.jsx(aJn,{elements:o}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("errors"))&&Ve.jsx(K5,{value:"errors",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||We&&We.length>0||o?Ve.jsx(ZVn,{code:n,fsMap:e,circuitJsonErrors:We,circuitJsonWarnings:ot,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:Ie,autoroutingLog:B,onReportAutoroutingLog:U}):Ve.jsx(sQ,{onRunClicked:t})})}),d&&(!G||G.includes("render_log"))&&Ve.jsx(K5,{value:"render_log",children:Ve.jsx(qbi,{renderLog:p})})]})})})};var hre="Dialog",[lBt,uBt]=Lw(hre),[nCi,ow]=lBt(hre),dBt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=nt.useRef(null),c=nt.useRef(null),[l,u]=w6({prop:i,defaultProp:r??!1,onChange:o,caller:hre});return Ve.jsx(nCi,{scope:e,triggerRef:a,contentRef:c,contentId:m2(),titleId:m2(),descriptionId:m2(),open:l,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};dBt.displayName=hre;var hBt="DialogTrigger",fBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(hBt,t),o=eI(e,r.triggerRef);return Ve.jsx(B_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":pRe(r.open),...i,ref:o,onClick:uA(n.onClick,r.onOpenToggle)})});fBt.displayName=hBt;var hRe="DialogPortal",[iCi,pBt]=lBt(hRe,{forceMount:void 0}),ABt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=ow(hRe,e);return Ve.jsx(iCi,{scope:e,forceMount:t,children:nt.Children.map(i,s=>Ve.jsx(H5,{present:t||o.open,children:Ve.jsx(wZ,{asChild:!0,container:r,children:s})}))})};ABt.displayName=hRe;var fre="DialogOverlay",gBt=nt.forwardRef((n,e)=>{const t=pBt(fre,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=ow(fre,n.__scopeDialog);return o.modal?Ve.jsx(H5,{present:i||o.open,children:Ve.jsx(oCi,{...r,ref:e})}):null});gBt.displayName=fre;var rCi=E6("DialogOverlay.RemoveScroll"),oCi=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(fre,t);return Ve.jsx(TZ,{as:rCi,allowPinchZoom:!0,shards:[r.contentRef],children:Ve.jsx(B_.div,{"data-state":pRe(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),BQ="DialogContent",mBt=nt.forwardRef((n,e)=>{const t=pBt(BQ,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=ow(BQ,n.__scopeDialog);return Ve.jsx(H5,{present:i||o.open,children:o.modal?Ve.jsx(sCi,{...r,ref:e}):Ve.jsx(aCi,{...r,ref:e})})});mBt.displayName=BQ;var sCi=nt.forwardRef((n,e)=>{const t=ow(BQ,n.__scopeDialog),i=nt.useRef(null),r=eI(e,t.contentRef,i);return nt.useEffect(()=>{const o=i.current;if(o)return gwe(o)},[]),Ve.jsx(_Bt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uA(n.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=t.triggerRef.current)==null||s.focus()}),onPointerDownOutside:uA(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:uA(n.onFocusOutside,o=>o.preventDefault())})}),aCi=nt.forwardRef((n,e)=>{const t=ow(BQ,n.__scopeDialog),i=nt.useRef(!1),r=nt.useRef(!1);return Ve.jsx(_Bt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=n.onCloseAutoFocus)==null||s.call(n,o),o.defaultPrevented||(i.current||(a=t.triggerRef.current)==null||a.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{var c,l;(c=n.onInteractOutside)==null||c.call(n,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((l=t.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),_Bt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=ow(BQ,t),c=nt.useRef(null),l=eI(e,c);return $3e(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(AZ,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:Ve.jsx(pZ,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pRe(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(lCi,{titleId:a.titleId}),Ve.jsx(dCi,{contentRef:c,descriptionId:a.descriptionId})]})]})}),fRe="DialogTitle",yBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(fRe,t);return Ve.jsx(B_.h2,{id:r.titleId,...i,ref:e})});yBt.displayName=fRe;var vBt="DialogDescription",xBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(vBt,t);return Ve.jsx(B_.p,{id:r.descriptionId,...i,ref:e})});xBt.displayName=vBt;var IBt="DialogClose",bBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(IBt,t);return Ve.jsx(B_.button,{type:"button",...i,ref:e,onClick:uA(n.onClick,()=>r.onOpenChange(!1))})});bBt.displayName=IBt;function pRe(n){return n?"open":"closed"}var CBt="DialogTitleWarning",[cCi,EBt]=iAn(CBt,{contentName:BQ,titleName:fRe,docsSlug:"dialog"}),lCi=({titleId:n})=>{const e=EBt(CBt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13881
|
+
*/const Kbi=({containerClassName:n,...e})=>{const t=nt.useRef(null),[i,r]=nt.useState(620);return nt.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),Ve.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ve.jsx(jbi,{...e,height:i})})},Xbi='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{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))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{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))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{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))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{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))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{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))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);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))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);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))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{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))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{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))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-inline{display:inline}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',oBt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=Xbi,document.head.appendChild(e)},[])},Wbi=n=>{nt.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},sBt=n=>`hsl(${EE.indexOf(n)*137.5%360}, 70%, 50%)`,$bi=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:EE.map(t=>{const i=n[t]||0,r=i/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:sBt(t)},children:Ve.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},qbi=({renderLog:n})=>{const[e,t]=nt.useState("chronological");if(!n)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?i.sort((o,s)=>EE.indexOf(o[0])-EE.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx($bi,{phaseTimings:n.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:i.map(([o,s])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:EE.indexOf(o)}),Ve.jsx("td",{className:"rf-p-2",children:o}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:sBt(o),width:`${s/r*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},aBt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{nt.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{nW.captureException(i)}catch{}}},[n,e]),nt.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{nW.captureException(r,{error_type:i.type})}catch{}}},[t])},Jbi="0.0.827";function cBt(n,e){const[t,i]=nt.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const dre=RWe()(QWe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),Zbi=n=>{const[e,t]=nt.useState([]),[i,r]=nt.useState(null),[o,s]=nt.useState(""),[a,c]=cBt("eval-version-selection",null),l=dre(p=>p.setLastRunEvalVersion),u=dre(p=>p.lastRunEvalVersion);return nt.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{var g;if(Array.isArray(p==null?void 0:p.versions)){let _=[...p.versions];(g=p.tags)!=null&&g.latest&&(r(p.tags.latest),_=_.filter(y=>y!==p.tags.latest)),t(_)}}).catch(()=>{})},[n]),nt.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:nt.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},eCi=["assembly","bom","circuit_json","errors","render_log"],tCi=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:f,renderLog:p,showImportAndFormatButtons:g=!0,className:_,headerClassName:y,leftHeaderContent:v,readOnly:x,isStreaming:b,autoroutingLog:B,onReportAutoroutingLog:U,isRunningCode:N,hasCodeChangedSinceLastRun:Q,onEditEvent:R,editEvents:L,defaultActiveTab:P,defaultTab:K,availableTabs:G,autoRotate3dViewerDisabled:$,showSchematicDebugGrid:ie=!1,showToggleFullScreen:se=!0,defaultToFullScreen:ce=!1,activeEffectName:Ae,allowSelectingVersion:fe=!0})=>{var vt,mt;oBt();const{versions:be,latestVersion:Re,lastRunEvalVersion:Ie,search:xe,setSearch:Ne,selectVersion:Ke}=Zbi(fe),We=nt.useMemo(()=>o?o.filter(ht=>ht&&"error_type"in ht||ht.type.includes("error")):null,[o]),ot=nt.useMemo(()=>o?o.filter(ht=>ht&&"warning_type"in ht||ht.type.includes("warning")):null,[o]);aBt({errorMessage:i,errorStack:r,circuitJsonErrors:We});const[xt,it]=nt.useState(P??K??(G==null?void 0:G[0])??"pcb"),[Ee,Le]=nt.useState(null),[ze,st]=nt.useState(ce);Wbi(ze);const ct=nt.useCallback(ht=>{it(ht),f==null||f(ht)},[f]),at=()=>{st(!ze)};nt.useEffect(()=>{i&&(xt!=="errors"&&Le(xt),ct("errors"))},[i]),nt.useEffect(()=>{(xt==="code"||xt==="errors")&&o&&!i&&ct(Ee??P??K??(G==null?void 0:G[0])??"pcb")},[o]);const Xe=nt.useCallback(ht=>{window.TSCIRCUIT_3D_OBJECT_REF=ht===null?void 0:ht},[]);return Ve.jsx("div",{className:dp("flex flex-col relative rf-overflow-x-hidden rf-h-full",_),children:Ve.jsx("div",{className:dp("rf-md:sticky rf-md:top-2 rf-h-full",ze&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:Ve.jsxs(Qme,{value:xt,onValueChange:ct,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[Ve.jsxs("div",{className:dp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",y),children:[v,v&&Ve.jsx("div",{className:"rf-flex-grow"}),!v&&N&&Ve.jsx(YR,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!v&&Ve.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!i&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[Ae?Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:Ae,children:Ae}):p.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:((vt=p.lastRenderEvent)==null?void 0:vt.phase)??"",children:((mt=p.lastRenderEvent)==null?void 0:mt.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:Ve.jsx(YR,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((p.progress??0)*100).toFixed(1),"%"]})]}),a&&Ve.jsxs(rW,{children:[c&&Ve.jsx(jw,{value:"code",children:"Code"}),!G||G.includes("pcb")?Ve.jsxs(jw,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&Ve.jsx("span",{className:dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!G||G.includes("schematic")?Ve.jsxs(jw,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&Ve.jsx("span",{className:dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!G||G.includes("cad")?Ve.jsxs(jw,{value:"cad",children:[o&&Ve.jsx("span",{className:dp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",Q?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(xt)&&Ve.jsx(jw,{value:xt,children:OJe(xt)}),Ve.jsxs(Rwe,{children:[Ve.jsx(Qwe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(czn,{className:"rf-w-4 rf-h-4"}),(We&&We.length>0||i)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(GZ,{className:"rf-*:text-xs",children:[eCi.filter(ht=>!G||G.includes(ht)).map(ht=>Ve.jsxs(Z2,{onSelect:()=>ct(ht),children:[xt!==ht&&Ve.jsx(Wyt,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),xt===ht&&Ve.jsx(fZ,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:OJe(ht)}),ht==="errors"&&(We&&We.length>0||i)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:i?1:We==null?void 0:We.length})]},ht)),Ve.jsx(Z2,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Jbi.split(".").map((ht,zt)=>zt===2?parseInt(ht)+1:ht).join(".")]})}),fe?Ve.jsxs(Nwe,{onOpenChange:ht=>!ht&&Ne(""),children:[Ve.jsx(UZ,{className:"rf-text-xs rf-opacity-60",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Ie??Re??"latest"]})}),Ve.jsx(Dwe,{children:Ve.jsxs(OZ,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[Ve.jsx("div",{className:"rf-p-1",children:Ve.jsx(I4e,{value:xe,onChange:ht=>Ne(ht.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),Ve.jsx(Z9t,{}),Ve.jsx(Z2,{onSelect:()=>Ke(null),children:Re?`${Re} (latest)`:"latest"}),be.map(ht=>Ve.jsx(Z2,{onSelect:()=>Ke(ht),children:ht},ht))]})})]}):Ie&&Ve.jsx(Z2,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",Ie]})})]})]})]}),se&&Ve.jsx(sI,{onClick:at,variant:"ghost",children:ze?Ve.jsx(hzn,{size:16}):Ve.jsx(uzn,{size:16})})]}),c&&Ve.jsx(K5,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),(!G||G.includes("pcb"))&&Ve.jsx(K5,{value:"pcb",children:Ve.jsx("div",{className:dp("rf-overflow-hidden",ze?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(Kbi,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:dp("rf-h-full rf-w-full",ze?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ht=>{if(R)for(const zt of ht)R(zt)}}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("assembly"))&&Ve.jsx(K5,{value:"assembly",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:o?Ve.jsx(rJn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("schematic"))&&Ve.jsx(K5,{value:"schematic",children:Ve.jsx("div",{className:dp("rf-overflow-auto rf-bg-white",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(tJn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ht=>{R==null||R(ht)},debugGrid:ie}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("cad"))&&Ve.jsx(K5,{value:"cad",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{FallbackComponent:WGn,children:o?Ve.jsx(KGn,{ref:Xe,circuitJson:o,autoRotateDisabled:$}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("bom"))&&Ve.jsx(K5,{value:"bom",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallbackRender:({error:ht})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ht==null?void 0:ht.message)||"An unknown error occurred"})]})}),children:o?Ve.jsx(lJn,{circuitJson:o}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("circuit_json"))&&Ve.jsx(K5,{value:"circuit_json",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:Ve.jsx(QN,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:o?Ve.jsx(aJn,{elements:o}):Ve.jsx(sQ,{onRunClicked:t})})})}),(!G||G.includes("errors"))&&Ve.jsx(K5,{value:"errors",children:Ve.jsx("div",{className:dp("rf-overflow-auto",ze?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||We&&We.length>0||o?Ve.jsx(ZVn,{code:n,fsMap:e,circuitJsonErrors:We,circuitJsonWarnings:ot,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:Ie,autoroutingLog:B,onReportAutoroutingLog:U}):Ve.jsx(sQ,{onRunClicked:t})})}),d&&(!G||G.includes("render_log"))&&Ve.jsx(K5,{value:"render_log",children:Ve.jsx(qbi,{renderLog:p})})]})})})};var hre="Dialog",[lBt,uBt]=Lw(hre),[nCi,ow]=lBt(hre),dBt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=nt.useRef(null),c=nt.useRef(null),[l,u]=w6({prop:i,defaultProp:r??!1,onChange:o,caller:hre});return Ve.jsx(nCi,{scope:e,triggerRef:a,contentRef:c,contentId:m2(),titleId:m2(),descriptionId:m2(),open:l,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};dBt.displayName=hre;var hBt="DialogTrigger",fBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(hBt,t),o=eI(e,r.triggerRef);return Ve.jsx(B_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":pRe(r.open),...i,ref:o,onClick:uA(n.onClick,r.onOpenToggle)})});fBt.displayName=hBt;var hRe="DialogPortal",[iCi,pBt]=lBt(hRe,{forceMount:void 0}),ABt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=ow(hRe,e);return Ve.jsx(iCi,{scope:e,forceMount:t,children:nt.Children.map(i,s=>Ve.jsx(H5,{present:t||o.open,children:Ve.jsx(wZ,{asChild:!0,container:r,children:s})}))})};ABt.displayName=hRe;var fre="DialogOverlay",gBt=nt.forwardRef((n,e)=>{const t=pBt(fre,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=ow(fre,n.__scopeDialog);return o.modal?Ve.jsx(H5,{present:i||o.open,children:Ve.jsx(oCi,{...r,ref:e})}):null});gBt.displayName=fre;var rCi=E6("DialogOverlay.RemoveScroll"),oCi=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(fre,t);return Ve.jsx(TZ,{as:rCi,allowPinchZoom:!0,shards:[r.contentRef],children:Ve.jsx(B_.div,{"data-state":pRe(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),BQ="DialogContent",mBt=nt.forwardRef((n,e)=>{const t=pBt(BQ,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=ow(BQ,n.__scopeDialog);return Ve.jsx(H5,{present:i||o.open,children:o.modal?Ve.jsx(sCi,{...r,ref:e}):Ve.jsx(aCi,{...r,ref:e})})});mBt.displayName=BQ;var sCi=nt.forwardRef((n,e)=>{const t=ow(BQ,n.__scopeDialog),i=nt.useRef(null),r=eI(e,t.contentRef,i);return nt.useEffect(()=>{const o=i.current;if(o)return gwe(o)},[]),Ve.jsx(_Bt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uA(n.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=t.triggerRef.current)==null||s.focus()}),onPointerDownOutside:uA(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:uA(n.onFocusOutside,o=>o.preventDefault())})}),aCi=nt.forwardRef((n,e)=>{const t=ow(BQ,n.__scopeDialog),i=nt.useRef(!1),r=nt.useRef(!1);return Ve.jsx(_Bt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=n.onCloseAutoFocus)==null||s.call(n,o),o.defaultPrevented||(i.current||(a=t.triggerRef.current)==null||a.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{var c,l;(c=n.onInteractOutside)==null||c.call(n,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((l=t.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),_Bt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=ow(BQ,t),c=nt.useRef(null),l=eI(e,c);return $3e(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(AZ,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:Ve.jsx(pZ,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":pRe(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(lCi,{titleId:a.titleId}),Ve.jsx(dCi,{contentRef:c,descriptionId:a.descriptionId})]})]})}),fRe="DialogTitle",yBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(fRe,t);return Ve.jsx(B_.h2,{id:r.titleId,...i,ref:e})});yBt.displayName=fRe;var vBt="DialogDescription",xBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(vBt,t);return Ve.jsx(B_.p,{id:r.descriptionId,...i,ref:e})});xBt.displayName=vBt;var IBt="DialogClose",bBt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=ow(IBt,t);return Ve.jsx(B_.button,{type:"button",...i,ref:e,onClick:uA(n.onClick,()=>r.onOpenChange(!1))})});bBt.displayName=IBt;function pRe(n){return n?"open":"closed"}var CBt="DialogTitleWarning",[cCi,EBt]=iAn(CBt,{contentName:BQ,titleName:fRe,docsSlug:"dialog"}),lCi=({titleId:n})=>{const e=EBt(CBt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13882
13882
|
|
|
13883
13883
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
13884
13884
|
|
|
@@ -14062,7 +14062,7 @@ to {
|
|
|
14062
14062
|
* @license
|
|
14063
14063
|
* Copyright 2019 Google LLC
|
|
14064
14064
|
* SPDX-License-Identifier: Apache-2.0
|
|
14065
|
-
*/const o8t=Symbol("Comlink.proxy"),uEi=Symbol("Comlink.endpoint"),s8t=Symbol("Comlink.releaseProxy"),TRe=Symbol("Comlink.finalizer"),kre=Symbol("Comlink.thrown"),a8t=n=>typeof n=="object"&&n!==null||typeof n=="function",dEi={canHandle:n=>a8t(n)&&n[o8t],serialize(n){const{port1:e,port2:t}=new MessageChannel;return l8t(n,e),[t,[t]]},deserialize(n){return n.start(),d8t(n)}},hEi={canHandle:n=>a8t(n)&&kre in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},c8t=new Map([["proxy",dEi],["throw",hEi]]);function fEi(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function l8t(n,e=globalThis,t=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!fEi(t,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(DQ);let l;try{const u=a.slice(0,-1).reduce((f,p)=>f[p],n),d=a.reduce((f,p)=>f[p],n);switch(s){case"GET":l=d;break;case"SET":u[a.slice(-1)[0]]=DQ(r.data.value),l=!0;break;case"APPLY":l=d.apply(u,c);break;case"CONSTRUCT":{const f=new d(...c);l=A8t(f)}break;case"ENDPOINT":{const{port1:f,port2:p}=new MessageChannel;l8t(n,p),l=_Ei(f,[f])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[kre]:0}}Promise.resolve(l).catch(u=>({value:u,[kre]:0})).then(u=>{const[d,f]=Ure(u);e.postMessage(Object.assign(Object.assign({},d),{id:o}),f),s==="RELEASE"&&(e.removeEventListener("message",i),u8t(e),TRe in n&&typeof n[TRe]=="function"&&n[TRe]())}).catch(u=>{const[d,f]=Ure({value:new TypeError("Unserializable return value"),[kre]:0});e.postMessage(Object.assign(Object.assign({},d),{id:o}),f)})}),e.start&&e.start()}function pEi(n){return n.constructor.name==="MessagePort"}function u8t(n){pEi(n)&&n.close()}function d8t(n,e){const t=new Map;return n.addEventListener("message",function(r){const{data:o}=r;if(!o||!o.id)return;const s=t.get(o.id);if(s)try{s(o)}finally{t.delete(o.id)}}),kRe(n,t,[],e)}function Pre(n){if(n)throw new Error("Proxy has been released and is not useable")}function h8t(n){return YT(n,new Map,{type:"RELEASE"}).then(()=>{u8t(n)})}const Lre=new WeakMap,Fre="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(Lre.get(n)||0)-1;Lre.set(n,e),e===0&&h8t(n)});function AEi(n,e){const t=(Lre.get(e)||0)+1;Lre.set(e,t),Fre&&Fre.register(n,e,n)}function gEi(n){Fre&&Fre.unregister(n)}function kRe(n,e,t=[],i=function(){}){let r=!1;const o=new Proxy(i,{get(s,a){if(Pre(r),a===s8t)return()=>{gEi(o),h8t(n),e.clear(),r=!0};if(a==="then"){if(t.length===0)return{then:()=>o};const c=YT(n,e,{type:"GET",path:t.map(l=>l.toString())}).then(DQ);return c.then.bind(c)}return kRe(n,e,[...t,a])},set(s,a,c){Pre(r);const[l,u]=Ure(c);return YT(n,e,{type:"SET",path:[...t,a].map(d=>d.toString()),value:l},u).then(DQ)},apply(s,a,c){Pre(r);const l=t[t.length-1];if(l===uEi)return YT(n,e,{type:"ENDPOINT"}).then(DQ);if(l==="bind")return kRe(n,e,t.slice(0,-1));const[u,d]=f8t(c);return YT(n,e,{type:"APPLY",path:t.map(f=>f.toString()),argumentList:u},d).then(DQ)},construct(s,a){Pre(r);const[c,l]=f8t(a);return YT(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:c},l).then(DQ)}});return AEi(o,n),o}function mEi(n){return Array.prototype.concat.apply([],n)}function f8t(n){const e=n.map(Ure);return[e.map(t=>t[0]),mEi(e.map(t=>t[1]))]}const p8t=new WeakMap;function _Ei(n,e){return p8t.set(n,e),n}function A8t(n){return Object.assign(n,{[o8t]:!0})}function Ure(n){for(const[e,t]of c8t)if(t.canHandle(n)){const[i,r]=t.serialize(n);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:n},p8t.get(n)||[]]}function DQ(n){switch(n.type){case"HANDLER":return c8t.get(n.name).deserialize(n.value);case"RAW":return n.value}}function YT(n,e,t,i){return new Promise(r=>{const o=yEi();e.set(o,r),n.start&&n.start(),n.postMessage(Object.assign({id:o},t),i)})}function yEi(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var g8t=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){n.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(l){n.verbose&&console.warn("[Worker] Error killing previous global worker instance:",l),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}n.verbose&&console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const l=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,u=await fetch(l).then(d=>d.blob());t=URL.createObjectURL(u)}const i=new Worker(t,{type:"module"});let r;i.addEventListener("error",l=>{console.error("[Worker] Error in worker",l),r=l}),i.addEventListener("unhandledrejection",l=>{console.error("[Worker] Unhandled rejection in worker",l)}),i.addEventListener("messageerror",l=>{console.error("[Worker] Message error in worker",l)});const o=l=>{console.log("[Worker] Message in worker",l)};if(i.addEventListener("message",o),r)throw r;const s=d8t(i);i.removeEventListener("message",o),n.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl),n.platform&&await s.setPlatformConfig(n.platform);let a=!1;const c={clearEventListeners:s.clearEventListeners.bind(s),version:s.version.bind(s),execute:async(...l)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...l)},executeWithFsMap:async(...l)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...l)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(l,u)=>{const d=A8t(u);s.on(l,d)},kill:async()=>{s[s8t](),i.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===c&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=c,c};const m8t=n=>{const e={};if(!n)return e;for(const i of EE)e[i]=0;const t=new Map;for(const i of n){const[,,r,o]=i.type.split(":");if(o==="start"){t.set(`${r}:${i.renderId}`,i);continue}if(o==="end"){const s=t.get(`${r}:${i.renderId}`);if(s){const a=i.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},vEi=(n,e)=>{const t={};for(const[i,r]of n.entries()){const o=e.get(i);o!==r&&(t[i]={old:r,new:o})}for(const[i,r]of e.entries())n.has(i)||(t[i]={old:void 0,new:r});return t};function xEi(){const n=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),i=nt.useCallback(async s=>{await n.current;const a={cancelled:!1};t.current=a;let c;const l=new Promise(u=>{c=u});try{return n.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,t.current=null,c()}},[]),r=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),o=nt.useCallback(()=>e.current,[]);return{runWithMutex:i,isLocked:o,cancel:r}}const IEi=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=nt.useState(""),[s,a]=nt.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return Ve.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},bEi=n=>{const e=nt.useRef(null),t=f5(i=>i.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var _8t="AlertDialog",[CEi,Eir]=Lw(_8t,[uBt]),IB=uBt(),y8t=n=>{const{__scopeAlertDialog:e,...t}=n,i=IB(e);return Ve.jsx(ARe,{...i,...t,modal:!0})};y8t.displayName=_8t;var EEi="AlertDialogTrigger",wEi=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(hCi,{...r,...i,ref:e})});wEi.displayName=EEi;var SEi="AlertDialogPortal",v8t=n=>{const{__scopeAlertDialog:e,...t}=n,i=IB(e);return Ve.jsx(gRe,{...i,...t})};v8t.displayName=SEi;var BEi="AlertDialogOverlay",x8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(pre,{...r,...i,ref:e})});x8t.displayName=BEi;var VT="AlertDialogContent",[MEi,REi]=CEi(VT),QEi=aAn("AlertDialogContent"),I8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:i,...r}=n,o=IB(t),s=nt.useRef(null),a=eI(e,s),c=nt.useRef(null);return Ve.jsx(cCi,{contentName:VT,titleName:b8t,docsSlug:"alert-dialog",children:Ve.jsx(MEi,{scope:t,cancelRef:c,children:Ve.jsxs(Are,{role:"alertdialog",...o,...r,ref:a,onOpenAutoFocus:uA(r.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[Ve.jsx(QEi,{children:i}),Ve.jsx(NEi,{contentRef:s})]})})})});I8t.displayName=VT;var b8t="AlertDialogTitle",C8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(mRe,{...r,...i,ref:e})});C8t.displayName=b8t;var E8t="AlertDialogDescription",w8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(_Re,{...r,...i,ref:e})});w8t.displayName=E8t;var DEi="AlertDialogAction",S8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(wBt,{...r,...i,ref:e})});S8t.displayName=DEi;var B8t="AlertDialogCancel",M8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,{cancelRef:r}=REi(B8t,t),o=IB(t),s=eI(e,r);return Ve.jsx(wBt,{...o,...i,ref:s})});M8t.displayName=B8t;var NEi=({contentRef:n})=>{const e=`\`${VT}\` requires a description for the component to be accessible for screen reader users.
|
|
14065
|
+
*/const o8t=Symbol("Comlink.proxy"),uEi=Symbol("Comlink.endpoint"),s8t=Symbol("Comlink.releaseProxy"),TRe=Symbol("Comlink.finalizer"),kre=Symbol("Comlink.thrown"),a8t=n=>typeof n=="object"&&n!==null||typeof n=="function",dEi={canHandle:n=>a8t(n)&&n[o8t],serialize(n){const{port1:e,port2:t}=new MessageChannel;return l8t(n,e),[t,[t]]},deserialize(n){return n.start(),d8t(n)}},hEi={canHandle:n=>a8t(n)&&kre in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},c8t=new Map([["proxy",dEi],["throw",hEi]]);function fEi(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function l8t(n,e=globalThis,t=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!fEi(t,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(DQ);let l;try{const u=a.slice(0,-1).reduce((f,p)=>f[p],n),d=a.reduce((f,p)=>f[p],n);switch(s){case"GET":l=d;break;case"SET":u[a.slice(-1)[0]]=DQ(r.data.value),l=!0;break;case"APPLY":l=d.apply(u,c);break;case"CONSTRUCT":{const f=new d(...c);l=A8t(f)}break;case"ENDPOINT":{const{port1:f,port2:p}=new MessageChannel;l8t(n,p),l=_Ei(f,[f])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[kre]:0}}Promise.resolve(l).catch(u=>({value:u,[kre]:0})).then(u=>{const[d,f]=Ure(u);e.postMessage(Object.assign(Object.assign({},d),{id:o}),f),s==="RELEASE"&&(e.removeEventListener("message",i),u8t(e),TRe in n&&typeof n[TRe]=="function"&&n[TRe]())}).catch(u=>{const[d,f]=Ure({value:new TypeError("Unserializable return value"),[kre]:0});e.postMessage(Object.assign(Object.assign({},d),{id:o}),f)})}),e.start&&e.start()}function pEi(n){return n.constructor.name==="MessagePort"}function u8t(n){pEi(n)&&n.close()}function d8t(n,e){const t=new Map;return n.addEventListener("message",function(r){const{data:o}=r;if(!o||!o.id)return;const s=t.get(o.id);if(s)try{s(o)}finally{t.delete(o.id)}}),kRe(n,t,[],e)}function Pre(n){if(n)throw new Error("Proxy has been released and is not useable")}function h8t(n){return YT(n,new Map,{type:"RELEASE"}).then(()=>{u8t(n)})}const Lre=new WeakMap,Fre="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(Lre.get(n)||0)-1;Lre.set(n,e),e===0&&h8t(n)});function AEi(n,e){const t=(Lre.get(e)||0)+1;Lre.set(e,t),Fre&&Fre.register(n,e,n)}function gEi(n){Fre&&Fre.unregister(n)}function kRe(n,e,t=[],i=function(){}){let r=!1;const o=new Proxy(i,{get(s,a){if(Pre(r),a===s8t)return()=>{gEi(o),h8t(n),e.clear(),r=!0};if(a==="then"){if(t.length===0)return{then:()=>o};const c=YT(n,e,{type:"GET",path:t.map(l=>l.toString())}).then(DQ);return c.then.bind(c)}return kRe(n,e,[...t,a])},set(s,a,c){Pre(r);const[l,u]=Ure(c);return YT(n,e,{type:"SET",path:[...t,a].map(d=>d.toString()),value:l},u).then(DQ)},apply(s,a,c){Pre(r);const l=t[t.length-1];if(l===uEi)return YT(n,e,{type:"ENDPOINT"}).then(DQ);if(l==="bind")return kRe(n,e,t.slice(0,-1));const[u,d]=f8t(c);return YT(n,e,{type:"APPLY",path:t.map(f=>f.toString()),argumentList:u},d).then(DQ)},construct(s,a){Pre(r);const[c,l]=f8t(a);return YT(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:c},l).then(DQ)}});return AEi(o,n),o}function mEi(n){return Array.prototype.concat.apply([],n)}function f8t(n){const e=n.map(Ure);return[e.map(t=>t[0]),mEi(e.map(t=>t[1]))]}const p8t=new WeakMap;function _Ei(n,e){return p8t.set(n,e),n}function A8t(n){return Object.assign(n,{[o8t]:!0})}function Ure(n){for(const[e,t]of c8t)if(t.canHandle(n)){const[i,r]=t.serialize(n);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:n},p8t.get(n)||[]]}function DQ(n){switch(n.type){case"HANDLER":return c8t.get(n.name).deserialize(n.value);case"RAW":return n.value}}function YT(n,e,t,i){return new Promise(r=>{const o=yEi();e.set(o,r),n.start&&n.start(),n.postMessage(Object.assign({id:o},t),i)})}function yEi(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var g8t=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){n.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(l){n.verbose&&console.warn("[Worker] Error killing previous global worker instance:",l),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}n.verbose&&console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const l=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,u=await globalThis.fetch(l).then(d=>d.blob());t=URL.createObjectURL(u)}const i=new Worker(t,{type:"module"});let r;i.addEventListener("error",l=>{console.error("[Worker] Error in worker",l),r=l}),i.addEventListener("unhandledrejection",l=>{console.error("[Worker] Unhandled rejection in worker",l)}),i.addEventListener("messageerror",l=>{console.error("[Worker] Message error in worker",l)});const o=l=>{console.log("[Worker] Message in worker",l)};if(i.addEventListener("message",o),i.addEventListener("message",async l=>{const u=l.data;if((u==null?void 0:u.type)==="worker_fetch")try{const d=await globalThis.fetch(u.input,u.init),f=await d.text();i.postMessage({type:"worker_fetch_result",requestId:u.requestId,success:!0,response:{body:f,status:d.status,statusText:d.statusText,headers:(()=>{const p={};return d.headers.forEach((g,_)=>{p[_]=g}),p})()}})}catch(d){i.postMessage({type:"worker_fetch_result",requestId:u.requestId,success:!1,error:{name:d.name,message:d.message,stack:d.stack}})}}),r)throw r;const s=d8t(i);i.removeEventListener("message",o),n.enableFetchProxy&&i.postMessage({type:"override_global_fetch"}),n.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl),n.platform&&await s.setPlatformConfig(n.platform);let a=!1;const c={clearEventListeners:s.clearEventListeners.bind(s),version:s.version.bind(s),execute:async(...l)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...l)},executeWithFsMap:async(...l)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...l)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(l,u)=>{const d=A8t(u);s.on(l,d)},kill:async()=>{s[s8t](),i.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===c&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return c.__rawWorker=i,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=c,c};const m8t=n=>{const e={};if(!n)return e;for(const i of EE)e[i]=0;const t=new Map;for(const i of n){const[,,r,o]=i.type.split(":");if(o==="start"){t.set(`${r}:${i.renderId}`,i);continue}if(o==="end"){const s=t.get(`${r}:${i.renderId}`);if(s){const a=i.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},vEi=(n,e)=>{const t={};for(const[i,r]of n.entries()){const o=e.get(i);o!==r&&(t[i]={old:r,new:o})}for(const[i,r]of e.entries())n.has(i)||(t[i]={old:void 0,new:r});return t};function xEi(){const n=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),i=nt.useCallback(async s=>{await n.current;const a={cancelled:!1};t.current=a;let c;const l=new Promise(u=>{c=u});try{return n.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,t.current=null,c()}},[]),r=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),o=nt.useCallback(()=>e.current,[]);return{runWithMutex:i,isLocked:o,cancel:r}}const IEi=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=nt.useState(""),[s,a]=nt.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return Ve.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},bEi=n=>{const e=nt.useRef(null),t=f5(i=>i.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var _8t="AlertDialog",[CEi,Eir]=Lw(_8t,[uBt]),IB=uBt(),y8t=n=>{const{__scopeAlertDialog:e,...t}=n,i=IB(e);return Ve.jsx(ARe,{...i,...t,modal:!0})};y8t.displayName=_8t;var EEi="AlertDialogTrigger",wEi=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(hCi,{...r,...i,ref:e})});wEi.displayName=EEi;var SEi="AlertDialogPortal",v8t=n=>{const{__scopeAlertDialog:e,...t}=n,i=IB(e);return Ve.jsx(gRe,{...i,...t})};v8t.displayName=SEi;var BEi="AlertDialogOverlay",x8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(pre,{...r,...i,ref:e})});x8t.displayName=BEi;var VT="AlertDialogContent",[MEi,REi]=CEi(VT),QEi=aAn("AlertDialogContent"),I8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:i,...r}=n,o=IB(t),s=nt.useRef(null),a=eI(e,s),c=nt.useRef(null);return Ve.jsx(cCi,{contentName:VT,titleName:b8t,docsSlug:"alert-dialog",children:Ve.jsx(MEi,{scope:t,cancelRef:c,children:Ve.jsxs(Are,{role:"alertdialog",...o,...r,ref:a,onOpenAutoFocus:uA(r.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[Ve.jsx(QEi,{children:i}),Ve.jsx(NEi,{contentRef:s})]})})})});I8t.displayName=VT;var b8t="AlertDialogTitle",C8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(mRe,{...r,...i,ref:e})});C8t.displayName=b8t;var E8t="AlertDialogDescription",w8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(_Re,{...r,...i,ref:e})});w8t.displayName=E8t;var DEi="AlertDialogAction",S8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,r=IB(t);return Ve.jsx(wBt,{...r,...i,ref:e})});S8t.displayName=DEi;var B8t="AlertDialogCancel",M8t=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...i}=n,{cancelRef:r}=REi(B8t,t),o=IB(t),s=eI(e,r);return Ve.jsx(wBt,{...o,...i,ref:s})});M8t.displayName=B8t;var NEi=({contentRef:n})=>{const e=`\`${VT}\` requires a description for the component to be accessible for screen reader users.
|
|
14066
14066
|
|
|
14067
14067
|
You can add a description to the \`${VT}\` by passing a \`${E8t}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
14068
14068
|
|
|
@@ -14976,4 +14976,4 @@ ${i.stack}`),t.complete=!0,"root"in this&&this.root&&this.root.emit("asyncEffect
|
|
|
14976
14976
|
* This source code is licensed under the MIT license found in the
|
|
14977
14977
|
* LICENSE file in the root directory of this source tree.
|
|
14978
14978
|
*)
|
|
14979
|
-
*/const E$i=async n=>{var o;const e=await C$i(n,{fetch:(s,a)=>{var c,l,u,d,f;return fetch(`${pS}/proxy`,{...a,headers:{...a==null?void 0:a.headers,"X-Target-Url":s.toString(),"X-Sender-Origin":((c=a==null?void 0:a.headers)==null?void 0:c.origin)??"","X-Sender-Host":((l=a==null?void 0:a.headers)==null?void 0:l.host)??"https://easyeda.com","X-Sender-Referer":((u=a==null?void 0:a.headers)==null?void 0:u.referer)??"","X-Sender-User-Agent":((d=a==null?void 0:a.headers)==null?void 0:d.userAgent)??"","X-Sender-Cookie":((f=a==null?void 0:a.headers)==null?void 0:f.cookie)??""}})}}),t=await x$i(e),i=(o=t.match(/export const (\w+) = .*/))==null?void 0:o[1];if(!i)throw console.error("COULD NOT DETERMINE FILE NAME OF CONVERTED COMPONENT:",t),new Error("Could not determine file name of converted component");const r=`imports/${i}.tsx`;return await r8t.post(`${pS}/files/upsert`,{json:{file_path:r,text_content:t}}),{filePath:r}},DLt=n=>{const e=dre(fe=>fe.lastRunEvalVersion),[t,i]=nt.useState(null),[r,o]=nt.useState(!1),[s,a]=nt.useState(!0),[c,l]=nt.useState(!1),[u,d]=nt.useState(null),[f,p]=nt.useState(null),[g,_]=nt.useState(!1),[y,v]=nt.useState(null),[x,b]=nt.useState(null),[B,U]=nt.useState(!1),[N,Q]=nt.useState(!1),R=lEi(),L=f5(fe=>fe.pushEvent),P=f5(fe=>fe.recentEvents),K=nt.useMemo(()=>Date.now(),[]);bEi(fe=>{if(!(new Date(fe.created_at).valueOf()<K+500)){if(fe.event_type==="FILE_UPDATED"){o(!0);return}if(fe.event_type==="SNIPPET_SAVED"){o(!1),a(!1),v("Snippet saved successfully."),U(!1);return}fe.event_type==="REQUEST_EXPORT"&&(Q(!0),v("Export processing..."),U(!1)),fe.event_type==="EXPORT_CREATED"&&(v(`Export created: ${fe.exportFilePath}`),U(!1),Q(!1))}}),nt.useEffect(()=>{if(!c||u===null)return;const fe=P.filter(Ie=>new Date(Ie.created_at).valueOf()>u),be=fe.find(Ie=>Ie.event_type==="FAILED_TO_SAVE_SNIPPET"),Re=fe.find(Ie=>Ie.event_type==="SNIPPET_SAVED");be&&(l(!1),d(null),b(be.message??"Failed to save snippet. See console for error."),console.error(be.message),U(!0),be.error_code==="SNIPPET_UNSET"&&be.available_snippet_names&&(p(be.available_snippet_names),_(!0))),Re&&(l(!1),d(null),v("Snippet saved successfully."),U(!1))},[P,c]);const G=async()=>{l(!0),d(Date.now()),v(null),U(!1),await L({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},$=f5(fe=>fe.circuitJson),[ie,se]=nt.useState(!1),[ce,Ae]=nt.useState(!1);return Ve.jsxs(Ve.Fragment,{children:[Ve.jsxs(Rwe,{children:[Ve.jsx(Qwe,{asChild:!0,children:Ve.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),Ve.jsxs(GZ,{children:[!n.isWebEmbedded&&Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(Z2,{className:"rf-text-xs",onSelect:G,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>{R.open()},children:"Order"}),Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>se(!0),disabled:c,children:"Import"}),Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>{if(!NRe()){aI.error("Requires tscircuit token");return}Ae(!0)},children:"AI Review"})]}),Ve.jsxs(Nwe,{children:[Ve.jsx(UZ,{className:"rf-text-xs",disabled:N,children:N?"Exporting...":"Export"}),Ve.jsx(Dwe,{children:Ve.jsx(OZ,{children:Q3i.map((fe,be)=>Ve.jsx(Z2,{onSelect:()=>{if(!$){aI.error("No Circuit JSON to export");return}D3i({exportName:fe.name,circuitJson:$,projectName:t??"Untitled"})},disabled:N,children:Ve.jsx("span",{className:"rf-text-xs",children:fe.name})},be))})})]}),!n.isWebEmbedded&&Ve.jsxs(Nwe,{children:[Ve.jsx(UZ,{className:"rf-text-xs",children:"Advanced"}),Ve.jsx(Dwe,{children:Ve.jsxs(OZ,{children:[Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ve.jsx($8t,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:fe=>{var be;(be=n.onChangeShouldLoadLatestEval)==null||be.call(n,fe===!0)}}),Ve.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:Ve.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),Ve.jsx(PEi,{open:B,onOpenChange:U,children:Ve.jsxs(L8t,{children:[Ve.jsxs(F8t,{children:[Ve.jsx(O8t,{children:"Error Saving Snippet"}),Ve.jsx(G8t,{children:x})]}),Ve.jsx(U8t,{children:Ve.jsx(z8t,{onClick:()=>U(!1),children:"Dismiss"})})]})}),Ve.jsx(IEi,{snippetNames:f??[],onSelect:async fe=>{l(!0),d(Date.now()),i(fe),await L({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:fe}),_(!1)},onCancel:()=>_(!1),isOpen:g})]}),Ve.jsx(XEi,{isOpen:ie,onClose:()=>se(!1),onImport:async fe=>{aI.promise(async()=>{if(fe.source==="tscircuit.com")throw await L({event_type:"INSTALL_PACKAGE",full_package_name:`@tsci/${fe.owner}.${fe.name}`}),new Error("Not implemented");if(fe.source==="jlcpcb"){const{filePath:be}=await E$i(fe.partNumber);return{filePath:be}}},{loading:`Importing component: "${fe.name}"`,error:be=>(console.error("IMPORT ERROR",be),`Error importing component: "${fe.name}": ${be.toString()}`),success:be=>be!=null&&be.filePath?`Imported to "${be.filePath}"`:"Import Successful"})}}),Ve.jsx(mwi,{isOpen:ce,onClose:()=>Ae(!1),packageName:t}),Ve.jsx(k2i,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),Ve.jsx(R.OrderDialog,{isOpen:R.isOpen,onClose:R.close,stage:R.stage,setStage:R.setStage})]})},w$i=26,k5=Zx("run-frame:RunFrame"),S$i=async()=>{var n;try{const e=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(e.ok)return(n=(await e.json()).tags)==null?void 0:n.latest}catch(e){console.error("Failed to fetch latest eval version",e)}},NLt=async(n,e)=>{if(n)return n;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const t=await S$i();if(t)return window.TSCIRCUIT_LATEST_EVAL_VERSION=t,t}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},TLt=n=>{var Ae;oBt();const[e,t]=f5(fe=>[fe.circuitJson,fe.setCircuitJson]),[i,r]=nt.useState(null),o=nt.useRef(null),[s,a]=nt.useState(null),[c,l]=nt.useReducer((fe,be)=>fe+1,0),u=dre(fe=>fe.setLastRunEvalVersion),d=nt.useRef(0),f=xEi(),[p,g]=nt.useState(!1),[_,y]=nt.useState(!1),[v,x]=nt.useState({}),b=(Ae=Object.values(v).sort((fe,be)=>fe.startTime-be.startTime)[0])==null?void 0:Ae.effectName;nt.useEffect(()=>{const fe=be=>{(be.ctrlKey||be.metaKey)&&be.key==="Enter"&&!p&&l(1)};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[p]),nt.useEffect(()=>{let fe=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const Re=await NLt(n.evalVersion,n.forceLatestEvalVersion),Ie=await g8t({evalVersion:Re,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});if(fe)return;globalThis.runFrameWorker=Ie,u(Re)}fe||y(!0)}catch(Re){console.error("Failed to preload eval worker",Re)}})(),()=>{fe=!0}},[n.evalVersion,n.evalWebWorkerBlobUrl,n.forceLatestEvalVersion]);const[B,U]=nt.useState(null),[N,Q]=nt.useState({}),[R,L]=nt.useState(n.defaultActiveTab??n.defaultTab??"pcb");nt.useEffect(()=>{n.debug&&Zx.enable("run-frame*")},[n.debug]);const P=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((fe,[be,Re])=>fe.set(be,Re),new Map),K=nt.useRef(null),G=nt.useRef(null);nt.useEffect(()=>{if(n.isLoadingFiles)return;const fe=P instanceof Map?Object.fromEntries(P.entries()):P;if(!fe||Object.keys(fe).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),g(!1);return}const be=n.showRunButton&&c!==d.current;if(K.current&&e){const Ie=vEi(K.current,P);if(Object.keys(Ie).length>0)k5("code changes detected");else if(G.current!==n.entrypoint)k5("render triggered by entrypoint change");else if(!be){k5("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&c===d.current)return;K.current=P,G.current=n.entrypoint??null,d.current=c,g(!0);const Re=async()=>{var Le,ze,st,ct,at;k5("running render worker"),r(null),U(null),x({});const Ie={progress:0};let xe=!1;o.current=()=>{xe=!0};const Ne=await NLt(n.evalVersion,!globalThis.runFrameWorker&&n.forceLatestEvalVersion);k5("resolvedEvalVersion",Ne);const Ke=globalThis.runFrameWorker??await g8t({evalVersion:Ne,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=Ke,u(Ne),k5("Starting render..."),(Le=n.onRenderStarted)==null||Le.call(n);const We=P instanceof Map?Object.fromEntries(P.entries()):P;let ot=Date.now();Ke.on("asyncEffect:start",Xe=>{const vt=`${Xe.phase}|${Xe.componentDisplayName??""}|${Xe.effectName}`;x(mt=>({...mt,[vt]:{...Xe,startTime:Date.now()}}))}),Ke.on("asyncEffect:end",Xe=>{const vt=`${Xe.phase}|${Xe.componentDisplayName??""}|${Xe.effectName}`;x(mt=>{const{[vt]:ht,...zt}=mt;return zt})}),Ke.on("autorouting:start",Xe=>{Q({...N,[Xe.componentDisplayName]:{simpleRouteJson:Xe.simpleRouteJson}})}),Ke.on("board:renderPhaseStarted",Xe=>{Ie.lastRenderEvent=Xe,Ie.eventsProcessed=(Ie.eventsProcessed??0)+1;const vt=EE.indexOf(Xe.phase)/w$i*.75+Ie.eventsProcessed/1e3*.25,mt=1-Math.exp(-vt*3);Ie.progress=mt,xe||U({...Ie})}),R==="render_log"&&Ke.on("renderable:renderLifecycle:anyEvent",Xe=>{Ie.renderEvents=Ie.renderEvents??[],Xe.createdAt=Date.now(),Ie.renderEvents.push(Xe),Date.now()-ot>500&&(Ie.phaseTimings=m8t(Ie.renderEvents??[]),ot=Date.now()),xe||U({...Ie})}),Ke.on("autorouting:progress",Xe=>{a(Xe.debugGraphics)}),k5("Executing fsMap...");const xt=await Ke.executeWithFsMap({entrypoint:n.entrypoint,fsMap:We,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Xe=>{var mt;const vt=Xe.message.replace("Error: ","");return k5(`eval error: ${vt}`),(mt=n.onError)==null||mt.call(n,Xe),r({error:vt,stack:Xe.stack}),U(null),console.error(Xe),{success:!1}});if(k5("worker call started"),!xt.success){g(!1),x({});return}const it=Ke.renderUntilSettled();k5("waiting for initial circuit json...");let Ee=await Ke.getCircuitJson().catch(Xe=>{var vt;return k5("error getting initial circuit json",Xe),(vt=n.onError)==null||vt.call(n,Xe),r({error:Xe.message,stack:Xe.stack}),U(null),g(!1),x({}),null});Ee&&(k5("got initial circuit json"),t(Ee),(ze=n.onCircuitJsonChange)==null||ze.call(n,Ee),(st=n.onInitialRender)==null||st.call(n,{circuitJson:Ee}),await it,k5("getting final circuit json"),Ee=await Ke.getCircuitJson(),(ct=n.onCircuitJsonChange)==null||ct.call(n,Ee),t(Ee),(at=n.onRenderFinished)==null||at.call(n,{circuitJson:Ee}),a({}),R==="render_log"&&(Ie.phaseTimings=m8t(Ie.renderEvents??[])),Ie.progress=1,xe||U({...Ie}),g(!1),x({}),o.current=null)};f.runWithMutex(Re)},[n.fsMap,n.entrypoint,c,n.evalVersion,n.mainComponentPath,n.isLoadingFiles]);const $=nt.useRef(null),ie=nt.useRef(null),se=fe=>{if(!fe||fe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}fe.in_progress?($.current=fe,ie.current&&(clearTimeout(ie.current),ie.current=null)):(ie.current&&clearTimeout(ie.current),ie.current=setTimeout(()=>{var Re;const be=fe||$.current;(Re=n.onEditEvent)==null||Re.call(n,be),$.current=null,ie.current=null},100))},ce=async(fe,be)=>{let Re="";const Ie=Array.isArray(e)&&e.find(Ke=>Ke.type==="software_project_metadata"),xe=n.projectUrl??(Ie==null?void 0:Ie.project_url);if(xe)try{Re=new URL(xe).pathname}catch{Re=xe}const Ne=Re?`${Re} - ${fe}`:fe;await fz.post("autorouting/bug_reports/create",{json:{title:Ne,simple_route_json:be.simpleRouteJson}}).json().then(({autorouting_bug_report:Ke})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Ke.autorouting_bug_report_id}`,"_blank")}).catch(Ke=>{console.error("Failed to report autorouting bug",Ke),Ke.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${Ke.message}`)})};return n.isLoadingFiles?Ve.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[Ve.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),Ve.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((fe,be)=>Ve.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},be))})]}),Ve.jsx("div",{className:"rf-flex-1 rf-p-4",children:Ve.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:Ve.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:Ve.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:"Loading files..."})})})})]}):Ve.jsx(tCi,{code:P.get(n.entrypoint??n.mainComponentPath),fsMap:P,defaultActiveTab:n.defaultActiveTab??n.defaultTab,defaultTab:n.defaultTab,availableTabs:n.availableTabs,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:N,onReportAutoroutingLog:n.onReportAutoroutingLog||ce,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[n.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:p||!_,children:["Run"," ",p||!_?Ve.jsx(YR,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx($yt,{className:"rf-w-3 rf-h-3"})]}),p&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(sI,{onClick:fe=>{fe.stopPropagation(),g(!1),U(null),r(null),o.current&&(o.current(),o.current=null),f.cancel(),x({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(pzn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.showFileMenu!==!1&&Ve.jsx(DLt,{isWebEmbedded:n.isWebEmbedded??!0}),n.leftHeaderContent]}),onActiveTabChange:L,circuitJson:e,renderLog:B,activeEffectName:b,isRunningCode:p,errorMessage:i==null?void 0:i.error,errorStack:i==null?void 0:i.stack,onEditEvent:se,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})},B$i=n=>{const[e,t]=cBt("load-latest-eval",!0);return Ve.jsx(dFt,{debug:n.debug,forceLatestEvalVersion:!n.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:n.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,leftHeaderContent:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[Ve.jsx(DLt,{isWebEmbedded:!1,shouldLoadLatestEval:!n.workerBlobUrl&&e,onChangeShouldLoadLatestEval:i=>{t(i),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})},M$i=()=>{const n=f5(e=>e.fsMap);nt.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=mqi(e),i=n.get("package.json");try{if(i){const r=JSON.parse(i);if(r!=null&&r.name){document.title=r.name;return}}}catch{}t&&(document.title=t)},[n])};var kLt=1,R$i=.9,Q$i=.8,D$i=.17,cPe=.1,lPe=.999,N$i=.9999,T$i=.99,k$i=/[\\\/_+.#"@\[\(\{&]/,P$i=/[\\\/_+.#"@\[\(\{&]/g,L$i=/[\s-]/,PLt=/[\s-]/g;function uPe(n,e,t,i,r,o,s){if(o===e.length)return r===n.length?kLt:T$i;var a=`${r},${o}`;if(s[a]!==void 0)return s[a];for(var c=i.charAt(o),l=t.indexOf(c,r),u=0,d,f,p,g;l>=0;)d=uPe(n,e,t,i,l+1,o+1,s),d>u&&(l===r?d*=kLt:k$i.test(n.charAt(l-1))?(d*=Q$i,p=n.slice(r,l-1).match(P$i),p&&r>0&&(d*=Math.pow(lPe,p.length))):L$i.test(n.charAt(l-1))?(d*=R$i,g=n.slice(r,l-1).match(PLt),g&&r>0&&(d*=Math.pow(lPe,g.length))):(d*=D$i,r>0&&(d*=Math.pow(lPe,l-r))),n.charAt(l)!==e.charAt(o)&&(d*=N$i)),(d<cPe&&t.charAt(l-1)===i.charAt(o+1)||i.charAt(o+1)===i.charAt(o)&&t.charAt(l-1)!==i.charAt(o))&&(f=uPe(n,e,t,i,l+1,o+2,s),f*cPe>d&&(d=f*cPe)),d>u&&(u=d),l=t.indexOf(c,l+1);return s[a]=u,u}function LLt(n){return n.toLowerCase().replace(PLt," ")}function F$i(n,e,t){return n=t&&t.length>0?`${n+" "+t.join(" ")}`:n,uPe(n,e,LLt(n),LLt(e),0,0,{})}var uH='[cmdk-group=""]',dPe='[cmdk-group-items=""]',U$i='[cmdk-group-heading=""]',FLt='[cmdk-item=""]',ULt=`${FLt}:not([aria-disabled="true"])`,hPe="cmdk-item-select",Nk="data-value",O$i=(n,e,t)=>F$i(n,e,t),OLt=nt.createContext(void 0),dH=()=>nt.useContext(OLt),GLt=nt.createContext(void 0),fPe=()=>nt.useContext(GLt),zLt=nt.createContext(void 0),HLt=nt.forwardRef((n,e)=>{let t=Tk(()=>{var xe,Ne;return{search:"",value:(Ne=(xe=n.value)!=null?xe:n.defaultValue)!=null?Ne:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Tk(()=>new Set),r=Tk(()=>new Map),o=Tk(()=>new Map),s=Tk(()=>new Set),a=YLt(n),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:_=!1,vimBindings:y=!0,...v}=n,x=m2(),b=m2(),B=m2(),U=nt.useRef(null),N=q$i();e7(()=>{if(u!==void 0){let xe=u.trim();t.current.value=xe,Q.emit()}},[u]),e7(()=>{N(6,$)},[]);let Q=nt.useMemo(()=>({subscribe:xe=>(s.current.add(xe),()=>s.current.delete(xe)),snapshot:()=>t.current,setState:(xe,Ne,Ke)=>{var We,ot,xt,it;if(!Object.is(t.current[xe],Ne)){if(t.current[xe]=Ne,xe==="search")G(),P(),N(1,K);else if(xe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(B);Ee?Ee.focus():(We=document.getElementById(x))==null||We.focus()}if(N(7,()=>{var Ee;t.current.selectedItemId=(Ee=ie())==null?void 0:Ee.id,Q.emit()}),Ke||N(5,$),((ot=a.current)==null?void 0:ot.value)!==void 0){let Ee=Ne??"";(it=(xt=a.current).onValueChange)==null||it.call(xt,Ee);return}}Q.emit()}},emit:()=>{s.current.forEach(xe=>xe())}}),[]),R=nt.useMemo(()=>({value:(xe,Ne,Ke)=>{var We;Ne!==((We=o.current.get(xe))==null?void 0:We.value)&&(o.current.set(xe,{value:Ne,keywords:Ke}),t.current.filtered.items.set(xe,L(Ne,Ke)),N(2,()=>{P(),Q.emit()}))},item:(xe,Ne)=>(i.current.add(xe),Ne&&(r.current.has(Ne)?r.current.get(Ne).add(xe):r.current.set(Ne,new Set([xe]))),N(3,()=>{G(),P(),t.current.value||K(),Q.emit()}),()=>{o.current.delete(xe),i.current.delete(xe),t.current.filtered.items.delete(xe);let Ke=ie();N(4,()=>{G(),(Ke==null?void 0:Ke.getAttribute("id"))===xe&&K(),Q.emit()})}),group:xe=>(r.current.has(xe)||r.current.set(xe,new Set),()=>{o.current.delete(xe),r.current.delete(xe)}),filter:()=>a.current.shouldFilter,label:c||n["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:B,labelId:b,listInnerRef:U}),[]);function L(xe,Ne){var Ke,We;let ot=(We=(Ke=a.current)==null?void 0:Ke.filter)!=null?We:O$i;return xe?ot(xe,t.current.search,Ne):0}function P(){if(!t.current.search||a.current.shouldFilter===!1)return;let xe=t.current.filtered.items,Ne=[];t.current.filtered.groups.forEach(We=>{let ot=r.current.get(We),xt=0;ot.forEach(it=>{let Ee=xe.get(it);xt=Math.max(Ee,xt)}),Ne.push([We,xt])});let Ke=U.current;se().sort((We,ot)=>{var xt,it;let Ee=We.getAttribute("id"),Le=ot.getAttribute("id");return((xt=xe.get(Le))!=null?xt:0)-((it=xe.get(Ee))!=null?it:0)}).forEach(We=>{let ot=We.closest(dPe);ot?ot.appendChild(We.parentElement===ot?We:We.closest(`${dPe} > *`)):Ke.appendChild(We.parentElement===Ke?We:We.closest(`${dPe} > *`))}),Ne.sort((We,ot)=>ot[1]-We[1]).forEach(We=>{var ot;let xt=(ot=U.current)==null?void 0:ot.querySelector(`${uH}[${Nk}="${encodeURIComponent(We[0])}"]`);xt==null||xt.parentElement.appendChild(xt)})}function K(){let xe=se().find(Ke=>Ke.getAttribute("aria-disabled")!=="true"),Ne=xe==null?void 0:xe.getAttribute(Nk);Q.setState("value",Ne||void 0)}function G(){var xe,Ne,Ke,We;if(!t.current.search||a.current.shouldFilter===!1){t.current.filtered.count=i.current.size;return}t.current.filtered.groups=new Set;let ot=0;for(let xt of i.current){let it=(Ne=(xe=o.current.get(xt))==null?void 0:xe.value)!=null?Ne:"",Ee=(We=(Ke=o.current.get(xt))==null?void 0:Ke.keywords)!=null?We:[],Le=L(it,Ee);t.current.filtered.items.set(xt,Le),Le>0&&ot++}for(let[xt,it]of r.current)for(let Ee of it)if(t.current.filtered.items.get(Ee)>0){t.current.filtered.groups.add(xt);break}t.current.filtered.count=ot}function $(){var xe,Ne,Ke;let We=ie();We&&(((xe=We.parentElement)==null?void 0:xe.firstChild)===We&&((Ke=(Ne=We.closest(uH))==null?void 0:Ne.querySelector(U$i))==null||Ke.scrollIntoView({block:"nearest"})),We.scrollIntoView({block:"nearest"}))}function ie(){var xe;return(xe=U.current)==null?void 0:xe.querySelector(`${FLt}[aria-selected="true"]`)}function se(){var xe;return Array.from(((xe=U.current)==null?void 0:xe.querySelectorAll(ULt))||[])}function ce(xe){let Ne=se()[xe];Ne&&Q.setState("value",Ne.getAttribute(Nk))}function Ae(xe){var Ne;let Ke=ie(),We=se(),ot=We.findIndex(it=>it===Ke),xt=We[ot+xe];(Ne=a.current)!=null&&Ne.loop&&(xt=ot+xe<0?We[We.length-1]:ot+xe===We.length?We[0]:We[ot+xe]),xt&&Q.setState("value",xt.getAttribute(Nk))}function fe(xe){let Ne=ie(),Ke=Ne==null?void 0:Ne.closest(uH),We;for(;Ke&&!We;)Ke=xe>0?W$i(Ke,uH):$$i(Ke,uH),We=Ke==null?void 0:Ke.querySelector(ULt);We?Q.setState("value",We.getAttribute(Nk)):Ae(xe)}let be=()=>ce(se().length-1),Re=xe=>{xe.preventDefault(),xe.metaKey?be():xe.altKey?fe(1):Ae(1)},Ie=xe=>{xe.preventDefault(),xe.metaKey?ce(0):xe.altKey?fe(-1):Ae(-1)};return nt.createElement(B_.div,{ref:e,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:xe=>{var Ne;(Ne=v.onKeyDown)==null||Ne.call(v,xe);let Ke=xe.nativeEvent.isComposing||xe.keyCode===229;if(!(xe.defaultPrevented||Ke))switch(xe.key){case"n":case"j":{y&&xe.ctrlKey&&Re(xe);break}case"ArrowDown":{Re(xe);break}case"p":case"k":{y&&xe.ctrlKey&&Ie(xe);break}case"ArrowUp":{Ie(xe);break}case"Home":{xe.preventDefault(),ce(0);break}case"End":{xe.preventDefault(),be();break}case"Enter":{xe.preventDefault();let We=ie();if(We){let ot=new Event(hPe);We.dispatchEvent(ot)}}}}},nt.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Z$i},c),sle(n,xe=>nt.createElement(GLt.Provider,{value:Q},nt.createElement(OLt.Provider,{value:R},xe))))}),G$i=nt.forwardRef((n,e)=>{var t,i;let r=m2(),o=nt.useRef(null),s=nt.useContext(zLt),a=dH(),c=YLt(n),l=(i=(t=c.current)==null?void 0:t.forceMount)!=null?i:s==null?void 0:s.forceMount;e7(()=>{if(!l)return a.item(r,s==null?void 0:s.id)},[l]);let u=VLt(r,o,[n.value,n.children,o],n.keywords),d=fPe(),f=qM(N=>N.value&&N.value===u.current),p=qM(N=>l||a.filter()===!1?!0:N.search?N.filtered.items.get(r)>0:!0);nt.useEffect(()=>{let N=o.current;if(!(!N||n.disabled))return N.addEventListener(hPe,g),()=>N.removeEventListener(hPe,g)},[p,n.onSelect,n.disabled]);function g(){var N,Q;_(),(Q=(N=c.current).onSelect)==null||Q.call(N,u.current)}function _(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:y,value:v,onSelect:x,forceMount:b,keywords:B,...U}=n;return nt.createElement(B_.div,{ref:AS(o,e),...U,id:r,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||a.getDisablePointerSelection()?void 0:_,onClick:y?void 0:g},n.children)}),z$i=nt.forwardRef((n,e)=>{let{heading:t,children:i,forceMount:r,...o}=n,s=m2(),a=nt.useRef(null),c=nt.useRef(null),l=m2(),u=dH(),d=qM(p=>r||u.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);e7(()=>u.group(s),[]),VLt(s,a,[n.value,n.heading,c]);let f=nt.useMemo(()=>({id:s,forceMount:r}),[r]);return nt.createElement(B_.div,{ref:AS(a,e),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},t&&nt.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},t),sle(n,p=>nt.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?l:void 0},nt.createElement(zLt.Provider,{value:f},p))))}),H$i=nt.forwardRef((n,e)=>{let{alwaysRender:t,...i}=n,r=nt.useRef(null),o=qM(s=>!s.search);return!t&&!o?null:nt.createElement(B_.div,{ref:AS(r,e),...i,"cmdk-separator":"",role:"separator"})}),Y$i=nt.forwardRef((n,e)=>{let{onValueChange:t,...i}=n,r=n.value!=null,o=fPe(),s=qM(l=>l.search),a=qM(l=>l.selectedItemId),c=dH();return nt.useEffect(()=>{n.value!=null&&o.setState("search",n.value)},[n.value]),nt.createElement(B_.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?n.value:s,onChange:l=>{r||o.setState("search",l.target.value),t==null||t(l.target.value)}})}),V$i=nt.forwardRef((n,e)=>{let{children:t,label:i="Suggestions",...r}=n,o=nt.useRef(null),s=nt.useRef(null),a=qM(l=>l.selectedItemId),c=dH();return nt.useEffect(()=>{if(s.current&&o.current){let l=s.current,u=o.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(d),f.unobserve(l)}}},[]),nt.createElement(B_.div,{ref:AS(o,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:c.listId},sle(n,l=>nt.createElement("div",{ref:AS(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),j$i=nt.forwardRef((n,e)=>{let{open:t,onOpenChange:i,overlayClassName:r,contentClassName:o,container:s,...a}=n;return nt.createElement(ARe,{open:t,onOpenChange:i},nt.createElement(gRe,{container:s},nt.createElement(pre,{"cmdk-overlay":"",className:r}),nt.createElement(Are,{"aria-label":n.label,"cmdk-dialog":"",className:o},nt.createElement(HLt,{ref:e,...a}))))}),K$i=nt.forwardRef((n,e)=>qM(t=>t.filtered.count===0)?nt.createElement(B_.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),X$i=nt.forwardRef((n,e)=>{let{progress:t,children:i,label:r="Loading...",...o}=n;return nt.createElement(B_.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},sle(n,s=>nt.createElement("div",{"aria-hidden":!0},s)))}),t5=Object.assign(HLt,{List:V$i,Item:G$i,Input:Y$i,Group:z$i,Separator:H$i,Dialog:j$i,Empty:K$i,Loading:X$i});function W$i(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return t;t=t.nextElementSibling}}function $$i(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}}function YLt(n){let e=nt.useRef(n);return e7(()=>{e.current=n}),e}var e7=typeof window>"u"?nt.useEffect:nt.useLayoutEffect;function Tk(n){let e=nt.useRef();return e.current===void 0&&(e.current=n()),e}function qM(n){let e=fPe(),t=()=>n(e.snapshot());return nt.useSyncExternalStore(e.subscribe,t,t)}function VLt(n,e,t,i=[]){let r=nt.useRef(),o=dH();return e7(()=>{var s;let a=(()=>{var l;for(let u of t){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=i.map(l=>l.trim());o.value(n,a,c),(s=e.current)==null||s.setAttribute(Nk,a),r.current=a}),r}var q$i=()=>{let[n,e]=nt.useState(),t=Tk(()=>new Map);return e7(()=>{t.current.forEach(i=>i()),t.current=new Map},[n]),(i,r)=>{t.current.set(i,r),e({})}};function J$i(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function sle({asChild:n,children:e},t){return n&&nt.isValidElement(e)?nt.cloneElement(J$i(e),{ref:e.ref},t(e.props.children)):t(e)}var Z$i={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const jLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5,{ref:t,className:dp("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));jLt.displayName=t5.displayName;const KLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[Ve.jsx(j3e,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),Ve.jsx(t5.Input,{ref:t,className:dp("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",n),...e})]}));KLt.displayName=t5.Input.displayName;const XLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.List,{ref:t,className:dp("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden",n),...e}));XLt.displayName=t5.List.displayName;const WLt=nt.forwardRef((n,e)=>Ve.jsx(t5.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...n}));WLt.displayName=t5.Empty.displayName;const $Lt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Group,{ref:t,className:dp("rf-overflow-hidden rf-p-1 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",n),...e}));$Lt.displayName=t5.Group.displayName;const eqi=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Separator,{ref:t,className:dp("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",n),...e}));eqi.displayName=t5.Separator.displayName;const qLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Item,{ref:t,className:dp("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",n),...e}));qLt.displayName=t5.Item.displayName;var ale="Popover",[JLt,Orr]=Lw(ale,[EZ]),hH=EZ(),[tqi,JM]=JLt(ale),ZLt=n=>{const{__scopePopover:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=n,a=hH(e),c=nt.useRef(null),[l,u]=nt.useState(!1),[d,f]=w6({prop:i,defaultProp:r??!1,onChange:o,caller:ale});return Ve.jsx(fwe,{...a,children:Ve.jsx(tqi,{scope:e,contentId:m2(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:nt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:l,onCustomAnchorAdd:nt.useCallback(()=>u(!0),[]),onCustomAnchorRemove:nt.useCallback(()=>u(!1),[]),modal:s,children:t})})};ZLt.displayName=ale;var eFt="PopoverAnchor",nqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(eFt,t),o=hH(t),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return nt.useEffect(()=>(s(),()=>a()),[s,a]),Ve.jsx(pwe,{...o,...i,ref:e})});nqi.displayName=eFt;var tFt="PopoverTrigger",nFt=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(tFt,t),o=hH(t),s=eI(e,r.triggerRef),a=Ve.jsx(B_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":aFt(r.open),...i,ref:s,onClick:uA(n.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:Ve.jsx(pwe,{asChild:!0,...o,children:a})});nFt.displayName=tFt;var pPe="PopoverPortal",[iqi,rqi]=JLt(pPe,{forceMount:void 0}),iFt=n=>{const{__scopePopover:e,forceMount:t,children:i,container:r}=n,o=JM(pPe,e);return Ve.jsx(iqi,{scope:e,forceMount:t,children:Ve.jsx(H5,{present:t||o.open,children:Ve.jsx(wZ,{asChild:!0,container:r,children:i})})})};iFt.displayName=pPe;var kk="PopoverContent",rFt=nt.forwardRef((n,e)=>{const t=rqi(kk,n.__scopePopover),{forceMount:i=t.forceMount,...r}=n,o=JM(kk,n.__scopePopover);return Ve.jsx(H5,{present:i||o.open,children:o.modal?Ve.jsx(sqi,{...r,ref:e}):Ve.jsx(aqi,{...r,ref:e})})});rFt.displayName=kk;var oqi=E6("PopoverContent.RemoveScroll"),sqi=nt.forwardRef((n,e)=>{const t=JM(kk,n.__scopePopover),i=nt.useRef(null),r=eI(e,i),o=nt.useRef(!1);return nt.useEffect(()=>{const s=i.current;if(s)return gwe(s)},[]),Ve.jsx(TZ,{as:oqi,allowPinchZoom:!0,children:Ve.jsx(oFt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uA(n.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=t.triggerRef.current)==null||a.focus()}),onPointerDownOutside:uA(n.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:uA(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),aqi=nt.forwardRef((n,e)=>{const t=JM(kk,n.__scopePopover),i=nt.useRef(!1),r=nt.useRef(!1);return Ve.jsx(oFt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=n.onCloseAutoFocus)==null||s.call(n,o),o.defaultPrevented||(i.current||(a=t.triggerRef.current)==null||a.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{var c,l;(c=n.onInteractOutside)==null||c.call(n,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((l=t.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),oFt=nt.forwardRef((n,e)=>{const{__scopePopover:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=n,f=JM(kk,t),p=hH(t);return $3e(),Ve.jsx(AZ,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:Ve.jsx(pZ,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:Ve.jsx(G1t,{"data-state":aFt(f.open),role:"dialog",id:f.contentId,...p,...d,ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sFt="PopoverClose",cqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(sFt,t);return Ve.jsx(B_.button,{type:"button",...i,ref:e,onClick:uA(n.onClick,()=>r.onOpenChange(!1))})});cqi.displayName=sFt;var lqi="PopoverArrow",uqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=hH(t);return Ve.jsx(z1t,{...r,...i,ref:e})});uqi.displayName=lqi;function aFt(n){return n?"open":"closed"}var dqi=ZLt,hqi=nFt,fqi=iFt,cFt=rFt;const pqi=dqi,Aqi=hqi,lFt=nt.forwardRef(({className:n,align:e="center",sideOffset:t=4,...i},r)=>Ve.jsx(fqi,{children:Ve.jsx(cFt,{ref:r,align:e,sideOffset:t,className:dp("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...i})}));lFt.displayName=cFt.displayName;const gqi=({files:n,onFileChange:e,currentFile:t})=>{const[i,r]=nt.useState(!1),[o,s]=nt.useState(t);return nt.useEffect(()=>{s(t)},[t]),Ve.jsxs(pqi,{open:i,onOpenChange:r,children:[Ve.jsx(Aqi,{asChild:!0,children:Ve.jsxs(sI,{variant:"outline",role:"combobox","aria-expanded":i,className:"rf-w-30 rf-justify-between !rf-font-normal",children:[o||"Select file",Ve.jsx(rzn,{className:"rf-opacity-50"})]})}),Ve.jsx(lFt,{className:"rf-w-fit !rf-p-0",children:Ve.jsxs(jLt,{children:[Ve.jsx(KLt,{placeholder:"Search for file",className:"rf-h-9"}),Ve.jsxs(XLt,{children:[Ve.jsx(WLt,{children:"No file found."}),Ve.jsx($Lt,{children:n.filter(a=>(a.endsWith(".tsx")||a.endsWith(".ts")||a.endsWith(".jsx")||a.endsWith(".js"))&&!a.endsWith(".d.ts")).map((a,c)=>Ve.jsxs(qLt,{value:a,onSelect:l=>{s(l),r(!1),e(l)},children:[a,Ve.jsx(fZ,{className:dp("rf-ml-auto",a===t?"rf-opacity-100":"rf-opacity-0")})]},c))})]})]})})]})},uFt=Zx("run-frame:RunFrameWithApi"),mqi=n=>n.find(e=>e.includes("entrypoint."))??n.find(e=>e.includes("index."))??n.find(e=>e.includes("main."))??n.find(e=>e.endsWith(".tsx")),_qi=n=>n.find(e=>e.includes("manual-edits."))??n.find(e=>e.includes("manual-edit."))??n.find(e=>e.endsWith(".json")),dFt=n=>{const{apiBaseUrl:e,leftHeaderContent:t}=n;nt.useEffect(()=>{n.debug&&Zx.enable("run-frame*")},[n.debug]);const{startPolling:i,stopPolling:r,loadInitialFiles:o}=f5(v=>({startPolling:v.startPolling,stopPolling:v.stopPolling,loadInitialFiles:v.loadInitialFiles})),s=f5(v=>v.fsMap),a=f5(v=>v.circuitJson),[c,l]=nt.useState(""),[u,d]=nt.useState(!0);nt.useEffect(()=>{d(!0),o().finally(()=>d(!1))},[]),nt.useEffect(()=>{const v=Array.from(s.keys());if(c&&v.includes(c))return;const x=window==null?void 0:window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH;if(x&&v.includes(x))l(x);else{const b=v.find(B=>(B.endsWith(".tsx")||B.endsWith(".ts")||B.endsWith(".jsx")||B.endsWith(".js"))&&!B.endsWith(".d.ts"));b&&l(b)}},[s]),M$i();const{editEventsForRender:f,pushEditEvent:p,markRenderStarted:g,markRenderComplete:_}=nAn();nt.useEffect(()=>{e&&(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),nt.useEffect(()=>(i(),()=>r()),[i,r]);const y=nt.useMemo(()=>String(c).length>0?{mainComponentPath:c}:{},[c]);return Ve.jsx(TLt,{fsMap:s,showFileMenu:n.showFileMenu,isLoadingFiles:u,evalVersion:n.evalVersion,forceLatestEvalVersion:n.forceLatestEvalVersion,evalWebWorkerBlobUrl:n.evalWebWorkerBlobUrl??n.workerBlobUrl,leftHeaderContent:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[n.leftHeaderContent,n.showFilesSwitch&&Ve.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2",children:Ve.jsx(gqi,{currentFile:c,files:Array.from(s.keys()),onFileChange:v=>{typeof s.get(v)=="string"&&l(v)}})})]}),defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,onInitialRender:()=>{uFt("onInitialRender / markRenderStarted"),g()},onRenderFinished:()=>{uFt("onRenderFinished / markRenderComplete"),_()},editEvents:f,onEditEvent:v=>{p(v),fetch(`${pS}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...v})});const x=_qi(Array.from(s.keys()))??"manual-edits.json",b=s.get(x),B=JSON.parse(b??"{}");fWe({circuitJson:a,editEvents:[v],manualEditsFile:B}),fetch(`${pS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:x,text_content:JSON.stringify(B),initiator:"runframe"})})},...y})},yqi=()=>{const n=document.getElementById("root");if(n)return n;const e=document.createElement("div");return e.id="root",e.style.height="100vh",document.body.appendChild(e),e},vqi=async()=>{const n=Array.from(document.querySelectorAll("script[type='tscircuit-tsx']")),e=new Map;return await Promise.all(n.map(async(t,i)=>{const r=t.dataset.path||t.getAttribute("data-file-path")||`script${i?i+1:""}.tsx`;if(t.src){const s=await(await fetch(t.src)).text();e.set(r,s)}else e.set(r,t.textContent||"")})),{fsMap:e}},APe=cFe.createRoot(yqi()),hFt="<--INJECT_TSCIRCUIT_EVAL_WEB_WORKER_BLOB_URL-->",gPe={evalWebWorkerBlobUrl:hFt.includes("<--")?void 0:hFt};(async()=>{if(window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI)APe.render(Ve.jsx(B$i,{...gPe}));else{const{fsMap:n}=await vqi();n.size>0?APe.render(Ve.jsx(TLt,{...gPe,fsMap:n})):APe.render(Ve.jsx(dFt,{...gPe}))}})();const xqi=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
|
14979
|
+
*/const E$i=async n=>{var o;const e=await C$i(n,{fetch:(s,a)=>{var c,l,u,d,f;return fetch(`${pS}/proxy`,{...a,headers:{...a==null?void 0:a.headers,"X-Target-Url":s.toString(),"X-Sender-Origin":((c=a==null?void 0:a.headers)==null?void 0:c.origin)??"","X-Sender-Host":((l=a==null?void 0:a.headers)==null?void 0:l.host)??"https://easyeda.com","X-Sender-Referer":((u=a==null?void 0:a.headers)==null?void 0:u.referer)??"","X-Sender-User-Agent":((d=a==null?void 0:a.headers)==null?void 0:d.userAgent)??"","X-Sender-Cookie":((f=a==null?void 0:a.headers)==null?void 0:f.cookie)??""}})}}),t=await x$i(e),i=(o=t.match(/export const (\w+) = .*/))==null?void 0:o[1];if(!i)throw console.error("COULD NOT DETERMINE FILE NAME OF CONVERTED COMPONENT:",t),new Error("Could not determine file name of converted component");const r=`imports/${i}.tsx`;return await r8t.post(`${pS}/files/upsert`,{json:{file_path:r,text_content:t}}),{filePath:r}},DLt=n=>{const e=dre(fe=>fe.lastRunEvalVersion),[t,i]=nt.useState(null),[r,o]=nt.useState(!1),[s,a]=nt.useState(!0),[c,l]=nt.useState(!1),[u,d]=nt.useState(null),[f,p]=nt.useState(null),[g,_]=nt.useState(!1),[y,v]=nt.useState(null),[x,b]=nt.useState(null),[B,U]=nt.useState(!1),[N,Q]=nt.useState(!1),R=lEi(),L=f5(fe=>fe.pushEvent),P=f5(fe=>fe.recentEvents),K=nt.useMemo(()=>Date.now(),[]);bEi(fe=>{if(!(new Date(fe.created_at).valueOf()<K+500)){if(fe.event_type==="FILE_UPDATED"){o(!0);return}if(fe.event_type==="SNIPPET_SAVED"){o(!1),a(!1),v("Snippet saved successfully."),U(!1);return}fe.event_type==="REQUEST_EXPORT"&&(Q(!0),v("Export processing..."),U(!1)),fe.event_type==="EXPORT_CREATED"&&(v(`Export created: ${fe.exportFilePath}`),U(!1),Q(!1))}}),nt.useEffect(()=>{if(!c||u===null)return;const fe=P.filter(Ie=>new Date(Ie.created_at).valueOf()>u),be=fe.find(Ie=>Ie.event_type==="FAILED_TO_SAVE_SNIPPET"),Re=fe.find(Ie=>Ie.event_type==="SNIPPET_SAVED");be&&(l(!1),d(null),b(be.message??"Failed to save snippet. See console for error."),console.error(be.message),U(!0),be.error_code==="SNIPPET_UNSET"&&be.available_snippet_names&&(p(be.available_snippet_names),_(!0))),Re&&(l(!1),d(null),v("Snippet saved successfully."),U(!1))},[P,c]);const G=async()=>{l(!0),d(Date.now()),v(null),U(!1),await L({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},$=f5(fe=>fe.circuitJson),[ie,se]=nt.useState(!1),[ce,Ae]=nt.useState(!1);return Ve.jsxs(Ve.Fragment,{children:[Ve.jsxs(Rwe,{children:[Ve.jsx(Qwe,{asChild:!0,children:Ve.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),Ve.jsxs(GZ,{children:[!n.isWebEmbedded&&Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(Z2,{className:"rf-text-xs",onSelect:G,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>{R.open()},children:"Order"}),Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>se(!0),disabled:c,children:"Import"}),Ve.jsx(Z2,{className:"rf-text-xs",onSelect:()=>{if(!NRe()){aI.error("Requires tscircuit token");return}Ae(!0)},children:"AI Review"})]}),Ve.jsxs(Nwe,{children:[Ve.jsx(UZ,{className:"rf-text-xs",disabled:N,children:N?"Exporting...":"Export"}),Ve.jsx(Dwe,{children:Ve.jsx(OZ,{children:Q3i.map((fe,be)=>Ve.jsx(Z2,{onSelect:()=>{if(!$){aI.error("No Circuit JSON to export");return}D3i({exportName:fe.name,circuitJson:$,projectName:t??"Untitled"})},disabled:N,children:Ve.jsx("span",{className:"rf-text-xs",children:fe.name})},be))})})]}),!n.isWebEmbedded&&Ve.jsxs(Nwe,{children:[Ve.jsx(UZ,{className:"rf-text-xs",children:"Advanced"}),Ve.jsx(Dwe,{children:Ve.jsxs(OZ,{children:[Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[Ve.jsx($8t,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:fe=>{var be;(be=n.onChangeShouldLoadLatestEval)==null||be.call(n,fe===!0)}}),Ve.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),Ve.jsx(Z2,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:Ve.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:Ve.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),Ve.jsx(PEi,{open:B,onOpenChange:U,children:Ve.jsxs(L8t,{children:[Ve.jsxs(F8t,{children:[Ve.jsx(O8t,{children:"Error Saving Snippet"}),Ve.jsx(G8t,{children:x})]}),Ve.jsx(U8t,{children:Ve.jsx(z8t,{onClick:()=>U(!1),children:"Dismiss"})})]})}),Ve.jsx(IEi,{snippetNames:f??[],onSelect:async fe=>{l(!0),d(Date.now()),i(fe),await L({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:fe}),_(!1)},onCancel:()=>_(!1),isOpen:g})]}),Ve.jsx(XEi,{isOpen:ie,onClose:()=>se(!1),onImport:async fe=>{aI.promise(async()=>{if(fe.source==="tscircuit.com")throw await L({event_type:"INSTALL_PACKAGE",full_package_name:`@tsci/${fe.owner}.${fe.name}`}),new Error("Not implemented");if(fe.source==="jlcpcb"){const{filePath:be}=await E$i(fe.partNumber);return{filePath:be}}},{loading:`Importing component: "${fe.name}"`,error:be=>(console.error("IMPORT ERROR",be),`Error importing component: "${fe.name}": ${be.toString()}`),success:be=>be!=null&&be.filePath?`Imported to "${be.filePath}"`:"Import Successful"})}}),Ve.jsx(mwi,{isOpen:ce,onClose:()=>Ae(!1),packageName:t}),Ve.jsx(k2i,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),Ve.jsx(R.OrderDialog,{isOpen:R.isOpen,onClose:R.close,stage:R.stage,setStage:R.setStage})]})},w$i=26,k5=Zx("run-frame:RunFrame"),S$i=async()=>{var n;try{const e=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(e.ok)return(n=(await e.json()).tags)==null?void 0:n.latest}catch(e){console.error("Failed to fetch latest eval version",e)}},NLt=async(n,e)=>{if(n)return n;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const t=await S$i();if(t)return window.TSCIRCUIT_LATEST_EVAL_VERSION=t,t}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},TLt=n=>{var Ae;oBt();const[e,t]=f5(fe=>[fe.circuitJson,fe.setCircuitJson]),[i,r]=nt.useState(null),o=nt.useRef(null),[s,a]=nt.useState(null),[c,l]=nt.useReducer((fe,be)=>fe+1,0),u=dre(fe=>fe.setLastRunEvalVersion),d=nt.useRef(0),f=xEi(),[p,g]=nt.useState(!1),[_,y]=nt.useState(!1),[v,x]=nt.useState({}),b=(Ae=Object.values(v).sort((fe,be)=>fe.startTime-be.startTime)[0])==null?void 0:Ae.effectName;nt.useEffect(()=>{const fe=be=>{(be.ctrlKey||be.metaKey)&&be.key==="Enter"&&!p&&l(1)};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[p]),nt.useEffect(()=>{let fe=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const Re=await NLt(n.evalVersion,n.forceLatestEvalVersion),Ie=await g8t({evalVersion:Re,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0,...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});if(fe)return;globalThis.runFrameWorker=Ie,u(Re)}fe||y(!0)}catch(Re){console.error("Failed to preload eval worker",Re)}})(),()=>{fe=!0}},[n.evalVersion,n.evalWebWorkerBlobUrl,n.forceLatestEvalVersion]);const[B,U]=nt.useState(null),[N,Q]=nt.useState({}),[R,L]=nt.useState(n.defaultActiveTab??n.defaultTab??"pcb");nt.useEffect(()=>{n.debug&&Zx.enable("run-frame*")},[n.debug]);const P=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((fe,[be,Re])=>fe.set(be,Re),new Map),K=nt.useRef(null),G=nt.useRef(null);nt.useEffect(()=>{if(n.isLoadingFiles)return;const fe=P instanceof Map?Object.fromEntries(P.entries()):P;if(!fe||Object.keys(fe).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),g(!1);return}const be=n.showRunButton&&c!==d.current;if(K.current&&e){const Ie=vEi(K.current,P);if(Object.keys(Ie).length>0)k5("code changes detected");else if(G.current!==n.entrypoint)k5("render triggered by entrypoint change");else if(!be){k5("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&c===d.current)return;K.current=P,G.current=n.entrypoint??null,d.current=c,g(!0);const Re=async()=>{var Le,ze,st,ct,at;k5("running render worker"),r(null),U(null),x({});const Ie={progress:0};let xe=!1;o.current=()=>{xe=!0};const Ne=await NLt(n.evalVersion,!globalThis.runFrameWorker&&n.forceLatestEvalVersion);k5("resolvedEvalVersion",Ne);const Ke=globalThis.runFrameWorker??await g8t({evalVersion:Ne,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0,...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});globalThis.runFrameWorker=Ke,u(Ne),k5("Starting render..."),(Le=n.onRenderStarted)==null||Le.call(n);const We=P instanceof Map?Object.fromEntries(P.entries()):P;let ot=Date.now();Ke.on("asyncEffect:start",Xe=>{const vt=`${Xe.phase}|${Xe.componentDisplayName??""}|${Xe.effectName}`;x(mt=>({...mt,[vt]:{...Xe,startTime:Date.now()}}))}),Ke.on("asyncEffect:end",Xe=>{const vt=`${Xe.phase}|${Xe.componentDisplayName??""}|${Xe.effectName}`;x(mt=>{const{[vt]:ht,...zt}=mt;return zt})}),Ke.on("autorouting:start",Xe=>{Q({...N,[Xe.componentDisplayName]:{simpleRouteJson:Xe.simpleRouteJson}})}),Ke.on("board:renderPhaseStarted",Xe=>{Ie.lastRenderEvent=Xe,Ie.eventsProcessed=(Ie.eventsProcessed??0)+1;const vt=EE.indexOf(Xe.phase)/w$i*.75+Ie.eventsProcessed/1e3*.25,mt=1-Math.exp(-vt*3);Ie.progress=mt,xe||U({...Ie})}),R==="render_log"&&Ke.on("renderable:renderLifecycle:anyEvent",Xe=>{Ie.renderEvents=Ie.renderEvents??[],Xe.createdAt=Date.now(),Ie.renderEvents.push(Xe),Date.now()-ot>500&&(Ie.phaseTimings=m8t(Ie.renderEvents??[]),ot=Date.now()),xe||U({...Ie})}),Ke.on("autorouting:progress",Xe=>{a(Xe.debugGraphics)}),k5("Executing fsMap...");const xt=await Ke.executeWithFsMap({entrypoint:n.entrypoint,fsMap:We,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(Xe=>{var mt;const vt=Xe.message.replace("Error: ","");return k5(`eval error: ${vt}`),(mt=n.onError)==null||mt.call(n,Xe),r({error:vt,stack:Xe.stack}),U(null),console.error(Xe),{success:!1}});if(k5("worker call started"),!xt.success){g(!1),x({});return}const it=Ke.renderUntilSettled();k5("waiting for initial circuit json...");let Ee=await Ke.getCircuitJson().catch(Xe=>{var vt;return k5("error getting initial circuit json",Xe),(vt=n.onError)==null||vt.call(n,Xe),r({error:Xe.message,stack:Xe.stack}),U(null),g(!1),x({}),null});Ee&&(k5("got initial circuit json"),t(Ee),(ze=n.onCircuitJsonChange)==null||ze.call(n,Ee),(st=n.onInitialRender)==null||st.call(n,{circuitJson:Ee}),await it,k5("getting final circuit json"),Ee=await Ke.getCircuitJson(),(ct=n.onCircuitJsonChange)==null||ct.call(n,Ee),t(Ee),(at=n.onRenderFinished)==null||at.call(n,{circuitJson:Ee}),a({}),R==="render_log"&&(Ie.phaseTimings=m8t(Ie.renderEvents??[])),Ie.progress=1,xe||U({...Ie}),g(!1),x({}),o.current=null)};f.runWithMutex(Re)},[n.fsMap,n.entrypoint,c,n.evalVersion,n.mainComponentPath,n.isLoadingFiles]);const $=nt.useRef(null),ie=nt.useRef(null),se=fe=>{if(!fe||fe===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}fe.in_progress?($.current=fe,ie.current&&(clearTimeout(ie.current),ie.current=null)):(ie.current&&clearTimeout(ie.current),ie.current=setTimeout(()=>{var Re;const be=fe||$.current;(Re=n.onEditEvent)==null||Re.call(n,be),$.current=null,ie.current=null},100))},ce=async(fe,be)=>{let Re="";const Ie=Array.isArray(e)&&e.find(Ke=>Ke.type==="software_project_metadata"),xe=n.projectUrl??(Ie==null?void 0:Ie.project_url);if(xe)try{Re=new URL(xe).pathname}catch{Re=xe}const Ne=Re?`${Re} - ${fe}`:fe;await fz.post("autorouting/bug_reports/create",{json:{title:Ne,simple_route_json:be.simpleRouteJson}}).json().then(({autorouting_bug_report:Ke})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Ke.autorouting_bug_report_id}`,"_blank")}).catch(Ke=>{console.error("Failed to report autorouting bug",Ke),Ke.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${Ke.message}`)})};return n.isLoadingFiles?Ve.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[Ve.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),Ve.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((fe,be)=>Ve.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},be))})]}),Ve.jsx("div",{className:"rf-flex-1 rf-p-4",children:Ve.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:Ve.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:Ve.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:"Loading files..."})})})})]}):Ve.jsx(tCi,{code:P.get(n.entrypoint??n.mainComponentPath),fsMap:P,defaultActiveTab:n.defaultActiveTab??n.defaultTab,defaultTab:n.defaultTab,availableTabs:n.availableTabs,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:N,onReportAutoroutingLog:n.onReportAutoroutingLog||ce,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[n.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:p||!_,children:["Run"," ",p||!_?Ve.jsx(YR,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx($yt,{className:"rf-w-3 rf-h-3"})]}),p&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(sI,{onClick:fe=>{fe.stopPropagation(),g(!1),U(null),r(null),o.current&&(o.current(),o.current=null),f.cancel(),x({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(pzn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.showFileMenu!==!1&&Ve.jsx(DLt,{isWebEmbedded:n.isWebEmbedded??!0}),n.leftHeaderContent]}),onActiveTabChange:L,circuitJson:e,renderLog:B,activeEffectName:b,isRunningCode:p,errorMessage:i==null?void 0:i.error,errorStack:i==null?void 0:i.stack,onEditEvent:se,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})},B$i=n=>{const[e,t]=cBt("load-latest-eval",!0);return Ve.jsx(dFt,{debug:n.debug,forceLatestEvalVersion:!n.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:n.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,enableFetchProxy:n.enableFetchProxy,leftHeaderContent:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[Ve.jsx(DLt,{isWebEmbedded:!1,shouldLoadLatestEval:!n.workerBlobUrl&&e,onChangeShouldLoadLatestEval:i=>{t(i),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})},M$i=()=>{const n=f5(e=>e.fsMap);nt.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=mqi(e),i=n.get("package.json");try{if(i){const r=JSON.parse(i);if(r!=null&&r.name){document.title=r.name;return}}}catch{}t&&(document.title=t)},[n])};var kLt=1,R$i=.9,Q$i=.8,D$i=.17,cPe=.1,lPe=.999,N$i=.9999,T$i=.99,k$i=/[\\\/_+.#"@\[\(\{&]/,P$i=/[\\\/_+.#"@\[\(\{&]/g,L$i=/[\s-]/,PLt=/[\s-]/g;function uPe(n,e,t,i,r,o,s){if(o===e.length)return r===n.length?kLt:T$i;var a=`${r},${o}`;if(s[a]!==void 0)return s[a];for(var c=i.charAt(o),l=t.indexOf(c,r),u=0,d,f,p,g;l>=0;)d=uPe(n,e,t,i,l+1,o+1,s),d>u&&(l===r?d*=kLt:k$i.test(n.charAt(l-1))?(d*=Q$i,p=n.slice(r,l-1).match(P$i),p&&r>0&&(d*=Math.pow(lPe,p.length))):L$i.test(n.charAt(l-1))?(d*=R$i,g=n.slice(r,l-1).match(PLt),g&&r>0&&(d*=Math.pow(lPe,g.length))):(d*=D$i,r>0&&(d*=Math.pow(lPe,l-r))),n.charAt(l)!==e.charAt(o)&&(d*=N$i)),(d<cPe&&t.charAt(l-1)===i.charAt(o+1)||i.charAt(o+1)===i.charAt(o)&&t.charAt(l-1)!==i.charAt(o))&&(f=uPe(n,e,t,i,l+1,o+2,s),f*cPe>d&&(d=f*cPe)),d>u&&(u=d),l=t.indexOf(c,l+1);return s[a]=u,u}function LLt(n){return n.toLowerCase().replace(PLt," ")}function F$i(n,e,t){return n=t&&t.length>0?`${n+" "+t.join(" ")}`:n,uPe(n,e,LLt(n),LLt(e),0,0,{})}var uH='[cmdk-group=""]',dPe='[cmdk-group-items=""]',U$i='[cmdk-group-heading=""]',FLt='[cmdk-item=""]',ULt=`${FLt}:not([aria-disabled="true"])`,hPe="cmdk-item-select",Nk="data-value",O$i=(n,e,t)=>F$i(n,e,t),OLt=nt.createContext(void 0),dH=()=>nt.useContext(OLt),GLt=nt.createContext(void 0),fPe=()=>nt.useContext(GLt),zLt=nt.createContext(void 0),HLt=nt.forwardRef((n,e)=>{let t=Tk(()=>{var xe,Ne;return{search:"",value:(Ne=(xe=n.value)!=null?xe:n.defaultValue)!=null?Ne:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Tk(()=>new Set),r=Tk(()=>new Map),o=Tk(()=>new Map),s=Tk(()=>new Set),a=YLt(n),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:_=!1,vimBindings:y=!0,...v}=n,x=m2(),b=m2(),B=m2(),U=nt.useRef(null),N=q$i();e7(()=>{if(u!==void 0){let xe=u.trim();t.current.value=xe,Q.emit()}},[u]),e7(()=>{N(6,$)},[]);let Q=nt.useMemo(()=>({subscribe:xe=>(s.current.add(xe),()=>s.current.delete(xe)),snapshot:()=>t.current,setState:(xe,Ne,Ke)=>{var We,ot,xt,it;if(!Object.is(t.current[xe],Ne)){if(t.current[xe]=Ne,xe==="search")G(),P(),N(1,K);else if(xe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ee=document.getElementById(B);Ee?Ee.focus():(We=document.getElementById(x))==null||We.focus()}if(N(7,()=>{var Ee;t.current.selectedItemId=(Ee=ie())==null?void 0:Ee.id,Q.emit()}),Ke||N(5,$),((ot=a.current)==null?void 0:ot.value)!==void 0){let Ee=Ne??"";(it=(xt=a.current).onValueChange)==null||it.call(xt,Ee);return}}Q.emit()}},emit:()=>{s.current.forEach(xe=>xe())}}),[]),R=nt.useMemo(()=>({value:(xe,Ne,Ke)=>{var We;Ne!==((We=o.current.get(xe))==null?void 0:We.value)&&(o.current.set(xe,{value:Ne,keywords:Ke}),t.current.filtered.items.set(xe,L(Ne,Ke)),N(2,()=>{P(),Q.emit()}))},item:(xe,Ne)=>(i.current.add(xe),Ne&&(r.current.has(Ne)?r.current.get(Ne).add(xe):r.current.set(Ne,new Set([xe]))),N(3,()=>{G(),P(),t.current.value||K(),Q.emit()}),()=>{o.current.delete(xe),i.current.delete(xe),t.current.filtered.items.delete(xe);let Ke=ie();N(4,()=>{G(),(Ke==null?void 0:Ke.getAttribute("id"))===xe&&K(),Q.emit()})}),group:xe=>(r.current.has(xe)||r.current.set(xe,new Set),()=>{o.current.delete(xe),r.current.delete(xe)}),filter:()=>a.current.shouldFilter,label:c||n["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:B,labelId:b,listInnerRef:U}),[]);function L(xe,Ne){var Ke,We;let ot=(We=(Ke=a.current)==null?void 0:Ke.filter)!=null?We:O$i;return xe?ot(xe,t.current.search,Ne):0}function P(){if(!t.current.search||a.current.shouldFilter===!1)return;let xe=t.current.filtered.items,Ne=[];t.current.filtered.groups.forEach(We=>{let ot=r.current.get(We),xt=0;ot.forEach(it=>{let Ee=xe.get(it);xt=Math.max(Ee,xt)}),Ne.push([We,xt])});let Ke=U.current;se().sort((We,ot)=>{var xt,it;let Ee=We.getAttribute("id"),Le=ot.getAttribute("id");return((xt=xe.get(Le))!=null?xt:0)-((it=xe.get(Ee))!=null?it:0)}).forEach(We=>{let ot=We.closest(dPe);ot?ot.appendChild(We.parentElement===ot?We:We.closest(`${dPe} > *`)):Ke.appendChild(We.parentElement===Ke?We:We.closest(`${dPe} > *`))}),Ne.sort((We,ot)=>ot[1]-We[1]).forEach(We=>{var ot;let xt=(ot=U.current)==null?void 0:ot.querySelector(`${uH}[${Nk}="${encodeURIComponent(We[0])}"]`);xt==null||xt.parentElement.appendChild(xt)})}function K(){let xe=se().find(Ke=>Ke.getAttribute("aria-disabled")!=="true"),Ne=xe==null?void 0:xe.getAttribute(Nk);Q.setState("value",Ne||void 0)}function G(){var xe,Ne,Ke,We;if(!t.current.search||a.current.shouldFilter===!1){t.current.filtered.count=i.current.size;return}t.current.filtered.groups=new Set;let ot=0;for(let xt of i.current){let it=(Ne=(xe=o.current.get(xt))==null?void 0:xe.value)!=null?Ne:"",Ee=(We=(Ke=o.current.get(xt))==null?void 0:Ke.keywords)!=null?We:[],Le=L(it,Ee);t.current.filtered.items.set(xt,Le),Le>0&&ot++}for(let[xt,it]of r.current)for(let Ee of it)if(t.current.filtered.items.get(Ee)>0){t.current.filtered.groups.add(xt);break}t.current.filtered.count=ot}function $(){var xe,Ne,Ke;let We=ie();We&&(((xe=We.parentElement)==null?void 0:xe.firstChild)===We&&((Ke=(Ne=We.closest(uH))==null?void 0:Ne.querySelector(U$i))==null||Ke.scrollIntoView({block:"nearest"})),We.scrollIntoView({block:"nearest"}))}function ie(){var xe;return(xe=U.current)==null?void 0:xe.querySelector(`${FLt}[aria-selected="true"]`)}function se(){var xe;return Array.from(((xe=U.current)==null?void 0:xe.querySelectorAll(ULt))||[])}function ce(xe){let Ne=se()[xe];Ne&&Q.setState("value",Ne.getAttribute(Nk))}function Ae(xe){var Ne;let Ke=ie(),We=se(),ot=We.findIndex(it=>it===Ke),xt=We[ot+xe];(Ne=a.current)!=null&&Ne.loop&&(xt=ot+xe<0?We[We.length-1]:ot+xe===We.length?We[0]:We[ot+xe]),xt&&Q.setState("value",xt.getAttribute(Nk))}function fe(xe){let Ne=ie(),Ke=Ne==null?void 0:Ne.closest(uH),We;for(;Ke&&!We;)Ke=xe>0?W$i(Ke,uH):$$i(Ke,uH),We=Ke==null?void 0:Ke.querySelector(ULt);We?Q.setState("value",We.getAttribute(Nk)):Ae(xe)}let be=()=>ce(se().length-1),Re=xe=>{xe.preventDefault(),xe.metaKey?be():xe.altKey?fe(1):Ae(1)},Ie=xe=>{xe.preventDefault(),xe.metaKey?ce(0):xe.altKey?fe(-1):Ae(-1)};return nt.createElement(B_.div,{ref:e,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:xe=>{var Ne;(Ne=v.onKeyDown)==null||Ne.call(v,xe);let Ke=xe.nativeEvent.isComposing||xe.keyCode===229;if(!(xe.defaultPrevented||Ke))switch(xe.key){case"n":case"j":{y&&xe.ctrlKey&&Re(xe);break}case"ArrowDown":{Re(xe);break}case"p":case"k":{y&&xe.ctrlKey&&Ie(xe);break}case"ArrowUp":{Ie(xe);break}case"Home":{xe.preventDefault(),ce(0);break}case"End":{xe.preventDefault(),be();break}case"Enter":{xe.preventDefault();let We=ie();if(We){let ot=new Event(hPe);We.dispatchEvent(ot)}}}}},nt.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Z$i},c),sle(n,xe=>nt.createElement(GLt.Provider,{value:Q},nt.createElement(OLt.Provider,{value:R},xe))))}),G$i=nt.forwardRef((n,e)=>{var t,i;let r=m2(),o=nt.useRef(null),s=nt.useContext(zLt),a=dH(),c=YLt(n),l=(i=(t=c.current)==null?void 0:t.forceMount)!=null?i:s==null?void 0:s.forceMount;e7(()=>{if(!l)return a.item(r,s==null?void 0:s.id)},[l]);let u=VLt(r,o,[n.value,n.children,o],n.keywords),d=fPe(),f=qM(N=>N.value&&N.value===u.current),p=qM(N=>l||a.filter()===!1?!0:N.search?N.filtered.items.get(r)>0:!0);nt.useEffect(()=>{let N=o.current;if(!(!N||n.disabled))return N.addEventListener(hPe,g),()=>N.removeEventListener(hPe,g)},[p,n.onSelect,n.disabled]);function g(){var N,Q;_(),(Q=(N=c.current).onSelect)==null||Q.call(N,u.current)}function _(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:y,value:v,onSelect:x,forceMount:b,keywords:B,...U}=n;return nt.createElement(B_.div,{ref:AS(o,e),...U,id:r,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||a.getDisablePointerSelection()?void 0:_,onClick:y?void 0:g},n.children)}),z$i=nt.forwardRef((n,e)=>{let{heading:t,children:i,forceMount:r,...o}=n,s=m2(),a=nt.useRef(null),c=nt.useRef(null),l=m2(),u=dH(),d=qM(p=>r||u.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);e7(()=>u.group(s),[]),VLt(s,a,[n.value,n.heading,c]);let f=nt.useMemo(()=>({id:s,forceMount:r}),[r]);return nt.createElement(B_.div,{ref:AS(a,e),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},t&&nt.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},t),sle(n,p=>nt.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?l:void 0},nt.createElement(zLt.Provider,{value:f},p))))}),H$i=nt.forwardRef((n,e)=>{let{alwaysRender:t,...i}=n,r=nt.useRef(null),o=qM(s=>!s.search);return!t&&!o?null:nt.createElement(B_.div,{ref:AS(r,e),...i,"cmdk-separator":"",role:"separator"})}),Y$i=nt.forwardRef((n,e)=>{let{onValueChange:t,...i}=n,r=n.value!=null,o=fPe(),s=qM(l=>l.search),a=qM(l=>l.selectedItemId),c=dH();return nt.useEffect(()=>{n.value!=null&&o.setState("search",n.value)},[n.value]),nt.createElement(B_.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?n.value:s,onChange:l=>{r||o.setState("search",l.target.value),t==null||t(l.target.value)}})}),V$i=nt.forwardRef((n,e)=>{let{children:t,label:i="Suggestions",...r}=n,o=nt.useRef(null),s=nt.useRef(null),a=qM(l=>l.selectedItemId),c=dH();return nt.useEffect(()=>{if(s.current&&o.current){let l=s.current,u=o.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(d),f.unobserve(l)}}},[]),nt.createElement(B_.div,{ref:AS(o,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:c.listId},sle(n,l=>nt.createElement("div",{ref:AS(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),j$i=nt.forwardRef((n,e)=>{let{open:t,onOpenChange:i,overlayClassName:r,contentClassName:o,container:s,...a}=n;return nt.createElement(ARe,{open:t,onOpenChange:i},nt.createElement(gRe,{container:s},nt.createElement(pre,{"cmdk-overlay":"",className:r}),nt.createElement(Are,{"aria-label":n.label,"cmdk-dialog":"",className:o},nt.createElement(HLt,{ref:e,...a}))))}),K$i=nt.forwardRef((n,e)=>qM(t=>t.filtered.count===0)?nt.createElement(B_.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),X$i=nt.forwardRef((n,e)=>{let{progress:t,children:i,label:r="Loading...",...o}=n;return nt.createElement(B_.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},sle(n,s=>nt.createElement("div",{"aria-hidden":!0},s)))}),t5=Object.assign(HLt,{List:V$i,Item:G$i,Input:Y$i,Group:z$i,Separator:H$i,Dialog:j$i,Empty:K$i,Loading:X$i});function W$i(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return t;t=t.nextElementSibling}}function $$i(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}}function YLt(n){let e=nt.useRef(n);return e7(()=>{e.current=n}),e}var e7=typeof window>"u"?nt.useEffect:nt.useLayoutEffect;function Tk(n){let e=nt.useRef();return e.current===void 0&&(e.current=n()),e}function qM(n){let e=fPe(),t=()=>n(e.snapshot());return nt.useSyncExternalStore(e.subscribe,t,t)}function VLt(n,e,t,i=[]){let r=nt.useRef(),o=dH();return e7(()=>{var s;let a=(()=>{var l;for(let u of t){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=i.map(l=>l.trim());o.value(n,a,c),(s=e.current)==null||s.setAttribute(Nk,a),r.current=a}),r}var q$i=()=>{let[n,e]=nt.useState(),t=Tk(()=>new Map);return e7(()=>{t.current.forEach(i=>i()),t.current=new Map},[n]),(i,r)=>{t.current.set(i,r),e({})}};function J$i(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function sle({asChild:n,children:e},t){return n&&nt.isValidElement(e)?nt.cloneElement(J$i(e),{ref:e.ref},t(e.props.children)):t(e)}var Z$i={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const jLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5,{ref:t,className:dp("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));jLt.displayName=t5.displayName;const KLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[Ve.jsx(j3e,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),Ve.jsx(t5.Input,{ref:t,className:dp("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",n),...e})]}));KLt.displayName=t5.Input.displayName;const XLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.List,{ref:t,className:dp("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden",n),...e}));XLt.displayName=t5.List.displayName;const WLt=nt.forwardRef((n,e)=>Ve.jsx(t5.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...n}));WLt.displayName=t5.Empty.displayName;const $Lt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Group,{ref:t,className:dp("rf-overflow-hidden rf-p-1 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",n),...e}));$Lt.displayName=t5.Group.displayName;const eqi=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Separator,{ref:t,className:dp("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",n),...e}));eqi.displayName=t5.Separator.displayName;const qLt=nt.forwardRef(({className:n,...e},t)=>Ve.jsx(t5.Item,{ref:t,className:dp("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",n),...e}));qLt.displayName=t5.Item.displayName;var ale="Popover",[JLt,Orr]=Lw(ale,[EZ]),hH=EZ(),[tqi,JM]=JLt(ale),ZLt=n=>{const{__scopePopover:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=n,a=hH(e),c=nt.useRef(null),[l,u]=nt.useState(!1),[d,f]=w6({prop:i,defaultProp:r??!1,onChange:o,caller:ale});return Ve.jsx(fwe,{...a,children:Ve.jsx(tqi,{scope:e,contentId:m2(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:nt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:l,onCustomAnchorAdd:nt.useCallback(()=>u(!0),[]),onCustomAnchorRemove:nt.useCallback(()=>u(!1),[]),modal:s,children:t})})};ZLt.displayName=ale;var eFt="PopoverAnchor",nqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(eFt,t),o=hH(t),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return nt.useEffect(()=>(s(),()=>a()),[s,a]),Ve.jsx(pwe,{...o,...i,ref:e})});nqi.displayName=eFt;var tFt="PopoverTrigger",nFt=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(tFt,t),o=hH(t),s=eI(e,r.triggerRef),a=Ve.jsx(B_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":aFt(r.open),...i,ref:s,onClick:uA(n.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:Ve.jsx(pwe,{asChild:!0,...o,children:a})});nFt.displayName=tFt;var pPe="PopoverPortal",[iqi,rqi]=JLt(pPe,{forceMount:void 0}),iFt=n=>{const{__scopePopover:e,forceMount:t,children:i,container:r}=n,o=JM(pPe,e);return Ve.jsx(iqi,{scope:e,forceMount:t,children:Ve.jsx(H5,{present:t||o.open,children:Ve.jsx(wZ,{asChild:!0,container:r,children:i})})})};iFt.displayName=pPe;var kk="PopoverContent",rFt=nt.forwardRef((n,e)=>{const t=rqi(kk,n.__scopePopover),{forceMount:i=t.forceMount,...r}=n,o=JM(kk,n.__scopePopover);return Ve.jsx(H5,{present:i||o.open,children:o.modal?Ve.jsx(sqi,{...r,ref:e}):Ve.jsx(aqi,{...r,ref:e})})});rFt.displayName=kk;var oqi=E6("PopoverContent.RemoveScroll"),sqi=nt.forwardRef((n,e)=>{const t=JM(kk,n.__scopePopover),i=nt.useRef(null),r=eI(e,i),o=nt.useRef(!1);return nt.useEffect(()=>{const s=i.current;if(s)return gwe(s)},[]),Ve.jsx(TZ,{as:oqi,allowPinchZoom:!0,children:Ve.jsx(oFt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uA(n.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=t.triggerRef.current)==null||a.focus()}),onPointerDownOutside:uA(n.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:uA(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),aqi=nt.forwardRef((n,e)=>{const t=JM(kk,n.__scopePopover),i=nt.useRef(!1),r=nt.useRef(!1);return Ve.jsx(oFt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=n.onCloseAutoFocus)==null||s.call(n,o),o.defaultPrevented||(i.current||(a=t.triggerRef.current)==null||a.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{var c,l;(c=n.onInteractOutside)==null||c.call(n,o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;((l=t.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),oFt=nt.forwardRef((n,e)=>{const{__scopePopover:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=n,f=JM(kk,t),p=hH(t);return $3e(),Ve.jsx(AZ,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:Ve.jsx(pZ,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:Ve.jsx(G1t,{"data-state":aFt(f.open),role:"dialog",id:f.contentId,...p,...d,ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sFt="PopoverClose",cqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=JM(sFt,t);return Ve.jsx(B_.button,{type:"button",...i,ref:e,onClick:uA(n.onClick,()=>r.onOpenChange(!1))})});cqi.displayName=sFt;var lqi="PopoverArrow",uqi=nt.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=hH(t);return Ve.jsx(z1t,{...r,...i,ref:e})});uqi.displayName=lqi;function aFt(n){return n?"open":"closed"}var dqi=ZLt,hqi=nFt,fqi=iFt,cFt=rFt;const pqi=dqi,Aqi=hqi,lFt=nt.forwardRef(({className:n,align:e="center",sideOffset:t=4,...i},r)=>Ve.jsx(fqi,{children:Ve.jsx(cFt,{ref:r,align:e,sideOffset:t,className:dp("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...i})}));lFt.displayName=cFt.displayName;const gqi=({files:n,onFileChange:e,currentFile:t})=>{const[i,r]=nt.useState(!1),[o,s]=nt.useState(t);return nt.useEffect(()=>{s(t)},[t]),Ve.jsxs(pqi,{open:i,onOpenChange:r,children:[Ve.jsx(Aqi,{asChild:!0,children:Ve.jsxs(sI,{variant:"outline",role:"combobox","aria-expanded":i,className:"rf-w-30 rf-justify-between !rf-font-normal",children:[o||"Select file",Ve.jsx(rzn,{className:"rf-opacity-50"})]})}),Ve.jsx(lFt,{className:"rf-w-fit !rf-p-0",children:Ve.jsxs(jLt,{children:[Ve.jsx(KLt,{placeholder:"Search for file",className:"rf-h-9"}),Ve.jsxs(XLt,{children:[Ve.jsx(WLt,{children:"No file found."}),Ve.jsx($Lt,{children:n.filter(a=>(a.endsWith(".tsx")||a.endsWith(".ts")||a.endsWith(".jsx")||a.endsWith(".js"))&&!a.endsWith(".d.ts")).map((a,c)=>Ve.jsxs(qLt,{value:a,onSelect:l=>{s(l),r(!1),e(l)},children:[a,Ve.jsx(fZ,{className:dp("rf-ml-auto",a===t?"rf-opacity-100":"rf-opacity-0")})]},c))})]})]})})]})},uFt=Zx("run-frame:RunFrameWithApi"),mqi=n=>n.find(e=>e.includes("entrypoint."))??n.find(e=>e.includes("index."))??n.find(e=>e.includes("main."))??n.find(e=>e.endsWith(".tsx")),_qi=n=>n.find(e=>e.includes("manual-edits."))??n.find(e=>e.includes("manual-edit."))??n.find(e=>e.endsWith(".json")),dFt=n=>{const{apiBaseUrl:e,leftHeaderContent:t}=n;nt.useEffect(()=>{n.debug&&Zx.enable("run-frame*")},[n.debug]);const{startPolling:i,stopPolling:r,loadInitialFiles:o}=f5(v=>({startPolling:v.startPolling,stopPolling:v.stopPolling,loadInitialFiles:v.loadInitialFiles})),s=f5(v=>v.fsMap),a=f5(v=>v.circuitJson),[c,l]=nt.useState(""),[u,d]=nt.useState(!0);nt.useEffect(()=>{d(!0),o().finally(()=>d(!1))},[]),nt.useEffect(()=>{const v=Array.from(s.keys());if(c&&v.includes(c))return;const x=window==null?void 0:window.TSCIRCUIT_DEFAULT_MAIN_COMPONENT_PATH;if(x&&v.includes(x))l(x);else{const b=v.find(B=>(B.endsWith(".tsx")||B.endsWith(".ts")||B.endsWith(".jsx")||B.endsWith(".js"))&&!B.endsWith(".d.ts"));b&&l(b)}},[s]),M$i();const{editEventsForRender:f,pushEditEvent:p,markRenderStarted:g,markRenderComplete:_}=nAn();nt.useEffect(()=>{e&&(window.TSCIRCUIT_FILESERVER_API_BASE_URL=e)},[e]),nt.useEffect(()=>(i(),()=>r()),[i,r]);const y=nt.useMemo(()=>String(c).length>0?{mainComponentPath:c}:{},[c]);return Ve.jsx(TLt,{fsMap:s,showFileMenu:n.showFileMenu,isLoadingFiles:u,evalVersion:n.evalVersion,forceLatestEvalVersion:n.forceLatestEvalVersion,evalWebWorkerBlobUrl:n.evalWebWorkerBlobUrl??n.workerBlobUrl,enableFetchProxy:n.enableFetchProxy,leftHeaderContent:Ve.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[n.leftHeaderContent,n.showFilesSwitch&&Ve.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2",children:Ve.jsx(gqi,{currentFile:c,files:Array.from(s.keys()),onFileChange:v=>{typeof s.get(v)=="string"&&l(v)}})})]}),defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,onInitialRender:()=>{uFt("onInitialRender / markRenderStarted"),g()},onRenderFinished:()=>{uFt("onRenderFinished / markRenderComplete"),_()},editEvents:f,onEditEvent:v=>{p(v),fetch(`${pS}/events/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event_type:"USER_CREATED_MANUAL_EDIT",...v})});const x=_qi(Array.from(s.keys()))??"manual-edits.json",b=s.get(x),B=JSON.parse(b??"{}");fWe({circuitJson:a,editEvents:[v],manualEditsFile:B}),fetch(`${pS}/files/upsert`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:x,text_content:JSON.stringify(B),initiator:"runframe"})})},...y})},yqi=()=>{const n=document.getElementById("root");if(n)return n;const e=document.createElement("div");return e.id="root",e.style.height="100vh",document.body.appendChild(e),e},vqi=async()=>{const n=Array.from(document.querySelectorAll("script[type='tscircuit-tsx']")),e=new Map;return await Promise.all(n.map(async(t,i)=>{const r=t.dataset.path||t.getAttribute("data-file-path")||`script${i?i+1:""}.tsx`;if(t.src){const s=await(await fetch(t.src)).text();e.set(r,s)}else e.set(r,t.textContent||"")})),{fsMap:e}},APe=cFe.createRoot(yqi()),hFt="<--INJECT_TSCIRCUIT_EVAL_WEB_WORKER_BLOB_URL-->",gPe={evalWebWorkerBlobUrl:hFt.includes("<--")?void 0:hFt,enableFetchProxy:"<--INJECT_ENABLE_FETCH_PROXY-->".includes("<--")?void 0:!0};(async()=>{if(window.TSCIRCUIT_USE_RUNFRAME_FOR_CLI)APe.render(Ve.jsx(B$i,{...gPe}));else{const{fsMap:n}=await vqi();n.size>0?APe.render(Ve.jsx(TLt,{...gPe,fsMap:n})):APe.render(Ve.jsx(dFt,{...gPe}))}})();const xqi=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tscircuit/runframe",
|
|
3
3
|
"main": "dist/preview.js",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.828",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist/preview.js",
|
|
8
8
|
"./preview": "./dist/preview.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@tscircuit/assembly-viewer": "^0.0.4",
|
|
47
47
|
"@tscircuit/checks": "^0.0.72",
|
|
48
48
|
"@tscircuit/create-snippet-url": "^0.0.8",
|
|
49
|
-
"@tscircuit/eval": "^0.0.
|
|
49
|
+
"@tscircuit/eval": "^0.0.288",
|
|
50
50
|
"@tscircuit/fake-snippets": "^0.0.87",
|
|
51
51
|
"@tscircuit/file-server": "^0.0.24",
|
|
52
52
|
"@tscircuit/footprinter": "^0.0.231",
|